morenews.asp

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

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

%>

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

<%'数据库连接包含文件 %>
<!--#include file="../include/odbc.asp"-->
<!--#include file="../include/showbody.asp"-->
<!--#include file="../include/killstr.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/head.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">                      
    <table border="0" width="100%">                             
      <tr>                             
        <td width="100%"><table border="0" width="100%" cellspacing="0" cellpadding="0">                             
        <%'输出模块名称%>               
        <%sql="select * from news2_menu where menuid='"&killstr(request("menuid"))&"'  "                 
        rs.Open sql,conn,3,1                 
        if not rs.EOF then                 
                         
        %>                 
               
          <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;                              
            <%=rs("menuname")%></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>                             
       <%                
         end if                
         rs.Close                
        %>                
          </table>                             
        </td>                             
      </tr>                             
      <tr>                             
        <td width="90%" valign="top"><ul>                             
        <% '输出该模块文章  %>                           
        <%if request("mysql") ="" then               
          sql="select * from news2_info where menuid='"&killstr(request("menuid"))&"'  order by infoid desc "               
        else               
          sql=request("mysql")               
        end if               
        rs.Open sql,conn,3,1               
        %>              
        <!--#include file="../include/rollpage.asp"-->              
        <%               
        if not rs.EOF then               
         rs.PageSize = 40               
	    rs.AbsolutePage = getPageNo(rs)               
        for i=1 to rs.PageSize               
        If rs.EOF Then Exit For                
        %>               
          <li><a class="l7"               
            href="../looknews.asp?menuid=<%=rs("menuid")%>&infoid=<%=rs("infoid")%>"               
            target="_blank"><%=rs("newstitle")%></a><% showtime(rs("regtime"))%> <br>               
          </li>               
        <%rs.MoveNext               
			 if right(trim(cstr(i)),1)="0"  then '隔十行空一行*******************************************               
				 Response.Write "<br>"               
			 end if                 
         If rs.EOF Then Exit For                
         next               
         end if            
        %>                 
                     
         </ul>                  
       </td>                             
      </tr>            
       <tr>              
        <td width="100%" height="19" colspan="2"><%call listPage(rs)%></td>              
      </tr>              
       <% rs.Close %>                      
    </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 + -
显示快捷键?