| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 388 人关注过本帖
标题:不能翻页的问题
只看楼主 加入收藏
tlf01081141
Rank: 1
等 级:新手上路
帖 子:2
专家分:0
注 册:2006-8-30
收藏
 问题点数:0 回复次数:2 
不能翻页的问题

这个网页的翻页无法实现,提示"找不到页面"!!!!各位大哥帮忙看看

<!--#include file="conn.asp"-->
<!--#include file="sub.asp"-->
<%
ClassName=trim(request.QueryString("ClassName"))
ClassID=cint(request.QueryString("ID"))
const MaxPerPage=10
if not isempty(request("page")) then
currentPage=cint(request("page"))
else
currentPage=1
end if
FileName="ShowClass.asp?ClassName="&ClassName&"&ID="&ClassID
%>
<HTML><HEAD><TITLE><%=RS5(1)%></TITLE>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<META
content=<%=keywords1%>
name=keywords>
<META
content=<%=keywords1%>
name=description>
<STYLE type=text/css>BODY {
BACKGROUND-COLOR: #333333
}
</STYLE>
<LINK href="images/css.css" type=text/css rel=stylesheet>
<STYLE type=text/css>.style2 {
FONT-WEIGHT: bold; COLOR: #000000
}
.style3 {
COLOR: #000000
}
</STYLE>
<BODY leftMargin=0 topMargin=0 marginheight="0" marginwidth="0">
<TABLE cellSpacing=0 cellPadding=0 align=center border=0>
<TBODY>
<TR>
<TD><IMG height=110 alt=""
src="<%=RS5(3)%>" width=750
border=0></TD>
</TR></TBODY></TABLE>
<TABLE cellSpacing=0 cellPadding=0 width=750 align=center
background=images/004.gif border=0>
<TBODY>
<TR>
<TD bgColor=#cccccc>
<TABLE cellSpacing=0 cellPadding=0 width="100%"
background=images/004.gif border=0>
<TBODY>
<TR>
<TD></TD>
<TD vAlign=bottom align=right height=22><%
set rs=conn.execute("select ID,ClassName,classtype,url from ClassName order by RootID")
do while not rs.eof
Select case rs(2)
case "1"
url1="photo.asp"
case "2"
url1="wen.asp"
case "3"
url1="contents.asp"

case "4"
url1=rs(3)
case "5"
url1="photo.asp"
End Select
str=str&"■ <a href="&RS5(2)&url1&"?ClassName="&rs(1)&"&ID="&rs(0)&">"
if CurrentID=rs(0) then
str=str&"<font color=""#000000"">"&rs(1)&"</font></a> "
else
str=str&"<font color=""#000000"">"&rs(1)&"</font></a> "
end if
rs.movenext
loop
rs.close:Set RS=nothing
response.Write(str)
%> &nbsp;&nbsp;</TD>
</TR>
<TR>
<TD bgColor=#333333 colSpan=2 height=2><IMG height=2 src=""
width=2></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE>
<TABLE cellSpacing=0 cellPadding=0 width=750 align=center border=0>
<TBODY>
<TR>
<TD vAlign=top bgColor=#ffffff height=21> <TABLE cellSpacing=0 cellPadding=0 width="100%" align=center border=0>
<TBODY>
<TR>
<td width="728"><table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td colspan="2" height="12">&nbsp;</td>
</tr>
<tr>
<td colspan="2" valign="top"><table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
<%
sql="select * from title where ClassID="&ClassID&" order by updatetime desc"
Set rs= Server.CreateObject("ADODB.Recordset")
rs.open sql,conn,1,1
if rs.eof and rs.bof then
response.write "<tr><td align='center'> 还 没 有 任 何 组 图</td></tr>"
else
totalPut=rs.recordcount
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
showpage totalput,MaxPerPage,FileName
showContent
showpage totalput,MaxPerPage,FileName
else
if (currentPage-1)*MaxPerPage<totalPut then
rs.move (currentPage-1)*MaxPerPage
dim bookmark
bookmark=rs.bookmark
showpage totalput,MaxPerPage,FileName
showContent
showpage totalput,MaxPerPage,FileName
else
currentPage=1
showpage totalput,MaxPerPage,FileName
showContent
showpage totalput,MaxPerPage,FileName
end if
end if
rs.close
end if

set rs=nothing
%>
<%sub ShowContent()%>
<tr>
<td colspan="2" height="12">&nbsp;</td>
</tr>
<tr>
<td colspan="2" valign="top"><table width="98%" border="0" cellspacing="0" cellpadding="0" align="center">
<%dim i:i=1
do while not rs.eof%>
<tr>
<%for j=1 to 2%>
<%set rsShow=conn.execute("select top 1 * from imgbook where titleID="&rs("titleID")&" order by ID desc")%>
<td width="23%" height="130" valign="top"><a href="list.asp?titleID=<%=rs("titleID")%>&ClassID=<%=ClassID%>&KeyWords=<%=rs("titleName")%>" title="点击查看详细情况">
<script src="showpic.asp?FileName=admin/<%=rsShow("photo")%>"></script></a><%rsShow.Close
set rsShow=nothing%>
<table width="75%" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td height="26"><b>姓名:<%=rs("tblName")%></b></td>
</tr>
</table>
</td>
<td class="f1" style="line-height: 15px; letter-spacing: 1px;" width="77%">
<table width="33%" border="0" cellspacing="0" cellpadding="4">
<tr>
<td>性别:<%=rs("tblxinbei")%> </td>
</tr>
<tr>
<td>星座:<%=rs("tblxz")%> </td>
</tr>
<tr>
<td>出生地:<%=rs("tblcsd")%> </td>
</tr>
<tr>
<td>学历:<%=rs("tblxl")%></td>
</tr>
<tr>
<td>图库共<span class="redbold"><%=rs("titleCount")%></span>张相关</td>
</tr>
</table>
</td>
<%rs.movenext
i=i+1
if rs.eof then exit for
next%>
</tr>
<tr>
<td height="12" colspan="4" style="border-top: 1 solid #999999;">&nbsp;</td>
</tr>
<%if i>MaxPerPage then exit do
loop%>
</table></td>
</tr>
<%end sub%>
</table></td>
<td>&nbsp;</td>
</tr>
</table>
<%
function showpage(totalnumber,maxperpage,filename)
dim n
if totalnumber mod maxperpage=0 then
n= totalnumber \ maxperpage
else
n= totalnumber \ maxperpage+1
end if
response.write "<tr>"
response.write "<td width='40%' height='25'><span class='f1'><strong>位置:</strong></span><a href='main.asp'><span class='whitebold'>首页</span></a><span class='whitebold'>-</span><a href='photo.asp?ClassName="&ClassName&"&ID="&ClassID&"'><span class='redbold'>"&ClassName&"</span></a></td>"
response.write "<form method=Post action="&filename&"><td width='60%' align='right' class='f1'>"
if CurrentPage>=2 then
response.write "<a href="&filename&"&page=1>首页</a> "
response.write "<a href="&filename&"&page="&CurrentPage-1&">上一页</a> "
end if
if n-currentpage>=1 then
response.write "<a href="&filename&"&page="&(CurrentPage+1)&">下一页</a> "
response.write "<a href="&filename&"&page="&n&">尾页</a>"
end if
response.write " 共有 <b>"&totalnumber&"</b> 组,<b>"&n&"</b> 页</font> "
response.write " 第 <b><font color=red>"&CurrentPage&"</font></b> 页 "
response.write " 转到 <input type='text' name='page' maxlength=10 value="&currentpage&" style='width: 30px;height: 20px'>"
response.write " <input type='submit' value='Go' name='cndok' style='width: 30px;height: 20px;text-align: center'></td></form></tr>"
end function
%>
</TD>
</TR></TBODY></TABLE></TD></TR></TBODY></TABLE><LINK
href="images/css.css" type=text/css rel=stylesheet>
<STYLE type=text/css>.style1 {
COLOR: #666666
}
.unnamed1 {
FONT-SIZE: 10pt; COLOR: #333333
}
</STYLE>

<META
content=<%=keywords1%>
name=keywords>
<META
content=<%=keywords1%>
name=description>
<TABLE id=__01 cellSpacing=0 cellPadding=0 width=750 align=center border=0>
<TBODY>
<TR background="image/019.gif">
<TD background="" colSpan=11><EM><IMG height=2 src="" width=2></EM></TD></TR>
<TR background="image/019.gif">
<TD noWrap background=images/019.gif colSpan=11 height=66>
<DIV align=center><%CopyRight%></DIV></TD></TR></TBODY></TABLE></BODY></HTML>

搜索更多相关主题的帖子: 网页 request include 
2006-08-30 10:14
乱弹琴
Rank: 1
等 级:新手上路
威 望:1
帖 子:1665
专家分:0
注 册:2006-3-7
收藏
得分:0 
检查一下文件名称和路径

男人的謊言可以騙女人的壹夜! 女人的謊言可以騙男人的壹生!
2006-08-30 13:22
tlf01081141
Rank: 1
等 级:新手上路
帖 子:2
专家分:0
注 册:2006-8-30
收藏
得分:0 
终于找到了~!谢谢楼上
FileName="ShowClass.asp?ClassName="&amp;ClassName&amp;"&amp;ID="&amp;ClassID
ShowClass.asp这个文件名错了
2006-08-30 15:15
快速回复:不能翻页的问题
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.020042 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved