set_filenames(array('job_details' => 'job_details.htm','indeed_job_details' => 'indeed_job_details.htm','job_details1' => 'job_details1.htm')); include_once(FILENAME_BODY); /*if(!check_login("jobseeker")) { $_SESSION['REDIRECT_URL']=$_SERVER['REQUEST_URI']; $messageStack->add_session(LOGON_FIRST_MESSAGE, 'error'); tep_redirect(FILENAME_JOBSEEKER_LOGIN); }*/ $job_id=tep_db_prepare_input($_GET['query_string']); $query_string=encode_string("job_id=".$job_id."=job_id"); //$job_id=check_data($query_string,"=","job_id","job_id"); $now=date('Y-m-d H:i:s'); $table_names=JOB_TABLE." as j left outer join ".RECRUITER_TABLE." as r on (j.recruiter_id=r.recruiter_id ) left outer join ".RECRUITER_LOGIN_TABLE." as rl on (rl.recruiter_id=r.recruiter_id ) left outer join ".INDEED_JOB_TABLE." as dd on (j.job_id=dd.job_id) left outer join ".SIMPLYHIRED_JOB_TABLE." as sh on (j.job_id=sh.job_id)"; $where_clause=" j.recruiter_id=r.recruiter_id and r.recruiter_id=rl.recruiter_id and rl.recruiter_status='Yes' and j.job_id='".tep_db_input($job_id)."' and j.expired >='$now' and j.re_adv <='$now' and j.job_status='Yes' and ( j.deleted is NULL or j.deleted='0000-00-00 00:00:00')"; $field_names="r.recruiter_company_name,r.recruiter_featured,r.recruiter_logo,r.recruiter_url,j.job_title,j.job_reference,j.min_experience,j.max_experience,j.job_location,j.job_state,j.job_state_id,j.job_country_id,re_adv,expired,j.job_salary,j.job_allowance,j.job_industry_sector,j.job_type,j.min_experience,j.max_experience,j.job_description,dd.indeed_id,dd.indeed_url,j.post_url,j.url,job_short_description,sh.simplyhired_id,sh.simplyhired_url,j.latitude,j.longitude";// if(!$row=getAnyTableWhereData($table_names,$where_clause,$field_names)) { ///Hack attempt $messageStack->add_session(ERROR_JOB_NOT_EXIST, 'error'); tep_redirect(tep_href_link(FILENAME_ERROR)); } $title_format=encode_category($row['job_title']); //$experience_string=calculate_experience($row['min_experience'],$row['max_experience']); $action = (isset($_GET['action']) ? $_GET['action'] : ''); //$action = (isset($action_match['1']) ? $action_match['1'] : ''); switch($action) { case "save": if(!check_login("jobseeker")) { $_SESSION['REDIRECT_URL']=$_SERVER['REQUEST_URI']; $messageStack->add_session(LOGON_FIRST_MESSAGE, 'error'); tep_redirect(tep_href_link(FILENAME_JOBSEEKER_LOGIN)); } $sql_data_array=array('jobseeker_id'=>$_SESSION['sess_jobseekerid'], 'job_id'=>$job_id ); if($row_check=getAnyTableWhereData(SAVE_JOB_TABLE,"jobseeker_id='".$_SESSION['sess_jobseekerid']."' and job_id='".$job_id."'")) { $messageStack->add_session(ERROR_JOB_ALREADY_SAVED, 'error'); } else { tep_db_perform(SAVE_JOB_TABLE, $sql_data_array); $messageStack->add_session(SUCCESS_JOB_SAVED, 'success'); } tep_redirect(tep_href_link($job_id.'/'.$title_format.'.html')); break; } $company_logo=$row['recruiter_logo']; if(tep_not_null($company_logo) && is_file(PATH_TO_MAIN_PHYSICAL.PATH_TO_LOGO.$company_logo)) { if(tep_not_null($row['recruiter_url'])) { $photo=tep_image(FILENAME_IMAGE."?image_name=".PATH_TO_LOGO.$company_logo."&size=220"); $company_logo=''.$photo.''; } else { $photo=tep_image(FILENAME_IMAGE."?image_name=".PATH_TO_LOGO.$company_logo."&width=220"); $company_logo=$photo; } // $company_logo.='

[ '.INFO_TEXT_CLICK_HERE_ENLARGE.' ]  '; } else $company_logo=''; $recruiter_company_name=tep_db_output($row['recruiter_company_name']); $recruiter_company_name1=tep_db_output($row['recruiter_company_name']); if($row['recruiter_featured']=='Yes') { $recruiter_company_name=''.$recruiter_company_name.''; } if(tep_date_long(tep_db_output($row['updated']))=='') $last_modified=tep_date_long(tep_db_output($row['re_adv'])); else $last_modified=tep_date_long(tep_db_output($row['updated'])); if($row['post_url']=='Yes') { $post_url=trim($row['url']); if(substr($post_url,0,4)!='http') $post_url='http://'.$post_url; $button_apply=''.tep_image(PATH_TO_BUTTON.'button_apply_now.gif',"Apply Now").''; } elseif(check_login("jobseeker")) { if($applicant_id=getAnytableWhereData(APPLICATION_TABLE,"jobseeker_id='".$_SESSION['sess_jobseekerid']."' and job_id='".$job_id."' order by inserted desc limit 0,1",'id')) // $button_apply=''.tep_image_button(PATH_TO_BUTTON.'re_apply.gif',"Re-Apply Now",'onclick="location.href=\''.tep_href_link(FILENAME_APPLY_NOW,'query_string='.$query_string).'\'"').''; $button_apply='Already Applied'; else $button_apply=''.tep_image_button(PATH_TO_BUTTON.'button_apply_now.gif',"Apply Now",'onclick="location.href=\''.tep_href_link(FILENAME_APPLY_NOW,'query_string='.$query_string).'\'"').''; } else $button_apply=''.tep_image_button(PATH_TO_BUTTON.'button_registered_user.gif',"Registered Users",'onclick="location.href=\''.tep_href_link(FILENAME_APPLY_NOW,'query_string='.$query_string).'\'"').' '.tep_image_button(PATH_TO_BUTTON.'button_new_user.gif',"New Users",'onclick="location.href=\''.tep_href_link(FILENAME_JOBSEEKER_REGISTER1,'job='.$query_string).'\'"').''; $job_category_ids=get_name_from_table(JOB_JOB_CATEGORY_TABLE,'job_category_id','job_id',tep_db_output($job_id)); if(tep_not_null($row['indeed_id'])) { $template->assign_vars(array( //'INFO_TEXT_JOB_DETAILS1'=>'
', 'INFO_TEXT_JOB_DETAILS1'=>nl2br(stripslashes($row['job_short_description'])).'
More >>

', 'button'=>''.INFO_TEXT_BACK.' | '.INFO_TEXT_SAVE.' | '.INFO_TEXT_TELL_TO_FRIEND.'', )); } elseif(tep_not_null($row['simplyhired_id'])) { $template->assign_vars(array( //'INFO_TEXT_JOB_DETAILS1'=>'
', 'INFO_TEXT_JOB_DETAILS1'=>nl2br(stripslashes($row['job_description'])).'
More >>

', 'button'=>''.INFO_TEXT_BACK.' | '.INFO_TEXT_SAVE.' | '.INFO_TEXT_TELL_TO_FRIEND.'', )); } else { $template->assign_vars(array( 'INFO_TEXT_JOB_DETAILS1'=>nl2br(stripslashes($row['job_description'])), 'button'=>''.INFO_TEXT_BACK.' | '.INFO_TEXT_SAVE.' | '.INFO_TEXT_TELL_TO_FRIEND.' | '.INFO_TEXT_PRINT.'', )); } $marker_location=(tep_not_null($row['job_location'])?tep_db_output($row['job_location']).', ':'').(($row['job_state_id'] > 0)?get_name_from_table(ZONES_TABLE,TEXT_LANGUAGE.'zone_name','zone_id',tep_db_output($row['job_state_id'])).", ":((tep_db_output($row['job_state']!='')?tep_db_output($row['job_state']).", ":''))).get_name_from_table(COUNTRIES_TABLE,'country_name','id',tep_db_output($row['job_country_id'])); $map_java_script=''; $show_map=''; if($row['latitude']!='' && $row['longitude']!='') { $map_java_script=''."\n"; $show_map='Show Map'; } $template->assign_vars(array( 'HEADING_TITLE'=>HEADING_TITLE, 'INFO_TEXT_PAGE_HEADING_TITLE'=>''.SITE_TITLE.' - '.HEADING_TITLE.' - '.tep_db_output($row['job_title']).'', //'button'=>''.tep_image_button(PATH_TO_BUTTON.'button_back.gif', IMAGE_BACK).'  '.tep_image_button(PATH_TO_BUTTON.'button_apply_now.gif', IMAGE_APPLY_NOW).'  '.tep_image_button(PATH_TO_BUTTON.'button_save.gif', IMAGE_SAVE).'  '.tep_image_button(PATH_TO_BUTTON.'button_tell_to_friend.gif', IMAGE_TELL_TO_FRIEND).'  '.tep_image_button(PATH_TO_BUTTON.'button_print.gif', IMAGE_PRINT).'', // 'button'=>''.INFO_TEXT_BACK.' | '.INFO_TEXT_SAVE.' | '.INFO_TEXT_TELL_TO_FRIEND.' | '.INFO_TEXT_PRINT.'', 'INFO_TEXT_APPLY_NOW'=>INFO_TEXT_APPLY_NOW, 'button_apply'=>$button_apply, //'button_apply'=>''.tep_image_button(PATH_TO_BUTTON.'button_apply_now_new.gif', IMAGE_APPLY_NOW).'', 'company_logo'=>$company_logo, 'INFO_TEXT_JOB_TITLE'=>INFO_TEXT_JOB_TITLE, 'INFO_TEXT_JOB_TITLE1'=>tep_db_output($row['job_title']), 'INFO_TEXT_COMPANY_NAME'=>INFO_TEXT_COMPANY_NAME, 'INFO_TEXT_COMPANY_NAME1'=>$recruiter_company_name, 'INFO_TEXT_JOB_REFERENCE'=>(($row['job_reference']=='')?'':INFO_TEXT_JOB_REFERENCE), 'INFO_TEXT_JOB_REFERENCE1'=>(($row['job_reference']=='')?'':tep_db_output($row['job_reference'])), 'INFO_TEXT_JOB_REF_DOT'=>(($row['job_reference']=='')?'':':'), 'INFO_TEXT_JOB_LOCATION'=>INFO_TEXT_JOB_LOCATION, 'INFO_TEXT_JOB_LOCATION1'=>$marker_location,//(tep_not_null($row['job_location'])?tep_db_output($row['job_location']).', ':'').(($row['job_state_id'] > 0)?get_name_from_table(ZONES_TABLE,TEXT_LANGUAGE.'zone_name','zone_id',tep_db_output($row['job_state_id'])).", ":((tep_db_output($row['job_state']!='')?tep_db_output($row['job_state']).", ":''))).get_name_from_table(COUNTRIES_TABLE,'country_name','id',tep_db_output($row['job_country_id'])), 'INFO_TEXT_JOB_POSTED'=>INFO_TEXT_JOB_POSTED, 'INFO_TEXT_JOB_POSTED1'=>tep_date_long(tep_db_output($row['re_adv'])), 'INFO_TEXT_JOB_MODIFIED'=>INFO_TEXT_JOB_MODIFIED, 'INFO_TEXT_JOB_MODIFIED1'=>$last_modified, 'INFO_TEXT_JOB_APPLY_BEFORE'=>INFO_TEXT_JOB_APPLY_BEFORE, 'INFO_TEXT_JOB_APPLY_BEFORE1'=>tep_date_long(tep_db_output($row['expired'])), 'INFO_TEXT_SALARY'=>((tep_not_null($row['job_salary']))?INFO_TEXT_SALARY:''), 'INFO_TEXT_SALARY_DOT'=>((tep_not_null($row['job_salary']))?':':''), 'INFO_TEXT_SALARY1'=>((tep_not_null($row['job_salary']))?tep_db_output($row['job_salary']):''), 'INFO_TEXT_ALLOWANCE'=>INFO_TEXT_ALLOWANCE, 'INFO_TEXT_ALLOWANCE1'=>tep_db_output($row['job_allowance']), 'INFO_TEXT_JOB_TYPE'=>((tep_not_null($row['job_type']))?INFO_TEXT_JOB_TYPE:''), 'INFO_TEXT_JOB_TYPE_DOT'=>((tep_not_null($row['job_type']))?':':''), 'INFO_TEXT_JOB_TYPE1'=>((tep_not_null($row['job_type']))?($row['job_type']==0)?'Any Job Types':get_name_from_table(JOB_TYPE_TABLE,TEXT_LANGUAGE.'type_name', 'id', tep_db_output($row['job_type'])):''), 'INFO_TEXT_EXPERIENCE'=>INFO_TEXT_EXPERIENCE, 'INFO_TEXT_EXPERIENCE1'=>calculate_experience(tep_db_output($row['min_experience']),tep_db_output($row['max_experience'])), 'INFO_JOB_CATEGORY'=>INFO_JOB_CATEGORY, 'INFO_JOB_CATEGORY1'=>((tep_db_output($job_category_ids)!='0' && $job_category_ids!='')?get_name_from_table(JOB_CATEGORY_TABLE,TEXT_LANGUAGE.'category_name', 'id', tep_db_output($job_category_ids)):' All job category'), 'INFO_TEXT_JOB_DETAILS'=>INFO_TEXT_JOB_DETAILS, //'INFO_TEXT_SHORT_DESCRIPTION'=>nl2br(stripslashes($row['job_short_description'])), 'view_company_jobs'=>''.tep_draw_form('search',FILENAME_JOB_SEARCH,'', 'post').tep_draw_hidden_field('action','search').tep_draw_hidden_field('company',$recruiter_company_name1).''.INFO_TEXT_VIEW_ALL_JOBS_OF_COMPANY.'', // 'view_company_profile'=>tep_draw_form('search',FILENAME_JOBSEEKER_COMPANY_PROFILE,'', 'post').tep_draw_hidden_field('action','search').tep_draw_hidden_field('recruiter_id',tep_db_get_field(JOB_TABLE,'recruiter_id','job_id='.$job_id)).'View company profile', 'view_company_profile'=>''.INFO_TEXT_VIEW_COMPANY_PROFILE.'', 'view_company_jobs'=>''.tep_draw_form('search',FILENAME_JOB_SEARCH,'', 'post').tep_draw_hidden_field('action','search').tep_draw_hidden_field('company',$recruiter_company_name1).''.INFO_TEXT_VIEW_ALL_JOBS_OF_COMPANY.'', 'INFO_TEXT_SIMILAR_JOBS'=>''.tep_draw_form('search_smililar_job',FILENAME_JOB_SEARCH,'', 'post').tep_draw_hidden_field('action','search').tep_draw_hidden_field('country',$row['job_country_id']).tep_draw_hidden_field('job_category[]',(tep_db_output($job_category_ids)!='0' && $job_category_ids!='')?$job_category_ids:'0').''.INFO_TEXT_SIMILAR_JOBS.'', 'MAP_JAVA_SCRIPT_LINK' => '', 'MAP_JAVA_SCRIPT' => $map_java_script, 'SHOW_MAP' => $show_map, 'LEFT_BOX_WIDTH'=>LEFT_BOX_WIDTH1, 'RIGHT_BOX_WIDTH'=>RIGHT_BOX_WIDTH1, 'LEFT_HTML'=>LEFT_HTML, 'RIGHT_HTML'=>RIGHT_HTML, 'update_message'=>$messageStack->output())); if($action=='print') { $template->pparse('job_details1'); } else { if($check_row=getAnytableWhereData(JOB_STATISTICS_TABLE,"job_id='".$job_id."'",'job_id,clicked')) { $sql_data_array=array('job_id'=>$job_id, 'clicked'=>($check_row['clicked']+1) ); tep_db_perform(JOB_STATISTICS_TABLE, $sql_data_array, 'update', "job_id='".$job_id."'"); } else { $sql_data_array=array('job_id'=>$job_id, 'clicked'=>1 ); tep_db_perform(JOB_STATISTICS_TABLE, $sql_data_array); } if(tep_not_null($row['indeed_id']) || tep_not_null($row['simplyhired_id']) ) $template->pparse('indeed_job_details'); else $template->pparse('job_details'); } ?>