can't stop uniformicationing

git-svn-id: http://www.observium.org/svn/observer/trunk@1915 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Tom Laermans
2011-03-17 16:35:18 +00:00
parent 2f3e8fb2f9
commit 3c79cafb2c
27 changed files with 45 additions and 36 deletions

View File

@@ -6,7 +6,7 @@ echo('<table cellspacing="0" cellpadding="2" width="100%">');
while ($entry = mysql_fetch_array($data))
{
include("includes/print-event.inc");
include("includes/print-event.inc.php");
}
echo('</table>');

View File

@@ -1,4 +1,8 @@
<?php
$graph_title = "Device Uptime";
$graph_type = "device_uptime"; include ("includes/print-device-graph.php");
$graph_type = "device_uptime";
include("includes/print-device-graph.php");
?>

View File

@@ -68,7 +68,7 @@ if (mysql_affected_rows() > "0")
echo("<div style='background-color: #eeeeee; margin: 5px; padding: 5px;'>");
echo("<p style='padding: 0px 5px 5px;' class=sectionhead><img align='absmiddle' src='".$config['base_url']."/images/16/printer.png'> Recent Syslog</p>");
echo("<table cellspacing=0 cellpadding=2 width=100%>");
while ($entry = mysql_fetch_array($query)) { include("includes/print-syslog.inc"); }
while ($entry = mysql_fetch_array($query)) { include("includes/print-syslog.inc.php"); }
echo("</table>");
echo("</div>");
}
@@ -101,7 +101,7 @@ echo("<table cellspacing=0 cellpadding=2 width=100%>");
while ($entry = mysql_fetch_array($data))
{
include("includes/print-event-short.inc");
include("includes/print-event-short.inc.php");
}
echo("</table>");

View File

@@ -7,7 +7,7 @@ if (mysql_result(mysql_query("select count(service_id) from services WHERE devic
$service_query = mysql_query("select * from services WHERE device_id = '".$device['device_id']."' ORDER BY service_type");
while ($service = mysql_fetch_array($service_query))
{
include("includes/print-service.inc");
include("includes/print-service.inc.php");
}
echo("</table></div>");

View File

@@ -43,7 +43,7 @@ $sql = "SELECT *, DATE_FORMAT(timestamp, '%D %b %T') AS date from syslog WHERE
$sql .= " ORDER BY timestamp DESC LIMIT 1000";
$query = mysql_query($sql);
echo("<table cellspacing=0 cellpadding=2 width=100%>");
while ($entry = mysql_fetch_array($query)) { include("includes/print-syslog.inc"); }
while ($entry = mysql_fetch_array($query)) { include("includes/print-syslog.inc.php"); }
echo("</table>");
?>

View File

@@ -16,7 +16,7 @@ $i = "0";
$vrf_query = mysql_query("select * from vrfs WHERE device_id = '".$_GET['id']."' ORDER BY 'vrf_name'");
while ($vrf = mysql_fetch_array($vrf_query))
{
include("includes/print-vrf.inc");
include("includes/print-vrf.inc.php");
$i++;
}

View File

@@ -15,7 +15,7 @@ echo('<table cellspacing="0" cellpadding="1" width="100%">');
while ($entry = mysql_fetch_array($data))
{
include("includes/print-event.inc");
include("includes/print-event.inc.php");
}
echo("</table>");

View File

@@ -102,7 +102,7 @@ if ($config['enable_syslog'])
echo("<table cellspacing=0 cellpadding=2 width=100%>");
while ($entry = mysql_fetch_array($query)) {
$entry = array_merge($entry, device_by_id_cache($entry['device_id']));
include("includes/print-syslog.inc");
include("includes/print-syslog.inc.php");
}
echo("</table>");
@@ -128,7 +128,7 @@ $data = mysql_query($query);
echo("<table cellspacing=0 cellpadding=1 width=100%>");
while ($entry = mysql_fetch_array($data)) {
include("includes/print-event.inc");
include("includes/print-event.inc.php");
}
echo("</table>");

View File

@@ -99,7 +99,7 @@ echo("<table cellspacing=0 cellpadding=2 width=100%>");
while ($entry = mysql_fetch_array($query))
{
$entry = array_merge($entry, device_by_id_cache($entry['device_id']));
include("includes/print-syslog.inc");
include("includes/print-syslog.inc.php");
}
echo("</table>");

View File

@@ -96,7 +96,7 @@ echo("
$sql = "SELECT *, DATE_FORMAT(timestamp, '%D %b %T') AS date from syslog ORDER BY timestamp DESC LIMIT 20";
$query = mysql_query($sql);
echo("<table cellspacing=0 cellpadding=2 width=100%>");
while ($entry = mysql_fetch_array($query)) { include("includes/print-syslog.inc"); }
while ($entry = mysql_fetch_array($query)) { include("includes/print-syslog.inc.php"); }
echo("</table>");

View File

@@ -96,7 +96,7 @@ echo("
$sql = "SELECT *, DATE_FORMAT(timestamp, '%D %b %T') AS date from syslog,devices WHERE syslog.device_id = devices.device_id ORDER BY seq DESC LIMIT 20";
$query = mysql_query($sql);
echo("<table cellspacing=0 cellpadding=2 width=100%>");
while ($entry = mysql_fetch_array($query)) { include("includes/print-syslog.inc"); }
while ($entry = mysql_fetch_array($query)) { include("includes/print-syslog.inc.php"); }
echo("</table>");

View File

@@ -26,7 +26,7 @@ if ($_SESSION['userlevel'] >= '5')
$service_query = mysql_query("SELECT * FROM `services` WHERE `device_id` = '" . $host_data['device_id'] . "' $where");
while ($service = mysql_fetch_array($service_query))
{
include("includes/print-service.inc");
include("includes/print-service.inc.php");
# $samehost = 1;
if ($_GET['opta'] == "details")
{

View File

@@ -47,19 +47,23 @@
print_optionbar_end();
if ($_POST['string']) {
if ($_POST['string'])
{
$where = " AND S.msg LIKE '%".$_POST['string']."%'";
}
if ($_POST['program']) {
if ($_POST['program'])
{
$where .= " AND S.program = '".$_POST['program']."'";
}
if ($_POST['device']) {
if ($_POST['device'])
{
$where .= " AND D.device_id = '".$_POST['device']."'";
}
if ($_SESSION['userlevel'] >= '5') {
if ($_SESSION['userlevel'] >= '5')
{
$sql = "SELECT *, DATE_FORMAT(timestamp, '%D %b %T') AS date from syslog
WHERE 1 $where ORDER BY timestamp DESC LIMIT 1000";
} else {
@@ -69,9 +73,10 @@ if ($_SESSION['userlevel'] >= '5') {
$query = mysql_query($sql);
echo("<table cellspacing=0 cellpadding=2 width=100%>");
while ($entry = mysql_fetch_array($query)) {
while ($entry = mysql_fetch_array($query))
{
$entry = array_merge($entry, device_by_id_cache($entry['device_id']));
include("includes/print-syslog.inc");
include("includes/print-syslog.inc.php");
}
echo("</table>");