gusucode.com > ASP+ACCESS在线教育系统设计(源代码+论文) > ASP+ACCESS在线教育系统设计(源代码+论文)\王智_在线教育系统\teacher\bulletin_update.asp

    <%@  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"		
%>