<?php
error_reporting(0);
?>
  <div class="member_content"> 
   <div class="title"> 
    <div class="name">
     最近活跃的会员
    </div> 
    <div class="number">
     Top100
    </div> 
   </div> 
   <div class="box"> 
    <ul> 
<?php
$a=0;
global $db;
$query = $db->query("select * from ".tname('user')." where cd_lock=0 order by cd_logintime desc LIMIT 0,100");
$num=$db->num_rows($query);
if($num==0)
		echo "<div class=\"private_dance_list\"><div class=\"nothing\">暂时没有榜单数据! ^_^</div></div>";
if($query) {
		while($row=$db->fetch_array($query)) {
				$a=$a+1;
				echo '     <li><a title="' . $row['cd_nicheng'] . '" href="' . linkweburl($row['cd_id'], $row['cd_name']) . '" target="_blank"><img src="' . linkuserphoto($row['cd_id'], 200) . '" /></a>
      <div class="box_list">
       <a title="' . $row['cd_nicheng'] . '" href="' . linkweburl($row['cd_id'], $row['cd_name']) . '" target="_blank"><span class="name">' . $row['cd_nicheng'] . '</span></a>
';
				if($row['cd_checkmusic']) {
						echo '<a class="certify" href="javascript:;" title="已获得音乐认证" onclick="openWebsite.openTo(\'musiccertify\');"></a>';
				}
				if($row['cd_checkmm']) {
						echo '<a class="certify_mm" href="javascript:;" title="通过了美女认证" onclick="openWebsite.openTo(\'certify\');"></a>';
				}
				if($row['cd_grade']==1) {
						echo '<a class="vip_style vip10' . getviprank($row['cd_viprank'], 0) . '" title="尊贵的VIP' . getviprank($row['cd_viprank'], 0) . '会员" onclick="openWebsite.openTo(\'vip\');" href="javascript:;"></a>';
				}
		 echo '<p><a>最后动态:' . datetime($row['cd_logintime']) . '</a></p>';   
				if($row['cd_sign']) {
						echo '<p>介绍：' . $row['cd_sign'] . '</p>';
				} else {
						echo '<p>介绍：这家伙很懒，什么也没留下。</p>';
				}
				$sql="select cd_lock from " . tname('friend') . " where cd_uid='$CcTvAi_com_userid' and cd_uids='" . $row['cd_id'] . "'";
				if($rows=$db->getrow($sql)) {
						if($rows['cd_lock']=='1') {
								echo '<a onclick="fans.fansDel(' . $row['cd_id'] . ', \'{' . $row['cd_nicheng'] . '}\', 1);" class="attention mutual" href="javascript:;"></a>';
						} else {
								$cd_groupid=$db->getone("select cd_id from " . tname('friend') . " where cd_uid='$CcTvAi_com_userid' and cd_uids='" . $row['cd_id'] . "'");
								if($cd_groupid) {
										echo '<a onclick="fans.fansDel(' . $row['cd_id'] . ', \'' . $row['cd_nicheng'] . '\', 1);" class="attention already" href="javascript:;"></a>';
								} else {
										echo '<a onclick="fans.fansAdd(' . $row['cd_id'] . ', \'' . $row['cd_nicheng'] . '\', 1);" class="attention" href="javascript:;"></a>';
								}
						}
				} else {
						echo '<a onclick="fans.fansAdd(' . $row['cd_id'] . ', \'{' . $row['cd_nicheng'] . '}\', 1);" class="attention" href="javascript:;"></a>';
				}
				echo '</div>';
				echo '</li>';
		}
}
?>
    </ul> 
   </div> 
  </div>
	<script type="text/javascript" src="<?php echo cd_webpath?>user/static/js/jquery/jquery.min.js"></script>
	<script type="text/javascript" src="<?php echo cd_webpath?>user/static/js/core.js"></script>
	<script type="text/javascript" src="<?php echo cd_webpath?>user/static/js/card.js"></script>
	<script type="text/javascript" src="<?php echo cd_webpath?>user/static/js/dialog.js"></script>
	<script type="text/javascript" src="<?php echo cd_webpath?>user/static/site/js/common.js"></script>
	<script type="text/javascript" src="<?php echo cd_webpath?>user/static/space/js/1relation.js"></script>
	<script type="text/javascript">
	nav.init();
	nav.userMenu();
	libs.checkLogin();
	relation.init();
	select.init('sex');
	select.init('province');
</script>
<?php include_once('source/space_footer.php');?>
 </body>
</html>