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

📄 news.asp

📁 这是一个文章管理的网页源程序
💻 ASP
字号:
<!--#include file="conn.asp"-->
<!--#include file="const.asp"-->
<%      dim flag
        if session("flag")="" then
        session("flag")=0
        end if
		if session("flag")<>"" then
		session("flag")=0
		end if
	dim rs,sql
	dim classid
	dim classname
   	if request("classid")<>"" then
		classid=request("classid")
   	else
		classid=1
   	end if
  	set rs = server.createobject("adodb.recordset")
 	set rs1=server.createobject("adodb.recordset")
  	sql="select * from Aclass where classID="&cstr(classid)
 	rs.open sql,conn,1,1
 	if not rs.eof then
		classname=rs("class")
 	end if
	rs.close
%>
<html>
<head>
<title>无标题文档</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>

<body bgcolor="#FFFFFF">
<table cellspacing=0 cellpadding=0 width="100%" border=0 align=center>
        <tbody> 
        <tr> 
          <td bgcolor="<%=Tablebackcolor%>"> 
            
      <table cellspacing=1 cellpadding=4 width="100%" border=0>
        <tr> 
          <td bgcolor="<%=Tabletitlecolor%>"><b><%=classname%>最新文章</b> </td>
        </tr>
        <tr> 
          <td bgcolor="<%=Tablebodycolor%>"> <font style=line-height:150%> <% 
	sql="select top 10 " 
	sql=sql&"article.articleid,article.title,article.dateandtime,article.hits,article.daifa,article.classid,article.Nclassid,ANclass.Nclass " 
	sql=sql&" from article,ANclass where article.Nclassid=ANclass.Nclassid and article.classid="&classid&" and daifa=1 " 
	sql=sql&" order by article.articleid desc" 
	rs.open sql,conn,1,1 
	if rs.eof and rs.bof then 
%> 没有更新任何文章 <%else%> <%do while not rs.eof%> [<a href='index.asp?classid=<%=rs("classid")%>&Nclassid=<%=rs("Nclassid")%>'><%=rs("Nclass")%></a>] 
            <a href="list.asp?id=<%=rs("articleid")%>"><%=rs("title")%></a> ( 
            <%if rs("dateandtime")=date() then%> <font color=red><%=month(rs("dateandtime"))%>月<%=day(rs("dateandtime"))%>日</font> 
            <%else%> <font color='#999999'><%=month(rs("dateandtime"))%>月<%=day(rs("dateandtime"))%>日</font> 
            <%end if%> 阅读<font color=green><%=rs("hits")%></font>次) <br>
            <% 
	rs.movenext 
	loop 
	end if 
rs.close
set rs=nothing
conn.close
set conn=nothing
%> </font> </td>
        </tr>
        <tr align="right"> 
          <td bgcolor="<%=Tablebodycolor%>"><a href="default.asp?classid=<%=classid%>">【更多文章...】</a></td>
        </tr>
      </table>
          </td>
        </tr>
        </tbody> 
      </table>
      
</body>
</html>

⌨️ 快捷键说明

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