Changeset 873 for trunk/Modules/NetworkConfigLinux/Generators/DHCP.php
- Timestamp:
- Apr 6, 2020, 11:17:40 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/NetworkConfigLinux/Generators/DHCP.php
r790 r873 1 1 <?php 2 2 3 if (isset($_SERVER['REMOTE_ADDR'])) die();3 if (isset($_SERVER['REMOTE_ADDR'])) die(); 4 4 /* 5 5 include_once('../../global.php'); … … 23 23 'option netbios-scope "";'."\n". 24 24 "server-identifier 192.168.0.1;\n\n"); 25 for ($i = 0; $i <= $MaxSubnet; $i++)25 for ($i = 0; $i <= $MaxSubnet; $i++) 26 26 { 27 27 fputs($File, "subnet 192.168.".$i.".0 netmask 255.255.255.0 {\n". … … 30 30 " option routers 192.168.".$i.".1;\n"); 31 31 $DbResult = $Database->select('hosts', '*', "IP LIKE '192.168.".$i."%' ORDER BY IP"); 32 while ($Row = $DbResult->fetch_array())32 while ($Row = $DbResult->fetch_array()) 33 33 { 34 34 $Data = $Row['name']; 35 if (strlen($Data) < 9) $Data .= "\t";35 if (strlen($Data) < 9) $Data .= "\t"; 36 36 fputs($File, " host ".$Data."\t{ fixed-address ".$Row['IP'].";\thardware ethernet ".$Row['MAC']."; }\n"); 37 37 }
Note:
See TracChangeset
for help on using the changeset viewer.