-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathadmin-profile.php
109 lines (103 loc) · 4.28 KB
/
admin-profile.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
<?php
session_start();
error_reporting(0);
include('includes/dbconnection.php');
if (strlen($_SESSION['ttmsaid']==0)) {
header('location:logout.php');
} else{
if(isset($_POST['submit']))
{
$adminid=$_SESSION['ttmsaid'];
$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>
<head>
<title>Toll Tax Management System || Admin Profile</title>
<script type="application/x-javascript"> addEventListener("load", function() { setTimeout(hideURLbar, 0); }, false); function hideURLbar(){ window.scrollTo(0,1); } )</script>
<!-- Bootstrap Core CSS -->
<link href="css/bootstrap.min.css" rel='stylesheet' type='text/css' />
<!-- Custom CSS -->
<link href="css/style.css" rel='stylesheet' type='text/css' />
<link href="css/font-awesome.css" rel="stylesheet">
<!-- jQuery -->
<script src="js/jquery.min.js"></script>
<!----webfonts--->
<link href='http://fonts.googleapis.com/css?family=Roboto:400,100,300,500,700,900' rel='stylesheet' type='text/css'>
<!---//webfonts--->
<!-- Bootstrap Core JavaScript -->
<script src="js/bootstrap.min.js"></script>
</head>
<body>
<div id="wrapper">
<!-- Navigation -->
<?php include_once('includes/sidebar.php');?>
<?php include_once('includes/header.php');?>
<div id="page-wrapper">
<div class="col-md-12 graphs">
<div class="xs">
<h3>Admin Profile</h3>
<div class="well1 white">
<form class="form-floating ng-pristine ng-invalid ng-invalid-required ng-valid-email ng-valid-url ng-valid-pattern" method="post">
<p style="font-size:16px; color:red" align-item="center"> <?php if($msg){
echo $msg;
} ?> </p>
<fieldset>
<?php
$adminid=$_SESSION['ttmsaid'];
$ret=mysqli_query($con,"select * from tbladmin where ID='$adminid'");
$cnt=1;
while ($row=mysqli_fetch_array($ret)) {
?>
<div class="form-group">
<label class="control-label">Admin Name</label>
<input type="text" class="form-control1 ng-invalid ng-invalid-required ng-touched" pattern="[a-zA-Z]{1,32}+" required="true" id="adminname" name="adminname" value="<?php echo $row['AdminName'];?>">
</div>
<div class="form-group">
<label class="control-label">User Name</label>
<input type="text" class="form-control1 ng-invalid ng-valid-email ng-invalid-required ng-touched" id="username" name="username" value="<?php echo $row['UserName'];?>" readonly="true">
</div>
<div class="form-group">
<label class="control-label">Contact Number</label>
<input type="text" class="form-control1 ng-invalid ng-invalid-required ng-touched" id="contactnumber" name="contactnumber"value="<?php echo $row['MobileNumber'];?>" minlength="10" maxlength='10' pattern='[0-9]+'>
</div>
<div class="form-group">
<label class="control-label">Email address</label>
<input type="email" id="email" name="email" class="form-control1 ng-invalid ng-valid-url ng-invalid-required ng-touched" value="<?php echo $row['Email'];?>" readonly='true'>
</div>
<div class="form-group">
<label class="control-label">Admin Reg Date</label>
<input type="text" class="form-control1 ng-invalid ng-invalid-required ng-valid-pattern ng-touched" value="<?php echo $row['AdminRegdate'];?>" readonly='true'>
</div>
<?php } ?>
<div class="form-group">
<p style="text-align: center;"> <button type="submit" name="submit" class="btn btn-primary">Update</button></p>
</div>
</fieldset>
</form>
</div>
</div>
<?php include_once('includes/footer.php');?>
</div>
</div>
<!-- /#page-wrapper -->
</div>
<!-- /#wrapper -->
<!-- Nav CSS -->
<link href="css/custom.css" rel="stylesheet">
<!-- Metis Menu Plugin JavaScript -->
<script src="js/metisMenu.min.js"></script>
<script src="js/custom.js"></script>
</body>
</html>
<?php } ?>