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/Queue.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$PathQueue = array('queue', 'tree');
    11 $Database = &$System->Database;
    1211
    1312$Routerboard = new Routerboard();
     
    4847
    4948// Divide rules by subnet number
    50 $DbResult = $Database->query('SELECT `Id`, `Name`, `AddressRange`, `Mask` FROM `NetworkSubnet`');
     49$DbResult = $System->Database->query('SELECT `Id`, `Name`, `AddressRange`, `Mask` FROM `NetworkSubnet`');
    5150// Slow free internet
    5251$PacketMark = GetMarkByComment('free-out');
     
    5655
    5756// Process users
    58 $DbResult = $Database->query('SELECT `Member`.*, `Subject`.`Name` FROM `Member` LEFT JOIN `Subject` ON `Subject`.`Id` = `Member`.`Subject` WHERE `Member`.`Blocked`=0');
     57$DbResult = $System->Database->query('SELECT `Member`.*, `Subject`.`Name` FROM `Member` LEFT JOIN `Subject` ON `Subject`.`Id` = `Member`.`Subject` WHERE `Member`.`Blocked`=0');
    5958while($Member = $DbResult->fetch_assoc())
    6059{
     
    6261
    6362  echo('Zákazník '.$Member['Name']."\n");
    64   $DbResult4 = $Database->query('SELECT `Service`.*, `ServiceCustomerRel`.`Id` AS `RelId` FROM `ServiceCustomerRel` JOIN `Service` ON `Service`.`Id` = `ServiceCustomerRel`.`Service` '.
     63  $DbResult4 = $System->Database->query('SELECT `Service`.*, `ServiceCustomerRel`.`Id` AS `RelId` FROM `ServiceCustomerRel` JOIN `Service` ON `Service`.`Id` = `ServiceCustomerRel`.`Service` '.
    6564    'WHERE (`ServiceCustomerRel`.`Customer` = '.$Member['Id'].') AND (`ServiceCustomerRel`.`Action` IS NULL)');
    6665  while($Service = $DbResult4->fetch_assoc())
     
    7574
    7675    $Filter = '(`Used` = 1) AND (`Service` = '.$Service['RelId'].')';
    77     $DbResult2 = $Database->select('NetworkDevice', 'COUNT(*)', $Filter);
     76    $DbResult2 = $System->Database->select('NetworkDevice', 'COUNT(*)', $Filter);
    7877    $Row = $DbResult2->fetch_row();
    7978    $HostCount = $Row[0];
     
    8887    }
    8988
    90     $DbResult2 = $Database->select('NetworkDevice', '*', $Filter);
     89    $DbResult2 = $System->Database->select('NetworkDevice', '*', $Filter);
    9190    while($Device = $DbResult2->fetch_assoc())
    9291    {
    93       $DbResult3 = $Database->select('NetworkInterface', '*', '`Device` = '.$Device['Id'].' AND `LocalIP` != ""');
     92      $DbResult3 = $System->Database->select('NetworkInterface', '*', '`Device` = '.$Device['Id'].' AND `LocalIP` != ""');
    9493      while($Interface = $DbResult3->fetch_assoc())
    9594      {
     
    107106    }
    108107 
    109     $DbResult2 = $Database->select('NetworkSubnet', '*', '`Service`='.$Service['RelId']);
     108    $DbResult2 = $System->Database->select('NetworkSubnet', '*', '`Service`='.$Service['RelId']);
    110109    while($Subnet = $DbResult2->fetch_assoc())
    111110    {
Note: See TracChangeset for help on using the changeset viewer.