症状:记录能找出来,,假如记录不足1页显示的就没问题,,但分页显示的话,,当点下一页显示就出错了,,,
假如:索引不采用like的话,,而是采用"=" ,则分页按钮又正常了...
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include virtual="index/conn2.asp"--><link href="../hover.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.STYLE1 {color: #8000FF}
.STYLE2 {
color: #009900;
font-weight: bold;
}
.STYLE4 {font-size: 16pt}
.STYLE11 {
font-size: 20px;
font-weight: bold;
}
.STYLE12 {font-size: 15px}
.STYLE13 {font-size: 13px}
.STYLE14 {color: #FF33FF}
-->
</style>
<body background="../images/one.gif" topmargin=0>
<%
if request.cookies ("abciekbia15wawgiabaaogn6916")="" then
response.write "<br> "
response.write "<br>Cookies已清空,请联络管理员谢谢! 或 请点击此处<a href='../login.asp'>登陆系统</a>!!"
Response.Cookies ("abciekbia15wawgiabaaogn6916")=""
rs.close :set rs=nothing
conn.close:set conn=nothing
response.end
end ifdim page,maxPerPage
maxPerPage=2page=Request("page")
if (page="" or isempty(page)) then page=1
thisUrl="check_film.asp?="&productSort&"" Set rs = server.createObject("ADODB.Recordset")
rs.open "select * from film where name like '%"&Request.form("name")&"%' order by name",conn,1,1 Set rs1 = server.createObject("ADODB.Recordset")
rs1.Open "select * from huiyuan where name='"&request.cookies ("abciekbia15wawgiabaaogn6916")&"' ",conn,1,1rs.pagesize=MaxPerPage
%>
<html>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>搜索电影结果</title>
<link href="../../hover.css" rel="stylesheet" type="text/css"><script language="JavaScript">
<!--
function MM_reloadPage(init) {
if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);function jumpTo(i){
if(i==1){
this.document.location="<%=thisUrl%>";}
if(i==2){
this.document.location="<%=thisUrl%>&page=<%=page-1%>";}
if(i==3){
this.document.location="<%=thisUrl%>&page=<%=page+1%>";}
if(i==4){
this.document.location="<%=thisUrl%>&page=<%=rs.pageCount%>";}
}function recommend(i){
{
window.location="recommend.asp?id="+i;
}
}
// -->
</script><table width="710" border="0" align="center" cellspacing="0">
<tr>
<td colspan="2"> </td>
</tr>
<tr>
<td width="660" height="25"><span class="STYLE2">你当前的等级:<font color=red><%=rs1("dengji")%></font>级会员</span><span class="STYLE1"></span><span class="STYLE1"> 1级:编辑电影数据 3级:增加功能 10级:收录 13级:变更</span></td>
<td width="46"><div align="right"><a href='film.asp'>返回<<</a></div></td>
</tr>
</table>
<table width="710" border="0" align="center" cellspacing="0">
<tr>
<td><table width="710" height="30" border="0" align="center" cellspacing="0">
<tr>
<td valign="middle"><form name="form1" method="post" action="check_film.asp">
排序方式: <a href="film_all.asp"><font color=blue>新增</font></a> <a href="film_mingcheng.asp"><font color=blue>名字</font></a> <a href="film_all_desc_time.asp"><font color=blue>公影日期</font></a> <a href="film_guo.asp"><font color=blue>国语</font></a> <a href="film_yue.asp"><font color=blue>粤语</font></a> <a href="film_eng.asp"><font color=blue>英语</font></a> <a href="film_edit.asp"><font color=blue>编辑&收录</font></a>
<input name="name" type="text" id="name" size="15">
<input type="submit" name="Submit" value="搜索电影">
</form></td>
</tr>
</table></td>
</tr>
</table>
<table width="710" border="1" align="center" cellspacing="0" bordercolor="#D9B3FF">
<%
i=1
a=1
if not (rs.eof or err) then rs.move (page-1)*maxPerPage
do while not (rs.eof or err)
%>
<tr>
<td width="700"><table width="700" height="170" border="0" align="center" cellspacing="0">
<tr>
<td width="152" rowspan="7"><a href="images/<%=rs("name")%>.jpg"><img src="images/<%=rs("name")%>.jpg" width="140" height= "170" border="0"></a></td>
<td width="352" height="25"><div align="center" class="STYLE11"><%=rs("name")%></div></td>
<td width="190" height="25" align="right"><div class="STYLE13"><font color=green><%=rs("diaxiao")%>MB
<%if rs("shoulu")<>"收录" and rs1("dengji")>=10 then%>
<a href="film_shoulu_pro.asp?name=<%=rs("name")%>">收录</a>
<%else%>
<%if rs1("dengji")>=13 then%>
<a href="film_shoulu_modify.asp?name=<%=rs("name")%>">变更</a>
<%end if%>
<%end if%>
</font></div></td>
</tr>
<tr>
<td height="22"><span class="STYLE12">年份 <font color=green><%=rs("date")%>年</font></span></td>
<td height="22"><div align="right" class="STYLE13">
<%if rs("shoulu")<>"收录" and rs1("dengji")>=10 then%>
<a href="modify_film.asp?name=<%=rs("name")%>"><font color=blue>修改</font>
<%end if%>
</a></div></td>
</tr>
<tr>
<td height="22" colspan="2"><span class="STYLE4"><span class="STYLE12">主演 <font color=green><%=rs("zhuyuan1")%> <%=rs("zhuyuan2")%> <%=rs("zhuyuan3")%> <%=rs("zhuyuan4")%> <%=rs("zhuyuan5")%></font></span></span></td>
</tr>
<tr>
<td height="22" colspan="2"><span class="STYLE12">地方 <font color=green><%=rs("difang")%></font></span></td>
</tr>
<tr>
<td height="22" colspan="2"><span class="STYLE12">语言 <font color=green><%if rs("guoyu")<>"" then%><%=rs("guoyu")%> <%end if%><%if rs("yueyu")<>"" then%><%=rs("yueyu")%> <%end if%><%if rs("engyu")<>"" then%><%=rs("engyu")%> <%end if%><%if rs("otheryu")<>"" then%><%=rs("otheryu")%><%end if%></font></span></td>
</tr>
<tr>
<td height="22"><span class="STYLE12">尺码 <font color=green><%=rs("memo")%></font></span></td>
<td height="22"> </td>
</tr>
<tr>
<td height="22"><span class="STYLE12">下载 <font color=green><%if rs("guoyu")<>"" then%>国语<a href="mp4/<%=rs("name")%>国语.mp4"><img src="../images/download.gif" width="15" height="15" border="0"></a> <%end if%><%if rs("yueyu")<>"" then%>粤语<a href="mp4/<%=rs("name")%>粤语.mp4"><img src="../images/download.gif" width="15" height="15" border="0"></a> <%end if%><%if rs("engyu")<>"" then%>英语<a href="mp4/<%=rs("name")%>英语.mp4"><img src="../images/download.gif" width="15" height="15" border="0"></a> <%end if%><%if rs("otheryu")<>"" then%>其他语言<a href="mp4/<%=rs("name")%>其他语言.mp4"><img src="../images/download.gif" width="15" height="15" border="0"></a><%end if%></font></span></td>
<td height="22"><div align="right"><span class="STYLE12"><font color=green>日期:<%=rs("regdate")%></font></span></div></td>
</tr>
</table>
</td>
</tr>
<%a=a+1%>
<%
i=i+1
if i>maxPerPage then exit do
rs.moveNext
loop
%>
<tr>
<td colspan="2"><div align="right">共<%=rs.recordCount%>项<%=b%> 第<%=page%>/<%=rs.pagecount%> 页
<%if page>1 then%>
<input type="button" name="Submit3" value="首页" onClick="Javascript:jumpTo(1)">
<input type="submit" name="Submit4" value="上页" onClick="Javascript:jumpTo(2)">
<%else%>
<input type="button" name="Submit32" value="首页" disabled>
<input type="submit" name="Submit4" value="上页" disabled>
<%end if
if rs.recordCount>page*maxPerPage then%>
<input type="submit" name="Submit5" value="下页" onClick="Javascript:jumpTo(3)">
<input type="submit" name="Submit6" value="末页" onClick="Javascript:jumpTo(4)">
<%else%>
<input type="submit" name="Submit5" value="下页" disabled>
<input type="submit" name="Submit6" value="末页" disabled>
<%end if%>
</div></td>
</tr>
</table>
</body>
</html>
假如:索引不采用like的话,,而是采用"=" ,则分页按钮又正常了...
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include virtual="index/conn2.asp"--><link href="../hover.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.STYLE1 {color: #8000FF}
.STYLE2 {
color: #009900;
font-weight: bold;
}
.STYLE4 {font-size: 16pt}
.STYLE11 {
font-size: 20px;
font-weight: bold;
}
.STYLE12 {font-size: 15px}
.STYLE13 {font-size: 13px}
.STYLE14 {color: #FF33FF}
-->
</style>
<body background="../images/one.gif" topmargin=0>
<%
if request.cookies ("abciekbia15wawgiabaaogn6916")="" then
response.write "<br> "
response.write "<br>Cookies已清空,请联络管理员谢谢! 或 请点击此处<a href='../login.asp'>登陆系统</a>!!"
Response.Cookies ("abciekbia15wawgiabaaogn6916")=""
rs.close :set rs=nothing
conn.close:set conn=nothing
response.end
end ifdim page,maxPerPage
maxPerPage=2page=Request("page")
if (page="" or isempty(page)) then page=1
thisUrl="check_film.asp?="&productSort&"" Set rs = server.createObject("ADODB.Recordset")
rs.open "select * from film where name like '%"&Request.form("name")&"%' order by name",conn,1,1 Set rs1 = server.createObject("ADODB.Recordset")
rs1.Open "select * from huiyuan where name='"&request.cookies ("abciekbia15wawgiabaaogn6916")&"' ",conn,1,1rs.pagesize=MaxPerPage
%>
<html>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>搜索电影结果</title>
<link href="../../hover.css" rel="stylesheet" type="text/css"><script language="JavaScript">
<!--
function MM_reloadPage(init) {
if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);function jumpTo(i){
if(i==1){
this.document.location="<%=thisUrl%>";}
if(i==2){
this.document.location="<%=thisUrl%>&page=<%=page-1%>";}
if(i==3){
this.document.location="<%=thisUrl%>&page=<%=page+1%>";}
if(i==4){
this.document.location="<%=thisUrl%>&page=<%=rs.pageCount%>";}
}function recommend(i){
{
window.location="recommend.asp?id="+i;
}
}
// -->
</script><table width="710" border="0" align="center" cellspacing="0">
<tr>
<td colspan="2"> </td>
</tr>
<tr>
<td width="660" height="25"><span class="STYLE2">你当前的等级:<font color=red><%=rs1("dengji")%></font>级会员</span><span class="STYLE1"></span><span class="STYLE1"> 1级:编辑电影数据 3级:增加功能 10级:收录 13级:变更</span></td>
<td width="46"><div align="right"><a href='film.asp'>返回<<</a></div></td>
</tr>
</table>
<table width="710" border="0" align="center" cellspacing="0">
<tr>
<td><table width="710" height="30" border="0" align="center" cellspacing="0">
<tr>
<td valign="middle"><form name="form1" method="post" action="check_film.asp">
排序方式: <a href="film_all.asp"><font color=blue>新增</font></a> <a href="film_mingcheng.asp"><font color=blue>名字</font></a> <a href="film_all_desc_time.asp"><font color=blue>公影日期</font></a> <a href="film_guo.asp"><font color=blue>国语</font></a> <a href="film_yue.asp"><font color=blue>粤语</font></a> <a href="film_eng.asp"><font color=blue>英语</font></a> <a href="film_edit.asp"><font color=blue>编辑&收录</font></a>
<input name="name" type="text" id="name" size="15">
<input type="submit" name="Submit" value="搜索电影">
</form></td>
</tr>
</table></td>
</tr>
</table>
<table width="710" border="1" align="center" cellspacing="0" bordercolor="#D9B3FF">
<%
i=1
a=1
if not (rs.eof or err) then rs.move (page-1)*maxPerPage
do while not (rs.eof or err)
%>
<tr>
<td width="700"><table width="700" height="170" border="0" align="center" cellspacing="0">
<tr>
<td width="152" rowspan="7"><a href="images/<%=rs("name")%>.jpg"><img src="images/<%=rs("name")%>.jpg" width="140" height= "170" border="0"></a></td>
<td width="352" height="25"><div align="center" class="STYLE11"><%=rs("name")%></div></td>
<td width="190" height="25" align="right"><div class="STYLE13"><font color=green><%=rs("diaxiao")%>MB
<%if rs("shoulu")<>"收录" and rs1("dengji")>=10 then%>
<a href="film_shoulu_pro.asp?name=<%=rs("name")%>">收录</a>
<%else%>
<%if rs1("dengji")>=13 then%>
<a href="film_shoulu_modify.asp?name=<%=rs("name")%>">变更</a>
<%end if%>
<%end if%>
</font></div></td>
</tr>
<tr>
<td height="22"><span class="STYLE12">年份 <font color=green><%=rs("date")%>年</font></span></td>
<td height="22"><div align="right" class="STYLE13">
<%if rs("shoulu")<>"收录" and rs1("dengji")>=10 then%>
<a href="modify_film.asp?name=<%=rs("name")%>"><font color=blue>修改</font>
<%end if%>
</a></div></td>
</tr>
<tr>
<td height="22" colspan="2"><span class="STYLE4"><span class="STYLE12">主演 <font color=green><%=rs("zhuyuan1")%> <%=rs("zhuyuan2")%> <%=rs("zhuyuan3")%> <%=rs("zhuyuan4")%> <%=rs("zhuyuan5")%></font></span></span></td>
</tr>
<tr>
<td height="22" colspan="2"><span class="STYLE12">地方 <font color=green><%=rs("difang")%></font></span></td>
</tr>
<tr>
<td height="22" colspan="2"><span class="STYLE12">语言 <font color=green><%if rs("guoyu")<>"" then%><%=rs("guoyu")%> <%end if%><%if rs("yueyu")<>"" then%><%=rs("yueyu")%> <%end if%><%if rs("engyu")<>"" then%><%=rs("engyu")%> <%end if%><%if rs("otheryu")<>"" then%><%=rs("otheryu")%><%end if%></font></span></td>
</tr>
<tr>
<td height="22"><span class="STYLE12">尺码 <font color=green><%=rs("memo")%></font></span></td>
<td height="22"> </td>
</tr>
<tr>
<td height="22"><span class="STYLE12">下载 <font color=green><%if rs("guoyu")<>"" then%>国语<a href="mp4/<%=rs("name")%>国语.mp4"><img src="../images/download.gif" width="15" height="15" border="0"></a> <%end if%><%if rs("yueyu")<>"" then%>粤语<a href="mp4/<%=rs("name")%>粤语.mp4"><img src="../images/download.gif" width="15" height="15" border="0"></a> <%end if%><%if rs("engyu")<>"" then%>英语<a href="mp4/<%=rs("name")%>英语.mp4"><img src="../images/download.gif" width="15" height="15" border="0"></a> <%end if%><%if rs("otheryu")<>"" then%>其他语言<a href="mp4/<%=rs("name")%>其他语言.mp4"><img src="../images/download.gif" width="15" height="15" border="0"></a><%end if%></font></span></td>
<td height="22"><div align="right"><span class="STYLE12"><font color=green>日期:<%=rs("regdate")%></font></span></div></td>
</tr>
</table>
</td>
</tr>
<%a=a+1%>
<%
i=i+1
if i>maxPerPage then exit do
rs.moveNext
loop
%>
<tr>
<td colspan="2"><div align="right">共<%=rs.recordCount%>项<%=b%> 第<%=page%>/<%=rs.pagecount%> 页
<%if page>1 then%>
<input type="button" name="Submit3" value="首页" onClick="Javascript:jumpTo(1)">
<input type="submit" name="Submit4" value="上页" onClick="Javascript:jumpTo(2)">
<%else%>
<input type="button" name="Submit32" value="首页" disabled>
<input type="submit" name="Submit4" value="上页" disabled>
<%end if
if rs.recordCount>page*maxPerPage then%>
<input type="submit" name="Submit5" value="下页" onClick="Javascript:jumpTo(3)">
<input type="submit" name="Submit6" value="末页" onClick="Javascript:jumpTo(4)">
<%else%>
<input type="submit" name="Submit5" value="下页" disabled>
<input type="submit" name="Submit6" value="末页" disabled>
<%end if%>
</div></td>
</tr>
</table>
</body>
</html>
记录超1页时显示正常~~RT,,,
但点下页就出错了,,显示的却是按"名字"排列的记录页面