morenews.asp

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

ASP
139
字号
<%
'*********************************************************************************
'模块名称:特色新闻跟更多新闻
'开发人:佟庆涛
'时间:2001年2月9日
'*********************************************************************************

%>

<%
dim rs          '数据访问对象
dim sql         'select 语句
dim i           '循环控制变量
dim menuid      '栏目ID
dim infoid      '文章ID
dim flag        '文件头标志
dim pagesize    '每页显示记录条数

flag="013000"
pagesize=40

%>

<%'数据库连接包含文件 %>
<!--#include file="../include/odbc.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">
<% '网页头部包含文件 %>
<!--#include file="../include/secondhead.asp"-->
<center> 

<center>                 
<table border="0" cellpadding="0" cellspacing="0" width="770"> 
    <tr>                      
    <td width="20%" bgcolor=#F5F5F5 valign="top"><img src="../images/pic-206.gif"></td> 
     
     
     <td width="79%" bgcolor="#FFFFFF" valign="top" style="border-left: 1px solid #C2BCB3"> 
     
      <table border="0" cellpadding="3" cellspacing="1" width="98%">     
          <tr>     
            <td width="100%" style=padding-top:5pt >您的位置:新闻中心 -&gt;                                               
              特色新闻                                                      
              <p></p>                                                      
            </td>                                                      
          </tr>                              
        </table>                               
       <table border="0" cellpadding="3" cellspacing="1" width="90%">                                   
        <%'输出模块名称%>                          
        <%sql="select * from news2_menu where menuid='"&request("menuid")&"'  "                            
        rs.Open sql,conn,3,1                            
        if not rs.EOF then                            
                                    
        %>                    
          <tr>                                   
            <td width="5%" rowspan="9">&nbsp;</td>                                  
            <td width="95%" align="left" colspan="3" ><b><span style="font-size:14px;"><font color="#FF8040"><%=rs("menuname")%></font></span></b></td>                                  
          </tr>                               
       <%                           
         end if                           
         rs.Close                           
        %>                           
         <tr><td><hr size="1"></td></tr>                             
                                        
          <tr>                      
          <td width="95%">                               
              <table border="0" width="100%">                                        
      <tr>                                        
        <td width="100%">                               
        </td>                                        
      </tr>                                        
      <tr>                                        
        <td width="90%" valign="top"><ul>                                        
        <% '输出该模块文章  %>                                      
        <%if request("mysql") ="" then                          
          sql="select * from news2_info where menuid='"&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 =pagesize                          
	    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> <font size=1 color=#000099>&nbsp;( <%=right(left(rs("regTime"),14),9)%>)</font> <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>           
                           
          </td>                              
  </tr>                               
  <tr><td ></td></tr>        
                                 
   </table></td></tr></table>                              
 
<hr width="90%" size="1" > 
<!--#include file="../include/bottom.txt"-->                                  
                                            
</center>                                  
                                
</body>                              
</html>                              

⌨️ 快捷键说明

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