Changeset 880 for trunk/Modules/User/Profile.php
- Timestamp:
- Apr 7, 2020, 10:15:48 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/User/Profile.php
r861 r880 6 6 { 7 7 $Output = ''; 8 if (array_key_exists('text', $_POST))9 if ($this->System->User->Licence(LICENCE_ADMIN))8 if (array_key_exists('text', $_POST)) 9 if ($this->System->User->Licence(LICENCE_ADMIN)) 10 10 { 11 11 $Text = $_POST['text']; … … 16 16 'Text: <strong>'.$Text.'</strong><br />'; 17 17 18 if (@mail($Email, $Subject, $Text, 'From: '.$this->System->Config['Web']['AdminEmail'].18 if (@mail($Email, $Subject, $Text, 'From: '.$this->System->Config['Web']['AdminEmail']. 19 19 '\nReply-To: '.$this->System->Config['Web']['AdminEmail'].'\nX-Mailer: PHP/')) 20 20 { … … 23 23 else $Output .= ShowMessage('Nepodařilo se odesat E-mail.', MESSAGE_CRITICAL); 24 24 } else $Output .= ShowMessage(T('Access denied'), MESSAGE_CRITICAL); 25 return ($Output);25 return $Output; 26 26 } 27 27 … … 57 57 '(SELECT COUNT(*) FROM `ExportUser` WHERE `ExportUser`.`Export`=`Export`.`Id`) AS `UserCount` FROM `Export` '. 58 58 'LEFT JOIN `User` ON `User`.`ID`=`Export`.`User` '.$Filter.$Order['SQL'].$PageList['SQLLimit']); 59 while ($Export = $DbResult->fetch_assoc())59 while ($Export = $DbResult->fetch_assoc()) 60 60 { 61 61 $Action = '<a href="'.$this->System->Link('/export/?Action=View&ExportId='.$Export['Id'].'&Tab=0').'">'.T('Show').'</a> '. 62 62 '<a href="'.$this->System->Link('/export/?Action=View&ExportId='.$Export['Id'].'&Tab=7').'">'.T('Export').'</a>'; 63 if ($Export['User'] == $this->System->User->Id) $Action .= ' <a href="?Action=Delete&ExportId='.$Export['Id'].'" onclick="return confirmAction(\''.T('Really remove item?').'\');">'.T('Remove').'</a>';64 if ($this->System->User->Id != null) $Action .= ' <a href="'.$this->System->Link('/export/?Action=Clone&ExportId='.$Export['Id']).'" onclick="return confirmAction(\''.T('Really clone item?').'\');">'.T('Clone').'</a>';63 if ($Export['User'] == $this->System->User->Id) $Action .= ' <a href="?Action=Delete&ExportId='.$Export['Id'].'" onclick="return confirmAction(\''.T('Really remove item?').'\');">'.T('Remove').'</a>'; 64 if ($this->System->User->Id != null) $Action .= ' <a href="'.$this->System->Link('/export/?Action=Clone&ExportId='.$Export['Id']).'" onclick="return confirmAction(\''.T('Really clone item?').'\');">'.T('Clone').'</a>'; 65 65 $Output .= '<tr><td>'.HumanDate($Export['TimeCreate']).'</td>'. 66 66 '<td>'.htmlspecialchars($Export['Title']).'</td>'. … … 74 74 75 75 $Output .= '<div style="text-align: center;"><a href="'.$this->System->Link('/export/').'">'.T('Export page').'</a></div>'; 76 return ($Output);76 return $Output; 77 77 } 78 78 … … 86 86 $UnionItems = array(); 87 87 $DbResult = $this->Database->query($GroupListQuery); 88 if ($DbResult->num_rows > 0)89 { 90 while ($DbRow = $DbResult->fetch_assoc())88 if ($DbResult->num_rows > 0) 89 { 90 while ($DbRow = $DbResult->fetch_assoc()) 91 91 { 92 92 $UnionItems[] = 'SELECT `T`.`ID`, `T`.`Take`, `T`.`User`, `T`.`ModifyTime`, `T`.`Group`, `T`.`GroupName` '. … … 106 106 $Output .= '<table class="BaseTable"><tr>'. 107 107 '<th>'.T('Date').'</th><th>'.T('New').'</th><th>'.T('Source').'</th><th>'.T('Group').'</th></tr>'; 108 while ($DbRow = $DbResult->fetch_assoc())108 while ($DbRow = $DbResult->fetch_assoc()) 109 109 { 110 110 $Output .= '<tr><td>'.HumanDate($DbRow['ModifyTime']).'</td>'. … … 115 115 $Output .= '</table>'; 116 116 } 117 return ($Output);117 return $Output; 118 118 } 119 119 … … 130 130 'JOIN `ForumThread` ON `ForumThread`.`ID` = `ForumText`.`Thread` '. 131 131 'WHERE `ForumText`.`User` = '.($_GET['user'] * 1).' ORDER BY `ForumText`.`Date` DESC LIMIT '.$Count); 132 while ($Line = $DbResult->fetch_assoc())132 while ($Line = $DbResult->fetch_assoc()) 133 133 $Output .= '<div><a href="'.$this->System->Link('/forum/?Thread='.$Line['Thread']).'">'.htmlspecialchars($Line['ThreadName']).'</a><br />'. 134 134 '<strong>'.$Line['UserName'].'</strong> ('.HumanDate($Line['Date']).'): '.$parser->qparse(htmlspecialchars($Line['Text'])).'</div> '; 135 135 $Output .= '</div>'; 136 return ($Output);136 return $Output; 137 137 } 138 138 … … 151 151 'WHERE `User`.`Id` = '.($_GET['user'] * 1); 152 152 $DbResult = $this->Database->query($Query); 153 if ($DbResult->num_rows > 0)153 if ($DbResult->num_rows > 0) 154 154 { 155 155 $UserLine = $DbResult->fetch_array(); … … 163 163 T('Number of translated:').' <a href="'.$this->System->Link('/TranslationList.php?user='.$UserLine['ID'].'&state=2&group=0').'" title="Zobrazit Všechny jeho přeložené texty"><strong>'.$UserLine['TranslatedCount'].'</strong></a><br />'. 164 164 T('Level:').' <strong>'.$XP['Level'].'</strong> '.T('experience:').' '.ProgressBar(150, round($XP['XP'] / $XP['MaxXP'] * 100, 2), $XP['XP'].' / '.$XP['MaxXP']).'<br/>'; 165 if ($this->System->ModuleManager->ModuleRunning('Team') and ($UserLine['TeamName'] != ''))165 if ($this->System->ModuleManager->ModuleRunning('Team') and ($UserLine['TeamName'] != '')) 166 166 $Output .= T('Member of team:').' <a href="'.$this->System->Link('/team/?action=team&id='.$UserLine['Team']).'"><strong>'.htmlspecialchars($UserLine['TeamName']).'</strong></a><br />'; 167 167 … … 187 187 '</tr></table>'; 188 188 $Output .= '<br />'.$this->ShowLastForum().'<br />'; 189 if ($this->System->User->Licence(LICENCE_MODERATOR))189 if ($this->System->User->Licence(LICENCE_MODERATOR)) 190 190 { 191 191 $Output .= '<fieldset><legend>Moderování</legend>'; … … 243 243 } 244 244 } else $Output .= ShowMessage('Uživatel nenalezen', MESSAGE_CRITICAL); 245 return ($Output);245 return $Output; 246 246 } 247 247 … … 250 250 $this->Title = T('User profile'); 251 251 $Output = $this->SendMail(); 252 if (array_key_exists('user', $_GET))252 if (array_key_exists('user', $_GET)) 253 253 { 254 254 $Output .= $this->ShowProfile(); 255 255 } else $Output .= ShowMessage('Nevybrán uživatel', MESSAGE_CRITICAL); 256 return ($Output);256 return $Output; 257 257 } 258 258 }
Note:
See TracChangeset
for help on using the changeset viewer.