Updated most files to use dbFacile

This commit is contained in:
laf
2014-01-13 17:43:58 +00:00
parent a0650f0547
commit 02792176fa
45 changed files with 334 additions and 346 deletions

View File

@@ -1,6 +1,6 @@
<?php
$interface = mysql_fetch_assoc(mysql_query("SELECT * FROM `ports` WHERE `device_id` = '".$device['device_id']."' AND `ifIndex` = '".$entry[2]."'"));
$interface = dbFetchRow("SELECT * FROM `ports` WHERE `device_id` = ? AND `ifIndex` = ?",array($device['device_id'],$entry[2]));
if (!$interface) { exit; }
@@ -16,7 +16,7 @@ log_event("SNMP Trap: linkDown " . $interface['ifDescr'], $device, "interface",
if ($ifOperStatus != $interface['ifOperStatus'])
{
log_event("Interface went Down : " . $interface['ifDescr'] . " (TRAP)", $device, "interface", $interface['port_id']);
mysql_query("UPDATE `ports` SET ifOperStatus = 'down' WHERE `port_id` = '".$interface['port_id']."'");
dbUpdate(array('`ifOperStatus`' => 'down'), 'ports', 'port_id=?',array($interface['port_id']));
}
?>
?>