Added server time values as option to reports screen

git-svn-id: svn://192.168.202.10@1412 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
mattf
2010-04-20 03:14:11 +00:00
parent 8293604085
commit 7a2fe85cf1
2 changed files with 86 additions and 6 deletions
@@ -24672,9 +24672,19 @@ if ($ADD==999999)
}
?>
<PRE><TABLE BORDER=1 CELLPADDING=2 cellspacing=0>
<TR><TD>SERVER</TD><TD>DESCRIPTION</TD><TD>IP</TD><TD>ACT</TD><TD>LOAD</TD><TD>CHAN</TD><TD>DISK</TD><TD>OUTBOUND</TD><TD>INBOUND</TD></TR>
<?php
if ($stage == 'TIME')
{
echo "<TR><TD>SERVER <a href=\"$PHP_SELF?ADD=999999\">-</a></TD>";
echo "<TD>DESCRIPTION</TD><TD>IP</TD><TD>ACT</TD><TD>LOAD</TD><TD>CHAN</TD><TD>DISK</TD><TD>TIME</TD></TR>\n";
}
else
{
echo "<TR><TD>SERVER <a href=\"$PHP_SELF?ADD=999999&stage=TIME\">+</a></TD>";
echo "<TD>DESCRIPTION</TD><TD>IP</TD><TD>ACT</TD><TD>LOAD</TD><TD>CHAN</TD><TD>DISK</TD><TD>OUTBOUND</TD><TD>INBOUND</TD></TR>\n";
}
$o=0;
while ($servers_to_print > $o)
{
@@ -24702,12 +24712,42 @@ if ($ADD==999999)
echo "<TD>$sysload[$o] - $cpu%</TD>\n";
echo "<TD>$channels_total[$o]</TD>\n";
echo "<TD ALIGN=RIGHT>$disk</TD>\n";
echo "<TD><a href=\"AST_timeonVDAD.php?server_ip=$server_ip[$o]\">LINK</a></TD>\n";
echo "<TD><a href=\"AST_timeonVDAD.php?server_ip=$server_ip[$o]&closer_display=1\">LINK</a></TD>\n";
if ($stage == 'TIME')
{
$stmt="select last_update from server_updater where server_ip='$server_ip[$o]';";
$rslt=mysql_query($stmt, $link);
if ($DB) {echo "$stmt\n";}
$servertime_to_print = mysql_num_rows($rslt);
if ($servertime_to_print)
{
$row=mysql_fetch_row($rslt);
echo "<TD NOWRAP>$row[0]</TD>";
}
}
else
{
echo "<TD><a href=\"AST_timeonVDAD.php?server_ip=$server_ip[$o]\">LINK</a></TD>\n";
echo "<TD><a href=\"AST_timeonVDAD.php?server_ip=$server_ip[$o]&closer_display=1\">LINK</a></TD>\n";
}
echo "</TR>\n";
$o++;
}
if ($stage == 'TIME')
{
echo "<TR><TD COLSPAN=2> &nbsp; </TD><TD>PHP Time</TD><TD COLSPAN=4> &nbsp; </TD><TD NOWRAP>" . date("Y-m-d H:i:s") . "</TD></TR>";
$stmt="select NOW();";
$rslt=mysql_query($stmt, $link);
if ($DB) {echo "$stmt\n";}
$dbtime_to_print = mysql_num_rows($rslt);
if ($dbtime_to_print)
{
$row=mysql_fetch_row($rslt);
echo "<TR><TD COLSPAN=2> &nbsp; </TD><TD>DB Time</TD><TD COLSPAN=4> &nbsp; </TD><TD NOWRAP>$row[0]</TD></TR>";
}
}
echo "</TABLE>\n";
}
else
+43 -3
View File
@@ -25427,9 +25427,19 @@ if ($ADD==999999)
}
?>
<PRE><TABLE BORDER=1 CELLPADDING=2 cellspacing=0>
<TR><TD>SERVER</TD><TD>DESCRIPTION</TD><TD>IP</TD><TD>ACT</TD><TD>LOAD</TD><TD>CHAN</TD><TD>DISK</TD><TD>OUTBOUND</TD><TD>INBOUND</TD></TR>
<?php
if ($stage == 'TIME')
{
echo "<TR><TD>SERVER <a href=\"$PHP_SELF?ADD=999999\">-</a></TD>";
echo "<TD>DESCRIPTION</TD><TD>IP</TD><TD>ACT</TD><TD>LOAD</TD><TD>CHAN</TD><TD>DISK</TD><TD>TIME</TD></TR>\n";
}
else
{
echo "<TR><TD>SERVER <a href=\"$PHP_SELF?ADD=999999&stage=TIME\">+</a></TD>";
echo "<TD>DESCRIPTION</TD><TD>IP</TD><TD>ACT</TD><TD>LOAD</TD><TD>CHAN</TD><TD>DISK</TD><TD>OUTBOUND</TD><TD>INBOUND</TD></TR>\n";
}
$o=0;
while ($servers_to_print > $o)
{
@@ -25457,12 +25467,42 @@ if ($ADD==999999)
echo "<TD>$sysload[$o] - $cpu%</TD>\n";
echo "<TD>$channels_total[$o]</TD>\n";
echo "<TD ALIGN=RIGHT>$disk</TD>\n";
echo "<TD><a href=\"AST_timeonVDAD.php?server_ip=$server_ip[$o]\">LINK</a></TD>\n";
echo "<TD><a href=\"AST_timeonVDAD.php?server_ip=$server_ip[$o]&closer_display=1\">LINK</a></TD>\n";
if ($stage == 'TIME')
{
$stmt="select last_update from server_updater where server_ip='$server_ip[$o]';";
$rslt=mysql_query($stmt, $link);
if ($DB) {echo "$stmt\n";}
$servertime_to_print = mysql_num_rows($rslt);
if ($servertime_to_print)
{
$row=mysql_fetch_row($rslt);
echo "<TD NOWRAP>$row[0]</TD>";
}
}
else
{
echo "<TD><a href=\"AST_timeonVDAD.php?server_ip=$server_ip[$o]\">LINK</a></TD>\n";
echo "<TD><a href=\"AST_timeonVDAD.php?server_ip=$server_ip[$o]&closer_display=1\">LINK</a></TD>\n";
}
echo "</TR>\n";
$o++;
}
if ($stage == 'TIME')
{
echo "<TR><TD COLSPAN=2> &nbsp; </TD><TD>PHP Time</TD><TD COLSPAN=4> &nbsp; </TD><TD NOWRAP>" . date("Y-m-d H:i:s") . "</TD></TR>";
$stmt="select NOW();";
$rslt=mysql_query($stmt, $link);
if ($DB) {echo "$stmt\n";}
$dbtime_to_print = mysql_num_rows($rslt);
if ($dbtime_to_print)
{
$row=mysql_fetch_row($rslt);
echo "<TR><TD COLSPAN=2> &nbsp; </TD><TD>DB Time</TD><TD COLSPAN=4> &nbsp; </TD><TD NOWRAP>$row[0]</TD></TR>";
}
}
echo "</TABLE>\n";
}
else