prepare intranet for first Dokploy deployment
This commit is contained in:
@@ -0,0 +1,53 @@
|
||||
<?php /* Name: admin_profiles.php
|
||||
Beschreibung: Administratoren-Seite zur Nutzerverwaltung */
|
||||
|
||||
// Initialisierung
|
||||
require_once $_SERVER['DOCUMENT_ROOT'].'/intranet_repo/general_files/initialise.php';
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html lang="de" dir="ltr">
|
||||
<head>
|
||||
<?php require_once $_SERVER['DOCUMENT_ROOT'].'/intranet_repo/projects/_central/php/html_head.php'; ?>
|
||||
</head>
|
||||
<body class="theme-admin">
|
||||
|
||||
<?php /* Besondere Admin-Rechte checken */
|
||||
// Fetch user details
|
||||
$stmt = $pdo->prepare("SELECT * FROM user_permissions up INNER JOIN user_general_information ugi ON up.user_id = ugi.user_id WHERE up.user_id = ?");
|
||||
$stmt->execute([$_SESSION["user_id"]]);
|
||||
$isAdmin = $stmt->fetch(PDO::FETCH_ASSOC);
|
||||
|
||||
// Check if the user has admin access (Admin = 1)
|
||||
if ($isAdmin["Admin"] == 1) {
|
||||
$sql_groups = "SELECT * FROM user_permissions";
|
||||
$stmt = $pdo->prepare($sql_groups);
|
||||
$stmt->execute([]);
|
||||
$groups = $stmt->fetchAll(PDO::FETCH_ASSOC);
|
||||
|
||||
} else {
|
||||
header("Location: {$g_httpHomePath}");
|
||||
exit();
|
||||
}
|
||||
?>
|
||||
|
||||
<?php // Es folgen ab hier die HTML-Ausgaben beginnend mit dem HTML-Header: ?>
|
||||
|
||||
|
||||
<?php require_once $_SERVER['DOCUMENT_ROOT'].'/intranet_repo/projects/_central/php/header.php'; ?>
|
||||
|
||||
|
||||
<?php // Header (einfach): Titel der Seite ?>
|
||||
<div class="header_title ht_admin text_white" id="header_title">
|
||||
<div class="flexrow fullwidth" style="justify-content:space-between !important;">
|
||||
<div class="header_title_text">Nutzerverwaltung</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<?php // Profilanzeige
|
||||
require_once($_SERVER['DOCUMENT_ROOT']."/intranet_repo/projects/intranet/show_profile.php"); ?>
|
||||
|
||||
<?php require_once $_SERVER['DOCUMENT_ROOT'].'/intranet_repo/projects/_central/php/footer.php'; ?>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user