Changeset 554 for trunk/Modules/NetworkConfigRouterOS/Generators/Queue.php
- Timestamp:
- Jul 8, 2013, 12:44:10 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/NetworkConfigRouterOS/Generators/Queue.php
r548 r554 58 58 while($Member = $DbResult->fetch_assoc()) 59 59 { 60 $Member['Name'] = RouterOSIdent($Member['Name'].'-'.$Member['Id'] );61 62 60 $ServiceIndex = 1; 63 61 echo('Zákazník '.$Member['Name']."\n"); 64 $DbResult4 = $System->Database->query('SELECT `Service`.*, `ServiceCustomerRel`.`Id` AS `RelId` FROM `ServiceCustomerRel` JOIN `Service` ON `Service`.`Id` = `ServiceCustomerRel`.`Service` '. 65 'WHERE (`ServiceCustomerRel`.`Customer` = '.$Member['Id'].') AND (`ServiceCustomerRel`.`Action` IS NULL)'); 62 $DbResult4 = $System->Database->query('SELECT `Service`.*, `ServiceCustomerRel`.`Id` AS `RelId` FROM `ServiceCustomerRel` '. 63 'JOIN `Service` ON `Service`.`Id` = `ServiceCustomerRel`.`Service` '. 64 'WHERE (`ServiceCustomerRel`.`Customer` = '.$Member['Id'].') AND (`ServiceCustomerRel`.`Action` IS NULL) '. 65 'AND (`Service`.`InternetSpeedMax` > 0) AND (`Service`.`InternetSpeedMin` > 0)'); 66 66 while($Service = $DbResult4->fetch_assoc()) 67 67 { 68 68 echo('Služba '.$Service['Name'].': '); 69 $MemberName = RouterOSIdent($Member['Name'].'-'.$Member['Id'].'-'.$ServiceIndex); 69 70 $SpeedIn = round($Service['InternetSpeedMin'] / $InDivider) * 1000; 70 71 $SpeedOut = round($Service['InternetSpeedMin'] / $OutDivider) * 1000; … … 73 74 if($ServiceIndex == 1) 74 75 { 75 $ItemsQueue[] = array('name' => $Member ['Name'].'-out', 'limit-at' => $SpeedIn, 'max-limit' => $UserMaxSpeedIn, 'parent' => 'main-out');76 $ItemsQueue[] = array('name' => $Member ['Name'].'-in', 'limit-at' => $SpeedOut, 'max-limit' => $UserMaxSpeedOut, 'parent' => 'main-in');76 $ItemsQueue[] = array('name' => $MemberName.'-out', 'limit-at' => $SpeedIn, 'max-limit' => $UserMaxSpeedIn, 'parent' => 'main-out'); 77 $ItemsQueue[] = array('name' => $MemberName.'-in', 'limit-at' => $SpeedOut, 'max-limit' => $UserMaxSpeedOut, 'parent' => 'main-in'); 77 78 } 78 79 … … 104 105 $Subnet = $IPParts[2]; 105 106 $PacketMark = GetMarkByComment($Name.'-out'); 106 $ItemsQueue[] = array('name' => $Name.'-out', 'limit-at' => $HostSpeedIn, 'max-limit' => $UserMaxSpeedIn, 'parent' => $Member ['Name'].'-out', 'packet-mark' => $PacketMark);107 $ItemsQueue[] = array('name' => $Name.'-out', 'limit-at' => $HostSpeedIn, 'max-limit' => $UserMaxSpeedIn, 'parent' => $MemberName.'-out', 'packet-mark' => $PacketMark); 107 108 $PacketMark = GetMarkByComment($Name.'-in'); 108 $ItemsQueue[] = array('name' => $Name.'-in', 'limit-at' => $HostSpeedOut, 'max-limit' => $UserMaxSpeedOut, 'parent' => $Member ['Name'].'-in', 'packet-mark' => $PacketMark);109 $ItemsQueue[] = array('name' => $Name.'-in', 'limit-at' => $HostSpeedOut, 'max-limit' => $UserMaxSpeedOut, 'parent' => $MemberName.'-in', 'packet-mark' => $PacketMark); 109 110 } 110 111 } … … 118 119 $SubnetNumber = $IPParts[2]; 119 120 $PacketMark = GetMarkByComment($Subnet['Name'].'-out'); 120 $ItemsQueue[] = array('name' => $Subnet['Name'].'-out', 'limit-at' => $HostSpeedIn, 'max-limit' => $UserMaxSpeedIn, 'parent' => $Member ['Name'].'-out', 'packet-mark' => $PacketMark);121 $ItemsQueue[] = array('name' => $Subnet['Name'].'-out', 'limit-at' => $HostSpeedIn, 'max-limit' => $UserMaxSpeedIn, 'parent' => $MemberName.'-out', 'packet-mark' => $PacketMark); 121 122 $PacketMark = GetMarkByComment($Subnet['Name'].'-in'); 122 $ItemsQueue[] = array('name' => $Subnet['Name'].'-in', 'limit-at' => $HostSpeedOut, 'max-limit' => $UserMaxSpeedOut, 'parent' => $Member ['Name'].'-in', 'packet-mark' => $PacketMark);123 $ItemsQueue[] = array('name' => $Subnet['Name'].'-in', 'limit-at' => $HostSpeedOut, 'max-limit' => $UserMaxSpeedOut, 'parent' => $MemberName.'-in', 'packet-mark' => $PacketMark); 123 124 } 124 125 echo("\n");
Note:
See TracChangeset
for help on using the changeset viewer.