..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 function. what..
<?php
/* Fetches database profiles
Author: Remco Kouw
Site: http://www.hacksuite.com
Last Edit: 14-11-2014
*/
if(!defined('IN_SCRIPT')){
exit;
}
$sDest = $_PATHS['data_root']."/dbprofiles.php";
include_once($sDest);
$bRecords = false;
$sSelectProfiles = "<select name=\"sProfiles\" class=\"profilesf\">\n";
foreach($_CONTEXT['dbcon'] as $sName=>$aValues){
$bRecords = true;
$sSelectProfiles .= "<optgroup label=\"".$sName."\">\n";
for($x=0;$x<count($aValues);$x++){
$sSelectProfiles .= "<option value=\"".$sName.":".$x."\">".$aValues[$x]['user']."@".$aValues[$x]['host']." - ".$aValues[$x]['db']."</option>\n";
}
$sSelectProfiles .= "</optgroup>\n";
}
$sSelectProfiles .= "</select>\n";
?>