Changeset 873 for trunk/Modules/User


Ignore:
Timestamp:
Apr 6, 2020, 11:17:40 PM (5 years ago)
Author:
chronos
Message:
  • Modified: Improved code format.
Location:
trunk/Modules/User
Files:
4 edited

Legend:

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

    r858 r873  
    122122    /*
    123123
    124      if($this->InstalledVersion == '1.0') {
     124     if ($this->InstalledVersion == '1.0') {
    125125      $this->System->Database->Query('SELECT * FROM User WHERE Id=1');
    126126      $this->InstalledVersion = '1.1';
     
    132132  {
    133133    $this->System->User = new User($this->System);
    134     if(isset($_SERVER['REMOTE_ADDR'])) $this->System->User->Check();
     134    if (isset($_SERVER['REMOTE_ADDR'])) $this->System->User->Check();
    135135    $this->System->RegisterPage('userlist', 'PageUserList');
    136136    $this->System->RegisterPage('user', 'PageUser');
     
    290290  function TopBarCallback()
    291291  {
    292     if($this->System->User->User['Id'] == null)
     292    if ($this->System->User->User['Id'] == null)
    293293    {
    294294      $Output = '<a href="'.$this->System->Link('/user/?Action=LoginForm').'">Přihlášení</a> '.
     
    301301      //   <a href="'.$this->System->Link('/?Action=UserOptions').'">Nastavení</a>';
    302302    }
    303     return($Output);
     303    return ($Output);
    304304  }
    305305}
  • trunk/Modules/User/UserList.php

    r833 r873  
    99  function Show()
    1010  {
    11     if(!$this->System->User->CheckPermission('User', 'ShowList'))
    12       return('Nemáte oprávnění');
     11    if (!$this->System->User->CheckPermission('User', 'ShowList'))
     12      return ('Nemáte oprávnění');
    1313
    1414    $DbResult = $this->Database->query('SELECT COUNT(*) FROM `User`');
     
    3030
    3131    $DbResult = $this->Database->query($Query);
    32     while($User = $DbResult->fetch_assoc())
     32    while ($User = $DbResult->fetch_assoc())
    3333    {
    3434      $Devices = array();
    3535      $DbResult2 = $this->Database->query('SELECT `Id` FROM `Member` WHERE `Member`.`ResponsibleUser` = '.$User['Id']);
    36       while($Member = $DbResult2->fetch_assoc())
     36      while ($Member = $DbResult2->fetch_assoc())
    3737      {
    3838        $DbResult3 = $this->Database->query('SELECT `Name`, `Id` FROM `NetworkDevice` '.
    3939          'WHERE `Member` = '.$Member['Id'].' AND `Used`=1 ORDER BY `Name`');
    40         while($Device = $DbResult3->fetch_assoc())
     40        while ($Device = $DbResult3->fetch_assoc())
    4141        {
    4242          $Devices[] = $Device['Name'];
     
    5252    $Output .= $PageList['Output'];
    5353
    54     return($Output);
     54    return ($Output);
    5555  }
    5656}
  • trunk/Modules/User/UserModel.php

    r828 r873  
    3030  function Hash($Password, $Salt)
    3131  {
    32     return(sha1(sha1($Password).$Salt));
     32    return (sha1(sha1($Password).$Salt));
    3333  }
    3434
    3535  function Verify($Password, $Salt, $StoredHash)
    3636  {
    37     return($this->Hash($Password, $Salt) == $StoredHash);
     37    return ($this->Hash($Password, $Salt) == $StoredHash);
    3838  }
    3939
     
    7171    // Lookup user record
    7272    $Query = $this->Database->select('UserOnline', '*', 'SessionId="'.$SID.'"');
    73     if($Query->num_rows > 0)
     73    if ($Query->num_rows > 0)
    7474    {
    7575      // Refresh time of last access
     
    8181
    8282    // Logged permanently?
    83     if(array_key_exists('LoginHash', $_COOKIE))
     83    if (array_key_exists('LoginHash', $_COOKIE))
    8484    {
    8585      $DbResult = $this->Database->query('SELECT * FROM `UserOnline` WHERE `User`='.$_COOKIE['LoginUserId'].
    8686        ' AND `StayLogged`=1 AND SessionId!="'.$SID.'"');
    87       if($DbResult->num_rows > 0)
     87      if ($DbResult->num_rows > 0)
    8888      {
    8989        $DbRow = $DbResult->fetch_assoc();
    90         if(sha1($_COOKIE['LoginUserId'].$DbRow['StayLoggedHash']) == $_COOKIE['LoginHash'])
     90        if (sha1($_COOKIE['LoginUserId'].$DbRow['StayLoggedHash']) == $_COOKIE['LoginHash'])
    9191        {
    9292          $this->Database->query('DELETE FROM `UserOnline` WHERE `SessionId`="'.$SID.'"');
     
    9999    $Query = $this->Database->select('UserOnline', '*', '`SessionId`="'.$SID.'"');
    100100    $Row = $Query->fetch_assoc();
    101     if($Row['User'] != '')
     101    if ($Row['User'] != '')
    102102    {
    103103      $Query = $this->Database->query('SELECT `User`.*, `UserCustomerRel`.`Customer` AS `Member` FROM `User` '.
     
    114114    // Remove nonactive users
    115115    $DbResult = $this->Database->select('UserOnline', '`Id`, `User`', '(`ActivityTime` < DATE_SUB(NOW(), INTERVAL '.$this->OnlineStateTimeout.' SECOND)) AND (`StayLogged` = 0)');
    116     while($DbRow = $DbResult->fetch_array())
     116    while ($DbRow = $DbResult->fetch_array())
    117117    {
    118118      $this->Database->delete('UserOnline', 'Id='.$DbRow['Id']);
    119       if($DbRow['User'] != null) $this->System->ModuleManager->Modules['Log']->NewRecord('User', 'Logout');
     119      if ($DbRow['User'] != null) $this->System->ModuleManager->Modules['Log']->NewRecord('User', 'Logout');
    120120    }
    121121    //$this->LoadPermission($this->User['Role']);
     
    127127  function Register($Login, $Password, $Password2, $Email, $Name)
    128128  {
    129     if(($Email == '') || ($Login == '') || ($Password == '') || ($Password2 == '')  || ($Name == '')) $Result = DATA_MISSING;
    130     else if($Password != $Password2) $Result = PASSWORDS_UNMATCHED;
     129    if (($Email == '') || ($Login == '') || ($Password == '') || ($Password2 == '')  || ($Name == '')) $Result = DATA_MISSING;
     130    else if ($Password != $Password2) $Result = PASSWORDS_UNMATCHED;
    131131    else
    132132    {
    133133      // Is user registred yet?
    134134      $Query = $this->Database->select('User', '*', 'Login = "'.$Login.'"');
    135       if($Query->num_rows > 0) $Result = LOGIN_USED;
     135      if ($Query->num_rows > 0) $Result = LOGIN_USED;
    136136      else
    137137      {
    138138        $Query = $this->Database->select('User', '*', 'Name = "'.$Name.'"');
    139         if($Query->num_rows > 0) $Result = NAME_USED;
     139        if ($Query->num_rows > 0) $Result = NAME_USED;
    140140        else
    141141        {
    142142          $Query = $this->Database->select('User', '*', 'Email = "'.$Email.'"');
    143           if($Query->num_rows > 0) $Result = EMAIL_USED;
     143          if ($Query->num_rows > 0) $Result = EMAIL_USED;
    144144          else
    145145          {
     
    177177      }
    178178    }
    179     return($Result);
     179    return ($Result);
    180180  }
    181181
     
    183183  {
    184184    $DbResult = $this->Database->select('User', 'Id, Login, Password', 'Id = '.$Id);
    185     if($DbResult->num_rows > 0)
     185    if ($DbResult->num_rows > 0)
    186186    {
    187187      $Row = $DbResult->fetch_array();
    188188      $NewPassword = substr(sha1(strtoupper($Row['Login'])), 0, 7);
    189       if($Hash == $NewPassword)
     189      if ($Hash == $NewPassword)
    190190      {
    191191        $this->Database->update('User', 'Id='.$Row['Id'], array('Locked' => 0));
     
    195195      } else $Output = PASSWORDS_UNMATCHED;
    196196    } else $Output = USER_NOT_FOUND;
    197     return($Output);
     197    return ($Output);
    198198  }
    199199
    200200  function Login($Login, $Password, $StayLogged = false)
    201201  {
    202     if($StayLogged) $StayLogged = 1; else $StayLogged = 0;
     202    if ($StayLogged) $StayLogged = 1; else $StayLogged = 0;
    203203    $SID = session_id();
    204204    $Query = $this->Database->select('User', '*', 'Login="'.$Login.'"');
    205     if($Query->num_rows > 0)
     205    if ($Query->num_rows > 0)
    206206    {
    207207      $Row = $Query->fetch_assoc();
    208208      $PasswordHash = new PasswordHash();
    209       if(!$PasswordHash->Verify($Password, $Row['Salt'], $Row['Password'])) $Result = BAD_PASSWORD;
    210       else if($Row['Locked'] == 1) $Result = ACCOUNT_LOCKED;
     209      if (!$PasswordHash->Verify($Password, $Row['Salt'], $Row['Password'])) $Result = BAD_PASSWORD;
     210      else if ($Row['Locked'] == 1) $Result = ACCOUNT_LOCKED;
    211211      else
    212212      {
     
    217217        $this->Database->update('UserOnline', 'SessionId="'.$SID.'"', array(
    218218          'User' => $Row['Id'], 'StayLogged' => $StayLogged, 'StayLoggedHash' => $StayLoggedSalt));
    219         if($StayLogged)
     219        if ($StayLogged)
    220220        {
    221221          setcookie('LoginUserId', $Row['Id'], time()+365*24*60*60, $this->System->Link('/'));
     
    231231      }
    232232    } else $Result = USER_NOT_REGISTRED;
    233     return($Result);
     233    return ($Result);
    234234  }
    235235
     
    240240    $this->System->ModuleManager->Modules['Log']->NewRecord('User', 'Logout', $this->User['Login']);
    241241    $this->Check();
    242     return(USER_LOGGED_OUT);
     242    return (USER_LOGGED_OUT);
    243243  }
    244244
     
    247247    $this->Roles = array();
    248248    $DbResult = $this->Database->select('UserRole', '*');
    249     while($DbRow = $DbResult->fetch_array())
     249    while ($DbRow = $DbResult->fetch_array())
    250250      $this->Roles[] = $DbRow;
    251251  }
     
    255255    $this->User['Permission'] = array();
    256256    $DbResult = $this->Database->query('SELECT `UserRolePermission`.*, `PermissionOperation`.`Description` FROM `UserRolePermission` JOIN `PermissionOperation` ON `PermissionOperation`.`Id` = `UserRolePermission`.`Operation` WHERE `UserRolePermission`.`Role` = '.$Role);
    257     if($DbResult->num_rows > 0)
    258     while($DbRow = $DbResult->fetch_array())
     257    if ($DbResult->num_rows > 0)
     258    while ($DbRow = $DbResult->fetch_array())
    259259      $this->User['Permission'][$DbRow['Operation']] = $DbRow;
    260260  }
     
    264264    $Result = array();
    265265    $DbResult = $this->Database->query('SELECT `UserRolePermission`.*, `PermissionOperation`.`Description`, `UserRole`.`Title` FROM `UserRolePermission` LEFT JOIN `PermissionOperation` ON `PermissionOperation`.`Id` = `UserRolePermission`.`Operation` LEFT JOIN `UserRole` ON `UserRole`.`Id` = `UserRolePermission`.`Role`');
    266     while($DbRow = $DbResult->fetch_array())
     266    while ($DbRow = $DbResult->fetch_array())
    267267    {
    268268      $Value = '';
    269       if($DbRow['Read']) $Value .= 'R';
    270       if($DbRow['Write']) $Value .= 'W';
     269      if ($DbRow['Read']) $Value .= 'R';
     270      if ($DbRow['Write']) $Value .= 'W';
    271271      $Result[$DbRow['Description']][$DbRow['Title']] = $Value;
    272272    }
    273     return($Result);
     273    return ($Result);
    274274  }
    275275
     
    278278    $PermissionExists = false;
    279279    // First try to check cache group-group relation
    280     if(array_key_exists($GroupId, $this->PermissionGroupCache))
     280    if (array_key_exists($GroupId, $this->PermissionGroupCache))
    281281    {
    282282      $PermissionExists = true;
     
    287287        '") AND (`AssignedGroup` IS NOT NULL)');
    288288      $DbRow = array();
    289       while($DbRow[] = $DbResult->fetch_array());
     289      while ($DbRow[] = $DbResult->fetch_array());
    290290        $this->PermissionGroupCache[$GroupId] = $DbRow;
    291291      $PermissionExists = true;
    292292    }
    293     if($PermissionExists)
    294     {
    295       foreach($this->PermissionGroupCache[$GroupId] as $DbRow)
    296       {
    297         if($DbRow['AssignedGroup'] != '')
    298         if($this->CheckGroupPermission($DbRow['AssignedGroup'], $OperationId) == true) return(true);
     293    if ($PermissionExists)
     294    {
     295      foreach ($this->PermissionGroupCache[$GroupId] as $DbRow)
     296      {
     297        if ($DbRow['AssignedGroup'] != '')
     298        if ($this->CheckGroupPermission($DbRow['AssignedGroup'], $OperationId) == true) return (true);
    299299      }
    300300    }
    301301
    302302    // Check group-operation relation
    303     if(array_key_exists($GroupId.','.$OperationId, $this->PermissionGroupCacheOp))
     303    if (array_key_exists($GroupId.','.$OperationId, $this->PermissionGroupCacheOp))
    304304    {
    305305      $PermissionExists = true;
     
    308308      // If no permission combination exists in cache, do new check of database items
    309309      $DbResult = $this->Database->select('PermissionGroupAssignment', '*', '`Group`="'.$GroupId.'" AND `AssignedOperation`="'.$OperationId.'"');
    310       if($DbResult->num_rows > 0) $this->PermissionGroupCacheOp[$GroupId.','.$OperationId] = true;
     310      if ($DbResult->num_rows > 0) $this->PermissionGroupCacheOp[$GroupId.','.$OperationId] = true;
    311311        else $this->PermissionGroupCacheOp[$GroupId.','.$OperationId] = false;
    312312      $PermissionExists = true;
    313313    }
    314     if($PermissionExists)
    315     {
    316       return($this->PermissionGroupCacheOp[$GroupId.','.$OperationId]);
    317     }
    318     return(false);
     314    if ($PermissionExists)
     315    {
     316      return ($this->PermissionGroupCacheOp[$GroupId.','.$OperationId]);
     317    }
     318    return (false);
    319319  }
    320320
     
    323323    // Get module id
    324324    $DbResult = $this->Database->select('Module', 'Id', '`Name`="'.$Module.'"');
    325     if($DbResult->num_rows > 0)
     325    if ($DbResult->num_rows > 0)
    326326    {
    327327      $DbRow = $DbResult->fetch_assoc();
    328328      $ModuleId = $DbRow['Id'];
    329     } else return(false);
     329    } else return (false);
    330330
    331331    // First try to check cache
    332     if(in_array(array($Module, $Operation, $ItemType, $ItemType), $this->PermissionCache))
     332    if (in_array(array($Module, $Operation, $ItemType, $ItemType), $this->PermissionCache))
    333333    {
    334334      $OperationId = array_search(array($Module, $Operation, $ItemType, $ItemIndex), $this->PermissionCache);
     
    339339      $DbResult = $this->Database->select('PermissionOperation', 'Id', '(`Module`="'.$ModuleId.
    340340        '") AND (`Item`="'.$ItemType.'") AND (`ItemId`='.$ItemIndex.') AND (`Operation`="'.$Operation.'")');
    341       if($DbResult->num_rows > 0)
     341      if ($DbResult->num_rows > 0)
    342342      {
    343343        $DbRow = $DbResult->fetch_array();
     
    352352    }
    353353
    354     if($PermissionExists)
    355     {
    356       if($this->User['Id'] == null) $UserCondition = '(`User` IS NULL)';
     354    if ($PermissionExists)
     355    {
     356      if ($this->User['Id'] == null) $UserCondition = '(`User` IS NULL)';
    357357        else $UserCondition = '(`User`="'.$this->User['Id'].'")';
    358358      // Check user-operation relation
    359359      $DbResult = $this->Database->select('PermissionUserAssignment', '*', $UserCondition.' AND (`AssignedOperation`="'.$OperationId.'")');
    360       if($DbResult->num_rows > 0) return(true);
     360      if ($DbResult->num_rows > 0) return (true);
    361361
    362362      // Check user-group relation
    363363      $DbResult = $this->Database->select('PermissionUserAssignment', 'AssignedGroup', $UserCondition);
    364       while($DbRow = $DbResult->fetch_array())
    365       {
    366        if($this->CheckGroupPermission($DbRow['AssignedGroup'], $OperationId) == true) return(true);
    367       }
    368       return(false);
    369     } else return(false);
     364      while ($DbRow = $DbResult->fetch_array())
     365      {
     366       if ($this->CheckGroupPermission($DbRow['AssignedGroup'], $OperationId) == true) return (true);
     367      }
     368      return (false);
     369    } else return (false);
    370370  }
    371371
     
    373373  {
    374374    $DbResult = $this->Database->select('User', 'Login, Name, Id, Email, Password', '`Login`="'.$Login.'" AND `Email`="'.$Email.'"');
    375     if($DbResult->num_rows > 0)
     375    if ($DbResult->num_rows > 0)
    376376    {
    377377      $Row = $DbResult->fetch_array();
     
    394394      $this->System->ModuleManager->Modules['Log']->NewRecord('User', 'PasswordRecoveryRequest', 'Login='.$Login.',Email='.$Email);
    395395    } else $Output = USER_PASSWORD_RECOVERY_FAIL;
    396     return($Output);
     396    return ($Output);
    397397  }
    398398
     
    400400  {
    401401    $DbResult = $this->Database->select('User', 'Id, Login, Password', 'Id = '.$Id);
    402     if($DbResult->num_rows > 0)
     402    if ($DbResult->num_rows > 0)
    403403    {
    404404      $Row = $DbResult->fetch_array();
    405405      $NewPassword2 = substr(sha1(strtoupper($Row['Login'])), 0, 7);
    406       if(($NewPassword == $NewPassword2) and ($Hash == $Row['Password']))
     406      if (($NewPassword == $NewPassword2) and ($Hash == $Row['Password']))
    407407      {
    408408        $PasswordHash = new PasswordHash();
     
    414414      } else $Output = PASSWORDS_UNMATCHED;
    415415    } else $Output = USER_NOT_FOUND;
    416     return($Output);
     416    return ($Output);
    417417  }
    418418
     
    420420  {
    421421    $DbResult = $this->Database->select('APIToken', 'User', '`Token`="'.$Token.'"');
    422     if($DbResult->num_rows > 0)
     422    if ($DbResult->num_rows > 0)
    423423    {
    424424      $DbRow = $DbResult->fetch_assoc();
    425425      $User = new User($this->System);
    426426      $User->User = array('Id' => $DbRow['User']);
    427       return($User->CheckPermission($Module, $Operation));
    428     } else return(false);
     427      return ($User->CheckPermission($Module, $Operation));
     428    } else return (false);
    429429  }
    430430}
  • trunk/Modules/User/UserPage.php

    r828 r873  
    99  function Panel($Title, $Content, $Menu = array())
    1010  {
    11     if(count($Menu) > 0)
    12       foreach($Menu as $Item)
     11    if (count($Menu) > 0)
     12      foreach ($Menu as $Item)
    1313        $Title .= '<div class="Action">'.$Item.'</div>';
    14     return('<div class="Panel"><div class="Title">'.$Title.'</div><div class="Content">'.$Content.'</div></div>');
     14    return ('<div class="Panel"><div class="Title">'.$Title.'</div><div class="Content">'.$Content.'</div></div>');
    1515  }
    1616
     
    3939
    4040    $DbResult = $this->Database->query($Query);
    41     while($Contact = $DbResult->fetch_assoc())
     41    while ($Contact = $DbResult->fetch_assoc())
    4242    {
    4343      $Output .= '<tr>'.
     
    5050    $Output .= $PageList['Output'];
    5151
    52     return($Output);
     52    return ($Output);
    5353  }
    5454
     
    5656  {
    5757    $Output = '';
    58     if($this->System->User->User['Id'] != null)
     58    if ($this->System->User->User['Id'] != null)
    5959    {
    6060      $Actions = '';
    61       foreach($this->System->ModuleManager->Modules['User']->UserPanel as $Action)
    62       {
    63         if(is_string($Action[0]))
     61      foreach ($this->System->ModuleManager->Modules['User']->UserPanel as $Action)
     62      {
     63        if (is_string($Action[0]))
    6464        {
    6565          $Class = new $Action[0]($this->System);
     
    7171      $Output .= $this->Panel('Nabídka uživatele', $Actions);
    7272      $Output .= '</td><td style="vertical-align:top;">';
    73       if($this->System->User->User['Id'] != null)
     73      if ($this->System->User->User['Id'] != null)
    7474        {
    7575          $Form = new Form($this->System->FormManager);
     
    8585      $Output .= '</td></tr></table></div>';
    8686    } else $Output .= $this->SystemMessage('Oprávnění', 'Nejste přihlášen');
    87     return($Output);
     87    return ($Output);
    8888  }
    8989
     
    9191  {
    9292    $Output = '';
    93     if(array_key_exists('Action', $_GET))
     93    if (array_key_exists('Action', $_GET))
    9494    {
    9595      $Action = $_GET['Action'];
    96       if($Action == 'LoginForm')
     96      if ($Action == 'LoginForm')
    9797      {
    9898        $Form = new Form($this->System->FormManager);
     
    103103        '<a href="?Action=PasswordRecovery">Obnova zapomenutého hesla</a></div>';
    104104      } else
    105       if($Action == 'Login')
    106       {
    107         if(array_key_exists('Username', $_POST) and array_key_exists('Password', $_POST))
     105      if ($Action == 'Login')
     106      {
     107        if (array_key_exists('Username', $_POST) and array_key_exists('Password', $_POST))
    108108        {
    109109          $Form = new Form($this->System->FormManager);
    110110          $Form->SetClass('UserLogin');
    111111          $Form->OnSubmit = '?Action=Login';
    112           if(array_key_exists('StayLogged', $_POST) and ($_POST['StayLogged'] == 'on')) $StayLogged = true;
     112          if (array_key_exists('StayLogged', $_POST) and ($_POST['StayLogged'] == 'on')) $StayLogged = true;
    113113            else $StayLogged = false;
    114114          $Result = $this->System->User->Login($_POST['Username'], $_POST['Password'], $StayLogged);
    115115          $Output .= $this->SystemMessage('Přihlášení', $Result);
    116           if($Result <> USER_LOGGED_IN)
     116          if ($Result <> USER_LOGGED_IN)
    117117          {
    118118            $Form->LoadValuesFromForm();
     
    128128        } else $Output .= $this->SystemMessage('Přihlášení', 'Nezadány přihlašovací údaje');
    129129      } else
    130       if($Action == 'Logout')
    131       {
    132         if($this->System->User->User['Id'] != null)
     130      if ($Action == 'Logout')
     131      {
     132        if ($this->System->User->User['Id'] != null)
    133133        {
    134134          $Output .= $this->SystemMessage('Odhlášení', $this->System->User->Logout());
    135135        } else $Output .= $this->SystemMessage('Nastavení uživatele', 'Nejste přihlášen');
    136136      } else
    137       if($Action == 'UserOptions')
    138       {
    139         if($this->System->User->User['Id'] != null)
     137      if ($Action == 'UserOptions')
     138      {
     139        if ($this->System->User->User['Id'] != null)
    140140        {
    141141          $Form = new Form($this->System->FormManager);
     
    146146        } else $Output .= $this->SystemMessage('Nastavení uživatele', 'Nejste přihlášen');
    147147      } else
    148       if($Action == 'UserOptionsSave')
     148      if ($Action == 'UserOptionsSave')
    149149      {
    150150        $Form = new Form($this->System->FormManager);
     
    158158        $Output .= $Form->ShowEditForm();
    159159      } else
    160       if($Action == 'UserRegister')
     160      if ($Action == 'UserRegister')
    161161      {
    162162        $Form = new Form($this->System->FormManager);
     
    166166        $Output .= $Form->ShowEditForm();
    167167      } else
    168       if($Action == 'UserRegisterConfirm')
     168      if ($Action == 'UserRegisterConfirm')
    169169      {
    170170        $Output .= $this->SystemMessage('Potvrzení registrace',
    171171          $this->System->User->RegisterConfirm($_GET['User'], $_GET['H']));
    172172      } else
    173       if($Action == 'PasswordRecovery')
     173      if ($Action == 'PasswordRecovery')
    174174      {
    175175        $Form = new Form($this->System->FormManager);
     
    178178        $Output .= $Form->ShowEditForm();
    179179      } else
    180       if($Action == 'PasswordRecovery2')
     180      if ($Action == 'PasswordRecovery2')
    181181      {
    182182        $Form = new Form($this->System->FormManager);
     
    185185        $Result = $this->System->User->PasswordRecoveryRequest($Form->Values['Name'], $Form->Values['Email']);
    186186        $Output .= $this->SystemMessage('Obnova hesla', $Result);
    187         if($Result <> USER_PASSWORD_RECOVERY_SUCCESS)
     187        if ($Result <> USER_PASSWORD_RECOVERY_SUCCESS)
    188188        {
    189189          $Output .= $Form->ShowEditForm();
    190190        }
    191191      } else
    192       if($Action == 'PasswordRecoveryConfirm')
     192      if ($Action == 'PasswordRecoveryConfirm')
    193193      {
    194194        $Output .= $this->SystemMessage('Obnova hesla', $this->System->User->PasswordRecoveryConfirm($_GET['User'], $_GET['H'], $_GET['P']));
    195195      } else
    196       if($Action == 'UserRegisterSave')
     196      if ($Action == 'UserRegisterSave')
    197197      {
    198198        $Form = new Form($this->System->FormManager);
     
    202202          $Form->Values['Password2'], $Form->Values['Email'], $Form->Values['Name']);
    203203        $Output .= $this->SystemMessage('Registrace nového účtu', $Result);
    204         if($Result <> USER_REGISTRATED)
     204        if ($Result <> USER_REGISTRATED)
    205205        {
    206206          $Form->OnSubmit = '?Action=UserRegisterSave';
     
    208208        }
    209209      } else
    210       if($Action == 'UserMenu')
     210      if ($Action == 'UserMenu')
    211211      {
    212212        $Output = $this->ShowUserPanel();
    213213      } else $Output = $this->ShowMain();
    214214    } else $Output = $this->ShowMain();
    215     return($Output);
     215    return ($Output);
    216216  }
    217217
     
    219219  {
    220220    $Output = 'Nebyla vybrána akce';
    221     return($Output);
     221    return ($Output);
    222222  }
    223223}
Note: See TracChangeset for help on using the changeset viewer.