<?php
/*
'**************************************************************************************************
' 程序名称: CCTVAI开源音乐管理系统
' 官方网站: http://www.cctvai.com
' 联系 Q Q: 1542367792
' QQ交流群：136687984
' 版本：(终结版)
' 备注：未经书面授权，不得向任何第三方提供本软件系统！
' 功能，模板，插件，扩展，定制请联系QQ：1542367792
'**************************************************************************************************
*/
error_reporting(0);
include "../include/cctvai.conn.php";
include "../include/cctvai.inc.php";
include "source/function_common.php";
?>
<?php include_once('source/space_header.php');?>
  <div class="friend_content"> 
   <div class="title"><span class="name">他们在这里分享音乐、发现知音</span><span>当前活跃用户<strong><?php echo $db->num_rows($db->query("select cd_id from ".tname('user')." where cd_lock=0 and DateDiff(DATE(cd_logintime),'".date('Y-m-d')."')>=-3")); ?></strong>人</span></div>
   <ul class="irregular"> 
<?php
$a=0;
$query=$db->query("select * from " . tname('user') . " where cd_lock=0 and DateDiff(DATE(cd_logintime),'" . date('Y-m-d') . "')>=-3 order by cd_logintime desc LIMIT 0,9");
echo '<li class="ir3"><img src="' . cd_webpath . 'user/static/site/images/bad_photo/7.jpg"></li>';
while ($row=$db->fetch_array($query)) {
	$a=$a+1;
	if ($a==1) {
		echo '<li class="ir1">';
		echo '<a href="' . linkweburl($row['cd_id'], $row['cd_name']) . '" title="' . $row['cd_nicheng'] . '" target="_blank"><img src="' . linkuserphoto($row['cd_id'], 120) . '"></a>';
		echo '</li>';
	} else {
		echo '<li class="ir2">';
		echo '<a href="' . linkweburl($row['cd_id'], $row['cd_name']) . '" title="' . $row['cd_nicheng'] . '" target="_blank"><img src="' . linkuserphoto($row['cd_id'], 120) . '"></a>';
		echo '</li>';
	}
	if ($a==2) {
		echo '<li class="ir2"><img src="' . cd_webpath . 'user/static/site/images/bad_photo/1.jpg"></li>';
	} elseif ($a==3) {
		echo '<li class="ir2"><img src="' . cd_webpath . 'user/static/site/images/bad_photo/2.jpg"></li>';
	} elseif ($a==4) {
		echo '<li class="ir2"><img src="' . cd_webpath . 'user/static/site/images/bad_photo/3.jpg"></li>';
	} elseif ($a==5) {
		echo '<li class="ir2"><img src="' . cd_webpath . 'user/static/site/images/bad_photo/4.jpg"></li>';
	} elseif ($a==6) {
		echo '<li class="ir2"><img src="' . cd_webpath . 'user/static/site/images/bad_photo/5.jpg"></li>';
	} elseif ($a==7) {
		echo '<li class="ir2"><img src="' . cd_webpath . 'user/static/site/images/bad_photo/6.jpg"></li>';
	}
}
?>
   </ul> 
  </div> 
  <div class="friend_content_list"> 
   <div class="title"> 
    <span class="name">DJ分享人推荐</span> 
   </div> 
   <ul> 
<?php
global $db;
$query = $db->query("select * from ".tname('user')." where cd_isbest=1 and cd_lock=0 order by cd_logintime desc LIMIT 0,9");
while ($row=$db->fetch_array($query)) {
	if (!empty($row['cd_introduce'])) {
		$cd_introduce=getlen("len", "15", $row['cd_introduce']);
	} else {
		$cd_introduce='这家伙很懒，什么也没留下。';
	}
	echo '<li>';
	echo '<div class="left"><a href="' . linkweburl($row['cd_id'], $row['cd_name']) . '" target="_blank"><img alt="' . $row['cd_nicheng'] . '" src="' . linkuserphoto($row['cd_id'], 120) . '"></a><a href="' . linkweburl($row['cd_id'], $row['cd_name']) . '" class="name" target="_blank">' . $row['cd_nicheng'] . '</a></div>';
	echo '<div class="right">';
	echo '<strong>分享' . $row['cd_djmub'] . '</strong>';
	echo '<ul class="list"><li>关注：' . $row['cd_ufav'] . '人&nbsp;&nbsp;&nbsp;&nbsp;粉丝：' . $row['cd_ufans'] . '人 </li><li class="describes">个人介绍：' . $cd_introduce . '</li></ul>';
	echo '<a class="know" href="' . linkweburl($row['cd_id'], $row['cd_name']) . '" target="_blank">更多音乐>></a>';
	echo '</div>';
	echo '</li>';
}
?>
   </ul> 
  </div> 
  <div class="friend_content"> 
   <div class="album_title"> 
    <span class="name">乐迷相册</span> 
    <span><a href="<?php echo rewrite_url('top.php?do=album'); ?>" target="_blank">更多>></a></span>
   </div> 
   <ul class="album"> 
<?php
$a=0;
$query=$db->query("select * from " . tname('pic') . " order by cd_addtime desc LIMIT 0,12");
while ($row=$db->fetch_array($query)) {
	$a=$a+1;
	echo '<li id="image_' . $a . '" onmouseover="$(\'#image_' . $a . '\').addClass(\'on\');" onmouseout="$(\'#image_' . $a . '\').removeClass(\'on\');"><a href="' . cd_webpath .cd_webmlsinger. '/' . rewrite_url('index.php?ac=album&id=' . $row['cd_uid'] . '&day=' . $row['cd_id']) . '" title="' . $row['cd_title'] . '" target="_blank"><img width="160" src="' . getalbumthumb($row['cd_url'], 2) . '"><em></em></a></li>';
}
?>
   </ul> 
  </div>
<?php include_once('source/space_footer.php');?>
  <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">
nav.init();
nav.userMenu();
libs.checkLogin();
libs.selectList();
rolling.init();
libs.spaceDanceListSmall(0, 10);
var $links = $("#links");
var $partner = $("#partner");
var $Hlinks = $("#Hlinks");
var $Hpartner = $("#Hpartner");
$Hlinks.mouseover(function ()
{
  $partner.hide();
  $links.show();
  $Hlinks.attr("class", "default");
  $Hpartner.attr("class", "synergic");
}
);
$Hpartner.mouseover(function ()
{
  $links.hide();
  $partner.show();
  $Hpartner.attr("class", "current");
  $Hlinks.attr("class", "link");
}
);
</script>
 </body>
</html>