-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
51 lines (47 loc) · 1.62 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
<?php session_start(); ?>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Log In To Super</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/foundation/6.2.3/foundation.css">
<link rel="stylesheet" href="stylesheet.css" type="text/css">
</head>
<body>
<?php include 'backend/setup.php'; ?>
<?php
if(isset($_POST['username'])){
$result = canLogin($_POST['username'],$_POST['password']);
if($result){
echo '<p>'.$result.'</p>';
}
else{
$_SESSION['user']=$_POST['username'];
header("Location:core.php");
}
}
?>
<div id='welcome'>
<h3>Welcome To Super!</h3>
<form method='post' action ='index.php'>
<div id='loginModule'>
<div class="row">
<div class='small-4 small-centered columns'>
<h3>Log In</h3>
<input type='text' placeholder="USERNAME" name ='username'>
<input type='password' placeholder="PASSWORD" name='password'>
<div class="expanded button-group">
<button type="submit" class="success button removePaddingMargin">Log In </button>
<a href="#register" class ='secondary button removePaddingMargin'>Register</a>
</div>
</div>
</div>
</div>
</form>
</div>
<a name='register'></a>
<div id='register'>
<p>Registration Form</p>
</div>
</body>
</html>