<!--#include virtual="/incs/config.asp" -->
<!--#include virtual="/incs/top.asp"-->


<%chk_log()
Chk_newpwr 4,12,3
conn.open constr %>
<%
perpage=20
ThePage=0
page=0
rcount=0
thepage=0
'''''''''''''''''''''''''''''''''
ordernum=SafeRequest("ordernum")
if chk_int(ordernum)=true then
if ordernum=11 then
orderstring=" n_ttl asc"
elseif ordernum=12 then
orderstring=" n_ttl desc"
elseif ordernum=21 then
orderstring=" n_hitcnt asc"
elseif ordernum=22 then
orderstring=" n_hitcnt desc"
elseif ordernum=31 then
orderstring=" n_ifshw asc"
elseif ordernum=32 then
orderstring=" n_ifshw desc"

elseif ordernum=41 then
orderstring=" n_addtme asc"
elseif ordernum=42 then
orderstring=" n_addtme desc"
else
orderstring=" n_addtme asc"
end if
else
ordernum=52
orderstring=" n_addtme desc"
end if
'''''''''''''''''''''''''''''''''''''''''
query="select * from artlst     order by "&orderstring
rs.open query,conn,1,1
if rs.RecordCount<=0 then
          ErrMsg="<font color=#ff0000>对不起</font>，没有搜索到符合条件的记录！..."
		
	   else
	      rcount=rs.recordcount
	      rs.pagesize=perpage
		  ThePage=rs.pagecount
		  if Chk_Int(SafeRequest("page"))=false then
		  page=1
		  else
		   page=cint(SafeRequest("page"))
		    if page<=0  then
		       page=1
		    elseif page>ThePage then
		       page=ThePage
		    end if	  
		  end if
		    rs.absolutepage=page
       end if   

%>
<script language="javascript">
<!--

function tofirst()
{searchform.page.value=1;
searchform.submit();
 }
  function toprev()
{searchform.page.value-=1;
searchform.submit();
 }
  function tonext()
{
searchform.page.value=<%=page%>-1+2;
searchform.submit();
 }
  function tolast()
{searchform.page.value=<%=ThePage%>;
searchform.submit();
 }
 function toorder(ordn)
{searchform.ordernum.value=ordn;
searchform.page.value=1;
searchform.submit();
 }
 function delit(n_id)
 {
 if (confirm("确定删除吗？"))
 location.href="art_mng.asp?module=art_del&nid="+n_id;
 }

 //-->
 </script>
<table cellspacing=2 cellpadding=0 width="100%" border=0>
              <tbody> 
              <tr> 
                <td  colspan=2 valign="middle">
                  <table class=line cellspacing=0 cellpadding=0 width="100%" 
                  border=0 align="center">
                    <tbody> 
                    <tr> 
                      <td valign=bottom width="25%" height=20><b>新闻列表</b></td>
                      
          <td valign=bottom noWrap align=right 
                        width="75%"><a href="art_add.asp" class=commonface >添加行业新闻</a> 
            | <a href="art_lst.asp" class=commonface >新闻列表</a></td>
                    </tr>
                    <tr> 
                      <td align=middle width="100%" colspan=2 height=5></td>
                    </tr>
                    <tr> 
                      <td align=middle width="100%" colspan=2 height=2  class=menuline></td>
                    </tr>
                    </tbody> 
                  </table>
                  <br>
                </td>
              </tr>
              <tr> 
                <td  colspan=2 valign="middle" height="28">
<table width="95%" border="0" cellspacing="0" cellpadding="0" align="center">
  <tbody> 
        <form action=art_lst.asp method=post name=searchform2>
          <tr> 
            <td height=20 width="119">&nbsp;共计 <b> <%=rcount%> </b>条记录 </td>
            <td height=20> 
                          <div align="center"> 
                            <input type=hidden name=ordernum value="<%=ordernum%>">
                <%=page_turn%></div>
            </td>
            <td height=20 width="120"> 
              <div align="right">转第 
                <select name="page" onChange="javascript:document.searchform2.submit();">
                  <option selected value=<%=page%>><%=page%></option>
                  <%
				   for i=1 to thepage
				   response.write "<option value="&i&">"&i&"</option>"
				   next
				   %> 
                </select>
                页</div>
            </td>
          </tr>
        </form>
        </tbody> 
      </table>
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td height=8></td>
        </tr>
      </table>
                  
      <table border=0 cellpadding=0 
                        cellspacing=0 class=datalist align="center"  width="100%">
        <tbody> 
          <tr > 
            <th class=datalistheader width="6%" align=center> <b>序号</b> </th>
            <%
			if ordernum=11 then
			odr1=12
			else
			odr1=11
			end if
			if ordernum=21 then
			odr2=22
			else
			odr2=21
			end if
			if ordernum=31 then
			odr3=32
			else
			odr3=31
			end if
			if ordernum=41 then
			odr4=42
			else
			odr4=41
			end if
			if ordernum=51 then
			odr5=52
			else
			odr5=51
			end if
			%>
            <th class=datalistheader width="54%" align=center><a  class=commonface href="javascript:toorder(<%=odr1%>);"><b>标题</b></a></th>
            <th class=datalistheader width="8%" align=center ><a  class=commonface href="javascript:toorder(<%=odr2%>);"><b>点击</b></a></th>
            <th class=datalistheader align=center width="6%"><a class=commonface  href="javascript:toorder(<%=odr3%>);"><b>显示</b></a></th>
            <th class=datalistheader align=center width="13%"><a class=commonface href="javascript:toorder(<%=odr3%>);"><b>日期</b></a></th>
            <th class=datalistheader align=center><b>操作</b></th>
          </tr>
          <%
			dim ifshw(2)
			ifshw(0)="NO"
			ifshw(1)="<b>YES</b>"
		  i=1
	Do While Not rs.eof 
	if i mod 2=1 then
	classstl="datalistgrida"
	else
	classstl="datalistgridb"
	end if
	%>
          <tr > 
            <td  class=<%=classstl%>  align=center height="20"><%=i+perpage*(page-1)%></td>
            <td class=<%=classstl%> ><a href="javascript:showurl('art_edt.asp?nid=<%=rs("n_id")%>');" class=commonface><%=rs("n_ttl")%></a> 
            </td>
            <td class=<%=classstl%> align=center><%=rs("n_hitcnt")%></td>
            <td  class=<%=classstl%>  align=center><%=ifshw(rs("n_ifshw"))%></td>
            <td  class=<%=classstl%>  align=center><%=left(replace(rs("n_addtme")," ","   "),10)%></td>
            <td   class=<%=classstl%>>&nbsp; 
              <a href="javascript:delit(<%=rs("n_id")%>);" class=commonface><u>删除</u></a>
            </td>
          </tr>
          <%
  rs.movenext
i=i+1
if i>perpage then
exit do
end if

  loop 
  	rs.close
	conn.close
  %>
        </tbody> 
      </table>
        <div align="center"></div>
                  <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td height=8></td>
        </tr>
      </table>
      
<table width="95%" border="0" cellspacing="0" cellpadding="0" align="center">
  <tbody> 
        <form action=art_lst.asp method=post name=searchform>
          <tr> 
            <td height=20 width="120">&nbsp;共计 <b> <%=rcount%> </b>条记录 </td>
            <td height=20> 
                          <div align="center"> 
                            <input type=hidden name=ordernum value="<%=ordernum%>">
                <%=page_turn%>
              </div>
            </td>
            <td height=20 width="120"> 
              <div align="right">转第 
                <select name="page" onChange="javascript:document.searchform.submit();">
                  <option selected value=<%=page%>><%=page%></option>
                  <%
				   for i=1 to thepage
				   response.write "<option value="&i&">"&i&"</option>"
				   next
				   %>
                </select>
                页</div>
            </td>
          </tr>
        </form>
        </tbody> 
      </table>
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td height=8></td>
        </tr>
      </table>
<br>
</td>
              </tr>
              </tbody> 
            </table>
          <!--#include virtual="/incs/bottom.asp"-->