-
Notifications
You must be signed in to change notification settings - Fork 0
/
search.php
120 lines (95 loc) · 3.53 KB
/
search.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
<?
require_once("cb.php");
?>
<html>
<head>
<title>JobJumbler</title>
<link rel='stylesheet' type='text/css' href='searchstyle.css'>
</head>
<body>
<div id='nav_wrapper'>
<img src='images/logo.png' id='logo'>
<div id='apply'>Apply!</div>
<div id='start_over'>Start Over</div>
</div>
<div id='arrow_left_container'>
<img src='images/arrow_left.png' id='arrow_left'>
</div>
<div id='arrow_right_container'>
<img src='images/arrow_right.png' id='arrow_right'>
</div>
<div id='content_wrapper'>
<?
$results = CBAPI::getJobResults($_GET["job_query"], $_GET["city_query"], "", 1, 0);
$job = CBAPI::getJobDetails($results[0]->did); //job
?>
<iframe src="<?php echo $job->applyURL; ?>" id="content_frame" frameBorder="0"></iframe>
<div id='desc_frame'>
<? echo html_entity_decode($job->description, ENT_QUOTES); ?>
</div>
</div>
<div id='return'>
Return To Posting
</div>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script>
var counter = 1;
var tmp_job = "<?php echo $_GET['job_query']; ?>";
var job = tmp_job.replace(" ", "%20");
var tmp_city = "<?php echo $_GET['city_query']; ?>";
var city = tmp_city.replace(" ", "%20");
$(document).ready(function(){
$.ajaxSetup ({
// Disable caching of AJAX responses
cache: false
});
$("#arrow_right_container")
.mouseenter(function(event){
$("#arrow_right").animate({'left' : '40px'});
})
.mouseleave(function(event){
$("#arrow_right").animate({'left' : '190px'});
});
$("#arrow_left_container")
.mouseenter(function(event){
$("#arrow_left").animate({'left' : '0px'});
})
.mouseleave(function(event){
$("#arrow_left").animate({'left' : '-100px'});
});
$('#start_over').click(function() {
document.location.href='http://localhost/';
});
$('#apply').click(function() {
$("#content_frame").css("visibility", "visible");
$("#return").css("visibility", "visible");
$("#desc_frame").css("visibility", "hidden");
});
$('#return').click(function() {
$("#content_frame").css("visibility", "hidden");
$("#return").css("visibility", "hidden");
$("#desc_frame").css("visibility", "visible");
});
$('#logo').click(function() { //changed to link to home page
document.location.href='http://localhost/';
});
$('#arrow_right').click(function() { //changed to link to home page
$("#content_frame").css("visibility", "hidden");
$("#return").css("visibility", "hidden");
$("#desc_frame").css("visibility", "visible");
counter = counter + 1;
$("#content_frame").load("http://localhost/iframe.php?id=" + counter + "&job=" + job + "&city=" + city);
$("#desc_frame").load("http://localhost/descframe.php?id=" + counter + "&job=" + job + "&city=" + city);
});
$('#arrow_left').click(function() { //changed to link to home page
$("#content_frame").css("visibility", "hidden");
$("#return").css("visibility", "hidden");
$("#desc_frame").css("visibility", "visible");
counter = counter - 1;
$("#content_frame").load("http://localhost/iframe.php?id=" + counter + "&job=" + job + "&city=" + city);
$("#desc_frame").load("http://localhost/descframe.php?id=" + counter + "&job=" + job + "&city=" + city);
});
});
</script>
</body>
</html>