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