index.asp

来自「asp的新闻网站」· ASP 代码 · 共 196 行

ASP
196
字号
<%
'*********************************************************************************
'模块名称:网络文摘新闻首页
'开发人:佟庆涛
'时间:2001年1月31日
'*********************************************************************************

%>

<%
dim rs          '数据访问对象
dim sql         'select 语句
dim i           '循环控制变量
dim flag        '文件头标志

%>

<%'数据库连接包含文件 %>
<!--#include file="../include/odbc.asp"-->
<!--#include file="../include/showbody.asp"-->

<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" type="text/css" href="../style.css">
<title>千夜网-&gt;新闻-&gt;网络文摘</title>
</head>

<%
'定义recordset对象
set rs=server.CreateObject ("adodb.recordset")
%>

<body topmargin="3" leftmargin="3">
<div align="center">
<% '网页头部包含文件 
   flag="011000"%>
<!--#include file="../include/secondhead.asp"-->
<center> 
 
<table border="0" width="770" cellspacing="0" cellpadding="0"> 
  <tr> 
    <td width="159" 
    style="border-left: 2px solid rgb(145,185,49); border-right: 2px none rgb(145,185,49); border-top: 2px solid rgb(145,185,49); border-bottom: 2px solid rgb(145,185,49)" 
    bgcolor="#F5F5F5" valign="top"><p align="center"><img src="../images/pic-190.gif" 
     width="160" height="202"><br> 
    </p> 
      <!--#include file="include/sousuo.asp"-->   
      <!--#include file="include/kaixin.asp"-->   
      <!--#include file="include/zhuanti.asp"-->   
      <!--#include file="include/link.asp"-->                    
    </td>                      
    <td width="421"                      
    style="border-top: 2px solid rgb(145,185,49); border-bottom: 2px solid rgb(145,185,49)"                      
    valign="top">
    <!--#include file="include/redian.asp"-->            
    <table border="0" width="100%">                      
      <tr>                      
        <td width="100%"><table border="0" width="100%" cellspacing="0" cellpadding="0">                      
          <tr>                      
            <td width="5%"><img src="../images/pic-191.gif"  width="24" height="18"></td>                      
            <td width="48%" bgcolor="#D52B73"><span style="font-size: 14px"><font color="#FFFFFF">&nbsp;                       
            热点推荐</font></span></td>                      
            <td width="47%" style="border-top: 3px solid rgb(213,43,115)"><span                      
            style="font-size: 14px"><font color="#FFFFFF"><img src="../images/pic-192.gif"                      
             width="19" height="14"></font></span></td>                      
          </tr>                      
        </table>                      
        </td>                      
      </tr>                      
      <tr>                      
        <td width="90%" valign="top"><ul>                      
        <% '输出热点推荐推荐文章  %>                    
        <%sql="select * from news2_commend where menuid='011012' and visible<>'0' order by infoindex "                    
        rs.Open sql,conn,3,1                    
        if not rs.EOF then                    
        for i=1 to rs.RecordCount                     
        %>                    
        <li><a class="l7"                    
            href="../looknews.asp?menuid=<%=rs("menuid")%>&infoid=<%=rs("infoid")%>"                    
            target="_blank"><%=rs("newstitle")%></a> <%=" ["&rs("derivation")&"]"%><% showtime(rs("regtime"))%><br>                    
          </li>                    
        <%rs.MoveNext                     
         next                    
         end if                    
         rs.Close                    
                             
        %>                    
         </ul>                     
        <p align="right"><a class="l2"                    
            href="morenews.asp?menuid=011012"                    
           target="_blank">【更多...】</a>&nbsp;&nbsp;&nbsp; <br>                    
       </td>                      
      </tr>                      
    </table>                      
    <table border="0" width="100%">                      
      <tr>                      
        <td width="100%"><table border="0" width="100%" cellspacing="0" cellpadding="0">                      
          <tr>                      
            <td width="5%"><img src="../images/pic-191.gif"  width="24" height="18"></td>                      
            <td width="48%" bgcolor="#D52B73"><span style="font-size: 14px"><font color="#FFFFFF">&nbsp;                       
            网络文摘</font></span></td>                      
            <td width="47%" style="border-top: 3px solid rgb(213,43,115)"><span                      
            style="font-size: 14px"><font color="#FFFFFF"><img src="../images/pic-192.gif"                      
             width="19" height="14"></font></span></td>                      
          </tr>                      
        </table>                      
        </td>                      
      </tr>                      
      <tr>                      
        <td width="90%" valign="top"><ul>                      
        <% '输出网络文摘前12条文章标题  %>                    
        <%sql="select top 12  * from news2_info where menuid='011002'  order by infoid desc "                    
        rs.Open sql,conn,3,1                    
        if not rs.EOF then                    
        for i=1 to rs.RecordCount                     
        %>                    
        <li><a class="l7"                    
            href="../looknews.asp?menuid=<%=rs("menuid")%>&infoid=<%=rs("infoid")%>"                    
            target="_blank"><%=rs("newstitle")%></a> <%=" ["&rs("derivation")&"]"%><% showtime(rs("regtime"))%><br>                    
          </li>                    
        <%rs.MoveNext                     
         next                    
         end if                    
         rs.Close                    
                             
        %>                    
         </ul>                     
        <p align="right"><a class="l2"                    
            href="morenews.asp?menuid=011002"                    
            target="_blank">【更多...】</a>&nbsp;&nbsp;&nbsp; <br>                    
         </td>                      
      </tr>                      
    </table>                      
    <table border="0" width="100%">                      
      <tr>                      
        <td width="100%"><table border="0" width="100%" cellspacing="0" cellpadding="0">                      
          <tr>                      
            <td width="5%"><img src="../images/pic-191.gif"  width="24" height="18"></td>                      
            <td width="48%" bgcolor="#D52B73"><span style="font-size: 14px"><font color="#FFFFFF">&nbsp;                       
            网友言论</font></span></td>                      
            <td width="47%" style="border-top: 3px solid rgb(213,43,115)"><span                      
            style="font-size: 14px"><font color="#FFFFFF"><img src="../images/pic-192.gif"                      
             width="19" height="14"></font></span></td>                      
          </tr>                      
        </table>                      
        </td>                      
      </tr>                      
      <tr>                      
        <td width="90%" valign="top"><ul>                      
        <% '输出网友言论前8条文章标题  %>                    
        <%sql="select top 8  * from news2_info where menuid='011003' order by infoid desc"                    
        rs.Open sql,conn,3,1                    
        if not rs.EOF then                    
        for i=1 to rs.RecordCount                     
        %>                    
        <li><a class="l7"                    
            href="../looknews.asp?menuid=<%=rs("menuid")%>&infoid=<%=rs("infoid")%>"                    
            target="_blank"><%=rs("newstitle")%></a><%=" ["&rs("derivation")&"]"%><% showtime(rs("regtime"))%> <br>                    
          </li>                    
        <%rs.MoveNext                     
         next                    
         end if                    
         rs.Close                    
                             
        %>                    
                    
        </ul>                      
        <p align="right"><a class="l2"                    
            href="morenews.asp?menuid=011003"                    
           target="_blank" >【更多...】</a>&nbsp;&nbsp;&nbsp; <br>                      
        </td>                      
      </tr>                      
    </table>                      
    <p><br>                      
    <br>                      
    </p>                      
    <p> </td>                    
    <td width="190" style="border: 2px solid rgb(145,185,49)" bgcolor="#EDF7E1" valign="top"> 
    <!--#include file="include/right.asp"-->                
        </center></div></td>                     
      </tr>                     
    </table>                     
    </td>                     
  </tr>                     
</table>                     
</div>                     
                     
<hr width="90%" size="1" color="#D52B73">                     
<div align="center"><center> 
<!--#include file="../include/bottom.txt"-->                  
</center></div>                     
</body>                     
</html>                     

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?