📄 oa_addnews.asp
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="../config.asp"-->
<!--#include file="checklogin.asp"-->
<%
if ChkAdmin("sys_notice")=False then
call message("您没有发布系统公告的权限","back")
call endexit()
end if
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
<link href="../oaadmin/img/css1.css" type=text/css rel=stylesheet>
<style type="text/css">
<!--
body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
}
.style1 {
color: #FFFFFF;
font-weight: bold;
}
-->
</style>
</head>
<%
id=replace(request.QueryString("id"),"'","")
act=request.QueryString("act")
addtime=trim(request.Form("addtime"))
title=replace(trim(request.Form("title")),"'","")
content=replace(trim(request.Form("content")),"'","")
content=HTMLEncode(content)
insql="insert into systemnotice(title,content,addtime) "& _
"values('"&title&"','"&content&"','"&addtime&"')"
upsql="update systemnotice set title='"&title&"',content='"&content&"',addtime='"&addtime&"' where id="&request.Form("ids")
if act="add" then
if title="" then
call Message("请选输入标题","back")
call endexit()
end if
conn.execute(insql)
call Message("发布成功","sys_notice.asp")
elseif act="edit" then
if title="" then
call Message("请选输入标题","back")
call endexit()
end if
conn.execute(upsql)
call Message("修改成功","sys_notice.asp")
end if
%>
<body>
<%
if act="" then
%>
<table width="99%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#F2F2F2" class="tabel1">
<form name="form1" method="post" action="oa_addnews.asp?act=add">
<tr align="center">
<td height="25" colspan="2" bgcolor="#CC0000"><span class="style1">发布系统公告</span></td>
</tr>
<tr bgcolor="#F9F9F9">
<td width="13%" height="25" align="center">时 间</td>
<td width="87%" height="25" align="left"><input name="addtime" type="text" class="tabel1" id="addtime" value="<%=date()%>" readonly="true"></td>
</tr>
<tr bgcolor="#F9F9F9">
<td height="25" align="center"> 标 题</td>
<td height="25" align="left"><input name="title" type="text" class="tabel1" id="title" size="70">
*</td>
</tr>
<tr bgcolor="#F9F9F9">
<td height="25" align="center"> 内 容</td>
<td height="25" align="left"><textarea name="content" cols="90" rows="20" class="tabel1" id="content"></textarea></td>
</tr>
<tr bgcolor="#F9F9F9">
<td height="25" colspan="2" align="center"><input name="Submit2" type="submit" class="bon" value="提交">
<input name="Submit3" type="reset" class="bon" value="重置">
<span class="style1"><font style="font-size:15px ">
<input name="Submit" type="button" class="bon" value="返回上页" onClick="window.history.go(-1)">
</font></span></td>
</tr></form>
</table>
<%
elseif act="edits" then
if ChkAdmin("sys_notice")=False then
call message("您没有管理系统公告的权限","back")
call endexit()
end if
sqle="select * from systemnotice where id="&id
set rs=conn.execute(sqle)
if not rs.eof then
addtime1=rs("addtime")
title1=trim(rs("title"))
content1=trim(rs("content"))
content1=fHTMLEncode(content1)
end if
rs.close
set rs=nothing
%>
<table width="99%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#F2F2F2" class="tabel1">
<form name="form1" method="post" action="oa_addnews.asp?act=edit">
<tr align="center">
<td height="25" colspan="2" bgcolor="#CC0000"><span class="style1">修改大记事</span></td>
</tr>
<tr bgcolor="#F9F9F9">
<td width="13%" height="25" align="center">时 间</td>
<td width="87%" height="25" align="left"><input name="addtime" type="text" class="tabel1" id="addtime" value="<%=addtime1%>" readonly="true"></td>
</tr>
<tr bgcolor="#F9F9F9">
<td height="25" align="center"> 标 题</td>
<td height="25" align="left"><input name="title" type="text" class="tabel1" id="title" size="70" value="<%=title1%>">
*</td>
</tr>
<tr bgcolor="#F9F9F9">
<td height="25" align="center"> 内 容</td>
<td height="25" align="left"><textarea name="content" cols="90" rows="20" class="tabel1" id="content"><%=content1%></textarea></td>
</tr>
<tr bgcolor="#F9F9F9">
<td height="25" colspan="2" align="center"><input name="Submit2" type="submit" class="bon" value="提交">
<input name="Submit3" type="reset" class="bon" value="重置">
<span class="style1"><font style="font-size:15px ">
<input name="Submit" type="button" class="bon" value="返回上页" onClick="window.history.go(-1)">
<input name="ids" type="hidden" id="ids" value="<%=id%>">
</font></span></td>
</tr></form>
</table>
<%
end if
set conn=nothing
%>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -