- Timestamp:
- Mar 11, 2010, 11:14:05 AM (15 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/TranslationList.php
r376 r378 65 65 <strong>Vypsání souvislostí ze skupiny '.$Line['Name'].'</strong><br /><br />'); 66 66 67 WriteQuests('SELECT *, (SELECT ` sub`.`User` FROM `'.$Table.'` AS `sub` WHERE (`sub`.`Entry` = `'.$Table.'`.`Entry`) AND (`Language` <> 0) LIMIT 1) AS `UserID`, (SELECT `User`.`Name` FROM `User` WHERE `User`.`ID` = `UserID`) AS `UserName` FROM `'.$Table.'` WHERE (`Language` = 0) AND (`Entry` IN(SELECT `Entry` FROM `connexion_item` WHERE `connexion` = '.$_SESSION['connexion_id'].') AND `VersionEnd` = "'.$BuildNumber_max.'" AND `VersionEnd` = "'.$BuildNumber_max.'"');67 WriteQuests('SELECT *, (SELECT `Sub`.`User` FROM `'.$Table.'` AS `Sub` WHERE (`Sub`.`Entry` = `'.$Table.'`.`Entry`) AND (`Language` <> 0) LIMIT 1) AS `UserID`, (SELECT `User`.`Name` FROM `User` WHERE `User`.`ID` = `UserID`) AS `UserName` FROM `'.$Table.'` WHERE (`Language` = 0) AND (`Entry` IN(SELECT `Entry` FROM `connexion_item` WHERE `connexion` = '.$_SESSION['connexion_id'].')) AND (`VersionEnd` = "'.$BuildNumber_max.'") AND (`VersionEnd` = "'.$BuildNumber_max.'")'); 68 68 } 69 69 -
trunk/includes/user.php
r377 r378 37 37 $this->Load(); 38 38 WriteLog('Login: '.$Name, LOG_TYPE_USER); 39 40 // Záznam o aktivitě 41 if(array_key_exists('REMOTE_ADDR', $_SERVER)) 42 $Database->SQLCommand('UPDATE `User` SET `LastIP` = "'.$_SERVER['REMOTE_ADDR'].'", `LastLogin` = NOW() WHERE `ID` = '.$this->Id); 39 $this->UpdateState(); 43 40 } else $ŧhis->Role = LICENCE_ANONYMOUS; 44 41 } … … 59 56 $DbResult = $Database->SQLCommand('SELECT * FROM `User` WHERE `ID` = '.$this->Id); 60 57 $User = mysql_fetch_assoc($DbResult); 58 // Security: Password and Salt hash should not be loaded to variables 61 59 $this->Id = $User['ID']; 62 60 $this->Team = $User['Team']; … … 73 71 { 74 72 $this->Id = $_SESSION['UserId']; 75 if($this->Id != 0) $this->Load(); 76 else $this->SetAnonymous(); 73 if($this->Id != 0) 74 { 75 $this->Load(); 76 $this->UpdateState(); 77 } else $this->SetAnonymous(); 77 78 } else $this->SetAnonymous(); 78 79 } … … 111 112 return('sha1(CONCAT(sha1('.$Password.'), '.$Salt.'))'); 112 113 } 114 115 function UpdateState() 116 { 117 global $Database; 118 119 if(array_key_exists('REMOTE_ADDR', $_SERVER)) 120 $Database->SQLCommand('UPDATE `User` SET `LastIP` = "'.$_SERVER['REMOTE_ADDR'].'", `LastLogin` = NOW() WHERE `ID` = '.$this->Id); 121 } 113 122 } 114 123 -
trunk/userlist.php
r376 r378 34 34 35 35 $TableColumns = array( 36 array('Name' => ' User', 'Title' => 'Jméno'),36 array('Name' => 'Name', 'Title' => 'Jméno'), 37 37 array('Name' => 'TranslatedCount', 'Title' => 'Přeložených'), 38 38 array('Name' => 'XP', 'Title' => 'Úroveň'),
Note:
See TracChangeset
for help on using the changeset viewer.