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

📄 admin_menusave.asp

📁 庐江二中
💻 ASP
字号:
<!--#include file="session.asp"-->
<%checkAdmin2%>
<!--#include file="conn.asp"-->
<!--#include file="inc/char.inc"-->
<%
ID=trim(request("id"))

Name=trim(request.form("Name"))
Url=trim(request.form("Url"))
intro=trim(request.form("intro"))

founerr=false
act=request("act")
if Name="" then
founderr=true
errmsg="<br><li>名称不能为空</li>"
end if
if Intro="" then
founderr=true
errmsg="<br><li>简介不能为空</li>"
end if
if Url="" then
founderr=true
errmsg="<br><li>地址不能为空</li>"
end if

if founderr=true then
call error()
else
	
if act="edit" and id<>"" then
sql="select * from Menu where ID="&ID
elseif act="add" then
sql="select * from Menu"
else
errmsg="<br><li>操作错误!请联系管理员</li>"
call error()
response.end
end if
rs.open sql,conn,1,3
if act="add" or act="edit" then
if act="edit" then
if rs.eof then
errmsg="<br><li>操作错误!请联系管理员</li>"
call error()
response.end
end if
end if
if act="add" then
rs.addnew
end if
rs("Name")=Name
rs("intro")=intro
rs("Url")=Url
rs.update
end if
rs.close
set rs=nothing
conn.close
set conn=nothing
Response.Redirect "admin_MenuMana.asp"
end if
%>

⌨️ 快捷键说明

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