0) { $jobseeker_i_industry = $lang[lang_value_any]; } else { $tmp_industry = explode("-", $jobseeker_i_industry); $tmp_industry_text = ""; for ($i=0; $i<=sizeof($tmp_industry); $i++) { $cur_industry = $tmp_industry[$i]; if ($cur_industry) { $sql_query = "SELECT * FROM setup_industry WHERE industry_id = '$cur_industry'"; $result = mysql_query($sql_query) or die(mysql_error()); $row = mysql_fetch_array($result); $industry_name = $row[industry_name]; if ($industry_name) { $tmp_industry_text .= "$industry_name
"; } } } $jobseeker_i_industry = $tmp_industry_text; } if (strpos($jobseeker_i_jobfunction, "-0-") > 0) { $jobseeker_i_jobfunction = $lang[lang_value_any]; } else { $tmp_jobfunction = explode("-", $jobseeker_i_jobfunction); $tmp_jobfunction_text = ""; for ($i=0; $i<=sizeof($tmp_jobfunction); $i++) { $cur_jobfunction = $tmp_jobfunction[$i]; if ($cur_jobfunction) { $sql_query = "SELECT * FROM setup_jobfunction WHERE jobfunction_id = '$cur_jobfunction'"; $result = mysql_query($sql_query) or die(mysql_error()); $row = mysql_fetch_array($result); $jobfunction_path = translate_path($row[jobfunction_path]); $jobfunction_path = substr($jobfunction_path, 0, strlen($jobfunction_path) - 9); if ($jobfunction_path) { $tmp_jobfunction_text .= "$jobfunction_path
"; } } } $jobseeker_i_jobfunction = $tmp_jobfunction_text; } $tmp_term = explode("-", $jobseeker_i_employmentterm); $tmp_term_text = ""; for ($i=0; $i<=sizeof($tmp_term); $i++) { $cur_term = $tmp_term[$i]; if ($cur_term) { $sql_query = "SELECT * FROM setup_term WHERE term_id = '$cur_term'"; $result = mysql_query($sql_query) or die(mysql_error()); $row = mysql_fetch_array($result); $term_name = $row[term_name]; if ($term_name) { $tmp_term_text .= "$term_name , "; } } } $jobseeker_i_employmentterm = substr($tmp_term_text, 0, strlen($text_term) - 3); if (strpos($jobseeker_i_joblocation, "-0-") > 0) { $jobseeker_i_joblocation = $lang[lang_value_any]; } else { $tmp_joblocation = explode("-", $jobseeker_i_joblocation); $tmp_joblocation_text = ""; for ($i=0; $i<=sizeof($tmp_joblocation); $i++) { $cur_joblocation = $tmp_joblocation[$i]; if ($cur_joblocation) { $sql_query = "SELECT * FROM setup_joblocation WHERE joblocation_id = '$cur_joblocation'"; $result = mysql_query($sql_query) or die(mysql_error()); $row = mysql_fetch_array($result); $joblocation_name = $row[joblocation_name]; if ($joblocation_name) { $tmp_joblocation_text .= "$joblocation_name
"; } } } $jobseeker_i_joblocation = $tmp_joblocation_text; } // get main photo ... $sql_query = "SELECT * FROM jobseeker_photo WHERE photo_main = 'yes' AND photo_jobseeker = '$jobseeker_id' AND photo_status = 'approved'"; $result = mysql_query($sql_query) or die(mysql_error()); $row = mysql_fetch_array($result); $jobseeker_photo_found = mysql_num_rows($result); $jobseeker_photo_id = $row[photo_id]; // get education history ... $i = 0; $sql_query = " SELECT * FROM jobseeker_education WHERE education_jobseeker = '$jobseeker_id' AND education_start != '' AND education_end != '' AND education_school != '' ORDER BY education_start ASC "; $result = mysql_query($sql_query) or die(mysql_error()); $education = mysql_num_rows($result); while ($row = mysql_fetch_array($result)) { if ($i % 2 == 1) { $bg_color = "FFFFFF"; } else { $bg_color = "EAF2FF"; } $jobseeker_e_id = $row[education_id]; $jobseeker_e_year_start = $row[education_start]; $jobseeker_e_year_end = $row[education_end]; $jobseeker_e_school = $row[education_school]; $jobseeker_e_qualification = $row[education_qualification]; $jobseeker_e_major = $row[education_major]; $jobseeker_e_gpa = $row[education_gpa]; $arr_jobseeker_e_id[$i] = $jobseeker_e_id; $arr_jobseeker_e_year_start[$i] = $jobseeker_e_year_start; $arr_jobseeker_e_year_end[$i] = $jobseeker_e_year_end; $arr_jobseeker_e_school[$i] = $jobseeker_e_school; $arr_jobseeker_e_qualification[$i] = $jobseeker_e_qualification; $arr_jobseeker_e_major[$i] = $jobseeker_e_major; $arr_jobseeker_e_gpa[$i] = $jobseeker_e_gpa; $i++; } // get skill levels ... $sql_query = "SELECT * FROM setup_skilllevel"; $result_tmp = mysql_query($sql_query) or die(mysql_error()); while ($row_tmp = mysql_fetch_array($result_tmp)) { $skilllevel_id = $row_tmp[skilllevel_id]; $skilllevel_name = $row_tmp[skilllevel_name]; $arr_skill_id[$skilllevel_id] = $skilllevel_name; } // get language skills ... $i = 0; $sql_query = " SELECT * FROM jobseeker_language, setup_skilllanguage WHERE language_jobseeker = '$jobseeker_id' AND language_name = skilllanguage_id ORDER BY language_id ASC "; $result = mysql_query($sql_query) or die(mysql_error()); $language = mysql_num_rows($result); while ($row = mysql_fetch_array($result)) { if ($i % 2 == 1) { $bg_color = "FFFFFF"; } else { $bg_color = "EAF2FF"; } $jobseeker_l_id = $row[language_id]; $jobseeker_l_name = $row[skilllanguage_name]; $jobseeker_l_reading = $row[language_reading]; $jobseeker_l_writting = $row[language_writting]; $jobseeker_l_speaking = $row[language_speaking]; $jobseeker_l_listening = $row[language_listening]; $jobseeker_l_reading = $arr_skill_id[$jobseeker_l_reading]; $jobseeker_l_writting = $arr_skill_id[$jobseeker_l_writting]; $jobseeker_l_speaking = $arr_skill_id[$jobseeker_l_speaking]; $jobseeker_l_listening = $arr_skill_id[$jobseeker_l_listening]; $arr_jobseeker_l_id[$i] = $jobseeker_l_id; $arr_jobseeker_l_name[$i] = $jobseeker_l_name; $arr_jobseeker_l_reading[$i] = $jobseeker_l_reading; $arr_jobseeker_l_writting[$i] = $jobseeker_l_writting; $arr_jobseeker_l_speaking[$i] = $jobseeker_l_speaking; $arr_jobseeker_l_listening[$i] = $jobseeker_l_listening; $i++; } // get technical skills ... $i = 0; $sql_query = " SELECT * FROM jobseeker_technical , setup_skillcomputer WHERE technical_jobseeker = '$jobseeker_id' AND technical_skill = skillcomputer_id ORDER BY technical_id ASC "; $result = mysql_query($sql_query) or die(mysql_error()); $computer = mysql_num_rows($result); while ($row = mysql_fetch_array($result)) { if ($i % 2 == 1) { $bg_color = "FFFFFF"; } else { $bg_color = "EAF2FF"; } $jobseeker_t_id = $row[technical_id]; $jobseeker_t_skill = $row[skillcomputer_name]; $jobseeker_t_exp = $row[technical_exp]; $jobseeker_t_level = $row[technical_level]; $jobseeker_t_level = $arr_skill_id[$jobseeker_t_level]; if (!$jobseeker_t_exp) { $jobseeker_t_exp = 0; } $arr_jobseeker_t_id[$i] = $jobseeker_t_id; $arr_jobseeker_t_skill[$i] = $jobseeker_t_skill; $arr_jobseeker_t_exp[$i] = $jobseeker_t_exp; $arr_jobseeker_t_level[$i] = $jobseeker_t_level; $i++; } // get other skills ... $i = 0; $sql_query = " SELECT * FROM jobseeker_other , setup_skillother WHERE other_jobseeker = '$jobseeker_id' AND other_skill = skillother_id ORDER BY other_id ASC "; $result = mysql_query($sql_query) or die(mysql_error()); $other = mysql_num_rows($result); while ($row = mysql_fetch_array($result)) { if ($i % 2 == 1) { $bg_color = "FFFFFF"; } else { $bg_color = "EAF2FF"; } $jobseeker_o_id = $row[other_id]; $jobseeker_o_skill = $row[skillother_name]; $jobseeker_o_exp = $row[other_exp]; $jobseeker_o_level = $row[other_level]; $jobseeker_o_level = $arr_skill_id[$jobseeker_o_level]; if (!$jobseeker_o_exp) { $jobseeker_o_exp = 0; } $arr_jobseeker_o_id[$i] = $jobseeker_o_id; $arr_jobseeker_o_skill[$i] = $jobseeker_o_skill; $arr_jobseeker_o_exp[$i] = $jobseeker_o_exp; $arr_jobseeker_o_level[$i] = $jobseeker_o_level; $i++; } // get work history ... $sql_query = "SELECT * FROM jobseeker_workhistory WHERE history_jobseeker = '$jobseeker_id' ORDER BY history_end_present DESC, history_end DESC"; $result = mysql_query($sql_query) or die(mysql_error()); while($row = mysql_fetch_array($result)) { if ( $i % 2 == 1 ) { $bg_color = "FFFFFF"; } else { $bg_color = "EAF2FF"; } $history_id = $row[history_id]; $history_jobseeker = $row[history_jobseeker]; $history_start = $row[history_start]; $history_end = $row[history_end]; $history_end_present = $row[history_end_present]; $history_company = $row[history_company]; $history_company2 = str_replace("'", "\'", $history_company); $history_industry = $row[history_industry]; $history_jobfunction = $row[history_jobfunction]; $history_position = $row[history_position]; $history_salary = $row[history_salary]; $history_salary = "$currency_symbol " . number_format($history_salary, 2, $web_decimal_separator, $web_thousand_separator); $history_achievement = $row[history_achievement]; $sql_query = "SELECT * FROM setup_jobfunction WHERE jobfunction_id = '$history_jobfunction'"; $result_tmp = mysql_query($sql_query) or die(mysql_error()); $row_tmp = mysql_fetch_array($result_tmp); $history_jobfunction = $row_tmp[jobfunction_name]; $sql_query = "SELECT * FROM setup_industry WHERE industry_id = '$history_industry'"; $result_tmp = mysql_query($sql_query) or die(mysql_error()); $row_tmp = mysql_fetch_array($result_tmp); $history_industry = $row_tmp[industry_name]; $history_start = str_replace(" 00:00:00", "", $history_start); list ($yy, $mm, $dd) = split("-", $history_start); $history_start_month = $setup_monthname[$mm * 1]; $history_start_year = $yy; $history_start = "$history_start_month $history_start_year"; $history_end = str_replace(" 00:00:00", "", $history_end); list ($yy, $mm, $dd) = split("-", $history_end); $history_end_month = $setup_monthname[$mm * 1]; $history_end_year = $yy; $history_end = "$history_end_month $history_end_year"; if ($history_end_present == "Y") { $history_end = $lang[lang_jobseeker_resume5_form_field_period_present]; } $arr_jobseeker_o_id[$i] = $jobseeker_o_id; $arr_jobseeker_o_skill[$i] = $jobseeker_o_skill; $arr_jobseeker_o_exp[$i] = $jobseeker_o_exp; $arr_jobseeker_o_level[$i] = $jobseeker_o_level; $i++; } $i = 0; $sql_query = "SELECT * FROM jobseeker_workhistory WHERE history_jobseeker = '$jobseeker_id' ORDER BY history_end_present DESC, history_end DESC"; $result = mysql_query($sql_query) or die(mysql_error()); $history = mysql_num_rows($result); while($row = mysql_fetch_array($result)) { if ($i % 2 == 0) { $bgcolor = "#EAF8FE"; } else { $bgcolor = "#FFFFFF"; } $history_id = $row[history_id]; $history_jobseeker = $row[history_jobseeker]; $history_start = $row[history_start]; $history_end = $row[history_end]; $history_end_present = $row[history_end_present]; $history_company = $row[history_company]; $history_company2 = str_replace("'", "\'", $history_company); $history_industry = $row[history_industry]; $history_jobfunction = $row[history_jobfunction]; $history_position = $row[history_position]; $history_salary = $row[history_salary]; $history_salary = "$currency_symbol " . number_format($history_salary, 2, $web_decimal_separator, $web_thousand_separator); $history_achievement = $row[history_achievement]; $sql_query = "SELECT * FROM setup_jobfunction WHERE jobfunction_id = '$history_jobfunction'"; $result_tmp = mysql_query($sql_query) or die(mysql_error()); $row_tmp = mysql_fetch_array($result_tmp); $history_jobfunction = $row_tmp[jobfunction_name]; $sql_query = "SELECT * FROM setup_industry WHERE industry_id = '$history_industry'"; $result_tmp = mysql_query($sql_query) or die(mysql_error()); $row_tmp = mysql_fetch_array($result_tmp); $history_industry = $row_tmp[industry_name]; $history_start = str_replace(" 00:00:00", "", $history_start); list ($yy, $mm, $dd) = split("-", $history_start); $history_start_month = $setup_monthname[$mm * 1]; $history_start_year = $yy; $history_start = "$history_start_month $history_start_year"; $history_end = str_replace(" 00:00:00", "", $history_end); list ($yy, $mm, $dd) = split("-", $history_end); $history_end_month = $setup_monthname[$mm * 1]; $history_end_year = $yy; $history_end = "$history_end_month $history_end_year"; if($history_end_present == "Y") { $history_end = $lang[lang_jobseeker_resume5_form_field_period_present]; } $arr_history_bgcolor[$i] = $bgcolor; $arr_history_id[$i] = $history_id; $arr_history_start[$i] = $history_start; $arr_history_end[$i] = $history_end; $arr_history_company[$i] = $history_company; $arr_history_company2[$i] = $history_company2; $arr_history_industry[$i] = $history_industry; $arr_history_jobfunction[$i] = $history_jobfunction; $arr_history_position[$i] = $history_position; $arr_history_salary[$i] = $history_salary; $arr_history_achievement[$i] = $history_achievement; $i++; } // get all photo ... $trow = 0; $sql_query = "SELECT * FROM jobseeker_photo WHERE photo_jobseeker = '$jobseeker_id' AND photo_status = 'approved'"; $result = mysql_query($sql_query) or die(mysql_error()); $photo_found = mysql_num_rows($result); while ($row = mysql_fetch_array($result)) { $photo_id = $row[photo_id]; $photo_number = $photo_id + $start_photo; $photo_main = $row[photo_main]; $arr_photo_row_id[$trow] = $photo_id; $arr_photo_row_number[$trow] = $photo_number; $arr_photo_row_main[$trow] = $photo_main; for ($tcol=0; $tcol<=3; $tcol++) { if ($row = mysql_fetch_array($result)) { $photo_id = $row[photo_id]; $photo_number = $photo_id + $start_photo; $photo_main = $row[photo_main]; $arr_photo_col_id[$trow][$tcol] = $photo_id; $arr_photo_col_number[$trow][$tcol] = $photo_number; $arr_photo_col_main[$trow][$tcol] = $photo_main; } // end if } // end for $trow++; } // get previous and next urls ... $sql_query = "SELECT * FROM job_application WHERE application_job = '$job' AND application_jobseeker = '$jobseeker'"; $result = mysql_query($sql_query) or die(mysql_error()); $row = mysql_fetch_array($result); $id_current = $row[application_id]; $sql_query = "SELECT * FROM job_application WHERE application_job = '$job' AND application_id < '$id_current' ORDER BY application_id DESC"; $result = mysql_query($sql_query) or die(mysql_error()); $found_next = mysql_num_rows($result); $row = mysql_fetch_array($result); $id_next = $row[application_jobseeker]; $sql_query = "SELECT * FROM job_application WHERE application_job = '$job' AND application_id > '$id_current' ORDER BY application_id ASC"; $result = mysql_query($sql_query) or die(mysql_error()); $found_previous = mysql_num_rows($result); $row = mysql_fetch_array($result); $id_previous = $row[application_jobseeker]; // determine the successfull job destination page ... $destination = "jobseeker_matches.php"; if ($employer_type == "listing" && $job_package_price > 0) { $destination = "jobseeker_matches.php"; } // get employer email ... $sql_query = "SELECT * FROM employer WHERE employer_id = '$job_employer'"; $result = mysql_query($sql_query) or die(mysql_error()); $row = mysql_fetch_array($result); $employer_firstname = $row[employer_firstname]; $employer_lastname = $row[employer_lastname]; $employer_email = $row[employer_email]; // send email job_new ... // send email job_approved ... if ($status_email_document_new == "yes") { $document_number = $document_id + $start_document; $message_content = $content_document_new; $message_content = str_replace("[employer_firstname]" , $employer_firstname , $message_content); $message_content = str_replace("[employer_lastname]" , $employer_lastname , $message_content); $message_content = str_replace("[job_id]" , $job_number , $message_content); $message_content = str_replace("[job_title]" , $job_title , $message_content); $message_content = str_replace("[jobseeker_id]" , $jobseeker_id , $message_content); $message_content = str_replace("[jobseeker_firstname]" , $jobseeker_firstname , $message_content); $message_content = str_replace("[jobseeker_lastname]" , $jobseeker_lastname , $message_content); $message_content = str_replace("[jobseeker_address]" , $jobseeker_address , $message_content); $message_content = str_replace("[jobseeker_city]" , $jobseeker_city , $message_content); $message_content = str_replace("[jobseeker_state]" , $jobseeker_state , $message_content); $message_content = str_replace("[jobseeker_phone]" , $jobseeker_phone , $message_content); $message_content = str_replace("[jobseeker_cellphone]" , $jobseeker_cellphone , $message_content); $message_content = str_replace("[jobseeker_birthdate]" , $jobseeker_birthdate , $message_content); $message_content = str_replace("[jobseeker_country]" , $jobseeker_country , $message_content); $message_content = str_replace("[jobseeker_gender]" , $jobseeker_gender , $message_content); $message_content = str_replace("[jobseeker_marital]" , $jobseeker_marital , $message_content); $message_content = str_replace("[jobseeker_race]" , $jobseeker_race , $message_content); $message_content = str_replace("[jobseeker_fax]" , $jobseeker_fax , $message_content); $message_content = str_replace("[jobseeker_nationality]" , $jobseeker_nationality , $message_content); $message_content = str_replace("[jobseeker_religion]" , $jobseeker_religion , $message_content); $message_content = str_replace("[jobseeker_address2]" , $jobseeker_address2 , $message_content); $message_content = str_replace("[jobseeker_address]" , $jobseeker_address , $message_content); $message_content = str_replace("[jobseeker_i_position]" , $jobseeker_i_position , $message_content); $message_content = str_replace("[jobseeker_i_jobfunction]" , $jobseeker_i_jobfunction , $message_content); $message_content = str_replace("[jobseeker_i_employmentterm]" , $jobseeker_i_employmentterm , $message_content); $message_content = str_replace("[jobseeker_r_expectedsalary]" , $jobseeker_r_expectedsalary , $message_content); $message_content = str_replace("[jobseeker_i_joblocation]" , $jobseeker_i_joblocation , $message_content); $message_content = str_replace("[jobseeker_e_id]" , $jobseeker_e_id , $message_content); $message_content = str_replace("[jobseeker_e_year_start]" , $jobseeker_e_year_start , $message_content); $message_content = str_replace("[jobseeker_e_year_end]" , $jobseeker_e_year_end , $message_content); $message_content = str_replace("[jobseeker_e_school]" , $jobseeker_e_school , $message_content); $message_content = str_replace("[jobseeker_e_qualification]" , $jobseeker_e_qualification , $message_content); $message_content = str_replace("[jobseeker_e_major]" , $jobseeker_e_major , $message_content); $message_content = str_replace("[jobseeker_e_gpa]" , $jobseeker_e_gpa , $message_content); $message_content = str_replace("[jobseeker_l_id]" , $jobseeker_l_id , $message_content); $message_content = str_replace("[jobseeker_l_name]" , $jobseeker_l_name , $message_content); $message_content = str_replace("[jobseeker_l_reading]" , $jobseeker_l_reading , $message_content); $message_content = str_replace("[jobseeker_l_writting]" , $jobseeker_l_writting , $message_content); $message_content = str_replace("[jobseeker_l_speaking]" , $jobseeker_l_speaking , $message_content); $message_content = str_replace("[jobseeker_l_listening]" , $jobseeker_l_listening , $message_content); $message_content = str_replace("[history_id]" , $history_id , $message_content); $message_content = str_replace("[history_start]" , $history_start , $message_content); $message_content = str_replace("[history_end]" , $history_end , $message_content); $message_content = str_replace("[history_salary]" , $history_salary , $message_content); $message_content = str_replace("[history_industry]" , $history_industry , $message_content); $message_content = str_replace("[jobseeker_email]" , $jobseeker_email , $message_content); $message_content = str_replace("[jobseeker_i_industry]" , $jobseeker_i_industry , $message_content); $message_content = str_replace("[history_jobfunction]" , $history_jobfunction , $message_content); $message_content = str_replace("[jobseeker_o_id]" , $jobseeker_o_id , $message_content); $message_content = str_replace("[jobseeker_o_skill]" , $jobseeker_o_skill , $message_content); $message_content = str_replace("[jobseeker_o_exp]" , $jobseeker_o_exp , $message_content); $message_content = str_replace("[jobseeker_o_level]" , $jobseeker_o_level , $message_content); $message_content = str_replace("[jobseeker_t_id]" , $jobseeker_t_id , $message_content); $message_content = str_replace("[jobseeker_t_skill]" , $jobseeker_t_skill , $message_content); $message_content = str_replace("[jobseeker_t_exp]" , $jobseeker_t_exp , $message_content); $message_content = str_replace("[jobseeker_summary]" , $jobseeker_summary , $message_content); $message_content = str_replace("[history_achievement]" , $history_achievement , $message_content); $message_content = str_replace("[history_position]" , $history_position , $message_content); $message_content = str_replace("[history_company]" , $history_company , $message_content); $message_content = str_replace("[jobseeker_t_level]" , $jobseeker_t_level , $message_content); $message_content = str_replace("[photo_number]" , $photo_number , $message_content); $message_content = str_replace("[jobseeker_l_id]" , $jobseeker_l_id , $message_content); $message_content = str_replace("[education_start]" , $education_start , $message_content); $message_content = str_replace("[education_id]" , $education_id , $message_content); $message_content = str_replace("[jobseeker_photo_id]" , $jobseeker_photo_id , $message_content); $message_content = str_replace("[jobseeker_resume_file]" , $jobseeker_resume_file , $message_content); $mail = new PHPMailer(); $mail->Host = $smtp_server; $mail->SMTPAuth = $smtp_auth; $mail->Username = $smtp_username; $mail->Password = $smtp_password; $mail->From = $web_owner_contact_email; $mail->FromName = $web_owner_contact_name; $mail->WordWrap = $email_wordwrap; $mail->ClearAddresses(); $mail->AddAddress($employer_email); $mail->IsHTML(true); $mail->Subject = $subject_document_new; $mail->Body = $message_content; if ($status_email_notify_admin == "yes") { $mail->AddBCC($web_owner_contact_email); } $mail->Send(); // print $message_content; } // clear session ... if ($HTTP_POST_VARS) { reset($HTTP_POST_VARS); while (list ($key, $val) = each ($HTTP_POST_VARS)) { session_unregister("c$key"); } } } mysql_close($db_connect); } else { setcookie("warning", $setup_demo_sorry); if ($package) { $destination = "jobseeker_matches.php"; } else { $destination = "jobseeker_matches.php"; } } mysql_close($db_connect); setcookie("cjobs" , "" ); setcookie("caction" , "" ); setcookie("cbackurl" , "" ); setcookie("warning" , $tmp_action ); setcookie("cresponse_processed" , $processed ); } } } header("Location:$destination"); ?>