📄 admin_djspecial.asp
字号:
<!--#include file="mdb.asp"-->
<%Admin="dj"%>
<!--#include file="check.asp"-->
<!--#include file="inc/config.asp"-->
<!--#include file="inc/FORMAT.asp"-->
<HTML><HEAD><title>Hxcms管理系统——音乐专集管理</title>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<LINK href="inc/admin.css" type=text/css rel=stylesheet>
<META content="MSHTML 6.00.2800.1126" name=GENERATOR>
</HEAD>
<body onkeydown=return(!(event.keyCode==78&&event.ctrlKey))>
<%
'****************************************************
' Hxcms Ver7.5 Power by Hx66.net
' Web: http://www.Hx66.net,http://www.Hx66.net/home
' Copyright (C) 2006 Hx66.net All Rights Reserved.
'****************************************************
if session("adminlogin")<>sessionvar then
Response.Write("<script language=javascript>alert('你尚未登录,或者超时了!请重新登录');this.top.location.href='admin.asp';</script>")
response.end
else
if request.form("MM_insert") then
if request.form("action")="newdj" then
dim djcatid,djname,djshowpic,djYuyan,djGongsi,djisbest,djword,djistop
djcatid=cint(request.form("ClassID"))
djname=trim(replace(request.form("name"),"'",""))
djword=trim(replace(request.form("word"),"'",""))
djuser=trim(replace(request.form("zjuser"),"'",""))
djshowpic=trim(replace(request.form("showpic"),"'",""))
djYuyan=trim(replace(request.form("Yuyan"),"'",""))
djGongsi=trim(replace(request.form("Gongsi"),"'",""))
djisbest=request.form("isbest")
djistop=request.form("istop")
if djname="" then
Response.Write("<script language=javascript>alert('你必须填写专集名称!');history.back(1);</script>")
response.end
end if
if djuser="" then
Response.Write("<script language=javascript>alert('你必须填写专集作者!');history.back(1);</script>")
response.end
end if
if djcatid<1 then
Response.Write("<script language=javascript>alert('你必须选择专集所属分类!');history.back(1);</script>")
response.end
end if
if djshowpic="" then
Response.Write("<script language=javascript>alert('你必须填写专集图片!');history.back(1);</script>")
response.end
end if
if djYuyan="" then
Response.Write("<script language=javascript>alert('你必须选择专集所属语言!');history.back(1);</script>")
response.end
end if
if djGongsi="" then
Response.Write("<script language=javascript>alert('你必须填写专集的唱片公司!');history.back(1);</script>")
response.end
end if
if djword="" then
Response.Write("<script language=javascript>alert('你必须添写专集简介!');history.back(1);</script>")
response.end
end if
sql="select * from djspecial"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,3
rs.addnew
rs("name")=djname
rs("zjuser")=djuser
rs("ClassID")=djcatid
rs("pic")=djshowpic
rs("Yuyan")=djYuyan
rs("Gongsi")=djGongsi
rs("intro")=djword
if cint(djisbest)=1 then
rs("isbest")=cint(djisbest)
end if
if cint(djistop)=1 then
rs("istop")=cint(djistop)
end if
rs.update
rs.close
response.redirect "admin_djspecial.asp?action=dj"
elseif request.form("action")="editdj" then
if request.Form("id")="" then
Response.Write("<script language=javascript>alert('你必须指定操作的对象!');history.back(1);</script>")
response.End
else
if not isInteger(request.form("id")) then
Response.Write("<script language=javascript>alert('非法的歌曲id参数。');history.back(1);</script>")
response.End
end if
end if
djcatid=cint(request.form("ClassID"))
djname=trim(replace(request.form("name"),"'",""))
djword=trim(replace(request.form("word"),"'",""))
djuser=trim(replace(request.form("zjuser"),"'",""))
djshowpic=trim(replace(request.form("showpic"),"'",""))
djYuyan=trim(replace(request.form("Yuyan"),"'",""))
djGongsi=trim(replace(request.form("Gongsi"),"'",""))
djisbest=request.form("isbest")
djistop=request.form("istop")
if djname="" then
Response.Write("<script language=javascript>alert('你必须填写专集名称!');history.back(1);</script>")
response.End
end if
if djuser="" then
Response.Write("<script language=javascript>alert('你必须填写专集作者!');history.back(1);</script>")
response.End
end if
if djcatid<1 then
Response.Write("<script language=javascript>alert('你必须选择专集所属分类!');history.back(1);</script>")
response.End
end if
if djshowpic="" then
Response.Write("<script language=javascript>alert('你必须填写专集图片!');history.back(1);</script>")
response.End
end if
if djYuyan="" then
Response.Write("<script language=javascript>alert('你必须选择专集的所属语言!');history.back(1);</script>")
response.End
end if
if djGongsi="" then
Response.Write("<script language=javascript>alert('你必须填写专集的唱片公司!');history.back(1);</script>")
response.End
end if
if djword="" then
Response.Write("<script language=javascript>alert('你必须添写专集简介!');history.back(1);</script>")
response.End
end if
sql="select * from djspecial where SpecialID="&cint(request.form("id"))
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,3
rs("name")=djname
rs("zjuser")=djuser
rs("ClassID")=djcatid
rs("pic")=djshowpic
rs("Yuyan")=djYuyan
rs("Gongsi")=djGongsi
rs("intro")=djword
rs("isbest")=cint(djisbest)
rs("istop")=cint(djistop)
rs.update
rs.close
set rs=nothing
response.redirect "admin_djspecial.asp?action=dj"
elseif request.form("action")="pltj" then
upcount=request.form("upcount")
url=request.form("url")
pic=request.form("pic")
desc=request.form("desc")
dpath=request.form("d_path")
Classic=request.form("Classic")
ConClassic=split(Classic,",")
If InStrRev(url,"/")<>len(url) Then
url=url&"/"
End If
set NRs=server.createobject("adodb.recordset")
Nsql="select zjuser from djspecial where SpecialID="&ConClassic(1)
NRs.open Nsql,conn,1,1
if not NRs.eof then
NClass=NRs("zjuser")
end if
NRs.close
set rs=server.createobject("adodb.recordset")
sql="select * from dj"
rs.open sql,conn,1,3
Num=upcount
for i=1 to Num
MusicName=trim(request.form("MusicName"&i))
Wma=trim(request.form("Wma"&i))
MusicWord=trim(request.form("MusicWord"&i))
if MusicName="" or isnull(MusicName) or Wma="" or isnull(Wma) then
Num=i-1
exit for
end if
rs.addnew
rs("dj_Name")=MusicName
rs("dj_Word")=MusicWord
rs("dj_user")=NClass
rs("djcat_id")=ConClassic(0)
rs("SpecialID")=ConClassic(1)
rs("dj_pic")=pic
rs("dj_desc")=desc
rs("path")=dpath
rs("dj_url")=url&Wma
rs.update
next
rs.close
call Success()
end if
end if
sub Success()
%>
<BR><BR><BR><BR><BR>
<LINK href="inc/admin.css" type=text/css rel=stylesheet>
<div align="center">
<table border="0" width="60%" cellspacing="1" cellpadding="1">
<tr>
<td>
<table border="1" width="100%" cellspacing="0" cellpadding="5" bordercolor="#A4CEE4" bordercolordark="#FFFFFF">
<tr align="center">
<td width="100%" height="20" colspan=2 bgcolor="#96C5DE" align=center><font color="white"><b>歌曲批量添加成功<br>共添加了 <%=Num%> 首歌曲</b></td>
</tr>
<tr>
<td align=center><input type="button" name="button1" value="返回" onclick="javascript:history.go(-2)"> <input type="button" name="button2" value="继续添加" onclick="javascript:history.go(-1)"></td>
</tr>
</table>
</td>
</tr>
</table>
</div>
<%
response.end
end sub
if request.form("operation")="DEL" then
num=request.form("dj_id").Count
for i=1 to num
conn.execute("delete from djspecial where SpecialID="&request.form("dj_id")(i))
conn.execute("delete from dj where SpecialID="&request.form("dj_id")(i))
next
end if
if request.querystring("action")="dj" then
Response.Write("<table align=""center"" width=""98%"" border=""1"" cellspacing=""0"" cellpadding=""4"" class=Hxcmsbk style=""border-collapse: collapse"">")
Dim CurPage,Url_Add
Url_Add="?action=dj&"
If Request.QueryString("Page")<>"" Then
Curpage=Request.QueryString("Page")
If IsInteger(Curpage)=False OR Curpage<0 Then Curpage=1
Else
Curpage=1
End If
if request.querystring("djcat_id")<>"" then
djcat_id=cint(request.querystring("djcat_id"))
sql="select * from djspecial where ClassID="&djcat_id&" order by SpecialID desc"
Url_Add=Url_Add&"djcat_id="&djcat_id&"&"
else
sql="select * from djspecial order by istop desc, SpecialID desc"
end if
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
if rs.eof and rs.bof then
Response.Write("<tr align=""center""><td class=Hxcmsds colspan=7>当前没有专集!</td></tr>")
Else
Dim dj_Nums,MultiPages,j
rs.PageSize=adflperpage
rs.AbsolutePage=CurPage
dj_Nums=rs.RecordCount
MultiPages="<tr><td class=Hxcmsqs colspan=""7"" align=""center"">共有专集:"&dj_Nums&"张 "&MultiPage(dj_Nums,adflperpage,CurPage,Url_Add)&"</td></tr>"
%>
<form name="form3" method="post" action=""><tr class=Hxcmsss>
<td colspan="6">专 集 管 理</td>
<td align="right" style="padding-top:2px;">
<select style="margin:-3px" name="go" onChange='window.location=form.go.options[form.go.selectedIndex].value'>
<option value="">选择显示方式</option>
<option value="admin_djspecial.asp?action=dj">显示所有专集</option>
<%sql="select * from djcat where sid=0"
set rs1=conn.execute(sql)
do while not rs1.eof
response.write "<optgroup label='"&rs1("djcat_name")&"'>"
sql="select * from djcat where sid="&rs1("djcat_id")
set rs2=server.createobject("adodb.recordset")
rs2.open sql,conn,1,1
do while not rs2.eof
%>
<option value="admin_djspecial.asp?action=dj&djcat_id=<%=rs2("djcat_id")%>">├ <%=rs2("djcat_name")%></option>
<%
rs2.movenext
loop
rs1.movenext
loop
rs1.close
set rs1=nothing%>
</select>
</td>
</tr></form>
<form name=form method=post action="admin_djspecial.asp?action=dj">
<script language="javascript">
function CheckAll(form)
{
for (var i=0;i<form.elements.length;i++)
{
var e = form.elements[i];
if (e.name != 'chkall')
e.checked = form.chkall.checked;
}
}
</script>
<tr class=Hxcmsqs align="center">
<td width="5%">选中</td>
<td width="35%">专集名称</td>
<td width="10%">批量操作</td>
<td width="10%">专集分类</td>
<td width="15%">专集作者</td>
<td width="10%">加入时间</td>
<td width="15%">操作</td>
</tr>
<%
Do Until Rs.EOF OR j=adflperpage
sql="select djcat_id,djcat_name from djcat where djcat_id="&rs("ClassID")
set rscat=server.createobject("adodb.recordset")
rscat.open sql,conn,1,1
%>
<%
if rs("istop")="1" then
folder="「顶置」"
else
folder=""
end if
if rs("istop")="0" then
if rs("isbest")=1 then
folder="「推荐」"
else
folder=""
end if
end if
%>
<tr class=Hxcmsds>
<td align="center"><input type=checkbox Name=dj_id Value=<%=rs("SpecialID")%>></td>
<td><a href="Showdj_Special.asp?Specialid=<%=rs("SpecialID")%>" target="_blank"><%=rs("name")%></a> <font color="red"><%=folder%></font></td>
<td width="10%" align="center"><a href="admin_djspecial.asp?specialid=<%=rs("SpecialID")%>&action=pltj">批量添歌</a></td>
<td width="10%" align="center"><%=rscat("djcat_name")%></td>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -