<!--#include file="conn.asp"-->
<!--#include file="inc/function.asp"-->
<%
currPage="info.asp"  '当前页面
BigClassName=request.querystring("bigclass")
'SmallClassName=request.querystring("smallClass")
sub showInfoTitle   '显示信息类列表信息
	response.Write("<a href='Article.asp?id="&rs("id")&"' target='_blank'>")
	if rs("pic")="Yes" then 
	response.write("<font color=blue>[图]</font>")
	end if
	response.Write(rs("title"))
	response.Write("</a>")
end sub
sub showPicTitle   '显示图片类栏目图片标题
	response.Write("<a href='Article.asp?id="&rs("id")&"' target='_blank'>")
	if rs("pic")="Yes" then response.write("<font color=blue>[图]</font>")
	   response.Write(left(rs("title"),27))
	   response.Write("</a>")
end sub
sub showContent  '显示简介类栏目内容
	set rscontent=server.CreateObject("adodb.recordset")
	sqlcontent="select content from News where BigClassName='"&bigClass&"' and SmallClassName='"&smallClass&"'"
	rscontent.open sqlcontent,conn,1,1
	content=rscontent("content")
	response.write(content)
	rscontent.close
end sub
sub showPic(picwid,pichei)'显示图片的图片
    response.write("<a href=Article.asp?id="&rs("id")&" target=_blank title="&rs("title")&">")
	if rs("FileName2")="Null" then
	   response.write("<img src='/Inc/images/nopic.jpg' width='"&picwid&"' height='"&pichei&"' border='0' align='absmiddle'> <a>")
	else
	   response.write("<img src='"&rs("FileName2")&"' width='"&picwid&"' height='"&pichei&"' border='0' align='absmiddle'> <a>")
	end if
end sub
%>
<html>
<head>
<title><%=BigClassName%> - <%call getweb_config("webname")%></title>
<!--#include file="meta.asp"-->
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<link href="css/css.css" rel="stylesheet" type="text/css">

</HEAD>
<body>
<body>
<!--#include file="top.asp"-->
<table width="778" border="0" align="center" cellpadding="0" cellspacing="0">
   <tr>
     <td width="190" align="center" valign="top" bgcolor="#F4FBFF">
	   <table width="100%"  border="0" align="center" cellpadding="0" cellspacing="0">
        <tr>
         <td align="center"><br>
            <table width="80%" border="0" align="center" cellpadding="0" cellspacing="0">
               <tr>
                 <td width="70">&nbsp;</td>
                 <td width="54%">
                   <%   '//默认大类，表名，链接地址，分几列显示，截取字符。
		           call getSmallclass(""&BigClassName&"","SmallClass_New",""&currPage&"",1,20)
		           bigClass=trim(request("bigClass"))
	               smallClass=trim(request("smallClass"))
		           %>
                 </td>
              </tr>
            </table>
		 </td>
	   </tr>
	  </table>          
        <p><img src="images/leftbg.jpg" width="160" height="210"></p> 
     </td>
     <td valign="top" bgcolor="#FFFFFF">
	    <table width="98%"  border="0" align="center" cellpadding="0" cellspacing="8">
          <tr>
            <td>
			   <table width="100%" border="0" cellspacing="0" cellpadding="0">
                 <tr>
                    <td height="23">当前位置：<a href="index.asp">首页</a> &gt;&gt; <%=BigClassName%> &gt; <font color=""><%=smallClass%></font>&nbsp;</td>
                 </tr>
                 <tr> <td height="11"><img src="images/menuline.gif" width="546" height="11"></td></tr>
                 
                 <tr>
                    <td height="12"></td>
                 </tr>
              </table>
			</td>
          </tr>
          <tr>
            <td>
			   <table width="94%" border="0" align="center" cellpadding="0" cellspacing="0">
                 <tr>
                    <td>
<%
set rs=server.CreateObject("adodb.recordset")  '查询数据库
sql="select ID,title,infotime,FileName2,[from],hits,pic from news where BigClassName like '%"&bigClass&"%' and SmallClassName like '%"&smallClass&"%' order by id desc"
rs.open sql,conn,1,1
if rs.eof and rs.bof then  '数据库为空
   response.write"<br><br>"
   response.write"“"&smallClass&"”资料正在整理中！"   
else 
   dim page,recordsetcount
   recordsetcount=0  '设定数据库中记录标记
   page=request.QueryString("page")'取得页数
   if page="" then  '设定默认页
      page=1
   end if
   set rsc=server.CreateObject("adodb.recordset")
   sqlc="select BigClassName,SmallClassName,conclass from SmallClass_New where BigClassName='"&bigClass&"' and SmallClassName='"&smallClass&"'"
   rsc.open sqlc,conn,1,1
   conclass=trim(rsc("conclass"))
   Select Case conclass
      Case "图片类"
	     page=cint(page)  '转换数据类型
	     rs.pagesize=9   '设定每页显示的记录数
	     if page<1 then  '设定页数的值
	        page=1
	     elseif page>rs.pagecount then
	        page=rs.pagecount
	     else
	        page=page
	     end if
	     rs.absolutepage=page '设定当前活动页
	     do while not rs.eof and recordsetcount<rs.pagesize  '循环并控制记录
	     %>
         <table border="0" align="center" cellpadding="10" cellspacing="0">
            <tr align="center">
		 <%for i=1 to 3'按两列显示
		     if not(rs.eof) and recordsetcount<rs.pagesize then%>
               <td width="120">
                <table width="120" border="0" cellpadding="2" cellspacing="1">
                   <tr><td width="108"><div align="center"><%call showPic(100,80)%></div></td></tr>
                   <tr><td height="20"><div align="center"><%call showPicTitle%></div></td></tr>
                </table>
               </td>
           <%
		recordsetcount=recordsetcount+1
		rs.movenext
		end if
		next			   
		%>
		   </tr>
         </table>
         <%loop%>
         <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
            <tr><td height="40"><div align="center"><%call getPage%></div></td></tr>
        </table>
      <%Case "简介类"%>
           <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
           <tr><td><%call showcontent%></td></tr>
           </table>
                    <%
	 case else
	    page=cint(page)  '转换数据类型
	    rs.pagesize=15  '设定每页显示的记录数
	    if page<1 then  '设定页数的值
	       page=1
	    elseif page>rs.pagecount then
		   page=rs.pagecount
	    else
	       page=page
	    end if
	    rs.absolutepage=page  '设定当前活动页
	%>
        <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
            <%do while not rs.eof and recordsetcount<rs.pagesize  '循环并控制记录%>
               <tr bgcolor="#ffffff" onMouseOver=this.bgColor='' onmouseout=this.bgColor='#ffffff'>
                  <td height="28" width="30"><img src="images/dot.gif"> </td>
                  <td ><%call showInfoTitle%></td>
                  <td width="120"><%=month(rs("infotime"))%>/<%=day(rs("infotime"))%>/<%=year(rs("infotime"))%></td>
			   </tr>
               <tr><td height="1" colspan="3" bgcolor="#EDEDED"></td></tr>
             <%recordsetcount=recordsetcount+1
			 rs.movenext
			 loop%>
        </table>
        <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
           <tr><td height="22" bgcolor=""><div align="center"><%call getPage%></div></td></tr>
        </table>
     <%end select
	 end if%>
	              </td>
                </tr>
              </table>
           </td>
         </tr>
       </table>
     </td>
  </tr>
</table>
<!--#include file="down.asp"-->
</body>
</html>
