<%if Session("weight")=0 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")
	sql1="select * from mark where user_name='"&request("user_name")&"'"
	sql1=sql1&" and who_mark='"&session("Current_user")&"'"
	rs1.Open sql1,conn1,3,2
	if rs1.RecordCount<>0 then
		Set rs = Server.CreateObject("ADODB.Recordset")
		sql="select * from mark where user_name='"&request("user_name")&"'"
		sql=sql&" and who_mark='"&session("Current_user")&"'"
		rs.Open sql,conn1,2,3
		rs("mark")=request("mark")
		rs("mark_time")=now()
		rs.update
	else
	Set rs = Server.CreateObject("ADODB.Recordset")
		rs.Open "mark",conn1,3,2
		rs.addnew
		rs("user_name")=request("user_name")
		rs("who_mark")=session("Current_user")
		rs("mark")=request("mark")
	
		rs("mark_time")=now()
		rs.update
	end if
Response.Redirect "show_user.asp?user_name="&request("user_name")

%><P><%=session("Current_user")%></p>
<P><%=sql%></p>