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

📄 xpzst.asp

📁 IMPORTANT YOU SHOUD LOAD IT DOWN FOR USING
💻 ASP
字号:
<!--#include file="conn_xp/xp.asp"-->
<!--#include file="conn_xp/shopxp.asp"-->
<html>
<%
	
	dim shopxpzst_id, shopxpzst_name
    
        if request("shopxpzst_id")<>"" then
		shopxpzst_id=request("shopxpzst_id")
   	else
		shopxpzst_id=0
   	end if
	if request("shopxpzst_id")="" then 
	shopxpzst_id=1
	end if
   	 
%>
<style type="text/css">
<!--
.STYLE2 {font-size: 14}
-->
</style>
<head><title><%=webname%>--购物指南</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="img_shopxp/css.css" rel="stylesheet" type="text/css">
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<!--#include file="xptop.asp"-->
<table width="996"  border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td width="92%"><table width="100%"  border="0" align="center" cellpadding="0" cellspacing="0">
      <TR>
        <TD width="201" vAlign=top class=b><!--#include file="xpinfo/shopxp_wzleft.asp" --></TD>
        <td width="1" background="img_shopxp/xiao/bg_body.gif"></td>
        <TD width="713" align=left vAlign=top class=b>
          <div align="center"> 
            <table width="10" height="5" border="0" cellpadding="0" cellspacing="0">
              <tr>
                <td width="10"></td>
              </tr>
            </table>
            <table width="100%"  border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td height="23"><img src="img_shopxp/xiao/shangcheng.gif" width="151" height="21"></td>
              </tr>
              <tr>
                <td height="1" background="img_shopxp/xiao/linedot.gif"></td>
              </tr>
            </table>
          </div>
           <table width="100%" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td height="39"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="STYLE2"> &nbsp;专题分类:</span>
                  <%
		  set rs=server.CreateObject("adodb.recordset")
		  rs.open "select * from shopxp_zst order by shopxpzst_id",conn,1,1
		  do while not rs.eof
		  response.write "<span class=STYLE2><A  href=xpzst.asp?shopxpzst_id="&rs("shopxpzst_id")&">"&trim(rs("shopxpzst_name"))&" </A> ||</span> "
		  rs.movenext
		  
		  loop
		  rs.close
		  set rs=nothing 
		 %></td>
              </tr>
			    <tr>
                <td height="1" background="img_shopxp/xiao/linedot.gif"></td>
              </tr>
          </table>
          <table width="98%" border="0" align="center" cellpadding="0" cellspacing="0" bordercolor="#FFFFFF">
            <tr>
              <td width="50%" valign="top" bgcolor="#FFFFFF"><%set rs=server.createobject("adodb.recordset")
		rs.open "select * from shopxp_zhuanti where shopxpzst_id="&shopxpzst_id,conn,1,1 
		if rs.recordcount=0 then 
		%>
                  <table width="100%" border="0" cellspacing="0" cellpadding="5" align="center">
                    <tr>
                      <td align=center>还没有相关文章</td>
                    </tr>
                  </table>
                  <%
		else
	  		rs.PageSize =24 '每页记录条数
			iCount=rs.RecordCount '记录总数
			iPageSize=rs.PageSize
    		maxpage=rs.PageCount 
    		page=request("page")
    
    if Not IsNumeric(page) or page="" then
        page=1
    else
        page=cint(page)
    end if
    
    if page<1 then
        page=1
    elseif  page>maxpage then
        page=maxpage
    end if
    
    rs.AbsolutePage=Page

	if page=maxpage then
		x=iCount-(maxpage-1)*iPageSize
	else
		x=iPageSize
	end if
	%>
                  <table width="100%" border="0" cellspacing="0" cellpadding="5" align="center">
                    <%
			For i=1 To x
			%>
                    <tr>
                      <td align=center height=24 width="10%" ><img src="img_shopxp/ring01.gif"></td>
                      <td height=24 width="80%"><a href=listztxp.asp?id=<%=rs("newsid")%> > <%=replace(trim(rs("title")),"<br>","")%></a></td>
                      <td align=center height=24 width="20%" ><%=year(rs("updatetime"))&"."&month(rs("updatetime"))&"."&day(rs("updatetime"))%></td>
                    </tr>
                    <%
			rs.movenext
		    next
			%>
                  </table>
                  <div align="center">
                    <%
		call PageControl(iCount,maxpage,page,"border=0 align=center","<p align=center>")
		end if
		rs.close
		set rs=nothing
Sub PageControl(iCount,pagecount,page,table_style,font_style)
'生成上一页下一页链接
    Dim query, a, x, temp
    action = "http://" & Request.ServerVariables("HTTP_HOST") & Request.ServerVariables("SCRIPT_NAME")

    query = Split(Request.ServerVariables("QUERY_STRING"), "&")
    For Each x In query
        a = Split(x, "=")
        If StrComp(a(0), "page", vbTextCompare) <> 0 Then
            temp = temp & a(0) & "=" & a(1) & "&"
        End If
    Next

    Response.Write("<table width=100% border=0 cellpadding=0 cellspacing=0 >" & vbCrLf )        
    Response.Write("<form method=get onsubmit=""document.location = '" & action & "?" & temp & "Page='+ this.page.value;return false;""><TR>" & vbCrLf )
    Response.Write("<TD align=center height=35>" & vbCrLf )
    Response.Write(font_style & vbCrLf )    
        
    if page<=1 then
        Response.Write ("首页 " & vbCrLf)        
        Response.Write ("上页 " & vbCrLf)
    else        
        Response.Write("<A HREF=" & action & "?" & temp & "Page=1>首页</A> " & vbCrLf)
        Response.Write("<A HREF=" & action & "?" & temp & "Page=" & (Page-1) & ">上页</A> " & vbCrLf)
    end if

    if page>=pagecount then
        Response.Write ("下页 " & vbCrLf)
        Response.Write ("尾页 " & vbCrLf)            
    else
        Response.Write("<A HREF=" & action & "?" & temp & "Page=" & (Page+1) & ">下页</A> " & vbCrLf)
        Response.Write("<A HREF=" & action & "?" & temp & "Page=" & pagecount & ">尾页</A> " & vbCrLf)            
    end if

    Response.Write(" 页次:" & page & "/" & pageCount & "页" &  vbCrLf)
    Response.Write(" 共有" & iCount & "条新闻" &  vbCrLf)
    Response.Write(" 转到" & "<INPUT TYEP=TEXT CLASS=wenbenkuang NAME=page SIZE=2 Maxlength=5 VALUE=" & page & ">" & "页"  & vbCrLf & "<INPUT CLASS=go-wenbenkuang type=submit value=GO>")
    Response.Write("</TD>" & vbCrLf )                
    Response.Write("</TR></form>" & vbCrLf )        
    Response.Write("</table>" & vbCrLf )        
End Sub
%>
                </div></td>
            </tr>
        </table></TD>
        <td width="1" background="img_shopxp/xiao/bgbg.gif"></td>
      </TR>
    </TABLE></td>
    <td width="8%">&nbsp;</td>
  </tr>
</table>
<!--#include file="copyright_shopxp.asp" -->
</body>
</html>

⌨️ 快捷键说明

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