-
Notifications
You must be signed in to change notification settings - Fork 0
/
careers.php
160 lines (149 loc) · 5.37 KB
/
careers.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
<?php
include 'admin/db_connect.php';
?>
<style>
#portfolio .img-fluid{
width: calc(100%);
height: 30vh;
z-index: -1;
position: relative;
padding: 1em;
}
.gallery-list{
cursor: pointer;
border: unset;
flex-direction: inherit;
}
.gallery-img,.gallery-list .card-body {
width: calc(50%)
}
.gallery-img img{
border-radius: 5px;
min-height: 50vh;
max-width: calc(100%);
}
span.hightlight{
background: yellow;
}
.carousel,.carousel-inner,.carousel-item{
min-height: calc(100%)
}
header.masthead,header.masthead:before {
min-height: 50vh !important;
height: 50vh !important
}
.row-items{
position: relative;
}
.masthead{
min-height: 23vh !important;
height: 23vh !important;
}
.masthead:before{
min-height: 23vh !important;
height: 23vh !important;
}
</style>
<header class="masthead">
<div class="container-fluid h-100">
<div class="row h-100 align-items-center justify-content-center text-center">
<div class="col-lg-8 align-self-end mb-4 page-title">
<h3 class="text-white">Job List</h3>
<hr class="divider my-4" />
<div class="row col-md-12 mb-2 justify-content-center">
<button class="btn btn-primary btn-block col-sm-4" type="button" id="new_career"><i class="fa fa-plus"></i> Post a Job Opportunity</button>
</div>
</div>
</div>
</div>
</header>
<div class="container mt-3 pt-2">
<div class="card mb-4">
<div class="card-body">
<div class="row">
<div class="col-md-8">
<div class="input-group mb-3">
<div class="input-group-prepend">
<span class="input-group-text" id="filter-field"><i class="fa fa-search"></i></span>
</div>
<input type="text" class="form-control" placeholder="Filter" id="filter" aria-label="Filter" aria-describedby="filter-field">
</div>
</div>
<div class="col-md-4">
<button class="btn btn-primary btn-block btn-sm" id="search">Search</button>
</div>
</div>
</div>
</div>
<?php
$event = $conn->query("SELECT c.*,u.name from careers c inner join users u on u.id = c.user_id order by id desc");
while($row = $event->fetch_assoc()):
$trans = get_html_translation_table(HTML_ENTITIES,ENT_QUOTES);
unset($trans["\""], $trans["<"], $trans[">"], $trans["<h2"]);
$desc = strtr(html_entity_decode($row['description']),$trans);
$desc=str_replace(array("<li>","</li>"), array("",","), $desc);
?>
<div class="card job-list" data-id="<?php echo $row['id'] ?>">
<div class="card-body">
<div class="row align-items-center justify-content-center text-center h-100">
<div class="">
<h3><b class="filter-txt"><?php echo ucwords($row['job_title']) ?></b></h3>
<div>
<span class="filter-txt"><small><b><i class="fa fa-building"></i> <?php echo ucwords($row['company']) ?></b></small></span>
<span class="filter-txt"><small><b><i class="fa fa-map-marker"></i> <?php echo ucwords($row['location']) ?></b></small></span>
</div>
<hr>
<larger class="truncate filter-txt"><?php echo strip_tags($desc) ?></larger>
<br>
<hr class="divider" style="max-width: calc(80%)">
<span class="badge badge-info float-left px-3 pt-1 pb-1">
<b><i>Posted by: <?php echo $row['name'] ?></i></b>
</span>
<button class="btn btn-primary float-right read_more" data-id="<?php echo $row['id'] ?>">Read More</button>
</div>
</div>
</div>
</div>
<br>
<?php endwhile; ?>
</div>
</div>
<script>
// $('.card.gallery-list').click(function(){
// location.href = "index.php?page=view_gallery&id="+$(this).attr('data-id')
// })
$('#new_career').click(function(){
uni_modal("New Job Hiring","manage_career.php",'mid-large')
})
$('.read_more').click(function(){
uni_modal("Career Opportunity","view_jobs.php?id="+$(this).attr('data-id'),'mid-large')
})
$('.gallery-img img').click(function(){
viewer_modal($(this).attr('src'))
})
$('#filter').keypress(function(e){
if(e.which == 13)
$('#search').trigger('click')
})
$('#search').click(function(){
var txt = $('#filter').val()
start_load()
if(txt == ''){
$('.job-list').show()
end_load()
return false;
}
$('.job-list').each(function(){
var content = "";
$(this).find(".filter-txt").each(function(){
content += ' '+$(this).text()
})
if((content.toLowerCase()).includes(txt.toLowerCase()) == true){
$(this).toggle(true)
}else{
$(this).toggle(false)
}
})
end_load()
})
</script>