-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathadmin-profile.php
More file actions
169 lines (130 loc) · 7.11 KB
/
admin-profile.php
File metadata and controls
169 lines (130 loc) · 7.11 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
<?php
session_start();
error_reporting(0);
include('includes/dbconnection.php');
if (strlen($_SESSION['vpmsaid']==0)) {
header('location:logout.php');
} else{
if(isset($_POST['submit']))
{
$adminid=$_SESSION['vpmsaid'];
$aname=$_POST['adminname'];
$mobno=$_POST['contactnumber'];
$query=mysqli_query($con, "update tbladmin set AdminName ='$aname', MobileNumber='$mobno' where ID='$adminid'");
if ($query) {
$msg="Admin profile has been updated.";
}
else
{
$msg="Something Went Wrong. Please try again.";
}
}
?>
<!doctype html>
<html class="no-js" lang="">
<head>
<title>VPMS - Admin Profile</title>
<link rel="apple-touch-icon" href="https://i.imgur.com/QRAUqs9.png">
<link rel="shortcut icon" href="https://i.imgur.com/QRAUqs9.png">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/normalize.css@8.0.0/normalize.min.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.1.3/dist/css/bootstrap.min.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/font-awesome@4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/lykmapipo/themify-icons@0.1.2/css/themify-icons.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/pixeden-stroke-7-icon@1.2.3/pe-icon-7-stroke/dist/pe-icon-7-stroke.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/flag-icon-css/3.2.0/css/flag-icon.min.css">
<link rel="stylesheet" href="assets/css/cs-skin-elastic.css">
<link rel="stylesheet" href="assets/css/style.css">
<link href='https://fonts.googleapis.com/css?family=Open+Sans:400,600,700,800' rel='stylesheet' type='text/css'>
<!-- <script type="text/javascript" src="https://cdn.jsdelivr.net/html5shiv/3.7.3/html5shiv.min.js"></script> -->
</head>
<body >
<?php include_once('includes/sidebar.php');?>
<!-- Right Panel -->
<?php include_once('includes/header.php');?>
<div class="breadcrumbs">
<div class="breadcrumbs-inner">
<div class="row m-0">
<div class="col-sm-4">
<div class="page-header float-left">
<div class="page-title">
<h1>Dashboard</h1>
</div>
</div>
</div>
<div class="col-sm-8">
<div class="page-header float-right">
<div class="page-title">
<ol class="breadcrumb text-right">
<li><a href="dashboard.php">Dashboard</a></li>
<li><a href="admin-profile.php">Profile</a></li>
<li class="active">Admin Profile</li>
</ol>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="content">
<div class="animated fadeIn">
<div class="row">
<div class="col-lg-6">
<div class="card">
</div> <!-- .card -->
</div><!--/.col-->
<div class="col-lg-12">
<div class="card">
<div class="card-header">
<strong>Admin </strong> Profile
</div>
<div class="card-body card-block">
<form action="" method="post" enctype="multipart/form-data" class="form-horizontal">
<p style="font-size:16px; color:red" align="center"> <?php if($msg){
echo $msg;
} ?> </p>
<?php
$adminid=$_SESSION['vpmsaid'];
$ret=mysqli_query($con,"select * from tbladmin where ID='$adminid'");
$cnt=1;
while ($row=mysqli_fetch_array($ret)) {
?>
<div class="row form-group">
<div class="col col-md-3"><label for="text-input" class=" form-control-label">Admin Name</label></div>
<div class="col-12 col-md-9"><input class=" form-control" id="adminname" name="adminname" type="text" value="<?php echo $row['AdminName'];?>"></div>
</div>
<div class="row form-group">
<div class="col col-md-3"><label for="email-input" class=" form-control-label">User Name</label></div>
<div class="col-12 col-md-9"><input class=" form-control" id="username" name="username" type="text" value="<?php echo $row['UserName'];?>" readonly='true'></div>
</div>
<div class="row form-group">
<div class="col col-md-3"><label for="password-input" class=" form-control-label">Contact Number</label></div>
<div class="col-12 col-md-9"> <input class="form-control " id="contactnumber" name="contactnumber" type="text" value="<?php echo $row['MobileNumber'];?>" required="true"></div>
</div>
<div class="row form-group">
<div class="col col-md-3"><label for="disabled-input" class=" form-control-label">Email</label></div>
<div class="col-12 col-md-9"><input class="form-control " id="email" name="email" type="email" value="<?php echo $row['Email'];?>" required="true" readonly='true'></div>
</div>
<?php } ?>
<p style="text-align: center;"> <button type="submit" class="btn btn-primary btn-sm" name="submit" >Update</button></p>
</form>
</div>
</div>
</div>
<div class="col-lg-6">
</div>
</div>
</div><!-- .animated -->
</div><!-- .content -->
<div class="clearfix"></div>
<?php include_once('includes/footer.php');?>
</div><!-- /#right-panel -->
<!-- Right Panel -->
<!-- Scripts -->
<script src="https://cdn.jsdelivr.net/npm/jquery@2.2.4/dist/jquery.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.14.4/dist/umd/popper.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.1.3/dist/js/bootstrap.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/jquery-match-height@0.7.2/dist/jquery.matchHeight.min.js"></script>
<script src="assets/js/main.js"></script>
</body>
</html>
<?php } ?>