change htaccess

This commit is contained in:
mischa 2022-09-11 12:48:49 +00:00
parent 65e5af17e5
commit ce57049ac2
2 changed files with 7 additions and 8 deletions

View File

@ -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>

View File

@ -12,9 +12,8 @@ if(preg_match("/functions.inc.php/", $_SERVER['SCRIPT_NAME'])) {
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'];
}
//