📄 admin_specialsave.asp
字号:
<!--#include file="function.asp"-->
<%CheckAdmin1%>
<!--#include file="conn.asp"-->
<!--#include file="const.asp"-->
<!--#include file="inc/char.inc"-->
<%
Askclassid=request.QueryString("Askclassid")
Specialid=request.QueryString("Specialid")
Page=request.QueryString("Page")
act=request("act")
set rs=server.createobject("adodb.recordset")
founerr=false
if act<>"SetIsGood" then
if trim(Request.Form ("name"))="" then
founderr=true
errmsg="<li>专辑名称不能为空</li>"
else
Name=trim(Request.Form ("Name"))
end if
if trim(request.form("classid"))="" then
founderr=true
errmsg=errmsg+"<li>请选择一级栏目</li>"
else
Classid=Request.Form("Classid")
end if
end if
if founderr=true then
call error()
else
if act<>"SetIsGood" then
Name=request("name")
if trim(Request.Form("pic"))="" then
pic=NoPic
else
pic=request.form("pic") '使用网络地址
end if
if trim(Request.Form("intro"))="" then
intro="暂无"
else
intro=htmlencode2(request.form("intro"))
end if
end if
if act="edit" and specialid<>"" then
'修改专辑资料
sql="select * from special where specialid="&specialid
rs.open sql,conn,1,3
rs("name")=trim(name)
rs("pic")=trim(pic)
rs("Classid")=Classid
rs("intro")=htmlencode2(trim(intro))
rs.update
rs.close
'修改专辑中的歌曲资料
sql="select * from MusicList where specialid="&specialid
rs.open sql,conn,1,3
if not rs.EOF then
do while not rs.EOF
rs("Classid")=Classid
rs.MoveNext
loop
end if
rs.Close
'结束修改
elseif act="add" then
sql="select * from special where (specialid is null)"
rs.open sql,conn,1,3
rs.addnew
rs("name")=trim(name)
rs("pic")=trim(pic)
rs("classid")=classid
rs("intro")=htmlencode2(trim(intro))
rs("dateandtime")=now()
rs.update
rs.close
elseif act="SetIsGood" then
sql="select IsGood from special where IsGood=true"
rs.open sql,conn,1,3
if not rs.EOF then
do while not rs.EOF
rs("IsGood")=false
rs.update
rs.MoveNext
loop
end if
rs.close
sql="select IsGood from special where specialid="&specialid
rs.open sql,conn,1,3
if not rs.EOF then
if rs("IsGood")=true then
rs("IsGood")=false
else
rs("IsGood")=true
end if
rs.update
end if
rs.close
else
conn.close
set conn=nothing
Response.Write "操作错误!"
Response.End
end if
set rs=nothing
Response.Redirect "admin_SpecialMana.asp?Classid="+AskClassid+"&Page="+Page
end if
conn.close
set conn=nothing
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -