mirror of
https://github.com/librenms/librenms.git
synced 2024-09-21 10:28:13 +00:00
replacing <? with <?php
git-svn-id: http://www.observium.org/svn/observer/trunk@466 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
parent
5e076981f5
commit
bfc9f845ce
@ -1,5 +1,5 @@
|
|||||||
#!/usr/bin/php
|
#!/usr/bin/php
|
||||||
<?
|
<?php
|
||||||
|
|
||||||
include("config.php");
|
include("config.php");
|
||||||
include("includes/functions.php");
|
include("includes/functions.php");
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
### Clean up the database removing old IPs and links
|
### Clean up the database removing old IPs and links
|
||||||
|
|
||||||
<?
|
<?php
|
||||||
include("config.php");
|
include("config.php");
|
||||||
include("includes/functions.php");
|
include("includes/functions.php");
|
||||||
|
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
#!/usr/bin/php
|
#!/usr/bin/php
|
||||||
<?
|
<?php
|
||||||
|
|
||||||
include("config.php");
|
include("config.php");
|
||||||
include("includes/functions.php");
|
include("includes/functions.php");
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#!/usr/bin/php
|
#!/usr/bin/php
|
||||||
<?
|
<?php
|
||||||
|
|
||||||
#ini_set('display_errors', 1);
|
#ini_set('display_errors', 1);
|
||||||
#ini_set('display_startup_errors', 1);
|
#ini_set('display_startup_errors', 1);
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
#!/usr/bin/php
|
#!/usr/bin/php
|
||||||
<?
|
<?php
|
||||||
|
|
||||||
include("config.php");
|
include("config.php");
|
||||||
include("includes/functions.php");
|
include("includes/functions.php");
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<?
|
<?php
|
||||||
|
|
||||||
$updated = '1';
|
$updated = '1';
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<?
|
<?php
|
||||||
|
|
||||||
$updated = '1';
|
$updated = '1';
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<?
|
<?php
|
||||||
|
|
||||||
echo("<div style='font-family: courier, serif; margin: 10px';><strong>" . $device['sysDescr'] . "</strong></div>");
|
echo("<div style='font-family: courier, serif; margin: 10px';><strong>" . $device['sysDescr'] . "</strong></div>");
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<?
|
<?php
|
||||||
|
|
||||||
$descr = $_POST['descr'];
|
$descr = $_POST['descr'];
|
||||||
$ignore = $_POST['ignore'];
|
$ignore = $_POST['ignore'];
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
<?
|
<?php
|
||||||
|
|
||||||
if($bg == $list_colour_a) { $bg = $list_colour_b; } else { $bg=$list_colour_a; }
|
if($bg == $list_colour_a) { $bg = $list_colour_b; } else { $bg=$list_colour_a; }
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
<?
|
<?php
|
||||||
|
|
||||||
if($bg == $list_colour_a) { $bg = $list_colour_b; } else { $bg=$list_colour_a; }
|
if($bg == $list_colour_a) { $bg = $list_colour_b; } else { $bg=$list_colour_a; }
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
<?
|
<?php
|
||||||
|
|
||||||
if($bg == $list_colour_a) { $bg = $list_colour_b; } else { $bg=$list_colour_a; }
|
if($bg == $list_colour_a) { $bg = $list_colour_b; } else { $bg=$list_colour_a; }
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<?php
|
<?php
|
||||||
ini_set('allow_url_fopen', 0);
|
ini_set('allow_url_fopen', 0);
|
||||||
ini_set('display_errors', 0);
|
ini_set('display_errors', 0);
|
||||||
|
|
||||||
@ -56,7 +56,7 @@ function popUp(URL) {
|
|||||||
<tr>
|
<tr>
|
||||||
<td align=left></td>
|
<td align=left></td>
|
||||||
<td align=right>
|
<td align=right>
|
||||||
<?
|
<?php
|
||||||
if($_SESSION['authenticated']) {
|
if($_SESSION['authenticated']) {
|
||||||
echo("Logged in as <b>".$_SESSION['username']."</b> (<a href='?logout=yes'>Logout</a>)");
|
echo("Logged in as <b>".$_SESSION['username']."</b> (<a href='?logout=yes'>Logout</a>)");
|
||||||
} else {
|
} else {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<?
|
<?php
|
||||||
|
|
||||||
include("../config.php");
|
include("../config.php");
|
||||||
include("../includes/functions.php");
|
include("../includes/functions.php");
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<?
|
<?php
|
||||||
|
|
||||||
echo("<div style='margin: 10px;'>");
|
echo("<div style='margin: 10px;'>");
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<meta http-equiv="refresh" content="60">
|
<meta http-equiv="refresh" content="60">
|
||||||
<?
|
<?php
|
||||||
|
|
||||||
if($_GET['del']) {
|
if($_GET['del']) {
|
||||||
$id = mres($_GET['del']);
|
$id = mres($_GET['del']);
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<?
|
<?php
|
||||||
|
|
||||||
if($_SESSION['userlevel'] == '10') {
|
if($_SESSION['userlevel'] == '10') {
|
||||||
$query = "SELECT *,DATE_FORMAT(datetime, '%D %b %Y %T') as humandate FROM `authlog` ORDER BY `datetime` DESC LIMIT 0,250";
|
$query = "SELECT *,DATE_FORMAT(datetime, '%D %b %Y %T') as humandate FROM `authlog` ORDER BY `datetime` DESC LIMIT 0,250";
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<?
|
<?php
|
||||||
|
|
||||||
if($_GET['id']) {$_GET['id'] = mres($_GET['id']); }
|
if($_GET['id']) {$_GET['id'] = mres($_GET['id']); }
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<?
|
<?php
|
||||||
|
|
||||||
$query = "SELECT *,DATE_FORMAT(datetime, '%D %b %Y %T') as humandate FROM `eventlog` WHERE `host` = '$_GET[id]' ORDER BY `datetime` DESC LIMIT 0,250";
|
$query = "SELECT *,DATE_FORMAT(datetime, '%D %b %Y %T') as humandate FROM `eventlog` WHERE `host` = '$_GET[id]' ORDER BY `datetime` DESC LIMIT 0,250";
|
||||||
$data = mysql_query($query);
|
$data = mysql_query($query);
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<?
|
<?php
|
||||||
|
|
||||||
$device_query = mysql_query("select * from devices WHERE `device_id` = '$_GET[id]'");
|
$device_query = mysql_query("select * from devices WHERE `device_id` = '$_GET[id]'");
|
||||||
while($device = mysql_fetch_array($device_query)) {
|
while($device = mysql_fetch_array($device_query)) {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<?
|
<?php
|
||||||
|
|
||||||
include("os-ios.inc.php");
|
include("os-ios.inc.php");
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<?
|
<?php
|
||||||
|
|
||||||
$interface_query = mysql_query("select * from interfaces WHERE interface_id = '".$_GET['opta']."'");
|
$interface_query = mysql_query("select * from interfaces WHERE interface_id = '".$_GET['opta']."'");
|
||||||
$interface = mysql_fetch_array($interface_query);
|
$interface = mysql_fetch_array($interface_query);
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<?
|
<?php
|
||||||
|
|
||||||
### Connect to database
|
### Connect to database
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<?
|
<?php
|
||||||
|
|
||||||
$hostname = gethostbyid($_GET[id]);
|
$hostname = gethostbyid($_GET[id]);
|
||||||
|
|
||||||
|
@ -26,7 +26,7 @@ function createInterfaces(index)
|
|||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<?
|
<?php
|
||||||
|
|
||||||
echo("<div style='margin: 10px;'>");
|
echo("<div style='margin: 10px;'>");
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<?
|
<?php
|
||||||
|
|
||||||
if($_SESSION['userlevel'] >= '5') {
|
if($_SESSION['userlevel'] >= '5') {
|
||||||
$query = "SELECT *,DATE_FORMAT(datetime, '%D %b %Y %T') as humandate FROM `eventlog` ORDER BY `datetime` DESC LIMIT 0,250";
|
$query = "SELECT *,DATE_FORMAT(datetime, '%D %b %Y %T') as humandate FROM `eventlog` ORDER BY `datetime` DESC LIMIT 0,250";
|
||||||
|
@ -60,7 +60,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<?
|
<?php
|
||||||
|
|
||||||
if($_POST['string']) {
|
if($_POST['string']) {
|
||||||
$where .= " AND E.entPhysicalDescr LIKE '%".$_POST['string']."%'";
|
$where .= " AND E.entPhysicalDescr LIKE '%".$_POST['string']."%'";
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<?
|
<?php
|
||||||
echo("<table cellpadding=7 cellspacing=0 class=devicetable width=100%>");
|
echo("<table cellpadding=7 cellspacing=0 class=devicetable width=100%>");
|
||||||
|
|
||||||
if($_SESSION['userlevel'] == '10') {
|
if($_SESSION['userlevel'] == '10') {
|
||||||
|
@ -56,7 +56,7 @@
|
|||||||
<b class='rounded1'><b></b></b></b>
|
<b class='rounded1'><b></b></b></b>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?
|
<?php
|
||||||
|
|
||||||
if($_POST['string']) {
|
if($_POST['string']) {
|
||||||
$where = " AND S.msg LIKE '%".$_POST['string']."%'";
|
$where = " AND S.msg LIKE '%".$_POST['string']."%'";
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<?
|
<?php
|
||||||
|
|
||||||
## Common Functions
|
## Common Functions
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<?
|
<?php
|
||||||
|
|
||||||
### Discover BGP peers on Cisco devices
|
### Discover BGP peers on Cisco devices
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<?
|
<?php
|
||||||
|
|
||||||
unset ($mac_table);
|
unset ($mac_table);
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<?
|
<?php
|
||||||
$id = $device['device_id'];
|
$id = $device['device_id'];
|
||||||
$hostname = $device['hostname'];
|
$hostname = $device['hostname'];
|
||||||
$community = $device['community'];
|
$community = $device['community'];
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<?
|
<?php
|
||||||
$id = $device['device_id'];
|
$id = $device['device_id'];
|
||||||
$hostname = $device['hostname'];
|
$hostname = $device['hostname'];
|
||||||
$community = $device['community'];
|
$community = $device['community'];
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<?
|
<?php
|
||||||
|
|
||||||
echo("Cisco VLANs : ");
|
echo("Cisco VLANs : ");
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<?
|
<?php
|
||||||
|
|
||||||
unset( $vrf_count );
|
unset( $vrf_count );
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<?
|
<?php
|
||||||
|
|
||||||
# Discover interfaces
|
# Discover interfaces
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<?
|
<?php
|
||||||
|
|
||||||
unset( $storage_exists );
|
unset( $storage_exists );
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<?
|
<?php
|
||||||
$id = $device['device_id'];
|
$id = $device['device_id'];
|
||||||
$hostname = $device['hostname'];
|
$hostname = $device['hostname'];
|
||||||
$community = $device['community'];
|
$community = $device['community'];
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<?
|
<?php
|
||||||
|
|
||||||
## Include from PEAR
|
## Include from PEAR
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<?
|
<?php
|
||||||
|
|
||||||
function pollDevice() {
|
function pollDevice() {
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<?
|
<?php
|
||||||
|
|
||||||
function memgraphWin ($rrd, $graph, $from="-2d")
|
function memgraphWin ($rrd, $graph, $from="-2d")
|
||||||
{
|
{
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<?
|
<?php
|
||||||
|
|
||||||
if(!$os) {
|
if(!$os) {
|
||||||
if(strstr($sysDescr, "FreeBSD")) { $os = "FreeBSD"; } ## It's FreeBSD!
|
if(strstr($sysDescr, "FreeBSD")) { $os = "FreeBSD"; } ## It's FreeBSD!
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<?
|
<?php
|
||||||
|
|
||||||
if(!$os) {
|
if(!$os) {
|
||||||
if(preg_match("/^NetBSD/", $sysDescr)) { $os = "NetBSD"; }
|
if(preg_match("/^NetBSD/", $sysDescr)) { $os = "NetBSD"; }
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<?
|
<?php
|
||||||
|
|
||||||
if(!$os) {
|
if(!$os) {
|
||||||
if(preg_match("/^OpenBSD/", $sysDescr)) { $os = "OpenBSD"; }
|
if(preg_match("/^OpenBSD/", $sysDescr)) { $os = "OpenBSD"; }
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<?
|
<?php
|
||||||
|
|
||||||
echo("Polling BGP peers\n");
|
echo("Polling BGP peers\n");
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<?
|
<?php
|
||||||
|
|
||||||
$query = "SELECT * FROM entPhysical WHERE device_id = '" . $device['device_id'] . "' AND entPhysicalClass = 'sensor'";
|
$query = "SELECT * FROM entPhysical WHERE device_id = '" . $device['device_id'] . "' AND entPhysicalClass = 'sensor'";
|
||||||
$sensors = mysql_query($query);
|
$sensors = mysql_query($query);
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<?
|
<?php
|
||||||
|
|
||||||
$query = "SELECT * FROM cempMemPool WHERE device_id = '" . $device['device_id'] . "'";
|
$query = "SELECT * FROM cempMemPool WHERE device_id = '" . $device['device_id'] . "'";
|
||||||
$pool_data = mysql_query($query);
|
$pool_data = mysql_query($query);
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<?
|
<?php
|
||||||
|
|
||||||
$query = "SELECT * FROM cpmCPU WHERE device_id = '" . $device['device_id'] . "'";
|
$query = "SELECT * FROM cpmCPU WHERE device_id = '" . $device['device_id'] . "'";
|
||||||
$proc_data = mysql_query($query);
|
$proc_data = mysql_query($query);
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<?
|
<?php
|
||||||
|
|
||||||
$community = $device['community'];
|
$community = $device['community'];
|
||||||
$id = $device['device_id'];
|
$id = $device['device_id'];
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<?
|
<?php
|
||||||
|
|
||||||
$cpurrd = $config['rrd_dir'] . "/" . $hostname . "/cpu.rrd";
|
$cpurrd = $config['rrd_dir'] . "/" . $hostname . "/cpu.rrd";
|
||||||
$memrrd = $config['rrd_dir'] . "/" . $hostname . "/mem.rrd";
|
$memrrd = $config['rrd_dir'] . "/" . $hostname . "/mem.rrd";
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<?
|
<?php
|
||||||
|
|
||||||
echo("Doing Juniper Netscreen (ScreenOS)");
|
echo("Doing Juniper Netscreen (ScreenOS)");
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<?
|
<?php
|
||||||
|
|
||||||
echo("Polling SNOM device...\n");
|
echo("Polling SNOM device...\n");
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<?
|
<?php
|
||||||
|
|
||||||
if(strstr($sysDescr, "x86")) { $hardware = "Generic x86"; }
|
if(strstr($sysDescr, "x86")) { $hardware = "Generic x86"; }
|
||||||
if(strstr($sysDescr, "Windows Version 5.2")) { $version = "2003 Server"; }
|
if(strstr($sysDescr, "Windows Version 5.2")) { $version = "2003 Server"; }
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<?
|
<?php
|
||||||
|
|
||||||
$interface_query = mysql_query("SELECT * FROM `interfaces` $where");
|
$interface_query = mysql_query("SELECT * FROM `interfaces` $where");
|
||||||
while ($interface = mysql_fetch_array($interface_query)) {
|
while ($interface = mysql_fetch_array($interface_query)) {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<?
|
<?php
|
||||||
|
|
||||||
$query = "SELECT * FROM temperature WHERE temp_host = '" . $device['device_id'] . "'";
|
$query = "SELECT * FROM temperature WHERE temp_host = '" . $device['device_id'] . "'";
|
||||||
$temp_data = mysql_query($query);
|
$temp_data = mysql_query($query);
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<?
|
<?php
|
||||||
|
|
||||||
include("procurve-graphing.php");
|
include("procurve-graphing.php");
|
||||||
|
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
<?
|
<?php
|
||||||
|
include("unix-graphing.php");
|
||||||
include("unix-graphing.php");
|
?>
|
||||||
|
|
||||||
|
2
map.php
2
map.php
@ -1,5 +1,5 @@
|
|||||||
#!/usr/bin/php
|
#!/usr/bin/php
|
||||||
<?
|
<?php
|
||||||
|
|
||||||
include("config.php");
|
include("config.php");
|
||||||
include("includes/functions.php");
|
include("includes/functions.php");
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#!/usr/bin/php
|
#!/usr/bin/php
|
||||||
<?
|
<?php
|
||||||
|
|
||||||
include("config.php");
|
include("config.php");
|
||||||
include("includes/functions.php");
|
include("includes/functions.php");
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#!/usr/bin/php
|
#!/usr/bin/php
|
||||||
<?
|
<?php
|
||||||
|
|
||||||
include("config.php");
|
include("config.php");
|
||||||
include("includes/functions.php");
|
include("includes/functions.php");
|
||||||
|
@ -1,8 +1,5 @@
|
|||||||
#!/usr/bin/php
|
#!/usr/bin/php
|
||||||
<?
|
<?php
|
||||||
#
|
|
||||||
# Test Reachability
|
|
||||||
#
|
|
||||||
|
|
||||||
include("config.php");
|
include("config.php");
|
||||||
include("includes/functions.php");
|
include("includes/functions.php");
|
||||||
|
@ -2,7 +2,8 @@
|
|||||||
|
|
||||||
### Purge deleted interfaces from the database
|
### Purge deleted interfaces from the database
|
||||||
|
|
||||||
<?
|
<?php
|
||||||
|
|
||||||
include("config.php");
|
include("config.php");
|
||||||
include("includes/functions.php");
|
include("includes/functions.php");
|
||||||
|
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
#!/usr/bin/php
|
#!/usr/bin/php
|
||||||
<?
|
<?php
|
||||||
|
|
||||||
include("config.php");
|
include("config.php");
|
||||||
include("includes/functions.php");
|
include("includes/functions.php");
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#!/usr/bin/php
|
#!/usr/bin/php
|
||||||
<?
|
<?php
|
||||||
|
|
||||||
include("config.php");
|
include("config.php");
|
||||||
include("includes/functions.php");
|
include("includes/functions.php");
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#!/usr/bin/php
|
#!/usr/bin/php
|
||||||
<?
|
<?php
|
||||||
|
|
||||||
include("config.php");
|
include("config.php");
|
||||||
include("includes/functions.php");
|
include("includes/functions.php");
|
||||||
|
Loading…
Reference in New Issue
Block a user