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

📄 edit_notice.asp

📁 这是一个非常好的留言版程序
💻 ASP
字号:
<!--#include file="char.asp"--> 
<!--#include file="conn.asp"-->
<%
	dim sql
	dim rs
	dim id,ok,biaoti,neirong
    id=request("id")
function HTMLEncode(fString)
if not isnull(fString) then
    fString = replace(fString, ">", "&gt;")
    fString = replace(fString, "<", "&lt;")
    fString = Replace(fString, CHR(32), "&nbsp;")
    fString = Replace(fString, CHR(9), "&nbsp;")
    fString = Replace(fString, CHR(34), "&quot;")
    fString = Replace(fString, CHR(39), "&#39;")
    fString = Replace(fString, CHR(13), "")
    fString = Replace(fString, CHR(10) & CHR(10), "</P><P> ")
    fString = Replace(fString, CHR(10), "<BR> ")
    'fString=ChkBadWords(fString)
    HTMLEncode = fString
end if
end function
	set rs=server.createobject("adodb.recordset")
	sql="select * from [notice] where id="&cstr(id)
	rs.open sql,conn,1,3
    if request("ok")=1 then
    rs("biaoti")=request("biaoti")
    rs("neirong")=request("neirong")
    rs("data")=now()
    rs.update
    response.write "<script language=JavaScript>" & chr(13) & "alert('修改成功!');" & "window.location='admin_notice.asp'" & "</script>"
    response.end
    else
%>
<title>增加公告</title>
<style type="text/css">
<!--
body {
	background-color: #dadae9;
}
.style1 {
	color: #FFFFFF;
	font-weight: bold;
}
-->
</style><table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%">
  <tr>
    <td width="78%">
  <div align="center">
    <center>
  <table width="100%" height="404" border="1" cellpadding="0" cellspacing="0" bordercolor="#ADAED6" style="border-collapse: collapse">
    <FORM name=theForm method=POST action=edit_notice.ASP?ok=1&id=<%=request("id")%>>
    <tr bgcolor="#BDBEDE">
                      <td width="517" height="28" colspan="2" style="border-style: solid; border-width: 1">
                      <p class="style1" style="MARGIN-LEFT: 6px">
                <span style="font-size: 9pt"><font size="3"><font size="2">&nbsp;</font></font>修改首页公告</span></td>
              </tr>
    <tr>
                      <td bgColor="#f7f7f7" height="43" width="90" style="border-left-style: solid; border-left-width: 1; border-right-style: none; border-right-width: medium; border-top-style: solid; border-top-width: 1" align="center">
                      <span style="FONT-SIZE: 12px">
                      标题:</span></td>
                      <td bgColor="#f7f7f7" height="43" width="492" style="border-left-style: none; border-left-width: medium; border-right-style: solid; border-right-width: 1; border-top-style: solid; border-top-width: 1">
                      <p align="left">
                      <span style="FONT-SIZE: 12px">
                      <input name="biaoti" style="BACKGROUND-COLOR: #f9f9f9; COLOR: #384249; FONT-FAMILY: Verdana; FONT-SIZE: 11px; FONT-WEIGHT: bold" tabIndex="1" value="<%=HTMLEncode(rs("biaoti"))%>" size="70" maxlength="50">
                      </span></td>
              </tr>
    <tr>
                      <td bgColor="#f7f7f7" height="299" width="90" style="border-left-style: solid; border-left-width: 1; border-right-style: none; border-right-width: medium" align="center">
                      <span style="FONT-SIZE: 12px">
                      内容:</span></td>
                      <td bgColor="#f7f7f7" height="350" style="border-left-style: none; border-left-width: medium; border-right-style: solid; border-right-width: 1">
                      <p align="left">
                      <span style="FONT-SIZE: 12px">
                      <textarea rows="21" name="neirong" cols="64"><%=rs("neirong")%></textarea></span></td>
              </tr>
    <tr valign="middle" bgcolor="#eeeeee">
                <td height="35" style="border-left-style: solid; border-left-width: 1; border-right-style: solid; border-right-width: 1; border-bottom-style: solid; border-bottom-width: 1" colspan="2"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
                  <tr>
                    <td><div align="center">
                      <input type="submit" value="确认修改" name="B1">
                    </div></td>
                    <td><div align="center">
                      <input type="reset" value="取消修改" name="B1">
                    </div></td>
                  </tr>
                </table></td>
              </tr>
			  <%
    end if
	rs.close
	conn.close
	set rs=nothing
	set conn=nothing
%>
</form>
  </table>
    </center>
  </div>
    </td>
  </tr>
</table>

⌨️ 快捷键说明

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