Check.asp
上传用户:btntkt
上传日期:2021-04-16
资源大小:5296k
文件大小:6k
源码类别:

WEB源码(ASP,PHP,...)

开发平台:

DOS

  1. <!--#include file="conn.asp"-->
  2. <%
  3. dim cls
  4. if session("admin")="" then
  5. Response.Redirect("admin.asp")
  6. else
  7. if session("flag")<>"0" then
  8. cls = Instr(session("flag"), "datafig")
  9. if cls <= 0 then
  10. %>
  11. <script language="javascript">
  12. if (confirm("您的操作权限不够,系统拒绝你的访问,请点确定返回,或者点取消退出重新登录"))
  13.   location.href="login.asp";
  14. else
  15.   location.href="index.asp";
  16. </script>
  17. <%
  18. end if
  19. end if
  20. end if
  21. %>
  22. <title>网软天下购物系统,网络购物系统,asp购物系统,免费购物系统,网上商城购物系统。-空间查看</title>
  23. <link href="images/css.css" rel="stylesheet" type="text/css">
  24. <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
  25. <BODY>
  26. <table class="tableBorder" width="100%" border="0" align="center" cellpadding="3" cellspacing="1" bgcolor="#FFFFFF">
  27.   <tr>
  28.     <td colspan="4" align="center" background="images/admin_bg_1.gif"><b><font color="#ffffff">空间的使用情况</font></b>
  29. <% 
  30.   Sub ShowSpaceInfo(drvpath)
  31.   dim fso,d,size,showsize
  32.   set fso=server.createobject("scripting.filesystemobject") 
  33.   drvpath=server.mappath(drvpath)   
  34.   set d=fso.getfolder(drvpath) 
  35.   size=d.size
  36.   showsize=size & "&nbsp;Byte" 
  37.   if size>1024 then
  38.      size=(size1024)
  39.      showsize=size & "&nbsp;KB"
  40.   end if
  41.   if size>1024 then
  42.      size=(size/1024)
  43.      showsize=size & "&nbsp;MB"
  44.   end if
  45.   if size>1024 then
  46.      size=(size/1024)
  47.      showsize=size & "&nbsp;GB"    
  48.   end if   
  49.   response.write "<font face=verdana>" & showsize & "</font>"
  50.   End Sub
  51.   Sub Showspecialspaceinfo(method)
  52.   dim fso,d,fc,f1,size,showsize,drvpath 
  53.   set fso=server.createobject("scripting.filesystemobject")
  54.   drvpath=server.mappath("pic")
  55.   drvpath=left(drvpath,(instrrev(drvpath,"")-1))
  56.   set d=fso.getfolder(drvpath) 
  57.   if method="All" then 
  58.   size=d.size
  59.   elseif method="Program" then
  60.   set fc=d.Files
  61.   for each f1 in fc
  62.   size=size+f1.size
  63.   next
  64.   end if
  65.   showsize=size & "&nbsp;Byte" 
  66.   if size>1024 then
  67.      size=(size1024)
  68.      showsize=size & "&nbsp;KB"
  69.   end if
  70.   if size>1024 then
  71.      size=(size/1024)
  72.      showsize=size & "&nbsp;MB"
  73.   end if
  74.   if size>1024 then
  75.      size=(size/1024)
  76.      showsize=size & "&nbsp;GB"    
  77.   end if   
  78.   response.write "<font face=verdana>" & showsize & "</font>"
  79.   end sub     
  80.   Function Drawbar(drvpath)
  81.   dim fso,drvpathroot,d,size,totalsize,barsize
  82.   set fso=server.createobject("scripting.filesystemobject")
  83.   drvpathroot=server.mappath("pic")
  84.   drvpathroot=left(drvpathroot,(instrrev(drvpathroot,"")-1))
  85.   set d=fso.getfolder(drvpathroot)
  86.   totalsize=d.size
  87.   drvpath=server.mappath(drvpath) 
  88.   set d=fso.getfolder(drvpath)
  89.   size=d.size
  90.   barsize=cint((size/totalsize)*400)
  91.   Drawbar=barsize
  92.   End Function 
  93.   Function Drawspecialbar()
  94.   dim fso,drvpathroot,d,fc,f1,size,totalsize,barsize
  95.   set fso=server.createobject("scripting.filesystemobject")
  96.   drvpathroot=server.mappath("pic")
  97.   drvpathroot=left(drvpathroot,(instrrev(drvpathroot,"")-1))
  98.   set d=fso.getfolder(drvpathroot)
  99.   totalsize=d.size
  100.   set fc=d.files
  101.   for each f1 in fc
  102.   size=size+f1.size
  103.   next
  104.   barsize=cint((size/totalsize)*400)
  105.   Drawspecialbar=barsize
  106.   End Function 
  107. %>
  108. </td>
  109.   </tr>
  110.   <tr>
  111.     <td valign=top bgcolor=#fbf4f4><table width="100%" align="center" border="0" cellpadding="0" cellspacing="0">
  112.       <tr>
  113.         <td><%
  114.   fsorank=1
  115.   if fsorank=1 then
  116.   %>
  117.             <%Function GetPP
  118. dim s
  119. s=Request.ServerVariables("path_translated")
  120. GetPP=left(s,instrrev(s,"",len(s)))
  121.   End function
  122.   if sPP="" then sPP=GetPP
  123.   if right(sPP,1)<>"" then sPP=sPP&""
  124.   set fso=server.createobject("scripting.filesystemobject")
  125.   Set f = fso.GetFolder(sPP)
  126.   Set fc = f.SubFolders
  127.   i=1
  128. i2=1
  129.   For Each f in fc%>
  130.             <table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#ffffff">
  131.               <tr bgcolor="#ffffff">
  132.                 <td width="20%" bgcolor="#fbf4f4">&nbsp; <%=f.name%>文件夹</td>
  133.                 <td width="80%" bgcolor="#fbf4f4">&nbsp;<img src="admin/images/edit/bar<%=i2%>.gif" width=<%=drawbar(""&f.name&"")%> height=10>&nbsp;
  134.                     <%showSpaceinfo(""&f.name&"")%></td>
  135.               </tr>
  136.             </table>
  137.           <table width="100%" border="0" cellpadding="0" cellspacing="0">
  138.               <tr>
  139.                 <td height="2"></td>
  140.               </tr>
  141.             </table>
  142.           <%i=i+1
  143. if i2<10 then
  144. i2=i2+1
  145. else
  146. i2=1
  147. end if
  148. Next%>
  149.             <table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#ffffff">
  150.               <tr bgcolor="#ffffff">
  151.                 <td width="20%" bgcolor="#fbf4f4">&nbsp;程序文件占用空间</td>
  152.                 <td width="80%" bgcolor="#fbf4f4">&nbsp;<img src="admin/images/edit/bar8.gif" width=<%=drawspecialbar%> height=10>&nbsp;
  153.                     <%showSpecialSpaceinfo("Program")%></td>
  154.               </tr>
  155.             </table>
  156.           <table width="100%" border="0" cellpadding="0" cellspacing="0">
  157.               <tr>
  158.                 <td height="2"></td>
  159.               </tr>
  160.             </table>
  161.           <table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#ffffff">
  162.               <tr bgcolor="#ffffff">
  163.                 <td width="20%" bgcolor="#fbf4f4">&nbsp;系统占用空间总计</td>
  164.                 <td width="80%" bgcolor="#fbf4f4">&nbsp;<img src="admin/images/edit/bar9.gif" width=400 height=10>
  165.                     <%showspecialspaceinfo("All")%>
  166.                 </td>
  167.               </tr>
  168.             </table>
  169.           <%
  170.   else
  171. response.write "<br><li>本功能已经被关闭"
  172.   end if
  173.   %>
  174.         </td>
  175.       </tr>
  176.     </table></td>
  177.   </tr>
  178. </table>
  179. </body>
  180. </html>