www.gusucode.com > 星云DJ舞曲 4.5a源码程序 > admin/Admin_Dj.asp

    <!--#include file="../Conn.asp"-->
<%Admin="dj"%>
<!--#include file="Check.asp"-->
<!--#include file="../Inc/Config.asp"-->
<!--#include file="../Inc/Inc.asp"-->
<!--#include file="../Inc/FORMAT.asp"-->
<HTML><HEAD><TITLE>舞曲管理</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))>
<%
if request.form("MM_insert") then
if request.form("action")="newdjcat" then
dim djcatname,sid
sid=clng(request.form("id"))
djcatname=trim(replace(request.form("djcat_name"),"'",""))
if djcatname="" then
  Response.Write("<script language=javascript>alert('你必须填写分类名称!');history.back(1);</script>")
  response.end
end if
  conn.Execute ("Insert Into xy57_djcat(djcat_name,sid.idd) Values('"&djcatname&"',"&sid&",0)")
  response.redirect "admin_dj.asp?action=djcat"
elseif request.form("action")="newdj" then
dim djcatid,djname,djurl,mp3url,djpic,djdesc,Font,djisbest,djlrc,djword,djistop,tjuser,Specialid,Grade,points,dpath
djcatid=request.form("djcatid")
djname=trim(replace(request.form("name"),"'",""))
djlrc=trim(replace(request.form("lrc"),"'",""))
djword=trim(replace(request.form("word"),"'",""))
djuser=trim(replace(request.form("user"),"'",""))
djurl=trim(replace(request.form("url"),"'",""))
mp3url=trim(replace(request.form("downurl"),"'",""))
djpic=trim(replace(request.form("pic"),"'",""))
djdesc=trim(replace(request.form("desc"),"'",""))
Font=trim(replace(request.form("Font"),"'",""))
djisbest=request.form("isbest")
djistop=request.form("istop")
tjuser=request.form("tjuser")
Specialid=request.form("Specialid")
Grade=request.form("Grade")
points=request.form("points")
dpath=request.form("d_path")
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 not isInteger(djcatid) then
  Response.Write("<script language=javascript>alert('你必须选择歌曲所属分类!');history.back(1);</script>")
  response.end
end if
if djurl="" then
  Response.Write("<script language=javascript>alert('你必须填写歌曲地址!');history.back(1);</script>")
  response.end
end if
if djpic="" then
  Response.Write("<script language=javascript>alert('你必须选择歌曲的播放类型!');history.back(1);</script>")
  response.end
end if
if djdesc="" then
  Response.Write("<script language=javascript>alert('你必须选择歌曲的推荐等级!');history.back(1);</script>")
  response.end
end if
sql="select * from xy57_dj"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,3
rs.addnew
  rs("dj_name")=djname
  rs("dj_user")=djuser
  rs("djcat_id")=clng(djcatid)
  rs("dj_url")=djurl
  rs("mp3_url")=mp3url
  if djpic="" then
  rs("dj_pic")="rm"
  else
  rs("dj_pic")=djpic
  end if
  if djdesc="" then
  rs("dj_desc")="☆☆★★★"
  else
  rs("dj_desc")=djdesc
  end if
  rs("Font")=Font
  if djword="" then
  rs("dj_word")="暂无"
  else
  rs("dj_word")=djword
  end if
  if cint(djisbest)=1 then
  rs("isbest")=cint(djisbest)
  else
  rs("isbest")=0
  end if
  if cint(djistop)=1 then
  rs("istop")=cint(djistop)
  else
  rs("istop")=0
  end if
  rs("tjuser")=tjuser
  rs("Specialid")=Specialid
  rs("Grade")=cint(Grade)
  if cint(Grade)=0 then
  rs("points")=0
  else
  rs("points")=cint(points)
  end if
  rs("dj_lrc")=djlrc
  rs("path")=dpath
  rs("Hits")=0
  rs("SpecialID")=0
  rs("DownHits")=0
  rs("BoxHits")=0
  rs("Dj_Date")=Now()
  rs("Deleted")=0
  rs("Error")=0
  rs("Passed")=0
  rs.update
  rs.close
  response.redirect "Admin_Add.asp?action=dj&name="&djname&""

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=request.form("djcatid")
djname=trim(replace(request.form("name"),"'",""))
djlrc=trim(replace(request.form("lrc"),"'",""))
djword=trim(replace(request.form("word"),"'",""))
djuser=trim(replace(request.form("user"),"'",""))
djurl=trim(replace(request.form("url"),"'",""))
mp3url=trim(replace(request.form("downurl"),"'",""))
djpic=trim(replace(request.form("pic"),"'",""))
djdesc=trim(replace(request.form("desc"),"'",""))
Font=trim(replace(request.form("Font"),"'",""))
djisbest=request.form("isbest")
djistop=request.form("istop")
error=request.form("error")
tjuser=request.form("tjuser")
Specialid=request.form("Specialid")
Grade=request.form("Grade")
points=request.form("points")
dpath=request.form("d_path")
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 not isInteger(djcatid) then
  Response.Write("<script language=javascript>alert('你必须选择歌曲所属分类!');history.back(1);</script>")
  response.End
end if
if djurl="" then
  Response.Write("<script language=javascript>alert('你必须填写歌曲地址!');history.back(1);</script>")
  response.End
end if
if djpic="" then
  Response.Write("<script language=javascript>alert('你必须选择歌曲的播放类型!');history.back(1);</script>")
  response.End
end if
if djdesc="" then
  Response.Write("<script language=javascript>alert('你必须选择歌曲的推荐等级!');history.back(1);</script>")
  response.End
end if
  sql="select * from xy57_dj where dj_id="&cint(request.form("id"))
  set rs=server.createobject("adodb.recordset")
  rs.open sql,conn,1,3
  rs("dj_name")=djname
  rs("dj_user")=djuser
  rs("djcat_id")=clng(djcatid)
  rs("dj_url")=djurl
  rs("mp3_url")=mp3url
  rs("dj_pic")=djpic
  rs("dj_desc")=djdesc
  rs("Font")=Font
  if djword="" then
     rs("dj_word")="暂无"
  else
     rs("dj_word")=djword
  end if
  rs("isbest")=cint(djisbest)
  rs("istop")=cint(djistop)
  rs("tjuser")=tjuser
  rs("Specialid")=Specialid
  rs("Grade")=cint(Grade)
  if cint(Grade)=0 then
  rs("points")=0
  else
  rs("points")=cint(points)
  end if
  rs("dj_lrc")=djlrc
  rs("path")=dpath
  if cint(djisbest)=1 then
     sql="UPDATE [xy57_user] SET points = points + "&bestpoints&" where username='"&tjuser&"'"
     conn.execute (sql)
  end if
  if cint(djistop)=1 then
     sql="UPDATE [xy57_user] SET points = points + "&toppoints&" where username='"&tjuser&"'"
     conn.execute (sql)
  end if
  rs.update
  rs.close
  set rs=nothing
  response.redirect "admin_dj.asp?action=dj"

elseif request.form("action")="editerror" 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=request.form("djcatid")
djname=trim(replace(request.form("name"),"'",""))
djlrc=trim(replace(request.form("lrc"),"'",""))
djword=trim(replace(request.form("word"),"'",""))
djuser=trim(replace(request.form("user"),"'",""))
djurl=trim(replace(request.form("url"),"'",""))
mp3url=trim(replace(request.form("downurl"),"'",""))
djpic=trim(replace(request.form("pic"),"'",""))
djdesc=trim(replace(request.form("desc"),"'",""))
Font=trim(replace(request.form("Font"),"'",""))
djisbest=request.form("isbest")
djistop=request.form("istop")
error=request.form("error")
Grade=request.form("Grade")
points=request.form("points")
dpath=request.form("d_path")
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="" then
  Response.Write("<script language=javascript>alert('你必须选择歌曲所属分类!');history.back(1);</script>")
  response.End
end if
if djurl="" then
  Response.Write("<script language=javascript>alert('你必须填写歌曲地址!');history.back(1);</script>")
  response.End
end if
if djpic="" then
  Response.Write("<script language=javascript>alert('你必须选择歌曲的播放类型!');history.back(1);</script>")
  response.End
end if
if djdesc="" then
  Response.Write("<script language=javascript>alert('你必须选择歌曲的推荐等级!');history.back(1);</script>")
  response.End
end if
sql="select * from xy57_dj where dj_id="&clng(request.form("id"))
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,3
  rs("dj_name")=djname
  rs("dj_user")=djuser
  rs("djcat_id")=clng(djcatid)
  rs("dj_url")=djurl
  rs("mp3_url")=mp3url
  rs("dj_pic")=djpic
  rs("dj_desc")=djdesc
  rs("Font")=Font
if djword="" then
  rs("dj_word")="暂无"
else
  rs("dj_word")=djword
end if
  rs("isbest")=cint(djisbest)
  rs("istop")=cint(djistop)
  rs("error")=0
  rs("Grade")=cint(Grade)
  if cint(Grade)=0 then
  rs("points")=0
  else
  rs("points")=cint(points)
  end if
  rs("dj_lrc")=djlrc
  rs("path")=dpath
  rs.update
  rs.close
  set rs=nothing
  response.redirect "admin_dj.asp?action=djerror"

elseif request.form("action")="editdjcat" then
djcatname=trim(replace(request.form("djcat_name"),"'",""))
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
if djcatname="" then
  Response.Write("<script language=javascript>alert('你必须填写分类名称!');history.back(1);</script>")
  response.End
end if
  conn.Execute ("Update xy57_djcat Set djcat_name='"&djcatname&"',sid="&clng(request.form("lid"))&" where djcat_id="&cint(request.form("id"))&"")
  response.redirect "admin_dj.asp?action=djcat"

elseif request.form("action")="deldjcat" 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
if request.Form("sid")="0" then
sql="select djcat_id from xy57_djcat where sid="&clng(request.form("id"))
set rsd=conn.execute(sql)
do while not rsd.eof
   Conn.Execute ("DELETE * FROM xy57_dj WHERE djcat_id="&rsd("djcat_id"))
rsd.movenext
loop
rsd.close
set rsd=nothing
   Conn.Execute ("DELETE * FROM xy57_djcat WHERE sid="&clng(request.form("id")))
   Conn.Execute ("DELETE * FROM xy57_djcat WHERE djcat_id="&clng(request.form("id")))
else
   Conn.Execute ("DELETE * FROM xy57_djcat WHERE djcat_id="&clng(request.form("id")))
   Conn.Execute ("DELETE * FROM xy57_dj WHERE djcat_id="&clng(request.form("id")))
end if
  Delfolder "../Html/"&clng(request.form("id"))&""
  response.redirect "admin_dj.asp?action=djcat"
end if
end if

if request.querystring("action")="djerror" then
%>
<table align="center" width="98%" align="center" border="1" cellspacing="0" cellpadding="4" class=xy57_cn_bk style="border-collapse: collapse">
<form name=form method=post action="admin_dj.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=xy57_cn_ss> 
<td colspan="4">错误连接管理</td>
</tr>
<tr class=xy57_cn_qs> 
<td width="5%">选中</td>
<td width="55%">歌曲名称</td>
<td width="20%" align="center">报错人次</td>
<td width="20%" align="center">操作</td>
</tr>
<%
sql="select * from xy57_dj where error > 0 order by dj_id desc"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
do while not rs.eof
%><tr class=xy57_cn_ds><td><input type=checkbox Name=dj_id Value=<%=rs("dj_id")%>></td>
<td><a href="../Play.asp?id=<%=rs("dj_id")%>" target="_blank"><%=rs("dj_name")%></td>
<td align="center"><%=rs("error")%></td>
            <td  align="center"><a href="admin_dj.asp?id=<%=rs("dj_id")%>&action=editerror">修改</a></td>
        </tr>
<%rs.movenext
loop
if rs.eof and rs.bof then
Response.Write("<tr class=xy57_cn_ds><td align=""center"" colspan=""4"">当前还没有错误歌曲</td></tr>")
end if%>
<tr class=xy57_cn_qs> <td class=xy57_cn_qs colspan="4">
            <input type=hidden value=error name=operation>
	 <input type="checkbox" name="chkall" onClick="CheckAll(this.form)" value="ON">选中本页所有 <input type=submit value=批量恢复 onClick="return confirm('确定恢复选中的歌曲吗?');"> *此功能可批量恢复误报错误(清空报错次数)</td></tr></form>

</table>
<%
rs.close
set rs=nothing
end if

if request.querystring("action")="djcat" then
%>
<table align="center" width="98%" align="center" border="1" cellspacing="0" cellpadding="4" class=xy57_cn_bk style="border-collapse: collapse">
<tr> 
<td colspan="4" class=xy57_cn_ss>歌曲移动、合并管理(请慎重操作,操作后不可还原!)</font></td>
</tr>
<form method="post" action="?action=moves">
<tr align="center"> 
<td height=22 align=center class=xy57_cn_qs>将:
<select size="1" name="cat1">
<%
sql="select * from xy57_djcat where sid=0"
set rs1=conn.execute(sql)
do while not rs1.eof
response.write "<optgroup label='"&rs1("djcat_name")&"'>"
sql="select * from xy57_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="<%=rs2("djcat_id")%>">├ <%=rs2("djcat_name")%></option>
<%
rs2.movenext
loop
rs1.movenext
loop
rs2.close
set rs2=nothing
rs1.close
set rs1=nothing%>
</select> 分类歌曲,移动到: 
<select size="1" name="cat2">
<%
sql="select * from xy57_djcat where sid=0"
set rs1=conn.execute(sql)
do while not rs1.eof
response.write "<optgroup label='"&rs1("djcat_name")&"'>"
sql="select * from xy57_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="<%=rs2("djcat_id")%>">├ <%=rs2("djcat_name")%></option>
<%
rs2.movenext
loop
rs1.movenext
loop
rs2.close
set rs2=nothing
rs1.close
set rs1=nothing%>
</select>分类里。
<input type="submit" value="移动合并" name="B2">
</td></tr>
</form>
</table>
<%
sql="select * from xy57_djcat where sid=0 order by djcat_id DESC"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
%> 
<br>
<table align="center" width="98%" align="center" border="1" cellspacing="0" cellpadding="4" class=xy57_cn_bk style="border-collapse: collapse">
        <tr class=xy57_cn_ss> 
          <td colspan="4">歌曲分类管理</td>
        </tr>
        <tr align="center" class=xy57_cn_qs> 
          <td width="10%">编号</td>
          <td width="50%" class=xy57_cn_qs>分类名称</td>
          <td width="20%" class=xy57_cn_qs>子栏目</td>
          <td width="20%">操作</td>
        </tr>
        <%do while not rs.eof%>
        <tr class=xy57_cn_ds> 
          <td align="center"><%=rs("djcat_id")%> </td>
          <td><font color=#008000><%=rs("djcat_name")%></font> [<a href="admin_dj.asp?id=<%=rs("djcat_id")%>&action=newdjcat">添加子分类</a>]</td>
          <td class=xy57_cn_ds align="center"><%
           sql3 = "select * from xy57_djcat where sid="&rs("djcat_id")&""
           Set rs3 = Server.CreateObject("ADODB.RecordSet")
           rs3.Open sql3,conn,1,1
           response.write rs3.recordcount&"个"%></td>
          <td align="center"><a href="admin_dj.asp?id=<%=rs("djcat_id")%>&action=editdjcat">编辑</a> 
            <font color=blue title='系统项目,不能删除'>系统项目</font> </td>
        </tr>
       <%sql="select * from xy57_djcat where sid="&rs("djcat_id") 
        set rs2=server.createobject("adodb.recordset")
        rs2.open sql,conn,1,1
        do while not rs2.eof%>
        <tr class=xy57_cn_ds><td align="right"></td><td>├ <%=rs2("djcat_name")%></td>
        <td align="left">歌曲:<%
		    sql4 = "select * from xy57_dj where djcat_id="&rs2("djcat_id")&" order by djcat_id desc"
		    Set rs4 = Server.CreateObject("ADODB.RecordSet")
		    rs4.Open sql4,conn,1,1
		    response.write rs4.recordcount%>首</td>
       <td align="center"><a href="admin_dj.asp?id=<%=rs2("djcat_id")%>&action=editdjcat">编辑</a> 
            <a href="admin_dj.asp?id=<%=rs2("djcat_id")%>&sid=<%=rs2("sid")%>&action=deldjcat">删除</a></td></tr>
        <%
        rs2.movenext
        loop
        response.write "<tr class=xy57_cn_qs><td colspan=4 align=center>"
        if rs2.bof and rs2.eof then
        response.write "此大类没有子分类!"
        end if
        rs2.close
        set rs2=nothing
        %>
        <%rs.movenext
        loop
        if rs.bof and rs.eof then%>
        <tr align="center" class=xy57_cn_ds> 
          <td colspan="4">当前没有歌曲分类!</td>
        </tr>
        <%rs.close
        set rs=nothing
	end if%>
      </table>
<%
end if
if request.querystring("action")="newdjcat" then
%> 
      <table align="center" width="98%" align="center" border="1" cellspacing="0" cellpadding="4" class=xy57_cn_bk style="border-collapse: collapse">
       <form name="form1" method="post" action=""><tr class=xy57_cn_ss><td>新增歌曲分类</td></tr>
        <tr class=xy57_cn_ds> 
            <td>分类名称-<input type="text" name="djcat_name" size="40" class="textarea">
          </td>
        </tr>
        <tr class=xy57_cn_qs> 
            <td align="center">
              <input type="submit" name="Submit" value="确定新增" class="button">
              <input type="reset" name="Reset" value="清空重填" class="button">
            </td>
        </tr>
                <input type="hidden" name="id" value="<%=clng(request.querystring("id"))%>">
		<input type="hidden" name="action" value="newdjcat">
		<input type="hidden" name="MM_insert" value="true">
		</form>
      </table>
<%end if
'================www.xy57.com===============
if request.QueryString("action")="editdjcat" then
if request.querystring("id")="" then
  Response.Write("<script language=javascript>alert('请指定操作的对象!');history.back(1);</script>")
  response.end
else
  if not isinteger(request.querystring("id")) then
    Response.Write("<script language=javascript>alert('非法的歌曲分类ID参数!');history.back(1);</script>")
    response.end
  end if
end if
sql="select * from xy57_djcat where djcat_id="&cint(request.querystring("id"))
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
%>
      <table align="center" width="98%" align="center" border="1" cellspacing="0" cellpadding="4" class=xy57_cn_bk style="border-collapse: collapse">
        <form name="form1" method="post" action="">
          <tr class=xy57_cn_ss> 
            <td>修改歌曲分类</td>
          </tr>
          <tr class=xy57_cn_ds> 
            <td>分类名称-<input name="djcat_name" type="text" class="textarea" id="djcat_name" size="40" value="<%=rs("djcat_name")%>"> 
            </td>
          <tr> 
            <td class=xy57_cn_ds>所属分类- 
            <select size="1" name="lid">
            <option value="<%=rs("sid")%>">默认分类</option>
            <option value="0">设为大类</option>
<%
sql="select * from xy57_djcat where sid=0"
set rs1=conn.execute(sql)
do while not rs1.eof
'response.write "<optgroup label='"&rs1("djcat_name")&"'>"
%>
              <option value="<%=rs1("djcat_id")%>">├ <%=rs1("djcat_name")%></option>
<%
rs1.movenext
loop
rs1.close
set rs1=nothing%>
</select>   特别提示:当你要改变分类属性操作时,请确保类下无歌曲!是大类时,请确保其下无小类!
            </td>
          </tr>
          </tr>
          <tr class=xy57_cn_qs> 
            <td align="center"> <input name="Submit" type="submit" class="button" id="Submit" value="确定修改"> 
              <input name="Reset" type="reset" class="button" id="Reset" value="清空重填"> </td>
          </tr>
          <input type="hidden" name="id" value="<%=rs("djcat_id")%>">
          <input type="hidden" name="action" value="editdjcat">
          <input type="hidden" name="MM_insert" value="true">
        </form>
      </table>
<%
rs.close
set rs=nothing
end if
if request.QueryString("action")="deldjcat" then
if request.querystring("id")="" then
  Response.Write("<script language=javascript>alert('请指定操作的对象!');history.back(1);</script>")
  response.end
else
  if not isinteger(request.querystring("id")) then
    Response.Write("<script language=javascript>alert('非法的歌曲分类ID参数!');history.back(1);</script>")
    response.end
  end if
end if
sql="select * from xy57_djcat where djcat_id="&cint(request.querystring("id"))
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
%>
    <table align="center" width="98%" align="center" border="1" cellspacing="0" cellpadding="4" class=xy57_cn_bk style="border-collapse: collapse">
        <form name="form1" method="post" action="">
          <tr class=xy57_cn_ss> 
            <td>删除歌曲分类</td>
          </tr>
          <tr class=xy57_cn_ds> 
            <td>分类名称- <%=rs("djcat_name")%>
            </td>
          </tr>
          <tr> 
            <td class=xy57_cn_ds><%if request.querystring("sid")="0" then%>友情提示:你要删除的是歌曲的大分类,此操作将同时删除其下的小类和所有的类下歌曲和相关Html文件,请慎重!<%else%>友情提示:删除分类,将删除此分类下的所有歌曲和相关Html文件,请慎重!<%end if%></td>
          </tr>
          <tr class=xy57_cn_qs> 
          <input type="hidden" name="id" value="<%=rs("djcat_id")%>">
          <input type="hidden" name="sid" value="<%=clng(request.querystring("sid"))%>">
          <input type="hidden" name="action" value="deldjcat">
          <input type="hidden" name="MM_insert" value="true">
            <td align="center"> 
              <input name="Submit" type="submit" class="button" id="Submit" value="确定删除">
            </td>
          </tr>
        </form>
      </table>
<%
rs.close
set rs=nothing
end if
'================www.xy57.com===============
if request.querystring("action")="moves" then
cat1=clng(trim(request("cat1")))
cat2=clng(trim(request("cat2")))
conn.Execute = "update xy57_dj set djcat_id="&cat2&" where djcat_id="&cat1&""
set conn=nothing
Response.Redirect "admin_dj.asp?action=djcat"
end if
if request.QueryString("action")="checkpass" then
sql="select * from xy57_dj where dj_id="&clng(request.querystring("id"))
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,3
rs("passed")=0
rs.update
tjuser=rs("tjuser")
rs.close
set rs=nothing
conn.execute ("UPDATE [xy57_user] SET points = points + "&fbpoints&" where username='"&tjuser&"'")
response.redirect Request.ServerVariables("http_referer")
end if
if request.form("operation")="移进回收站" then
num=request.form("dj_id").Count
for i=1 to num
  conn.execute("UPDATE xy57_dj SET Deleted=1 where dj_id="&request.form("dj_id")(i))
  next
end if
if request.form("operation")="批量置顶" then
num=request.form("dj_id").Count
for i=1 to num
   conn.execute("UPDATE xy57_dj SET IsTop=1 where dj_id="&request.form("dj_id")(i))
  next
end if
if request.form("operation")="取消置顶" then
num=request.form("dj_id").Count
for i=1 to num
   conn.execute("UPDATE xy57_dj SET IsTop=0 where dj_id="&request.form("dj_id")(i))
  next
end if
if request.form("operation")="批量推荐" then
num=request.form("dj_id").Count
for i=1 to num
   conn.execute("UPDATE xy57_dj SET IsBest=1 where dj_id="&request.form("dj_id")(i))
  next
end if
if request.form("operation")="取消推荐" then
num=request.form("dj_id").Count
for i=1 to num
   conn.execute("UPDATE xy57_dj SET IsBest=0 where dj_id="&request.form("dj_id")(i))
  next
end if
if request.form("operation")="批量生成舞曲" then
num=request.form("dj_id")

response.write "<script language=javascript>location.href='Admin_Make_Dj.asp?type=id&id="&num&"';</script>"
end if
if request.form("operation")="error" then
num=request.form("dj_id").Count
for i=1 to num
  conn.execute("UPDATE xy57_dj SET error=0 where dj_id="&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=xy57_cn_bk style=""border-collapse: collapse"">")
%>
<form name="form3" method="post" action="">
<tr class=xy57_cn_ss> 
<td colspan="7">歌曲管理</td>
<td colspan="2" 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_dj.asp?action=dj">显示所有歌曲</option>
<%sql="select * from xy57_djcat where sid=0"
set rs1=conn.execute(sql)
do while not rs1.eof
response.write "<optgroup label='"&rs1("djcat_name")&"'>"
sql="select * from xy57_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_dj.asp?action=dj&djcat_id=<%=rs2("djcat_id")%>">├ <%=rs2("djcat_name")%></option>
<%
rs2.movenext
loop
rs1.movenext
loop
rs2.close
set rs2=nothing
rs1.close
set rs1=nothing%>
</select></td>
</tr></form>
<%
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 xy57_dj where djcat_id="&djcat_id&" and Deleted=0 order by dj_id desc"
   Url_Add=Url_Add&"djcat_id="&djcat_id&"&"
elseif request("keyword")<>""  then
   keyword=trim(replace(request("keyword"),"'",""))
   sea_type=trim(replace(request("sea_type"),"'",""))
   sql_tmp=1
   sql="select * from xy57_dj where "&sea_type&" like '%"&keyword&"%' and Deleted=0 order by dj_id DESC"
   Url_Add=Url_Add&"sea_type="&sea_type&"&keyword="&keyword&"&"
elseif request.querystring("t")="pass" then
   sql="select * from xy57_dj where Deleted=0 and passed=1 order by dj_id desc"
   Url_Add=Url_Add&"t=pass&"
else
   sql="select * from xy57_dj where Deleted=0 and passed=0 order by istop desc, dj_id 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=xy57_cn_ds colspan=9>当前没有歌曲!</td></tr>")
Else
   Dim dj_Nums,MultiPages,j
   rs.PageSize=adflperpage
   rs.AbsolutePage=CurPage
   dj_Nums=rs.RecordCount
   MultiPages="<tr><td class=xy57_cn_qs colspan=""9"" align=""center"">共有歌曲:"&dj_Nums&"首。&nbsp;&nbsp;"&MultiPage(dj_Nums,adflperpage,CurPage,Url_Add)&"</td></tr>"
%>
<form name="form4" method="post" action="admin_dj.asp?action=dj">
<tr align="center" class=xy57_cn_qs>
<td colspan="9">搜索(歌曲列表)关键字:
<input type=text name=keyword size=15 maxlength=20>
<select name=sea_type size=1>
<option value='dj_name'>按标题</option>
<option value='tjuser'>按发布人</option>
</select>
<input type=submit value='搜 索'></td>          
</tr></form>
<form name=form method=post action="admin_dj.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=xy57_cn_qs align="center"> 
<td width="5%">选中</td>
<td width="5%">审核</td>
<td width="5%">生成</td>
<td width="32%">歌曲名称<%if sql_tmp="1" then response.write "(搜索结果:"&keyword&")"%></td>
<td width="10%">歌曲分类</td>
<td width="10%">提交人</td>
<td width="12%">加入时间</td>
<td width="5%">评论</td>
<td width="15%">操作</td>
</tr>
<%
Do Until Rs.EOF OR j=rs.PageSize
sql="select djcat_id,djcat_name from xy57_djcat where djcat_id="&rs("djcat_id")
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=xy57_cn_ds>
<td align="center"><input type=checkbox Name=dj_id Value=<%=rs("dj_id")%>></td>
<td align="center"><%If Rs("passed")=1 Then%><a href="?id=<%=rs("dj_id")%>&action=checkpass"><font color=red>pass</font></a><%else%>√<%End If%> </td>
<td width="5%" align="center"><%Call xy57_cn_Html_Url(rs("djcat_id"),rs("dj_id"),1,asphtml)%> </td>  
<td><a href="../Play.asp?id=<%=rs("dj_id")%>" target="_blank"><Font color=<%=rs("Font")%>><%=rs("dj_name")%></Font></a>&nbsp;<font color="red"><%=folder%></font></td>
<td width="10%" align="center"><%=rscat("djcat_name")%></td>
<td width="10%" align="center"><%=rs("tjuser")%></td>
<td  align="center"><%=year(rs("dj_date"))%>-<%=month(rs("dj_date"))%>-<%=day(rs("dj_date"))%></td>
<td align="center"><font color=red><%Call xy57_cn_View_Count(1,rs("dj_id"))%></font></td>
<td  align="center"> <a href="Admin_View.asp?action=dj&dj_id=<%=rs("dj_id")%>">评论</a> <a href="admin_dj.asp?id=<%=rs("dj_id")%>&action=editdj&classid=<%=rs("djcat_id")%>">编辑</a> <a href="Admin_Make_Dj_Html.asp?id=<%=rs("dj_id")%>">生成</a></td>
        </tr> 
<%
rscat.close
set rscat=nothing   
j=j+1
rs.movenext
loop
end if
rs.close
set rs=nothing
%>
        <form name="form1" method="post" action="admin_dj.asp?action=dj&djcat_id=<%=request.querystring("djcat_id")%>">
          <tr class=xy57_cn_qs> <td class=xy57_cn_qs colspan="9">
	 <input type="checkbox" name="chkall" onClick="CheckAll(this.form)" value="ON">选中本页所有 

         <input name="operation" type=submit value=移进回收站 class=button onClick="return confirm('确定将选中的歌曲移进回收站吗?');">

         <input name="action" type=submit value=全部移进回收站 class=button onClick="return confirm('确定将选中的歌曲全部移进回收站吗?可以在回收站中恢复!');">
         <input name="operation" type=submit value=批量置顶 class=button onClick="return confirm('确定将选中的歌曲全部设置置顶吗?');">
         <input name="operation" type=submit value=取消置顶 class=button onClick="return confirm('确定将选中的歌曲取消置顶吗?');">
         <input name="operation" type=submit value=批量推荐 class=button onClick="return confirm('确定将选中的歌曲全部设置推荐吗?');">
         <input name="operation" type=submit value=取消推荐 class=button onClick="return confirm('确定将选中的歌曲取消推荐吗?');">
         <input name="operation" type=submit value=批量生成舞曲 class=button onClick="return confirm('确定将选中的歌曲生成吗?');">
  </td>
</tr>
   </form>
<%
Response.Write(MultiPages)
Response.Write("</table>")
end if

'================www.xy57.com===============
if request.querystring("action")="newdj" then
%>
<table align="center" width="98%" align="center" border="1" cellspacing="0" cellpadding="4" class=xy57_cn_bk style="border-collapse: collapse">
 <form name="form" method="post" action="?action=addnewdj">
   <tr class=xy57_cn_ss> 
      <td>新增歌曲——选择分类</font></td>
   </tr>
  <tr class=xy57_cn_ds> 
      <td>
         <table cellpadding="4" cellspacing="2" bgcolor='#f7f7f7' width="99%" height="100" align=center style='border:1px dashed #808080;padding:20px'>
           <tr>
              <td width="40%" align=right>选择歌曲的分类:</td>
              <td width="60%" align=left>
              <select name="sort_id">
<%
sql="select * from xy57_djcat where sid=0"
set rs1=conn.execute(sql)
do while not rs1.eof
response.write "<optgroup label='"&rs1("djcat_name")&"'>"
sql="select * from xy57_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="<%=rs2("djcat_id")%>$$<%=rs2("djcat_name")%>">├ <%=rs2("djcat_name")%></option>
<%
rs2.movenext
loop
rs1.movenext
loop
rs2.close
set rs2=nothing
rs1.close
set rs1=nothing%>
</select></td>
         </tr>
         <tr>
            <td height='30' colspan="2" width='100%' align=center>
            <input type=hidden name="sort_chose" value="1">
            <input type=submit value="开始添加歌曲" class="button">
            <input onclick='history.back(-1)' type=button value="返回" class="button"></td>
         </tr></form>
       </table>
     </td>
  </tr>
</table>
<%
end if
'================www.xy57.com===============
if request.querystring("action")="addnewdj" then
dim sort_id
sort_id=trim(request.form("sort_id"))
if request.form("sort_chose")<>"1" OR sort_id="" then
   Response.Write("<script language=javascript>alert('你必须先选择歌曲分类!');history.back(1);</script>")
   response.end
end if
sort_id=split(sort_id,"$$")
%>
<script language=javascript>
function checkreg()
{
  if (document.form2.tjuser.value=="")
	{
	alert("亲爱的,怎么忘了输入用户名!");
	document.form2.tjuser.focus();
	return false;
	}
  else
    {
	document.reg.tjuser.value=document.form2.tjuser.value;
	var popupWin = window.open('CheckUser.asp', 'CheckReg', 'scrollbars=no,width=430,height=200');
	document.reg.submit();
	}
}
</script>
     <table align="center" width="98%" align="center" border="1" cellspacing="0" cellpadding="4" class=xy57_cn_bk style="border-collapse: collapse">
        <form name="form2" method="post" action="">
          <tr class=xy57_cn_ss> 
            <td colspan="2">新增歌曲</td>
          </tr>
          <tr class=xy57_cn_ds> 
            <td width="17%" align="right">歌曲名称:</td>
            <td width="83%"><input type="text" name="name" size="40">
          <select name="Font" id="Font">
          <option value="" selected>黑色醒目</option>
          <option value="red">红色醒目</option>
          <option value="green">绿色醒目</option>
          <option value="blue">蓝色醒目</option>
          <option value="FF00FF">粉红醒目</option>
          </td>
          </tr>
          <tr class=xy57_cn_ds> 
            <td align="right">歌曲分类:</td>
            <td><%=sort_id(1)%></td>
          </tr>
          <tr class=xy57_cn_ds> 
            <td align="right">歌曲选项:</td>
            <td><select name="pic">
<option value="rm">播放类型</option>
<option value="rm">Real音乐</option>
<option value="mp3">Media音乐</option>
<option value="rmvb">Real视频</option>
<option value="asf">Media视频</option>
<option value="flv">Flv视频</option>
<option value="swf">Swf视频</option>
</select>&nbsp;&nbsp;
<select name="desc">
<option value="☆☆★★★">推荐等级</option>
<option value="☆☆☆☆★">☆☆☆☆★</option>
<option value="☆☆☆★★">☆☆☆★★</option>
<option value="☆☆★★★">☆☆★★★</option>
<option value="☆★★★★">☆★★★★</option>
<option value="★★★★★">★★★★★</option>
              </select>
            </td>
          </tr>
          <tr class=xy57_cn_ds> 
            <td align="right">选择专辑:</td>
            <td><select name="Specialid" size="1">
                <option value="0" selected>不选择专辑</option>
                <%sql="select * from xy57_djspecial where classid="&clng(sort_id(0))
                  set rs5=server.createobject("adodb.recordset")
	          rs5.open sql,conn,1,1
	          Do while not rs5.eof%>
                  <option value="<%=rs5("Specialid")%>"><%=rs5("name")%></option>
                <%rs5.MoveNext
                  Loop
	          rs5.close%>
                 </select> *可以不选择专集</td>
          </tr>
          <tr class=xy57_cn_ds> 
            <td align="right">歌手姓名:</td>
            <td> 
              <input type="text" name="user" id="writer1" size="20" value="<%=webname%>">&nbsp;<button onClick="writer1.value='网络转摘'" class=button>网络转摘</button>&nbsp;<button onClick="writer1.value='本站原创'" class=button>本站原创</button>&nbsp;<button onClick="writer1.value='<%=request.cookies("AdminName")%>'" class=button><%=request.cookies("AdminName")%></button>&nbsp;<button onClick="writer1.value='<%=webname%>'" class=button><%=webname%></button>
            </td>
          </tr>
          <tr class=xy57_cn_ds> 
            <td align="right">服 务 器:</td>
            <td>
     <select name="d_path" size="1">
<option  selected  value="0">不设置</option>
<%
set rs6=server.createobject("adodb.recordset")
sql="select * from xy57_DJServer"
rs6.open sql,conn,1,1
do while not rs6.eof
%>
<option value="<%=rs6("DjServerId")%>"><%=rs6("DjServerName")%> - <%=rs6("DjServerUrl")%></option>
<%
rs6.movenext
loop
rs6.close
%>
    </select>
         </td>
          </tr>
          <tr class=xy57_cn_ds> 
            <td align="right">歌曲地址:</td> 
            <td><input type="text" name="url" size="48"></td>
          </tr>
          <tr class=xy57_cn_ds> 
            <td align="right">上传歌曲:</td> 
            <td><IFRAME name=upload_frame src="Upload.asp?action=url" frameBorder=0 width="100%" scrolling=no height=25></IFRAME></td>
          </tr>
          <tr class=xy57_cn_ds> 
            <td align="right">下载地址:</td>
            <td> 
              <input type="text" name="downurl" size="48">	<FONT COLOR="red">这里是设置Mp3格式的,RM格式不用!</FONT>
            </td>
          </tr>   
          <tr class=xy57_cn_ds> 
            <td align="right">文本歌词:</td>
            <td> 
              <textarea rows="6" name="Word" cols="60"></textarea>
            </td>
          </tr>    
          <tr class=xy57_cn_ds> 
          <td align="right">下载等级:</td> 
          <td><select name="Grade" id="Grade">
          <option value="0">游客下载</option>
          <option value="1" selected>普通用户</option>
          <option value="2">VIP 用户</option>
        </select>&nbsp;&nbsp;扣除会员积分数:<input type="text" name="points" size="4" value="0"> (应添0或正整数数字)</td>
          </tr>
          <tr class=xy57_cn_ds> 
          <td align="right">添 加 人:</td> 
          <td><input type="text" name="tjuser" size="10" value="<%=request.cookies("AdminName")%>"><input name="Check" type="button" id="Check" value="自动检查" onClick="checkreg();" class="INPUT">	<FONT COLOR="red">这个人一定要是前台注册用户!不能乱写!否则会出错!</FONT></td>
          </tr>
          <tr class=xy57_cn_qs align="center"> 
            <td colspan="2"> 
              <input type="checkbox" name="istop" value="1">
              置顶&nbsp;&nbsp;&nbsp;<input type="checkbox" name="isbest" value="1">
              推荐&nbsp;&nbsp;&nbsp; 
              <input type="submit" name="Submit" value="确定新增" class="button">
              <input type="reset" name="Reset" value="清空重填" class="button">
              [<a href="admin_dj.asp?action=dj">返回</a>] </td>
          </tr><input type=hidden name="djcatid" value="<%=sort_id(0)%>">
		<input type="hidden" name="action" value="newdj">
		 <input type="hidden" name="MM_insert" value="true">
        </form>
          <form name='reg' action='CheckUser.asp?lid=1' method='post' target='CheckReg'>
          <input type='hidden' name='tjuser' value=''>
        </form>
      </table>
<table align="center" width="98%" align="center" border="1" cellspacing="0" cellpadding="4" class=xy57_cn_bk style="border-collapse: collapse">
<tr class=xy57_cn_ss> 
<td>类型说明</td>
</tr>
<tr class=xy57_cn_ds>
<td>
<FONT COLOR="#0000FF">1."<FONT COLOR="#FF0000">.mp3.mid.wma.asf.wmv<FONT COLOR="#0000FF">"文件请选择Media系列<br>
2."<FONT COLOR="#FF0000">.ram.rm.rmvb<FONT COLOR="#0000FF">"文件请选择Real系列<br>
3."<FONT COLOR="#FF0000">.flv<FONT COLOR="#0000FF">"文件请选择Flv系列<br>
4."<FONT COLOR="#FF0000">.swf<FONT COLOR="#0000FF">"文件请选择Swf系列
</td></tr></table>
<%end if
'================www.xy57.com===============
if request.QueryString("action")="editdj" then
if request.querystring("id")="" then
  Response.Write("<script language=javascript>alert('请指定操作的对象!');history.back(1);</script>")
  response.end
else
  if not isinteger(request.querystring("id")) then
    Response.Write("<script language=javascript>alert('非法的歌曲ID参数!');history.back(1);</script>")
	response.end
  end if
end if
sql="select * from xy57_dj where dj_id="&cint(request.querystring("id"))
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
%>
<table align="center" width="98%" align="center" border="1" cellspacing="0" cellpadding="4" class=xy57_cn_bk style="border-collapse: collapse">
        <form name="form2" method="post" action="">
          <tr class=xy57_cn_ss> 
            <td colspan="2">修改歌曲</td>
          </tr>
          <tr class=xy57_cn_ds> 
            <td width="17%">歌曲选项:</td>
            <td width="83%">
<select name="djcatid" size="1" onChange="window.open('admin_dj.asp?id=<%=rs("dj_id")%>&action=editdj&classid='+this.options[this.selectedIndex].value,'_self')"> 
            <%
sql="select * from xy57_djcat where sid=0"
set rs1=conn.execute(sql)
do while not rs1.eof
response.write "<optgroup label='"&rs1("djcat_name")&"'>"
sql="select * from xy57_djcat where sid="&rs1("djcat_id") 
set rs2=server.createobject("adodb.recordset")
rs2.open sql,conn,1,1
do while not rs2.eof
%>
    <option<%if cstr(request("classid"))=cstr(rs2("djcat_id")) and request("classid")<>"" then%> selected<%end if%> value="<%=rs2("djcat_id")%>" name=djcatid>├ <%=rs2("djcat_name")%></option>
<%
rs2.movenext
loop
rs1.movenext
loop
rs2.close
set rs2=nothing
rs1.close
set rs1=nothing%>
</select>
<select name="pic">
<option value="rm" <%if rs("dj_pic")="rm" then response.write "selected" end if%>>Real音乐</option>
<option value="mp3" <%if rs("dj_pic")="mp3" then response.write "selected" end if%>>Media音乐</option>
<option value="rmvb" <%if rs("dj_pic")="rmvb" then response.write "selected" end if%>>Real视频</option>
<option value="asf" <%if rs("dj_pic")="asf" then response.write "selected" end if%>>Media视频</option>
<option value="flv" <%if rs("dj_pic")="flv" then response.write "selected" end if%>>Flv视频</option>
<option value="swf" <%if rs("dj_pic")="swf" then response.write "selected" end if%>>Swf视频</option>
</select>
<select name="desc">
<option value="☆☆☆☆★">☆☆☆☆★</option>
<option value="☆☆☆★★">☆☆☆★★</option>
<option value="☆☆★★★" selected>☆☆★★★</option>
<option value="☆★★★★">☆★★★★</option>
<option value="★★★★★">★★★★★</option>
              </select>
            </td>
          </tr>
          <tr class=xy57_cn_ds> 
            <td width="17%">选择专辑:</td>
            <td width="83%"> 
              <%if request("classid")<>"" then%>
<select name="Specialid" size="1">
<option value="0" <%if rs("Specialid")="0" then%> selected<%end if%>>不属任何专辑</option>
<%
	sql="select * from xy57_djspecial where classid="&request("classid")
        set rs5=server.createobject("adodb.recordset")
	rs5.open sql,conn,1,1
	Do while not rs5.eof
%>
<option<%if cstr(rs("Specialid"))=CStr(rs5("Specialid")) then%> selected<%end if%> value="<%=CStr(rs5("Specialid"))%>" name=Specialid><%=rs5("name")%></option>
<%
	rs5.MoveNext
	Loop
	rs5.close
else
%>
<select name="Specialid" size="1">
<option value="0" selected>不属任何专辑</option>
<%end if%>
</select> 
            </td>
          </tr>
          <tr class=xy57_cn_ds> 
            <td width="17%">歌曲名称:</td>
            <td width="83%"> 
              <input name="name" type="text" class="textarea" id="name" size="40" value="<%=rs("dj_name")%>">
          <select name="Font">
          <option value=""<%if rs("Font")="" Then response.write(" selected") End If%> >黑色醒目</option>
          <option value="red"<%if rs("Font")="red" Then response.write(" selected") End If%> >红色醒目</option>
          <option value="green"<%if rs("Font")="green" Then response.write(" selected") End If%> >绿色醒目</option>
          <option value="blue"<%if rs("Font")="blue" Then response.write(" selected") End If%> >蓝色醒目</option>
          <option value="#FF00FF"<%if rs("Font")="#FF00FF" Then response.write(" selected") End If%> >粉红醒目</option>
              </select> <FONT COLOR="red">醒目标题只在首页和分类页面有效!</FONT>
            </td>
          </tr>
          <tr class=xy57_cn_ds> 
            <td width="17%">歌手姓名:</td>
            <td width="83%"> 
              <input name="user" type="text" class="textarea" id="writer1" size="20" value="<%=rs("dj_user")%>">&nbsp;<button onClick="writer1.value='网络转摘'" class=button>网络转摘</button>&nbsp;<button onClick="writer1.value='本站原创'" class=button>本站原创</button>&nbsp;<button onClick="writer1.value='<%=request.cookies("AdminName")%>'" class=button><%=request.cookies("AdminName")%></button>&nbsp;<button onClick="writer1.value='<%=webname%>'" class=button><%=webname%></button>
            </td>
          </tr>
          <tr class=xy57_cn_ds> 
            <td width="17%">服 务 器:</td>
            <td width="83%">
<%
if rs("path")<>"" then
%><select name="d_path" size="1">
<option value="0">不设置</option>
<%
set rs6=server.createobject("adodb.recordset")
sql="select * from xy57_DJServer"
rs6.open sql,conn,1,1
do while not rs6.eof
%>
<option <%if cstr(rs("path"))=cstr(rs6("DjServerId")) then%> selected <%end if%> value="<%=rs6("DjServerId")%>"><%=rs6("DjServerName")%> - <%=rs6("DjServerUrl")%></option>
<%
rs6.movenext
loop
rs6.close
else
%>

<select name="d_path" size="1">
<%
set rs6=server.createobject("adodb.recordset")
sql="select * from xy57_DJServer"
rs6.open sql,conn,1,1
do while not rs6.eof
%>
<option value="<%=rs6("DjServerId")%>"><%=rs6("DjServerName")%></option>
<%
rs6.movenext
loop
rs6.close
end if
%>
              </select>
</td>
          </tr>
          <tr class=xy57_cn_ds> 
            <td width="17%">歌曲地址:</td> 
            <td width="83%"><input name="url" type="text" id="url" size="48" value="<%=rs("dj_url")%>"></td>
          </tr>
          <tr class=xy57_cn_ds> 
            <td width="17%">上传歌曲:</td> 
            <td width="83%"><IFRAME name=upload_frame src="Upload.asp?action=url" frameBorder=0 width="100%" scrolling=no height=25></IFRAME></td>
          </tr>
          <tr class=xy57_cn_ds> 
            <td width="17%">下载地址:</td>
            <td width="83%"> 
              <input name="downurl" type="text" id="downurl" size="48" value="<%=rs("mp3_url")%>">	<FONT COLOR="red">这里是设置Mp3格式的,RM格式不用!</FONT>
            </td>
          </tr>
          <tr class=xy57_cn_ds> 
            <td width="17%">文本歌词:</td>
            <td width="83%"> 
              <textarea rows="6" name="Word" cols="60"><%=rs("dj_word")%></textarea>
            </td>
          </tr>
          <tr class=xy57_cn_ds> 
            <td class=xy57_cn_ds>下载等级:</td>
        <td><select name="Grade" id="Grade">
        <option value="0" <%if rs("Grade")="0" then response.write "selected" end if%>>游客下载</option>
        <option value="1" <%if rs("Grade")="1" then response.write "selected" end if%>>普通用户</option>
        <option value="2" <%if rs("Grade")="2" then response.write "selected" end if%>>VIP 用户</option>
        </select>&nbsp;&nbsp;  扣除会员积分数:<input type="text" name="points" size="5" value="<%=rs("points")%>"> **数字整数</td>
          </tr>
          <tr class=xy57_cn_ds> 
            <td>添 加 人:</td>
            <td><input type="text" name="tjuser" size="10" value="<%=rs("tjuser")%>">&nbsp;&nbsp;  <FONT COLOR="red">这个人一定要是前台注册用户!不能乱写!否则会出错!</FONT>
            </td>
          </tr>
          <tr  class=xy57_cn_qs align="center"> 
            <td colspan="2"> <input name="istop" type="checkbox"  id="istop" value="1" <%if rs("istop")=1 then response.write "checked" end if%>>
              置顶&nbsp;&nbsp;&nbsp;<input name="isbest" type="checkbox"  id="isbest" value="1" <%if rs("isbest")=1 then response.write "checked" end if%>>
              推荐&nbsp;&nbsp;&nbsp; 
              <input name="Submit" type="submit" id="Submit" value="确定修改"> 
              <input type="reset" name="Reset" value="清空重填" >
              [<a href="admin_dj.asp?action=dj">返回</a>] </td>
          </tr><input type="hidden" name="id" value="<%=rs("dj_id")%>">
             <input type="hidden" name="action" value="editdj">
          <input type="hidden" name="MM_insert" value="true">
        </form>
      </table>
<table align="center" width="98%" align="center" border="1" cellspacing="0" cellpadding="4" class=xy57_cn_bk style="border-collapse: collapse">
<tr class=xy57_cn_ss> 
<td>类型说明</td>
</tr>
<tr class=xy57_cn_ds>
<td>
<FONT COLOR="#0000FF">1."<FONT COLOR="#FF0000">.mp3.mid.wma.asf.wmv<FONT COLOR="#0000FF">"文件请选择Media系列<br>
2."<FONT COLOR="#FF0000">.ram.rm.rmvb<FONT COLOR="#0000FF">"文件请选择Real系列<br>
3."<FONT COLOR="#FF0000">.flv<FONT COLOR="#0000FF">"文件请选择Flv系列<br>
4."<FONT COLOR="#FF0000">.swf<FONT COLOR="#0000FF">"文件请选择Swf系列
</td></tr></table>
<%
rs.close
set rs=nothing
end if
'================www.xy57.com===============
if request.QueryString("action")="editerror" then
if request.querystring("id")="" then
  Response.Write("<script language=javascript>alert('请指定操作的对象!');history.back(1);</script>")
  response.end
else
  if not isinteger(request.querystring("id")) then
    Response.Write("<script language=javascript>alert('非法的歌曲ID参数!');history.back(1);</script>")
    response.end
  end if
end if
sql="select * from xy57_dj where dj_id="&cint(request.querystring("id"))
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1%>
<table align="center" width="98%" align="center" border="1" cellspacing="0" cellpadding="4" class=xy57_cn_bk style="border-collapse: collapse">
        <form name="form2" method="post" action="">
          <tr class=xy57_cn_ss> 
            <td colspan="2">
            错误连接歌曲</td>
          </tr>
          <tr class=xy57_cn_ds> 
            <td width="17%">歌曲名称:</td>
            <td width="83%"> 
              <input name="name" type="text" class="textarea" id="name" size="40" value="<%=rs("dj_name")%>">
            </td>
          </tr>
          <tr class=xy57_cn_ds> 
            <td width="17%">歌手姓名:</td>
            <td width="83%"> 
              <input name="user" type="text" class="textarea" id="user" size="20" value="<%=rs("dj_user")%>">
            </td>
          </tr>
          <tr class=xy57_cn_ds> 
            <td width="17%">歌曲分类:</td>
            <td width="83%"> 
              <select name="djcatid" id="djcatid">
                <%
sql="select * from xy57_djcat where sid=0"
set rs1=conn.execute(sql)
do while not rs1.eof
response.write "<optgroup label='"&rs1("djcat_name")&"'>"
sql="select * from xy57_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="<%=rs2("djcat_id")%>"<%if rs2("djcat_id")=rs("djcat_id") then response.write "selected" end if%>>├ <%=rs2("djcat_name")%></option>
<%
rs2.movenext
loop
rs1.movenext
loop
rs2.close
set rs2=nothing
rs1.close
set rs1=nothing%>
</select>
<select name="pic">
<option value="rm" <%if rs("dj_pic")="rm" then response.write "selected" end if%>>Real音乐</option>
<option value="mp3" <%if rs("dj_pic")="mp3" then response.write "selected" end if%>>Media音乐</option>
<option value="rmvb" <%if rs("dj_pic")="rmvb" then response.write "selected" end if%>>Real视频</option>
<option value="asf" <%if rs("dj_pic")="asf" then response.write "selected" end if%>>Media视频</option>
<option value="flv" <%if rs("dj_pic")="flv" then response.write "selected" end if%>>Flv视频</option>
<option value="swf" <%if rs("dj_pic")="swf" then response.write "selected" end if%>>Swf视频</option>
</select>
<select name="desc">
<option value="☆☆☆☆★">☆☆☆☆★</option>
<option value="☆☆☆★★">☆☆☆★★</option>
<option value="☆☆★★★" selected>☆☆★★★</option>
<option value="☆★★★★">☆★★★★</option>
<option value="★★★★★">★★★★★</option>
              </select>
            </td>
          </tr>
          <tr class=xy57_cn_ds> 
            <td  width="17%">歌曲地址:</td>
            <td  width="83%">
<%
if rs("path")<>"" then
%><select name="d_path" size="1">
<option value="0">不设置</option>
<%
set rs6=server.createobject("adodb.recordset")
sql="select * from xy57_DJServer"
rs6.open sql,conn,1,1
do while not rs6.eof
%>
<option <%if cstr(rs("path"))=cstr(rs6("DjServerId")) then%> selected <%end if%> value="<%=rs6("DjServerId")%>"><%=rs6("DjServerName")%> - <%=rs6("DjServerUrl")%></option>
<%
rs6.movenext
loop
rs6.close
else
%>

<select name="d_path" size="1">
<%
set rs6=server.createobject("adodb.recordset")
sql="select * from xy57_DJServer"
rs6.open sql,conn,1,1
do while not rs6.eof
%>
<option value="<%=rs6("DjServerId")%>"><%=rs6("DjServerName")%></option>
<%
rs6.movenext
loop
rs6.close
end if
%>
              </select>
              <input name="url" type="text" id="url" size="48" value="<%=rs("dj_url")%>"></td>
          </tr> 
            <td class=xy57_cn_ds colspan="2"> 
              &nbsp;下载等级:
        <select name="Grade" id="Grade">
        <option value="0" <%if rs("Grade")="0" then response.write "selected" end if%>>游客下载</option>
        <option value="1" <%if rs("Grade")="1" then response.write "selected" end if%>>普通用户</option>
        <option value="2" <%if rs("Grade")="2" then response.write "selected" end if%>>VIP 用户</option>
        </select>&nbsp;&nbsp;  扣除会员积分数:<input type="text" name="points" size="5" value="<%=rs("points")%>"> **数字整数
            </td>
          </tr>
          <tr class=xy57_cn_qs align="center"> 
            <td colspan="2"> <input name="isbest" type="checkbox"  id="isbest" value="1" <%if rs("isbest")=1 then response.write "checked" end if%>>
              推荐
              <input name="Submit" type="submit" id="Submit" value="确定修改"> 
              <input type="reset" name="Reset" value="清空重填" >
              [<a href="admin_dj.asp?action=dj">返回</a>] </td>
          </tr>
		  <input type="hidden" name="id" value="<%=rs("dj_id")%>">
          <input type="hidden" name="action" value="editerror">
          <input type="hidden" name="MM_insert" value="true">
        </form>
      </table>
<br>
<table align="center" width="98%" align="center" border="1" cellspacing="0" cellpadding="4" class=xy57_cn_bk style="border-collapse: collapse">
<tr class=xy57_cn_ss> 
<td>类型说明</td>
</tr>
<tr class=xy57_cn_ds>
<td>
<FONT COLOR="#0000FF">1."<FONT COLOR="#FF0000">.mp3.mid.wma.asf.wmv<FONT COLOR="#0000FF">"文件请选择Media系列<br>
2."<FONT COLOR="#FF0000">.ram.rm.rmvb<FONT COLOR="#0000FF">"文件请选择Real系列<br>
3."<FONT COLOR="#FF0000">.flv<FONT COLOR="#0000FF">"文件请选择Flv系列<br>
4."<FONT COLOR="#FF0000">.swf<FONT COLOR="#0000FF">"文件请选择Swf系列
</td></tr></table>
<%
elseif request.form("action")="全部移进回收站" then
   conn.execute "UPDATE xy57_dj SET Deleted=1"
   conn.close
   set conn=nothing
   response.redirect Request.ServerVariables("HTTP_REFERER")
rs.close
set rs=nothing
end if
%>