forked from town-chen/auth
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
31 lines (24 loc) · 1.05 KB
/
index.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<?php
$page_title = "User Authentication System - Homepage";
include_once 'partials/headers.php';
?>
<div class="container">
<div class="flag">
<h1>User Authentication System</h1>
<p class="lead">Use this document as a way to quickly start any new project.<br> All you get is this text and a mostly barebones HTML document.</p>
<?php if(!isset($_SESSION['username'])): ?>
<p class="lead">You are currently not signin <a href="login.php">Login</a> Not yet a member? <a href="signup.php">Signup</a> </p>
<?php else: ?>
<p class="lead">You are logged in as <?php if(isset($_SESSION['username'])) echo $_SESSION['username']; ?> <a href="logout.php">Logout</a> </p>
<?php endif ?>
<?php echo $_SERVER['REMOTE_ADDR'] ."<br />". $_SERVER['HTTP_USER_AGENT'];
echo "<br />".time();
if(isset($_SESSION['last_active'])){
echo $_SESSION['last_active'];
}
?>
</div>
</div><!-- /.container -->
<?php include_once 'partials/footers.php'; ?>
</body>
</html>