diff --git a/functions.inc.php b/functions.inc.php index 38f1ed7..5f6b1d7 100644 --- a/functions.inc.php +++ b/functions.inc.php @@ -7,21 +7,23 @@ // // File: functions.inc.php // -if ($CONF['debug'] == 'true') { - ini_set('display_errors', 1); - ini_set('display_startup_errors', 1); - error_reporting(E_ALL); - mysqli_report(MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT); -} else { - ini_set('display_errors', 0); - ini_set('display_startup_errors', 0); -} if(preg_match("/functions.inc.php/", $_SERVER['SCRIPT_NAME'])) { header("Location: login.php"); - exit; + die(); } +if ($CONF['debug'] == 'true') { + ini_set('display_errors', 1); + ini_set('display_startup_errors', 1); + error_reporting(E_ALL); + mysqli_report(MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT); +} else { + ini_set('display_errors', 0); + ini_set('display_startup_errors', 0); +} + + $version = "1.0.0"; // @@ -33,7 +35,7 @@ function check_session() { session_start(); if (!isset($_SESSION['sessid']['username'])) { header("Location: login.php"); - exit; + die(); } $SESSID_USERNAME = $_SESSION['sessid']['username']; return $SESSID_USERNAME; @@ -43,7 +45,7 @@ function check_user_session() { session_start(); if (!isset($_SESSION['userid']['username'])) { header("Location: login.php"); - exit; + die(); } $USERID_USERNAME = $_SESSION['userid']['username']; return $USERID_USERNAME;