<!--#include file="Inc/newsconn.asp"-->
<!--#include file="Inc/Function_Page.asp"-->
<!--#include file="newsInc.asp"-->
<%
Dim ID
ID=jleRequest(request("id"))
If ID="" then
Call Alert("不正确的ID","Index.asp")
end if
set rsclass=server.createobject("adodb.recordset")
sql="select * from sc_Class where id="&id
rsclass.open sql,conn,1,1
if rsclass.eof and rsclass.bof then
Call Alert("不正确的ID","Index.asp")
else
if rsclass("Link")=1 then
Response.Redirect ""&laoy(rsclass("Url"))&""
End if
strFileName="?id="&id&""
%>
<!--#include file="jle_common.asp"-->
<!--#include file="inc/function.asp"-->
<!--#include file="config.asp"-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<title><%=title%>-<%=rsclass("ClassName")%></title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<meta http-equiv="Content-Language" content="gb2312">
<meta name="keywords" content="<%=metakey%>"/>
<meta name="description" content="<%=metades%>" />
<link rel="stylesheet" type="text/css" href="css/style.css" />

<SCRIPT src="inc/sinaflash.js" type="text/javascript"></SCRIPT>
<SCRIPT src="inc/jquery.min.js" type="text/javascript"></SCRIPT>
<script type="text/javascript" src="js/jquery.js"></script>
<link href="css/css.css" type="text/css" rel="stylesheet">
<style type="text/css">
<!--
#apDiv1 {
	position:absolute;
	width:149px;
	height:31px;
	z-index:6;
	left: 798px;
	top: 32px; font-family:"微软雅黑";
}
-->
</style>
</head>
<body>
<%call top()%>
<br />
<table width="1300" border="0" cellspacing="0" cellpadding="0" align="center">
  <tr>
    <td align="center"  valign="top"  class="tablest"><%If Mydb("Select Count([ID]) From [sc_Class] Where TopID="&ID&"",1)(0)>0 then%>
		
<%else%>
		
     <table width="100%" border="0" cellspacing="0" cellpadding="0" class="tablest2">
  <tr>
    <td align="left" style="padding-left:20px;"><a href=""><font color="#FF0000"><%=rsclass("ClassName")%></font></a></td>
  </tr>
</table>
     

<table width="98%" border="0" cellspacing="0" cellpadding="0">
           <tr>
             <td align="center"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                 <tr>
                   <td><%
set rs=server.createobject("adodb.recordset")
sql="Select ID,Title,DateAndTime,Hits,IsTop,Images,TitleFontColor,Artdescription from sc_Article Where ClassID="&rsclass("ID")&" and yn=0 order by IsTop desc,DateAndTime desc"
rs.open sql,conn,1,1

dim MaPerPage
MaPerPage=16
dim text,checkpage
text="0123456789"
Rs.PageSize=MaPerPage
for i=1 to len(request("page"))
checkpage=instr(1,text,mid(request("page"),i,1))
if checkpage=0 then
exit for
end if
next

If checkpage<>0 then
 If NOT IsEmpty(request("page")) Then
   CurrentPage=Cint(request("page"))
   If CurrentPage < 1 Then CurrentPage = 1
   If CurrentPage > Rs.PageCount Then CurrentPage = Rs.PageCount
 Else
   CurrentPage= 1
 End If
  If not Rs.eof Then Rs.AbsolutePage = CurrentPage end if
Else
 CurrentPage=1
End if

call list

'显示帖子的子程序
Sub list()%>
                       <table width="100%" border="0" cellspacing="0" cellpadding="0">
                         <TR>
                           <TD><table width="100%" border="0" cellspacing="1" cellpadding="0">
                               <%i=1 %>
                               <TR>
                                 <% Do While Not rs.eof%>
                                 <TD align="center"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                                     <tr>
                                       <td>&nbsp;</td>
                                     </tr>
                                   </table>
                                     <table width="95%" border="0" cellspacing="0" cellpadding="0">
                                       <tr>
                                         <td><div align="center">
                                             <table width="12%" border="0" cellpadding="0" cellspacing="1" bgcolor="#F1F1F1">
                                               <tr>
                                                 <td align="center" bgcolor="#FFFFFF"><TABLE border=0 cellPadding=0 cellSpacing=5>
                                                     <TBODY>
                                                       <TR>
                                                         <TD align=center width=135><a  href=sclist.asp?id=<%=rs("id")%> target=_blank><div style="width:160px; height:150px; overflow:hidden;"><img src="UploadFiles/<%=rs("Images")%>" alt="<%=rs("title")%>"  height="150" border="0"  ></div></a></TD>
                                                       </TR>
                                                     </TBODY>
                                                 </TABLE></td>
                                               </tr>
                                             </table>
                                         </div></td>
                                       </tr>
                                       <tr>
                                         <td height="30" align="center"><a  href=sclist.asp?id=<%=rs("id")%> target=_blank><%=left(rs("title"),17)%></a></td>
                                       </tr>
                                       <tr>
                                         <td></td>
                                       </tr>
                                       <tr>
                                         <td height="10"></td>
                                       </tr>
                                   </table></td>
                                 <% if i mod 4 =0 then%>
                               </TR>
                               <tr>
                                 <%end if%>
                                 <%
i=i+1 
if i >= 17 then exit do 
rs.MoveNext 
loop
%>
                               </tr>
                           </table></TD>
                         </tr>
                     </table></td>
                 </tr>
                 <TR>
                   <TD    height=35 colspan="3" align="center" bgcolor="#F6FBFD" style="border-top:1px #C5D8E6 dotted;"><div align="center">
                       <%
Response.write "全部"
Response.write "共" & Cstr(Rs.RecordCount) & "条&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"
Response.write "第" & Cstr(CurrentPage) &  "/" & Cstr(rs.pagecount) & "&nbsp;"
If currentpage > 1 Then
response.write "<a href='"&url&" &page="+cstr(1)+"'>&nbsp;首页&nbsp;</a>"
Response.write "<a href='" & strFileName&" &page="+Cstr(currentpage-1)+"'>&nbsp;上一页&nbsp;</a>"
Else
Response.write "&nbsp;上一页&nbsp;"
End if
If currentpage < Rs.PageCount Then
Response.write "<a href='" & strFileName&" &page="+Cstr(currentPage+1)+"'>&nbsp;下一页&nbsp;</a>"
Response.write "<a href='" & strFileName&" &page="+Cstr(Rs.PageCount)+"'>&nbsp;尾页&nbsp;</a>"
Else
Response.write ""
Response.write "&nbsp;下一页&nbsp;"
End if
Response.write "转到第"
response.write"<select name='sel_page' onChange='javascript:location=this.options[this.selectedIndex].value;'>"
    for i = 1 to Rs.PageCount
       if i = currentpage then 
          response.write"<option value='" &strFileName&" &page="&i&"&id="&id&"' selected>"&i&"</option>"
       else
          response.write"<option value='" &strFileName&" &page="&i&"&id="&id&"'>"&i&"</option>"
       end if
    next
response.write"</select>页"
%>
                   </div></TD>
                 </TR>
             </table></td>
           </tr>
      </table>
         <%
End sub
rs.close
set rs=nothing
%>

</td>
    <td width="8"></td>
    <td width="270" valign="top" bgcolor="#F6FBFD" style="border-left:1px #C5D8E6 dotted;"><table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td height="40" bgcolor="#229DD7" class="fontgg" style="padding-left:15px;">本类热门</td>
        </tr>
        <tr>
          <td bgcolor="#F6FBFD" style="padding:5px;"><div class="newsleftlis">
            <ul style="padding:0; margin:0; list-style:none;">
              <%Call ShowscArticle(ID,10,5,"·",20,"no","Hits desc,ID desc",0,0)%>
            </ul>
          </div></td>
        </tr>
      </table>
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td height="40" bgcolor="#229DD7" class="fontgg" style="padding-left:15px;">本类推荐</td>
        </tr>
        <tr>
          <td bgcolor="#F6FBFD" style="padding:5px;"><div class="newsleftlist" style="width:273px;">
            <ul style="padding:0; margin:0; list-style:none;">
              <%Call ShowImgscArticle(ID,4,7,"no","DateAndTime desc,ID desc")%>
            </ul>
          </div></td>
        </tr>
      </table></td>
  </tr>
</table>


<%
rsclass.close
set rsclass=nothing
end if
end if%>
<%
call bottom()
%>
</body>
</html>