Changeset 71 for trunk/www/Application/View/User.php
- Timestamp:
- Aug 23, 2009, 6:14:01 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/www/Application/View/User.php
r69 r71 49 49 ); 50 50 51 function Login Form()51 function Login() 52 52 { 53 53 global $Config; 54 54 55 $Form = new Form($this-> LoginFormClass);56 $Form->OnSubmit = '? Action=Login';55 $Form = new Form($this->System, $this->LoginFormClass); 56 $Form->OnSubmit = '?Module=User&Action=LoginFinish'; 57 57 $Output = $Form->ShowEditForm(); 58 58 $Output .= '<div class="Centred">'; 59 59 if($Config['Web']['UserRegistrationEnabled']) 60 $Output .= '<a href="? Action=UserRegister">Registrovat se</a> ';61 $Output .= '<a href="? Action=PasswordRecovery">Obnova zapomenutého hesla</a></div>';60 $Output .= '<a href="?Module=User&Action=Register">Registrovat se</a> '; 61 $Output .= '<a href="?Module=User&Action=PasswordRecovery">Obnova zapomenutého hesla</a></div>'; 62 62 return($Output); 63 63 } 64 64 65 function Login Result()65 function LoginFinish() 66 66 { 67 $Form = new Form($this-> LoginFormClass);68 $Form->OnSubmit = '? Action=Login';67 $Form = new Form($this->System, $this->LoginFormClass); 68 $Form->OnSubmit = '?Module=User&Action=LoginFinish'; 69 69 $Form->LoadValuesFromForm(); 70 70 $Result = $this->System->Modules['User']->Login($Form->Values['Username'], $Form->Values['Password']); … … 74 74 $Form->Values['Password'] = ''; 75 75 $Output .= $Form->ShowEditForm(); 76 $Output .= '<div class="Centred"><a href="? Action=UserRegister">Registrovat se</a> '.77 '<a href="? Action=PasswordRecovery">Obnova zapomenutého hesla</a></div>';76 $Output .= '<div class="Centred"><a href="?Module=User&Action=UserRegister">Registrovat se</a> '. 77 '<a href="?Module=User&Action=PasswordRecovery">Obnova zapomenutého hesla</a></div>'; 78 78 } 79 79 return($Output); … … 86 86 if($Config['Web']['UserRegistrationEnabled']) 87 87 { 88 $Form = new Form($this-> RegisterFormClass, array());88 $Form = new Form($this->System, $this->RegisterFormClass, array()); 89 89 $Form->LoadValuesFromForm(); 90 90 $Result = $this->System->Modules['User']->Register($Form->Values['Login'], $Form->Values['Password'], $Form->Values['Password2'], $Form->Values['Email'], $Form->Values['Name']); … … 92 92 if($Result <> USER_REGISTRATED) 93 93 { 94 $Form->OnSubmit = '? Action=UserRegisterSave';94 $Form->OnSubmit = '?Module=User&Action=UserRegisterSave'; 95 95 $Output = $Form->ShowEditForm(); 96 96 } … … 108 108 function PasswordRecoveryFinish() 109 109 { 110 $Form = new Form($this-> PasswordRecoveryFormClass);110 $Form = new Form($this->System, $this->PasswordRecoveryFormClass); 111 111 $Form->LoadValuesFromForm(); 112 112 $Result = $this->System->Modules['User']->PasswordRecoveryRequest($Form->Values['Name'], $Form->Values['Email']); … … 121 121 function PasswordRecovery() 122 122 { 123 $Form = new Form($this-> PasswordRecoveryFormClass);124 $Form->OnSubmit = '? Action=PasswordRecovery2';123 $Form = new Form($this->System, $this->PasswordRecoveryFormClass); 124 $Form->OnSubmit = '?Module=User&Action=PasswordRecovery2'; 125 125 $Output = $Form->ShowEditForm(); 126 126 return($Output); … … 130 130 { 131 131 $Output = $this->System->SystemMessage('Odhlášení', $this->System->Modules['User']->Logout()); 132 $Output .= $this->Login Form();132 $Output .= $this->Login(); 133 133 return($Output); 134 134 } … … 136 136 function Options() 137 137 { 138 $UserOptions = new Form($this-> OptionsFormClass);138 $UserOptions = new Form($this->System, $this->OptionsFormClass); 139 139 $UserOptions->LoadValuesFromDatabase($this->System->Modules['User']->User['Id']); 140 $UserOptions->OnSubmit = '? Action=UserOptionsSave';140 $UserOptions->OnSubmit = '?Module=User&Action=UserOptionsSave'; 141 141 $Output = $UserOptions->ShowEditForm(); 142 142 return($Output); … … 145 145 function OptionsSave() 146 146 { 147 $UserOptions = new Form($this-> OptionsFormClass, array());147 $UserOptions = new Form($this->System, $this->OptionsFormClass, array()); 148 148 $UserOptions->LoadValuesFromForm(); 149 149 $UserOptions->SaveValuesToDatabase($this->System->Modules['User']->User['Id']); … … 151 151 $this->System->Modules['Log']->NewRecord('User', 'Nastavení uživatele změněno', $UserOptions->Values['Name']); 152 152 $UserOptions->LoadValuesFromDatabase($this->System->Modules['User']->User['Id']); 153 $UserOptions->OnSubmit = '? Action=UserOptionsSave';153 $UserOptions->OnSubmit = '?Module=User&Action=UserOptionsSave'; 154 154 $Output .= $UserOptions->ShowEditForm(); 155 155 return($Output); … … 162 162 if($Config['Web']['UserRegistrationEnabled']) 163 163 { 164 $Form = new Form($this-> RegisterFormClass);164 $Form = new Form($this->System, $this->RegisterFormClass); 165 165 $Form->LoadValuesFromForm(); 166 $Form->OnSubmit = '? Action=UserRegisterSave';166 $Form->OnSubmit = '?Module=User&Action=UserRegisterSave'; 167 167 $Output = 'Vyplňte správně požadované údaje. Na zadaný email vám bude zaslán aktivační email.'; 168 168 $Output .= $Form->ShowEditForm();
Note:
See TracChangeset
for help on using the changeset viewer.