Changeset 929 for trunk/Modules
- Timestamp:
- May 11, 2022, 12:14:42 PM (3 years ago)
- Location:
- trunk/Modules
- Files:
-
- 24 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/Chat/irc_bot.php
r888 r929 74 74 $Line = substr($Line, strlen($Commands[0])); 75 75 $Commands[1] = substr($Line, 0, strpos($Line, ':') + 1); 76 $Commands[2] = substr($Line, strlen($Commands[1])); 77 //print_r($Commands); 76 $Commands[2] = substr($Line, strlen($Commands[1])); 78 77 79 78 // Log messages to database -
trunk/Modules/Finance/Import.php
r912 r929 37 37 { 38 38 $Value = str_replace('\"', '"', $Value); 39 $Data[$Key] = str_getcsv($Value, ',', '"', "\\"); 40 //print_r($Data[$Key]); 39 $Data[$Key] = str_getcsv($Value, ',', '"', "\\"); 41 40 foreach ($Data[$Key] as $Key2 => $Value2) 42 41 { … … 59 58 11 => '', 60 59 ); 61 //print_r($Header); 62 //print_r($Data[0]); 63 //print_r($_POST['Source']); 64 //print_r($Data); 65 60 66 61 if ($Header != $Data[0]) { 67 62 $Output = 'Nekompatibilní struktura CSV'; -
trunk/Modules/Finance/Trade.php
r912 r929 23 23 'LEFT JOIN `FinanceOperationGroup` ON `FinanceOperationGroup`.`Id` = `FinanceOperation`.`Group` '. 24 24 'WHERE (Time <= "'.TimeToMysqlDateTime($EndTime).'") AND (Time >= "'.TimeToMysqlDateTime($this->StartEvidence).'") AND (Taxable = 1) AND (`FinanceOperationGroup`.`ValueSign` = 1)'); 25 //echo('SELECT SUM(Value) FROM FinanceCashFlow WHERE Time <= "'.TimeToMysqlDateTime($EndTime).'" AND Value > 0 AND Taxable = 1'.'<br />');26 25 $Row = $DbResult->fetch_array(); 27 26 $Balance['Income']['End'] = $Row[0] + 0; … … 35 34 'LEFT JOIN `FinanceOperationGroup` ON `FinanceOperationGroup`.`Id` = `FinanceOperation`.`Group` '. 36 35 'WHERE (Time <= "'.TimeToMysqlDateTime($EndTime).'") AND (Time >= "'.TimeToMysqlDateTime($this->StartEvidence).'") AND (Taxable = 1) AND (`FinanceOperationGroup`.`ValueSign` = -1)'); 37 //echo('SELECT -SUM(Value) FROM FinanceCashFlow WHERE Time <= "'.TimeToMysqlDateTime($EndTime).'" AND Value < 0 AND Taxable = 1'.'<br />');38 36 $Row = $DbResult->fetch_array(); 39 37 $Balance['Spend']['End'] = $Row[0] + 0; -
trunk/Modules/FinanceBankAPI/Fio.php
r887 r929 44 44 while ($Response[0] != '') array_shift($Response); 45 45 array_shift($Response); // Remove empty line 46 //echo(implode("\n", $Response));47 46 48 47 // Parse all GPC lines -
trunk/Modules/FinanceBankAPI/FioDemo.php
r873 r929 6 6 $Fio->Token = ''; 7 7 $Records = $Fio->Import(time() - 3600 * 24 * 31 * 2, time()); 8 //print_r($Records);9 8 10 9 echo('<!DOCTYPE html>'); -
trunk/Modules/FinanceBankAPI/ImportPS.php
r887 r929 20 20 $Value = str_replace('\"', '"', $Value); 21 21 $Data[$Key] = str_getcsv($Value, ',', '"', "\\"); 22 //print_r($Data[$Key]);22 23 23 foreach ($Data[$Key] as $Key2 => $Value2) 24 24 { -
trunk/Modules/Meals/Meals.php
r912 r929 28 28 function ShowMenu(): string 29 29 { 30 //echo('Dnes je '.HumanDate(date('Y-m-d')).'<br>');31 30 $Output = '<table align="center" class="WideTable"><tr><th>Den</th><th>Datum</th><th>Polévka</th><th>Hlavní jídlo</th></tr>'; 32 31 $DbResult = $this->Database->select('Meals', '*, UNIX_TIMESTAMP(Date)','Date >= NOW() ORDER BY Date'); … … 60 59 </head><body style="margin: 0px 0px 0px 0px;">'; // onload="print()">'); 61 60 62 //echo('Dnes je '.HumanDate(date('Y-m-d')).'<br>');63 61 $Output .= '<table height="99%" width="100%" align="center" border="0" cellspacing="0" cellpadding="3">'; 64 62 $Date = explode('-', $_GET['date']); -
trunk/Modules/NetworkConfig/Generate.php
r887 r929 15 15 $System->Database->update('NetworkConfiguration', '`Id`='.$Service['Id'], array('Changed' => 2)); 16 16 $ExecutionStart = time(); 17 //echo($Service['Caption'].'...');18 17 19 18 $ExecuteParts = explode('|', $Service['Execute']); 20 19 $Output = array(); 21 20 foreach ($ExecuteParts as $Command) 21 { 22 22 if ($Command != '') 23 23 { 24 24 exec($Command, $Output); 25 //echo($Command."\n");26 //sleep(5);27 25 } 28 //echo("Done\n");26 } 29 27 $ExecutionTime = time() - $ExecutionStart; 30 28 $System->Database->update('NetworkConfiguration', '`Id`='.$Service['Id'], array('Changed' => 0, 'LastTime' => 'NOW()', 'ExecutionTime' => $ExecutionTime)); -
trunk/Modules/NetworkConfigAirOS/Generators/Signal.php
r921 r929 22 22 if (count($Result) > 0) 23 23 { 24 //print_r($Result);25 24 $Array = json_decode(implode("\n", $Result), true); 26 //print_r($Array);27 25 echo('-'); 28 26 foreach ($Array as $Properties) -
trunk/Modules/NetworkConfigLinux/Generators/DNS.php
r915 r929 97 97 } 98 98 $File = fopen($DNS['BaseDir'].$Parts[2].'.'.$Parts[1].'.'.$Parts[0].'.in-addr.arpa.zone', 'w+'); 99 fputs($File, $Output); 100 //echo($Output); 99 fputs($File, $Output); 101 100 fclose($File); 102 101 } -
trunk/Modules/NetworkConfigLinux/Generators/Latency.php
r887 r929 28 28 $Line = substr($Line, strpos($Line, '(') + 1); 29 29 $Value = substr($Line, 0, strpos($Line, ' ')); 30 //echo($IP.' '.$Value."\n");31 30 $Queries[] = $this->Database->GetInsert('NetworkInterfaceLatency', array('Interface' => $HostInterface[$IP], 32 31 'Value' => $Value, 'Time' => TimeToMysqlDateTime($Time))); -
trunk/Modules/NetworkConfigRouterOS/Generators/FirewallFilter.php
r887 r929 86 86 } 87 87 88 //print_r($Items);89 88 $Routerboard->ListUpdate($Path, array('chain', 'dst-address', 'in-interface', 'src-address', 'out-interface', 'dst-port', 'protocol', 'action', 'comment', 'jump-target', 'src-port'), $Items); 90 91 89 } 92 90 } -
trunk/Modules/NetworkConfigRouterOS/Generators/FirewallMangle.php
r909 r929 151 151 'comment' => 'unregistred-clients'); 152 152 153 //print_r($ItemsFirewall);154 153 $Routerboard->ListUpdate($PathFirewall, array('chain', 'dst-address', 'in-interface', 'action', 'new-packet-mark', 'passthrough', 'comment', 'out-interface', 'src-address', 'jump-target'), $ItemsFirewall, array(), true); 155 154 } … … 255 254 'action' => 'add-src-to-address-list', 'address-list' => 'unregistred', 'address-list-timeout' => '1d', 256 255 'comment' => 'unregistred-clients'); 257 258 //print_r($ItemsFirewall); 256 259 257 $Routerboard->ListUpdate($PathFirewall, array('chain', 'dst-address', 'in-interface', 'action', 'new-packet-mark', 260 258 'passthrough', 'comment', 'out-interface', 'src-address', 'jump-target'), $ItemsFirewall, array(), true); -
trunk/Modules/NetworkConfigRouterOS/Generators/FirewallNAT.php
r913 r929 139 139 */ 140 140 141 //print_r($Items);142 141 $Routerboard->ListUpdate($Path, array('chain', 'dst-address', 'in-interface', 'src-address', 'out-interface', 'to-ports', 'dst-port', 'protocol', 'action', 'to-addresses', 'comment', 'jump-target', 'src-port'), $Items); 143 142 } -
trunk/Modules/NetworkConfigRouterOS/Generators/Queue.php
r926 r929 453 453 $this->UpdateMinSpeed($RootDeviceId); 454 454 455 //print_r($this->Devices);456 457 455 echo('Not linked network devices: '); 458 456 foreach ($this->Devices as $Device) … … 552 550 553 551 echo($Main->Print()); 554 //print_r($Main->GetCommands());555 552 die(); 556 553 -
trunk/Modules/NetworkConfigRouterOS/Generators/Signal.php
r921 r929 97 97 if (array_key_exists('!trap', $Array)) 98 98 { 99 //print_r($Array['!trap']);100 99 return array(); 101 100 } -
trunk/Modules/NetworkShare/SharePage.php
r912 r929 88 88 if (array_key_exists('order', $_GET) and ($_SESSION['order'] == $_GET['order'])) $_GET['order'] .= ' DESC'; 89 89 90 //print_r($_POST);91 90 foreach ($this->Promene as $Index => $Prvek) 92 91 { -
trunk/Modules/NetworkShare/browse.php
r899 r929 22 22 exec($SambaBinDir.'smbclient -d0 -N -L='.$Host,$Output); 23 23 echo("OK\n"); 24 //print_r($Output); 24 25 25 if ($Output[0]=='Connection to '.$Host.' failed') die('Pocitac '.$Host." nenalezen!\n"); 26 26 $Output = array_slice($Output,3); -
trunk/Modules/NetworkShare/online.php
r873 r929 7 7 echo('Nacitam strom sdileni...'); 8 8 $Output = array(); 9 exec('smbtree -N -S',$Output,$Return); 10 //print_r($Output); 9 exec('smbtree -N -S',$Output,$Return); 11 10 //echo($Return."\n"); 12 11 echo("OK\n\nSeznam online pocitacu:\n"); … … 59 58 } else $Section = 2; 60 59 } else $Section = 1; 61 } else $Section = 0; 62 //print_r($Output); 60 } else $Section = 0; 63 61 $Output = explode(' ',$Output[1]); 64 62 $MAC = substr($Output[4],1,-1); … … 71 69 // Deaktivuj predchozi online pocitace 72 70 $Database->update('hosts', 1, array('online' => 0)); 73 74 //print_r($Online); 71 75 72 // Aktivuj online pocitace 76 73 foreach ($Online as $Item) … … 88 85 { 89 86 echo($Row['name'].", "); 90 } 91 //print_r($Output); 87 } 92 88 // sleep(1000); 93 89 //echo("\nCekam minutu..."); -
trunk/Modules/NetworkTopology/topologie2.php
r874 r929 149 149 $Topology = new NetworkHostTopology(38); 150 150 $Topology->LoadTree(); 151 //print_r($Topology->Tree);152 151 $Topology->ProduceImage(); -
trunk/Modules/News/NewsPage.php
r912 r929 23 23 if ($DbResult->num_rows > 0) 24 24 { 25 $Row = $DbResult->fetch_a rray();25 $Row = $DbResult->fetch_assoc(); 26 26 if ($Row['Name'] == '') $Author = $Row['Author']; 27 27 else $Author = $Row['Name']; … … 33 33 $Output .= ' <a href="?action=del&category='.$Category['Id'].'&id='.$Row['Id'].'">Smazat</a>'; 34 34 $Output .= ' <a href="?action=edit&category='.$Category['Id'].'&id='.$Row['Id'].'">Upravit</a>'; 35 $Output .= '</div>'; 35 $Output .= '</div>'; 36 36 } 37 37 $Output .= '</div><div class="Content">'.ModuleNews::Cast($this->System->GetModule('News'))->ModifyContent($Row['Content']).'<br />'; … … 67 67 'Kategorie: <select name="category">'; 68 68 $DbResult = $this->Database->select('NewsCategory', '*'); 69 while ($DbRow = $DbResult->fetch_a rray())69 while ($DbRow = $DbResult->fetch_assoc()) 70 70 { 71 71 if ($User->CheckPermission('News', 'Insert', 'Group', $DbRow['Id'])) … … 155 155 { 156 156 $DbResult = $this->Database->query('SELECT * FROM `News` WHERE `Id`='.$_GET['id']); 157 $Row = $DbResult->fetch_a rray();157 $Row = $DbResult->fetch_assoc(); 158 158 if (($User->User['Id'] == $Row['User'])) 159 159 { … … 185 185 if ($DbResult->num_rows > 0) 186 186 { 187 $Row = $DbResult->fetch_a rray();187 $Row = $DbResult->fetch_assoc(); 188 188 if ($User->User['Id'] == $Row['User']) 189 189 { … … 206 206 { 207 207 $DbResult = $this->Database->query('SELECT * FROM `News` WHERE `Id`='.$_GET['id']); 208 $Row = $DbResult->fetch_a rray();208 $Row = $DbResult->fetch_assoc(); 209 209 if ($User->User['Id'] == $Row['User']) 210 210 { … … 244 244 $DbResult = $this->Database->query('SELECT `News`.*, `User`.`Name` FROM `News` '. 245 245 'LEFT JOIN `User` ON `User`.`Id`=`News`.`User` WHERE `Category`='.$Category['Id'].' ORDER BY `News`.`Id` DESC LIMIT '.($Page * $PerPage).','.$PerPage); 246 while ($Row = $DbResult->fetch_a rray())246 while ($Row = $DbResult->fetch_assoc()) 247 247 { 248 248 if ($Row['Name'] == '') $Author = $Row['Author']; … … 353 353 $Output .= '<form action="?build=1" method="post">'; 354 354 $DbResult = $this->Database->select('NewsCategory', '*', '1 ORDER BY `Caption`'); 355 while ($Category = $DbResult->fetch_a rray())355 while ($Category = $DbResult->fetch_assoc()) 356 356 { 357 357 $Output .= '<input type="checkbox" name="category'.$Category['Id'].'" />'.$Category['Caption'].'<br />'; … … 403 403 $Categories = array(); 404 404 $DbResult = $this->Database->select('NewsCategory', '*'); 405 while ($Category = $DbResult->fetch_a rray())405 while ($Category = $DbResult->fetch_assoc()) 406 406 { 407 407 $Categories[$Category['Id']] = $Category['Caption']; -
trunk/Modules/TimeMeasure/Graph.php
r912 r929 70 70 $Points = $Measure->GetValues($StartTime, $EndTime, $Level); 71 71 72 if ($Debug) echo('Points count: '.count($Points).'<br/>'); 73 //if ($Debug) foreach ($Points as $Index => $Item) 74 // echo($Index.': '.$Item['min'].'<br>'); 72 if ($Debug) echo('Points count: '.count($Points).'<br/>'); 75 73 76 74 // Calculate total max, avg, min value -
trunk/Modules/TimeMeasure/Main.php
r912 r929 58 58 59 59 $TimeParts = getdate($_SESSION[$Time]); 60 //print_r($TimeParts);61 60 62 61 // Day selection … … 253 252 $Output .= '</table>'; 254 253 $Output .= $PageList['Output']; 255 //echo(time()); 256 //print_r(gd_info()); 257 //print_r($_SESSION); 258 254 259 255 //ShowPage($Output); 260 256 //echo($PrefixMultiplier->Add('-0.000000071112345', 'B')); -
trunk/Modules/TimeMeasure/Measurement/System.php
r874 r929 17 17 } else 18 18 { 19 //echo($ERROR_NO.','.$ERROR_STR);20 19 return FALSE; 21 20 } … … 87 86 { 88 87 $NetworkStateFile = '/tmp/LastNetworkState'; 89 $LastNetworkState = unserializ a(file_get_contents($NetworkStateFile));88 $LastNetworkState = unserialize(file_get_contents($NetworkStateFile)); 90 89 $NetworkState = array('Time' => time()); 91 90 $Output = array();
Note:
See TracChangeset
for help on using the changeset viewer.