<%dbs="../"%>
<!--#include file="../inc/config.asp"-->
<!--#include file="uccook.asp"-->
<!--#include file="uc.asp"-->

<%
if Uname="" or isnull(Uname)  then
response.Write "<script >alert('提示：\n\n对不起,资料还没有完善,请完善以后\n\n立即返回...');location.href='Profile_Edit.asp';</script>"
response.End()
end if
set rs=Server.CreateObject("Adodb.Recordset")
	sql="select id from H_hr where UID="&UID&""
	rs.open sql,conn,1,1
	if rs.eof then
response.Write "<script >alert('提示：\n\n系统规定，请登记招聘企业资料后进行发布\n\n我们将帮助你转向登记页面 ...');location.href='hr_add.asp';</script>"
response.End()
	end if

H_Industry=Replace(Replace(Left(request.Form("H_Industry"),8),"<","["),">","]")
H_title=Replace(Replace(Left(request.Form("H_title"),200),"<","["),">","]")
H_Address=Replace(Replace(Left(request.Form("H_Address"),100),"<","["),">","]")
H_Gender=Replace(Replace(Left(request.Form("H_Gender"),4),"<","["),">","]")
H_Costs=Replace(Replace(Left(request.Form("H_Costs"),50),"<","["),">","]")
H_Full=Replace(Replace(Left(request.Form("H_Full"),5),"<","["),">","]")
H_Education=Replace(Replace(Left(request.Form("H_Education"),5),"<","["),">","]")
H_number=Replace(Replace(Left(request.Form("H_number"),5),"<","["),">","]")
H_txt=Left(request.Form("H_txt"),3000)
H_txt=replace(H_txt,"table","表格")
H_txt=replace(H_txt,"TABLE","表格")
H_txt=replace(H_txt,"<tr","表格")
H_txt=replace(H_txt,"<td","表格")
H_txt=replace(H_txt,"</tr","表格")
H_txt=replace(H_txt,"</td","表格")
H_txt=replace(H_txt,"</div","表格")
if H_Industry="" then
response.Write "<script >alert('提示：\n\n对不起，职能分类没有选择！...');history.back(-1);</script>"
response.End()
end if
if H_title="" then
response.Write "<script >alert('提示：\n\n对不起，招聘标题没有填写！...');history.back(-1);</script>"
response.End()
end if
if H_Address="" then
response.Write "<script >alert('提示：\n\n对不起，工作地点没有填写！...');history.back(-1);</script>"
response.End()
end if
if H_Gender="" then
response.Write "<script >alert('提示：\n\n对不起，要求性别没有填写！...');history.back(-1);</script>"
response.End()
end if
if H_Costs="" then
response.Write "<script >alert('提示：\n\n对不起，承诺待遇没有填写！...');history.back(-1);</script>"
response.End()
end if
if H_Full="" then
response.Write "<script >alert('提示：\n\n对不起，请选择兼职还是全职！...');history.back(-1);</script>"
response.End()
end if
if H_number="" then
response.Write "<script >alert('提示：\n\n对不起，招聘人数没有填写！...');history.back(-1);</script>"
response.End()
end if
if H_txt="" then
response.Write "<script >alert('提示：\n\n对不起，详细说明没有填写！...');history.back(-1);</script>"
response.End()
end if
if H_Industry="" or IsNumeric(H_Industry)<>true then
response.Write "<script >alert('提示：\n\n对不起，职能分类是数字形式！...');history.back(-1);</script>"
response.End()
end if
if H_Gender="" or IsNumeric(H_Gender)<>true then
response.Write "<script >alert('提示：\n\n对不起，系统错误|数字形式！...');history.back(-1);</script>"
response.End()
end if
if H_Full="" or IsNumeric(H_Full)<>true then
response.Write "<script >alert('提示：\n\n对不起，系统错误|数字形式！...');history.back(-1);</script>"
response.End()
end if
if H_number="" or IsNumeric(H_number)<>true then
response.Write "<script >alert('提示：\n\n对不起，招聘人数只能是数字形式！...');history.back(-1);</script>"
response.End()
end if
if H_Education="" or IsNumeric(H_Education)<>true then
response.Write "<script >alert('提示：\n\n对不起，学历没有选择！...');history.back(-1);</script>"
response.End()
end if
''开始写入数据
set rs=Server.CreateObject("Adodb.Recordset")
	sql="select * from H_Recruitment"
	rs.open sql,conn,1,3
	rs.addnew
	rs("UID")=UID
	rs("H_Industry")=H_Industry
	rs("H_title")=H_title
	rs("H_Address")=H_Address
	rs("H_Gender")=H_Gender
	rs("H_Costs")=H_Costs
	rs("H_Full")=H_Full
	rs("H_number")=H_number
	rs("H_txt")=H_txt
	rs("H_Education")=H_Education
	rs("H_Recommend")=0
	rs("H_Audit")=0
	rs("Rdate")=date()
	rs.update
	rs.close
	set rs=nothing	
	response.Write "<script >alert('提示：\n\n添加成功,立即返回...');location.href='Recruitment_master.asp';</script>"
	response.End()
%>
