Changeset 531 for trunk/Modules/IS/IS.php
- Timestamp:
- Apr 23, 2013, 11:36:41 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/IS/IS.php
r530 r531 29 29 else if($Action == 'view') $Content = $this->ShowView($Table, $ItemId); 30 30 else if($Action == 'delete') $Content = $this->ShowDelete($Table, $ItemId); 31 else $Content = '';31 else $Content = $this->Dashboard(); 32 32 if($this->HideMenu == false) 33 33 { … … 39 39 } else $Output = $Content; 40 40 41 return($Output); 42 } 43 44 function Dashboard() 45 { 46 $Output = '<strong>Nástěnka:</strong><br/>'; 47 $DbResult = $this->Database->select('Task', 'COUNT(*)', 'Progress < 100'); 48 $DbRow = $DbResult->fetch_row(); 49 $Output .= 'Nedokončených úkolů: '.$DbRow['0'].'<br/>'; 50 $DbResult = $this->Database->select('Member', 'COUNT(*)', '1'); 51 $DbRow = $DbResult->fetch_row(); 52 $Output .= 'Zákazníků: '.$DbRow['0'].'<br/>'; 53 $DbResult = $this->Database->select('Subject', 'COUNT(*)', '1'); 54 $DbRow = $DbResult->fetch_row(); 55 $Output .= 'Subjektů: '.$DbRow['0'].'<br/>'; 56 $DbResult = $this->Database->select('User', 'COUNT(*)', '1'); 57 $DbRow = $DbResult->fetch_row(); 58 $Output .= 'Uživatelů: '.$DbRow['0'].'<br/>'; 59 $DbResult = $this->Database->select('NetworkDevice', 'COUNT(*)', '1'); 60 $DbRow = $DbResult->fetch_row(); 61 $Output .= 'Registrovaných zařízení: '.$DbRow['0'].'<br/>'; 62 $DbResult = $this->Database->select('FinanceOperation', 'SUM(Value)', '1'); 63 $DbRow = $DbResult->fetch_row(); 64 $Output .= 'Stav placení: '.$DbRow['0'].'<br/>'; 41 65 return($Output); 42 66 } … … 200 224 } 201 225 } 202 $Output .= '<tr><form action="?a=select& filter=1" method="post">';226 $Output .= '<tr><form action="?a=select&t='.$Table.'&r='.$_GET['r'].'&filter=1" method="post">'; 203 227 foreach($FormClass['Items'] as $ItemIndex => $FormItem) 204 228 if(!array_key_exists($FormItem['Type'], $this->System->FormManager->FormTypes) or … … 313 337 $Output .= '<td><input type="Submit" value="Hledat"/></td></form></tr>'; 314 338 315 $Query = 'SELECT * FROM `'.$FormClass['Table'].'`'.$Filter.' '.$Order['SQL'].$PageList['SQLLimit']; 316 339 // Get total item count in database 340 $Query = 'SELECT COUNT(*) FROM `'.$FormClass['Table'].'`'; 341 $DbResult = $this->Database->query($Query); 342 $DbRow = $DbResult->fetch_assoc(); 343 $TotalCount = $DbRow['COUNT(*)']; 344 345 // Get total filtered item count in database 346 if($UserFilter != '') 347 { 348 $Query = 'SELECT COUNT(*) FROM `'.$FormClass['Table'].'`'.$Filter; 349 $DbResult = $this->Database->query($Query); 350 $DbRow = $DbResult->fetch_assoc(); 351 $TotalFilteredCount = $DbRow['COUNT(*)']; 352 } 353 354 // Load and show items 355 $Query = 'SELECT * FROM `'.$FormClass['Table'].'`'.$Filter.' '.$Order['SQL'].$PageList['SQLLimit']; 356 $VisibleItemCount = 0; 317 357 $DbResult = $this->Database->query($Query); 318 358 while($Row = $DbResult->fetch_assoc()) … … 359 399 } 360 400 $Output .= '</td></tr>'; 361 } 401 $VisibleItemCount = $VisibleItemCount + 1; 402 } 403 $Output .= '<tr><td colspan="'.count($TableColumns).'" style="text-align: right;">Zobrazeno <strong>'.$VisibleItemCount.'</strong>'; 404 if($UserFilter != '') $Output .= ' z filtrovaných <strong>'.$TotalFilteredCount.'</strong>'; 405 $Output .= ' z celkem <strong>'.$TotalCount.'</strong></td></tr>'; 362 406 $Output .= '</table>'; 363 407 $Output .= $PageList['Output'];
Note:
See TracChangeset
for help on using the changeset viewer.