📄 admin_annmod.asp
字号:
<%
Option Explicit
Response.buffer=true
const purviewlevel=3
%>
<!--#include file="admin_PurviewChe.asp" -->
<!--#include file="conn.asp" -->
<!--#include file="../inf/ubbcode.asp" -->
<!--#include file="admin_Function.asp" -->
<%
dim content,author,addtime,isnew,annmod,announceid,rs,rsann,SuccessMsg
announceid=trim(request("announceid"))
if announceid="" then
response.redirect("admin_AnnMan.asp")
call closeconn()
end if
content=trim(request.form("content"))
content=ubbcode(content)
author=trim(request.form("author"))
addtime=trim(request.form("addtime"))
isnew=trim(request.form("isnew"))
annmod=trim(request.form("annmod"))
if annmod="mod" then
set rs=server.createobject("ADODB.Recordset")
rs.open"select * from announce where announceid="&announceid&"",conn,1,3
rs("content")=dvHtmlEncode(content)
rs("author")=author
rs("addtime")=addtime
if isnew="yes" then
rs("isnew")=true
else
rs("isnew")=false
end if
rs.update
rs.close
set rs=nothing
call closeconn()
successmsg=successmsg + "<br><br><li>公告修改成功!</li>"
successmsg=successmsg +"<br><br><li>你可以:[<a href='admin_AnnMan.asp'>返回公告管理面板</a>]</li>"
call ShowSuccessMsg()
end if
set rsann=conn.execute("select * from announce where announceid="&announceid&"")
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>修改公告</title>
<link href="Style.css" rel="stylesheet" type="text/css">
<script language=javascript>
function checkform()
{
if(document.form1.content.value=="")
{
alert("公告内容不能为空!");
return false;
}
if(document.form1.author.value=="")
{
alert("作者不能为空!");
return false;
}
if(document.form1.addtime.value=="")
{
alert("时间不能为空!");
return false;
}
}
</script>
</head>
<body>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="center" class="txt1">公告修改面板</td>
</tr>
<tr>
<td align="center" class="txt05">[<a href="admin_AnnMan.asp">返回公告管理面板</a>]</td>
</tr>
<tr>
<td><form name="form1" method="post" action="" onsubmit="return checkform();">
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="4">
<tr>
<td width="34%" align="right" class="txt05"><p>公告内容:</p>
<p>(内容直接在滚动面板中显示,字数要简炼)</p></td>
<td width="66%"><textarea name="content" cols="50" rows="6" class="but" id="content"><%=rsann("content")%></textarea></td>
</tr>
<tr align="center">
<td colspan="2" class="txt05">作者:
<input name="author" type="text" class="but" id="author" value="<%=rsann("author")%>" maxlength="30">
发表时间
<input name="addtime" type="text" class="but" id="addtime" value="<%=rsann("addtime")%>" maxlength="30">
是否为最新广告:
<%if rsann("isnew")=true then%><input name="isnew" type="checkbox" id="isnew2" value="yes" checked><%else%><input name="isnew" type="checkbox" id="isnew2" value="yes" ><%end if%></td>
</tr>
<tr align="center">
<td colspan="2"><input name="Submit" type="submit" class="but" value="修改">
<input name="annmod" type="hidden" id="annmod" value="mod"></td>
</tr>
</table>
</form></td>
</tr>
<tr>
<td> </td>
</tr>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -