Changeset 893 for trunk/Modules/User/Profile.php
- Timestamp:
- Mar 6, 2023, 1:48:45 AM (22 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/User/Profile.php
r892 r893 5 5 function SendMail() 6 6 { 7 $User = ModuleUser::Cast($this->System->GetModule('User'))->User; 7 8 $Output = ''; 8 9 if (array_key_exists('text', $_POST)) 9 if ($ this->System->User->Licence(LICENCE_ADMIN))10 if ($User->Licence(LICENCE_ADMIN)) 10 11 { 11 12 $Text = $_POST['text']; … … 16 17 'Text: <strong>'.$Text.'</strong><br />'; 17 18 18 if (@mail($Email, $Subject, $Text, 'From: '. $this->System->Config['Web']['AdminEmail'].19 '\nReply-To: '. $this->System->Config['Web']['AdminEmail'].'\nX-Mailer: PHP/'))19 if (@mail($Email, $Subject, $Text, 'From: '.Core::Cast($this->System)->Config['Web']['AdminEmail']. 20 '\nReply-To: '.Core::Cast($this->System)->Config['Web']['AdminEmail'].'\nX-Mailer: PHP/')) 20 21 { 21 22 $Output .= ShowMessage(T('Message was sent')); … … 29 30 { 30 31 $Output = ''; 32 $User = ModuleUser::Cast($this->System->GetModule('User'))->User; 31 33 $Filter = ' WHERE `Export`.`User` = '.($_GET['user'] * 1); 32 34 $DbResult = $this->System->Database->query('SELECT COUNT(*) FROM `Export` '.$Filter); … … 61 63 $Action = '<a href="'.$this->System->Link('/export/?Action=View&ExportId='.$Export['Id'].'&Tab=0').'">'.T('Show').'</a> '. 62 64 '<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>';65 if ($Export['User'] == $User->Id) $Action .= ' <a href="?Action=Delete&ExportId='.$Export['Id'].'" onclick="return confirmAction(\''.T('Really remove item?').'\');">'.T('Remove').'</a>'; 66 if ($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 67 $Output .= '<tr><td>'.HumanDate($Export['TimeCreate']).'</td>'. 66 68 '<td>'.htmlspecialchars($Export['Title']).'</td>'. … … 95 97 $DbRow['TablePrefix'].'` AS `T` '. 96 98 'WHERE (`T`.`Complete` = 1) AND '. 97 '(`T`.`Language` != '. $this->System->Config['OriginalLanguage'].') AND '.99 '(`T`.`Language` != '.Core::Cast($this->System)->Config['OriginalLanguage'].') AND '. 98 100 '(`T`.`User` = '.($_GET['user'] * 1).') ORDER BY `T`.`ModifyTime` DESC LIMIT '. 99 101 $Count.') AS `T`'; … … 139 141 { 140 142 $Output = ''; 143 $User = ModuleUser::Cast($this->System->GetModule('User'))->User; 141 144 $Query = 'SELECT `User`.`Name`, `UserTrace`.`LastLogin`, `UserTrace`.`LastIP`, '. 142 145 '`User`.`Email`, `UserTrace`.`UserAgent`, `User`.`PreferredVersion`, '. … … 190 193 '</tr></table>'; 191 194 $Output .= '<br />'.$this->ShowLastForum().'<br />'; 192 if ($ this->System->User->Licence(LICENCE_MODERATOR))195 if ($User->Licence(LICENCE_MODERATOR)) 193 196 { 194 197 $Output .= '<fieldset><legend>Moderování</legend>'; … … 239 242 '<input type="text" name="email" value="'.$UserLine['Email'].'" /><br/>'. 240 243 'Předmět:'. 241 '<input type="text" name="subject" value="'. $this->System->Config['Web']['Title'].'" />'.244 '<input type="text" name="subject" value="'.Core::Cast($this->System)->Config['Web']['Title'].'" />'. 242 245 '<br />'. 243 246 '<textarea name="text" rows="20" cols="62">'. 244 247 ''."\n". 245 'S pozdravem '.$ this->System->User->Name."\n".248 'S pozdravem '.$User->Name."\n". 246 249 '--------------------------------------------------------'."\n". 247 $this->System->Config['Web']['Title'].' '.$this->System->Config['Web']['Host'].$this->System->Link('/')."\n".250 Core::Cast($this->System)->Config['Web']['Title'].' '.Core::Cast($this->System)->Config['Web']['Host'].$this->System->Link('/')."\n". 248 251 '</textarea><br/>'. 249 252 '<input type="submit" value="Odeslat" />'.
Note:
See TracChangeset
for help on using the changeset viewer.