Changeset 873 for trunk/Application


Ignore:
Timestamp:
Apr 6, 2020, 11:17:40 PM (5 years ago)
Author:
chronos
Message:
  • Modified: Improved code format.
Location:
trunk/Application
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Application/DefaultConfig.php

    r791 r873  
    66  {
    77    $IsDeveloper = in_array($_SERVER['REMOTE_ADDR'], array('127.0.0.1'));
    8     return(array
     8    return (array
    99    (
    1010        array('Name' => 'SystemPassword', 'Type' => 'PasswordEncoded', 'Default' => '', 'Title' => 'Systémové heslo'),
  • trunk/Application/System.php

    r858 r873  
    22
    33$ConfigFileName = dirname(__FILE__).'/../Config/Config.php';
    4 if(file_exists($ConfigFileName)) include_once($ConfigFileName);
     4if (file_exists($ConfigFileName)) include_once($ConfigFileName);
    55
    66include_once(dirname(__FILE__).'/Version.php');
     
    4040    $this->ConfigManager = new Config();
    4141    $this->RootURLFolder = $_SERVER['SCRIPT_NAME'];
    42     if(substr($this->RootURLFolder, -10, 10) == '/index.php')
     42    if (substr($this->RootURLFolder, -10, 10) == '/index.php')
    4343      $this->RootURLFolder = substr($this->RootURLFolder, 0, -10);
    4444    $this->CommandLine = array();
     
    4848  function RegisterPage($Path, $Handler)
    4949  {
    50     if(is_array($Path))
     50    if (is_array($Path))
    5151    {
    5252      $Page = &$this->Pages;
    5353      $LastKey = array_pop($Path);
    54       foreach($Path as $PathItem)
     54      foreach ($Path as $PathItem)
    5555      {
    5656        $Page = &$Page[$PathItem];
    5757      }
    58       if(!is_array($Page)) $Page = array('' => $Page);
     58      if (!is_array($Page)) $Page = array('' => $Page);
    5959      $Page[$LastKey] = $Handler;
    6060    } else $this->Pages[$Path] = $Handler;
     
    6868  function SearchPage($PathItems, $Pages)
    6969  {
    70     if(count($PathItems) > 0) $PathItem = $PathItems[0];
     70    if (count($PathItems) > 0) $PathItem = $PathItems[0];
    7171      else $PathItem = '';
    72     if(array_key_exists($PathItem, $Pages))
    73     {
    74       if(is_array($Pages[$PathItem]))
     72    if (array_key_exists($PathItem, $Pages))
     73    {
     74      if (is_array($Pages[$PathItem]))
    7575      {
    7676        array_shift($PathItems);
    77         return($this->SearchPage($PathItems, $Pages[$PathItem]));
    78       } else return($Pages[$PathItem]);
    79     } else return('');
     77        return ($this->SearchPage($PathItems, $Pages[$PathItem]));
     78      } else return ($Pages[$PathItem]);
     79    } else return ('');
    8080  }
    8181
    8282  function PageNotFound()
    8383  {
    84     return('Page '.implode('/', $this->PathItems).' not found.');
     84    return ('Page '.implode('/', $this->PathItems).' not found.');
    8585  }
    8686
     
    9191    /* @var $Page Page */
    9292    $ClassName = $this->SearchPage($this->PathItems, $this->Pages);
    93     if($ClassName != '')
     93    if ($ClassName != '')
    9494    {
    9595      $Page = new $ClassName($this);
     
    102102  function ModulePresent($Name)
    103103  {
    104     return(array_key_exists($Name, $this->Modules));
     104    return (array_key_exists($Name, $this->Modules));
    105105  }
    106106
     
    112112  function HumanDate($Time)
    113113  {
    114     return(date('j.n.Y', $Time));
     114    return (date('j.n.Y', $Time));
    115115  }
    116116
    117117  function Link($Target)
    118118  {
    119     return($this->RootURLFolder.$Target);
     119    return ($this->RootURLFolder.$Target);
    120120  }
    121121
     
    126126      'LEFT JOIN `ActionIcon` ON `ActionIcon`.`Id` = `Action`.`Icon` '.
    127127      'WHERE (`Action`.`Id`='.$Id.')');
    128     if($DbResult->num_rows > 0)
     128    if ($DbResult->num_rows > 0)
    129129    {
    130130      $Action = $DbResult->fetch_assoc();
    131       if($Action['Icon'] == '') $Action['Icon'] = 'clear.png';
    132       if(substr($Action['URL'], 0, 4) != 'http') $Action['URL'] = $this->Link($Action['URL']);
    133       if(!defined('NEW_PERMISSION') or $this->User->CheckPermission('System', 'Read', 'Item', $Id))
     131      if ($Action['Icon'] == '') $Action['Icon'] = 'clear.png';
     132      if (substr($Action['URL'], 0, 4) != 'http') $Action['URL'] = $this->Link($Action['URL']);
     133      if (!defined('NEW_PERMISSION') or $this->User->CheckPermission('System', 'Read', 'Item', $Id))
    134134        $Output .= '<img alt="'.$Action['Title'].'" src="'.$this->Link('/images/favicons/'.$Action['Icon']).
    135135        '" width="16" height="16" /> <a href="'.$Action['URL'].'">'.$Action['Title'].'</a>';
    136136    }
    137     return($Output);
     137    return ($Output);
    138138  }
    139139
     
    148148
    149149    // SQL injection hack protection
    150     foreach($_POST as $Index => $Item) $_POST[$Index] = addslashes($Item);
    151     foreach($_GET as $Index => $Item) $_GET[$Index] = addslashes($Item);
    152 
    153     if(isset($_SERVER['REMOTE_ADDR'])) session_start();
     150    foreach ($_POST as $Index => $Item) $_POST[$Index] = addslashes($Item);
     151    foreach ($_GET as $Index => $Item) $_GET[$Index] = addslashes($Item);
     152
     153    if (isset($_SERVER['REMOTE_ADDR'])) session_start();
    154154
    155155    $ConfigFileName = dirname(dirname(__FILE__)).'/config.php';
    156     if(file_exists($ConfigFileName))
     156    if (file_exists($ConfigFileName))
    157157      $this->ConfigManager->LoadFromFile($ConfigFileName);
    158158    //$this->Config = $this->ConfigManager->GetAsArray();
     
    166166      $this->Database->ShowSQLError = $this->Config['Web']['ShowSQLError'];
    167167      $this->Database->ShowSQLQuery = $this->Config['Web']['ShowSQLQuery'];
    168       if(isset($this->Config['Web']['LogSQLQuery']))
     168      if (isset($this->Config['Web']['LogSQLQuery']))
    169169        $this->Database->LogSQLQuery = $this->Config['Web']['LogSQLQuery'];
    170170    } catch (Exception $E) {
     
    181181    $this->LinkLocaleExceptions = array('images', 'style', 'files');
    182182
    183     if(isset($this->Config['Web']['RootFolder']))
     183    if (isset($this->Config['Web']['RootFolder']))
    184184      $this->RootURLFolder = $this->Config['Web']['RootFolder'];
    185185    $this->FormManager->Root = $this->RootURLFolder;
     
    193193    $this->Setup = new Setup($this);
    194194    $this->Setup->Start();
    195     if($this->Setup->CheckState())
     195    if ($this->Setup->CheckState())
    196196    {
    197197      $this->ModuleManager->Start();
     
    202202  {
    203203    $this->RunCommon();
    204     if($this->ShowPage)
     204    if ($this->ShowPage)
    205205    {
    206206      $this->PathItems = ProcessURL();
    207207
    208208      // Detect interface locale
    209       if(isset($this->Config['Web']['Locale']))
     209      if (isset($this->Config['Web']['Locale']))
    210210        $this->LocaleManager->DefaultLangCode = $this->Config['Web']['Locale'];
    211211      $this->LocaleManager->LangCode = $this->LocaleManager->DefaultLangCode;
    212       if(count($this->PathItems) > 0)
     212      if (count($this->PathItems) > 0)
    213213      {
    214214         $NewLangCode = $this->PathItems[0];
    215          if(array_key_exists($NewLangCode, $this->LocaleManager->Available))
     215         if (array_key_exists($NewLangCode, $this->LocaleManager->Available))
    216216         {
    217217           array_shift($this->PathItems);
     
    219219         }
    220220      }
    221       if(array_key_exists($this->LocaleManager->LangCode, $this->LocaleManager->Available))
     221      if (array_key_exists($this->LocaleManager->LangCode, $this->LocaleManager->Available))
    222222        $this->LocaleManager->LoadLocale($this->LocaleManager->LangCode);
    223223
     
    231231
    232232    $this->RunCommon();
    233     if(count($argv) > 1)
    234     {
    235       if(array_key_exists($argv[1], $this->CommandLine))
     233    if (count($argv) > 1)
     234    {
     235      if (array_key_exists($argv[1], $this->CommandLine))
    236236      {
    237237        $Command = $this->CommandLine[$argv[1]];
     
    282282  {
    283283    Header($_SERVER['SERVER_PROTOCOL'].' 404 Not Found');
    284     return('<h3 align="center">Požadovaná stránka neexistuje.</h3>');
     284    return ('<h3 align="center">Požadovaná stránka neexistuje.</h3>');
    285285  }
    286286}
  • trunk/Application/UpdateTrace.php

    r870 r873  
    203203  $ServiceCategoryHire = $Manager->Database->insert_id;
    204204  $DbResult = $Manager->Execute("SELECT * FROM Member WHERE Hire>0");
    205   while($Member = $DbResult->fetch_assoc())
     205  while ($Member = $DbResult->fetch_assoc())
    206206  {
    207207    $Manager->Execute("INSERT INTO `Service` (
     
    308308  // Set all string collation to utf8 general
    309309  $DbResult = $Manager->Execute("SHOW TABLES");
    310   while($DbRow = $DbResult->fetch_row())
     310  while ($DbRow = $DbResult->fetch_row())
    311311  {
    312312    $Manager->Execute("ALTER TABLE `".$DbRow[0]."` CONVERT TO CHARACTER SET utf8");
     
    871871  $ActionId = $Manager->Database->insert_id;
    872872  $DbResult = $Manager->Execute('SELECT `Id` FROM `MenuItem` WHERE `Name`="Nabídky"');
    873   if($DbResult->num_rows > 0)
     873  if ($DbResult->num_rows > 0)
    874874  {
    875875    $DbRow = $DbResult->fetch_assoc();
     
    889889  // Convert monthly plus payment for consumption to regular service
    890890  $DbResult = $Manager->Execute('SELECT `MonthlyPlus`, `Member` FROM `MemberPayment` WHERE `MonthlyPlus` > 0');
    891   while($DbRow = $DbResult->fetch_assoc)
     891  while ($DbRow = $DbResult->fetch_assoc)
    892892  {
    893893    $Manager->Execute("INSERT INTO `Service` (`Id` ,`Name` ,`Category` ,`Price` ,`VAT`) ".
     
    987987  $ActionId = $Manager->Database->insert_id;
    988988  $DbResult = $Manager->Execute('SELECT `Id` FROM `MenuItem` WHERE `Name`="Sklad"');
    989   if($DbResult->num_rows > 0)
     989  if ($DbResult->num_rows > 0)
    990990  {
    991991    $DbRow = $DbResult->fetch_assoc();
     
    10251025  $ActionId = $Manager->Database->insert_id;
    10261026  $DbResult = $Manager->Execute('SELECT `Id` FROM `MenuItem` WHERE `Name`="Finance"');
    1027   if($DbResult->num_rows > 0)
     1027  if ($DbResult->num_rows > 0)
    10281028  {
    10291029    $DbRow = $DbResult->fetch_assoc();
     
    10471047  // IS menu item
    10481048  $DbResult = $Manager->Execute('SELECT `Id` FROM `MenuItem` WHERE `Name`="Příjmy a výdaje"');
    1049   if($DbResult->num_rows > 0)
     1049  if ($DbResult->num_rows > 0)
    10501050  {
    10511051    $DbRow = $DbResult->fetch_assoc();
     
    10891089  // IS menu item
    10901090  $DbResult = $Manager->Execute('SELECT `Id` FROM `MenuItem` WHERE `Name`="Závazky a pohledávky"');
    1091   if($DbResult->num_rows > 0)
     1091  if ($DbResult->num_rows > 0)
    10921092  {
    10931093    $DbRow = $DbResult->fetch_assoc();
     
    11201120  $SearchText = 'Připojení k síti';
    11211121  $DbResult = $Manager->Execute('SELECT * FROM `FinanceInvoiceItem` WHERE `Description` LIKE "'.$SearchText.' za období%";');
    1122   while($DbRow = $DbResult->fetch_assoc())
     1122  while ($DbRow = $DbResult->fetch_assoc())
    11231123  {
    11241124    $Text = trim(substr($DbRow['Description'], strlen($SearchText.' za období') + 1));
     
    11341134  $SearchText = 'Připojení k Internetu';
    11351135  $DbResult = $Manager->Execute('SELECT * FROM `FinanceInvoiceItem` WHERE `Description` LIKE "'.$SearchText.' za období%";');
    1136   while($DbRow = $DbResult->fetch_assoc())
     1136  while ($DbRow = $DbResult->fetch_assoc())
    11371137  {
    11381138    $Text = trim(substr($DbRow['Description'], strlen($SearchText.' za období') + 1));
     
    11411141    $PeriodFrom = $PeriodFrom[2].'-'.$PeriodFrom[1].'-'.$PeriodFrom[0];
    11421142    $Text[1] = trim($Text[1]);
    1143     if(strpos($Text[1], ' ') !== false) $Text[1] = substr($Text[1], 0, strpos($Text[1], ' '));
     1143    if (strpos($Text[1], ' ') !== false) $Text[1] = substr($Text[1], 0, strpos($Text[1], ' '));
    11441144    $PeriodTo = explode('.', trim($Text[1]));
    11451145    $PeriodTo = $PeriodTo[2].'-'.$PeriodTo[1].'-'.$PeriodTo[0];
     
    11991199  $ActionId = $Manager->Database->insert_id;
    12001200  $DbResult = $Manager->Execute('SELECT `Id` FROM `MenuItem` WHERE `Name`="Systém"');
    1201   if($DbResult->num_rows > 0)
     1201  if ($DbResult->num_rows > 0)
    12021202  {
    12031203    $DbRow = $DbResult->fetch_assoc();
     
    12501250  $ActionId = $Manager->Database->insert_id;
    12511251  $DbResult = $Manager->Execute('SELECT `Id` FROM `MenuItem` WHERE `Name`="Síť"');
    1252   if($DbResult->num_rows > 0)
     1252  if ($DbResult->num_rows > 0)
    12531253  {
    12541254    $DbRow = $DbResult->fetch_assoc();
     
    14571457    'LEFT JOIN `FinanceOperationGroup` ON `FinanceOperationGroup`.`Id` = `FinanceOperation`.`Group` '.
    14581458    'WHERE `FinanceOperation`.`BillCodeText`!=""');
    1459   while($DbRow = $DbResult->fetch_assoc())
     1459  while ($DbRow = $DbResult->fetch_assoc())
    14601460  {
    1461     if($DbRow['DocumentLine'] == '') $DbRow['DocumentLine'] = 'NULL';
     1461    if ($DbRow['DocumentLine'] == '') $DbRow['DocumentLine'] = 'NULL';
    14621462    $Manager->Execute('INSERT INTO `DocumentLineCode` (`Id` ,`DocumentLine` ,`Name`) '.
    14631463      'VALUES (NULL , '.$DbRow['DocumentLine'].', "'.$DbRow['BillCodeText'].'");');
     
    14751475    'LEFT JOIN `FinanceInvoiceGroup` ON `FinanceInvoiceGroup`.`Id` = `FinanceInvoice`.`Group` '.
    14761476    'WHERE `FinanceInvoice`.`BillCodeText`!=""');
    1477   while($DbRow = $DbResult->fetch_assoc())
     1477  while ($DbRow = $DbResult->fetch_assoc())
    14781478  {
    1479     if($DbRow['DocumentLine'] == '') $DbRow['DocumentLine'] = 'NULL';
     1479    if ($DbRow['DocumentLine'] == '') $DbRow['DocumentLine'] = 'NULL';
    14801480        $Manager->Execute('INSERT INTO `DocumentLineCode` (`Id` ,`DocumentLine` ,`Name`) '.
    14811481      'VALUES (NULL , '.$DbRow['DocumentLine'].', "'.$DbRow['BillCodeText'].'");');
     
    15121512{
    15131513  $DbResult = $Manager->Database->query('SELECT * FROM (SELECT `FinanceInvoice`.`Id`, ((SELECT SUM(`Price` * `Quantity`) FROM `FinanceInvoiceItem` WHERE `FinanceInvoiceItem`.`FinanceInvoice`=`FinanceInvoice`.`Id`) * `FinanceInvoiceGroup`.`ValueSign`) AS `Sum`,`FinanceInvoice`.`Value` FROM `FinanceInvoice` LEFT JOIN `FinanceInvoiceGroup` ON `FinanceInvoiceGroup`.`Id`=`FinanceInvoice`.`Group`) AS `T` WHERE `Sum` != `Value`');
    1514   while($DbRow = $DbResult->fetch_assoc())
     1514  while ($DbRow = $DbResult->fetch_assoc())
    15151515  {
    15161516    $Manager->Database->query('UPDATE `FinanceInvoiceItem` SET `Price` = -`Price` WHERE `FinanceInvoice`='.$DbRow['Id']);
     
    16241624  $ActionId = $Manager->Database->insert_id;
    16251625  $DbResult = $Manager->Execute('SELECT `Id` FROM `MenuItem` WHERE `Name`="Zákazníci"');
    1626   if($DbResult->num_rows > 0)
     1626  if ($DbResult->num_rows > 0)
    16271627  {
    16281628    $DbRow = $DbResult->fetch_assoc();
     
    18121812    'FROM `Contract` '.
    18131813    'WHERE `Contract`.`BillCodeText`!=""');
    1814   while($DbRow = $DbResult->fetch_assoc())
     1814  while ($DbRow = $DbResult->fetch_assoc())
    18151815  {
    1816     if($DbRow['DocumentLine'] == '') $DbRow['DocumentLine'] = 'NULL';
     1816    if ($DbRow['DocumentLine'] == '') $DbRow['DocumentLine'] = 'NULL';
    18171817    $Manager->Execute('INSERT INTO `DocumentLineCode` (`Id` ,`DocumentLine` ,`Name`) '.
    18181818      'VALUES (NULL , '.$DbRow['DocumentLine'].', "'.$DbRow['BillCodeText'].'");');
     
    18771877    'LEFT JOIN `StockMoveGroup` ON `StockMoveGroup`.`Id` = `StockMove`.`Group` '.
    18781878    'WHERE `StockMove`.`BillCodeText`!=""');
    1879   while($DbRow = $DbResult->fetch_assoc())
     1879  while ($DbRow = $DbResult->fetch_assoc())
    18801880  {
    1881    if($DbRow['DocumentLine'] == '') $DbRow['DocumentLine'] = 'NULL';
     1881   if ($DbRow['DocumentLine'] == '') $DbRow['DocumentLine'] = 'NULL';
    18821882   $Manager->Execute('INSERT INTO `DocumentLineCode` (`Id` ,`DocumentLine` ,`Name`) '.
    18831883     'VALUES (NULL , '.$DbRow['DocumentLine'].', "'.$DbRow['BillCodeText'].'");');
     
    19401940  $ActionId = $Manager->Database->insert_id;
    19411941  $DbResult = $Manager->Execute('SELECT `Id` FROM `MenuItem` WHERE `Name`="Pokladny"');
    1942   if($DbResult->num_rows > 0)
     1942  if ($DbResult->num_rows > 0)
    19431943  {
    19441944    $DbRow = $DbResult->fetch_assoc();
     
    20962096  $ActionId = $Manager->Database->insert_id;
    20972097  $DbResult = $Manager->Execute('SELECT `Id` FROM `MenuItem` WHERE `Name`="Síť"');
    2098   if($DbResult->num_rows > 0)
     2098  if ($DbResult->num_rows > 0)
    20992099  {
    21002100    $DbRow = $DbResult->fetch_assoc();
     
    21152115  function Get()
    21162116  {
    2117     return(array(
     2117    return (array(
    21182118      491 => array('Revision' => 493, 'Function' => 'UpdateTo493'),
    21192119      493 => array('Revision' => 494, 'Function' => 'UpdateTo494'),
  • trunk/Application/Version.php

    r872 r873  
    11<?php
    22
    3 $Revision = 872; // Subversion revision
     3$Revision = 873; // Subversion revision
    44$DatabaseRevision = 870; // SQL structure revision
    55$ReleaseTime = strtotime('2020-04-06');
  • trunk/Application/View.php

    r796 r873  
    2626
    2727    // TODO: Move to external code
    28     if(isset($this->System->Config['Web']['FormatHTML']))
     28    if (isset($this->System->Config['Web']['FormatHTML']))
    2929      $this->FormatHTML = $this->System->Config['Web']['FormatHTML'];
    30     if(isset($this->System->Config['Web']['ShowRuntimeInfo']))
     30    if (isset($this->System->Config['Web']['ShowRuntimeInfo']))
    3131      $this->ShowRuntimeInfo = $this->System->Config['Web']['ShowRuntimeInfo'];
    32     if(isset($this->System->Config['Web']['Charset']))
     32    if (isset($this->System->Config['Web']['Charset']))
    3333      $this->Encoding = $this->System->Config['Web']['Charset'];
    34     if(isset($this->System->Config['Web']['Style']))
     34    if (isset($this->System->Config['Web']['Style']))
    3535      $this->Style = $this->System->Config['Web']['Style'];
    3636  }
     
    3838  function SystemMessage($Title, $Text)
    3939  {
    40     return('<table align="center"><tr><td><div class="SystemMessage"><h3>'.$Title.'</h3><div>'.$Text.'</div></div></td></tr></table>');
     40    return ('<table align="center"><tr><td><div class="SystemMessage"><h3>'.$Title.'</h3><div>'.$Text.'</div></div></td></tr></table>');
    4141    //ShowFooter();
    4242    //die();
     
    4545  function ShowNavigation($Page)
    4646  {
    47     if(array_key_exists('REQUEST_URI', $_SERVER))
     47    if (array_key_exists('REQUEST_URI', $_SERVER))
    4848      $ScriptName = $_SERVER['REQUEST_URI'];
    4949      else $ScriptName = '';
    50     while(strpos($ScriptName, '//') !== false)
     50    while (strpos($ScriptName, '//') !== false)
    5151      $ScriptName = str_replace('//', '/', $ScriptName);
    52     if(strpos($ScriptName, '?') !== false)
     52    if (strpos($ScriptName, '?') !== false)
    5353      $ScriptName = substr($ScriptName, 0, strrpos($ScriptName, '?'));
    5454    $ScriptName = substr($ScriptName, strlen($this->System->Link('')));
    55     if(substr($ScriptName, -1, 1) == '/') $ScriptName = substr($ScriptName, 0, -1);
     55    if (substr($ScriptName, -1, 1) == '/') $ScriptName = substr($ScriptName, 0, -1);
    5656
    5757    $Output = '';
    58     while($Page)
     58    while ($Page)
    5959    {
    6060      $Output = ' &gt; <a href="'.$this->System->Link($ScriptName).'/">'.$Page->ShortTitle.'</a>'.$Output;
    6161
    62       if(class_exists($Page->ParentClass))
     62      if (class_exists($Page->ParentClass))
    6363      {
    6464        $PageClass = $Page->ParentClass;
     
    6868    }
    6969    $Output = substr($Output, 6);
    70     return($Output);
     70    return ($Output);
    7171  }
    7272
     
    7979
    8080    $BodyParam = '';
    81     if(isset($Page->Load)) $BodyParam .= ' onload="'.$Page->Load.'"';
    82     if(isset($Page->Unload)) $BodyParam .= ' onunload="'.$Page->Unload.'"';
     81    if (isset($Page->Load)) $BodyParam .= ' onload="'.$Page->Load.'"';
     82    if (isset($Page->Unload)) $BodyParam .= ' onunload="'.$Page->Unload.'"';
    8383    $Output = '<?xml version="1.0" encoding="'.$this->Encoding.'"?>'."\n".
    8484    '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">'.
     
    9191    // Show page headers
    9292    $Bar = '';
    93     foreach($this->System->PageHeaders as $Item)
     93    foreach ($this->System->PageHeaders as $Item)
    9494      $Output .= call_user_func($Item);
    9595
    9696    $Output .= '</head><body'.$BodyParam.'>';
    97     if($this->BasicHTML == false)
     97    if ($this->BasicHTML == false)
    9898    {
    9999      //$Output .= '<div class="MainTitle">'.$Title.'</div>';
    100100      $Output .= '<div class="MainTitle"><span class="MenuItem"><strong>Navigace :: </strong> '.$Navigation.'</span><div class="MenuItem2">';
    101101      $Bar = '';
    102       foreach($this->System->Bars['Top'] as $BarItem)
     102      foreach ($this->System->Bars['Top'] as $BarItem)
    103103        $Bar .= call_user_func($BarItem);
    104       if(trim($Bar) != '') $Output .= $Bar;
     104      if (trim($Bar) != '') $Output .= $Bar;
    105105        else $Output .= '&nbsp;';
    106106      $Output .= '</div></div>';
    107107    }
    108     return($Output);
     108    return ($Output);
    109109  }
    110110
     
    115115    $Time = round(GetMicrotime() - $ScriptTimeStart, 2);
    116116    $Output = '';
    117     if($this->BasicHTML == false)
     117    if ($this->BasicHTML == false)
    118118    {
    119119      $Output .= '<div id="Footer">'.
    120120      '<i>| Správa webu: '.$this->System->Config['Web']['Admin'].' | e-mail: '.$this->System->Config['Web']['AdminEmail'].' | '.
    121121      ' Verze: '.$Revision.' ('.$this->System->HumanDate($ReleaseTime).') |';
    122       if($this->ShowRuntimeInfo == true) $Output .= ' Doba generování: '.$Time.' s / '.ini_get('max_execution_time').
     122      if ($this->ShowRuntimeInfo == true) $Output .= ' Doba generování: '.$Time.' s / '.ini_get('max_execution_time').
    123123        ' s | Použitá paměť: '.HumanSize(memory_get_peak_usage(FALSE)).' / '.ini_get('memory_limit').'B |';
    124124      $Output .= '</i></div>';
    125125    }
    126126    $Output .= '</body></html>';
    127     return($Output);
     127    return ($Output);
    128128  }
    129129
     
    133133
    134134    $Output = $Page->Show();
    135     if($Page->ClearPage == false)
     135    if ($Page->ClearPage == false)
    136136    {
    137137      $Output = $this->ShowHeader($Page).$Output.$this->ShowFooter();
    138       if($this->FormatHTML == true) $Output = $this->FormatOutput($Output);
     138      if ($this->FormatHTML == true) $Output = $this->FormatOutput($Output);
    139139    }
    140     return($Output);
     140    return ($Output);
    141141  }
    142142
     
    147147    $Page->Database = $this->Database;
    148148    $Page->FormatHTML = $this->FormatHTML;
    149     return($Page);
     149    return ($Page);
    150150  }
    151151
     
    156156    $nn = 0;
    157157    $n = 0;
    158     while($s != '')
     158    while ($s != '')
    159159    {
    160160      $start = strpos($s, '<');
    161161      $end = strpos($s, '>');
    162       if($start != 0)
     162      if ($start != 0)
    163163      {
    164164        $end = $start - 1;
     
    166166      }
    167167      $line = trim(substr($s, $start, $end + 1));
    168       if(strlen($line) > 0)
    169       if($line[0] == '<')
     168      if (strlen($line) > 0)
     169      if ($line[0] == '<')
    170170      {
    171         if($s[$start + 1] == '/')
     171        if ($s[$start + 1] == '/')
    172172        {
    173173          $n = $n - 2;
     
    175175        } else
    176176        {
    177           if(strpos($line, ' ')) $cmd = substr($line, 1, strpos($line, ' ') - 1);
     177          if (strpos($line, ' ')) $cmd = substr($line, 1, strpos($line, ' ') - 1);
    178178          else $cmd = substr($line, 1, strlen($line) - 2);
    179179          //echo('['.$cmd.']');
    180           if(strpos($s, '</'.$cmd.'>')) $n = $n + 2;
     180          if (strpos($s, '</'.$cmd.'>')) $n = $n + 2;
    181181        }
    182182      }// else $line = '['.$line.']';
    183       //if($line != '') echo(htmlspecialchars(str_repeat(' ',$nn).$line."\n"));
    184       if($line != '') $out .= (str_repeat(' ', $nn).$line."\n");
     183      //if ($line != '') echo(htmlspecialchars(str_repeat(' ',$nn).$line."\n"));
     184      if ($line != '') $out .= (str_repeat(' ', $nn).$line."\n");
    185185      $s = substr($s, $end + 1, strlen($s));
    186186      $nn = $n;
    187187    }
    188     return($out);
     188    return ($out);
    189189  }
    190190}
Note: See TracChangeset for help on using the changeset viewer.