-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcriteria.php
More file actions
executable file
·192 lines (180 loc) · 7.52 KB
/
criteria.php
File metadata and controls
executable file
·192 lines (180 loc) · 7.52 KB
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
<?
include "connect.php";
$jid = -1;
if (isset($_GET["jid"])){
$jid = $_GET["jid"];
}
function print_body($category, $userid){
$jid = -1;
if (isset($_GET["jid"])){
$jid = $_GET["jid"];
}
if ($jid >= 0) {
echo "<tbody>";
$u_table_name = "jobs_".$category;
$contents = mysql_query("SELECT * FROM $category") or die (mysql_error());
$given = mysql_query("SELECT * FROM $u_table_name WHERE user_id = $userid AND job_id = $jid") or die (mysql_error());
$selected_items = array();
while($given_item = mysql_fetch_assoc($given)){
$item_index = $given_item["skill_id"];
$selected_items[$item_index] = "1";
}
while ($content = mysql_fetch_assoc($contents)){
echo
<tr>
<td>";
$content_name = $content["name"];
$content_id = $content["id"];
$cat_name = $category."_".$content_id;
echo "<input type=\"checkbox\" name=\"$cat_name\"";
if (isset($selected_items[$content_id])){ echo " CHECKED ";}
echo " value=\"1\" />";
echo " $content_name ";
echo
</td>
</tr>";
}
echo "</tbody>";
}
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<?include "signup_header.php"?>
<div class="container">
<div class="content">
<form action="process_criteria.php" method="post">
<input type="hidden" name="job_id" value="<?echo "$jid";?>"></input>
<div class="row" style="margin-left: 0px";>
<div class="span16">
<div class="row " style="margin-left: -10px; margin-bottom: 0px">
<div class="span2" style="margin-bottom: 10px">
<h4 class="glow" style="font-family: 'Trebuchet MS', sans-serif; font-size: 30px; font-weight: lighter; color:#444444; "> Step 3:</h4>
</div>
<div class="row" style="margin-bottom: 10px; width:500px;">
<h2 style="font-family: 'Trebuchet MS', sans-serif; font-weight: lighter; color:#444444; font-size: 25px; "> Tell us your hiring criteria for: </h2>
<select class="xlarge" style = "width: 340px;"name="location_select" id="location_select">
<option value="nothing"> </option>
<?
$data = mysql_query("SELECT * from `jobs` where `user_id` = '$userid'") or die(mysql_query);
while ($job_details = mysql_fetch_assoc($data)){
$job_name = $job_details["job_name"];
$job_id = $job_details["id"];
if ($job_name) {
echo "<option value=\"$job_id\""; if($jid == $job_id){echo "SELECTED";} echo"> $job_name </option>";
}
}
?>
</select>
<script language="javascript">
var selectmenu=document.getElementById("location_select")
selectmenu.onchange=function(){ //run some code when "onchange" event fires
var chosenoption=this.options[this.selectedIndex] //this refers to "selectmenu"
if (chosenoption.value!="nothing"){
var togo = "criteria.php?jid=" + chosenoption.value
window.location = togo //open target site (based on option's value attr) in new window
}
}
</script>
</div>
</div>
</div>
</div>
<div class="row" style="margin-left: 0px";>
<div class="span16">
<div class="row" style="margin-left: 0px";>
<div class="span3">
<table height="25%" bgcolor="#6698ff;" style="vertical-align:middle; background-color: #6698ff;">
<tbody>
<tr height="100%">
<td valign="middle" height="100%" style="vertical-align:middle;">
<img src="images/Otechnicaltraining.png" height="55px"></img>
</td>
<td align="left" valign="middle" width="90%"height="100%" style="vertical-align:middle">
<p style="font-size: 16px; font-family: 'Trebuchet MS', sans-serif; color: #000; font-weight: bold; ">Polytechnic or Technical School</p>
</td>
</tr>
</tbody>
</table>
<div class="row" style="overflow-x:hidden; overflow-y:scroll; height:70%;margin-left:10px; margin-top:-15px;">
<table class="zebra-striped" >
<? print_body("polytechnic", $userid); ?>
</table>
</div>
</div>
<div class="span3">
<table height="25%" bgcolor="#6698ff;" style="vertical-align:middle; background-color: #6698ff;">
<tbody>
<tr height="100%">
<td valign="middle" height="100%" style="vertical-align:middle;">
<img src="images/Ouniversity.png" height="55px"></img>
</td>
<td align="left" valign="middle" width="90%"height="100%" style="vertical-align:middle;">
<p style="font-size: 16px; font-family: 'Trebuchet MS', sans-serif; color: #000; font-weight: bold; "> University Degree</p>
</td>
</tr>
</tbody>
</table>
<div class="row" style="overflow-x:hidden; overflow-y:scroll; height:70%;margin-left:10px; margin-top:-15px;">
<table class="zebra-striped" >
<? print_body("university_degree", $userid); ?>
</table>
</div>
</div><div class="span3">
<table height="25%" bgcolor="#6698ff;" style="vertical-align:middle; background-color: #6698ff;">
<tbody>
<tr height="100%">
<td valign="middle" height="100%" style="vertical-align:middle;">
<img src="images/Oworkexperience.png" height="55px"></img>
</td>
<td align="left" valign="middle" width="90%"height="100%" style="vertical-align:middle;">
<p style="font-size: 16px; font-family: 'Trebuchet MS', sans-serif; color: #000; font-weight: bold; "> Previous Work Experience</p>
</td>
</tr>
</tbody>
</table>
<div class="row" style="overflow-x:hidden; overflow-y:scroll; height:70%;margin-left:10px; margin-top:-15px;">
<table class="zebra-striped" >
<? print_body("work_experience", $userid); ?>
</table>
</div>
</div><div class="span3">
<table height="25%" bgcolor="#6698ff;" style="vertical-align:middle; background-color: #6698ff;">
<tbody>
<tr height="100%">
<td valign="middle" height="100%" style="vertical-align:middle;">
<img src="images/Ootherskills.png" height="60px"></img>
</td>
<td align="left" valign="middle" width="90%"height="100%" style="vertical-align:middle;">
<p style="font-size: 16px; font-family: 'Trebuchet MS', sans-serif; color: #000; font-weight: bold; "> Other Skills</p>
</td>
</tr>
</tbody>
</table>
<div class="row" style="overflow-x:hidden; overflow-y:scroll; height:70%;margin-left:10px; margin-top:-15px;">
<table class="zebra-striped" >
<? print_body("skills", $userid); ?>
</table>
</div>
</div>
</div>
</div>
</div>
<div class="row" style="margin-left: 0px";>
<div class="span4" style="margin-top: 15px; min-height: 50px; margin-left: 25px; border-left: 0px;">
<input class="btn small primary" type="submit" style="width:175px;" name="previous" value="Previous Step"> </input>
</div>
<div class="span3 offset8" style="margin-top: 15px;">
<input class="btn small primary" type="submit" style="width:150px;" name="next" value="Next Step"> </input>
</div>
</div>
</form>
</div>
<?include "bottom_pane.php"?>
<footer>
<p>© Duma 2011</p>
</footer>
</div>
</body>
</html>