-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathadminUpdateProfile.php
149 lines (122 loc) · 6.74 KB
/
adminUpdateProfile.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
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
<?php
session_start();
if (isset($_SESSION["admin"])) {
?>
<!DOCTYPE html>
<html>
<head>
<title>Admin | Dashboard</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" href="img/philip_neri_c_3.png" />
<link rel="stylesheet" href="bootstrap.css" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.5.0/font/bootstrap-icons.css">
<link rel="stylesheet" href="style.css" />
</head>
<body class="body1">
<div class="container-fluid justify-content-center">
<div class="row align-content-center">
<div class="col-12 mx-auto mb-3 p-2 fixed-top divAd1">
<div class="row mt-1">
<!-- logo -->
<div class="col-6 col-lg-2 my-auto">
<div class="logo1"></div>
</div>
<!-- logo -->
<div class="col-5 col-lg-9 ms-4 ms-lg-5 text-end my-auto">
<div class="dropdown">
<?php
$fn = $_SESSION["admin"]["fname"];
$ln = $_SESSION["admin"]["lname"];
?>
<span class="btn dropdown-toggle" style="font-family: 'Ubuntu-Light'; " type="button" id="dropdownMenuButton1" data-bs-toggle="dropdown" data-bs-auto-close="true" aria-expanded="false">
<!-- set teacher name using session -->
<b> <?php echo $fn . " " . $ln; ?></b>
</span>
<ul class="dropdown-menu" aria-labelledby="dropdownMenuButton1">
<li><a class="dropdown-item" href="adminDashboard.php">Dashboard</a></li>
<li><label class="dropdown-item" onclick="logOutAd();">Log out</label></li>
</ul>
</div>
</div>
</div>
</div>
<!-- breadcrumb -->
<div class="col-11 mx-auto" style="margin-top: 100px;">
<div class="row">
<nav style="--bs-breadcrumb-divider: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8'%3E%3Cpath d='M2.5 0L1 1.5 3.5 4 1 6.5 2.5 8l4-4-4-4z' fill='currentColor'/%3E%3C/svg%3E");" aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="adminDashboard.php">Dashboard</a></li>
<li class="breadcrumb-item active" aria-current="page">Profile</li>
</ol>
</nav>
</div>
</div>
<div class="col-11 mx-auto mb-3 p-2 px-4 div3" style="margin-top: 0px;">
<div class="row mt-4 mb-4">
<div class="col-12">
<!-- title -->
<h2 style="font-family: 'Ubuntu-Light'; font-weight: bold; ">My Profile</h2>
<div class="bg-danger bar"></div>
</div>
<!-- details -->
<div class="col-9 mx-auto mt-5 mb-4">
<div class="row ">
<div class="alert alert-danger col-12 col-lg-4 input1 mx-auto d-none" role="alert" id="alert">
<!--error alert -->
</div>
<div class="col-md-12 mb-3 ">
<label class="form-label">Admin Admission Number</label>
<input type="text" class="form-control input2" readonly value="<?php echo $_SESSION["admin"]["admin_id"]; ?>" />
</div>
</div>
<div class="row mt-2">
<div class="col-md-6">
<label class="form-label">First Name</label>
<input type="text" class="form-control input2" readonly placeholder="First Name" value="<?php echo $_SESSION["admin"]["fname"]; ?>" />
</div>
<div class="col-md-6">
<label class="form-label">Last Name</label>
<input type="text" class="form-control input2" readonly placeholder="Last Name" value="<?php echo $_SESSION["admin"]["lname"]; ?>" />
</div>
</div>
<div class="row mt-3">
<div class="col-md-12 mb-3 ">
<label class="form-label">Email Address</label>
<input id="email" type="text" class="form-control input2" value="<?php echo $_SESSION["admin"]["email"]; ?>" onclick="clearalert();" />
</div>
<div class="col-md-12 mb-3">
<label class="form-label">Password</label>
<div class="input-group">
<input type="password" class="form-control input2" id="password" value="<?php echo $_SESSION["admin"]["password"]; ?>" onclick="clearalert();" />
<button class="btn btn-outline-secondary input2" type="button" onclick="showPassword();"><i class="bi bi-eye" id="show"></i></button>
</div>
</div>
</div>
<div class="row mt-5 text-center">
<div class="col-7 col-md-3 mx-auto d-grid">
<button class="btn btn-primary btn2" onclick="adminUpdate();">Save</button>
</div>
</div>
</div>
</div>
</div>
<!-- footer -->
<?php
require "footer.php";
?>
</div>
</div>
<script src="script.js"></script>
<script src="bootstrap.bundle.js"></script>
</body>
</html>
<?php
} else {
?>
<script>
window.location = "adminLogin.php";
</script>
<?php
}
?>