<!-- #include file="include/admin_onlogin.asp" -->
<!-- #InclUDE file="include/jk_pagecute.asp" -->
<!--#include file="include/con_music_conn.asp"-->
<%
'****************************************************
' 阳光情缘 2006V3.0      Power by sdsun.com.cn
' Email: 27072320@qq.com  , sdsun163@163.com
' Web: http://www.sdsun.com.cn
' Copyright (C) 2006 sdsun.com.cn All Rights Reserved.
'****************************************************

tit="专辑管理"  
index_url="music"
call admin_master(0,0)
call admin_header(0,0)

%>
<tr><td align=center colspan=2 height=30>
  <table border=0>
  <tr>
  <td><a class=h_menu onmouseover=ShowMenu(strMenu_music,100) href='admin_music.asp'>音乐列表</a></td>
  <td width=10></td>
  <td><a href='admin_music_list.asp'>歌曲管理</a></td>
  <td width=10></td>
  <td><a class=h_menu onmouseover=ShowMenu(strMenu_singer,100) href='admin_music_singer.asp'>歌手管理</a></td>
  <td width=10></td>
  <td><a href='admin_music.asp?action=disk_list'>专辑管理</a></td> 
  <td width=10></td>
  <td><a href='admin_music_sort.asp'>音乐分类</a></td>
  <td width=10></td>
  <td><a href='admin_song.asp'>点歌管理</a></td>
  <td width=10></td>
  <td><a href='admin_fav.asp'>歌曲收藏</a></td>
  <td width=10></td>
  <td><a href='admin_disk.asp'>专辑收藏</a></td>
  </tr>
  </table>
</td></tr>
<tr><td colspan=2 align=center>
  <table border=0 cellspacing=0 cellpadding=2>
  <form action='admin_music_search.asp' name="search" method="post">
  <input type=hidden name=sea_term value='only'>
  <input type=hidden name=sea_type value='name'>
  <tr>
  <td>音 乐 搜 索</td>
  <td>&nbsp;<select name='stype' size=1>
<option value='Special'>专辑</option>
<option value='Music'>音乐</option>
<option value='Singer'>歌手</option>
</select></td>
  <td>&nbsp;<input type='text' name='keyword' value='' size=12 maxlength=20 alt='多个关键字请用 空格 格开'></td>
  <td>&nbsp;<select name=s_area size=1>
<option value='' class=mbg_tds>所有地区</option>
<option value='1'>大陆地区</option>
<option value='2'>港台地区</option>
<option value='3'>海外地区</option></select></td>
  <td>&nbsp;<select name=s_sex size=1>
<option value='' class=mbg_tds>所有歌手</option>
<option value='1'>男歌手</option>
<option value='2'>女歌手</option>
<option value='3'>乐队组合</option></select></td>
  <td>&nbsp;<select name=s_lang size=1>
<option value='' class=mbg_tds>语言</option>
<option value='中文'>中文</option>
<option value='粤语'>粤语</option>
<option value='英文'>英文</option>
<option value='日文'>日文</option>
<option value='韩文'>韩文</option>
<option value='其它'>其它</option>
</select></td>
  <td valign=top>&nbsp;<input type=submit value='搜 索'></td>
  </tr>
  </form>
</table>
<%
dim currentpage,classid,nclassid,pagename,maxperpage,totalput,n,sclassid
dim rs2,rs3,sql2,sql3,j,askclassid,asksclassid,mv_page,k,thischar,asknclassid,specialid
dim name,pic,times,yuyan,gongsi,intro,act,gong

select case action
case "disk_main"
  call disk_main()
case "disk_add"
  call disk_add()
case "disk_list"
  call disk_list()
case "disk_good"
  call disk_good()
case "disk_edit"
  call disk_edit()
case "disk_del"
  call disk_del()
case "music_add"
  call music_add()
case else
  call music_main()
end select

sub  music_main()

set rs=server.createobject("adodb.recordset")
set rs2=server.createobject("adodb.recordset")
sql="select * from mv_class order by classid"
rs.open sql,conn_mv,1,1
i=request("id")
if i="" then i=rs("classid")
do while not rs.eof
rs.movenext
loop
rs.close
sql="select * from mv_class where classid="&i
rs.open sql,conn_mv,1,1
if rs.eof then
else
%>
<table class=table cellspacing=1 cellpadding=1>
<tr align=center>
    <td width="12%" height=25>序号</td>
    <td width="53%">分类名称</td>
    <td width="35%">说明</td>
</tr>
<%
sql2="select * from mv_sclass where classid="&rs("classid")&" order by sclassid"
rs2.open sql2,conn_mv,1,1
if rs2.eof then
else
j=0
do while not rs2.eof
j=j+1
%>
<tr>
<td height=22 align=center><%=j%></td>
<td>&nbsp;&nbsp;<a title="进入管理 <%=rs2("sclass")%> 所属歌手 " href=?action=disk_main&classid=<%=rs("classid")%>&sclassid=<%=rs2("sclassid")%>><%=rs2("sclass")%></a></td>
<td class=gray align=center>根据歌手的分类进入添加歌曲</td>
<%
rs2.movenext
loop
end if
rs2.close
end if
rs.close
%>
<tr align=center>
<td align=right><%call admin_read("","系统更新通知","有关您正在使用的这个系统官方站点所发布的更新信息，包括安全补丁，功能升级等；建议在每次登陆管理后台时注意一下。")%>&nbsp;</td>
<td height=25 colspan="2"><script language="javascript" src="http://www.sdsun.com.cn/home/js_css/gx.js"></script></td>
</tr>
</table>
<%
end sub

sub disk_main()
classid=Request.QueryString ("classid")
sclassid=Request.QueryString ("sclassid")
if classid="" and sclassid="" then
	askclassid=Request.QueryString ("askclassid")
	asksclassid=Request.QueryString ("asksclassid")
	mv_page=Request.QueryString ("")
end if
set rs=server.createobject("adodb.recordset")
set rs2=server.createobject("adodb.recordset")
set rs3=server.createobject("adodb.recordset")
%>
<table class=table cellspacing=1 cellpadding=1>
<tr>
<td width="10%" height="30" align=center>
<a href="?action=disk_add&classid=1&sclassid=<%=sclassid%>" title="点击这里可以直接添加专辑">快速添加</a>
</td>
   <td height="20" colspan=3 align="center" width="75%">
      <a href="#a"><B>A</B></a>  
      <a href="#b"><B>B</B></a>  <a href="#c"><B>C</B></a> 
      <a href="#d"><B>D</B></a>  <a href="#e"><B>E</B></a> 
      <a href="#f"><B>F</B></a>  <a href="#g"><B>G</B></a> 
      <a href="#h"><B>H</B></a>  <a href="#i"><B>I</B></a> 
      <a href="#j"><B>J</B></a>  <a href="#k"><B>K</B></a> 
      <a href="#l"><B>L</B></a>  <a href="#m"><B>M</B></a> 
      <a href="#n"><B>N</B></a>  <a href="#o"><B>O</B></a> 
      <a href="#p"><B>P</B></a>  <a href="#q"><B>Q</B></a> 
      <a href="#r"><B>R</B></a>  <a href="#s"><B>S</B></a> 
      <a href="#t"><B>T</B></a>  <a href="#u"><B>U</B></a> 
      <a href="#v"><B>V</B></a>  <a href="#w"><B>W</B></a> 
      <a href="#x"><B>X</B></a>  <a href="#y"><B>Y</B></a> 
      <a href="#z"><B>Z</B></a>
   </td>
</tr>
<%
sql="select * from mv_class order by classid"
rs.open sql,conn_mv,1,1
if rs.eof then
else
	do while not rs.eof
	rs.movenext
	loop
end if
rs.close

sql3="select * from mv_nclass where sclassid="&sclassid&" order by abcd"
rs3.open sql3,conn_mv,1,1
maxperpage=10000

sql="select * from mv_class where classid="&classid
rs.open sql,conn_mv,1,1
if not rs.eof then
end if
if rs3.eof then

Response.Write " <tr><td colspan=4 align=center>尚无任何分类</td></tr>"

else
k=0
do while not rs3.eof
k=k+1
if thischar<>rs3("Abcd") then
thischar=rs3("Abcd")
if i=0 then
Response.Write "<tr align=center><td colspan=3><a name="&thischar&"><b><font class=red_3 face=Verdana, Arial, Helvetica, sans-serif size=4>"&thischar&"</font></b></a></td><td><a href='#top'>TOP</a></td></tr>"
else
Response.Write "<tr align=center><td colspan=4><a name="&thischar&"><b><font class=red_3 face=Verdana, Arial, Helvetica, sans-serif size=4>"&thischar&"</font></b></a></td></tr>"
end if
end if
%>
 <tr height=22 align=center>
     <td width="10%" align=left><%=rs3("nclassID")%></td>
     <td width="45%" align=left><a href='?action=disk_add&classid=<%=rs3("classid")%>&sclassid=<%=rs3("sclassid")%>&nclassid=<%=rs3("nclassID")%>'><%=rs3("nclass")%></a></td>
     <td width="20%"><a href='?action=disk_add&classid=<%=rs3("classid")%>&sclassid=<%=rs3("sclassid")%>&nclassid=<%=rs3("nclassID")%>'>添加专辑</a></td>
     <td width="25%"><a href=?action=disk_list&classid=<%=rs3("classid")%>&sclassid=<%=rs3("sclassid")%>&nclassid=<%=rs3("nclassid")%>>浏览该歌手的所有专辑</a></td>
 </tr>
<%
if k>=maxperpage then exit do
rs3.movenext
loop
end if
rs3.close
%>
</table>
<%
end sub

sub disk_add()
classid=cstr(trim(request.QueryString("classid")))
sclassid=cstr(trim(request.QueryString("sclassid")))
nclassid=cstr(trim(request.QueryString("nclassid")))
%>
<script>
function submitonce(theform){
	//if IE 4+ or NS 6+
	if (document.all||document.getElementById){
	//screen thru every element in the form, and hunt down "submit" and "reset"
	for (i=0;i<theform.length;i++){
		var tempobj=theform.elements[i]
		if(tempobj.type.toLowerCase()=="submit"||tempobj.type.toLowerCase()=="reset")
		//disable em
		tempobj.disabled=true
		}
	}
}
</script>
<table class=table cellspacing=1 cellpadding=1>
<tr align=center>
   <td height="25">
      <table border="0" cellpadding="0" cellspacing="0" width="100%">
       <form method="POST" action="admin_music_view.asp" id=form2 name=form2 onsubmit="submitonce(this);">
           <tr align=center>
              <td width="100%">&nbsp;一级栏目：
              <select class=input name="classid" size="1" onchange="window.open('?action=disk_add&classid='+this.options[this.selectedIndex].value,'_self')">
<%
set rs=server.createobject("adodb.recordset")
sql="select * from mv_class"
rs.open sql,conn_mv,1,1
Do while not rs.eof
%>
                <option<%if classid=cstr(rs("classid")) and classid<>"" then%> selected<%end if%> value="<%=Cstr(rs("classid"))%>"><%=rs("class")%></option>
<%
rs.MoveNext
Loop
rs.close
%>            </select>
              &nbsp;二级栏目：
<%if classid<>"" then%>
              <select class=input name="sclassid" size="1" onchange="window.open('?action=disk_add&classid=<%=request("classid")%>&sclassid='+this.options[this.selectedIndex].value,'_self')">
                <option value="" <%if request("sclassid")="" then%> selected<%end if%>>选择栏目</option>
<%
sql="select * from mv_sclass where classid="&classid
rs.open sql,conn_mv,1,1
Do while not rs.eof
%>
                <option<%if sclassid=cstr(rs("sclassid")) and sclassid<>"" then%> selected<%end if%> value="<%=CStr(rs("sclassid"))%>" name=sclassid><%=rs("sclass")%></option>
<%
rs.MoveNext
Loop
rs.close

else
%>
              <select name="sclassid" size="1">
                <option value="" selected>选择栏目</option>
<%end if%>
              </select>
              &nbsp;三级栏目：
<%if sclassid<>"" then%>
              <select class=input name="nclassid" size="1" onchange="window.open('?action=disk_add&classid=<%=classid%>&sclassid=<%=sclassid%>&nclassid='+this.options[this.selectedIndex].value,'_self')">
                <option value="" <%if nclassid="" then%> selected<%end if%>>选择栏目</option>
<%
sql="select * from mv_nclass where sclassid="&sclassid
rs.open sql,conn_mv,1,1
Do while not rs.eof
%>
                <option<%if cstr(request("nclassid"))=cstr(rs("nclassid")) and nclassid<>"" then%> selected<%end if%> value="<%=CStr(rs("nclassid"))%>" name=nclassid><%=rs("nclass")%></option>
<%
rs.MoveNext
Loop
rs.close
%>
<%else%>
              <select name="nclassid" size="1">
                <option value="" selected>选择栏目</option>
<%end if%>
              </select>
            </td>
         </tr>
      </table>
  </td>
</tr>
<tr align=center>
  <td width="100%" height="25" align=left>
         <table border="0" cellpadding="0" cellspacing="0" width="100%">
            <tr>
                <td width="12%" height="25" align="center">专辑名称：</td>
                <td width="88%"><input  class=input  type="text" name="name" size="20"></td>
            </tr>
            <tr>
                <td height="25" align="center">所属语言：</td>
                <td><select class=input name="yuyan" size="1">
                <option value="国语" selected>国语</option>
                <option value="粤语">粤语</option>
                <option value="英文">英文</option>
                <option value="日韩">日韩</option>
                <option value="韩文">韩文</option>
                <option value="日语">日语</option>
                <option value="国/粤语">国/粤语</option>
                <option value="中/英文">中/英文</option>
                <option value="中/日文">中/日文</option>
                <option value="中/韩文">中/韩文</option>
                </select>
                </td>
             </tr>
　　　　　　 <tr>
　　　　　　　　<td height="25" align="center">所属地区：</td>
                <td><select class=input name="gong" size="1">
                <option value="大陆地区" selected>大陆地区</option>
                <option value="港台地区">港台地区</option>
                <option value="海外地区">海外地区</option>
                </select>
                </td>
             </tr>
             <tr>
                 <td height="25" align="center">唱片公司：</td>
                 <td><input  class=input type="text" name="gongsi" size="20"></td>
             </tr>
             <tr>
                 <td height="25" align="center">发行日期：</td>
                 <td><input class=input  type="text" name="times" size="20"></td>
             </tr>
             <tr>
                 <td height="25" align="center">专辑图片：</td>
                 <td height="25"><input class=input  type="text" name="pic" size="20">&nbsp;<font class=gray>*&nbsp;图片地址，如：images/music/photo/nophoto.gif</font></td>
             </tr>
             <tr>
                 <td align="center">上传图片：</td>
                 <td height="25"><iframe frameborder=0 width='100%' height=23 scrolling=no src='music_upload.asp'></iframe></td>
             </tr>
             <tr>
                 <td height="25" align="center">专辑简介：</td>
                 <td><TEXTAREA class=input name="intro" rows=5 cols="60"></TEXTAREA></td>
             </tr>
         </table>
    </td>
</tr>
<tr align=center>
    <td height="25" align=center class=td>
        <input type="hidden" value="add" name="act"> 
<%if classid="" then%>
        <input type="button" class=input value=" 确 定 " name="cmdok" onclick="window.alert('请先选择栏目！')">&nbsp; 
<%elseif nclassid="" then%>
        <input type="button" class=input value=" 确 定 " name="cmdok" onclick="window.alert('请先选择子栏目！')">&nbsp; 
<%else%>
        <input type="submit" class=input value=" 确 定 " name="cmdok">&nbsp; 
<%end if%>
        <input type="reset" class=input value=" 取 消 " name="cmdcancel"></td>
</tr>
</form>
</table>
<%
end sub

sub disk_list()
if not isempty(request.QueryString("page")) and request.QueryString("page")<>"" then
	currentpage=cint(request.QueryString("page"))
else
	currentpage=1
end if
if request.QueryString("classid")<>"" then
	classid=request.QueryString("classid")
else
	classid=""
end if
if request.QueryString("nclassid")<>"" then
	nclassid=request.QueryString("nclassid")
else
	nclassid=""
end if

set rs=conn_mv.execute("SELECT * FROM mv_class order by classid") 
if not Rs.eof then
	if Left(pagename,5)="admin" and pagename<>"index" then
			do while not rs.eof
			rs.movenext
			loop
		elseif pagename="AddFilelist" or pagename="AddFileModify" or pagename="AddFilelist" then
			do while not rs.eof
			rs.movenext
			loop
		else
			do while not rs.eof
			rs.movenext
			loop
		end if
	else
		do while not rs.eof
		rs.movenext
		loop
	end if
rs.close
%>
<table border="0" width="98%" cellspacing="1" cellpadding="1">
  <tr>
    <td align=center width="100%" valign=top>
<%
if request.QueryString("nclassid")<>"" then
	sql="select * from mv_special where nclassid="+cstr(nclassid)+" order by specialid desc" 
elseif request.QueryString("classid")<>"" then
	sql="select * from mv_special where classid="+cstr(classid)+" order by specialid desc" 
else
	sql="select * from mv_special order by specialid desc" 
end if
rs.open sql,conn_mv,1,1
if rs.eof and rs.bof then 
	response.write "<p align='center'>暂时没有任何专辑</p>" 
else 
	maxperpage=60
	pageUrl="?action=disk_list"
	totalput=rs.recordcount 
	if currentpage<1 then currentpage=1
	if (currentpage-1)*maxperpage>totalput then 
		if (totalput mod maxperpage)=0 then 
			currentpage= totalput \ maxperpage 
		else 
			currentpage= totalput \ maxperpage + 1 
		end if 
	end if 
	if currentpage=1 then 
		showContent 
		showpage totalput,maxperpage,pageUrl
	else 
		if (currentpage-1)*maxperpage<totalput then 
			rs.move  (currentpage-1)*maxperpage 
			dim bookmark 
			bookmark=rs.bookmark 
			showContent 
			showpage totalput,maxperpage,pageUrl
		else 
			currentpage=1 
			showContent 
			showpage totalput,maxperpage,pageUrl
		end if 
	end if 
end if 
rs.close
end sub

sub showContent 
i=0 %>
           <table class=table cellspacing=1 cellpadding=1>
            <tr align=center height=30 align=center>
                <td width="45%"><b>专辑名称</b></td>
                <td width="25%"><b>所属歌手</b></td>
                <td width="10%"><b>添加歌曲</b></td>
                <td width="10%"><b>首页推荐</b></td>
                <td width="5%"><b>修改</b></td>
                <td width="5%"><b>删除</b></td>
              </tr>
<%
do while not rs.eof
	i=i+1
%>
              <tr align=center height=25>
                <td align=left>&nbsp;<%=i%>.<a href="admin_music_list.asp?classid=<%=rs("classid")%>&sclassid=<%=rs("sclassid")%>&nclassid=<%=rs("nclassid")%>&specialid=<%=rs("specialid")%>"><font color=black><%=rs("name")%></font></a></td>
                <td><%=rs("nclass")%></td>
                <td><a href="?action=music_add&specialid=<%=rs("specialid")%>"><FONT color="maroon">进入</FONT></a></td>
                <td><a href="?action=disk_good&act=Setisgood&specialid=<%=rs("specialid")%>&askclassid=<%=classid%>&asksclassid=<%=sclassid%>&asknclassid=<%=nclassid%>&page=<%=Currentpage%>"><%if rs("Isgood")=true then%><font color=red>撤销</font> <%else%> 推荐 <%end if%></a></td>
                <td><a href="?action=disk_edit&specialid=<%=rs("specialid")%>&askclassid=<%=rs("classid")%>&asksclassid=<%=rs("sclassid")%>&asknclassid=<%=rs("nclassid")%>&page=<%=Currentpage%>">修改</a></td>
                <td><a title="不到万一请不要用此功能" href="?action=disk_del&specialid=<%=rs("specialid")%>&classid=<%=rs("classid")%>&asksclassid=<%=rs("sclassid")%>&nclassid=<%=rs("nclassid")%>&page=<%=Currentpage%>"><font color=red>删除</font></a></td> 
              </tr>
<%
	if i>=maxperpage then exit do
rs.movenext
loop
%>
            </table>
<%
end sub 

function showpage(totalnumber,maxperpage,filename)
if totalnumber mod maxperpage=0 then
	n= totalnumber \ maxperpage
else
	n= totalnumber \ maxperpage+1
end if
%>
<form method=Post action="<%=filename%>?classid=<%=classid%>&nclassid=<%=nclassid%>">
  <center>共有<b><%=totalnumber%></b>张专辑
<%if Currentpage<2 then%>
  &nbsp;首页 上一页&nbsp;
<%else%>
  &nbsp<a href="<%=filename%>?page=1&classid=<%=classid%>&nclassid=<%=nclassid%>">首页</a>&nbsp;
  <a href="<%=filename%>?page=<%=Currentpage-1%>&classid=<%=classid%>&nclassid=<%=nclassid%>">上一页</a>&nbsp;
<%
end if
if n-currentpage<1 then
%>
  下一页 末页
<%else%>
  <a href="<%=filename%>?page=<%=Currentpage+1%>&classid=<%=classid%>&nclassid=<%=nclassid%>">下一页</a>
  <a href="<%=filename%>?page=<%=n%>&classid=<%=classid%>&nclassid=<%=nclassid%>">末页</a>
<%end if%>
  &nbsp;页次:<strong><%=Currentpage%>/<%=n%></strong>页
  转到:<select name="page" size="1" onchange="javascript:submit()">
<%for i = 1 to n%>           
  <option value="<%=i%>" <%if cint(Currentpage)=cint(i) then%> selected <%end if%>>第<%=i%>页</option>   
<%next%>   
  </select>        
</form>        
<%end function%>
    </td>
  </tr>
</table>
<%

sub music_add()
specialid=request.QueryString("specialid")
set rs=server.createobject("adodb.recordset")
i=0
sql="select * from mv_special where specialid="&cstr(specialid)
rs.open sql,conn_mv,1,3
if rs.EOF then
	call error()
	Response.End
else
i=i+1
%>
<table class=table cellspacing=1 cellpadding=2>
<tr align=center><td height="30" colspan=3><b>添 加 歌 曲</b></td></tr>
<tr align="left"><td height="50">
<form name="form1" method="POST" action="admin_music_add.asp?action=music_add"> 
<script language="javascript"> 
function setid() 
{ 
str=''; 
if(!window.form1.upcount.value) 
window.form1.upcount.value=1; 
for(i=1;i<=window.form1.upcount.value;i++) 
str+='<li>歌曲名称'+i+':<input  class=input name="musicname'+i+'" size=20>&nbsp;&nbsp;<input class=input  type="text" name="Wma'+i+'" value="'+i+'.Wma" size=8>&nbsp;&nbsp;<select class=input name="classic'+i+'" size="1"><option name=option<%=rs("classid")%><%=i%> selected value="<%=rs("classid")%>,<%=rs("sclassid")%>,<%=rs("nclassid")%>,<%=rs("specialid")%>"><%=rs("name")%></option></select></li>'; 
window.upid.innerHTML=str+''; 
} 
</script>
<li>添加歌曲的数量： 
<input type="text" name="upcount" class=input value="1"> 
<input type="button" name="Button" class=input onclick="setid();" value="设定"> 
</li>
<br>
<li>歌曲的文件格式： 
<input class=input  type="text" name="play" class="play" style="width:20" value="0"> 
<font color=gray>* 数字0代表wma格式 数字1代表rm格式 数字2代表mp3格式</font></li> 
<br>
<li>歌曲的公用地址：
<input class=input  type="text" name="url1" class="tx" style="width:198" value="http://"> 
<font color=gray>* 例如:http://www.sdsun.com.cn/music/</font></li> 
<br>
<li>歌曲的公用地址：
<input class=input  type="text" name="url" class="tx" style="width:198" value=""> 
<font color=gray>* 例如:http://www.sdsun.com.cn/</font></li> 
<br>
<li>歌曲的端口：
<input class=input  type="text" name="urlid" class="tx" style="width:198" value=""> 
<font color=gray>* 例如:8080</font></li>
</td> 
</tr> 
<tr align="center"><td align="left" id="upid" height="50"></td></tr> 
<tr align=center><td height="30">
<input class=input type="submit" name="Submit" value=" 提交 ">&nbsp;  
<input class=input type="reset" name="Submit2" value=" 清除 "> 
</td></tr>
</table></form>
<script language="javascript"> setid(); </script>
<%
end if
rs.close
end sub

sub disk_good()
act=request("act")
page=request.QueryString("page")
askclassid=request.QueryString("askclassid")
asksclassid=request.QueryString("asksclassid")
asknclassid=request.QueryString("asknclassid")
specialid=request.QueryString("specialid")
if act<>"Setisgood" then
	act=request("act")
end if
set rs=server.createobject("adodb.recordset")

if act="Setisgood" then
		
		sql="select Isgood from mv_special where specialid="&specialid
		rs.open sql,conn_mv,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_mv.close
		set conn_mv=nothing
		call error()
		Response.End
	end if
	set rs=nothing
conn_mv.close
set conn_mv=nothing
Response.Redirect "?action=disk_list&classid="+askclassid+"&sclassid="+asksclassid+"&nclassid="+asknclassid+"&page="+page
end sub

sub error()
response.write vbcrlf&"<scRIPT language=Javascript>alert('操作错误！\n\n请到 阳光情缘(http://www.sdsun.com.cn/) 查阅相关贴子！\n\n点击返回... ');javascript:history.go(-1);</scRIPT>"
end sub

sub disk_edit()
classid=cstr(trim(request.QueryString("classid")))
sclassid=cstr(trim(request.QueryString("sclassid")))
nclassid=cstr(trim(request.QueryString("nclassid")))
specialid=request.QueryString("specialid")
askclassid=request.QueryString("askclassid")
asksclassid=request.QueryString("asksclassid")
asknclassid=request.QueryString("asknclassid")
set rs=server.createobject("adodb.recordset")
sql="select * from mv_special where specialid="&specialid
rs.open sql,conn_mv,1,1
if rs.eof then
	call error()
	Response.End 
else
	name=rs("name")
	classid=rs("classid")
	sclassid=rs("sclassid")
	nclassid=rs("nclassid")
	name=rs("name")
	pic=rs("pic")
	times=rs("times")
	yuyan=rs("yuyan")
	gongsi=rs("gongsi")
        gong=rs("gong")
	intro=rs("intro")
rs.close
end if
%>
<table class=table cellspacing=1 cellpadding=1>
<tr height="25" align=center><td>修 改 专 辑</td></tr>
<tr align=center><td>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<form method="POST" action="admin_music_view.asp?specialid=<%=specialid%>&askclassid=<%=request("askclassid")%>&asksclassid=<%=request("asksclassid")%>&asknclassid=<%=request("asknclassid")%>&page=<%=request("page")%>" id=form2 name=form2>
<tr><td width="100%" height="22">&nbsp;一级栏目：
<select class=input  name="classid" size="1" onchange="window.open('?action=disk_edit&specialid=<%=specialid%>&askclassid=<%=askclassid%>&asksclassid=<%=asksclassid%>&asknclassid=<%=asknclassid%>&page=<%=request("page")%>&classid='+this.options[this.selectedIndex].value,'_self')">
<%
sql="select * from mv_class"
rs.open sql,conn_mv,1,1
Do until rs.eof
%>
<option<%if (cstr(request("classid"))=cstr(rs("classid")) and request("classid")<>"") or (cstr(classid)=cstr(rs("classid")) and request("classid")="") then%> Selected<%end if%> value="<%=Cstr(rs("classid"))%>"><%=rs("class")%></option>
<%rs.MoveNext
Loop
rs.close
%>
</select>&nbsp;二级栏目：
<%if request("classid")<>"" or request("sclassid")<>"" then
if request("classid")<>"" then%>
<select class=input  name="sclassid" size="1" onchange="window.open('?action=disk_edit&specialid=<%=request("specialid")%>&askclassid=<%=request("askclassid")%>&asksclassid=<%=request("asksclassid")%>&asknclassid=<%=request("asknclassid")%>&page=<%=request("page")%>&classid=<%=request("classid")%>&sclassid='+this.options[this.selectedIndex].value,'_self')">
<%else%>
<select class=input  name="sclassid" size="1" onchange="window.open('?action=diskl_edit&specialid=<%=request("specialid")%>&askclassid=<%=request("askclassid")%>&asksclassid=<%=request("asksclassid")%>&asknclassid=<%=request("asknclassid")%>&page=<%=request("page")%>&classid=<%=classid%>&sclassid='+this.options[this.selectedIndex].value,'_self')">
<%end if%>
<option value="" <%if request("sclassid")="" then%> selected<%end if%>>选择栏目</option>
<%
if request("classid")<>"" then
sql="select * from mv_sclass where classid="&request("classid")
else
sql="select * from mv_sclass where classid="&classid
end if
rs.open sql,conn_mv,1,1
Do while not rs.eof
%>
<option<%if (cstr(request("sclassid"))=cstr(rs("sclassid")) and request("sclassid")<>"") then%> selected<%end if%> value="<%=CStr(rs("sclassid"))%>" name=sclassid><%=rs("sclass")%></option>
<%
rs.MoveNext
Loop
rs.close
else
%>
<select  class=input name="sclassid" size="1" onchange="window.open('?action=disk_edit&specialid=<%=request("specialid")%>&askclassid=<%=request("askclassid")%>&asksclassid=<%=request("asksclassid")%>&asknclassid=<%=request("asknclassid")%>&page=<%=request("page")%>&classid=<%=request("classid")%>&sclassid='+this.options[this.selectedIndex].value,'_self')">
<option value="">选择栏目</option>
<%
sql="select * from mv_sclass where classid="&classid
rs.open sql,conn_mv,1,1
Do while not rs.eof
%>
<option<%if cstr(sclassid)=cstr(rs("sclassid")) then%> selected<%end if%> value="<%=CStr(rs("sclassid"))%>" name=sclassid><%=rs("sclass")%></option>
<%
rs.MoveNext
Loop
rs.close
end if
%>
</select>&nbsp;三级栏目：
<%if request("sclassid")<>"" or request("nclassid")<>"" then
if request("sclassid")<>"" then%>
<select class=input  name="nclassid" size="1" onchange="window.open('?action=disk_edit&specialid=<%=request("specialid")%>&askclassid=<%=request("askclassid")%>&asksclassid=<%=request("asksclassid")%>&asknclassid=<%=request("asknclassid")%>&page=<%=request("page")%>&classid=<%=request("classid")%>&sclassid=<%=request("sclassid")%>&nclassid='+this.options[this.selectedIndex].value,'_self')">
<%else%>
<select  class=input name="nclassid" size="1" onchange="window.open('?action=disk_edit&specialid=<%=request("specialid")%>&askclassid=<%=request("askclassid")%>&asksclassid=<%=request("asksclassid")%>&asknclassid=<%=request("asknclassid")%>&page=<%=request("page")%>&classid=<%=classid%>&sclassid=<%=request("sclassid")%>&nclassid='+this.options[this.selectedIndex].value,'_self')">
<%end if%>
<option value="" <%if request("nclassid")="" then%> selected<%end if%>>选择栏目</option>
<%
if request("sclassid")<>"" then
sql="select * from mv_nclass where sclassid="&request("sclassid")
else
sql="select * from mv_nclass where sclassid="&sclassid
end if
rs.open sql,conn_mv,1,1
Do while not rs.eof
%>
<option<%if (cstr(request("nclassid"))=cstr(rs("nclassid")) and request("nclassid")<>"") then%> selected<%end if%> value="<%=CStr(rs("nclassid"))%>" name=nclassid><%=rs("nclass")%>ff</option>
<%
rs.MoveNext
Loop
rs.close
else
%>
<select  class=input name="nclassid" size="1" onchange="window.open('?action=disk_edit&specialid=<%=request("specialid")%>&askclassid=<%=request("askclassid")%>&asknclassid=<%=request("asknclassid")%>&page=<%=request("page")%>&classid=<%=request("classid")%>&sclassid=<%=request("sclassid")%>&nclassid='+this.options[this.selectedIndex].value,'_self')">
<option value="">选择栏目</option>
<%
sql="select * from mv_nclass where sclassid="&sclassid
rs.open sql,conn_mv,1,1
Do while not rs.eof
%>
<option<%if cstr(nclassid)=cstr(rs("nclassid")) then%> selected<%end if%> value="<%=CStr(rs("nclassid"))%>" name=nclassid><%=rs("nclass")%></option>
<%
rs.MoveNext
Loop
rs.close
end if
%>
</select></td>
</tr></table></td></tr>
<tr><td width="100%" align=center>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td align=center width="12%">专辑名称：</td><td width="82%"><input class=input type="text" name="name" value="<%=name%>" size="20">&nbsp;&nbsp;&nbsp;&nbsp;所属语言：<input class=input  type="text" name="yuyan" value="<%=yuyan%>" size="20"></td></tr>
<tr><td align=center>唱片公司：</td><td><input class=input  type="text" name="gongsi" value="<%=gongsi%>" size="20">&nbsp;&nbsp;&nbsp;&nbsp;发行日期：<input  class=input type="text" name="times" value="<%=times%>" size="20"></td></tr>
<tr><td align="center">专辑图片：</td><td><input class=input  type="text" name="pic" value="<%=pic%>" size="20"><font color=red>*</font>&nbsp;&nbsp;所属地区：<input  class=input type="text" name="gong" value="<%=gong%>" size="20"></td></tr>
<tr><td align="center">重传图片：</td><td><iframe frameborder=0 width='100%' height=23 scrolling=no src='music_upload.asp'></iframe></td></tr>
<tr><td align=center>专辑简介：</td><td><TEXTAREA class=input  name="intro" rows=5 cols="60"><%response.write joekoe_cms.code_word(intro)%></TEXTAREA></td></tr>
</table></td></tr>
<tr><td height="25" align=center class=td><input type="hidden" class=input  value="edit" name="act"> <input type="submit" class=input  value=" 修 改 " name="cmdok2">&nbsp; <input type="reset" class=input  value=" 清 除 " name="cmdcance2l"></td></tr>
</form></table>
<%
end sub

sub disk_del()
specialid=request.QueryString("specialid")
set rs=conn_mv.execute("delete from mv_special where specialid="&specialid)
set rs=conn_mv.execute("delete from mv_musiclist where specialid="&specialid)
conn_mv.close
set conn_mv=nothing
response.write vbcrlf&"<scRIPT language=Javascript>alert('成功删除一张专辑！');javascript:history.go(-2);</scRIPT>"
end sub
'****************************************************
' 阳光情缘 2006V3.0      Power by sdsun.com.cn
' Email: 27072320@qq.com  , sdsun163@163.com
' Web: http://www.sdsun.com.cn
' Copyright (C) 2006 sdsun.com.cn All Rights Reserved.
'****************************************************

%>