?? addnews.asp
字號(hào):
<%@ LANGUAGE="VBSCRIPT"%>
<%
function fixQuotes(theString)
fixQuotes=Replace(theString,"'","''")
end function
Set con=Server.CreateObject("ADODB.Connection")
con.Open Application("DBCon_ConnectionString")
strSql="INSERT news VALUES('"+fixquotes(server.htmlencode(request.form("leibie")))+"','"+fixquotes(server.htmlencode(Request.Form("biaoti")))
strSql=strSql+"','"+fixQuotes(server.htmlencode(TRIM(Request.Form("fubiaoti"))))+"','"+"imagesname"
strSql=strSql+"','"+fixQuotes(server.htmlencode(TRIM(Request.Form("gjz1"))))
strSql=strSql+"','"+fixQuotes(server.htmlencode(TRIM(Request.Form("gjz2"))))
strSql=strSql+"','"+fixQuotes(server.htmlencode(TRIM(Request.Form("zuozhe"))))
strSql=strSql+"','"+fixQuotes(server.htmlencode(TRIM(Request.Form("zhaizi"))))
strSql=strSql+"',getdate()"
strSql=strSql+",'"+replace(fixQuotes(server.htmlencode(trim(Request.Form("neirong")))),vbcrlf,"<br> ")+"')"
insertnum=0
response.write "<br>"
'response.end
Set rs=con.Execute(strSql,insertnum)
if insertnum=1 then
response.write "新聞提交成功!<br>"
response.write "<a href='"&"ad.asp"&"'> 返回提交頁(yè)面!</a>"
else
response.write "新聞提交失敗!<br>"
response.wirte "<a href='"&"vbscript:history.go(-1)&"'> 返回提交頁(yè)面!</a>"
end if
%>
<html>
<head>
<title>新聞提交</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<body bgcolor="#FFFFFF">
</body>
</html>
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -