replacing <? with <?php

git-svn-id: http://www.observium.org/svn/observer/trunk@466 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Adam Amstrong 2009-09-07 11:07:59 +00:00
parent 5e076981f5
commit bfc9f845ce
66 changed files with 73 additions and 73 deletions

View File

@ -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");

View File

@ -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");

View File

@ -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");

View File

@ -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);

View File

@ -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");

View File

@ -1,4 +1,4 @@
<? <?php
$updated = '1'; $updated = '1';

View File

@ -1,4 +1,4 @@
<? <?php
$updated = '1'; $updated = '1';

View File

@ -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>");

View File

@ -1,4 +1,4 @@
<? <?php
$descr = $_POST['descr']; $descr = $_POST['descr'];
$ignore = $_POST['ignore']; $ignore = $_POST['ignore'];

View File

@ -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; }

View File

@ -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; }

View File

@ -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; }

View File

@ -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 {

View File

@ -1,4 +1,4 @@
<? <?php
include("../config.php"); include("../config.php");
include("../includes/functions.php"); include("../includes/functions.php");

View File

@ -1,4 +1,4 @@
<? <?php
echo("<div style='margin: 10px;'>"); echo("<div style='margin: 10px;'>");

View File

@ -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']);

View File

@ -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";

View File

@ -1,4 +1,4 @@
<? <?php
if($_GET['id']) {$_GET['id'] = mres($_GET['id']); } if($_GET['id']) {$_GET['id'] = mres($_GET['id']); }

View File

@ -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);

View File

@ -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)) {

View File

@ -1,4 +1,4 @@
<? <?php
include("os-ios.inc.php"); include("os-ios.inc.php");

View File

@ -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);

View File

@ -1,4 +1,4 @@
<? <?php
### Connect to database ### Connect to database

View File

@ -1,4 +1,4 @@
<? <?php
$hostname = gethostbyid($_GET[id]); $hostname = gethostbyid($_GET[id]);

View File

@ -26,7 +26,7 @@ function createInterfaces(index)
</script> </script>
<? <?php
echo("<div style='margin: 10px;'>"); echo("<div style='margin: 10px;'>");

View File

@ -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";

View File

@ -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']."%'";

View File

@ -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') {

View File

@ -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']."%'";

View File

@ -1,4 +1,4 @@
<? <?php
## Common Functions ## Common Functions

View File

@ -1,4 +1,4 @@
<? <?php
### Discover BGP peers on Cisco devices ### Discover BGP peers on Cisco devices

View File

@ -1,4 +1,4 @@
<? <?php
unset ($mac_table); unset ($mac_table);

View File

@ -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'];

View File

@ -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'];

View File

@ -1,4 +1,4 @@
<? <?php
echo("Cisco VLANs : "); echo("Cisco VLANs : ");

View File

@ -1,4 +1,4 @@
<? <?php
unset( $vrf_count ); unset( $vrf_count );

View File

@ -1,4 +1,4 @@
<? <?php
# Discover interfaces # Discover interfaces

View File

@ -1,4 +1,4 @@
<? <?php
unset( $storage_exists ); unset( $storage_exists );

View File

@ -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'];

View File

@ -1,4 +1,4 @@
<? <?php
## Include from PEAR ## Include from PEAR

View File

@ -1,4 +1,4 @@
<? <?php
function pollDevice() { function pollDevice() {

View File

@ -1,4 +1,4 @@
<? <?php
function memgraphWin ($rrd, $graph, $from="-2d") function memgraphWin ($rrd, $graph, $from="-2d")
{ {

View File

@ -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!

View File

@ -1,4 +1,4 @@
<? <?php
if(!$os) { if(!$os) {
if(preg_match("/^NetBSD/", $sysDescr)) { $os = "NetBSD"; } if(preg_match("/^NetBSD/", $sysDescr)) { $os = "NetBSD"; }

View File

@ -1,4 +1,4 @@
<? <?php
if(!$os) { if(!$os) {
if(preg_match("/^OpenBSD/", $sysDescr)) { $os = "OpenBSD"; } if(preg_match("/^OpenBSD/", $sysDescr)) { $os = "OpenBSD"; }

View File

@ -1,4 +1,4 @@
<? <?php
echo("Polling BGP peers\n"); echo("Polling BGP peers\n");

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -1,4 +1,4 @@
<? <?php
$community = $device['community']; $community = $device['community'];
$id = $device['device_id']; $id = $device['device_id'];

View File

@ -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";

View File

@ -1,4 +1,4 @@
<? <?php
echo("Doing Juniper Netscreen (ScreenOS)"); echo("Doing Juniper Netscreen (ScreenOS)");

View File

@ -1,4 +1,4 @@
<? <?php
echo("Polling SNOM device...\n"); echo("Polling SNOM device...\n");

View File

@ -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"; }

View File

@ -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)) {

View File

@ -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);

View File

@ -1,4 +1,4 @@
<? <?php
include("procurve-graphing.php"); include("procurve-graphing.php");

View File

@ -1,4 +1,3 @@
<? <?php
include("unix-graphing.php");
include("unix-graphing.php"); ?>

View File

@ -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");

View File

@ -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");

View File

@ -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");

View File

@ -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");

View File

@ -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");

View File

@ -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");

View File

@ -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");

View File

@ -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");