Changeset 738 for trunk/Modules/User
- Timestamp:
- Apr 14, 2015, 10:20:16 PM (10 years ago)
- Location:
- trunk/Modules/User
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/User/User.php
r729 r738 434 434 class ModuleUser extends AppModule 435 435 { 436 436 var $UserPanel; 437 437 438 438 function __construct($System) … … 659 659 )); 660 660 $this->System->FormManager->RegisterFormType('TUser', array( 661 662 663 664 665 661 'Type' => 'Reference', 662 'Table' => 'User', 663 'Id' => 'Id', 664 'Name' => 'Name', 665 'Filter' => '1', 666 666 )); 667 667 $this->System->FormManager->RegisterFormType('TPermissionGroup', array( 668 669 670 671 672 668 'Type' => 'Reference', 669 'Table' => 'PermissionGroup', 670 'Id' => 'Id', 671 'Name' => 'Description', 672 'Filter' => '1', 673 673 )); 674 674 $this->System->FormManager->RegisterFormType('TPermissionGroupAssignment', array( 675 676 677 678 679 675 'Type' => 'Reference', 676 'Table' => 'PermissionGroupAssignment', 677 'Id' => 'Id', 678 'Name' => 'Id', 679 'Filter' => '1', 680 680 )); 681 681 $this->System->FormManager->RegisterFormType('TPermissionOperation', array( 682 683 684 685 686 687 )); 688 682 'Type' => 'Reference', 683 'Table' => 'PermissionOperation', 684 'Id' => 'Id', 685 'Name' => 'Id', 686 'Filter' => '1', 687 )); 688 689 689 } 690 690 … … 695 695 function TopBarCallback() 696 696 { 697 if($this->System->User->User['Id'] == null) 697 if($this->System->User->User['Id'] == null) 698 698 { 699 699 $Output = '<a href="'.$this->System->Link('/user/?Action=LoginForm').'">Přihlášení</a> '. 700 700 '<a href="'.$this->System->Link('/user/?Action=UserRegister').'">Registrace</a>'; 701 } else 702 { 703 701 } else 702 { 703 $Output = $this->System->User->User['Name']. 704 704 ' <a href="'.$this->System->Link('/user/?Action=UserMenu').'">Nabídka</a>'. 705 705 ' <a href="'.$this->System->Link('/user/?Action=Logout').'">Odhlásit</a>'; 706 706 // <a href="'.$this->System->Link('/?Action=UserOptions').'">Nastavení</a>'; 707 707 } 708 708 return($Output); -
trunk/Modules/User/UserPage.php
r694 r738 54 54 if($this->System->User->User['Id'] != null) 55 55 { 56 57 58 59 60 61 62 63 64 56 $Actions = ''; 57 foreach($this->System->ModuleManager->Modules['User']->UserPanel as $Action) 58 { 59 if(is_string($Action[0])) 60 { 61 $Class = new $Action[0]($this->System); 62 $Actions .= $Class->$Action[1](); 63 } else $Actions .= call_user_func($Action).'<br/>'; 64 } 65 65 $Output .= '<div class="Centred"><table id="MainTable"><tr><td style="vertical-align:top;">'; 66 66 $Output .= $this->Panel('Nabídka uživatele', $Actions); … … 83 83 } 84 84 85 86 87 85 function Show() 86 { 87 $Output = ''; 88 88 if(array_key_exists('Action', $_GET)) 89 89 { … … 209 209 } else $Output = $this->ShowMain(); 210 210 return($Output); 211 212 213 214 215 216 217 211 } 212 213 function ShowMain() 214 { 215 $Output = 'Nebyla vybrána akce'; 216 return($Output); 217 } 218 218 }
Note:
See TracChangeset
for help on using the changeset viewer.