mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
restructure/reindent/htmlfix html pages, remove dead code
git-svn-id: http://www.observium.org/svn/observer/trunk@1897 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
<meta http-equiv="refresh" content="60">
|
||||
|
||||
<?php if($_GET['opta'] == "expunge" && $_SESSION['userlevel'] >= '10') { mysql_query("TRUNCATE TABLE `syslog`"); } ?>
|
||||
<?php if ($_GET['opta'] == "expunge" && $_SESSION['userlevel'] >= '10') { mysql_query("TRUNCATE TABLE `syslog`"); } ?>
|
||||
|
||||
<?php print_optionbar_start('25'); ?>
|
||||
<?php print_optionbar_start('25'); ?>
|
||||
|
||||
<form method="post" action="">
|
||||
<label><strong>Search</strong>
|
||||
@@ -14,9 +14,9 @@
|
||||
<option value="">All Programs</option>
|
||||
<?php
|
||||
$query = mysql_query("SELECT `program` FROM `syslog` GROUP BY `program` ORDER BY `program`");
|
||||
while($data = mysql_fetch_array($query)) {
|
||||
echo("<option value='".$data['program']."'");
|
||||
if($data['program'] == $_POST['program']) { echo("selected"); }
|
||||
while ($data = mysql_fetch_array($query)) {
|
||||
echo("<option value='".$data['program']."'");
|
||||
if ($data['program'] == $_POST['program']) { echo("selected"); }
|
||||
echo(">".$data['program']."</option>");
|
||||
}
|
||||
?>
|
||||
@@ -28,11 +28,11 @@
|
||||
<option value="">All Devices</option>
|
||||
<?php
|
||||
$query = mysql_query("SELECT * FROM `devices` ORDER BY `hostname`");
|
||||
while($data = mysql_fetch_array($query)) {
|
||||
while ($data = mysql_fetch_array($query)) {
|
||||
echo("<option value='".$data['device_id']."'");
|
||||
|
||||
if($data['device_id'] == $_POST['device']) { echo("selected"); }
|
||||
|
||||
if ($data['device_id'] == $_POST['device']) { echo("selected"); }
|
||||
|
||||
echo(">".$data['hostname']."</option>");
|
||||
}
|
||||
?>
|
||||
@@ -47,20 +47,20 @@
|
||||
|
||||
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') {
|
||||
$sql = "SELECT *, DATE_FORMAT(timestamp, '%D %b %T') AS date from syslog
|
||||
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 {
|
||||
$sql = "SELECT *, DATE_FORMAT(timestamp, '%D %b %T') AS date from syslog AS S, devices_perms AS P
|
||||
@@ -69,11 +69,11 @@ 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");
|
||||
}
|
||||
echo("</table>");
|
||||
|
||||
?>
|
||||
</table>
|
||||
</table>
|
Reference in New Issue
Block a user