📄 bbsshow.asp
字号:
end if
if action="flash" then sql="select*from [upload] where filetype='.swf' and bbsid>0 order by id desc":strt="论坛Flash集"
if action="top10flash" then sql="select top 10 * from [upload] where filetype='.swf' and bbsid>0 order by id desc":strt="论坛Flash集"
if action="flashuser" then
if checkname(name)=false then response.write"你执行了非法的操作,程序终止。":response.end
sql="select*from [upload] where filetype='.swf' and name='"&name&"' and bbsid>0 order by id desc"
strt="论坛Flash集"
end if
if action="file" then sql="select*from [upload] where (filetype='.rar' or filetype='.zip') and bbsid>0 order by id desc":strt="论坛文件集"
if action="top10file" then sql="select top 1 * from [upload] where (filetype='.rar' or filetype='.zip') and bbsid>0 order by id desc":strt="论坛文件集"
if action="fileuser" then
if checkname(name)=false then response.write"你执行了非法的操作,程序终止。":response.end
sql="select*from [upload] where (filetype='.rar' or filetype='.zip') and name='"&name&"' and bbsid>0 order by id desc"
strt="论坛文件集"
end if
response.write"<script language='javascript'>function Check(){var Name=document.form.topage.value;document.location='?action="&action&"&topage='+Name+'&name="&name&"';}</script>"%>
<table align="center" class=td1 border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="<%=tbw%>" bgcolor="<%=c1%>" background="<%=tbg%>" height="28">
<tr>
<td width="200"> <%=strt%></td>
</tr>
</table><%
set rs = server.createobject("adodb.recordset")
pagesetup=10
rs.Open sql,conn,1
TotalPage=0
Count=rs.recordcount
if not rs.eof then
If Count/pagesetup > (Count\pagesetup) then
TotalPage=(Count\pagesetup)+1
else TotalPage=(Count\pagesetup)
End If
pagecount= 0
rs.moveFirst
if Request.QueryString("ToPage")<>"" and isnumeric(Request.QueryString("ToPage")) then PageCount = cint(Request.QueryString("ToPage"))
if PageCount <=0 then PageCount = 1
if PageCount > TotalPage then PageCount = TotalPage
rs.move (PageCount-1) * pagesetup
i=1
do while not rs.eof
if rs("bbsid")=0 then
info="||没有相关的说明。"
else
info=rs("url")
end if
info=split(info,"|")
pic=rs("filename")
if rs("filetype")=".swf" then pic="../pic/swf2.gif"
if rs("filetype")=".rar" or rs("filetype")=".zip" then pic="../pic/rar2.gif"
%>
<table align="center" border=0 cellpadding="0" cellspacing="0" style='border-collapse: collapse; WORD-BREAK: break-all' width="<%=tbw%>" bgcolor="<%=c2%>" height="28">
<tr>
<td><p style="margin: 4">
<a target="_blank" href="paper.asp?action=showpic&id=<%=rs("id")%>&picurl=<%=rs("filename")%>"><img src=upload/<%=pic%> width="100" height="100" style="border: 1px solid #C0C0C0"></a></td>
<td width="50%" valign="bottom">
<p style="margin: 4; line-height:120%"><%if usertype>=3 then%><a title=编辑 href="bbsshow.asp?action=edit&id=<%=rs("id")%>"><img src="pic/edit.gif" border="0"></a>
<a title=删除 href="bbsshow.asp?action=del&id=<%=rs("id")%>"> <img src="pic/del.gif" border="0"></a><br><%end if%>作者:<%=kbbs(rs("name"))%><br>时间:<%=rs("uploadtime")%><br>点击:<%=rs("hits")%><br>说明:<%=kbbs(info(2))%><br><%if rs("bbsid")=0 then:response.write"<font color=#808080>没有相关帖子</font>":else:response.write"<a href=show.asp?bd="&info(0)&"&id="&info(1)&"&totable="&rs("totable")&">查看相关帖子</a>":end if%></td><%rs.movenext
i=i+1
if rs.eof then response.write"<td> </td><td width=50% ></td>":exit do
if rs("bbsid")=0 then
info="||没有相关的说明。"
else
info=rs("url")
end if
info=split(info,"|")
pic=rs("filename")
if rs("filetype")=".swf" then pic="../pic/swf2.gif"
if rs("filetype")=".rar" or rs("filetype")=".zip" then pic="../pic/rar2.gif"
%>
<td><p style="margin: 4">
<a target="_blank" href="paper.asp?action=showpic&id=<%=rs("id")%>&picurl=<%=rs("filename")%>"><img src=upload/<%=pic%> width="100" height="100" style="border: 1px solid #C0C0C0"></a></td>
<td width="50%" valign="bottom"><p style="margin: 4; line-height:120%"><%if usertype>=3 then%><a title=编辑 href="bbsshow.asp?action=edit&id=<%=rs("id")%>"><img src="pic/edit.gif" border="0"></a>
<a title=删除 href="bbsshow.asp?action=del&id=<%=rs("id")%>"> <img src="pic/del.gif" border="0"></a><br><%end if%>作者:<%=kbbs(rs("name"))%><br>时间:<%=rs("uploadtime")%><br>点击:<%=rs("hits")%><br>说明:<%=kbbs(info(2))%><br><%if rs("bbsid")=0 then:response.write"<font color=#808080>没有相关帖子</font>":else:response.write"<a href=show.asp?bd="&info(0)&"&id="&info(1)&"&totable="&rs("totable")&"&totable="&rs("totable")&">查看相关帖子</a>":end if%></td>
</tr>
</table>
<%i=i+1
if i>pagesetup then exit do
rs.movenext
loop
end if
rs.Close
set rs=nothing
response.write"<TABLE align='center' bgcolor="&c1&" cellSpacing=0 cellPadding=0 width='"&tbw&"' border=0 style='border-collapse: collapse; border-left-width: 1px; border-right-width: 1px; border-top-width: 1px'><TBODY><TR height=25><TD height=2><TABLE cellSpacing=0 cellPadding=3 width='100%' border=0 background='"&tbg&"' style='border-collapse: collapse; border-left-width:0; border-top-width:0; border-bottom-width:0'><TBODY><TR><TD><b><font color="&c3&"><img border='0' src='pic/fl.gif'> 本展区集共有</font><font color=red> "&TotalPage&" </font><font color="&c3&">页,<font color=red> "&count&" </font>个文件,每页有<font color='red'> "&pagesetup&" </font> 个文件 >> ["
ii=PageCount-5
iii=PageCount+5
if ii < 1 then
ii=1
end if
if iii > TotalPage then
iii=TotalPage
end if
if PageCount > 6 then
Response.Write " <a href=?topage=1&action="&action&"&name="&name&"><font color=yellow>1</font></a> ... "
end if
for i=ii to iii
If i<>PageCount then
Response.Write " <a href=?topage="& i &"&action="&action&"&name="&name&"><font color=yellow>" & i & "</font></a> "
else
Response.Write " <font color=red><b>"&i&"</b></font> "
end if
next
if TotalPage > PageCount+5 then
Response.Write " ... <a href=?topage="&TotalPage&"&action="&action&"&name="&name&"><font color=yellow>"&TotalPage&"</font></a>"
end if
response.write" ]</font></b></TD><form name=form method='POST' action=javascript:Check()><TD height=2 align='right'><font color="&c3&">页码:<input style=FONT-SIZE:9pt maxLength='6' size='6' name='topage' value='"&PageCount&"'><input style=FONT-SIZE:9pt value='GO!' type='submit'></font></TD></form></TR></TBODY></TABLE></TD></TR></TBODY></TABLE>"
%>
<%case"edit"
set rs=conn.execute("select top 1 * from upload where id="&id&"")
url=rs("url")
url=split(url,"|")
pic=rs("filename")
if rs("filetype")=".swf" then pic="../pic/swf2.gif"
if rs("filetype")=".rar" or rs("filetype")=".zip" then pic="../pic/rar2.gif"
%>
<table align="center" border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="<%=tbw%>" height="28" bgcolor="<%=c2%>">
<tr><form method="POST" action="bbsshow.asp?action=editok&id=<%=id%>">
<td width="100%" class=td1 bgcolor="<%=c1%>" background="<%=tbg%>" height="28" colspan=2> 编辑文件信息</td>
</tr>
<tr>
<td width="25%" valign="top">
<p style="margin: 5">文件预览:</td>
<td width="75%">
<p style="margin: 5"><a target="_blank" href="paper.asp?action=showpic&id=<%=rs("id")%>&picurl=<%=rs("filename")%>"><img src=upload/<%=pic%> width="100" height="100" style="border: 1px solid #C0C0C0"></a></td>
</tr>
<tr>
<td width="25%">
<p style="margin: 5">相关帖子所在的版面:</td>
<td width="75%">
<p style="margin: 5"><%dim bdlist2
set bdlist2=conn.execute("select * from bdinfo where followid<>0 order by orders desc,id")
response.write"<select size=1 name=bd style='font-size: 9pt'>"
do while not bdlist2.eof
response.write"<option value="&bdlist2("id")&"":if int(url(0))=bdlist2("id") then:response.write" selected":end if:response.write">"&split(bdlist2("bdinfo"),"|")(0)&"</option>"
bdlist2.movenext
Loop
response.write"</select>"
set bdlist2=nothing
%></td>
</tr>
<tr>
<td>
<p style="margin: 5">相关帖子的 ID:</td>
<td>
<p style="margin: 5">
<input type="text" name="id2" size="20" value="<%=url(1)%>"></td>
</tr>
<tr>
<td>
<p style="margin: 5">文件点击次数:</td>
<td>
<p style="margin: 5">
<input type="text" name="hits" size="20" value="<%=rs("hits")%>"></td>
</tr>
<tr>
<td valign="top">
<p style="margin: 5">文件介绍:</td>
<td>
<p style="margin: 5">
<input type="text" name="intro" size="70" value="<%=kbbs(url(2))%>" maxlength="40"></td>
</tr> <tr>
<td colspan="2" align="center" height="30" bgcolor="<%=c2%>">
<p style="margin: 5"><input type="submit" value=" 确 认 修 改 " name="B1"></td>
</tr></form>
</table>
<%
set rs=nothing
%><%case"editok"
if usertype>=3 then
dim id2,hits,intro
bd=checknum(request.form("bd"))
id2=checknum(request.form("id2"))
hits=checknum(request.form("hits"))
intro=replace(request.form("intro"),"'","''")
if hits="" or hits<0 then hits=0
url=bd&"|"&id2&"|"&intro
conn.execute("update upload set url='"&url&"',hits="&hits&" where id="&id&"")
call sendinfo2("修改成功","·文件信息修改成功<br>·<a href=bbsshow.asp>回到论坛展区</a>")
end if
%><%case"del"
if usertype>=3 then
conn.execute("update upload set bbsid=0 where id="&id&"")
call sendinfo2("删除成功","·文件删除成功<br>·<a href=bbsshow.asp>回到论坛展区</a>")
end if
%>
<%end select
response.write tbottom
call down%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -