<?php
$obj_tab_letter=new cls_tab_hr_letter();
$arr_letter=array();
if(isset($_POST["act"])&&$_POST["act"]=="save"){
	$lng_id=0;
	$obj_result = $obj_db->query("SELECT * FROM ".DB_PRE."hr_letter where letter_user_id='".$obj_ctl_user->id."'");
	if($obj_rs = $obj_db->fetch_array($obj_result))
	{
		$lng_id=$obj_rs["letter_id"];
	}
	$arr_fields=array();
	$arr_fields["letter_id"]=$lng_id;
	$arr_fields["letter_content"]=$get_letter_content;
	$arr_msg=$obj_tab_letter->on_save($arr_fields);
	if($arr_msg["err"]!=""){
		$obj_msg->alert($arr_msg["err"]);

	}
}
$obj_result = $obj_db->query("SELECT * FROM ".DB_PRE."hr_letter where letter_user_id='".$obj_ctl_user->id."'");
if($obj_rs = $obj_db->fetch_array($obj_result))
{
	$arr_letter = $obj_rs;
}else{
	//没有简介时，初始数据
	$arr_x=$obj_db->get_fields(DB_PRE."hr_letter");
	foreach($arr_x as $item){
		$arr_letter[$item]="";
	}
}
//获取简历状态
$obj_result = $obj_db->query("SELECT resume_progress_info FROM ".DB_PRE."hr_resume where resume_user_id='".$obj_ctl_user->id."'");
if($obj_rs = $obj_db->fetch_array($obj_result))
{
	$arr_x=explode(",",$obj_rs["resume_progress_info"]);
	$lng_x=count($arr_x);
	for($i=1;$i<=$lng_x;$i++){
		$arr_state["step".$i]=$arr_x[$i-1];
	}
	if($lng_x<6){
		for($i=$lng_x+1;$i<7;$i++){
			$arr_state["step".$i]=0;
		}
	}
}else{
	$arr_state["step1"]=$arr_state["step2"]=$arr_state["step3"]=$arr_state["step4"]=$arr_state["step5"]=$arr_state["step6"]=0;
}

?>