Changeset 78 for trunk/www/Application/View
- Timestamp:
- Sep 11, 2009, 8:18:38 AM (15 years ago)
- Location:
- trunk/www/Application/View
- Files:
-
- 1 deleted
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/www/Application/View/Backup.php
r69 r78 1 1 <?php 2 2 3 class BackupView extends Module 3 include_once(dirname(__FILE__).'/../../Base/View.php'); 4 5 class BackupView extends View 4 6 { 5 7 var $ItemListFormClass = array( -
trunk/www/Application/View/Client.php
r77 r78 1 1 <?php 2 2 3 class ClientView extends Module 3 include_once(dirname(__FILE__).'/../../Base/Module.php'); 4 5 class ClientView extends View 4 6 { 5 7 var $ItemListFormClass = array( -
trunk/www/Application/View/Cluster.php
r76 r78 1 1 <?php 2 2 3 class ClusterView extends Module 3 include_once(dirname(__FILE__).'/../../Base/View.php'); 4 5 class ClusterView extends View 4 6 { 5 7 var $ItemListFormClass = array( -
trunk/www/Application/View/Database.php
r69 r78 1 1 <?php 2 2 3 class DatabaseView extends Module 3 include_once(dirname(__FILE__).'/../../Base/View.php'); 4 5 class DatabaseView extends View 4 6 { 5 7 function Import() -
trunk/www/Application/View/Debug.php
r72 r78 1 1 <?php 2 2 3 class DebugView extends Module 3 include_once(dirname(__FILE__).'/../../Base/View.php'); 4 5 class DebugView extends View 4 6 { 5 7 var $ItemListFormClass = array( -
trunk/www/Application/View/Emulator.php
r77 r78 1 1 <?php 2 2 3 class EmulatorView extends Module 3 include_once(dirname(__FILE__).'/../../Base/View.php'); 4 5 class EmulatorView extends View 4 6 { 5 7 var $ItemFormClass = array( -
trunk/www/Application/View/HomePage.php
r73 r78 1 1 <?php 2 3 include_once(dirname(__FILE__).'/../../Base/View.php'); 4 include_once(dirname(__FILE__).'/../Model/Platform.php'); 2 5 3 6 class HomePageView extends View -
trunk/www/Application/View/News.php
r72 r78 1 1 <?php 2 2 3 class NewsView extends Module 3 include_once(dirname(__FILE__).'/../../Base/View.php'); 4 5 class NewsView extends View 4 6 { 5 7 var $ItemFormClass = array( … … 43 45 while($DbRow = $DbResult->fetch_assoc()) 44 46 { 45 $Output .= '<div><strong>'.$DbRow['Title'].'</strong>('. HumanDate($DbRow['Time']).')<br />'.$DbRow['Content'].'</div>';47 $Output .= '<div><strong>'.$DbRow['Title'].'</strong>('.$DbRow['Time'].')<br />'.$DbRow['Content'].'</div>'; 46 48 } 47 49 $Output .= '</td>'; -
trunk/www/Application/View/Page.php
r77 r78 1 1 <?php 2 3 include_once(dirname(__FILE__).'/../../Base/View.php'); 4 include_once(dirname(__FILE__).'/News.php'); 2 5 3 6 class PageView extends View … … 56 59 '<li>Správce: '.$this->Config['Web']['Admin'].'</li>'. 57 60 '<li>E-mail: '.$this->Config['Web']['AdminEmail'].'</li>'; 58 if($this->Config['Web']['ShowRuntimeInfo'] == true) $Output .= '<li>Doba generování: '.$Time.' s / '.ini_get('max_execution_time').' s</li><li>Použitá paměť: '. HumanSize(memory_get_peak_usage(FALSE)).' / '.ini_get('memory_limit').'B</li>';61 if($this->Config['Web']['ShowRuntimeInfo'] == true) $Output .= '<li>Doba generování: '.$Time.' s / '.ini_get('max_execution_time').' s</li><li>Použitá paměť: '.$this->System->AddPrefixMultipliers(memory_get_peak_usage(FALSE), 'B').' / '.ini_get('memory_limit').'B</li>'; 59 62 $Output .= '</ul></div></body></html>'; 60 63 return($Output); -
trunk/www/Application/View/Realm.php
r77 r78 1 1 <?php 2 2 3 class RealmView extends Module 3 include_once(dirname(__FILE__).'/../../Base/View.php'); 4 5 class RealmView extends View 4 6 { 5 7 var $ItemFormClass = array( -
trunk/www/Application/View/Server.php
r77 r78 1 1 <?php 2 2 3 class ServerView extends Module 3 include_once(dirname(__FILE__).'/../../Base/View.php'); 4 5 class ServerView extends View 4 6 { 5 7 var $ItemFormClass = array( … … 256 258 $Form->LoadValuesFromDatabase($_GET['Id']); 257 259 $Form->Values['ServerId'] = $_GET['Id']; 258 $Form->OnSubmit = '? Action=ServerSave';260 $Form->OnSubmit = '?Module=Server&Action=Save'; 259 261 $Output .= $Form->ShowEditForm(); 260 262 } else $Output = $this->System->SystemMessage('Nastavení serveru', 'Nemáte oprávnění'); -
trunk/www/Application/View/Task.php
r72 r78 1 1 <?php 2 2 3 class TaskView extends Module 3 include_once(dirname(__FILE__).'/../../Base/View.php'); 4 5 class TaskView extends View 4 6 { 5 7 var $ItemListFormClass = array( … … 26 28 global $Config; 27 29 28 if($this->System->Modules['User']->User['Role'] >= USER_ROLE_USER) 30 $Output = '<h4>Fronta úloh</h4>'; 31 $Table = new Table($this->ItemListFormClass); 32 $Table->OnRow = array($this, 'ShowListOnRow'); 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' => ''); 35 $Table->LoadValuesFromDatabase($this->Database); 36 $Table->Definition['Items']['Actions'] = array('Type' => 'String', 'Caption' => '', 'Default' => ''); 37 foreach($Table->Values as $Index => $Item) 29 38 { 30 $Output = '<h4>Fronta úloh</h4>'; 31 $Table = new Table($this->ItemListFormClass); 32 $Table->OnRow = array($this, 'ShowListOnRow'); 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' => ''); 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="?Module=Task&Action=ErrorLog&Id='.$Item['Id'].'">Výpis chyb</a> <a href="?Module=Task&Action=StandardLog&Id='.$Item['Id'].'">Výpis výstupu</a> '; 40 unset($Table->Values[$Index]['Id']); 41 } 42 $Output .= $Table->Show(); 43 $Output .= '<br /><div style="text-align: center;"><a href="?Action=TaskList">Obnovit pohled</a></dev>'; 44 } else $Output = USER_BAD_ROLE; 39 $Table->Values[$Index]['Actions'] = '<a href="?Module=Task&Action=ErrorLog&Id='.$Item['Id'].'">Výpis chyb</a> <a href="?Module=Task&Action=StandardLog&Id='.$Item['Id'].'">Výpis výstupu</a> '; 40 unset($Table->Values[$Index]['Id']); 41 } 42 $Output .= $Table->Show(); 43 $Output .= '<br /><div style="text-align: center;"><a href="?Action=TaskList">Obnovit pohled</a></dev>'; 45 44 return($Output); 46 45 } -
trunk/www/Application/View/Update.php
r69 r78 1 1 <?php 2 2 3 class UpdateView extends Module 3 include_once(dirname(__FILE__).'/../../Base/View.php'); 4 5 class UpdateView extends View 4 6 { 5 7 function ItemList() -
trunk/www/Application/View/User.php
r77 r78 1 1 <?php 2 2 3 class UserView extends Module 3 include_once(dirname(__FILE__).'/../../Base/View.php'); 4 5 class UserView extends View 4 6 { 5 7 var $OptionsFormClass = array( … … 142 144 { 143 145 $UserOptions = new Form($this->System, $this->OptionsFormClass); 144 $UserOptions->LoadValuesFromDatabase($this->System->Modules['User']-> User['Id']);146 $UserOptions->LoadValuesFromDatabase($this->System->Modules['User']->Data['Id']); 145 147 $UserOptions->OnSubmit = '?Module=User&Action=UserOptionsSave'; 146 148 $Output = $UserOptions->ShowEditForm(); … … 152 154 $UserOptions = new Form($this->System, $this->OptionsFormClass, array()); 153 155 $UserOptions->LoadValuesFromForm(); 154 $UserOptions->SaveValuesToDatabase($this->System->Modules['User']-> User['Id']);156 $UserOptions->SaveValuesToDatabase($this->System->Modules['User']->Data['Id']); 155 157 $Page = new PageView($this->System); 156 158 $Output = $Page->SystemMessage('Nastavení', 'Nastavení uloženo.'); 157 159 $this->System->Modules['Log']->NewRecord('User', 'Nastavení uživatele změněno', $UserOptions->Values['Name']); 158 $UserOptions->LoadValuesFromDatabase($this->System->Modules['User']-> User['Id']);160 $UserOptions->LoadValuesFromDatabase($this->System->Modules['User']->Data['Id']); 159 161 $UserOptions->OnSubmit = '?Module=User&Action=UserOptionsSave'; 160 162 $Output .= $UserOptions->ShowEditForm();
Note:
See TracChangeset
for help on using the changeset viewer.