gbook_write_ok.asp

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

ASP
55
字号
<%@LANGUAGE="VBSCRIPT"  CODEPAGE="65001"%>
<!--#include file="inc/conn.asp"--><!--#include file="inc/cconst.asp"-->
<%
response.ContentType="text/vnd.wap.wml"
content=request.form("content")
studentid=request.form("studentid")
if studentid="" then
response.redirect("error.asp")
end if
%>
<%

	title=HtmlEncode(trim(title))
	content=HtmlEncode(content)
        	set rs=server.CreateObject("Adodb.Recordset")
	rs.open "select * from forum",conn,1,3
	rs.addnew()
		rs("studentid")=studentid
		rs("content")=content
		rs("pubtime")=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>
<p><anchor title="Back">&#x8FD4;&#x56DE;&#x4E3B;&#x754C;&#x9762;
<go href="main.asp"/>
</anchor></p>
</card>
</wml>

⌨️ 快捷键说明

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