Now uses 'mobile' group.

git-svn-id: http://svn.zoneminder.com/svn/zm/trunk@1245 e3e1d417-86f3-4887-817a-d78f3d33393f
This commit is contained in:
stan 2005-01-26 20:57:08 +00:00
parent f2275b3131
commit 3fe8e2cc5d
1 changed files with 10 additions and 0 deletions

View File

@ -21,6 +21,12 @@
$running = daemonCheck();
$status = $running?$zmSlangRunning:$zmSlangStopped;
$sql = "select * from Groups where Name = 'Mobile'";
$result = mysql_query( $sql );
if ( !$result )
echo mysql_error();
$group = mysql_fetch_assoc( $result );
$db_now = strftime( "%Y-%m-%d %H:%M:%S" );
$sql = "select M.*, count(if(E.StartTime>'$db_now' - INTERVAL 1 HOUR && E.Archived = 0,1,NULL)) as HourEventCount, count(if((to_days(E.StartTime)=to_days('$db_now')) && E.Archived = 0,1,NULL)) as TodayEventCount from Monitors as M left join Events as E on E.MonitorId = M.Id group by M.Id order by M.Id";
$result = mysql_query( $sql );
@ -36,6 +42,10 @@ while( $row = mysql_fetch_assoc( $result ) )
{
continue;
}
if ( $group && $group['MonitorIds'] && !in_array( $row['Id'], split( ',', $group['MonitorIds'] ) ) )
{
continue;
}
$row['zmc'] = zmcCheck( $row );
$row['zma'] = zmaCheck( $row );
$sql = "select count(Id) as ZoneCount from Zones where MonitorId = '".$row['Id']."'";