<div class="content">
  
	<div class="right">
		<div class="rig stat">
			<h3>专辑列表</h3>
			<ul>
			<!--forlist-->
<?php
	global $db;
	$sql="select * from ".Getdbname('topic')." where CS_User='".$cscms_name."' and CS_YID=0 order by cs_id desc";
	$rs=$db->query($sql);
	$num=$db->num_rows($rs);
        if($num==0) echo "<li>没有专集</li>";
	for($i=0;$i<$num;$i++){
		$row=$db->fetch_array($rs);
                $topicnum= $db -> num_rows($db -> query("select * from  ".Getdbname('dance')."  where CS_TID=".$row['CS_ID']." and CS_YID=0"));
?>
				<li><a href="<?php echo userlink('tdance',$cscms_uid,$row["CS_ID"])?>" title="<?php echo $row["CS_Name"]?>">&#183;<?php echo $row["CS_Name"]?></a><span>(<?php echo $topicnum?>)</span></li>
<?php
        $ids=$row["CS_ID"];
       }
       if(empty($id)) $id=$ids;
?>  
			<!--forlist-->
			</ul>
		</div>
	</div>
<?php
  if($num!=0){
           $rowt=$db->getrow("select * from ".Getdbname('topic')." where CS_ID=".$id."");
           if($rowt){
?>
	<div class="main">
		<div class="box song_list">
		    <h3><?php echo $rowt['CS_Name']?></h3> 
		    <div class="zj_img"><img src="<?php echo piclink('topic',$rowt['CS_Pic'])?>" alt="<?php echo $rowt['CS_Name']?>"/></div> 
			<div class="zj_text"> 
				<ul class="zj_left"> 
					<li><h4><?php echo $rowt['CS_Name']?></h4></li> 
					<li class="genre">地区：<?php if($rowt['CS_Diqu']!=""){ echo $rowt['CS_Diqu'];}else{ echo "未知"; }?></li> 
                	<li class="h">语言：<?php if($rowt['CS_Yuyan']!=""){ echo $rowt['CS_Yuyan'];}else{ echo "未知"; }?></li> 
                	<li></li> 
                	<li class="h"></li> 
                	<li>发行时间：<?php echo $rowt['CS_AddTime']?></li> 
                </ul> 
				<ul class="zj_right"> 
					<li class="j_play"><a href="http://<?php echo CS_WebUrl.LinkUrl('show','zj','id',$rowt['CS_CID'],$rowt['CS_ID'])?>"  target="_blank">播放整张专辑</a></li> 
					<li class="j_fav"></li>  
				</ul> 
			</div> 
            <div class="zj_about" style="clear:left;"> 
				<h4>专辑介绍</h4> 
				<div class="explain" id="explain"> 
					<p><?php echo $rowt['S_Content']?></p> 
				</div> 
 				<div class="open"></div> 
  			</div> 
  			
			<h3>专辑《<?php echo $rowt['CS_Name']?>》歌曲列表</h3>
			<table class="song" cellpadding="0" cellspacing="0" id="list">
				<tr>
					<th><input type="checkbox" onClick="if(document.getElementById('idtop').checked==true){setCboxValue('ckid',1);return;}else{setCboxValue('ckid',2);return;};" id="idtop"   name="ckid" value="" /></th><th>名称</th><th>分类</th><th>人气</th><th>上传时间</th><th>试听</th><th>下载</th>
				</tr>
				<!--forlist-->
<?php 
        $sql="select * from ".Getdbname('dance')."  where CS_TID=".$id." and CS_YID=0 order by cs_id desc";
	$rs=$db->query($sql);
	$num=$db->num_rows($rs);
	for($i=0;$i<$num;$i++){
		$row=$db->fetch_array($rs);
                $class=$db->getrow("select * from ".Getdbname('class')." where CS_ID=".$row['CS_CID']."");
?>
				<tr>
					<td><input type="checkbox" name="ckid1" value="<?php echo $row["CS_ID"]?>" /></td>
					<td><a href="http://<?php echo CS_WebUrl.LinkUrl('play','dance','id',$row['CS_CID'],$row['CS_ID'])?>" target="_blank" title="<?php echo $row["CS_Name"]?>"><?php echo getlen('len',30,$row["CS_Name"])?><?php if($row["CS_Reco"]>1) echo '<img src="images/tj.gif" border="0" align="absmiddle" >';?></a></td>
					<td><?php echo $class["CS_Name"]?></td>
					<td><?php echo $row["CS_Hits"]?></td>
					<td><?php echo GetTime($row["CS_AddTime"])?></td>
					<td><a href="http://<?php echo CS_WebUrl.LinkUrl('play','dance','id',$row['CS_CID'],$row['CS_ID'])?>" target="_blank" title="试听"><img src="images/list1.gif" alt="试听" /></a></td>
					<td><a href="javascript:Popsboxif('下载歌曲',450,180,'http://<?php echo CS_WebUrl.CS_WebPath?>public/down.php?id=<?php echo $row['CS_ID']?>');" title="下载"><img src="images/list2.gif" alt="下载" /></a></td>
				</tr>
<?php
	}
?>
				<!--forlist-->
			</table>
			<div class="pl_button yc_page">
			<dl>
			<dt>
                        <a href="javascript:clk('all','list')" class="brow">全选</a>
			<a  href="javascript:clk('un','list')"  class="brow">反选</a>
			<a href="javascript:;" onClick="clk('play','list');"  class="brow">连续播放</a>
			</dt>
			</dl>
			</div>
			<div class="page_list">共<?php echo $num?>首</div>
		</div>
	</div>
<?php } } ?>
</div>
