<!-- #include file="include/admin_onlogin.asp" -->
<!-- #include file="admin_music_config.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="收藏管理"
call admin_header(0,0)
data_name="music_fav"
%>
<tr><td align=center colspan=2 height=30>
  <table border=0>
  <tr>
  <td><a href='?'>收藏列表</a></td>
  <td width=10></td>
  <td><a href='admin_music_singer.asp'>歌手管理</a></td>
  <td width=10></td>
  <td><a href='admin_music_disk.asp'>专辑管理</a></td>
  <td width=10></td>
  <td><a href='admin_music_song.asp'>歌曲管理</a></td>
  <td width=10></td>
  <td><a href='?action=clear' onclick="javascript:return click_return('清空所有收藏',0);">清空所有收藏</a></td>
  </tr>
  </table>
</td></tr>
<tr><td colspan=2 align=center>
  <table border=0 cellspacing=0 cellpadding=2>
  <form action='?' method=get>
  <tr>
  <td>搜索（点歌列表）关键字：</td>
  <td><input type=text name=keyword value='<%response.write trim(request.querystring("keyword"))%>' size=15 maxlength=20></td>
  <td><select name=sea_type size=1>
  <option value='name'>按收藏名称</option>
  <option value='singer'>按所属歌手</option>
  <option value='username'>按收藏用户</option>
  </select></td>
  <td><select name=sea_term size=1>
  <option value='all'>满足所有条件</option>
  <option value='only'>满足一个条件</option>
  </select></td>
  <td><input type=submit value='搜索'></td>
  </tr>
  </form>
  </table>
</td></tr>
<%
call admin_table(1)
if action="handle" then call joekoe_go_handle()
select case action
  case "clear"
    call joekoe_go_clear()
  case else
    call fav_list_main()
end select
call admin_ender(1)
'-----------------------------------收藏列表-------------------------------------------
sub fav_list_main()
  dim fav_type
  PageUrl="?"
  response.write "<form name=sel_form action='?jk_mod="&jk_mod&"&action=handle' method=post>" & _
             vbcrlf&"<tr align=center>" & _
             vbcrlf&"<td class=td width='7%'>序号</td>" & _
             vbcrlf&"<td class=td width='43%'>收藏名称</td>" & _
             vbcrlf&"<td class=td width='12%'>所属歌手</td>" & _
             vbcrlf&"<td class=td  width='12%'>收藏用户</td>" & _
             vbcrlf&"<td class=td width='12%' align=center>收藏类型</td>" & _
             vbcrlf&"<td class=td width='7%'><input type=checkbox name=sel_all value='yes' onclick=""javascript:select_all(this.form);""></td>" & _
             vbcrlf&"</tr>"
  call format_search("name","name,singer,username",2,1)
  sql="select count(id) from music_fav"&sql_add
  set rs=joekoe_cms.exec(sql,1)
  rssum=rs(0)
  rs.close
  call format_pagecute()
  sql="select top "&nummer*viewpage&" * from music_fav"&sql_add&" order by id desc"
  call joekoe_cms.exec(sql,-1)
  rs.open sql,conn,1,1
  if int(viewpage)>1 then rs.move (viewpage-1)*nummer
  if int(viewpage*nummer)>int(rssum) then nums=nummer-(viewpage*nummer-rssum)
    for i=1 to nums
	if rs("f_type")="song" then fav_type="歌曲"
	if rs("f_type")="disk" then fav_type="专辑"
      response.write "<tr>" & _
             vbcrlf&"<td align=center>"&i&"</td>" & _
             vbcrlf&"<td>"&rs("name")&"</td>" & _
             vbcrlf&"<td align=center>"&rs("singer")&"</td>" & _
             vbcrlf&"<td align=center>"&rs("username")&"</td>" & _
             vbcrlf&"<td align=center>"&fav_type&"</td>" & _
             vbcrlf&"<td align=center><input type=checkbox name=sel_id value='"&rs("id")&"' class=bg_tds></td>" & _
             vbcrlf&"</tr>"
      rs.movenext
    next
    rs.close
    set rs=nothing
    response.write "<tr class=tr1>" & _
             vbcrlf&"<td colspan=4>现有<font class=red>"&rssum&"</font>个收藏，页次：<font class=red>"&viewpage&"</font>/<font class=red>"&thepages&"</font>分页："&jk_pagecute(nummer,thepages,viewpage,pageurl,5,"#ff0000")&"</td>" & _
             vbcrlf&"<td colspan=3 align=center>执行<select name=sel_type size=1><option value='删除'>删除</option></select><input type=submit value='操作' onclick=""return sel_click(this.form);""></td>" & _
             vbcrlf&"</tr>" & _
             vbcrlf&"</form>" & _
             vbcrlf&"</table></td></tr>" 
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.
'****************************************************
%>