📄 bbs_add.asp
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<%Response.ContentType = "text/vnd.wap.wml; charset=utf-8"%><?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.2//EN" "http://www.wapforum.org/DTD/wml12.dtd">
<!--#include file="conn.asp"-->
<wml>
<head>
<meta http-equiv="Cache-Control" content="must-revalidate" forua="true"/>
<meta http-equiv="Cache-Control" content="no-cache" forua="true"/>
<meta http-equiv="Cache-Control" content="max-age=0" forua="true"/>
<meta http-equiv="Expires" content="0" forua="true"/>
<meta http-equiv="Pragma" content="no-cache" forua="true"/>
</head>
<%if session("name")="" then
response.redirect "reg.asp"
end if%>
<%
n=TRim(Request("n"))
lid=TRim(Request("lid"))
bid=TRim(Request("bid"))
pid=TRim(Request("id"))
aid=TRim(Request("aid"))
page=TRim(Request("page"))
if not isnumeric(aid) then aid=1
if not isnumeric(page) then page=1
if not isnumeric(pid) then pid=""
if not isnumeric(bid) then bid=""
if not isnumeric(lid) then lid=""
if not isnumeric(n) then n=0
IF Request.QueryString("Action")="save" Then
call save
else
call main
end if
sub save
Set Rs1 = Server.CreateObject("Adodb.Recordset")
Sql1 = "SELECT * FROM config"
Rs1.Open Sql1,conn,1,1
if not (rs1.bof and rs1.eof) then
%>
<card id="index" title="发表评论">
<p align="<%=rs1("const")%>">
<%
title=Trim(Request("title"))
if bid<>"" and lid<>"" and pid<>"" then
if title<>"" then
set rs=Server.CreateObject("Adodb.Recordset")
rs.open "select * from wap_bbs ",conn,1,3
rs.addnew()
rs("title")=title
rs("bid")=bid
rs("lid")=lid
rs("pid")=pid
rs("n")=n
rs("nid")=session("id")
rs.update
Rs.close
set rs=nothing
%>
发表评论成功。<br/>
<%if n=0 then%>
<a href="view.asp?lid=32&aid=<%=aid%>&id=<%=pid%>&bid=<%=bid%>&page=<%=page%>">返回来源页</a><br/>
<a href="bbs_view.asp?aid=<%=aid%>&id=<%=pid%>&lid=<%=lid%>&bid=<%=bid%>&n=0&page=<%=page%>">查看评论</a><br/>
<%else%>
<a href="down.asp?did=<%=pid%>&lid=<%=lid%>&id=<%=bid%>">返回来源页</a><br/>
<a href='bbs_view.asp?id=<%=pid%>&lid=<%=lid%>&bid=<%=bid%>&n=1'>查看评论</a><br/>
<%end if%>
<a href="index.asp">返回首页</a>
</p>
<%else%>
出错啦!评论内容不能为空.<br/><a href="bbs_add.asp?lid=<%=lid%>&bid=<%=bid%>">返回修改</a><br/><a href="index.asp">返回首页</a></p>
<%end if%>
<%else%>
出错啦!请不要非法提交参数.<br/><a href="index.asp">返回首页</a></p>
<%end if%>
<%else%>
<card id="index" title="出错啦"><p>出错啦!系统资料没配置.<br/>
<%end if%>
<%
Rs1.close
set rs1=nothing
end sub
sub main
Set Rs1 = Server.CreateObject("Adodb.Recordset")
Sql1 = "SELECT * FROM config"
Rs1.Open Sql1,conn,1,1
if not (rs1.bof and rs1.eof) then
%>
<card id="index" title="发表评论">
<p align="<%=rs1("const")%>">
评论内容:<br/>
<input name="title" emptyok="false"/><br/>
<anchor>提交
<go href="bbs_add.asp?Action=save&lid=<%=lid%>&bid=<%=bid%>&id=<%=pid%>&n=<%=n%>&aid=<%=aid%>&page=<%=page%>" method="post">
<postfield name="title" value="$(title:n)" />
</go>
</anchor><br/>
<%if n=0 then%>
<a href="view.asp?lid=32&aid=<%=aid%>&id=<%=pid%>&bid=<%=bid%>&page=<%=page%>">返回来源页</a><br/>
<%else%>
<a href="down.asp?did=<%=pid%>&lid=<%=lid%>&id=<%=bid%>">返回来源页</a><br/>
<%end if%>
<a href="index.asp">返回首页</a>
</p>
<%else%>
<card id="index" title="出错啦"><p>出错啦!系统资料没配置.<br/>
<%end if%>
<%
Rs1.close
set rs1=nothing
end sub%>
</card>
</wml>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -