admin_news_add_ok.asp

来自「WAP网上购物系统源程序,,有兴趣的朋友,一起研究一下..交流经眼」· ASP 代码 · 共 48 行

ASP
48
字号
<%@LANGUAGE="VBSCRIPT"  CODEPAGE="65001"%>
<!--#include file="inc/conn.asp"--><%
 title=request.form("title")
content=request.form("content")
response.ContentType="text/vnd.wap.wml"
%>
<%
	title=HtmlEncode(trim(title))
	content=HtmlEncode(content)
	set rs=server.CreateObject("Adodb.Recordset")
	rs.open "select * from news where 1=2",conn,1,3
	rs.addnew()
		rs("title")=title
		rs("content")=content
		rs("adddate")=now()
	rs.update
	rs.close
	set rs=nothing
  conn.close
 set conn=nothing

 
%>

<%
Function HtmlEncode(str)
    If Trim(Str)="" Or IsNull(str) Then Exit Function
  '  str=Replace(str,">","&gt;")
  '  str=Replace(str,"<","&lt;")
    str=Replace(str,Chr(32),"&nbsp;")
    str=Replace(str,Chr(9),"&nbsp;")
    str=Replace(str,Chr(34),"&quot;")
    str=Replace(str,Chr(39),"&#39;")
    str=Replace(str,Chr(13),"")
    str=Replace(str,Chr(10) & Chr(10), "</p><p>")
    str=Replace(str,Chr(10),"<br> ")
    HtmlEncode=str
End Function
%>
<?xml version="1.0"?> 
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN"
"http://www.wapforum.org/DTD/wml_1.1.xml">
<wml>
<card>
<p>OK
</p>
</card>
</wml>

⌨️ 快捷键说明

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