..used one or more modules you must have seen the iframes used for realtime result display. In this tutorial I'm going to show you how to insert them into your module and how they..
Creates a blueprint/map of a server folder
<?php
/* Outputs the converted text or displays the result
Author: Remco Kouw
Site: http://www.hacksuite.com
Last Edit: 11-04-2015
*/
$_MODULE_C = "thc_xc";
include_once("../../Includes/screen_header.php");
$sDest = "convertopt.php";
@include_once($sDest);
if(!$iItems = @count($_CONVERT)){
die("<br>\n<b>Invalid convert file, expecting convert_opt.php to contain \$_CONVERT</b><br>\n");
}
$mIndex = false;
foreach($_CONVERT as $iKey=>$aValues){
if($aValues['function']==$_POST['sOption']){
$mIndex = $iKey;
break;
}
}
if($mIndex===false){
die("<br>\n<b>Specified function doesn't exist</b><br>\n");
}
// first of all let's see if the method option is valid..
$sFunction = @$_CONVERT[$mIndex]['function'];
if(!@function_exists($sFunction)){
$sDest = "CONVERTERS/".$sFunction.".php";
if(!file_exists($sDest)){
die("<br>\n<b>Converter file ".$sDest." doesn't exist, also note that function names should correspond with filenames (function ".$sFunction." = /CONVERTERS/".$sFunction.".php)</b><br>\n");
}
include_once($sDest);
if(!@function_exists($sFunction)){
die("<br>\n<b>Function ".$sFunction." isn't available</b><br>\n");
}
}
$iItems = @count($_CONVERT[$mIndex]['fieldnames']);
switch($iItems){
case 8:
$sOut = $sFunction($_POST['sInput0'],$_POST['sInput1'],$_POST['sInput2'],$_POST['sInput3'],$_POST['sInput4'],$_POST['sInput5'],$_POST['sInput6'],$_POST['sInput7']);
break;
case 7:
$sOut = $sFunction($_POST['sInput0'],$_POST['sInput1'],$_POST['sInput2'],$_POST['sInput3'],$_POST['sInput4'],$_POST['sInput5'],$_POST['sInput6']);
break;
case 6:
$sOut = $sFunction($_POST['sInput0'],$_POST['sInput1'],$_POST['sInput2'],$_POST['sInput3'],$_POST['sInput4'],$_POST['sInput5']);
break;
case 5:
$sOut = $sFunction($_POST['sInput0'],$_POST['sInput1'],$_POST['sInput2'],$_POST['sInput3'],$_POST['sInput4']);
break;
case 4:
$sOut = $sFunction($_POST['sInput0'],$_POST['sInput1'],$_POST['sInput2'],$_POST['sInput3']);
break;
case 3:
$sOut = $sFunction($_POST['sInput0'],$_POST['sInput1'],$_POST['sInput2']);
break;
case 2:
$sOut = $sFunction($_POST['sInput0'],$_POST['sInput1']);
break;
case 1:
$sOut = $sFunction($_POST['sInput0']);
break;
case 0:
$sOut = $sFunction();
break;
}
if(isset($_CONVERT[$mIndex]['nl2br'])){
$sOut = nl2br($sOut);
}
echo $sOut;
?>