Пример #1
0
function nunit_doc_file($filename, $text = "", $class = "")
{
    global $NUnitRelease;
    if ($text == "") {
        $text = $filename;
    }
    return hlink("docs/{$NUnitRelease}/files/{$filename}", $text, $class);
}
Пример #2
0
    while ($nsrow = $NATS->DB->Fetch_Array($nsr)) {
        echo "<option value=" . $nsrow['nstestid'] . ">";
        if ($nsrow['testdesc'] == "") {
            echo $nsrow['testtype'];
        } else {
            echo $nsrow['testdesc'] . "</option>";
        }
    }
    echo "</select>";
    echo " <input type=submit value=\"" . $NATS->Lang->Item("add") . "\">";
    echo "</td></tr></form>";
}
echo "</table>";
End_Round();
echo "<br><br>";
$title = "<b class=\"sectitle\">" . $NATS->Lang->Item("alert.actions") . "</b> " . hlink("AlertAction", 12);
Start_Round($title, 600);
echo "<table border=0><form action=node.edit.php>";
echo "<input type=hidden name=nodeid value=" . $_REQUEST['nodeid'] . ">";
echo "<input type=hidden name=action value=save_actions>";
$q = "SELECT aaid,aname FROM fnalertaction";
$r = $NATS->DB->Query($q);
$c = 0;
while ($row = $NATS->DB->Fetch_Array($r)) {
    // has link?
    $lq = "SELECT nalid FROM fnnalink WHERE nodeid=\"" . ss($_REQUEST['nodeid']) . "\" AND aaid=" . ss($row['aaid']) . " LIMIT 0,1";
    $lr = $NATS->DB->Query($lq);
    if ($NATS->DB->Num_Rows($lr) > 0) {
        $s = " checked";
    } else {
        $s = "";
Пример #3
0
    $s = " checked";
} else {
    $s = "";
}
echo "<tr><td align=right>" . $NATS->Lang->Item("recorded") . " :</td>";
echo "<td align=left>";
echo "<input type=checkbox name=testrecord value=1" . $s . "> " . hlink("Test:Recorded");
echo "</td></tr>";
if ($row['simpleeval'] == 1) {
    $s = " checked";
} else {
    $s = "";
}
echo "<tr><td align=right>" . $NATS->Lang->Item("simple.eval") . " :</td>";
echo "<td align=left>";
echo "<input type=checkbox name=simpleeval value=1" . $s . "> " . hlink("Test:SimpleEvaluation");
echo "</td></tr>";
echo "<tr><td colspan=2><hr class=\"nspacer\"></td></tr>";
echo "<tr><td align=right>" . $NATS->Lang->Item("last.checked") . " :</td>";
echo "<td align=left>" . nicedt($row['lastrunx']) . " - " . dtago($row['lastrunx']) . "</td></tr>";
echo "<tr><td align=right>" . $NATS->Lang->Item("last.result") . " :</td>";
echo "<td align=left>";
echo "<b class=\"al" . $row['alertlevel'] . "\">";
echo oText($row['alertlevel']);
echo "</b>";
echo "</td></tr>";
echo "<tr><td align=right>" . $NATS->Lang->Item("last.value") . " :</td>";
echo "<td align=left>" . $row['lastvalue'] . "</td></tr>";
echo "<tr><td colspan=2><hr class=\"nspacer\"></td></tr>";
echo "<tr><td>&nbsp;</td><td align=left><input type=submit value=\"" . $NATS->Lang->Item("save.changes") . "\"> ";
echo "<a href=node.edit.php?nodeid=" . $row['nodeid'] . ">" . $NATS->Lang->Item("abandon.changes") . "</a>";
Пример #4
0
	while ($nsrow=$NATS->DB->Fetch_Array($nsr))
		{
		echo "<option value=".$nsrow['nstestid'].">";
		if ($nsrow['testdesc']=="") echo $nsrow['testtype'];
		else echo $nsrow['testdesc']."</option>";
		}
	echo "</select>";
	echo " <input type=submit value=\"Add\">";
	echo "</td></tr></form>";
	}

echo "</table>";
End_Round();
echo "<br><br>";

$title="<b class=\"sectitle\">Alert Actions</b> ".hlink("AlertAction",12);
Start_Round($title,600);
echo "<table border=0><form action=node.edit.php>";
echo "<input type=hidden name=nodeid value=".$_REQUEST['nodeid'].">";
echo "<input type=hidden name=action value=save_actions>";
$q="SELECT aaid,aname FROM fnalertaction";
$r=$NATS->DB->Query($q);
$c=0;
while ($row=$NATS->DB->Fetch_Array($r))
	{
	// has link?
	$lq="SELECT nalid FROM fnnalink WHERE nodeid=\"".ss($_REQUEST['nodeid'])."\" AND aaid=".ss($row['aaid'])." LIMIT 0,1";
	$lr=$NATS->DB->Query($lq);
	if ($NATS->DB->Num_Rows($lr)>0) $s=" checked";
	else $s="";
	$NATS->DB->Free($lr);
Пример #5
0
$q="SELECT * FROM fnconfig ORDER BY fnc_var ASC";
$r=$NATS->DB->Query($q);
echo "<table border=0>";
while ($row=$NATS->DB->Fetch_Array($r))
	{
	echo "<form action=admin.php method=post>";
	echo "<input type=hidden name=action value=var_save>";
	echo "<input type=hidden name=mode value=variables>";
	echo "<input type=hidden name=orig_var value=\"".$row['fnc_var']."\">";
	echo "<input type=hidden name=orig_val value=\"".$row['fnc_val']."\">";
	echo "<tr><td><input type=text size=20 maxlength=60 name=new_var value=\"".$row['fnc_var']."\"> ";
	echo "</td>";
	echo "<td>=</td>";
	echo "<td><input type=text size=20 maxlength=60 name=new_val value=\"".$row['fnc_val']."\"></td>";
	echo "<td><input type=submit value=\"Save\"> ";
	echo hlink("Var:".$row['fnc_var']);
	echo "</td>";
	echo "</tr>";
	echo "</form>";
	}
echo "<form action=admin.php method=post>";
echo "<input type=hidden name=action value=var_new>";
echo "<input type=hidden name=mode value=variables>";
echo "<tr><td><input type=text size=20 maxlength=60 name=new_var value=\"\"></td>";
echo "<td>=</td>";
echo "<td><input type=text size=20 maxlength=60 name=new_val value=\"\"></td>";
echo "<td><input type=submit value=\"Create\"></td>";
echo "</tr>";
echo "</form>";
echo "</table>";
}
Пример #6
0
if ($row['nextrunx'] > 0) {
    echo nicedt($row['nextrunx']) . " - " . nicenextx($row['nextrunx']);
} else {
    echo $NATS->Lang->Item("now");
}
echo "</td></tr>";
echo "<tr><td valign=top>" . $NATS->Lang->Item("last.tested") . ":</td>";
echo "<td>" . nicedt($row['lastrunx']) . " - " . dtago($row['lastrunx']) . "<br>";
echo "<a href=localtest.action.php?localtestid=" . $_REQUEST['localtestid'] . "&action=invalidate>" . $NATS->Lang->Item("check.asap") . "</a>";
echo "</td></tr>";
echo "<tr><td colspan=2><hr class=\"nspacer\"></td></tr>";
echo "<tr><td>" . $NATS->Lang->Item("custom.attempts") . ":</td>";
echo "<td><input type=text size=3 name=attempts maxlength=2 value=\"" . $row['attempts'] . "\"> " . hlink("Test:Attempts");
echo "</td></tr>";
echo "<tr><td>" . $NATS->Lang->Item("custom.timeout") . ":</td>";
echo "<td><input type=text name=timeout size=3 maxlength=3 value=\"" . $row['timeout'] . "\"> " . $NATS->Lang->Item("seconds") . " " . hlink("Test:Timeout");
echo "</td></tr>";
echo "<tr><td colspan=2><hr class=\"nspacer\"></td></tr>";
echo "<tr><td>&nbsp;</td><td><input type=submit value=\"" . $NATS->Lang->Item("test.save") . "\"> ";
echo "<a href=node.edit.php?nodeid=" . $row['nodeid'] . ">" . $NATS->Lang->Item("abandon.changes") . "</a>";
echo "</td></tr></form>";
echo "</table>";
End_Round();
echo "<br><br>";
$t = "<b class=\"sectitle\">" . $NATS->Lang->Item("test.evals") . "</b>";
Start_Round($t, 600);
echo "<table border=0 width=100%>";
echo "<tr><td colspan=2>&nbsp;<br>";
if ($row['simpleeval'] == 1) {
    echo "<i>" . $NATS->Lang->Item("test.evals.simple") . "</i><br>";
}
Пример #7
0
 echo "<option value=1>";
 echo "Status Light</option>";
 echo "<option value=0>";
 echo "No Graphic</option>";
 echo "</select>";
 echo "</td></tr>";
 echo "<tr><td width=25% align=right>";
 echo "Show Detail :";
 echo "</td><td align=left width=25%>";
 if ($row['idetail'] > 0) {
     $s = " checked";
 } else {
     $s = "";
 }
 echo "<input type=checkbox name=idetail value=1" . $s . ">";
 echo " " . hlink("View:ShowDetail");
 echo "</td>";
 echo "<td align=center colspan=2><input type=submit value=\"Save Changes to Item\"></td></tr>";
 echo "</table></div><table width=600 border=0>";
 echo "</form>";
 echo "<form action=view.edit.php method=post>";
 echo "<input type=hidden name=viewid value=" . $_REQUEST['viewid'] . ">";
 echo "<input type=hidden name=viewitemid value=" . $row['viewitemid'] . ">";
 echo "<input type=hidden name=action value=moveitembefore>";
 echo "<tr><td colspan=2 align=left>Move: ";
 if ($f == 0) {
     echo "<img src=images/arrows/off/arrow_top.png style=\"vertical-align: -3;\">";
 } else {
     echo "<a href=view.edit.php?viewid=" . $_REQUEST['viewid'] . "&action=move_item&dir=up&viewitemid=" . $row['viewitemid'] . ">";
     echo "<img src=\"images/arrows/on/arrow_top.png\"  style=\"vertical-align: -3;\" border=0>";
     echo "</a>";
Пример #8
0
 echo "<table class=\"nicetable\">";
 echo "<form action=schedule.php method=post><input type=hidden name=action value=save_edit>";
 echo "<input type=hidden name=scheduleid value=" . $_REQUEST['scheduleid'] . ">";
 echo "<tr><td><b>Schedule Name :</b></td>";
 echo "<td><input type=text name=schedulename size=30 maxlength=64 value=\"" . $row['schedulename'] . "\">";
 echo "</td></tr>";
 $o_on = "<option value=1>Run Test/Alert (Enabled)</option>";
 $o_off = "<option value=0> Don't Run Test/Alert (Disabled)</option>";
 echo "<tr><td><b>Default Action :</b></td>";
 echo "<td><select name=defaultaction>";
 if ($row['defaultaction'] == 0) {
     echo $o_off . $o_on;
 } else {
     echo $o_on . $o_off;
 }
 echo "</select> " . hlink("Schedule:DefaultAction") . "</td></tr>";
 echo "<tr><td>&nbsp;</td><td><input type=submit value=\"Save Settings\"></td></tr>";
 echo "</form></table><br>";
 echo "<b class=\"subtitle\">Exceptions</b><br><br>";
 echo "Exceptions are the times when your schedule <b>will not</b> perform its default action i.e. not test the node or send the alert.<br>";
 echo "See the <a href=http://www.purplepixie.org/freenats/support.php>documentation</a> for more information.<br><br>";
 echo "<table class=\"nicetable\">";
 echo "<tr><td><b>Weekday</b></td><td><b>Day</b></td><td><b>Month</b></td><td><b>Year</b>&nbsp;&nbsp;</td><td><b>From (HH:MM) =&gt;</b></td>";
 echo "<td><b>To HH:MM</td></td><td>&nbsp;</td></tr>";
 $q = "SELECT * FROM fnscheditem WHERE scheduleid=" . ss($_REQUEST['scheduleid']);
 $r = $NATS->DB->Query($q);
 while ($row = $NATS->DB->Fetch_Array($r)) {
     echo "<tr><td colspan=8>&nbsp;</td></tr>";
     echo "<form action=schedule.php method=post>";
     echo "<input type=hidden name=scheduleid value=" . $_REQUEST['scheduleid'] . ">";
     echo "<input type=hidden name=scheditemid value=" . $row['scheditemid'] . ">";
Пример #9
0
addt("fnreport", true, "Saved Availability Reports");
addt("fnscheditem", true, "Schedule Ranges");
addt("fnschedule", true, "Test Schedules");
addt("fnsession", false, "User Sessions");
addt("fntestrun", false, "Historic Test Runs");
addt("fnuser", true, "Users");
addt("fnview", true, "Views");
addt("fnviewitem", true, "View Items");
echo "<table class=\"nicetable\">";
echo "<tr>";
function tdc($t)
{
    echo "<td>" . $t . "</td>";
}
tdc("<b>Backup</b>");
tdc("<b>Clear " . hlink("Backup:Truncate", 12) . "</b>");
tdc("<b>Table</b>");
tdc("<b>Size</b>");
tdc("<b>Description</b>");
echo "</tr>";
$count = 0;
$r = $NATS->DB->Query($q);
while ($row = $NATS->DB->Fetch_Array($r)) {
    echo "<tr>";
    if (isset($defs[$row['Name']]) && $defs[$row['Name']]['def'] === true) {
        $s = " checked";
    } else {
        $s = "";
    }
    tdc("<input type=checkbox name=\"table[" . $count . "]\" value=\"" . $row['Name'] . "\"" . $s . ">");
    tdc("<input type=checkbox name=\"truncate_" . $row['Name'] . "\" value=1 checked>");
Пример #10
0
echo "<input type=hidden name=original_testinterval value=\"".$row['testinterval']."\">";
echo "<tr><td valign=top>Test Due:</td>";
echo "<td>";
if ($row['nextrunx']>0) echo nicedt($row['nextrunx'])." - ".nicenextx($row['nextrunx']);
else echo "Now";
echo "</td></tr>";
echo "<tr><td valign=top>Last Tested:</td>";
echo "<td>".nicedt($row['lastrunx'])." - ".dtago($row['lastrunx'])."<br>";
echo "<a href=localtest.action.php?localtestid=".$_REQUEST['localtestid']."&action=invalidate>Check ASAP</a>";
echo "</td></tr>";
echo "<tr><td colspan=2><hr class=\"nspacer\"></td></tr>";
echo "<tr><td>Custom Attempts:</td>";
echo "<td><input type=text size=3 name=attempts maxlength=2 value=\"".$row['attempts']."\"> ".hlink("Test:Attempts");
echo "</td></tr>";
echo "<tr><td>Custom Timeout:</td>";
echo "<td><input type=text name=timeout size=3 maxlength=3 value=\"".$row['timeout']."\"> Seconds ".hlink("Test:Timeout");
echo "</td></tr>";
echo "<tr><td colspan=2><hr class=\"nspacer\"></td></tr>";
echo "<tr><td>&nbsp;</td><td><input type=submit value=\"Save Test Settings\"> <a href=node.edit.php?nodeid=".$row['nodeid'].">Abandon Changes</a>";
echo "</td></tr></form>";
echo "</table>";
End_Round();
echo "<br><br>";



$t="<b class=\"sectitle\">Test Evaluators</b>";
Start_Round($t,600);


echo "<table border=0 width=100%>";
Пример #11
0
function ph($id, $size = 16)
{
    echo hlink($id, $size);
}
Пример #12
0
     echo "</td><td>";
     echo "<a href=view.edit.php?viewid=" . $row['viewid'] . "><img src=images/options/application.png border=0 title=\"" . $NATS->Lang->Item("edit") . "\"></a>";
     echo "&nbsp;";
     echo "<a href=view.edit.php?viewid=" . $row['viewid'] . "&action=delete><img src=images/options/action_delete.png border=0 title=\"" . $NATS->Lang->Item("delete") . "\"></a>";
     echo "</td></tr>";
 }
 echo "<tr><td colspan=2>&nbsp;<br></td></tr>";
 echo "<form action=view.edit.php method=post><input type=hidden name=action value=create>";
 echo "<tr><td><input type=text name=vtitle size=20 maxlength=64></td><td><input type=submit value=\"" . $NATS->Lang->Item("create.view") . "\"> ";
 echo hlink("View:Create") . "</td></tr></form>";
 echo "</table>";
 End_Round();
 echo "<br><br>";
 $t = "<b class=\"subtitle\">" . $NATS->Lang->Item("reports") . " " . hlink("Report", 12) . "</b>";
 Start_Round($t, 600);
 echo "<b><a href=report.php>" . $NATS->Lang->Item("create.report") . "</a></b> " . hlink("Report", 12);
 echo "<br><br>";
 // reports in here
 $rq = "SELECT reportid,reportname FROM fnreport";
 $rr = $NATS->DB->Query($rq);
 if ($NATS->DB->Num_Rows($rr) > 0) {
     echo "<table class=\"nicetablehov\" width=100%>";
     while ($rep = $NATS->DB->Fetch_Array($rr)) {
         echo "<tr class=\"nicetablehov\">";
         echo "<td align=left>";
         echo "<a href=report.php?reportid=" . $rep['reportid'] . ">" . $rep['reportname'] . "</a>";
         echo "</td><td align=right>";
         echo "<a href=report.php?mode=delete&reportid=" . $rep['reportid'] . ">";
         echo "<img src=images/options/action_delete.png border=0 title=\"" . $NATS->Lang->Item("delete") . ": " . $rep['reportname'] . "\">";
         echo "</a>";
         echo "&nbsp;&nbsp;";
Пример #13
0
function pr0xy()
{
    global $hcwd;
    echo '<form method="POST" class="feedbackform"><div class="fieldwrapper"><label class="styled">Navigator:</label><div class="thefield"><input type="url" name="urL" value="';
    if (empty($_REQUEST['urL'])) {
        echo 'http://showip.com';
    } else {
        echo htmlspecialchars($_REQUEST['urL']);
    }
    echo '" size="30" /></div></div>' . $hcwd . '<div class="buttonsdiv"><input type="submit" value="Go" style="margin-left: 150px;" /></div></form>';
    if (!empty($_REQUEST['urL'])) {
        echo '<br /><iframe src="' . hlink('p0d=' . base64_encode($_REQUEST['urL'])) . '" align="center" frameborder="0" style="width: 100%; height: 600px;">
  <p>Your browser does not support iframes.</p>
</iframe>';
    }
}
Пример #14
0
		echo "&nbsp;";
		echo "<a href=view.edit.php?viewid=".$row['viewid']."&action=delete><img src=images/options/action_delete.png border=0 title=\"Delete View\"></a>";
		echo "</td></tr>";
		}
	
	echo "<tr><td colspan=2>&nbsp;<br></td></tr>";
	echo "<form action=view.edit.php method=post><input type=hidden name=action value=create>";
	echo "<tr><td><input type=text name=vtitle size=20 maxlength=64></td><td><input type=submit value=\"Create View\"> ";
	echo hlink("View:Create")."</td></tr></form>";
	echo "</table>";
	End_Round();
	
	echo "<br><br>";
	$t="<b class=\"subtitle\">Availability Reports ".hlink("Report",12)."</b>";
	Start_Round($t,600);
	echo "<b><a href=report.php>Create New Service Availability Report</a></b> ".hlink("Report",12);
	echo "<br><br>";
	
	// reports in here
	$rq="SELECT reportid,reportname FROM fnreport";
	$rr=$NATS->DB->Query($rq);
	if ($NATS->DB->Num_Rows($rr)>0)
		{
		echo "<table class=\"nicetablehov\" width=100%>";
		while ($rep=$NATS->DB->Fetch_Array($rr))
			{
			echo "<tr class=\"nicetablehov\">";
			echo "<td align=left>";
			echo "<a href=report.php?reportid=".$rep['reportid'].">".$rep['reportname']."</a>";
			echo "</td><td align=right>";
			echo "<a href=report.php?mode=delete&reportid=".$rep['reportid'].">";
Пример #15
0
/**
* This is a simple routine that generates a framework-standard link to
* a page.  Please see [[Pages, Classes, and Tables]] for more information
* on the definition of a 'page'.
*
* !>example
* !>php
* <div>
*   You can jump straight to <?php echo hLinkPage('orders')?> from here.
* </div>
* !<
* !<
*
* INPUTS
*	string $class	CSS Class
*	string $page_id	Page ID
* RETURN
*	string Generated HTML
*/
function hLinkPage($class, $page_id)
{
    // Load the list of pages.
    $PAGES = 'explicit assignment avoids compiler warning';
    include 'ddpages.php';
    $caption = ArraySafe($PAGES, $page_id, 'Link to unknown page: ' . $page_id);
    return hlink($class, $caption, "?gp_page=" . urlencode($page_id));
}
Пример #16
0
echo "<td>&nbsp;</td><td>";
echo np($utt, $passc);
echo "</td></tr>";
echo "<tr><td colspan=3>&nbsp;<br></td></tr>";
echo "<tr><td>" . $testc . " records of which " . $tested . " returned a valid alert level";
echo "</td><td>&nbsp;</td><td>";
echo np($testc, $tested);
echo "</td></tr>";
if ($show_expected_number) {
    $nowx = time();
    if ($finishx > $nowx) {
        $fx = $nowx;
    } else {
        $fx = $finishx;
    }
    $p = $fx - $startx;
    $interval_min = 60 * $tinterval;
    $shouldhave = floor($p / $interval_min);
    echo "<tr><td>" . $testc . " records and you <i>should have</i> " . hlink("History:Should", 12) . " " . $shouldhave;
    echo "</td><td>&nbsp;</td><td>";
    echo np($shouldhave, $testc);
    echo "</td></tr>";
}
echo "</table><br>";
/* - zoom period debugging
echo "Period: $p s (".($p/$five_min).")<br>";
echo "sx: ".$startx." fx: ".$finishx."<br>";
echo "diffx: ".($finishx-$startx)."<br>";
echo "fx2: ".$fx." p: ".$p."<br>";
*/
Screen_Footer();