?? add_affiche.asp
字號:
<!--#include file="conn.asp"-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title><%=urlname%> - 發布公告</title>
</head>
<body>
<!--#include file="top.asp"-->
<%
select case request("act")
case "new"
call update()
case else
call main()
end select
sub main()
if not session(Variable&Names)=Variable then
errinfo="您沒有登陸或已經退出登陸"
error(errinfo)
exit sub
else
%>
<table width="80%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="4%"><img src="images/skin/t-tl.gif" width="31" height="29"></td>
<td width="91%" background="images/skin/t-tc.gif"> </td>
<td width="5%"><img src="images/skin/t-tr.gif" width="35" height="29"></td>
</tr>
<tr>
<td background="images/skin/t-lt.gif"> </td>
<td>
<SCRIPT language=JavaScript src="topic.js"></SCRIPT>
<form action="?act=new" method="post" name="topic">
<table width="650"border="1" align="center" cellspacing="0" cellpadding="3" bgcolor="#FFFFFF" bordercolor="#f0f0f0" style="border-collapse: collapse">
<tr>
<td width="96" align="center"><span style=" table-layout:fixed;word-break:break-all">公告標題</span></td>
<td width="536"><input name="title" size="27" maxlength="20"></td>
</tr>
<tr>
<td align="center">UBB</td>
<td><% call ubb %></td>
</tr>
<tr>
<td width="96" rowspan="2" align="center">公告內容</td>
<td width="536"><%
dim ii
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('[pic"&ii&"]')"" style=""CURSOR: hand""> "
if i=14 or i=28 then response.write "<br>"
next
%></td>
</tr>
<tr>
<td><textarea class="smallarea" cols="60" wrap="VIRTUAL" name="content" rows="12"></textarea></td>
</tr>
<tr>
<td></td>
<td><input name="submit" type="submit" value="確 定">
<input name="submit2" type="reset" value="重 置"></td>
</tr>
</table>
</form>
</td>
<td background="images/skin/t-rt.gif"> </td>
</tr>
<tr>
<td><img src="images/skin/t-bl.gif" width="31" height="32"></td>
<td background="images/skin/t-bc.gif"></td>
<td><img src="images/skin/t-br.gif" width="35" height="32"></td>
</tr>
</table>
<%
end if
end sub
sub update()
If Not ChkPost Then
errinfo="對不起,請不要從外部提交數據"
error(errinfo)
exit sub
End If
dim title,usercontent
title=request.form("title")
usercontent=request.form("content")
if title="" then
errinfo="『公告標題』沒有填寫"
error(errinfo)
exit sub
end if
if usercontent="" then
errinfo="『公告內容』沒有填寫"
error(errinfo)
exit sub
end if
Set rs= Server.CreateObject("ADODB.Recordset")
sql="select * from bulletin"
rs.open sql,conn,1,3
rs.addnew
rs("time")=now()
rs("title")=title
rs("usercontent")=usercontent
rs.update
rs.close
sucinfo="公告提交成功"
suc(sucinfo)
end sub %>
<!--#include file="bottom.asp"-->
</body>
</html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -