📄 admin_affiche_add.asp
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<%Option Explicit%>
<%
if request.cookies("admin_OK")="" then
response.redirect("admin_login.html")
end if
%>
<!-- 后台公告管理 添加公告 -->
<!-- #include file="../config/db.asp" -->
<!-- #include file="../config/function.inc.asp" -->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>公告管理-添加公告</title>
<link href="../config/global.css" rel="stylesheet" type="text/css">
</head>
<body>
<%
dim db,sql,rst,myErrors
db=0
set rst=server.createobject("adodb.recordset")
'添加公告
if request.querystring("act")="add" then
sql="shop_affiche"
rst.open sql,conn,1,3
rst.addnew
rst("a_title")=request.form("f_title")
rst("a_content")=request.form("f_content")
rst.update
rst.close
set rst=nothing
set myErrors=conn.errors
if myErrors.count=0 then
msgboxU("添加公告<"&request.form("f_title")&">成功")
'-----------返回到公告管理页面-----------
response.Redirect("admin_affiche.asp")
else
msgboxU("添加失败!原因:"&myErrors.item(0).description)
end if
end if
%>
<form id="form" name="form" method="post" action="admin_affiche_add.asp?act=add">
<table width="827" height="356" border="1" cellpadding="0" cellspacing="0">
<tr>
<td height="42" colspan="2">公告管理-->添加公告</td>
</tr>
<tr>
<td width="78" height="36">公告标题:</td>
<td width="658"><input name="f_title" type="text" id="f_title" size="80" maxlength="127" /></td>
</tr>
<tr>
<td height="237">公告内容:</td>
<td><textarea name="f_content" cols="90" rows="25" id="f_content"></textarea></td>
</tr>
<tr>
<td colspan="2"><div align="center">
<input type="submit" name="Submit" value="提交公告" />
<input type="submit" name="Submit2" value="提交" />
</div></td>
</tr>
</table>
<%
conn.close
set conn=nothing
%>
</form>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -