source: client/php/Centrala.php

Last change on this file was 66, checked in by chronos, 8 years ago
  • Moved: Measure scripts should be part of client, not statistic web itself.
File size: 655 bytes
Line 
1<?php
2
3// Funkce pro měření stavových veličin serveru centrala
4
5include_once('Global.php');
6
7function HostsOnline()
8{
9 global $Database;
10
11 $Database->select_db('is');
12 $DbResult = $Database->query('SELECT COUNT(*) FROM `NetworkDevice` '.
13 'LEFT JOIN `NetworkDeviceType` ON `NetworkDeviceType`.`Id` = `NetworkDevice`.`Type` '.
14 'WHERE `Online`=1 AND `NetworkDeviceType`.`ShowOnline`=1');
15 $Row = $DbResult->fetch_array();
16 return($Row[0]);
17}
18
19function MemberCount()
20{
21 global $Database;
22
23 $Database->select_db('is');
24 $DbResult = $Database->query('SELECT COUNT(*) FROM `Member`');
25 $Row = $DbResult->fetch_array();
26 return($Row[0]);
27}
Note: See TracBrowser for help on using the repository browser.