-
Notifications
You must be signed in to change notification settings - Fork 0
/
search_for_job.php
229 lines (222 loc) · 9.14 KB
/
search_for_job.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
<?php include("header.php");?>
<?php include("menu.php");?>
<?php
$registration_id=$_SESSION['registration_id'];
if(isset($_POST['reset']))
{
$_SESSION['keyword']='';
$_SESSION['designation']='';
$_SESSION['area_of_interest']='';
$_SESSION['job_location']='';
}
else
{
if(isset($_POST['search'])){
$_SESSION['keyword']=$_POST['keyword'];
$_SESSION['designation']=$_POST['designation'];
$_SESSION['area_of_interest']=$_POST['area_of_interest'];
$_SESSION['job_location']=$_POST['job_location'];
}
}
$sql="select * from master_job where status='1'";
if(isset($_SESSION['keyword']) && $_SESSION['keyword']!='')
{ $keyword=$_SESSION['keyword'];
$sql.=" and keyword like '%$keyword%'";
}
if(isset($_SESSION['designation']) && $_SESSION['designation']!='')
{ $designation=$_SESSION['designation'];
$sql.=" and designation like '%$designation%'";
}
if(isset($_SESSION['area_of_interest']) && $_SESSION['area_of_interest']!='')
{ $area_of_interest=$_SESSION['area_of_interest'];
$sql.=" and area_of_interest='$area_of_interest'";
}
if(isset($_SESSION['job_location']) && $_SESSION['job_location']!='')
{ $job_location= $_SESSION['job_location'];
$sql.=" and job_location in (select id from master_city where city like '%$job_location%')";
}
if(isset($_POST['view_job']))
{
$_SESSION['view_job']=$_POST['view_job'];
}
if(isset($_SESSION['view_job']) && $_SESSION['view_job']!='')
{
$view_job= $_SESSION['view_job'];
$today_date = date('Y-m-d H:i:s');
$last=date('Y-m-d H:i:s', strtotime($view_job));
$sql.=" and `post_date` BETWEEN '" .$last."' AND '" .$today_date."' order by id desc ";
}
?>
<!-- -------------------------------- container starts ------------------------------ -->
<script type="text/javascript">
$(document).ready(function(){
$('.showjobinterest').live('click',function(){
var clas=$(this).attr('class').split(' ');
var job_id=clas[1];
var employer_registraion_id=clas[2];
var registration_id=clas[3];
if(confirm("Are you sure you want to show interest?")){
$.ajax({
type:"POST",
url:"employer_job_inc.php",
data:"action=showjobinterest&&job_id="+job_id+"&&employer_registraion_id="+employer_registraion_id+"&®istration_id="+registration_id,
dataType:"JSON",
success:function(data)
{
if($.trim(data.error_msg)!="success")
alert(data.error_msg);
else
window.location.href=data.url;
}
});
}
else
{
return false;
}
});
});
</script>
<link type="text/css" rel="stylesheet" href="css/simplePagination.css" />
<script src="js/jquery.simplePagination.js"></script>
<script>
jQuery(function($) {
var pageParts = $(".paginate");
var numPages = pageParts.length;
var perPage = 10;
pageParts.slice(perPage).hide();
$("#page-nav").pagination({
items: numPages,
itemsOnPage: perPage,
cssStyle: "light-theme",
onPageClick: function(pageNum) {
var start = perPage * (pageNum - 1);
var end = start + perPage;
pageParts.hide()
.slice(start, end).show();
}
});
});
</script>
<div class="page_title"><span>Search for job</span></div>
<div class="inner_conainer fade_anim">
<form action="" name="search_for_job" method="post" autocomplete="on">
<div class="table_main editinfo" id="no-more-tables">
<table class="table-bordered table-striped table-condensed cf">
<thead>
<tr bgcolor="#868686" style="color:#fff;">
<th> keyword </th>
<th> designation </th>
<th> Industry Type </th>
<th>Job Location</th>
</tr>
</thead>
<tbody>
<tr>
<td data-title="keyword"><input type="text" class="auto_input" name="keyword" value="<?php echo $_SESSION['keyword'];?>"></td>
<td data-title="designatioin"><input type="text" class="auto_input" name="designation" value="<?php echo $_SESSION['designation'];?>"></td>
<td data-title="Area of Interest">
<select name="area_of_interest" id="area_of_interest">
<option value="">Please Select Category</option>
<?php
$result=$conn->query("select * from master_interest_area where status=1");
while($row=$result->fetch_assoc()){
?>
<option value="<?php echo $row['id'];?>" <?php if($_SESSION['area_of_interest']==$row['id']){?> selected="selected"<?php }?>><?php echo $row['area_of_interest'];?></option>
<?php }?>
</select>
</td>
<td data-title="Job Location">
<input type="text" class="auto_input" name="job_location" value="<?php echo $_SESSION['job_location'];?>">
</td>
</tr>
</tbody>
</table>
</div>
<div class="add_info">
<input type="submit" class="editSave" value="Submit" name="search"/><input type="submit" name="reset" value="Reset"/>
</div>
</form>
<div class="clear"></div>
<div class="table_job" id="no-more-tables-job">
<div class="clear"></div>
<table class="table-bordered-job table-striped table-condensed-job cf">
<thead>
<form method="POST" name="job_day" id="job_day">
<tr>
<th >Job Search Result</th>
<th align="right">
<select name="view_job" onchange="this.form.submit();">
<option value="0">View All Posted Jobs</option>
<option <?php if($_SESSION['view_job'] == '-7 day') echo 'selected '; ?> value="-7 day">Last Week</option>
<option <?php if($_SESSION['view_job'] == '-14 day') echo 'selected '; ?> value="-14 day">Last Two Weeks</option>
<option <?php if($_SESSION['view_job'] == '-21 day') echo 'selected '; ?> value="-21 day">Last Three Weeks</option>
<option <?php if($_SESSION['view_job'] == '-30 day') echo 'selected '; ?> value="-30 day">Last 30 days</option>
</select>
</th>
</tr>
</form>
</thead>
<tbody>
<?php
$result=$conn->query($sql);
$num=$result->num_rows;
while($row=$result->fetch_assoc()){
?>
<tr class="paginate">
<td colspan="2" data-title="<?php echo $row['job_title'];?>">
<h2 style="float: left;" align="left"><a href="job_profile.php?id=<?php echo $row['id'];?>" target="_blank"><?php echo $row['job_title'];?></a></h2>
<span style="float: right;font-size: inherit;padding-left: 10px;">Job Posted on :<br><?php echo date('Y-m-d',strtotime($row['post_date']));?></span>
<?php if(isset($_SESSION['registration_id'])):?>
<?php if(actor_type($conn,$registration_id)=="S"):?>
<p data-title="">
<a href="#" class="showjobinterest <?php echo $row['id']." ".$row['registration_id']." ".$registration_id;?> contact" style="float: right;padding-right: 25px;margin-bottom: 5px;">Apply</a>
</p>
<?php else:?>
<p data-title="">
<a href="#" class="contact" style="float: right;padding-right: 25px;margin-bottom: 5px;" onclick="return(window.confirm('Only Candidate can contact..!!'));" >Contact</a>
</p>
<?php endif ;else : ?>
<p data-title="Action">
<a class="fancybox fancybox.ajax fade contact" href="login_signup_form.php?redirect_url=<?php echo basename($_SERVER['PHP_SELF']);?>" style="float: right;padding-right: 25px;margin-bottom: 5px;">Apply</a>
</p>
<?php endif;?>
<hr style="clear: both;">
Min Exp : <?php echo $row['min_exp'];?> Yrs. Location : <?php echo getCityName($conn,$row['job_location']);?></p>
<p>Description : <br> <?php echo $row['job_desc'];?></p>
Skills : <?php echo $row['keyword'];?>
</td>
<!-- <td data-title="Keyword"><?php echo $row['keyword'];?></td>
<td data-title="Designation"><?php echo $row['designation'];?></td>
<td data-title="Area of Interest"><?php echo getInterest($conn,$row['area_of_interest']);?></td>
<td data-title="Job Location "><?php echo getCityName($conn,$row['job_location']);?></td> -->
<!-- <?php if(isset($_SESSION['registration_id'])):?>
<?php if(actor_type($conn,$registration_id)=="S"):?>
<td data-title="">
<a href="#" class="showjobinterest <?php echo $row['id']." ".$row['registration_id']." ".$registration_id;?> contact">Contact</a>
</td>
<?php else:?>
<td data-title="">
<a href="#" onclick="return(window.confirm('Only Candidate can contact..!!'));" class="contact">Contact</a>
</td>
<?php endif ;else : ?>
<td data-title="Action">
<a class="fancybox fancybox.ajax fade" href="login_signup_form.php?redirect_url=<?php echo basename($_SERVER['PHP_SELF']);?>">Show Interest</a>
</td>
<?php endif;?> -->
<!-- <td data-title="">
<a href="job_profile.php?id=<?php echo $row['id'];?>" class="contact" target="_blank">View</a>
</td> -->
</tr>
<?php }?>
</tbody>
</table>
<div class="clear"></div>
</div>
<div class="clear"></div>
<div id="page-nav"></div>
<div class="clear"></div>
</div>
<!-- -------------------------------- container ends ------------------------------ -->
<?php include("footer.php");?>
</body></html>