Update functions: Check the debug mode after the direct access check
This commit is contained in:
parent
3071ceb6fd
commit
b70a56de85
@ -7,6 +7,12 @@
|
||||
//
|
||||
// File: functions.inc.php
|
||||
//
|
||||
|
||||
if(preg_match("/functions.inc.php/", $_SERVER['SCRIPT_NAME'])) {
|
||||
header("Location: login.php");
|
||||
die();
|
||||
}
|
||||
|
||||
if ($CONF['debug'] == 'true') {
|
||||
ini_set('display_errors', 1);
|
||||
ini_set('display_startup_errors', 1);
|
||||
@ -17,10 +23,6 @@ if ($CONF['debug'] == 'true') {
|
||||
ini_set('display_startup_errors', 0);
|
||||
}
|
||||
|
||||
if(preg_match("/functions.inc.php/", $_SERVER['SCRIPT_NAME'])) {
|
||||
header("Location: login.php");
|
||||
exit;
|
||||
}
|
||||
|
||||
$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;
|
||||
|
Loading…
Reference in New Issue
Block a user