Beispiel #1
0
 public function userlog()
 {
     $this->moduleTag = 'userlog';
     $type = input_string($this->input->get('type'), array('all', 'C', 'I', 'D', 'U'), 'all');
     $page = input_int($this->input->get('page'), 1, FALSE, 1);
     $perpage = input_int($this->input->get('perpage'), 1, FALSE, 15);
     $starttime = input_empty($this->input->get('starttime'), '');
     $endtime = input_empty($this->input->get('endtime'), '');
     if ($starttime) {
         $starttime = strtotime($starttime);
     }
     if ($endtime) {
         $endtime = strtotime($endtime) + 86399;
     }
     $search = array('starttime' => $starttime, 'endtime' => $endtime, 'type' => $type);
     $rs = $this->model->get_backend_logs($search, $page, $perpage);
     $data = $rs['list'];
     $users = array();
     if ($data) {
         foreach ($data as $key => $val) {
             $ids[] = $val['user_id'];
         }
         $ids = implode(',', array_unique($ids));
         $users = $this->model->get_user_name_by_user_ids($ids);
     }
     $total = $rs['total'];
     $pageInfo = array('total' => $total, 'perpage' => $perpage, 'curpage' => $page, 'totalpage' => $total / $perpage, 'url' => makePageUrl($page));
     $this->viewData = array('data' => $data, 'users' => $users, 'pageInfo' => $pageInfo, 'starttime' => $starttime, 'endtime' => $endtime, 'type' => $type);
 }
Beispiel #2
0
 public function index()
 {
     $y = date("Y", time());
     $m = date("m", time());
     $d = date("d", time());
     $t1 = mktime(0, 0, 0, $m, 1, $y);
     //创建本月开始时间
     $t2 = time() - 86400;
     //昨天
     $this->moduleTag = 'point';
     $page = input_int($this->input->get('page'), 1, FALSE, 1);
     $perpage = input_int($this->input->get('perpage'), 0, FALSE, 15);
     $starttime = input_empty($this->input->get('starttime'), '');
     $endtime = input_empty($this->input->get('endtime'), '');
     $starttime = $starttime ? $starttime : date('Y-m-d', $t1);
     $endtime = $endtime ? $endtime : date('Y-m-d', $t2);
     if ($starttime) {
         $starttime = strtotime($starttime);
     }
     if ($endtime) {
         $endtime = strtotime($endtime) + 86399;
     }
     $search = array('starttime' => $starttime, 'endtime' => $endtime);
     $rs = $this->model->get_point($search, $page, $perpage);
     $total = $rs['total'];
     $data = $rs['list'];
     $send_point = '';
     $reduce_point = '';
     foreach ($data as $k => $v) {
         $send_point += $v['send_point'];
         $reduce_point += $v['use_point'];
     }
     $pageInfo = array('total' => $total, 'perpage' => $perpage, 'curpage' => $page, 'totalpage' => $total / 15, 'url' => makePageUrl($page));
     $this->viewData = array('data' => $data, 'pageInfo' => $pageInfo, 'starttime' => $starttime, 'endtime' => $endtime, 'send_point' => $send_point, 'reduce_point' => $reduce_point);
 }
Beispiel #3
0
 public function feedback()
 {
     $this->moduleTag = 'feedback';
     $page = input_int($this->input->get('page'), 1, FALSE, 1);
     $perpage = input_int($this->input->get('perpage'), 0, FALSE, 15);
     $starttime = input_empty($this->input->get('starttime'), '');
     $endtime = input_empty($this->input->get('endtime'), '');
     if ($starttime) {
         $starttime = strtotime($starttime);
     }
     if ($endtime) {
         $endtime = strtotime($endtime) + 86399;
     }
     $search = array('starttime' => $starttime, 'endtime' => $endtime);
     $rs = $this->model->get_user_feedback($search, $page, $perpage);
     $total = $rs['total'];
     $data = $rs['list'];
     $pageInfo = array('total' => $total, 'perpage' => $perpage, 'curpage' => $page, 'totalpage' => $total / 15, 'url' => makePageUrl($page));
     $this->viewData = array('data' => $data, 'pageInfo' => $pageInfo, 'starttime' => $starttime, 'endtime' => $endtime);
 }
Beispiel #4
0
 /**
  * 用户管理 用户列表
  * web page
  */
 public function index()
 {
     $this->moduleTag = 'userIndex';
     $type = input_string($this->input->get('type'), array('all', 'user', 'innholder', 'cservice', 'smanager'), 'all');
     $user_name = $this->input->get('user_name');
     $nick_name = $this->input->get('nick_name');
     $page = input_int($this->input->get('page'), 1, FALSE, 1);
     $perpage = input_int($this->input->get('perpage'), 0, FALSE, 15);
     $starttime = input_empty($this->input->get('starttime'), '');
     $endtime = input_empty($this->input->get('endtime'), '');
     if ($starttime) {
         $starttime = strtotime($starttime);
     }
     if ($endtime) {
         $endtime = strtotime($endtime) + 86399;
     }
     $search = array('starttime' => $starttime, 'endtime' => $endtime, 'type' => $type, 'user_name' => $user_name, 'nick_name' => $nick_name);
     $data = $this->model->get_backend_users_by_param($search, $page, $perpage);
     $total = $data['total'];
     $users = $data['list'];
     $pageInfo = array('total' => $total, 'perpage' => $perpage, 'curpage' => $page, 'totalpage' => $total / 15, 'url' => makePageUrl($page));
     $this->viewData = array('users' => $users, 'type' => $type, 'pageInfo' => $pageInfo, 'starttime' => $starttime, 'endtime' => $endtime);
 }
Beispiel #5
0
 public function reply()
 {
     $this->moduleTag = 'reply';
     $page = input_int($this->input->get('page'), 1, FALSE, 1);
     $perpage = input_int($this->input->get('perpage'), 0, FALSE, 15);
     $class = input_string($this->input->get('class'), array('all', 'wenda', 'jianren', 'tour'), 'all');
     $keyword = input_empty(trim($this->input->get('keyword')), '');
     $starttime = input_empty($this->input->get('starttime'), '');
     $is_del = input_int($this->input->get('is_del'), 1, FALSE, 0);
     $endtime = input_empty($this->input->get('endtime'), '');
     if ($starttime) {
         $starttime = strtotime($starttime);
     }
     if ($endtime) {
         $endtime = strtotime($endtime) + 86399;
     }
     $search = array('starttime' => $starttime, 'endtime' => $endtime, 'class' => $class, 'keyword' => $keyword, 'is_del' => $is_del);
     $rs = $this->model->get_reply($search, $page, $perpage);
     $total = $rs['total'];
     $data = $rs['list'];
     $pageInfo = array('total' => $total, 'perpage' => $perpage, 'curpage' => $page, 'totalpage' => $total / 15, 'url' => makePageUrl($page));
     $this->viewData = array('frontUrl' => $this->config->item('front_url'), 'data' => $data, 'pageInfo' => $pageInfo, 'starttime' => $starttime, 'endtime' => $endtime, 'class' => $class, 'is_del' => $is_del);
 }
Beispiel #6
0
 /**
  * 查看当前用户的提现记录
  */
 public function cashout()
 {
     $this->moduleTag = 'innsCashout';
     $inn_id = $this->model->getUserInnId();
     $page = $this->input->get('page') ? $this->input->get('page') : '1';
     $perpage = DEFAULT_PERPAGE;
     $data = $this->model->search_cash_apply_by_inns(build_limit($page, $perpage), $inn_id);
     $account = $this->inns_model->get_inns_account_balance($inn_id, true);
     $pageInfo = array('total' => $data['total'], 'perpage' => $perpage, 'curpage' => $page, 'totalpage' => $data['total'] / $perpage, 'url' => makePageUrl($page));
     $this->viewData = array('data' => $data['data'], 'account' => $account, 'totalAmout' => $data['totalAmount'], 'pageInfo' => $pageInfo);
 }
Beispiel #7
0
 public function account()
 {
     $this->moduleTag = 'account';
     $dest_id = input_int($this->input->get('tid'), 1, FALSE, 0);
     $local_id = input_int($this->input->get('lid'), 1, FALSE, 0);
     $inn_id = input_int($this->input->get('sid'), 1, FALSE, 0);
     $page = input_int($this->input->get('page'), 1, FALSE, 1);
     $perpage = input_int($this->input->get('perpage'), 1, 500, 15);
     $userinfo = array();
     $arr = $this->model->get_localArr($inn_id, $local_id, $dest_id);
     $destInfo = $arr['destInfo'];
     $localArr = $arr['localArr'];
     $Innlist = $arr['Innlist'];
     if ($inn_id) {
         $data = $this->model->search_account_records_by_inn_id($inn_id, $page, $perpage);
         $list = $data['list'];
         $records = array();
         if ($list) {
             $user_ids = array();
             foreach ($list as $key => $row) {
                 $user_ids[$row['create_by']] = $row['create_by'];
                 $row['create_time'] = date('Y-m-d H:i:s', $row['create_time']);
                 $records[] = $row;
             }
             if (isset($user_ids['0'])) {
                 unset($user_ids['0']);
             }
             if ($user_ids) {
                 $users = $this->model->get_user_info_in_ids(implode(',', $user_ids), 'ui.user_id,ui.real_name', FALSE, TRUE);
                 foreach ($users as $key => $row) {
                     $userinfo[$row['user_id']]['real_name'] = $row['real_name'] ? $row['real_name'] : $row['user_name'];
                 }
             }
             $userinfo['0']['real_name'] = '系统';
         }
     } else {
         if ($dest_id) {
             $search['key'] = 'dest';
             $search['key_id'] = $destInfo['dest_id'];
         } else {
             if ($local_id) {
                 $search['key'] = 'local';
                 $search['key_id'] = $destInfo['local_id'];
             } else {
                 $search['key'] = 'default';
             }
         }
         $data = $this->model->get_inns_account_list($search, $page, $perpage);
         $records = $data['list'];
     }
     $total = $data['total'];
     $pageInfo = array('total' => $total, 'totalpage' => $total / $perpage, 'perpage' => $perpage, 'curpage' => $page, 'url' => makePageUrl($page));
     $this->viewData = array('localArr' => $localArr, 'destInfo' => $destInfo, 'Innlist' => $Innlist, 'records' => $records, 'inn_id' => $inn_id, 'userinfo' => $userinfo, 'pageInfo' => $pageInfo);
 }
Beispiel #8
0
 /**
  * 且游订单
  */
 public function qieyou()
 {
     $this->controllerTag = 'qieyou';
     $this->moduleTag = 'qieyouList';
     $starttime = input_int($this->input->get('st'), 1000000000, 2000000000, 0);
     $endtime = input_int($this->input->get('ed'), 1000000000, 2000000000, 0);
     $state = input_string($this->input->get('state'), array('all', 'paid', 'finished', 'refund', 'refunded', 'unpaid', 'cancel', 'waiting'), 'all');
     $page = input_int($this->input->get('page'), 1, FALSE, 1);
     $cid = input_int($this->input->get('cid'), 1, FALSE, 0);
     $dest_id = input_int($this->input->get('tid'), 1, FALSE, 0);
     $local_id = input_int($this->input->get('lid'), 1, FALSE, 0);
     $inn_id = $this->get_user_inn_id();
     $per_page = 20;
     $orders = array('list' => array(), 'total' => 0);
     $orderstate = array('all' => 0, 'unpaid' => 1, 'paid' => 2, 'finished' => 3, 'refunded' => 4, 'cancel' => 5, 'refund' => 6, 'waiting' => 7);
     $search = array('key' => 'qieyou', 'key_id' => $inn_id, 'sid' => '', 'cid' => $cid, 'state' => $orderstate[$state], 'st' => $starttime, 'ed' => $endtime);
     $key = $this->input->get('key');
     $keyword = $this->input->get('keyword');
     $search_keyword = array('key' => $key, 'keyword' => $keyword);
     $orders = $this->model->get_orders($search, $page, $per_page, $search_keyword);
     /**************页面载入相关信息处理**************/
     $total = $orders['total'];
     $order_products = array();
     $orderlist = array();
     if ($total) {
         $orderview = $this->orderview($orders);
         $orderlist = $orderview['orders'];
         $order_products = $orderview['order_products'];
     }
     $pageInfo = array('total' => $total, 'perpage' => $per_page, 'curpage' => $page, 'totalpage' => $total / $per_page, 'url' => makePageUrl());
     $this->viewData = array('orders' => $orderlist, 'order_products' => $order_products, 'pageInfo' => $pageInfo, 'state' => $state, 'cid' => $cid, 'starttime' => $starttime, 'endtime' => $endtime);
 }
Beispiel #9
0
 /**
  * 推荐信息列表
  * 团购中商品推荐信息
  * 虚拟信息 后台添加
  */
 public function optionList()
 {
     $page = input_int($this->input->get_post('page'), 1, FALSE, 1);
     $perpage = input_int($this->input->get_post('perpage'), 1, 20, 10);
     $this->load->model('product_option_model');
     $data = $this->product_option_model->optList($page, $perpage);
     $total = $data['total'];
     $list = $data['list'];
     /**************页面载入相关信息处理**************/
     $pageInfo = array('total' => $total, 'perpage' => $per_page, 'curpage' => $page, 'totalpage' => $total / $per_page, 'url' => makePageUrl($page));
     $this->viewData = array('data' => $list);
 }
Beispiel #10
0
 public function groups()
 {
     $this->controllerTag = 'groups';
     $this->moduleTag = 'groups';
     $page = input_int($this->input->get('page'), 1, FALSE, 1);
     $perpage = input_int($this->input->get('perpage'), 1, FALSE, 15);
     $search['keyword'] = $this->input->get('keyword');
     $rs = $this->model->get_groups($search, $page, $perpage);
     $data = $rs['list'];
     $total = $rs['total'];
     $pageInfo = array('total' => $total, 'perpage' => $perpage, 'curpage' => $page, 'totalpage' => $total / $perpage, 'url' => makePageUrl($page));
     $this->viewData = array('data' => $data, 'pageInfo' => $pageInfo);
 }
Beispiel #11
0
 public function searchDestInns()
 {
     $this->moduleTag = 'searchDestInns';
     $dest_id = input_int($this->input->get('tid'), 1, FALSE, 0);
     $local_id = input_int($this->input->get('lid'), 1, FALSE, 0);
     $page = input_int($this->input->get('page'), 1, FALSE, 1);
     $perpage = DEFAULT_PERPAGE;
     $arr = $this->model->get_localArr(0, $local_id, $dest_id);
     $destInfo = $arr['destInfo'];
     $localArr = $arr['localArr'];
     $destInnsInfo = $this->model->searchInnsBy_dest_Id(build_limit($page, $perpage), $dest_id, $local_id);
     $pageInfo = array('total' => $destInnsInfo['total'], 'perpage' => $perpage, 'curpage' => $page, 'totalpage' => $destInnsInfo['total'] / $perpage, 'url' => makePageUrl($page));
     $this->viewData = array('destInnsInfo' => $destInnsInfo, 'destInfo' => $destInfo, 'localArr' => $localArr, 'pageInfo' => $pageInfo);
 }