savereview.asp
资源名称:qnmov30.rar [点击查看]
上传用户:qyswxdl
上传日期:2013-06-01
资源大小:1373k
文件大小:2k
源码类别:
家庭/个人应用
开发平台:
ASP/ASPX
- <!--#include file="articleconn.asp"-->
- <!--#include file="inc/articlechar.inc"-->
- <%
- if request.form("reviewname")="" then
- ' Request.Form("reviewname")
- 'response.redirect"index.asp"
- response.write"<script>alert('请填写您的大名!');</Script><script Language=Javascript>location.href = 'javascript:history.go(-1)';</script>"
- response.end
- end if
- if request.form("review")="" then
- ' Request.Form("review")
- 'response.redirect"index.asp"
- response.write"<script>alert('评论内容不能为空,请重新输入!');</Script><script Language=Javascript>location.href = 'javascript:history.go(-1)';</script>"
- response.end
- end if
- if len(request.form("review"))>800 then
- response.write"<script>alert('评论内容不能太多,请重新输入!');</Script><script Language=Javascript>location.href = 'javascript:history.go(-1)';</script>"
- response.end
- end if
- reviewname=htmlencode2(request.form("reviewname"))
- reviewemail=htmlencode2(request.form("reviewemail"))
- review=htmlencode2(request.form("review"))
- face=Request.Form("face")
- reviewurl=Request.Form("reviewurl")
- articleid=clng(request("id"))
- reviewtitle=request("reviewtitle")
- IP=Request("REMOTE_ADDR")
- set rs=server.createobject("adodb.recordset")
- sql="select review,reviewcount from learning where articleid="&articleid
- rs.open sql,conn,3,3
- rs("reviewcount")=rs("reviewcount")+1
- rs("review")=rs("review")&"<br><img src=images/mood"&face&".gif><font color=red> 评论者:</font>"&reviewname&_
- "<font> </font><font face=""Wingdings""></font><font color=red>个人网页:</font><a href="""&reviewurl&""">"_
- &reviewurl&"</a><table bgcolor=""#F7F7F7"" cellspacing=""0"" cellpadding=""5"" border=""0"" width=""100%"" align=""center""><tr><td width=""100%"" style=""font-size:9pt""><strong><font color=green>"&reviewtitle&"</font></strong><br>"&_
- review&"<br><br><font style=""font-size:8pt"">--发表日期:"&date()&"<br>[来自: "&ip&"]</font><br></td></tr></table> "
- rs.update
- response.redirect "re.asp?ID="&clng(request("id"))
- rs.close
- set rs=nothing
- conn.close
- set conn=nothing
- %>
- <head>
- <meta name="GENERATOR" content="Microsoft FrontPage 4.0">
- <meta name="ProgId" content="FrontPage.Editor.Document">
- </head>
- </body>
- </html>