Changeset 59
- Timestamp:
- Aug 4, 2009, 7:47:36 PM (15 years ago)
- Location:
- trunk/www
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/www/index.php
r57 r59 201 201 $TaskView = new TaskView($this->Database, $this->System); 202 202 $Output .= $TaskView->ItemList(); 203 } else 204 if($_GET['Action'] == 'TaskShowErrorLog') 205 { 206 $TaskView = new TaskView($this->Database, $this->System); 207 $Output .= $TaskView->ErrorLog(); 208 } else 209 if($_GET['Action'] == 'TaskShowStandardLog') 210 { 211 $TaskView = new TaskView($this->Database, $this->System); 212 $Output .= $TaskView->StandardLog(); 203 213 } else 204 214 if($_GET['Action'] == 'Update') -
trunk/www/model/realm.php
r58 r59 85 85 } 86 86 // Lookup nearest database with full import 87 $DbResult = $this->Database->query('SELECT * FROM `Database` WHERE (`Emulator` <> 0) AND (`Revision` <= '.$this-> Realm['Database']['Revision'].') AND (`SourceFileName` <> "") ORDER BY `Revision` DESC');87 $DbResult = $this->Database->query('SELECT * FROM `Database` WHERE (`Emulator` <> 0) AND (`Revision` <= '.$this->Data['Database']['Revision'].') AND (`SourceFileName` <> "") ORDER BY `Revision` DESC'); 88 88 $Database = $DbResult->fetch_assoc(); 89 89 -
trunk/www/view/task.php
r56 r59 10 10 'Items' => array( 11 11 'TimeCreate' => array('Type' => 'DateTime', 'Caption' => 'Čas vytvoření', 'Default' => ''), 12 'Title' => array('Type' => 'String', 'Caption' => ' Akce', 'Default' => ''),12 'Title' => array('Type' => 'String', 'Caption' => 'Operace', 'Default' => ''), 13 13 'State' => array('Type' => 'TaskState', 'Caption' => 'Stav', 'Default' => ''), 14 14 'Duration' => array('Type' => 'String', 'Caption' => 'Trvání', 'Default' => ''), … … 31 31 $Table = new Table($this->ItemListFormClass); 32 32 $Table->OnRow = array($this, 'ShowListOnRow'); 33 $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)'; 33 $Table->Definition['Table'] = '(SELECT Id, (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)'; 34 $Table->Definition['Items']['Id'] = array('Type' => 'Hidden', 'Caption' => '', 'Default' => ''); 34 35 $Table->LoadValuesFromDatabase($this->Database); 36 $Table->Definition['Items']['Actions'] = array('Type' => 'String', 'Caption' => '', 'Default' => ''); 37 foreach($Table->Values as $Index => $Item) 38 { 39 $Table->Values[$Index]['Actions'] = '<a href="?Action=TaskShowErrorLog&Id='.$Item['Id'].'">Výpis chyb</a> <a href="?Action=TaskShowStandardLog&Id='.$Item['Id'].'">Výpis výstupu</a> '; 40 unset($Table->Values[$Index]['Id']); 41 } 35 42 $Output .= $Table->Show(); 36 43 $Output .= '<br /><div style="text-align: center;"><a href="?Action=TaskList">Obnovit pohled</a></dev>'; … … 38 45 return($Output); 39 46 } 47 48 function ErrorLog() 49 { 50 $DbResult = $this->Database->select('Task', 'Title, Error', 'Id='.$_GET['Id']); 51 $DbRow = $DbResult->fetch_assoc(); 52 $Output = '<h4>Chybový výpis úlohy: '.$DbRow['Title'].'</h4>'; 53 $Output .= '<pre>'.$DbRow['Error'].'</pre>'; 54 return($Output); 55 } 56 57 function StandardLog() 58 { 59 $DbResult = $this->Database->select('Task', 'Title, Output', 'Id='.$_GET['Id']); 60 $DbRow = $DbResult->fetch_assoc(); 61 $Output = '<h4>Výpis výstupu úlohy: '.$DbRow['Title'].'</h4>'; 62 $Output .= '<pre>'.$DbRow['Output'].'</pre>'; 63 return($Output); 64 } 40 65 } 41 66
Note:
See TracChangeset
for help on using the changeset viewer.