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

View File

@ -7,14 +7,13 @@
// //
// File: functions.inc.php // 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"); header("Location: login.php");
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'];
} }
// //