<!--#include file="include/nowshop.asp" -->
<%
call aspsql()
if request("send")="ok" then call send()
%>
<html>
<head>
<title>站内消息-<%=sitename%>-<%=siteurl%></title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<LINK href="images/css.css" type=text/css rel=stylesheet>
<LINK href="list/newhead.css" type=text/css rel=stylesheet>

</head>

<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<center>
<!--#include file="top.asp"-->
<table width="768" border="0" cellspacing="0" cellpadding="0">
  <tr> 
      <td width="186" align="center" valign="top" bgcolor="#f4f5fd"><!--#include file="zuo_member.asp"--></td>
    <td align="center" valign="top"> <TABLE width=560 border=0 cellPadding=0 cellSpacing=0 bordercolor="#587ad9">
        <TBODY>
          <TR> 
            <TD height=12><table>
                  <tr> 
                    <td align="center" valign="middle"><TABLE cellSpacing=0 cellPadding=0 width=547 border=0 style="BORDER-RIGHT: #b1bfee 1px solid; BORDER-TOP: #b1bfee 1px solid; BORDER-LEFT: #b1bfee 1px solid; BORDER-BOTTOM: #b1bfee 1px solid" 
>
                        <TBODY>
                          <TR> 
                            <TD bgColor=#f4f5fd height=25><font color="#000000">　站内消息：</font></TD>
                          </TR>
                        </TBODY>
                      </TABLE></td>
                  </tr>
                  <tr> 
                    <td align="center" valign="middle">
					
<form name="add" method="post" action="mymsg_hand.asp">

<%
id=request("id")
if id<>"" then
Set rs = conn.Execute("select * from hand1 where id="&id) 
if not (rs.eof and rs.bof) then
'避免通过回复消息的方式偷看别人的消息
if rs("name")=request.cookies("buyok")("userid") then
huifu=vbcrlf&vbcrlf&vbcrlf&vbcrlf&"======="&rs("fname")&"于"&rs("riqi")&"发送的消息原文======"&vbcrlf&replace(rs("neirong"),"<font color=darkgray>","")
end if
end if
set rs=nothing
end if
%>
	
                        <table width="547" border="0" cellpadding="4" cellspacing="0" bordercolor="#C0C0C0" align=center bordercolordark="#FFFFFF" style="BORDER-RIGHT: #b1bfee 1px solid; BORDER-TOP: #b1bfee 1px solid; BORDER-LEFT: #b1bfee 1px solid; BORDER-BOTTOM: #b1bfee 1px solid">
                          <tr>
                            <td align="center" valign="middle"><table width="100%" border="0">
                                <tr> 
                                  <td>你的姓名：</td>
                                  <td><input name="hk4" type="text" size="20" maxlength="25" class=regtxt></td>
                                  <td>您的E-mail：</td>
                                  <td><input name="hk8" type="text" size="20" maxlength="100" class=regtxt></td>
                                </tr>
                              </table></td>
                          </tr>
						                            <tr>
                            <td>给管理员发送站内消息：</td></tr>

                          <tr>
                            <td align="center" valign="middle"> <textarea rows="15" name="neirong" cols="75" class=regtxt3><%=huifu%></textarea> 
                            </td>
                          </tr>
                          <tr>
                            <td height=50 align=center><input type="submit" value="立即发送" name="" class=button>
                              &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <input type="reset" value="重新填写" class=button>
                              <input name="send" type="hidden" value="ok"></td>
                          </tr>
                        </table>  
</form>
                      </td>
                  </tr>
                </table></TD>
          </TR>
        </TBODY>
      </TABLE>
    </td>
  </tr>
</table>
<!--#include file="down.asp"-->
</center>

</body>
</html>
<%
sub send()
call buyok_check_path()

	if request.form("neirong")=""  then
	response.write "<script language='javascript'>"
	response.write "alert('出错了，没有填写要发送的内容！');"
	response.write "location.href='javascript:history.go(-1)';"
	response.write "</script>"
	response.end
	end if

	if llen(request.form("neirong"))>1000  then
	response.write "<script language='javascript'>"
	response.write "alert('出错了，您填写的内容太长了，请检查后重新提交！');"
	response.write "location.href='javascript:history.go(-1)';"
	response.write "</script>"
	response.end
	end if

	sql="select * from hand1"
	set rs=server.createobject("adodb.recordset")
	rs.open sql,conn,1,3
	rs.addnew
  	rs("name")="admin"
	neirong=request.form("neirong")
	hk4=request.form("hk4")
	hk8=request.form("hk8")
	neirong=replace(neirong,"=======","<font color=darkgray>======")
  	rs("neirong")=neirong
	rs("hk4")=hk4
  	rs("hk8")=hk8
  	rs("riqi")=now()
 	rs("fname")=request.cookies("buyok")("userid")
	rs.update	
	rs.close
	set rs=nothing

	response.write "<script language='javascript'>"
	response.write "alert('操作成功，已向管理员发送一条站内消息！');"
	response.write "location.href='mymsg_hand.asp';"
	response.write "</script>"
	response.end
end sub

conn.close
set conn=nothing
%>

