<table  Class="tdbg_left" border="0" cellspacing="0" cellpadding="0">
  <tr> 
    <td><table width="100%" border="0" cellpadding="0" cellspacing="0">
        <tr> 
          <td class="title_left" height="34" align="center" >新闻搜索</td>
        </tr>
        <tr> 
          <td align="center"><table width="100%" border="0" cellpadding="0" cellspacing="0">
              <form name="form1" method="get" action="News_search.asp"> 
			 <tr>
                  <td  height="30" align="center"> 
                    <input type="text" name="key" size="19" class="input">
                </td>
              </tr>
              <tr> 
                  <td height="30" align="center"> 
                    <select name="otype" class="input">
                    <option value="title" selected class="input">新闻标题</option>
                    <option value="msg" class="input">新闻内容</option>
                  </select>
                    　
                  <input type="submit" name="Submit" value="搜索"  Class="BUTTON"></td>
              </tr></form>
            </table>
            
          </td>
        </tr>
      </table></td>
  </tr>
  <tr> 
    <td><table width="100%" border="0" cellpadding="0" cellspacing="0">
        <tr> 
          <td class="title_left" height="34" colspan="2" align="center">最新新闻</td>
        </tr>
<%
t=0
Set rs=Server.CreateObject("ADODB.RecordSet") 
sql="Select * from News order by id desc" 
rs.Open sql,conn,1,1
if not Rs.eof then
do while not rs.eof
t=t+1
%>
        <tr onmouseover="this.bgColor='#efefef';"onmouseout="this.bgColor='#ffffff';"> 
          <td width="14%" height="22" align="center" ><%= t %></td>
          <td width="86%" >　<a href="shownews.asp?id=<%=rs("id")%>" title="<%=rs("title")%>"><%=left(rs("title"),10)%></a></td>
        </tr>
        <% 
if t>=10 then exit do 
rs.movenext 
loop 
else 
response.write "<tr><td align=center colspan=2 >尚无收录</td></tr>" 
end if 
rs.close 
%>
      </table></td>
  </tr>
  <tr>
    <td><table width="100%" border="0" cellpadding="0" cellspacing="0">
        <tr> 
          <td height="33" align="center" class="title_left" >热门新闻</td>
        </tr>
        <tr> 
          <td height="22" align="center">
		  <table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
              <%
t=0
Set rs=Server.CreateObject("ADODB.RecordSet") 
sql="Select * from News order by hits desc" 
rs.Open sql,conn,1,1
if not Rs.eof then
do while not rs.eof
t=t+1
%>
              <tr onmouseover="this.bgColor='#efefef';"onmouseout="this.bgColor='#ffffff';"> 
                <td width="82%" >　<a href="shownews.asp?id=<%=rs("id")%>" title="<%=rs("title")%>"><%=left(rs("title"),10)%></a></td>
                <td width="18%" height="22" align="center" ><font color="#FF0000"><%=rs("hits")%></font></td>
              </tr>
              <% 
if t>=10 then exit do 
rs.movenext 
loop 
else 
response.write "<tr><td align=center colspan=2 bgcolor=#E8E8F4>尚无收录</td></tr>" 
end if 
rs.close 
%>
            </table></td>
        </tr>
      </table></td>
  </tr>
</table>
