⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 allgq.asp

📁 一个功能强大的黄页查询系统
💻 ASP
字号:
<!--#include file="dbpath/dbpath.asp"-->
<html>

<head>
<title>行业分类</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<style type="text/css"><!-- td           { font-size: 12px; line-height: 17px }
body         { font-size: 12px; line-height: 17px }
a:link       { text-decoration: none; color: blue }
a:visited    { text-decoration: none; color: #993333 }
a:active     { text-decoration: none }
a:hover      { text-decoration: underline; color: red }
-->
</style>
<script language="JavaScript">
function click(e) {
if (document.all) {
if (event.button==2||event.button==3) {
oncontextmenu='return false';
}
}
if (document.layers) {
if (e.which == 3) {
oncontextmenu='return false';
}
}
}
if (document.layers) {
document.captureEvents(Event.MOUSEDOWN);
}
document.onmousedown=click;
document.oncontextmenu = new Function("return false;")
</script>
<%
   dim MaxPerPage
   dim sql 
   dim rs
   dim gstBookID
   dim totalPut   
   dim CurrentPage
   dim TotalPages
    if not isempty(request("page")) then
      currentPage=cint(request("page"))
   else
      currentPage=1
   end if
%>
</head>

<body leftmargin="0" topmargin="0">
<div align="center">
<table border="0" width="516" cellspacing="0" cellpadding="0">
<center>
<tr>
</center>
<td bgcolor="#FFFFFF" width="333" valign="top">
<table border="0" width="510" cellspacing="0" cellpadding="0">
<tr>
<td width="100%">
<div align="center">
<center>
<table border="0" cellpadding="0" cellspacing="5" width="449">
</center>
<tr>
<td valign="top" width="443">
<p align="right"><font class="d"><a href="index.asp" target="_parent">回到首页</a></font> 
| <a href="new.asp" target="_parent">最新企业信息</a> | <a href="addgq.asp" target="_parent">发布企业信息</a> | 
<a href="login.asp" target="_parent">企业信息管理 </a>   
&nbsp;</td>  
</tr>  
<tr>  
<td width="443" valign="top"></td>  
</tr>  
<tr>  
<td width="443" valign="top">  
<table align="center" width="100%">  
<tr>  
<td>     
     
<%     
set rs=server.createobject("adodb.recordset")     
sql="select * from gq where lbid ='"&cstr(request("lbid"))&"' order by time DESC"     
rs.open sql,conn,1,1     
if rs.eof and rs.bof then %>      
<p align="center">还 没 这 类 企 业 信 息</p>  
<% else      
   rs.pagesize=10     
   totalPut=rs.recordcount '记录总数      
   totalPage=rs.pagecount      
   MaxPerPage=rs.pagesize      
      if currentpage<1 then      
          currentpage=1      
      end if      
      if currentpage>totalPage then      
          currentpage=totalPage      
      end if      
   if currentPage=1 then      
      showpages      
      showContent      
      showpages1      
    else      
         if (currentPage-1)*MaxPerPage<totalPut then      
         rs.move  (currentPage-1)*MaxPerPage      
         dim bookmark      
         bookmark=rs.bookmark '移动到开始显示的记录位置      
         showpages      
         showContent      
         showpages1      
      else       
                 
      end if      
   end if      
      rs.close      
end if      
set rs=nothing        
conn.close      
set conn=nothing        
      
sub showContent      
     dim i,j     
     
%>      
     
     
     
     
<br>  
<table width="510">  
     
<% i=1     
       do while not (rs.eof or err)      
if i mod 2 <> 0 then     %>      
<tr bgcolor="#FFFFFF">  
<%else%>     
<tr bgcolor="#eeeeee">  
<%end if%>     
<td width="100%">  
<ul>  
<li> <% if rs("gq")="企业名称" then%> <font color="#fc9603">【<%=rs("gq")%>】</font>               
                <%else%>          <font color="#079807">【<%=rs("gq")%>】</font> <%end if%>                
 <font color="#aa0000"><%=rs("subject")%></font> (<%=rs("date")%>--<%=rs("time")%>)<br>  
                <%=rs("gs")%>          <a href="open.asp?id=<%=rs("id")%>" target="_blank">【详细信息...】</a>  
</ul>  
</td>  
</tr>  
<%       
          
    if i>=MaxPerPage then exit do '循环时如果到尾部则先退出,如果记录达到页最大显示数,也退出       
   i=i+1       
    rs.movenext       
    loop       
%>   
<tr>  
<td>   
</table>  
      
      <%end sub        
       
sub showpages()       
%>      
<table width="510%" cellpadding="2">  
<tr>  
<td align="right">共查询到<font color="#FF0000"><%=totalPage%></font>页/<font color="red"><b><%=totalPut%></b></font>条信息</td>  
</tr>  
</table>  
<%       
end sub       
sub showpages1()       
dim n       
n=totalPage       
%>      
      
<form action="allgq.asp" method="GET" align="right">  
<div align="center">  
<center>  
<table border="0" cellspacing="0" cellpadding="0" height="30">  
<tr>  
<td width="100%" height="30"> <%        
   If currentPage <> 1 Then       
      Response.Write "<A HREF=allgq.asp?lbid="&request("lbid") & ">[第一页]</A> "       
      Response.Write "<A HREF=allgq.asp?lbid="&request("lbid") & "&Page=" & (currentPage-1) & ">[上一页]</A> "       
   End If       
   If currentPage <> rs.PageCount Then       
      Response.Write "<A HREF=allgq.asp?lbid="&request("lbid") & "&Page=" & (currentPage+1) & ">[下一页]</A> "       
      Response.Write "<A HREF=allgq.asp?lbid="&request("lbid") & "&Page=" & totalPage & ">[最后一页]</A> "       
   End If       
%>第<font color="#FF0000"><%=currentPage%></font>页/共<font color="#FF0000"><%=totalPage%></font>页<%   response.write " 转到:<select name='page' size=1 class=smallselsect style='font-family: 宋体; font-size: 9pt;'>"       
       
for i=1 to n       
   response.write "<option value="& i        
   if currentpage=i then        
     response.write " selected"       
   end if       
   response.write ">"& i &"</option>"       
next       
  response.write "</select>"       
  response.write "<input type='hidden' name='lbid' value="&request("lbid")&">"      
   response.write "&nbsp;<input class=buttonface type='submit'  value='确定'  style='font-family: 宋体; font-size: 9pt;'>"       
%> </td>  
</tr>  
</table>  
</center>  
</div>  
</form>  
      
<%end sub%>      
</td>  
</tr>  
</table>  
</td>  
</tr>  
</table>  
</div>  
<center>  
</center></td>  
</tr>  
</table>  
</td>  
</tr>  
</table>  
</div>  
</body>  
  
</html>  

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -