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

📄 book.asp

📁 网站整站
💻 ASP
📖 第 1 页 / 共 3 页
字号:
rsdel.movenext
loop
rsdel.close
set rsdel=nothing
'批量删除留言本回复
set rsdelurl= server.createobject("adodb.recordset")
rsdelurl.open sqldelurl,conn,1,3
do while not rsdelurl.eof
rsdelurl.delete
rsdelurl.movenext
loop
rsdelurl.close
set rsdelurl=nothing
YC("<script>location.href='book.asp';</script>")
case "killbookreply"
	if gobook<>"yes" then
	if supertype<>1 then
YCGO("error.asp?action=back&text="&server.urlencode("系统无法识别您的身份!"))
response.end
	end if
	end if
'删除单个回复
YC_sql("delete * from [YC_bookreply] where id="&request.querystring("id")&" and bookid="&request.querystring("bookid"))
response.redirect Request.ServerVariables("HTTP_REFERER")
case else
     call book()
     call NowWhere("留言讨论","book.asp")
end select
%>
<table border="0" cellspacing="0" cellpadding="0" width=""100%"">
<tr>
<td  class="777" nowrap></td>
<td class="888" nowrap></td>
<td class="999" nowrap></td>
</tr></table>
</td></tr></table>

<%
call foot()
'┏━━━━┓
'┃留言列表┃
'┗━━━━┛
sub book()
YC("<table border=""0"" cellspacing=""0"" cellpadding=""0"" width=""100%""><tr><td class=""444"" nowrap></td><td class=""555"" valign=""top"" nowrap>")
sql="select id,title,color,user,replyuser,date,replydate,click,reply From [YC_book] order By lastupdatetime Desc"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
YC("<form  method=""post"" name=""form"" id=""form"" action=""book.asp?action=delallbook"" onsubmit=""return downdel();""><table border=""1"" width=""100%"" bordercolor="""&color(0)&""" align=""center"" frame=""void"">")
if not rs.bof and not rs.eof then
YC("<tr height=""25"" bgcolor="""&color(2)&""">")
YC("<td width=""5%""  align=""center"">状态</td>")
YC("<td width=""50%""  align=""center"">留言主题</td>")
YC("<td width=""10%"" align=""center"" nowrap>发布人</td>")
YC("<td width=""10%"" align=""center"" nowrap>点击/回复</td>")
YC("<td width=""15%"" align=""center"" nowrap>最后更新<font face='webdings'>6</font></td>")
YC("<td width=""10%"" align=""center"" nowrap>回复人</td>")
YC("</tr>")
rs.pagesize=cint(yecaopage(6))
num=1
mypage=request("page")
if mypage="" then
mypage=1
else
mypage=cint(mypage)
end if
pages=rs.pagecount
rs.absolutepage=mypage
do while not rs.eof
YC("<tr height=""25"" bgcolor="""&color(1)&"""   onmouseover=""this.bgColor='"&color(2)&"';"" onmouseout=""this.bgColor='"&color(1)&"';"">")
YC("<td width=""5%""  align=""center"" bgcolor="""&color(2)&""">")
if best=1 then
YC("精华")
elseif rs("click")>=500 then
YC("热门")
else
YC("普通")
end if
YC("</td>")
YC("<td>")
YC("<ul class=""list""><li>")
if supertype=1 then
YC("<input style='padding:-2px;margin:-2px;' name=""postid"" type=""checkbox"" onclick=""unselectall()"" id=""postid"" value="""&rs("id")&""">&nbsp;")
end if
YC("<a href=""book.asp?action=showbook&id="&rs("id")&""" ><font color="""&rs("color")&""" title=""发表时间:"&replacetime(rs("date"),"4")&""">"&YC_cut(Rs("title"),60)&"</font></a>")
if rs("click")>=500 then
YC("<img src=""img/hot.gif"" alt="""" border=""0"" />")
end if
YC("</li></ul></td>")
YC("<td align=""center"" bgcolor="""&color(2)&""" nowrap><a href=""user.asp?action=show_user_data&user="&Server.UrlEncode(rs("user"))&""" title=""查看["&rs("user")&"]的资料"">"&rs("user")&"</a>")
YC("</td>")
YC("<td align=""center"" nowrap>"&Rs("click")&"/"&Rs("reply")&"</td>")
YC("<td align=""center"" bgcolor="""&color(2)&""" nowrap>")
if Rs("replydate")="" or isnull(rs("replydate")) then
YC(Rs("date"))
else
YC("<font color='#ff6600'>"&Rs("replydate")&"</font>")
end if
YC("</td>")
YC("<td  align=""center"" nowrap>")
if Rs("replyuser")="" or isnull(rs("replyuser")) then
YC("----")
else
YC("<a href=""user.asp?action=show_user_data&user="&Server.UrlEncode(rs("replyuser"))&""" title=""查看["&rs("replyuser")&"]的资料"">"&rs("replyuser")&"</a>")
end if
YC("</td>")
YC("</tr>")
if num=rs.pagesize then exit do end if
num=num+1
rs.movenext
loop
YC("<tr height=""25"" bgcolor="""&color(2)&"""><td colspan=""6"" align=""center"">")
if supertype=1 then
%>
&nbsp;<input name="chkAll" type="checkbox" id="chkAll" onclick=CheckAll(this.form) value="checkbox">
<input name="submit" class="put" type="submit" onClick="document.form.Action.value='Del'" value="删 除" onmouseover="this.className='overput'" onmouseout="this.className='put'">
<%end if%>
共有留言<font color=red><%=rs.recordcount%></font>条,每页<font color=red><%=rs.pagesize%></font>条,分<font color=red><%=mypage%></font>/<%=rs.pagecount%>页&emsp;&emsp;&emsp;
<script language="javascript">
showPageLink("?select=<%request("select")%>&keyword=<%request("keyword")%>&page=",<%=mypage%>,<%=pages%>);
</script>
<%
YC("</td</tr>")
else
if request("keyword")<>"" then
YC("<tr><td><center>没有找到包含[<b><font color=red>"&request("keyword")&"</font></b>]的留言!<br /></center></td</tr>")
else
YC("<tr><td><br/ ><center>暂无数据……</center><br /></td</tr>")
end if
end if

YC("</table></td><td class=""666"" nowrap></td></tr></table>")
end sub
'┏━━━━┓
'┃查看留言┃
'┗━━━━┛
sub showbook()
YC("<table border=""0"" cellspacing=""0"" cellpadding=""0"" width=""100%""><tr><td class=""444"" nowrap></td><td class=""555"" valign=""top"" nowrap>")
set rs=server.CreateObject("adodb.recordset")
sql="select id,title,color,exper,user,date,editdate,content,ip,click from [YC_book] where id="&request.QueryString("id")
rs.open sql,conn,1,1
dim booktitle
booktitle=YC_post("留言主题",rs("title"),0,40,2)
set rsuser=server.CreateObject("adodb.recordset")
sql="select id,user_name,user_face,user_exper,user_money,user_about,user_sex,user_reg_date from [YC_user] where user_name='"&rs("user")&"'"
rsuser.open sql,conn,1,1
YC("<table  border=""1"" frame=""void"" bordercolor="""&color(0)&""" cellspacing=""0"" cellpadding=""0"" width=""100%"" style=""table-layout:fixed"">")
if request("repage")="" or request("repage")=1  then
YC("<tr bgcolor="""&color(2)&""" height=""25""><td>")
YC("<table width=""100%""  cellspacing=""0"" cellpadding=""0""><tr><td>&nbsp;<b>主题:<font color="""&rs("color")&""">"&booktitle&"</font></b></td>")
YC("<td width='270' align='right'>")
YC("<a href='user.asp?action=show_user_data&user="&rs("user")&"' title='查看["&rs("user")&"]的资料'>楼主</a>┊")
YC("<a href='#' title='点击"&rs("click")&"次'>点击</a>┊")
YC("<a href='#' title='"&replacetime(rs("date"),"4")&"'>时间</a>┊")
YC("<a href='#' title='"&rs("ip")&"'>I&emsp;P</a>┊")
YC("<a href='user.asp?action=user_sms_send&user="&rs("user")&"' title='发送短信给["&rs("user")&"]'>短信</a>")

if supertype=1 or rs("user")=username then
YC("┊<a href=""book.asp?action=editbook&id="&rs("id")&""">编辑</a>")
end if
if supertype=1 then
YC("┊<a href=""book.asp?action=delallbook&postid="&rs("id")&""">删除</a>")
end if
YC("&nbsp;</td></tr></table>")
YC("</td></tr><tr><td bgcolor="""&color(1)&""" style=""padding:5px"">")
YC("<div style=""height:60px;width:100%"">")
if rs("exper")<>0 then
if rsuser("user_exper")<rs("exper") then
YC("<center><br />对不起!您的积分不足!<br /><br />此贴需要[<font color=""#ff0000"">"&rs("exper")&"</font>]分才能查看!</center>")
else
YC(ubb(unHTML(rs("content"))))
end if
else
YC(ubb(unHTML(rs("content"))))
end if
YC("</div>")
if rs("editdate")<>"" then
YC("<div align=""center"">[本贴由作者于 <font color=""#ff0000"">"&replacetime(rs("editdate"),"3")&"</font> 最后编辑]</div>")
end if
if trim(rs("user"))<>"游客" then
YC("<br>------------------------------------------------------------------<br>")
YC("<table width=""100%"" height=""30px"" cellpadding=""0"" cellspacing=""0""  style=""table-layout:fixed""><tr><td>")
if trim(rsuser("user_about"))<>"" then
YC(ubb(unHTML(rsuser("user_about"))))
else
YC("这个家伙真懒,什么也没有留下!")
end if
YC("</td></tr></table>")
end if
YC("</td></tr>")
end if
'回复留言显示

set re=server.CreateObject("adodb.recordset")
sql="select id,bookid,title,user,date,editdate,content,ip from [YC_bookreply] where bookid="&request.QueryString("id")
re.open sql,conn,1,1
if not re.bof and not re.eof then
re.pagesize=10
num=1
myrepage=request("repage")
if myrepage="" then
myrepage=1
else
myrepage=cint(myrepage)
end if
repages=re.pagecount
re.absolutepage=myrepage
do while not re.eof
YC("<tr bgcolor="""&color(2)&""" height=""25""><td>")
YC("<table width=""100%""  cellspacing=""0"" cellpadding=""0""><tr><td>&nbsp;<b>回复:"&rs("title")&"</td>")
YC("<td width='220' align='right'>")
YC("<a href='user.asp?action=show_user_data&user="&re("user")&"' title='查看["&re("user")&"]的资料'>楼客</a>┊")
YC("<a href='#' title='"&replacetime(re("date"),"4")&"'>时间</a>┊")
YC("<a href='#' title='"&re("ip")&"'>I&emsp;P</a>┊")
YC("<a href='user.asp?action=user_sms_send&user="&re("user")&"' title='发送短信给["&re("user")&"]'>短信</a>")
if supertype=1 or re("user")=username then
YC("┊<a href='book.asp?action=editreplybook&id="&re("id")&"'>编辑</a>")
end if
if supertype=1 then
YC("┊<a href='book.asp?action=killbookreply&id="&re("id")&"&bookid="&re("bookid")&"'>删除</a>")
end if
YC("&nbsp;</td></tr></table>")
YC("</td></tr><tr><td bgcolor="""&color(1)&""" style=""padding:5px;table-layout:fixed"">")
YC("<div style=""height:60px;width:100%"">")
YC(ubb(unHTML(re("content"))))
YC("</div>")

if re("editdate")<>"" then
YC("<div align=""center"">[本贴由作者于 <font color=""#ff0000"">"&replacetime(re("editdate"),"3")&"</font> 最后编辑]</div>")
end if

if trim(re("user"))<>"游客" then
YC("<br>------------------------------------------------------------------<br>")
set reuser=server.CreateObject("adodb.recordset")
sql="select * from [YC_user] where user_name='"&re("user")&"'"
reuser.open sql,conn,1,1
YC("<table width=""100%"" height=""30px"" cellpadding=""0"" cellspacing=""0""  style=""table-layout:fixed""><tr><td>")
if trim(reuser("user_about"))<>"" then
YC(ubb(unHTML(reuser("user_about"))))
else
YC("这个家伙真懒,什么也没有留下!")
end if
YC("</td></tr></table>")
reuser.close
set reuser=nothing
end if

re.movenext
loop 
YC("</td></tr><tr bgcolor="""&color(2)&""" height=""25""><td align='right'>")
YC("共有回复"&re.recordcount&"</font>条,每页"&re.pagesize&"</font>条,分"&myrepage&"</font>/"&re.pagecount&"页&emsp;&emsp;&emsp;")
YC("<script language='javascript'>showPageLink(""?action=showbook&id="&request.querystring("id")&"&repage="","&myrepage&","&repages&");</script>")
YC("&nbsp;&nbsp;</td></tr><tr bgcolor="""&color(1)&"""><td>&nbsp;</td></tr><tr bgcolor="""&color(2)&""" height=""25""><td>&nbsp;回复主题:"&booktitle&"</td></tr>")
end if

⌨️ 快捷键说明

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