2002-09-16 17:19:24 +08:00
|
|
|
<?php
|
2002-09-24 06:08:50 +08:00
|
|
|
//
|
2002-12-10 21:23:22 +08:00
|
|
|
// ZoneMinder main web interface file, $Date$, $Revision$
|
2003-01-12 02:22:27 +08:00
|
|
|
// Copyright (C) 2003 Philip Coombes
|
2002-09-24 06:08:50 +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.
|
|
|
|
//
|
|
|
|
|
2002-09-16 17:19:24 +08:00
|
|
|
import_request_variables( "GPC" );
|
|
|
|
|
2004-01-08 19:45:57 +08:00
|
|
|
// Use these for debugging, though not both at once!
|
2002-09-20 23:29:41 +08:00
|
|
|
//phpinfo( INFO_VARIABLES );
|
2004-01-08 19:45:57 +08:00
|
|
|
//error_reporting( E_ALL );
|
2004-01-08 18:09:35 +08:00
|
|
|
|
2002-10-11 17:44:41 +08:00
|
|
|
if ( !isset($PHP_SELF) )
|
2002-09-23 23:56:46 +08:00
|
|
|
{
|
2002-10-11 17:44:41 +08:00
|
|
|
$PHP_SELF = $HTTP_SERVER_VARS['PHP_SELF'];
|
2002-09-23 23:56:46 +08:00
|
|
|
}
|
|
|
|
|
2004-01-08 18:09:35 +08:00
|
|
|
$accepts_wml = preg_match( '/text\/vnd.wap.wml/i', $HTTP_SERVER_VARS['HTTP_ACCEPT'] );
|
|
|
|
$accepts_html = preg_match( '/text\/html/i', $HTTP_SERVER_VARS['HTTP_ACCEPT'] );
|
2002-09-23 23:56:46 +08:00
|
|
|
|
2003-01-18 23:23:14 +08:00
|
|
|
if ( isset($wml) || ($accepts_wml && !$accepts_html) )
|
2002-09-23 23:56:46 +08:00
|
|
|
{
|
2003-03-26 20:40:23 +08:00
|
|
|
require_once( 'zm_wml.php' );
|
2002-09-24 00:37:41 +08:00
|
|
|
}
|
2002-10-17 06:11:06 +08:00
|
|
|
else
|
2002-09-20 23:29:41 +08:00
|
|
|
{
|
2003-03-26 20:40:23 +08:00
|
|
|
require_once( 'zm_html.php' );
|
2002-09-20 23:29:41 +08:00
|
|
|
}
|
|
|
|
?>
|