<!--#include file=conn.asp-->
<!--#include file=config.asp-->
<!--#include file=const.asp-->
<!--#include file=char.asp-->
<%
 '=========================================================
' File: artlist.asp
' Version:3.0
' Date: 2005-10-20
' Script Written by xmrxw
'=========================================================
' Copyright (C) 2004,2005 Xmrxw.Com All rights reserved.
' Web: http://www.xmrxw.com,http://www.xmzxw.com
' Email: info@mssky.com,super@mssky.com
' QQ：10689579　Msn：zdlmicr@hotmail.com
'=========================================================
response.buffer=true
BoardID=checkStr(Request("BoardID"))
if BoardID="" or not isInteger(BoardID) then
founderr=true
Errmsg=Errmsg+"<br>"+"<li>非法参数。"
end if
stats="文章列表"
call nav()
if founderr then
	call head_var("","")
	call Mslove_error()
else
call head_var("玫瑰美文","Artindex.asp")
call tumppages()'翻页处理
strFileName="Artlist.asp?boardid="&boardid&""
call main()
end if
call activeonline()
call footer()

sub main()%>
<table width="750" border="0" align="center" cellpadding="0" cellspacing="0" class=tableborder2>
  <tr>
    <td width="47%" height="27"><a href="artpost.asp?action=new&BoardID=<%=BoardID%>" title="发新文章"><img src="Skins/Default/postnew.gif" width="85" height="21" border="0"></a></td>
    <td width="53%">&nbsp;</td>
  </tr>
</table>
<table width="750" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#f7f7f7" style="BORDER-RIGHT: #c0c0c0 1px solid; BORDER-LEFT: #c0c0c0 1px solid">
  <tr> 
    <td width="113" valign="top" style="BORDER-RIGHT: #c0c0c0 1px solid"> <table width="220" border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td width="219" height="267" valign="top" bgcolor="#FBFBFB"> <table width="100%" border="0" cellpadding="0" cellspacing="0">
              <TBODY>
                <TR> 
                  <TD background=images/artimg/side_bg_r1_c1.gif height=34> <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
                      <TBODY>
                        <TR> 
                          <TD width=10></TD>
                          <TD width=20> <IMG height=14 src="images/artimg/ico_015.gif" width=13 
                  border=0></TD>
                          <TD width=100>站点搜索</TD>
                          <TD width=85></TD>
                          <TD width=5></TD>
                        </TR>
                      </TBODY>
                    </TABLE></td>
                </tr>
                <TR> 
                  <TD background=images/artimg/side_bg_r2_c1.gif> <TABLE cellSpacing=0 cellPadding=0 width=200 align=center 
              border=0>
                      <TR> 
                        <TD> <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
                            <form name="form1" method="post" action="art_search.asp">
                              <TR> 
                                <TD> <input maxlength=11 name="keyWord" class="button1" size="11"> 
                                  <SELECT 
                          name=condition>
                                    <OPTION value=title 
                          selected>标题</OPTION>
                                    <OPTION 
                          value=content>全文</OPTION>
                                  </SELECT> <INPUT 
                        style="WIDTH: 44px; HEIGHT: 21px" type=image 
                        src="images/artimg/search.gif" align=absMiddle value="" 
                        name=Submit class="notinput"> </TD>
                              </TR>
                            </FORM>
                          </TABLE></TD>
                      </TR>
                    </TABLE></TD>
                </TR>
                <TR> 
                  <TD background=images/artimg/side_bg_r3_c1.gif 
      height=4></TD>
                </TR>
                <TR> 
                  <TD background=images/artimg/side_bg_r1_c1.gif height=34> <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
                      <TBODY>
                        <TR> 
                          <TD width=10></TD>
                          <TD width=20> <IMG height=14 src="images/artimg/ico_015.gif" width=13 
                  border=0></TD>
                          <TD width=100>推荐文章</TD>
                          <TD width=85></TD>
                          <TD width=5></TD>
                        </TR>
                      </TBODY>
                    </TABLE></TD>
                </TR>
                <TR> 
                  <TD align="center" background=images/artimg/side_bg_r2_c1.gif> 
                    <table width="205" border="0" cellspacing="0" cellpadding="0">
                      <%set rs=server.createobject("adodb.recordset")
			  sql="select top 10 id,title from Ms_Article where BoardID="&BoardID&" and istop=1 order by id desc"
			  rs.Open sql,conn,1,1
if not (rs.eof and rs.bof) then
do while not rs.eof%>
                      <tr> 
                        <td width="201" height="23">·<a href=showart.asp?boardid=<%=boardid%>&id=<%=rs(0)%>><%=rs(1)%></a></td>
                      </tr>
                      <%rs.movenext
			  loop
			  else
			  response.Write("<tr><td background=images/artimg/side_bg_r2_c1.gif>·暂无文章</td></tr>")
			  end if
			  rs.close%>
                    </table></td>
                </tr>
                <TR> 
                  <TD background=images/artimg/side_bg_r3_c1.gif 
      height=4></TD>
                </TR>
            </table>
            <table width="100%" border="0" cellpadding="0" cellspacing="0">
              <TR> 
                <TD background=images/artimg/side_bg_r1_c1.gif height=34> <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
                    <TBODY>
                      <TR> 
                        <TD width=10></TD>
                        <TD width=20> <IMG height=14 src="images/artimg/ico_015.gif" width=13 
                  border=0></TD>
                        <TD width=100>热门文章</TD>
                        <TD width=85></TD>
                        <TD width=5></TD>
                      </TR>
                    </TBODY>
                  </TABLE></TD>
              </TR>
              <tr> 
                <td background=images/artimg/side_bg_r2_c1.gif> <table width="205" border="0" align="center" cellpadding="0" cellspacing="0">
                    <%set rs=server.createobject("adodb.recordset")
			  sql="select top 10 id,title from Ms_Article where BoardID="&BoardID&" order by hits desc,id"
			  rs.Open sql,conn,1,1
if not (rs.eof and rs.bof) then
do while not rs.eof%>
                    <tr> 
                      <td width="205" height="23">·<a href=showart.asp?boardid=<%=boardid%>&id=<%=rs(0)%>><%=rs(1)%></a></td>
                    </tr>
                    <%rs.movenext
			  loop
			  else
			  response.Write("<tr><td height=28 background=images/artimg/side_bg_r2_c1.gif>·暂无文章</td></tr>")
			  end if
			  rs.close%>
                  </table></td>
              </tr>
              <TR> 
                <TD background=images/artimg/side_bg_r3_c1.gif 
      height=4></TD>
              </TR>
            </table></td>
        </tr>
      </table></td>
    <td width="113" valign="top">&nbsp;</td>
    <td width="522" align="center" valign="top" style="BORDER-bottom: #d4d4d4 1px solid"> <table border="0" width="100%" cellspacing="0" cellpadding="0" align="center">
        <tr> 
          <td width="97%" height="30"> <table border="0" width="522" cellspacing="0" cellpadding="0">
              <tr> 
                <td width="120" height="30" background="images/artimg/ad_title.gif"> 
                  <table border="0" width="120" cellspacing="0" cellpadding="0">
                    <tr> 
                      <td colspan="2" height="6"></td>
                    </tr>
                    <tr> 
                      <td width="10"></td>
                      <td noWrap> ▍此栏目文章列表</td>
                    </tr>
                    <tr> 
                      <td colspan="2" height="0"></td>
                    </tr>
                  </table></td>
                <td width="402" height="30" background="images/artimg/ad_title_bg.gif" align="center"> 
                </td>
              </tr>
            </table></td>
        </tr>
      </table>
      <table width="100%" border="0" cellspacing="0" cellpadding="0" style="BORDER-LEFT: #d4d4d4 1px solid">
        <tr> 
          <td height="35"><table border="0" width="97%" cellspacing="0" cellpadding="0" align="center">
              <%set rs=server.createobject("adodb.recordset")
	if Supermaster or master or standmaster then
    sql="select id,title,Username,Hits,Ubbs,Addtime from Ms_Article where BoardID="&BoardID&" and locktopic=0 order by id desc"
	else
	sql="select id,title,Username,Hits,Ubbs,Addtime from Ms_Article where BoardID="&BoardID&" and Checked=1 order by id desc"
	end if
	rs.Open sql,conn,1,1
if not (rs.eof and rs.bof) then
call rspages()
do while not rs.eof and page_count<Cint(MaxPerPage)%>
              <tr align="center"> 
                <td width="3%" height="24"><img src=images/artimg/list_nav_spacer.gif></td>
                <td width="94%" align="left"> <%response.write("<a href=showart.asp?Boardid="&Boardid&"&ID="&rs(0)&" title=""主题："&rs(1)&Brstrt&"发表于："&rs(5)&""" target=_blank>"&left(rs(1),22)&"</a>")
	  if datediff("d",rs(5),date())<1 then
response.write("&nbsp;<img src=images/new.gif>")
end if%>
                  [<%=datevalue(rs(5))%>]</td>
              </tr>
              <%page_count=page_count+1
	rs.movenext
  loop
  else
  response.write("<tr align=""center""><td height=""30"" colspan=""6"" align=""center""  class=tablebody1>无记录！</td></tr>")
  end if
  rs.close
  
  if totalrec>0 then%>
              <tr align="center"> 
                <td height="29" colspan="3" align="left"> <%
		  	call showpage(strFileName)
		  %> </td>
              </tr>
              <%end if%>
            </table></td>
        </tr>
      </table></td>
  </tr>
</table>
<%
end sub
%>   
</body>
</html> 