www.gusucode.com > 流光音乐建站系统 1.1码程序 > admin/Picmanage.asp

    <!--#include file="const.asp"-->
<%CheckAdmin3%>
<%pagename="picmanage"%>
<!--#include file="Top.Asp"-->
<%
'===========================版权信息===============================
' 流光音乐系统 1.0
' Homepage  : http://www.ad968.cn
' E-Mail : 77280511@qq.com
' QQ : 77280511 
'请保留版权信息,以便我们更好的为您服务
'==================================================================

  Domain=Request.ServerVariables("SERVER_NAME")
  soFilePath=Request.ServerVariables("PATH_INFO")
  soFilePath=lcase(left(soFilePath,instrRev(soFilePath,"/")))
  sowinpath=Domain&soFilePath

  Set MyFile=Server.CreateObject("Scripting.FileSystemObject")
  if request.form("result")="del" then
    Num=request.form("FileName").count
    for x=1 to Num
      if MyFile.FileExists(Server.Mappath("..")&"\photo\"&request.form("FileName")(x)&"") then
        MyFile.DeleteFile(Server.Mappath("..")&"\photo\"&request.form("FileName")(x)&"")
      end if
    next
  end if
  Page=request.querystring("page")
  if Page<=1 or Page="" then Page=1
  PageSize=15
  Domain=Request.ServerVariables("SERVER_NAME")
  soFilePath=Request.ServerVariables("PATH_INFO")
  soFilePath=lcase(left(soFilePath,instrRev(soFilePath,"/")))
  socount=len(soFilePath)
  soFilePath=lcase(left(soFilePath,socount-1))
  soFilePath=lcase(left(soFilePath,instrRev(soFilePath,"/")))
  sowinpath="http://"&Domain&soFilePath
  FileCount=0
  Set FileFolder=MyFile.GetFolder(Server.MapPath("..")&"\photo")
  for each TheFile in FileFolder.Files
    FileCount=FileCount+1
    AFileSize=TheFile.size+AFileSize
  next
%>
<LINK href="inc/Admin_STYLE.CSS" rel="stylesheet" type="text/css">
<body bgcolor="#FFFFFF">
<script language="JavaScript">
function Del()
{
if(confirm("您确定要删除?\n\n DreamCtiy Theater System")
)
{return true;}
return false;}
function CheckAll(form)
{
for (var i=0;i<form.elements.length;i++)
{
var e = form.elements[i];
if (e.name != 'chkall')
e.checked = form.chkall.checked;
}
}
</script>
<form method=post action="">
  <table width="100%" border="0" cellspacing="1" cellpadding="0" align="center">
    <tr bgcolor="#FFFFFF" valign="middle" align="center"> 
      <td width="300%" height="2" colspan="3" > <table width="100%" border="0" cellspacing="1" cellpadding="2" bgcolor="#39867B">
          <tr bgcolor="#E1F4EE"> 
            <td width="34%" height=20 align=center bgcolor="#009ACE">文件名</td>
            <td width="35%" height=20 align=center bgcolor="#009ACE">上传时间</td>
            <td width="20%" height=20 align=center bgcolor="#009ACE">文件大小</td>
            <td width="11%" height=20 align=center bgcolor="#009ACE">删除</td>
          </tr>
          <%
  i=0
  for each thing in FileFolder.Files
  i=i+1
  if CCount>=PageSize then
    exit for
  elseif i>PageSize*(Page-1) then
  CCount=CCount+1

%>
          <tr bgcolor="#E1F4EE"> 
            <td width="34%" height=24 bgcolor="#DEF0FA" class="small1"> 
              <div align="left"> 
                <table width="92%" border="0" align="center" cellpadding="0" cellspacing="0">
                  <tr> 
                    <td width="18%"><table width="30" height="30" border="0" cellpadding="0" cellspacing="1" bgcolor="#C9C9C9">
                        <tr> 
                          <td bgcolor="#FFFFFF"><a href="../photo/<%=thing.name%>" target="_blank"><img src="../photo/<%=thing.name%>" width="30" height="30" border="0"></a></td>
                        </tr>
                      </table></td>
                    <td width="82%"><a href=../photo/<%=thing.name%> target=_blank> 
                      <%=thing.name%></a></td>
                  </tr>
                </table>
            </div></td>
            <td width="35%" height=24 align=center bgcolor="#DEF0FA"><%=thing.DateLastModified%></td>
            <td width="20%" height=24 align=center bgcolor="#DEF0FA"><%=thing.Size&"(bt)"%></td>
            <td width="11%" height=24 align=center bgcolor="#DEF0FA"> 
              <input type="checkbox" name=FileName value=<%=thing.Name%>></td>
          </tr>
          <%
  end if
  next
%>
          <tr bgcolor="#DEF0FA"> 
            <td height=20 colspan=5 align=right> 
              <div align="center">共有<font color=red><b><%=FileCount%></b></font>个文件; 
                占用<font color=red><b><%=AFileSize/1024%></b></font><font color=#FF0000><b>K</b></font>空间&nbsp;&nbsp;&nbsp;&nbsp; 
                <input type=hidden value=del Name=result>
                <input type="checkbox" name="chkall" onclick="CheckAll(this.form)">
                选中所有 
                <input type=submit value=删除 onclick="return Del()" class=Anbut1>
            </div></td>
          </tr>
          <tr bgcolor="#DEF0FA"> 
            <td height=20 colspan=5> 
              <%
  PageCount=int(FileCount/PageSize)+1
  for i=1 to PageCount
    response.write "<a href=?Page="&i&"><b>第"&i&"页</b></a> "
  next
%>
            </td>
          </tr>
        </table></td>
    </tr>
  </table>
</form>
</body>
</html>