Changeset 522 for trunk/Modules/NetworkConfigRouterOS/Generators/DHCP.php
- Timestamp:
- Apr 15, 2013, 11:08:49 PM (12 years ago)
- Location:
- trunk/Modules/NetworkConfigRouterOS
- Files:
-
- 2 added
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/NetworkConfigRouterOS/Generators/DHCP.php
r521 r522 2 2 3 3 if(isset($_SERVER['REMOTE_ADDR'])) die(); 4 include ('../../Common/Global.php');5 include ('../routerboard.php');4 include_once(dirname(__FILE__).'/../../../Common/Global.php'); 5 include_once(dirname(__FILE__).'/../Routerboard.php'); 6 6 $Path = array('ip', 'dhcp-server', 'lease'); 7 $Database = &$System->Database;8 7 9 8 $Routerboard = new Routerboard(); … … 12 11 $Routerboard->Debug = true; 13 12 14 $DbResult = $ Database->query('SELECT * FROM `NetworkSubnet` WHERE `Configure`=1');13 $DbResult = $System->Database->query('SELECT * FROM `NetworkSubnet` WHERE `Configure`=1'); 15 14 while($Subnet = $DbResult->fetch_assoc()) 16 15 { … … 19 18 $Items = array(); 20 19 $Server = 'dhcp'.$Subnet['Id']; 21 $DbResult2 = $ Database->query('SELECT NetworkInterface.*, NetworkDevice.Name AS DeviceName FROM `NetworkInterface` LEFT JOIN NetworkDevice ON NetworkDevice.Id = NetworkInterface.Device WHERE '.20 $DbResult2 = $System->Database->query('SELECT NetworkInterface.*, NetworkDevice.Name AS DeviceName FROM `NetworkInterface` LEFT JOIN NetworkDevice ON NetworkDevice.Id = NetworkInterface.Device WHERE '. 22 21 ' CompareNetworkPrefix(INET_ATON(LocalIP), INET_ATON("'.$Subnet['AddressRange'].'"), '.$Subnet['Mask'].') AND (`MAC` != "00:00:00:00:00:00") ORDER BY `LocalIP`'); 23 22 while($Interface = $DbResult2->fetch_assoc())
Note:
See TracChangeset
for help on using the changeset viewer.