<?php
if(empty($op)) $op='my';
?>
  <!--- content -->
  <div class="neir">
    <div class="top">音乐收藏</div>
      <div class="content">
		<div class="main_nav">
			<ul>
				<li class="<?php if($op=='my'){ echo 'nava_4';}else{ echo 'navb_5';}?>"><a href="?ac=down&op=my">我的收藏</a></li>
				<li class="<?php if($op=='all'){ echo 'nava_4';}else{ echo 'navb_5';}?>"><a href="?ac=down&op=all">大家的收藏</a></li>
			</ul>
		</div>
		<div  class="favoritesList" id="list">
<?php
        $j=1;
	$sql="select * from ".Getdbname('fav')." where 1=1";
        if($op=="my") $sql.=" and cs_user='".$cscms_name."'";
        $sql.=' order by cs_addtime desc';
		$Arr=getuserpage($sql,"15");//sql,每页显示条数
		$result=$db->query($Arr[2]);
		$numdate="a";
		if($result){
			while ($row = $db ->fetch_array($result)){
		        $numdate="b";
                        $rowr=$db->getrow("select * from ".Getdbname('dance')." where CS_ID=".$row['CS_DID']."");
                        if($op=="all"){$user='&nbsp;&nbsp;('.$row['CS_User'].')';$del='';}else{$user='';$del='<span class="mdel" title="删除" onClick="Favdel('.$row["CS_ID"].');"></span>';}
                   echo '<li><span class="cbox"><input name="checked" type="checkbox" value="'.$row['CS_DID'].'" /></span><span class="mname"><a href="'.LinkUrl('play','dance','id',$row['CS_CID'],$row['CS_DID']).'" target="p">'.$j.'.'.$row['CS_Name'].'</a>'.$user.'</span><span class="mclass">'.getclass($row['CS_CID']).'</span><span class="mrank appraise'.$rowr['CS_Reco'].'" title="推荐星际"></span><span class="mtime" title="收藏时间">'.datetime($row['CS_AddTime']).'</span>'.$del.'</li>';

                        $j=$j+1;
	                }
                }
        if($numdate=="a") echo '<li>没有相关记录!</li>';
?>
		</ul>
		</div>
		<div class="page">
		<span class="button2-main"><span><button type="button" onclick=clk('all','list');>全选</button></span></span>
		<span class="button2-main"><span><button type="button" onclick=clk('un','list');>反选</button></span></span>
		<span class="button3-main"><span><button type="button" onclick=clk('play','list');>连续播放</button></span></span></form>
		<div class="pages">
                       <?php echo $Arr[0];?>
               </div>

	</div>
      </div>
    <div class="end"></div>
  </div>
