?? bulletin.asp
字號:
<% Option Explicit %>
<%response.buffer=true%>
<!--#include file="Inc_common.asp"-->
<%
'**************************************
'** Bulletin.asp
'**
'** 文件說明:公告發布頁面
'** 修改日期:2004-11-12
'** 作者:HACKer007
'** Email:panyisi5201314@tom.com
'**************************************
if not session("login")="true" then
errinfo="<li>您未登陸或已經退出登陸,不能進入該頁。"
call error()
end if
dim mainpic
mainpic="page_bulletin.gif"
select case request("act")
case "addnew"
call addnew()
case else
call main()
end select
sub main()
pagename="發布公告"
call pageinfo()
call skin1()
'---------------以下顯示頁面主體--------
%><br>
<script src="ubb.js"></script>
</p>
<form action="?act=addnew" method="POST" name="frmAnnounce">
<table align="center" cellpadding="3" cellspacing="1" class="table1" width="95%" style="border-collapse: collapse table-layoutfixed; word-break: break-all">
<tr>
<td width="20%" class="tablebody3" align="right" height="19">管理QQ</td>
<td width="80%" class="tablebody2" height="19">
<input name="userqq" size="19" maxlength="80"></td>
</tr>
<tr>
<td width="20%" class="tablebody3" align="right" height="19">
<font FACE="宋體" COLOR="red">**</font> <b>公告標題</b></td>
<td width="80%" class="tablebody2" height="19">
<input name="usertitle" size="40" maxlength="100"></td>
</tr>
<tr>
<td width="20%" valign="top" class="tablebody3" align="right" height="160">
<font FACE="宋體" COLOR="red">**</font> <b>公告正文</b></td>
<td width="80%" class="tablebody2" height="160">
<!--#include file="Inc_ubb.asp"-->
<textarea class="smallarea" cols="60" name="usercontent" title="Ctrl+Enter提交" rows="12" onkeydown="ctlent()"></textarea><br>
<br>
點擊表情符號可以將其加入正文(正文內容不能大于300字符)。<br>
<%
dim ii,i
for i=1 to 42
if len(i)=1 then ii="0" & i else ii=i
response.write "<img src=""images/faces/"&ii&".gif"" border=0 onclick=""insertsmilie('[face"&ii&"]')"" style=""CURSOR: hand""> "
if i=17 or i=34 then response.write "<br>"
next
%> </td>
</tr>
<tr>
<td valign="middle" colspan="2" align="center" class="tablebody1" height="21">
<input type="Submit" name="Submit" value="提 交">
<input type="reset" name="Submit2" value="清 除">
<input type="button" name="Preview" value="預覽" onclick="openpreview()">
</td>
</tr>
</table>
</div>
</form>
<form name="preview" action="Preview.asp" method="post" target="preview_page">
<input type="hidden" name="usertitle" value>
<input type="hidden" name="usercontent" value>
</form>
<%
'--------------頁面主體顯示結束--------
call skin2()
end sub
sub addnew()
if not session("login")="true" then
errinfo="<li>您未登陸或已經退出登陸,不能進入該頁。"
call error()
else
dim username,userurl,usermail,userqq,usertitle,usercontent
userqq=filter(Trim(request.form("userqq")))
usertitle=filter(Trim(request.form("usertitle")))
usercontent=filter(Rtrim(request.form("usercontent")))
if usertitle="" then
errinfo=errinfo & "<li>未填寫標題"
elseif len(usertitle)>50 then
errinfo=errinfo & "<li>過長的標題"
end if
if usercontent="" then
errinfo=errinfo & "<li>未填寫留言內容"
end if
if trim(userqq)<>"" then
if not(isnumeric(userqq)) then
errinfo=errinfo & "<li>QQ號碼填寫有誤"
end if
end if
call error()
Set rs= Server.CreateObject("ADODB.Recordset")
sql="select * from topic"
rs.open sql,conn,3,2
rs.addnew
rs("username")=name
rs("xingbie")=0
rs("userurl")=url
rs("usermail")=adminmail
rs("userqq")=userqq
rs("usertime")=now()
rs("usertitle")=usertitle
rs("usercontent")=usercontent
rs("top")="1"
rs("reply")="0"
rs("ip")=ip
rs("checked")=1
rs("whisper")=0
rs.update
rs.close
Response.Redirect "Index.asp"
Response.Flush
end if
end sub
%>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -