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

📄 saveadmintype_index.asp

📁 个人网站模板
💻 ASP
字号:
<!--#include file="check_admin.asp"-->
<!--#include file="conn_admin.asp" -->
<!--#include file="info.asp" -->
<%

if Request.Form("cz")="" then
cz=Request.QueryString("cz")
else
cz=Request.Form("cz")
end if
if cz="addclass" or cz="editclass" then
Set rs = Server.CreateObject("ADODB.Recordset")
if cz="editclass" then
sql = "SELECT * FROM index_type where id="&Request.Form("classid") 
rs.OPEN sql,Conn,1,3
else
sql = "SELECT * FROM index_type where (id is null)" 
rs.OPEN sql,Conn,1,3
rs.addnew
end if
if Request.Form("classname")<>"" then
rs("name")=Request.Form("classname")
end if
rs("indexid")=request.form("indexid")
rs.update
rs.close
set rs=nothing
conn.close
set conn=nothing
Response.Redirect"class_admin_index.asp"

elseif cz="addtype" or cz="edittype" then

founderr=false
if founderr=false then

Set rs = Server.CreateObject("ADODB.Recordset")
if cz<>"edittype" then
sql = "SELECT * FROM index_type where (id is null)" 
rs.OPEN sql,Conn,1,3
rs.addnew
else
sql = "SELECT * FROM index_type where id="&Request.Form("typeid") 
rs.OPEN sql,Conn,1,3
end if
rs("name")=Request.Form("typename")
rs("indexid")=request.form("indexid")
rs.update
rs.close
set rs=nothing
conn.close
set conn=nothing
Response.Redirect"class_admin_index.asp"
else
call infom()
end if

elseif cz="delclass" then


conn.execute "delete from index_type where id="&Request.Form("classid")
conn.execute "delete from index_produce where typeid="&Request.Form("classid")
conn.close
Set conn=Nothing
Response.Redirect"class_admin_index.asp"

elseif cz="deltype" then

conn.execute "delete from index_type where id="&Request.Form("typeid")
conn.execute "delete from index_produce where typeid="&Request.Form("typeid")
conn.close
Set conn=Nothing
Response.Redirect"class_admin_index.asp"

end if
%>

⌨️ 快捷键说明

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