change htaccess
This commit is contained in:
parent
65e5af17e5
commit
ce57049ac2
|
@ -1,6 +1,6 @@
|
|||
AuthUserFile /usr/local/www/mailadmin.high5.net/admin/.htpasswd
|
||||
AuthGroupFile /dev/null
|
||||
AuthName "Postfix Admin"
|
||||
AuthName "OpenSMTPD Admin"
|
||||
AuthType Basic
|
||||
|
||||
<limit GET POST>
|
||||
|
|
|
@ -7,14 +7,13 @@
|
|||
//
|
||||
// File: functions.inc.php
|
||||
//
|
||||
if(preg_match("/functions.inc.php/", $_SERVER['SCRIPT_NAME'])) {
|
||||
if (preg_match("/functions.inc.php/", $_SERVER['SCRIPT_NAME'])) {
|
||||
header("Location: login.php");
|
||||
die();
|
||||
}
|
||||
|
||||
DEFINE("VERSION", "version 1.0.0");
|
||||
DEFINE('ROOT_PATH', dirname(__FILE__) . '/');
|
||||
require_once ROOT_PATH . 'conf.php';
|
||||
require_once './conf.php';
|
||||
define("VERSION", "version 1.0.0");
|
||||
|
||||
//
|
||||
// Check if debug is enabled or not
|
||||
|
@ -34,13 +33,13 @@ if (DEBUG == 'true') {
|
|||
// Action: Check if a session already exists, if not redirect to login.php
|
||||
// Call: check_session()
|
||||
//
|
||||
function check_session($session = "sessid") {
|
||||
function check_session() {
|
||||
session_start();
|
||||
if (empty($_SESSION[$session]['username'])) {
|
||||
if (empty($_SESSION['sessid']['username'])) {
|
||||
header("Location: login.php");
|
||||
exit;
|
||||
}
|
||||
return $_SESSION[$session]['username'];
|
||||
return $_SESSION['sessid']['username'];
|
||||
}
|
||||
|
||||
//
|
||||
|
|
Loading…
Reference in New Issue