photo_savetype.asp
来自「这是一个学生毕业时做的教务系统」· ASP 代码 · 共 62 行
ASP
62 行
<!--#include file=conn.asp -->
<%
IF not(Session("KEY")="super" or Session("KEY")="input") THEN
response.redirect "login.asp"
response.end
END IF
%>
<!--#include file="info.asp" -->
<%
if Request.Form("cz")="" then
cz=Request.QueryString("cz")
else
cz=Request.Form("cz")
end if
if cz="addtype" or cz="edittype" then
founderr=false
if trim(Request.Form("typename"))="" then
founderr=true
info=info+"<li>请填写分类名称</li>"
end if
if founderr=false then
Set rs = Server.CreateObject("ADODB.Recordset")
if cz<>"edittype" then
sql = "SELECT * FROM photo_type where (id is null)"
rs.OPEN sql,Conn,1,3
rs.addnew
else
sql = "SELECT * FROM photo_type where id="&Request.Form("typeid")
rs.OPEN sql,Conn,1,3
end if
rs("name")=Request.Form("typename")
if Request.Form("minipic")<>"" then
rs("minipic")=Request.Form("minipic")
else
rs("minipic")="images/nominipic.gif"
end if
rs.update
rs.close
set rs=nothing
conn.close
set conn=nothing
Response.Redirect"photoclass.asp"
else
call infom()
end if
elseif cz="deltype" then
conn.execute "delete from photo_type where id="&Request.Form("typeid")
conn.execute "delete from photo_show where typeid="&Request.Form("typeid")
conn.close
Set conn=Nothing
Response.Redirect"photoclass.asp"
end if
%>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?