You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

59 lines
2.0 KiB
PHP

<?php
session_start();
?>
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Beer List Of Mine</title>
<meta name="description" content="Welcome to Beer List of Mine, follow your favourite beers"/>
<meta name="author" content="Igor Vujovič" />
<link type="text/css" rel="stylesheet" href="src/style/style.css" media="all">
<link type="text/css" rel="stylesheet" href="src/style/print.css" media="print">
</head>
<body>
<a href="index.php">
<header>
<h1>Welcome to<br/>Beer List of Mine</h1>
</header>
</a>
<!-- menu-->
<nav>
<div
<?php
if(isset($_SESSION["loggedin"]) && $_SESSION["loggedin"] === true){
echo 'class="profile">
<div class="slice">
<ul>
<li>Yo, <b>'; echo htmlspecialchars($_SESSION["username"]); echo '</b>! Another one on the tab?</li>
</ul>
</div>
<div class="slice">
<ul>
<li><a href="passChange.php" >Reset Your Password</a></li>
<li><a href="logout.php" >Log out.</a></li>
</ul>
</div>
';
} else echo '>
<form id="nigol" method="post" action="verify.php" class="menu">
<input id="prihlasovaciJmeno" name="prihlasovaciJmeno" type="text" placeholder="Nickname" size="22" >
<input id="prihlasovaciHeslo" name="prihlasovaciHeslo" type="password" placeholder="Passphrase" size="22" >
<input id="SearchButton" type="image" alt="Enter !" src="src/key-ico.png">
</form>
</div>
<div class="login"> //Honeypot
<form id="login" method="post" action="verify.php" class="login">
<input name="user" type="text" placeholder="Username" size="22" >
<input name="password" type="password" placeholder="Password" size="22" >
<input id="SearchButton" type="image" alt="Enter !" src="src/key-ico.png">
</form>';?> </div>
</nav>
<?php if(isset($_SESSION["wrongCr"]) && $_SESSION["wrongCr"] === true){
echo '<script>alert("Wrong Credentials")</script>';
$_SESSION["wrongCr"] = false;
}
?>