⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 news.asp

📁 一个不错的企业网站源代码!
💻 ASP
字号:
<%@ Language=VBScript%>
<%
Response.Buffer=false
Response.Expires=0
%>
<!-- #include file="dsnroot.asp" -->
<!-- #include file="links.asp" -->
<%
set cn=Server.CreateObject("ADODB.Connection")
cn.Open mycnstr
set rs=server.CreateObject("ADODB.Recordset")
menu="11211111"
id=Request.QueryString ("id")
pageno=Request.QueryString ("pageno")
if id="" then
		id=0
	else
		id=cint(id)
end if
if id=0 then
		sqltext="select top 1 id from edanwei where enable=1 and pid=2 order by pl"
		rs.Open sqltext,cn,1,1
		if not rs.EOF then
				id=rs("id")
		end if
		rs.Close 
end if		
%>
<!-- #include file="design.asp" -->
<table width="778" border="0" cellspacing="0" cellpadding="0" align="center" bgcolor="#FFFFFF">
  <tr> 
    <td bgcolor="#66cc00" width="1"></td>
    <td width="190" valign="top" background="images/group/left_p_group.jpg" style="background-repeat: no-repeat; background-position: bottom"> 
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td><img src="images/group/left_top_p.jpg" width="190" height="45"></td>
        </tr>
      </table>
      <table width="180" border="0" cellspacing="0" cellpadding="0" align="center">
        <tr> 
          <td><img src="images/news/tp_news.jpg" width="180" height="39"></td>
        </tr>
        <tr> 
          <td background="images/group/left_nav_bg.jpg"> 
            <%sqltext="select id,name,flag from edanwei where enable=1 and pid=2 order by pl"
              rs.Open sqltext,cn,1,1
              do while not rs.EOF
              if id=rs("id") then
					fontcolor="#ff9900"
					modeflag=rs("flag")
					titletxt=trim(rs("name"))
				else
					fontcolor="#000000"	
              end if
              %>
            <table width="78%" border="0" cellspacing="0" cellpadding="0" align="center">
              <tr> 
                <td colspan="2" height="6"></td>
              </tr>
              <tr> 
                <td width="20" class="font3">※</td>
                <td><a href="<%=linknews%>?id=<%=rs("id")%>" class="anews2"><font color="<%=fontcolor%>"><%=trim(rs("name"))%></font></a></td>
              </tr>
            </table>
              <%rs.MoveNext 
                loop
                rs.Close %>
          </td>
        </tr>
        <tr> 
          <td><img src="images/group/left_nav_bot.jpg" width="180" height="89"></td>
        </tr>
      </table>
      <table width="100%" border="0" cellspacing="0" cellpadding="0" height="50">
        <tr>
          <td>&nbsp;</td>
        </tr>
      </table>
    </td>
    <td background="images/line_v.gif" width="1"></td>
    <td valign="top" background="images/bot_bg.jpg" style="background-repeat: repeat-x; background-position: bottom" height=450 valign=top>
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td><img src="images/news/news_p.jpg" width="585" height="130"></td>
        </tr>
      </table>
    <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td background="images/group/line3.gif"  style="background-repeat: no-repeat; background-position: bottom" height="36" align="center"><%=titletxt%></td>
        </tr>
      </table>
      <table width="96%" border="0" cellspacing="0" cellpadding="0" align="center">
        <tr>
          <td>&nbsp;</td>
        </tr>
      </table>
      <%sqltext="select id,name,body from ecdanwei where enable=1 and ppid=2 and pid="&id&" order by creatdate desc"
        rs.Open sqltext,cn,1,1
        listcs=8
        rs.PageSize=listcs
		if pageno="" then 
				pageno=1
			else
				pageno=cint(pageno)	
		end if	
		if rs.PageCount>0 then rs.AbsolutePage=pageno
        i=0        
        do while not rs.EOF and i<listcs%>
       <%if modeflag=1 then%>
      <table width="96%" border="0" cellspacing="0" cellpadding="0" align="center">
        <tr> 
          <td colspan="2" height="10"></td>
        </tr>
        <tr> 
          <td width="20" class="font3" valign="top">※</td>
          <td><a href="<%=linknewsdetail%>?pid=<%=id%>&id=<%=rs("id")%>&pageno=<%=pageno%>" class="anews"><%=trim(rs("name"))%></a></td>
        </tr>
      </table>
      <%else%>
      <table width="96%" border="0" cellspacing="0" cellpadding="0" align="center">
        <tr>
          <td class="font1">★ 
              <%=trim(rs("body"))%>
          </td>
        </tr>
        <tr height=20><td>&nbsp;</td></tr>
      </table>
      <%end if%>
      <%rs.MoveNext 
      i=i+1
        loop%>
                 
      <table width="96%" border="0" cellspacing="0" cellpadding="0" align="center">
        <tr> 
          <td height="50">
                  <%if pageno>1 then%>
						<a href="<%=linknews%>?pageno=<%=pageno-1%>"><img src="images/arrow_pre.gif" width="55" height="12" border="0"></a>
				 <%end if%>
				 <%if pageno<rs.PageCount then%>
						<a href="<%=linknews%>?pageno=<%=pageno+1%>"><img src="images/arrow_next.gif" width="55" height="12" border="0"></a>
				 <%end if%>
          </td>
        </tr>
      </table>
      <%rs.Close %>
      <table width="96%" border="0" cellspacing="0" cellpadding="0" align="center">
        <tr> 
          <td background="images/line_h.gif" height="1"></td>
        </tr>
        <tr> 
          <td height="30" align="right"><a href="#top"><img src="images/group/bt_top.gif" width="50" height="18" border="0"></a></td>
        </tr>
        <tr>
          <td>&nbsp;</td>
        </tr>
      </table>
    </td>
    <td bgcolor="#66cc00" width="1"></td>
  </tr>
</table>
<!-- #include file="end.asp" -->

⌨️ 快捷键说明

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