bulletin_update.asp

来自「系统结合实际需求」· ASP 代码 · 共 37 行

ASP
37
字号
<%@  Language = "VBScript"  %>
<!-- #Include file="..\include\adovbs.inc" -->
<!-- #Include file="..\include\cod_ado.inc" -->
<%
	id = Request.Form("id")
	strTitle  = Request.Form("title")
	strTitle  = replace(strTitle,"'","''")
	strTitle = server.HTMLEncode(strTitle)
	
	strflag_attention = Request.Form("flag_attention")
	if strflag_attention = "on" then
		flag_attention = 1
	else
		flag_attention = 0
	end if
	
	strDetail = Request.Form("detail")
	strDetail = replace(strDetail,"'","''")
		
	'strDetail = server.HTMLEncode(strDetail)
	'strDetail = replace(strDetail,chr(13),"<br>")
	'strDetail = replace(strDetail," ","&nbsp;")
	
	strDetail = replace(strDetail,"<","&lt;")
	strDetail = replace(strDetail,">","&gt;")
	
	set conn = server.CreateObject("adodb.connection")
	conn.Open Application("dsn")
	strSQL = "update board set title = '" & strTitle & "',flag_attention = " & flag_attention &", detail = '" & strDetail & "' where id="&id
    conn.Execute(strSQL)  
	
	conn.Close
	set conn = nothing
	
	response.redirect "bulletin.asp"		
%> 

⌨️ 快捷键说明

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