<?php
$obj_tab_apply=new cls_tab_hr_job_apply();

if(isset($get_act)&&$get_act=="del"&&isset($get_id)&&$get_id>0){
	$arr_msg=$obj_tab_apply->on_del($get_id);
	if($arr_msg["err"]!="")
	{
		$obj_msg->alert($arr_msg["err"]);
	}
}
if(isset($get_act)&&$get_act=="del_s"&&isset($get_applyids)){
	$arr_msg=$obj_tab_apply->on_del($get_applyids);
	if($arr_msg["err"]!="")
	{
		$obj_msg->alert($arr_msg["err"]);
	}
}
$str_where=" where apply_user_id='".$obj_ctl_user->id."'";
$arr_apply=array();
$arr_job_id=array();
$arr_company_user_id=array();
$obj_result = $obj_db->query("SELECT * FROM ".DB_PRE."hr_job_apply".$str_where);
while($obj_rs = $obj_db->fetch_array($obj_result))
{
	$obj_rs["apply_addtime"]=format_date($obj_rs["apply_addtime"]);
	$arr_job_id[]=$obj_rs["apply_job_id"];
	$arr_company_user_id[]=$obj_rs["apply_company_user_id"];
	$arr_apply[]=$obj_rs;
}
if(count($arr_job_id)>0){
	$str_job_ids=implode(",",$arr_job_id);
	$obj_result = $obj_db->query("SELECT * FROM ".DB_PRE."hr_job where job_id in(".$str_job_ids.")");
	while($obj_rs = $obj_db->fetch_array($obj_result))
	{
		$arr_job["id_".$obj_rs["job_id"]]=$obj_rs;
	}
}
if(count($arr_company_user_id)>0){
	$str_company_user_ids=implode(",",$arr_company_user_id);
	$obj_result = $obj_db->query("SELECT company_user_id,company_id,company_name FROM ".DB_PRE."hr_company where company_user_id in(".$str_company_user_ids.")");
	while($obj_rs = $obj_db->fetch_array($obj_result))
	{
		$arr_company["id_".$obj_rs["company_user_id"]]=$obj_rs;
	}
}


?>