Changeset 24 for trunk/www/index.php
- Timestamp:
- Jun 12, 2009, 11:40:00 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/www/index.php
r23 r24 102 102 } 103 103 104 function ShowBackupListOnRow($Row) 105 { 106 //$Row['Name'] = '<a href="?Action=EmulatorShow&Id='.$Row['Id'].'">'.$Row['Name'].'</a>'; 107 return($Row); 108 } 109 110 function ShowBackupList() 111 { 112 global $Config; 113 114 $Output = '<h4>Dostupné zálohy</h4>'; 115 $Table = new Table('BackupList'); 116 $Table->OnRow = array($this, 'ShowBackupListOnRow'); 117 $Table->LoadValuesFromDatabase($this->Database); 118 $Output .= $Table->Show(); 119 if($this->System->Modules['User']->User['Role'] >= USER_ROLE_ADMINISTRATOR) 120 { 121 $Output .= '<br /><div style="text-align: center;"><a href="?Action=BackupAdd">Zálohovat</a></dev>'; 122 } 123 return($Output); 124 } 125 126 function ShowClientListOnRow($Row) 127 { 128 //$Row['Name'] = '<a href="?Action=EmulatorShow&Id='.$Row['Id'].'">'.$Row['Name'].'</a>'; 129 return($Row); 130 } 131 132 function ShowClientList() 133 { 134 global $Config; 135 136 $Output = '<h4>Verze herního klienta</h4>'; 137 $Table = new Table('ClientList'); 138 $Table->OnRow = array($this, 'ShowClientListOnRow'); 139 $Table->LoadValuesFromDatabase($this->Database); 140 $Output .= $Table->Show(); 141 if($this->System->Modules['User']->User['Role'] >= USER_ROLE_ADMINISTRATOR) 142 { 143 //$Output .= '<br /><div style="text-align: center;"><a href="?Action=BackupAdd">Zálohovat</a></dev>'; 144 } 145 return($Output); 146 } 147 148 function ShowDebugListOnRow($Row) 149 { 150 $Row['Time'] = '<a href="?Action=ServerDebug&Id='.$Row['Id'].'&Show=Backtrace">'.str_replace(' ', ' ', $Row['Time']).'</a>'; 151 $Row['Uptime'] = TimeToHumanTime($Row['Uptime']); 152 return($Row); 153 } 154 155 function ShowDebugList() 156 { 157 global $Config; 158 159 $Output = '<h4>Záznamy restartů</h4>'; 160 $Table = new Table('DebugList'); 161 $Table->OnRow = array($this, 'ShowDebugListOnRow'); 162 $Table->LoadValuesFromDatabase($this->Database); 163 $Output .= $Table->Show(); 164 if($this->System->Modules['User']->User['Role'] >= USER_ROLE_ADMINISTRATOR) 165 { 166 //$Output .= '<br /><div style="text-align: center;"><a href="?Action=BackupAdd">Zálohovat</a></dev>'; 167 } 168 return($Output); 169 } 170 104 171 function UserMenu() 105 172 { … … 114 181 $Server = $DbResult->fetch_assoc(); 115 182 $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>'; 183 $Output .= '<div><a href="?Action=DebugList&Id='.$Server['Id'].'">Ladící záznamy</a></div>'; 184 $Output .= '<div><a href="?Action=BackupList&Id='.$Server['Id'].'">Zálohy</a></div>'; 117 185 } 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 186 if($this->System->Modules['User']->User['Role'] == USER_ROLE_ADMINISTRATOR) 120 187 { 121 $Output .= '<div><a href="'.$this->System->Config['Web']['RootFolder'].'/?Action=EmulatorList">Emulátory</a></div>'; 188 $Output .= '<div><a href="'.$this->System->Config['Web']['RootFolder'].'/?Action=EmulatorList">Emulátory</a></div>'; 122 189 } 123 190 } … … 373 440 $Output .= $MangosDebug->Show($Server['Id']); 374 441 } else $Output .= USER_BAD_ROLE; 375 } else 442 } else 443 if($_GET['Action'] == 'ClientList') 444 { 445 $Output .= $this->ShowClientList(); 446 } else 447 if($_GET['Action'] == 'BackupList') 448 { 449 $Output .= $this->ShowBackupList($_GET['Id']); 450 } else 451 if($_GET['Action'] == 'DebugList') 452 { 453 $Output .= $this->ShowDebugList($_GET['Id']); 454 } else 376 455 if($_GET['Action'] == 'Test') 377 456 {
Note:
See TracChangeset
for help on using the changeset viewer.