<%dbs="../"%>
<!--#include file="../inc/config.asp"-->
<!--#include file="uccook.asp"-->
<!--#include file="uc.asp"-->
<%
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")
if Mtitle="" then
response.Write "<script >alert('提示：\n\n对不起，标题不能为空...');history.back(-1);</script>"
response.end
end if
sql="select * from h_USER where id >="&request.Form("kaishi")&" and id <="&request.Form("jieshu")&" order by id Asc"
set rsu=server.createobject("adodb.recordset")                     
rsu.open sql,conn,1,1 
do while not rsu.eof  

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")=rsu("id")'收件人ID
	rs("Mtitle")=Mtitle'标题
	rs("Mchar")=Mchar'内容
	rs("Mdu")=0'邮件未读状态
	rs("Rdate")=now()
	rs.update
	rs.close
	set rs=nothing	
	rsu.movenext 
loop
rsu.close
		response.Write "<script >alert('提示：\n\n发送成功...');location.href='main.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="QU.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"><%=adminuser%></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;">  
	  <%kaishi=conn.execute("select TOP 1 id from h_user order by id Asc ")("id")%>
	  <%mowei=conn.execute("select TOP 1 id from h_user order by id desc ")("id")%>
	
		<input name="kaishi" type="text" value="<%=kaishi%>" style="display:none"/> 
		<input name="jieshu" type="text" value="3000" style="display:none"/> 
		
  <input type="submit" name="Submit" value="立即群发/<%=kaishi%>--3000" />
  <%
  for i= 1 to mowei/3000
  p=p+1
  %>
		<input name="kaishi" type="text" value="<%=3000*s+1%>" style="display:none"/> 
		<input name="jieshu" type="text" value="<%=3000*s+3000%>" style="display:none"/> 
  <input type="submit" name="Submit" value="立即群发<%=3000*s+1%>--<%=3000*s+3000%>" />
  <%
  next 
  %></td>
              </tr>
			  </form>
            </table>
			
			
	  </td>
    </tr>
</table>
<!--#include file="end.asp"-->

</BODY></HTML>
