程序出错 大家帮我查一下 谢谢
错误信息:
Microsoft VBScript 编译器错误 错误 '800a03f6'
缺少 'End'
/500-100.ASP,行242
ADODB.Recordset 错误 '800a0cc1'
项目在所需的名称或序数中未被发现。
/千年游戏/admin/CoolSite_Manage.asp,行238
代码:
<!--#include file = "Startup.asp"-->
<%
Call Header()
Call ComeUrl()
%>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<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.disabled==false)
e.checked = form.chkAll.checked;
}
}
function ConfirmDel()
{
if(document.myform.Action.value=="Del")
{
if(confirm("确定要删除(审核)选中的文章吗?本操作将把选中的文章移到回收站(发表到前台)中。"))
return true;
else
return false;
}
else if(document.myform.Action.value=="ConfirmDel")
{
if(confirm("确定要彻底删除选中的站点吗?一旦删除将不能恢复!"))
return true;
else
return false;
}
}
</SCRIPT>
<%
Dim zRs,zSql,zRs1,zSql1,zRs2,zSql2,zCount
Dim FileName,ManageType,ClassID
Dim strParentPathw(),strParentPath,w
FileName="CoolSite_Manage.asp"
ManageType=Trim(Request("ManageType"))
ClassID=Trim(Request("ClassID"))
If ClassID="" Then
ClassID=0
End If
If ClassID <>0 Then
w=0
Set zRs=Server.CreateObject("ADODB.Recordset")
zSql="Select ClassID,ClassName,ParentID From CoolSiteClass Where ParentID Like '%"&ClassID&"%'"
zRs.Open zSql,oConn,1,1
If Not zRs.Eof Then
Do While Not zRs.Eof
redim preserve strParentPathw(w)
strParentPathw(w)=zRs("ClassID")
w=w+1
zRs.MoveNext
Loop
End If
zRs.Close
strParentPath=join(strParentPathw,",")
If strParentPath="" Then
strParentPath=ClassID
End If
End If
If ManageType="ClassForm" Then
sSql="Select C_ID,C_SiteName,C_SiteClass,C_SiteUrl,C_Editor,C_AddTime,C_SiteCount From CoolSiteData Where C_SiteClass in ("&strParentPath&") And C_Recycle=false Order By C_ID Desc"
FileName=FileName&"?ManageType=ClassForm&ClassID="&ClassID&"&"
Session("FileName")=FileName
Else
sSql="Select C_ID,C_SiteName,C_SiteClass,C_SiteUrl,C_Editor,C_AddTime,C_SiteCount From CoolSiteData Where C_Recycle=false Order By C_ID Desc"
FileName="CoolSite_Manage.asp?"
Session("FileName")=FileName
End If
oRs.Open sSql,oConn,1,1
%>
<%
const MaxPerPage=15 '单独页最大记录数 const 用来申明常量
dim totalPut '总记录
dim CurrentPage '当前页次
dim TotalPages '总页数
dim i
'!-- 分页功能代码块,可独立使用
if not ors.eof then
ors.MoveFirst '注意放到前面来,否则到任何页总是在第一个记录上
end if
ors.pagesize=MaxPerPage '设置每页最多显示多少条记录
If trim(Request("Page"))<>"" then '如果请求的页次不为空
CurrentPage= CLng(request("Page")) 'clng是转换成长整型数据类型,并赋值到当前页次上
If CurrentPage> ors.PageCount then '如果当前页次大于总页数,则将最大页次赋值到当前页次上
CurrentPage = ors.PageCount
End If
Else
CurrentPage= 1 '一切条件不成立,将当前页设为第一页
End If
totalPut=ors.recordcount '将总记录赋值于TOTALPUT
if CurrentPage<>1 then '如果当前页数不等于第一页
if (currentPage-1)*MaxPerPage<totalPut then '如果当前页减一乘以每页最大的记录数小于总记录的话
ors.move(currentPage-1)*MaxPerPage '相对当前记录数向后移动
dim bookmark '定义书签变量
bookmark=ors.bookmark '将当前记录的标签赋于变量BOOKMARK上
end if
end if
dim n,k
if (totalPut mod MaxPerPage)=0 then '总记录数与每页最大记录数求余的结果为零时,则N返回整数页次,否则再加一.
n= totalPut \ MaxPerPage
else
n= totalPut \ MaxPerPage + 1
end if
%>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>您现在的位置: 站点管理 >>
<%
If ClassID=0 Then
Response.Write " 所有站点"
Else
zSql="Select ClassName,ClassID,ParentID From CoolSiteClass Where ClassID="&ClassID
zRs.Open zSql,oConn,1,1
If zRs("ParentID")<>0 Then
Set zRs1=Server.CreateObject("ADODB.Recordset")
zSql1="Select ClassName,ClassID,ParentID From CoolSiteClass Where ClassID="&zRs("ParentID")
zRs1.Open zSql1,oConn,1,1
If Not zRs1.Eof Then
Response.Write "<a href ='CoolSite_Manage.asp?ManageType=ClassForm&ClassID="&zRs1("ClassID")&"'>"&zRs1("Classname")&"</a> >> <a href ='CoolSite_Manage.asp?ManageType=ClassForm&ClassID="&zRs("ClassID")&"'>"&zRs("ClassName")&"</a>"
End If
zRs1.Close
Else
Response.Write "<a href ='CoolSite_Manage.asp?ManageType=ClassForm&ClassID="&zRs("ClassID")&"'>"&zRs("ClassName")&"</a>"
End If
zRs.Close
End If
%>
</td>
<td><div align="right">
<select name='JumpClass' id="JumpClass" onchange="if(this.options[this.selectedIndex].value!=''){location='CoolSite_Manage.asp?ManageType=ClassForm&ClassID='+this.options[this.selectedIndex].value;}">
<option value='' selected>跳转栏目至…</option>
<%
Set zRs1=Server.CreateObject("ADODB.Recordset")
zSql1="Select ClassID,ClassName From CoolSiteClass Where ParentID=0 Order By ClassID Desc"
zRs1.Open zSql1,oConn,1,1
If Not zRs1.Eof Then
Do While Not zRs1.Eof
Set zRs2=Server.CreateObject("ADODB.Recordset")
zSql2="Select ClassID,ClassName From CoolSiteClass Where ParentID="&zRs1("ClassID")
zRs2.Open zSql2,oConn,1,1
If Not zRs2.Eof Then
zCount=zRs2.RecordCount
Response.Write "<option value='"&zRs1("ClassID")&"'>"&zRs1("ClassName")&"</option>"
Do While Not zRs2.Eof
If zCount<=1 Then
Response.Write "<option value='"&zRs2("ClassID")&"'>└"&zRs2("ClassName")&"</option>"
Else
Response.Write "<option value='"&zRs2("ClassID")&"'>├"&zRs2("ClassName")&"</option>"
End If
zRs2.MoveNext
zCount=zCount-1
Loop
zRs2.Close
Else
Response.Write "<option value='"&zRs1("ClassID")&"'>"&zRs1("ClassName")&"</option>"
End If
zRs1.MoveNext
Loop
End If
zRs1.Close
%>
</select>
</div></td>
</tr>
<tr>
<td colspan="2"><img src="images/zw000.gif" width="1" height="8"></td>
</tr>
</table>
<table width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="#DEDFDE">
<form name="myform" method="post" action="CoolSite_Del.asp" onsubmit="return ConfirmDel();"><tr bgcolor="#F7F7F7">
<td width="40"><DIV align=center><STRONG>选中</STRONG></DIV></td>
<td><div align="center">站点名称</div></td>
<td><div align="center">站点分类</div></td>
<td><div align="center">添加</div></td>
<td width="130"><div align="center">添加时间</div></td>
<td width="40"><div align="center">审核</div></td>
<td width="40"><div align="center">修改</div></td>
<td width="40"><div align="center">删除</div></td>
</tr>
<%
If oRs.Eof Then
Response.Write "<tr><td bgcolor='#ffffff' colspan='7'><div align='center'>暂无新闻信息!!</div></td></tr></table>"
Else
Do While Not oRs.Eof and i<maxperpage
%>
<tr bgcolor="#FFFFFF">
<td width="40"><div align="center"><input name='SiteID' type='checkbox' onClick="unselectall()" id="SiteID" value="<%=oRs("C_ID")%>"></div></td>
<td><a href="CoolSite_Modify.asp?SiteID=<%=oRs("C_ID")%>" title="站点 ID:<%=oRs("C_ID")&vbcrlf%>站点名称:<%=oRs("C_SiteName")&vbcrlf%>站点添加:<%=oRs("C_Editor")&vbcrlf%>添加时间:<%=oRs("C_AddTime")&vbcrlf%>点击次数:<%=oRs("C_SiteCount")%>"><%=gotTopic(oRs("C_SiteName"),50)%></a></td>
<td><div align="center">
<%
Set zRs=Server.CreateObject("ADODB.Recordset")
zSql="Select ClassName,ParentID From CoolSiteClass Where ClassID="&oRs("C_SiteClass")
zRs.Open zSql,oConn,1,1
If Not zRs.Eof Then
If zRs("ParentID")<>0 Then
Set zRs1=Server.CreateObject("ADODB.Recordset")
zSql1="Select ClassName From CoolSiteClass Where ClassID="&zRs("ParentID")
zRs1.Open zSql1,oConn,1,1
If Not zRs1.Eof Then
Response.Write zRs1("ClassName")&"("&zRs("ClassName")&")"
Else
Response.Write "无此分类"
End If
zRs1.Close
Else
Response.Write zRs("ClassName")
End If
Else
Response.Write "无此分类"
End If
zRs.Close
%>
</div></td>
<td><div align="center"><%=oRs("C_Editor")%></div></td>
<td width="130"><div align="center"><%=oRs("C_AddTime")%></div></td>
<td width="40"><%If oRs("C_Display")=False Then%><div align="center">[<a href="CoolSite_Del.asp?SiteID=<%=oRs("C_ID")%>&Action=Dis" onclick="return ConfirmDel();">审核</a>]</div><%End If%></td>
<td width="40"><div align="center">[<a href="CoolSite_Modify.asp?SiteID=<%=oRs("C_ID")%>">修改</a>]</div></td>
<td width="40"><div align="center">[<a href="CoolSite_Del.asp?SiteID=<%=oRs("C_id")%>&Action=Del" onclick="return ConfirmDel();">删除</a>]</div></td>
</tr>
<%
oRs.MoveNext
i=i+1
Loop
%>
<tr bgcolor="#FFFFFF">
<td colspan="7"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="40"><div align="center">
<input name="chkAll" type="checkbox" id="chkAll" onclick=CheckAll(this.form) value="checkbox">
</div></td>
<td>选中本页显示的所有站点</td>
<td><div align="right"><input name="Action" type="hidden" id="Action2" value="Del">
<input type="Submit" id="submit" value=" 批量审核 " title='批量审核' onClick="document.myform.Action.value='Dis'" class='input_submit'>
<input type="Submit" id="submit" value=" 放到回收站 " title='放到回收站' onClick="document.myform.Action.value='Del'" class='input_submit'>
<%If session("userclass")=1 Then%>
<input type="submit" name="Submit1" value=" 彻底删除 " onClick="document.myform.Action.value='ConfirmDel'" class="input_submit">
<%End If%>
</div></td>
</tr>
</table></td>
</tr></form>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="30"><div align="center">
<%
Response.Write "共 <font color='#FF0000'>"&totalPut&"</font> 篇新闻 "
k=currentPage
if k<>1 then
response.write "[<b>"+"<a href='"&FileName&"page=1'>首页</a></b>] "
response.write "[<b>"+"<a href='"&FileName&"page="&cstr(k-1)&"'>上一页</a></b>] "
else
Response.Write "[首页] [上一页]"
end if
if k<>n then
response.write "[<b>"+"<a href='"&FileName&"page="&cstr(k+1)&"'>下一页</a></b>] "
response.write "[<b>"+"<a href='"&FileName&"page="&cstr(n)&"'>尾页</a></b>] "
else
Response.Write "[下一页] [尾页]"
end if
Response.Write " 页次:<font color='#ff0000'>"¤tpage&"</font>/"&n&"页 15篇新闻/页"
%>
转到:
<select name="select" onchange="javascript:window.location='<%=FileName%>page='+this.options[this.selectedIndex].value;">
<option>跳转页</option>
<%
Dim z
For z=1 To n%>
<option value="<%=z%>">第<%=z%>页</option>
<%
Next
%>
</select>
</div></td>
</tr></table>
<%
End If
oRs.Close
%>
[此贴子已经被作者于2007-3-2 16:55:04编辑过]