Changeset 23 for trunk/www/index.php
- Timestamp:
- Jun 12, 2009, 10:46:19 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/www/index.php
r21 r23 102 102 } 103 103 104 function UserMenu() 105 { 106 $Output = '<strong>Uživatelské menu</strong><br />'; 107 if($this->System->Modules['User']->User['Id'] != $this->System->Modules['User']->AnonymousUserId) 108 { 109 $DbResult = $this->Database->query('SELECT COUNT(*) FROM Server WHERE User='.$this->System->Modules['User']->User['Id']); 110 $DbRow = $DbResult->fetch_row(); 111 if($DbRow[0] > 0) 112 { 113 $DbResult = $this->Database->query('SELECT Id FROM Server WHERE User='.$this->System->Modules['User']->User['Id']); 114 $Server = $DbResult->fetch_assoc(); 115 $Output .= '<div><a href="?Action=ServerShow&Id='.$Server['Id'].'">Můj server</a></div>'; 116 $Output .= '<div><a href="?Action=ServerDebug&Id='.$Server['Id'].'">Ladící záznamy</a></div>'; 117 } else $Output .= '<div><a href="?Action=ServerAdd">Vytvořit vlastní server</a></div>'; 118 $Output .= '<div><a href="'.$this->System->Config['Web']['RootFolder'].'/?Action=UserOptions">Nastavení účtu</a></div>'; 119 if($this->System->Modules['User']->User['Role'] == USER_ROLE_ADMINISTRATOR) 120 { 121 $Output .= '<div><a href="'.$this->System->Config['Web']['RootFolder'].'/?Action=EmulatorList">Emulátory</a></div>'; 122 } 123 } 124 return($Output); 125 } 126 104 127 function Show() 105 128 { 106 129 global $Config; 107 130 108 $Output = ' ';131 $Output = '<table class="BasicTable"><tr><td class="UserMenu">'.$this->UserMenu().'</td><td class="Content">'; 109 132 if(array_key_exists('Action', $_GET)) 110 133 { … … 344 367 if($this->System->Modules['User']->User['Role'] >= USER_ROLE_USER) 345 368 { 346 $Output = '<div>Ladící informace serveru</div>';369 $Output .= '<div>Ladící informace serveru</div>'; 347 370 $DbResult = $this->Database->query('SELECT Id FROM Server WHERE User='.$this->System->Modules['User']->User['Id']); 348 371 $Server = $DbResult->fetch_assoc(); … … 362 385 } else 363 386 { 364 $Output = $this->ShowServerList();387 $Output .= $this->ShowServerList(); 365 388 } 366 389 } else 367 390 { 368 $Output = $this->ShowServerList(); 369 } 391 $Output .= $this->ShowServerList(); 392 } 393 $Output .= '</td></tr</table>'; 370 394 return($Output); 371 395 }
Note:
See TracChangeset
for help on using the changeset viewer.