Changeset 929


Ignore:
Timestamp:
May 11, 2022, 12:14:42 PM (2 years ago)
Author:
chronos
Message:
  • Modified: Removed commended out print_r and echo commands used only for debugging.
Location:
trunk
Files:
31 edited

Legend:

Unmodified
Added
Removed
  • trunk/Application/BaseView.php

    r928 r929  
    164164        {
    165165          if (strpos($line, ' ')) $cmd = substr($line, 1, strpos($line, ' ') - 1);
    166           else $cmd = substr($line, 1, strlen($line) - 2);
    167           //echo('['.$cmd.']');
     166          else $cmd = substr($line, 1, strlen($line) - 2);         
    168167          if (strpos($s, '</'.$cmd.'>')) $n = $n + 2;
    169168        }
    170       }// else $line = '['.$line.']';
    171       //if ($line != '') echo(htmlspecialchars(str_repeat(' ',$nn).$line."\n"));
     169      }
    172170      if ($line != '') $out .= (str_repeat(' ', $nn).$line."\n");
    173171      $s = substr($s, $end + 1, strlen($s));
  • trunk/Common/Form/Types/MacAddress.php

    r887 r929  
    2424
    2525  function OnLoad(array $Item): ?string
    26   {
    27     //echo($Item['Name'].'='.$_POST[$Item['Name']].','.is_null(NULL).'<br>');
     26  {   
    2827    return strtoupper($_POST[$Item['Name']]);
    2928  }
  • trunk/Common/VCL/General.php

    r887 r929  
    33function ReadSessionVar(string $Name, bool $Persistent = true): string
    44{
    5   //echo($Name.',');
    65  $Result = '';
    76  if ($Persistent)
  • trunk/Modules/Chat/irc_bot.php

    r888 r929  
    7474      $Line = substr($Line, strlen($Commands[0]));
    7575      $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]));     
    7877
    7978      // Log messages to database
  • trunk/Modules/Finance/Import.php

    r912 r929  
    3737    {
    3838      $Value = str_replace('\"', '"', $Value);
    39       $Data[$Key] = str_getcsv($Value, ',', '"', "\\");
    40       //print_r($Data[$Key]);
     39      $Data[$Key] = str_getcsv($Value, ',', '"', "\\");     
    4140      foreach ($Data[$Key] as $Key2 => $Value2)
    4241      {
     
    5958      11 => '',
    6059    );
    61     //print_r($Header);
    62     //print_r($Data[0]);
    63     //print_r($_POST['Source']);
    64     //print_r($Data);
    65 
     60   
    6661    if ($Header != $Data[0]) {
    6762      $Output = 'Nekompatibilní struktura CSV';
  • trunk/Modules/Finance/Trade.php

    r912 r929  
    2323      'LEFT JOIN `FinanceOperationGroup` ON `FinanceOperationGroup`.`Id` = `FinanceOperation`.`Group` '.
    2424      '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 />');
    2625    $Row = $DbResult->fetch_array();
    2726    $Balance['Income']['End'] = $Row[0] + 0;
     
    3534      'LEFT JOIN `FinanceOperationGroup` ON `FinanceOperationGroup`.`Id` = `FinanceOperation`.`Group` '.
    3635      '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 />');
    3836    $Row = $DbResult->fetch_array();
    3937    $Balance['Spend']['End'] = $Row[0] + 0;
  • trunk/Modules/FinanceBankAPI/Fio.php

    r887 r929  
    4444      while ($Response[0] != '') array_shift($Response);
    4545      array_shift($Response); // Remove empty line
    46       //echo(implode("\n", $Response));
    4746
    4847      // Parse all GPC lines
  • trunk/Modules/FinanceBankAPI/FioDemo.php

    r873 r929  
    66$Fio->Token = '';
    77$Records = $Fio->Import(time() - 3600 * 24 * 31 * 2, time());
    8 //print_r($Records);
    98
    109echo('<!DOCTYPE html>');
  • trunk/Modules/FinanceBankAPI/ImportPS.php

    r887 r929  
    2020      $Value = str_replace('\"', '"', $Value);
    2121      $Data[$Key] = str_getcsv($Value, ',', '"', "\\");
    22       //print_r($Data[$Key]);
     22     
    2323      foreach ($Data[$Key] as $Key2 => $Value2)
    2424      {
  • trunk/Modules/Meals/Meals.php

    r912 r929  
    2828  function ShowMenu(): string
    2929  {
    30     //echo('Dnes je '.HumanDate(date('Y-m-d')).'<br>');
    3130    $Output = '<table align="center" class="WideTable"><tr><th>Den</th><th>Datum</th><th>Polévka</th><th>Hlavní jídlo</th></tr>';
    3231    $DbResult = $this->Database->select('Meals', '*, UNIX_TIMESTAMP(Date)','Date >= NOW() ORDER BY Date');
     
    6059</head><body style="margin: 0px 0px 0px 0px;">'; // onload="print()">');
    6160
    62     //echo('Dnes je '.HumanDate(date('Y-m-d')).'<br>');
    6361    $Output .= '<table height="99%" width="100%" align="center" border="0" cellspacing="0" cellpadding="3">';
    6462    $Date = explode('-', $_GET['date']);
  • trunk/Modules/NetworkConfig/Generate.php

    r887 r929  
    1515    $System->Database->update('NetworkConfiguration', '`Id`='.$Service['Id'], array('Changed' => 2));
    1616    $ExecutionStart = time();
    17     //echo($Service['Caption'].'...');
    1817
    1918    $ExecuteParts = explode('|', $Service['Execute']);
    2019    $Output = array();
    2120    foreach ($ExecuteParts as $Command)
     21    {
    2222      if ($Command != '')
    2323      {
    2424        exec($Command, $Output);
    25         //echo($Command."\n");
    26         //sleep(5);
    2725      }
    28     //echo("Done\n");
     26    }
    2927    $ExecutionTime = time() - $ExecutionStart;
    3028    $System->Database->update('NetworkConfiguration', '`Id`='.$Service['Id'], array('Changed' => 0, 'LastTime' => 'NOW()', 'ExecutionTime' => $ExecutionTime));
  • trunk/Modules/NetworkConfigAirOS/Generators/Signal.php

    r921 r929  
    2222      if (count($Result) > 0)
    2323      {
    24         //print_r($Result);
    2524        $Array = json_decode(implode("\n", $Result), true);
    26         //print_r($Array);
    2725        echo('-');
    2826        foreach ($Array as $Properties)
  • trunk/Modules/NetworkConfigLinux/Generators/DNS.php

    r915 r929  
    9797        }
    9898      $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);     
    101100      fclose($File);
    102101    }
  • trunk/Modules/NetworkConfigLinux/Generators/Latency.php

    r887 r929  
    2828      $Line = substr($Line, strpos($Line, '(') + 1);
    2929      $Value = substr($Line, 0, strpos($Line, ' '));
    30       //echo($IP.' '.$Value."\n");
    3130      $Queries[] = $this->Database->GetInsert('NetworkInterfaceLatency', array('Interface' => $HostInterface[$IP],
    3231        'Value' => $Value, 'Time' => TimeToMysqlDateTime($Time)));
  • trunk/Modules/NetworkConfigRouterOS/Generators/FirewallFilter.php

    r887 r929  
    8686    }
    8787
    88     //print_r($Items);
    8988    $Routerboard->ListUpdate($Path, array('chain', 'dst-address', 'in-interface', 'src-address', 'out-interface', 'dst-port', 'protocol', 'action', 'comment', 'jump-target', 'src-port'), $Items);
    90 
    9189  }
    9290}
  • trunk/Modules/NetworkConfigRouterOS/Generators/FirewallMangle.php

    r909 r929  
    151151        'comment' => 'unregistred-clients');
    152152
    153     //print_r($ItemsFirewall);
    154153    $Routerboard->ListUpdate($PathFirewall, array('chain', 'dst-address', 'in-interface', 'action', 'new-packet-mark', 'passthrough', 'comment', 'out-interface', 'src-address', 'jump-target'), $ItemsFirewall, array(), true);
    155154  }
     
    255254        'action' => 'add-src-to-address-list', 'address-list' => 'unregistred', 'address-list-timeout' => '1d',
    256255        'comment' => 'unregistred-clients');
    257 
    258     //print_r($ItemsFirewall);
     256   
    259257    $Routerboard->ListUpdate($PathFirewall, array('chain', 'dst-address', 'in-interface', 'action', 'new-packet-mark',
    260258      'passthrough', 'comment', 'out-interface', 'src-address', 'jump-target'), $ItemsFirewall, array(), true);
  • trunk/Modules/NetworkConfigRouterOS/Generators/FirewallNAT.php

    r913 r929  
    139139    */
    140140
    141     //print_r($Items);
    142141    $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);
    143142  }
  • trunk/Modules/NetworkConfigRouterOS/Generators/Queue.php

    r926 r929  
    453453    $this->UpdateMinSpeed($RootDeviceId);
    454454
    455     //print_r($this->Devices);
    456 
    457455    echo('Not linked network devices: ');
    458456    foreach ($this->Devices as $Device)
     
    552550
    553551    echo($Main->Print());
    554     //print_r($Main->GetCommands());
    555552    die();
    556553
  • trunk/Modules/NetworkConfigRouterOS/Generators/Signal.php

    r921 r929  
    9797    if (array_key_exists('!trap', $Array))
    9898    {
    99       //print_r($Array['!trap']);
    10099      return array();
    101100    }   
  • trunk/Modules/NetworkShare/SharePage.php

    r912 r929  
    8888    if (array_key_exists('order', $_GET) and ($_SESSION['order'] == $_GET['order'])) $_GET['order'] .= ' DESC';
    8989
    90     //print_r($_POST);
    9190    foreach ($this->Promene as $Index => $Prvek)
    9291    {
  • trunk/Modules/NetworkShare/browse.php

    r899 r929  
    2222exec($SambaBinDir.'smbclient -d0 -N -L='.$Host,$Output);
    2323echo("OK\n");
    24 //print_r($Output);
     24
    2525if ($Output[0]=='Connection to '.$Host.' failed') die('Pocitac '.$Host." nenalezen!\n");
    2626$Output = array_slice($Output,3);
  • trunk/Modules/NetworkShare/online.php

    r873 r929  
    77  echo('Nacitam strom sdileni...');
    88  $Output = array();
    9   exec('smbtree -N -S',$Output,$Return);
    10   //print_r($Output);
     9  exec('smbtree -N -S',$Output,$Return); 
    1110  //echo($Return."\n");
    1211  echo("OK\n\nSeznam online pocitacu:\n");
     
    5958          } else $Section = 2;
    6059        } else $Section = 1;
    61       } else $Section = 0;
    62       //print_r($Output);
     60      } else $Section = 0;     
    6361      $Output = explode(' ',$Output[1]);
    6462      $MAC = substr($Output[4],1,-1);
     
    7169  // Deaktivuj predchozi online pocitace
    7270  $Database->update('hosts', 1, array('online' => 0));
    73 
    74   //print_r($Online);
     71 
    7572  // Aktivuj online pocitace
    7673  foreach ($Online as $Item)
     
    8885  {
    8986    echo($Row['name'].", ");
    90   }
    91   //print_r($Output);
     87  } 
    9288//  sleep(1000);
    9389  //echo("\nCekam minutu...");
  • trunk/Modules/NetworkTopology/topologie2.php

    r874 r929  
    149149$Topology = new NetworkHostTopology(38);
    150150$Topology->LoadTree();
    151 //print_r($Topology->Tree);
    152151$Topology->ProduceImage();
  • trunk/Modules/News/NewsPage.php

    r912 r929  
    2323      if ($DbResult->num_rows > 0)
    2424      {
    25         $Row = $DbResult->fetch_array();
     25        $Row = $DbResult->fetch_assoc();
    2626        if ($Row['Name'] == '') $Author = $Row['Author'];
    2727          else $Author = $Row['Name'];
     
    3333          $Output .= '&nbsp;<a href="?action=del&amp;category='.$Category['Id'].'&amp;id='.$Row['Id'].'">Smazat</a>';
    3434          $Output .= '&nbsp;<a href="?action=edit&amp;category='.$Category['Id'].'&amp;id='.$Row['Id'].'">Upravit</a>';
    35           $Output .= '</div>';
     35          $Output .= '</div>';         
    3636        }
    3737        $Output .= '</div><div class="Content">'.ModuleNews::Cast($this->System->GetModule('News'))->ModifyContent($Row['Content']).'<br />';
     
    6767        'Kategorie: <select name="category">';
    6868      $DbResult = $this->Database->select('NewsCategory', '*');
    69       while ($DbRow = $DbResult->fetch_array())
     69      while ($DbRow = $DbResult->fetch_assoc())
    7070      {
    7171        if ($User->CheckPermission('News', 'Insert', 'Group', $DbRow['Id']))
     
    155155    {
    156156      $DbResult = $this->Database->query('SELECT * FROM `News` WHERE `Id`='.$_GET['id']);
    157       $Row = $DbResult->fetch_array();
     157      $Row = $DbResult->fetch_assoc();
    158158      if (($User->User['Id'] == $Row['User']))
    159159      {
     
    185185      if ($DbResult->num_rows > 0)
    186186      {
    187         $Row = $DbResult->fetch_array();
     187        $Row = $DbResult->fetch_assoc();
    188188        if ($User->User['Id'] == $Row['User'])
    189189        {
     
    206206    {
    207207      $DbResult = $this->Database->query('SELECT * FROM `News` WHERE `Id`='.$_GET['id']);
    208       $Row = $DbResult->fetch_array();
     208      $Row = $DbResult->fetch_assoc();
    209209      if ($User->User['Id'] == $Row['User'])
    210210      {
     
    244244      $DbResult = $this->Database->query('SELECT `News`.*, `User`.`Name` FROM `News` '.
    245245        '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_array())
     246      while ($Row = $DbResult->fetch_assoc())
    247247      {
    248248        if ($Row['Name'] == '') $Author = $Row['Author'];
     
    353353      $Output .= '<form action="?build=1" method="post">';
    354354      $DbResult = $this->Database->select('NewsCategory', '*', '1 ORDER BY `Caption`');
    355       while ($Category = $DbResult->fetch_array())
     355      while ($Category = $DbResult->fetch_assoc())
    356356      {
    357357        $Output .= '<input type="checkbox" name="category'.$Category['Id'].'" />'.$Category['Caption'].'<br />';
     
    403403    $Categories = array();
    404404    $DbResult = $this->Database->select('NewsCategory', '*');
    405     while ($Category = $DbResult->fetch_array())
     405    while ($Category = $DbResult->fetch_assoc())
    406406    {
    407407      $Categories[$Category['Id']] = $Category['Caption'];
  • trunk/Modules/TimeMeasure/Graph.php

    r912 r929  
    7070    $Points = $Measure->GetValues($StartTime, $EndTime, $Level);
    7171
    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/>');   
    7573
    7674    // Calculate total max, avg, min value
  • trunk/Modules/TimeMeasure/Main.php

    r912 r929  
    5858
    5959    $TimeParts = getdate($_SESSION[$Time]);
    60     //print_r($TimeParts);
    6160
    6261    // Day selection
     
    253252    $Output .= '</table>';
    254253    $Output .= $PageList['Output'];
    255     //echo(time());
    256     //print_r(gd_info());
    257     //print_r($_SESSION);
    258 
     254   
    259255    //ShowPage($Output);
    260256    //echo($PrefixMultiplier->Add('-0.000000071112345', 'B'));
  • trunk/Modules/TimeMeasure/Measurement/System.php

    r874 r929  
    1717    } else
    1818    {
    19       //echo($ERROR_NO.','.$ERROR_STR);
    2019      return FALSE;
    2120    }
     
    8786  {
    8887    $NetworkStateFile = '/tmp/LastNetworkState';
    89     $LastNetworkState = unserializa(file_get_contents($NetworkStateFile));
     88    $LastNetworkState = unserialize(file_get_contents($NetworkStateFile));
    9089    $NetworkState = array('Time' => time());
    9190    $Output = array();
  • trunk/Packages/Common/Database.php

    r912 r929  
    9595    if (($this->ShowSQLQuery == true) or ($this->LogSQLQuery == true)) $QueryStartTime = microtime_float();
    9696    $this->LastQuery = $Query;
    97     //echo('a'.$this->ShowSQLQuery.'<'.$QueryStartTime.', '.microtime_float());
    9897    if (($this->ShowSQLQuery == true) or ($this->LogSQLQuery == true))
    9998    {
     
    203202    $Name = substr($Name, 1);
    204203    $Values = substr($Values, 1);
    205     //echo('REPLACE INTO `'.$this->Prefix.$Table.'` ('.$Name.') VALUES ('.$Values.')<br />');
    206204    $this->query('REPLACE INTO `'.$this->Prefix.$Table.'` ('.$Name.') VALUES('.$Values.')');
    207     //echo($this->error().'<br>');
    208205  }
    209206
     
    234231  public function Transaction(array $Queries): void
    235232  {
    236     //echo('|'."\n");
    237233    $this->PDO->beginTransaction();
    238234    foreach ($Queries as $Query)
    239235    {
    240       //echo('|'.$Query."\n");
    241236      $Statement = $this->PDO->prepare($Query);
    242237      $Statement->execute();
  • trunk/Packages/Common/Locale.php

    r887 r929  
    7575            $Previous = strtolower(substr($Content, strpos($Content, 'T(') - 1, 1));
    7676            $Content = substr($Content, strpos($Content, 'T(') + 2);
    77             $Ord = ord($Previous);
    78             //echo($Ord.',');
     77            $Ord = ord($Previous);           
    7978            if (!(($Ord >= ord('a')) and ($Ord <= ord('z'))))
    8079            {
  • trunk/Readme.txt

    r908 r929  
    22=============================================
    33
    4 * Required PHP 7.4 or higher
     4* Required PHP 8.1 or higher
    55
    661) Instalace a nastavení systému
  • trunk/block/index.php

    r912 r929  
    5151$Page = new BlockPage($System);
    5252echo($Page->GetOutput());
    53 
Note: See TracChangeset for help on using the changeset viewer.