⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 saveboard.asp

📁 单版面小型论坛 单版面小型论坛
💻 ASP
字号:
<!--#include file="conn.asp"-->
<!--#include file="func.asp"-->
<%

logchk session("userid"),session("password")

if session("userid")<>"" and session("password")<>"" and session("manbid")=0 then
	bid=request.form("bid")
	method=request.form("method")
	cname=request.form("cname")
	ename=request.form("ename")
	bdinfo=request.form("bdinfo")
	if cname="" or ename="" or bdinfo="" then
	    errmsg="请 完 整 填 写 信 息 !"
	    errshow(errmsg)
	end if
	if method<>"new" then
	    if isempty(bid) or bid="" then
	        errmsg="版 面 ID 错 误 , 请 重 新 修 改 !"
	        errshow(errmsg)
	    end if
	end if
	 Set cmdTemp = Server.CreateObject("ADODB.Command")
	 Set insert = Server.CreateObject("ADODB.Recordset")
	     if method="" and bid<>"" then
	     cmdTemp.CommandText="SELECT * FROM board WHERE bid=" &bid
	     end if
	     if method="new" and bid="" then
	     cmdTemp.CommandText="SELECT * FROM board WHERE (bid is null)"
	     end if
	     
         cmdTemp.CommandType = 1
         Set cmdTemp.ActiveConnection = conn
  	     insert.Open cmdTemp, , 1, 3
  	     
	     if method="new" and bid="" then
	     	insert.addnew
	     end if
	     
	     insert("ename")=ename
	     insert("cname")=cname
	     insert("bdinfo")=bdinfo
	     insert.update
	     if err.number<>0 then
                 response.write "数据库操作失败:"&err.description
         end if
         set cmdTemp=nothing
         set insert=nothing
         set conn=nothing
	response.redirect "boardman.asp"
else
    errmsg="您 无 权 修 改 或 增 加 版 面 !"
    errshow(errmsg)
end if
%>

⌨️ 快捷键说明

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