Changeset 970
- Timestamp:
- Jul 17, 2024, 10:48:28 PM (5 months ago)
- Location:
- trunk
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Application/BaseView.php
r965 r970 7 7 public bool $FormatHTML = false; 8 8 public bool $ShowRuntimeInfo = false; 9 public bool $RawPage = false;10 public bool $BasicHTML = false;11 9 public string $ParentClass = ''; 12 10 public string $Title; … … 85 83 86 84 $Output .= '</head><body'.$BodyParam.'>'; 87 if ($ this->BasicHTML == false)85 if ($Page->BasicHTML == false) 88 86 { 89 87 //$Output .= '<div class="MainTitle">'.$Title.'</div>'; … … 99 97 } 100 98 101 function ShowFooter( ): string99 function ShowFooter(Page $Page): string 102 100 { 103 101 global $Revision, $ReleaseTime; … … 105 103 $Time = round(GetMicrotime() - Core::Cast($this->System)->ScriptTimeStart, 2); 106 104 $Output = ''; 107 if ($ this->BasicHTML == false)105 if ($Page->BasicHTML == false) 108 106 { 109 107 $Output .= '<div id="Footer">'. … … 125 123 if ($Page->RawPage == false) 126 124 { 127 $Output = $this->ShowHeader($Page).$Output.$this->ShowFooter( );125 $Output = $this->ShowHeader($Page).$Output.$this->ShowFooter($Page); 128 126 if ($this->FormatHTML == true) $Output = $this->FormatOutput($Output); 129 127 } -
trunk/Application/UpdateTrace.php
r967 r970 2259 2259 "VALUES (NULL , 'Měsíční přehled', '".$DbRow['Id']."', '".$ActionId."', '1');"); 2260 2260 } 2261 } 2262 2263 function UpdateTo970(UpdateManager $Manager): void 2264 { 2265 $Manager->Execute('ALTER TABLE `Service` ADD `InternetSpeedBonus` INT NULL DEFAULT NULL AFTER `InternetSpeedMin`;'); 2261 2266 } 2262 2267 … … 2375 2380 953 => array('Revision' => 957, 'Function' => 'UpdateTo957'), 2376 2381 957 => array('Revision' => 967, 'Function' => 'UpdateTo967'), 2382 967 => array('Revision' => 970, 'Function' => 'UpdateTo970'), 2377 2383 ); 2378 2384 } -
trunk/Application/Version.php
r969 r970 1 1 <?php 2 2 3 $Revision = 9 69; // Subversion revision4 $DatabaseRevision = 9 67; // SQL structure revision3 $Revision = 970; // Subversion revision 4 $DatabaseRevision = 970; // SQL structure revision 5 5 $ReleaseTime = strtotime('2024-07-17'); -
trunk/Modules/Customer/Customer.php
r968 r970 85 85 'InternetSpeedMin' => array('Type' => 'Integer', 'Caption' => 'Min. rychlost internetu', 'Default' => '0', 'Suffix' => 'bit/s'), 86 86 'InternetSpeedMax' => array('Type' => 'Integer', 'Caption' => 'Max. rychlost internetu', 'Default' => '0', 'Suffix' => 'bit/s'), 87 'InternetSpeedBonus' => array('Type' => 'Integer', 'Caption' => 'Bonusová rychlost internetu', 'Default' => '0', 'Suffix' => 'bit/s'), 87 88 'UploadAsymmetry' => array('Type' => 'Integer', 'Caption' => 'Asymetrie odesílání', 'Default' => '1'), 88 89 'Memory' => array('Type' => 'Integer', 'Caption' => 'Paměť', 'Default' => '0', 'Suffix' => 'GB'), … … 385 386 $Desc->AddInteger('InternetSpeedMax'); 386 387 $Desc->AddInteger('InternetSpeedMin'); 388 $Desc->AddInteger('InternetSpeedBonus'); 387 389 $Desc->AddInteger('InternetUploadAsymmetry'); 388 390 $Desc->AddInteger('Memory'); -
trunk/Modules/NetworkConfigRouterOS/Generators/Queue.php
r929 r970 3 3 class SpeedLimit 4 4 { 5 var$Min;6 var$Max;7 var$PacketMark;5 public int $Min; 6 public int $Max; 7 public ?int $PacketMark; 8 8 9 9 function __construct(int $Min, int $Max, int $PacketMark = null) … … 25 25 class SpeedLimitItem 26 26 { 27 var$Name;28 var$Parent;29 var$LimitIn;30 var$LimitOut;31 var$FixedSpeed;32 var$SubItems;27 public string $Name; 28 public ?SpeedLimitItem $Parent; 29 public SpeedLimit $LimitIn; 30 public SpeedLimit $LimitOut; 31 public bool $FixedSpeed; 32 public SpeedLimitItems $SubItems; 33 33 34 34 function __construct(string $Name, SpeedLimitItem $Parent = null) … … 184 184 $UsersMaxSpeedIn = round($Finance->MaxSpeed / $InDivider) * 1000; 185 185 $UsersMaxSpeedOut = round($Finance->MaxSpeed / $OutDivider) * 1000; 186 $VoipMaxSpeedIn = $TotalMaxSpeedIn - 136;187 $VoipMaxSpeedOut = $TotalMaxSpeedOut - 136;188 $VoipSpeedIn = 100; //$SpeedReserve;189 $VoipSpeedOut = 100; //$SpeedReserve;190 186 $OutInterface = 'eth1'; 191 187 $InInterface = 'ifb0'; … … 206 202 $this->LoadSpeedLimits($Main); 207 203 208 // Slow free internet204 // Free internet 209 205 $Free = new SpeedLimitItem('free', $Main); 210 206 $Free->LimitIn = new SpeedLimit($FreeInetSpeed, $FreeInetSpeed, GetMarkByComment('free-in')); … … 226 222 while ($Service = $DbResult4->fetch_assoc()) 227 223 { 224 $MinSpeed = $Service['InternetSpeedMin']; 225 $MaxSpeed = $Service['InternetSpeedMax']; 226 if ($Service['InternetSpeedBonus'] > $MaxSpeed) $MaxSpeed = $Service['InternetSpeedBonus']; 227 228 228 echo('Služba '.$Service['Name'].': '); 229 229 $MemberName = RouterOSIdent($Member['Name'].'-'.$Member['Id'].'-'.$ServiceIndex); 230 $SpeedIn = round($Service['InternetSpeedMin'] / $InDivider); 231 $SpeedOut = round($Service['InternetSpeedMin'] / $OutDivider); 232 $UserMaxSpeedIn = round($Service['InternetSpeedMax'] / $InDivider); 233 $UserMaxSpeedOut = round($Service['InternetSpeedMax'] / $OutDivider); 230 $MinReduction = 100; 231 $SpeedIn = round($MinSpeed / $InDivider / $MinReduction); 232 $SpeedOut = round($MinSpeed / $OutDivider / $MinReduction); 233 $UserMaxSpeedIn = round($MaxSpeed / $InDivider); 234 $UserMaxSpeedOut = round($MaxSpeed / $OutDivider); 234 235 235 236 // Reduce max speed by speed limits … … 302 303 echo($Main->Print()); 303 304 $ItemsQueue = $Main->GetCommands(); 304 $Routerboard->ListUpdate($PathQueue, array('name', 'limit-at', 'max-limit', 'parent', 'packet-mark'), $ItemsQueue, array(), true);305 //$Routerboard->ListUpdate($PathQueue, array('name', 'limit-at', 'max-limit', 'parent', 'packet-mark'), $ItemsQueue, array(), true); 305 306 } 306 307 … … 415 416 while (count($DevicesToCheck) > 0) 416 417 { 417 //echo('Pass'."\n");418 418 $NewDevicesToCheck = array(); 419 419 foreach ($DevicesToCheck as $DeviceId) 420 420 { 421 //echo($this->Devices[$DeviceId]['Name'].': ');422 421 foreach ($this->Devices[$DeviceId]['Interfaces'] as $InterfaceId) 423 422 { … … 435 434 if ($NewMaxSpeed > $Link['MaxRealSpeed']) 436 435 $NewMaxSpeed = $Link['MaxRealSpeed']; 437 //echo($this->Devices[$Device2Id]['Name'].' '.$Device2Id.', ');438 436 $this->Devices[$Device2Id]['MaxSpeed'] = $NewMaxSpeed; 439 437 // Set nodes tree relation 440 438 $this->Devices[$Device2Id]['Parent'] = $DeviceId; 441 439 $this->Devices[$DeviceId]['Childs'][] = $Device2Id; 442 //echo($NewMaxSpeed.", ".count($NewDevicesToCheck).' ');443 440 $NewDevicesToCheck[] = $Device2Id; 444 441 } 445 442 } 446 443 } 447 //echo("\n");448 444 } 449 445 $DevicesToCheck = $NewDevicesToCheck; … … 515 511 $InDivider = 1; 516 512 $OutDivider = 1; 517 $TotalMaxSpeedIn = round($Finance->RealMaxSpeed / $InDivider) * 1000;518 $TotalMaxSpeedOut = round($Finance->RealMaxSpeed / $OutDivider) * 1000;519 513 $UsersMaxSpeedIn = round($Finance->MaxSpeed / $InDivider) * 1000; 520 514 $UsersMaxSpeedOut = round($Finance->MaxSpeed / $OutDivider) * 1000; 521 $VoipMaxSpeedIn = $TotalMaxSpeedIn - 136;522 $VoipMaxSpeedOut = $TotalMaxSpeedOut - 136;523 $VoipSpeedIn = 100; //$SpeedReserve;524 $VoipSpeedOut = 100; //$SpeedReserve;525 $OutInterface = 'eth1';526 $InInterface = 'ifb0';527 $InetInterface = $this->System->Config['MainRouter']['InetInterface'];528 515 529 516 $DbResult = $this->Database->select('Service', '*', '(`ChangeAction` IS NULL) AND (`Id`='.TARIFF_FREE.')'); -
trunk/Packages/Common/Page.php
r912 r970 7 7 public string $ParentClass; 8 8 public bool $RawPage; 9 public bool $BasicHTML; 9 10 public $OnSystemMessage; 10 11 public string $Load; … … 15 16 parent::__construct($System); 16 17 $this->RawPage = false; 18 $this->BasicHTML = false; 17 19 $this->OnSystemMessage = array(); 18 20 $this->Title = ""; -
trunk/Packages/Common/UTF8.php
r946 r970 33 33 class Encoding 34 34 { 35 public array $CharTable; 36 35 37 function __construct() 36 38 {
Note:
See TracChangeset
for help on using the changeset viewer.