<!--#include file="top.asp"-->
<%if userflag6=0 then
response.redirect"ok.asp?action=flag"
end if%>
<%job_name=request("job_name")
dx=request("dx")
dd=request("dd")
zrs=cint(request("rs"))
yq=request("yq")
gz=request("gz")
yxq=request("yxq")
lastdate=date()+yxq
key1=cityjobzpkey

page=request("page")
if page="" then page=1

if request("action")="del" then
conn.execute("delete from dlxf_job_zp where dlxf_id=" & request("id"))&" and dlxf_yp_id="&session("id")
Response.Redirect "ok.asp?url=zp.asp&page="&page

elseif request("action")="add" then
set rs=Server.CreateObject("Adodb.Recordset")
sql="select * from dlxf_job_zp where dlxf_yp_id="& session("id")
rs.open sql,conn,1,3

if userflag6<>0 then
if rs.recordcount >= cint(userflag6) then
errstyle="·您是"&vipshow&"，只能上传最多 "&userflag6&" 条招聘信息！"
scripterr
end if
else
errstyle="·对不起，此功能已对"&vipshow&"关闭！"
scripterr
end if

rs.addnew
rs("dlxf_job_name")=job_name
rs("dlxf_dx")=dx
rs("dlxf_dd")=dd
rs("dlxf_zrs")=zrs
rs("dlxf_yq")=yq
rs("dlxf_gz")=gz
rs("dlxf_yxq")=yxq
rs("dlxf_key1")=key1
rs("dlxf_lastdate")=lastdate
rs("dlxf_yp_id")=session("id")
rs.update
rs.close
set rs=nothing
if key1=1 then
response.redirect"ok.asp?url=zp_add.asp"
else
response.redirect"ok.asp?url=zp_add.asp&key=yes"
end if

elseif request("action")="edit" then
set rs=Server.CreateObject("Adodb.Recordset")
sql="select * from dlxf_job_zp where dlxf_id="&request("id")&" and dlxf_yp_id="&session("id")
rs.open sql,conn,1,3
if userflag6=0 then
errstyle="·对不起，此功能已对"&vipshow&"关闭！"
scripterr
end if

rs("dlxf_job_name")=job_name
rs("dlxf_dx")=dx
rs("dlxf_dd")=dd
rs("dlxf_zrs")=zrs
rs("dlxf_yq")=yq
rs("dlxf_gz")=gz
rs("dlxf_yxq")=yxq
rs("dlxf_key1")=key1
rs("dlxf_lastdate")=lastdate
rs.update
rs.close
set rs=nothing
if cityxxkey=1 then
response.redirect"ok.asp?url=zp.asp&page="&page
else
response.redirect"ok.asp?url=zp.asp&key=yes&page="&page
end if

elseif request("action")="key" then
set rs=Server.CreateObject("Adodb.Recordset")
sql="select * from dlxf_job_zp where dlxf_id="&request("id")&" and dlxf_yp_id="&session("id")
rs.open sql,conn,1,3

rs("dlxf_key")=request("zt")
rs.update
rs.close
set rs=nothing
response.redirect"ok.asp?url=zp.asp&page="&page
end if
%>