Changeset 815
- Timestamp:
- Mar 9, 2016, 10:38:13 PM (9 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Application/Version.php
r814 r815 1 1 <?php 2 2 3 $Revision = 81 4; // Subversion revision3 $Revision = 815; // Subversion revision 4 4 $DatabaseRevision = 814; // SQL structure revision 5 5 $ReleaseTime = strtotime('2016-03-09'); -
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 { -
trunk/Modules/NetworkConfigLinux/NetworkConfigLinux.php
r781 r815 2 2 3 3 include_once(dirname(__FILE__).'/Generators/DNS.php'); 4 include_once(dirname(__FILE__).'/Generators/CheckPorts.php'); 4 5 5 6 class ModuleNetworkConfigLinux extends AppModule … … 27 28 { 28 29 $this->System->ModuleManager->Modules['NetworkConfig']->RegisterConfigItem('linux-dns', 'ConfigDNS'); 30 $this->System->ModuleManager->Modules['NetworkConfig']->RegisterConfigItem('linux-checkports', 'ConfigCheckPorts'); 29 31 } 30 32 }
Note:
See TracChangeset
for help on using the changeset viewer.