Commit c2e64fc5 by 冷斌

fix bug

parent 1665179b
...@@ -63,13 +63,13 @@ class LevelController extends HomebaseController { ...@@ -63,13 +63,13 @@ class LevelController extends HomebaseController {
$levelinfo_a=$Level_a->where("level_up>'{$userinfo['votestotal']}'")->order("levelid asc")->find(); $levelinfo_a=$Level_a->where("level_up>'{$userinfo['votestotal']}'")->order("levelid asc")->find();
if(!$levelinfo_a){ 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(); $levelinfo_a=$Level_a->order("levelid desc")->find();
} }
$cha_a=$levelinfo_a['level_up']-$userinfo['votestotal']; $cha_a=$levelinfo_a['level_up']-$userinfo['votestotal'];
if($cha_a>0) if($cha_a>0)
{ {
$baifen_a=floor($userinfo['votestotal']/$levelinfo_a['level_up']*100); $Level_a['levelid'] = $Level_a['levelid'] > 1 ? ($Level_a['levelid']-1) : $Level_a['levelid'];
$baifen_a=floor($userinfo['votestotal']/$levelinfo_a['level_up']*100);
$type_a="1"; $type_a="1";
}else{ }else{
$baifen_a=100; $baifen_a=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