Commit cae3f32f by 冷斌

update

parent 18969c88
......@@ -522,7 +522,7 @@
$level=getLevelList();
foreach($level as $k=>$v){
if( $v['level_up']>=$experience){
if( $v['level_up']>$experience){
$levelid=$v['levelid'];
break;
}else{
......@@ -556,7 +556,7 @@
$level=getLevelAnchorList();
foreach($level as $k=>$v){
if( $v['level_up']>=$experience){
if( $v['level_up']>$experience){
$levelid=$v['levelid'];
break;
}else{
......
......@@ -25,14 +25,14 @@ class LevelController extends HomebaseController {
$this->assign("userinfo",$userinfo);
/* 用户等级 */
$Level=M("experlevel");
$levelinfo=$Level->where("level_up>='{$userinfo['consumption']}'")->order("levelid asc")->find();
$levelinfo=$Level->where("level_up>'{$userinfo['consumption']}'")->order("levelid asc")->find();
if(!$levelinfo){
$levelinfo=$Level->order("levelid desc")->find();
}
$cha=$levelinfo['level_up']+1-$userinfo['consumption'];
$cha=$levelinfo['level_up']-$userinfo['consumption'];
if($cha>0)
{
$levelinfo['levelid'] = $levelinfo['levelid'] > 1 ? ($levelinfo['levelid']-1) : $levelinfo['levelid'];
$baifen=floor($userinfo['consumption']/$levelinfo['level_up']*100);
$type="1";
}else{
......@@ -47,14 +47,25 @@ class LevelController extends HomebaseController {
$this->assign("type",$type);
$this->assign('set', $set);
$anchor_certification = 0;
$auth=M("users_auth")->where("uid={$uid}")->find();
if (!empty($auth)) {
if ($auth['status']==1) {
$anchor_certification = 1;
}
}
$this->assign('anchor_certification', $anchor_certification);
/* 主播等价 */
$Level_a=M("experlevel_anchor");
$levelinfo_a=$Level_a->where("level_up>='{$userinfo['votestotal']}'")->order("levelid asc")->find();
if(!$levelinfo_a){
$Level_a['levelid'] = $Level_a['levelid'] > 1 ? ($Level_a['levelid']-1) : $Level_a['levelid'];
$levelinfo_a=$Level_a->order("levelid desc")->find();
}
$cha_a=$levelinfo_a['level_up']+1-$userinfo['votestotal'];
$cha_a=$levelinfo_a['level_up']-$userinfo['votestotal'];
if($cha_a>0)
{
$baifen_a=floor($userinfo['votestotal']/$levelinfo_a['level_up']*100);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment