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

📄 notice.asp

📁 本系统无论是现在还是将来的升级的版本均免费。学生综合测评分也叫综合分或者纪律分
💻 ASP
字号:
<!--#include file="conn.asp"-->
<% if not (Session("rank")=4 and not session("admin")="")  then 
 response.Redirect("index.asp")
 Response.End()
 end if%>
<%
set rs=server.createobject("adodb.recordset")
sql="select * from notice"
rs.open sql,dbconn,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"><form action="notice.asp?action=save" method="post" name="form" id="form" onsubmit=return(CheckInput())>
  <p>&nbsp;</p>
  <p>&nbsp;</p>
  <p>&nbsp;</p>
  <p>&nbsp;</p>
  <table width="530" bgcolor="#FFFFFF" class="atable1">
<tr>
<td>

  <table class=tdmenu width="520" 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">&nbsp;</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>
        字数&lt;200</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>
  
  </td>
  </tr>
  </table></form>
</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
dbconn.close
%>

⌨️ 快捷键说明

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