From 79bfb8fa9f87dbdb28bddedc2af28cdade21055e Mon Sep 17 00:00:00 2001 From: stan Date: Thu, 20 Oct 2005 16:57:32 +0000 Subject: [PATCH] Modified to use new remote auth methods git-svn-id: http://svn.zoneminder.com/svn/zm/trunk@1536 e3e1d417-86f3-4887-817a-d78f3d33393f --- web/zm_xhtml.php | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/web/zm_xhtml.php b/web/zm_xhtml.php index c93cb8549..3846e60cb 100644 --- a/web/zm_xhtml.php +++ b/web/zm_xhtml.php @@ -45,14 +45,13 @@ else "Enabled"=>1, "Stream"=>'View', "Events"=>'Edit', + "Control"=>'Edit', "Monitors"=>'Edit', "System"=>'Edit', ); } require_once( 'zm_lang.php' ); -require_once( 'zm_funcs.php' ); -require_once( 'zm_actions.php' ); header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // Date in the past header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); // always modified @@ -92,13 +91,28 @@ $scales = array( if ( !isset($user) ) { - $view = "login"; + if ( ZM_OPT_USE_AUTH ) + { + if ( ZM_AUTH_TYPE == "remote" && !empty( $_SERVER['REMOTE_USER'] ) ) + { + $view = "postlogin"; + $action = "login"; + $username = $_SERVER['REMOTE_USER']; + } + else + { + $view = "login"; + } + } } elseif ( !isset($view) ) { $view = "console"; } +require_once( 'zm_funcs.php' ); +require_once( 'zm_actions.php' ); + switch( $view ) { case "login" :