-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
50 lines (47 loc) · 1.36 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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
<?php
include_once 'includes/db_connect.php';
include_once 'includes/functions.php';
sec_session_start();
if (login_check($mysqli) == true) {
$logged = 'in';
} else {
$logged = 'out';
}
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Home page</title>
<link rel="stylesheet" href="css/main.css" />
<link rel="stylesheet" href="css/foundation.css" />
<script src="js/vendor/modernizr.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
</head>
<body>
<?php if (login_check($mysqli) == true) : ?>
<p>
[ <a href="index.php">home page</a> |
<a href="protected_page.php">upload image</a> |
<a href="visitors_front.php">visitors log</a> |
<a href="includes/logout.php">log out</a>
]
</p>
<h4>Welcome <b><?php echo htmlentities($_SESSION['username']); ?>!</b></h4>
<?php else : ?>
<p>Hi there</p>
<?php endif; ?>
<div id="loginDiv"></div>
<script>
$(document).ready(function () {
$("#loginDiv").load("./login.php");
});
</script>
<script src="js/vendor/jquery.js"></script>
<script src="js/foundation.min.js"></script>
<script>
$(document).foundation();
</script>
</body>
</html>