-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathadminsetting.php
65 lines (60 loc) · 2.67 KB
/
adminsetting.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
<?php require_once ("dbconnect.php"); ?>
<?php require_once ('includes/admin_header.php'); ?>
<?php require_once ('function.php'); ?>
<?php
$msg="";
if(isset($_POST['submit'])){
$password = password_encrypt($_POST["password"]);
$username = $_SESSION['username'];
$sql = "UPDATE admin SET password='$password' WHERE username='$username'";
$result = $connect->query($sql);
if($result){
$msg = "success";
}
}
?>
<!-- Main Menu -->
<div class="side-menu-container">
<ul class="nav navbar-nav">
<li><a href="admin.php"><span class="glyphicon glyphicon-home"></span> Home</a></li>
<li><a href="employeeList.php"><span class="glyphicon glyphicon-user"></span>Employee List</a></li>
<li><a href="orderlist.php"><span class="glyphicon glyphicon-th-list"></span> Order List </a></li>
<li><a href="clientlist.php"><span class="glyphicon glyphicon-briefcase"></span> Client List </a></li>
<li class="active"><a href="adminsetting.php"><span class="glyphicon glyphicon-cog"></span> Profile Setting </a></li>
<li><a href="logout.php"><span class="glyphicon glyphicon-log-out"></span> Logout</a></li>
</ul>
</div><!-- /.navbar-collapse -->
</nav>
</div>
<!-- Main Content -->
<div class="container-fluid">
<div class="side-body">
<br>
<pre style="text-align:center"> <b>Admin Profile Setting</b> </pre>
<br>
<div class="row">
<div class="col-md-7" style="padding-left:30%">
<form accept-charset="UTF-8" role="form" method="post" action="">
<fieldset>
<div class="input-group form-group">
<span class="input-group-addon"><i class="fa fa-lock" aria-hidden="true"></i></span>
<input id="password" type="password" class="form-control" name="password" placeholder="Password" required>
</div>
<input class="btn btn-lg btn-default btn-block" id="submit" type="submit" name="submit" value="Update">
</fieldset>
</form>
<?php
if($msg != ""){?>
<br>
<div class="alert alert-success">
<strong>Successful!</strong> record updated.
</div>
<?php
}
?>
</div>
</div>
</div>
</div>
</div>
<?php require_once ('includes/admin_footer.php'); ?>