/recruitment/apply/index.php
PHP | 207 lines | 187 code | 20 blank | 0 comment | 13 complexity | baa687289eb0b62cec70754bb1cd6c98 MD5 | raw file
Possible License(s): LGPL-2.1
- <?php
- if (!isset($_SESSION)) {
- session_start();
- }
-
- require_once('../../lib/database.php');
- openConnection();
-
- require_once('../helper_functions.php');
- require_once('../profile/profile_details.php');
-
- $advertID = 0;
- $_SESSION['advert_id'] = 0;
-
- if(isset($_REQUEST['ref_tag'])){
- $advertID = $_REQUEST['ref_tag'] - 1024;
- $_SESSION['advert_id'] = $advertID;
- }
-
- $advert_response_id = 0;
- $_SESSION['advt_response_id'] = 0;
-
- if(!isset($_SESSION['user_account_row_id']) || ($_SESSION['user_account_row_id'] < 1) || ($advertID == 0) ){
- include_once('../access_error.php');
- $redirectToURL = '../profile/';
-
- header("location: $redirectToURL");
- exit();
- }
-
- $applicantid = $_SESSION['user_account_row_id'];
- $refscomplete = false; //assume the applicant has not provided all 3 referees for this application.
-
- $app_submitted = applicant_submitted_this_application($advertID, $applicantid);
-
- if ($app_submitted > 0){ //defined in helper_functions.php
- $redirectToURL = 'print_application.php?ref_tag=' . $app_submitted;
- header("location: $redirectToURL");
- exit();
- }else{
- if(!applicant_responded_to_this_advert($advertID, $applicantid)){ //defined in helper_functions.php
- $advert_response_id = commit_advert_response($advertID, $applicantid); //defined in helper_functions
- $_SESSION['advt_response_id'] = $advert_response_id;
- }
- }
-
- require_once('job_apply_details.php');
- ?>
-
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <?php require_once("../../partials/cssimports.php") ?>
- <title>ABU Zaria | Online Job Vacancies and Recruitment Portal</title>
- <meta name="keywords" content="ABU Zaria, job vacancies, recruitment">
- <meta name="description" content="The official online job vacancies and recruitment portal of Ahmadu Bello University, Zaria - Nigeria.">
- <link href="../recruit_css/style.css" rel="stylesheet" type="text/css" media="screen" />
- <style type="text/css">
- .hero-unit {
- background-color: #fff;
- opacity: 0.8;
- -webkit-border-radius: 3px;
- -moz-border-radius: 3px;
- border-radius: 3px;
- background-image: url('../../assets/img/banner-recruitment.png');
- min-height: 120px;
- }
-
- .hero-unit p a.btn {
- opacity: 1;
- }
-
- </style>
- <!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
- <!--[if lt IE 9]>
- <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
- <![endif]-->
-
- </head>
-
- <body>
- <?php include_once dirname(__FILE__) . "/../../partials/recruit_navbar.php" ?>
-
- <div id="container" class="container">
- <div class="span12">
- <div class="page-header">
- <h2><?php echo $_SESSION['full_names']?><small> Respond to a job advert <font style="font-size:12px"><a href="../logout.php">[Log Out]</a> <a href="../profile/profile.php">[Back to Profile]</a></font></small></h2>
- <noscript>
- <?php include_once('../no_javascript.php');?>
- </noscript>
-
- <?php
- if(isset($_SESSION['msgDetails']) && strlen($_SESSION['msgDetails']) > 0 ) {
- echo $_SESSION['msgDetails'];
-
- $_SESSION['msgCaption'] = '';
- $_SESSION['msgDetails'] = '';
- }
- ?>
- </div>
-
- <div class="dashboard_div" style="width:90%">
- <div class="div_caption"><?php echo get_job_title_from_advert_id($advertID)?></strong></div>
- <!-- <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> -->
- <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>
- <div class="dashboard_div" style="width:55%;">
- <div class="div_caption"><strong>THREE (3) Referees Required</strong></div>
- <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>
- <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>
- <?php $refscomplete = load_job_response_referees($applicantid, $advertID); //defined inside job_apply_details.php?>
-
- </div>
-
- <div class="dashboard_div" style="width:33%; min-height:200px; font-size:12px">
- <div class="div_caption"><strong>Your Credentials</strong></div>
- 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>
- <table border="1px" style="border-collapse: collapse; width:100%; margin-top:10px" cellpadding="5px" cellspacing="10px">
- <tr>
- <th>Requirement</th><th>Status</th><th>Action</th>
- </tr>
- <tr>
- <?php
- if(is_biodata_complete($applicantid)){ //defined in helper_functions.php ?>
- <td></font>Biodata Information</td><td><font color="#009900">Complete</font></td><td><a href="../profile/biodata.php">[update]</a></td>
- <?php }else{ ?>
- <td></font>Biodata Information</td><td><font color="#cc0000">Not Complete</font></td><td><a href="../profile/biodata.php">[update]</a></td>
- <?php } ?>
- </tr>
- <tr>
- <?php
- if(is_primary_contact_complete($applicantid)){ //defined in helper_functions.php ?>
- <td></font>Contact Information</td><td><font color="#009900">Complete</font></td><td><a href="../profile/contact.php">[update]</a></td>
- <?php }else{ ?>
- <td></font>Contact Information</td><td><font color="#cc0000">Not Complete</font></td><td><a href="../profile/contact.php">[update]</a></td>
- <?php } ?>
- </tr>
- <tr>
- <?php
- if(is_academic_qualification_complete($applicantid)){ //defined in helper_functions.php ?>
- <td></font>Academic Qualification</td><td><font color="#009900">Complete</font></td><td><a href="../profile/qualifications_acad.php">[update]</a></td>
- <?php }else{ ?>
- <td></font>Academic Qualification</td><td><font color="#cc0000">Not Complete</font></td><td><a href="../profile/qualifications_acad.php">[update]</a></td>
- <?php } ?>
- </tr>
- <tr>
- <?php $prof_qual = count_applicant_professional_quals($applicantid) //defined in helper_functions.php ?>
-
- <?php
- if($prof_qual == 0){ ?>
- <td></font>Professional Qualifications</td><td><font color="#cc0000">None Provided</font></td><td><a href="../profile/qualifications_prof.php">[update]</td>
- <?php }else{ ?>
- <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>
- <?php } ?>
- </tr>
- <tr>
- <?php $work_exp = count_applicant_work_experience($applicantid) //defined in helper_functions.php ?>
-
- <?php
- if($work_exp == 0){ ?>
- <td></font>Work Experience</td><td><font color="#cc0000">None Provided</font></td><td><a href="../profile/work_experience_add.php">[update]</td>
- <?php }else{ ?>
- <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>
- <?php } ?>
- </tr>
- </table>
- <br /><font color="#cc0000"><strong>
- Your biodata, contact details and academic qualification must be completed in full before you can submit this application.</strong></font>
- </div>
-
- <form id="frm_submit_application" name="frm_submit_application" method="post" action="submit_application_exec.php">
- <div class="control-group span8">
- <div class="controls">
- <?php
- //also remeber to check if no foto.
- if($refscomplete){
- if(is_biodata_complete($applicantid)){
- if(is_primary_contact_complete($applicantid)){
- if(is_academic_qualification_complete($applicantid)){?>
- <label id="lremark">Any further information or comments (e.g: certificates in view)?</label>
- <div class="controls">
- <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>
- <span class="status"></span>
-
- </div>
- <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" />
- <?php }else{ ?>
- <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>
- <?php }
- }else{ ?>
- <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>
- <?php }
- }else{ ?>
- <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>
- <?php }
-
- }else{?>
- <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>
- <?php }?>
- <span class="status"></span>
- </div>
- </div>
- </form>
- </div>
- </div><!-- /span12 -->
- </div><!-- /container -->
- </body>
- </html>