Changeset 815 for trunk/Modules/Network/Network.php
- Timestamp:
- Mar 9, 2016, 10:38:13 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/Network/Network.php
r814 r815 667 667 } 668 668 669 function CheckPortStatus($Ip, $Port)670 {671 $Timeout = 1;672 if($Socket = @fsockopen($Ip, $Port, $ErrorNumber, $ErrorString, $Timeout))673 {674 fclose($Socket);675 return(1);676 } else677 {678 return(0);679 }680 }681 682 669 function PortCheckList($Title, $OnlineNow, $OnlinePrevious, $MinDuration) 683 670 { … … 687 674 $Condition = 'WHERE (`NetworkPort`.`Online` = '.$OnlineNow.') AND (`NetworkPort`.`OnlineNotify` = '.$OnlinePrevious.') '. 688 675 'AND (`NetworkPort`.`LastOnline` <= "'.TimeToMysqlDateTime($Time - $MinDuration).'")'; 689 $DbResult3 = $this->Database->query('SELECT CONCAT(CONCAT_WS("-", `NetworkDevice`.`Name`, NULLIF(`NetworkInterface`.`Name`, "")), ":", `NetworkPort`.`Number` ) AS `Name`, '.676 $DbResult3 = $this->Database->query('SELECT CONCAT(CONCAT_WS("-", `NetworkDevice`.`Name`, NULLIF(`NetworkInterface`.`Name`, "")), ":", `NetworkPort`.`Number`, "(", `NetworkPort`.`Name`, ")") AS `Name`, '. 690 677 '`NetworkPort`.`Online`, `NetworkPort`.`LastOnline` FROM `NetworkPort` '. 691 678 'LEFT JOIN `NetworkInterface` ON `NetworkInterface`.`Id` = `NetworkPort`.`Interface` '. … … 694 681 '(`NetworkInterface`.`LocalIP` != "") AND (`NetworkPort`.`Enabled` = 1)'. 695 682 'ORDER BY `Name` ASC'); 696 echo($this->Database->LastQuery);697 683 if($DbResult3->num_rows > 0) 698 684 {
Note:
See TracChangeset
for help on using the changeset viewer.