some formatting cleanups, introduce some more FIXMEs to look at, plus replace mysql_fetch_array by mysql_fetch_assoc, for great justice

git-svn-id: http://www.observium.org/svn/observer/trunk@2029 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Tom Laermans
2011-04-06 13:54:50 +00:00
parent 51e242b896
commit f55a30f744
163 changed files with 476 additions and 460 deletions

View File

@@ -9,7 +9,7 @@ if (mysql_num_rows($results))
echo('<p style="padding: 0px 5px 5px;" class="sectionhead"><a class="sectionhead" href="device/'.$device['device_id'].'/health/' . strtolower($sensor_type) . '/"><img align="absmiddle" src="'.$config['base_url'].'/images/icons/' . strtolower($sensor_type) . '.png"> ' . $sensor_type . '</a></p>');
$i = '1';
echo('<table width="100%" valign="top">');
while ($sensor = mysql_fetch_array($results))
while ($sensor = mysql_fetch_assoc($results))
{
if (is_integer($i/2)) { $row_colour = $list_colour_a; } else { $row_colour = $list_colour_b; }

View File

@@ -12,7 +12,7 @@ if (mysql_result(mysql_query("SELECT count(*) from mempools WHERE device_id = '"
$mempool_rows = '1';
$mempools = mysql_query("SELECT * FROM `mempools` WHERE device_id = '" . $device['device_id'] . "'");
while ($mempool = mysql_fetch_array($mempools))
while ($mempool = mysql_fetch_assoc($mempools))
{
if (is_integer($mempool_rows/2)) { $row_colour = $list_colour_a; } else { $row_colour = $list_colour_b; }
$perc = round($mempool['mempool_used'] / ($mempool['mempool_total']) * 100,2);

View File

@@ -48,7 +48,7 @@ if ($ports['total'])
$query = mysql_query($sql);
$ifsep = "";
while ($data = mysql_fetch_array($query))
while ($data = mysql_fetch_assoc($query))
{
$data = ifNameDescr($data);
$data = array_merge($data, $device);

View File

@@ -12,7 +12,7 @@ if (mysql_result(mysql_query("SELECT count(*) from processors WHERE device_id =
echo("<table width=100% cellspacing=0 cellpadding=5>");
$i = '1';
$procs = mysql_query("SELECT * FROM `processors` WHERE device_id = '" . $device['device_id'] . "' ORDER BY processor_descr ASC");
while ($proc = mysql_fetch_array($procs))
while ($proc = mysql_fetch_assoc($procs))
{
if (is_integer($processor_rows/2)) { $row_colour = $list_colour_a; } else { $row_colour = $list_colour_b; }

View File

@@ -12,7 +12,7 @@ if (mysql_result(mysql_query("SELECT count(storage_id) from storage WHERE device
$drive_rows = '0';
$drives = mysql_query("SELECT * FROM `storage` WHERE device_id = '" . $device['device_id'] . "' ORDER BY storage_descr ASC");
while ($drive = mysql_fetch_array($drives))
while ($drive = mysql_fetch_assoc($drives))
{
$skipdrive = 0;