Changeset 273 for trunk/system/generators/netwatch_import.php
- Timestamp:
- Jan 24, 2010, 7:48:22 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/system/generators/netwatch_import.php
r264 r273 41 41 if($DbResult2->num_rows == 0) $Database->query('REPLACE INTO NetworkInterfaceStat (NetworkInterface, Time) VALUES ("'.$InterfaceId.'", DATE_FORMAT(NOW(), "%Y-%m-%d %H:00:00"))'); 42 42 $Database->query('UPDATE NetworkInterfaceStat SET PingCount = PingCount + 1 WHERE (NetworkInterface="'.$InterfaceId.'") AND (Time = DATE_FORMAT(NOW(), "%Y-%m-%d %H:00:00"))'); 43 43 44 } 44 45 } … … 54 55 if($DbRow['SUM(Online)'] > 0) $Online = 1; else $Online = 0; 55 56 $Database->update('NetworkDevice', 'Id='.$Device['Id'], array('Online' => $Online)); 57 if($Online == 1) $Database->update('NetworkDevice', 'Id='.$Device['Id'], array('LastOnline' => 'NOW()')); 56 58 } 57 59
Note:
See TracChangeset
for help on using the changeset viewer.