<!-- #include file="conn.asp" -->
<!-- #include file="inc/const.asp" -->
<%
'By peter At www.itlyc.com
'QQ: 75224274
'Email: lazich@163.com
Dim n , order , height , width , boardid , searchstr , orders , rs , sql , i , bbsUrl , FileName , annou , dispid
'============================================
'更改BBS目录(注:相对于你用来调用的目录)
'============================================
bbsUrl = "/" '以"/" 结尾
'============================================
n = Request.QueryString("n")
order = Request.QueryString("order")
height = Request.QueryString("height")
width = Request.QueryString("width")
boardid = Request.QueryString("id")
select Case order
Case "new"
orders = "F_AddTime"
Case "view"
orders = "F_ViewNum"
Case "down"
orders = "F_DownNum"
Case Else
orders = "F_AddTime"
End select
searchstr = "F_Type=1 And F_Flag=0 And F_BoardID<>444"
If Left(boardid,1) = "," Then boardid = Right(boardid,Len(boardid)-1)
If Right(boardid,1) = "," Then boardid = Left(boardid,Len(boardid)-1)
If boardid<>"" then
searchstr=searchstr & " And F_BoardID in ("&boardid&") "
End If
sql = "select top "&n&" F_ID,F_BoardID,F_AnnounceID,F_Username,F_FileType,F_Filename,F_FileSize,F_Readme,F_DownNum,F_ViewNum,F_AddTime from [Dv_Upfile] where "& searchstr &" order by "& orders &" desc, F_ID desc"
set rs=Dvbbs.execute(sql)
If Not RS.Eof then
SQL=rs.GetRows(-1)
rs.close:set rs=nothing
Set template = Nothing
Set MyBoardOnline = Nothing
Set Dvbbs = Nothing
Set Conn = Nothing
'读取上传目录
Function CheckFileFolder()
If Dvbbs.Forum_Setting(76)="" Or Dvbbs.Forum_Setting(76)="0" Then Dvbbs.Forum_Setting(76)="UploadFile/"
CheckFileFolder = Replace(Replace(Dvbbs.Forum_Setting(76),Chr(0),""),".","")
'在目录后加(/)
If Right(CheckFileFolder,1)<>"/" Then CheckFileFolder=CheckFileFolder&"/"
End Function
%>