⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 commentlist.asp

📁 小说站源代码文件
💻 ASP
📖 第 1 页 / 共 2 页
字号:
<%
dim UserID,UserName
UserID=request.cookies("CnEndWeb_User")("log_UserID")
UserName=request.cookies("CnEndWeb_User")("log_UserName")
id=CheckSql(request("id"))
CheckSqlnum(id)
id=int(id)

Select Case request.querystring("info")
	Case "book"
		Call book()
	Case "author"
		Call author()
	Case "user"
		Call user()
end select 

Sub book()

set rs_s=server.createobject("adodb.recordset")
sql="select Lock_book,list_name,Lock_lun from list_book where id="&id&""
rs_s.open sql,conn,1,1
if not(rs_s.bof and rs_s.eof) then
	else
	response.write "<script language=javascript>alert('对不起,您要查看的作品不存在或已经被删除! \n\n 可能该作品不存在或包含国家或者本站禁止的内容 \n\n 您如果是该作品的管理员或作者,请联系站长!');history.back(-1);</script>"
	response.end 
end if
if rs_s("Lock_book") = 1 then
	response.write "<script language=javascript>alert('对不起,您要查看的作品已经被锁定! \n\n 可能该作品包含国家或者本站所禁止的内容. \n\n 您如果是该作品的管理员或作者,请联系站长!');history.back(-1);</script>"
	response.end 
end if
%>		<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" bordercolordark="white" bordercolorlight="cccccc" bordercolor="white">
			<tr>
				<td height="30" align="center" class="font"><br>
				<font face="隶书" size="4" color="#800000">《<%=rs_s("list_name")%>》的全部评论</font>
				<hr size="3"></td>
			</tr>
			<tr>
				<td><%
	Set rsp1 = Server.CreateObject("ADODB.Recordset")
	sql = "select IsGood,Content,UserName,WriteTime from Comment where type_ID="&id&" and IsTop=1 and Commenttype=1 order by Commentid desc"
	rsp1.open sql, conn, 1, 3
	
if rsp1.eof and rsp1.bof then%>
            <%else%>
            <table width="96%" border="0" align="center" cellpadding="0" cellspacing="0">
<%do while not rsp1.eof%>
                <tr>
                    <td style="PADDING-BOTTOM: 3px;PADDING-top: 5px;line-height:150%;">※ <font color=#FF0000>[置顶]</font><%if rsp1("IsGood")=1 then response.write " <font color=#FF0000>[精华]</font>" end if%> <%=rsp1("Content")%></td>
                    <td align="right" width="130"><%=rsp1("UserName")%>〈<%=formatdatetime(rsp1("WriteTime"),2)%>〉</td>
                </tr>
                <tr>
                	<td colspan="2" bgcolor="#666666" align="center" height="1"></td>
                </tr>
<%
rsp1.movenext
loop
%>
                </tr>
            </table>
<%end if
rsp1.close
set rsp1=nothing
	Set rsp = Server.CreateObject("ADODB.Recordset")
	sql = "select IsGood,Content,UserName,WriteTime from Comment where type_ID="&id&" and IsTop=0 and Commenttype=1 order by Commentid desc"
	rsp.open sql, conn, 1, 3

if rsp.eof and rsp.bof then%>
                        <table width="96%" border="0" align="center" cellpadding="0" cellspacing="0">
                            <tr>
                                <td align="center" class="font">没有数据可查询</td>
                            </tr>
                        </table>
            <%else%>
            <table width="96%" border="0" align="center" cellpadding="0" cellspacing="0">
<%do while not rsp.eof%>
                <tr>
                    <td style="PADDING-BOTTOM: 3px;PADDING-top: 5px;line-height:150%;">※ <%if rsp("IsGood")=1 then response.write "<font color=#FF0000>[精华]</font> " end if%><%=rsp("Content")%></td>
                    <td align="right" width="130"><%=rsp("UserName")%>〈<%=formatdatetime(rsp("WriteTime"),2)%>〉</td>
                </tr>
                <tr>
                	<td colspan="2" bgcolor="#666666" align="center" height="1"></td>
                </tr>
<%
rsp.movenext
loop
%>
                </tr>
            </table>
<%end if
rsp.close
set rsp=nothing%></td>
			</tr>
		</table><br>
		<%if rs_s("Lock_lun")=0 then%>
				<table width="95%" border="0" align="center" cellpadding="0" cellspacing="0" bordercolordark="white" bordercolorlight="cccccc" bordercolor="white">
					<tr>
						<td height="27" width="25" align="lift" valign="top" class="font">
						</td>
						<td height="27" align="left">
						<table border="0" cellspacing="0" cellpadding="0" width="97%" align="left" valign="top">
							<form action="CommentSave.asp?act=book&id=<%=id%>" method="post" name="bookup">
								<tr>
									<td width="100%" class="xt" valign="top" class="font">&nbsp;&nbsp;&nbsp;
									<input type="text" name="001" <%if username="" or isnull(userid) then response.write("value='您没有登陆,注册用户发表评论可得积分!'") else response.write("value='您已经登陆,请发表书评!'")%> disabled size="38">&nbsp; 
									*<%if WebpinglunLOCKNum=1 then
randomize
randm=Int((900000*rnd)+100000)
response.write "验证码:<input name=randm1 type=text class=form size=10 maxlength=20><input type=hidden name=randm2 value="&randm&">"
response.write "<span style='font-family: Georgia;border: 1 solid #808080;background-color: #e8e8e8'>&nbsp;<b>"&randm&"</b></span>"
end if%></td>
								</tr>
								<tr>
									<td align="left" width="100%" class="xt" valign="top" class="font">&nbsp;&nbsp;&nbsp;
									<textarea rows="6" cols="100" name="Content" maxlength="230" class="think" style="width: 600; height: 100"></textarea><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
									<input type="button" value="计算字数" class="stbtm" onclick="javascript:alert(&quot;帖子内容长度: &quot;+document.bookup.Content.value.length+&quot; 个字,\n最多允许<%=CommentSize%>字。&quot;);">
									<input title="严禁使用任何html、javascript脚本或其他非法性字符,请少于<%=CommentSize%>字!" type="submit" value="发送书评" class="stbtm" name="sendup" onclick="bookupsubmit();">&nbsp; 
									严禁使用任何html、javascript脚本或其他非法性字符&nbsp;&nbsp;&nbsp;&nbsp; 
									</td>
								</tr>
							</form>
						</table>
						
						</td>
					</tr>
				</table><%else%>
						<table width="95%" border="0" align="center" cellpadding="0" cellspacing="0" bordercolordark="white" bordercolorlight="cccccc" bordercolor="white">
					<tr>
						<td height="150" align="center"><b><font color="#FF0000">本书评论已锁定不能发表书评,如有问题请发站内短信给管理员。</font></b></td>
					</tr>
				</table><%
end if
rs_s.close
set rs_s=nothing
end sub%>

<%Sub author()
set rs_s=server.createobject("adodb.recordset")
sql="select author_name,author_lock from author where author_id="&id&""
rs_s.open sql,conn,1,1
if not(rs_s.bof and rs_s.eof) then
	else
	response.write "<script language=javascript>alert('对不起,您要查看的作家不存在或已经被删除! ');history.back(-1);</script>"
	response.end 
end if
if rs_s("author_lock") = 1 then
	response.write "<script language=javascript>alert('对不起,您要查看的作家已经被锁定! ');history.back(-1);</script>"
	response.end 
end if
%>
		<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
			<tr>
				<td height="30" align="center" class="font"><br>
				<font face="隶书" size="4" color="#800000">《<%=rs_s("author_name")%>》的全部评论</font>
				<hr size="3"></td>
			</tr>
			<tr>
				<td><% 	Dim rsp
	Set rsp = Server.CreateObject("ADODB.Recordset")
	sql = "select IsGood,Content,UserName,WriteTime from Comment where type_ID="&id&" and IsTop=1 and Commenttype=2 order by Commentid desc"
	rsp.open sql, conn, 1, 1
	if rsp.eof and rsp.bof then%>
				<%else%>
				<table width="96%" border="0" align="center" cellpadding="0" cellspacing="0">
					<%do while not rsp.eof%>
					<tr>
						<td style="PADDING-BOTTOM: 3px;PADDING-top: 5px;line-height:150%;">
						※ <font color=#FF0000>[置顶]</font><%if rsp("IsGood")=1 then response.write " <font color=#FF0000>[精华]</font>" end if%> <%=rsp("Content")%></td>
						<td align="right" width="130"><%=rsp("UserName")%>〈<%=formatdatetime(rsp("WriteTime"),2)%>〉</td>
					</tr>
					<tr>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -