Changeset 693 for trunk/Modules/User/UserPage.php
- Timestamp:
- Sep 14, 2014, 8:26:20 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/User/UserPage.php
r634 r693 9 9 function Panel($Title, $Content, $Menu = array()) 10 10 { 11 if(count($Menu) > 0) 11 if(count($Menu) > 0) 12 12 foreach($Menu as $Item) 13 13 $Title .= '<div class="Action">'.$Item.'</div>'; … … 19 19 $Output = ''; 20 20 if($this->System->User->User['Id'] != null) 21 { 21 { 22 22 $Actions = ''; 23 23 foreach($this->System->ModuleManager->Modules['User']->UserPanel as $Action) … … 32 32 $Output .= $this->Panel('Nabídka uživatele', $Actions); 33 33 $Output .= '</td><td>'; 34 if($this->System->User->User['Id'] != null) 35 { 36 $Form = new Form($this->System->FormManager); 37 $Form->SetClass('UserOptions'); 38 $Form->LoadValuesFromDatabase($this->System->User->User['Id']); 39 $Form->OnSubmit = '?Action=UserOptionsSave'; 40 $Output .= $Form->ShowViewForm(); 41 } else $Output .= $this->SystemMessage('Nastavení uživatele', 'Nejste přihlášen'); 42 34 43 //$Output .= $this->Panel('Přehled', $this->UserPanel()); 35 44 $Output .= '</td></tr></table></div>'; … … 61 70 $Form->OnSubmit = '?Action=Login'; 62 71 if(array_key_exists('StayLogged', $_POST) and ($_POST['StayLogged'] == 'on')) $StayLogged = true; 63 else $StayLogged = false; 72 else $StayLogged = false; 64 73 $Result = $this->System->User->Login($_POST['Username'], $_POST['Password'], $StayLogged); 65 74 $Output .= $this->SystemMessage('Přihlášení', $Result); … … 77 86 } 78 87 } else $Output .= $this->SystemMessage('Přihlášení', 'Nezadány přihlašovací údaje'); 79 } else 88 } else 80 89 if($Action == 'Logout') 81 90 { … … 86 95 } else 87 96 if($Action == 'UserOptions') 88 { 97 { 89 98 if($this->System->User->User['Id'] != null) 90 99 { … … 118 127 if($Action == 'UserRegisterConfirm') 119 128 { 120 $Output .= $this->SystemMessage('Potvrzení registrace', 129 $Output .= $this->SystemMessage('Potvrzení registrace', 121 130 $this->System->User->RegisterConfirm($_GET['User'], $_GET['H'])); 122 131 } else … … 138 147 { 139 148 $Output .= $Form->ShowEditForm(); 140 } 149 } 141 150 } else 142 151 if($Action == 'PasswordRecoveryConfirm') … … 149 158 $Form->SetClass('UserRegister'); 150 159 $Form->LoadValuesFromForm(); 151 $Result = $this->System->User->Register($Form->Values['Login'], $Form->Values['Password'], 152 $Form->Values['Password2'], $Form->Values['Email'], $Form->Values['Name'] , $Form->Values['PhoneNumber'], $Form->Values['ICQ']);160 $Result = $this->System->User->Register($Form->Values['Login'], $Form->Values['Password'], 161 $Form->Values['Password2'], $Form->Values['Email'], $Form->Values['Name']); 153 162 $Output .= $this->SystemMessage('Registrace nového účtu', $Result); 154 if($Result <> USER_REGISTRATED) 163 if($Result <> USER_REGISTRATED) 155 164 { 156 165 $Form->OnSubmit = '?Action=UserRegisterSave'; 157 166 $Output .= $Form->ShowEditForm(); 158 167 } 159 } else 168 } else 160 169 if($Action == 'UserMenu') 161 170 { … … 163 172 } else $Output = $this->ShowMain(); 164 173 } else $Output = $this->ShowMain(); 165 return($Output); 174 return($Output); 166 175 } 167 176 168 177 function ShowMain() 169 178 {
Note:
See TracChangeset
for help on using the changeset viewer.