-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathadmingprofile.php
More file actions
247 lines (205 loc) · 11.3 KB
/
Copy pathadmingprofile.php
File metadata and controls
247 lines (205 loc) · 11.3 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
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
<?php
include "db\connections.php";
session_start();
if (isset($_SESSION["admin"])) {
?>
<!DOCTYPE html>
<html lang="en" data-bs-theme="dark">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>User Profile | eShop</title>
<link rel="stylesheet" href="css/bootstrap.css" />
<link rel="stylesheet" href="styles.css" />
<link rel="icon" href="fevicone/favicon.ico">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" href="style.css" />
<link rel="icon" href="resource/logo.svg" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css">
<style>
.container-fluid {
margin-top: 20px;
}
.profile-container {
background-color: #ffffff;
border-radius: 10px;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
overflow: hidden;
}
.profile-header {
background-color: #007bff;
padding: 20px;
text-align: center;
}
.profile-header h4 {
margin: 0;
}
.profile-body {
padding: 20px;
}
.profile-img {
margin-top: 20px;
margin-bottom: 20px;
}
.profile-img img {
width: 150px;
height: 150px;
object-fit: cover;
border-radius: 50%;
border: 5px solid #007bff;
}
.form-label {
font-weight: bold;
}
.update-button {
color: white;
font-weight: bold;
}
.update-button:hover {
background-color: #218838;
}
.ads-section {
padding: 20px;
}
.ads-section span {
display: block;
font-size: 1.2em;
font-weight: bold;
}
</style>
</head>
<body>
<div class="container-fluid">
<div class="row justify-content-center">
<?php
require "adminnavbar.php";
if (isset($_SESSION["admin"])) {
$email = $_SESSION["admin"]["email"];
$details_rs = Database::search("SELECT * FROM `aplyadmins` WHERE `email`='$email'");
$adming_details = $details_rs->fetch_assoc();
?>
<div class="col-12 col-md-10 col-lg-8 profile-container">
<div class="bg-primary text-dark text-center">
<h4 class=" bi-person-circle">user Profile Settings</h4>
</div>
<div class="profile-body ">
<div class="row">
<div class="col-md-3 text-center profile-img">
<?php if (empty($adming_details["profile_image"])) { ?>
<img src="default_img\256-2569650_men-profile-icon-png-image-free-download-searchpng.png" id="img" />
<?php } else { ?>
<img src="<?php echo $adming_details["profile_image"]; ?>" id="img" />
<?php } ?>
<input type="file" class="d-none" id="profileimage" name="profileimage" accept="image/*">
<input type="file" class="d-none" id="profileimage" name="profileimage" accept="image/*">
<label for="profileimage" class="btn btn-success btn-sm mt-2" onclick="changeProfileImg();">
<i class="bi bi-plus-lg ms-3"></i> Update Profile Image
</label>
<div class="row"> <span class="fw-bold text-dark"><?php echo $adming_details["fname"]; ?></span>
<span class="fw-bold text-dark"><?php echo $email; ?></span>
</div>
</div>
<div class="col-md-5 border-end">
<div class="p-3">
<div class="row mt-4">
<div class="col-12">
<label class="form-label text-dark">Password</label>
<div class="input-group">
<input type="password" class="form-control" value="<?php echo $adming_details["password"]; ?>" readonly />
<span class="input-group-text bg-primary">
<i class="bi bi-eye-slash-fill text-white"></i>
</span>
</div>
</div>
<div class="col-6">
<label class="form-label text-dark">Email</label>
<input type="text" class="form-control" readonly value="<?php echo $adming_details["email"]; ?>" />
</div>
<div class="col-6">
<label class="form-label text-dark">First Name</label>
<input type="text" class="form-control" value="<?php echo $adming_details["fname"]; ?>" id="fname" />
</div>
<div class="col-12">
<label class="form-label text-dark">Last Name</label>
<input type="text" class="form-control" value="<?php echo $adming_details["lname"]; ?>" id="lname" />
</div>
<div class="col-12">
<label class="form-label text-dark">Address Line 1</label>
<input type="text" class="form-control" value="<?php echo $adming_details["address_line1"]; ?>" id="ad1" />
</div>
<div class="col-12">
<label class="form-label text-dark">Address Line 2</label>
<input type="text" class="form-control" value="<?php echo $adming_details["address_line2"]; ?>" id="ad2" />
</div>
<div class="col-12 d-grid mt-4">
<button class="btn btn-outline-info btn btn-secondary" onclick="admingupdateProfile();">Update My Profile</button>
</div>
</div>
</div>
</div>
<div class="col-md-4 ads-section">
<span>
</span>
<div id="carouselExample" class="carousel slide">
<div class="carousel-inner">
<div class="carousel-item active">
<img src="AUTOMATED FUTURE.png" class="d-block w-100" alt="...">
</div>
<div class="carousel-item">
<img src="AUTOMATED FUTURE.png" class="d-block w-100" alt="...">
</div>
<div class="carousel-item">
<img src="AUTOMATED FUTURE.png" class="d-block w-100" alt="...">
</div>
</div>
<button class="carousel-control-prev" type="button" data-bs-target="#carouselExample" data-bs-slide="prev">
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
<span class="visually-hidden">Previous</span>
</button>
<button class="carousel-control-next" type="button" data-bs-target="#carouselExample" data-bs-slide="next">
<span class="carousel-control-next-icon" aria-hidden="true"></span>
<span class="visually-hidden">Next</span>
<span class="visually-hidden">Next</span>
<span class="visually-hidd"
</button>
<img class="mt-5 ms-5" src="https://i.postimg.cc/Nj9dgJ98/cards.png" alt="cards">
</div>
<div class="text-center mt-3"><button class="btn btn-primary text-center" type="button" data-bs-toggle="collapse" data-bs-target="#collapseWidthExample" aria-expanded="false" aria-controls="collapseWidthExample">
whats the nimsara computers
</button></div>
</p>
<div style="min-height: 120px;">
<div class="collapse collapse-horizontal" id="collapseWidthExample">
<div class="card card-body" style="width: 300px;">
Nimsara Computers is a trusted retailer and service provider specializing in computer hardware, software, and related accessories. They offer a wide range of products, including laptops, desktops, peripherals, and networking equipment, catering to both individual and business needs. Known for their excellent customer service and technical expertise, Nimsara Computers also provides repair and maintenance services, ensuring that clients receive comprehensive support for all their computing requirements.
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<?php
} else {
?>
<script>
window.location = "index.php";
</script>
<?php
}
?>
</div>
</div>
<p>
<script src="js/bootstrap.bundle.js"></script>
<script src="script.js"></script>
<?php require "main footer.php"; ?>
<script src="swalw2.js"></script>
<script src="swalw.js"></script>
</body>
</html>
<?php
} else {
header("Location:adminsingin.php");
}
?>