Revize 57c95610
Přidáno uživatelem Ondřej Drtina před více než 3 roky(ů)
application/view/menu.php | ||
---|---|---|
3 | 3 |
<a class="px-4 py-1 <?php echo (strstr($_SERVER['PHP_SELF'], '/index.php') ? 'active' : '');?>" href="index.php">Úvodní info</a> |
4 | 4 |
<a class="px-4 py-1 <?php echo (strstr($_SERVER['PHP_SELF'],'/search.php') ? 'active' : '');?>" href="search.php">Vyhledávání</a> |
5 | 5 |
<a class="px-4 py-1 <?php echo (strstr($_SERVER['PHP_SELF'],'/manual.php') ? 'active' : '');?>" href="manual.php">Manuál</a> |
6 |
<a class="px-4 py-1 <?php echo (strstr($_SERVER['PHP_SELF'],'/login.php') ? 'active' : '');?>" href="#" data-toggle="modal" data-target="#login-modal">Přihlášení</a> |
|
6 |
<!-- show login button when user logged out OR show logout button when user logged in - START --> |
|
7 |
<?php |
|
8 |
if(isset($_SESSION['loggedIn']) && $_SESSION['loggedIn'] == true){ |
|
9 |
echo "<a class=\" px-4 py-1 "; |
|
10 |
echo (strstr($_SERVER['PHP_SELF'],'/login.php') ? 'active\"' : '\"'); |
|
11 |
echo "href=\"users.php\">Logout</a>"; |
|
12 |
}else{ |
|
13 |
echo "<a class=\" px-4 py-1 "; |
|
14 |
echo (strstr($_SERVER['PHP_SELF'],'/login.php') ? 'active\"' : '\"'); |
|
15 |
echo "href=\"#\" data-toggle=\"modal\" data-target=\"#login-modal\">Přihlášení</a>"; |
|
16 |
} |
|
17 |
?> |
|
18 |
<!-- show login button when user logged out OR show logout button when user logged in - END --> |
|
7 | 19 |
<?php |
8 | 20 |
if (isset($_SESSION['role']) && $_SESSION['role'] == "admin") { |
9 | 21 |
echo "<a class=\" px-4 py-1 "; |
application/view/modals/invalidLoginModal.html | ||
---|---|---|
2 | 2 |
<div class="modal-dialog modal-dialog-centered" role="document"> |
3 | 3 |
<div class="modal-content"> |
4 | 4 |
<div class="modal-header"> |
5 |
<h4 class="modal-title">Neplatné údaje</h4> |
|
5 |
<h4 class="modal-title">Neplatné přihlašovací údaje</h4>
|
|
6 | 6 |
<button type="button" class="close" data-dismiss="modal">×</button> |
7 | 7 |
</div> |
8 | 8 |
<div class="modal-body"> |
9 | 9 |
<div class="container"> |
10 | 10 |
<div class="row"> |
11 |
<div class="col-xs-12 col-sm-5"> |
|
12 |
<label for="itemsPerPage">Bylo zadáno špatné jméno či heslo! Zkuste to znovu.</label> |
|
13 |
</div> |
|
11 |
<p>Bylo zadáno špatné jméno či heslo! Zkuste to znovu.</p> |
|
14 | 12 |
</div> |
15 | 13 |
</div> |
16 | 14 |
</div> |
Také k dispozici: Unified diff
#8643 - login, logout se mění, průběžný commit, TBD