objLottery = new Lottery (); $this->objFeedBack = new LotteryUserFeedback (); $this->operatorData = $this->getUser (); } public function doDefault() { } /** * 获取当前互动的互动数据 * 地址:页面: http://cas.lishuy.com/?c=Admin_Activity_FeedBack&a=PageList&events_id=n * 参数:events_id 活动ID 必填 * 参数:groupByUid 是否用户排重  * */ public function doPageList() { $events_id = Request::varGetInt ( 'events_id' ); $eventData = $this->objLottery->getOneLotteryEvents ( $events_id ); $this->setOutput ( 'eventData', $eventData ); $page = Request::varGetInt ( 'page', 1 ); $size = 10; $offset = ($page - 1) * $size; $limit = "{$offset},{$size}"; $order = ' id desc'; $condition = array ( 'events_id' => $events_id ); $ids = $this->objFeedBack->findIdsBy ( $condition, $limit, $order ); $fdData = $this->objFeedBack->gets ( $ids ); $total_num = $this->objFeedBack->totals ( $condition ); if ($fdData) { foreach ($fdData as $k => $v) { $fdData[$k]['pic'] = explode(',', $v['pic']); } } // 分页 $url_tpl = Request::url(); $url_tpl .= "&page={page}"; $objPage = new Page ( $total_num, $url_tpl, $page, $size ); $page_html = $objPage->html (); $uids = array (); foreach ( $logData as $key => $data ) { $uids [$data ['uid']] = $data ['uid']; } # 通过UIDs 获取用户信息 $objMUser = new User(); $userData = $objMUser -> gets($uids); $this->tpl = 'admin/activity/user_feedback'; $title = '用户反馈'; $this->setOutput('title', $title); $this->setOutput('menu_active', array('name' => 'mypublish', 'item' => '')); //激活菜单 $this->addNavMenu('活动列表'); $this->addNavMenu($title); // 获取所有活动类型 $typeData = LotteryEvents::getType (); // 转换格式 if($eventData['type'] == LotteryEvents:: TYPE_EVENTS_SURVEY && $_GET['action'] == 'all'){ $logData =$this->setData($eventData,$logData); } $navConfig = $this->getUpPageNav($events_id, 'FeedBack'); $eventsDisplayStatus = LotteryEvents::getDisplay (); // [活动] 是否显示 $this->setOutput ( 'eventsDisplayStatus', $eventsDisplayStatus ); $this->setOutput ( 'navConfig', $navConfig ); //公用内部导航信息 $this->setOutput ( 'page_html', $page_html ); //分页HTML $this->setOutput ( 'total_num', $total_num ); //分页HTML $this->setOutput ( 'fdData', $fdData ); // feedback $this->setOutput ( 'userData', $userData ); // 当前列表用户信息 $this->setOutput ( 'eventData', $eventData ); // 当前活动信息 $this->setOutput ( 'typeData', $typeData ); $this->setOutput('displayDesc', LotteryEvents::getDisplay()); $this->setOutput('pagePublicData', $this->getPagePublicData($events_id)); // 后台管理相关数据 } /** * 事件:更新隐藏状态 * 地址:http://cas.lishuy.com/index.php?c=Admin_Activity_FeedBack&a=Audit * 参数:见方法内 */ public function doStatus() { $tableInfo = $_POST; if (isset($tableInfo['yes']) && $tableInfo['yes']) { $tableInfo['yes'] = explode(',', $tableInfo['yes']); foreach ($tableInfo['yes'] as $k => $v) { $info = array( 'status' => 1, 'operator_uid' => $operator_uid ); $this->objFeedBack->modify( $info, array ( 'id' => $v )); } } if (isset($tableInfo['no']) && $tableInfo['no']) { $tableInfo['no'] = explode(',', $tableInfo['no']); foreach ($tableInfo['no'] as $k => $v) { $info = array( 'status' => 2, 'operator_uid' => $operator_uid ); $this->objFeedBack->modify( $info, array ( 'id' => $v )); } } $this->ajax_success_exit(); } public function display() { return $this->render (); } }