Changeset 533 for trunk/Modules/Portal/Portal.php
- Timestamp:
- Apr 24, 2013, 10:10:33 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/Portal/Portal.php
r526 r533 25 25 function InfoBar() 26 26 { 27 global $Config;28 29 27 $Output2 = ''; 30 28 … … 132 130 function Show() 133 131 { 134 global $Config, $User;135 136 132 $Output = ''; 137 133 if(array_key_exists('Action', $_GET)) … … 180 176 if($this->System->User->User['Id'] != null) 181 177 { 182 $ UserOptions= new Form($this->System->FormManager);183 $ UserOptions->SetClass('UserOptions');184 $ UserOptions->LoadValuesFromDatabase($this->System->User->User['Id']);185 $ UserOptions->OnSubmit = '?Action=UserOptionsSave';186 $Output .= $ UserOptions->ShowEditForm();178 $Form = new Form($this->System->FormManager); 179 $Form->SetClass('UserOptions'); 180 $Form->LoadValuesFromDatabase($this->System->User->User['Id']); 181 $Form->OnSubmit = '?Action=UserOptionsSave'; 182 $Output .= $Form->ShowEditForm(); 187 183 } else $Output .= $this->SystemMessage('Nastavení uživatele', 'Nejste přihlášen'); 188 184 } else 189 185 if($_GET['Action'] == 'UserOptionsSave') 190 186 { 191 $ UserOptions= new Form($this->System->FormManager);192 $ UserOptions->SetClass('UserOptions');193 $ UserOptions->LoadValuesFromForm();194 $ UserOptions->SaveValuesToDatabase($this->System->User->User['Id']);187 $Form = new Form($this->System->FormManager); 188 $Form->SetClass('UserOptions'); 189 $Form->LoadValuesFromForm(); 190 $Form->SaveValuesToDatabase($this->System->User->User['Id']); 195 191 $Output .= $this->SystemMessage('Nastavení', 'Nastavení uloženo.'); 196 $this->System->ModuleManager->Modules['Log']->NewRecord('User', 'Nastavení uživatele změněno', $ UserOptions->Values['Name']);197 $ UserOptions->LoadValuesFromDatabase($this->System->User->User['Id']);198 $ UserOptions->OnSubmit = '?Action=UserOptionsSave';199 $Output .= $ UserOptions->ShowEditForm();192 $this->System->ModuleManager->Modules['Log']->NewRecord('User', 'Nastavení uživatele změněno', $Form->Values['Name']); 193 $Form->LoadValuesFromDatabase($this->System->User->User['Id']); 194 $Form->OnSubmit = '?Action=UserOptionsSave'; 195 $Output .= $Form->ShowEditForm(); 200 196 } 201 197 if($_GET['Action'] == 'UserRegister') … … 288 284 'AddressTown' => $Form->Values['AddressTown'], 'AddressCountry' => $Form->Values['AddressCountry'], 289 285 'AddressPSC' => $Form->Values['AddressPSC'], 'IC' => $Form->Values['IC'], 290 'DIC' => $ UserOptions->Values['DIC']));286 'DIC' => $Form->Values['DIC'])); 291 287 $Output .= $this->SystemMessage('Nastavení', 'Nastavení domácnosti uloženo.'); 292 288 $this->System->ModuleManager->Modules['Log']->NewRecord('Member+Subject', 'Nastavení člena/subjektu změněno',
Note:
See TracChangeset
for help on using the changeset viewer.