Changeset 35 for trunk/www/index.php
- Timestamp:
- Jun 15, 2009, 10:19:02 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/www/index.php
r34 r35 113 113 foreach($Table->Values as $Index => $Item) 114 114 { 115 $Table->Values[$Index]['Actions'] = '<a href="?Action=EmulatorShow&Id='.$Item['Id'].'">Pod probnosti</a>';115 $Table->Values[$Index]['Actions'] = '<a href="?Action=EmulatorShow&Id='.$Item['Id'].'">Podrobnosti</a>'; 116 116 if($Server->Server['Lock'] == 0) $Table->Values[$Index]['Actions'] .= ' <a href="?Action=Update&Server='.$ServerId.'&Update='.$Item['Id'].'">Aktualizovat</a>'; 117 117 unset($Table->Values[$Index]['Id']); … … 161 161 $Table->Table = '(SELECT * FROM `Backup` WHERE `Server` = '.$ServerId.')'; 162 162 $Table->Definition['Items']['Id'] = array('Type' => 'Hidden', 'Caption' => 'Id', 'Default' => ''); 163 $Table->Definition['Items']['Lock'] = array('Type' => 'Hidden', 'Caption' => 'Zámek', 'Default' => ''); 163 164 $Table->LoadValuesFromDatabase($this->Database); 164 165 $Table->Definition['Items']['Actions'] = array('Type' => 'String', 'Caption' => '', 'Default' => ''); 165 166 foreach($Table->Values as $Index => $Value) 166 167 { 167 $Table->Values[$Index]['Actions'] = '<a href="?Action=BackupDownload&Id='.$Value['Id'].'">Stáhnout</a>';168 if( $Server->Server['Lock'] == 0) $Table->Values[$Index]['Actions'] .= ' <a href="?Action=BackupRestore&Id='.$Value['Id'].'">Obnovit</a>';168 if($Value['Lock'] == 0) $Table->Values[$Index]['Actions'] = '<a href="?Action=BackupDownload&Id='.$Value['Id'].'">Stáhnout</a>'; 169 if(($Server->Server['Lock'] == 0) and ($Value['Lock'] == 0)) $Table->Values[$Index]['Actions'] .= ' <a href="?Action=BackupRestore&Id='.$Value['Id'].'">Obnovit</a>'; 169 170 unset($Table->Values[$Index]['Id']); 171 unset($Table->Values[$Index]['Lock']); 170 172 } 171 173 $Output .= $Table->Show(); … … 216 218 $Table = new Table('TaskList'); 217 219 $Table->OnRow = array($this, 'ShowTaskListOnRow'); 218 $Table->Definition['Table'] = '(SELECT ( UNIX_TIMESTAMP(TimeEnd) - UNIX_TIMESTAMP(TimeStart)) AS Duration, TimeCreate, Title, State FROM Task WHERE User='.$this->System->Modules['User']->User['Id'].' ORDER BY Id DESC)';220 $Table->Definition['Table'] = '(SELECT (COALESCE(UNIX_TIMESTAMP(TimeEnd), UNIX_TIMESTAMP(NOW())) - UNIX_TIMESTAMP(TimeStart)) AS Duration, TimeCreate, Title, State FROM Task WHERE User='.$this->System->Modules['User']->User['Id'].' ORDER BY Id DESC)'; 219 221 $Table->LoadValuesFromDatabase($this->Database); 220 222 $Output .= $Table->Show(); … … 481 483 $Form = new Form('NewServer', array()); 482 484 $Form->LoadValuesFromForm(); 483 $this->Database->insert('Server', array('Name' => $Form->Values['Name'], 'Description' => $Form->Values['Description'], 'User' => $this->System->Modules['User']->User['Id'], 'Motd' => $Form->Values['Motd'], 'Homepage' => $Form->Values['Homepage'], 'Type' => $Form->Values['Type'], 'Database' => 1, 'NetworkPortWorldd' => $NewPortWorldd, 'NetworkPortRealmd' => $NewPortRealmd ));485 $this->Database->insert('Server', array('Name' => $Form->Values['Name'], 'Description' => $Form->Values['Description'], 'User' => $this->System->Modules['User']->User['Id'], 'Motd' => $Form->Values['Motd'], 'Homepage' => $Form->Values['Homepage'], 'Type' => $Form->Values['Type'], 'Database' => 1, 'NetworkPortWorldd' => $NewPortWorldd, 'NetworkPortRealmd' => $NewPortRealmd, 'Lock' => 1)); 484 486 $LastInsertId = $this->Database->insert_id; 485 487 $Server = new Server($this->Database, $LastInsertId); 486 $Server->CreateDatabase(); 487 $Server->ImportDatabase(true); 488 $Output .= $this->SystemMessage('Vytvoření serveru', 'Úloha načtení nové databáze zařazena do fronty'); 488 $Server->CreateDatabase(); 489 $Output .= $this->SystemMessage('Vytvoření serveru', $Server->ImportDatabase(true)); 489 490 $Output .= $this->ShowTaskList(); 490 491 //$UserOptions->LoadValuesFromDatabase($this->System->Modules['User']->User['Id']);
Note:
See TracChangeset
for help on using the changeset viewer.