PageRenderTime 113ms CodeModel.GetById 22ms RepoModel.GetById 0ms app.codeStats 0ms

/old_data/modules/jobmatch/jo/web/edit_jv_des.php

https://github.com/souktel/WorldVision
PHP | 229 lines | 214 code | 8 blank | 7 comment | 6 complexity | afc3981d7cd301a74ce51a181e48fd6f MD5 | raw file
  1. <?php
  2. /**
  3. * Souktel v2.0
  4. * Developed By Tamer A. Qasim
  5. * +972(0)599358296
  6. * q.tamer@gmail.com
  7. */
  8. if($param_session_check != "zZZz4332W")
  9. {
  10. header("Location: index.php");
  11. }
  12. ?>
  13. <?php
  14. $job_id = string_wslashes($_GET['jid']);
  15. if(!is_numeric($job_id)) exit;
  16. $dbid1 = db_connect();
  17. if($job_rs = mysql_query("SELECT * FROM tbl_jo_job_vacancy WHERE job_id = $job_id AND sys_id = $param_session_sys_id AND user_id = $param_session_user_user_id",$dbid1))
  18. {
  19. if($job_row = mysql_fetch_array($job_rs))
  20. {
  21. $job_id = $job_row['job_id'];
  22. $vacancy_title = $job_row['vacancy_title'];
  23. $experience = $job_row['experience'];
  24. $education_level = $job_row['education_level'];
  25. $major = $job_row['major'];
  26. $country = $job_row['country'];
  27. $city = $job_row['city'];
  28. $hours_range = $job_row['hours_range'];
  29. $driving_license = $job_row['driving_license'];
  30. $other_info = $job_row['other_info'];
  31. $status = $job_row['status'];
  32. $referrer = $_SERVER['HTTP_REFERER'];
  33. ?>
  34. <script language="JavaScript">
  35. var rules = [];
  36. //Vacancy Title
  37. rules.push("required,vacancy_title,Required : Vacancy Title.");
  38. rules.push("length<=100,vacancy_title,Vacancy Title : < 100 chars please.");
  39. </script>
  40. <form name="skform" method="POST" action="<?php echo $file_name."?act=1";?>" onsubmit="return validateFields(this, rules)">
  41. <input type="hidden" name="job_id" value="<?php echo $job_id;?>">
  42. <input type="hidden" name="return_url" value="<?php echo $_GET['ru']==""?$referrer:$_GET['ru'];?>">
  43. <table border="0" width="100%" cellspacing="3" cellpadding="6" style="border-collapse: collapse">
  44. <tr>
  45. <td width="96%" colspan="3">
  46. <font face="Trebuchet MS" style="font-size: 10pt">
  47. <span lang="en-us">Please fill out the following form to edit this
  48. job vacancy.</span></font></td>
  49. </tr>
  50. <tr>
  51. <td width="96%" colspan="3">
  52. <font style="font-size: 10pt" face="Trebuchet MS" color="#FF0000">*
  53. Required<span lang="en-us"> field.</span></font></td>
  54. </tr>
  55. <tr>
  56. <td width="3%">&nbsp;</td>
  57. <td width="48%"><b><font face="Trebuchet MS" size="2">General Information</font></b></td>
  58. <td width="49%">&nbsp;</td>
  59. </tr>
  60. <tr>
  61. <td width="3%">&nbsp;</td>
  62. <td width="48%"><font face="Trebuchet MS" size="2">Job Title<font color="#FF0000">
  63. *</font></font></td>
  64. <td width="49%">&nbsp;</td>
  65. </tr>
  66. <tr>
  67. <td width="3%">&nbsp;</td>
  68. <td colspan="2"><input name="vacancy_title" size="75" value="<?php echo $vacancy_title;?>"/></td>
  69. </tr>
  70. <tr>
  71. <td width="3%">&nbsp;</td>
  72. <td width="48%"><font face="Trebuchet MS" size="2">Years Of Experience<font color="#FF0000">
  73. *</font></font></td>
  74. <td width="49%">&nbsp;</td>
  75. </tr>
  76. <tr>
  77. <td width="3%">&nbsp;</td>
  78. <td width="48%">
  79. <select size="1" name="experience" style="width:200px;">
  80. <?php
  81. for($years=0; $years <= 25; $years++) {
  82. echo "<option value=\"$years\" ".($years==$experience?"selected":"").">".($years==0?"No Experience":$years." Year".($years==1?"":"s"))."</option>";
  83. }
  84. ?>
  85. </select>
  86. </td>
  87. <td width="49%">&nbsp;</td>
  88. </tr>
  89. <tr>
  90. <td width="3%">&nbsp;</td>
  91. <td width="48%"><font face="Trebuchet MS" size="2">Educational Level<font color="#FF0000">
  92. *</font></font></td>
  93. <td width="49%"><font face="Trebuchet MS" size="2">Sector<font color="#FF0000">
  94. *</font></font></td>
  95. </tr>
  96. <tr>
  97. <td width="3%">&nbsp;</td>
  98. <td width="48%"><select size="1" name="education_level" style="width:200px;">
  99. <?php
  100. $dbid = db_connect();
  101. $rs1 = mysql_query("SELECT c.level_id, ct.name FROM tbl_ref_education_level c, tbl_ref_education_level_title ct WHERE ct.level_id = c.level_id AND ct.language_id = $param_session_sys_language", $dbid);
  102. while($row1 = mysql_fetch_array($rs1))
  103. {
  104. $row_id = $row1[0];
  105. $row_name = $row1[1];
  106. echo "<option value=\"$row_id\" ".($row_id==$education_level?"selected":"").">$row_name</option>";
  107. }
  108. ?>
  109. </select></td>
  110. <td width="49%"><select size="1" name="major" style="width:200px;">
  111. <?php
  112. $rs2 = mysql_query("SELECT c.major_id, ct.name FROM tbl_ref_major c, tbl_ref_major_title ct WHERE ct.major_id = c.major_id AND ct.language_id = $param_session_sys_language", $dbid);
  113. while($row2 = mysql_fetch_array($rs2))
  114. {
  115. $row_id = $row2[0];
  116. $row_name = $row2[1];
  117. echo "<option value=\"$row_id\" ".($row_id==$major?"selected":"").">$row_name</option>";
  118. }
  119. ?>
  120. </select></td>
  121. </tr>
  122. <tr>
  123. <td width="3%">&nbsp;</td>
  124. <td width="48%"><font face="Trebuchet MS" size="2">Country<font color="#FF0000">
  125. *</font></font></td>
  126. <td width="49%"><font face="Trebuchet MS" size="2">City<font color="#FF0000">
  127. *</font></font></td>
  128. </tr>
  129. <tr>
  130. <td width="3%">&nbsp;</td>
  131. <td width="48%"><select size="1" name="country" style="width:200px;">
  132. <?php
  133. $rs3 = mysql_query("SELECT c.country_id, ct.name FROM tbl_ref_country c, tbl_ref_country_title ct WHERE ct.country_id = c.country_id AND ct.language_id = $param_session_sys_language AND c.country_id = $param_session_sys_country", $dbid);
  134. while($row3 = mysql_fetch_array($rs3))
  135. {
  136. $row_id = $row3[0];
  137. $row_name = $row3[1];
  138. echo "<option value=\"$row_id\" ".($row_id==$country?"selected":"").">$row_name</option>";
  139. }
  140. ?>
  141. </select></td>
  142. <td width="49%"><select size="1" name="city" style="width:200px;">
  143. <?php
  144. $rs4 = mysql_query("SELECT c.city_id, ct.name FROM tbl_ref_city c, tbl_ref_city_title ct WHERE ct.city_id = c.city_id AND ct.language_id = $param_session_sys_language AND c.country_id = $country", $dbid);
  145. while($row4 = mysql_fetch_array($rs4))
  146. {
  147. $row_id = $row4[0];
  148. $row_name = $row4[1];
  149. echo "<option value=\"$row_id\" ".($row_id==$city?"selected":"").">$row_name</option>";
  150. }
  151. db_close($dbid);
  152. ?>
  153. </select></td>
  154. </tr>
  155. <tr>
  156. <td width="3%">&nbsp;</td>
  157. <td width="48%"><font face="Trebuchet MS" size="2">Work Time Schedule<font color="#FF0000">
  158. *</font></font></td>
  159. <td width="49%"><font face="Trebuchet MS" size="2">Driving License<font color="#FF0000">
  160. *</font></font></td>
  161. </tr>
  162. <tr>
  163. <td width="3%">&nbsp;</td>
  164. <td width="48%">
  165. <select size="1" name="hours_range" style="width:200px;">
  166. <option value="1" <?php echo $hours_range==1?"selected":"";?>>Full Time</option>
  167. <option value="2" <?php echo $hours_range==2?"selected":"";?>>Part Time - A.M.</option>
  168. <option value="3" <?php echo $hours_range==3?"selected":"";?>>Part Time - P.M.</option>
  169. <option value="4" <?php echo $hours_range==4?"selected":"";?>>Intern/Training</option>
  170. </select>
  171. </td>
  172. <td width="49%">
  173. <select size="1" name="driving_license" style="width:200px;">
  174. <option value="0" <?php echo ($driving_license==0?"selected":"");?>>Not Required</option>
  175. <option value="1" <?php echo ($driving_license==1?"selected":"");?>>Required</option>
  176. </select>
  177. </td>
  178. </tr>
  179. <tr>
  180. <td width="3%">&nbsp;</td>
  181. <td width="48%"><font face="Trebuchet MS" size="2">Status<font color="#FF0000">
  182. *</font></font></td>
  183. <td width="49%"><font face="Trebuchet MS" size="2">&nbsp;</font></td>
  184. </tr>
  185. <tr>
  186. <td width="3%">&nbsp;</td>
  187. <td width="48%">
  188. <select size="1" name="status" style="width:200px;">
  189. <option value="0" <?php echo ($status==0?"selected":"");?>>OFF</option>
  190. <option value="1" <?php echo ($status==1?"selected":"");?>>ON</option>
  191. </select>
  192. </td>
  193. <td width="49%">&nbsp;</td>
  194. </tr>
  195. <tr>
  196. <td width="3%">&nbsp;</td>
  197. <td width="48%"><font face="Trebuchet MS" size="2"><b>Other Needed Skills</b></font></td>
  198. <td width="49%">&nbsp;</td>
  199. </tr>
  200. <tr>
  201. <td width="3%">&nbsp;</td>
  202. <td colspan="2">
  203. <textarea name="other_info" cols="70" rows="6"><?php echo $other_info;?></textarea>
  204. </td>
  205. </tr>
  206. <tr>
  207. <td width="3%">&nbsp;</td>
  208. <td width="48%" colspan="2"><b><font face="Trebuchet MS" size="2"><a href="<?php echo $_GET['ru']==""?$referrer:$_GET['ru'];?>"><<&nbsp;Return to previous!</a></font></b></td>
  209. </tr>
  210. <tr>
  211. <td width="48%" colspan="3">
  212. <input type="submit" value="Edit Job Vacancy" name="submit"/>
  213. </td>
  214. </tr>
  215. </table>
  216. </form>
  217. <?php
  218. }
  219. }
  220. db_close($dbid1);
  221. ?>