<?php
if(isset($get_act)&&$get_act=="save"){
	$obj_ctl_mail=new cls_ctl_mail();

	$get_app="resume_email";
	if(!isset($get_temp)) $get_temp="";
	$str_cookie_temp=get_cookie("hr_default_temp");
	if($get_temp!=""){
		set_cookie("hr_default_temp",$get_temp);
	}else if($str_cookie_temp!=""){
		$get_temp=$str_cookie_temp;
	}
	if(!in_array($get_temp,array("hr","hr_old"))) $get_temp="hr";

	$str_apppath="";
	if(isset($get_apppath)&&$get_apppath!=""){
		$str_apppath=$get_apppath;
		$str_apppath=str_replace("\\","/",$str_apppath);
		if(substr($str_apppath,-1,1)!="/") $str_apppath.="/";
		if(substr($str_apppath,0,1)=="/") $str_apppath=substr($str_apppath,1);
		$str_temp_path="/".$str_apppath.$get_app;
	}else{
		$str_temp_path="/".$get_temp."/".$get_app;
	}

	$str_temp=temp_load($str_temp_path);
	ob_start();
	require_once $str_temp;
	$str_resumeview_content=ob_get_contents();
	ob_end_clean();
	require_once WEB_ROOT.'/sys/fun/fun.temp.php';
	$get_email_content=format_html($get_email_content);
	$get_email_content="<div style='float:left;width:500px;line-height:20px;font-size:14px;text-align:left;color:#0000ff;'>".$get_email_content."</div><br><br><br><br><br><br><br><br>";
	$arr_msg=$obj_ctl_mail->on_send($get_email_to,"在线求职",$get_email_content.$str_resumeview_content);
	if($arr_msg["err"]!=""){
		$obj_msg->alert($arr_msg["err"]);
		$obj_msg->on_history_back();
	}else{
		$obj_msg->alert("外发简历成功！");
	}
}
$this_letter="";
$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))
{
	$this_letter=$obj_rs["letter_content"];
}



?>