post.asp

来自「wap留言本ASP源程序」· ASP 代码 · 共 35 行

ASP
35
字号
<!--#include file="conn.asp"-->
<%Response.ContentType = "text/vnd.wap.wml; charset=utf-8"%><% response.write "现在是" %> 
<%=now%>
<%
dim note,sql,title,pid,name
name=encodestr(request("name"))
pid=request("pid")
title=encodestr(request("title"))
note=encodestr(request("note"))
if isnumeric(pid) and pid<>"" then pid=clng(pid) else pid=0
sql="insert into gbook(名称,标题,内容,pid) values('"& name &"','"& title &"','"& note &"',"&pid&")"
conn.execute sql
if pid>0 then
	sql="update gbook set 回复=回复+1,最后回复=now() where id="&pid
	conn.execute sql
end if
set conn=nothing
'response.Redirect "index.asp"
%>
<?xml version="1.0" encoding="utf-8"?> 
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml"> 
<wml>
<template><do type="accept" label="返回"><prev/></do></template>
<card title="发表成功" id="test" ontimer="index.asp?page=1">
		<timer value="5"/>
		<p align='center'>祝贺你,发表成功!<br/>5秒钟后自动返回</p>
<p align='center'><a href="index.asp?page=1">[留言首页]</a></p>
</card>
</wml>





⌨️ 快捷键说明

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