<%if Session("weight")<>5 then 
Response.Redirect "error.asp?cause=4"
 end if
%>
<object runat=server id=conn1 progid="adodb.connection"></object>
<%application.Lock
conn1.Open Application("p_jyzx")
Application.UnLock
%>

<%
set rs1=server.CreateObject ("ADODB.recordset")
 sql="select * from party where  weight=1 and is_history=0 "
 rs1.Open sql,conn1,3,2
 if rs1.RecordCount=0 then
	 
%>
<%
Set rs = Server.CreateObject("ADODB.Recordset")
	rs.Open "party",conn1,3,2
	rs.addnew
	rs("weight")=1
	
	rs("party_type")=Request("party_type")
	rs("party_time")=Request("party_time")
	rs("party_name")=Request("party_name")
	rs("max_num")=Request("max_num")
	rs("address")=Request("address")
	rs("province")=Request("province")
	rs("contact")=replace(Request("contact"),chr(10),"<br>",1,-1,1)
	rs("aa_expenses")=Request("aa_expenses")
	rs("other_expenses")=Request("other_expenses")
	
	rs("party_content")=replace(Request("party_content"),chr(10),"<br>",1,-1,1)
	
	
	
	rs("initiate_people")=session("Current_user")
	rs("is_history")=0
	rs("date")=date
	rs("end_date")=dateadd("d",30,date)
	rs.update

%>
<%end if
Response.Redirect "system_party.asp"

%>


