Changeset 11
- Timestamp:
- Jun 19, 2012, 10:26:04 AM (13 years ago)
- Location:
- trunk/class
- Files:
-
- 2 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/class/Gui.php
r9 r11 13 13 private $Language; 14 14 15 function __construct( )15 function __construct($User) 16 16 { 17 17 $this->Config = new Config(); … … 23 23 24 24 //have to be after inicialization of pages 25 $this->Feedback( );25 $this->Feedback($User); 26 26 } 27 27 … … 39 39 40 40 //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); 44 43 $this->ActivePage = $this->Messages->WhichPage($this->Pages); 45 44 } … … 65 64 '<head>'. 66 65 '<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" />'. 68 67 '<meta name="description" content="'.$this->Config->Web['Title'].'" />'. 69 68 '<meta name="robots" content="all" />'. … … 80 79 echo('</td>'. 81 80 '</tr><tr>'. 82 '<td colspan="4" class="page-bottom"> AutoÅi: '.$this->Config->Web['Authors'].' '.$this->Links['SourceCode']->Get().'');81 '<td colspan="4" class="page-bottom">'.$this->Language->Texts['autors'].': '.$this->Config->Web['Authors'].' '.$this->Links['SourceCode']->Get().''); 83 82 84 83 echo('</td></tr>'); -
trunk/class/Messages.php
r9 r11 30 30 return 'notfound'; 31 31 } 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 34 37 } 35 //returns 36 public function GetGet() { 37 } 38 38 39 39 40 } -
trunk/class/User.php
r10 r11 20 20 function __construct($Database) 21 21 { 22 $this->Database = $Database; 22 23 if(isset($_SESSION)) $this->Restore(); 23 24 else $this->SetAnonymous(); … … 31 32 function Login($Name, $Password) 32 33 { 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`')); 35 36 if($DbResult->num_rows > 0) 36 37 { … … 46 47 { 47 48 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); 49 50 $this->SetAnonymous(); 50 51 } … … 52 53 function Load() 53 54 { 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); 55 56 $User = $DbResult->fetch_assoc(); 56 57 // Security: Password and Salt hash should not be loaded to variables … … 110 111 { 111 112 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); 113 114 } 114 115 }
Note:
See TracChangeset
for help on using the changeset viewer.