<?php 
error_reporting(0);
if(!$userlogined==true){exit("<script type=\"text/javascript\">location.href='".cd_webpath."user/login.php?login_referer=".cd_webpath."user/".rewrite_url('space.php?do=home')."';</script>");}
?>
  <div class="user"> 
   <div class="user_center"> 
<?php include_once('source/space_menu.php');?>
    <div class="user_main"> 
     <div class="uMain_home_left"> 
      <div class="stage_box"> 
       <div class="user_info"> 
        <div class="info"> 
         <div class="title">
           有什么新鲜事想告诉大家？ 
         </div> 
         <span></span> 
        </div> 
        <span class="arrow"></span> 
        <div class="doing"> 
         <div id="note" contenteditable="true" class="blogInput" name="note"></div> 
         <div id="act" class="act" style="display: block;"> 
          <div id="emot_note" class="emot" to="note"></div> 
          <!--表情--> 
          <div class="button"> 
           <span class="button-main"> <span> <button type="button" class="send">发布</button> </span> </span> 
          </div> 
         </div> 
        </div> 
       </div> 
       <div class="notice"> 
        <div class="title"></div> 
        <ul class="box"> 
<?php
global $db;
$query=$db->query("select a.cd_uid,a.cd_uname,a.cd_points,a.cd_addtime,b.cd_nicheng from " . tname('slot') . " as a," . tname('user') . " as b where a.cd_uid = b.cd_id order by cd_addtime desc LIMIT 0,5");
while($row=$db->fetch_array($query)) {
		echo '<li class="c1">';
		echo '<span class="name"><a href="' . linkweburl($row['cd_uid'], $row['cd_uname']) . '" target="_blank">' . $row['cd_nicheng'] . '</a></span>';
		echo '<div class="text">获得了幸运摇一摇奖励，获得<span>' . $row['cd_points'] . '</span>金币奖励。</div>';
		echo '<span class="time">' . date("m-d H:i:s", strtotime($row['cd_addtime'])) . '</span>';
		echo '</li>';
}
?>
        </ul> 
       </div> 
       <div class="feed_menu"> 
        <ul> 
         <li> <a id="friend_feed" class="on" onclick="libs.feedNew(0);$('#refresh').attr({'cid':0, type:0});" href="javascript:;">好友动态</a> </li> 
         <li> <a id="feed_all" onclick="libs.feedNew(2);$('#refresh').attr({'cid':2, type:0});" href="javascript:;">全站动态</a> </li> 
         <li> <a id="feed_me" onclick="libs.feedNew(3);$('#refresh').attr({'cid':3, type:0});" href="javascript:;">我的动态</a> </li> 
        </ul> 
       </div> 
       <div class="feed_menu2"> 
        <ul id="a1"> 
         <li id="feed_0"> <a onclick="libs.showFeedMenu(0, 0);$('#refresh').attr({'cid':0, type:0});" href="javascript:;">全部动态</a> </li> 
         <li id="feed_1"> <a onclick="libs.showFeedMenu(1, 0);$('#refresh').attr({'cid':0, type:1});" href="javascript:;">分享音乐</a> </li> 
         <li id="feed_5"> <a onclick="libs.showFeedMenu(5, 0);$('#refresh').attr({'cid':0, type:5});" href="javascript:;">分享视频</a> </li> 
         <li id="feed_2"> <a onclick="libs.showFeedMenu(2, 0);$('#refresh').attr({'cid':0, type:2});" href="javascript:;">收藏音乐</a> </li> 
         <li id="feed_3"> <a onclick="libs.showFeedMenu(3, 0);$('#refresh').attr({'cid':0, type:3});" href="javascript:;">发表说说</a> </li> 
         <li id="feed_4"> <a onclick="libs.showFeedMenu(4, 0);$('#refresh').attr({'cid':0, type:4});" href="javascript:;">上传照片</a> </li> 
        </ul> 
        <ul id="a2" style="display: none;"> 
         <li id="feedA_0"> <a onclick="libs.showFeedMenu(0, 2);$('#refresh').attr({'cid':2, type:0});" href="javascript:;">全部动态</a> </li> 
         <li id="feedA_1"> <a onclick="libs.showFeedMenu(1, 2);$('#refresh').attr({'cid':2, type:1});" href="javascript:;">分享音乐</a> </li> 
         <li id="feed_5"> <a onclick="libs.showFeedMenu(5, 2);$('#refresh').attr({'cid':2, type:5});" href="javascript:;">分享视频</a> </li> 
         <li id="feedA_2"> <a onclick="libs.showFeedMenu(2, 2);$('#refresh').attr({'cid':2, type:2});" href="javascript:;">收藏音乐</a> </li> 
         <li id="feedA_3"> <a onclick="libs.showFeedMenu(3, 2);$('#refresh').attr({'cid':2, type:3});" href="javascript:;">发表说说</a> </li> 
         <li id="feedA_4"> <a onclick="libs.showFeedMenu(4, 2);$('#refresh').attr({'cid':2, type:4});" href="javascript:;">上传照片</a> </li> 
        </ul> 
        <div id="tooltip" class="refresh"> 
         <a class="eda" title="刷新" href="javascript:;" id="refresh" cid="0" type="0"> </a> 
        </div> 
       </div> 
       <div class="feed" id="feed"> 
        <div class="load"></div> 
       </div> 
      </div> 
     </div> 
     <div class="uMain_home_right"> 
      <div class="space_user_info"> 
<?php
include "../plug/userSign/conf.inc.php";
if(userSign_open=="yes") {
?>
       <div class="user_sign" href="javascript:;" title="已经连续签到<?php echo $CcTvAi_com_signd; ?>天，累计签到<?php echo $CcTvAi_com_signdcumu; ?>天" id="user_sign" num="<?php echo $CcTvAi_com_signdcumu; ?>">
        <span class="date"><?php echo date('m',time()); ?>.<?php echo date('d',time()); ?></span><span class="week"><?php
if(date("w", time())==1) {
		echo "周一";
} elseif(date("w", time())==2) {
		echo "周二";
} elseif(date("w", time())==3) {
		echo "周三";
} elseif(date("w", time())==4) {
		echo "周四";
} elseif(date("w", time())==5) {
		echo "周五";
} elseif(date("w", time())==6) {
		echo "周六";
} else {
		echo "周日";
}
?></span>
        <span id="checkinFaceId" class="face face_empty bg_checkin"></span>
        <span class="time_tip">DAY</span>
        <strong class="time" id="time"><?php echo $CcTvAi_com_signd; ?></strong>
        <button class="user_sign_but" onclick="$call(function(){libs.userSign()});" id="user_sign_but"></button>
       </div> 
<?php }?>
<?php
include "../plug/userSlot/conf.inc.php";
if(userSlot_open=="yes") {
?>
       <a href="javascript:;" class="random" onclick="libs.rand();"><span class="time_tip">NUM</span><?php
global $db;
$slotsql="select cd_number from " . tname('slot') . " where cd_uid='".$CcTvAi_com_userid."'";
if($slotrow=$db->getrow($slotsql)) {
		echo '<strong class="time" title="累计摇奖' . $slotrow['cd_number'] . '次" id="time1">' . $slotrow['cd_number'] . '</strong>';
} else {
		echo '<strong class="time" title="累计摇奖0次" id="time1">0</strong>';
}
?></a>
<?php }?>
      </div> 
      <div class="sFriendTitle"> 
       <span>在线会员</span> 
       <p> <a href="<?php echo rewrite_url('top.php?do=user');?>" target="_blank">更多</a> </p> 
      </div> 
      <ul class="sFriend"> 
<?php
global $db;
$query = $db->query("select cd_uid,cd_uname from ".tname('session')." order by cd_logintime desc LIMIT 0,50");
while($row=$db->fetch_array($query)) {
		echo '<li>';
		echo '<div class="friendAvatar"><a href="'.linkweburl($row['cd_uid'],$row['cd_uname']).'" target="_blank"><img src="'.linkuserphoto($row['cd_uid'],48).'" /></a></div>';
		echo '<div class="friendInfo"><span><a href="'.linkweburl($row['cd_uid'],$row['cd_uname']).'" target="_blank">' . GetAlias("cctvai_user", "cd_nicheng", "cd_name", $row['cd_uname']) . '</a></span></div>';
		echo '</li>';
}
?>
      </ul> 
     </div> 
    </div> 
   </div> 
   <div id="rand"> 
   </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/js/jquery/jquery.plugins.js"></script> 
  <script type="text/javascript" src="<?php echo cd_webpath?>user/static/space/js/common.js"></script> 
  <script type="text/javascript">listenMsg.start();nav.init();nav.userMenu();</script> 
  <script type="text/javascript" src="<?php echo cd_webpath?>user/static/space/js/slot.js"></script> 
  <script type="text/javascript" src="<?php echo cd_webpath?>user/static/space/js/miniblog.js"></script> 
  <script type="text/javascript">
	libs.feed();
	libs.showFeedMenu1();
	miniblogLib.miniblogHomeAddInit();
  </script> 
<?php include_once('source/space_footer.php');?>
</body>
</html>