} else { return 3; } break; default: return 0; } } $_REQUEST['login_user'] = @$_SERVER['PHP_AUTH_USER']; $_REQUEST['login_pwd'] = @$_SERVER['PHP_AUTH_PW']; require_once GS_DIR . 'htdocs/gui/inc/pamal/pamal.php'; $methods = explode(',', GS_GUI_AUTH_METHOD); array_walk($methods, 'gs_trim_value'); foreach ($methods as &$method) { $PAM = new PAMAL($method); $user = $PAM->getUser(); if ($user) { break; } } unset($method); if (!$user) { header('WWW-Authenticate: Basic realm="My Realm"'); header('HTTP/1.0 401 Unauthorized'); die('Unauthorized'); } $userinfo = gs_user_get($user); $DB = gs_db_slave_connect(); $GS_INSTALLATION_TYPE_SINGLE = gs_get_conf('GS_INSTALLATION_TYPE_SINGLE'); if (!$GS_INSTALLATION_TYPE_SINGLE) { # find host