--- etc/95.php.orig 2003-09-24 20:40:57 UTC +++ etc/95.php @@ -1,41 +1,37 @@ \n\n
\n"; + print "\n\n\n"; /* Connect to RTG MySQL Database */ - $dbc=@mysql_connect ($host, $user, $pass) or - $dbc=@mysql_connect ("$host:/var/lib/mysql/mysql.sock", $user, $pass) or + $dbc=@mysqli_connect ($host, $user, $pass, $db) or die ("MySQL Connection Failed, Check Configuration."); - mysql_select_db($db,$dbc); - if ($PHP_SELF == "") { + if (!isset($PHP_SELF) || ($PHP_SELF == "")) { $PHP_SELF = "95.php"; - $customer = $_GET['customer']; - $syear = $_GET['syear']; - $eyear = $_GET['eyear']; - $smonth = $_GET['smonth']; - $emonth = $_GET['emonth']; - $sday = $_GET['sday']; - $eday = $_GET['eday']; - $shour = $_GET['shour']; - $ehour = $_GET['ehour']; - $smin = $_GET['smin']; - $emin = $_GET['emin']; - $debug = $_GET['debug']; + $customer = isset($_GET['customer'])?$_GET['customer']:""; + $syear = isset($_GET['syear'])?$_GET['syear']:""; + $eyear = isset($_GET['eyear'])?$_GET['eyear']:""; + $smonth = isset($_GET['smonth'])?$_GET['smonth']:""; + $emonth = isset($_GET['emonth'])?$_GET['emonth']:""; + $sday = isset($_GET['sday'])?$_GET['sday']:""; + $eday = isset($_GET['eday'])?$_GET['eday']:""; + $shour = isset($_GET['shour'])?$_GET['shour']:""; + $ehour = isset($_GET['ehour'])?$_GET['ehour']:""; + $smin = isset($_GET['smin'])?$_GET['smin']:""; + $emin = isset($_GET['emin'])?$_GET['emin']:""; + $debug = isset($_GET['debug'])?$_GET['debug']:""; } - print "+ + +
+counter; $sample_secs = $selectRow->unixtime; $total += $counter; @@ -83,132 +79,136 @@ function int_stats($statement, $dbc) { } ?> -