Changeset 522 for trunk/Modules/NetworkConfigRouterOS/Generators/Queue.php
- Timestamp:
- Apr 15, 2013, 11:08:49 PM (12 years ago)
- Location:
- trunk/Modules/NetworkConfigRouterOS
- Files:
-
- 2 added
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/NetworkConfigRouterOS/Generators/Queue.php
r521 r522 5 5 $ClassesEnabled = 1; 6 6 $SessionDisable = true; 7 include ('../../Common/Global.php');8 include ('../routerboard.php');9 include ('common.php');7 include_once(dirname(__FILE__).'/../../../Common/Global.php'); 8 include_once(dirname(__FILE__).'/../Routerboard.php'); 9 include_once('Common.php'); 10 10 $PathQueue = array('queue', 'tree'); 11 $Database = &$System->Database;12 11 13 12 $Routerboard = new Routerboard(); … … 48 47 49 48 // 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`'); 51 50 // Slow free internet 52 51 $PacketMark = GetMarkByComment('free-out'); … … 56 55 57 56 // 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'); 59 58 while($Member = $DbResult->fetch_assoc()) 60 59 { … … 62 61 63 62 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` '. 65 64 'WHERE (`ServiceCustomerRel`.`Customer` = '.$Member['Id'].') AND (`ServiceCustomerRel`.`Action` IS NULL)'); 66 65 while($Service = $DbResult4->fetch_assoc()) … … 75 74 76 75 $Filter = '(`Used` = 1) AND (`Service` = '.$Service['RelId'].')'; 77 $DbResult2 = $ Database->select('NetworkDevice', 'COUNT(*)', $Filter);76 $DbResult2 = $System->Database->select('NetworkDevice', 'COUNT(*)', $Filter); 78 77 $Row = $DbResult2->fetch_row(); 79 78 $HostCount = $Row[0]; … … 88 87 } 89 88 90 $DbResult2 = $ Database->select('NetworkDevice', '*', $Filter);89 $DbResult2 = $System->Database->select('NetworkDevice', '*', $Filter); 91 90 while($Device = $DbResult2->fetch_assoc()) 92 91 { 93 $DbResult3 = $ Database->select('NetworkInterface', '*', '`Device` = '.$Device['Id'].' AND `LocalIP` != ""');92 $DbResult3 = $System->Database->select('NetworkInterface', '*', '`Device` = '.$Device['Id'].' AND `LocalIP` != ""'); 94 93 while($Interface = $DbResult3->fetch_assoc()) 95 94 { … … 107 106 } 108 107 109 $DbResult2 = $ Database->select('NetworkSubnet', '*', '`Service`='.$Service['RelId']);108 $DbResult2 = $System->Database->select('NetworkSubnet', '*', '`Service`='.$Service['RelId']); 110 109 while($Subnet = $DbResult2->fetch_assoc()) 111 110 {
Note:
See TracChangeset
for help on using the changeset viewer.