Changeset 873 for trunk/Modules/NetworkConfigRouterOS/Generators/DHCP.php
- Timestamp:
- Apr 6, 2020, 11:17:40 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/NetworkConfigRouterOS/Generators/DHCP.php
r861 r873 14 14 15 15 $DbResult = $this->Database->query('SELECT * FROM `NetworkSubnet` WHERE `Configure`=1'); 16 while ($Subnet = $DbResult->fetch_assoc())16 while ($Subnet = $DbResult->fetch_assoc()) 17 17 { 18 18 echo($Subnet['DHCP']); … … 24 24 'WHERE CompareNetworkPrefix(INET_ATON(`LocalIP`), INET_ATON("'.$Subnet['AddressRange'].'"), '.$Subnet['Mask'].') '. 25 25 'AND (`MAC` != "00:00:00:00:00:00") ORDER BY `LocalIP`'); 26 while ($Interface = $DbResult2->fetch_assoc())26 while ($Interface = $DbResult2->fetch_assoc()) 27 27 { 28 28 $Name = $Interface['DeviceName']; 29 if ($Interface['Name'] != '') $Name .= '-'.$Interface['Name'];29 if ($Interface['Name'] != '') $Name .= '-'.$Interface['Name']; 30 30 $Items[] = array('mac-address' => $Interface['MAC'], 'address' => $Interface['LocalIP'], 'server' => $Server, 'comment' => $Name, 'lease-time' => '1d'); 31 31 }
Note:
See TracChangeset
for help on using the changeset viewer.