query($mysqli_query) ; $job_position_desc = '' ; if ( $mysqli_position->num_rows > 0 ){ $row_position = $mysqli_position->fetch_assoc() ; $job_position_desc = $row_position['job_position_desc'] ; } $mysqli_query = "SELECT * FROM branch WHERE deleted_at IS NULL AND branch_id = '".$row_page['employment_branch']."' LIMIT 1" ; $mysqli_branch = $mysqli->query($mysqli_query) ; $branch_name = '' ; $branch_hr_email = '' ; $branch_hr_cc = [] ; $branch_email_footer = '' ; if ( $mysqli_branch->num_rows > 0 ){ $row_branch = $mysqli_branch->fetch_assoc() ; $branch_name = dataFilter( $row_branch['branch_name'] ) ; $branch_hr_email = dataFilter( $row_branch['branch_hr_email'] ) ; $branch_hr_cc = explodeToArray( $row_branch['branch_hr_cc'] ) ; $branch_email_footer = entityDecode( dataFilter( $row_branch['branch_email_footer'] ) ) ; } $mail_type = escapeString( $_GET['mail_type'] ) ; $hod = base64_decode(escapeString( $_GET['hod'])) ; $attach = base64_decode(escapeString( $_GET['attach'])); if ( $hod != '' ) { $temp_emailcc = explode(",", str_replace(" ","",$hod)); foreach ($temp_emailcc as $key => $value) { if ( filter_var($value, FILTER_VALIDATE_EMAIL) ) { array_push($branch_hr_cc, $value); } } } if ( $attach != '' ) { $link_attach_resume = 'Candidate\'s Resume' ; } $link = PATH.'hr-employment-schedule-interview-date.php?page='.$page.'&branch='.$row_page['branch'].'&sign='.md5( $page.$row_page['branch'].APIKEY) ; $link_reschedule = ''.$link.'' ; switch ( $mail_type ){ case 'interview' : $title = "Invitation For Interview" ; $content = "
Dear ".strtoupper($row_page['employment_name']).",
Thank you for your application regarding the position of ".$job_position_desc." at ".$branch_name.".
We are impressed with your qualifications and would like to meet with you to have a round of discussion. You are advised to attend for the interview on ".date('Y-m-d H:i', strtotime($row_page['employment_interview_date']))." at our office.
If you have any queries, please feel free to contact the office. We look forward to meet you soon at our office.
Please Note That:
1) This is an interview call for the job applied and does not guarantee employment with us.
2) No TA / DA will be provided to candidates appearing for the interview.
3) Bring this letter with you on the above-mentioned date and time of the interview.
4) Bring photocopies and originals of your academic & other credentials along with a recent snap.
Reschedule Interview Date (If you are inconvenience with the date provided):
".$link_reschedule."
*Please revert back to this email to confirm for your interview attendance.
" . $branch_email_footer ; break ; case 'reschedule' : $title = "Reschedule for Interview Date" ; $content = " "; if ( $attach != '' ) { $content.=" "; } $content.="
Dear ".strtoupper($row_page['employment_name']).",
After discussion and consideration, we would like to inform you that your interview was rescheduled and will be held on ".($row_page['employment_r_interview_date'] == '0000-00-00 00:00:00' ? date('Y-m-d H:i', strtotime($row_page['employment_interview_date'])) : date('Y-m-d H:i', strtotime($row_page['employment_r_interview_date'])) )." at our office.
If you have any queries, please feel free to contact the office. We look forward to meet you soon at our office.
Please Note That:
1) This is an interview call for the job applied and does not guarantee employment with us.
2) No TA / DA will be provided to candidates appearing for the interview.
3) Bring this letter with you on the above-mentioned date and time of the interview.
4) Bring photocopies and originals of your academic & other credentials along with a recent snap.
Reschedule Interview Date (If you are inconvenience with the date provided):
".$link_reschedule."
Attachment:
".$link_attach_resume."
*This is a system generated email. Please do not reply to it.
" . $branch_email_footer ; break ; case 'offer_letter' : $title = "Offer Letter" ; $link_offer_letter = ''.PATH.'employment_document.php?id='.$page.'&doctype=offer_letter&branch='.$_SESSION['url_get_branch_admin'].'' ; $link_agreement = ''.PATH.'employment_document.php?id='.$page.'&doctype=ieagreement&branch='.$_SESSION['url_get_branch_admin'].'' ; $link_sign_form = ''.PATH.'employment_document.php?id='.$page.'&doctype=sign_form&branch='.$_SESSION['url_get_branch_admin'].'' ; $content = " "; if ( $offer_status['sent_ol_date'] != '' && $offer_status['sent_ol'] == 'OLA' ){ $content.=" " ; } $content.= "
Dear ".strtoupper($row_page['employment_name']).",
Congratulations! We would like to inform you that your application of ".$job_position_desc." at ".$branch_name." had been approved. Please read the offer letter provided and sign the form provided below to confirm the offer.
If you have any queries, please feel free to contact the office. We look forward to meet you soon at our office.
Attachment:
Official Offer Letter:
".$link_offer_letter."
Individual Employment Agreement
".$link_agreement."
Offer Letter Form (Signed for Confirmation):
".$link_sign_form."
*This is a system generated email. Please do not reply to it.
" . $branch_email_footer ; break ; case 'reject' : $title = "Reject Applicant Interview" ; $content = "
Dear ".ucwords($row_page['employment_name']).",
Thank you for applying to the job opening at ".$branch_name.". After carefully reviewing your qualifications, we have decided to pursue other candidates whom we feel more closely meeting our needs at this time.
We appreciate your interest in our company and the time it took to apply with us. Please feel free to apply for open positions with us in the future.
Again, thank you for considering us as a potential employer. We wish you success in your career pursuit.
" . $branch_email_footer ; break ; } $mailer = new Mailer() ; $mailer->from = $branch_hr_email ; $mailer->fromname = COMPANY ; $mailer->to = [ $row_page['employment_email'] ] ; if ( count($branch_hr_cc) > 0 ){ $mailer->cc = $branch_hr_cc ; } $mailer->subject = $title ; $mailer->body = $content ; $mailer->send() ; echo '' ; echo '' ; ?>