PageRenderTime 46ms CodeModel.GetById 21ms RepoModel.GetById 0ms app.codeStats 0ms

/recruitment/apply/index.php

https://bitbucket.org/lecturer34/hrmis
PHP | 207 lines | 187 code | 20 blank | 0 comment | 13 complexity | baa687289eb0b62cec70754bb1cd6c98 MD5 | raw file
Possible License(s): LGPL-2.1
  1. <?php
  2. if (!isset($_SESSION)) {
  3. session_start();
  4. }
  5. require_once('../../lib/database.php');
  6. openConnection();
  7. require_once('../helper_functions.php');
  8. require_once('../profile/profile_details.php');
  9. $advertID = 0;
  10. $_SESSION['advert_id'] = 0;
  11. if(isset($_REQUEST['ref_tag'])){
  12. $advertID = $_REQUEST['ref_tag'] - 1024;
  13. $_SESSION['advert_id'] = $advertID;
  14. }
  15. $advert_response_id = 0;
  16. $_SESSION['advt_response_id'] = 0;
  17. if(!isset($_SESSION['user_account_row_id']) || ($_SESSION['user_account_row_id'] < 1) || ($advertID == 0) ){
  18. include_once('../access_error.php');
  19. $redirectToURL = '../profile/';
  20. header("location: $redirectToURL");
  21. exit();
  22. }
  23. $applicantid = $_SESSION['user_account_row_id'];
  24. $refscomplete = false; //assume the applicant has not provided all 3 referees for this application.
  25. $app_submitted = applicant_submitted_this_application($advertID, $applicantid);
  26. if ($app_submitted > 0){ //defined in helper_functions.php
  27. $redirectToURL = 'print_application.php?ref_tag=' . $app_submitted;
  28. header("location: $redirectToURL");
  29. exit();
  30. }else{
  31. if(!applicant_responded_to_this_advert($advertID, $applicantid)){ //defined in helper_functions.php
  32. $advert_response_id = commit_advert_response($advertID, $applicantid); //defined in helper_functions
  33. $_SESSION['advt_response_id'] = $advert_response_id;
  34. }
  35. }
  36. require_once('job_apply_details.php');
  37. ?>
  38. <!DOCTYPE html>
  39. <html lang="en">
  40. <head>
  41. <?php require_once("../../partials/cssimports.php") ?>
  42. <title>ABU Zaria | Online Job Vacancies and Recruitment Portal</title>
  43. <meta name="keywords" content="ABU Zaria, job vacancies, recruitment">
  44. <meta name="description" content="The official online job vacancies and recruitment portal of Ahmadu Bello University, Zaria - Nigeria.">
  45. <link href="../recruit_css/style.css" rel="stylesheet" type="text/css" media="screen" />
  46. <style type="text/css">
  47. .hero-unit {
  48. background-color: #fff;
  49. opacity: 0.8;
  50. -webkit-border-radius: 3px;
  51. -moz-border-radius: 3px;
  52. border-radius: 3px;
  53. background-image: url('../../assets/img/banner-recruitment.png');
  54. min-height: 120px;
  55. }
  56. .hero-unit p a.btn {
  57. opacity: 1;
  58. }
  59. </style>
  60. <!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
  61. <!--[if lt IE 9]>
  62. <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
  63. <![endif]-->
  64. </head>
  65. <body>
  66. <?php include_once dirname(__FILE__) . "/../../partials/recruit_navbar.php" ?>
  67. <div id="container" class="container">
  68. <div class="span12">
  69. <div class="page-header">
  70. <h2><?php echo $_SESSION['full_names']?><small> Respond to a job advert &nbsp;&nbsp;<font style="font-size:12px"><a href="../logout.php">[Log Out]</a>&nbsp;&nbsp;<a href="../profile/profile.php">[Back to Profile]</a></font></small></h2>
  71. <noscript>
  72. <?php include_once('../no_javascript.php');?>
  73. </noscript>
  74. <?php
  75. if(isset($_SESSION['msgDetails']) && strlen($_SESSION['msgDetails']) > 0 ) {
  76. echo $_SESSION['msgDetails'];
  77. $_SESSION['msgCaption'] = '';
  78. $_SESSION['msgDetails'] = '';
  79. }
  80. ?>
  81. </div>
  82. <div class="dashboard_div" style="width:90%">
  83. <div class="div_caption"><?php echo get_job_title_from_advert_id($advertID)?></strong></div>
  84. <!-- <h4 align="center" title="please always quote this job reference number"><i>Job Reference Number:</i> <font color="#009933"><?php echo get_job_reference_number($advertID);?></font></h4> -->
  85. <br /><p style="color:#009933; text-align:center"><strong>Ahmadu Bello University, Zaria is an equal-opportunity employer; and we look forward to having you join us!</strong></font></p>
  86. <div class="dashboard_div" style="width:55%;">
  87. <div class="div_caption"><strong>THREE (3) Referees Required</strong></div>
  88. <p><font style="font-weight:bold; color:#CC0000">IMPORTANT WARNING:</font> The emails and phone numbers you provide of your referess <strong>must be correct,</strong> as the referees shall be automatically contacted and asked to provide information about you.</p>
  89. <p>You will be <strong>seriously reducing</strong> your chances of being considered for employment if you provide wrong referees' emails or phone numbers! </p>
  90. <?php $refscomplete = load_job_response_referees($applicantid, $advertID); //defined inside job_apply_details.php?>
  91. </div>
  92. <div class="dashboard_div" style="width:33%; min-height:200px; font-size:12px">
  93. <div class="div_caption"><strong>Your Credentials</strong></div>
  94. Your CV will be automatically generated according to the data you supplied and will be submitted with this job application. <a href="../profile/print_profile.php" target="_blank">Show my CV</a>
  95. <table border="1px" style="border-collapse: collapse; width:100%; margin-top:10px" cellpadding="5px" cellspacing="10px">
  96. <tr>
  97. <th>Requirement</th><th>Status</th><th>Action</th>
  98. </tr>
  99. <tr>
  100. <?php
  101. if(is_biodata_complete($applicantid)){ //defined in helper_functions.php ?>
  102. <td></font>Biodata Information</td><td><font color="#009900">Complete</font></td><td><a href="../profile/biodata.php">[update]</a></td>
  103. <?php }else{ ?>
  104. <td></font>Biodata Information</td><td><font color="#cc0000">Not Complete</font></td><td><a href="../profile/biodata.php">[update]</a></td>
  105. <?php } ?>
  106. </tr>
  107. <tr>
  108. <?php
  109. if(is_primary_contact_complete($applicantid)){ //defined in helper_functions.php ?>
  110. <td></font>Contact Information</td><td><font color="#009900">Complete</font></td><td><a href="../profile/contact.php">[update]</a></td>
  111. <?php }else{ ?>
  112. <td></font>Contact Information</td><td><font color="#cc0000">Not Complete</font></td><td><a href="../profile/contact.php">[update]</a></td>
  113. <?php } ?>
  114. </tr>
  115. <tr>
  116. <?php
  117. if(is_academic_qualification_complete($applicantid)){ //defined in helper_functions.php ?>
  118. <td></font>Academic Qualification</td><td><font color="#009900">Complete</font></td><td><a href="../profile/qualifications_acad.php">[update]</a></td>
  119. <?php }else{ ?>
  120. <td></font>Academic Qualification</td><td><font color="#cc0000">Not Complete</font></td><td><a href="../profile/qualifications_acad.php">[update]</a></td>
  121. <?php } ?>
  122. </tr>
  123. <tr>
  124. <?php $prof_qual = count_applicant_professional_quals($applicantid) //defined in helper_functions.php ?>
  125. <?php
  126. if($prof_qual == 0){ ?>
  127. <td></font>Professional Qualifications</td><td><font color="#cc0000">None Provided</font></td><td><a href="../profile/qualifications_prof.php">[update]</td>
  128. <?php }else{ ?>
  129. <td></font>Professional Qualifications</td><td><font color="#009900"><?php echo $prof_qual ?> Provided</font></td><td><a href="../profile/qualifications_prof.php">[update]</a></td>
  130. <?php } ?>
  131. </tr>
  132. <tr>
  133. <?php $work_exp = count_applicant_work_experience($applicantid) //defined in helper_functions.php ?>
  134. <?php
  135. if($work_exp == 0){ ?>
  136. <td></font>Work Experience</td><td><font color="#cc0000">None Provided</font></td><td><a href="../profile/work_experience_add.php">[update]</td>
  137. <?php }else{ ?>
  138. <td></font>Work Experience</td><td><font color="#009900"><?php echo $work_exp ?> Provided</font></td><td><a href="../profile/work_experience_add.php">[update]</a></td>
  139. <?php } ?>
  140. </tr>
  141. </table>
  142. <br /><font color="#cc0000"><strong>
  143. Your biodata, contact details and academic qualification must be completed in full before you can submit this application.</strong></font>
  144. </div>
  145. <form id="frm_submit_application" name="frm_submit_application" method="post" action="submit_application_exec.php">
  146. <div class="control-group span8">
  147. <div class="controls">
  148. <?php
  149. //also remeber to check if no foto.
  150. if($refscomplete){
  151. if(is_biodata_complete($applicantid)){
  152. if(is_primary_contact_complete($applicantid)){
  153. if(is_academic_qualification_complete($applicantid)){?>
  154. <label id="lremark">Any further information or comments (e.g: certificates in view)?</label>
  155. <div class="controls">
  156. <textarea name="comments" id="comments" class="span4" rows="3" ><?php if(isset($_SESSION['app_Comments'])){echo htmlentities($_SESSION['app_Comments'], ENT_COMPAT, 'utf-8');}?></textarea>
  157. <span class="status"></span>
  158. </div>
  159. <input id="btnSubmitApplication" name="btnSubmitApplication" type="submit" value="Submit Application" class="btn btn-default" /> <input id="btnCancel" name="btnCancel" type="submit" value="Cancel" class="btn" />
  160. <?php }else{ ?>
  161. <p><a href="../profile/qualifications_acad.php" title="click to complete your academic qualification">Update Qualification</a> <input id="btnCancel" name="btnCancel" type="submit" value="Cancel" class="btn" /></p>
  162. <?php }
  163. }else{ ?>
  164. <p><a href="../profile/contact.php" title="click to complete your contact info">Update Contact</a> <input id="btnCancel" name="btnCancel" type="submit" value="Cancel" class="btn" /></p>
  165. <?php }
  166. }else{ ?>
  167. <p><a href="../profile/biodata.php" title="click to complete your biodata info">Update Biodata</a> <input id="btnCancel" name="btnCancel" type="submit" value="Cancel" class="btn" /></p>
  168. <?php }
  169. }else{?>
  170. <p><a href="job_app_ref_add.php" title="click to add more referees">Add Refrees</a> <input id="btnCancel" name="btnCancel" type="submit" value="Cancel" class="btn" /></p>
  171. <?php }?>
  172. <span class="status"></span>
  173. </div>
  174. </div>
  175. </form>
  176. </div>
  177. </div><!-- /span12 -->
  178. </div><!-- /container -->
  179. </body>
  180. </html>