<!--#include file="down_conn.asp"-->
<!-- #include file="inc/const.asp" -->
<!--#include file="down_function.asp"-->

<head>
<style type=text/css>
body  { background:#799AE1; margin:0px; font:normal 12px 宋体; 
SCROLLBAR-FACE-COLOR: #799AE1; SCROLLBAR-HIGHLIGHT-COLOR: #799AE1; 
SCROLLBAR-SHADOW-COLOR: #799AE1; SCROLLBAR-DARKSHADOW-COLOR: #799AE1; 
SCROLLBAR-3DLIGHT-COLOR: #799AE1; SCROLLBAR-ARROW-COLOR: #FFFFFF;
SCROLLBAR-TRACK-COLOR: #AABFEC;
}
table  { border:0px; }
td  { font:normal 12px 宋体; }
img  { vertical-align:bottom; border:0px; }
a  { font:normal 12px 宋体; color:#000000; text-decoration:none; }
a:hover  { color:#428EFF;text-decoration:underline; }
.sec_menu  { border-left:1px solid white; border-right:1px solid white; border-bottom:1px solid white; overflow:hidden; background:#D6DFF7; }
.menu_title  { }
.menu_title span  { position:relative; top:2px; left:8px; color:#215DC6; font-weight:bold; }
.menu_title2  { }
.menu_title2 span  { position:relative; top:2px; left:8px; color:#428EFF; font-weight:bold; }
</style>
<title><%=dvbbs.Forum_info(0)%>--管理页面</title>


</head>

<BODY leftmargin="0" bottommargin="0" rightmargin="0" topmargin="0" marginheight="0" marginwidth="0">
<%
			dim i
Dvbbs.LoadTemplates("")
Dvbbs.Head()
	dim idlist,id1,admin_flag
	admin_flag="22"
	if not Dvbbs.master or instr(session("flag"),admin_flag)=0 then
		response.write + "<BR><li>本页面为管理员专用，请<a href=admin_login.asp target=_top>登陆</a>后进入。<br><li>您没有管理本页面的权限。"
		response.end
	else
		call main()
                conn.close
		set conn=nothing
	end if

	sub main()
%>
      
              <table width="98%" border="0" align="center" cellpadding="0" cellspacing="3" class="tableBorder1">
                <tr> 
                  <th> <font style="font-size:12px;COLOR: #ffffff;FONT-FAMILY: 宋体">
                    <p><b>浏览上传文件</b>：本功能必须服务器支持FSO权限方能使用，FSO使用帮助请浏览微软网站。文件目录为<%=downpath%>，如果您服务器不支持FSO请手动管理。</p></font>
                  </th>
                </tr>
                　　　　　　　　<tr> 
                  <td ><font color="#FF0000">注意：如果您删除此文件，那么数据库中关于此文件的软件相关信息也会被删除，请小心使用　</font>　</td>
                </tr>

               <tr> 
                  <td>
                   <font style="font-size:12px;COLOR: #000000;FONT-FAMILY: 宋体"> <b>当前浏览　<%=downpath%>　文件目录的所有文件</b>：
                  </td>
                </tr>
                <tr> 
                  <td>	<font style="font-size:12px;COLOR: #000000;FONT-FAMILY: 宋体">
<%
'Created by shatan Jan 8
dim objFSO
dim uploadfolder
dim uploadfiles
dim upname
dim upfilename
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
if request("filename")<>"" then
objFSO.DeleteFile(Server.MapPath(downpath&request("filename")))
end if

set rss=conndown.execute("select * from download where filename ='"&request("filename")&"' or filename1 = '"&request("filename")&"' or filename2= '"&request("filename")&"'")
if not (rss.bof and rss.eof) then 
sql="delete from download where filename = '"&request("filename")&"' or filename1 = '"&request("filename")&"' or filename2 = '"&request("filename")&"'"
conndown.execute sql
end if
Set uploadFolder=objFSO.GetFolder(Server.MapPath(downpath))
Set uploadFiles=uploadFolder.Files
For Each Upname In uploadFiles
upfilename=downpath&upname.name
response.write "<a href="""&upfilename&""">"&upfilename&"</a> <a href='?path="&downpath&"&filename="&upname.name&"'>删除</a><br>"
next
set uploadFolder=nothing
set uploadFiles=nothing
%></font>
		</td>
            </tr>
</table>
<%
end sub
%>







