@ -91,6 +91,7 @@ class PlatformController extends ThinkController
$data = array_slice($data, ($arraypage - 1) * $size, $size);
$this->meta_title = '游戏注册统计列表';
$this->assign('list_data', $data);
$this->assign("is_admin",is_administrator());
$this->display();
}
@ -172,6 +173,7 @@ class PlatformController extends ThinkController
$data = array_slice($data, ($arraypage - 1) * $size, $size);
$this->meta_title = '游戏充值统计列表';
$this->assign('list_data', $data);
$this->assign("is_admin",is_administrator());
$this->display();
}
@ -253,6 +255,7 @@ class PlatformController extends ThinkController
$this->meta_title = '注册方式统计列表';
$this->assign('list_data', $data);
$this->assign('total', $total);
$this->assign("is_admin",is_administrator());
$this->display();
}
@ -335,6 +338,7 @@ class PlatformController extends ThinkController
$data = array_slice($data, ($arraypage - 1) * $size, $size);
$this->meta_title = '充值方式统计列表';
$this->assign('list_data', $data);
$this->assign("is_admin",is_administrator());
$this->display();
}
@ -459,6 +463,7 @@ class PlatformController extends ThinkController
//用array_slice(array,offset,length) 函数在数组中根据条件取出一段值;array(数组),offset(元素的开始位置),length(组的长度)
$data = array_slice($data, ($arraypage - 1) * $size, $size);
$this->meta_title = '渠道注册统计列表';
$this->assign("is_admin",is_administrator());
$this->assign('list_data', $data);
$this->assign('total', $total);
$this->display();
@ -509,14 +514,14 @@ class PlatformController extends ThinkController
setPowerPromoteIds($promote_map2, 'id');
$promote = M("promote","tab_")->field("id,account")->page($page,$row)->where($promote_map)->where($promote_map2)->select();
$pcount = M("promote","tab_")->field("count(*) acount")->where($promote_map)->where($promote_map2)->find()['acount'];
// var_dump( $promote);
$data =array();
for ($i=0; $i < count ( $ promote ) ; $ i + + ) {
# code...
$proid = M("promote","tab_")->field("id")->where("`chain` like '%/{$promote[$i]['id']}/%'")->select();
$str = '';
for($k=0; $k< count ( $ proid ) ; $ k + + ) {
for($k=0; $k< count ( $ proid ) ; $ k + + ) {
# code...
$str .= ($proid[$k]['id'].",");
}
@ -529,26 +534,26 @@ class PlatformController extends ThinkController
unset($_REQUEST['server_id']);
}
$dbdata = $spend
->field('
->field('
floor(sum(IF(pay_time ' . $pay_time . ',pay_amount,0))*100) as count,
floor(sum(IF(pay_time ' . $today . ',pay_amount,0))*100) as today,
floor(sum(IF(pay_time ' . $week . ',pay_amount,0))*100) as week,
floor(sum(IF(pay_time ' . $mounth . ',pay_amount,0))*100) as mounth')
->where($map)
->where("pay_time".$pay_time)
->find();
->where($map)
->where("pay_time".$pay_time)
->find();
$dbdata['promote_account'] = $promote[$i]['account'];
$dbdata['promote_id'] = $promote[$i]['id'];
} else {
$dbdata = $spend
->field('
->field('
floor(sum(IF(pay_time ' . $pay_time . ',pay_amount,0))*100) as count,
floor(sum(IF(pay_time ' . $today . ',pay_amount,0))*100) as today,
floor(sum(IF(pay_time ' . $week . ',pay_amount,0))*100) as week,
floor(sum(IF(pay_time ' . $mounth . ',pay_amount,0))*100) as mounth')
->where($map)
->where("pay_time".$pay_time)
->find();
->where($map)
->where("pay_time".$pay_time)
->find();
$dbdata['promote_account'] = $promote[$i]['account'];
$dbdata['promote_id'] = $promote[$i]['id'];
}
@ -582,13 +587,14 @@ class PlatformController extends ThinkController
if ($page) {
$this->assign('_page', $page);
}
$data = my_sort($data, $data_order_type, (int)$data_order);
$size = $row;//每页显示的记录数
$pnum = ceil(count($data) / $size); //总页数, ceil()函数用于求大于数字的最小整数
$this->meta_title = '渠道充值统计列表';
$this->assign('list_data', $data);
$this->assign("is_admin",is_administrator());
$this->display();
}
@ -679,8 +685,8 @@ class PlatformController extends ThinkController
unset($_REQUEST['promote_id']);
}
$data = $spend->field('t.pid as promote_id,t.promote_account,sum(a.scount) AS count,sum(a.today) AS today,sum(a. WEEK) AS WEEK,sum(a.mounth) AS mounth')
->join("inner JOIN (SELECT tp2.*, tp1.id AS pid, tp1.account as promote_account FROM tab_promote tp1 LEFT JOIN tab_promote tp2 ON tp2.`chain` LIKE CONCAT('%/', tp1.id, '/%') where $promote_map ) AS t ON promote_id = t.id or promote_id = t.pid")
->where($condition)->table('(' . $data . ') as a')->group('t.pid')->order('count desc,a.ordertime')->select();
->join("inner JOIN (SELECT tp2.*, tp1.id AS pid, tp1.account as promote_account FROM tab_promote tp1 LEFT JOIN tab_promote tp2 ON tp2.`chain` LIKE CONCAT('%/', tp1.id, '/%') where $promote_map ) AS t ON promote_id = t.id or promote_id = t.pid")
->where($condition)->table('(' . $data . ') as a')->group('t.pid')->order('count desc,a.ordertime')->select();
$count = count($data);
foreach ($data as $key => $value) {
static $i = 0;