Changeset 888 for trunk/Modules
- Timestamp:
- Nov 24, 2020, 10:58:56 AM (4 years ago)
- Location:
- trunk/Modules
- Files:
-
- 23 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/Chat/irc_bot.php
r887 r888 5 5 class IRCBot 6 6 { 7 var$OwnerName = 'Chronosův';8 var$Server = "game.zdechov.net";9 var$Port = 6667;10 var$Channel = "#zdechov";11 var$Nick = "History";12 var$JokeFileName = "jokes.txt";13 var$File;7 public string $OwnerName = 'Chronosův'; 8 public string $Server = "game.zdechov.net"; 9 public int $Port = 6667; 10 public string $Channel = "#zdechov"; 11 public string $Nick = "History"; 12 public string $JokeFileName = "jokes.txt"; 13 public $File; 14 14 15 15 function __construct() -
trunk/Modules/EmailQueue/EmailQueue.php
r887 r888 78 78 } 79 79 80 function AddItem( $To, $Subject, $Content, $From, $AttachmentFileId = '')80 function AddItem(string $To, string $Subject, string $Content, string $From, string $AttachmentFileId = ''): void 81 81 { 82 82 $Values = array('To' => $To, -
trunk/Modules/Finance/Bill.php
r887 r888 6 6 public bool $Checked = false; 7 7 8 function GenerateHTML() 8 function GenerateHTML(): string 9 9 { 10 10 return ''; 11 11 } 12 12 13 function SaveToFile(string $FileName) 13 function SaveToFile(string $FileName): void 14 14 { 15 15 $PdfData = $this->HtmlToPdf($this->GenerateHTML()); -
trunk/Modules/Finance/Finance.php
r887 r888 22 22 class Finance extends Model 23 23 { 24 var$kWh;25 var$Internet;26 var$Sprava;27 var$DatumOdecteni;28 var$InternetUsers;29 var$SpravaUsers;30 var$MaxSpeed;31 var$RealMaxSpeed;32 var$SpeedReserve;33 var$BaseSpeedElement;34 var$BaseTariffPrice;35 var$TopTariffPrice;36 var$TotalPaid;37 var$TotalInternetPaid;38 var$MainSubject;39 var$BillingPeriods;40 var$DirectoryId;41 var$Rounding;24 public string $kWh; 25 public string $Internet; 26 public string $Sprava; 27 public string $DatumOdecteni; 28 public string $InternetUsers; 29 public string $SpravaUsers; 30 public string $MaxSpeed; 31 public string $RealMaxSpeed; 32 public string $SpeedReserve; 33 public string $BaseSpeedElement; 34 public string $BaseTariffPrice; 35 public string $TopTariffPrice; 36 public string $TotalPaid; 37 public string $TotalInternetPaid; 38 public string $MainSubject; 39 public array $BillingPeriods; 40 public string $DirectoryId; 41 public string $Rounding; 42 42 43 43 function LoadMonthParameters(int $Period = 1) // 0 - now, 1 - next month … … 83 83 } 84 84 85 function CreateFinanceYear( $Year)85 function CreateFinanceYear(int $Year) 86 86 { 87 87 $StartTime = mktime(0, 0, 0, 1, 1, $Year); … … 100 100 } 101 101 102 function GetFinanceYear(int $Year) 102 function GetFinanceYear(int $Year): array 103 103 { 104 104 if ($Year == 0) … … 121 121 } 122 122 123 function GetNextDocumentLineNumber(string $Id, int $FinanceYear = 0) 123 function GetNextDocumentLineNumber(string $Id, int $FinanceYear = 0): string 124 124 { 125 125 $FinanceYear = $this->GetFinanceYear($FinanceYear); -
trunk/Modules/Finance/Import.php
r887 r888 128 128 } 129 129 130 function InsertMoney(string $Subject, string $Value, string $Cash, string $Taxable, string $Time, string $Text, array $Group) 130 function InsertMoney(string $Subject, string $Value, string $Cash, string $Taxable, string $Time, string $Text, array $Group): void 131 131 { 132 132 $Year = date('Y', $Time); -
trunk/Modules/Finance/Trade.php
r887 r888 3 3 class PageFinanceTaxFiling extends Page 4 4 { 5 var$StartEvidence = 0;5 public int $StartEvidence = 0; 6 6 7 7 function __construct(System $System) … … 13 13 } 14 14 15 function GetTimePeriodBalance( $StartTime, $EndTime)15 function GetTimePeriodBalance(int $StartTime, int $EndTime): array 16 16 { 17 17 $Balance = array(); … … 73 73 } 74 74 75 function ShowAnnualBalance() 75 function ShowAnnualBalance(): string 76 76 { 77 77 $Output = '<table style="font-size: smaller;" class="WideTable">'; … … 109 109 } 110 110 111 function ShowMonthlyBalance() 111 function ShowMonthlyBalance(): string 112 112 { 113 113 $Output = '<table class="WideTable" style="font-size: smaller;">'; … … 151 151 } 152 152 153 function ShowIncomes() 153 function ShowIncomes(): string 154 154 { 155 155 $Table = array('Ne', 'Ano'); … … 190 190 } 191 191 192 function ShowExpenses() 192 function ShowExpenses(): string 193 193 { 194 194 $Table = array('Ne', 'Ano'); … … 231 231 } 232 232 233 function ShowClaims() 233 function ShowClaims(): string 234 234 { 235 235 $Table = array('Ne', 'Ano'); … … 262 262 } 263 263 264 function ShowLiabilities() 264 function ShowLiabilities(): string 265 265 { 266 266 $Table = array('Ne', 'Ano'); … … 294 294 } 295 295 296 function ShowSubjectList() 296 function ShowSubjectList(): string 297 297 { 298 298 $Output = '<strong>Seznam subjektů</strong>'; … … 327 327 } 328 328 329 function ShowSmallAssets() 329 function ShowSmallAssets(): string 330 330 { 331 331 $Output = '<strong>Drobný majetek</strong>'; … … 343 343 } 344 344 345 function ShowSubjectAccount() 345 function ShowSubjectAccount(): string 346 346 { 347 347 $Finance = &ModuleFinance::Cast($this->System->GetModule('Finance'))->Finance; … … 408 408 } 409 409 410 function ShowDefault() 410 function ShowDefault(): string 411 411 { 412 412 $Output = '<strong>Celkové přehledy</strong><br/>'; … … 486 486 } 487 487 488 function ShowFinanceYears() 488 function ShowFinanceYears(): string 489 489 { 490 490 $Output = 'Roky: '; … … 499 499 { 500 500 $TimeDue = $Time + 15 * 24 * 3600; // 15 dnů 501 502 501 } 503 502 -
trunk/Modules/Finance/UserState.php
r887 r888 11 11 } 12 12 13 function ShowFinanceOperation( $Subject)13 function ShowFinanceOperation(int $Subject): string 14 14 { 15 15 $UserOperationTableQuery = '((SELECT `Text`, `Time`, `Value`, `File`, `BillCode`, NULL AS `PeriodFrom`, NULL AS `PeriodTo`, `DocumentLineCode`.`Name` AS `BillName` '. -
trunk/Modules/FinanceBankAPI/FioAPI.php
r887 r888 5 5 include('GPC.php'); 6 6 7 function RemoveComma( $Text)7 function RemoveComma(string $Text): string 8 8 { 9 9 if ((mb_strlen($Text) >= 2) and ($Text[0] == '"') and (mb_substr($Text, -1, 1) == '"')) return mb_substr($Text, 1, -1); … … 13 13 class FioAPI 14 14 { 15 var$Token;16 var$Encoding;17 var$Format;15 public string $Token; 16 public string $Encoding; 17 public string $Format; 18 18 19 19 function __construct() -
trunk/Modules/IS/IS.php
r887 r888 845 845 class ModuleIS extends AppModule 846 846 { 847 var$DashboardItems;847 public array $DashboardItems; 848 848 849 849 function __construct(System $System) -
trunk/Modules/Log/Log.php
r887 r888 67 67 $Count = 100; 68 68 69 $Output = '';70 69 $Items = array(); 71 70 if (array_key_exists('type', $_GET)) $Where = ' WHERE `Type` = "'.($_GET['type'] * 1).'"'; -
trunk/Modules/Map/MapAPI.php
r887 r888 18 18 public int $Zoom; 19 19 public string $Key; 20 var$OnClickObject;20 public $OnClickObject; 21 21 public string $MarkerText; 22 22 public array $Markers; -
trunk/Modules/Meals/Meals.php
r887 r888 3 3 class PageEatingPlace extends Page 4 4 { 5 var$DayNames = array('Neděle', 'Pondělí', 'Úterý', 'Středa', 'Čtvrtek', 'Pátek', 'Sobota');6 var$DayNamesShort = array('NE', 'PO', 'ÚT', 'ST', 'ČT', 'PÁ', 'SO');7 var$Status = array('Nezveřejněno', 'Otevřeno', 'Zavřeno - svátek', 'Zavřeno - dovolená');8 var$DayCount = 20; // počet dopředu zobrazených dnů5 public array $DayNames = array('Neděle', 'Pondělí', 'Úterý', 'Středa', 'Čtvrtek', 'Pátek', 'Sobota'); 6 public array $DayNamesShort = array('NE', 'PO', 'ÚT', 'ST', 'ČT', 'PÁ', 'SO'); 7 public array $Status = array('Nezveřejněno', 'Otevřeno', 'Zavřeno - svátek', 'Zavřeno - dovolená'); 8 public int $DayCount = 20; // počet dopředu zobrazených dnů 9 9 10 10 function __construct(System $System) -
trunk/Modules/Meteostation/Meteostation.php
r887 r888 21 21 class MeteoStation extends Model 22 22 { 23 var$Id;24 var$Name;25 var$Period;26 var$URL;23 public int $Id; 24 public string $Name; 25 public int $Period; 26 public string $URL; 27 27 28 28 function DownloadData(): void … … 54 54 } 55 55 56 function CreateImage( $FileName): void56 function CreateImage(string $FileName): void 57 57 { 58 58 $Image = new Image(); … … 79 79 class ModuleMeteoStation extends AppModule 80 80 { 81 var $Data;82 83 81 function __construct(System $System) 84 82 { -
trunk/Modules/NetworkConfig/NetworkConfig.php
r887 r888 3 3 class ModuleNetworkConfig extends AppModule 4 4 { 5 var$ConfigItems;5 public array $ConfigItems; 6 6 7 7 function __construct(System $System) -
trunk/Modules/NetworkConfigAirOS/Generators/SSHClient.php
r874 r888 3 3 class SSHClient 4 4 { 5 var$SSHPath;6 var$Timeout;7 var$HostName;8 var$UserName;9 var$Password;10 var$PrivateKey;11 var$Debug;5 public string $SSHPath; 6 public int $Timeout; 7 public string $HostName; 8 public string $UserName; 9 public string $Password; 10 public string $PrivateKey; 11 public bool $Debug; 12 12 13 13 function __construct($HostName = 'localhost', $UserName = 'admin', $Password = '') … … 22 22 } 23 23 24 function Execute( $Commands)24 function Execute(string $Commands): array 25 25 { 26 26 $Commands = trim($Commands); … … 37 37 $Output = array(); 38 38 exec($Command, $Output); 39 } else $Output = '';39 } else $Output = array(); 40 40 if ($this->Debug) print_r($Output); 41 41 return $Output; -
trunk/Modules/NetworkConfigRouterOS/Routerboard.php
r887 r888 3 3 class Routerboard 4 4 { 5 var$SSHPath = '/usr/bin/ssh';6 var$Timeout = 3;7 var$HostName;8 var$UserName;9 var$Password;10 var$PrivateKey = '~/.ssh/id_rsa';11 var$MaxBurstLineCount = 100;12 var$Debug = false;5 public string $SSHPath = '/usr/bin/ssh'; 6 public int $Timeout = 3; 7 public string $HostName; 8 public string $UserName; 9 public string $Password; 10 public string $PrivateKey = '~/.ssh/id_rsa'; 11 public int $MaxBurstLineCount = 100; 12 public bool $Debug = false; 13 13 14 14 function __construct($HostName = 'localhost', $UserName = 'admin', $Password = '') … … 19 19 } 20 20 21 function Execute( array$Commands): array21 function Execute($Commands): array 22 22 { 23 23 $Output = array(); … … 75 75 if (count($ResultLineParts) > 1) 76 76 { 77 if ($ResultLineParts[1] {0}== '"') $ResultLineParts[1] = substr($ResultLineParts[1], 1, -1); // Remove quotes77 if ($ResultLineParts[1][0] == '"') $ResultLineParts[1] = substr($ResultLineParts[1], 1, -1); // Remove quotes 78 78 $List[substr($ResultLineParts[0], 0, -1)] = $ResultLineParts[1]; 79 79 } else $List[substr($ResultLineParts[0], 0, -1)] = ''; … … 116 116 } 117 117 118 function ListGetPrint( $Path, $Properties,$Conditions = array()): array118 function ListGetPrint(array $Path, array $Properties, array $Conditions = array()): array 119 119 { 120 120 $ConditionList = ''; -
trunk/Modules/NetworkConfigRouterOS/Routerboard2.php
r887 r888 5 5 class Routerboard extends SSH 6 6 { 7 var$Methods = array(7 public array $Methods = array( 8 8 'kex' => 'diffie-hellman-group1-sha1', 9 9 'client_to_server' => array('crypt' => '3des-cbc', 'comp' => 'none'), … … 11 11 ); 12 12 13 function Execute( $Commands): array13 function Execute(array $Commands): array 14 14 { 15 15 if (is_array($Commands)) $Commands = implode(';', $Commands); -
trunk/Modules/NetworkConfigRouterOS/RouterboardAPI.php
r887 r888 3 3 class RouterosAPI 4 4 { 5 var$ErrorNo; // Variable for storing connection error number, if any6 var$ErrorStr; // Variable for storing connection error text, if any7 var$Attempts; // Connection attempt count8 var$Connected; // Connection state9 var$Delay; // Delay between connection attempts in seconds10 var$Port; // Port to connect to11 var$Timeout; // Connection attempt timeout and data read timeout12 var$Socket; // Variable for storing socket resource13 var$Debug;14 var$SSL; // If SSL API connection is used. You need also change port to 87295 public int $ErrorNo; // Variable for storing connection error number, if any 6 public string $ErrorStr; // Variable for storing connection error text, if any 7 public int $Attempts; // Connection attempt count 8 public bool $Connected; // Connection state 9 public int $Delay; // Delay between connection attempts in seconds 10 public int $Port; // Port to connect to 11 public int $Timeout; // Connection attempt timeout and data read timeout 12 public int $Socket; // Variable for storing socket resource 13 public bool $Debug; 14 public bool $SSL; // If SSL API connection is used. You need also change port to 8729 15 15 16 16 function __construct() -
trunk/Modules/NetworkConfigRouterOS/SSH.php
r874 r888 3 3 class SSH 4 4 { 5 var$HostName;6 var$UserName;7 var$Password;8 var$Methods;5 public string $HostName; 6 public string $UserName; 7 public string $Password; 8 public array $Methods; 9 9 10 10 function __construct($HostName = 'localhost', $UserName = 'admin', $Password = '') … … 13 13 $this->UserName = $UserName; 14 14 $this->Password = $Password; 15 $this->Methods = array(); 15 16 } 16 17 17 function Execute( $Commands)18 function Execute(array $Commands): array 18 19 { 19 20 echo($Commands); -
trunk/Modules/NetworkShare/SharePage.php
r887 r888 3 3 class SharePage extends Page 4 4 { 5 var$Dependencies = array('Log');6 var$MaxNesting = 20; // Maximální vnoření7 var$Promene = array( // Automatické zapamatování proměnných5 public array $Dependencies = array('Log'); 6 public int $MaxNesting = 20; // Maximální vnoření 7 public array $Promene = array( // Automatické zapamatování proměnných 8 8 'keyword' => '', 9 9 'file_type' => 0, … … 25 25 } 26 26 27 function ShowTime() 27 function ShowTime(): string 28 28 { 29 29 return date("H:i:s")."<br />\n"; … … 40 40 41 41 // Najde cestu ke keřenu 42 function PlnaCesta($Row) 42 function PlnaCesta($Row): string 43 43 { 44 44 // Vyhledání cesty … … 60 60 61 61 // Převede velikost v bajtech na odpovídající jednotky 62 function PrevedVelikost($Velikost) 62 function PrevedVelikost($Velikost): string 63 63 { 64 64 $Jednotky = array('B','kB','MB','GB','TB','PB','EB'); -
trunk/Modules/NetworkTopology/NetworkTopology.php
r887 r888 3 3 class PageNetworkTopology extends Page 4 4 { 5 var$TopHostName = 'NIX-ROUTER';5 public string $TopHostName = 'NIX-ROUTER'; 6 6 7 7 function __construct(System $System) … … 23 23 } 24 24 25 function ShowImage() 25 function ShowImage(): string 26 26 { 27 27 $this->SimplePage = true; … … 117 117 } 118 118 119 function ShowOverview() 119 function ShowOverview(): string 120 120 { 121 121 $Output = '<img src="topologie.png"><br/> -
trunk/Modules/TimeMeasure/Graph.php
r887 r888 3 3 class PageGraph extends Page 4 4 { 5 var$FontSize;6 var$FontFileName;7 var$ValueToImageHeigthCoefficient;8 var$DefaultWidth;9 var$DefaultHeight;5 public int $FontSize; 6 public string $FontFileName; 7 public float $ValueToImageHeigthCoefficient; 8 public int $DefaultWidth; 9 public int $DefaultHeight; 10 10 11 11 function __construct(System $System) -
trunk/Modules/TimeMeasure/Measure.php
r874 r888 3 3 class Measure extends Model 4 4 { 5 var$Data;6 var$LevelReducing = 5;7 var$ReferenceTime = 0;8 var$MaxLevel = 4;9 var$Differential = 0;10 var$Debug = 0;11 var$DivisionCount = 500;12 var$ValueTypes = array('Min', 'Avg', 'Max');13 14 function Load( $Id)5 public array $Data; 6 public int $LevelReducing = 5; 7 public int $ReferenceTime = 0; 8 public int $MaxLevel = 4; 9 public int $Differential = 0; 10 public int $Debug = 0; 11 public int $DivisionCount = 500; 12 public array $ValueTypes = array('Min', 'Avg', 'Max'); 13 14 function Load(int $Id): void 15 15 { 16 16 $Result = $this->Database->select('Measure', '*', 'Id='.$Id); … … 28 28 } 29 29 30 function StatTableName( $Level)30 function StatTableName(int $Level): string 31 31 { 32 32 if ($Level == 0) return 'Data'; … … 419 419 // Load measures 420 420 $Measures = array(); 421 $Result = $ Database->select('Measure', '*');421 $Result = $this->Database->select('Measure', '*'); 422 422 while ($Row = $Result->fetch_assoc()) 423 423 { 424 $Measure s = new Measure();424 $Measure = new Measure($this->System); 425 425 $Measure->Load($Row['Id']); 426 426 }
Note:
See TracChangeset
for help on using the changeset viewer.