Beispiel #1
0
include_once "common/database.php";
$pageTitle = "Login";
include_once "common/header.php";
if (!empty($_SESSION['LoggedIn']) && !empty($_SESSION['Username'])) {
    ?>
 
<article id="main"> 
	<div class="content">
 
        <p>You are currently <strong>logged in.</strong></p> 
        <p><a href="logout.php">Log out</a></p> 
<?php 
} elseif (!empty($_POST['username']) && !empty($_POST['password'])) {
    include_once 'inc/class.users.inc.php';
    $users = new MarktPlatzUsers($db);
    if ($users->accountLogin() === TRUE) {
        echo "<meta http-equiv='refresh' content='0;./'>";
        exit;
    } else {
        ?>
 
<article id="main"> 
	<div id="loginbox">		
		<form action="login.php" method="post">
			<fieldset>
				<legend>Login</legend>
				<p>
					<label for="username">Username</label><br />
					<input type="text" attribut="login" name="username" id="username" />
				</p>
				<p>