| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 602 人关注过本帖
标题:发送短信问题
只看楼主 加入收藏
故事人生
Rank: 2
等 级:论坛游民
帖 子:58
专家分:36
注 册:2010-3-30
结帖率:92.31%
收藏
 问题点数:0 回复次数:3 
发送短信问题
<!--#include file="conn.asp"-->
<!--#include file="session1.asp"-->

<script language=javascript src=../include/mouse_on_title.js></script>
<%call checkmanage("06")%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="css/webedit.css" type="text/css">
</head>
<BODY background="../images/admin/back.gif" bgcolor="#C0C0C0">
<%
action=request("send")
if action<>"ok" then
name=request("name")
id=request("id")
if id<>"" then
Set rs = conn.Execute("select * from sms where id="&id)
name=rs("fname")
huifu=vbcrlf&vbcrlf&vbcrlf&vbcrlf&"======="&rs("fname")&"于"&rs("riqi")&"发送的消息原文======="&vbcrlf&replace(rs("neirong"),"<font color=darkgray>","")
end if
%>

    <table width="98%" border="1"  style="border-collapse: collapse; border-style: dotted; border-width: 0px"  bordercolor="#333333" cellspacing="0" cellpadding="2">
    <form action=hand2.asp method=post name="sms">
    <tr class=backs><td colspan=2 class=td height=18>发送站内消息</td></tr>
    <tr><td width=20% align=right height="18">发 给 谁&nbsp;</td><td>
    <input type=text
    <%
    if request("fw")<>"yes" then response.write "value='"&name&"'"
    %>"
    name="name" size=18 maxlength=26>
    <img src=../images/memo.gif border=0 alt="请填写本站注册会员的ID<br><font color=red>小秘技:发送给所有人,请填写大写的ALL</font>" width="16" height="16"></td></tr>
    <tr><td width=20% align=right height="18">消息内容&nbsp;</td><td>
    <textarea rows="10" name="neirong" style="width=95%; overflow:auto;"><%=huifu%></textarea>
    <tr><td colspan=2>
    <INPUT name="send" TYPE="hidden" value="ok">
    <INPUT name="back" TYPE="hidden" value="<%=request("back")%>">
    <INPUT name=action TYPE="submit" value="发送消息"></td></tr>
    </form>
    </table>
<%

set rs=nothing
end if

if action="ok" then
    if trim(request.form("name"))="" 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 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 len(request.form("neirong"))>500  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  request("name")<>"ALL" then
    set rs=conn.execute("select * from user where username='"&request("name")&"'")
    if rs.eof and rs.bof then
    response.write "<script language='javascript'>"
    response.write "alert('出错了,没有找到"&request("name")&"会员,请检查后重新提交!');"
    response.write "location.href='javascript:history.go(-1)';"
    response.write "</script>"
    response.end
    end if
    end if


    sql="select * from sms"
    set rs=server.createobject("adodb.recordset")
    rs.open sql,conn,1,3
    rs.addnew
          rs("name")=trim(request.form("name"))
        neirong=request.form("neirong")
        neirong=replace(neirong,"=======","<font color=darkgray>======")
          rs("neirong")=neirong
          rs("riqi")=now()
          rs("fname")="admin"

    rs.update   
    rs.close
    conn.close
    set rs=nothing
    set conn=nothing

    where=request("where")
    if where="" then
    url="hand2.asp"
    else
    url=where
    end if

    response.write "<script language='javascript'>"
    response.write "alert('站内消息发送成功!');"
    if request("back")="user" then
    response.write "location.href='user1.asp?action=useredit&id="&request("name")&"';"
    elseif request("back")="hand1" then
    response.write "location.href='hand1.asp';"
    elseif request("back")="hand3" then
    response.write "location.href='hand3.asp';"
    elseif request("back")="hand5" then
    response.write "location.href='hand5.asp';"
    else
    response.write "location.href='hand2.asp';"
    end if
    response.write "</script>"
    response.end
end if%>

</body>
</html>


问题说明,后面给一个用户如 YE 发送短信,就会提示找不到此用户,但是我看了MDB数据库里,有这个用户的.
不知何原因会如此.在些请教各位朋友帮忙查找下原因.

sms
user
数据库有这些数据
搜索更多相关主题的帖子: 短信 
2010-04-23 11:30
故事人生
Rank: 2
等 级:论坛游民
帖 子:58
专家分:36
注 册:2010-3-30
收藏
得分:0 
问题说明,后面给一个用户如 YE 发送短信,就会提示找不到此用户,但是我看了MDB数据库里,有这个用户的.
不知何原因会如此.在些请教各位朋友帮忙查找下原因.

sms
user
数据库有这些数据


发送给所有用户短信功能却又可以用.就发给单独用户不能用.

2010-04-23 11:41
icecool
Rank: 9Rank: 9Rank: 9
等 级:贵宾
威 望:20
帖 子:1215
专家分:1376
注 册:2005-3-14
收藏
得分:0 
乐子?
这个文件还有问题?

http://toorup.3v.do
loading...
2010-04-25 00:08
故事人生
Rank: 2
等 级:论坛游民
帖 子:58
专家分:36
注 册:2010-3-30
收藏
得分:0 
    response.write "<script language='javascript'>"
    response.write "alert('站内消息发送成功!');"
    if request("back")="user" then
    response.write "location.href='user1.asp?action=useredit&id="&request("name")&"';"
    elseif request("back")="hand1" then
    response.write "location.href='hand1.asp';"
    elseif request("back")="hand3" then
    response.write "location.href='hand3.asp';"
    elseif request("back")="hand5" then
    response.write "location.href='hand5.asp';"
    else
    response.write "location.href='hand2.asp';"
    end if
    response.write "</script>"
    response.end
end if%>

搞定了.把红色代码里的USER1.ASP
换成HAND1.ASP就没有问题了


[ 本帖最后由 故事人生 于 2010-4-25 13:14 编辑 ]
2010-04-25 13:12
快速回复:发送短信问题
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.019706 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved