Changeset 755 for trunk/Modules/IS/IS.php
- Timestamp:
- Oct 25, 2015, 9:51:51 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/IS/IS.php
r747 r755 81 81 { 82 82 $Output = '<strong>Nástěnka:</strong><br/>'; 83 $DbResult = $this->Database->select('Task', 'COUNT(*)', '`Progress` < 100'); 84 $DbRow = $DbResult->fetch_row(); 85 $Output .= 'Nedokončených úkolů: '.$DbRow['0'].'<br/>'; 86 87 $DbResult = $this->Database->select('Member', 'COUNT(*)', '1'); 88 $DbRow = $DbResult->fetch_row(); 89 $Output .= 'Zákazníků: '.$DbRow['0'].'<br/>'; 90 91 $DbResult = $this->Database->select('Subject', 'COUNT(*)', '1'); 92 $DbRow = $DbResult->fetch_row(); 93 $Output .= 'Subjektů: '.$DbRow['0'].'<br/>'; 94 95 $DbResult = $this->Database->select('User', 'COUNT(*)', '1'); 96 $DbRow = $DbResult->fetch_row(); 97 $Output .= 'Uživatelů: '.$DbRow['0'].'<br/>'; 98 99 $DbResult = $this->Database->select('NetworkDevice', 'COUNT(*)', '1'); 100 $DbRow = $DbResult->fetch_row(); 101 $Output .= 'Registrovaných zařízení: '.$DbRow['0'].'<br/>'; 102 103 $DbResult = $this->Database->select('FinanceOperation', 'SUM(`Value`)', '1'); 104 $DbRow = $DbResult->fetch_row(); 105 $Output .= 'Stav placení: '.$DbRow['0'].'<br/>'; 106 107 $DbResult = $this->Database->select('FinanceBankImport', 'COUNT(*)', '`FinanceOperation` IS NULL'); 108 $DbRow = $DbResult->fetch_row(); 109 $Output .= 'Nezpárovaných plateb: '.$DbRow['0'].'<br/>'; 110 return($Output); 83 foreach($this->System->ModuleManager->Modules['IS']->DashboardItems as $Item) 84 { 85 if(is_string($Item['Callback'][0])) 86 { 87 $Class = new $Item['Callback'][0]($this->System); 88 $Output .= $Class->$Item['Callback'][1](); 89 } else $Output .= call_user_func($Item['Callback']); 90 } 91 return $Output; 111 92 } 112 93 … … 780 761 class ModuleIS extends AppModule 781 762 { 763 var $DashboardItems; 764 782 765 function __construct($System) 783 766 { … … 790 773 $this->Description = 'User interface for generic information system'; 791 774 $this->Dependencies = array(); 775 776 $this->DashboardItems = array(); 792 777 } 793 778 … … 849 834 { 850 835 } 836 837 function RegisterDashboardItem($Name, $Callback) 838 { 839 $this->DashboardItems[$Name] = array('Callback' => $Callback); 840 } 841 842 function UnregisterDashboardItem($Name) 843 { 844 unset($this->DashboardItems[$Name]); 845 } 851 846 }
Note:
See TracChangeset
for help on using the changeset viewer.