-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathjobseekerheader.php
303 lines (290 loc) · 9.33 KB
/
jobseekerheader.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
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
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
<?php
if (session_status() === PHP_SESSION_NONE) {
session_start();
}
if (!isset($_SESSION['email'])) {
header('location:jobseekerlogin.php');
exit();
}
$jobseeker_email = $_SESSION['email'];
$mysqli = new mysqli("localhost", "root", "", "jobportal");
if ($mysqli->connect_error) {
die("Connection failed: " . $mysqli->connect_error);
}
$stmt = $mysqli->prepare("SELECT j_image, jobseeker_name, mobno, address, cv, dob, description FROM jobseeker WHERE jobseeker_email = ?");
$stmt->bind_param("s", $jobseeker_email);
$stmt->execute();
$result = $stmt->get_result();
if ($result->num_rows > 0) {
$row = $result->fetch_assoc();
$j_image = $row['j_image'];
$jobseeker_name = $row['jobseeker_name'];
$mobno = $row['mobno'];
$address = $row['address'];
$cv_path = $row['cv'];
$dob = $row['dob'];
$description = $row['description'];
if (file_exists($cv_path)) {
$cv_content = file_get_contents($cv_path);
$cv_base64 = base64_encode($cv_content);
} else {
$cv_base64 = null;
}
} else {
die("No jobseeker found with the given email.");
}
$stmt->close();
$mysqli->close();
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Job Portal</title>
<link rel="stylesheet" href="style.css">
<link rel="stylesheet" href="jobseekerdashboard.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<style>
/* Your existing CSS styles */
h2 {
color: #338573;
margin-bottom: 20px;
}
.header nav {
overflow: hidden;
align-items: center;
display: flex;
position: relative;
justify-content: space-between;
height: 80px;
padding: 30px;
position: sticky;
top: 0;
z-index: 3;
background-color: #ffffff;
border-bottom: 1px solid #338573;
}
nav a {
display: block;
color: #338573;
padding: 10px 12px;
text-decoration: none;
font-weight: normal;
font-size: 16px;
position: relative;
padding-bottom: 5px;
}
nav a::after {
content: '';
position: absolute;
width: 100%;
height: 4px;
background-color: #cccccc;
left: 0;
bottom: -2px;
transform: scaleX(0);
transition: transform 0.3s ease;
transform-origin: bottom right;
}
nav a:hover::after{
transform: scaleX(1);
transform-origin: bottom left;
background-color: #cccccc;
}
nav a.active::after {
transform: scaleX(1);
transform-origin: bottom left;
background-color: #338573;
}
.nav-links {
flex: 1;
display: flex;
justify-content: flex-end;
}
.nav-links ul {
list-style-type: none;
margin: 0;
padding: 0;
display: flex;
margin-bottom:30px;
}
.nav-links li {
margin-right: 20px;
}
.nav-links a {
font-weight: bold;
font-size: 18px;
}
.nav-links a:last-child {
margin-right: 0;
}
.notification-icon {
cursor: pointer;
}
.profile {
cursor: pointer;
}
.logo {
margin-right: 20px;
padding:20px;
}
.dropdown {
position: absolute;
top: 73px;
right: 10px;
background-color: #fdfdfd;
width: 150px;
box-shadow: 0 2px 5px rgba(0,0,0,0.2);
padding: 15px;
border-radius: 10px;
z-index: 1000; /* Ensure this is higher than other elements */
display: none; /* Initial state is hidden */
}
.dropdown::before{
content: '';
position: absolute;
top: -18px;
right: 28px;
border: 10px solid;
border-color: transparent transparent #f4f2f2 transparent;
}
.dropdown .user-info{
display: flex;
align-items: center;
}
.dropdown .user-info img{
width: 30px;
height: 30px;
object-fit: cover;
border-radius: 50%;
cursor: pointer;
border: 1.5px solid #338573;
margin-right: 8px;
}
.dropdown .dropdownlist img{
width: 15px;
height: 15px;
background: #e5e5e5;
border-radius: 35%;
padding: 5px;
margin-right: 15px;
}
.dropdown hr{
border: 0;
width: 100%;
height: 1px;
margin: 10px 0 5px;
background: #ccc;
}
.dropdown .dropdownlist .sub-menu-links{
display: flex;
align-items: center;
color: #525252;
margin: 12px 0;
}
.dropdown .dropdownlist .sub-menu-links p{
width: 100%;
}
.dropdownlist :hover p{
font-weight: 600;
transition: transform 0.5s;
transform: translateY(-0.4px);
}
</style>
</head>
<body>
<?php
$activePage = isset($_GET['page']) ? $_GET['page'] : 'jobseekerdashboard';
?>
<div class="header">
<nav>
<div class="logo">
<h2 onclick="window.location.href='jobseekerdashboard.php'">Job Portal</h2>
</div>
<div class="nav-links">
<ul>
<li><a href="?page=jobseekerdashboard" <?php echo ($activePage === 'jobseekerdashboard') ? 'class="active"' : ''; ?>>Home</a></li>
<li><a href="?page=apply" <?php echo ($activePage === 'apply') ? 'class="active"' : ''; ?>>Applied</a></li>
</ul>
</div>
<div class="search-bar">
<form id="searchForm" action="#" method="GET">
<input id="searchInput" type="text" name="search" placeholder="Search...">
<button type="submit"><i class="fas fa-search"></i></button>
</form>
</div>
<div class="notification-icon" onclick="window.location.href='notification.php'">
<i class="fas fa-bell"></i>
</div>
<div class="profile" onclick="toggleDropdown()">
<img src="<?php echo $j_image; ?>" alt="Profile Image" width=25px />
</div>
</nav>
</div>
<div class="dropdown" id="dropdownMenu">
<div class="user-info">
<img src="<?php echo $j_image; ?>" alt="Profile Image" width=25px />
<h4><?php echo $jobseeker_name; ?></h4>
</div>
<hr>
<div class="dropdownlist">
<a href="jobseekerlogout.php" class="sub-menu-links"><img src="Images/exit.png"><p>Logout</p></a>
<a href="Setting.php" class="sub-menu-links"><img src="Images/settings.png"><p>Settings</p></a>
<a href="profile.php" class="sub-menu-links"><img src="Images/edit-info.png"><p>Profile</p></a>
</div>
</div>
<div class="main-content">
<?php
switch ($activePage) {
case 'jobseekerdashboard':
include 'jobseekerdashboard.php';
break;
case 'apply':
include 'apply.php';
break;
default:
include 'jobseekerdashboard.php';
break;
}
?>
</div>
<footer id="footer">
<div class="footer-content">
<div class="logo">
<h2>Job Portal</h2>
</div>
<div class="socail-links">
<i class="fa-brands fa-twitter"></i>
<i class="fa-brands fa-facebook-f"></i>
<i class="fa-brands fa-instagram"></i>
<i class="fa-brands fa-youtube"></i>
<i class="fa-brands fa-pinterest-p"></i>
</div>
</div>
<div class="footer-bottom-content">
<p>Designed By Job Portal teams</p>
<div class="copyright">
<p>©Copyright <strong>Job portal</strong>.All Rights Reserved</p>
</div>
</div>
</footer>
<script>
document.addEventListener('DOMContentLoaded', function() {
const dropdownMenu = document.getElementById('dropdownMenu');
window.toggleDropdown = function() {
dropdownMenu.style.display = dropdownMenu.style.display === 'block' ? 'none' : 'block';
console.log("Toggle dropdown"); // Add this line to check if the function is called
}
document.addEventListener('click', function(event) {
const profileIcon = document.querySelector('.profile');
if (!profileIcon.contains(event.target) && !dropdownMenu.contains(event.target)) {
dropdownMenu.style.display = 'none';
}
});
});
</script>
<script src="js/jquery.min.js"></script>
<script src="js/dashboardcustom.js"></script>
</body>
</html>