📄 spacestat.asp
字号:
<!--#include file="chkuser.asp"-->
<!--#include file="inc/conn.asp"-->
<!--#include file="inc/user.asp"-->
<%
username=Request.Cookies("username")
kj=rsuser("space")*1048576
if path=<"\"+username then path="\"+username
set kjs= fso.getfolder(userdir&username)
usesize=kjs.size/1024
%>
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="css/style.css" rel="stylesheet" type="text/css">
<title></title>
</head>
<body bgcolor="#F6ECE2">
<table width="100%" border="0" cellspacing="0" cellpadding="0" height="70%">
<tr>
<td align="center">
<fieldset style="padding: 2; width:200; height:120">
<legend><b>空间使用统计</b></legend>
<br>
<table width="360" height="12" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="14" bgcolor="#0000ff"></td>
<td width="74" align="center">已使用</td>
<td width="14" bgcolor="ff00ff"></td>
<td width="76" align="center">未使用</td>
<td width="272"></td>
</tr>
</table>
<br>
<table width='350' border='0' cellpadding='0' cellspacing='1' bgcolor="#ffffff">
<tr>
<td bgcolor="ff00ff" style="cursor:text">
<table width="<%=round(kjs.size/kj*100,1)%>%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height=12 bgcolor="#0000ff" title="已使用空间:<%=round(kjs.size/kj*100,1)%>%"></td>
</tr>
</table></td>
</tr>
</table>
<br>
<table width=200 cellpadding=5 cellspacing=1>
<tr>
<td width="83">空间总容量:</td>
<td width="100"><%=rsuser("space")%> M</td>
</tr>
<tr>
<td>已使用:</td>
<td><%
if kjs.size<1024 then
Response.Write (""&kjs.size&" 字节")
elseif usesize<1024 then
Response.Write (""&round(usesize,2)&" KB")
else
Response.Write (""&round(usesize/1024,2)&" MB")
end if
%></td>
</tr>
<tr>
<td>使用百分比:</td>
<td><%
if kjs.size/kj*100<1 then
Response.Write ("0")
Response.Write (""&round(kjs.size/kj*100,3)&" %")
else
Response.Write (""&round(kjs.size/kj*100,1)&" %")
end if
%></td>
</tr>
</table></fieldset></td>
</tr>
</table>
</body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -