function slist() { $search = trim($_GET["search"]); if ($search != null) { $search = str_replace(".", "\\.", $search); $search = str_replace("*", ".*?", $search); $search = str_replace(" ", "\\s", $search); } $q = new mysql(); if (is_numeric($_GET["instance-id"]) && $_GET["instance-id"] > 0) { $q = new mysql_multi($_GET["instance-id"]); $AppenData = "XHR.appendData('instance-id','{$_GET["instance-id"]}');"; $uriplus = "&instance-id={$_GET["instance-id"]}"; } $array = $q->SHOW_VARIABLES(); $tpl = new templates(); $page = CurrentPageName(); $html = "<center>\n<table cellspacing='0' cellpadding='0' border='0' class='tableView' style='width:100%'>\n<thead class='thead'>\n\t<tr>\n\t\t<th width=1%>" . imgtootltip("refresh-24.png", "{refresh}", "MysqlsSearch()") . "</th>\n\t\t<th width=1%> </th>\n\t\t<th width=99%> </th>\n\t</tr>\n</thead>\n<tbody class='tbody'>"; while (list($num, $ligne) = each($array)) { if ($classtr == "oddRow") { $classtr = null; } else { $classtr = "oddRow"; } if ($ligne == null) { $ligne = " "; } if ($search != null) { if (!preg_match("#{$search}#", $num)) { continue; } } if (strpos($ligne, ",")) { $tbl = explode(",", $ligne); $ligne = @implode("<br>", $tbl); } $color = "black"; if ($ligne == "OFF") { $color = "#9B9999"; } if ($ligne == "NO") { $color = "#9B9999"; } if ($ligne == "DISABLED") { $color = "#9B9999"; } if (is_numeric($ligne)) { if ($ligne < 1) { $color = "#9B9999"; } } $html = $html . "\n\t\t<tr class={$classtr}>\n\t\t\t\n\t\t\t<td width=1% style='font-size:14px;font-weight:bold;color:{$color}' colspan=2>{$num}</td>\n\t\t\t<td width=99% style='font-size:14px;font-weight:bold;color:{$color}'>{$ligne}</td>\n\t\t</tr>\n\t\t"; } $html = $html . "</table>"; echo $tpl->_ENGINE_parse_body($html); }