2002-10-11 17:45:06 +08:00
|
|
|
<?php
|
|
|
|
|
|
|
|
//
|
2002-12-10 21:23:22 +08:00
|
|
|
// ZoneMinder web configuration file, $Date$, $Revision$
|
2003-01-12 02:22:27 +08:00
|
|
|
// Copyright (C) 2003 Philip Coombes
|
2002-10-11 17:45:06 +08:00
|
|
|
//
|
|
|
|
// 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.
|
|
|
|
//
|
|
|
|
|
2003-01-11 00:43:47 +08:00
|
|
|
// This section contains options substituted by the zmconfig.pl utility, do not edit these directly
|
|
|
|
//
|
2003-01-15 23:06:15 +08:00
|
|
|
define( "ZM_PATH_BIN", "<from zmconfig>" ); // Path to binaries
|
|
|
|
define( "ZM_PATH_WEB", "<from zmconfig>" ); // Path to web files
|
|
|
|
define( "ZM_PATH_CGI", "<from zmconfig>" ); // Path to cgi files
|
2003-01-16 00:42:57 +08:00
|
|
|
define( "ZM_DB_SERVER", "<from zmconfig>" ); // Database server
|
2003-01-11 00:43:47 +08:00
|
|
|
define( "ZM_DB_NAME", "<from zmconfig>" ); // Database containing the tables
|
|
|
|
define( "ZM_DB_USERA", "<from zmconfig>" ); // Database login
|
|
|
|
define( "ZM_DB_PASSA", "<from zmconfig>" ); // Database password
|
2003-01-11 06:29:02 +08:00
|
|
|
define( "ZM_DIR_EVENTS", "<from zmconfig>" ); // Drectory where events live
|
|
|
|
define( "ZM_DIR_IMAGES", "<from zmconfig>" ); // Drectory where images live
|
|
|
|
define( "ZM_DIR_SOUNDS", "<from zmconfig>" ); // Drectory where sounds live
|
2003-01-16 23:25:32 +08:00
|
|
|
define( "ZM_OPT_CAMBOZOLA", "<from zmconfig>" ); // Is the (optional) cambozola java streaming client installed (recommended)
|
2003-01-11 00:43:47 +08:00
|
|
|
define( "ZM_PATH_CAMBOZOLA", "<from zmconfig>" ); // Path to (optional) cambozola java streaming client (recommended)
|
2003-01-16 23:25:32 +08:00
|
|
|
define( "ZM_CAN_STREAM", "<from zmconfig>" ); // Override the detection of streaming capability by browser
|
2003-01-11 00:43:47 +08:00
|
|
|
define( "ZM_PATH_MPEG_ENCODE", "<from zmconfig>" ); // Path to (optional) mpeg video encoder
|
|
|
|
define( "ZM_PATH_NETPBM", "<from zmconfig>" ); // Path to (optional) Netpbm utilities
|
|
|
|
define( "ZM_WEB_POPUP_ON_ALARM", <from zmconfig> ); // Whether the watch window jumps to front if an alarm occurs
|
|
|
|
define( "ZM_WEB_SOUND_ON_ALARM", <from zmconfig> ); // Whether the watch window jumps to front if an alarm occurs
|
|
|
|
define( "ZM_WEB_ALARM_SOUND", <from zmconfig> ); // A sound to play on alarm, put this in the sounds directory
|
|
|
|
define( "ZM_OPT_FAST_DELETE", <from zmconfig> ); // Whether we only delete event DB records and leave zmaudit to do the rest
|
|
|
|
define( "ZM_OPT_X10", <from zmconfig> ); // Whether we want to interface with X10 devices
|
2002-10-11 17:45:06 +08:00
|
|
|
|
2003-01-11 00:43:47 +08:00
|
|
|
// Bandwidth specific ones from zmconfig.pl, again do not edit these directly as changes may be lost
|
|
|
|
//
|
|
|
|
define( "ZM_WEB_H_REFRESH_MAIN", <from zmconfig> ); // How often (in seconds) the main console window refreshes
|
|
|
|
define( "ZM_WEB_H_REFRESH_CYCLE", <from zmconfig> ); // How often the cycle watch windows swaps to the next monitor
|
|
|
|
define( "ZM_WEB_H_REFRESH_IMAGE", <from zmconfig> ); // How often the watched image is refreshed (if not streaming)
|
|
|
|
define( "ZM_WEB_H_REFRESH_STATUS", <from zmconfig> ); // How often the little status frame refreshes itself in the watch window
|
|
|
|
define( "ZM_WEB_H_REFRESH_EVENTS", <from zmconfig> ); // How often the event listing is refreshed in the watch window, only for recent events
|
|
|
|
define( "ZM_WEB_H_STREAM_IDLE_DELAY", <from zmconfig> );// How long (in milliseconds) between streamed frames in the watch window
|
|
|
|
define( "ZM_WEB_H_STREAM_FRAME_DELAY", <from zmconfig> );// How long (in milliseconds) to wait before looking for the next streamed frame
|
|
|
|
define( "ZM_WEB_H_STREAM_EVENT_DELAY", <from zmconfig> );// How long (in milliseconds) to wait between each frame when streaming events
|
|
|
|
define( "ZM_WEB_H_IMAGE_SCALING", <from zmconfig> ); // Image scaling for thumbnails, bandwidth versus cpu in rescaling
|
|
|
|
define( "ZM_WEB_M_REFRESH_MAIN", <from zmconfig> ); // How often (in seconds) the main console window refreshes
|
|
|
|
define( "ZM_WEB_M_REFRESH_CYCLE", <from zmconfig> ); // How often the cycle watch windows swaps to the next monitor
|
|
|
|
define( "ZM_WEB_M_REFRESH_IMAGE", <from zmconfig> ); // How often the watched image is refreshed (if not streaming)
|
|
|
|
define( "ZM_WEB_M_REFRESH_STATUS", <from zmconfig> ); // How often the little status frame refreshes itself in the watch window
|
|
|
|
define( "ZM_WEB_M_REFRESH_EVENTS", <from zmconfig> ); // How often the event listing is refreshed in the watch window, only for recent events
|
|
|
|
define( "ZM_WEB_M_STREAM_IDLE_DELAY", <from zmconfig> );// How long (in milliseconds) between streamed frames in the watch window
|
|
|
|
define( "ZM_WEB_M_STREAM_FRAME_DELAY", <from zmconfig> );// How long (in milliseconds) to wait before looking for the next streamed frame
|
|
|
|
define( "ZM_WEB_M_STREAM_EVENT_DELAY", <from zmconfig> );// How long (in milliseconds) to wait between each frame when streaming events
|
|
|
|
define( "ZM_WEB_M_IMAGE_SCALING", <from zmconfig> ); // Image scaling for thumbnails, bandwidth versus cpu in rescaling
|
|
|
|
define( "ZM_WEB_L_REFRESH_MAIN", <from zmconfig> ); // How often (in seconds) the main console window refreshes
|
|
|
|
define( "ZM_WEB_L_REFRESH_CYCLE", <from zmconfig> ); // How often the cycle watch windows swaps to the next monitor
|
|
|
|
define( "ZM_WEB_L_REFRESH_IMAGE", <from zmconfig> ); // How often the watched image is refreshed (if not streaming)
|
|
|
|
define( "ZM_WEB_L_REFRESH_STATUS", <from zmconfig> ); // How often the little status frame refreshes itself in the watch window
|
|
|
|
define( "ZM_WEB_L_REFRESH_EVENTS", <from zmconfig> ); // How often the event listing is refreshed in the watch window, only for recent events
|
|
|
|
define( "ZM_WEB_L_STREAM_IDLE_DELAY", <from zmconfig> );// How long (in milliseconds) between streamed frames in the watch window
|
|
|
|
define( "ZM_WEB_L_STREAM_FRAME_DELAY", <from zmconfig> );// How long (in milliseconds) to wait before looking for the next streamed frame
|
|
|
|
define( "ZM_WEB_L_STREAM_EVENT_DELAY", <from zmconfig> );// How long (in milliseconds) to wait between each frame when streaming events
|
|
|
|
define( "ZM_WEB_L_IMAGE_SCALING", <from zmconfig> ); // Image scaling for thumbnails, bandwidth versus cpu in rescaling
|
|
|
|
define( "ZM_WEB_P_REFRESH_MAIN", <from zmconfig> ); // How often (in seconds) the main console window refreshes
|
|
|
|
define( "ZM_WEB_P_REFRESH_IMAGE", <from zmconfig> ); // How often the watched image is refreshed (if not streaming)
|
2002-10-11 17:45:06 +08:00
|
|
|
|
2003-01-11 00:43:47 +08:00
|
|
|
// This section is options normally derived from other options or configuration
|
|
|
|
//
|
2003-01-11 01:12:23 +08:00
|
|
|
define( "ZM_DB_USER", ZM_DB_USERA ); // Database login
|
|
|
|
define( "ZM_DB_PASS", ZM_DB_PASSA ); // Database password
|
2003-01-15 23:06:15 +08:00
|
|
|
define( "ZMU_PATH", ZM_PATH_BIN."/zmu" ); // Local path to the ZoneMinder Utility
|
2003-01-11 00:43:47 +08:00
|
|
|
define( "ZMS_PATH", "/cgi-bin/zms" ); // Web path to the ZoneMinder Stream server
|
2002-12-10 18:54:06 +08:00
|
|
|
|
2003-01-11 18:15:12 +08:00
|
|
|
// These are miscellaneous options you won't normally need to change
|
2003-01-11 00:43:47 +08:00
|
|
|
//
|
|
|
|
define( "MAX_EVENTS", 12 ); // The maximum number of events to show in the monitor event listing
|
|
|
|
define( "EVENT_HEADER_LINES", 25 ); // How many events are listed in the event window before a new header is inserted
|
|
|
|
define( "LEARN_MODE", false ); // Currently unimplemented, do not change
|
2003-01-04 20:38:26 +08:00
|
|
|
|
2002-10-28 02:20:01 +08:00
|
|
|
switch ( $bandwidth )
|
2002-10-11 17:45:06 +08:00
|
|
|
{
|
2002-10-28 02:20:01 +08:00
|
|
|
case "high" :
|
|
|
|
{
|
2003-01-11 00:43:47 +08:00
|
|
|
define( "REFRESH_MAIN", ZM_WEB_H_REFRESH_MAIN ); // How often (in seconds) the main console window refreshes
|
|
|
|
define( "REFRESH_CYCLE", ZM_WEB_H_REFRESH_CYCLE ); // How often the cycle watch windows swaps to the next monitor
|
|
|
|
define( "REFRESH_IMAGE", ZM_WEB_H_REFRESH_IMAGE ); // How often the watched image is refreshed (if not streaming)
|
|
|
|
define( "REFRESH_STATUS", ZM_WEB_H_REFRESH_STATUS ); // How often the little status frame refreshes itself in the watch window
|
|
|
|
define( "REFRESH_EVENTS", ZM_WEB_H_REFRESH_EVENTS ); // How often the event listing is refreshed in the watch window, only for recent events
|
|
|
|
define( "STREAM_IDLE_DELAY", ZM_WEB_H_STREAM_IDLE_DELAY ); // How long (in milliseconds) between streamed frames in the watch window
|
|
|
|
define( "STREAM_FRAME_DELAY", ZM_WEB_H_STREAM_FRAME_DELAY ); // How long (in milliseconds) to wait before looking for the next streamed frame
|
|
|
|
define( "STREAM_EVENT_DELAY", ZM_WEB_H_STREAM_EVENT_DELAY ); // How long (in milliseconds) to wait between each frame when streaming events
|
|
|
|
define( "IMAGE_SCALING", ZM_WEB_H_IMAGE_SCALING ); // Image scaling for thumbnails, bandwidth versus cpu in rescaling
|
2002-10-28 02:20:01 +08:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
case "medium" :
|
|
|
|
{
|
2003-01-11 00:43:47 +08:00
|
|
|
define( "REFRESH_MAIN", ZM_WEB_M_REFRESH_MAIN ); // How often (in seconds) the main console window refreshes
|
|
|
|
define( "REFRESH_CYCLE", ZM_WEB_M_REFRESH_CYCLE ); // How often the cycle watch windows swaps to the next monitor
|
|
|
|
define( "REFRESH_IMAGE", ZM_WEB_M_REFRESH_IMAGE ); // How often the watched image is refreshed (if not streaming)
|
|
|
|
define( "REFRESH_STATUS", ZM_WEB_M_REFRESH_STATUS ); // How often the little status frame refreshes itself in the watch window
|
|
|
|
define( "REFRESH_EVENTS", ZM_WEB_M_REFRESH_EVENTS ); // How often the event listing is refreshed in the watch window, only for recent events
|
|
|
|
define( "STREAM_IDLE_DELAY", ZM_WEB_M_STREAM_IDLE_DELAY ); // How long (in milliseconds) between streamed frames in the watch window
|
|
|
|
define( "STREAM_FRAME_DELAY", ZM_WEB_M_STREAM_FRAME_DELAY ); // How long (in milliseconds) to wait before looking for the next streamed frame
|
|
|
|
define( "STREAM_EVENT_DELAY", ZM_WEB_M_STREAM_EVENT_DELAY ); // How long (in milliseconds) to wait between each frame when streaming events
|
|
|
|
define( "IMAGE_SCALING", ZM_WEB_M_IMAGE_SCALING ); // Image scaling for thumbnails, bandwidth versus cpu in rescaling
|
2002-10-28 02:20:01 +08:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
case "low" :
|
|
|
|
{
|
2003-01-11 00:43:47 +08:00
|
|
|
define( "REFRESH_MAIN", ZM_WEB_L_REFRESH_MAIN ); // How often (in seconds) the main console window refreshes
|
|
|
|
define( "REFRESH_CYCLE", ZM_WEB_L_REFRESH_CYCLE ); // How often the cycle watch windows swaps to the next monitor
|
|
|
|
define( "REFRESH_IMAGE", ZM_WEB_L_REFRESH_IMAGE ); // How often the watched image is refreshed (if not streaming)
|
|
|
|
define( "REFRESH_STATUS", ZM_WEB_L_REFRESH_STATUS ); // How often the little status frame refreshes itself in the watch window
|
|
|
|
define( "REFRESH_EVENTS", ZM_WEB_L_REFRESH_EVENTS ); // How often the event listing is refreshed in the watch window, only for recent events
|
|
|
|
define( "STREAM_IDLE_DELAY", ZM_WEB_L_STREAM_IDLE_DELAY ); // How long (in milliseconds) between streamed frames in the watch window
|
|
|
|
define( "STREAM_FRAME_DELAY", ZM_WEB_L_STREAM_FRAME_DELAY ); // How long (in milliseconds) to wait before looking for the next streamed frame
|
|
|
|
define( "STREAM_EVENT_DELAY", ZM_WEB_L_STREAM_EVENT_DELAY ); // How long (in milliseconds) to wait between each frame when streaming events
|
|
|
|
define( "IMAGE_SCALING", ZM_WEB_L_IMAGE_SCALING ); // Image scaling for thumbnails, bandwidth versus cpu in rescaling
|
2002-10-28 02:20:01 +08:00
|
|
|
break;
|
|
|
|
}
|
2003-01-11 00:43:47 +08:00
|
|
|
case "mobile" : // Very incomplete at present
|
2002-10-28 02:20:01 +08:00
|
|
|
{
|
2003-01-11 00:43:47 +08:00
|
|
|
define( "REFRESH_MAIN", ZM_WEB_P_REFRESH_MAIN ); // How often (in seconds) the main console window refreshes
|
|
|
|
define( "REFRESH_IMAGE", ZM_WEB_P_REFRESH_IMAGE ); // How often the watched image is refreshed (if not streaming)
|
2002-10-28 02:20:01 +08:00
|
|
|
break;
|
|
|
|
}
|
2002-10-11 17:45:06 +08:00
|
|
|
}
|
2002-10-17 06:11:35 +08:00
|
|
|
|
|
|
|
// Javascript window sizes
|
|
|
|
$jws = array(
|
|
|
|
'console' => array( 'w'=>720, 'h'=>400 ),
|
|
|
|
'cycle' => array( 'w'=>36, 'h'=>72 ),
|
2002-12-24 19:54:41 +08:00
|
|
|
'monitor' => array( 'w'=>360, 'h'=>450 ),
|
2002-10-17 06:11:35 +08:00
|
|
|
'watch' => array( 'w'=>72, 'h'=>360 ),
|
|
|
|
'device' => array( 'w'=>196, 'h'=>164 ),
|
|
|
|
'function' => array( 'w'=>248, 'h'=>72 ),
|
|
|
|
'events' => array( 'w'=>720, 'h'=>480 ),
|
|
|
|
'event' => array( 'w'=>420, 'h'=>500 ),
|
2002-11-29 19:20:58 +08:00
|
|
|
'filter' => array( 'w'=>560, 'h'=>250 ),
|
2002-11-28 00:21:49 +08:00
|
|
|
'filtersave' => array( 'w'=>520, 'h'=>180 ),
|
2002-10-17 06:11:35 +08:00
|
|
|
'zones' => array( 'w'=>72, 'h'=>232 ),
|
|
|
|
'zone' => array( 'w'=>360, 'h'=>480 ),
|
|
|
|
'video' => array( 'w'=>100, 'h'=>80 ),
|
|
|
|
'image' => array( 'w'=>48, 'h'=>72 ),
|
|
|
|
);
|
2002-10-11 17:45:06 +08:00
|
|
|
?>
|