<?php
/*
'**************************************************************************************************
' 程序名称: CCTVAI开源音乐管理系统
' 官方网站: http://www.cctvai.com
' 联系 Q Q: 1542367792
' QQ交流群：136687984
' 版本：(终结版)
' 备注：未经书面授权，不得向任何第三方提供本软件系统！
' 功能，模板，插件，扩展，定制请联系QQ：1542367792
'**************************************************************************************************
*/
error_reporting(0);
?>
<link type="text/css" rel="stylesheet" href="css/assets.css" />
<?php if($view==""){?>
   <div class="tag-list"> 
    <div class="tag-section">
	<a href="index.php?ac=assets" class="on tag-item"><span>个人账户</span></a>
	<a href="index.php?ac=assets&view=scoreBill" class="tag-item"><span>金币账单</span></a>
	<a href="index.php?ac=assets&view=topup" class="tag-item"><span>金币充值</span></a>
	<a href="index.php?ac=assets&view=vip" class="tag-item"><span>升级VIP</span></a>
    </div>  	
   </div> 
   <div class="assets-g"> 
    <div class="head"><strong>用户等级信息</strong></div> 
	<div class="content">
	<p>金币：<?php echo $CcTvAi_com_points?>个</p>
	<p>经验：<?php echo $CcTvAi_com_rank; ?></p>
	<p>等级：Lv<?php echo getrankname($CcTvAi_com_rank,1); ?></p>
	<p>头衔：<?php echo getrankname($CcTvAi_com_rank,2); ?></p>
	<p>勋章：<img src="<?php echo getrankname($CcTvAi_com_rank,3); ?>"></p>
	<p>距离下一个等级还需：<?php echo getrankname($CcTvAi_com_rank,7); ?>&nbsp;经验</p>
	<p>下一个头衔名称：<?php echo getxrankname($CcTvAi_com_rank,2);?></p>
	<p>下一个升级奖励：<?php echo cd_upgradepoints?>个金币</p>
	</div>
	<div class="head"><strong>VIP会员成长信息</strong></div> 
	<div class="content">
<?php if($CcTvAi_com_grade==1){ ?>
<p>您当前是<?php if($CcTvAi_com_vipgrade==1){echo 'VIP月付会员';$cd_speed = '5';}elseif($CcTvAi_com_vipgrade==2){echo 'VIP年付会员';$cd_speed = '10';}?></p>
<?php
if($CcTvAi_com_grade==1){
$cd_vipenddate=strtotime($CcTvAi_com_vipenddate)-time();
echo "<p>您申请VIP会员的时间是：<font color=red>".$CcTvAi_com_vipindate."</font></p><p>离您的有效期还有：<font color=red><b>".sprintf("%01.0f",$cd_vipenddate/86400)."</b></font> 天</p>";
}
?>
<p>您的总成长值为&nbsp;<b><?php echo $CcTvAi_com_viprank; ?></b>点</p>
<p>预计<b><?php echo sprintf("%01.0f",(getviprank($CcTvAi_com_viprank,3)-$CcTvAi_com_viprank)/$cd_speed); ?></b>天后即可成为尊贵<b>VIP<?php echo getviprank($CcTvAi_com_viprank,0)+1; ?></b></p>
<p><span class="green">成长速度：</span><b>年付&nbsp;&nbsp;10</b>&nbsp;点/天&nbsp;&nbsp;<b>月付&nbsp;&nbsp;5&nbsp;</b>点/天</p>
<p>当前成长速度&nbsp;<?php echo '<b>'.$cd_speed.'</b>'; ?>&nbsp;点/天&nbsp;</p>
<?php }else{?>
	<p>您还不是VIP会员</p>
<?php }?>
	</div>
	<div class="head"><strong>积分奖励规则</strong></div>
	<div class="content">
	<p>每日签到：随机奖励金币</p>
	<p>摇摇乐：随机奖励金币</p>
	<p>每天登录：金币+<?php echo cd_userloginpoints?> 经验+<?php echo cd_userloginrank?></p>
	<p>分享影音：金币+<?php echo cd_userupmusicpoints?> 经验+<?php echo cd_userupmusicrank?></p>
	<p>等级提升：金币+<?php echo cd_upgradepoints?></p>
	<p>上传照片：金币+<?php echo cd_useruppicpoints?> 经验+<?php echo cd_useruppicrank?> 上限<?php echo cd_useruppicceiling?></p>
	<p>发表说说：金币+<?php echo cd_usersaidpoints?> 经验+<?php echo cd_usersaidrank?> 上限<?php echo cd_usersaidceiling?></p>
	<p>访问空间：金币+<?php echo cd_userwebpoints?> 经验+<?php echo cd_userwebrank?> 上限<?php echo cd_userwebceiling?></p>
	</div>
	<div class="head"><strong>积分惩罚规则</strong></div>
	<div class="content">
	<p>音乐/视频被删除：金币-<?php echo cd_userdeletemusicpoints?> 经验-<?php echo cd_userdeletemusicrank?></p>
	<p>照片被删除：金币-<?php echo cd_userdeletepicpoints?> 经验-<?php echo cd_userdeletepicrank?></p>
	<p>说说被删除：金币-<?php echo cd_userdeletesaidpoints?> 经验-<?php echo cd_userdeletesaidrank?></p>
	<p>评论被删除：金币-<?php echo cd_userdeletecommentspoints?> 经验-<?php echo cd_userdeletecommentsrank?></p>
	<p>留言被删除：金币-<?php echo cd_userdeletemessagepoints?> 经验-<?php echo cd_userdeletemessagerank?></p>
	</div>
   </div> 
<?php }elseif($view=="scoreBill"){ $cid=SafeRequest("cid", "get");?>
   <div class="tag-list"> 
    <div class="tag-section">
	<a href="index.php?ac=assets" class="tag-item"><span>个人账户</span></a>
	<a href="index.php?ac=assets&view=scoreBill" class="on tag-item"><span>金币账单</span></a>
	<a href="index.php?ac=assets&view=topup" class="tag-item"><span>金币充值</span></a>
	<a href="index.php?ac=assets&view=vip" class="tag-item"><span>升级VIP</span></a>
    </div>  	
   </div> 
<div class="assets-bill">
<div class="head">
<strong>全部明细</strong>
<span style="float: right;">
<a <?php if($cid == "1"){echo 'style="background: rgba(47, 148, 97, 0.57);"';}?> href="index.php?ac=assets&view=scoreBill&cid=1">收入</a> 
<a <?php if($cid == "2"){echo 'style="background: rgba(47, 148, 97, 0.57);"';}?> href="index.php?ac=assets&view=scoreBill&cid=2">支出</a>
</span>
</div>
<?php
if ($cid==1) {
	$sql="select * from " . tname('bill') . " where cd_type=1 and cd_uid='$CcTvAi_com_userid' and cd_points>=1 order by cd_addtime desc";
} elseif ($cid==2) {
	$sql="select * from " . tname('bill') . " where cd_type=0 and cd_uid='$CcTvAi_com_userid' and cd_points>=1 order by cd_addtime desc";
} elseif ($cid==3) {
	$sql="select * from " . tname('bill') . " where cd_type=1 and cd_state=3 and cd_uid='$CcTvAi_com_userid' and cd_points>=1 order by cd_addtime desc";
} else {
	$sql="select * from " . tname('bill') . " where cd_uid='$CcTvAi_com_userid' and cd_points>=1 order by cd_addtime desc";
}
$Arr=getuserpage($sql, 50); //sql,每页显示条数
$result=$db->query($Arr[2]);
$num=$db->num_rows($result);
if ($num) {
	while ($row=$db->fetch_array($result)) {
	if ($row['cd_type']==1) {$points= '收入：<font style="color: #1abc9c;">+' . $row['cd_points'].'</font>';}elseif ($row['cd_type']==0) {$points= '支出：-' . $row['cd_points'];}
	echo '<div class="list"><p><span>' . $row['cd_title'] . '：'.$points.'</span></p><span>' . date("Y-m-d", strtotime($row['cd_addtime'])) . '</span></div>';
	}
} else {
	echo '<center>没有账单</center>';
}
?> 
  <div class="page"><?php echo $Arr[0];?></div>
</div>
<?php }elseif($view=="topup"){?>
   <div class="tag-list"> 
    <div class="tag-section">
	<a href="index.php?ac=assets" class="tag-item"><span>个人账户</span></a>
	<a href="index.php?ac=assets&view=scoreBill" class="tag-item"><span>金币账单</span></a>
	<a href="index.php?ac=assets&view=topup" class="on tag-item"><span>金币充值</span></a>
	<a href="index.php?ac=assets&view=vip" class="tag-item"><span>升级VIP</span></a>
    </div>  	
   </div> 
   <div class="assets-g"> 
    <div class="head"><strong>金币充值</strong></div> 
	<div class="contents">
	<p>暂不支持手机在线充值</p>
	<p>请通过电脑访问：<?php echo cd_weburl;?></p>
	<p>客服QQ：<?php echo cd_webqq;?></p>
	<p><a target="_blank" href="http://wpa.qq.com/msgrd?v=3&uin=<?php echo cd_webqq;?>&site=qq&menu=yes"><img border="0" src="http://wpa.qq.com/pa?p=2:<?php echo cd_webqq;?>:51" alt="点击这里给我发消息" title="点击这里给我发消息"/></a></p>
	</div>
   </div> 
<?php }elseif($view=="vip"){?>
   <div class="tag-list"> 
    <div class="tag-section">
	<a href="index.php?ac=assets" class="tag-item"><span>个人账户</span></a>
	<a href="index.php?ac=assets&view=scoreBill" class="tag-item"><span>金币账单</span></a>
	<a href="index.php?ac=assets&view=topup" class="tag-item"><span>金币充值</span></a>
	<a href="index.php?ac=assets&view=vip" class="on tag-item"><span>升级VIP</span></a>
    </div>  	
   </div> 
   <div class="assets-g"> 
    <div class="head"><strong>VIP会员金币升级</strong></div> 
	<div class="content">
	<p>金币自助转VIP：</p>
	<p>→ 如果您当前的条件满足VIP会员申请条件，您就可以直接申请成为VIP会员;</p>
	<p>开通VIP需支付：<?php echo cd_vippoints;?>金币/月　<?php echo cd_vipyearspointsa;?>金币/年</p>
	<p>VIP会员的有效期：<?php echo cd_viptime;?>天/月　<?php echo cd_vipyearstime;?>天/年</p>
<?php if(cd_vipoff=="yes"){?>
<?php if($CcTvAi_com_grade == 1){?>
         <p><a href="do.php?ac=vippoints" onClick="return confirm('确定要续费?');"><span class="button-main"><span><button type="button" id="vippoints" class="seh_b">续费月VIP</button> </span></a></span>
         <a href="do.php?ac=vipyearspoints" onClick="return confirm('确定要续费?');"><span class="button-main" style="margin-left:15px;"><span><button type="button" id="vipyearspoints" class="seh_b">续费年VIP</button> </span></span></a></p>
		 <p><span style="color: #CC0000;"><?php
$cd_vipenddate=strtotime($CcTvAi_com_vipenddate)-time();
echo "离您的VIP会员有效期还有：<b>".sprintf("%01.0f",$cd_vipenddate/86400)."</b> 天</p>";
?><p>您可以重复续费累计天数。</p></span>
<?php }else{?>
         <p><a href="do.php?ac=vippoints" onClick="return confirm('确定要申请?');"><span class="button-main"><span><button type="button" id="vippoints" class="seh_b">申请月VIP</button> </span></span></a>
         <a href="do.php?ac=vipyearspoints" onClick="return confirm('确定要申请?');"><span class="button-main" style="margin-left:15px;"><span><button type="button" id="vipyearspoints" class="seh_b">申请年VIP</button> </span></span></a></p>
<?php }?>
		 
<?php }else{?>
         <p><span style="color: #CC0000;">暂停自助开通VIP！</span></p>
<?php }?>
	</div>
    <div class="head"><strong>VIP会员在线充值</strong></div> 
	<div class="content">
	<p>暂不支持手机在线充值</p>
	<p>在线充值请通过电脑访问：<?php echo cd_weburl;?></p>
	<p>客服QQ：<?php echo cd_webqq;?></p>
	<p><a target="_blank" href="http://wpa.qq.com/msgrd?v=3&uin=<?php echo cd_webqq;?>&site=qq&menu=yes"><img border="0" src="http://wpa.qq.com/pa?p=2:<?php echo cd_webqq;?>:51" alt="点击这里给我发消息" title="点击这里给我发消息"/></a></p>
	</div>
   </div> 
<?php }?>