<%dbs="../"%>
<!--#include file="../inc/config.asp"-->
<!--#include file="uccook.asp"-->
<!--#include file="uc.asp"-->
<%
HMuser=request("HMuser")
HMtxt=request("HMtxt")
if HMtxt<>"" then
HMtxt="Re:"&request("HMtxt")
end if
act=request("act")
if act="sms" then
Mtitle=Replace(Replace(Left(request.Form("Mtitle"),100),"<","["),">","]")
Mchar=request.Form("Mchar")
Mchar=replace(Mchar,"table","&lt;table")
Mchar=replace(Mchar,"SCRIPT ","&lt;SCRIPT")
Mchar=replace(Mchar,"javascript ","&lt;javascript")
yourname=request.Form("yourname")
if yourname="" then
response.Write "<script >alert('提示：\n\n对不起，收件人不能为空...');history.back(-1);</script>"
response.end
end if

sql="select * from H_user  where ucuser='"&yourname&"'"
set rs=server.createobject("adodb.recordset")                     
rs.open sql,conn,1,1 
if rs.eof then
response.Write"<script >alert('提示：\n\n对不起，填写的用户名可能是错误的...');history.back(-1);</script>"
response.End()
else
yourID=rs("ID")
end if 
rs.close
if Mtitle="" then
response.Write "<script >alert('提示：\n\n对不起，标题不能为空...');history.back(-1);</script>"
response.end
end if

set rs=Server.CreateObject("Adodb.Recordset")
	sql="select * from H_Message"
	rs.open sql,conn,1,3
	rs.addnew
	rs("UID")=conn.execute("select ID from H_user where ucuser='"&E_user&"'")("ID")'发送人ID
	rs("YID")=yourID'收件人ID
	rs("Mtitle")=Mtitle'标题
	rs("Mchar")=Mchar'内容
	rs("Mdu")=0'邮件未读状态
	rs("Rdate")=now()
	rs.update
	rs.close
	set rs=nothing	
	response.Write "<script >alert('提示：\n\n发送成功...');location.href='MReceived.asp';</script>"
	end if
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
<HTML xmlns="http://www.w3.org/1999/xhtml">
<HEAD>
<title><%=W_title%>,会员中心</title>

<META http-equiv=Content-Type content="text/html; charset=gb2312">
<LINK href="style.css" type=text/css rel=stylesheet>
<SCRIPT language=javascript src="images/jquery.js" 
type=text/javascript></SCRIPT>

<SCRIPT language=javascript src="images/function.js" 
type=text/javascript></SCRIPT>

<SCRIPT language=javascript type=text/javascript>
<!--


/*
function AddnewType()
*/
-->
</SCRIPT>

<META content="MSHTML 6.00.3790.4426" name=GENERATOR>
</HEAD>
<BODY><!--用户中心头部-->
<!--#include file="top.asp"-->
<table width="960" border="0" cellpadding="0" cellspacing="0">
    <tr>
        <td width="150" valign="top"><!--#include file="left.asp"--></td>
      <td width="810" align="right" valign="top"><table width="800" border="0" cellpadding="0" cellspacing="0">
            <tr>
                <td width="20" align="center"><img src="images/ico_4.gif" width="12" height="12"></td>
                <td height="30" align="left"><a href="index.asp" target="_self">用户中心</a> <span class="uc_huise">&gt; 发短信</span></td>
            </tr>
            <tr>
                <td height="1" colspan="2" bgcolor="#EEEEEE"></td>
        </tr>
        </table>
            <table width="600" height="5" border="0" cellpadding="0" cellspacing="0">
                <tr>
                    <td></td>
                </tr>
            </table>
		
		
		
		
		
		    <table width="800" border="0" cellpadding="0" cellspacing="0">
			<form action="MU.asp?act=sms" method="post" target="_self">
              <tr>
                <td width="66" height="25">发 件 人：</td>
				<input name="ucuser" type="text"value="<%=adminuid%>" style="display:none" />
                <td width="718" align="left">系统管理人员</td>
              </tr>
              <tr>
                <td height="25">收 件 人：</td>
                <td align="left"><input name="yourname" type="text" id="yourname" value="<%=HMuser%>" size="88">
                请填写对方的用户名</td>
              </tr>
              <tr>
                <td height="25"><span style="padding-right:25px;">主</span>题：</td>
                <td align="left"><input name="Mtitle" type="text" id="Mtitle" value="<%=HMtxt%>" size="88"></td>
              </tr>
              <tr>
                <td height="1" colspan="2" bgcolor="#E9FFB5"></td>
              </tr>
              <tr>
                <td><span style="padding-right:25px;">内</span>容：</td>
                <td height="238" align="left"><textarea name="Mchar" style="display:none"></textarea> 
					  <!--<iframe id="Editor" name="Editor" src="../HtmlEditor/index.html?ID=Mchar" frameborder="0" marginheight="0"     marginwidth="0" scrolling="No" style="height:225px;width:600px;"></iframe>-->
					  <IFRAME ID="eWebEditor1" SRC="../Redit/ewebeditor.htm?id=Mchar&style=mail" FRAMEBORDER="0" SCROLLING="no" WIDTH="600" HEIGHT="300"></IFRAME>
					  </td>
              </tr>
              
              <tr>
                <td colspan="2" bgcolor="#CAFF4D"></td>
              </tr>
              <tr>
                <td height="30" align="center">&nbsp;</td>
                <td height="30" align="left" style="padding-left:20px;"><input name="Submit" type="submit" class="UCform" value="立即发送"></td>
              </tr>
			  </form>
            </table>
			
			
			</td>
    </tr>
</table>
<!--#include file="end.asp"-->

</BODY></HTML>
