<%
response.Charset="gb2312"
Response.Buffer = True
Response.ExpiresAbsolute = Now() - 1
Response.Expires = 0
Response.CacheControl = "no-cache"
Uid=request("Uid")
%>
<html>
<head><title>-</title>
<style>
body{overflow:hidden;font-size:12px;margin:0px;cursor:url('images/mouse.cur')}
</style>
<script type="text/javascript">
<!--
function CheckSend() {
if (document.sendform.XH_Content.value=="") {
	document.sendform.XH_Content.focus();
	return false
	}
parent.document.getElementById("mymsg").style.display='none';
}
-->
</script>
</head>
<body oncontextmenu="return false">
<!--#include file="inc/config.asp"--><!--#include file="inc/conn.asp"-->
<%
Function FpHtmlEnCode(fString)
fString = Replace(fString,"""","")
fString = Replace(fString,"  "," ")
fString = Replace(fString, ">", "&gt;")
fString = Replace(fString, "<", "&lt;")
fString = Replace(fString, "我操", "＊＊")
fString = Replace(fString, "我草", "＊＊")
fString = Replace(fString, "去死", "＊＊")
fString = Replace(fString, "我靠", "＊＊")
fString = Replace(fString, "靠你", "＊＊")
fString = Replace(fString, "你妈的", "＊＊＊")
fString = Replace(fString, "他妈的", "＊＊＊")
fString = Replace(fString, "垃圾", "＊＊")
FpHtmlEnCode=fString
End Function

XH_Myname=Request.Cookies("XH_Myname")
XH_Uid=Request.Cookies("XH_Uid")
XH_Content=request.form("XH_Content")
if XH_Content<>"" then
rs.open "select * from XH_Message",conn,1,3
rs.addnew
rs("XH_Uid")=request.form("XH_SendUid")
rs("XH_SendUser")=XH_Myname
rs("XH_SendUid")=XH_Uid
rs("XH_Content")=XH_Content
rs.update
rs.close
%>
<script type="text/javascript">parent.PlaySE(7);parent.DelDiv('mymsg',1)</script>
<%
conn.execute("update XH_Player set XH_NewMsg=XH_NewMsg+1 where ID="&request.form("XH_SendUid")&"")
Response.End
end if
rs.open "select top 1 * from XH_Message where XH_Uid="&Uid&" and XH_NewMsg=0",conn,1,3
if rs.eof then
rs.close
%>
<form name=sendform method=post action='?UID=<%=UID%>' onSubmit='return CheckSend();'>
<div id="text" style="color:#366690;background:#eeeeee;height:25px;padding-top:1px;border-bottom:1px #cccccc solid dotted;"><select name="XH_SendUid">
<%
rs.open "select * from XH_player",conn,1,1
do while not rs.eof
%>
<option value="<%=rs("id")%>">发送纸条到：<%=rs("XH_Myname")%> (<%=rs("XH_LoginCode")%>)</option>
<%
rs.movenext
loop
rs.close
%>
</select></div>
<div style="height:185px;">
<TEXTAREA name=XH_Content style="margin:0px;width:348px;height:80px;border:0px;overflow:auto;"></TEXTAREA></div>
<div style="color:#366690;background:#eeeeee;height:25px;border-top:1px #cccccc solid dotted;text-align:Center;padding-top:1px;"><input type="submit" value=" 发 送 " style="border:1px #cccccc solid;background:#ffffff;cursor:hand"></div></form>
<%
else
conn.execute("update XH_Player set XH_NewMsg=XH_NewMsg-1 where ID="&Uid&"")
rs("XH_NewMsg")=1
rs.update
%><form name=sendform method=post action='?UID=<%=UID%>' onSubmit='return CheckSend();'>
<div style="color:#366690;background:#eeeeee;height:25px;padding-top:5px;border-bottom:1px #cccccc solid dotted;padding-left:8px;"><font color=red><%=rs("XH_SendUser")%></font> 于 <%=rs("XH_Sendtime")%> 发来纸条:</div>
<div style="overflow:auto;height:80px;padding:8px;border-bottom:1px #cccccc solid dotted;"><%=FpHtmlEnCode(rs("XH_content"))%></div>
<div id="text" style="color:#366690;background:#eeeeee;height:25px;padding-top:5px;border-bottom:1px #cccccc solid dotted;padding-left:8px;">您可以直接在此回复此纸条</div>
<div style="height:80px;">
<TEXTAREA name=XH_Content style="margin:0px;width:348px;height:80px;border:0px;overflow:auto;"></TEXTAREA></div>
<div style="color:#366690;background:#eeeeee;height:25px;border-top:1px #cccccc solid dotted;text-align:Center;padding-top:1px;"><input type="submit" value=" 回 复 " style="border:1px #cccccc solid;background:#ffffff;cursor:hand"><input type="hidden" name="XH_SendUid" value="<%=rs("XH_SendUid")%>"></div></form>
<%
rs.close
end if
closeconn()
%>