-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathadmin.profile.php
More file actions
171 lines (138 loc) · 4.83 KB
/
admin.profile.php
File metadata and controls
171 lines (138 loc) · 4.83 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
<?php
session_start();
include_once "includes\dbh.inc.php";
?>
<html>
<head>
<!--boostrap-->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css"
rel="stylesheet"
integrity="sha384-T3c6CoIi6uLrA9TneNEoa7RxnatzjcDSCmG1MXxSR1GAsXEV/Dwwykc2MPK8M2HN"
crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"
integrity="sha384-C6RzsynM9kWDrMNeT87bh95OGNyZPhcTNXj1NW7RuBCsyN/o0jlpcV8Qyq46cDfL"
crossorigin="anonymous"></script>
<title>Profile</title>
<style type="text/css">
.wrapper
{
width: 700px;
margin: 0 auto;
color: black;
}
</style>
</head>
<body>
<?php
include_once "admin.navigation.bar.php";
?>
<div style="background: url('Image/admin1.jpg'); background-size: cover; background-repeat: no-repeat;">
<div class="wrapper">
<?php
$sql="SELECT * FROM admins where adminsUsername='$_SESSION[admin_username]';";
$result = mysqli_query($conn, $sql);
?>
<h2 style="text-align: center; margin-top: 20px;">My Profile</h2>
<?php
$row = mysqli_fetch_assoc($result);
echo "<div style='text-align: center'>
<img style='border: 3px solid orange; border-color: orange; border-radius: 50%; overflow: hidden; height: 120; width: 120;' src='Image/admins.profile.pic/".$row['adminsPic']."'>
</div>";
?>
<div style="text-align: center; font-size: 20px; margin-top: 15px;">
<b>
<?php echo $_SESSION['admin_username']; ?>
</b>
</div>
<br>
<form action="" method="post">
<button class="btn btn-dark" name="submit_edit" type="submit" style="float: right; width: 150px; margin-bottom: 20px;"><img src = "icons\edit.svg"> Edit Details</button>
</form>
<?php
if(isset($_POST['submit_edit'])) {
?>
<script type="text/javascript">
window.location="edit.admin.profile.php"
</script>
<?php
}
?>
<?php
echo "<table cellpadding='12' align='center' width='700px' style='background-color: rgba(0, 0, 0, 0.2); backdrop-filter: blur(4px); border-radius: 10px; color: black; box-shadow: 0 0 8px black;'>";
echo "<tr>";
echo "<td>";
echo "<b>Name</b>";
echo "</td>";;
echo "<td style='color: white;'>";
echo $row['adminsName'];
echo "</td>";
echo "</tr>";
echo "<tr>";
echo "<td>";
echo "<b>Username</b>";
echo "</td>";
echo "<td style='color: white;'>";
echo $row['adminsUsername'];
echo "</td>";
echo "</tr>";
echo "<tr>";
echo "<td>";
echo "<b>NIC Number</b>";
echo "</td>";
echo "<td style='color: white;'>";
echo $row['adminsNic'];
echo "</td>";
echo "</tr>";
echo "<tr>";
echo "<td>";
echo "<b>Email</b>";
echo "</td>";
echo "<td style='color: white;'>";
echo $row['adminsEmail'];
echo "</td>";
echo "</tr>";
echo "<tr>";
echo "<td>";
echo "<b>Mobile</b>";
echo "</td>";
echo "<td style='color: white;'>";
echo $row['adminsMobile'];
echo "</td>";
echo "</tr>";
echo "<tr>";
echo "<td>";
echo "<b>Position</b>";
echo "</td>";
echo "<td style='color: white;'>";
echo $row['adminsPosition'];
echo "</td>";
echo "</tr>";
echo "<tr>";
echo "<td>";
echo "<b>Staff ID</b>";
echo "</td>";
echo "<td style='color: white;'>";
echo $row['adminsAid'];
echo "</td>";
echo "</tr>";
echo "<tr>";
echo "<td>";
echo "<b>About</b>";
echo "</td>";
echo "<td style='color: white;'>";
echo $row['adminsAbout'];
echo "</td>";
echo "</tr>";
echo "</table>";
?>
<br><br><br>
</div>
</div>
<!--...................................................................
..................................Footer...............................
....................................................................-->
<?php
include_once 'Footer/footer.php';
?>
</body>
</html>