Features LDAP, Rights, Cables, Menu improvements and bug fixing
This commit is contained in:
13
includes.php
13
includes.php
@@ -11,13 +11,18 @@ session_name('ipreg');
|
||||
session_start();
|
||||
|
||||
// check for user_id, if unnkown, redirect to login
|
||||
if(empty($_SESSION['suser_id'])) {
|
||||
header("Location: login.php");
|
||||
exit;
|
||||
if (empty($_SESSION['suser_id'])) {
|
||||
$_SESSION['prelogin'] = $_SERVER['REQUEST_URI'];
|
||||
header("Location: login.php");
|
||||
exit;
|
||||
}
|
||||
|
||||
include("config.php");
|
||||
include("dbconnect.php");
|
||||
|
||||
// connect to database
|
||||
$dbh = new PDO("mysql:host=$config_mysql_host;dbname=$config_mysql_dbname;charset=utf8", $config_mysql_username, $config_mysql_password);
|
||||
$dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
|
||||
$dbh->setAttribute(PDO::ATTR_DEFAULT_FETCH_MODE, PDO::FETCH_ASSOC);
|
||||
|
||||
include("lib.php");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user