永发信息网

请人解决个页面分页条数问题,有偿服务

答案:1  悬赏:30  手机版
解决时间 2021-05-03 16:18
  • 提问者网友:捧腹剧
  • 2021-05-03 02:00

能解决的给¥20

加QQ:879855300

<TABLE border="1" style="border-collapse: collapse;border:dotted 1px" bordercolor="#000000" cellpadding=0 width="100%" align="center">
   <tr align="center">
    <td width="6%" height="26" align="center">状态</td>
    <td width="34%" align="center">企业名称</td>
    <td width="60%"><table width="100%" border="1" cellpadding="0">
      <tr>
        <td width="50%" align="center">所属行业</td>
        <td width="50%" align="center">城市</td>
      </tr>
    </table></td>
  </tr>
<%if rs.eof and rs.bof then%>
<tr><td colspan=3>
 <p align="center"><%if request("keyword")<>"" then%>没有找到包含[<b><font color=red><%=request("keyword")%></font></b>]的信息!<%else%>该分类暂时没有信息<%end if%></td></tr>
<%end if%><%hyperpage=5
if not rs.eof then
rs.movefirst
rs.pagesize=hyperpage
if trim(request("page"))<>"" then
   currentpage=clng(request("page"))
   if currentpage>rs.pagecount then
      currentpage=rs.pagecount
   end if
else
   currentpage=1
end if
   if currentpage<>1 then
       if (currentpage-1)*hyperpage<totalhy then
        rs.move(currentpage-1)*hyperpage
     dim bookmark
     bookmark=rs.bookmark
    end if
   end if
   if (totalhy mod hyperpage)=0 then
      totalpages=totalhy\hyperpage
   else
      totalpages=totalhy\hyperpage+1
   end if
i=0
do while not rs.eof and i<hyperpage
sql="select cat_id,cat_name from hycat where cat_id="&rs("cat_id")
set rscat=server.createobject("adodb.recordset")
rscat.open sql,conn,1,1
        %>
<tr align="center">
<TD height=22>
<%    
if rs("istop")="1" then     
folder="<img src=""img/1.gif"" title=固顶信息>"      
else
folder="<img src=""img/4.gif"" title=普通信息>"      
end if     
if rs("istop")="0" then     
if rs("isbest")=1 then
folder="<img src=""img/2.gif"" title=推荐信息>"
elseif rs("gq_count")>=popgqnum then
folder="<img src=""img/3.gif"" title=热门信息>"     
else
folder="<img src=""img/4.gif"" title=普通信息>"      
end if     
end if     
%>  <%sql="select * from [User] where username='"&rs("tjuser")&"'"
set rs1=server.createobject("adodb.recordset")
rs1.open sql,conn,1,1

%>

<%=folder%></td>
<TD align="left" style="BORDER-bottom: #999999 1px dotted"><%if rs1("usergrade")=1 then%>
<img src="img/vip.gif" align="absmiddle" alt="VIP会员企业"><%else%><img src="img/user.gif" align="absmiddle" alt="普通会员企业"><%end if%>
<a href="showcompany.asp?hy_id=<%=rs("hy_id")%>">
<font color="#FF6500">
<%=rs("hy_title")%></font></a>&nbsp;  <%if rs("isimg")=1 then %><img src='img/img.gif' alt='图片黄页'><%end if%>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><table width="125" height="105" border="1" cellpadding="0" cellspacing="0" bordercolor="ccccccc" bgcolor="#FFFFFF" style="border-collapse:collapse">
      <tr>
        <td align="center" width=100%><%if rs("isimg")=1 then %>
            <a href="showcompany.asp?hy_id=<%=rs("hy_id")%>"><img src=<%=rs("images")%> border=0 width='125' height='105'></a>
            <%else%>
          <a href="showcompany.asp?hy_id=<%=rs("hy_id")%>"><img src=img/nopic.gif border=0 width="125" height="105"></a>
          <%end if%>
          </center>
          </div></td>
      </tr>
    </table></td>
  </tr>
</table></TD><%sql="select * from area where cat_id="&rs("city")
set rs2=server.createobject("adodb.recordset")
rs2.open sql,conn,1,1
sql="select * from area where cat_id="&rs2("sid")
set rs3=server.createobject("adodb.recordset")
rs3.open sql,conn,1,1
%>
<td colspan="2" valign="top" style="BORDER-bottom: #999999 1px dotted"><table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><table width="100%" border="1" cellpadding="0">
      <tr>
        <td width="50%" align="center"><%=rscat("cat_name")%></td>
        <td width="50%" align="center"><%=rs3("cat_name")%>-<%=rs2("cat_name")%></td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td><table width="100%" border="1" cellpadding="0">
      <tr>
        <td width="12%" align="center">地址;</td>
        <td width="88%"><%=rs("dizhi")%></td>
      </tr>
    </table></td>
  </tr>

  <tr>
    <td><table width="100%" border="1" cellpadding="0">
      <tr>
        <td width="12%" align="center">主营;</td>
        <td width="88%"><%=rs("code")%></td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td><table width="100%" border="1" cellpadding="0">
      <tr>
        <td width="12%" align="center">介绍;</td>
        <td width="88%"><%
if len(rs("hy_content"))>30 then
response.write left(rs("hy_content"),30)&"......"
else
response.write rs("hy_content")
end if
%></td>
      </tr>
    </table></td>
  </tr>
</table></td>
</TR>
<%rs.movenext
loop
%>
</table>
<form name='form1' method='post' action='Show_corporation.asp?sheng=<%=request.querystring("sheng")%>&city=<%=request.querystring("city")%>&bigclass=<%=request.querystring("bigclass")%>&smallclass=<%=request.querystring("smallclass")%>&select=<%=request("select")%>&keyword=<%=request("keyword")%>'>
<TABLE cellSpacing=0 cellPadding=0 width="100%" align=center border=0>
<TBODY>
<TR>
<TD align=middle width="35%" height=25><IMG height=14 src="img/so.gif" width=14 align=absMiddle> 共[<font color="#FF6666"><%=totalhy%></font>]个信息 分[<font color="#FF6666"><%=totalpages%></font>]页</TD>
<TD width="40%" align=middle><IMG height=11 src="img/lt.gif" width=11 align=absMiddle>
<%
if CurrentPage<2 then
response.write "<font color='999966'>首页 上一页</font> "
else
response.write "<a href=Show_corporation.asp?select="&request("select")&"&keyword="&request("keyword")&"&page=1&gqcat_id="&request.querystring("gqcat_id")&">首页</a> "
response.write "<a href=Show_corporation.asp?select="&request("select")&"&keyword="&request("keyword")&"&page="&CurrentPage-1&"&gqcat_id="&request.querystring("gqcat_id")&">上一页</a> "
end if
if totalpages-currentpage<1 then
response.write "<font color='999966'>下一页 尾页</font>"
else
response.write "<a href=Show_corporation.asp?select="&request("select")&"&keyword="&request("keyword")&"&page="&CurrentPage+1&"&gqcat_id="&request.querystring("gqcat_id")
response.write ">下一页</a> <a href=Show_corporation.asp?select="&request("select")&"&keyword="&request("keyword")&"&page="&totalpages&"&gqcat_id="&request.querystring("gqcat_id")&">尾页</a>"
end if
%>&nbsp;<IMG height=11 src="img/rt.gif" width=11 align=absMiddle></TD>
<TD align=middle width="25%">
<select name="page" >
<%
i=1
for i=1 to totalpages
if i=currentpage then
%>
<option value=<%=i%> selected>第<%=i%>页</option>
<%else%>
<option value=<%=i%>>第<%=i%>页</option>
<%end if
next

%>
</select><input type="submit" name="Submit2" value="转向" onMouseOver="this.className='boton'" onMouseOut="this.className='botoff'" class="botoff"> </TD>
</TR>
</FORM>
<%end if
%>
</TABLE></TD>
              </TR>
            </TABLE>

 

最佳答案
  • 五星知识达人网友:慢性怪人
  • 2021-05-03 02:46
asdadadasdas
我要举报
如以上回答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
点此我要举报以上问答信息
大家都在看
推荐资讯