📄 listnews.asp
字号:
<%
dim key,toppath,dbpath
toppath=""
dbpath=""
%>
<!--#include file="db_conn.asp" -->
<!--#include file="my_lib/my_request.asp" -->
<%
id=my_request("id",1)
if id="" or isnull(id) then
response.write"<SCRIPT language=JavaScript>alert('参数错误');"
response.write"javascript:history.go(-1)</SCRIPT>"
end if
id=cint(id)
upsql="update info_list set hitnums=hitnums+1 where id="&id
conn.execute (upsql)
sql="select * from info_list where id="&id
set rs=conn.execute (sql)
title=rs("title")
content=rs("content")
editor=rs("editor")
hitnums=rs("hitnums")
addtime=rs("addtime")
rs.close
set rs=nothing
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="css/main.css" rel="stylesheet" type="text/css">
<title><%=title%></title>
</head>
<body topmargin="1">
<!--#include file="top.asp" -->
<div align="center">
<table border="0" width="760" id="table2" cellspacing="0" cellpadding="0">
<tr>
<td height="25">当前位置:<a href="index.asp">首页</a>>>>新闻中心</td>
</tr>
</table>
<table border="0" width="760" id="table1" cellspacing="1">
<tr>
<td width="753" height="10" align=center colspan="2">
<hr color="#CCCCCC" size="1"></td>
</tr>
<tr>
<td width="561" height="50" align=center><strong>
<span style="font-size: 14px"><%=title%></span></strong></td>
<td width="192" rowspan="5" valign="top">
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td background="images/bg_2.gif" height="20" align=center>相 关 内 容</td>
</tr>
<%
sql="select id,title from info_list order by addtime desc"
set rs=conn.execute (sql)
if rs.eof then
response.write "没有任何信息"
else
do while not rs.eof
set id=rs("id")
set title=rs("title")
%>
<tr>
<td style="line-height: 150%">·<a href=listnews.asp?id=<%=id%>><%=title%></a></td>
</tr>
<%
rs.movenext
loop
rs.close
set rs=nothing
end if%>
</table>
</td>
</tr>
<tr>
<td width="561" height="30"><hr color="#CCCCCC" size="1"></td>
</tr>
<tr>
<td width="561" align=center>加入时间:<%=addtime%> 点击:<font color="#FF0000"><%=hitnums%>次</font> 编辑:<%=editor%></td>
</tr>
<tr>
<td width="561"> <%=content%></td>
</tr>
<tr>
<td width="561" align=right><a href="javascript:window.close()">关闭窗口</a></td>
</tr>
</table>
</div>
<!--#include file="end.asp" -->
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -