sidebar
This commit is contained in:
@@ -26,9 +26,9 @@ $boolLogin=true;
|
||||
$strPassword = trim($_POST['password']);
|
||||
$strSQL = "SELECT username,passwordhash,district,role FROM user WHERE username=:user";
|
||||
$stmt = $db->prepare($strSQL);
|
||||
$stmt->bindValue(':user',$strUser);
|
||||
$result=$stmt->execute();
|
||||
if ($row=$result->fetch(PDO::FETCH_ASSOC)) {
|
||||
$stmt->bindValue(":user",$strUser, PDO::PARAM_STR);
|
||||
$stmt->execute();
|
||||
if ($row=$stmt->fetch(PDO::FETCH_ASSOC)) {
|
||||
$boolOk = $strDistrict==$row['district'] || $row['role']=="admin";
|
||||
if (password_verify($strPassword,$row['passwordhash']) && $boolOk) {
|
||||
$_SESSION['user']=$strUser;
|
||||
@@ -62,6 +62,9 @@ $boolLogin=true;
|
||||
|
||||
<!-- Navbar -->
|
||||
<nav class="navbar navbar-expand-md navbar-dark bg-dark fixed-top">
|
||||
<?php if (!$boolSidebar): ?>
|
||||
<a href="start.php"><img class="logo_navbar" src="../<?=$strLogo?>" alt="Logo"></a>
|
||||
<?php endif; ?>
|
||||
<a class="navbar-brand" href="#"><?=$strTitle?> <?=$strDistrictTitle?></a>
|
||||
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbars" aria-controls="navbars" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
@@ -76,6 +79,17 @@ $boolLogin=true;
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<ul class="navbar-nav mr-auto right">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="../impressum.php">Impressum</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="../datenschutz.php">Datenschutzerklärung</a>
|
||||
</li>
|
||||
<li class="nav-item active">
|
||||
<a class="nav-link" href="login.php">Login <span class="sr-only">(current)</span></a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
<!-- Ende Navbar -->
|
||||
|
||||
|
||||
Reference in New Issue
Block a user