📄 file.asp
字号:
{
str=prompt('将文件 '+oldName+' 更名为:',oldName);
if(!str)return;
obj=document.webedit;
obj.action=baseurl+'&act=renf&from='+oldName+'&to='+str;
obj.submit();
}
function renamed(oldName)
{
str=prompt('将目录 '+oldName+' 更名为:',oldName);
if(!str)return;
obj=document.webedit;
obj.action=baseurl+'&act=rend&from='+oldName+'&to='+str;
obj.submit();
}
function paste()
{
<%if Session("bufferfile")="" or Session("bufferdir")="" then
response.write("alert('剪贴板中没有数据!');"&vbcrlf)
response.write "return;"
end if%>
if(!confirm('真要将文件粘贴到此目录吗?'))
return;
obj=document.webedit;
obj.action=baseurl+'&act=paste';
obj.submit();
}
function del()
{
obj=document.webedit;
if(!confirm('真要删除选中的目录与文件吗?'))
return;
obj.action=baseurl+'&act=del';
obj.submit();
}
function mkdir()
{
str=prompt('新建目录:','');
if(!str)return;
obj=document.webedit;
obj.action=baseurl+'&act=md&to='+str;
obj.submit();
}
function selfileall(act)
{
i=1;
obj=document.webedit;
while(eval('obj.chidf'+i))
{
obj1=eval('obj.chidf'+i);
obj1.checked=act;
i++;
}
}
function seldirall(act)
{
i=1;
obj=document.webedit;
while(eval('obj.chidd'+i))
{
obj1=eval('obj.chidd'+i);
obj1.checked=act;
i++;
}
}
function doit(act)
{
i=1;
issel=0;
obj=document.webedit;
while(eval('obj.chidf'+i))
{
obj1=eval('obj.chidf'+i);
if(obj1.checked)
{issel=1;break;}
i++;
}
i=1
while(eval('obj.chidd'+i))
{
obj1=eval('obj.chidd'+i);
if(obj1.checked)
{issel=1;break;}
i++;
}
if(!issel)
{alert('请先选择文件与目录。');return;}
obj.action=baseurl+'&act='+act;
obj.submit();
}
function refreshit()
{
obj=document.webedit;
obj.action=baseurl;
obj.submit();
}
function upload()
{
window.open('upfile1.asp?path=<%=gPath%>');
}
function viewclip()
{
window.open('clip.asp','_blank','scrollbars');
}
function delit(str)
{
if(!confirm('真要删除文件'+str+'吗?'))
return;
obj=document.webedit;
obj.action=baseurl+'&act=delit&file='+str;
obj.submit();
}
function delitd(str)
{
if(!confirm('真要删除目录'+str+'吗?'))
return;
obj=document.webedit;
obj.action=baseurl+'&act=delitd&file='+str;
obj.submit();
}
function about()
{
window.showModalDialog("images/about.htm","","dialogWidth:280px;dialogHeight:150px;scroll:no;status:no;help:no");
}
</script>
<html>
<head>
<title>Web Edit</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="webedit.css" type="text/css">
</head>
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" rightmargin="0" bottommargin="0" marginwidth="0" marginheight="0">
<form name="webedit" method="post" action="<%=gBaseUrl%>"> <table width="100%" border="1" cellspacing="0" cellpadding="0" bordercolordark="#FFFFFF" bordercolorlight="#666666">
<tr> <td height="40" bgcolor="#cccccc" width="100%"> <table width="100%" border="0" cellspacing="0" cellpadding="5">
<tr>
<td height="32" width="250">TimesShop WEBFTP 程序来源于化境</td>
<td width="32" height="32" align="center"><a href="javascript:doit('copy');"><img src="images/copy.gif" width="32" height="32" alt="复制选中的文件与目录到剪贴板" border="0" class="bt3" onmouseover="this.className='bt';" onmouseout="this.className='bt3';"></a></td><td width="32" height="32" align="center"><a href="javascript:doit('cut');"><img src="images/cut.gif" width="32" height="32" alt="剪切选中的文件与目录到剪贴板" border="0" class="bt3" onmouseover="this.className='bt';" onmouseout="this.className='bt3';"></a></td><td width="32" height="32" align="center"><a href="javascript:paste();"><img src="images/paste.gif" width="32" height="32" alt="粘贴剪巾板中的文件与目录" border="0" class="bt3" onmouseover="this.className='bt';" onmouseout="this.className='bt3';"></a></td><td width="32" height="32" align="center"><a href="javascript:refreshit();"><img src="images/refresh.gif" width="32" height="32" alt="刷新" border="0" class="bt3" onmouseover="this.className='bt';" onmouseout="this.className='bt3';"></a></td><td width="16" height="32" align="center"><a href="javascript:del();"><img src="images/del.gif" width="32" height="32" alt="删除选中的文件与目录" border="0" class="bt3" onmouseover="this.className='bt';" onmouseout="this.className='bt3';"></a></td><td width="32" height="32" align="center"><a href="javascript:about();"><img src="images/about.gif" width="32" height="32" alt="关于" border="0" class="bt3" onmouseover="this.className='bt';" onmouseout="this.className='bt3';"></a></td><td height="32" align="left">剪贴板状态:
<%if Session("bufferdir")<>"" or Session("bufferfile")<>"" then response.write "有数据<input type=button value=""查看剪贴板"" class=""bt"" onclick=""viewclip();"">":else response.write " 空 ":end if%>
</td></tr> </table></td></tr> <tr> <td height="30" bgcolor="#CCCCCC" width="100%">
<table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td height="20"> 位置:
<input type="text" name="curpath" style="width:350" class="tx" value="<%=gPath%>">
过滤显示: <input type="text" name="filter" style="width:100" class="tx" value="<%=gFilter%>">
<input type="button" name="Button" value="转到" class="bt1" onclick="chdir(document.webedit.curpath.value,0);">
</td><td height="20" width="0%"> </td></tr> </table></td></tr> <tr> <td height="369" align="left" valign="top" width="100%">
<table width="100%" border="1" cellspacing="0" cellpadding="0"> <tr> <td height="365" align="left" valign="top" width="27%">
<table border="0" cellspacing="0" cellpadding="0" width="100%"> <tr align="right" bgcolor="#EEEEEE">
<td height="25" valign="middle" colspan="5"> <input type="button" name="Button33" value="全部选择" class="bt1" onClick="seldirall(true);" >
<input type="button" name="Button332" value="清除选择" class="bt1" onClick="seldirall(false);">
<input type="button" name="Button4" value="新建" class="bt1" onclick="mkdir();">
</td></tr> <tr align="left" bgcolor="#EEEEEE"> <td height="25" valign="middle" colspan="5">
<%if gPath<>gRootUrl and gPath<>"/" then response.write "<a href=""javascript:chdir('"&left(gPath,instrRev(gPath,"/",len(gPath)-1))&"',0);"">↑<上一级目录></a>"%>
</td></tr> <%
dim theFolder,cMaxDir
dim theFile,cMaxCount,iTotleSize,c,iMaxPage
cMaxDir=0
for each theFolder in gFolder.SubFolders
cMaxDir=cMaxDir+1
%><tr><td height="20" width="11%" align="center" valign="middle"><input type="checkbox" name="chidd<%=cMaxDir%>" id="chidd<%=cMaxDir%>" value="<%=theFolder.Name%>">
</td><td width="8%" align="center" valign="middle"><img src="images/folder1.jpg" width="16" height="16"></td><td align="left" width="51%"> <a href="javascript:chdir('<%=theFolder.Name%>',1);"><%=theFolder.Name%></a></td>
<td width="16%" align="center" nowrap><a href="javascript:renamed('<%=theFolder.Name%>');">更名
</a></td>
<td width="14%" align="center" nowrap><a href="javascript:delitd('<%=thefolder.Name%>')">
删除</a></td>
</tr><%
next
c=0
cMaxCount=0
iTotleSize=0
For Each theFile in gFolder.Files
if procCheckFile(theFile.Name,0)="ok" then
cMaxCount=cMaxCount+1
iTotleSize=iTotleSize+theFile.Size
end if
next
iMaxPage=cMaxCount\gPageSize+1
%> <tr bgcolor="#EEEEEE"> <td height="21" colspan="5">共 <%=cMaxDir%> 个目录 <input type="hidden" name="maxdir" value="<%=cMaxDir%>">
</td></tr> </table></td><td width="1%" height="365" bgcolor="#CCCCCC"></td><td width="72%" height="365" align="left" valign="top">
<table border="0" cellspacing="0" cellpadding="0" width="100%"> <tr align="right" bgcolor="#EEEEEE">
<td height="25" valign="middle" colspan="8"> <input type="button" name="Button3" value="全部选择" class="bt1" onClick="selfileall(true);">
<input type="button" name="Button32" value="清除选择" class="bt1" onClick="selfileall(false);">
<input type="button" name="Button2" value="上传文件" class="bt1" style="width:60;height:19" onclick="upload();">
</td></tr> <tr align="left"> <td height="25" valign="middle" colspan="8" bgcolor="#EEEEEE">总
<%=cMaxCount%> 个文件,第 <%=gPage%> 页,共 <%=iMaxPage%> 页, <%
if gPage>1 then
response.write "<a href="""&gFileName&"?path="&gPath&"&page="&gPage-1&""">上一页,</a>"
else
response.write "上一页,"
end if
if gPage<iMaxPage then
response.write "<a href="""&gFileName&"?path="&gPath&"&page="&gPage+1&""">下一页</a>,"
else
response.write "下一页,"
end if
%> 第 <input type="text" name="fliter2" style="width:30" class="tx"> 页 <input type="button" name="Button5" value="转到" class="bt1" onClick="chdir(document.webedit.curpath.value,0);">
</td></tr> <%
cMaxCount=0
iTotleSize=0
For Each theFile in gFolder.Files
c=c+1
if cMaxCount>=gPageSize then
exit For
elseif procCheckFile(theFile.Name,0)="ok" and c>gPageSize*(gPage-1) then
iTotleSize=iTotleSize+theFile.Size
cMaxCount=cMaxCount+1
%> <tr> <td height="25" width="6%" align="center" valign="middle"> <input type="checkbox" name="chidf<%=cMaxCount%>" id="chidf<%=cMaxCount%>" value="<%=theFile.Name%>">
</td><td width="3%" align="center" valign="middle"><img src="images/<%=procGetFormat(theFile.Name)%>.gif" width="16" height="16"></td><td width="40%"> <a href="javascript:openit('<%=theFile.Name%>');"><%=theFile.Name%></a></td>
<td width="5%" align="center" nowrap><a href="javascript:edit('<%=theFile.Name%>');">编辑
</a></td>
<td width="5%" align="center" nowrap><a href="javascript:rename('<%=theFile.Name%>');">
更名 </a></td>
<td width="5%" align="center" nowrap><a href="javascript:delit('<%=theFile.Name%>');">删除
</a></td>
<td align="right" width="11%"><%=theFile.Size%> </td><td align="left" width="25%"><%=theFile.DateLastModified%></td></tr>
<%
end if
next
%><tr bgcolor="#EEEEEE"> <td height="28" colspan="8">当前共 <%=cMaxCount%> 个文件,共
<%=iTotleSize\1000%> K <input type="hidden" name="maxfile" value="<%=cMaxCount%>">
</td></tr> </table></td></tr> </table></td></tr> <tr>
<td height="43" align="center" valign="middle" bgcolor="#CCCCCC" width="100%">©Copyright
written by Alfred</td>
</tr> </table></form>
</body>
</html>
<%
set gFolder=nothing
set fo=nothing%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -