commit ce57049ac2bccd0e7520c13524d4b77ec9a63bea from: mischa date: Sun Sep 11 12:48:49 2022 UTC change htaccess commit - 65e5af17e50cbfdaa84cdd2d7d09afb121116f92 commit + ce57049ac2bccd0e7520c13524d4b77ec9a63bea blob - 4dc0a29c1dab8aec43a9dd43eee77cb1eecbec15 blob + 5dc9bf70a553bfe884fb0d12ca5cc2d4a05a6159 --- admin/.htaccess +++ admin/.htaccess @@ -1,6 +1,6 @@ AuthUserFile /usr/local/www/mailadmin.high5.net/admin/.htpasswd AuthGroupFile /dev/null -AuthName "Postfix Admin" +AuthName "OpenSMTPD Admin" AuthType Basic blob - 77018dae597faf4c1fff95fe7c90e3283506ce77 blob + f94f20872eb0964521755690e54e7ee896eec72f --- functions.inc.php +++ functions.inc.php @@ -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']; } //