📄 review_spec.asp
字号:
<!-- #include file="film_conn.asp" -->
<!-- #include file="film_conn_view.asp" -->
<%if request("n")=1 then%>
<%
if request.cookies("userid")="" then errmsg=errmsg & "未注册用户不能发表评论!\n"
if trim(request("penname")) ="" then errmsg=errmsg & "昵称不能为空!\n"
if trim(request("review_text")) ="" then errmsg=errmsg & "评论内容不能为空!\n"
if errmsg<>"" then
response.write("<script>alert('" & errmsg & "');history.go(-1)</script>")
response.end
end if
penname=trim(request("penname"))
badwords1=""&bad_words&""
badwords1=split(badwords1,",")
for i = 0 to ubound(badwords1)
if instr(penname,badwords1(i))>0 then
penname=replace(penname,badwords1(i),"***")
end if
next
content=trim(request("review_text"))
badwords1=""&bad_words&""
badwords1=split(badwords1,",")
for i = 0 to ubound(badwords1)
if instr(content,badwords1(i))>0 then
content=replace(content,badwords1(i),"***")
end if
next
penname=penname
vote=cint(request("vote"))
review_text=content
fid=trim(request("id"))
user_id=request.cookies("userid")
film_name=trim(request("film_name"))
sql="select * from spec_review"
set rs=server.createObject("ADODB.recordset")
rs.open sql,connr,1,3
rs.addnew
rs("fid")=fid
rs("penname")=penname
rs("vote")=vote
rs("review_text")=review_text
rs("user_id")=user_id
rs("film_name")=film_name
rs("ip")=Request.ServerVariables("REMOTE_ADDR")
rs("addtime")=now()
rs.update
response.redirect "review_spec.asp?id="&request("id")&"&name="&request("film_name")&""
rs.close
set rs=nothing
connr.close
end if
%>
<html>
<head>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<LINK href="images/style.css" type=text/css rel=stylesheet>
<script src=images/site.jpg></script>
<title>查看评论--<%=request("name")%></title>
<script Language="JavaScript">
<!--
function check(theForm)
{
if (theForm.penname.value.length<2)
{
alert("对不起,笔名应在2个字符以上!");
theForm.penname.focus();
return (false);
}
if (theForm.penname.value.length>10)
{
alert("对不起,笔名应在10个字符以内!");
theForm.penname.focus();
return (false);
}
if (theForm.review_text.value.length<2)
{
alert("对不起,评论内容不能小于2个字符!");
theForm.review_text.focus();
return (false);
}
if (theForm.review_text.value.length>500)
{
alert("对不起,评论内容不能大于500个字符!");
theForm.review_text.focus();
return (false);
}
return true;
}
//-->
</script>
</head>
<body topmargin="0" leftmargin="0" oncontextmenu="window.event.returnValue=false" ondragstart="window.event.returnValue=false" onselectstart="event.returnValue=false">
<div align="center">
<center>
<TABLE cellSpacing=0 cellPadding=0 width=610 border=0 style="border-collapse: collapse" bordercolor="#111111">
<TBODY>
<TR bgColor=#ffffff>
<TD vAlign=top style="font-size: 12px">
<TABLE cellSpacing=0 cellPadding=0 width=100 border=0>
<TBODY>
<TR>
<TD height=8 style="font-size: 12px">
<IMG height=8
src="images/dot.gif"
width=18></TD></TR></TBODY></TABLE>
<%
sql="select * from spec_review where fid="&request("id")&" order by id desc"
set rsf=server.createObject("ADODB.recordset")
rsf.open sql,connr,1,1
%>
<TABLE cellSpacing=0 cellPadding=4 width="561"
align=center border=0>
<TBODY>
<TR>
<TD height=25 style="font-size: 12px" width="280">评论专辑:<font color=red><%=request("name")%></font></TD>
<TD height=25 align=right style="font-size: 12px" width="281"><a href="javascript:location.reload()">
刷新页面</a> <a href="#review">发表评论</a></TD></TR>
<%if rsf.eof then%><TR>
<TD height=25 align=center style="font-size: 12px" width="553" colspan="2">暂时没有任何评论!欢迎您积极发表。请文明用词,谢谢!</TD></TR>
<%else
if request("page")<>"" then
curpage=cint(request("page"))
else
curpage=1
end if
num=8
rsf.pagesize=num
rsf.absolutepage=curpage
%>
<TR>
<TD height=30 style="font-size: 12px" width="553" colspan="2"><DIV align=center>每页显示<font color=red><%=num%></font>条/共<font color=red><%=rsf.recordcount%></font>条 第<font color=red><%=curpage%></font>页/共<font color=red><%=rsf.pagecount%></font>页
<%if curpage<=1 then%>首页 上页
<%else%><a href="review_spec.asp?id=<%=request("id")%>&page=1#1">首页</a> <a href="review_spec.asp?id=<%=request("id")%>&page=<%=(curpage-1)%>#1">上页</a>
<%end if%>
<%if curpage>=rsf.pagecount then%>下页 尾页
<%else%><a href="review_spec.asp?id=<%=request("id")%>&page=<%=(curpage+1)%>#1">下页</a> <a href="review_spec.asp?id=<%=request("id")%>&page=<%=rsf.pagecount%>#1">尾页</a>
<%end if%></TD></TR></TBODY></TABLE>
<TABLE height=2 cellSpacing=0 cellPadding=0 width="92%"
align=center background=images/txwm_line_1.gif
border=0>
<TBODY>
<TR>
<TD height=2 style="font-size: 12px">
<IMG height=2
src="images/dot.gif"
width=10></TD></TR></TBODY></TABLE>
<TABLE height=2 cellSpacing=0 cellPadding=0 width="92%"
align=center background=images/txwm_line_1.gif
border=0>
<TBODY>
<TR>
<TD height=2 style="font-size: 12px">
<IMG height=2
src="images/dot.gif"
width=10></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE>
</center>
</div>
<tr>
<TD height=39 width="553" colspan="2">
<div align="center">
<center>
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="95%" id="AutoNumber2">
<%
i=0
do while not rsf.eof
%>
<tr>
<TD width="4%" height=22 style="font-size: 12px">
<IMG height=16
src="images/036.gif" width=15></TD>
<TD width="96%" height=22 style="font-size: 12px"><FONT
color=#ff0000><%=rsf("penname")%></FONT><FONT color=#666666> 于
<%=rsf("addtime")%> 发表 评分:<%if rsf("vote")=1 then%>☆<%elseif rsf("vote")=2 then%>☆☆<%elseif rsf("vote")=3 then%>☆☆☆<%elseif rsf("vote")=4 then%>☆☆☆☆<%elseif rsf("vote")=5 then%>☆☆☆☆☆<%else%>未评分<%end if%></FONT></TD>
</tr>
<tr>
<TD colSpan=2 style="font-size: 12px">
<TABLE height=2 cellSpacing=0 cellPadding=0
width="100%" align=center
background=images/txwm_line_1.gif border=0>
<TBODY>
<TR>
<TD height=2 style="font-size: 12px">
<IMG height=2
src="images/dot.gif"
width=10></TD></TR></TBODY></TABLE></TD>
</tr>
<tr bgColor=#f7f7f7>
<TD width="100%" colSpan=2 height=22 style="font-size: 12px">
<TABLE cellSpacing=0 cellPadding=4 width="98%"
align=center border=0>
<TBODY>
<TR>
<TD style="font-size: 12px"><%=rsf("review_text")%></TD></TR></TBODY></TABLE></TD>
</tr>
<tr>
<TD width="100%" colSpan=2 style="font-size: 12px">
<TABLE height=2 cellSpacing=0 cellPadding=0
width="100%" align=center
background=images/txwm_line_1.gif border=0>
<TBODY>
<TR>
<TD height=2 style="font-size: 12px">
<IMG height=2
src="images/dot.gif"
width=10></TD></TR></TBODY></TABLE></TD>
</tr>
<tr>
<TD colSpan=2 style="font-size: 12px">
<TABLE height=2 cellSpacing=0 cellPadding=0
width="100%" align=center
background=images/txwm_line_1.gif border=0>
<TBODY>
<TR>
<TD height=2 style="font-size: 12px">
<IMG height=2
src="images/dot.gif"
width=10></TD></TR></TBODY></TABLE></TD>
</tr>
<% i=i+1
if i>=Num then exit do
rsf.movenext
loop
%>
</table>
</center>
</div>
<TR>
<TD height=30 width="553" colspan="2"><DIV align=center style="font-size: 12px">每页显示<font color=red><%=num%></font>条/共<font color=red><%=rsf.recordcount%></font>条 第<font color=red><%=curpage%></font>页/共<font color=red><%=rsf.pagecount%></font>页
<%if curpage<=1 then%>首页 上页
<%else%><a href="review_spec.asp?id=<%=request("id")%>&page=1#1">首页</a> <a href="review_spec.asp?id=<%=request("id")%>&page=<%=(curpage-1)%>#1">上页</a>
<%end if%>
<%if curpage>=rsf.pagecount then%>下页 尾页
<%else%><a href="review_spec.asp?id=<%=request("id")%>&page=<%=(curpage+1)%>#1">下页</a> <a href="review_spec.asp?id=<%=request("id")%>&page=<%=rsf.pagecount%>#1">尾页</a>
<%end if%></TD></TR>
<%
end if
rsf.close
set rsf=nothing
connr.close
set connr=nothing '-------评论结束%>
<tr>
<TD height=39>
<div align="center">
<center>
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="95%" id="AutoNumber3">
<tr>
<TD height=30 style="font-size: 12px"> </TD></tr>
<%if request.cookies("userid")<>"" and request.cookies("password")<>"" and request.cookies("okerer")<>"" then%><FORM action=?n=1 method=post onSubmit="return check(this);"><%end if%>
<tr>
<TD height=30 style="font-size: 12px"><A name=review></A>您的昵称
<INPUT
style="BORDER-RIGHT: #000000 1px solid; BORDER-TOP: #000000 1px solid; BORDER-LEFT: #000000 1px solid; COLOR: #000000; BORDER-BOTTOM: #000000 1px solid; BACKGROUND-COLOR: #ffffff"
size=14 name=penname value="<%=request.cookies("userid")%>"> 我要打分<select size="1" name="vote">
<option value="0">不打分</option>
<option value="1">☆</option>
<option value="2">☆☆</option>
<option value="3">☆☆☆</option>
<option value="4">☆☆☆☆</option>
<option value="5">☆☆☆☆☆</option>
</select> </TD>
</tr>
<tr>
<TD height=25 style="font-size: 12px">
<TEXTAREA name=review_text rows=4 cols=75><%if request.cookies("userid")<>"" and request.cookies("password")<>"" and request.cookies("okerer")<>"" then%><%else%>只有注册用户才能发表评论,请先登录或注册!<%end if%></TEXTAREA>
<INPUT type=hidden value=<%=request("name")%> name=film_name>
<INPUT type=hidden value=<%=request("id")%> name=id> </TD>
</tr><TR>
<TD height=30>
<INPUT type=image height=18
width=42 src="images/go6.gif" size="20"> <IMG height=18 src="images/go7.gif" width=42> </TD></TR><%if request.cookies("userid")<>"" and request.cookies("password")<>"" and request.cookies("okerer")<>"" then%></FORM><%end if%><tr>
<TD height=25 style="font-size: 12px"> </TD>
</tr>
</table>
</center>
</div>
</div>
<div align="center" style="font-size: 12px"><a href="javascript:window.close()">[关闭窗口]</a></p>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -