Ignore:
Timestamp:
Apr 7, 2020, 10:15:48 PM (4 years ago)
Author:
chronos
Message:
  • Modified: Improved code formatting.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Modules/User/Profile.php

    r861 r880  
    66  {
    77    $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))
    1010    {
    1111      $Text = $_POST['text'];
     
    1616        'Text: <strong>'.$Text.'</strong><br />';
    1717
    18       if(@mail($Email, $Subject, $Text, 'From: '.$this->System->Config['Web']['AdminEmail'].
     18      if (@mail($Email, $Subject, $Text, 'From: '.$this->System->Config['Web']['AdminEmail'].
    1919        '\nReply-To: '.$this->System->Config['Web']['AdminEmail'].'\nX-Mailer: PHP/'))
    2020      {
     
    2323      else $Output .= ShowMessage('Nepodařilo se odesat E-mail.', MESSAGE_CRITICAL);
    2424    } else $Output .= ShowMessage(T('Access denied'), MESSAGE_CRITICAL);
    25     return($Output);
     25    return $Output;
    2626  }
    2727
     
    5757      '(SELECT COUNT(*) FROM `ExportUser` WHERE `ExportUser`.`Export`=`Export`.`Id`) AS `UserCount` FROM `Export` '.
    5858      '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())
    6060    {
    6161      $Action = '<a href="'.$this->System->Link('/export/?Action=View&amp;ExportId='.$Export['Id'].'&amp;Tab=0').'">'.T('Show').'</a> '.
    6262        '<a href="'.$this->System->Link('/export/?Action=View&amp;ExportId='.$Export['Id'].'&amp;Tab=7').'">'.T('Export').'</a>';
    63       if($Export['User'] == $this->System->User->Id) $Action .= ' <a href="?Action=Delete&amp;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&amp;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&amp;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&amp;ExportId='.$Export['Id']).'" onclick="return confirmAction(\''.T('Really clone item?').'\');">'.T('Clone').'</a>';
    6565      $Output .= '<tr><td>'.HumanDate($Export['TimeCreate']).'</td>'.
    6666        '<td>'.htmlspecialchars($Export['Title']).'</td>'.
     
    7474
    7575    $Output .= '<div style="text-align: center;"><a href="'.$this->System->Link('/export/').'">'.T('Export page').'</a></div>';
    76     return($Output);
     76    return $Output;
    7777  }
    7878
     
    8686    $UnionItems = array();
    8787    $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())
    9191      {
    9292        $UnionItems[] = 'SELECT `T`.`ID`, `T`.`Take`, `T`.`User`, `T`.`ModifyTime`, `T`.`Group`, `T`.`GroupName` '.
     
    106106      $Output .= '<table class="BaseTable"><tr>'.
    107107        '<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())
    109109      {
    110110        $Output .= '<tr><td>'.HumanDate($DbRow['ModifyTime']).'</td>'.
     
    115115      $Output .= '</table>';
    116116    }
    117     return($Output);
     117    return $Output;
    118118  }
    119119
     
    130130      'JOIN `ForumThread` ON `ForumThread`.`ID` = `ForumText`.`Thread` '.
    131131      '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())
    133133      $Output .= '<div><a href="'.$this->System->Link('/forum/?Thread='.$Line['Thread']).'">'.htmlspecialchars($Line['ThreadName']).'</a><br />'.
    134134        '<strong>'.$Line['UserName'].'</strong> ('.HumanDate($Line['Date']).'): '.$parser->qparse(htmlspecialchars($Line['Text'])).'</div> ';
    135135    $Output .= '</div>';
    136     return($Output);
     136    return $Output;
    137137  }
    138138
     
    151151      'WHERE `User`.`Id` = '.($_GET['user'] * 1);
    152152    $DbResult = $this->Database->query($Query);
    153     if($DbResult->num_rows > 0)
     153    if ($DbResult->num_rows > 0)
    154154    {
    155155      $UserLine = $DbResult->fetch_array();
     
    163163        T('Number of translated:').' <a href="'.$this->System->Link('/TranslationList.php?user='.$UserLine['ID'].'&amp;state=2&amp;group=0').'" title="Zobrazit Všechny jeho přeložené texty"><strong>'.$UserLine['TranslatedCount'].'</strong></a><br />'.
    164164        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'] != ''))
    166166        $Output .= T('Member of team:').' <a href="'.$this->System->Link('/team/?action=team&amp;id='.$UserLine['Team']).'"><strong>'.htmlspecialchars($UserLine['TeamName']).'</strong></a><br />';
    167167
     
    187187      '</tr></table>';
    188188    $Output .= '<br />'.$this->ShowLastForum().'<br />';
    189     if($this->System->User->Licence(LICENCE_MODERATOR))
     189    if ($this->System->User->Licence(LICENCE_MODERATOR))
    190190    {
    191191      $Output .= '<fieldset><legend>Moderování</legend>';
     
    243243      }
    244244    } else $Output .= ShowMessage('Uživatel nenalezen', MESSAGE_CRITICAL);
    245     return($Output);
     245    return $Output;
    246246  }
    247247
     
    250250    $this->Title = T('User profile');
    251251    $Output = $this->SendMail();
    252     if(array_key_exists('user', $_GET))
     252    if (array_key_exists('user', $_GET))
    253253    {
    254254      $Output .= $this->ShowProfile();
    255255    } else $Output .= ShowMessage('Nevybrán uživatel', MESSAGE_CRITICAL);
    256     return($Output);
     256    return $Output;
    257257  }
    258258}
Note: See TracChangeset for help on using the changeset viewer.