Minor fixes, some cleanups, and standardising on echo("x") instead of echo "x"

git-svn-id: http://www.observium.org/svn/observer/trunk@1728 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Tom Laermans
2010-11-20 14:04:07 +00:00
parent 0cd548f0f2
commit 30bdd952ee
63 changed files with 199 additions and 283 deletions
+4 -4
View File
@@ -71,17 +71,17 @@ echo("<table cellpadding=0 cellspacing=0><tr><td>
$unknown = 1;
foreach ($device_types as $type)
{
echo ' <option value="'.$type.'"';
echo(' <option value="'.$type.'"');
if ($device['type'] == $type)
{
echo 'selected="1"';
echo('selected="1"');
$unknown = 0;
}
echo ' >' . ucfirst($type) . '</option>';
echo(' >' . ucfirst($type) . '</option>');
}
if ($unknown)
{
echo ' <option value="other">Other</option>';
echo(' <option value="other">Other</option>');
}
echo("
</select>
+10 -10
View File
@@ -24,23 +24,23 @@ echo("<div style='float: left;'>
$query = mysql_query("SELECT * FROM `ports` WHERE device_id='".$device['device_id']."' ORDER BY `ifIndex` ");
while($device = mysql_fetch_array($query)) {
echo "<tr>";
echo "<td align=right>". $device['ifIndex']."</td>";
echo "<td align=left>".$device['ifDescr'] . "</td>";
echo "<td align=right>". $device['ifAdminStatus']."</td>";
echo("<tr>");
echo("<td align=right>". $device['ifIndex']."</td>");
echo("<td align=left>".$device['ifDescr'] . "</td>");
echo("<td align=right>". $device['ifAdminStatus']."</td>");
# Mark interfaces which are down yet not ignored, or up - yet ignored - as to draw the attention
# to a possible problem.
#
$outofsync = ($device['ignore'] == ($device['ifOperStatus'] == 'down' ? 1 : 0)) ? "" : "class=red";
echo "<td align=right><span ".$outofsync.">". $device['ifOperStatus']."</span></td>";
echo("<td align=right><span ".$outofsync.">". $device['ifOperStatus']."</span></td>");
echo "<td>";
echo "<input type=checkbox name='ignore_".$device['interface_id']."'".($device['ignore'] ? 'checked' : '').">";
echo "<input type=hidden name='oldval_".$device['interface_id']."' value=".($device['ignore'] ? 1 : 0).">";
echo "</td>";
echo "</tr>";
echo("<td>");
echo("<input type=checkbox name='ignore_".$device['interface_id']."'".($device['ignore'] ? 'checked' : '').">");
echo("<input type=hidden name='oldval_".$device['interface_id']."' value=".($device['ignore'] ? 1 : 0).">");
echo("</td>");
echo("</tr>");
}
echo('<tr><td></td><td></td><td></td><td></td><td><input type="submit" value="Save"></td></tr>');