盾怪网教程:是一个免费提供流行杀毒软件教程、在线学习分享的学习平台!

动感首页更新完成之8 ------ 首页模板篇

时间:2024/12/28作者:未知来源:盾怪网教程人气:

[摘要]default.asp '下面就是本站首页显示的样本程序:http://asp.on.net.cn/ '适用与本站所有的首页显示程序。 <html> <head&g...

default.asp
'下面就是本站首页显示的样本程序:http://asp.on.net.cn/
'适用与本站所有的首页显示程序。
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>ASP动感在线 http://ASP.on.net.cn</title>
<link rel="stylesheet" type="text/css" href="css/style.css">
</head>
<body bgcolor="#FFFFFF">
<div align="center">
<p>首页模板!最新5条信息!</p>
<table width="60%" cellpadding="0" cellspacing="0" align="center">
<tr>
<td width="60%" valign="top" height="54">
<table width="100%" border="1" cellspacing="0" cellpadding="0" align="center" bordercolorlight="#000000" bordercolordark="#FFFFFF">
<tr>
<td height="5">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td colspan="2" height="8"><%
dim conn
dim connstr

on error resume next
connstr="DBQ="+server.mappath("/new/new.mdb")+";DefaultDir=;DRIVER={Microsoft Access Driver (*.mdb)};"
set conn=server.createobject("ADODB.CONNECTION")
conn.open connstr
dim sql
dim rs
sql="select top 5 * from learning order by articleid desc"
Set rs= conn.execute(sql)

if rs.eof and rs.bof then
response.write "<p align='center'> 还 没 有 任 何 文 章</p>"
else
%><%do while not rs.eof%><font color="#000099">○</font> <a href="<%=rs("url")%>" target="_blank"><%=rs("title")%></a>
<i><font color="#FF0000">(<%=rs("dateandtime")%>)</font></i><br>
<%=rs("content")%><br>
<%
rs.movenext
loop
rs.close
end if

set rs=nothing
conn.close
set conn=nothing
%> </td>
</tr>
<tr>
<td colspan="2">
<div align="right"><a href="new/index.asp">以前公告&gt;&gt;</a></div>
</td>
</tr>
</table>
</td>
</tr>
</table>
<div align="center"> </div>
</td>
</tr>
</table>


</div>
</body>
</html>


作者:阿喔 出处:<ASP动感在线> http://asp.on.net.cn/

(出处:热点网络)

关键词:动感首页更新完成之8 ------ 首页模板篇




Copyright © 2012-2018 盾怪网教程(http://www.dunguai.com) .All Rights Reserved 网站地图 友情链接

免责声明:本站资源均来自互联网收集 如有侵犯到您利益的地方请及时联系管理删除,敬请见谅!

QQ:1006262270   邮箱:kfyvi376850063@126.com   手机版