📄 read_notice.asp
字号:
<%
sub read_notice()
sql_user="select userid from user where user='"&request("user")&"'"
set rs_user=server.createobject("adodb.recordset")
rs_user.open sql_user,conn,3,2
if not rs_user.bof and not rs_user.eof then
userid=rs_user("userid")
end if
if request("user")=admin then
userid=0
end if
if userid<>"" then
sql_notice="select * from notice where userid="&userid&" order by id desc"
set rs_notice=server.createobject("adodb.recordset")
rs_notice.open sql_notice,conn,3,2
if rs_notice.bof and rs_notice.eof then
response.write("<meta HTTP-EQUIV='REFRESH' CONTENT='0;URL=?action=write_notice&user="&user&"'")
else
%>
<%
i=1
while not rs_notice.eof and i<=rs_notice.pagesize
%>
<%tablefirst()%>
<table width="100%" border="0" cellspacing="0" cellpadding="0" height="136" align="center">
<tr>
<td bgcolor=<%=LTablebgColor%> align="center"> <br>
</td>
<td valign=top bgcolor=<%=InBorderColor%> rowspan="2" width=1><img
src="image/spacer.gif"
width=1> </td>
<td width="410">
<table cellspacing=0 cellpadding=1 width="400%" align=center border=0>
<tbody>
<tr>
<td>
<table bordercolor=#111111
cellspacing=0 cellpadding=0
border=0 class=link width="423" style="TABLE-LAYOUT: fixed">
<tr>
<td valign=center height="20" style="LEFT: 0px; WIDTH: 76%; WORD-WRAP: break-word">
<%
name_html=HTMLEnCode(rs_notice("name"))
response.write hightlight(name_html)
%>
发布于: <%=hightlight(rs_notice("writetime"))%></td>
<td align="right" height="20" style="LEFT: 0px; WIDTH: 24%; WORD-WRAP: break-word">
<font color="<%=InBorderColor%>">|</font> 第 <%=rs_notice.recordcount-i+1%>
条公告</td>
<tr valign="top">
<td colspan="2" height="10"><img height=1
src="css/<%=css_name%>/<%=MainBorderGraphic%>" width="100%"></td>
</table>
<table bordercolor=#111111
cellspacing=0 cellpadding=0
border=0 class=link width="423" style="TABLE-LAYOUT: fixed">
<tr>
<td valign=center style="LEFT: 0px; WIDTH: 76%; WORD-WRAP: break-word">
标题: <b>
<%
name_html=HTMLEnCode(rs_notice("title"))
response.write hightlight(name_html)
%>
</b> </td>
<tr valign="top">
<td height="10"><img height=1
src="css/<%=css_name%>/<%=MainBorderGraphic%>" width="100%"></td>
</table>
<table width="423" border="0" cellspacing="0" cellpadding="3" bordercolorlight="#333333" bordercolordark="#FFFFFF" style="TABLE-LAYOUT: fixed" class=link height="100">
<tr>
<td colspan="2" class=link style="LEFT: 0px; WIDTH: 100%; WORD-WRAP: break-word">
<%
memo = htmlEncode(rs_notice("message"))
if ubb=1 then
memo=ubbcode(memo)
end if
memo = Replace(memo, "<br>", "<br>")
memo = Replace(memo, chr(10), "<br>")
memo = Replace(memo, vbCrLf, "<br>")
Response.Write hightlight(memo)
response.write Request.servervariables("document_name")
%>
</td>
</tr>
</table>
<table style="BORDER-COLLAPSE: collapse;TABLE-LAYOUT: fixed" bordercolor=#111111
cellspacing=0 cellpadding=0 width="423"
border=0 class=link>
<tr>
<td valign=bottom height="10"><img height=1
src="css/<%=css_name%>/<%=MainBorderGraphic%>"
width="100%"></td>
<tr>
<td valign=bottom height="20" style="LEFT: 0px; WIDTH: 100%; WORD-WRAP: break-word">
<%if session("user")<>"" then%>
<img src="image/post.gif" width="16" height="16" border="0" align="absmiddle"><a href="?action=write_notice&user=<%=user%>">发布</a>
<img src="image/edit.gif" width="16" height="15" align="absmiddle" border="0"><a href="?action=edit_notice&user=<%=user%>¬iceid=<%=rs_notice("id")%>">编辑</a>
<img src="image/del.gif" width="15" height="15" align="absmiddle" border="0"><a href="?action=delete_notice&user=<%=user%>¬iceid=<%=rs_notice("id")%>">删除</a>
<%end if%>
<img src="image/logout.gif" width="14" height="12" align="texttop"><a href="?user=<%=user%>">返回</a>
</td>
</table>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td height="1" width="22%" bgcolor="<%=InBorderColor%>" align="center"><img height=1 src="css/<%=css_name%>/<%=LBorderGraphic%>"
width="120" border=0></td>
<td width="410" height="1" bgcolor="<%=InBorderColor%>"></td>
</tr>
</table>
<%tablelast()%>
<%
i=i+1
rs_notice.MoveNext
wend
%>
<%
end if
end if
end sub
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -