Changeset 843 for trunk/Modules/User
- Timestamp:
- Jan 14, 2016, 10:25:47 PM (9 years ago)
- Location:
- trunk/Modules/User
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/User/Profile.php
r837 r843 159 159 T('Level:').' <strong>'.$XP['Level'].'</strong> '.T('experience:').' '.ProgressBar(150, round($XP['XP'] / $XP['MaxXP'] * 100, 2), $XP['XP'].' / '.$XP['MaxXP']).'<br/>'; 160 160 if($UserLine['TeamName'] != '') 161 $Output .= T('Member of team:').' <a href=" team/?action=team&id='.$UserLine['Team'].'"><strong>'.$UserLine['TeamName'].'</strong></a><br />';161 $Output .= T('Member of team:').' <a href="'.$this->System->Link('/team/?action=team&id='.$UserLine['Team']).'"><strong>'.$UserLine['TeamName'].'</strong></a><br />'; 162 162 163 163 // User tags … … 222 222 'Prohlížeč: <strong>'.$UserLine['UserAgent'].'</strong><br />'. 223 223 'Email: <strong>'.$UserLine['Email'].'</strong><br />'; 224 $Output .= '<br/><form action=" user.php" method="post"><div>'.224 $Output .= '<br/><form action="'.$this->System->Link('/user/').'" method="post"><div>'. 225 225 'Napsat E-mail:'. 226 226 '<input type="text" name="email" value="'.$UserLine['Email'].'" /><br/>'. -
trunk/Modules/User/Registration.php
r837 r843 19 19 <fieldset><legend>'.T('New user registration').'</legend> 20 20 <table> 21 <tr><td colspan="2">'.T('Please read carefully <a href=" info.php">translation guidelines</a> and follow them. Translate with diacritics!').'<br/><br/></td></tr>21 <tr><td colspan="2">'.T('Please read carefully <a href="'.$this->System->Link('/info/').'">translation guidelines</a> and follow them. Translate with diacritics!').'<br/><br/></td></tr> 22 22 <tr> 23 23 <th class="Left">'.T('Are you human?').'</th>'; -
trunk/Modules/User/User.php
r838 r843 22 22 { 23 23 $this->System->User = new User($this->System); 24 $this->System->RegisterPage('user list.php', 'PageUserList');25 $this->System->RegisterPage(' Options.php', 'PageUserOptions');26 $this->System->RegisterPage('registra ce.php', 'PageUserRegistration');27 $this->System->RegisterPage('user .php', 'PageUserProfile');24 $this->System->RegisterPage('users', 'PageUserList'); 25 $this->System->RegisterPage('options', 'PageUserOptions'); 26 $this->System->RegisterPage('registration', 'PageUserRegistration'); 27 $this->System->RegisterPage('user', 'PageUserProfile'); 28 28 $this->System->RegisterPage('login', 'PageUserLogin'); 29 29 $this->System->RegisterMenuItem(array( 30 30 'Title' => T('Translators'), 31 31 'Hint' => 'Seznam registrovaných uživatelů', 32 'Link' => $this->System->Link('/user list.php'),32 'Link' => $this->System->Link('/users/'), 33 33 'Permission' => LICENCE_ANONYMOUS, 34 34 'Icon' => '', … … 36 36 if(array_key_exists('Search', $this->System->ModuleManager->Modules)) 37 37 $this->System->ModuleManager->Modules['Search']->RegisterSearch('user', 38 T('Translators'), array('Name'), '`User`', $this->System->Link('/user list.php?search='));38 T('Translators'), array('Name'), '`User`', $this->System->Link('/users/?search=')); 39 39 } 40 40 … … 43 43 $Output = T('Online translators').':<br />'; 44 44 $DbResult = $this->System->Database->query('SELECT * FROM ('. 45 'SELECT `User`.`Name`, `User`.`ID` FROM `UserOnline` '.46 47 48 45 'SELECT `User`.`Name`, `User`.`ID` FROM `UserOnline` '. 46 'JOIN `User` ON `User`.`ID` = `UserOnline`.`User` '. 47 'WHERE (`ActivityTime` >= NOW() - 300) '. 48 'ORDER BY `ActivityTime` DESC ) AS `T` GROUP BY `Name`'); 49 49 while($DbUser = $DbResult->fetch_assoc()) 50 50 { 51 $Name = '<a href="'.$this->System->Link('/user .php?user='.$DbUser['ID']).'">'.$DbUser['Name'].'</a>';51 $Name = '<a href="'.$this->System->Link('/user/?user='.$DbUser['ID']).'">'.$DbUser['Name'].'</a>'; 52 52 $Output .= $Name.'<br />'; 53 53 } … … 124 124 // Prepare cookies for permanent login 125 125 $StayLoggedSalt = $this->GetPasswordSalt(); 126 $this->Database->update('UserOnline', ' SessionId="'.$SID.'"', array(126 $this->Database->update('UserOnline', '`SessionId`="'.$SID.'"', array( 127 127 'User' => $User['ID'], 'StayLogged' => $StayLogged, 'StayLoggedHash' => $StayLoggedSalt)); 128 128 if($StayLogged) 129 129 { 130 setcookie('LoginUserId', $User['ID'], time() +365*24*60*60);131 setcookie('LoginHash', sha1($User['ID'].$StayLoggedSalt), time() +365*24*60*60);130 setcookie('LoginUserId', $User['ID'], time() + 365 * 24 * 60 * 60); 131 setcookie('LoginHash', sha1($User['ID'].$StayLoggedSalt), time() + 365 * 24 * 60 * 60); 132 132 } else { 133 133 setcookie('LoginUserId', '', time() - 3600); … … 150 150 if($this->Role != LICENCE_ANONYMOUS) 151 151 { 152 $this->Database->update('UserOnline', ' SessionId="'.$SID.'"', array('User' => null));152 $this->Database->update('UserOnline', '`SessionId`="'.$SID.'"', array('User' => null)); 153 153 $this->Database->query('UPDATE `UserTrace` SET '. 154 154 '`LastLogout` = NOW() WHERE `User` = '.$this->Id); -
trunk/Modules/User/UserList.php
r826 r843 61 61 { 62 62 $XP = GetLevelMinMax($Line['XP']); 63 $Output .= '<tr><td><a href=" user.php?user='.$Line['ID'].'">'.$Line['Name'].'</a></td>'.64 '<td style="text-align: center;"><a href=" TranslationList.php?user='.$Line['ID'].'&group=0&state=2" title="Zobrazit Všechny jeho přeložené texty">'.$Line['TranslatedCount'].'</a></td>'.63 $Output .= '<tr><td><a href="'.$this->System->Link('/user/?user='.$Line['ID']).'">'.$Line['Name'].'</a></td>'. 64 '<td style="text-align: center;"><a href="'.$this->System->Link('/TranslationList.php?user='.$Line['ID'].'&group=0&state=2').'" title="Zobrazit Všechny jeho přeložené texty">'.$Line['TranslatedCount'].'</a></td>'. 65 65 '<td>'.$XP['Level'].'</td>'. 66 66 '<td>'.ProgressBar(150, round($XP['XP'] / $XP['MaxXP'] * 100, 2), $XP['XP'].' / '.$XP['MaxXP']).'</td>'.
Note:
See TracChangeset
for help on using the changeset viewer.