-
Notifications
You must be signed in to change notification settings - Fork 1
/
configuration.php
108 lines (106 loc) · 3.44 KB
/
configuration.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
<?php
session_start();
include("header.php");
include("connection.php");
if(isset($_POST["update"]))
{
if(isset($_POST["newpassword"]))
{
mysqli_query($con,"UPDATE admin SET admin_name='$_POST[name]' ,password='$_POST[newpassword]' ,email_id='$_POST[emailid]' WHERE login_id = '$_SESSION[loginid]'");
$upmessage="Password updated successfully...";
}
else
{
mysqli_query($con,"UPDATE admin SET admin_name='$_POST[name]' ,email_id='$_POST[emailid]' WHERE login_id = '$_SESSION[loginid]'");
}
if(mysqli_affected_rows($con) == 1)
{
$upmessage="Admin Recordupdated successfully...";
}
}
while($row = mysqli_fetch_array($result))
{
echo $row['FirstName'] . " " . $row['LastName'];
echo "<br>";
}
$result = mysqli_query($con,"SELECT * FROM admin where login_id = '$_SESSION[loginid]'");
while($row = mysqli_fetch_array($result))
{
$adminname = $row['admin_name'];
$loginid = $row['login_id'];
$emailid = $row['email_id'];
$createdat = $row['created_at'];
$lastlogin = $row['last_login'];
}
?>
<div id="main">
<div id="content" class="left">
<div class="highlight">
<h3>Admin Dashboard</h3>
<form action="" method="post" enctype="multipart/form-data" name="form1" id="form1">
<p><?php echo $upmessage; ?>
<label for="name"></label>
</p>
<table width="495" height="253" border="0">
<tr>
<td width="245">Admin Name</td>
<td width="240"><input type="text" value="<?php echo $adminname; ?>" name="name" id="name" /></td>
</tr>
<tr>
<td>Login ID</td>
<td><input type="text" value="<?php echo $loginid; ?>" name="loginid" id="loginid" /></td>
</tr>
<tr>
<td>Email ID</td>
<td><input type="text" value="<?php echo $emailid; ?>"name="emailid" id="emailid" /></td>
</tr>
<tr>
<td>New Password</td>
<td><input type="password" name="newpassword" id="newpassword" /></td>
</tr>
<tr>
<td>Confirm Password</td>
<td><input type="password" name="confirmpassword" id="confirmpassword" /></td>
</tr>
<tr>
<td>Created at</td>
<td><input type="text" name="createdat" value="<?php echo $createdat; ?>" id="createdat" /></td>
</tr>
<tr>
<td>Last Login</td>
<td><input type="text" name="lastlogin" value="<?php echo$lastlogin; ?>" id="lastlogin" /></td>
</tr>
<tr>
<td colspan="2"><input type="submit" name="update" id="update" value="Update Password" /></td>
</tr>
</table>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
</form>
<p> </p>
</div>
<div class="projects">
<div class="item"></div>
<div class="item">
<div class="cl"> </div>
</div>
</div>
</div>
<?php
include("sidebar.php");
?>
<div class="cl"> </div>
</div>
<div class="shadow-l"></div>
<div class="shadow-r"></div>
<div class="shadow-b"></div>
</div>
<?php
include("footer.php");
?>