<%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
%>
<%if Request("user_name")<>session("Current_user") then
	sql="update user set send_letter=send_letter+1,charisma=charisma+"&Application("send_letter_value")
	sql=sql&"  where user_name='"&session("Current_user")&"'"
	conn1.Execute(sql)
	sql="update user set receive_letter=receive_letter+1,charisma=charisma+"&Application("receive_letter_value")
	sql=sql&"  where user_name='"&Request("user_name")&"'"
	conn1.Execute(sql)
	end if	
	Set rs = Server.CreateObject("ADODB.Recordset")
	rs.Open "other_note",conn1,3,2
	rs.addnew
	rs("user_name")=request("user_name")
	rs("from_who")=session("Current_user")
	rs("type")=1
	'rs("other_note")=replace(Request("note"),chr(10),"<br>",1,-1,1)
	rs("title")=request("title")
	rs("other_note")=request("other_note")
	rs("time")=now()
	rs.update

Response.Redirect "show_user.asp?user_name="&request("user_name")



%>