Features LDAP, Rights, Cables, Menu improvements and bug fixing

This commit is contained in:
2023-02-28 19:21:42 +01:00
parent 26e9c89405
commit db26ffa611
59 changed files with 1039 additions and 301 deletions

View File

@@ -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");