Changeset 443 for trunk/index.php
- Timestamp:
- Oct 14, 2012, 10:10:16 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/index.php
r438 r443 179 179 $UserOptions = new Form('UserOptions', array()); 180 180 $UserOptions->LoadValuesFromForm(); 181 if($UserOptions->Values['Password'] == '') unset($UserOptions->Values['Password']); 182 else { 183 $PasswordHash = new PasswordHash(); 184 $Salt = $PasswordHash->GetSalt(); 185 $UserOptions->Values['Password'] = $PasswordHash->Hash($UserOptions->Values['Password'], $Salt); 186 $UserOptions->Values['Salt'] = $Salt; 187 $this->Database->update('User', 'Id='.$this->System->Modules['User']->User['Id'], array('Salt' => $Salt)); 188 } 181 189 $UserOptions->SaveValuesToDatabase($this->System->Modules['User']->User['Id']); 182 190 $Output .= $this->SystemMessage('Nastavení', 'Nastavení uloženo.'); … … 240 248 $DbResult = $this->Database->query('SELECT Member.Id, Member.InternetTariffNextMonth, '. 241 249 'Member.FamilyMemberCount, Member.BillingPeriodNext, Subject.Name, Subject.AddressStreet, '. 242 'Subject.AddressTown, Subject.AddressPSC, Subject. IC, Subject.DIC FROM Member JOIN Subject '.250 'Subject.AddressTown, Subject.AddressPSC, Subject.AddressCountry, Subject.IC, Subject.DIC FROM Member JOIN Subject '. 243 251 'ON Subject.Id = Member.Subject WHERE Member.Id='.$CustomerUserRel['Customer']); 244 252 $DbRow = $DbResult->fetch_array(); … … 263 271 $DbResult = $this->Database->query('SELECT Subject FROM Member WHERE Id='.$this->System->Modules['User']->User['Member']); 264 272 $Member = $DbResult->fetch_assoc(); 265 $DbResult = $this->Database->update('Subject', 'Id='.$Member['Subject'], array('Name' => $UserOptions->Values['Name'], 'AddressStreet' => $UserOptions->Values['AddressStreet'], 'AddressTown' => $UserOptions->Values['AddressTown'], 'AddressPSC' => $UserOptions->Values['AddressPSC'], 'IC' => $UserOptions->Values['IC'], 'DIC' => $UserOptions->Values['DIC'])); 273 $DbResult = $this->Database->update('Subject', 'Id='.$Member['Subject'], 274 array('Name' => $UserOptions->Values['Name'], 'AddressStreet' => $UserOptions->Values['AddressStreet'], 275 'AddressTown' => $UserOptions->Values['AddressTown'], 'AddressCountry' => $UserOptions->Values['AddressCountry'], 276 'AddressPSC' => $UserOptions->Values['AddressPSC'], 'IC' => $UserOptions->Values['IC'], 277 'DIC' => $UserOptions->Values['DIC'])); 266 278 $Output .= $this->SystemMessage('Nastavení', 'Nastavení domácnosti uloženo.'); 267 279 $this->System->Modules['Log']->NewRecord('Member+Subject', 'Nastavení člena/subjektu změněno', $UserOptions->Values['Name']); 268 $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->Modules['User']->User['Member']);280 $DbResult = $this->Database->query('SELECT Member.Id, Member.InternetTariffNextMonth, Member.FamilyMemberCount, Member.BillingPeriodNext, Subject.Name, Subject.AddressStreet, Subject.AddressTown, Subject.AddressPSC, Subject.AddressCountry, Subject.IC, Subject.DIC FROM Member JOIN Subject ON Subject.Id = Member.Subject WHERE Member.Id='.$this->System->Modules['User']->User['Member']); 269 281 $DbRow = $DbResult->fetch_array(); 270 282 foreach($UserOptions->Definition['Items'] as $Index => $Item)
Note:
See TracChangeset
for help on using the changeset viewer.