Repository navigation
Expand file tree
/
Copy pathaccount.php
More file actions
372 lines (342 loc) · 18 KB
/
Copy pathaccount.php
File metadata and controls
372 lines (342 loc) · 18 KB
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
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
<?php
include('session.php');
include('db.php');
$sql = "SELECT *";
$sql.=" FROM emp_accounts_record";
$query=mysqli_query($con,$sql);
if ($login_level != '0')
{
header("location: index.php");
}
$page = "Account";//this is for <li></li> active
?>
<!DOCTYPE html>
<html lang="en">
<head>
<title>Account Management</title>
<?php include ('head.php');?>
</head>
<body>
<!-- container section start -->
<section id="container" class="">
<!--header start-->
<header class="header dark-bg">
<div class="toggle-nav">
<div class="icon-reorder tooltips" data-original-title="Toggle Navigation" data-placement="bottom"><i class="icon_menu"></i></div>
</div>
<!--logo start-->
<a href="index.php" class="logo">GSO <span class="lite">Admin</span></a>
<!--logo end-->
<div class="top-nav notification-row">
<!-- notificatoin dropdown start-->
<ul class="nav pull-right top-menu">
<!-- user login dropdown start-->
<li class="dropdown">
<a data-toggle="dropdown" class="dropdown-toggle" href="#">
<span class="profile-ava">
<img alt="" src="<?php echo $login_img; ?>">
</span>
<span class="username"><?php echo $login_session; ?></span>
<b class="caret"></b>
</a>
<ul class="dropdown-menu extended logout">
<div class="log-arrow-up"></div>
<li class="eborder-top">
<a href="profile.php"><i class="icon_profile"></i> My Profile</a>
</li>
<li>
<a href="logout.php"><i class="icon_key_alt"></i> Log Out</a>
</li>
</ul>
</li>
<!-- user login dropdown end -->
</ul>
<!-- notificatoin dropdown end-->
</div>
</header>
<!--header end-->
<!--sidebar start-->
<aside>
<div id="sidebar" class="nav-collapse ">
<!-- sidebar menu start-->
<ul class="sidebar-menu">
<?php
if ($login_level == '0')
{
include('sidebar-menu_admin.php');
}
if ($login_level == '1')
{
include('sidebar-menu_emp.php');
}
elseif ($login_level == '2')
{
include('sidebar-menu_bin.php');
}
else if ($login_level == '3')
{
include('sidebar-menu_accountability.php');
}
else if ($login_level == '4')
{
include('sidebar-menu_icsprspar.php');
}
else
{
}
?>
</ul>
<!-- sidebar menu end-->
</div>
</aside>
<!--main content start-->
<section id="main-content">
<section class="wrapper">
<div class="row">
<div class="col-lg-12">
<h3 class="page-header"><i class="fa fa-clipboard"></i> Account Management</h3>
<ol class="breadcrumb">
<li><i class="fa fa-home"></i><a href="index.php">Dashboard</a></li>
<li><i class="fa fa-clipboard"></i>Account Management</li>
</ol>
</div>
</div>
<!-- page start-->
<div class="row">
<div class="col-lg-12">
<section class="panel">
<header class="panel-heading tab-bg-primary " style="padding:15px; height: 70px;">
<a class="btn btn-success pull-left" href="" data-toggle="modal" data-target="#addNewUser"><span class="fa fa-plus-circle"></span> Add New Account</a>
<a class="btn btn-info pull-right" href="assets/fpdf/account_report.php" target="_blank" title="Print" name="submit"><span class="icon_printer"></span> PRINT</a>
</header>
<div >
<table id="myData" class="table table-bordered table-advance table-hover ">
<thead>
<tr>
<th class="col-sm-2"> Name</th>
<th class="col-sm-1"> Username</th>
<th class="col-sm-3"> Email</th>
<th class="col-sm-3"> Address</th>
<th class="col-sm-1"> Mobile #</th>
<th class="col-sm-2"> Action</th>
</tr>
</thead>
<tfoot>
<tr>
<th></th>
<th></th>
<th></th>
<th></th>
<th></th>
<th></th>
</tr>
</tfoot>
<tbody>
<?php
while( $row=mysqli_fetch_array($query) ) {
$accID = $row['accID'];
?>
<tr>
<td><?php echo $row["fullName"];?></td>
<td><?php echo $row["username"];?></td>
<td><?php echo $row["Email"];?></td>
<td><?php echo $row["Address"];?></td>
<td><?php echo $row["Mobile"];?></td>
<td>
<div class="btn-group">
<button type="button" class="btn btn-primary">Action</button>
<button type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<span class="caret"></span>
<span class="sr-only">Toggle Dropdown</span>
</button>
<ul class="dropdown-menu">
<li><a href="account_view.php?accID=<?php echo $accID; ?>">View</a></li>
<li><a href="account_edit.php?accID=<?php echo $accID; ?>">Edit</a></li>
<li role="separator" class="divider"></li>
<li><a data-toggle="modal" data-target="#delete<?php echo $accID; ?>">Delete</a></li>
</ul>
</div>
</td>
</tr>
<!-- Delete Modal -->
<div id="delete<?php echo $accID; ?>" class="modal fade" role="dialog">
<div class="modal-dialog">
<!-- Modal content-->
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button>
<h4 class="modal-title">Delete Account</h4>
</div>
<div class="modal-body">
<center>
<h1>Are you sure ?</h1>
<a class="btn btn-success" href="account_delete_action.php?accID=<?php echo $accID; ?>">DELETE</a>
<a class="btn btn-danger" data-dismiss="modal">CANCEL</a>
</center>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div><!-- End Delete Modal -->
<?php
}
?>
</tbody>
</table>
</div>
</section>
</div>
</div>
<!-- page end-->
</section>
</section>
<!--main content end-->
<div class="text-right">
<div class="credits">
<!--
All the links in the footer should remain intact.
You can delete the links only if you purchased the pro version.
Licensing information: https://bootstrapmade.com/license/
Purchase the pro version form: https://bootstrapmade.com/buy/?theme=NiceAdmin
<a href="https://bootstrapmade.com/free-business-bootstrap-themes-website-templates/">Business Bootstrap Themes</a> by <a href="https://bootstrapmade.com/">BootstrapMade</a>
-->
</div>
</div>
</section>
<!-- Modal -->
<div id="addNewUser" class="modal fade" role="dialog">
<div class="modal-dialog" style="width: 900px; height: 900px;">
<!-- Modal content-->
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button>
<h4 class="modal-title">Register New Account </h4>
</div>
<div class="modal-body">
<form action="account_add_action.php" method="post" name="form1">
<!--
<div class="form-group">
<label class="col-sm-2 control-label"><b>PROFILE PIC</b></label>
<div class="col-sm-10">
<input type="file" class="form-control" placeholder="Name" name="account_add_img" required="">
</div>
</div>
-->
<br>
<div class="form-group">
<label class="col-sm-2 control-label"><b>USERNAME</b></label>
<div class="col-sm-10">
<input type="text" class="form-control" placeholder="Username" name="account_add_username" required="">
</div>
</div>
<br>
<div class="form-group">
<label class="col-sm-2 control-label"><b>PASSWORD</b></label>
<div class="col-sm-10">
<input type="password" class="form-control" placeholder="Password" name="account_add_password" required="">
</div>
</div>
<br>
<div class="form-group">
<label class="col-sm-2 control-label"><b>RE-PASSWORD</b></label>
<div class="col-sm-10">
<input type="password" class="form-control" placeholder="Re-Type Password" name="account_add_repassword" required="">
</div>
</div>
<br>
<div class="form-group">
<label class="col-sm-2 control-label"><b>FULL NAME</b></label>
<div class="col-sm-10">
<input type="text" class="form-control" placeholder="Full Name" name="account_add_name" required="" onkeyup="letterInputOnly(this);">
</div>
</div>
<br>
<div class="form-group">
<label class="col-sm-2 control-label"><b>EMAIL</b></label>
<div class="col-sm-10">
<input type="email" class="form-control" placeholder="Email" name="account_add_email" required="" >
</div>
</div>
<br>
<div class="form-group">
<label class="col-sm-2 control-label"><b>ADDRESS</b></label>
<div class="col-sm-10">
<input type="text" class="form-control" placeholder="Address" name="account_add_address" required="">
</div>
</div>
<br>
<div class="form-group">
<label class="col-sm-2 control-label"><b>MOBILE #</b></label>
<div class="col-sm-10">
<input type="text" class="form-control" placeholder="Mobile #" name="account_add_mobile" required="" onkeyup="numberInputOnly(this);">
</div>
</div>
<br>
<div class="form-group">
<label class="col-sm-2 control-label"><b>AGE</b></label>
<div class="col-sm-10">
<input type="text" class="form-control" placeholder="Age" name="account_add_age" required="" onkeyup="numberInputOnly(this);">
</div>
</div>
<br>
<div class="form-group">
<label class="col-sm-2 control-label"><b>GENDER</b></label>
<div class="col-sm-10">
<select class="form-control" placeholder="Gender" name="account_add_gender" required="">
<option value="Male">Male</option>
<option value="Female">Female</option>
</select>
</div>
</div>
<br>
<div class="form-group">
<label class="col-sm-2 control-label"><b>POSITION</b></label>
<div class="col-sm-10">
<input type="text" class="form-control" placeholder="Position" name="account_add_position" required="" onkeyup="letterInputOnly(this);">
</div>
</div><br>
<div class="form-group">
<label class="col-sm-2 control-label"><b>LEVEL OF ACCESS</b></label>
<div class="col-sm-10">
<select class="form-control" placeholder="Access Level" name="account_add_Level" required="">
<option value="0">ADMIN</option>
<option value="1">EMPLOYEE</option>
<option value="2">BINCARD</option>
<option value="3">ACCOUNTABILY CARD</option>
<option value="4">ICS/PRS/PAR</option>
</select>
</div>
</div><br>
<br><br>
<div class="form-group">
<label class="col-sm-2 control-label"></label>
<div class="col-sm-10">
<input class="btn btn-success " type="submit" name="Submit" value="Submit">
<a class="btn btn-danger" data-dismiss="modal">CANCEL</a>
</div>
<br>
</div>
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<!-- container section end -->
<div class="text-center">
<div class="credits">
<!--
All the links in the footer should remain intact.
You can delete the links only if you purchased the pro version.
Licensing information: https://bootstrapmade.com/license/
Purchase the pro version form: https://bootstrapmade.com/buy/?theme=NiceAdmin
-->
Rhalp Darren Cabrera & Omar Raouf Daud<br>
Copyright 2017
</div>
</div>
<?php include ('footer.php');?>