-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathhome.php
139 lines (129 loc) · 6.12 KB
/
home.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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
<?php
session_start();
include_once("db.php");
if (!isset($_SESSION['user'])) {
header("location: ./login.php");
} else {
$user = mysqli_fetch_assoc(mysqli_query($conn, "SELECT * FROM registered_user WHERE id = {$_SESSION['user']}"));
}
if (isset($_POST['logout'])) {
session_unset();
session_destroy();
header("location: login.php");
}
?>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>HephBudget</title>
<link rel="stylesheet" href="assets/css/bootstrap.min.css">
<link rel="stylesheet" href="assets/font-awesome/css/font-awesome.min.css">
<link rel="stylesheet" href="assets/css/calculator.css" />
</head>
<body>
<nav class="navbar navbar-expand-lg hephnav">
<button class="navbar-toggler bg-light" type="button" data-toggle="collapse" data-target="#navbarTogglerDemo03"
aria-controls="navbarTogglerDemo03" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<p class="h3 font-weight-bold text-info m-0" id="heph">HephBudget</p>
<div class="collapse navbar-collapse" id="navbarTogglerDemo03">
<ul class="navbar-nav ml-auto">
<li class="nav-item active">
<a class="nav-link font-weight-bold" href="home">Home <span class="sr-only">(current)</span></a>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle font-weight-bold" href="#" id="navbarDropdownMenuLink"
role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
About</a>
<div class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink">
<a class="dropdown-item" href="about">About Us</a>
<a class="dropdown-item" href="faqs">FAQ</a>
</div>
</li>
<li class="nav-item active">
<a class="nav-link font-weight-bold contact" href="contact">Contact</a>
</li>
</ul>
<form method="post"><small class=" text-light font-weight-bold position-relative mr-1"
style="font-size: 14px; top: 1px">Hello <?php echo $user['name'] ?> </small>
<button name="logout" type="submit" class="btn badge badge-danger p-2"> <i
class="fa fa-power-off"></i></button></form>
</div>
</nav>
<div class="position-absolute w-100 h-100" style="top: 0">
<div class="d-md-flex justify-content-center pt-5 my-5">
<div class="input col-md-5 col-sm-12">
<div class="values pt-3">
<p class="mb-0 pb-2">Enter Total Amount</p>
<input class="amount" type="number">
</div>
<div class="items-container px-3 pb-3">
<div>
<p class="py-3">Allocate percentages for each priority</p>
<div class="all">
<div class="alloc">
<p>High</p>
<input class="first form-control" type="number">
</div>
<div class="alloc px-5">
<p>Medium</p>
<input class="first form-control" type="number">
</div>
<div class="alloc">
<p>Low</p>
<input class="first form-control" type="number">
</div>
</div>
</div>
<div class="items pt-2">
<div class="item" id="item">
<p>Item</p>
<p class="pri mr-5">Priority</p>
</div>
</div>
<div class="icon">
<ion-icon class="add-icon" name="add-circle"></ion-icon>
</div>
<div class="recover">
<button id="recover" class="btn btn-info mx-2">Recover item</button>
</div>
<div class="calc d-flex justify-content-center mt-5">
<button id="clear" class="btn btn-dark mx-2">Clear items</button>
<button id="cal" class="btn btn-info mx-2">Calculate</button>
</div>
</div>
</div>
<div class="display col-md-6">
<div class="graph pt-2">
<p>Total Budget:</p>
<p class="amount-showing">₦0.00</p>
</div>
<div class="breakdown">
<p>Budget Breakdown</p>
<div id="breakdown">
</div>
<div class="remaining"><span class="span"></span></div>
</div>
</div>
</div>
<div class="footer w-100 font-weight-bold text-center">
© HephBudget 2019.
</div>
</div>
<script src="https://unpkg.com/[email protected]/dist/ionicons.js"></script>
<script type="text/javascript" src="assets/js/calculator.js"></script>
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js"
integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo"
crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js"
integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1"
crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"
integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM"
crossorigin="anonymous"></script>
</body>
</html>