Changeset 47 for trunk/Base/System.php


Ignore:
Timestamp:
Jul 27, 2014, 9:14:56 PM (10 years ago)
Author:
chronos
Message:
  • Odstraněno: Zbytečná PHP ukončovací značka "?>" z konce všech souborů.
Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

    • Property svn:ignore
      •  

        old new  
        1 
        21config.php
         2.project
  • trunk/Base/System.php

    r45 r47  
    8484{
    8585}
    86  
     86
    8787class System
    8888{
    89   var $Model = array(); 
    90   var $View = array(); 
    91   var $Controller = array(); 
     89  var $Model = array();
     90  var $View = array();
     91  var $Controller = array();
    9292  var $Config;
    9393  var $Database;
     
    106106
    107107    $TimeStart = $this->GetMicrotime();
    108    
     108
    109109    // Change base dir to index. Helpfull if script is executed from command line with related path.
    110110    chdir(dirname(__FILE__));
     
    119119      }
    120120
     121    $Config = array();
     122
    121123    $FileName = dirname(__FILE__).'/../Application/Config/Config.php';
    122124    if(file_exists($FileName)) include($FileName);
    123    
     125
    124126    $this->Config = $Config;
    125    
     127
    126128    $ShowPHPError = $this->Config['System']['ShowPHPError'];
    127129
     130    $Translation = array();
    128131    $FileName = dirname(__FILE__).'/../Application/Locale/'.$this->Config['System']['Locale'].'.php';
    129132    if(file_exists($FileName)) include($FileName);
     
    142145    $this->Database->Prefix = $this->Config['Database']['Prefix'];
    143146    $this->Database->charset($this->Config['Database']['Charset']);
    144      
     147
    145148    $this->HTTP = new HTTP();
    146149    $this->HTML = new HTML($this);
     
    152155  {
    153156    $this->TimeStart = $this->GetMicrotime();
    154    
     157
    155158    // SQL injection hack protection
    156159    foreach($_POST as $Index => $Item) $_POST[$Index] = addslashes($Item);
     
    183186    $this->Modules[$Name] = new $Name($this);
    184187  }
    185  
     188
    186189  function HumanDate($Time)
    187190  {
     
    214217    $I = $PrefixMultipliers[$PrefixType]['BaseIndex'];
    215218    if($Value == 0) return($Value.' '.$PrefixMultipliers[$PrefixType]['Definition'][$I][0].$Unit);
    216      
    217     if($Value > 1) 
     219
     220    if($Value > 1)
    218221    {
    219222      while((($I + 1) <= count($PrefixMultipliers[$PrefixType]['Definition'])) and (($Value / $PrefixMultipliers[$PrefixType]['Definition'][$I + 1][2]) > 1))
    220223        $I = $I + 1;
    221     } else 
     224    } else
    222225    if($Value < 1)
    223226    {
     
    226229    }
    227230    $Value = $Value / $PrefixMultipliers[$PrefixType]['Definition'][$I][2];
    228    
     231
    229232    // Truncate digits count
    230233    $Value = $this->TruncateDigits($Value, $Digits);
     
    232235    return($Value.' '.$PrefixMultipliers[$PrefixType]['Definition'][$I][0].$Unit);
    233236  }
    234  
     237
    235238  function NetworkPortState($Address, $Port, $Timeout = 1)
    236239  {
     
    281284  }
    282285}
    283 
    284 ?>
Note: See TracChangeset for help on using the changeset viewer.