www.gusucode.com > 星云DJ舞曲 4.5a源码程序 > admin/admin_specialsave.asp
<!--#include file="conn.asp"--> <!--#include file="function.asp"--> <%CheckAdmin%> <!--#include file="inc/char.inc"--> <% Askclassid=request.QueryString("Askclassid") Specialid=request.QueryString("Specialid") Page=request.QueryString("Page") classid=request("classid") act=request("act") set rs=server.createobject("adodb.recordset") founerr=false if act<>"SetIsGood" and act<>"del" 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("yuyan"))="" then yuyan="暂无" else yuyan=request.form("yuyan") end if if trim(Request.Form("gongsi"))="" then gongsi="暂无" else gongsi=request.form("gongsi") '使用实际填写 end if if trim(Request.Form("zhuangtai"))="" then zhuangtai="正常发布" else zhuangtai=request.form("zhuangtai") '使用实际填写 end if if trim(Request.Form("classname"))="" then classname="暂无" else classname=request.form("classname") '使用实际填写 end if if trim(Request.Form("zuozhe"))="" then zuozhe="暂无" else zuozhe=request.form("zuozhe") '使用实际填写 end if if trim(Request.Form("djqq"))="" then djqq="暂不公布" else djqq=request.form("djqq") '使用实际填写 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) if trim(pic)<>"" then rs("pic")=trim(pic) else rs("pic")="" end if rs("Classid")=Classid rs("gongsi")=gongsi rs("zhuangtai")=zhuangtai rs("classname")=classname rs("djqq")=djqq rs("zuozhe")=zuozhe rs("yuyan")=yuyan rs("intro")=htmlencode2(trim(intro)) rs.update 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("gongsi")=gongsi rs("yuyan")=yuyan rs("zhuangtai")=zhuangtai rs("classname")=classname rs("djqq")=djqq rs("zuozhe")=zuozhe rs("yuyan")=yuyan rs("intro")=htmlencode2(trim(intro)) rs("dateandtime")=now() rs.update rs.close elseif act="SetIsGood" then 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 elseif act="del" then specialid=request.QueryString("specialid") set rs=conn.execute("delete from special where specialid="&specialid) conn.close set conn=nothing classid=request.QueryString("classid") page=request.QueryString("page") response.redirect "admin_specialmana.asp?classid="&classid&"&page="& page else conn.close set conn=nothing Response.Write "操作错误!" Response.End end if set rs=nothing Response.Redirect "admin_SpecialMana.asp?Classid="&Classid&"&Page="&Page&"" end if conn.close set conn=nothing %>