⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 add_affiche.asp

📁 我见过的用ASP写的最好的留言簿程序
💻 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">&nbsp;</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">&nbsp;</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"">&nbsp;"
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="确 定">
                    &nbsp;&nbsp;
                    <input name="submit2" type="reset" value="重 置"></td>
                </tr>
              </table>
            </form>
	</td>
    <td background="images/skin/t-rt.gif">&nbsp;</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 + -