?? showannounce.asp
字號:
<%@ LANGUAGE="VBSCRIPT" %>
<% option explicit%>
<!--#include file="newconn.asp"-->
<!-- #include file="inc/char.inc" -->
<%
dim AnnounceID
dim RootID
dim BoardID
BoardID=Request("boardID")
AnnounceID=Cstr(Request("ID"))
RootID=request("RootID")
dim rs
dim sql
set rs=server.createobject("adodb.recordset")
dim rsBoard
dim boardname
dim boardsql
set rsBoard=server.createobject("adodb.recordset")
boardsql="select board.boardname,board.boardtype from board where boardID="&BoardID
rsboard.open boardsql,conn,1,1
boardname=rsboard("boardname")
session("boardtype")=rsboard("boardtype")
rsboard.close
sql="update bbs1 set hits=hits+1 where announceID="&AnnounceID
rs.open sql,conn,3,3
sql="select * from bbs1 where AnnounceID="&AnnounceID
rs.open sql,conn,1,1
%>
<html>
<head>
<meta NAME="GENERATOR" Content="Microsoft FrontPage 3.0">
<title>顯示貼子</title>
<link rel="stylesheet" type="text/css" href="forum.css">
</head>
<body>
<%
if err.number<>0 then
response.write "數據庫操作失?。?quot;&err.description
else
if rs.eof and rs.bof then
response.write "<center><P>該貼子的內容找不到</P></center>"
else
dim UserName
dim useremail
dim Topic
dim body
dim dateTimeStr
dim layer
dim orders
dim parentid
dim ip
dim FoundError
dim ErrMsg
username=rs("username")
useremail=rs("useremail")
topic=rs("topic")
body=rs("body")
dateTimeStr=rs("dateAndTime")
layer=rs("layer")
orders=rs("orders")
parentid=rs("parentid")
ip=rs("ip")
response.write "<p align='center'><font color=darkblue><strong>"
if pwsonchsys then
showBody Topic
else
response.write Server.HTMLEncode(Topic)
end if
response.write "</strong></font></p> "+chr(13)+chr(10)
response.write "<hr size='1'>"+chr(13)+chr(10)
if Trim(UserEmail)<>"" then
response.write "<p> <a href='mailto:"+Server.HTMLEncode(UserEmail)+"'>"
if pwsonchsys then
showBody UserName
else
response.write Server.HTMLEncode(UserName)
end if
response.write "</a> "
response.write " 于 "+DateTimeStr+" 發表在:<font color=darkblue><strong>"+session("boardtype")+"</strong></font></p><p>"+chr(13)+chr(10)
else
response.write "<p> "
if pwsonchsys then
showBody UserName
else
response.write Server.HTMLEncode(UserName)
end if
response.write " 于 "+DateTimeStr+" 發表在:<font color=darkblue><strong>"+session("boardtype")+"</strong></font></p><p>"+chr(13)+chr(10)
end if
showbody(body)
%>
<hr size="1">
<p><font color="darkblue"><strong>回復:</strong></font></p>
<form action="SaveReAnnounce.asp?boardID=<%=request("boardid")%>" method="POST"
name="frmAnnounce">
<input type="hidden" name="followup" value="<%=rs("AnnounceID")%>"><input type="hidden"
name="rootID" value="<%=RootID%>"><div align="center"><center><table border="1"
width="530" bgcolor="#F7FBFF" bordercolorlight="#2F97FF" cellspacing="0"
bordercolordark="#F0F8FF">
<tr>
<td width="100%" bgcolor="#FAD185"><div align="center"><center><p><font color="#FFFFFF"><fontcolor="#0000A0"><strong>我
要 發 言</strong></font></td>
</tr>
<tr align="center">
<td width="100%"><table border="0" width="100%" cellspacing="1">
<tr>
<td width="14%" align="right">版 面:</td>
<td width="86%" colspan="2"><font color="darkblue"><strong><%=session("boardtype")%></strong></font> <font
color="red"><strong>*</strong></font>為必填項目 第一次發言自動注冊</td>
</tr>
<tr>
<td width="14%" align="right">姓 名:</td>
<td width="86%" colspan="2"><input class="smallInput" name="username" size="16"
maxlength="50" value="<%=request.cookies("userinfo")("UserName")%>"><font color="red"><strong>*</strong></font>
密 碼:<input class="smallInput" name="passwd" size="10" maxlength="10"
type="password"><font color="red"><strong>*</strong></font></td>
</tr>
<tr>
<td width="14%" align="right">Email:</td>
<td width="86%" colspan="2"><input class="smallInput" name="email" size="42"
maxlength="40" value="<%=request.cookies("userinfo")("Useremail")%>"></td>
</tr>
<tr>
<td width="14%" align="right">主 題:</td>
<td width="86%" colspan="2"><% if not(instr(rs("Topic"),"回復:")>0) then%>
<p><input class="smallInput" name="subject" size="65"
value="回復: <%=htmlencode2(rs("Topic"))%>" maxlength="255"> <%else%><input class="smallInput"
name="subject" size="65" value="<%display rs("Topic")%>" maxlength="255"> <%end if%><font
color="red"><strong>*</strong></font> </td>
</tr>
<tr>
<td width="14%" align="right" valign="top"><span class="smallFont">表 情:</span></td>
<td width="86%" colspan="2"><input type="radio" value="smiley" name="Expression" checked><img
src="IMAGES/smiley.gif" width="15" height="15"> <input type="radio" name="Expression"
value="sad"><img src="IMAGES/sad.gif" width="16" height="16"> <input type="radio"
name="Expression" value="angry"><img src="IMAGES/angry.gif" width="15" height="15"> <input
type="radio" name="Expression" value="13"><img src="IMAGES/13.gif" width="15" height="15"> <input
type="radio" name="Expression" value="14"><img src="IMAGES/14.gif" width="15" height="15">
<input type="radio" name="Expression" value="15"><img src="IMAGES/15.gif" width="15"
height="15"> <input type="radio" name="Expression" value="16"><img src="IMAGES/16.gif"
width="15" height="15"> <br>
<input type="radio" value="18" name="Expression"><img src="IMAGES/18.gif" width="15"
height="15"> <input type="radio" name="Expression" value="17"><img src="IMAGES/17.gif"
width="15" height="15"> <input type="radio" name="Expression" value="19"><img
src="IMAGES/19.gif" width="15" height="15"> <input type="radio" name="Expression"
value="20"><img src="IMAGES/20.gif" width="15" height="15"> <input type="radio"
name="Expression" value="21"><img src="IMAGES/21.gif" width="15" height="15"> <input
type="radio" name="Expression" value="22"><img src="IMAGES/22.gif" width="15" height="15">
<input type="radio" name="Expression" value="23"><img src="IMAGES/23.gif" width="15"
height="15"> </td>
</tr>
<tr>
<td width="14%" align="right"><span class="smallFont">內 容:</span></td>
<td width="43%"><span class="smallFont">(最多<%=ANNOUNCE_MAXBYTE\1024%>KB)</span></td>
<td width="43%"><div align="center"><center><p><input class="buttonface" type="submit"
value=" 發 送 "> <input class="buttonface" type="reset" value=" 重 填 "> </td>
</tr>
<tr align="center">
<td width="14%"><span class="smallFont"></span></td>
<td width="86%" colspan="2"><div align="left"><p><textarea class="smallarea" cols="65"
name="body" rows="10"></textarea></td>
</tr>
<tr align="center">
<td width="14%" height="15"><span class="smallFont"></span></td>
<td width="86%" colspan="2"></td>
</tr>
</table>
</td>
</tr>
</table>
</center></div>
</form>
<%
end if
end if
rs.close
%>
</body>
</html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -