找回密码
 注册
搜索
热搜: 回贴
  • 前程无忧官网首页 有什么好的平台可以
  • 最新的销售平台 互联网营销的平台有哪
  • 制作网页的基本流程 网页制作和网页设
  • 【帝国CMS】输出带序号的列表(数字排
  • 网站建设公司 三一,中联,极东泵车的
  • 织梦 建站 织梦网站模版后台怎么更改
  • 云服务官网 哪些网站有免费的简历模板
  • 如何建网站要什么条件 建网站要用什么
  • 吉林市移动公司电话 吉林省退休人员网
  • 设计类毕业论文 网站设计与实现毕业论
查看: 121|回复: 1

[求助]版主求助

[复制链接]
发表于 2010-1-15 02:07:32 | 显示全部楼层 |阅读模式 IP:江苏扬州
这是整个文件。在点击转到下一页时出现以下错误,请版主帮忙解决!

Microsoft VBScript 运行时错误 错误 '800a000d'
类型不匹配: '[string: ""]'
/admin/upFileManage.asp,行44

<%if session("admin")="" then
response.Write "<script language='javascript'>alert('网络超时或您还没有登陆!');window.location.href='login.asp';</script>"
response.End
else
if session("flag")=2 then
response.Write "<p align=center><font color=red>您没有此项目管理权限!</font></p>"
response.End
end if
end if
%>
<!--#include file =conn.asp-->
<head>
<link rel="stylesheet" type="text/css" href="../images/css.css">
</head>
<SCRIPT language = "JavaScript">
<!--//
function unselectall()
{
if(document.myform.chkAll.checked){
document.myform.chkAll.checked = document.myform.chkAll.checked&0;
}
}
function CheckAll(form)
{
for (var i=0;i<form.elements.length;i++)
{
var e = form.elements[i];
if (e.Name != "chkAll")
e.checked = form.chkAll.checked;
}
}
//-->
</script>
<%
dim MaxPerPage
dim strFileName,path,FileName
dim totalPut,CurrentPage,TotalPages,FilePath
dim UploadDir,TruePath,fso,theFolder,theFile,whichfile,thisfile,FileCount,TotleSize
strFileName="upFileManage.asp"
viewtype=Request("viewtype")
if viewtype=1 then
MaxPerPage=15
else
MaxPerPage=35
end if
if request("path")<>"" then
path=request("path")
else
path="../bookpic/"
end if
if request("page")<>"" then
currentPage=cint(request("page"))
else
currentPage=1
end if
if right(path,1)<>"/" then
UploadDir="" & path & "/"
else
UploadDir="" & path
end if
TruePath=Server.MapPath(UploadDir)
If not IsObjInstalled("Scripting.FileSystemObject") Then
Response.Write "<b><font color=red>你的服务器不支持 FSO(Scripting.FileSystemObject)! 不能使用本功能</font></b>"
Else
set fso=CreateObject("Scripting.FileSystemObject")
if request("Action")="Del" then
call DelFiles()
end if
function gotTopic(str,strlen)
if str="" then
gotTopic=""
exit function
end if
dim l,t,c, i
str=replace(replace(replace(replace(str,"&nbsp;"," "),"&quot;",chr(34)),"&gt;",">"),"&lt;","<")
l=len(str)
t=0
for i=1 to l
c=Abs(Asc(Mid(str,i,1)))
if c>255 then
t=t+2
else
t=t+1
end if
if t>=strlen then
gotTopic=left(str,i) & "…"
exit for
else
gotTopic=str
end if
next
gotTopic=replace(replace(replace(replace(gotTopic," ","&nbsp;"),chr(34),"&quot;"),">","&gt;"),"<","&lt;")
end function
function JoinChar(strUrl)
if strUrl="" then
JoinChar=""
exit function
end if
if InStr(strUrl,"?")<len(strUrl) then
if InStr(strUrl,"?")>1 then
if InStr(strUrl,"&")<len(strUrl) then
JoinChar=strUrl & "&"
else
JoinChar=strUrl
end if
else
JoinChar=strUrl & "?"
end if
else
JoinChar=strUrl
end if
end function
Function IsObjInstalled(strClassString)
On Error Resume Next
IsObjInstalled = False
Err = 0
Dim xTestObj
Set xTestObj = Server.CreateObject(strClassString)
If 0 = Err Then IsObjInstalled = True
Set xTestObj = Nothing
Err = 0
End Function
Function GetPath '###获取路径
dim s
s=Request.ServerVariables("path_translated")
GetPath=left(s,instrrev(s,"\",len(s)))
End function
%>
<script language="JavaScript">
function ConfirmDel()
{
if (confirm("你真的要删除此文件吗!"))
return true;
else
return false;
}
</script>
<div align="center">
<table width="96%" border="0" cellspacing="1" class="tableBorder" style="background-color: #E8F1FF">
<tr><th height="22" background="images/bg_3.gif">上传文件管理</th></tr>
<tr>
<td class="forumRowHighlight" height=23> &nbsp;&nbsp;<b>注意</b>:<BR>本功能必须服务器支持FSO权限方能使用,FSO使用帮助请浏览微软网站。如果您服务器不支持FSO请手动管理。<BR></td>
</tr>
<form method="POST" action="?action=pathname">
<tr>
<td class="forumRowHighlight" height=23> <input type="text" name="path" value=<%=path%> size="40" class="td2">&nbsp;<input type="checkbox" name="viewtype" value="1" <% if viewtype=1 then %> checked <% end if %>>缩略图&nbsp;
<input type="submit" value="确认提交" class="button">
(<font color=red>请填写正确的文件夹名或路径</font>)</td>
</tr>
</form>
<tr><td height="22" align="center" class="forumRow"><b>当前浏览 <%=path%> 目录的所有文件列表如下</b></td></form></td></tr>
</table>
</div>
<%
if fso.FolderExists(TruePath)then
FileCount=0
TotleSize=0
Set theFolder=fso.GetFolder(TruePath)
For Each theFile In theFolder.Files
FileCount=FileCount+1
TotleSize=TotleSize+theFile.Size
next
totalPut=FileCount
if currentpage<1 then
currentpage=1
end if
if (currentpage-1)*MaxPerPage>totalput then
if (totalPut mod MaxPerPage)=0 then
currentpage= totalPut \ MaxPerPage
else
currentpage= totalPut \ MaxPerPage + 1
end if
end if
if currentPage=1 then
showpage2 strFileName,totalput,MaxPerPage
showContent
showpage2 strFileName,totalput,MaxPerPage

else
if (currentPage-1)*MaxPerPage<totalPut then
showpage2 strFileName,totalput,MaxPerPage
showContent
showpage2 strFileName,totalput,MaxPerPage

else
currentPage=1
showpage2 strFileName,totalput,MaxPerPage
showContent
showpage2 strFileName,totalput,MaxPerPage

end if
end if
else
response.write "找不到文件夹!可能是配置有误!"
end if
end if
sub showContent()
dim c
FileCount=0
TotleSize=0
%>
<div align="center">
<table width="966" border="0" cellspacing="1" class="tableBorder" style="background-color: #E8F1FF">
<form name="myform" method="post" action="" onsubmit="return confirm('确定要删除选中的文件吗?');">
<tr><th height="20" width="35"> </th>
<th height="20" width="196">文件名</th>
<th height="20">文件大小</th>
<th height="20">文件类型</th>
<th height="20">最后修改时间</th>
</tr>
<%
For Each theFile In theFolder.Files
if Not Response.IsClientConnected then responseend
c=c+1
if FileCount>=MaxPerPage then
exit for
elseif c>MaxPerPage*(CurrentPage-1) then
%>
<tr>
<td width="35" class="forumRowHighlight"><input type="checkbox" name="FileName" value="<%=theFile.Name%>" title="<%=theFile.Name%>"></td>
<td width="196" class="forumRowHighlight" align="center"><a href="<%=(UploadDir & theFile.Name)%>" target="_blank">
<% if viewtype<>1 then %>
<%=theFile.Name%>
<% else %>
<img src="<%=UploadDir & theFile.Name%>" width="100" border="0"><br>fdf<%=theFile.Name%>
<% end if %>
</a></td>
<td width="151" align="right" class="forumRow"><%=theFile.size%>字节</td>
<td width="235" align="center" class="forumRow"><%=theFile.type%></td>
<td width="235" align="center" class="forumRow"><%=theFile.DateLastModified%></td>
</tr>
<%
FileCount=FileCount+1
TotleSize=TotleSize+theFile.Size
end if
Next
%>
<tr><td class="forumRow" align="center" colspan="5"><input name="chkAll" type="checkbox" id="chkAll" onclick=CheckAll(this.form) value="checkbox">全选/反选 
<input name="Action" type="hidden" id="Action" value="Del">
<input type="submit" name="Submit" value="删除选中的文件" class="button"></td></tr>
</form>
</table>
</div>

<%
end sub
%>
</body>
</html>
<%
sub showpage2(sfilename,totalnumber,maxperpage)
dim n, i,strTemp
if totalnumber mod maxperpage=0 then
n= totalnumber \ maxperpage
else
n= totalnumber \ maxperpage+1
end if
strTemp= "<table align='center'><form method='Post' action='" & sfilename & "?path="&request("path")& "&viewtype=" & viewtype &"'><tr><td>"
strTemp=strTemp & "共 <b>" & totalnumber & "</b> 个文件,占用 <b>" & TotleSize\1024 & "</b> K&nbsp;&nbsp;&nbsp;"
sfilename=JoinChar(sfilename)
if CurrentPage<2 then
strTemp=strTemp & "首页 上一页&nbsp;"
else
strTemp=strTemp & "<a href='" & sfilename & "page=1&path="&request("path")& "&viewtype=" & viewtype & "'>首页</a>&nbsp;"
strTemp=strTemp & "<a href='" & sfilename & "page=" & (CurrentPage-1) & "&viewtype=" & viewtype & "&path="&request("path")&"'>上一页</a>&nbsp;"
end if
if n-currentpage<1 then
strTemp=strTemp & "下一页 尾页"
else
strTemp=strTemp & "<a href='" & sfilename & "page=" & (CurrentPage+1) & "&viewtype=" & viewtype & "&path="&request("path")&"'>下一页</a>&nbsp;"
strTemp=strTemp & "<a href='" & sfilename & "page=" & n & "&path="&request("path")& "&viewtype=" & viewtype &"'>尾页</a>"
end if
strTemp=strTemp & "&nbsp;页次:<strong><font color=red>" & CurrentPage & "</font>/" & n & "</strong>页 "
strTemp=strTemp & "&nbsp;<b>" & maxperpage & "</b>" & "个文件/页"
strTemp=strTemp & "&nbsp;转到:<select name='page' size='1' onchange='javascript:submit()'>"
for i = 1 to n
strTemp=strTem
您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|小黑屋|最新主题|手机版|微赢网络技术论坛 ( 苏ICP备08020429号 )

GMT+8, 2024-9-29 19:30 , Processed in 0.467198 second(s), 12 queries , Gzip On, MemCache On.

Powered by Discuz! X3.5

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表