-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
80 lines (61 loc) · 2.34 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
<?php
require "packages/db.php";
require 'templates/header.php';
if (!isset($_SESSION["userid"])) {
?>
<body>
<div class="container">
<h1>Project Overview</h1>
<p>Bunch of overview and maybe some stats from DB</p>
</div>
<div class="container">
<!-- Login Form -->
<div class="col">
<h2>Login:</h2>
<form action="/webapp/includes/login.inc.php" method=post>
<div class="form-group">
<label for="name">Name:</label>
<input type="text" class="form-control" name="uname" placeholder="Username">
</div>
<div class="form-group">
<label for="password">Password:</label>
<input type="password" class="form-control" name="pwd" placeholder="Password">
</div>
<button type="submit" name="submit" class="btn btn-default">Login</button>
</form>
</div>
<!-- Signup Form-->
<div class="col">
<h2>Sign Up:</h2>
<form action="/webapp/includes/signup.inc.php" method=post>
<div class="form-group">
<label for="name">Name:</label>
<input type="text" class="form-control" name="uname" placeholder="Username">
</div>
<div class="form-group">
<label for="password">Password:</label>
<input type="password" class="form-control" name="pwd" placeholder="Password">
</div>
<div class="form-group">
<label for="password">Repeat Password:</label>
<input type="password" class="form-control" name="pwdrepeat" placeholder="Repeat Password">
</div>
<button type="submit" name="submit" class="btn btn-default">Sign Up</button>
</form>
</div>
</div>
</body>
<?php } else { ?>
<body>
<div class="container">
<h1>Project Overview</h1>
<p>Bunch of overview and maybe some stats from DB</p>
<p>You're now logged in. Feel free to check out data by navigating from header.</p>
</div>
</body>
<?php
$handler = new Products();
$handler->uploadFile();
$handler2 = new Supplier();
$handler2->uploadFile();
} ?>