<!--#include file="conn.asp" -->
<!--#include file="Function.asp"-->
<%
strCurrMenu="3"
%>
<%
strQuery=""
strTitle="最新发布"
if GetVariable("class")<>"" then
	strQuery=strQuery & " And nClass=" & GetVariable("class")
	strTitle=GetVariable("classname")
end if

if GetVariable("key")<>"" then
	strQuery=strQuery & " And (nTitle Like '%" & GetVariable("key") & "%' or nHtmlText like '%" & GetVariable("key") & "%' or nKey like '%" & GetVariable("key") & "%') "
	strTitle="搜索：" & GetVariable("key")
end if

'从这开始读数据
strSQL="Select * From web_news Where nAudit<>0 " & strQuery & " And mn_id=" & strCurrMenu & " Order by ID Desc"
Set rs=Server.CreateObject("ADODB.RecordSet")
rs.open strSQL,conn,1,1
'分页显示初始化
page=GetVariable("page")
if page="" then
	page=1
else
	page=Cint(page)
end if

Section=GetVariable("section")
if Section="" then
	Section=1
else
	Section=Cint(Section)
end if
'变量赋值
intPageSize=15		'每页显示记录数
intSectionSize=5		'多少页为一段，像GOOGLE一样
PrevSectionText="<FONT face=webdings>7</FONT>"		'上一段的链接文字
NextSectionText="<FONT face=webdings>8</FONT>"		'下一段的链接文字
PrevPageText="<FONT face=webdings>3</FONT>"			'上页的链接文字	
NextPageText="<FONT face=webdings>4</FONT>"			'下页的链接文字

strPageUrl="?class=" & GetVariable("class") & "&classname=" & GetVariable("classname") & "&key=" & GetVariable("key") & "&mnid=" & strCurrMenu

rs.pagesize=intPageSize
intCount=rs.RecordCount 
intPageCount=rs.pagecount
intSectionCount=(intPageCount - 1) \ intSectionSize + 1
if intCount>0 then
	rs.AbsolutePage=page 
end if 
%>
<html>
<head>
<title>企业智能建站-最简单的建站平台</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="common/style.css" type="text/css">
</head>

<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" BodyBegin>
<!--#include file="top.asp"-->
<table width="778" border="0" align="center" cellspacing="0" cellpadding="0" height="10">
  <tr> 
    <td bgcolor="#E3E3E3" height="10"> </td>
  </tr>
</table>
<table width="778" border="0" align="center" cellspacing="0" cellpadding="0" height="6">
  <tr> 
    <td height="6"> </td>
  </tr>
</table>
<table width="778" border="0" align="center" cellspacing="0" cellpadding="0" height="10">
  <tr> 
    <td height="116" width="200" valign="top"> <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td background="images/config3.gif" height="22">&nbsp;&nbsp;会员登陆</td>
        </tr>
        <tr> 
          <td background="images/config.gif" height="74"> <table width="100%" border="0" align="center" cellspacing="0" cellpadding="0" height="6">
              <tr> 
                <td height="10"> </td>
              </tr>
            </table>
            <table width="100%" border="0" cellspacing="0" cellpadding="5">
              <%
			'strSQL="Select m_adminserver From member Where id=" & WebUserID
			'Set rsAdmin=Server.CreateObject("ADODB.RecordSet")
			'rsAdmin.open strSQL,sqlconn,1,1
			'strAdminServer=Trim(rsAdmin("m_adminserver"))
			'rsAdmin.close
			'Set rsAdmin=nothing
			'if strAdminServer="" or isnull(strAdminServer) then 
			strAdminServer=WebServer
			%>
              <form method="post" name="reg" action="<%=strAdminServer%>/ChkLogin.asp" onSubmit="return submitchecken(this)">
                <tr>
                  <td rowspan="3" width="15"></td>
                  <td height="40" width="27%">用户名:</td>
                  <td height="40" width="64%"><input name="name" type="text" id="name" size="13">
                  </td>
                </tr>
                <tr>
                  <td height="20" width="27%">密&nbsp;&nbsp;码:</td>
                  <td height="20" width="64%"><input name="password" type="password" id="password" size="13">
                  </td>
                </tr>
                <tr>
                  <td>验证码:</td>
                  <td><input name="validate" type="text" id="validate" size=10>
                      <%Call GetSafeCode%></td>
                </tr>
                <tr>
                  <td height="20" colspan="3"><div align="center">
                      <input name="imageField" type="image" src="images/login_but.gif" width="68" height="24" border="0">
                    &nbsp; <a href="register.asp"><img src="images/zc.gif" width="61" height="24" border="0"></a></div></td>
                </tr>
              </form>
            </table></td>
        </tr>
        <tr> 
          <td background="images/config.gif"><img src="images/config1.gif" width="200" height="8"></td>
        </tr>
      </table>
      <table width="100%" border="0" align="center" cellspacing="0" cellpadding="0" height="3">
        <tr> 
          <td height="3"> </td>
        </tr>
      </table>
      <table width="100%" border="0" cellspacing="0" cellpadding="0" height="100%">
        <tr> 
          <td background="images/config3.gif" height="22"> &nbsp;&nbsp;其它栏目</td>
        </tr>
        <tr> 
          <td background="images/config.gif" height="100%" valign="top">&nbsp; </td>
        </tr>
        <tr> 
          <td background="images/config.gif"><img src="images/config1.gif" width="200" height="8"></td>
        </tr>
      </table>
    </td>
    <td height="116" width="5"></td>
    <td height="116" width="573" valign="top"> 
      <table width="100%" border="0" align="center" cellspacing="1" cellpadding="6" height="133" bgcolor="#CCCCCC">
        <tr> 
          <td height="10" bgcolor="#FFFFFF" valign="top">
            <table width="100%" border="0" cellspacing="0" cellpadding="8" align="center">
              <tr> 
                <td valign="top" height="36"><img src="images/ty.gif" width="545" height="39"></td>
              </tr>
              <tr>
                <td height="300" valign="top">
<table width="92%" border="0" align="center">
                    <tr> 
                      <td  height="8"> <div align="center"></div></td>
                    </tr>
                    <tr> 
                      <td  height="23">您的位置 : <A href=".">首页</A> &gt; 新闻报道 &gt;&nbsp;<strong><%=strTitle%></strong> 
                      </td>
                    </tr>
                    <tr> 
                      <td height="1" background="images/linebg.gif"></td>
                    </tr>
                  </table>
                  <TABLE width="90%" 
                          border=0 align="center" cellPadding=0 cellSpacing=0>
                    <TBODY>
                      <TR> 
                        <TD><TABLE cellSpacing=0 cellPadding=0 width="100%" 
                          border=0>
                            <TBODY>
                              <TR>
                                <TD height="25"><form name="form1" method="post" action="?mnid=<%=strCurrMenu%>">
                                    <table width="100%" border="0" cellpadding="7" cellspacing="0">
                                      <tr> 
                                        <td width="100%" height="53" colspan="2"> 
                                          <strong>新闻搜索：</strong>关键字: 
                                          <input name="key" type="text" id="key"> 
                                          <input type="submit" name="Submit" value="搜 索">
                                        </td>
                                      </tr>
                                    </table>
                                  </form></TD>
                              </TR>
                              <TR> 
                                <TD height="25">共<%=intCount%>结果</TD>
                              </TR>
                              <TR> 
                                <TD width="65%" height="25"><table width="100%" height="25" border="0" cellpadding="0" cellspacing="0">
                                    <%
										  '开始输出最新新闻
										   for i=1 to intPageSize
												if rs.eof then exit For
												if i mod 2 =0 then
													strColor="#FFFFFF"
												else
													strColor="#F9F9F9"
												end if
										  %>
                                    <tr> 
                                      <td width="10%" height="22" align="right">· 
                                      </td>
                                      <td width="90%" height="22"><a href="newshow.asp?id=<%=trim(rs("ID"))%>&mnid=<%=strCurrMenu%>&classname=新闻动态" target="_blank"><%=trim(rs("nTitle"))%></a></td>
                                    </tr>
                                    <%
											rs.movenext
										next
										%>
                                  </table></TD>
                              </TR>
                              <TR> 
                                <TD height="25">&nbsp;</TD>
                              </TR>
                            </TBODY>
                          </TABLE></TD>
                      </TR>
                    </TBODY>
                  </TABLE>
                  <br> <table width="92%" border="0" align="center">
                    <tr> 
                      <td height="1" background="images/linebg.gif"></td>
                    </tr>
                    <tr> 
                      <td height="28" align="right" ><table width="100%" border="0" cellspacing="0" cellpadding="0">
                          <tr> 
                            <td align="right"> 共有<%=intCount%>记录，分<%=intPageCount%>页，当前页<%=Page%>，每页显示<%=intPageSize%>条记录 
                              <%
			'计算每一段的开始页
			intStarPage=(Section-2) * intSectionSize + 1
			'前一段
			if Section<=1 then
				response.Write(PrevSectionText & " ")
			else
				response.Write("<a href='" & strPageUrl & "&page=" & intStarPage & "&section=" & Section-1 & "'>" & PrevSectionText & "</a> ")
			end if 
			
			'显示页码列表
			response.Write("第")
			intStarPage=(Section-1) * intSectionSize + 1
		    for p=intStarPage to intStarPage + intSectionSize - 1
				if p > intPageCount then exit for
				if p=page then
		    		response.Write("<strong>[" & p & "]</strong> ")
				else
		    		response.Write("<a href='" & strPageUrl & "&page=" & p & "&section=" & Section & "'>[" & p & "]</a> ")
				end if	
		    next
			response.Write("页")
			'后一段
			intStarPage=(Section) * intSectionSize + 1
			if Section>=intSectionCount then
				response.Write(" " & NextSectionText)
			else
				response.Write(" <a href='" & strPageUrl & "&page=" & intStarPage & "&section=" & Section+1 & "'>" & NextSectionText & "</a> ")
			end if 
		  %>
                              　 </td>
                          </tr>
                        </table></td>
                    </tr>
                    <tr> 
                      <td height="23" align="right" >&nbsp;</td>
                    </tr>
                  </table>
                </td>
              </tr>
            </table>
          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table width="778" border="0" align="center" cellspacing="0" cellpadding="0" height="6">
  <tr> 
    <td height="6"> </td>
  </tr>
</table>
<table width="778" border="0" align="center" cellspacing="0" cellpadding="0" height="60" background="images/bg3.gif">
  <tr> 
    <td height="6">
      <div align="center"><font color="#FFFFFF">公司地址：郑州市经三路与农业路枣庄20#<br>电话：14837153091 E-Mail:hn22@163.com<br>Copyright&copy;2006-2007 河南数据 All Rights Reserved.<br><br>
        <script language="JavaScript" src="admin/count/counter.asp"></script></font></div>
    </td>
  </tr>
</table>
<script language="JavaScript" src="common/init.js"></script><br><script language=Javascript src="common/tranbig5.Js"></script>
</body>
</html>




