- 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/FirewallMangle.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 $PathFirewall = array('ip', 'firewall', 'mangle'); 11 $Database = &$System->Database;12 11 13 12 $Routerboard = new Routerboard(); … … 24 23 25 24 // 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'); 27 26 while($Subnet = $DbResult->fetch_assoc()) 28 27 { … … 34 33 35 34 // Process users 36 $DbResult = $ Database->query('SELECT `Member`.*, `Subject`.`Name` FROM `Member` '.35 $DbResult = $System->Database->query('SELECT `Member`.*, `Subject`.`Name` FROM `Member` '. 37 36 'LEFT JOIN `Subject` ON `Subject`.`Id` = `Member`.`Subject` '. 38 37 'WHERE `Member`.`Blocked` = 0'); … … 42 41 echo('Uživatel '.$Member['Name'].': '); 43 42 44 $DbResult2 = $ Database->select('NetworkDevice', '*', '`Used` = 1 AND `Member` = '.$Member['Id']);43 $DbResult2 = $System->Database->select('NetworkDevice', '*', '`Used` = 1 AND `Member` = '.$Member['Id']); 45 44 while($Device = $DbResult2->fetch_assoc()) 46 45 { 47 $DbResult3 = $ Database->select('NetworkInterface', '*', '`Device` = '.$Device['Id'].' AND `LocalIP` != ""');46 $DbResult3 = $System->Database->select('NetworkInterface', '*', '`Device` = '.$Device['Id'].' AND `LocalIP` != ""'); 48 47 while($Interface = $DbResult3->fetch_assoc()) 49 48 { … … 59 58 } 60 59 61 $DbResult2 = $ Database->select('NetworkSubnet', '*', '`Member`='.$Member['Id']);60 $DbResult2 = $System->Database->select('NetworkSubnet', '*', '`Member`='.$Member['Id']); 62 61 while($Subnet = $DbResult2->fetch_assoc()) 63 62 {
Note:
See TracChangeset
for help on using the changeset viewer.