示例#1
0
 /**
  * 用户活跃数据
  */
 public function useractiveinfoAction()
 {
     $data = reqstr('data');
     $data = urldecode($data);
     $info = array();
     parse_str($data, $info);
     $station = empty($info['station']) ? 1 : implode(',', $info['station']);
     // $where['stationid_IN'] = $station;
     $nt = new Psys_StationModel();
     $all_month = $nt->UserActiveInfo($station);
     /*$all_month = $nt -> GetList($where,'',1,100000,'cur_month,one_month,two_month,three_month,two_befor_month,three_befor_month,cur_month_regnum,cur_month_active_user','rha_active_user');*/
     $datas[0]['name'] = '上月活跃用户';
     $datas[1]['name'] = '前两月活跃用户';
     $datas[2]['name'] = '前三月活跃用户';
     $datas[3]['name'] = '上上月活跃用户';
     $datas[4]['name'] = '上上上月活跃用户';
     $datas[5]['name'] = '本月活跃用户';
     $datas[6]['name'] = '本月注册用户';
     foreach ($all_month as $v) {
         $result['x_cat'][] = $v['cur_month'];
         $datas[0]['data'][] = (int) $v['one_month'];
         $datas[1]['data'][] = (int) $v['two_month'];
         $datas[2]['data'][] = (int) $v['three_month'];
         $datas[3]['data'][] = (int) $v['two_befor_month'];
         $datas[4]['data'][] = (int) $v['three_befor_month'];
         $datas[5]['data'][] = (int) $v['cur_month_active_user'];
         $datas[6]['data'][] = (int) $v['cur_month_regnum'];
     }
     $datas[1]['visible'] = false;
     $datas[2]['visible'] = false;
     $datas[3]['visible'] = false;
     $datas[4]['visible'] = false;
     $datas[5]['visible'] = false;
     $datas[6]['visible'] = false;
     $result['y_data'] = $datas;
     return $result;
 }