<!--#include file="../../Include/Class_Conn.asp" -->
<!--#include file="../../Include/Class_Main.asp" -->
<% 
Dim Localeid,Jobid
Dim Schid,Username,Cmd,Rs,SQL

'//获取个人用户的登陆标记
If IsArray(Session("Person")) Then
 Perid = Session("Person")(2)
 UserName = Session("Person")(0)
Else
 Session.Abandon() 
 Response.write "<script>alert('-登录后才能进行该操作！-');window.close();</script>"
 Response.End()
End if

Localeid  = Replace_Text(Request.QueryString("Localeid"))
Jobid     = Replace_Text(Request.QueryString("Jobid"))

Set Rs = Conn.Execute("Select Ncid From [pH_Locale_Apply] Where Localeid="&Localeid&" And Jobid="&Jobid&" And Perid='"&Perid&"'")
If Not Rs.Eof Then
 SQL = "Update [pH_Locale_Apply] Set AddDate=Getdate() Where Localeid="&Localeid&" And Jobid="&Jobid&" And Perid='"&Perid&"'"
Else
 SQL = "Insert Into [pH_Locale_Apply] (Localeid,Jobid,Perid,AddDate) Values ("&Localeid&","&Jobid&",'"&Perid&"',Getdate())"
End if
Conn.Execute(SQL)
 
 Response.write "<script>alert('应聘成功！');window.close();</script>"
 Response.End()


'//关闭数据库连接
Set Rs = Nothing
CloseDB
 %>
