msgsave.asp
资源名称:qnmov30.rar [点击查看]
上传用户:qyswxdl
上传日期:2013-06-01
资源大小:1373k
文件大小:2k
源码类别:
家庭/个人应用
开发平台:
ASP/ASPX
- <!--#include file="articleconn.asp"-->
- <!--#include file="security.asp"-->
- <%
- if session("flag")>1 then
- response.write "<br><p align=center>您没有操作的权限</p>"
- response.end
- end if
- %>
- <LINK href="images/forum_admin.css" type=text/css rel=stylesheet>
- <body bgColor=#d6d3ce
- style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; BORDER-RIGHT: 0px; BORDER-TOP: 0px; MARGIN: 0px">
- <%
- if request.form("rvauthor")="" then%>
- <script language="javascript">
- alert ( "对不起,您可能忘了填上您的大名啦!");
- history.go(-1);
- </script>
- <%response.end
- end if
- if request.form("userName")="" then%>
- <script language="javascript">
- alert ( "对不起,您还没说要送给谁呢!");
- history.go(-1);
- </script>
- <%response.end
- end if
- if trim(request.form("rvcontent"))="" then%>
- <script language="javascript">
- alert ("对不起,评论内容不能为空!");
- history.go(-1);
- </script>
- <%response.end
- end if
- if len(request.form("rvcontent"))>800 then%>
- <script language="javascript">
- alert( "对不起,评论内容不能大于800个字节")
- history.go(-1);
- </script>
- <%response.end
- end if
- dim rvauthor,userName,reviewtitle,review,userRS,userSQL
- rvauthor=chkcookie(request.form("rvauthor"))
- review=chkcookie(request.form("rvcontent"))
- reviewtitle=chkcookie(request("rvname"))
- userName=chkcookie(request("userName"))
- set userRS=server.createobject("adodb.recordset")
- select case userName
- case "allusers"
- userSQL="select id from Users where oklook=0"
- case "alluser"
- userSQL="select id from Users where oklook=1 or oklook=2"
- case "moneyuser"
- userSQL="select id,baoyue from Users where oklook=3"
- case "vipuser"
- userSQL="select id,baoyue from Users where oklook=4"
- case else
- userSQL="select id,Userid from Users where Userid='"&request.form("userName")&"'"
- end select
- userRS.open userSQL,conn,1,1
- if userRS.bof and userRS.eof then
- response.Write("<script language='javascript' type='text/javascript'>alert ('对不起,用户不存在!');history.go(-1);</script>")
- response.End
- end if
- dim msgRS,savrSQL
- set msgRS=server.createobject("adodb.recordset")
- savrSQL="select * from UserMsg"
- msgRS.open savrSQL,conn,1,3
- do while not userRS.eof
- msgRS.addnew
- msgRS("infoName")=reviewtitle
- msgRS("UserId")=userRS("id")
- msgRS("sendman")=rvauthor
- msgRS("MsgContent")=review
- msgRS.update
- userRS.movenext
- loop
- msgRS.close
- set msgRS=nothing
- userRS.close
- set userRS=nothing
- set conn=nothing
- %>
- <script language="javascript" type="text/javascript">
- alert ("信息已发送!");
- window.close();
- </script>
- </body>