📄 show.asp
字号:
<!--#include file="conn.asp" -->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>新闻</title>
<%
dim bhx
bhx="1"
if (request("bh")<>"")then
bhx=request("bh")
end if
%>
<%
exec="select * from news where bh="+ bhx
set rs=server.createobject("adodb.recordset")
rs.open exec,conn,1,1
%>
<%
sql="select * from gbook where bh="+ bhx
set rs2=server.createobject("adodb.recordset")
rs2.open sql,conn,1,1
%>
<style type="text/css">
<!--
body {
background-image: url(image/main_bg.gif);
}
#Layer1 {
position:absolute;
width:355px;
height:119px;
z-index:1;
left: 426px;
top: 44px;
background-color: #FFFFFF;
}
.STYLE1 {
color: #0099CC;
font-size: 10px;
font-family: Arial, Helvetica, sans-serif;
}
.STYLE2 {color: #000000; font-size: 12px; font-family: Arial, Helvetica, sans-serif; }
-->
</style></head>
<body>
<div id="Layer1">
<table width="354" border="0">
<tr>
<td><%while not rs.eof%>
<%response.Write(""&rs("title"))%>
</td>
</tr>
<tr>
<td><span class="STYLE1">发布时间:
<%response.Write(""&rs("time"))%>
所属分类:</span>
<%response.Write(""&rs("bigclassname"))%> </td>
</tr>
<tr>
<td class="STYLE2"><%response.Write("")&rs("content")
rs.movenext
wend
%> </td>
</tr>
<tr>
<td><table width="373" border="0">
<tr>
<td class="STYLE1"> 评论:<br><%
set rs1=server.CreateObject("adodb.recordset")
rs1.open "select * from gbook where id="&bhx,conn,1,1
if rs1.eof and rs1.bof then
response.write("暂时还没有评论!")
else do while not rs1.eof
response.Write("["&rs1("name")&"] 评论说:"&rs1("title")&"<br>")%>
<%response.write("<br> "&rs1("content")&"<br><br>")
rs1.movenext
loop
end if
rs1.close
set rs1=nothing
%></td>
</tr>
</table> </td>
</tr>
<tr>
<td><form name="form1" method="post" action="gbook.asp">
<table width="347" border="0">
<tr>
<td class="STYLE1"><span class="STYLE1">name:</span>
<input name="name" type="text" class="STYLE1" id="name" value="匿名"> <label>
<input name="newsid" type="text" class="STYLE1" id="newsid" value="<%response.write(""&bhx)%>" size="2">
</label></td>
</tr>
<tr>
<td class="STYLE1">title:
<label>
<input name="title" type="text" class="STYLE1" id="title">
e-mail:
<input name="e-mail" type="text" class="STYLE1" id="e-mail">
</label></td>
</tr>
<tr>
<td class="STYLE1"><p>content:</p>
<p>
<textarea name="content" cols="50" rows="5" id="content"></textarea>
</p>
<p align="center">
<input name="Submit" type="submit" class="STYLE1" value="提交">
<input name="Submit2" type="reset" class="STYLE1" value="重置">
</p>
<p align="center">coperight shangdu tdworks 2007 </p></td>
</tr>
</table>
</form>
</td>
</tr>
</table>
</div>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -