Ignore:
Timestamp:
Apr 15, 2013, 11:08:49 PM (12 years ago)
Author:
chronos
Message:
  • Upraveno: Skritpy generátorů nastavení routerů přetvořeny na aplikační moduly NetworkConfig.
Location:
trunk/Modules/NetworkConfigRouterOS
Files:
2 added
1 copied

Legend:

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

    r521 r522  
    22
    33if(isset($_SERVER['REMOTE_ADDR'])) die();
    4 include('../../Common/Global.php');
    5 include('../routerboard.php');
     4include_once(dirname(__FILE__).'/../../../Common/Global.php');
     5include_once(dirname(__FILE__).'/../Routerboard.php');
    66$Path = array('ip', 'dhcp-server', 'lease');
    7 $Database = &$System->Database;
    87
    98$Routerboard = new Routerboard();
     
    1211$Routerboard->Debug = true;
    1312
    14 $DbResult = $Database->query('SELECT * FROM `NetworkSubnet` WHERE `Configure`=1');
     13$DbResult = $System->Database->query('SELECT * FROM `NetworkSubnet` WHERE `Configure`=1');
    1514while($Subnet = $DbResult->fetch_assoc())
    1615{
     
    1918  $Items = array();
    2019  $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 '.
    2221  ' CompareNetworkPrefix(INET_ATON(LocalIP), INET_ATON("'.$Subnet['AddressRange'].'"), '.$Subnet['Mask'].') AND (`MAC` != "00:00:00:00:00:00") ORDER BY `LocalIP`');
    2322  while($Interface = $DbResult2->fetch_assoc())
Note: See TracChangeset for help on using the changeset viewer.