82 lines
3.6 KiB
PHP
82 lines
3.6 KiB
PHP
<?php
|
|
if (isset($_POST["login"])) {
|
|
$form = (object) [
|
|
"username" => htmlspecialchars($_POST["username"]),
|
|
"password" => htmlspecialchars($_POST["password"]),
|
|
];
|
|
|
|
$login = new Login($form->username, $form->password, $conn);
|
|
|
|
$login->checkUsername();
|
|
$login->checkPassword();
|
|
|
|
if ($login->error == NULL) {
|
|
$login->authUser();
|
|
header("Location: /");
|
|
}
|
|
}
|
|
?>
|
|
<html>
|
|
<head>
|
|
<title><?= $website->title; ?>: <?= $website->slogan; ?></title>
|
|
<link rel="stylesheet" href="styles/main.css">
|
|
</head>
|
|
|
|
<body>
|
|
<table class="container" align="center">
|
|
<tbody>
|
|
<?php require("includes/header.php"); ?>
|
|
|
|
<tr>
|
|
<td>
|
|
<table>
|
|
<tbody>
|
|
<tr>
|
|
<td><img src="/images/what.gif" alt="duck typing quack quack" /></td>
|
|
<td valign="top" class="introduction">
|
|
<h2>WHAT IS MALLARDNET?</h2>
|
|
<p>
|
|
MallardNet is a marcoblogging platform where you can post blog-like posts on a live feed.
|
|
users can not only marco post, but they can have their post in any of it's <b>three</b> categories.
|
|
</p>
|
|
<ul>
|
|
<li>marco posts - blog-type posts</li>
|
|
<li>mirco posts - teeny tiny updates</li>
|
|
<li>image posts - for photography users or creative users who wants to share their world and creativity</li>
|
|
</ul>
|
|
so what are you waiting for? <a href="/apply">apply now</a>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</td>
|
|
|
|
<td class="login-container">
|
|
<table border="1" class="form-box login-box">
|
|
<tbody>
|
|
<tr>
|
|
<th>Duck login</th>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<form action="/" method="POST">
|
|
<label>username:</label> <input type="text" name="username" />
|
|
<label>password:</label> <input type="password" name="password" />
|
|
<?php
|
|
if (isset($_POST["login"]) && isset($login))
|
|
if ($login->error != NULL) echo "<font style=\"color: #831f1f\">$login->error</font> <br>";
|
|
?>
|
|
<input type="submit" name="login" value="login" />
|
|
</form>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
|
|
<?php require("includes/footer.php"); ?>
|
|
</tbody>
|
|
</table>
|
|
</body>
|
|
</html>
|