saveadminzhuanti.asp
来自「以朱朱相册为程序原型整合开发winds相册」· ASP 代码 · 共 80 行
ASP
80 行
<!--#include file="checkthis.asp" -->
<!--#include file="data/conn.asp" -->
<!--#include file="info.asp" -->
<%
if Request.Form("zt")="" then
zt=Request.QueryString("zt")
else
zt=Request.Form("zt")
end if
founderr=false
if trim(Request.Form("zhuantiname"))="" then
founderr=true
info=info+"<li>请填写主题名称</li>"
end if
if founderr=false then
Set rs = Server.CreateObject("ADODB.Recordset")
if zt="editzhuanti" then
sql = "SELECT * FROM zhuanti where id="&Request.Form("typeid")
rs.OPEN sql,Conn,1,3
rs("name")=Request.Form("zhuantiname")
rs("data")=Request.Form("riqi")
rs("pl")=Request.Form("flid")
rs("music")=Request.Form("music")
rs("js")=replace(server.htmlencode(Request.Form("js")),chr(13),"<br>")
rs("pass")=Request.Form("pass")
if Request.Form("view")<>"" then
rs("view")=Request.Form("view")
end if
rs.update
rs.close
set rs=nothing
conn.close
set conn=nothing
Response.Redirect"adminzhuti.asp"
end if
if zt="addzhuanti" then
sql = "SELECT * FROM zhuanti where (id is null)"
rs.OPEN sql,Conn,1,3
rs.addnew
rs("name")=Request.Form("zhuantiname")
rs("data")=Request.Form("riqi")
rs("pl")=Request.Form("flid")
rs("music")=Request.Form("music")
rs("js")=replace(server.htmlencode(Request.Form("js")),chr(13),"<br>")
rs("pass")=Request.Form("pass")
if Request.Form("view")<>"" then
rs("view")=Request.Form("view")
end if
rs.update
rs.close
set rs=nothing
conn.close
set conn=nothing
Response.Redirect"adminzhuti.asp"
end if
'else
'call infom()
end if
if zt="delzhuanti" then
conn.execute "delete from zhuanti where id="&Request.Form("typeid")
conn.execute "delete from desktop where zhuanti="&Request.Form("typeid")
conn.close
Set conn=Nothing
Response.Redirect"adminzhuti.asp"
end if
if zt="editzhuantiq" then
Set rs = Server.CreateObject("ADODB.Recordset")
sql = "SELECT * FROM zhuanti where id="&Request.Form("typeid")
rs.OPEN sql,Conn,1,3
rs("name")=Request.Form("zhuantiname")
rs.update
rs.close
set rs=nothing
conn.close
set conn=nothing
Response.Redirect"adminzhuti.asp"
end if
%>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?