forked from NippyNoodles/CrabtownWebsite
-
Notifications
You must be signed in to change notification settings - Fork 0
/
login.php
56 lines (41 loc) · 1.87 KB
/
login.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
51
52
53
54
55
56
<?php
include_once 'includes/db_connect.php';
include_once 'includes/functions.php';
if(!isset($_SESSION) && session_status() == PHP_SESSION_NONE) {
session_start();
// sec_session_start();
}
if (isset($_POST['username'], $_POST['p']) && $_POST['form_type'] == "login") {
include_once $_SERVER['DOCUMENT_ROOT'].'/includes/process_login.php';
}
if (login_check($mysqli) == true) {
$logged = 'in';
//load user permissions and data
include_once $_SERVER['DOCUMENT_ROOT'].'/includes/user_profile.php';
} else {
$logged = 'out';
}
?>
<!DOCTYPE html>
<html>
<head>
<title>Crabtown Login</title>
<script type="text/JavaScript" src="/js/sha512.js"></script>
<script type="text/JavaScript" src="/js/forms.js"></script>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<link href='http://fonts.googleapis.com/css?family=Londrina+Solid' rel='stylesheet' type='text/css'>
<link href='http://fonts.googleapis.com/css?family=Londrina+Shadow' rel='stylesheet' type='text/css'>
<link href='http://fonts.googleapis.com/css?family=Open+Sans:400,400italic,600' rel='stylesheet' type='text/css'>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
<script src="//netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js"></script>
<link rel="stylesheet" type="text/css" href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="/css/Crabtown v1.0.css">
<link rel="stylesheet" href="/css/login.css"/>
</head>
<body>
<!-- Navigation Menu at the top of each page -->
<?php include_once $_SERVER['DOCUMENT_ROOT'].'/menu_navigation.php'; ?>
<?php include_once $_SERVER['DOCUMENT_ROOT'].'/login_menu.php'; ?>
<!-- FOOTER -->
<?php include_once $_SERVER['DOCUMENT_ROOT'].'/footer.php'; ?>
</body></html>