Changeset 11


Ignore:
Timestamp:
Jun 19, 2012, 10:26:04 AM (12 years ago)
Author:
maron
Message:

zachytávání zpráv

Location:
trunk/class
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/class/Gui.php

    r9 r11  
    1313  private $Language;
    1414
    15   function __construct()
     15  function __construct($User)
    1616  {
    1717    $this->Config = new Config(); 
     
    2323       
    2424        //have to be after inicialization of pages
    25         $this->Feedback();
     25        $this->Feedback($User);
    2626  }
    2727 
     
    3939
    4040//gets feedback from post and get
    41   private function Feedback() {
    42         $this->Messages->GetPost();
    43         $this->Messages->GetGet();
     41  private function Feedback($User) {
     42        $this->Messages->RegMess($User);
    4443        $this->ActivePage = $this->Messages->WhichPage($this->Pages);
    4544  }       
     
    6564'<head>'.
    6665'<meta http-equiv="content-type" content="application/xhtml+xml; charset='.$this->Config->Web['Charset'].'" />'.
    67 '<meta name="keywords" content="virtualizace, virtuální, server, hosting, webhosting, web" />'.
     66'<meta name="keywords" content="virtualizace, virtuální, server, hosting, webhosting, web, virtualization" />'.
    6867'<meta name="description" content="'.$this->Config->Web['Title'].'" />'.
    6968'<meta name="robots" content="all" />'.
     
    8079    echo('</td>'.
    8180  '</tr><tr>'.
    82   '<td colspan="4" class="page-bottom">Autoři: '.$this->Config->Web['Authors'].' &nbsp; '.$this->Links['SourceCode']->Get().'');
     81  '<td colspan="4" class="page-bottom">'.$this->Language->Texts['autors'].': '.$this->Config->Web['Authors'].' &nbsp; '.$this->Links['SourceCode']->Get().'');
    8382
    8483    echo('</td></tr>');
  • trunk/class/Messages.php

    r9 r11  
    3030    return 'notfound';
    3131  }
    32 //returns
    33   public function GetPost() {
     32 
     33//registe messages and send data to obj 
     34  public function RegMess($User) {
     35          $Login = new Message('post','LoginUser',$User,'Login','','');
     36         
    3437  }
    35 //returns
    36   public function GetGet() {
    37   }
     38
    3839
    3940}
  • trunk/class/User.php

    r10 r11  
    2020  function __construct($Database)
    2121  {
     22        $this->Database =  $Database;
    2223    if(isset($_SESSION)) $this->Restore();   
    2324      else $this->SetAnonymous();
     
    3132  function Login($Name, $Password)
    3233  {
    33         global $Database;
    34     $DbResult = $Database->query('SELECT `ID` FROM `User` WHERE LOWER(`Name`) = LOWER("'.$Name.'") AND `Pass` = '.$this->CryptPasswordSQL('"'.$Password.'"', '`Salt`'));
     34          ECHO 'TES';
     35    $DbResult = $this->Database->query('SELECT `ID` FROM `User` WHERE LOWER(`Name`) = LOWER("'.$Name.'") AND `Pass` = '.$this->CryptPasswordSQL('"'.$Password.'"', '`Salt`'));
    3536    if($DbResult->num_rows > 0)
    3637    {
     
    4647  {
    4748    if($this->Role != LICENCE_ANONYMOUS)
    48       $this->System->Database->query('UPDATE `User` SET `LastLogout` = NOW() WHERE `ID` = '.$this->Id);
     49      $this->Database->query('UPDATE `User` SET `LastLogout` = NOW() WHERE `ID` = '.$this->Id);
    4950    $this->SetAnonymous();
    5051  }
     
    5253  function Load()
    5354  {
    54     $DbResult = $this->System->Database->query('SELECT * FROM `User` WHERE `ID` = '.$this->Id);
     55    $DbResult = $this->Database->query('SELECT * FROM `User` WHERE `ID` = '.$this->Id);
    5556    $User = $DbResult->fetch_assoc();
    5657    // Security: Password and Salt hash should not be loaded to variables
     
    110111  {
    111112    if(array_key_exists('REMOTE_ADDR', $_SERVER))
    112       $this->System->Database->query('UPDATE `User` SET `LastIP` = "'.$_SERVER['REMOTE_ADDR'].'", `LastLogin` = NOW() WHERE `ID` = '.$this->Id);
     113      $this->Database->query('UPDATE `User` SET `LastIP` = "'.$_SERVER['REMOTE_ADDR'].'", `LastLogin` = NOW() WHERE `ID` = '.$this->Id);
    113114  }
    114115}
Note: See TracChangeset for help on using the changeset viewer.