Ejemplo n.º 1
0
 /**
  * 添加控制器
  */
 public function actionAddCtl()
 {
     if ($this->_isPost()) {
         $data = $this->_modelAct->addCtl($_POST);
         $this->_utilMsg->showMsg($data['msg'], $data['status'], $data['href']);
     } else {
         $this->_helpSqlSearch->set_tableName($this->_modelAct->tName());
         $this->_helpSqlSearch->set_conditions('parent_id=0');
         $sql = $this->_helpSqlSearch->createSql();
         $dataList = $this->_modelAct->select($sql);
         foreach ($dataList as &$value) {
             $value['url_edit'] = Tools::url(CONTROL, 'EditCtl', array('Id' => $value['Id']));
             $value['url_del'] = Tools::url(CONTROL, 'DelCtl', array('Id' => $value['Id']));
             if ($value['allow'] == RBAC_EVERYONE) {
                 $value['word_allow'] = '所有用户';
             } else {
                 if (empty($value['allow'])) {
                     $value['word_allow'] = '暂无角色';
                 } else {
                     $value['word_allow'] = $value['allow'];
                 }
             }
         }
         $this->_view->assign('dataList', $dataList);
         $this->_utilMsg->createNavBar();
         $this->_view->display();
     }
 }
Ejemplo n.º 2
0
 /**
  * 问卷列表
  */
 private function _ls()
 {
     $this->_modelAskform = $this->_getGlobalData('Model_Askform', 'object');
     $users = $this->_getGlobalData('user');
     #------分页生成sql------#
     $helpSqlSearch = $this->_loadCore('Help_SqlSearch');
     $helpSqlSearch = new Help_SqlSearch();
     $helpSqlSearch->set_tableName($this->_modelAskform->tName());
     $helpSqlSearch->setPageLimit($_GET['page'], PAGE_SIZE);
     $sql = $helpSqlSearch->createSql();
     $this->_loadCore('Help_Page');
     #------分页生成sql------#
     $dataList = $this->_modelAskform->select($sql);
     if ($dataList) {
         $helpPage = new Help_Page(array('total' => $this->_modelAskform->findCount(), 'perpage' => PAGE_SIZE));
         $this->_view->assign('pageBox', $helpPage->show());
         foreach ($dataList as &$list) {
             $list['word_user_id'] = $users[$list['user_id']]['nick_name'];
             $list['start_time'] = date('Y-m-d H:i:s', $list['start_time']);
             $list['end_time'] = date('Y-m-d H:i:s', $list['end_time']);
             $list['word_status'] = $this->_askStatus[$list['status']];
             $list['url_del'] = Tools::url(CONTROL, ACTION, array('Id' => $list['Id'], 'doaction' => 'del'));
             $list['url_addoption'] = Tools::url(CONTROL, ACTION, array('Id' => $list['Id'], 'doaction' => 'addOption'));
             $list['url_show'] = Tools::url(CONTROL, ACTION, array('Id' => $list['Id'], 'doaction' => 'show'));
         }
         $this->_view->assign("dataList", $dataList);
     }
     $this->_utilMsg->createNavBar();
     $this->_view->set_tpl(array('body' => 'Askform/Ls.html'));
     $this->_view->display();
 }
Ejemplo n.º 3
0
 private function _dataInLocalLog()
 {
     $modelGameOperateLog = $this->_getGlobalData('Model_GameOperateLog', 'object');
     $this->_loadCore('Help_SqlSearch');
     //载入sql工具
     $helpSqlSearch = new Help_SqlSearch();
     $helpSqlSearch->set_tableName($modelGameOperateLog->tName());
     $helpSqlSearch->set_conditions("game_server_id=" . intval($_REQUEST['server_id']));
     $helpSqlSearch->set_conditions("operate_type=" . self::LOGTYPE);
     $helpSqlSearch->setPageLimit($_GET['page'], PAGE_SIZE);
     $helpSqlSearch->set_orderBy('Id desc');
     $sql = $helpSqlSearch->createSql();
     $data = $modelGameOperateLog->select($sql);
     $users = $this->_getGlobalData('user_index_id');
     //获得所有用户的数组
     foreach ($data as &$sub) {
         $sub['user_id'] = $users[$sub['user_id']];
         $sub['create_time'] = date('Y-m-d H:i:s', $sub['create_time']);
         $sub['URL_del'] = $this->_urlLockAccountDel($sub['game_user_id'], $sub['game_user_account'], $sub['game_user_nickname']);
         $sub['info'] = unserialize($sub['info']);
         $sub['endTime'] = $sub['info']['FromGame']['endTime'];
     }
     $this->_assign['dataList'] = $data;
     $this->_loadCore('Help_Page');
     //载入分页工具
     $conditions = $helpSqlSearch->get_conditions();
     $helpPage = new Help_Page(array('total' => $modelGameOperateLog->findCount($conditions), 'perpage' => PAGE_SIZE));
     $this->_assign['pageBox'] = $helpPage->show();
 }
Ejemplo n.º 4
0
 /**
  * 返回邮件列表
  * @param array $limit
  * @param int $type
  */
 public function getMail($limit, $where)
 {
     $this->_loadCore('Help_Page');
     $this->_loadCore('Help_SqlSearch');
     $this->_modelUserMail = $this->_getGlobalData('Model_UserMail', 'object');
     $helpSqlSearch = new Help_SqlSearch();
     $helpSqlSearch->set_tableName($this->_modelUserMail->tName());
     $helpSqlSearch->set_conditions("user_id={$this->_id}");
     if ($where !== null) {
         foreach ($where as $key => $value) {
             $helpSqlSearch->set_conditions("{$key}='{$value}'");
         }
     }
     $helpSqlSearch->set_orderBy('create_time desc');
     $helpSqlSearch->setPageLimit($limit[0], $limit[1]);
     $conditions = $helpSqlSearch->get_conditions();
     $sql = $helpSqlSearch->createSql();
     $dataList = $this->_modelUserMail->select($sql);
     if (count($dataList)) {
         Tools::import('Util_FontColor');
         foreach ($dataList as &$list) {
             $list['word_is_read'] = Util_FontColor::getMailRead($list['is_read']);
             if ($list['href']) {
                 $list['title'] = "<a href='javascript:void(0)' is_read='{$list['is_read']}' url='{$list['href']}' cur_id='{$list['Id']}' onclick='readMail(\$(this))'>{$list['title']}</a>";
             } else {
                 $list['title'] = "<a href='javascript:void(0)' is_read='{$list['is_read']}' cur_id='{$list['Id']}' onclick='readMail(\$(this))'>{$list['title']}</a>";
             }
         }
         $helpPage = new Help_Page(array('total' => $this->_modelUserMail->findCount($conditions), 'perpage' => $limit[1]));
         $pageBox = $helpPage->show();
         return array('data' => $dataList, 'pageBox' => $pageBox);
     } else {
         return false;
     }
 }
Ejemplo n.º 5
0
 private function _index()
 {
     $users = $this->getItUsers();
     $selected = array();
     $progromGroup = $this->_getGlobalData('program/project');
     $progromGroup = Model::getTtwoArrConvertOneArr($progromGroup, 'Id', 'name');
     $this->_utilRbac = $this->_getGlobalData('Util_Rbac', 'object');
     $userClass = $this->_utilRbac->getUserClass();
     $this->_loadCore('Help_SqlSearch');
     $this->_modelProgramDatework = $this->_getGlobalData('Model_ProgramDatework', 'object');
     $helpSqlSearch = new Help_SqlSearch();
     $helpSqlSearch->set_tableName($this->_modelProgramDatework->tName());
     $helpSqlSearch->set_orderBy('start_time desc');
     if ($_REQUEST['user_id']) {
         $helpSqlSearch->set_conditions("user_id={$_REQUEST['user_id']}");
         $selected['user_id'] = $_REQUEST['user_id'];
     }
     if ($_REQUEST['group_id']) {
         $helpSqlSearch->set_conditions("group_id={$_REQUEST['group_id']}");
         $selected['group_id'] = $_REQUEST['group_id'];
     }
     if ($_REQUEST['start_time'] && $_REQUEST['end_time']) {
         $helpSqlSearch->set_conditions('start_time between ' . strtotime($_REQUEST['start_tme'] . ' and ' . strtotime($_REQUEST['end_time'])));
         $selected['start_time'] = $_REQUEST['start_time'];
         $selected['end_time'] = $_REQUEST['end_time'];
     }
     $conditions = $helpSqlSearch->get_conditions();
     $helpSqlSearch->setPageLimit($_POST['page']);
     $sql = $helpSqlSearch->createSql();
     $dataList = $this->_modelProgramDatework->select($sql);
     if ($dataList) {
         foreach ($dataList as &$list) {
             $list['word_user_id'] = $users[$list['user_id']];
             $list['is_over'] = $list['actual_time'] ? true : false;
             $list['word_is_over'] = $list['actual_time'] ? '完成' : '未完成';
             $list['start_time'] = date('Y-m-d H:i:s', $list['start_time']);
             $list['end_time'] = date('Y-m-d H:i:s', $list['end_time']);
             $list['actual_time'] = $list['actual_time'] ? date('Y-m-d H:i:s', $list['actual_time']) : '';
             $list['word_group_id'] = $progromGroup[$list['group_id']];
             $list['url_finish'] = Tools::url(CONTROL, 'Index', array('doaction' => 'finish', 'Id' => $list['Id'], 'zp' => 'Program'));
             $list['url_edit'] = Tools::url(CONTROL, 'Index', array('doaction' => 'edit', 'Id' => $list['Id'], 'zp' => 'Program'));
         }
         $this->_view->assign('dataList', $dataList);
         $this->_loadCore('Help_Page');
         $helpPage = new Help_Page(array('total' => $this->_modelProgramDatework->findCount($conditions), 'perpage' => PAGE_SIZE));
         $this->_view->assign('pageBox', $helpPage->show());
     }
     $this->_view->assign('selected', $selected);
     $this->_view->assign('users', $users);
     $this->_view->assign('progromGroup', $progromGroup);
     $this->_utilMsg->createPackageNavBar();
     $this->_view->display();
 }
Ejemplo n.º 6
0
 /**
  * searchFAQ
  */
 public function actionSearch()
 {
     $this->_loadCore('Help_SqlSearch');
     $this->_helpSqlSearch = new Help_SqlSearch();
     $this->_modelPlayerFaq = $this->_getGlobalData('Model_PlayerFaq', 'object');
     $gameTypeId = abs(intval($_REQUEST['game_id']));
     $keyWords = $_REQUEST['keywords'];
     $page = abs(intval($_REQUEST['p']));
     if (!$page) {
         $page = 1;
     }
     $pageSize = abs(intval($_REQUEST['ps']));
     if (!$pageSize) {
         $pageSize = 8;
     }
     $this->_helpSqlSearch->set_tableName($this->_modelPlayerFaq->tName());
     $this->_helpSqlSearch->set_field('Id,ratio,game_type_id,kind_id,question');
     $this->_helpSqlSearch->set_conditions("game_type_id={$gameTypeId}");
     $this->_helpSqlSearch->set_conditions("question like '%{$keyWords}%'");
     $this->_helpSqlSearch->setPageLimit($page, $pageSize);
     $conditions = $this->_helpSqlSearch->get_conditions();
     $sql = $this->_helpSqlSearch->createSql();
     $dataList = $this->_modelPlayerFaq->select($sql);
     if (!$dataList) {
         $this->_returnAjaxJson(array('status' => 0, 'info' => 'NO_FIND', 'data' => null));
     }
     //无数据返回出错.
     $count = $this->_modelPlayerFaq->findCount($conditions);
     $toalPgae = ceil($count / $pageSize);
     $this->_returnAjaxJson(array('status' => 1, 'info' => null, 'data' => array('page' => array('total' => $count, 'total_page' => $toalPgae, 'page' => $page, 'page_size' => $pageSize), 'list' => $dataList)));
 }
Ejemplo n.º 7
0
 /**
  * faq列表
  */
 public function actionList()
 {
     $this->_loadCore('Help_SqlSearch');
     $this->_helpSqlSearch = new Help_SqlSearch();
     $this->_modelPlayerFaq = $this->_getGlobalData('Model_PlayerFaq', 'object');
     $kindId = abs(intval($_GET['kind_id']));
     $page = $_GET['page'] ? abs(intval($_GET['page'])) : abs(intval($_GET['p']));
     if (!$page) {
         $page = 1;
     }
     $pageSize = abs(intval($_GET['ps']));
     if (!$pageSize) {
         $pageSize = 8;
     }
     $this->_helpSqlSearch->set_tableName($this->_modelPlayerFaq->tName());
     $this->_helpSqlSearch->set_field('Id,ratio,game_type_id,kind_id,question');
     $this->_helpSqlSearch->set_conditions("kind_id={$kindId}");
     $this->_helpSqlSearch->set_conditions('status!=1');
     $this->_helpSqlSearch->setPageLimit($page, $pageSize);
     $sql = $this->_helpSqlSearch->createSql();
     $dataList = $this->_modelPlayerFaq->select($sql);
     if (false === $dataList) {
         $this->_returnAjaxJson(array('status' => 0, 'info' => 'NO_FIND', 'data' => null));
     }
     //无数据返回出错.
     $count = $this->_modelPlayerFaq->findCount("kind_id={$kindId} and status!=1");
     $toalPgae = ceil($count / $pageSize);
     $this->_returnAjaxJson(array('status' => 1, 'info' => 'InterfaceFaq_List', 'data' => array('page' => array('total' => $count, 'total_page' => $toalPgae, 'page' => $page, 'page_size' => $pageSize), 'list' => $dataList)));
 }
Ejemplo n.º 8
0
 public function actionPsdLink()
 {
     $this->_modelLyPsdLink = $this->_getGlobalData('Model_LyPsdLink', 'object');
     $gameTypes = $this->_modelLyPsdLink->getMyGame();
     $this->_loadCore('Help_SqlSearch');
     $helpSqlSearch = new Help_SqlSearch();
     $helpSqlSearch->set_tableName($this->_modelLyPsdLink->tName());
     $_GET['game_type_id'] = intval($_GET['game_type_id']);
     if ($_GET['game_type_id']) {
         $helpSqlSearch->set_conditions("game_type_id={$_GET['game_type_id']}");
     } else {
         $InData = array_keys($gameTypes);
         $InData = implode(',', $InData);
         $helpSqlSearch->set_conditions("game_type_id in ({$InData})");
     }
     $StartTime = strtotime($_GET['start_time']);
     if ($StartTime) {
         $helpSqlSearch->set_conditions("edit_time>={$StartTime}");
     }
     $EndTime = strtotime($_GET['end_time']);
     if ($EndTime) {
         $helpSqlSearch->set_conditions("edit_time<={$EndTime}");
     }
     $helpSqlSearch->set_orderBy('Id desc');
     $helpSqlSearch->setPageLimit($_GET['page'], PAGE_SIZE);
     $sql = $helpSqlSearch->createSql();
     $dataList = $this->_modelLyPsdLink->select($sql);
     foreach ($dataList as &$sub) {
         $sub['game_type'] = $gameTypes[$sub['game_type_id']];
         $sub['edit'] = Tools::url(CONTROL, 'PsdLinkOpt', array('zp' => 'LianYun', 'Id' => $sub['Id'], 'doaction' => 'edit'));
         $sub['del'] = Tools::url(CONTROL, 'PsdLinkOpt', array('zp' => 'LianYun', 'Id' => $sub['Id'], 'doaction' => 'del'));
     }
     $conditions = $helpSqlSearch->get_conditions();
     $this->_loadCore('Help_Page');
     //载入分页工具
     $helpPage = new Help_Page(array('total' => $this->_modelLyPsdLink->findCount($conditions), 'perpage' => PAGE_SIZE));
     $this->_view->assign('pageBox', $helpPage->show());
     $this->_view->assign('dataList', $dataList);
     $gameTypes[0] = Tools::getLang('ALL', 'Common');
     $this->_view->assign('gameTypes', $gameTypes);
     $this->_view->assign('selected', $_GET);
     $this->_utilMsg->createPackageNavBar();
     $this->_view->display();
 }
Ejemplo n.º 9
0
 /**
  * 根据ID取得记录集
  * @param array $ids
  */
 public function getListByIds($ids)
 {
     $htmlpSqlSearch = $this->_loadCore('Help_SqlSearch');
     $htmlpSqlSearch = new Help_SqlSearch();
     $htmlpSqlSearch->set_tableName($this->tName());
     if (is_array($ids)) {
         $params = "Id in(";
         $i = 0;
         foreach ($ids as $id) {
             if ($i++ == 0) {
                 $params .= $id;
             } else {
                 $params .= ',' . $id;
             }
         }
         $params .= ")";
         $htmlpSqlSearch->set_conditions($params);
     }
     $sql = $htmlpSqlSearch->createSql();
     return $this->select($sql);
 }
Ejemplo n.º 10
0
 private function _addChild()
 {
     if ($this->_isPost()) {
         $_POST['status'] = $_POST['status'] ? 1 : 0;
         if ($this->_modelMenu->add($_POST)) {
             $this->_utilMsg->showMsg(false);
         } else {
             $this->_utilMsg->showMsg('添加失败,可能已经有相同的标识', -2);
         }
     } else {
         $this->_helpSqlSearch->set_tableName($this->_modelMenu->tName());
         $this->_helpSqlSearch->set_conditions('parent_id=0');
         $sql = $this->_helpSqlSearch->createSql();
         $mainList = $this->_modelMenu->select($sql);
         $mainList = $this->_modelMenu->getTtwoArrConvertOneArr($mainList, 'Id', 'name');
         $this->_view->assign('mainList', $mainList);
         $this->_utilMsg->createNavBar();
         $this->_view->set_tpl(array('body' => 'Menu/AddChild.html'));
         $this->_view->display();
     }
 }
Ejemplo n.º 11
0
 public function actionWorkOrderDetail()
 {
     $userInfo = array('user_account' => trim($_REQUEST['user_account']), 'game_user_id' => trim($_REQUEST['user_id']), 'user_nickname' => trim(urldecode($_REQUEST['user_nickname'])));
     $userInfo = array_filter($userInfo);
     //检查玩家
     if ($userInfo) {
         $workOrder_condition = key($userInfo) . "='" . current($userInfo) . "'";
     } else {
         $this->_returnAjaxJson(array('status' => 0, 'info' => 'player empty', 'data' => null));
     }
     $workOrderId = intval($_REQUEST['work_order_id']);
     if (!$workOrderId) {
         $this->_returnAjaxJson(array('status' => 0, 'info' => 'Work Order Id Empty', 'data' => null));
     }
     $this->_modelWorkOrder = $this->_getGlobalData('Model_WorkOrder', 'object');
     $sql_CheckWorkOrder = "select Id,question_type as type,title,create_time as update_time,evaluation_status as ev,evaluation_desc as ev_desc,status,is_read from {$this->_modelWorkOrder->tName()} where Id={$workOrderId} and {$workOrder_condition}";
     $workOrderData = $this->_modelWorkOrder->select($sql_CheckWorkOrder, 1);
     if (!$workOrderData) {
         $this->_returnAjaxJson(array('status' => 0, 'info' => 'the player has not this order', 'data' => null));
     }
     if ($workOrderData['is_read'] == 0) {
         $this->_modelWorkOrder->update(array('is_read' => 1), "Id={$workOrderId}");
         //更改已读状态
     }
     $this->_loadCore('Help_SqlSearch');
     //载入sql工具
     $this->_modelWorkOrderQa = $this->_getGlobalData('Model_WorkOrderQa', 'object');
     $helpSqlSearch = new Help_SqlSearch();
     $helpSqlSearch->set_field('Id as id,work_order_id,qa,service_id,content,create_time,image');
     $helpSqlSearch->set_tableName($this->_modelWorkOrderQa->tName());
     $helpSqlSearch->set_conditions('work_order_id=' . $workOrderId);
     $helpSqlSearch->set_conditions('not_sendmsg=0');
     $helpSqlSearch->set_orderBy('create_time');
     $sql = $helpSqlSearch->createSql();
     $dataList = $this->_modelWorkOrderQa->select($sql);
     $this->_returnAjaxJson(array('status' => 1, 'info' => CONTROL . '_' . ACTION, 'data' => $dataList, 'ext' => $workOrderData));
 }
Ejemplo n.º 12
0
 public function getDetail($serverId = 0, $gameUserId = 0, $operateType = 0, $page = 1, $pageSize = 50)
 {
     $serverId = intval($serverId);
     //		$gameUserId = intval($gameUserId);
     $operateType = intval($operateType);
     $page = max(1, intval($page));
     $pageSize = abs($pageSize);
     $this->_loadCore('Help_SqlSearch');
     //载入sql工具
     $helpSqlSearch = new Help_SqlSearch();
     $helpSqlSearch->set_field('Id,info,create_time');
     $helpSqlSearch->set_tableName($this->tName());
     if ($serverId) {
         $helpSqlSearch->set_conditions("game_server_id={$serverId}");
     }
     if ($gameUserId) {
         $helpSqlSearch->set_conditions("game_user_id={$gameUserId}");
     }
     if ($operateType) {
         $helpSqlSearch->set_conditions("operate_type={$operateType}");
     }
     $helpSqlSearch->set_orderBy('Id desc');
     $helpSqlSearch->setPageLimit($page, $pageSize);
     $sql = $helpSqlSearch->createSql();
     $dataList = $this->select($sql);
     if (!$dataList) {
         return array();
     }
     foreach ($dataList as &$sub) {
         $sub['info'] = unserialize($sub['info']);
         $sub['info'] = $sub['info']['AddString'];
         $sub['create_time'] = date('Y-m-d H:i:s', $sub['create_time']);
     }
     return $dataList;
 }
Ejemplo n.º 13
0
 public function actionOperatorInfo()
 {
     $_GET['page'] = intval(max(1, $_GET['page']));
     $gameTypes = $this->_getGlobalData('game_type');
     $gameTypes = Model::getTtwoArrConvertOneArr($gameTypes, 'Id', 'name');
     $gameTypes[0] = '全部';
     $operators = $this->_getGlobalData('operator_list');
     $operators = Model::getTtwoArrConvertOneArr($operators, 'Id', 'operator_name');
     //谁出客服
     $CsSupply = array('0' => '我方', '1' => '对方');
     //谁出服务器
     $ServerSupply = array('0' => '我方', '1' => '对方');
     $this->_modelLyOperatorInfo = $this->_getGlobalData('Model_LyOperatorInfo', 'object');
     $this->_loadCore('Help_SqlSearch');
     $helpSqlSearch = new Help_SqlSearch();
     $helpSqlSearch->set_tableName($this->_modelLyOperatorInfo->tName());
     $_GET['game_type_id'] = intval($_GET['game_type_id']);
     if ($_GET['game_type_id'] > 0) {
         $helpSqlSearch->set_conditions("game_type_id={$_GET['game_type_id']}");
     }
     //《--选择
     $selected['game_type_id'] = $_GET['game_type_id'];
     //选择--》
     $helpSqlSearch->set_orderBy('Id desc');
     $helpSqlSearch->setPageLimit($_GET['page'], PAGE_SIZE);
     $sql = $helpSqlSearch->createSql();
     $dataList = $this->_modelLyOperatorInfo->select($sql);
     $urlLenLimit = 25;
     foreach ($dataList as &$value) {
         $value['game_type_id'] = isset($gameTypes[$value['game_type_id']]) ? $gameTypes[$value['game_type_id']] : '-';
         $value['operator_id'] = isset($operators[$value['operator_id']]) ? $operators[$value['operator_id']] : '-';
         $value['cs_supply'] = isset($CsSupply[$value['cs_supply']]) ? $CsSupply[$value['cs_supply']] : '-';
         $value['server_supply'] = isset($ServerSupply[$value['server_supply']]) ? $ServerSupply[$value['server_supply']] : '-';
         $value['edit'] = Tools::url(CONTROL, 'OperatorInfoEdit', array('doaction' => 'edit', 'zp' => 'LianYun', 'Id' => $value['Id']));
         $value['del'] = Tools::url(CONTROL, 'OperatorInfoEdit', array('doaction' => 'del', 'zp' => 'LianYun', 'Id' => $value['Id']));
         $value['website_url_show'] = strlen($value['website_url']) > $urlLenLimit ? substr($value['website_url'], 0, $urlLenLimit) . '...' : $value['website_url'];
         $value['forum_url_show'] = strlen($value['forum_url']) > $urlLenLimit ? substr($value['forum_url'], 0, $urlLenLimit) . '...' : $value['forum_url'];
         $value['datum_url_show'] = strlen($value['datum_url']) > $urlLenLimit ? substr($value['datum_url'], 0, $urlLenLimit) . '...' : $value['datum_url'];
     }
     $conditions = $helpSqlSearch->get_conditions();
     $total = $this->_modelLyOperatorInfo->findCount($conditions);
     $this->_loadCore('Help_Page');
     $helpPage = new Help_Page(array('total' => $total, 'perpage' => PAGE_SIZE));
     $this->_view->assign('pageBox', $helpPage->show());
     $this->_view->assign('dataList', $dataList);
     $this->_view->assign('game_type_id', $gameTypes);
     $this->_view->assign('selected', $selected);
     $this->_utilMsg->createPackageNavBar();
     $this->_view->display();
 }
Ejemplo n.º 14
0
 /**
  * 服务器列表查看
  */
 private function _index()
 {
     $this->_loadCore('Help_SqlSearch');
     $this->_modelGameSerList = $this->_getGlobalData('Model_GameSerList', 'object');
     $helpSqlSearch = new Help_SqlSearch();
     $helpSqlSearch->set_tableName($this->_modelGameSerList->tName());
     $helpSqlSearch->set_conditions('Id !=100 and Id !=200');
     if ($_GET['game_type_id'] != '') {
         $helpSqlSearch->set_conditions("game_type_id={$_GET['game_type_id']}");
         $this->_view->assign('selectedGameTypeId', $_GET['game_type_id']);
     }
     if ($_GET['operator_id'] != '') {
         $helpSqlSearch->set_conditions("operator_id={$_GET['operator_id']}");
         $this->_view->assign('selectedOperatorId', $_GET['operator_id']);
     }
     if ($_GET['server_name']) {
         $helpSqlSearch->set_conditions("server_name like '%{$_GET['server_name']}%'");
         $this->_view->assign('selectedServerName', $_GET['server_name']);
     }
     $helpSqlSearch->setPageLimit($_GET['page']);
     $conditions = $helpSqlSearch->get_conditions();
     $sql = $helpSqlSearch->createSql();
     $serverList = $this->_modelGameSerList->select($sql);
     $gameTypeList = Model::getTtwoArrConvertOneArr($this->_modelSysconfig->getValueToCache('game_type'), 'Id', 'name');
     $operatorList = $this->_modelOperatorList->findAll(false);
     $operatorList = $this->_modelOperatorList->getTtwoArrConvertOneArr($operatorList, 'Id', 'operator_name');
     if ($serverList) {
         foreach ($serverList as &$value) {
             $value['word_game_type'] = $gameTypeList[$value['game_type_id']];
             $value['word_operator_name'] = $operatorList[$value['operator_id']];
             $value['url_edit'] = Tools::url(CONTROL, ACTION, array('Id' => $value['Id'], 'doaction' => 'edit'));
             $value['url_del'] = Tools::url(CONTROL, ACTION, array('Id' => $value['Id'], 'doaction' => 'del'));
         }
         $this->_loadCore('Help_Page');
         $helpPage = new Help_Page(array('total' => $this->_modelGameSerList->findCount($conditions), 'perpage' => PAGE_SIZE));
         $this->_view->assign('pageBox', $helpPage->show());
     }
     $this->_view->assign('dataList', $serverList);
     $gameTypeList[''] = '所有';
     $this->_view->assign('gameTypeList', $gameTypeList);
     $operatorList[''] = '所有';
     $this->_view->assign('operatorList', $operatorList);
     $this->_view->set_tpl(array('body' => 'GameSerList/Index.html'));
     $this->_utilMsg->createNavBar();
     $this->_view->display();
 }
Ejemplo n.º 15
0
 /**
  * ajax返回指定条件的日志id所在页数
  */
 private function _operationLogFindPage()
 {
     $this->_checkOperatorAct();
     $this->_createServerList();
     if ($_REQUEST['server_id']) {
         $_GET['rootid'] = intval($_GET['rootid']);
         $_GET['typeid'] = intval($_GET['typeid']);
         $_GET['playerId'] = intval($_GET['playerId']);
         $_GET['name'] = trim(strval($_GET['name']));
         //			$_GET['account'] = trim(strval($_GET['account']));
         $_GET['LogId'] = intval($_GET['LogId']);
         if ($_GET['LogId'] <= 0) {
             $this->_returnAjaxJson(array('status' => 0, 'info' => '选择Id错误!', 'data' => NULL));
         }
         $table = 'user_log';
         $this->_loadCore('Help_SqlSearch');
         $helpSqlSearch = new Help_SqlSearch();
         $helpSqlSearch->set_tableName($table);
         $helpSqlSearch->set_conditions("id >='{$_GET['LogId']}'");
         //连贯操作锁定分类是否作为条件
         if (intval($_GET['sequenceLock'])) {
             if ($_GET['rootid']) {
                 $helpSqlSearch->set_conditions("rootid={$_GET['rootid']}");
             }
             if ($_GET['typeid']) {
                 $helpSqlSearch->set_conditions("typeid={$_GET['typeid']}");
             }
         }
         if ($_GET['playerId']) {
             $helpSqlSearch->set_conditions("playerId={$_GET['playerId']}");
         }
         if ($_GET['name'] != '') {
             $helpSqlSearch->set_conditions("name='{$_GET['name']}'");
         }
         //			if($_GET['account']!=''){
         //				$helpSqlSearch->set_conditions("account='{$_GET['account']}'");
         //			}
         $conditions = $helpSqlSearch->get_conditions();
         $totle = $this->CountXianHun($table, $conditions);
         if ($totle === false) {
             $this->_returnAjaxJson(array('status' => 0, 'info' => '数据库查询错误!', 'data' => NULL));
         }
         $page = max(1, ceil($totle / PAGE_SIZE));
         $ajacReturn = array('status' => 1, 'info' => NULL, 'data' => $page);
         $this->_returnAjaxJson($ajacReturn);
     } else {
         $this->_returnAjaxJson(array('status' => 0, 'info' => '请选择服务器!', 'data' => NULL));
     }
 }
Ejemplo n.º 16
0
 /**
  * 我被质检过的回复
  */
 public function actionMyReplyQulity()
 {
     #------初始化------#
     $this->_loadCore('Help_Page');
     $this->_loadCore('Help_SqlSearch');
     $this->_helpSqlSearch = new Help_SqlSearch();
     $this->_utilRbac = $this->_getGlobalData('Util_Rbac', 'object');
     $this->_modelReplyQulity = $this->_getGlobalData('Model_ReplyQulity', 'object');
     $qualityStatus = $this->_getGlobalData('quality_status');
     $qualityOptions = $this->_getGlobalData('quality_options');
     #------初始化------#
     $allUser = $this->_getGlobalData('user');
     $userClass = $this->_utilRbac->getUserClass();
     $this->_helpSqlSearch->set_tableName($this->_modelReplyQulity->tName());
     $this->_helpSqlSearch->set_conditions("user_id='{$userClass['_id']}'");
     if ($_GET['option']) {
         $this->_helpSqlSearch->set_conditions("option_id={$_GET['option']}");
         $this->_view->assign('selectedOption', $_GET['option']);
     }
     if ($_GET['status']) {
         $this->_helpSqlSearch->set_conditions("status={$_GET['status']}");
         $this->_view->assign('selectedStatus', $_GET['status']);
     }
     if ($_GET['is_timeout'] != '') {
         $this->_helpSqlSearch->set_conditions("is_timeout={$_GET['is_timeout']}");
         $this->_view->assign('selectedTimeout', $_GET['is_timeout']);
     }
     if ($_GET['scores']) {
         $this->_view->assign('selectedSource', $_GET['scores']);
         if ($_GET['scores'] == 1) {
             $this->_helpSqlSearch->set_conditions("scores<0");
         } else {
             $this->_helpSqlSearch->set_conditions("scores>=0");
         }
     }
     $this->_helpSqlSearch->set_orderBy('create_time desc');
     $this->_helpSqlSearch->setPageLimit($_GET['page'], 20);
     $allConditions = $this->_helpSqlSearch->get_conditions();
     //返回所有条件
     $helpPage = new Help_Page(array('total' => $this->_modelReplyQulity->findCount($allConditions), 'perpage' => 20));
     $sql = $this->_helpSqlSearch->createSql();
     $dataList = $this->_modelReplyQulity->select($sql);
     if ($dataList) {
         Tools::import('Util_FontColor');
         foreach ($dataList as &$value) {
             $value['create_time'] = date('Y-m-d H:i:s', $value['create_time']);
             $value['url_detail'] = Tools::url('QualityCheck', 'QualityDetail', array('work_order_id' => $value['work_order_id'], 'qa_id' => $value['qa_id']));
             $value['word_quality_user_id'] = $allUser[$value['quality_user_id']]['nick_name'];
             $value['word_status'] = Util_FontColor::getQualityStatus($value['status'], $qualityStatus[$value['status']]);
             $value['content'] = strip_tags($value['content']);
             $value['word_option_id'] = $qualityOptions[$value['option_id']];
         }
         $this->_view->assign('dataList', $dataList);
     }
     $qualityStatus[''] = Tools::getLang('ALL', 'Common');
     $qualityOptions[''] = Tools::getLang('ALL', 'Common');
     $this->_view->assign('qualityStatus', $qualityStatus);
     $this->_view->assign('qualityOptions', $qualityOptions);
     $this->_view->assign('scores', Tools::getLang('SOURCE', __CLASS__));
     $this->_view->assign('timeout', Tools::getLang('TIMEOUT', __CLASS__));
     $this->_view->assign('pageBox', $helpPage->show());
     $this->_view->assign('js', $this->_view->get_curJs());
     $this->_utilMsg->createNavBar();
     $this->_view->display();
 }
Ejemplo n.º 17
0
 /**
  * faq显示页面
  */
 public function actionPlayerIndex()
 {
     $this->_lang = $this->_getGlobalData('lang');
     //多语言
     $this->_faqKind[''] = Tools::getLang('ALL', 'Common');
     $this->_modelPlayerFaq = $this->_getGlobalData('Model_PlayerFaq', 'object');
     $this->_loadCore('Help_SqlSearch');
     $helpSqlSearch = new Help_SqlSearch();
     $helpSqlSearch->set_tableName($this->_modelPlayerFaq->tName());
     $_GET['lang'] = $_GET['lang'] ? $_GET['lang'] : 1;
     //默认简体:1
     $helpSqlSearch->set_conditions("lang_id='{$_GET['lang']}'");
     //默认语言
     $this->_view->assign('selectedLang', $_GET['lang']);
     if ($_GET['game_type_id'] != '') {
         $helpSqlSearch->set_conditions("game_type_id={$_GET['game_type_id']}");
         $this->_view->assign('selectedGameTypeId', $_GET['game_type_id']);
         $faqKind = $this->_modelPlayerKindFaq->findByGameTypeId($_GET['game_type_id'], $_GET['lang']);
         $kindList = array();
         foreach ($faqKind as $value) {
             $kindList[$value['Id']] = $value['name'] . "({$value['count']})";
         }
         $kindList[''] = Tools::getLang('ALL', 'Common');
         $this->_view->assign('kindList', $kindList);
         if ($_GET['kind_id']) {
             $helpSqlSearch->set_conditions("kind_id={$_GET['kind_id']}");
             $this->_view->assign('selectedkindId', $_GET['kind_id']);
         }
     }
     if ($_GET['status'] != '') {
         $helpSqlSearch->set_conditions("status={$_GET['status']}");
         $this->_view->assign('selectedFaqStatus', $_GET['status']);
     }
     if ($_GET['question'] != '') {
         $helpSqlSearch->set_conditions("question like '%{$_GET['question']}%'");
         $this->_view->assign('selectedQuestion', $_GET['question']);
     }
     if ($_GET['answer'] != '') {
         $helpSqlSearch->set_conditions("(answer_g like '%{$_GET['answer']}%' or answer_s like '%{$_GET['answer']}%')");
         $this->_view->assign('selectedAnswer', $_GET['answer']);
     }
     if ($_GET['starttime'] != '') {
         $helpSqlSearch->set_conditions("(time>" . strtotime($_GET['starttime']) . ")");
         $this->_view->assign('selectedstarttime', $_GET['starttime']);
     }
     if ($_GET['endtime'] != '') {
         $helpSqlSearch->set_conditions("(time<" . strtotime($_GET['endtime']) . ")");
         $this->_view->assign('selectedendtime', $_GET['endtime']);
     }
     $faqStatus = $this->_modelPlayerFaq->getFaqStatus();
     $conditions = $helpSqlSearch->get_conditions();
     $by = $_GET['by'] == 'asc' ? 'desc' : 'asc';
     $this->_view->assign('curBy', $by);
     if (in_array($_GET['order'], array('ratio', 'time'))) {
         $helpSqlSearch->set_orderBy("{$_GET['order']} {$by}");
     }
     $helpSqlSearch->setPageLimit($_GET['page']);
     $sql = $helpSqlSearch->createSql();
     //print_r($sql);
     $dataList = $this->_modelPlayerFaq->select($sql);
     if ($dataList) {
         $users = $this->_getGlobalData('user');
         foreach ($dataList as &$list) {
             $list['word_game_type_id'] = $this->_faqKind[$list['game_type_id']];
             $list['question'] = strip_tags($list['question']);
             $list['answer_s'] = strip_tags($list['answer_s']);
             if ($list["check_status"] != 0) {
                 $list["check_status"] = date("Y-m-d H:i:s", $list["check_status"]);
             }
             $list['answer_g'] = strip_tags($list['answer_g']);
             $list['word_status'] = $faqStatus[$list['status']];
             $list['word_user_id'] = $users[$list['user_id']]['nick_name'];
             $list['time'] = date('Y-m-d H:i:s', $list['time']);
             $list['url_edit'] = Tools::url(CONTROL, 'Player', array('doaction' => 'edit', 'lang' => $_REQUEST['lang'], 'game_type_id' => $list['game_type_id'], 'kind_id' => $list['kind_id'], 'Id' => $list['Id']));
             $list['url_del'] = Tools::url(CONTROL, 'Player', array('doaction' => 'del', 'lang' => $_REQUEST['lang'], 'game_type_id' => $list['game_type_id'], 'kind_id' => $list['kind_id'], 'Id' => $list['Id']));
         }
         //print_r($dataList["0"]);
         $this->_view->assign('dataList', $dataList);
         $this->_loadCore('Help_Page');
         $helpPage = new Help_Page(array('total' => $this->_modelPlayerFaq->findCount($conditions), 'perpage' => PAGE_SIZE));
         $this->_view->assign('pageBox', $helpPage->show());
     }
     $this->_view->assign("ajaxurl", Tools::url(CONTROL, 'checkfaq'));
     //		print_r($this->_lang);
     $this->_view->assign('lang', $this->_lang);
     $this->_view->assign('faqStatus', $this->_modelPlayerFaq->getFaqStatus());
     $this->_view->assign('game_type', $this->_faqKind);
     $this->_view->assign('gameTypeKind', $this->_faqKind);
     $this->_utilMsg->createNavBar();
     $this->_view->display();
 }
Ejemplo n.º 18
0
 /**
  * 显示申请列表
  * @param int $ListType
  * @param boolean $isLimit
  */
 private function _showList($ListType = 0, $isLimit = true)
 {
     $L_All = Tools::getLang('ALL', 'Common');
     //“全部”的语言翻译
     $this->_modelApply = $this->_getGlobalData('Model_Apply', 'object');
     $this->_modelApplyType = $this->_getGlobalData('Model_ApplyType', 'object');
     $ApplyType = $this->_modelApplyType->getApplyType($ListType, $_GET['game_type']);
     if (false === $ApplyType) {
         $this->_utilMsg->showMsg('List Type Error', -1);
         $this->_utilMsg->showMsg('List Type Error', -1);
     }
     $ApplyType[0] = "[{$L_All}]";
     $_GET['game_type'] = intval($_GET['game_type']);
     if ($isLimit) {
         //个人权限下的游戏列表 和 运营商列表
         $GameType = $this->_myGames;
         $Operator = (array) $this->_myOperators;
         if ($_GET['game_type']) {
             $gameOperatorIndex = $this->_getGlobalData('Model_GameOperator', 'object')->findByGameTypeId($_GET['game_type']);
             $gameOperatorIndex = Model::getTtwoArrConvertOneArr($gameOperatorIndex, 'operator_id', 'operator_name');
             $Operator = array_intersect_key($Operator, $gameOperatorIndex);
         }
     } else {
         //没有限制地取得 游戏列表 和运营商列表
         $GameType = $this->_getGlobalData('game_type');
         $GameType = Model::getTtwoArrConvertOneArr($GameType, 'Id', 'name');
         $Operator = $this->_getGlobalData('operator_list');
         $Operator = Model::getTtwoArrConvertOneArr($Operator, 'Id', 'operator_name');
         if ($_GET['game_type']) {
             $gameOperatorIndex = $this->_getGlobalData('Model_GameOperator', 'object')->findByGameTypeId($_GET['game_type']);
             $gameOperatorIndex = Model::getTtwoArrConvertOneArr($gameOperatorIndex, 'operator_id', 'operator_name');
             $Operator = array_intersect_key($Operator, $gameOperatorIndex);
         }
     }
     if (empty($GameType) || empty($Operator)) {
         $this->_utilMsg->showMsg('您还没有相应的游戏或运营商操作权限', -1, 1, false);
     }
     $GameType[0] = "[{$L_All}]";
     $Operator[-1] = '[多运营商申请]';
     $Operator[''] = "[{$L_All}]";
     $ServerList = $this->_getGlobalData('gameser_list');
     $IsSend = array(0 => '未审核', 1 => '通过', 2 => '拒绝', '' => "[{$L_All}]");
     $PlayerType = array('' => "-{$L_All}-", 1 => '玩家Id', 2 => '账号', 3 => '昵称', 0 => '无玩家');
     $users = $this->_getGlobalData('user');
     $this->_loadCore('Help_SqlSearch');
     //载入sql工具
     $helpSqlSearch = new Help_SqlSearch();
     $helpSqlSearch->set_tableName($this->_modelApply->tName());
     //判断是否具有游戏的操作权限
     if ($_GET['game_type'] && !array_key_exists($_GET['game_type'], $GameType)) {
         $this->_utilMsg->showMsg('无权限访问该游戏', -1);
     }
     //重置 使用者不能访问的运营商
     $operatorId = intval($_GET['operator_id']);
     if ($operatorId && !array_key_exists($operatorId, $Operator)) {
         $_GET['operator_id'] = '';
         $operatorId = 0;
     }
     $helpSqlSearch->set_conditions("list_type={$ListType}");
     if ($_GET['game_type']) {
         $helpSqlSearch->set_conditions("game_type={$_GET['game_type']}");
     } elseif ($isLimit) {
         if (count($this->_myGames) == 1) {
             $helpSqlSearch->set_conditions('game_type=' . intval(key($this->_myGames)));
         } else {
             $helpSqlSearch->set_conditions('game_type in (' . implode(',', array_keys($this->_myGames)) . ')');
         }
     }
     if ($operatorId) {
         $helpSqlSearch->set_conditions("operator_id={$operatorId}");
     } elseif ($isLimit) {
         //权限受限
         if (count($this->_myOperators) == 1) {
             $helpSqlSearch->set_conditions('operator_id=' . intval(key($this->_myOperators)));
         } else {
             $helpSqlSearch->set_conditions('operator_id in (' . implode(',', array_keys($this->_myOperators)) . ')');
         }
     }
     $_GET['type'] = intval($_GET['type']);
     if (!$_GET['type'] || !array_key_exists($_GET['type'], $ApplyType)) {
         $_GET['type'] = 0;
     } else {
         $helpSqlSearch->set_conditions("type={$_GET['type']}");
     }
     $isSend = $_GET['is_send'];
     if ($isSend != '') {
         $isSend = intval($isSend);
         $helpSqlSearch->set_conditions("is_send={$isSend}");
     }
     $createTimeStart = strtotime($_GET['create_time_start']);
     if ($createTimeStart) {
         $helpSqlSearch->set_conditions("create_time>={$createTimeStart}");
     }
     $createTimeEnd = strtotime($_GET['create_time_end']);
     if ($createTimeEnd) {
         $helpSqlSearch->set_conditions("create_time<={$createTimeEnd}");
     }
     $_GET['apply_ip'] = trim($_GET['apply_ip']);
     if (!empty($_GET['apply_ip'])) {
         $helpSqlSearch->set_conditions("apply_ip='{$_GET['apply_ip']}'");
     }
     $_GET['apply_user_id'] = intval($_GET['apply_user_id']);
     if ($_GET['apply_user_id']) {
         $helpSqlSearch->set_conditions("apply_user_id={$_GET['apply_user_id']}");
     }
     $_GET['audit_user_id'] = intval($_GET['audit_user_id']);
     if ($_GET['audit_user_id']) {
         $helpSqlSearch->set_conditions("audit_user_id={$_GET['audit_user_id']}");
     }
     $playerType = $_GET['player_type'];
     if ($playerType != '') {
         $playerType = intval($playerType);
         $helpSqlSearch->set_conditions("player_type={$playerType}");
     }
     $_GET['player_info'] = trim($_GET['player_info']);
     if (!empty($_GET['player_info'])) {
         $helpSqlSearch->set_conditions("player_info like '%{$_GET['player_info']}%'");
     }
     $helpSqlSearch->setPageLimit($_GET['page'], PAGE_SIZE);
     $helpSqlSearch->set_orderBy('is_send asc,Id desc');
     $sql = $helpSqlSearch->createSql();
     //		echo $sql;
     $dataList = $this->_modelApply->select($sql);
     if ($dataList && is_array($dataList)) {
         foreach ($dataList as &$sub) {
             $sub['type'] = $ApplyType[$sub['type']];
             $sub['game_type'] = $GameType[$sub['game_type']];
             $sub['operator_id'] = $Operator[$sub['operator_id']];
             $sub['server_id'] = $ServerList[$sub['server_id']]['server_name'];
             $sub['apply_user_id'] = $users[$sub['apply_user_id']]['nick_name'];
             $sub['create_time'] = date('Y-m-d H:i:s', $sub['create_time']);
             $sub['audit_user_id'] = $users[$sub['audit_user_id']]['nick_name'];
             $sub['send_time'] = $sub['send_time'] ? date('Y-m-d H:i:s', $sub['send_time']) : '';
             $sub['is_send_info'] = $IsSend[$sub['is_send']];
             $sub['player_type'] = $PlayerType[$sub['player_type']];
         }
     } else {
         $dataList = array();
     }
     $this->_view->assign('dataList', $dataList);
     $conditions = $helpSqlSearch->get_conditions();
     $this->_loadCore('Help_Page');
     //载入分页工具
     $conditions = $helpSqlSearch->get_conditions();
     $helpPage = new Help_Page(array('total' => $this->_modelApply->findCount($conditions), 'perpage' => PAGE_SIZE));
     $this->_view->assign('pageBox', $helpPage->show());
     $users = Model::getTtwoArrConvertOneArr($users, 'Id', 'full_name', array('' => "-{$L_All}-"));
     $this->_view->assign('users', $users);
     $this->_view->assign('game_type', $GameType);
     $this->_view->assign('operator_id', $Operator);
     $this->_view->assign('type', $ApplyType);
     $this->_view->assign('is_send', $IsSend);
     $this->_view->assign('player_type', $PlayerType);
     $this->_view->assign('_GET', $_GET);
     $this->_view->set_tpl(array('body' => 'Apply/ShowList.html'));
     $this->_view->display();
 }
Ejemplo n.º 19
0
 /**
  * 游戏FAQ,用于显示在游戏里面的faq
  */
 public function actionGameFaq()
 {
     switch ($_GET['doaction']) {
         case 'kinddel':
             //删除
             $this->_modelGameKindFaq = $this->_getGlobalData('Model_GameKindFaq', 'object');
             if ($this->_modelGameKindFaq->deleteById($_GET['Id'])) {
                 $this->_modelGameFaq = $this->_getGlobalData('GameFaq', 'object');
                 $this->_modelGameFaq->deleteByKindId($_GET['Id']);
                 //删除所有这个分类的FAQ
                 $this->_utilMsg->showMsg(false);
             } else {
                 $this->_utilMsg->showMsg('删除失败', -2);
             }
             break;
         case 'kindedit':
             //编辑
             if (!$this->_isAjax()) {
                 return false;
             }
             $this->_modelGameKindFaq = $this->_getGlobalData('Model_GameKindFaq', 'object');
             if ($this->_modelGameKindFaq->update(array('name' => $_GET['data']), "Id={$_GET['Id']}")) {
                 $this->_returnAjaxJson(array('status' => 1));
             }
             break;
         case 'kindadd':
             //增加分类
             if (!$this->_isAjax()) {
                 return false;
             }
             $this->_modelGameKindFaq = $this->_getGlobalData('Model_GameKindFaq', 'object');
             if ($this->_modelGameKindFaq->add(array('game_type_id' => $_GET['game_type_id'], 'name' => $_GET['data']))) {
                 $this->_returnAjaxJson(array('status' => 1));
             }
             break;
         case 'kindindex':
             //分类
             $dataList = array();
             foreach ($this->_faqKind as $key => $value) {
                 $this->_modelGameKindFaq = $this->_getGlobalData('Model_GameKindFaq', 'object');
                 $childList = $this->_modelGameKindFaq->findByGameTypeId($key);
                 if (count($childList)) {
                     foreach ($childList as &$childValue) {
                         $childValue['url_edit'] = Tools::url(CONTROL, ACTION, array('Id' => $childValue['Id'], 'doaction' => 'kindedit'));
                         $childValue['url_del'] = Tools::url(CONTROL, ACTION, array('Id' => $childValue['Id'], 'doaction' => 'kinddel'));
                     }
                 }
                 $dataList[] = array('game_type' => $value, 'game_type_id' => $key, 'url_add' => Tools::url(CONTROL, ACTION, array('game_type_id' => $key, 'doaction' => 'kindadd')), 'childList' => $childList ? $childList : null);
             }
             $this->_view->assign('dataList', $dataList);
             $this->_utilMsg->createNavBar();
             $this->_view->set_tpl(array('body' => 'Faq/GameFaqkindindex.html'));
             $this->_view->display();
             break;
         case 'add':
             //增加
             $this->_modelGameKindFaq = $this->_getGlobalData('Model_GameKindFaq', 'object');
             $this->_modelGameFaq = $this->_getGlobalData('Model_GameFaq', 'object');
             if ($this->_isPost()) {
                 if ($this->_modelGameFaq->add($_POST)) {
                     $this->_modelGameKindFaq->update(array('count' => 'count+1'), "Id={$_POST['kind_id']}");
                     //数量加1
                     $this->_utilMsg->showMsg(false);
                 } else {
                     $this->_utilMsg->showMsg('增加失败', -2);
                 }
             } else {
                 $gameTypes = $this->_faqKind;
                 $kindList = $this->_modelGameKindFaq->findById($_GET['kind_id']);
                 $this->_view->assign('gameType', array('Id' => $_GET['game_type_id'], 'name' => $gameTypes[$_GET['game_type_id']]));
                 $this->_view->assign('kindList', $kindList);
                 $this->_view->set_tpl(array('body' => 'Faq/GameFaqadd.html'));
                 $this->_utilMsg->createNavBar();
                 $this->_view->display();
             }
             break;
         case 'edit':
             //编辑
             $this->_modelGameKindFaq = $this->_getGlobalData('Model_GameKindFaq', 'object');
             $this->_modelGameFaq = $this->_getGlobalData('Model_GameFaq', 'object');
             if ($this->_isPost()) {
                 $updateArr = array('question' => $_POST['question'], 'answer' => $_POST['answer']);
                 if ($this->_modelGameFaq->update($updateArr, "Id={$_POST['Id']}")) {
                     $this->_utilMsg->showMsg(false, 1, Tools::url(CONTROL, ACTION));
                 } else {
                     $this->_utilMsg->showMsg('增加失败', -2);
                 }
             } else {
                 $faqList = $this->_modelGameFaq->findById($_GET['Id']);
                 $faqList['question'] = str_replace("\\", '', $faqList['question']);
                 $faqList['answer'] = str_replace("\\", '', $faqList['answer']);
                 $gameTypes = $this->_faqKind;
                 $kindList = $this->_modelGameKindFaq->findById($_GET['kind_id']);
                 $this->_view->assign('gameType', array('Id' => $_GET['game_type_id'], 'name' => $gameTypes[$_GET['game_type_id']]));
                 $this->_view->assign('kindList', $kindList);
                 $this->_view->assign('id', $_GET['Id']);
                 $this->_view->assign('faqList', $faqList);
                 $this->_view->set_tpl(array('body' => 'Faq/GameFaqedit.html'));
                 $this->_utilMsg->createNavBar();
                 $this->_view->display();
             }
             break;
         case 'del':
             //删除
             if (!$this->_isAjax()) {
                 return false;
             }
             $this->_modelGameKindFaq = $this->_getGlobalData('Model_GameKindFaq', 'object');
             $this->_modelGameFaq = $this->_getGlobalData('Model_GameFaq', 'object');
             if ($this->_modelGameFaq->deleteById($_GET['Id'])) {
                 $this->_modelGameKindFaq->update(array('count' => 'count-1'), "Id={$_GET['kind_id']}");
                 //数量减1
                 $this->_returnAjaxJson(array('status' => 1));
             }
             break;
         case 'ratioedit':
             //编辑点击率
             $this->_modelGameFaq = $this->_getGlobalData('Model_GameFaq', 'object');
             $data = $this->_modelGameFaq->ratioEdit($_POST);
             $this->_utilMsg->showMsg($data['msg'], $data['status'], $data['href']);
             break;
         case 'ratio':
             //点击率
             $this->_modelGameFaq = $this->_getGlobalData('Model_GameFaq', 'object');
             $this->_loadCore('Help_SqlSearch');
             $helpSqlSearch = new Help_SqlSearch();
             $helpSqlSearch->set_tableName($this->_modelGameFaq->tName());
             if ($_GET['game_type_id'] != '') {
                 $helpSqlSearch->set_conditions("game_type_id={$_GET['game_type_id']}");
                 $this->_view->assign('selectedGameTypeId', $_GET['game_type_id']);
             }
             $conditions = $helpSqlSearch->get_conditions();
             $helpSqlSearch->set_orderBy('ratio desc');
             $helpSqlSearch->setPageLimit($_GET['page']);
             $sql = $helpSqlSearch->createSql();
             $dataList = $this->_modelGameFaq->select($sql);
             if ($dataList) {
                 foreach ($dataList as &$list) {
                     $list['word_game_type_id'] = $this->_faqKind[$list['game_type_id']];
                     $list['question'] = strip_tags($list['question']);
                     $list['answer'] = strip_tags($list['answer']);
                     $list['url_edit'] = Tools::url(CONTROL, ACTION, array('Id' => $list['Id'], 'kind_id' => $list['kind_id'], 'doaction' => 'edit'));
                 }
                 $this->_view->assign('dataList', $dataList);
                 $this->_loadCore('Help_Page');
                 $helpPage = new Help_Page(array('total' => $this->_modelGameFaq->findCount($conditions), 'perpage' => PAGE_SIZE));
                 $this->_view->assign('pageBox', $helpPage->show());
             }
             $this->_view->assign('game_type', $this->_faqKind);
             $this->_view->assign('gameTypeKind', $this->_faqKind);
             $this->_utilMsg->createNavBar();
             $this->_view->set_tpl(array('body' => 'Faq/GameFaqratio.html'));
             $this->_view->display();
             break;
         case 'kindtree':
             //显示分类
             if (!$this->_isAjax()) {
                 return false;
             }
             $value = $this->_faqKind[$_GET['Id']];
             $key = $_GET['Id'];
             if (!$value) {
                 return false;
             }
             $jsonData = array();
             $i = 0;
             $this->_modelGameKindFaq = $this->_getGlobalData('Model_GameKindFaq', 'object');
             $childKind = $this->_modelGameKindFaq->findByGameTypeId($key);
             $childKindNum = count($childKind);
             $jsonData[$i] = array('text' => "{$value}({$childKindNum})", 'expanded' => 1, 'classes' => 'important');
             if ($childKindNum) {
                 $jsonData[$i]['children'] = array();
                 foreach ($childKind as $childValue) {
                     $addUrl = Tools::url(CONTROL, ACTION, array('kind_id' => $childValue['Id'], 'game_type_id' => $_GET['Id'], 'doaction' => 'add'));
                     $jsonData[$i]['children'][] = array('text' => "<a href='javascript:void(0)' onclick='displayFaq({$childValue['Id']})'>{$childValue['name']}</a>({$childValue['count']}) [<a href='{$addUrl}'>增加FAQ</a>]");
                 }
             }
             $this->_returnAjaxJson($jsonData);
         case 'viewfaq':
             //显示faq
             if (!$_GET['kindId']) {
                 return false;
             }
             $this->_modelGameFaq = $this->_getGlobalData('Model_GameFaq', 'object');
             $dataList = $this->_modelGameFaq->findByKindId($_GET['kindId']);
             foreach ($dataList as &$value) {
                 $value['url_edit'] = Tools::url(CONTROL, ACTION, array('Id' => $value['Id'], 'kind_id' => $value['kind_id'], 'doaction' => 'edit'));
                 $value['url_del'] = Tools::url(CONTROL, ACTION, array('Id' => $value['Id'], 'kind_id' => $value['kind_id'], 'doaction' => 'del'));
                 if (strpos($value['question'], '\\')) {
                     $value['question'] = str_replace('\\', '', $value['question']);
                 }
                 if (strpos($value['answer'], '\\')) {
                     $value['answer'] = str_replace('\\', '', $value['answer']);
                 }
             }
             $this->_returnAjaxJson($dataList);
             break;
         default:
             //faq主页显示
             $this->_view->assign('gameTypeKind', $this->_faqKind);
             $this->_utilMsg->createNavBar();
             $this->_view->display();
             break;
     }
 }
Ejemplo n.º 20
0
 private function _spActivityIndex()
 {
     #------初始化------#
     $this->_createServerList();
     $serverList = $this->_getGlobalData('gameser_list');
     $this->_modelFrgSpecialActivity = $this->_getGlobalData('Model_FrgSpecialActivity', 'object');
     $this->_loadCore('Help_SqlSearch');
     $this->_loadCore('Help_Page');
     #------初始化------#
     $helpSqlSearch = new Help_SqlSearch();
     $helpSqlSearch->set_tableName($this->_modelFrgSpecialActivity->tName());
     $_REQUEST['operator_id'] = intval($_REQUEST['operator_id']);
     if ($_REQUEST['operator_id']) {
         $helpSqlSearch->set_conditions("operator_id={$_REQUEST['operator_id']}");
         $this->_view->assign('selectedOperatorId', $_REQUEST['operator_id']);
     }
     if ($_REQUEST['title']) {
         $helpSqlSearch->set_conditions("(Title like '%{$_REQUEST['title']}%' )");
         $this->_view->assign('selectedTitle', $_REQUEST['title']);
     }
     if ($_REQUEST['is_group']) {
         //			$helpSqlSearch->set_groupBy('Title,IdentifierValue,StartTime,EndTime');
         $helpSqlSearch->set_groupBy('Title,IdentifierValue');
         $helpSqlSearch->set_field('count(*) as server_num,Id,operator_id,server_id,special_activity_id,Identifier,IdentifierValue,Img,IsOpen,Title,Content,AwardDesc,StartTime,EndTime,CheckType,AwardIds,Awards,GetCond,Status,MsgTitle,MsgContent,MsgContent,IsShow');
         $this->_view->assign('selectedGroupBy', true);
     }
     $open = array('0' => Tools::getLang('CLOSE', 'Common'), '1' => Tools::getLang('OPEN', 'Common'));
     $show = array('0' => Tools::getLang('NOT_DISPLAY', 'Common'), '1' => Tools::getLang('DISPLAY', 'Common'));
     $helpSqlSearch->setPageLimit($_GET['page'], PAGE_SIZE);
     $helpSqlSearch->set_orderBy('server_id');
     $conditions = $helpSqlSearch->get_conditions();
     $sql = $helpSqlSearch->createSql();
     $dataList = $this->_modelFrgSpecialActivity->select($sql);
     if ($dataList) {
         foreach ($dataList as $key => &$val) {
             $val['URL_edit'] = Tools::url(CONTROL, ACTION, array('zp' => self::PACKAGE, 'doaction' => 'edit', 'title' => $val['Title'], 'IdentifierValue' => $val['IdentifierValue'], 'StartTime' => $val['StartTime'], 'EndTime' => $val['EndTime'], 'operator_id' => $_REQUEST['operator_id'], 'server_id' => $val['server_id'], 'special_activity_id' => $val['special_activity_id']));
         }
     }
     $serverListFullName = Model::getTtwoArrConvertOneArr($serverList, 'Id', 'full_name');
     $this->_view->assign('serverListFullName', $serverListFullName);
     if ($_REQUEST['is_group']) {
         $FiledGroupBy = $helpSqlSearch->getFiledGroupBy();
         $count = $this->_modelFrgSpecialActivity->countGroupBy($conditions, $FiledGroupBy);
     } else {
         $count = $this->_modelFrgSpecialActivity->findCount($conditions);
     }
     $helpPage = new Help_Page(array('total' => $count, 'perpage' => PAGE_SIZE));
     $this->_view->assign('pageBox', $helpPage->show());
     $this->_view->assign('dataList', $dataList);
     $this->_view->assign('is_open', $open);
     $this->_view->assign('is_show', $show);
     $this->_utilMsg->createNavBar();
     $this->_view->display();
 }
Ejemplo n.º 21
0
 /**
  * 我申请的卡号
  */
 public function actionMyApplyCard()
 {
     $this->_checkOperatorAct(2);
     $this->_utilRbac = $this->_getGlobalData('Util_Rbac', 'object');
     $userClass = $this->_utilRbac->getUserClass();
     $payType = Tools::getLang('CARD_TYPE', __CLASS__);
     $cardType = $this->_getGlobalData('frg_gold_card_type');
     $serverList = $this->_getGlobalData('gameser_list');
     $this->_modelGoldCard = $this->_getGlobalData('Model_GoldCard', 'object');
     $helpSqlSearch = $this->_loadCore('Help_SqlSearch');
     $helpSqlSearch = new Help_SqlSearch();
     $helpSqlSearch->set_tableName($this->_modelGoldCard->tName());
     $helpSqlSearch->set_conditions('game_type=' . self::GAME_ID);
     $helpSqlSearch->set_conditions("apply_user_id={$userClass['_id']}");
     if ($_GET['is_use'] != '') {
         $helpSqlSearch->set_conditions("is_use='{$_GET['is_use']}'");
         $this->_view->assign('selectedIsUse', $_GET['is_use']);
     }
     if ($_GET['card_type']) {
         $helpSqlSearch->set_conditions("card_type={$_GET['card_type']}");
         $this->_view->assign('selectedCardType', $_GET['card_type']);
     }
     if ($_GET['type'] != '') {
         $helpSqlSearch->set_conditions("type={$_GET['type']}");
         $this->_view->assign('selectedPayType', $_GET['type']);
     }
     if ($_GET['operator_id']) {
         $helpSqlSearch->set_conditions("operator_id={$_GET['operator_id']}");
         $this->_view->assign('selectedOperatorId', $_GET['operator_id']);
     }
     if ($_GET['card']) {
         $helpSqlSearch->set_conditions("card='{$_GET['card']}'");
         $this->_view->assign('selectedCard', $_GET['card']);
     }
     if ($_GET['batch_num']) {
         $helpSqlSearch->set_conditions("batch_num='{$_GET['batch_num']}'");
         $this->_view->assign('selectedBatchnum', $_GET['batch_num']);
     }
     if ($_GET['group_batch']) {
         $helpSqlSearch->set_groupBy("batch_num");
         $this->_view->assign('selectedGroupBatch', true);
     }
     $helpSqlSearch->setPageLimit($_GET['page'], PAGE_SIZE);
     $conditions = $helpSqlSearch->get_conditions();
     $helpSqlSearch->set_orderBy('Id desc');
     $sql = $helpSqlSearch->createSql();
     $dataList = $this->_modelGoldCard->select($sql);
     if ($dataList) {
         $operatorList = Model::getTtwoArrConvertOneArr($this->_getGlobalData('operator_list'), 'Id', 'operator_name');
         foreach ($dataList as &$list) {
             Tools::import('Util_FontColor');
             $list['word_operator_id'] = $operatorList[$list['operator_id']];
             $list['word_is_use'] = Util_FontColor::getFrgPayCardStatus($list['is_use']);
             $list['user_ip'] = $list['user_ip'] ? long2ip($list['user_ip']) : '';
             $list['word_type'] = Util_FontColor::getFrgCardType($list['type']);
             $list['word_card_type'] = $cardType[$list['card_type']];
             $list['word_use_server_id'] = $serverList[$list['use_server_id']]['full_name'];
             $list['start_time'] = $list['start_time'] ? date('Y-m-d H:i:s', $list['start_time']) : '';
             $list['end_time'] = $list['end_time'] ? date('Y-m-d H:i:s', $list['end_time']) : '';
             $list['create_time'] = date('Y-m-d H:i:s', $list['create_time']);
             $list['use_time'] = $list['use_time'] ? date('Y-m-d H:i:s', $list['use_time']) : '';
             $list['url_export'] = Tools::url(CONTROL, 'Export', array('batch_num' => $list['batch_num']));
             $list['word_apply_user_id'] = $userClass['_nickName'];
         }
         $this->_view->assign('dataList', $dataList);
         $this->_loadCore('Help_Page');
         $helpPage = new Help_Page(array('total' => $this->_modelGoldCard->findCount($conditions), 'perpage' => PAGE_SIZE));
         $this->_view->assign('pageBox', $helpPage->show());
     }
     $this->_view->assign('cardStatus', array('0' => Tools::getLang('NOT_USE', 'Common'), '1' => Tools::getLang('USE', 'Common'), '' => Tools::getLang('ALL', 'Common')));
     $this->_view->assign('payType', $payType);
     $cardType[''] = Tools::getLang('ALL', 'Common');
     $this->_view->assign('cardType', $cardType);
     $this->_view->set_tpl(array('body' => self::PACKAGE . '/' . self::GOLD . '/Card.html'));
     $this->_utilMsg->createPackageNavBar();
     $this->_view->display();
 }
Ejemplo n.º 22
0
 /**
  * 工单显示列表
  */
 public function actionIndex()
 {
     #------初始化------#
     $this->_utilOnline = $this->_getGlobalData('Util_Online', 'object');
     $workOrderStatusArr = $this->_modelSysconfig->getValueToCache('workorder_status');
     $gameTypeArr = Model::getTtwoArrConvertOneArr($this->_modelSysconfig->getValueToCache('game_type'), 'Id', 'name');
     $operatorList = $this->_getGlobalData('operator_list');
     $operatorList = Model::getTtwoArrConvertOneArr($operatorList, 'Id', 'operator_name');
     $this->_modelUser = $this->_getGlobalData('Model_User', 'object');
     $orgList = $this->_getGlobalData('org');
     foreach ($orgList as &$value) {
         $curOrgUser = $this->_modelUser->findByOrgId($value['Id']);
         if ($curOrgUser) {
             $curOrgUser = Model::getTtwoArrConvertOneArr($curOrgUser, 'Id', 'nick_name');
             $value['user'] = $curOrgUser;
         }
     }
     #------初始化------#
     $onlineUsers = $this->_utilOnline->getOnlineUser('user_id');
     //在线用户,一维数组,value值为user_id
     #------分页生成sql------#
     $helpSqlSearch = $this->_loadCore('Help_SqlSearch');
     $helpSqlSearch = new Help_SqlSearch();
     $helpSqlSearch->set_tableName($this->_modelWorkOrder->tName());
     if ($_GET['game_type_id'] != '') {
         $helpSqlSearch->set_conditions("game_type={$_GET['game_type_id']}");
         $this->_view->assign('selectedGameTypeId', $_GET['game_type_id']);
     }
     if ($_GET['operator_id'] != '') {
         $helpSqlSearch->set_conditions("operator_id={$_GET['operator_id']}");
         $this->_view->assign('selectedOperatorId', $_GET['operator_id']);
     }
     if ($_GET['Id']) {
         $helpSqlSearch->set_conditions("Id={$_GET['Id']}");
         $this->_view->assign('selectedId', $_GET['Id']);
     }
     if ($_GET['vip_level'] != '') {
         //如果设置了vip等级,将显示等级
         $helpSqlSearch->set_conditions("vip_level={$_GET['vip_level']}");
         $this->_view->assign('selectedVipLevel', $_GET['vip_level']);
     }
     $helpSqlSearch->setPageLimit($_GET['page'], 20);
     if ($_GET['order_status']) {
         $helpSqlSearch->set_conditions("status={$_GET['order_status']}");
         $this->_view->assign('selectedOrderStatus', $_GET['order_status']);
     }
     if ($_GET['user_nickname']) {
         $helpSqlSearch->set_conditions("user_nickname='{$_GET['user_nickname']}'");
         $this->_view->assign('selectedUserNickname', $_GET['user_nickname']);
         $_GET['user_nickname'] = urlencode($_GET['user_nickname']);
     }
     if ($_GET['user_account']) {
         $helpSqlSearch->set_conditions("user_account='{$_GET['user_account']}'");
         $this->_view->assign('selectedUserAccount', $_GET['user_account']);
         $_GET['user_account'] = urlencode($_GET['user_account']);
     }
     if ($_GET['title']) {
         $helpSqlSearch->set_conditions("title like '%{$_GET['title']}%'");
         $this->_view->assign('selectedTitle', $_GET['title']);
         $_GET['title'] = urlencode($_GET['title']);
     }
     if ($_GET['service_ids']) {
         //如果选择了客服
         $this->_view->assign('selectedServiceIds', $_GET['service_ids']);
         $serviceIds = implode(',', $_GET['service_ids']);
         $helpSqlSearch->set_conditions("owner_user_id in ({$serviceIds})");
     }
     $helpSqlSearch->set_orderBy('create_time desc');
     $sql = $helpSqlSearch->createSql();
     $conditions = $helpSqlSearch->get_conditions();
     $this->_loadCore('Help_Page');
     $helpPage = new Help_Page(array('total' => $this->_modelWorkOrder->findCount($conditions), 'perpage' => 20));
     $this->_view->assign('pageBox', $helpPage->show());
     #------分页生成sql------#
     $dataList = $this->_modelWorkOrder->select($sql);
     #------载入缓存------#
     $workOrderSourceArr = $this->_modelSysconfig->getValueToCache('workorder_source');
     $vipLevel = array('0' => '普通', '1' => '一级', '2' => '二级', '3' => '三级', '4' => '四级', '5' => '五级', '6' => '六级', '' => '所有');
     $users = $this->_getGlobalData('user');
     //		$users=Model::getTtwoArrConvertOneArr($users,'Id','full_name');
     $serverList = $this->_getGlobalData('gameser_list');
     $serverList = Model::getTtwoArrConvertOneArr($serverList, 'Id', 'server_name');
     #------载入缓存------#
     if ($dataList) {
         Tools::import('Util_FontColor');
         foreach ($dataList as &$list) {
             $list['url_dialog'] = Tools::url('QualityCheck', 'OrderDialog', array('Id' => $list['Id']));
             $list['word_game_type'] = Util_FontColor::getGameTypeColor($list['game_type'], $gameTypeArr[$list['game_type']]);
             $list['word_source'] = Util_FontColor::getWorkOrderSource($list['source'], $workOrderSourceArr[$list['source']]);
             $list['word_status'] = Util_FontColor::getWorkOrderStatus($list['status'], $workOrderStatusArr[$list['status']]);
             $list['word_operator_id'] = $operatorList[$list['operator_id']];
             $questionArr = $this->_modelQuestionType->findById($list['question_type']);
             $list['word_question_type'] = $questionArr['title'] ? $questionArr['title'] : '游戏提问';
             $list['url_detail'] = Tools::url('WorkOrder', 'Detail', array('Id' => $list['Id']));
             $list['word_owner_user_id'] = $users[$list['owner_user_id']]['nick_name'];
             $list['word_game_server_id'] = $serverList[$list['game_server_id']];
             if ($list['status'] == 1) {
                 $isTimeout = Tools::isTimeOut($list['create_time'], $list['timeout']);
                 if ($isTimeout === true) {
                     //已超时
                     $list['time_out_true'] = true;
                 } else {
                     //未超时
                     $list['lost_time'] = Tools::getTimeFormat($isTimeout);
                 }
             }
             $list['create_time'] = date('Y-m-d H:i:s', $list['create_time']);
             if ($list['word_owner_user_id']) {
                 $list['word_owner_user_id'] .= in_array($list['owner_user_id'], $onlineUsers) ? Util_FontColor::getOnline(1) : Util_FontColor::getOnline(0);
             }
         }
         $this->_view->assign('dataList', $dataList);
     }
     $gameTypeArr[''] = '所有';
     $this->_view->assign('gameTypeList', $gameTypeArr);
     $operatorList[''] = '所有';
     $this->_view->assign('operatorList', $operatorList);
     $this->_view->assign('orgList', $orgList);
     $this->_view->assign('vipLevel', $vipLevel);
     $workOrderStatusArr[''] = '所有';
     $this->_view->assign('workOrderStatusArr', $workOrderStatusArr);
     $this->_view->assign('js', $this->_view->get_curJs());
     $this->_utilMsg->createNavBar();
     $this->_view->display();
 }
Ejemplo n.º 23
0
 /**
  * 超时回复列表
  */
 public function actionTimeoutReply()
 {
     #------初始化------#
     $this->_loadCore('Help_Page');
     $this->_loadCore('Help_SqlSearch');
     $helpSqlSearch = new Help_SqlSearch();
     $this->_utilRbac = $this->_getGlobalData('Util_Rbac', 'object');
     $this->_modelWorkOrderQa = $this->_getGlobalData('Model_WorkOrderQa', 'object');
     $qualityStatus = $this->_getGlobalData('quality_status');
     $qualityOptions = $this->_getGlobalData('quality_options');
     #------初始化------#
     $users = $this->_getGlobalData('user');
     $allUser = Model::getTtwoArrConvertOneArr($users, 'user_name', 'nick_name');
     $helpSqlSearch->set_tableName($this->_modelWorkOrderQa->tName());
     $helpSqlSearch->set_conditions('is_timeout=1');
     $helpSqlSearch->set_conditions('qa=1');
     $helpSqlSearch->set_orderBy('create_time desc');
     $helpSqlSearch->setPageLimit($_GET['page'], 20);
     $allConditions = $helpSqlSearch->get_conditions();
     //返回所有条件
     $helpPage = new Help_Page(array('total' => $this->_modelWorkOrderQa->findCount($allConditions), 'perpage' => 20));
     $sql = $helpSqlSearch->createSql();
     $dataList = $this->_modelWorkOrderQa->select($sql);
     if ($dataList) {
         Tools::import('Util_FontColor');
         foreach ($dataList as &$value) {
             $value['word_is_quality'] = $value['is_quality'] ? $users[$value['is_quality']]['nick_name'] : '<font color="#666666">未质检</font>';
             $value['word_reply_name'] = $allUser[$value['reply_name']];
             $value['create_time'] = date('Y-m-d H:i:s', $value['create_time']);
             $value['last_reply_time'] = date('Y-m-d H:i:s', $value['last_reply_time']);
             $value['url_detail'] = Tools::url('QualityCheck', 'Dialog', array('Id' => $value['work_order_id'], 'game_type_id' => $value['game_type_id'], 'operator_id' => $value['operator_id']));
             $value['content'] = strip_tags($value['content']);
         }
         $this->_view->assign('dataList', $dataList);
     }
     $this->_view->assign('pageBox', $helpPage->show());
     $this->_view->assign('js', $this->_view->get_curJs());
     $this->_utilMsg->createNavBar();
     $this->_view->display();
 }
Ejemplo n.º 24
0
 /**
  * 富人国日志功能
  */
 public function actionLog()
 {
     switch ($_GET['doaction']) {
         default:
             //显示
             $frgLog = $this->_getGlobalData('frg_log');
             $users = $this->_getGlobalData('user');
             $this->_modelFrgLog = $this->_getGlobalData('Model_FrgLog', 'object');
             $this->_loadCore('Help_SqlSearch');
             $helpSqlSearch = new Help_SqlSearch();
             $helpSqlSearch->set_tableName($this->_modelFrgLog->tName());
             if ($_GET['type'] != '') {
                 $helpSqlSearch->set_conditions("type={$_GET['type']}");
                 $this->_view->assign('selectedType', $_GET['type']);
             }
             if ($_GET['user_id']) {
                 $helpSqlSearch->set_conditions("user_id={$_GET['user_id']}");
                 $this->_view->assign('selectedUserId', $_GET['user_id']);
             }
             $helpSqlSearch->set_orderBy('create_time desc');
             $helpSqlSearch->setPageLimit($_GET['page']);
             $sql = $helpSqlSearch->createSql();
             $conditions = $helpSqlSearch->get_conditions();
             $dataList = $this->_modelFrgLog->select($sql);
             if ($dataList) {
                 foreach ($dataList as &$list) {
                     $list['word_type'] = $frgLog[$list['type']];
                     $list['word_user_id'] = $users[$list['user_id']]['nick_name'];
                     $list['create_time'] = date('Y-m-d H:i:s', $list['create_time']);
                     $list['ip'] = $list['ip'] ? long2ip($list['ip']) : '';
                 }
                 $this->_view->assign('dataList', $dataList);
                 $this->_loadCore('Help_Page');
                 $helpPage = new Help_Page(array('total' => $this->_modelFrgLog->findCount($conditions), 'perpage' => PAGE_SIZE));
                 $this->_view->assign('pageBox', $helpPage->show());
             }
             $frgLog[''] = Tools::getLang('ALL', 'Common');
             $this->_view->assign('type', $frgLog);
             $this->_view->assign('users', Model::getTtwoArrConvertOneArr($users, 'Id', 'nick_name'));
             $this->_utilMsg->createNavBar();
             $this->_view->display();
             break;
     }
 }
Ejemplo n.º 25
0
 /**
  * 显示页面
  */
 public function actionIndex()
 {
     $selected = array();
     $users = $this->getItUsers();
     $this->_modelProgramTask = $this->_getGlobalData('Model_ProgramTask', 'object');
     $efficiencyLevel = $this->_modelProgramTask->getEfficiencyLevel();
     $finishSpeed = $this->_modelProgramTask->getFinishSpeed();
     $this->_loadCore('Help_SqlSearch');
     $helpSqlSearch = new Help_SqlSearch();
     $helpSqlSearch->set_tableName($this->_modelProgramTask->tName());
     $helpSqlSearch->setPageLimit($_GET['page']);
     $helpSqlSearch->set_orderBy('Id desc');
     if ($_REQUEST['accept_user_id']) {
         $helpSqlSearch->set_conditions("accept_user_id = {$_REQUEST['accept_user_id']}");
         $selected['accept_user_id'] = $_REQUEST['accept_user_id'];
     }
     if ($_REQUEST['start_time'] && $_REQUEST['end_time']) {
         $helpSqlSearch->set_conditions("assign_time between " . strtotime($_REQUEST['start_time']) . " and " . strtotime($_REQUEST['end_time']));
         $selected['start_time'] = $_REQUEST['start_time'];
         $selected['end_time'] = $_REQUEST['end_time'];
     }
     if ($_REQUEST['efficiency_level']) {
         $helpSqlSearch->set_conditions("efficiency_level = {$_REQUEST['efficiency_level']}");
         $selected['efficiency_level'] = $_REQUEST['efficiency_level'];
     }
     if ($_REQUEST['difficulty']) {
         $helpSqlSearch->set_conditions("difficulty = {$_REQUEST['difficulty']}");
         $selected['difficulty'] = $_REQUEST['difficulty'];
     }
     if ($_REQUEST['finish_speed']) {
         $helpSqlSearch->set_conditions("finish_speed = {$_REQUEST['finish_speed']}");
         $selected['finish_speed'] = $_REQUEST['finish_speed'];
     }
     if ($_REQUEST['Id']) {
         $helpSqlSearch->set_conditions("Id = '{$_REQUEST['Id']}'");
         $selected['Id'] = $_REQUEST['Id'];
     }
     $conditions = $helpSqlSearch->get_conditions();
     $sql = $helpSqlSearch->createSql();
     $dataList = $this->_modelProgramTask->select($sql);
     if ($dataList) {
         $this->_loadCore('Help_Page');
         $helpPage = new Help_Page(array('total' => $this->_modelProgramTask->findCount($conditions), 'perpage' => PAGE_SIZE));
         $this->_view->assign('pageBox', $helpPage->show());
         foreach ($dataList as &$list) {
             $list['word_efficiency_level'] = $efficiencyLevel[$list['efficiency_level']];
             $list['word_assign_user_id'] = $users[$list['assign_user_id']];
             $list['word_accept_user_id'] = $users[$list['accept_user_id']];
             $list['assign_time'] = date('Y-m-d H:i:s', $list['assign_time']);
             $list['start_time'] = $list['start_time'] ? date('Y-m-d H:i:s', $list['start_time']) : '';
             $list['end_time'] = $list['end_time'] ? date('Y-m-d H:i:s', $list['end_time']) : '';
             $list['url_edit'] = Tools::url(CONTROL, 'Edit', array('Id' => $list['Id'], 'zp' => 'Program'));
             $list['finish_speed'] = $finishSpeed[$list['finish_speed']];
             if (!$list['start_time']) {
                 $list['cur_status'] = '未接收任务';
                 $list['url_accept'] = Tools::url(CONTROL, 'Accept', array('Id' => $list['Id'], 'zp' => 'Program'));
             } else {
                 $list['cur_status'] = '已经接收任务';
                 $list['url_finish'] = Tools::url(CONTROL, 'Finish', array('Id' => $list['Id'], 'zp' => 'Program'));
             }
             if ($list['end_time']) {
                 $list['cur_status'] = '任务已完成';
                 $list['url_audit'] = Tools::url(CONTROL, 'Audit', array('Id' => $list['Id'], 'zp' => 'Program'));
                 unset($list['url_finish']);
             }
             if ($list['efficiency_scorce']) {
                 unset($list['url_audit']);
                 $list['cur_status'] = '已评分';
             }
         }
         $this->_view->assign('dataList', $dataList);
     }
     $this->_view->assign('finishSpeed', $finishSpeed);
     $this->_view->assign('selected', $selected);
     $this->_view->assign('efficiencyLevel', $efficiencyLevel);
     $this->_view->assign('users', $users);
     $this->_utilMsg->createPackageNavBar();
     $this->_view->display();
 }
Ejemplo n.º 26
0
 private function _playerMoneyLogIndex()
 {
     $this->_checkOperatorAct();
     $this->_createServerList();
     if ($_REQUEST['server_id'] && $_REQUEST['sbm']) {
         $table = 'player_money_log';
         $this->_loadCore('Help_SqlSearch');
         $helpSqlSearch = new Help_SqlSearch();
         $helpSqlSearch->set_tableName($table);
         //隐藏特性,可以输入0来查询全部
         $playerId = trim($_GET['playerId']);
         if (strlen(trim($_GET['playerId'])) == 0) {
             $this->_utilMsg->showMsg('玩家Id必须', -1);
         }
         $playerId = intval($playerId);
         if ($playerId) {
             $helpSqlSearch->set_conditions("playerId='{$playerId}'");
         }
         if (0 != ($type = intval($_GET['type']))) {
             $helpSqlSearch->set_conditions("type='{$type}'");
         }
         if (false !== ($StartTime = strtotime($_GET['StartTime']))) {
             $helpSqlSearch->set_conditions("timestamp>='{$StartTime}'");
         }
         if (false !== ($EndTime = strtotime($_GET['EndTime']))) {
             $helpSqlSearch->set_conditions("timestamp<='{$EndTime}'");
         }
         $helpSqlSearch->setPageLimit($_GET['page'], PAGE_SIZE);
         $helpSqlSearch->set_orderBy('id desc');
         $sql = $helpSqlSearch->createSql();
         $dataList = $this->SelectXianHun($sql);
         if ($dataList) {
             $this->_view->assign('dataList', $dataList);
             $conditions = $helpSqlSearch->get_conditions();
             $count = $this->CountXianHun($table, $conditions);
             $this->_loadCore('Help_Page');
             $this->_helpPage = new Help_Page(array('total' => $count, 'perpage' => PAGE_SIZE));
             $this->_view->assign('pageBox', $this->_helpPage->show());
         }
     }
     $this->_view->assign('type', $this->_playerMoneyType());
     $this->_view->assign('URL_typeUpdate', Tools::url(CONTROL, ACTION, array('zp' => PACKAGE, 'server_id' => $_REQUEST['server_id'], 'doaction' => 'update', 'is_update' => '1')));
     $this->_utilMsg->createPackageNavBar();
     $this->_view->display();
 }
Ejemplo n.º 27
0
 public function getSqlSearch($sqldata)
 {
     $this->_loadCore('Help_SqlSearch');
     $_modelOperatorList = $this->_getGlobalData('Model_OperatorList', 'object');
     $modelOperatorList = $_modelOperatorList->findAll();
     $operatorList = $this->_getGlobalData('operator/operator_list_' . $sqldata['game_type']);
     $operatorList = $_modelOperatorList->getTtwoArrConvertOneArr($operatorList, 'Id', 'operator_name');
     $helpSqlSearch = new Help_SqlSearch();
     $helpSqlSearch->set_tableName($this->tName());
     //$helpSqlSearch->set_conditions ( 'Id !=100 and Id !=200' );
     $helpSqlSearch->set_conditions("game_type_id=" . $sqldata['game_type']);
     if ($sqldata['operator_id']) {
         $helpSqlSearch->set_conditions("operator_id={$sqldata['operator_id']}");
     }
     if ($sqldata['timer']) {
         $helpSqlSearch->set_conditions('timer = ' . $sqldata['timer']);
     }
     if ($sqldata['Id']) {
         $helpSqlSearch->set_conditions('Id=' . intval($sqldata['Id']));
     }
     if ($sqldata['marking']) {
         $helpSqlSearch->set_conditions("marking like '%{$sqldata['marking']}%'");
     }
     if ($sqldata['server_url']) {
         $helpSqlSearch->set_conditions("server_url like '%{$sqldata['server_url']}%'");
     }
     if ($sqldata['server_name']) {
         $helpSqlSearch->set_conditions("server_name like '%{$sqldata['server_name']}%'");
     }
     $helpSqlSearch->set_orderBy('operator_id,ordinal,Id');
     $helpSqlSearch->setPageLimit($sqldata['page']);
     $conditions = $helpSqlSearch->get_conditions();
     $sql = $helpSqlSearch->createSql();
     $serverList = $this->select($sql);
     $_modelSysconfig = $this->_getGlobalData('Model_Sysconfig', 'object');
     $gameTypeList = Model::getTtwoArrConvertOneArr($_modelSysconfig->getValueToCache('game_type'), 'Id', 'name');
     if ($serverList) {
         foreach ($serverList as &$value) {
             $value['word_game_type'] = $gameTypeList[$value['game_type_id']];
             $value['word_operator_name'] = $modelOperatorList[$value['operator_id']]['operator_name'];
             $value['url_edit'] = Tools::url(CONTROL, ACTION, array('Id' => $value['Id'], 'doaction' => 'edit', 'zp' => $sqldata['zp']));
             $value['url_del'] = Tools::url(CONTROL, ACTION, array('Id' => $value['Id'], 'doaction' => 'del', 'zp' => $sqldata['zp']));
         }
         $this->_loadCore('Help_Page');
         $helpPage = new Help_Page(array('total' => $this->findCount($conditions), 'perpage' => $this->_pagesize));
         $pageshow = $helpPage->show();
     }
     $operatorList[''] = Tools::getLang('ALL', 'Common');
     $data = array('serverList' => $serverList, 'pageBox' => $pageshow, 'operatorList' => $operatorList);
     return $data;
 }
Ejemplo n.º 28
0
 public function actionShareInfo()
 {
     $_GET['game_type_id'] = intval($_GET['game_type_id']);
     $_GET['title'] = trim($_GET['title']);
     $_GET['content'] = trim($_GET['content']);
     $_GET['page'] = intval(max(1, $_GET['page']));
     $gameTypes = $this->_getGlobalData('game_type');
     $gameTypes = Model::getTtwoArrConvertOneArr($gameTypes, 'Id', 'name');
     $gameTypes[0] = '全部';
     $this->_modelLyShareInfo = $this->_getGlobalData('Model_LyShareInfo', 'object');
     $users = $this->_getGlobalData('user_index_id');
     $this->_loadCore('Help_SqlSearch');
     $helpSqlSearch = new Help_SqlSearch();
     $helpSqlSearch->set_tableName($this->_modelLyShareInfo->tName());
     if ($_GET['game_type_id'] > 0) {
         $helpSqlSearch->set_conditions("game_type_id={$_GET['game_type_id']}");
         $selected['game_type_id'] = $_GET['game_type_id'];
     }
     if (!empty($_GET['title'])) {
         $helpSqlSearch->set_conditions("title like '%{$_GET['title']}%'");
         $selected['title'] = $_GET['title'];
     }
     if (!empty($_GET['content'])) {
         $helpSqlSearch->set_conditions("content like '%{$_GET['content']}%'");
         $selected['content'] = $_GET['content'];
     }
     $helpSqlSearch->set_orderBy('update_time desc');
     $helpSqlSearch->setPageLimit($_GET['page'], PAGE_SIZE);
     $sql = $helpSqlSearch->createSql();
     $dataList = $this->_modelLyShareInfo->select($sql);
     foreach ($dataList as &$sub) {
         $sub['user_id'] = isset($users[$sub['user_id']]) ? $users[$sub['user_id']] : '-';
         $sub['game_type_id'] = isset($gameTypes[$sub['game_type_id']]) ? $gameTypes[$sub['game_type_id']] : '-';
         $sub['update_time'] = date('Y-m-d H:i:s', $sub['update_time']);
         $sub['create_time'] = date('Y-m-d H:i:s', $sub['create_time']);
         $sub['url_edit'] = Tools::url(CONTROL, 'ShareInfoEdit', array('doaction' => 'edit', 'zp' => 'LianYun', 'Id' => $sub['Id']));
         $sub['url_del'] = Tools::url(CONTROL, 'ShareInfoEdit', array('doaction' => 'del', 'zp' => 'LianYun', 'Id' => $sub['Id']));
     }
     $conditions = $helpSqlSearch->get_conditions();
     $total = $this->_modelLyShareInfo->findCount($conditions);
     $this->_loadCore('Help_Page');
     $helpPage = new Help_Page(array('total' => $total, 'perpage' => PAGE_SIZE));
     $this->_view->assign('pageBox', $helpPage->show());
     $this->_view->assign('dataList', $dataList);
     $this->_view->assign('selected', $selected);
     $this->_view->assign('game_type_id', $gameTypes);
     $this->_utilMsg->createPackageNavBar();
     $this->_view->display();
 }
Ejemplo n.º 29
0
 /**
  * Bug反馈
  */
 private function _bugIndx()
 {
     $this->_modelBugBook = $this->_getGlobalData('Model_BugBook', 'object');
     $users = $this->_getGlobalData('user');
     $this->_loadCore('Help_SqlSearch');
     $this->_loadCore('Help_Page');
     $helpSqlSearch = new Help_SqlSearch();
     $helpSqlSearch->set_tableName($this->_modelBugBook->tName());
     $helpSqlSearch->set_orderBy('create_time desc');
     $helpSqlSearch->setPageLimit($_GET['page'], PAGE_SIZE);
     $sql = $helpSqlSearch->createSql();
     $dataList = $this->_modelBugBook->select($sql);
     if ($dataList) {
         $helpPage = new Help_Page(array('total' => $this->_modelBugBook->findCount(), 'perpage' => PAGE_SIZE));
         foreach ($dataList as &$list) {
             $list['create_time'] = date('Y-m-d H:i:s', $list['create_time']);
             $list['word_user_id'] = $users[$list['user_id']]['nick_name'];
             $list['word_reply_user_id'] = $users[$list['reply_user_id']]['nick_name'];
             if (strpos($list['content'], '\\')) {
                 $list['content'] = str_replace('\\', '', $list['content']);
             }
             if (strpos($list['reply_content'], '\\')) {
                 $list['reply_content'] = str_replace('\\', '', $list['reply_content']);
             }
         }
         $this->_view->assign('dataList', $dataList);
         $this->_view->assign('pageBox', $helpPage->show());
     }
     $this->_view->set_tpl(array('body' => 'ServiceTools/BugBack.html'));
     $this->_utilMsg->createNavBar();
     $this->_view->display();
 }
Ejemplo n.º 30
0
 /**
  * 质检归档显示页面
  * @todo 新增方法
  */
 public function actionDocumentIndex()
 {
     $orgList = Model::getTtwoArrConvertOneArr($this->_getGlobalData('org'), 'Id', 'name');
     //组列表
     $users = Model::getTtwoArrConvertOneArr($this->_getGlobalData('user'), 'Id', 'nick_name');
     //用户列表
     $source = $this->_getGlobalData('verify_source');
     //来源
     $socres = Tools::getLang('QUALITY_SOURCE', 'Common');
     //分数
     $feedBack = array('1' => '是', '0' => '否');
     $verifyStatus = $this->_getGlobalData('verify_status');
     $this->_modelQualityDocument = $this->_getGlobalData('Model_QualityDocument', 'object');
     $this->_loadCore('Help_SqlSearch');
     $helpSqlSearch = new Help_SqlSearch();
     $selected = array();
     $helpSqlSearch->set_tableName($this->_modelQualityDocument->tName());
     $helpSqlSearch->setPageLimit($_GET['page']);
     if ($_GET['org_id'] != '') {
         $helpSqlSearch->set_conditions("org_id={$_GET['org_id']}");
         $selected['org_id'] = $_GET['org_id'];
     }
     if ($_GET['reply_user_id'] != '') {
         $helpSqlSearch->set_conditions("reply_user_id={$_GET['reply_user_id']}");
         $selected['reply_user_id'] = $_GET['reply_user_id'];
     }
     if ($_GET['source'] != '') {
         $helpSqlSearch->set_conditions("source={$_GET['source']}");
         $selected['source'] = $_GET['source'];
     }
     if ($_GET['quality_status'] != '') {
         $helpSqlSearch->set_conditions("quality_status={$_GET['quality_status']}");
         $selected['quality_status'] = $_GET['quality_status'];
     }
     if ($_GET['quality_user_id'] != '') {
         $helpSqlSearch->set_conditions("quality_user_id={$_GET['quality_user_id']}");
         $selected['quality_user_id'] = $_GET['quality_user_id'];
     }
     if ($_GET['create_user_id'] != '') {
         $helpSqlSearch->set_conditions("create_user_id={$_GET['create_user_id']}");
         $selected['create_user_id'] = $_GET['create_user_id'];
     }
     if ($_GET['socres'] != '') {
         $helpSqlSearch->set_conditions("scores={$_GET['socres']}");
         $selected['socres'] = $_GET['socres'];
     }
     if ($_GET['feedback'] != '') {
         $helpSqlSearch->set_conditions("feedback={$_GET['feedback']}");
         $selected['feedback'] = $_GET['feedback'];
     }
     if ($_REQUEST['start_time'] && $_REQUEST['end_time']) {
         $startTime = strtotime($_REQUEST['start_time']);
         $endTime = strtotime($_REQUEST['end_time']);
         $helpSqlSearch->set_conditions("create_time between {$startTime} and {$endTime}");
         $selected['start_time'] = $_REQUEST['start_time'];
         $selected['end_time'] = $_REQUEST['end_time'];
     }
     $conditions = $helpSqlSearch->get_conditions();
     $sql = $helpSqlSearch->createSql();
     $dataList = $this->_modelQualityDocument->select($sql);
     if ($dataList) {
         foreach ($dataList as &$list) {
             $list['word_org_id'] = $orgList[$list['org_id']];
             $list['word_reply_user_id'] = $users[$list['reply_user_id']];
             $list['word_quality_user_id'] = $users[$list['quality_user_id']];
             $list['word_source'] = $source[$list['source']];
             $list['word_quality_status'] = $verifyStatus[$list['quality_status']];
             $list['word_feedback'] = $feedBack[$list['feedback']];
             $list['create_time'] = date('Y-m-d H:i:s', $list['create_time']);
             $list['word_create_user_id'] = $users[$list['create_user_id']];
             $list['url_dialog'] = Tools::url('QualityCheck', 'OrderDialog', array('Id' => $list['work_order_id']));
             $list['url_edit'] = Tools::url(CONTROL, 'Document', array('doaction' => 'edit', 'Id' => $list['Id']));
             $list['url_del'] = Tools::url(CONTROL, 'Document', array('doaction' => 'del', 'Id' => $list['Id']));
         }
         $this->_view->assign('dataList', $dataList);
         $this->_loadCore('Help_Page');
         $helpPage = new Help_Page(array('total' => $this->_modelQualityDocument->findCount($conditions), 'perpage' => PAGE_SIZE));
         $this->_view->assign('pageBox', $helpPage->show());
     }
     $this->_view->assign('selected', $selected);
     $verifyStatus[''] = '所有';
     $this->_view->assign('verifyStatus', $verifyStatus);
     $orgList[''] = '所有';
     $this->_view->assign('orgList', $orgList);
     $this->_view->assign('users', $users);
     $source[''] = '所有';
     $this->_view->assign('source', $source);
     $socres[''] = '所有';
     $this->_view->assign('socres', $socres);
     $feedBack[''] = '所有';
     $this->_view->assign('feedBack', $feedBack);
     $this->_utilMsg->createNavBar();
     $this->_view->set_tpl(array('body' => 'QualityCheck/Document.html'));
     $this->_view->display();
 }