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/FirewallMangle.php

    r521 r522  
    55$ClassesEnabled = 1;
    66$SessionDisable = true;
    7 include('../../Common/Global.php');
    8 include('../routerboard.php');
    9 include('common.php');
     7include_once(dirname(__FILE__).'/../../../Common/Global.php');
     8include_once(dirname(__FILE__).'/../Routerboard.php');
     9include_once('Common.php');
    1010$PathFirewall = array('ip', 'firewall', 'mangle');
    11 $Database = &$System->Database;
    1211
    1312$Routerboard = new Routerboard();
     
    2423
    2524// Divide rules by subnet number
    26 $DbResult = $Database->query('SELECT `Id`, `Name`, `AddressRange`, `Mask` FROM `NetworkSubnet` WHERE `Member` IS NULL');
     25$DbResult = $System->Database->query('SELECT `Id`, `Name`, `AddressRange`, `Mask` FROM `NetworkSubnet` WHERE `Member` IS NULL');
    2726while($Subnet = $DbResult->fetch_assoc())
    2827{
     
    3433
    3534// Process users
    36 $DbResult = $Database->query('SELECT `Member`.*, `Subject`.`Name` FROM `Member` '.
     35$DbResult = $System->Database->query('SELECT `Member`.*, `Subject`.`Name` FROM `Member` '.
    3736  'LEFT JOIN `Subject` ON `Subject`.`Id` = `Member`.`Subject` '.
    3837  'WHERE `Member`.`Blocked` = 0');
     
    4241  echo('Uživatel '.$Member['Name'].': ');
    4342
    44   $DbResult2 = $Database->select('NetworkDevice', '*', '`Used` = 1 AND `Member` = '.$Member['Id']);
     43  $DbResult2 = $System->Database->select('NetworkDevice', '*', '`Used` = 1 AND `Member` = '.$Member['Id']);
    4544  while($Device = $DbResult2->fetch_assoc())
    4645  {
    47     $DbResult3 = $Database->select('NetworkInterface', '*', '`Device` = '.$Device['Id'].' AND `LocalIP` != ""');
     46    $DbResult3 = $System->Database->select('NetworkInterface', '*', '`Device` = '.$Device['Id'].' AND `LocalIP` != ""');
    4847    while($Interface = $DbResult3->fetch_assoc())
    4948    {
     
    5958  }
    6059 
    61   $DbResult2 = $Database->select('NetworkSubnet', '*', '`Member`='.$Member['Id']);
     60  $DbResult2 = $System->Database->select('NetworkSubnet', '*', '`Member`='.$Member['Id']);
    6261  while($Subnet = $DbResult2->fetch_assoc())
    6362  {
Note: See TracChangeset for help on using the changeset viewer.