Example #1
0
echo "function submitForm(entity)\n";
echo "{\n";
echo "\treturn true;\n";
echo "}\n";
echo "\n";
echo "//--></script>\n";
// input variables :
// - $preselServ : preselected service address
// - $execCommand : executed command on preselected service, like a normal service
//
echo "<br><br>\n";
echo "<table border=0><tr valign=top>\n";
echo "<form method=post action='" . $_SERVER['PHP_SELF'] . "' name='cmdform'>\n";
echo "<td>\n";
$result = sqlquery("SELECT DISTINCT shard FROM service ORDER BY shard");
echo "<select multiple size=" . sqlnumrows($result) . " name='selshards[]'>";
while ($result && ($arr = sqlfetch($result))) {
    $selected = isset($selshards) && in_array($arr["shard"], $selshards) || (isset($admfilter_shard) && $admfilter_shard != "" && strstr($arr["shard"], $admfilter_shard) || $admfilter_shard == "" && !isset($selshards));
    if ($selected) {
        $selected_shards[] = $arr["shard"];
    }
    echo "<option value='" . $arr["shard"] . "'" . ($selected ? " selected" : "") . ">" . $arr["shard"];
}
echo "</select>\n";
echo "</td>\n";
echo "<td width=30>&nbsp;</td>\n";
echo "<td>\n";
echo "<table border=0>\n";
echo "<tr><th align=left>Player/Character name</th></tr>\n";
echo "<tr><td><input name=char_name value='" . stripslashes($char_name) . "' size=50 maxlength=20480></td>\n";
echo "<td><input type=submit value='Locate'></td></tr>\n";
Example #2
0
}
if (count($queryErrors) > 0) {
    echo "<br><font size=3><b>Execution errors:</b></font>\n";
    foreach ($queryErrors as $error) {
        echo "<br><font size=3 color=#FF0000><b>{$error}</b></font>\n";
    }
}
echo "<br><br><font size=0>{$queryResult}</font>\n";
echo "</td></form></tr></table>\n";
function lvcmp($a, $b)
{
    return $a["path"] == $b["path"] ? 0 : $a["path"] < $b["path"] ? -1 : 1;
}
if (isset($tid) && $tid != "" && count($listPath) > 0) {
    $result = sqlquery("SELECT view_row.name AS name, variable.vid, variable.path, warning_bound, error_bound, alarm_order FROM view_row, variable WHERE tid='{$tid}' AND variable.vid=view_row.vid AND graph!='0' ORDER BY name");
    if ($result && sqlnumrows($result) > 0) {
        unset($listVars);
        while ($result && ($arr = sqlfetch($result))) {
            $gname = $arr["name"];
            $gvid = $arr["vid"];
            $gfilter = $arr["path"];
            $gwarn = $arr["warning_bound"];
            $gerr = $arr["error_bound"];
            $gord = $arr["alarm_order"];
            for ($i = 0; $i < count($listPath); ++$i) {
                $path = $listPath[$i] . ".*";
                $varpath = filterPathUsingAliases($path, $gfilter);
                $rrdpath = $rrdrootpath . "/" . $varpath . ".rrd";
                if ($varpath != "" && file_exists($rrdpath)) {
                    $listVars[] = array("path" => $varpath, "name" => $gname, "warn" => $gwarn, "err" => $gerr, "order" => $gord);
                }