<?php
$obj_tab_invite=new cls_tab_hr_job_invite();

switch($get_app){
	case "job_edit":
		break;
	case "job_save":
		break;
	default:
		if(isset($get_act)&&$get_act=="del"&&isset($get_id)&&$get_id>0){
			$arr_msg=$obj_tab_invite->on_del($get_id);
			if($arr_msg["err"]!="")
			{
				$obj_msg->alert($arr_msg["err"]);
			}
		}
		if(isset($get_act)&&$get_act=="del_s"&&isset($get_jobids)){
			$arr_msg=$obj_tab_invite->on_del($get_jobids);
			if($arr_msg["err"]!="")
			{
				$obj_msg->alert($arr_msg["err"]);
			}
		}
		$str_where=" where invite_resume_user_id='".$obj_ctl_user->id."'";
		$arr_invite=array();
		$arr_user_id=array();
		$arr_company=array();
		$obj_result = $obj_db->query("SELECT * FROM ".DB_PRE."hr_job_invite".$str_where);
		while($obj_rs = $obj_db->fetch_array($obj_result))
		{
			$obj_rs["invite_addtime"]=format_date($obj_rs["invite_addtime"]);
			$arr_user_id[]=$obj_rs["invite_user_id"];
			$arr_invite[]=$obj_rs;
		}
		if(count($arr_user_id)>0){
			$str_user_ids=implode(",",$arr_user_id);
			$obj_result = $obj_db->query("SELECT * FROM ".DB_PRE."hr_company where company_user_id in(".$str_user_ids.")");
			while($obj_rs = $obj_db->fetch_array($obj_result))
			{
				$arr_company["id_".$obj_rs["company_user_id"]]=$obj_rs;
			}
		}
}

//设置状态被查看过
$obj_db->execute("update ".DB_PRE."hr_job_invite set invite_state=1".$str_where);


?>