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

📄 notice.asp

📁 上海数字留言簿系统2.1版 软件语言: 简体中文 授权方式: 免费版 文件大小: 211K 系统平台: ASP+ACCESS 整理日期: 2007-8-21 系统简介: 上海数
💻 ASP
字号:
<!--#include file="top.asp"-->
<%
 if session("admin")<>"smallstick" then
response.Write "<script language='javascript'>alert('网络超时或您还没有登陆!');window.location.href='login.asp';</script>"
response.End
 end if
 %>
<%
set rs=server.createobject("adodb.recordset")
sql="select * from notice"
rs.open sql,db,1,3
if request("action")<>"save" then
%>
<link href="style.css" rel="stylesheet" type="text/css">
<SCRIPT language=JavaScript>

function CheckInput(){

	if(form.notice.value==''){
		alert("公告内容不能为空!");
		form.notice.focus();
		return false;
	}
	if(form.notice.value.length>200){
		alert("公告内容不能超过200个字符!");
		form.notice.focus();
		return false;
	}
	
	return true;
}
</SCRIPT>
<body>
<div align="center">
<table bgcolor="#FFFFFF" width="760">
<tr>
<td>
<form action="notice.asp?action=save" method="post" name="form" id="form" onsubmit=return(CheckInput())>
  <table class=log_td_table width="490" border="0" align="center" cellpadding="0">
    <tr> 
      <td colspan="2" align="center"> <table width="100%" border="0" class=log_titlewidth="100%">
          <tr> 
            <td width="65%" align="right"><strong>发 布 公 告</strong></td>
            <td align="right">[<a href="index.asp">返回首页</a>]</td>
          </tr>
        </table></td>
    </tr>
    <tr> 
      <td width="75" align="right" valign="middle">公告内容:</td>
      <td> <textarea name="notice" cols="40" rows="8" class="1" id="notice" ><%=rs("notice")%></textarea> 
      </td>
    </tr>
    <tr> 
      <td height="30" colspan="2" align="center"> &nbsp;&nbsp;<input type="submit" class=log value="发布公告" name="button">
        &nbsp;&nbsp;&nbsp; 
        <input name="Submit2" type="reset" class=log id="Submit2" value="清除重写"> 
      </td>
    </tr>
  </table>
  </form>
  </td>
  </tr>
  </table>
</div>

<%
else
if request.form("notice")="" then
response.write"<SCRIPT language=JavaScript>alert('公告内容不能为空!');"
response.write"javascript:history.go(-1)</SCRIPT>"
else
if rs.eof and rs.bof then
rs.addnew
rs("notice")=request.form("notice")
else
rs("notice")=request.form("notice")
end if
rs.update
rs.close
set rs=nothing
response.redirect "index.asp"
end if
end if

%><!--#include file="copyright.asp"-->

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -