diff -uNHr zm_orig//includes/functions_fl.php zm_flabs/includes/functions_fl.php
--- zm_orig//includes/functions_fl.php	1970-01-01 01:00:00.000000000 +0100
+++ zm_flabs/includes/functions_fl.php	2010-01-16 17:34:02.834870505 +0100
@@ -0,0 +1,9 @@
+<?php
+function isAdmin()
+{
+        global $user;
+        $ret=0;
+        if ($user['System']=="Edit") {$ret=1;}
+        return($ret);
+}
+?>
diff -uNHr zm_orig//includes/functions.php zm_flabs/includes/functions.php
--- zm_orig//includes/functions.php	2010-01-16 17:43:00.846047945 +0100
+++ zm_flabs/includes/functions.php	2010-01-16 17:34:02.768685491 +0100
@@ -19,6 +19,9 @@
 // 
 
 // Compatibility functions
+//FL
+require_once("functions_fl.php");
+
 if ( version_compare( phpversion(), "4.3.0", "<") )
 {
     function ob_get_clean()
diff -uNHr zm_orig//skins/classic/views/console_admin.php zm_flabs/skins/classic/views/console_admin.php
--- zm_orig//skins/classic/views/console_admin.php	1970-01-01 01:00:00.000000000 +0100
+++ zm_flabs/skins/classic/views/console_admin.php	2010-01-16 17:23:42.331669241 +0100
@@ -0,0 +1,344 @@
+<?php
+//
+// ZoneMinder web console file, $Date: 2009-02-19 10:05:31 +0000 (Thu, 19 Feb 2009) $, $Revision: 2780 $
+// Copyright (C) 2001-2008 Philip Coombes
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+//
+
+$eventCounts = array(
+    array(
+        "title" => $SLANG['Events'],
+        "filter" => array(
+            "terms" => array(
+            )
+        ),
+    ),
+    array(
+        "title" => $SLANG['Hour'],
+        "filter" => array(
+            "terms" => array(
+                array( "attr" => "Archived", "op" => "=", "val" => "0" ),
+                array( "cnj" => "and", "attr" => "DateTime", "op" => ">=", "val" => "-1 hour" ),
+            )
+        ),
+    ),
+    array(
+        "title" => $SLANG['Day'],
+        "filter" => array(
+            "terms" => array(
+                array( "attr" => "Archived", "op" => "=", "val" => "0" ),
+                array( "cnj" => "and", "attr" => "DateTime", "op" => ">=", "val" => "-1 day" ),
+            )
+        ),
+    ),
+    array(
+        "title" => $SLANG['Week'],
+        "filter" => array(
+            "terms" => array(
+                array( "attr" => "Archived", "op" => "=", "val" => "0" ),
+                array( "cnj" => "and", "attr" => "DateTime", "op" => ">=", "val" => "-7 day" ),
+            )
+        ),
+    ),
+    array(
+        "title" => $SLANG['Month'],
+        "filter" => array(
+            "terms" => array(
+                array( "attr" => "Archived", "op" => "=", "val" => "0" ),
+                array( "cnj" => "and", "attr" => "DateTime", "op" => ">=", "val" => "-1 month" ),
+            )
+        ),
+    ),
+    array(
+        "title" => $SLANG['Archived'],
+        "filter" => array(
+            "terms" => array(
+                array( "attr" => "Archived", "op" => "=", "val" => "1" ),
+            )
+        ),
+    ),
+);
+
+$running = daemonCheck();
+$status = $running?$SLANG['Running']:$SLANG['Stopped'];
+
+if ( $group = dbFetchOne( "select * from Groups where Id = '".(empty($_COOKIE['zmGroup'])?0:dbEscape($_COOKIE['zmGroup']))."'" ) )
+    $groupIds = array_flip(split( ',', $group['MonitorIds'] ));
+
+noCacheHeaders();
+
+$maxWidth = 0;
+$maxHeight = 0;
+$cycleCount = 0;
+$minSequence = 0;
+$maxSequence = 1;
+$seqIdList = array();
+$monitors = dbFetchAll( "select * from Monitors order by Sequence asc" );
+$displayMonitors = array();
+for ( $i = 0; $i < count($monitors); $i++ )
+{
+    if ( !visibleMonitor( $monitors[$i]['Id'] ) )
+    {
+        continue;
+    }
+    if ( $group && !empty($groupIds) && !array_key_exists( $monitors[$i]['Id'], $groupIds ) )
+    {
+        continue;
+    }
+    $monitors[$i]['Show'] = true;
+    if ( empty($minSequence) || ($monitors[$i]['Sequence'] < $minSequence) )
+    {
+        $minSequence = $monitors[$i]['Sequence'];
+    }
+    if ( $monitors[$i]['Sequence'] > $maxSequence )
+    {
+        $maxSequence = $monitors[$i]['Sequence'];
+    }
+    $monitors[$i]['zmc'] = zmcStatus( $monitors[$i] );
+    $monitors[$i]['zma'] = zmaStatus( $monitors[$i] );
+    $monitors[$i]['ZoneCount'] = dbFetchOne( "select count(Id) as ZoneCount from Zones where MonitorId = '".$monitors[$i]['Id']."'", "ZoneCount" );
+    $counts = array();
+    for ( $j = 0; $j < count($eventCounts); $j++ )
+    {
+        $filter = addFilterTerm( $eventCounts[$j]['filter'], count($eventCounts[$j]['filter']['terms']), array( "cnj" => "and", "attr" => "MonitorId", "op" => "=", "val" => $monitors[$i]['Id'] ) );
+        parseFilter( $filter );
+        $counts[] = "count(if(1".$filter['sql'].",1,NULL)) as EventCount$j";
+        $monitors[$i]['eventCounts'][$j]['filter'] = $filter;
+    }
+    $sql = "select ".join($counts,", ")." from Events as E where MonitorId = '".$monitors[$i]['Id']."'";
+    $counts = dbFetchOne( $sql );
+    if ( $monitors[$i]['Function'] != 'None' )
+    {
+        $cycleCount++;
+        $scaleWidth = reScale( $monitors[$i]['Width'], $monitors[$i]['DefaultScale'], ZM_WEB_DEFAULT_SCALE );
+        $scaleHeight = reScale( $monitors[$i]['Height'], $monitors[$i]['DefaultScale'], ZM_WEB_DEFAULT_SCALE );
+        if ( $maxWidth < $scaleWidth ) $maxWidth = $scaleWidth;
+        if ( $maxHeight < $scaleHeight ) $maxHeight = $scaleHeight;
+    }
+    $monitors[$i] = array_merge( $monitors[$i], $counts );
+    $seqIdList[] = $monitors[$i]['Id'];
+    $displayMonitors[] = $monitors[$i];
+}
+$lastId = 0;
+$seqIdUpList = array();
+foreach ( $seqIdList as $seqId )
+{
+    if ( !empty($lastId) )
+        $seqIdUpList[$seqId] = $lastId;
+    else
+        $seqIdUpList[$seqId] = $seqId;
+    $lastId = $seqId;
+}
+$lastId = 0;
+$seqIdDownList = array();
+foreach ( array_reverse($seqIdList) as $seqId )
+{
+    if ( !empty($lastId) )
+        $seqIdDownList[$seqId] = $lastId;
+    else
+        $seqIdDownList[$seqId] = $seqId;
+    $lastId = $seqId;
+}
+
+$cycleWidth = $maxWidth;
+$cycleHeight = $maxHeight;
+
+$eventsView = ZM_WEB_EVENTS_VIEW;
+$eventsWindow = 'zm'.ucfirst(ZM_WEB_EVENTS_VIEW);
+
+$eventCount = 0;
+for ( $i = 0; $i < count($eventCounts); $i++ )
+{
+    $eventCounts[$i]['total'] = 0;
+}
+$zoneCount = 0;
+foreach( $displayMonitors as $monitor )
+{
+    for ( $i = 0; $i < count($eventCounts); $i++ )
+    {
+        $eventCounts[$i]['total'] += $monitor['EventCount'.$i];
+    }
+    $zoneCount += $monitor['ZoneCount'];
+}
+
+$seqUpFile = getSkinFile( 'graphics/seq-u.gif' );
+$seqDownFile = getSkinFile( 'graphics/seq-d.gif' );
+
+xhtmlHeaders( __FILE__, $SLANG['Console'] );
+?>
+<body>
+  <div id="page">
+    <form name="monitorForm" method="get" action="<?= $_SERVER['PHP_SELF'] ?>">
+    <input type="hidden" name="view" value="<?= $view ?>"/>
+    <input type="hidden" name="action" value=""/>
+    <div id="header">
+      <h3 id="systemTime"><?= preg_match( '/%/', DATE_FMT_CONSOLE_LONG )?strftime( DATE_FMT_CONSOLE_LONG ):date( DATE_FMT_CONSOLE_LONG ) ?></h3>
+      <h3 id="systemStats"><?= $SLANG['Load'] ?>: <?= getLoad() ?> / <?= $SLANG['Disk'] ?>: <?= getDiskPercent() ?>%</h3>
+      <h2 id="title"><a href="http://www.zoneminder.com" target="ZoneMinder">ZoneMinder</a> <?= $SLANG['Console'] ?> - <?= makePopupLink( '?view=state', 'zmState', 'state', $status, canEdit( 'System' ) ) ?> - <?= makePopupLink( '?view=version', 'zmVersion', 'version', "v".ZM_VERSION, canEdit( 'System' ) ) ?></h2>
+      <div class="clear"></div>
+      <div id="monitorSummary"><?= makePopupLink( '?view=groups', 'zmGroups', 'groups', sprintf( $CLANG['MonitorCount'], count($displayMonitors), zmVlang( $VLANG['Monitor'], count($displayMonitors) ) ).($group?' ('.$group['Name'].')':''), canView( 'System' ) ); ?></div>
+<?php
+if ( ZM_OPT_X10 && canView( 'Devices' ) )
+{
+?>
+      <div id="devices"><?= makePopupLink( '?view=devices', 'zmDevices', 'devices', $SLANG['Devices'] ) ?></div>
+<?php
+}
+if ( canView( 'System' ) )
+{
+?>
+      <div id="options"><?= makePopupLink( '?view=options', 'zmOptions', 'options', $SLANG['Options'] ) ?></div>
+<?php
+}
+if ( canView( 'Stream' ) && $cycleCount > 1 )
+{
+    $cycleGroup = isset($_COOKIE['zmGroup'])?$_COOKIE['zmGroup']:0;
+?>
+      <div id="cycleMontage"><?= makePopupLink( '?view=cycle&group='.$cycleGroup, 'zmCycle'.$cycleGroup, array( 'cycle', $cycleWidth, $cycleHeight ), $SLANG['Cycle'], $running ) ?>&nbsp;/&nbsp;<?= makePopupLink( '?view=montage&group='.$cycleGroup, 'zmMontage'.$cycleGroup, 'montage', $SLANG['Montage'], $running ) ?></div>
+<?php
+}
+else
+{
+?>
+<?php
+}
+?>
+      <h3 id="loginBandwidth"><?php
+if ( ZM_OPT_USE_AUTH )
+{
+?><?= $SLANG['LoggedInAs'] ?> <?= makePopupLink( '?view=logout', 'zmLogout', 'logout', $user['Username'], (ZM_AUTH_TYPE == "builtin") ) ?>, <?= strtolower( $SLANG['ConfiguredFor'] ) ?><?php
+}
+else
+{
+?><?= $SLANG['ConfiguredFor'] ?><?php
+}
+?>&nbsp;<?= makePopupLink( '?view=bandwidth', 'zmBandwidth', 'bandwidth', $bwArray[$_COOKIE['zmBandwidth']], ($user && $user['MaxBandwidth'] != 'low' ) ) ?> <?= $SLANG['Bandwidth'] ?></h3>
+    </div>
+    <div id="content">
+      <table id="consoleTable" cellspacing="0">
+        <thead>
+          <tr>
+            <th class="colName"><?= $SLANG['Name'] ?></th>
+            <th class="colFunction"><?= $SLANG['Function'] ?></th>
+            <th class="colSource"><?= $SLANG['Source'] ?></th>
+<?php
+for ( $i = 0; $i < count($eventCounts); $i++ )
+{
+?>
+            <th class="colEvents"><?= $eventCounts[$i]['title'] ?></th>
+<?php
+}
+?>
+            <th class="colZones"><?= $SLANG['Zones'] ?></th>
+<?php
+if ( canEdit('Monitors') )
+{
+?>
+            <th class="colOrder"><?= $SLANG['Order'] ?></th>
+<?php
+}
+?>
+            <th class="colMark"><?= $SLANG['Mark'] ?></th>
+          </tr>
+        </thead>
+        <tfoot>
+          <tr>
+            <td class="colLeftButtons" colspan="3">
+              <input type="button" value="<?= $SLANG['Refresh'] ?>" onclick="location.reload(true);"/>
+              <?= makePopupButton( '?view=monitor', 'zmMonitor0', 'monitor', $SLANG['AddNewMonitor'], (canEdit( 'Monitors' ) && !$user['MonitorIds']) ) ?>
+              <?= makePopupButton( '?view=filter&filter[terms][0][attr]=DateTime&filter[terms][0][op]=%3c&filter[terms][0][val]=now', 'zmFilter', 'filter', $SLANG['Filters'], canView( 'Events' ) ) ?>
+            </td>
+<?php
+for ( $i = 0; $i < count($eventCounts); $i++ )
+{
+    parseFilter( $eventCounts[$i]['filter'] );
+?>
+            <td class="colEvents"><?= makePopupLink( '?view='.$eventsView.'&page=1'.$eventCounts[$i]['filter']['query'], $eventsWindow, $eventsView, $eventCounts[$i]['total'], canView( 'Events' ) ) ?></td>
+<?php
+}
+?>
+            <td class="colZones"><?= $zoneCount ?></td>
+            <td class="colRightButtons" colspan="<?= canEdit('Monitors')?2:1 ?>"><input type="button" name="editBtn" value="<?= $SLANG['Edit'] ?>" onclick="editMonitor( this )" disabled="disabled"/><input type="button" name="deleteBtn" value="<?= $SLANG['Delete'] ?>" onclick="deleteMonitor( this )" disabled="disabled"/></td>
+          </tr>
+        </tfoot>
+        <tbody>
+<?php
+foreach( $displayMonitors as $monitor )
+{
+?>
+          <tr>
+<?php
+    if ( !$monitor['zmc'] )
+        $dclass = "errorText";
+    else
+    {
+        if ( !$monitor['zma'] )
+            $dclass = "warnText";
+        else
+            $dclass = "infoText";
+    }
+    if ( $monitor['Function'] == 'None' )
+        $fclass = "errorText";
+    elseif ( $monitor['Function'] == 'Monitor' )
+        $fclass = "warnText";
+    else
+        $fclass = "infoText";
+    if ( !$monitor['Enabled'] )
+        $fclass .= " disabledText";
+    $scale = max( reScale( SCALE_BASE, $monitor['DefaultScale'], ZM_WEB_DEFAULT_SCALE ), SCALE_BASE );
+?>
+            <td class="colName"><?= makePopupLink( '?view=watch&mid='.$monitor['Id'], 'zmWatch'.$monitor['Id'], array( 'watch', reScale( $monitor['Width'], $scale ), reScale( $monitor['Height'], $scale ) ), $monitor['Name'], $running && ($monitor['Function'] != 'None') && canView( 'Stream' ) ) ?></td>
+            <td class="colFunction"><?= makePopupLink( '?view=function&mid='.$monitor['Id'], 'zmFunction', 'function', '<span class="'.$fclass.'">'.$monitor['Function'].'</span>', canEdit( 'Monitors' ) ) ?></td>
+<?php if ( $monitor['Type'] == "Local" ) { ?>
+            <td class="colSource"><?= makePopupLink( '?view=monitor&mid='.$monitor['Id'], 'zmMonitor'.$monitor['Id'], 'monitor', '<span class="'.$dclass.'">'.$monitor['Device'].' ('.$monitor['Channel'].')</span>', canEdit( 'Monitors' ) ) ?></td>
+<?php } elseif ( $monitor['Type'] == "Remote" ) { ?>
+            <td class="colSource"><?= makePopupLink( '?view=monitor&mid='.$monitor['Id'], 'zmMonitor'.$monitor['Id'], 'monitor', '<span class="'.$dclass.'">'.preg_replace( '/^.*@/', '', $monitor['Host'] ).'</span>', canEdit( 'Monitors' ) ) ?></td>
+<?php } elseif ( $monitor['Type'] == "File" ) { ?>
+            <td class="colSource"><?= makePopupLink( '?view=monitor&mid='.$monitor['Id'], 'zmMonitor'.$monitor['Id'], 'monitor', '<span class="'.$dclass.'">'.preg_replace( '/^.*\//', '', $monitor['Path'] ).'</span>', canEdit( 'Monitors' ) ) ?></td>
+<?php } elseif ( $monitor['Type'] == "Ffmpeg" ) { ?>
+            <td class="colSource"><?= makePopupLink( '?view=monitor&mid='.$monitor['Id'], 'zmMonitor'.$monitor['Id'], 'monitor', '<span class="'.$dclass.'">'.preg_replace( '/^.*\//', '', $monitor['Path'] ).'</span>', canEdit( 'Monitors' ) ) ?></td>
+<?php } else { ?>
+            <td class="colSource">&nbsp;</td>
+<?php } ?>
+<?php
+    for ( $i = 0; $i < count($eventCounts); $i++ )
+    {
+?>
+            <td class="colEvents"><?= makePopupLink( '?view='.$eventsView.'&page=1'.$monitor['eventCounts'][$i]['filter']['query'], $eventsWindow, $eventsView, $monitor['EventCount'.$i], canView( 'Events' ) ) ?></td>
+<?php
+    }
+?>
+            <td class="colZones"><?= makePopupLink( '?view=zones&mid='.$monitor['Id'], 'zmZones', array( 'zones', $monitor['Width'], $monitor['Height'] ), $monitor['ZoneCount'], canView( 'Monitors' ) ) ?></td>
+<?php
+    if ( canEdit('Monitors') )
+    {
+?>
+            <td class="colOrder"><?= makeLink( '?view='.$view.'&action=sequence&mid='.$monitor['Id'].'&smid='.$seqIdUpList[$monitor['Id']], '<img src="'.$seqUpFile.'" alt="Up"/>', $monitor['Sequence']>$minSequence ) ?><?= makeLink( '?view='.$view.'&action=sequence&mid='.$monitor['Id'].'&smid='.$seqIdDownList[$monitor['Id']], '<img src="'.$seqDownFile.'" alt="Down"/>', $monitor['Sequence']<$maxSequence ) ?></td>
+<?php
+    }
+?>
+            <td class="colMark"><input type="checkbox" name="markMids[]" value="<?= $monitor['Id'] ?>" onclick="setButtonStates( this )"<?php if ( !canEdit( 'Monitors' ) || $user['MonitorIds'] ) {?> disabled="disabled"<?php } ?>/></td>
+          </tr>
+<?php
+}
+?>
+        </tbody>
+      </table>
+    </div>
+    </form>
+  </div>
+</body>
+</html>
diff -uNHr zm_orig//skins/classic/views/console.php zm_flabs/skins/classic/views/console.php
--- zm_orig//skins/classic/views/console.php	2010-01-16 17:43:08.306046637 +0100
+++ zm_flabs/skins/classic/views/console.php	2010-01-16 17:23:41.725549563 +0100
@@ -1,7 +1,7 @@
 <?php
 //
-// ZoneMinder web console file, $Date: 2009-02-19 10:05:31 +0000 (Thu, 19 Feb 2009) $, $Revision: 2780 $
-// Copyright (C) 2001-2008 Philip Coombes
+// ZoneMinder web console file, $Date: 2005/11/06 21:11:30 $, $Revision: 1.57 $
+// Copyright (C) 2003, 2004, 2005  Philip Coombes
 //
 // This program is free software; you can redistribute it and/or
 // modify it under the terms of the GNU General Public License
@@ -18,327 +18,13 @@
 // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 //
 
-$eventCounts = array(
-    array(
-        "title" => $SLANG['Events'],
-        "filter" => array(
-            "terms" => array(
-            )
-        ),
-    ),
-    array(
-        "title" => $SLANG['Hour'],
-        "filter" => array(
-            "terms" => array(
-                array( "attr" => "Archived", "op" => "=", "val" => "0" ),
-                array( "cnj" => "and", "attr" => "DateTime", "op" => ">=", "val" => "-1 hour" ),
-            )
-        ),
-    ),
-    array(
-        "title" => $SLANG['Day'],
-        "filter" => array(
-            "terms" => array(
-                array( "attr" => "Archived", "op" => "=", "val" => "0" ),
-                array( "cnj" => "and", "attr" => "DateTime", "op" => ">=", "val" => "-1 day" ),
-            )
-        ),
-    ),
-    array(
-        "title" => $SLANG['Week'],
-        "filter" => array(
-            "terms" => array(
-                array( "attr" => "Archived", "op" => "=", "val" => "0" ),
-                array( "cnj" => "and", "attr" => "DateTime", "op" => ">=", "val" => "-7 day" ),
-            )
-        ),
-    ),
-    array(
-        "title" => $SLANG['Month'],
-        "filter" => array(
-            "terms" => array(
-                array( "attr" => "Archived", "op" => "=", "val" => "0" ),
-                array( "cnj" => "and", "attr" => "DateTime", "op" => ">=", "val" => "-1 month" ),
-            )
-        ),
-    ),
-    array(
-        "title" => $SLANG['Archived'],
-        "filter" => array(
-            "terms" => array(
-                array( "attr" => "Archived", "op" => "=", "val" => "1" ),
-            )
-        ),
-    ),
-);
 
-$running = daemonCheck();
-$status = $running?$SLANG['Running']:$SLANG['Stopped'];
 
-if ( $group = dbFetchOne( "select * from Groups where Id = '".(empty($_COOKIE['zmGroup'])?0:dbEscape($_COOKIE['zmGroup']))."'" ) )
-    $groupIds = array_flip(split( ',', $group['MonitorIds'] ));
-
-noCacheHeaders();
-
-$maxWidth = 0;
-$maxHeight = 0;
-$cycleCount = 0;
-$minSequence = 0;
-$maxSequence = 1;
-$seqIdList = array();
-$monitors = dbFetchAll( "select * from Monitors order by Sequence asc" );
-$displayMonitors = array();
-for ( $i = 0; $i < count($monitors); $i++ )
-{
-    if ( !visibleMonitor( $monitors[$i]['Id'] ) )
-    {
-        continue;
-    }
-    if ( $group && !empty($groupIds) && !array_key_exists( $monitors[$i]['Id'], $groupIds ) )
-    {
-        continue;
-    }
-    $monitors[$i]['Show'] = true;
-    if ( empty($minSequence) || ($monitors[$i]['Sequence'] < $minSequence) )
-    {
-        $minSequence = $monitors[$i]['Sequence'];
-    }
-    if ( $monitors[$i]['Sequence'] > $maxSequence )
-    {
-        $maxSequence = $monitors[$i]['Sequence'];
-    }
-    $monitors[$i]['zmc'] = zmcStatus( $monitors[$i] );
-    $monitors[$i]['zma'] = zmaStatus( $monitors[$i] );
-    $monitors[$i]['ZoneCount'] = dbFetchOne( "select count(Id) as ZoneCount from Zones where MonitorId = '".$monitors[$i]['Id']."'", "ZoneCount" );
-    $counts = array();
-    for ( $j = 0; $j < count($eventCounts); $j++ )
-    {
-        $filter = addFilterTerm( $eventCounts[$j]['filter'], count($eventCounts[$j]['filter']['terms']), array( "cnj" => "and", "attr" => "MonitorId", "op" => "=", "val" => $monitors[$i]['Id'] ) );
-        parseFilter( $filter );
-        $counts[] = "count(if(1".$filter['sql'].",1,NULL)) as EventCount$j";
-        $monitors[$i]['eventCounts'][$j]['filter'] = $filter;
-    }
-    $sql = "select ".join($counts,", ")." from Events as E where MonitorId = '".$monitors[$i]['Id']."'";
-    $counts = dbFetchOne( $sql );
-    if ( $monitors[$i]['Function'] != 'None' )
-    {
-        $cycleCount++;
-        $scaleWidth = reScale( $monitors[$i]['Width'], $monitors[$i]['DefaultScale'], ZM_WEB_DEFAULT_SCALE );
-        $scaleHeight = reScale( $monitors[$i]['Height'], $monitors[$i]['DefaultScale'], ZM_WEB_DEFAULT_SCALE );
-        if ( $maxWidth < $scaleWidth ) $maxWidth = $scaleWidth;
-        if ( $maxHeight < $scaleHeight ) $maxHeight = $scaleHeight;
-    }
-    $monitors[$i] = array_merge( $monitors[$i], $counts );
-    $seqIdList[] = $monitors[$i]['Id'];
-    $displayMonitors[] = $monitors[$i];
-}
-$lastId = 0;
-$seqIdUpList = array();
-foreach ( $seqIdList as $seqId )
-{
-    if ( !empty($lastId) )
-        $seqIdUpList[$seqId] = $lastId;
-    else
-        $seqIdUpList[$seqId] = $seqId;
-    $lastId = $seqId;
-}
-$lastId = 0;
-$seqIdDownList = array();
-foreach ( array_reverse($seqIdList) as $seqId )
-{
-    if ( !empty($lastId) )
-        $seqIdDownList[$seqId] = $lastId;
-    else
-        $seqIdDownList[$seqId] = $seqId;
-    $lastId = $seqId;
-}
-
-$cycleWidth = $maxWidth;
-$cycleHeight = $maxHeight;
-
-$eventsView = ZM_WEB_EVENTS_VIEW;
-$eventsWindow = 'zm'.ucfirst(ZM_WEB_EVENTS_VIEW);
-
-$eventCount = 0;
-for ( $i = 0; $i < count($eventCounts); $i++ )
-{
-    $eventCounts[$i]['total'] = 0;
+if (isAdmin()) {
+        require_once("console_admin.php");
 }
-$zoneCount = 0;
-foreach( $displayMonitors as $monitor )
-{
-    for ( $i = 0; $i < count($eventCounts); $i++ )
-    {
-        $eventCounts[$i]['total'] += $monitor['EventCount'.$i];
-    }
-    $zoneCount += $monitor['ZoneCount'];
+else {
+        require_once("console_user.php");
 }
 
-$seqUpFile = getSkinFile( 'graphics/seq-u.gif' );
-$seqDownFile = getSkinFile( 'graphics/seq-d.gif' );
-
-xhtmlHeaders( __FILE__, $SLANG['Console'] );
-?>
-<body>
-  <div id="page">
-    <form name="monitorForm" method="get" action="<?= $_SERVER['PHP_SELF'] ?>">
-    <input type="hidden" name="view" value="<?= $view ?>"/>
-    <input type="hidden" name="action" value=""/>
-    <div id="header">
-      <h3 id="systemTime"><?= preg_match( '/%/', DATE_FMT_CONSOLE_LONG )?strftime( DATE_FMT_CONSOLE_LONG ):date( DATE_FMT_CONSOLE_LONG ) ?></h3>
-      <h3 id="systemStats"><?= $SLANG['Load'] ?>: <?= getLoad() ?> / <?= $SLANG['Disk'] ?>: <?= getDiskPercent() ?>%</h3>
-      <h2 id="title"><a href="http://www.zoneminder.com" target="ZoneMinder">ZoneMinder</a> <?= $SLANG['Console'] ?> - <?= makePopupLink( '?view=state', 'zmState', 'state', $status, canEdit( 'System' ) ) ?> - <?= makePopupLink( '?view=version', 'zmVersion', 'version', "v".ZM_VERSION, canEdit( 'System' ) ) ?></h2>
-      <div class="clear"></div>
-      <div id="monitorSummary"><?= makePopupLink( '?view=groups', 'zmGroups', 'groups', sprintf( $CLANG['MonitorCount'], count($displayMonitors), zmVlang( $VLANG['Monitor'], count($displayMonitors) ) ).($group?' ('.$group['Name'].')':''), canView( 'System' ) ); ?></div>
-<?php
-if ( ZM_OPT_X10 && canView( 'Devices' ) )
-{
-?>
-      <div id="devices"><?= makePopupLink( '?view=devices', 'zmDevices', 'devices', $SLANG['Devices'] ) ?></div>
-<?php
-}
-if ( canView( 'System' ) )
-{
-?>
-      <div id="options"><?= makePopupLink( '?view=options', 'zmOptions', 'options', $SLANG['Options'] ) ?></div>
-<?php
-}
-if ( canView( 'Stream' ) && $cycleCount > 1 )
-{
-    $cycleGroup = isset($_COOKIE['zmGroup'])?$_COOKIE['zmGroup']:0;
-?>
-      <div id="cycleMontage"><?= makePopupLink( '?view=cycle&group='.$cycleGroup, 'zmCycle'.$cycleGroup, array( 'cycle', $cycleWidth, $cycleHeight ), $SLANG['Cycle'], $running ) ?>&nbsp;/&nbsp;<?= makePopupLink( '?view=montage&group='.$cycleGroup, 'zmMontage'.$cycleGroup, 'montage', $SLANG['Montage'], $running ) ?></div>
-<?php
-}
-else
-{
-?>
-<?php
-}
-?>
-      <h3 id="loginBandwidth"><?php
-if ( ZM_OPT_USE_AUTH )
-{
-?><?= $SLANG['LoggedInAs'] ?> <?= makePopupLink( '?view=logout', 'zmLogout', 'logout', $user['Username'], (ZM_AUTH_TYPE == "builtin") ) ?>, <?= strtolower( $SLANG['ConfiguredFor'] ) ?><?php
-}
-else
-{
-?><?= $SLANG['ConfiguredFor'] ?><?php
-}
-?>&nbsp;<?= makePopupLink( '?view=bandwidth', 'zmBandwidth', 'bandwidth', $bwArray[$_COOKIE['zmBandwidth']], ($user && $user['MaxBandwidth'] != 'low' ) ) ?> <?= $SLANG['Bandwidth'] ?></h3>
-    </div>
-    <div id="content">
-      <table id="consoleTable" cellspacing="0">
-        <thead>
-          <tr>
-            <th class="colName"><?= $SLANG['Name'] ?></th>
-            <th class="colFunction"><?= $SLANG['Function'] ?></th>
-            <th class="colSource"><?= $SLANG['Source'] ?></th>
-<?php
-for ( $i = 0; $i < count($eventCounts); $i++ )
-{
-?>
-            <th class="colEvents"><?= $eventCounts[$i]['title'] ?></th>
-<?php
-}
-?>
-            <th class="colZones"><?= $SLANG['Zones'] ?></th>
-<?php
-if ( canEdit('Monitors') )
-{
-?>
-            <th class="colOrder"><?= $SLANG['Order'] ?></th>
-<?php
-}
-?>
-            <th class="colMark"><?= $SLANG['Mark'] ?></th>
-          </tr>
-        </thead>
-        <tfoot>
-          <tr>
-            <td class="colLeftButtons" colspan="3">
-              <input type="button" value="<?= $SLANG['Refresh'] ?>" onclick="location.reload(true);"/>
-              <?= makePopupButton( '?view=monitor', 'zmMonitor0', 'monitor', $SLANG['AddNewMonitor'], (canEdit( 'Monitors' ) && !$user['MonitorIds']) ) ?>
-              <?= makePopupButton( '?view=filter&filter[terms][0][attr]=DateTime&filter[terms][0][op]=%3c&filter[terms][0][val]=now', 'zmFilter', 'filter', $SLANG['Filters'], canView( 'Events' ) ) ?>
-            </td>
-<?php
-for ( $i = 0; $i < count($eventCounts); $i++ )
-{
-    parseFilter( $eventCounts[$i]['filter'] );
-?>
-            <td class="colEvents"><?= makePopupLink( '?view='.$eventsView.'&page=1'.$eventCounts[$i]['filter']['query'], $eventsWindow, $eventsView, $eventCounts[$i]['total'], canView( 'Events' ) ) ?></td>
-<?php
-}
-?>
-            <td class="colZones"><?= $zoneCount ?></td>
-            <td class="colRightButtons" colspan="<?= canEdit('Monitors')?2:1 ?>"><input type="button" name="editBtn" value="<?= $SLANG['Edit'] ?>" onclick="editMonitor( this )" disabled="disabled"/><input type="button" name="deleteBtn" value="<?= $SLANG['Delete'] ?>" onclick="deleteMonitor( this )" disabled="disabled"/></td>
-          </tr>
-        </tfoot>
-        <tbody>
-<?php
-foreach( $displayMonitors as $monitor )
-{
-?>
-          <tr>
-<?php
-    if ( !$monitor['zmc'] )
-        $dclass = "errorText";
-    else
-    {
-        if ( !$monitor['zma'] )
-            $dclass = "warnText";
-        else
-            $dclass = "infoText";
-    }
-    if ( $monitor['Function'] == 'None' )
-        $fclass = "errorText";
-    elseif ( $monitor['Function'] == 'Monitor' )
-        $fclass = "warnText";
-    else
-        $fclass = "infoText";
-    if ( !$monitor['Enabled'] )
-        $fclass .= " disabledText";
-    $scale = max( reScale( SCALE_BASE, $monitor['DefaultScale'], ZM_WEB_DEFAULT_SCALE ), SCALE_BASE );
-?>
-            <td class="colName"><?= makePopupLink( '?view=watch&mid='.$monitor['Id'], 'zmWatch'.$monitor['Id'], array( 'watch', reScale( $monitor['Width'], $scale ), reScale( $monitor['Height'], $scale ) ), $monitor['Name'], $running && ($monitor['Function'] != 'None') && canView( 'Stream' ) ) ?></td>
-            <td class="colFunction"><?= makePopupLink( '?view=function&mid='.$monitor['Id'], 'zmFunction', 'function', '<span class="'.$fclass.'">'.$monitor['Function'].'</span>', canEdit( 'Monitors' ) ) ?></td>
-<?php if ( $monitor['Type'] == "Local" ) { ?>
-            <td class="colSource"><?= makePopupLink( '?view=monitor&mid='.$monitor['Id'], 'zmMonitor'.$monitor['Id'], 'monitor', '<span class="'.$dclass.'">'.$monitor['Device'].' ('.$monitor['Channel'].')</span>', canEdit( 'Monitors' ) ) ?></td>
-<?php } elseif ( $monitor['Type'] == "Remote" ) { ?>
-            <td class="colSource"><?= makePopupLink( '?view=monitor&mid='.$monitor['Id'], 'zmMonitor'.$monitor['Id'], 'monitor', '<span class="'.$dclass.'">'.preg_replace( '/^.*@/', '', $monitor['Host'] ).'</span>', canEdit( 'Monitors' ) ) ?></td>
-<?php } elseif ( $monitor['Type'] == "File" ) { ?>
-            <td class="colSource"><?= makePopupLink( '?view=monitor&mid='.$monitor['Id'], 'zmMonitor'.$monitor['Id'], 'monitor', '<span class="'.$dclass.'">'.preg_replace( '/^.*\//', '', $monitor['Path'] ).'</span>', canEdit( 'Monitors' ) ) ?></td>
-<?php } elseif ( $monitor['Type'] == "Ffmpeg" ) { ?>
-            <td class="colSource"><?= makePopupLink( '?view=monitor&mid='.$monitor['Id'], 'zmMonitor'.$monitor['Id'], 'monitor', '<span class="'.$dclass.'">'.preg_replace( '/^.*\//', '', $monitor['Path'] ).'</span>', canEdit( 'Monitors' ) ) ?></td>
-<?php } else { ?>
-            <td class="colSource">&nbsp;</td>
-<?php } ?>
-<?php
-    for ( $i = 0; $i < count($eventCounts); $i++ )
-    {
-?>
-            <td class="colEvents"><?= makePopupLink( '?view='.$eventsView.'&page=1'.$monitor['eventCounts'][$i]['filter']['query'], $eventsWindow, $eventsView, $monitor['EventCount'.$i], canView( 'Events' ) ) ?></td>
-<?php
-    }
-?>
-            <td class="colZones"><?= makePopupLink( '?view=zones&mid='.$monitor['Id'], 'zmZones', array( 'zones', $monitor['Width'], $monitor['Height'] ), $monitor['ZoneCount'], canView( 'Monitors' ) ) ?></td>
-<?php
-    if ( canEdit('Monitors') )
-    {
-?>
-            <td class="colOrder"><?= makeLink( '?view='.$view.'&action=sequence&mid='.$monitor['Id'].'&smid='.$seqIdUpList[$monitor['Id']], '<img src="'.$seqUpFile.'" alt="Up"/>', $monitor['Sequence']>$minSequence ) ?><?= makeLink( '?view='.$view.'&action=sequence&mid='.$monitor['Id'].'&smid='.$seqIdDownList[$monitor['Id']], '<img src="'.$seqDownFile.'" alt="Down"/>', $monitor['Sequence']<$maxSequence ) ?></td>
-<?php
-    }
-?>
-            <td class="colMark"><input type="checkbox" name="markMids[]" value="<?= $monitor['Id'] ?>" onclick="setButtonStates( this )"<?php if ( !canEdit( 'Monitors' ) || $user['MonitorIds'] ) {?> disabled="disabled"<?php } ?>/></td>
-          </tr>
-<?php
-}
 ?>
-        </tbody>
-      </table>
-    </div>
-    </form>
-  </div>
-</body>
-</html>
diff -uNHr zm_orig//skins/classic/views/console.php.weiche zm_flabs/skins/classic/views/console.php.weiche
--- zm_orig//skins/classic/views/console.php.weiche	1970-01-01 01:00:00.000000000 +0100
+++ zm_flabs/skins/classic/views/console.php.weiche	2010-01-16 17:23:44.308910817 +0100
@@ -0,0 +1,30 @@
+<?php
+//
+// ZoneMinder web console file, $Date: 2005/11/06 21:11:30 $, $Revision: 1.57 $
+// Copyright (C) 2003, 2004, 2005  Philip Coombes
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+//
+
+
+
+if (isAdmin()) {
+        require_once("console_admin.php");
+}
+else {
+        require_once("console_user.php");
+}
+
+?>
diff -uNHr zm_orig//skins/classic/views/console_user.php zm_flabs/skins/classic/views/console_user.php
--- zm_orig//skins/classic/views/console_user.php	1970-01-01 01:00:00.000000000 +0100
+++ zm_flabs/skins/classic/views/console_user.php	2010-01-16 17:23:45.627111592 +0100
@@ -0,0 +1,315 @@
+<?php
+//
+// ZoneMinder web console file, $Date: 2009-02-19 10:05:31 +0000 (Thu, 19 Feb 2009) $, $Revision: 2780 $
+// Copyright (C) 2001-2008 Philip Coombes
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+//
+
+$eventCounts = array(
+    array(
+        "title" => $SLANG['Events'],
+        "filter" => array(
+            "terms" => array(
+            )
+        ),
+    ),
+    array(
+        "title" => $SLANG['Hour'],
+        "filter" => array(
+            "terms" => array(
+                array( "attr" => "Archived", "op" => "=", "val" => "0" ),
+                array( "cnj" => "and", "attr" => "DateTime", "op" => ">=", "val" => "-1 hour" ),
+            )
+        ),
+    ),
+    array(
+        "title" => $SLANG['Day'],
+        "filter" => array(
+            "terms" => array(
+                array( "attr" => "Archived", "op" => "=", "val" => "0" ),
+                array( "cnj" => "and", "attr" => "DateTime", "op" => ">=", "val" => "-1 day" ),
+            )
+        ),
+    ),
+    array(
+        "title" => $SLANG['Week'],
+        "filter" => array(
+            "terms" => array(
+                array( "attr" => "Archived", "op" => "=", "val" => "0" ),
+                array( "cnj" => "and", "attr" => "DateTime", "op" => ">=", "val" => "-7 day" ),
+            )
+        ),
+    ),
+    array(
+        "title" => $SLANG['Month'],
+        "filter" => array(
+            "terms" => array(
+                array( "attr" => "Archived", "op" => "=", "val" => "0" ),
+                array( "cnj" => "and", "attr" => "DateTime", "op" => ">=", "val" => "-1 month" ),
+            )
+        ),
+    ),
+    array(
+        "title" => $SLANG['Archived'],
+        "filter" => array(
+            "terms" => array(
+                array( "attr" => "Archived", "op" => "=", "val" => "1" ),
+            )
+        ),
+    ),
+);
+
+$running = daemonCheck();
+$status = $running?$SLANG['Running']:$SLANG['Stopped'];
+
+if ( $group = dbFetchOne( "select * from Groups where Id = '".(empty($_COOKIE['zmGroup'])?0:dbEscape($_COOKIE['zmGroup']))."'" ) )
+    $groupIds = array_flip(split( ',', $group['MonitorIds'] ));
+
+noCacheHeaders();
+
+$maxWidth = 0;
+$maxHeight = 0;
+$cycleCount = 0;
+$minSequence = 0;
+$maxSequence = 1;
+$seqIdList = array();
+$monitors = dbFetchAll( "select * from Monitors order by Sequence asc" );
+$displayMonitors = array();
+for ( $i = 0; $i < count($monitors); $i++ )
+{
+    if ( !visibleMonitor( $monitors[$i]['Id'] ) )
+    {
+        continue;
+    }
+    if ( $group && !empty($groupIds) && !array_key_exists( $monitors[$i]['Id'], $groupIds ) )
+    {
+        continue;
+    }
+    $monitors[$i]['Show'] = true;
+    if ( empty($minSequence) || ($monitors[$i]['Sequence'] < $minSequence) )
+    {
+        $minSequence = $monitors[$i]['Sequence'];
+    }
+    if ( $monitors[$i]['Sequence'] > $maxSequence )
+    {
+        $maxSequence = $monitors[$i]['Sequence'];
+    }
+    $monitors[$i]['zmc'] = zmcStatus( $monitors[$i] );
+    $monitors[$i]['zma'] = zmaStatus( $monitors[$i] );
+    $monitors[$i]['ZoneCount'] = dbFetchOne( "select count(Id) as ZoneCount from Zones where MonitorId = '".$monitors[$i]['Id']."'", "ZoneCount" );
+    $counts = array();
+    for ( $j = 0; $j < count($eventCounts); $j++ )
+    {
+        $filter = addFilterTerm( $eventCounts[$j]['filter'], count($eventCounts[$j]['filter']['terms']), array( "cnj" => "and", "attr" => "MonitorId", "op" => "=", "val" => $monitors[$i]['Id'] ) );
+        parseFilter( $filter );
+        $counts[] = "count(if(1".$filter['sql'].",1,NULL)) as EventCount$j";
+        $monitors[$i]['eventCounts'][$j]['filter'] = $filter;
+    }
+    $sql = "select ".join($counts,", ")." from Events as E where MonitorId = '".$monitors[$i]['Id']."'";
+    $counts = dbFetchOne( $sql );
+    if ( $monitors[$i]['Function'] != 'None' )
+    {
+        $cycleCount++;
+        $scaleWidth = reScale( $monitors[$i]['Width'], $monitors[$i]['DefaultScale'], ZM_WEB_DEFAULT_SCALE );
+        $scaleHeight = reScale( $monitors[$i]['Height'], $monitors[$i]['DefaultScale'], ZM_WEB_DEFAULT_SCALE );
+        if ( $maxWidth < $scaleWidth ) $maxWidth = $scaleWidth;
+        if ( $maxHeight < $scaleHeight ) $maxHeight = $scaleHeight;
+    }
+    $monitors[$i] = array_merge( $monitors[$i], $counts );
+    $seqIdList[] = $monitors[$i]['Id'];
+    $displayMonitors[] = $monitors[$i];
+}
+$lastId = 0;
+$seqIdUpList = array();
+foreach ( $seqIdList as $seqId )
+{
+    if ( !empty($lastId) )
+        $seqIdUpList[$seqId] = $lastId;
+    else
+        $seqIdUpList[$seqId] = $seqId;
+    $lastId = $seqId;
+}
+$lastId = 0;
+$seqIdDownList = array();
+foreach ( array_reverse($seqIdList) as $seqId )
+{
+    if ( !empty($lastId) )
+        $seqIdDownList[$seqId] = $lastId;
+    else
+        $seqIdDownList[$seqId] = $seqId;
+    $lastId = $seqId;
+}
+
+$cycleWidth = $maxWidth;
+$cycleHeight = $maxHeight;
+
+$eventsView = ZM_WEB_EVENTS_VIEW;
+$eventsWindow = 'zm'.ucfirst(ZM_WEB_EVENTS_VIEW);
+
+$eventCount = 0;
+for ( $i = 0; $i < count($eventCounts); $i++ )
+{
+    $eventCounts[$i]['total'] = 0;
+}
+$zoneCount = 0;
+foreach( $displayMonitors as $monitor )
+{
+    for ( $i = 0; $i < count($eventCounts); $i++ )
+    {
+        $eventCounts[$i]['total'] += $monitor['EventCount'.$i];
+    }
+    $zoneCount += $monitor['ZoneCount'];
+}
+
+$seqUpFile = getSkinFile( 'graphics/seq-u.gif' );
+$seqDownFile = getSkinFile( 'graphics/seq-d.gif' );
+
+xhtmlHeaders( __FILE__, $SLANG['Console'] );
+?>
+<body>
+  <div id="page">
+    <form name="monitorForm" method="get" action="<?= $_SERVER['PHP_SELF'] ?>">
+    <input type="hidden" name="view" value="<?= $view ?>"/>
+    <input type="hidden" name="action" value=""/>
+    <div id="header">
+      <h2 id="title"><a href="http://www.framelabs.de" target="FrameLabs">FrameLabs</a> <?= $SLANG['Console'] ?> - <?= makePopupLink( '?view=state', 'zmState', 'state', $status, canEdit( 'System' ) ) ?> </h2>
+      <div class="clear"></div>
+      <div id="monitorSummary"><?= makePopupLink( '?view=groups', 'zmGroups', 'groups', sprintf( $CLANG['MonitorCount'], count($displayMonitors), zmVlang( $VLANG['Monitor'], count($displayMonitors) ) ).($group?' ('.$group['Name'].')':''), canView( 'System' ) ); ?></div>
+<?php
+if ( ZM_OPT_X10 && canView( 'Devices' ) )
+{
+?>
+      <div id="devices"><?= makePopupLink( '?view=devices', 'zmDevices', 'devices', $SLANG['Devices'] ) ?></div>
+<?php
+}
+if ( canView( 'System' ) )
+{
+?>
+      <div id="options"><?= makePopupLink( '?view=options', 'zmOptions', 'options', $SLANG['Options'] ) ?></div>
+<?php
+}
+if ( canView( 'Stream' ) && $cycleCount > 1 )
+{
+    $cycleGroup = isset($_COOKIE['zmGroup'])?$_COOKIE['zmGroup']:0;
+?>
+      <div id="cycleMontage"><?= makePopupLink( '?view=cycle&group='.$cycleGroup, 'zmCycle'.$cycleGroup, array( 'cycle', $cycleWidth, $cycleHeight ), $SLANG['Cycle'], $running ) ?>&nbsp;/&nbsp;<?= makePopupLink( '?view=montage&group='.$cycleGroup, 'zmMontage'.$cycleGroup, 'montage', $SLANG['Montage'], $running ) ?></div>
+<?php
+}
+else
+{
+?>
+<?php
+}
+?>
+      <h3 id="loginBandwidth"><?php
+if ( ZM_OPT_USE_AUTH )
+{
+?><?= $SLANG['LoggedInAs'] ?> <?= makePopupLink( '?view=logout', 'zmLogout', 'logout', $user['Username'], (ZM_AUTH_TYPE == "builtin") ) ?>, <?= strtolower( $SLANG['ConfiguredFor'] ) ?><?php
+}
+else
+{
+?><?= $SLANG['ConfiguredFor'] ?><?php
+}
+?>&nbsp;<?= makePopupLink( '?view=bandwidth', 'zmBandwidth', 'bandwidth', $bwArray[$_COOKIE['zmBandwidth']], ($user && $user['MaxBandwidth'] != 'low' ) ) ?> <?= $SLANG['Bandwidth'] ?></h3>
+    </div>
+    <div id="content">
+      <table id="consoleTable" cellspacing="0">
+
+        <thead>
+          <tr>
+            <th class="colName"><?= date( "G:i (j.m.)" ) ?></th>
+            <th class="colName"><?= $SLANG['Name'] ?></th>
+            <th class="colFunction"><?= $SLANG['Function'] ?></th>
+<?php
+for ( $i = 0; $i < count($eventCounts); $i++ )
+{
+?>
+            <th class="colEvents"><?= $eventCounts[$i]['title'] ?></th>
+<?php
+}
+?>
+          </tr>
+        </thead>
+        <tfoot>
+          <tr>
+            <td class="colLeftButtons" colspan="3">
+              <input type="button" value="<?= $SLANG['Refresh'] ?>" onclick="location.reload(true);"/>
+<!-- hier -->
+            </td>
+<?php
+for ( $i = 0; $i < count($eventCounts); $i++ )
+{
+    parseFilter( $eventCounts[$i]['filter'] );
+?>
+            <td class="colEvents"><?= makePopupLink( '?view='.$eventsView.'&page=1'.$eventCounts[$i]['filter']['query'], $eventsWindow, $eventsView, $eventCounts[$i]['total'], canView( 'Events' ) ) ?></td>
+<?php
+}
+?>
+          </tr>
+        </tfoot>
+        <tbody>
+<?php
+foreach( $displayMonitors as $monitor )
+{
+?>
+          <tr>
+<?php
+    if ( !$monitor['zmc'] )
+        $dclass = "errorText";
+    else
+    {
+        if ( !$monitor['zma'] )
+            $dclass = "warnText";
+        else
+            $dclass = "infoText";
+    }
+    if ( $monitor['Function'] == 'None' )
+        $fclass = "errorText";
+    elseif ( $monitor['Function'] == 'Monitor' )
+        $fclass = "warnText";
+    else
+        $fclass = "infoText";
+    if ( !$monitor['Enabled'] )
+        $fclass .= " disabledText";
+    $scale = max( reScale( SCALE_BASE, $monitor['DefaultScale'], ZM_WEB_DEFAULT_SCALE ), SCALE_BASE );
+    $cam_pic='<img src="/cgi-bin/zms?mode=single&monitor=' . $monitor['Id'] . '&scale=25&maxfps=0.2&auth=' . generateAuthHash( ZM_AUTH_HASH_IPS ) . '" border="0" width="80" height="60">';
+?>
+            <td class="colName"><?= makePopupLink( '?view=watch&mid='.$monitor['Id'], 'zmWatch'.$monitor['Id'], array( 'watch', reScale( $monitor['Width'], $scale ), reScale( $monitor['Height'], $scale ) ), $cam_pic, $running && ($monitor['Function'] != 'None') && canView( 'Stream' ) ) ?></td>
+            <td class="colName"><?= makePopupLink( '?view=watch&mid='.$monitor['Id'], 'zmWatch'.$monitor['Id'], array( 'watch', reScale( $monitor['Width'], $scale ), reScale( $monitor['Height'], $scale ) ), $monitor['Name'], $running && ($monitor['Function'] != 'None') && canView( 'Stream' ) ) ?></td>
+            <td class="colFunction"><?= makePopupLink( '?view=function&mid='.$monitor['Id'], 'zmFunction', 'function', '<span class="'.$fclass.'">'.$monitor['Function'].'</span>', canEdit( 'Monitors' ) ) ?></td>
+<?php
+    for ( $i = 0; $i < count($eventCounts); $i++ )
+    {
+?>
+            <td class="colEvents"><?= makePopupLink( '?view='.$eventsView.'&page=1'.$monitor['eventCounts'][$i]['filter']['query'], $eventsWindow, $eventsView,
+$monitor['EventCount'.$i], canView( 'Events' ) ) ?></td>
+<?php
+    }
+?>
+
+
+          </tr>
+
+<?php
+}
+?>
+        </tbody>
+      </table>
+    </div>
+    </form>
+  </div>
+</body>
+</html>
diff -uNHr zm_orig//skins/classic/views/css/console_admin.css zm_flabs/skins/classic/views/css/console_admin.css
--- zm_orig//skins/classic/views/css/console_admin.css	1970-01-01 01:00:00.000000000 +0100
+++ zm_flabs/skins/classic/views/css/console_admin.css	2010-01-16 17:23:44.947790553 +0100
@@ -0,0 +1,97 @@
+#systemTime {
+    float: left;
+}
+
+#title {
+    margin: 0 auto;
+    text-align: center;
+    width: 50%;
+}
+
+#systemStats {
+    float: right;
+}
+
+#monitorSummary {
+    float: left;
+    text-align: left;
+    width: 20%;
+}
+
+#devices {
+    float: left;
+}
+
+#loginBandwidth {
+    margin: 0 auto;
+    text-align: center;
+    width: 40%;
+}
+
+#cycleMontage {
+    float: right;
+}
+
+#options {
+    float: right;
+    text-align: right;
+    width: 20%;
+}
+
+#consoleTable {
+    width: 100%;
+}
+
+#consoleTable tr.highlight {
+    background-color: #eeeeee;
+}
+
+#consoleTable thead th {
+    padding-bottom: 4px;
+    vertical-align: middle;
+}
+
+#consoleTable tfoot td {
+    padding-top: 4px;
+    vertical-align: middle;
+}
+
+#consoleTable th,td {
+    height: 16px;
+    text-align: left;
+}
+
+#consoleTable .colOrder {
+    text-align: center;
+}
+
+#consoleTable .colMark {
+    width: 32px;
+    text-align: center;
+}
+
+#consoleTable .colEvents {
+    text-align: right;
+}
+
+#consoleTable .colZones {
+    text-align: right;
+}
+
+#consoleTable .colLeftButtons {
+    text-align: left;
+}
+
+#consoleTable .colLeftButtons input {
+    margin-right: 24px;
+}
+
+#consoleTable .colRightButtons {
+    text-align: right;
+    padding-right: 8px;
+}
+
+#consoleTable .colRightButtons input {
+    margin: 0 8px;
+}
+
diff -uNHr zm_orig//skins/classic/views/css/console_user.css zm_flabs/skins/classic/views/css/console_user.css
--- zm_orig//skins/classic/views/css/console_user.css	1970-01-01 01:00:00.000000000 +0100
+++ zm_flabs/skins/classic/views/css/console_user.css	2010-01-16 17:23:45.107814248 +0100
@@ -0,0 +1,97 @@
+#systemTime {
+    float: left;
+}
+
+#title {
+    margin: 0 auto;
+    text-align: center;
+    width: 50%;
+}
+
+#systemStats {
+    float: right;
+}
+
+#monitorSummary {
+    float: left;
+    text-align: left;
+    width: 20%;
+}
+
+#devices {
+    float: left;
+}
+
+#loginBandwidth {
+    margin: 0 auto;
+    text-align: center;
+    width: 40%;
+}
+
+#cycleMontage {
+    float: right;
+}
+
+#options {
+    float: right;
+    text-align: right;
+    width: 20%;
+}
+
+#consoleTable {
+    width: 80%;
+}
+
+#consoleTable tr.highlight {
+    background-color: #eeeeee;
+}
+
+#consoleTable thead th {
+    padding-bottom: 4px;
+    vertical-align: middle;
+}
+
+#consoleTable tfoot td {
+    padding-top: 4px;
+    vertical-align: middle;
+}
+
+#consoleTable th,td {
+    height: 16px;
+    text-align: left;
+}
+
+#consoleTable .colOrder {
+    text-align: center;
+}
+
+#consoleTable .colMark {
+    width: 32px;
+    text-align: center;
+}
+
+#consoleTable .colEvents {
+    text-align: right;
+}
+
+#consoleTable .colZones {
+    text-align: right;
+}
+
+#consoleTable .colLeftButtons {
+    text-align: left;
+}
+
+#consoleTable .colLeftButtons input {
+    margin-right: 24px;
+}
+
+#consoleTable .colRightButtons {
+    text-align: right;
+    padding-right: 8px;
+}
+
+#consoleTable .colRightButtons input {
+    margin: 0 8px;
+}
+
diff -uNHr zm_orig//skins/classic/views/js/console_admin.js zm_flabs/skins/classic/views/js/console_admin.js
--- zm_orig//skins/classic/views/js/console_admin.js	1970-01-01 01:00:00.000000000 +0100
+++ zm_flabs/skins/classic/views/js/console_admin.js	2010-01-16 17:23:43.418342599 +0100
@@ -0,0 +1,65 @@
+function setButtonStates( element )
+{
+    var form = element.form;
+    var checked = 0;
+    for ( var i = 0; i < form.elements.length; i++ )
+    {
+        if ( form.elements[i].type == "checkbox" )
+        {
+            if ( form.elements[i].checked )
+            {
+                if ( checked++ > 1 )
+                    break;
+            }
+        }
+    }
+    $(element).getParent( 'tr' ).toggleClass( 'highlight' );
+    form.editBtn.disabled = (checked!=1);
+    form.deleteBtn.disabled = (checked==0);
+}
+
+function editMonitor( element )
+{
+    var form = element.form;
+    for ( var i = 0; i < form.elements.length; i++ )
+    {
+        if ( form.elements[i].type == "checkbox" )
+        {
+            if ( form.elements[i].checked )
+            {
+                var monitorId = form.elements[i].value;
+                createPopup( '?view=monitor&mid='+monitorId, 'zmMonitor'+monitorId, 'monitor' );
+                form.elements[i].checked = false;
+                setButtonStates( form.elements[i] );
+                //$(form.elements[i]).getParent( 'tr' ).removeClass( 'highlight' );
+                break;
+            }
+        }
+    }
+}
+
+function deleteMonitor( element )
+{
+    if ( confirm( 'Warning, deleting a monitor also deletes all events and database entries associated with it.\nAre you sure you wish to delete?' ) )
+    {
+        var form = element.form;
+        form.elements['action'].value = 'delete';
+        form.submit();
+    }
+}
+
+function reloadWindow()
+{
+    window.location.replace( thisUrl );
+}
+
+function initPage()
+{
+    reloadWindow.periodical( consoleRefreshTimeout );
+    if ( showVersionPopup )
+        createPopup( '?view=version', 'zmVersion', 'version' );
+    if ( showDonatePopup )
+        createPopup( '?view=donate', 'zmDonate', 'donate' );
+}
+
+window.addEvent( 'domready', initPage );
diff -uNHr zm_orig//skins/classic/views/js/console_admin.js.php zm_flabs/skins/classic/views/js/console_admin.js.php
--- zm_orig//skins/classic/views/js/console_admin.js.php	1970-01-01 01:00:00.000000000 +0100
+++ zm_flabs/skins/classic/views/js/console_admin.js.php	2010-01-16 17:23:43.212348213 +0100
@@ -0,0 +1,28 @@
+var consoleRefreshTimeout = <?= 1000*ZM_WEB_REFRESH_MAIN ?>;
+
+<?php
+if ( ZM_CHECK_FOR_UPDATES && canEdit('System') && ZM_DYN_LAST_VERSION && ( verNum(ZM_VERSION) < verNum(ZM_DYN_LAST_VERSION) ) && ( verNum(ZM_DYN_CURR_VERSION) < verNum(ZM_DYN_LAST_VERSION) ) && ( ZM_DYN_NEXT_REMINDER < time() ) )
+{
+    $showVersionPopup = true;
+}
+elseif ( ZM_DYN_SHOW_DONATE_REMINDER )
+{
+    if ( canEdit('System') )
+    {
+        if ( ZM_DYN_DONATE_REMINDER_TIME > 0 )
+        {
+            if ( ZM_DYN_DONATE_REMINDER_TIME < time() )
+            {
+                $showDonatePopup = true;
+            }
+        }
+        else
+        {
+            $nextReminder = time() + 30*24*60*60;
+            dbQuery( "update Config set Value = '".$nextReminder."' where Name = 'ZM_DYN_DONATE_REMINDER_TIME'" );
+        }
+    }
+}
+?>
+var showVersionPopup = <?= isset($showVersionPopup )?'true':'false' ?>;
+var showDonatePopup = <?= isset($showDonatePopup )?'true':'false' ?>;
diff -uNHr zm_orig//skins/classic/views/js/console_user.js zm_flabs/skins/classic/views/js/console_user.js
--- zm_orig//skins/classic/views/js/console_user.js	1970-01-01 01:00:00.000000000 +0100
+++ zm_flabs/skins/classic/views/js/console_user.js	2010-01-16 17:23:43.098300717 +0100
@@ -0,0 +1,65 @@
+function setButtonStates( element )
+{
+    var form = element.form;
+    var checked = 0;
+    for ( var i = 0; i < form.elements.length; i++ )
+    {
+        if ( form.elements[i].type == "checkbox" )
+        {
+            if ( form.elements[i].checked )
+            {
+                if ( checked++ > 1 )
+                    break;
+            }
+        }
+    }
+    $(element).getParent( 'tr' ).toggleClass( 'highlight' );
+    form.editBtn.disabled = (checked!=1);
+    form.deleteBtn.disabled = (checked==0);
+}
+
+function editMonitor( element )
+{
+    var form = element.form;
+    for ( var i = 0; i < form.elements.length; i++ )
+    {
+        if ( form.elements[i].type == "checkbox" )
+        {
+            if ( form.elements[i].checked )
+            {
+                var monitorId = form.elements[i].value;
+                createPopup( '?view=monitor&mid='+monitorId, 'zmMonitor'+monitorId, 'monitor' );
+                form.elements[i].checked = false;
+                setButtonStates( form.elements[i] );
+                //$(form.elements[i]).getParent( 'tr' ).removeClass( 'highlight' );
+                break;
+            }
+        }
+    }
+}
+
+function deleteMonitor( element )
+{
+    if ( confirm( 'Warning, deleting a monitor also deletes all events and database entries associated with it.\nAre you sure you wish to delete?' ) )
+    {
+        var form = element.form;
+        form.elements['action'].value = 'delete';
+        form.submit();
+    }
+}
+
+function reloadWindow()
+{
+    window.location.replace( thisUrl );
+}
+
+function initPage()
+{
+    reloadWindow.periodical( consoleRefreshTimeout );
+    if ( showVersionPopup )
+        createPopup( '?view=version', 'zmVersion', 'version' );
+    if ( showDonatePopup )
+        createPopup( '?view=donate', 'zmDonate', 'donate' );
+}
+
+window.addEvent( 'domready', initPage );
diff -uNHr zm_orig//skins/classic/views/js/console_user.js.php zm_flabs/skins/classic/views/js/console_user.js.php
--- zm_orig//skins/classic/views/js/console_user.js.php	1970-01-01 01:00:00.000000000 +0100
+++ zm_flabs/skins/classic/views/js/console_user.js.php	2010-01-16 17:23:43.485196767 +0100
@@ -0,0 +1,28 @@
+var consoleRefreshTimeout = <?= 1000*ZM_WEB_REFRESH_MAIN ?>;
+
+<?php
+if ( ZM_CHECK_FOR_UPDATES && canEdit('System') && ZM_DYN_LAST_VERSION && ( verNum(ZM_VERSION) < verNum(ZM_DYN_LAST_VERSION) ) && ( verNum(ZM_DYN_CURR_VERSION) < verNum(ZM_DYN_LAST_VERSION) ) && ( ZM_DYN_NEXT_REMINDER < time() ) )
+{
+    $showVersionPopup = true;
+}
+elseif ( ZM_DYN_SHOW_DONATE_REMINDER )
+{
+    if ( canEdit('System') )
+    {
+        if ( ZM_DYN_DONATE_REMINDER_TIME > 0 )
+        {
+            if ( ZM_DYN_DONATE_REMINDER_TIME < time() )
+            {
+                $showDonatePopup = true;
+            }
+        }
+        else
+        {
+            $nextReminder = time() + 30*24*60*60;
+            dbQuery( "update Config set Value = '".$nextReminder."' where Name = 'ZM_DYN_DONATE_REMINDER_TIME'" );
+        }
+    }
+}
+?>
+var showVersionPopup = <?= isset($showVersionPopup )?'true':'false' ?>;
+var showDonatePopup = <?= isset($showDonatePopup )?'true':'false' ?>;
diff -uNHr zm_orig//skins/classic/views/login.php zm_flabs/skins/classic/views/login.php
--- zm_orig//skins/classic/views/login.php	2010-01-16 17:43:08.302046966 +0100
+++ zm_flabs/skins/classic/views/login.php	2010-01-16 17:23:45.579288711 +0100
@@ -23,7 +23,7 @@
 <body>
   <div id="page">
     <div id="header">
-      <h1>ZoneMinder <?= $SLANG['Login'] ?></h1>
+      <h1>FrameLabs <?= $SLANG['Login'] ?></h1>
     </div>
     <div id="content">
       <form name="loginForm" id="loginForm" method="post" action="<?= $_SERVER['PHP_SELF'] ?>">
diff -uNHr zm_orig//skins/classic/views/logout.php zm_flabs/skins/classic/views/logout.php
--- zm_orig//skins/classic/views/logout.php	2010-01-16 17:43:08.302046966 +0100
+++ zm_flabs/skins/classic/views/logout.php	2010-01-16 17:23:41.520501544 +0100
@@ -25,7 +25,7 @@
 <body>
   <div id="page">
     <div id="header">
-      <h1>ZoneMinder <?= $SLANG['Logout'] ?></h1>
+      <h1>FrameLabs <?= $SLANG['Logout'] ?></h1>
     </div>
     <div id="content">
       <form name="contentForm" id="contentForm" method="post" action="<?= $_SERVER['PHP_SELF'] ?>">
diff -uNHr zm_orig//skins/classic/views/postlogin.php zm_flabs/skins/classic/views/postlogin.php
--- zm_orig//skins/classic/views/postlogin.php	2010-01-16 17:43:08.302046966 +0100
+++ zm_flabs/skins/classic/views/postlogin.php	2010-01-16 17:23:41.754670273 +0100
@@ -23,7 +23,7 @@
 <body>
   <div id="page">
     <div id="header">
-      <h1>ZoneMinder <?= $SLANG['Login'] ?></h1>
+      <h1>FrameLabs <?= $SLANG['Login'] ?></h1>
     </div>
     <div id="content">
       <h2><?= $SLANG['LoggingIn'] ?></h2>
