Changeset 524 for trunk/Modules/Portal
- Timestamp:
- Apr 20, 2013, 8:51:15 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/Portal/Portal.php
r523 r524 16 16 if($HyperLink['IconFile'] == '') $HyperLink['IconFile'] = 'clear.png'; 17 17 if(substr($HyperLink['URL'], 0, 4) != 'http') $HyperLink['URL'] = $this->System->Config['Web']['RootFolder'].$HyperLink['URL']; 18 if(($HyperLink['PermissionModule'] == '') or (($HyperLink['PermissionModule'] != '') and $this->System-> Modules['User']->Modules['User']->CheckPermission($HyperLink['PermissionModule'], $HyperLink['PermissionOperation'])))18 if(($HyperLink['PermissionModule'] == '') or (($HyperLink['PermissionModule'] != '') and $this->System->User->User->CheckPermission($HyperLink['PermissionModule'], $HyperLink['PermissionOperation']))) 19 19 $Output .= '<img alt="'.$HyperLink['Name'].'" src="images/favicons/'.$HyperLink['IconFile'].'" width="16" height="16" /> <a href="'.$HyperLink['URL'].'">'.$HyperLink['Name'].'</a><br />'; 20 20 } … … 55 55 //$Output .= 'Server běží: '.$this->GetServerUptime().' '; 56 56 57 if($this->System-> Modules['User']->CheckPermission('Finance', 'DisplaySubjectState'))58 { 59 $DbResult = $this->Database->select('MemberPayment', 'Cash', 'Member=(SELECT Customer FROM UserCustomerRel WHERE Id='.$this->System-> Modules['User']->User['Id'].')');57 if($this->System->User->CheckPermission('Finance', 'DisplaySubjectState')) 58 { 59 $DbResult = $this->Database->select('MemberPayment', 'Cash', 'Member=(SELECT Customer FROM UserCustomerRel WHERE Id='.$this->System->User->User['Id'].')'); 60 60 if($DbResult->num_rows > 0) 61 61 { … … 72 72 { 73 73 $Output = '<a href="'.$this->System->Link('/?Action=UserOptions').'">Profil</a><br />'; 74 if($this->System-> Modules['User']->CheckPermission('Finance', 'MemberOptions'))74 if($this->System->User->CheckPermission('Finance', 'MemberOptions')) 75 75 $Output .= '<a href="'.$this->System->Link('/?Action=MemberOptions').'">Domácnost</a><br />'; 76 if($this->System-> Modules['User']->CheckPermission('Finance', 'DisplaySubjectState'))76 if($this->System->User->CheckPermission('Finance', 'DisplaySubjectState')) 77 77 $Output .= '<a href="'.$this->System->Link('/finance/platby/').'">Finance</a><br />'; 78 if($this->System-> Modules['User']->CheckPermission('Network', 'RegistredHostList'))78 if($this->System->User->CheckPermission('Network', 'RegistredHostList')) 79 79 $Output .= '<a href="'.$this->System->Link('/network/user-hosts/').'">Počítače</a><br />'; 80 if($this->System-> Modules['User']->CheckPermission('News', 'Insert'))80 if($this->System->User->CheckPermission('News', 'Insert')) 81 81 $Output .= '<a href="'.$this->System->Link('/aktuality/?action=add').'">Vložení aktuality</a><br />'; 82 if($this->System-> Modules['User']->CheckPermission('EatingPlace', 'Edit'))82 if($this->System->User->CheckPermission('EatingPlace', 'Edit')) 83 83 $Output .= '<a href="'.$this->System->Link('/jidelna/menuedit.php').'">Úprava jídelníčků</a><br />'; 84 if($this->System-> Modules['User']->CheckPermission('Finance', 'Manage'))84 if($this->System->User->CheckPermission('Finance', 'Manage')) 85 85 $Output .= '<a href="'.$this->System->Link('/finance/sprava/').'">Správa financí</a><br />'; 86 if($this->System-> Modules['User']->CheckPermission('Network', 'Administration'))86 if($this->System->User->CheckPermission('Network', 'Administration')) 87 87 $Output .= '<a href="'.$this->System->Link('/network/administration/').'">Správa sítě</a><br />'; 88 if($this->System-> Modules['User']->CheckPermission('IS', 'Manage'))88 if($this->System->User->CheckPermission('IS', 'Manage')) 89 89 $Output .= '<a href="'.$this->System->Link('/is/').'">Správa dat</a><br />'; 90 90 return($Output); … … 156 156 $Form->SetClass('UserLogin'); 157 157 $Form->OnSubmit = '?Action=Login'; 158 $Result = $this->System-> Modules['User']->Login($_POST['Username'], $_POST['Password']);158 $Result = $this->System->User->Login($_POST['Username'], $_POST['Password']); 159 159 $Output .= $this->SystemMessage('Přihlášení', $Result); 160 160 if($Result <> USER_LOGGED_IN) … … 170 170 if($_GET['Action'] == 'Logout') 171 171 { 172 if($this->System-> Modules['User']->User['Id'] != null)173 { 174 $Output .= $this->SystemMessage('Odhlášení', $this->System-> Modules['User']->Logout());172 if($this->System->User->User['Id'] != null) 173 { 174 $Output .= $this->SystemMessage('Odhlášení', $this->System->User->Logout()); 175 175 } else $Output .= $this->SystemMessage('Nastavení uživatele', 'Nejste přihlášen'); 176 176 } else 177 177 if($_GET['Action'] == 'UserOptions') 178 178 { 179 if($this->System-> Modules['User']->User['Id'] != null)179 if($this->System->User->User['Id'] != null) 180 180 { 181 181 $UserOptions = new Form($this->System->FormManager); 182 182 $UserOptions->SetClass('UserOptions'); 183 $UserOptions->LoadValuesFromDatabase($this->System-> Modules['User']->User['Id']);183 $UserOptions->LoadValuesFromDatabase($this->System->User->User['Id']); 184 184 $UserOptions->OnSubmit = '?Action=UserOptionsSave'; 185 185 $Output .= $UserOptions->ShowEditForm(); … … 191 191 $UserOptions->SetClass('UserOptions'); 192 192 $UserOptions->LoadValuesFromForm(); 193 $UserOptions->SaveValuesToDatabase($this->System-> Modules['User']->User['Id']);193 $UserOptions->SaveValuesToDatabase($this->System->User->User['Id']); 194 194 $Output .= $this->SystemMessage('Nastavení', 'Nastavení uloženo.'); 195 195 $this->System->ModuleManager->Modules['Log']->NewRecord('User', 'Nastavení uživatele změněno', $UserOptions->Values['Name']); 196 $UserOptions->LoadValuesFromDatabase($this->System-> Modules['User']->User['Id']);196 $UserOptions->LoadValuesFromDatabase($this->System->User->User['Id']); 197 197 $UserOptions->OnSubmit = '?Action=UserOptionsSave'; 198 198 $Output .= $UserOptions->ShowEditForm(); … … 209 209 { 210 210 $Output .= $this->SystemMessage('Potvrzení registrace', 211 $this->System-> Modules['User']->RegisterConfirm($_GET['User'], $_GET['H']));211 $this->System->User->RegisterConfirm($_GET['User'], $_GET['H'])); 212 212 } else 213 213 if($_GET['Action'] == 'PasswordRecovery') … … 223 223 $Form->SetClass('PasswordRecovery'); 224 224 $Form->LoadValuesFromForm(); 225 $Result = $this->System-> Modules['User']->PasswordRecoveryRequest($Form->Values['Name'], $Form->Values['Email']);225 $Result = $this->System->User->PasswordRecoveryRequest($Form->Values['Name'], $Form->Values['Email']); 226 226 $Output .= $this->SystemMessage('Obnova hesla', $Result); 227 227 if($Result <> USER_PASSWORD_RECOVERY_SUCCESS) … … 232 232 if($_GET['Action'] == 'PasswordRecoveryConfirm') 233 233 { 234 $Output .= $this->SystemMessage('Obnova hesla', $this->System-> Modules['User']->PasswordRecoveryConfirm($_GET['User'], $_GET['H'], $_GET['P']));234 $Output .= $this->SystemMessage('Obnova hesla', $this->System->User->PasswordRecoveryConfirm($_GET['User'], $_GET['H'], $_GET['P'])); 235 235 } else 236 236 if($_GET['Action'] == 'UserRegisterSave') … … 239 239 $Form->SetClass('UserRegister'); 240 240 $Form->LoadValuesFromForm(); 241 $Result = $this->System-> Modules['User']->Register($Form->Values['Login'], $Form->Values['Password'], $Form->Values['Password2'], $Form->Values['Email'], $Form->Values['Name'], $Form->Values['PhoneNumber'], $Form->Values['ICQ']);241 $Result = $this->System->User->Register($Form->Values['Login'], $Form->Values['Password'], $Form->Values['Password2'], $Form->Values['Email'], $Form->Values['Name'], $Form->Values['PhoneNumber'], $Form->Values['ICQ']); 242 242 $Output .= $this->SystemMessage('Registrace nového účtu', $Result); 243 243 if($Result <> USER_REGISTRATED) … … 251 251 $Form = new Form($this->System->FormManager); 252 252 $Form->SetClass('MemberOptions'); 253 $DbResult = $this->Database->query('SELECT Customer FROM UserCustomerRel WHERE User='.$this->System-> Modules['User']->User['Id']);253 $DbResult = $this->Database->query('SELECT Customer FROM UserCustomerRel WHERE User='.$this->System->User->User['Id']); 254 254 if($DbResult->num_rows > 0) 255 255 { … … 278 278 $Form->Values['BillingPeriodNext'] = 2; 279 279 280 $DbResult = $this->Database->update('Member', 'Id='.$this->System-> Modules['User']->User['Member'],280 $DbResult = $this->Database->update('Member', 'Id='.$this->System->User->User['Member'], 281 281 array('FamilyMemberCount' => $Form->Values['FamilyMemberCount'], 282 282 'BillingPeriodNext' => $Form->Values['BillingPeriodNext'])); 283 $DbResult = $this->Database->query('SELECT Subject FROM Member WHERE Id='.$this->System-> Modules['User']->User['Member']);283 $DbResult = $this->Database->query('SELECT Subject FROM Member WHERE Id='.$this->System->User->User['Member']); 284 284 $Member = $DbResult->fetch_assoc(); 285 285 $DbResult = $this->Database->update('Subject', 'Id='.$Member['Subject'], … … 294 294 'Subject.Name, Subject.AddressStreet, Subject.AddressTown, Subject.AddressPSC, '. 295 295 'Subject.AddressCountry, Subject.IC, Subject.DIC FROM Member JOIN Subject '. 296 'ON Subject.Id = Member.Subject WHERE Member.Id='.$this->System-> Modules['User']->User['Member']);296 'ON Subject.Id = Member.Subject WHERE Member.Id='.$this->System->User->User['Member']); 297 297 $DbRow = $DbResult->fetch_array(); 298 298 foreach($Form->Definition['Items'] as $Index => $Item) … … 326 326 else if($Panel['Module'] == 'UserOptions') 327 327 { 328 if($this->System-> Modules['User']->User['Id'] != null) $Output .= $this->Panel('Přihlášený uživatel', $this->UserPanel());328 if($this->System->User->User['Id'] != null) $Output .= $this->Panel('Přihlášený uživatel', $this->UserPanel()); 329 329 } else 330 330 if($Panel['Module'] == 'Webcam') $Output .= $this->Panel('Kamery', $this->WebcamPanel());
Note:
See TracChangeset
for help on using the changeset viewer.