public function show() { $this->begin(); $branch = $this->employee->getBranch(); $this->top('Candidates - ' . $branch[0]['country']); $this->menu_employee('members'); $sales_email_addr = 'team.' . strtolower($branch[0]['country']) . '@yellowelevator.com'; $employers = $this->get_employers(); ?> <!-- submenu --> <div class="menu"> <?php $style = 'background-color: #CCCCCC;'; ?> <ul class="menu"> <li id="item_new_applicants" style="<?php echo $this->current_page == 'applications' ? $style : ''; ?> "><a class="menu" onClick="show_new_applicants();">Potential Applicants</a></li> <li id="item_applicants" style="<?php echo $this->current_page == 'members' ? $style : ''; ?> "><a class="menu" onClick="show_applicants();">Applicants</a></li> <li id="item_members" style="<?php echo $this->current_page == 'search' ? $style : ''; ?> "><a class="menu" onClick="show_members();">Candidates</a></li> </ul> </div> <!-- end submenu --> <div id="div_status" class="status"> <span id="span_status" class="status"></span> </div> <!-- main filter --> <div id="div_main_filter_toggle" class="main_filter_toggle"> <a class="no_link" onClick="toggle_main_filter();"> <span id="hide_show_lbl">Toggle Filter</span> </a> </div> <div id="div_main_filter" class="main_filter"> <table id="main_filter_table"> <tr> <td class="employers_list"> <?php if ($employers === false || empty($employers) || is_null($employers)) { ?> <div class="main_filter_warning">There are no employers to list.</div> <?php } else { ?> <input type="text" class="filter_search" id="employers_search" /><br/> <select id="employers" class="employers" multiple> <?php foreach ($employers as $an_employer) { ?> <option value="<?php echo $an_employer['id']; ?> "> <?php echo '[' . $an_employer['id'] . '] ' . htmlspecialchars_decode(stripslashes($an_employer['employer'])); ?> </option> <?php } ?> </select> <?php } ?> </td> <td class="filter_jobs_button"> <input type="button" value=">>" onClick="populate_jobs_list();" /> </td> <td id="jobs_list" class="jobs_list"> <div id="jobs_list_message_box"><--- Select the employers to list jobs.</div> <div id="jobs_list_placeholder"> <input type="text" class="filter_search" id="jobs_search" /><br/> <select id="jobs" class="jobs" onClick="toggle_add_button();" multiple> </select> </div> </td> <td class="filter_buttons"> <input type="button" class="main_filter_button" value="Show" onClick="do_filter();" /> <hr /> <input type="button" class="main_filter_button" value="Show All" onClick="show_non_attached();" /> <br/> <input type="button" class="main_filter_button" id="search_resume_btn" value="Trace Resume" onClick="trace_resume();"/> <input type="button" class="main_filter_button" id="add_new_btn" value="Add New Applicant" onClick="show_new_application_popup();" disabled /> <input type="button" class="main_filter_button" id="bulk_add_new_btn" value="Bulk Add New Applicants" onClick="show_bulk_new_applications_popup();" disabled /> </td> </tr> <tr> <td colspan="4" class="hide_show"> <div class="main_filter_tip">Hold down the CTRL (Windows), or Command (Mac), key to select/un-select multiple items.</div> </td> </tr> </table> </div> <!-- end main filter --> <div id="new_applicants"> <input type="hidden" id="total_applications" value="0" /> <div class="buttons_bar"> <div class="pagination"> Page <select id="pages" onChange="update_new_applicants();"> <option value="1" selected>1</option> </select> of <span id="total_pages">0</span> </div> <div class="sub_filter"> Show <select id="applications_filter" onChange="filter_new_applicants();" disabled> <option value="" selected>All</option> <option value="" disabled> </option> <option value="self_applied">Self Applied</option> <option value="referred">Referred</option> </select> </div> </div> <div id="div_new_applicants"> <div class="empty_results">No new applicants to show.</div> </div> </div> <div id="applicants"> <div class="buttons_bar"> <div class="pagination"> Page <select id="applicants_pages" onChange="update_applicants();"> <option value="1" selected>1</option> </select> of <span id="total_applicants_pages">0</span> </div> <!-- input class="button" type="button" id="add_new_member" name="add_new_member" value="Add New Member" onClick="add_new_member();" /--> </div> <div id="div_applicants"> <div class="empty_results">No applicants to show.</div> </div> </div> <div id="members"> <!-- search form --> <div id="div_search_toggle" class="search_toggle"> <a class="no_link" onClick="toggle_search();"> <span id="hide_show_lbl">Toggle Search</span> </a> </div> <div id="div_search" class="search"> <form id="candidates_search_form"> <table id="search_table"> <tr> <td class="search_form"> <table id="search_form_table"> <tr> <td class="label"><label for="search_name">Name:</label></td> <td class="field"><input type="text" class="field" id="search_name" /></td> </tr> <tr> <td class="label"><label for="search_email">E-mail: </label></td> <td class="field"><input type="text" class="field" id="search_email" /></td> </tr> <tr> <td class="label"><label for="search_position">Position:</label></td> <td class="field"><input type="text" class="field" id="search_position" /></td> </tr> <tr> <td class="label"><label for="search_employer">Company:</label></td> <td class="field"><input type="text" class="field" id="search_employer" /></td> </tr> <tr> <td class="label"><label for="search_emp_desc">Company Description:</label></td> <td class="field"><?php $this->generate_employer_description('search_emp_desc', -1); ?> </td> </tr> <tr> <td class="label"><label for="search_specialization">Specialization:</label></td> <td class="field"><?php $this->generate_industries(array(), 'search_specialization'); ?> </td> </tr> <tr> <td class="label"><label for="search_total_years">Total Work Years:</label></td> <td class="field"><input type="text" class="field years" id="search_total_years" maxlength="2" /> years</td> </tr> <tr> <td class="label"><label for="search_seeking">Job Responsibilities & Experiences:</label></td> <td class="field"> <textarea class="field" id="search_seeking"></textarea> </td> </tr> </table> </td> <td class="search_buttons"> <input type="button" class="search_button" value="Search" onClick="update_members();" /> <hr /> <input type="button" class="search_button" value="Show All" onClick="update_members('all');" /> </td> </tr> </table> </form> </div> <!-- end search form --> <div id="members_list"> <div class="buttons_bar"> <div class="pagination"> Page <select id="members_pages" onChange="update_members();"> <option value="1" selected>1</option> </select> of <span id="total_members_pages">0</span> </div> <input class="button" type="button" id="add_new_member" name="add_new_member" value="Bulk Add New Candidates" onClick="show_bulk_new_members_popup();"> <input class="button" type="button" id="add_new_member" name="add_new_member" value="Add New Candidate" onClick="add_new_member();"> </div> <div id="div_members"> <div class="empty_results">No members to show.</div> </div> </div> </div> <form id="member_page_form" method="post" target="_new" action="member.php"> <input type="hidden" id="member_email_addr" name="member_email_addr" value="" /> </form> <!-- popup windows goes here --> <div id="notes_window" class="popup_window"> <div class="popup_window_title">Notes</div> <form onSubmit="return false;"> <input type="hidden" id="app_id" value="" /> <input type="hidden" id="notes_email" value="" /> <div class="notes_form"> <textarea id="notes" class="notes"></textarea> </div> </form> <div class="popup_window_buttons_bar"> <input type="button" value="Save" onClick="close_notes_popup(true);" /> <input type="button" value="Cancel" onClick="close_notes_popup(false);" /> </div> </div> <div id="referrer_window" class="popup_window"> <div class="popup_window_title">Referrer to <span id="ref_candidate_name">[Unknown]</span></div> <form onSubmit="return false;"> <input type="hidden" id="referral_buffer_id" value="" /> <div class="referrer_form"> <table class="referrer_form"> <tr> <td class="label">Name:</td> <td><input type="text" class="field" id="ref_referrer_name" /></td> </tr> <tr> <td class="label">Telephone:</td> <td><input type="text" class="field" id="ref_referrer_phone" /></td> </tr> <tr> <td class="label">E-mail:</td> <td><input type="text" class="field" id="ref_referrer_email" /></td> </tr> </table> </div> </form> <div class="popup_window_buttons_bar"> <input type="button" value="Save" onClick="close_referrer_popup(true);" /> <input type="button" value="Cancel" onClick="close_referrer_popup(false);" /> </div> </div> <div id="new_application_window" class="popup_window"> <div class="popup_window_title">New Application</div> <form onSubmit="return false;"> <input type="hidden" id="sales_email_addr" value="<?php echo $sales_email_addr; ?> " /> <input type="hidden" id="new_applicant_jobs" value="" /> <div class="new_application_form"> <table class="new_application"> <tr> <td class="title" colspan="2">Referrer</td> <td class="title">Progress Notes</td> </tr> <tr> <td class="auto_fill" colspan="2"> <input type="checkbox" id="auto_fill_checkbox" onClick="auto_fill_referrer();" /> <label for="auto_fill_checkbox">Referrer is YellowElevator.com</label> </td> <td rowspan="10"> <textarea class="quick_notes" id="quick_notes"></textarea> </td> </tr> <tr> <td class="label">Name:</td> <td><input type="text" class="field" id="referrer_name" /></td> </tr> <tr> <td class="label">Telephone:</td> <td><input type="text" class="field" id="referrer_phone" /></td> </tr> <tr> <td class="label">E-mail:</td> <td><input type="text" class="field" id="referrer_email_addr" /></td> </tr> <tr> <td class="title" colspan="2">Candidate</td> </tr> <tr> <td class="label">Name:</td> <td><input type="text" class="field" id="candidate_name" /></td> </tr> <tr> <td class="label">Telephone:</td> <td><input type="text" class="field" id="candidate_phone" /></td> </tr> <tr> <td class="label">E-mail:</td> <td><input type="text" class="field" id="candidate_email_addr" /></td> </tr> <tr> <td class="label">Current Position:</td> <td><input type="text" class="field" id="candidate_current_pos" /></td> </tr> <tr> <td class="label">Current Company:</td> <td><input type="text" class="field" id="candidate_current_emp" /></td> </tr> </table> </div> </form> <div class="popup_window_buttons_bar"> <input type="button" value="Add New Applicant" onClick="close_new_application_popup(1);" /> <input type="button" value="Cancel" onClick="close_new_application_popup(0);" /> </div> </div> <div id="other_jobs_window" class="popup_window"> <div class="popup_window_title">Other Applied Jobs</div> <div id="div_other_jobs" class="other_jobs"></div> <div class="popup_window_buttons_bar"> <input type="button" value="Close" onClick="close_jobs_popup();" /> </div> </div> <div id="progress_notes_window" class="popup_window"> <div class="popup_window_title">Progress Notes</div> <form onSubmit="return false;"> <input type="hidden" id="progress_id" value="" /> <input type="hidden" id="progress_is_buffer" value="1" /> <div class="notes_form"> <textarea id="progress_notes" class="notes"></textarea> </div> </form> <div class="popup_window_buttons_bar"> <input type="button" value="Save" onClick="close_progress_popup(true);" /> <input type="button" value="Cancel" onClick="close_progress_popup(false);" /> </div> </div> <div id="apply_job_window" class="popup_window"> <div class="popup_window_title">Apply Job</div> <form id="apply_job_form" onSubmit="return false;"> <input type="hidden" id="apply_member_email" value="" /> <div id="div_apply_job_form" class="apply_job_form"> <table class="jobs_selection"> <tr> <td class="jobs_list"> <?php $employers = $this->get_employers(); if (!empty($employers) && $employers !== false) { ?> <select id="apply_employers" class="field" onChange="filter_jobs();"> <?php foreach ($employers as $employer) { ?> <option value="<?php echo $employer['id']; ?> "><?php echo $employer['employer']; ?> </option> <?php } ?> </select> <?php } else { ?> <span class="no_employers">[No employers with opened jobs found.]</span> <?php } ?> <div id="jobs_selector"> Select an employer in the dropdown list above. </div> <div id="selected_job_counter"> <span id="counter_lbl">0</span> jobs selected. </div> </td> <td class="separator"></td> <td> <div id="job_description"> Select a job in the jobs list. </div> </td> </tr> </table> </div> <div class="popup_window_buttons_bar"> <input type="button" id="apply_btn" value="Apply" onClick="close_apply_jobs_popup(true);" /> <input type="button" value="Cancel" onClick="close_apply_jobs_popup(false);" /> </div> </form> </div> <div id="employment_window" class="popup_window"> <div id="window_employment_title" class="popup_window_title"></div> <div class="employment_form"> <table class="employment_form_table"> <tr> <td class="label">Employed On:</td> <td class="field"> <?php $today = date('Y-m-d'); $date_components = explode('-', $today); $year = $date_components[0]; $month = $date_components[1]; $day = $date_components[2]; echo generate_dropdown('employment_day', '', 1, 31, $day, 2, 'Day'); echo generate_month_dropdown('employment_month', '', $month); echo '<span id="employment_year_label">' . $year . '</span>' . "\n"; ?> </td> </tr> <tr> <td class="label">Work Commencement:</td> <td class="field"> <?php $today = date('Y-m-d'); $date_components = explode('-', $today); $year = $date_components[0]; $month = $date_components[1]; $day = $date_components[2]; echo generate_dropdown('work_day', '', 1, 31, $day, 2, 'Day'); echo generate_month_dropdown('work_month', '', $month); echo '<span id="work_year_label">' . $year . '</span>' . "\n"; ?> </td> </tr> <tr> <td class="label">Annual Salary:</td> <td class="field"><span id="employment_currency">???</span>$ <input type="text" class="salary_field" id="salary" name="salary" value="1.00" /></td> </tr> </table> </div> <div class="popup_window_buttons_bar"> <input type="hidden" id="employment_referral_id" value="0" /> <input type="button" value="Confirm & Close" onClick="close_employment_popup(true);" /> <input type="button" value="Close" onClick="close_employment_popup(false);" /> </div> </div> <div id="referrer_remarks_window" class="popup_window"> <div class="popup_window_title">Referrer Remarks</div> <div id="remarks" class="remarks"> <input type="hidden" id="app_id" value="0" /> <textarea id="remarks_field" class="remarks"></textarea> </div> <div class="popup_window_buttons_bar"> <input type="button" value="Save" onClick="close_referrer_remarks_popup(true);" /> <input type="button" value="Close" onClick="close_referrer_remarks_popup();" /> </div> </div> <div id="reminder_window" class="popup_window"> <div class="popup_window_title">Follow Up</div> <form onSubmit="return false;"> <input type="hidden" id="reminder_id" value="" /> <input type="hidden" id="reminder_is_buffer" value="1" /> <div class="reminder_form"> Follow up on <input type="text" id="reminder_day" class="reminder_field" value="" /> </div> </form> <div class="popup_window_buttons_bar"> <input type="button" value="Set" onClick="close_reminder_popup(true);" /> <input type="button" value="Cancel" onClick="close_reminder_popup(false);" /> </div> </div> <div id="upload_new_applicants_window" class="popup_window"> <div class="popup_window_title">Upload New Applicants (CSV)</div> <form id="upload_csv_form" action="members_action.php" method="post" enctype="multipart/form-data" onSubmit="return close_bulk_new_applications_popup(true);"> <div class="upload_csv_form"> <br/> <input type="hidden" id="id" name="id" value="<?php echo $this->employee->getUserId(); ?> " /> <input type="hidden" id="bulk_new_applicant_jobs" name="bulk_new_applicant_jobs" value="0" /> <input type="hidden" name="action" value="bulk_add_new_applicants" /> <div id="upload_progress" style="text-align: center; width: 99%; margin: auto;"> Please wait while new applicants are being uploaded... <br/><br/> <img src="<?php echo $GLOBALS['protocol'] . '://' . $GLOBALS['root']; ?> /common/images/progress/circle_big.gif" /><br/><br/> </div> <div id="upload_field" class="upload_field"> <input id="csv_file" name="csv_file" type="file" /> <div style="font-size: 9pt; margin-top: 15px;"> <ol> <li>Only Comma Separated Verbose (CSV) file with less than 2MB are allowed.</li> </ol> </div> </div> </div> <div class="popup_window_buttons_bar"> <input type="submit" value="Bulk Add" /> <input type="button" value="Close" onClick="close_bulk_new_applications_popup(false);" /> </div> </form> </div> <div id="upload_new_members_window" class="popup_window"> <div class="popup_window_title">Upload New Candidates (CSV)</div> <form id="upload_csv_form" action="members_action.php" method="post" enctype="multipart/form-data" onSubmit="return close_bulk_new_members_popup(true);"> <div class="upload_csv_form"> <br/> <input type="hidden" id="id" name="id" value="<?php echo $this->employee->getUserId(); ?> " /> <input type="hidden" name="action" value="bulk_add_new_candidates" /> <div id="upload_progress" style="text-align: center; width: 99%; margin: auto;"> Please wait while new candidates are being uploaded... <br/><br/> <img src="<?php echo $GLOBALS['protocol'] . '://' . $GLOBALS['root']; ?> /common/images/progress/circle_big.gif" /><br/><br/> </div> <div id="upload_field" class="upload_field"> <input id="members_csv_file" name="members_csv_file" type="file" /> <div style="font-size: 9pt; margin-top: 15px;"> <ol> <li>Only Comma Separated Verbose (CSV) file with less than 2MB are allowed.</li> </ol> </div> </div> </div> <div class="popup_window_buttons_bar"> <input type="submit" value="Bulk Add" /> <input type="button" value="Close" onClick="close_bulk_new_members_popup(false);" /> </div> </form> </div> <?php }
public function show() { $this->begin(); $branch = $this->employee->getBranch(); if ($this->is_new) { $this->top('Candidate - ' . $branch[0]['country'] . ' - New Candidate'); } else { $this->top('Candidate - ' . $branch[0]['country'] . ' - ' . htmlspecialchars_decode(stripslashes($this->member->getFullName()))); } $this->menu_employee('members'); $raw_data = array(); $profile = array(); if (!$this->is_new) { // get profile $raw_data = $this->member->get(); $profile = $raw_data[0]; // get job profiles $raw_data = $this->get_job_profiles(); $profile['job_profiles'] = $raw_data; // get resumes $profile['resumes'] = $this->get_resumes(); // get notes $profile['notes'] = $this->member->getNotes(); // get the referrers and referees //$profile['referrers'] = $this->get_referrers(); $profile['referrers'] = $this->member->getReferrers(); $profile['referees'] = $this->member->getReferees(); } else { $profile = array('email_addr' => '', 'firstname' => '', 'lastname' => '', 'phone_num' => '', 'address' => '', 'state' => '', 'zip' => '0', 'country' => $branch[0]['country'], 'hrm_gender' => '', 'hrm_ethicnity' => '', 'hrm_birthdate' => '', 'citizenship' => $branch[0]['country'], 'resumes' => array()); } $potential_referrers = $this->get_potential_referrers(); $potential_candidates = $this->get_potential_candidates(); //$applications = $this->get_applications(); $temp_apps = $this->member->getAllAppliedJobs(); $applications = array(); $skips = array(); for ($i = 0; $i < count($temp_apps); $i++) { $current_row = $temp_apps[$i]; $next_i = $i + 1; if ($next_i <= count($temp_apps) - 1) { for ($j = $next_i; $j < count($temp_apps); $j++) { if (!in_array($j, $skips)) { if ($current_row['job'] == $temp_apps[$j]['job']) { if ($current_row['tab'] == 'ref') { $skips[] = $j; } else { $skips[] = $i; } } } } } if (!in_array($i, $skips)) { $applications[] = $current_row; } } ?> <!-- submenu --> <div class="menu"> <?php $style = 'background-color: #CCCCCC;'; ?> <ul class="menu"> <!-- li id="item_back"><a class="menu" onClick="go_back();"><<</a></li --> <li id="item_profile" style="<?php echo $this->current_page == 'profile' ? $style : ''; ?> "><a class="menu" onClick="show_profile();">Profile</a></li> <?php if (!$this->is_new) { ?> <li id="item_resumes" style="<?php echo $this->current_page == 'resumes' ? $style : ''; ?> "><a class="menu" onClick="show_resumes(false);">Resumes</a></li> <li id="item_career" style="<?php echo $this->current_page == 'career' ? $style : ''; ?> "><a class="menu" onClick="show_career(false);">Career Profile</a></li> <li id="item_notes" style="<?php echo $this->current_page == 'notes' ? $style : ''; ?> "><a class="menu" onClick="show_notes(false);">Remarks</a></li> <li id="item_connections" style="<?php echo $this->current_page == 'connections' ? $style : ''; ?> "><a class="menu" onClick="show_connections(false);">Connections</a></li> <li id="item_applications" style="<?php echo $this->current_page == 'applications' ? $style : ''; ?> "><a class="menu" onClick="show_applications(false);">Applications</a></li> <?php } ?> </ul> </div> <!-- end submenu --> <div id="div_status" class="status"> <span id="span_status" class="status"></span> </div> <div id="member_profile"> <table class="profile"> <tr> <td class="photo"> <div id="photo_area" class="photo"> <?php if (!$this->is_new && $this->member->hasPhoto()) { ?> <img class="photo_image" src="member_photo.php?id=<?php echo $profile['email_addr']; ?> " /> <?php } else { ?> <div style="text-align: center; margin: auto;"> <?php if ($this->is_new) { echo 'Not allowed to upload photo without an account.'; } else { echo 'No photo uploaded.'; } ?> </div> <?php } ?> </div> <?php if (!$this->is_new) { ?> <div id="photo_buttons" class="photo_buttons"> <?php if (!$this->member->isPhotoApproved()) { ?> <input type="button" id="accept_btn" value="Accept" onClick="approve_photo();" /> <?php } else { ?> <input type="button" value="Accept" disabled /> <?php } ?> <input type="button" value="Reject" onClick="reject_photo();" /> </div> <?php } ?> </td> <td> <form id="profile" method="post" onSubmit="return false;"> <table class="profile_form"> <tr> <td class="buttons_bar" colspan="2"><input type="button" onClick="save_profile();" value="Save & Update Profile" /></td> </tr> <tr> <td class="title" colspan="2">Sign In Details</td> </tr> <tr> <td class="label">Email Address:</td> <td class="field"> <?php if ($this->is_new) { ?> <input class="field" type="text" id="email_addr" value="" maxlength="50" /> <?php } else { echo $profile['email_addr']; } ?> </td> </tr> <tr> <td class="label"><label for="password">Password:</label></td> <td class="field"> <?php if ($this->is_new) { ?> <input type="button" value="Reset Password" onClick="reset_password();" disabled /> <?php } else { ?> <input type="button" value="Reset Password" onClick="reset_password();" /> <?php } ?> </td> </tr> <tr> <td class="title" colspan="2">Citizenship</td> </tr> <tr> <td class="label"><label for="citizenship">Citizen of:</label></td> <td class="field"> <?php echo $this->generate_countries($profile['citizenship'], 'citizenship'); ?> </td> </tr> <tr> <td class="title" colspan="2">Contact Details</td> </tr> <tr> <td class="label"><label for="firstname">First Name:</label></td> <td class="field"><input class="field" type="text" id="firstname" name="firstname" value="<?php echo htmlspecialchars_decode(stripslashes($profile['firstname'])); ?> " /></td> </tr> <tr> <td class="label"><label for="lastname">Last Name:</label></td> <td class="field"><input class="field" type="text" id="lastname" name="lastname" value="<?php echo htmlspecialchars_decode(stripslashes($profile['lastname'])); ?> " /></td> </tr> <tr> <td class="label"><label for="phone_num">Telephone Number:</label></td> <td class="field"><input class="field" type="text" id="phone_num" name="phone_num" value="<?php echo $profile['phone_num']; ?> " /></td> </tr> <tr> <td class="label"><label for="address">Mailing Address:</label></td> <td class="field"><textarea id="address" name="address" ><?php echo htmlspecialchars_decode(stripslashes($profile['address'])); ?> </textarea></td> </tr> <tr> <td class="label"><label for="state">State/Province/Area:</label></td> <td class="field"><input class="field" type="text" id="state" name="state" value="<?php echo $profile['state']; ?> " /></td> </tr> <tr> <td class="label"><label for="zip">Zip/Postal Code:</label></td> <td class="field"><input class="field" type="text" id="zip" name="zip" value="<?php echo $profile['zip']; ?> " /></td> </tr> <tr> <td class="label"><label for="country">Country:</label></td> <td class="field"> <?php echo $this->generate_countries($profile['country']); ?> </</td> </tr> <tr> <td class="title" colspan="2">HRM Census Form</td> </tr> <tr> <td class="label"><label for="gender">Gender:</label></td> <td class="field"> <select id="gender" name="hrm_gender"> <?php if ($this->is_new) { ?> <option value="" selected>Select One</option> <option value="" disabled> </option> <option value="male">Male</option> <option value="female">Female</option> <?php } else { ?> <option value="">Select One</option> <option value="" disabled> </option> <?php if ($profile['hrm_gender'] == 'male') { ?> <option value="male" selected>Male</option> <option value="female">Female</option> <?php } else { ?> <option value="male">Male</option> <option value="female" selected>Female</option> <?php } } ?> </select> </td> </tr> <tr> <td class="label"><label for="birthdate_month">Birthdate:</label></td> <td class="field"> <?php $birthdate = explode('-', $profile['hrm_birthdate']); echo generate_month_dropdown('birthdate_month', '', $birthdate[1]); echo generate_dropdown('birthdate_day', '', 1, 31, $birthdate[2], 2, 'Day'); ?> <input maxlength="4" style="width: 50px;" type="text" id="birthdate_year" name="birthdate_year" value="<?php echo $birthdate[0]; ?> " /> </td> </tr> <tr> <td class="label"><label for="ethnicity">Ethnicity:</label></td> <td class="field"><input class="field" type="text" id="ethnicity" name="ethnicity" value="<?php echo $profile['hrm_ethnicity']; ?> " /></td> </tr> <tr> <td class="buttons_bar" colspan="2"><input type="button" onClick="save_profile();" value="Save & Update Profile" /></td> </tr> </table> </form> </td> </tr> </table> </div> <div id="member_resumes"> <table class="buttons"> <tr> <td class="right"> <input type="button" id="upload_new_resume" name="upload_new_resume" value="Upload Resume" onClick="show_upload_resume_popup(0);" /> </td> </tr> </table> <div id="div_resumes"> <?php if (empty($profile['resumes'])) { ?> <div class="empty_results">No resumes uploaded.</div> <?php } else { $resumes_table = new HTMLTable('resumes_table', 'resumes'); $resumes_table->set(0, 0, "Modified On", '', 'header'); $resumes_table->set(0, 1, "Resume", '', 'header'); $resumes_table->set(0, 2, " ", '', 'header actions'); foreach ($profile['resumes'] as $i => $resume) { $resumes_table->set($i + 1, 0, $resume['formatted_modified_on'], '', 'cell'); $resume_link = '<a href="resume_download.php?id=' . $resume['id'] . '">' . $resume['file_name'] . '</a>'; if ($resume['is_yel_uploaded'] == '1') { $resume_link = '» ' . $resume_link; } $resumes_table->set($i + 1, 1, $resume_link, '', 'cell'); $resume_action = '<a class="no_link" onClick="update_resume(' . $resume['id'] . ');">Update</a>'; $resume_action .= ' | <a class="no_link" onClick="show_apply_job_popup(' . $resume['id'] . ', \'' . addslashes($resume['file_name']) . '\');">Submit</a>'; $resumes_table->set($i + 1, 2, $resume_action, '', 'cell actions'); } echo $resumes_table->get_html(); } ?> </div> <table class="buttons"> <tr> <td class="right"> <input type="button" id="upload_new_resume" name="upload_new_resume" value="Upload Resume" onClick="show_upload_resume_popup(0);" /> </td> </tr> </table> </div> <div id="member_career"> <div class="updated_on"> Updated on: <?php echo is_null($profile['updated_on']) ? 'New Entry' : $profile['updated_on']; ?> </div> <form id="career" method="post" onSubmit="return false;"> <table class="career_profile"> <tr> <td> <div class="buttons_bar"><input type="button" onClick="show_job_profile_popup('0');" value="Add" /></div> <div id="job_profiles"> <?php $job_profiles = $profile['job_profiles']; if (empty($job_profiles) || count($job_profiles) <= 0 || $job_profiles === false) { ?> <div class="empty_results">No job profiles found.</div> <?php } else { $job_profiles_table = new HTMLTable('job_profiles_table', 'job_profiles'); $job_profiles_table->set(0, 0, '', '', 'header small_action'); $job_profiles_table->set(0, 1, 'From', '', 'header date'); $job_profiles_table->set(0, 2, 'To', '', 'header date'); $job_profiles_table->set(0, 3, 'Employer', '', 'header'); $job_profiles_table->set(0, 4, 'Position', '', 'header'); $job_profiles_table->set(0, 5, '', '', 'header small_action'); foreach ($job_profiles as $i => $job_profile) { $job_profiles_table->set($i + 1, 0, '<a class="no_link" onClick="delete_job_profile(' . $job_profile['id'] . ')">delete</a>', '', 'cell small_action'); $job_profiles_table->set($i + 1, 1, $job_profile['formatted_work_from'], '', 'cell date'); $work_to = $job_profile['formatted_work_to']; if (is_null($work_to) || empty($work_to) || $work_to == '0000-00-00') { $work_to = 'Present'; } $job_profiles_table->set($i + 1, 2, $work_to, '', 'cell date'); $emp = htmlspecialchars_decode(stripslashes($job_profile['employer'])); $emp .= '<br/><span class="mini_spec">' . $job_profile['employer_specialization'] . '</span><br/>'; $job_profiles_table->set($i + 1, 3, $emp, '', 'cell'); $pos = htmlspecialchars_decode(stripslashes($job_profile['position_title'])); $pos .= '<br/><span class="mini_spec">reporting to</span><br/>'; $pos .= '<span class="mini_superior">' . $job_profile['position_superior_title'] . '</span>'; $job_profiles_table->set($i + 1, 4, $pos, '', 'cell'); $job_profiles_table->set($i + 1, 5, '<a class="no_link" onClick="show_job_profile_popup(' . $job_profile['id'] . ')">edit</a>', '', 'cell small_action'); } echo $job_profiles_table->get_html(); } ?> </div> </td> <td> <table class="career_form"> <tr> <td class="buttons_bar" colspan="2"> <a class="no_link" onClick="show_copy_friendly_popup();">Show Copy Friendly</a> <input type="button" onClick="save_career();" value="Save" /> </td> </tr> <tr> <td class="label"><label for="is_active_seeking_job">Seeking for a Job:</label></td> <td class="field"> <select id="is_active_seeking_job"> <?php if ($profile['is_active_seeking_job'] == '1') { ?> <option value="1" selected>Yes</option> <option value="0">No</option> <?php } else { ?> <option value="1">Yes</option> <option value="0" selected>No</option> <?php } ?> </select> </td> </tr> <tr> <td class="label"><label for="seeking">Job Responsibilities & Experiences:</label></td> <td class="field"> <textarea id="seeking"><?php echo $this->remove_br(htmlspecialchars_decode(stripslashes($profile['seeking']))); ?> </textarea></td> </tr> <tr> <td class="label"><label for="total_years">Total Years of Working Experience:</label></td> <td class="field"><input class="salary" type="text" id="total_years" value="<?php echo $profile['total_work_years']; ?> " /> years</td> </tr> <tr> <td class="label"><label for="pref_job_loc_1">Preferred Job Locations:</label></td> <td class="field"> <?php $this->generate_countries($profile['preferred_job_location_1'], 'pref_job_loc_1'); echo '<br/>'; $this->generate_countries($profile['preferred_job_location_2'], 'pref_job_loc_2'); ?> </td> </tr> <tr> <td class="label"><label for="can_travel_relocate">Willing to Travel or Relocate:</label></td> <td class="field"> <select id="can_travel_relocate"> <?php if ($profile['can_travel_relocate'] == 'Y') { ?> <option value="Y" selected>Yes</option> <option value="N">No</option> <?php } else { ?> <option value="Y">Yes</option> <option value="N" selected>No</option> <?php } ?> </select> </td> </tr> <tr> <td class="label"><label for="reason_for_leaving">Reason for leaving:</label></td> <td class="field"><textarea id="reason_for_leaving"><?php echo $this->remove_br(htmlspecialchars_decode(stripslashes($profile['reason_for_leaving']))); ?> </textarea></td> </tr> <tr> <td class="label"><label for="current_salary">Current Salary:</label></td> <td class="field"> <?php $this->generate_currencies('current_salary_currency', $profile['current_salary_currency']); ?> <br/> Basic Monthly: $ <input class="salary" type="text" id="current_salary" value="<?php echo $profile['current_salary']; ?> " /><br/> Total Annual Package: $ <input class="salary" type="text" id="current_total" value="<?php echo $profile['current_total_annual_package']; ?> " /></td> </tr> <tr> <td class="label"><label for="expected_salary">Expected Salary:</label></td> <td class="field"> <?php $this->generate_currencies('expected_salary_currency', $profile['expected_salary_currency']); ?> <br/> Basic Monthly: $ <input class="salary" type="text" id="expected_salary" value="<?php echo $profile['expected_salary']; ?> " /><br/> Total Annual Package: $ <input class="salary" type="text" id="expected_total" value="<?php echo $profile['expected_total_annual_package']; ?> " /> </td> </tr> <tr> <td class="label"><label for="notice_period">Notice Period:</label></td> <td class="field"><input class="salary" type="text" id="notice_period" value="<?php echo $profile['notice_period']; ?> " /> months</td> </tr> <tr> <td class="buttons_bar" colspan="2"> <a class="no_link" onClick="show_copy_friendly_popup();">Show Copy Friendly</a> <input type="button" onClick="save_career();" value="Save" /> </td> </tr> </table> </td> </tr> </table> </form> </div> <div id="member_notes"> <form id="notes" method="post" onSubmit="return false;"> <table class="notes_form"> <tr> <td class="title">Extra Notes/Remarks:</td> </tr> <tr> <td class="field"><textarea id="extra_notes"><?php echo htmlspecialchars_decode(stripslashes($profile['notes'])); ?> </textarea></td> </tr> <tr> <td class="buttons_bar" colspan="2"><input type="button" onClick="save_notes();" value="Save" /></td> </tr> </table> </form> </div> <div id="member_connections"> <div id="connections"> <table id="connections_table"> <tr> <td class="connections"> <table class="buttons"> <tr> <td class="right"> <input type="button" value="Add Referrer" onClick="show_add_referrers_popup();" /> </td> </tr> </table> <div id="div_referrers"> <?php if (empty($profile['referrers'])) { ?> <div class="empty_results">No referrers found.</div> <?php } else { $referrers_table = new HTMLTable('referrers_table', 'referrers'); $referrers_table->set(0, 0, "Referrer (Who referred me?)", '', 'header'); $referrers_table->set(0, 1, " ", '', 'header actions'); foreach ($profile['referrers'] as $i => $referrer) { $referrers_table->set($i + 1, 0, '<a href="member.php?member_email_addr=' . $referrer['email_addr'] . '">' . $referrer['referrer'] . '</a>', '', 'cell'); $referrers_table->set($i + 1, 1, '<a class="no_link" onClick="remove_referrer(\'' . addslashes($referrer['email_addr']) . '\');">Remove</a> | <a class="no_link" onClick="reward(\'' . addslashes($referrer['email_addr']) . '\');">Reward</a>', '', 'cell actions'); } echo $referrers_table->get_html(); } ?> </div> <table class="buttons"> <tr> <td class="right"> <input type="button" value="Add Referrer" onClick="show_add_referrers_popup();" /> </td> </tr> </table> </td> <td class="border"> </td> <td class="connections"> <table class="buttons"> <tr> <td class="right"> <input type="button" value="Add Candidate" onClick="show_add_candidates_popup();" /> </td> </tr> </table> <div id="div_referees"> <?php if (empty($profile['referees'])) { ?> <div class="empty_results">No candidates found.</div> <?php } else { $referees_table = new HTMLTable('referees_table', 'referees'); $referees_table->set(0, 0, "Candidate (I referred who?)", '', 'header'); $referees_table->set(0, 1, " ", '', 'header actions'); foreach ($profile['referees'] as $i => $referee) { $referees_table->set($i + 1, 0, '<a href="member.php?member_email_addr=' . $referee['email_addr'] . '">' . $referee['referee'] . '</a>', '', 'cell'); $referees_table->set($i + 1, 1, '<a class="no_link" onClick="remove_referee(\'' . addslashes($referee['email_addr']) . '\');">Remove</a>', '', 'cell actions'); } echo $referees_table->get_html(); } ?> </div> <table class="buttons"> <tr> <td class="right"> <input type="button" value="Add Candidate" onClick="show_add_candidates_popup();" /> </td> </tr> </table> </td> </tr> </table> </div> </div> <div id="member_applications"> <!-- table class="buttons"> <tr> <td class="right"> Filter: <select id="filter" onChange="filter_applications();"> <option value="" selected>Show All</option> <option value="" disabled> </option> <option value="not_viewed">Not Viewed Yet</option> <option value="viewed">Viewed</option> <option value="employed">Employed</option> <option value="rejected">Rejected</option> <option value="removed">Deleted</option> </select> </td> </tr> </table --> <div id="applications"> <?php if (empty($applications)) { ?> <div class="empty_results">No applications found.</div> <?php } else { $applications_table = new HTMLTable('applications_table', 'applications'); $applications_table->set(0, 0, "<a class=\"sortable\" onClick=\"sort_by('referrals', 'employer');\">Employers</a>", '', 'header'); $applications_table->set(0, 1, "<a class=\"sortable\" onClick=\"sort_by('referrals', 'jobs');\">Job</a>", '', 'header'); $applications_table->set(0, 2, "<a class=\"sortable\" onClick=\"sort_by('referrals', 'applied_on');\">Applied On</a>", '', 'header'); $applications_table->set(0, 3, 'Status', '', 'header'); $applications_table->set(0, 4, "Resume Submitted", '', 'header'); foreach ($applications as $i => $application) { $applications_table->set($i + 1, 0, $application['employer'], '', 'cell'); $applications_table->set($i + 1, 1, '<a class="no_link" onClick="show_job_desc(' . $application['job_id'] . ');">' . $application['job'] . '</a>', '', 'cell'); $applications_table->set($i + 1, 2, $application['formatted_referred_on'], '', 'cell'); $status = '<span class="not_viewed_yet">Not submitted</span>'; if ($application['tab'] == 'ref') { $status = '<span class="not_viewed_yet">Employer Not Viewed Yet</span>'; if (!is_null($application['formatted_viewed_on'])) { $status = '<span class="viewed">Viewed on:</span> ' . $application['formatted_viewed_on']; } if (!is_null($application['formatted_employed_on'])) { $status .= '<br/><span class="employed">Employed on:</span> ' . $application['formatted_employed_on']; } if (!is_null($application['formatted_confirmed_on'])) { $status .= '<br/><span class="confirmed">Confirmed on:</span> ' . $application['formatted_confirmed_on']; } } $applications_table->set($i + 1, 3, $status, '', 'cell testimony'); $applications_table->set($i + 1, 4, $application['resume'], '', 'cell'); } echo $applications_table->get_html(); } ?> </div> </div> <!-- popup windows goes here --> <div id="upload_resume_window" class="popup_window"> <div class="popup_window_title">Upload Resume</div> <form id="upload_resume_form" action="member_action.php" method="post" enctype="multipart/form-data" onSubmit="return close_upload_resume_popup(true);"> <div class="upload_resume_form"> <input type="hidden" id="resume_id" name="id" value="0" /> <input type="hidden" name="member" value="<?php echo $this->member->getId(); ?> " /> <input type="hidden" name="action" value="upload_resume" /> <div id="upload_field" class="upload_field"> <input id="my_file" name="my_file" type="file" /> <div style="font-size: 9pt; margin-top: 15px;"> <ol> <li>Only HTML (*.html, *.htm), Text (*.txt), Portable Document Format (*.pdf) or MS Word document (*.doc) with the file size of less than 1MB are allowed.</li> <li>You can upload as many resumes as you want and designate them for different job applications.</li> <li>You can update your resume by clicking "Update" then upload an updated version.</li> </ol> </div> </div> </div> <div class="popup_window_buttons_bar"> <input type="submit" value="Upload" /> <input type="button" value="Cancel" onClick="close_upload_resume_popup(false);" /> </div> </form> </div> <div id="apply_job_window" class="popup_window"> <div class="popup_window_title">Submission</div> <div id="div_resume_info" class="resume_info"> <div class="resume_desc"> <span style="font-weight: bold;"><label for="hr_contact">HR Contacts:</label></span> <span><input type="text" class="field hr_contact" id="hr_contact" value="<?php echo $this->get_hr_contacts(); ?> " /></span> </div> <div class="resume_desc"> <span style="font-weight: bold;">Resume selected:</span> <span id="resume_file_name"></span> </div> <div class="pre_selected_jobs"> <table class="pre_selected_jobs_table"> <tr> <td class="label"> <span style="font-weight: bold;">Pre-selected Jobs:</span><br/> <span style="font-size: 9pt;"> <a class="no_link" onClick="clear_pre_selected_jobs();"> (clear) </a> </span> </td> <td> <div id="pre_selected_jobs_list"> <?php echo $this->get_pre_selected_jobs(); ?> </div> </td> </tr> </table> </div> </div> <form id="apply_job_form" onSubmit="return false;"> <input type="hidden" id="apply_resume_id" name="resume_id" value="0" /> <input type="hidden" id="selected_jobs" value="<?php echo implode(',', $this->selected_jobs); ?> " /> <span style="font-weight: bold;">Additional Jobs:</span> <div id="div_apply_job_form" class="apply_job_form"> <table class="jobs_selection"> <tr> <td class="jobs_list"> <?php $employers = $this->get_employers(); if (!empty($employers) && $employers !== false) { ?> <select id="employers" onChange="filter_jobs();"> <?php foreach ($employers as $employer) { ?> <option value="<?php echo $employer['id']; ?> "><?php echo $employer['employer']; ?> </option> <?php } ?> </select> <?php } else { ?> <span class="no_employers">[No employers with opened jobs found.]</span> <?php } ?> <div id="jobs_selector"> Select an employer in the dropdown list above. </div> <div id="selected_job_counter"> <span id="counter_lbl">0</span> jobs selected. </div> </td> <td class="separator"></td> <td> <div id="job_description"> Select a job in the jobs list. </div> </td> </tr> </table> </div> <div class="referrer"> <span style="font-weight: bold;">Referrer: </span> <?php $referrers = $this->get_referrers(); if (empty($referrers) || $referrers === false) { ?> [No referrers.] <input type="hidden" id="apply_job_referrer" value="<?php echo 'team.' . strtolower($branch[0]['country']); ?> @yellowelevator.com" /> <?php } else { ?> <select id="apply_job_referrer"> <option value="">Select a Referrer</option> <option value="" disabled> </option> <?php foreach ($referrers as $referrer) { ?> <option value="<?php echo $referrer['id']; ?> "><?php echo htmlspecialchars_decode(stripslashes($referrer['member_name'])) . ' (' . $referrer['id'] . ')'; ?> </option> <?php } ?> </select> <?php } ?> </div> <div class="popup_window_buttons_bar"> <a class="no_link" onClick="show_window('message_window'); $('message').focus();">Add Message</a> <input type="button" id="apply_btn" value="Submit" onClick="close_apply_job_popup(true);" /> <input type="button" value="Cancel" onClick="close_apply_job_popup(false);" /> </div> </form> </div> <div id="message_window" class="popup_window"> <div class="popup_window_title">Additional Message to Employer</div> <div class="message_form"> <textarea class="message" id="message"></textarea> </div> <div class="popup_window_buttons_bar"> <input type="button" value="OK" onClick="close_window('message_window');" /> </div> </div> <div id="add_referrers_window" class="popup_window"> <?php $has_no_potential_referrers = false; ?> <div class="popup_window_title">Add Referrers</div> <form id="add_referrers_form" action="member_action.php" method="post"> <div class="add_referrers_form"> <br/> <?php if (empty($potential_referrers)) { $has_no_potential_referrers = true; ?> No potential referrers can be found. <br/><br/> <?php } else { ?> Select multiple potential referrers from the following list. <br/><br/> <select id="referrers" class="potentials_list" multiple> <?php foreach ($potential_referrers as $referrer) { ?> <option value="<?php echo $referrer['email_addr']; ?> "> <?php echo $referrer['member_name'] . ' (' . $referrer['email_addr'] . ')'; ?> </option> <?php } ?> </select> <?php } ?> </div> <div class="popup_window_buttons_bar"> <?php if ($has_no_potential_referrers) { ?> <input type="button" value="Add Referrers" disabled /> <?php } else { ?> <input type="button" value="Add Referrers" onClick="close_add_referrers_popup(true);" /> <?php } ?> <input type="button" value="Cancel" onClick="close_add_referrers_popup(false);" /> </div> </form> </div> <div id="add_candidates_window" class="popup_window"> <?php $has_no_potential_candidates = false; ?> <div class="popup_window_title">Add Candidate</div> <form id="add_candidates_form" action="member_action.php" method="post"> <div class="add_candidates_form"> <br/> <?php if (empty($potential_candidates)) { $has_no_potential_candidate = true; ?> No potential candidates can be found. <br/><br/> <?php } else { ?> Select multiple potential candidates from the following list. <br/><br/> <select id="candidates" class="potentials_list" multiple> <?php foreach ($potential_candidates as $candidate) { ?> <option value="<?php echo $candidate['email_addr']; ?> "> <?php echo $candidate['member_name'] . ' (' . $candidate['email_addr'] . ')'; ?> </option> <?php } ?> </select> <?php } ?> </div> <div class="popup_window_buttons_bar"> <?php if ($has_no_potential_candidates) { ?> <input type="button" value="Add Candidates" disabled /> <?php } else { ?> <input type="button" value="Add Candidates" onClick="close_add_candidates_popup(true);" /> <?php } ?> <input type="button" value="Cancel" onClick="close_add_candidates_popup(false);" /> </div> </form> </div> <div id="testimony_window" class="popup_window"> <div class="popup_window_title">Testimony</div> <div class="testimony_form"> <br/> <span id="testimony"></span> <br/><br/> </div> <div class="popup_window_buttons_bar"> <input type="button" value="Cancel" onClick="close_testimony();" /> </div> </div> <div id="job_desc_window" class="popup_window"> <div class="popup_window_title">Job Description</div> <div class="job_desc_form"> <br/> <span id="job_desc"></span> <br/><br/> </div> <div class="popup_window_buttons_bar"> <input type="button" value="Cancel" onClick="close_job_desc();" /> </div> </div> <div id="employer_remarks_window" class="popup_window"> <div class="popup_window_title">Employer Remarks</div> <div class="employer_remarks_form"> <br/> <span id="employer_remarks"></span> <br/><br/> </div> <div class="popup_window_buttons_bar"> <input type="button" value="Cancel" onClick="close_employer_remarks();" /> </div> </div> <div id="job_profile_window" class="popup_window"> <div class="popup_window_title">Job Profile</div> <form onSubmit="return false;"> <input type="hidden" id="job_profile_id" value="0" /> <div class="job_profile_form"> <table class="job_profile_form"> <tr> <td class="label"><label for="position_title">Job Title:</label></td> <td class="field"> <input class="field" type="text" id="position_title" name="position_title" /> <br/> <span class="tips">eg: Director, Manager, GM, VP, etc.</span> </td> </tr> <tr> <td class="label"><label for="position_superior_title">Reporting To:</label></td> <td class="field"> <input class="field" type="text" id="position_superior_title" name="position_superior_title" /> <br/> <span class="tips">eg: Director, Manager, GM, VP, etc.</span> </td> </tr> <tr> <td class="label"><label for="organization_size">Positions Reporting To Candidate:</label></td> <td class="field"><input class="field" type="text" id="organization_size" name="organization_size" /></td> </tr> <tr> <td class="label"><label for="work_from_month">Duration:</label></td> <td class="field"> <?php echo generate_month_dropdown('work_from_month', ''); ?> <input type="text" class="year" maxlength="4" id="work_from_year" value="yyyy" /> to <span id="work_to_dropdown"> <?php echo generate_month_dropdown('work_to_month', ''); ?> <input type="text" class="year" maxlength="4" id="work_to_year" value="yyyy" /> </span> <input type="checkbox" id="work_to_present" onClick="toggle_work_to();" /> <label for="work_to_present">Present</label> </td> </tr> <tr> <td class="label"><label for="company">Employer:</label></td> <td class="field"><input class="field" type="text" id="company" name="company" /></td> </tr> <tr> <td class="label"><label for="emp_specialization">Employer Specialization:</label></td> <td class="field"> <?php $this->generate_industries('', 'emp_specialization'); ?> </td> </tr> <tr> <td class="label"><label for="job_summary">Job Summary:</label></td> <td class="field"> <textarea id="job_summary" class="job_summary"></textarea> </td> </tr> </table> </div> </form> <div class="popup_window_buttons_bar"> <span id="job_profile_processing"> <img src="../common/images/progress/circle_small.gif" style="border: none;"/> Saving job profile. Please wait... </span> <input type="button" value="Save" onClick="close_job_profile_popup(true);" /> <input type="button" value="Cancel" onClick="close_job_profile_popup(false);" /> </div> </div> <div id="copy_friendly_window" class="popup_window"> <div class="popup_window_title">Career Summary</div> <div class="career_summary" id="summary"></div> <div class="popup_window_buttons_bar"> <input type="button" value="Close" onClick="close_copy_friendly_popup();" /> </div> </div> <?php }
public function show() { $this->begin(); $branch = $this->employee->getBranch(); $this->top('Application Status - ' . $branch[0]['country']); $this->menu_employee('status'); $applications = $this->get_applications(); $employers_filter = '<select id="employers_filter" onChange="update_applications();">'; $employers_filter .= '<option value="" selected>All Employers</option>'; $employers_filter .= '<option value="" disabled> </option>'; foreach ($this->found_employers as $key => $value) { $employers_filter .= '<option value="' . $key . '">' . $value . '</option>'; } $employers_filter .= '</select>'; ?> <div id="div_status" class="status"> <span id="span_status" class="status"></span> </div> <div class="pagination"> Page <select id="current_page" onChange="goto_page();"> <?php for ($i = 0; $i < $this->initial_total_pages; $i++) { ?> <option value="<?php echo $i; ?> "><?php echo $i + 1; ?> </option> <?php } ?> </select> of <span id="total_pages"><?php echo $this->initial_total_pages; ?> </span> </div> <div id="div_filter"> <?php $from_timestamp = explode(' ', $this->period[0]); $from_date = explode('-', $from_timestamp[0]); $month_from_dropdown = generate_month_dropdown('from_month', '', $from_date[1]); $day_from_dropdown = generate_dropdown('from_day', '', 1, 31, $from_date[2]); $to_timestamp = explode(' ', $this->period[1]); $to_date = explode('-', $to_timestamp[0]); $month_to_dropdown = generate_month_dropdown('to_month', '', $to_date[1]); $day_to_dropdown = generate_dropdown('to_day', '', 1, 31, $to_date[2]); ?> Show <select id="filter"> <option value="" selected>All</option> <option value="" disabled> </option> <option value="not_viewed">Not Viewed & applied</option> <option value="viewed">Viewed</option> <option value="employed">Employed</option> <option value="rejected">Rejected</option> <option value="removed">Deleted</option> <option value="confirmed">Confirmed & applied</option> </select> between <input type="text" class="mini_field" id="from_year" maxlength="4" value="<?php echo $from_date[0]; ?> " /> <?php echo $month_from_dropdown . ' ' . $day_from_dropdown; ?> and <input type="text" class="mini_field" id="to_year" maxlength="4" value="<?php echo $to_date[0]; ?> " /> <?php echo $month_to_dropdown . ' ' . $day_to_dropdown; ?> <input type="button" onClick="filter_applications();" value="Filter" /> </div> <div id="member_applications"> <div id="applications"> <?php if (empty($applications)) { ?> <div class="empty_results">No applications found.</div> <?php } else { $applications_table = new HTMLTable('applications_table', 'applications'); $applications_table->set(0, 0, "<a class=\"sortable\" onClick=\"sort_by('referrals', 'referrals.referred_on');\">Applied On</a>", '', 'header'); $applications_table->set(0, 1, "<a class=\"sortable\" onClick=\"sort_by('referrals', 'candidates.lastname');\">Candidate</a>", '', 'header'); $applications_table->set(0, 2, "<a class=\"sortable\" onClick=\"sort_by('referrals', 'jobs.title');\">Job</a> from " . $employers_filter, '', 'header'); $applications_table->set(0, 3, 'Status', '', 'header'); foreach ($applications as $i => $application) { $applications_table->set($i + 1, 0, $application['formatted_referred_on'], '', 'cell'); $candidate_details = '<a href="member.php?member_email_addr=' . $application['candidate'] . '">' . $application['candidate_name'] . '</a>'; $candidate_details .= '<div class="resume"><span style="font-weight: bold;">Resume:</span> <a href="resume.php?id=' . $application['resume_id'] . '">' . $application['file_name'] . '</a></div>'; $ref_email = explode('@', $application['referrer']); $ref_email_front = explode('.', $ref_email[0]); if ($ref_email_front[0] == 'team' && $ref_email[1] == 'yellowelevator.com') { $candidate_details .= '<br/><div class="referrer">Self Applied</div>'; } else { $candidate_details .= '<br/><div class="referrer"><a href="member.php?member_email_addr=' . $application['referrer'] . '">' . $application['referrer_name'] . '</a></div>'; } $applications_table->set($i + 1, 1, $candidate_details, '', 'cell'); $job_details = '<a class="no_link" onClick="show_job_desc(' . $application['job_id'] . ');">' . $application['job'] . '</a>'; $job_details .= '<br/><br/><div class="employer"><a href="employer.php?id=' . $application['employer_id'] . '">' . $application['employer'] . '</a></div>'; $applications_table->set($i + 1, 2, $job_details, '', 'cell'); $status = '<span class="not_viewed_yet">Not Viewed Yet</a>'; if (!is_null($application['formatted_employer_agreed_terms_on'])) { $status = '<span class="viewed">Viewed on:</span> ' . $application['formatted_employer_agreed_terms_on']; } if (!is_null($application['formatted_employed_on'])) { $status = '<span class="employed">Employed on:</span> ' . $application['formatted_employed_on']; } if (!is_null($application['formatted_employer_rejected_on'])) { $status = '<span class="rejected">Rejected on:</span> ' . $application['formatted_employer_rejected_on']; } if (!is_null($application['formatted_employer_removed_on'])) { $status = '<span class="removed">Deleted on:</span> ' . $application['formatted_employer_removed_on']; } if ($application['has_employer_remarks'] == '1') { $status .= '<br/><a class="no_link" onClick="show_employer_remarks(' . $application['id'] . ');">Employer Remarks</a>'; } if (!is_null($application['formatted_referee_confirmed_hired_on'])) { $status .= '<br/><span class="confirmed">Confirmed on: </span>' . $application['formatted_referee_confirmed_hired_on']; } $applications_table->set($i + 1, 3, $status, '', 'cell testimony'); // $testimony = 'None Provided'; // if ($application['has_testimony'] == '1') { // $testimony = '<a class="no_link" onClick="show_testimony('. $application['id']. ');">Show</a>'; // } // $applications_table->set($i+1, 6, $testimony, '', 'cell testimony'); } echo $applications_table->get_html(); } ?> </div> </div> <div class="pagination"> Page <select id="current_page_bottom" onChange="goto_page(true);"> <?php for ($i = 0; $i < $this->initial_total_pages; $i++) { ?> <option value="<?php echo $i; ?> "><?php echo $i + 1; ?> </option> <?php } ?> </select> of <span id="total_pages_bottom"><?php echo $this->initial_total_pages; ?> </span> </div> <!-- popup windows goes here --> <div id="testimony_window" class="popup_window"> <div class="popup_window_title">Testimony</div> <div class="testimony_form"> <br/> <span id="testimony"></span> <br/><br/> </div> <div class="popup_window_buttons_bar"> <input type="button" value="Cancel" onClick="close_testimony();" /> </div> </div> <div id="job_desc_window" class="popup_window"> <div class="popup_window_title">Job Description</div> <div class="job_desc_form"> <br/> <span id="job_desc"></span> <br/><br/> </div> <div class="popup_window_buttons_bar"> <input type="button" value="Cancel" onClick="close_job_desc();" /> </div> </div> <div id="employer_remarks_window" class="popup_window"> <div class="popup_window_title">Employer Remarks</div> <div class="employer_remarks_form"> <br/> <span id="employer_remarks"></span> <br/><br/> </div> <div class="popup_window_buttons_bar"> <input type="button" value="Cancel" onClick="close_employer_remarks();" /> </div> </div> <?php }
public function show() { $this->begin(); $branch = $this->employee->getBranch(); $this->top('Payments - ' . $branch[0]['country']); $this->menu_employee('payments'); $employers = $this->get_employers(); $receipt_employers = $this->get_employers(false); $today = now(); $invoices = $this->get_payments(); foreach ($invoices as $i => $row) { $invoices[$i]['padded_id'] = pad($row['id'], 11, '0'); $invoices[$i]['amount_payable'] = number_format($row['amount_payable'], 2, '.', ', '); $delta = sql_date_diff($today, $row['payable_by']); if ($delta > 0) { $invoices[$i]['expired'] = 'expired'; } else { if ($delta == 0) { $invoices[$i]['expired'] = 'nearly'; } else { $invoices[$i]['expired'] = 'no'; } } } $receipts = $this->get_payments(false); foreach ($receipts as $i => $row) { $receipts[$i]['padded_id'] = pad($row['id'], 11, '0'); $receipts[$i]['amount_payable'] = number_format($row['amount_payable'], 2, '.', ', '); } ?> <!-- submenu --> <div class="menu"> <ul class="menu"> <li id="item_invoices" style="background-color: #CCCCCC;"><a class="menu" onClick="show_invoices();">Invoices</a></li> <li id="item_receipts"><a class="menu" onClick="show_receipts();">Receipts</a></li> </ul> </div> <!-- end submenu --> <div id="div_status" class="status"> <span id="span_status" class="status"></span> </div> <div id="invoices"> <?php if (is_null($invoices) || count($invoices) <= 0 || $invoices === false) { ?> <div class="empty_results">No invoices issued at this moment.</div> <?php } else { ?> <div class="buttons_bar"> Employer Filter: <select id="invoices_filter" onChange="filter_invoices();"> <option value="" selected>All</option> <option value="" disabled> </option> <?php foreach ($employers as $employer) { ?> <option value="<?php echo $employer['id']; ?> "><?php echo htmlspecialchars_decode(stripslashes($employer['employer'])); ?> </option> <?php } ?> </select> </div> <div id="div_invoices"> <?php $invoices_table = new HTMLTable('invoices_table', 'invoices'); $invoices_table->set(0, 0, ' ', '', 'header expiry_status'); $invoices_table->set(0, 1, "<a class=\"sortable\" onClick=\"sort_by('invoices', 'invoices.issued_on');\">Issued On</a>", '', 'header'); $invoices_table->set(0, 2, "<a class=\"sortable\" onClick=\"sort_by('invoices', 'employers.name');\">Employer</a>", '', 'header'); $invoices_table->set(0, 3, "Placement", '', 'header'); $invoices_table->set(0, 4, "<a class=\"sortable\" onClick=\"sort_by('invoices', 'invoices.id');\">Invoice</a>", '', 'header'); $invoices_table->set(0, 5, 'Payable By', '', 'header'); $invoices_table->set(0, 6, 'Amount Payable', '', 'header'); $invoices_table->set(0, 7, 'Actions', '', 'header action'); foreach ($invoices as $i => $invoice) { $status = ''; if ($invoice['expired'] == 'expired') { $status = '<img class="warning" src="../common/images/icons/expired.png" />'; } elseif ($invoice['expired'] == 'nearly') { $status = '<img class="warning" src="../common/images/icons/just_expired.png" />'; } $invoices_table->set($i + 1, 0, $status, '', 'cell expiry_status'); $invoices_table->set($i + 1, 1, $invoice['formatted_issued_on'], '', 'cell'); $employer_contacts = htmlspecialchars_decode(stripslashes($invoice['employer'])); $employer_contacts .= '<div class="contacts">'; $employer_contacts .= '<span class="contact_label">Tel.:</span> ' . $invoice['phone_num'] . '<br/>'; $employer_contacts .= '<span class="contact_label">Fax.:</span> ' . $invoice['fax_num'] . '<br/>'; $employer_contacts .= '<span class="contact_label">E-mail:</span> <a href="mailto:' . $invoice['email_addr'] . '">' . $invoice['email_addr'] . '</a><br/>'; $employer_contacts .= '<span class="contact_label">Contact:</span> ' . $invoice['contact_person'] . '<br/></div>'; $invoices_table->set($i + 1, 2, $employer_contacts, '', 'cell'); $invoices_table->set($i + 1, 3, $invoice['placement'], '', 'cell'); $invoices_table->set($i + 1, 4, '<a class="no_link" onClick="show_invoice_page(' . $invoice['id'] . ');">' . $invoice['padded_id'] . '</a> <a href="invoice_pdf.php?id=' . $invoice['id'] . '"><img src="../common/images/icons/pdf.gif" /></a>', '', 'cell'); $invoices_table->set($i + 1, 5, $invoice['formatted_payable_by'], '', 'cell'); $amount = $invoice['currency'] . '$ ' . $invoice['amount_payable']; $invoices_table->set($i + 1, 6, $amount, '', 'cell'); $actions = '<input type="button" value="Paid" onClick="show_payment_popup(' . $invoice['id'] . ', \'' . $invoice['padded_id'] . '\');" /><input type="button" value="Resend" onClick="show_resend_popup(' . $invoice['id'] . ', \'' . $invoice['padded_id'] . '\');" />'; $invoices_table->set($i + 1, 7, $actions, '', 'cell action'); } echo $invoices_table->get_html(); ?> </div> <?php } ?> </div> <div id="receipts"> <?php if (is_null($receipts) || count($receipts) <= 0 || $receipts === false) { ?> <div class="empty_results">No receipts issued at this moment.</div> <?php } else { ?> <div class="buttons_bar"> Employer Filter: <select id="receipts_filter" onChange="filter_receipts();"> <option value="" selected>All</option> <option value="" disabled> </option> <?php foreach ($receipt_employers as $employer) { ?> <option value="<?php echo $employer['id']; ?> "><?php echo htmlspecialchars_decode(stripslashes($employer['employer'])); ?> </option> <?php } ?> </select> </div> <div id="div_receipts"> <?php $receipts_table = new HTMLTable('receipts_table', 'receipts'); $receipts_table->set(0, 0, "<a class=\"sortable\" onClick=\"sort_by('receipts', 'receipts.issued_on');\">Issued On</a>", '', 'header'); $receipts_table->set(0, 1, "<a class=\"sortable\" onClick=\"sort_by('receipts', 'employers.name');\">Employer</a>", '', 'header'); $receipts_table->set(0, 2, 'Placement', '', 'header'); $receipts_table->set(0, 3, "<a class=\"sortable\" onClick=\"sort_by('receipts', 'invoices.id');\">Receipt</a>", '', 'header'); $receipts_table->set(0, 4, 'Paid On', '', 'header'); $receipts_table->set(0, 5, 'Amount Paid', '', 'header'); $receipts_table->set(0, 6, 'Payment', '', 'header payment'); foreach ($receipts as $i => $receipt) { $receipts_table->set($i + 1, 0, $receipt['formatted_issued_on'], '', 'cell'); $receipts_table->set($i + 1, 1, htmlspecialchars_decode(stripslashes($receipt['employer'])), '', 'cell'); $receipts_table->set($i + 1, 2, $receipt['placement'], '', 'cell'); $receipts_table->set($i + 1, 3, '<a class="no_link" onClick="show_receipt_page(' . $receipt['id'] . ');">' . $receipt['padded_id'] . '</a> <a href="invoice_pdf.php?id=' . $receipt['id'] . '"><img src="../common/images/icons/pdf.gif" /></a>', '', 'cell'); $receipts_table->set($i + 1, 4, $receipt['formatted_paid_on'], '', 'cell'); $amount = $receipt['currency'] . '$ ' . $receipt['amount_payable']; $receipts_table->set($i + 1, 5, $amount, '', 'cell'); $payment = 'By Cash'; if ($receipt['paid_through'] != 'CSH') { $payment = 'Bank Receipt #:<br/>' . $receipt['paid_id']; } $receipts_table->set($i + 1, 6, $payment, '', 'cell payment'); } echo $receipts_table->get_html(); ?> </div> <?php } ?> </div> <!-- popup windows goes here --> <div id="paid_window" class="popup_window"> <div class="popup_window_title">Confirm Payment</div> <form onSubmit="return false;"> <input type="hidden" id="invoice_id" value="" /> <div class="paid_form"> <table class="paid_form"> <tr> <td class="label">Invoice:</td> <td class="field"><span id="lbl_invoice"></span></td> </tr> <tr> <td class="label">Paid On:</td> <td class="field"> <?php echo generate_dropdown('day', 'day', 1, 31, '', 2, 'Day'); echo generate_month_dropdown('month', 'month', 'Month'); $today = explode('-', today()); $year = $today[0]; echo generate_dropdown('year', 'year', $year - 1, $year, '', 4, 'Year'); ?> </td> </tr> <tr> <td class="label">Payment Mode:</td> <td class="field"> <select class="field" id="payment_mode" name="payment_mode"> <option value="CSH">Cash</option> <option value="IBT">Bank Transfer</option> <option value="CHQ">Cheque</option> </select> </td> </tr> <tr> <td class="label">Bank Receipt #:</td> <td class="field"><input type="text" class="field" id="payment_number" name="payment_number" /></td> </tr> </table> </div> </form> <div class="popup_window_buttons_bar"> <input type="button" value="Cancel" onClick="close_payment_popup(false);" /> <input type="button" value="Confirm" onClick="close_payment_popup(true);" /> </div> </div> <div id="resend_window" class="popup_window"> <div class="popup_window_title">Resend Invoice <span id="lbl_resend_invoice"></span></div> <div class="employer_details"> <span style="font-weight: bold;">Employer: </span> <span id="employer_name"></span> <br/> <span style="font-weight: bold;">Contact Person: </span> <span id="contact_person"></span> </div> <form onSubmit="return false;"> <input type="hidden" id="resend_invoice_id" value="" /> <div class="resend_form"> <span style="font-weight: bold;">Recipients: </span>(separated by commas)<br/> <textarea id="recipients" class="recipients"></textarea> </div> </form> <div class="popup_window_buttons_bar"> <input type="button" value="Cancel" onClick="close_resend_popup(false);" /> <input type="button" value="Resend" onClick="close_resend_popup(true);" /> </div> </div> <?php }
public function show($_session) { $this->begin(); $this->top("Sign Up"); $page = file_get_contents(dirname(__FILE__) . '/../../../html/member_sign_up_page.html'); $page = str_replace('%root%', $this->url_root, $page); $page = str_replace('%work_from_month%', generate_month_dropdown('work_from_month', ''), $page); $page = str_replace('%work_to_month%', generate_month_dropdown('work_to_month', ''), $page); $page = str_replace('%emp_desc%', $this->generate_employer_description('emp_desc', -1), $page); $page = str_replace('%industries%', $this->generate_industries('emp_specialization', array()), $page); $page = str_replace('%birthdate_day%', generate_dropdown('birthdate_day', '', 1, 31, '', 2, 'Day'), $page); $page = str_replace('%birthdate_month%', generate_month_dropdown('birthdate_month', '', 'Month'), $page); echo $page; }
public function show() { $this->begin(); $this->support($this->employer->getId()); $this->top('Resumes'); $this->menu('employer', 'resumes'); $branch = $this->employer->getAssociatedBranch(); $currency = $branch[0]['currency']; $referred_jobs = $this->get_referred_jobs(); if ($referred_jobs === false || is_null($referred_jobs) || empty($referred_jobs)) { $referred_jobs = array(); } ?> <div id="div_status" class="status"> <span id="span_status" class="status"></span> </div> <div id="div_referred_jobs"> <?php if (empty($referred_jobs)) { ?> <div class="empty_results">No applications found for all job posts at this moment.</div> <?php } else { $jobs_table = new HTMLTable('referred_jobs_table', 'referred_jobs'); $jobs_table->set(0, 0, "<a class=\"sortable\" onClick=\"sort_by('referred_jobs', 'jobs.expire_on');\">Expire On</a>", '', 'header'); $jobs_table->set(0, 1, "<a class=\"sortable\" onClick=\"sort_by('referred_jobs', 'jobs.title');\">Job</a>", '', 'header'); $jobs_table->set(0, 2, "<a class=\"sortable\" onClick=\"sort_by('referred_jobs', 'num_referrals');\">Resumes</a>", '', 'header'); foreach ($referred_jobs as $i => $referred_job) { $jobs_table->set($i + 1, 0, $referred_job['formatted_expire_on'], '', 'cell'); $job_title = "<a class=\"no_link\" onClick=\"toggle_job_description('" . $i . "');\">" . $referred_job['title'] . "</a>"; $job_title .= "<div id=\"inline_job_desc_" . $i . "\" class=\"inline_job_desc\">" . $referred_job['description'] . "</div>"; $jobs_table->set($i + 1, 1, $job_title, '', 'cell'); $resumes = "<a class=\"no_link\" onClick=\"show_resumes_of('" . $referred_job['id'] . "', '" . addslashes($referred_job['title']) . "');\">" . $referred_job['num_referrals']; if ($referred_job['new_referrals_count'] > 0) { $resumes .= " <span style=\"vertical-align: top; font-size: 7pt;\">[ " . $referred_job['new_referrals_count'] . " new ]</span>"; } $resumes .= "</a>"; $jobs_table->set($i + 1, 2, $resumes, '', 'cell resumes_column'); } echo $jobs_table->get_html(); } ?> </div> <div id="div_resumes"> <div class="resumes_top"> <span class="back"> <a class="no_link" onClick="show_referred_jobs();"><< Back to Jobs</a> </span> <br/> <div class="job_title"> <span id="job_title"></span> </div> </div> <div style="width: 99%; margin: auto; text-align: right;"> Show <select id="filter" onChange="show_resumes_of(current_job_id, current_job_title);"> <option value="" selected>All</option> <option value="" disabled> </option> <option value="no_star">No Star</option> <option value="1_star">1 Star</option> <option value="2_star">2 Stars</option> <option value="3_star">3 Stars</option> <option value="4_star">4 Stars</option> <option value="5_star">5 Stars</option> <option value="hired">Hired</option> </select> </div> <div id="resumes_list"> </div> </div> <!-- popups goes here --> <div id="job_description_window" class="popup_window"> <div id="window_job_title" class="popup_window_title"></div> <div id="window_description"></div> <div class="popup_window_buttons_bar"><input type="button" value="Close" onClick="close_job_description_popup();" /></div> </div> <div id="testimony_window" class="popup_window"> <input type="hidden" id="referral_id" value="0" /> <div id="window_testimony_candidate" class="popup_window_title"></div> <div id="window_testimony"></div> <div class="popup_window_buttons_bar"> <div class="instructions_label"> (Tip: Drag and select all to copy by pressing Ctrl + C or Command + C.) </div> <input type="button" value="Download PDF" onClick="download_testimony_pdf();" /> <input type="button" value="Close" onClick="close_testimony_popup();" /> </div> </div> <div id="remarks_window" class="popup_window"> <div id="window_remarks_candidate" class="popup_window_title"></div> <textarea id="txt_remarks" class="txt_remarks"></textarea> <div class="popup_window_buttons_bar"> <input type="hidden" id="remarks_referral_id" value="0" /> <input type="hidden" id="remarks_candidate_idx" value="-1" /> <input type="button" value="Save & Close" onClick="close_remarks_popup(true);" /> <input type="button" value="Close" onClick="close_remarks_popup(false);" /> </div> </div> <div id="notify_window" class="popup_window"> <div id="window_notify_consultant" class="popup_window_title"></div> <div class="message_options"> Choose a request to send, and enter any further communications below.<br/><br/> <input type="radio" name="message" id="full_resume" checked /><label for="full_resume">Need full resume. <input type="radio" name="message" id="others" /><label for="others">Others. <br/><br/> </div> <textarea id="txt_message" class="txt_message"></textarea> <table class="reply_to_area"> <tr> <td style="width: 25%;">Send To Consultant:</td> <td><span id="employee_name"></span> (<span id="employee_email"></span>)</td> </tr> <tr> <td style="width: 25%;">Reply To Email:</td> <td> <input type="text" class="field" id="reply_to" value="" /><br/> <span style="font-size: 7pt; color: #666666;">Tip: If this is left empty, the default email will be used for your consultant to reply to.</span> </td> </tr> </table> <div class="popup_window_buttons_bar"> <input type="hidden" id="notify_referral_id" value="0" /> <input type="hidden" id="notify_candidate_idx" value="-1" /> <input type="button" value="Send E-mail & Close" onClick="close_notify_popup(true);" /> <input type="button" value="Close" onClick="close_notify_popup(false);" /> </div> </div> <div id="employment_window" class="popup_window"> <div id="window_employment_title" class="popup_window_title"></div> <div class="employment_form"> <table class="employment_form_table"> <tr> <td class="label">Work Commencement:</td> <td class="field"> <?php $today = date('Y-m-d'); $date_components = explode('-', $today); $year = $date_components[0]; $month = $date_components[1]; $day = $date_components[2]; echo generate_dropdown('day', '', 1, 31, $day, 2, 'Day'); echo generate_month_dropdown('month', '', $month); echo '<span id="year_label">' . $year . '</span>' . "\n"; ?> </td> </tr> <tr> <td class="label">Annual Salary:</td> <td class="field"><span id="currency"><?php echo $currency; ?> </span>$ <input type="text" class="salary_field" id="salary" name="salary" value="1.00" /></td> </tr> </table> </div> <div class="popup_window_buttons_bar"> <input type="hidden" id="employment_referral_id" value="0" /> <input type="hidden" id="employment_candidate_idx" value="-1" /> <input type="button" value="Confirm & Close" onClick="close_employment_popup(true);" /> <input type="button" value="Close" onClick="close_employment_popup(false);" /> </div> </div> <?php }