-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmyjobs.php
79 lines (64 loc) · 2.43 KB
/
myjobs.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
<?php
include_once 'partials/config.php';
$sql = "SELECT * FROM job_detail";
$result = mysqli_query($conn, $sql);
$row = mysqli_num_rows($result);
?>
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="partials/style.css">
<title>My Jobs</title>
<?php
include_once 'partials/header.php';
?>
<div class="image">
<img src="partials/images/banner_myjob.png" class="image" alt="...">
</div>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css">
</head>
<body>
<section class="job-list" id="jobs">
<h1 class="section-title">Your Jobs</h1>
<?php
$user_id = mysqli_real_escape_string($conn, $_SESSION["id"]);
$query = "SELECT job_id, company_name, designation, detail, req1, req2, req3 FROM job_detail where user_id = $user_id";
$result = mysqli_query($conn, $query);
while ($row = mysqli_fetch_assoc($result)) {
$companyName = $row['company_name'];
$designation = $row['designation'];
$detail = $row['detail'];
$req1 = $row['req1'];
$req2 = $row['req2'];
$req3 = $row['req3'];
?>
<div class="job-card">
<div class="job-name">
<img class="job-profile" src="partials/images/<?php echo strtolower($companyName); ?>.png">
<div class="job-details">
<h4><?php echo $companyName; ?></h4>
<h3><?php echo $designation; ?></h3>
<p><?php echo $detail; ?></p>
</div>
</div>
<div class="job-label">
<?php if ($req1) { ?><a class="label-1" href="#"><?php echo $req1; ?></a><?php } ?>
<?php if ($req2) { ?><a class="label-2" href="#"><?php echo $req2; ?></a><?php } ?>
<?php if ($req3) { ?><a class="label-3" href="#"><?php echo $req3; ?></a><?php } ?>
</div>
<!-- <div class="applynow-btn">
<button class="applynow" onclick="location.href='applynow.php?id=<?php echo $row['job_id']; ?>'">Apply Now</button>
</div> -->
<div class="appview-btn">
<button class="appview" onclick="location.href='viewapplications.php?id=<?php echo $row['job_id']; ?>'">View Applications</button>
</div>
</div>
<?php
}
?>
</section>
<?php
include 'partials/footer.php';
?>
</body>
</html>