社区展区 for BBSXP 7B2

社区展区 for BBSXP 7B2

By admin at 2007-05-26
0人收藏 • 1081人看过

ShowFile.asp.txt

File.asp.txt

下载后去掉.txt的后缀

传到论坛根目录,在后台加个连接,完成!!!

版权所有,禁止转载!!!

4 个回复 | 最后更新于 2007-07-23
admin
2007-06-24
#2

<!-- #include file="setup.asp" -->
<%
id=int(Request("id"))

top

ContentType=HTMLEncode(Request("ContentType"))
FileName=HTMLEncode(Request("FileName"))

if Request("menu")="del" and membercode>3 then
conn.execute("delete from [BBSXP_UpFiles] where FileName='"&FileName&"' and ContentType='"&ContentType&"'")
on error resume next  '不支持FSO时忽略错误
set MyFileObject=Server.CreateOBject("Scripting.FileSystemObject")

end if

%>
<br>

 

<div align="center">

 

<table cellspacing=1 cellpadding=5 border=0 width=100% class=a2>
<tr class=a3>
<td>
<p align="left">&nbsp;<img src="images/Forum_nav.gif">&nbsp; <%ClubTree%> →
<a href="showfile.asp">社区展区</a></td>
</tr>
</table>
</div>
<br>

 


<%
if Request("menu")="show" then

sql="select * from [BBSXP_UpFiles] where FileName='"&FileName&"'"
rs.Open sql,Conn
%>
<script>function yuzi_img(e, o)
{
var zoom = parseInt(o.style.zoom, 10) || 100;
zoom += event.wheelDelta / 12;
if (zoom > 0) o.style.zoom = zoom + '%';
return false;
}
</script>
<table class="a2" cellSpacing="1" cellPadding="3" align="center" width=100%>
 <tr class=a1>
  <td width="50%" align="center" colspan="2">
  文件展示</td>
 </tr>

 <tr>
  <td width="50%" align="center" colspan="2" bgcolor="#FFFFFF">
<br>


<%
if LCase(rs("ContentType")) ="image/gif" or LCase(rs("ContentType")) ="image/pjpeg" then
%>
<a href="<%=rs("FilePath")%>">
<img border="0" src="<%=rs("FilePath")%>" onmousewheel="return yuzi_img(event,this)" onload="javascript:if(this.width&gt;body.clientHeight)this.width=body.clientHeight" title="<%=rs("Description")%>"></a>
<% 
else
%>

 

<a href="<%=rs("FilePath")%>"><img src="images/err.gif" border="0"></a>
<%  
end if
%>
<br><br></td>
 </tr>

 <tr class=a3>
  <td width="19%" align="right">作者:</td>
  <td width="79%" align="left">&nbsp;<%=rs("username")%></td>
 </tr>

 <tr class=a4>
  <td width="19%" align="right">文件名:</td>
  <td width="79%" align="left">&nbsp;<a style=text-decoration:none;color:000000 href="<%=rs("FilePath")%>" target="_blank"><%=rs("FileName")%></a></td>
 </tr>

 <tr class=a3>
  <td width="19%" align="right">文件大小:</td>
  <td width="79%" align="left">&nbsp;<%=rs("ContentSize")%> byte</td>
 </tr>

 <tr class=a4>
  <td width="19%" align="right">说明:</td>
  <td width="79%" align="left">&nbsp;<%=rs("Description")%></td>
 </tr>

 <tr class=a3>
  <td width="19%" align="right">相关帖子:</td>
  <td width="79%" align="left">&nbsp;<a style=text-decoration:none;color:000000 onclick="min_yuzi()" target="message" href="ShowPost.asp?ThreadID=<%=rs("CLASS")%>">查看相关讨论...</a></td>
 </tr>

 <tr class=a4>
  <td width="19%" align="right">格式:</td>
  <td width="79%" align="left">&nbsp;<%=rs("ContentType")%></td>
 </tr>

</table>
<SCRIPT>valignbottom()</SCRIPT>
<center>
<br><a href="javascript:history.back()">
<img src="images/top.gif" border="0"></a>
<%
RS.Close
htmlend
end if

 

 

if ContentType="" then
sql="select * from [BBSXP_UpFiles] order by id Desc"
else
sql="select * from [BBSXP_UpFiles] where ContentType ='"&ContentType&"' order by id Desc"
end if

rs.Open sql,Conn,1
count=rs.recordcount
if count=0 then error2("用户尚未上传作品!")

%>

 

<SCRIPT>valigntop()</SCRIPT>

<table class="a2" cellSpacing="1" cellPadding="3" align="center" width=100%>
 <tr class=a1>
  <td width="50%" align="center">
  展区共有 <b><%=count%></b> 幅作品</td>
  <td width="50%" align="right">
  <select onchange="if(this.options[this.selectedIndex].value!=''){location=this.options[this.selectedIndex].value;}">
  <option selected>按文件分类浏览</option>
  <option value="ShowFile.asp?ContentType=image/gif">图像文件(image)</option>
  <option value="ShowFile.asp?ContentType=audio/mpeg">音频文件(audio)</option>
  <option value="ShowFile.asp?ContentType=video/x-ms-wmv">视频文件(video)</option>
  <option value="ShowFile.asp?ContentType=text/plain">文本文件(text)</option>
  <option value="ShowFile.asp?ContentType=application/octet-stream">程序文件(application)</option>
  <option value="ShowFile.asp?ContentType=application/x-shockwave-flash">FLASH动画(x-shockwave-flash)</option>
    </select>&nbsp; </td>
 </tr>
 <tr>

  <td bgcolor="#FFFFFF" colspan="2"  width="33%" align="center">
  <table border="0" width="100%">
   <tr>
   
<%

 

 

pagesetup=15 '设定每页的显示数量
rs.pagesize=pagesetup
TotalPage=rs.pagecount  '总页数
PageCount = cint(Request.QueryString("ToPage"))
if PageCount <1 then PageCount = 1
if PageCount > TotalPage then PageCount = TotalPage
if TotalPage>0 then rs.absolutepage=PageCount '跳转到指定页数


i=0
Do While Not RS.EOF and i<pagesetup
i=i+1


%>
   
   
    <td width="33%">
    <table border="0" width="100%" cellspacing="1" cellpadding="4" class=a2>
     <tr>
      <td align="center" height="150" bgcolor="#FFFFFF">
<%
if LCase(rs("ContentType")) ="image/gif" or LCase(rs("ContentType")) ="image/pjpeg" then
%>
<a href="?menu=show&FileName=<%=rs("FileName")%>">
<img src="<%=rs("FilePath")%>" width="150" height="112" border="0"></a>
<% 
else
%>
<a href="<%=rs("FilePath")%>"><img src="images/err.gif" border="0"></a>
<%  
end if
%>
</td>
     </tr>
     <tr>
      <td class=a3>
      <p align="left">作者: <a style=text-decoration:none;color:000000 href="Profile.asp?username=<%=rs("username")%>"><%=rs("username")%></a><br>文件名: <a style=text-decoration:none;color:000000 href="<%=rs("FilePath")%>" target="_blank">
      <%=rs("FileName")%></a><br>
      文件大小: <%=rs("ContentSize")%> byte<br>
      说明: <%=rs("Description")%><br>
      标签: <%=rs("Category")%><br>
      <a style=text-decoration:none;color:000000 onclick="min_yuzi()" target="message" href="ShowPost.asp?ThreadID=<%=rs("CLASS")%>">查看相关讨论...</a><Br>
<a style=text-decoration:none;color:000000 onclick="min_yuzi()" target="message" href="<%=rs("FilePath")%>">↓高速下载↓</a>


      
      </td>
     </tr>
    </table>

</td>
<%
if i=3 or i=6 then
response.write "</tr><tr>"
end if


RS.MoveNext
loop
RS.Close
%></table>
[


<script>
PageCount=<%=TotalPage%> //总页数
topage=<%=PageCount%>   //当前停留页
for (var i=1; i <= PageCount; i++) {
if (i <= topage+3 && i >= topage-3 || i==1 || i==PageCount){
if (i > topage+4 || i < topage-2 && i!=1 && i!=2 ){document.write(" ... ");}
if (topage==i){document.write(" "+ i +" ");}
else{
document.write("<a href=?topage="+i+"&ContentType=<%=Request("ContentType")%>>"+ i +"</a> ");
}
}
}
</script>
 
]<br>
    
   
   </tr>
  </table>
  </td>
 </tr>
 </table>
<SCRIPT>valignbottom()</SCRIPT>

<p><strong>查看无图版本: [ -- <a href=file.asp>社区展区</a>-- ] [-- <A href="#">top</A> --]</strong></p>

<%htmlend%>

showfile.asp文件全文

duxichen
2007-07-21
#3

装了你的展区插件出现的

我的论坛是2007   731

admin
2007-07-23
#4

我的插件是7B2用的


登 录


现在注册

QQ  登 录    Weibo  登 录    GitHub  登 录