📄 bulletin_insert.asp
字号:
<%@ Language = "VBScript" %>
<!-- #Include file="..\include\adovbs.inc" -->
<!-- #Include file="..\include\cod_ado.inc" -->
<%
strTitle = Request.Form("title")
strTitle = Trim(strTitle)
strTitle = replace(strTitle,"'","''")
strTitle = server.HTMLEncode(strTitle)
'strTitle = replace(strTitle,"<","<")
'strTitle = replace(strTitle,">",">")
strflag_attention = Request.Form("flag_attention")
if strflag_attention = "on" then
flag_attention = 1
else
flag_attention = 0
end if
strText = Request.Form("detail")
strText = replace(strText,"'","''")
'strText = server.HTMLEncode(strText)
'strText = replace(strText,chr(13)&chr(10),"<br>")
'strText = replace(strText," "," ")
strText = replace(strText,"<","<")
strText = replace(strText,">",">")
dim objCnn,rs
strDSN = Application("dsn")
strSQL = "SELECT MAX(idnum) from board"
cod_AdoOpen objCnn,rs,strDSN,strSQL
if isnull(rs(0)) then
idnum=1
else
idnum=rs(0)+1
end if
rs.close
strSQL = "insert into board(IDNUM,title,flag_attention,detail) values (" &idnum &",'" &strTitle & "'," & flag_attention & ",'" & strText & "')"
'Response.Write strSql
objCnn.Execute(strSQL)
objCnn.close
set objCnn = nothing
response.redirect "bulletin.asp"
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -