Changeset 372 for trunk/Modules/FrontPage/FrontPage.php
- Timestamp:
- Jan 19, 2012, 1:58:03 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/FrontPage/FrontPage.php
r366 r372 139 139 if($_GET['Action'] == 'LoginForm') 140 140 { 141 $Form = new Form('UserLogin');141 $Form = new UserLoginView($this->Database); 142 142 $Form->OnSubmit = '?Action=Login'; 143 143 $Output .= $Form->ShowEditForm(); … … 147 147 if($_GET['Action'] == 'Login') 148 148 { 149 $Form = new Form('UserLogin');149 $Form = new UserLoginView($this->Database); 150 150 $Form->OnSubmit = '?Action=Login'; 151 151 $Result = $this->System->Models['User']->Login($_POST['Username'], $_POST['Password']); … … 166 166 if($_GET['Action'] == 'UserOptions') 167 167 { 168 $UserOptions = new Form('UserOptions');168 $UserOptions = new UserOptionsView($this->Database); 169 169 $UserOptions->LoadValuesFromDatabase($this->System->Models['User']->User['Id']); 170 170 $UserOptions->OnSubmit = '?Action=UserOptionsSave'; … … 173 173 if($_GET['Action'] == 'UserOptionsSave') 174 174 { 175 $UserOptions = new Form('UserOptions', array());175 $UserOptions = new UserOptionsView($this->Dstabase, array()); 176 176 $UserOptions->LoadValuesFromForm(); 177 177 $UserOptions->SaveValuesToDatabase($this->System->Models['User']->User['Id']); … … 184 184 if($_GET['Action'] == 'UserRegister') 185 185 { 186 $Form = new Form('UserRegister');186 $Form = new UserRegisterView($this->Database); 187 187 $Form->LoadValuesFromForm(); 188 188 $Form->OnSubmit = '?Action=UserRegisterSave'; … … 195 195 if($_GET['Action'] == 'PasswordRecovery') 196 196 { 197 $Form = new Form('PasswordRecovery');197 $Form = new PasswordRecoveryView($this->Database); 198 198 $Form->OnSubmit = '?Action=PasswordRecovery2'; 199 199 $Output .= $Form->ShowEditForm(); … … 201 201 if($_GET['Action'] == 'PasswordRecovery2') 202 202 { 203 $Form = new Form('PasswordRecovery');203 $Form = new PasswordRecoveryView($this->Database); 204 204 $Form->LoadValuesFromForm(); 205 205 $Result = $this->System->Models['User']->PasswordRecoveryRequest($Form->Values['Name'], $Form->Values['Email']); … … 216 216 if($_GET['Action'] == 'UserRegisterSave') 217 217 { 218 $Form = new Form('UserRegister', array());218 $Form = new UserRegisterView($this->Database, array()); 219 219 $Form->LoadValuesFromForm(); 220 220 $Result = $this->System->Models['User']->Register($Form->Values['Login'], $Form->Values['Password'], $Form->Values['Password2'], $Form->Values['Email'], $Form->Values['Name'], $Form->Values['PhoneNumber'], $Form->Values['ICQ']); … … 228 228 if($_GET['Action'] == 'MemberOptions') 229 229 { 230 $UserOptions = new Form('MemberOptions');230 $UserOptions = new MemberOptionsView($this->Database); 231 231 $DbResult = $this->Database->query('SELECT Member.Id, Member.InternetTariffNextMonth, Member.FamilyMemberCount, Member.BillingPeriodNext, Subject.Name, Subject.AddressStreet, Subject.AddressTown, Subject.AddressPSC, Subject.IC, Subject.DIC FROM Member JOIN Subject ON Subject.Id = Member.Subject WHERE Member.Id='.$this->System->Models['User']->User['Member']); 232 232 $DbRow = $DbResult->fetch_array(); 233 foreach($UserOptions-> Definition['Items']as $Index => $Item)233 foreach($UserOptions->Items as $Index => $Item) 234 234 { 235 235 $UserOptions->Values[$Index] = $DbRow[$Index]; … … 240 240 if($_GET['Action'] == 'MemberOptionsSave') 241 241 { 242 $UserOptions = new Form('MemberOptions');242 $UserOptions = new MemberOptionsView($this->Database); 243 243 $UserOptions->LoadValuesFromForm(); 244 244 if($UserOptions->Values['FamilyMemberCount'] < 0) … … 255 255 $DbResult = $this->Database->query('SELECT Member.Id, Member.InternetTariffNextMonth, Member.FamilyMemberCount, Member.BillingPeriodNext, Subject.Name, Subject.AddressStreet, Subject.AddressTown, Subject.AddressPSC, Subject.IC, Subject.DIC FROM Member JOIN Subject ON Subject.Id = Member.Subject WHERE Member.Id='.$this->System->Models['User']->User['Member']); 256 256 $DbRow = $DbResult->fetch_array(); 257 foreach($UserOptions-> Definition['Items']as $Index => $Item)257 foreach($UserOptions->Items as $Index => $Item) 258 258 { 259 259 $UserOptions->Values[$Index] = $DbRow[$Index];
Note:
See TracChangeset
for help on using the changeset viewer.