Ignore:
Timestamp:
Apr 6, 2020, 11:17:40 PM (5 years ago)
Author:
chronos
Message:
  • Modified: Improved code format.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Modules/NetworkConfigLinux/Generators/DHCP.php

    r790 r873  
    11<?php
    22
    3 if(isset($_SERVER['REMOTE_ADDR'])) die();
     3if (isset($_SERVER['REMOTE_ADDR'])) die();
    44/*
    55include_once('../../global.php');
     
    2323'option netbios-scope "";'."\n".
    2424"server-identifier 192.168.0.1;\n\n");
    25 for($i = 0; $i <= $MaxSubnet; $i++)
     25for ($i = 0; $i <= $MaxSubnet; $i++)
    2626{
    2727  fputs($File, "subnet 192.168.".$i.".0 netmask 255.255.255.0 {\n".
     
    3030  "  option routers 192.168.".$i.".1;\n");
    3131  $DbResult = $Database->select('hosts', '*', "IP LIKE '192.168.".$i."%' ORDER BY IP");
    32   while($Row = $DbResult->fetch_array())
     32  while ($Row = $DbResult->fetch_array())
    3333  {
    3434    $Data = $Row['name'];
    35     if(strlen($Data) < 9) $Data .= "\t";
     35    if (strlen($Data) < 9) $Data .= "\t";
    3636    fputs($File, "  host ".$Data."\t{ fixed-address ".$Row['IP'].";\thardware ethernet ".$Row['MAC']."; }\n");
    3737  }
Note: See TracChangeset for help on using the changeset viewer.