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

📄 class_type.asp

📁 夏茂政府网站
💻 ASP
字号:
<!--#include file="head.asp" -->
<%
    sub navigation()
    response.write " &gt;&gt; "
    response.write ""&Title&""
    end sub
%>
<div align="left">
	<table border="0" cellpadding="0" cellspacing="0" width="996" height="50" bgcolor="#FFFFFF">
		<tr width="996">
		    <!--左边内容-->
			<td width="216" valign="top" background="images/2/left_bg.gif">
            <div align="center">
			<%call zf11_tianqi()%>
			</div>
		   <div align="center">
			<% call zf11_Search5() %>
           </div>	   
           <div align="center">
			<% call zf11_login5()%>
           </div>
		   
            <div align="center">
            <TABLE cellSpacing=0 cellPadding=0 width=212 border=0>
              <TBODY>
              <TR>
                <TD align=middle height=30><img src="images/2/index_80.gif" width="206" height="30" alt=""></TD>
			  </TR>
              <TR>
                <TD align=middle height=200><% Call zf11_articleInfo(1,8,20,0,0) %></TD>
			  </TR>
			  </TBODY>
			</TABLE>
           </div>
		   
          </td>	
			<!--中间内容-->
			<td width="780" valign="top">

<!--导航位置-->

				<table border="0" cellpadding="0" cellspacing="0" width="780" height="25" style="border-bottom:2px #ff9900 solid;">
					<tr>
					  <TD align=middle height=36 width=9><img src="images/2/index_06.gif" width="9" height="36" alt=""></TD>	
                      <TD width="30" height="36" background="images/2/index_08.gif"><DIV align=center><IMG height=17 src="images/bottom4.gif" width=18></DIV></TD>
				      <TD width="730" height="25" background="images/2/index_08.gif">您现在的位置:首页 >> <%=SortName%> >> <%=Classname%></TD>
					  <TD align=middle height=36 width=11><img src="images/2/index_10.gif" width="11" height="36" alt=""></TD>
					</tr>
				</table>
                <table border="0" cellpadding="0" cellspacing="0" width="780" height="32">
					<tr>
				      <TD width="780" height="32" style=" color:#990000;font-size:14px;font-weight:bold; PADDING-left: 20px" background="images/2/class_bg.gif"><%=SortName%></TD>
					</tr>
				</table>
<!--内容区域-->
	            <table border="0" cellpadding="0" cellspacing="0" width="780" height="160">
		            <tr>
			          <td width="780"> 
              <!--文章内容开始-->
              <%
    zf11id=CheckStr(Request.QueryString("zf11id")) 
    If isInt(zf11id)=False OR Not IsNumeric(zf11id) Then
    Response.Redirect "index.asp" 
    Response.End()
    End If
    '栏目统计------------
    set RsH=server.createobject("adodb.recordset")
    hit="update zf11_type set hit=hit+1 where ID="&zf11id&""
    RsH.open hit,conn,1,3 
    sqlc="select * from zf11_type where ID="&zf11id&""
    Set Rsc=conn.execute (sqlc)
    if Rsc.eof and rsc.bof then
    response.Redirect("index.asp")
    end if
    '读小类信息
    Classname=Rsc("zf11_names")
    zf11_CalssInfo=Rsc("Info")
    '从小类中读出大类
    zf11_big_id=Rsc("zf11_big_id")
    sqls="select * from zf11_type where ID="&zf11_big_id&""
    Set Rss=conn.execute (sqls)
    '读大类信息
    SortName=Rss("zf11_names")
    zf11_SortSetting=Rss("zf11_setting")
    Title ="<a href=type.asp?zf11id="&zf11_big_id&">" &SortName & "</a>"& " >> " & Classname
    MaxPerPage = 15 '分页显示的纪录个数
    dim sql 
    dim rs
    dim gstBookID
    dim totalPut 
    dim CurrentPage
    dim TotalPages
    dim i,j 
%>
              <%    
    Dim zf11id
    dim sqlClass
    dim RsClass
    sqlClass="select * from zf11_type where zf11_big_id<>0 and ID="&zf11id&" "
    Set RsClass=conn.execute (sqlClass)
    zf11_setting = RsClass("zf11_setting")
    Names = RsClass("zf11_names")
    Tuijian = RSClass("Tuijian")
    if RsClass("zf11_setting")=3 then
    Call zf11_OnlyPage(RsClass("zf11_names"),RsClass("Info"))
    end if  
%>
             
              <% if zf11_setting < 3  then %>

                   <table  bgcolor="#FFFFFF" width="100%" border="0" cellspacing="0" cellpadding="0">
                     <tr>
                      <td width="1%" valign="top">&nbsp;</td>
                      <td width="99%" valign="top">
<%
sql="select * from info where Sort2="&zf11id&" ORDER BY id DESC"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
rs.pagesize=MaxPerPage 
If trim(Request("Page"))<>"" and IsNumeric(Request("Page")) then
	CurrentPage= CLng(request("Page")) 
	If CurrentPage< 1 then
		CurrentPage= 1 
	ElseIf CurrentPage> rs.PageCount then 
		CurrentPage = rs.PageCount 
	End If 
Else 
	CurrentPage= 1 
End If 
if rs.eof then 
	response.write "<p align='center'>还没有添加信息...</p>" 
else 
	totalPut=rs.recordcount '记录总数 
	if CurrentPage=1 then 
		showpages()
		showContent  
	else 
		if (currentPage-1)*MaxPerPage<totalPut then 
			rs.move(currentPage-1)*MaxPerPage 
			dim bookmark 
			bookmark=rs.bookmark '移动到开始显示的记录位置 
			showpages()
		    showContent 
		else 
			currentPage=1 
			showContent 
		end if
	end if 
	rs.close 
end if 
set rs=nothing 
set conn=nothing 
sub showContent
%>
<table width="98%" height="25" align="center" cellspacing="2" >
  <%
dim i 
i=0 
do while not (rs.eof or err)
%>
  <tr height="25" >
    <td width="17" height="25" background="images/line.gif"><div align="right"><img src="Images/zf11_ico.gif" width="12" height="11" align="absmiddle"></div></td>
    <td width="476" height="25" background="images/line.gif"><div align="left"><a href="typenews.asp?id=<%response.write rs(0)%>" title="<%=rs("title")%>">
      <% if len(rs("title"))>17 then%>
      <%=Left(rs("title"),17)%>...
      <%else%>
      <%response.write rs("title")%>
      <%end if%>
    </a></div></td>
    <td width="89" height="25" background="images/line.gif"><div align="left">[<%=rs("date")%>] </div></td>
  </tr>
  <%
i=i+1
if i>=MaxPerPage then exit do
 rs.movenext 
loop
%>
</table>
<hr width="90%">
<%end sub%>

<!--分页-->
            </td>
                     </tr>
                   </table>
           <%end if%>
<%sub showpages()%>
                       <table width="100%" border="0" cellspacing="0" cellpadding="0">
                         <tr> 
                          <td height="28"> 

                     <div align="center"> 
<% 
	dim n,k 
	if (totalPut mod MaxPerPage)=0 then
	 n= totalPut \ MaxPerPage
	else
	 n= totalPut \ MaxPerPage + 1
	end if
%>
共有<%=rs.recordcount%>个记录
&nbsp;每页<%=Page_count%>个记录 
<%
k=currentPage
if k=1 then
	response.write " 首页 "& vbCrLf
	response.write " 上一页 "& vbCrLf
end if
if k<>1 then
	response.write "<a href='class_type.asp?zf11id="& zf11id &"&page=1'> 首页 </a>"
	response.write "<a href='class_type.asp?zf11id="& zf11id &"&page="+cstr(k-1)+"'> 上一页 </a>"
end if
if k=n then
	response.write " 下一页 "& vbCrLf
	response.write " 末页 "& vbCrLf
end if
if k<>n then
	response.write "<a href='class_type.asp?zf11id="& zf11id &"&page="+cstr(k+1)+"'> 下一页 </a>"
	response.write "<a href='class_type.asp?zf11id="& zf11id &"&page="+cstr(n)+"'> 末页 </a>"
end if
end sub
%>
</div></td>
</tr>
</table> 
              <!-- 文章内容结束-->
                      </td>
	            	</tr>
	            </table>

			</td>
			<!--右边内容-->

		</tr>
	</table>
</div>
<!--#include file="foot.asp" -->

⌨️ 快捷键说明

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