public function runGlobal()
 {
     $curAction = CONTROL . '_' . ACTION;
     if (MAGIC_QUOTES) {
         //如果开启了魔术引号就去掉那些"\"
         if (count($_POST)) {
             Tools::arrayMap($_POST, array('stripcslashes'));
         }
         //			Tools::arrayMap($_GET,array('stripcslashes'));
         //			Tools::arrayMap($_COOKIE,array('stripcslashes'));
     }
     $package = defined('PACKAGE') ? PACKAGE : null;
     switch ($this->_utilRbac->checkAct($curAction, $package)) {
         case 1:
             //已经登录,通过
             return true;
         case -1:
             //没有权限
             $errorInfo = '您没有权限';
             if (isset($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest') {
                 $result = array('status' => 0, 'info' => $errorInfo, 'data' => NULL);
                 exit(json_encode($result));
             }
             $this->_utilMsg->showMsg($errorInfo, -1);
             break;
         case -2:
             //未登录
         //未登录
         case -3:
             //账号停用
         //账号停用
         default:
             $this->_utilMsg->showMsg('您还未登录,或账号被停用!', -2, PASSPORT_URL);
     }
 }
Exemple #2
0
 /**
  * 多服务器检测权限
  */
 protected function _checkOperatorsAct()
 {
     $this->_utilMsg = $this->_getGlobalData('Util_Msg', 'object');
     $this->_utilRbac = $this->_getGlobalData('Util_Rbac', 'object');
     $this->_view->assign('operatorList', $this->_utilRbac->getOperatorActList(self::GAME_ID));
     if (count($_REQUEST['server_ids'])) {
         foreach ($_REQUEST['server_ids'] as $value) {
             if (!$this->_utilRbac->checkOperatorAct($value)) {
                 $this->_utilMsg->showMsg(Tools::getLang('NOT_ACTSERVER', 'Common'), -2);
             }
         }
     }
 }
 /**
  * 收回炼狱值
  */
 public function actionChangeCarPurVal()
 {
     $this->_createServerList();
     if ($this->_isPost()) {
         $postData = array('UserId' => intval($_POST['UserId']), 'CarState' => trim($_POST['CarState']), 'PurVal' => intval($_POST['PurVal']), 'TimePoint' => trim($_POST['TimePoint']), 'EndTimePoint' => trim($_POST['EndTimePoint']), 'index' => intval($_POST['index']), 'NotIds' => trim($_POST['NotIds']), 'Page' => max(1, intval($_POST['Page'])));
         if ($postData['CarState'] !== '' && !in_array(intval($postData['CarState']), array(0, 1, 2))) {
             $this->_utilMsg->showMsg('操作(1为加,0为减,2为查询)', -1);
         }
         if (!in_array($postData['index'], array(1, 2, 3, 4, 5))) {
             $this->_utilMsg->showMsg('事件表列号(1-5)', -1);
         }
         $this->_utilFRGInterface = $this->_getGlobalData('Util_FRGInterface', 'object');
         $this->_utilFRGInterface->setServerUrl($_REQUEST['server_id']);
         if ($_POST['showPurVal']) {
             $getData = array('c' => 'UserData', 'a' => 'UserTune', 'doaction' => 'SelPurVal');
         } else {
             $getData = array('c' => 'UserData', 'a' => 'UserTune', 'doaction' => 'ChangeCarPurVal');
         }
         $this->_utilFRGInterface->setGet($getData);
         $this->_utilFRGInterface->setPost($postData);
         $data = $this->_utilFRGInterface->callInterface();
         $this->_view->assign('UserId', $data['data']['UserId']);
         $this->_view->assign('OldPurVal', $data['data']['OldPurVal']);
         $this->_view->assign('NewPurVal', $data['data']['NewPurVal']);
         $this->_view->assign('PurValLog', $data['data']['PurValLog']);
         $this->_view->assign('UserMore', $data['data']['UserMore']);
     }
     $this->_utilMsg->createNavBar();
     $this->_view->display();
 }
 private function _shareInfoEdit()
 {
     $_GET['Id'] = intval($_GET['Id']);
     $gameTypes = $this->_getGlobalData('game_type');
     $gameTypes = Model::getTtwoArrConvertOneArr($gameTypes, 'Id', 'name');
     $this->_modelLyShareInfo = $this->_getGlobalData('Model_LyShareInfo', 'object');
     if ($this->_isPost()) {
         if (!array_key_exists($_POST['game_type_id'], $gameTypes)) {
             $this->_utilMsg->showMsg('所选游戏不存在', -1);
         }
         if ('' == trim($_POST['title'])) {
             $this->_utilMsg->showMsg('标题不能为空', -1);
         }
         if ('' == trim($_POST['content'])) {
             $this->_utilMsg->showMsg('内容不能为空', -1);
         }
         $AddData = Tools::fieldFilter('game_type_id,title,content', $_POST);
         $userClass = $this->_utilRbac->getUserClass();
         $AddData['user_id'] = $userClass['_id'];
         $AddData['update_time'] = CURRENT_TIME;
         if ($this->_modelLyShareInfo->update($AddData, "Id = {$_GET['Id']}")) {
             $this->_utilMsg->showMsg('修改成功', 1, $this->_url['share_info'], 1);
         } else {
             $this->_utilMsg->showMsg('修改失败', -1);
         }
     }
     $data = $this->_modelLyShareInfo->findById($_GET['Id']);
     $this->_view->assign('data', $data);
     $this->_view->assign('game_type_id', $gameTypes);
     $this->_utilMsg->createPackageNavBar();
     $this->_view->display();
 }
Exemple #5
0
 /**
  * 卡号充值
  */
 public function actionCardPay()
 {
     if ($this->_isPost()) {
         //post请求,充值
         $this->_modelGoldCard = $this->_getGlobalData('Model_GoldCard', 'object');
         $data = $this->_modelGoldCard->pay($_POST, $this->game_id);
         $this->_utilMsg->showMsg($data['msg'], $data['status'], $data['href'], null);
     } elseif ($this->_isAjax()) {
         //ajax请求返回用户名
         $this->_utilApiFrg = $this->_getGlobalData('Util_ApiFrg', 'object');
         $serverId = Tools::coerceInt($_GET['server_id']);
         $getArr = array('c' => 'UserData', 'a' => 'UserQuery', 'Page' => 1);
         $postArr = array('PageSize' => 10, 'Query[start]' => $_GET['user_name'], 'Query[Items]' => '8');
         $this->_utilApiFrg->addHttp($serverId, $getArr, $postArr);
         $this->_utilApiFrg->send();
         $data = $this->_utilApiFrg->getResult();
         if (count($data['data']['list'])) {
             $user = reset($data['data']['list']);
             $this->_returnAjaxJson(array('status' => 1, 'data' => $user['VUserName']));
         } else {
             $this->_returnAjaxJson(array('status' => 0, 'data' => null));
         }
     } else {
         //显示页面
         $this->_checkOperatorAct();
         $serverList = $this->_getGlobalData('server/server_list_2');
         foreach ($serverList as &$list) {
             unset($list['room_id'], $list['game_type_id'], $list['marking'], $list['time_zone'], $list['server_url']);
         }
         $this->_view->assign('serverList', json_encode($serverList));
         $this->_view->display();
     }
 }
 private function _psdLinkEdit()
 {
     $this->_modelLyPsdLink = $this->_getGlobalData('Model_LyPsdLink', 'object');
     $gameTypes = $this->_modelLyPsdLink->getMyGame();
     $selected = $this->_modelLyPsdLink->findById($_GET['Id']);
     if (!$selected) {
         $this->_utilMsg->showMsg('已删除', -1, 2);
     }
     if ($this->_isPost()) {
         $_POST['Id'] = intval($_POST['Id']);
         if (!$this->_modelLyPsdLink->findById($_POST['Id'])) {
             $this->_utilMsg->showMsg(Tools::getLang('LINK_DELETED', __CLASS__), -1, 2);
         }
         $_POST['game_type_id'] = intval($_POST['game_type_id']);
         if (!$_POST['game_type_id'] || !array_key_exists($_POST['game_type_id'], $gameTypes)) {
             $this->_utilMsg->showMsg(Tools::getLang('PLZ_SLT_GAME', 'Common'), -1, 2);
         }
         if (trim($_POST['title']) == '') {
             $this->_utilMsg->showMsg('标题不能为空', -1, 2);
         }
         if (trim($_POST['href']) == '') {
             $this->_utilMsg->showMsg('链接不能为空', -1, 2);
         }
         $this->_modelLyPsdLink->linkUpdate();
         $this->_utilMsg->showMsg(Tools::getLang('OPERATION_SUCCESS', 'Common'), 1, $this->_url['PsdLink'], 1);
     }
     $this->_view->assign('selected', $selected);
     $this->_view->assign('gameTypes', $gameTypes);
     $this->_utilMsg->createPackageNavBar();
     $this->_view->display();
 }
Exemple #7
0
 private function _modifyNameDoit()
 {
     if (!$_REQUEST['server_id']) {
         $this->_utilMsg->showMsg('服务器为空', -1);
     }
     if ($this->_isPost()) {
         $_POST['playerId'] = intval($_POST['playerId']);
         $_POST['rename'] = trim($_POST['rename']);
         if ($_POST['playerId'] <= 0 && $_POST['rename'] == '') {
             $this->_utilMsg->showMsg('提交有误', -1);
         }
         $this->getApi()->setUrl($_REQUEST['server_id'], 'api/modifyPlayer');
         $dataList = $this->getApi()->modifyName($_POST['playerId'], $_POST['rename']);
         if ($dataList instanceof PHPRPC_Error) {
             $this->_utilMsg->showMsg($dataList->Message, -1);
         } elseif ($dataList) {
             $jump = Tools::url(CONTROL, 'ModifyName', array('zp' => 'Sftx', 'server_id' => $_REQUEST['server_id']));
             $this->_utilMsg->showMsg('操作成功', 1, $jump, 1);
         } else {
             $this->_utilMsg->showMsg('操作失败', -1);
         }
     } else {
         $this->_utilMsg->showMsg('非POST提交', -1);
     }
 }
 public function runGlobal()
 {
     $curAction = CONTROL . '_' . ACTION;
     switch ($this->_utilRbac->checkAct($curAction)) {
         case 1:
             //已经登录,通过
             return true;
         case -1:
             //没有权限
             $this->_utilMsg->showMsg('您没有权限', -1);
             break;
         case -2:
             //未登录
             $this->_utilMsg->showMsg('您还未登录', -2, Tools::url('Index', 'Login'));
     }
 }
Exemple #9
0
 /**
  * 拒绝
  */
 private function _reject($options)
 {
     $this->_modelApplyDataFrg = $this->_getGlobalData('Model_ApplyDataFrg', 'object');
     $this->_modelApplyDataFrg->set_options($options);
     $this->_modelApplyDataFrg->set_postArr($_POST);
     $data = $this->_modelApplyDataFrg->reject();
     $this->_utilMsg->showMsg($data['msg'], $data['status'], $data['href']);
 }
 private function _serverlistcreateCache()
 {
     if ($this->_modelGameSerList->createToCache()) {
         $this->_utilMsg->showMsg(Tools::getLang('UPDATE_SUCCESS', 'Common'), 1);
     } else {
         $this->_utilMsg->showMsg(Tools::getLang('UPDATE_ERROR', 'Common'), -2);
     }
 }
Exemple #11
0
 private function _departmentCreateCache()
 {
     if ($this->_modelDepartment->createCache()) {
         $this->_utilMsg->showMsg('更新缓存成功', 1);
     } else {
         $this->_utilMsg->showMsg('更新缓存失败', -1);
     }
 }
 private function _createCache()
 {
     if ($this->_modelGameSerList->createToCache()) {
         $this->_utilMsg->showMsg('缓存生成成功', 1);
     } else {
         $this->_utilMsg->showMsg('缓存生成失败', -2);
     }
 }
Exemple #13
0
 /**
  * 重置工作量
  */
 private function _rest()
 {
     $roomId = Tools::coerceInt($_GET['Id']);
     //需要重置工作量的房间ID
     $this->_modelWorkOrder = $this->_getGlobalData('Model_WorkOrder', 'object');
     $data = $this->_modelWorkOrder->clearRoomOrder($roomId);
     $this->_utilMsg->showMsg($data['msg'], $data['status'], $data['href']);
 }
 /**
  * 删除BUG
  */
 private function _bugDel()
 {
     if ($this->_isPost()) {
         $this->_modelBugBook = $this->_getGlobalData('Model_BugBook', 'object');
         $data = $this->_modelBugBook->batchDel($_POST['ids']);
         $this->_utilMsg->showMsg($data['msg'], $data['status'], $data['href']);
     }
 }
Exemple #15
0
 /**
  * 新用户日志
  */
 public function actionPlayerLogFind()
 {
     $this->_createServerList();
     if ($_REQUEST['server_id'] && $_REQUEST['submit']) {
         $serverList = $this->_getGlobalData('gameser_list');
         $server = $serverList[$_REQUEST['server_id']];
         if ($server) {
             $startTime = strtotime($_GET['startTime']);
             if ($startTime) {
                 $startTime .= '000';
             } else {
                 $startTime = '0';
             }
             $endTime = strtotime($_GET['endTime']);
             if ($endTime) {
                 $endTime .= '000';
             } else {
                 $endTime = '0';
             }
             $_GET['page'] = intval(max(1, $_GET['page']));
             $post['pageSize'] = PAGE_SIZE;
             $post['currentPage'] = $_GET['page'];
             $post['cmdID'] = intval($_GET['cmdID']);
             $post['playerId'] = intval($_GET['playerId']);
             $post['startTime'] = $startTime;
             $post['endTime'] = $endTime;
             $post['sid'] = $server['marking'];
             //'192.168.12.127:8080';//
             $post['time'] = CURRENT_TIME . '000';
             //时间(毫秒)
             $post['sign'] = md5($_POST['sid'] . $this->_key . $post['time']);
             $this->_utilHttpMInterface = $this->_getGlobalData('Util_HttpMInterface', 'object');
             $this->_utilHttpMInterface->addHttp($server['server_url'], 'playerLog/find', array(), $post);
             $this->_utilHttpMInterface->send();
             $dataResult = $this->_utilHttpMInterface->getResults();
             $dataResult = json_decode(array_shift($dataResult), true);
             if (strval($dataResult['status']) == '1') {
                 $optDetail = $this->_getLogDetail();
                 if (is_array($dataResult['data']['result'])) {
                     foreach ($dataResult['data']['result'] as &$sub) {
                         $sub['optDetail'] = $optDetail[$sub['cmdId']];
                     }
                 }
                 $this->_view->assign('dataLiat', $dataResult['data']['result']);
                 $this->_loadCore('Help_Page');
                 //载入分页工具
                 $helpPage = new Help_Page(array('total' => $dataResult['data']['totalCount'], 'perpage' => PAGE_SIZE));
                 $this->_view->assign('pageBox', $helpPage->show());
             } else {
                 $this->_utilMsg->showMsg($dataResult['info']);
             }
         }
     }
     $this->_view->assign('searchType', $this->_searchType);
     $this->_utilMsg->createNavBar();
     $this->_view->display();
 }
Exemple #16
0
 /**
  * 更改语言
  */
 public function actionChangeLang()
 {
     $langId = Tools::coerceInt($_GET['lang']);
     if (!in_array($langId, array(1, 2))) {
         $langId = 1;
     }
     setcookie('kefu_lang', $langId, CURRENT_TIME + 60 * 60 * 6);
     $this->_utilMsg->showMsg(false);
 }
Exemple #17
0
 /**
  * 回复用户信息
  */
 public function actionReply()
 {
     $this->_utilRbac = $this->_getGlobalData('Util_Rbac', 'object');
     $userClass = $this->_utilRbac->getUserClass();
     $timeout = intval(strtotime($_POST['create_time'])) + intval($_POST['timeout']);
     if (CURRENT_TIME > $timeout && $_POST['cur_status'] == 1) {
         //如果当前时间大于超时时间,并且当前工单为未处理状态,就说明回复时间已经过了,那么就超时
         $isTimeout = '1';
     } else {
         $isTimeout = '0';
     }
     $replyContent = $_POST['reply'];
     if ($_POST['lock']) {
         $replyContent = '<em>[该消息未发送到游戏服务器]</em> ' . $replyContent;
     }
     //如果为不发送消息将自动在前面加上
     $addQaArr = array('is_timeout' => $isTimeout, 'work_order_id' => $_POST['Id'], 'content' => $replyContent, 'qa' => 1, 'reply_name' => $userClass['_userName'], 'create_time' => CURRENT_TIME, 'game_type_id' => $_POST['game_type_id'], 'operator_id' => $_POST['operator_id']);
     if ($isTimeout) {
         $addQaArr['last_reply_time'] = $timeout;
     }
     //如果超时的话,将记录最后超时的时间
     if ($_POST['source'] == 2 && !$_POST['lock']) {
         //如果工单来源为2并且lock为不锁定,那么就要发送webservice
         $gameServerList = $this->_getGlobalData('gameser_list');
         $gameServerUrl = $gameServerList[$_POST['game_server_id']]['send_msg_url'];
         //获取url地址
         if (!$gameServerUrl) {
             $this->_utilMsg->showMsg('发送消息给游戏服务端失败', -2);
         }
         $isOk = $this->_sendMsg(array('work_order_id' => $_POST['Id'], 'service_id' => $userClass['_serviceId'] ? $userClass['_serviceId'] : '001', 'content' => $replyContent, 'server_url' => $gameServerUrl, 'status' => $_POST['status']));
         if ($isOk !== true) {
             $this->_utilMsg->showMsg($isOk, -2);
         }
     }
     $this->_modelWorkOrderQa->add($addQaArr);
     #------改变房间工单,用户回复数------#
     $userClass->setUpdateInfo(1);
     $userClass->addToReplyNum(1);
     if ($_POST['owner_user_id'] == $userClass['_id'] && $_POST['cur_status'] == 1) {
         $userClass->setIncompleteOrderNum(-1);
     }
     //用户完成一个工单
     if ($_POST['cur_status'] == 1) {
         //如果为未回复将房间未完成工单数减1
         $roomClass = $this->_utilRooms->getRoom($_POST['room_id']);
         if (is_object($roomClass)) {
             $roomClass->completeOrder(1);
             //完成一个工单数
             $roomClass->setUpdateInfo(1);
         }
     }
     #------改变房间工单,用户回复数------#
     $workOrderUpdateArr = array('status' => $_POST['status'], 'answer_num' => 'answer_num+1', 'owner_user_id' => $userClass['_id']);
     //变为待处理,提问数+1
     $this->_modelWorkOrder->update($workOrderUpdateArr, "Id={$_POST['Id']}");
     $this->_utilMsg->showMsg(false);
 }
Exemple #18
0
 /**
  * 点击率统计
  */
 public function actionRatio()
 {
     $gameTypes = $this->_getGlobalData('game_type');
     $gameTypes = Model::getTtwoArrConvertOneArr($gameTypes, 'Id', 'name');
     $sources = $this->_getGlobalData('workorder_source');
     $lang = $this->_getGlobalData('lang');
     $statsType = array('day' => '按天', 'hour' => '按小时');
     $selected = array();
     //统计数组
     $selected['stats_type'] = $_POST['stats_type'] ? $_POST['stats_type'] : 'day';
     //统计类型默认天
     $selected['game_type_id'] = $_POST['game_type_id'];
     $selected['source'] = $_POST['source'];
     $selected['start_time'] = $_POST['start_time'];
     $selected['end_time'] = $_POST['end_time'];
     $selected['lang_id'] = $_POST['lang_id'];
     if ($this->_isPost()) {
         $this->_modelPlayerKindFaq = $this->_getGlobalData('Model_PlayerKindFaq', 'object');
         $kindList = $this->_modelPlayerKindFaq->findListAll($_POST['game_type_id'], $_POST['lang_id']);
         $this->_modelStatsFaq = $this->_getGlobalData('Model_StatsFaq', 'object');
         if (empty($_POST['start_time']) || empty($_POST['end_time'])) {
             $this->_utilMsg->showMsg('请选择开始时间与结束时间', -1, 2);
         }
         if ($_POST['stats_type'] == 'day') {
             //按天
             $this->_view->assign('allDay', Tools::getdateArr($_POST['start_time'], $_POST['end_time']));
             $stats = $this->_modelStatsFaq->statsDay(array('start_time' => $_POST['start_time'], 'end_time' => $_POST['end_time']), $_POST['game_type_id'], $_POST['source'], $_POST['lang_id']);
         } else {
             //按小时
             $this->_view->assign('allHour', range(0, 23));
             $stats = $this->_modelStatsFaq->statsHour(array('start_time' => $_POST['start_time'], 'end_time' => $_POST['end_time']), $_POST['game_type_id'], $_POST['source'], $_POST['lang_id']);
         }
     } else {
         $selected["start_time"] = date("Y-m-d", time()) . " 00:00:00";
         $selected["end_time"] = date("Y-m-d", time()) . " 23:59:59";
     }
     $this->_view->assign('kindList', $kindList);
     $this->_view->assign('dataList', $stats);
     $gameTypes[''] = '所有';
     $sources[''] = '所有';
     $lang[''] = '所有';
     $this->_view->assign('selected', $selected);
     $this->_view->assign('statsType', $statsType);
     $this->_view->assign('gameTypes', $gameTypes);
     $this->_view->assign('sources', $sources);
     $this->_view->assign('lang', $lang);
     $this->_utilMsg->createPackageNavBar();
     if ($_POST['xls']) {
         //导出excel
         Tools::import('Util_ExportExcel');
         $this->_utilExportExcel = new Util_ExportExcel('faq统计', 'Excel/StatsFaq', $stats);
         $this->_utilExportExcel->outPutExcel();
     } else {
         $this->_view->display();
     }
 }
Exemple #19
0
 /**
  * 添加问题
  */
 public function actionAdd()
 {
     if ($this->_isPost()) {
         $this->_modelWorkOrderDetail = $this->_getGlobalData('Model_WorkOrderDetail', 'object');
         $this->_modelWorkOrderQa = $this->_getGlobalData('Model_WorkOrderQa', 'object');
         #------获取问题类型额外信息------#
         $questionType = $this->_modelQuestionType->findById($_POST['question_type']);
         $questionFormTable = $questionType['form_table'];
         $questionFormTableKey = $this->_modelQuestionType->getTtwoArrConvertOneArr($questionFormTable, 'name', 'name');
         $formDetail = array();
         if (!empty($questionFormTableKey)) {
             foreach ($questionFormTableKey as $value) {
                 if ($value == null) {
                     continue;
                 }
                 $formDetail[$value] = $_POST[$value];
             }
         }
         #------获取问题类型额外信息------#
         #------生成工单work_order------#
         $this->_utilRbac = $this->_getGlobalData('Util_Rbac', 'object');
         $userClass = $this->_utilRbac->getUserClass();
         //获取用户资料,
         $userName = $userClass['_nickName'];
         $workOrder = array('game_type' => $_POST['game_type'], 'question_type' => $_POST['question_type'], 'source' => 5, 'question_num' => 1, 'create_time' => CURRENT_TIME, 'title' => $_POST['title']);
         if ($_POST['game_server_id']) {
             #------获取服务器ID和运营商ID------#
             list($workOrder['operator_id'], $workOrder['game_server_id']) = explode(',', $_POST['game_server_id']);
             unset($formDetail['game_server_id']);
             //删除服务器列表数组
             #------获取服务器ID和运营商ID------#
         }
         $this->_modelWorkOrder->add($workOrder);
         $workOrderId = $this->_modelWorkOrder->returnLastInsertId();
         //获取工单id
         #------生成工单work_order------#
         #------生成工单详细信息------#
         $userDetail = array('nick_name' => $userName);
         $detail = array('user_data' => $userDetail, 'form_detail' => $formDetail);
         $addWorkOrderDetailArr = array('work_order_id' => $workOrderId, 'content' => serialize($detail));
         $this->_modelWorkOrderDetail->add($addWorkOrderDetailArr);
         #------生成工单详细信息------#
         #------生成工单提问信息------#
         $addWorkOrderQaArr = array('work_order_id' => $workOrderId, 'content' => $_POST['description'], 'create_time' => CURRENT_TIME);
         $this->_modelWorkOrderQa->add($addWorkOrderQaArr);
         #------生成工单提问回复信息------#
         #------增加问题队列到队列------#
         $this->_utilWorkOrder = $this->_getGlobalData('Util_WorkOrder', 'object');
         $orderManage = $this->_utilWorkOrder->getOrderManage();
         $workOrder['Id'] = $workOrderId;
         $orderManage->addOrder($workOrder);
         $orderManage->setUpdateInfo(1);
         #------增加问题队列到队列------#
         $this->_utilMsg->showMsg('工单提问成功', 1, Tools::url(CONTROL, 'Index', 1));
     }
 }
 private function _documentDel()
 {
     $this->_modelQualityDocument = $this->_getGlobalData('Model_QualityDocument', 'object');
     $id = Tools::coerceInt($_GET['Id']);
     if ($this->_modelQualityDocument->delById($id)) {
         $this->_utilMsg->showMsg('删除成功');
     } else {
         $this->_utilMsg->showMsg('删除失败', -2);
     }
 }
Exemple #21
0
 private function _userDelOperator()
 {
     if ($_GET['game_type_id'] != self::GAME_ID) {
         $this->_utilMsg->showMsg('游戏ID越界', -2);
     }
     if ($this->_modelUserProiorityOperator->delByOperatorId($_GET['game_type_id'], $_GET['operator_id'], $_GET['user_id'])) {
         $this->_utilMsg->showMsg(false);
     } else {
         $this->_utilMsg->showMsg('删除失败', -2);
     }
 }
Exemple #22
0
 /**
  * 工单分配
  */
 private function _orderAssign()
 {
     $this->_modelAutoOrderQueue = $this->_getGlobalData('Model_AutoOrderQueue', 'object');
     $this->_modelAutoOrderQueue->delById($_GET['Id']);
     $this->_utilRbac = $this->_getGlobalData('Util_Rbac', 'object');
     $this->_utilWorkOrder = $this->_getGlobalData('Util_WorkOrder', 'object');
     $objectOrderManage = $this->_utilWorkOrder->getOrderManage();
     $userClass = $this->_utilRbac->getUserClassById($_GET['userId']);
     $objectOrderManage->updateWorkOrderOwner($userClass, array('work_order_id' => $_GET['workOrderId']));
     $this->_utilMsg->showMsg(false);
 }
Exemple #23
0
 /**
  * 回复留言对话
  */
 public function actionReplyDialog()
 {
     if ($this->_isPost()) {
         $this->_modelVerify = $this->_getGlobalData('Model_Verify', 'object');
         $this->_utilRbac = $this->_getGlobalData('Util_Rbac', 'object');
         $userClass = $this->_utilRbac->getUserClass();
         $dataList = $this->_modelVerify->findById($_POST['Id']);
         $contentArr = $dataList['log'];
         if ($contentArr) {
             $contentArr = unserialize($contentArr);
             if (!is_array($contentArr)) {
                 $contentArr = array();
             }
         } else {
             $contentArr = array();
         }
         if ($dataList['status'] != $_POST['status']) {
             //如果更改过状态
             $newLog = $this->_addLog(array('status' => $_POST['status'], 'action' => 'modify'));
             array_push($contentArr, $newLog);
         }
         if ($dataList['department_id'] != $_POST['department_id']) {
             $department = $this->_getGlobalData('department');
             $content = "to Dep  <font color='#FF0000'><b>{$department[$_POST['department_id']]['name']}</b></font> ";
             if (empty($_POST['content'])) {
                 $content = $this->_addLog(array('msg' => $content));
             }
         }
         if (!empty($_POST['content'])) {
             //如果content不为空的话,就继续加留言
             $content .= ':' . $_POST['content'];
             $content = $this->_addLog(array('msg' => $content));
         }
         if (!empty($content)) {
             array_push($contentArr, $content);
         }
         $updateArr = array('log' => serialize($contentArr), 'department_id' => $_POST['department_id'], 'status' => $_POST['status']);
         if ($_POST['status'] == Model_Verify::FINISH_STATUS) {
             $updateArr['finish_user_id'] = $userClass['_id'];
         }
         if ($this->_modelVerify->update($updateArr, "Id={$_POST['Id']}")) {
             #------发送邮件------#
             $this->_utilUserMailManage = $this->_getGlobalData('Util_UserMailManage', 'object');
             $this->_utilUserMailManage->addUser($dataList['user_id']);
             $mail = array('title' => "Buglist change status:{$dataList['title']}", 'href' => Tools::url(CONTROL, 'Detail', array('Id' => $dataList['Id'], 'work_order_id' => $dataList['work_order_id'])), 'type' => 3);
             $this->_utilUserMailManage->addMail($mail);
             $this->_utilUserMailManage->send();
             #------发送邮件------#
             $this->_utilMsg->showMsg(false);
         } else {
             $this->_utilMsg->showMsg(Tools::getLang('ADD_MSG_ERROR', __CLASS__), -2);
         }
     }
 }
 private function _newTypeDel()
 {
     $_GET['Id'] = intval($_GET['Id']);
     if (!$_GET['Id']) {
         $this->_utilMsg->showMsg('ID错误', -1);
     }
     $_newsType = $this->_getGlobalData('Model_NewsType', 'object');
     if ($_newsType->delById($_GET['Id'])) {
         $this->_utilMsg->showMsg('操作成功', 1, Tools::url(CONTROL, ACTION));
     }
     $this->_utilMsg->showMsg('操作失败', -1);
 }
 /**
  * 删除公告
  */
 public function actionDel()
 {
     $this->_checkOperatorAct();
     $this->_createCenterServer();
     $this->getApi()->setUrl($_REQUEST['server_id'], 'oneNotice/notice');
     $data = $this->getApi()->deleteNotice($_POST['idList']);
     if ($data == 0) {
         $this->_utilMsg->showMsg('删除公告成功', 1, Tools::url(CONTROL, 'Index', array('zp' => 'XunXia', 'server_id' => $_REQUEST['server_id'])));
     } else {
         $this->_utilMsg->showMsg('删除公告失败', 1);
     }
 }
Exemple #26
0
 /**
  * 房间初始化
  */
 private function _initialize()
 {
     $this->_utilRooms = $this->_getGlobalData('Util_Rooms', 'object');
     $roomClass = $this->_utilRooms->getRoom($_GET['Id']);
     $roomClass->setUpdateInfo(1);
     $roomClass['_entrance'] = false;
     $roomClass['_exit'] = false;
     $roomClass['_userClassList'] = array();
     $roomClass['_roomStartEndTime'] = array();
     $roomClass['_orderNum'] = array();
     $this->_utilMsg->showMsg(false);
 }
Exemple #27
0
 /**
  * 数据统计 
  */
 public function actionData()
 {
     // 		ini_set("display_errors", "On");
     // 		error_reporting(E_ALL | E_STRICT);
     $this->_modelUser = $this->_getGlobalData('Model_User', 'object');
     $orgList = $this->_getGlobalData('org');
     $allOrgUser = $this->_modelUser->findSetOrgByUser();
     $gameTypes = $this->_getGlobalData('game_type');
     $gameTypes = Model::getTtwoArrConvertOneArr($gameTypes, 'Id', 'name');
     $this->_view->assign('game_type', $gameTypes);
     $utilRbac = $this->_getGlobalData('Util_Rbac', 'object');
     $operators = $utilRbac->getOperatorActList();
     //个人授权可操作的运营商
     $this->_view->assign('operators', $operators);
     foreach ($orgList as &$value) {
         $curOrgUser = $this->_modelUser->findByOrgId($value['Id']);
         if ($curOrgUser) {
             $curOrgUser = Model::getTtwoArrConvertOneArr($curOrgUser, 'Id', 'nick_name');
             $value['user'] = $curOrgUser;
         }
     }
     $this->_view->assign('orgList', $orgList);
     if ($this->_isPost()) {
         @ini_set('memory_limit', '512M');
         if (count($_POST['check_users']) && $_POST['start_date'] && $_POST['end_date'] && count($_POST['operator_id'])) {
             //必须保证有搜索项而且还选择了用户才会开开始搜索
             $date = array();
             $this->_view->assign('selectedTime', array('start' => $_POST['start_date'], 'end' => $_POST['end_date']));
             $this->_view->assign('selectedUsers', $_POST['check_users']);
             $date['start'] = strtotime($_POST['start_date']);
             //开始时间
             $date['end'] = strtotime($_POST['end_date']);
             //结束时间
             if ($date['start'] > $date['end']) {
                 $this->_utilMsg->showMsg('开始时间不能大于结束时间', -2);
             }
             $this->_modelWorkOrder = $this->_getGlobalData('Model_WorkOrder', 'object');
             $statusList = $this->_modelWorkOrder->statsDetail(array('start' => strtotime($_POST['start_date']), 'end' => strtotime($_POST['end_date'])), $_POST['check_users'], $_POST['game_type'], $_POST['operator_id']);
             $this->_view->assign('dataList', $statusList);
             $this->_view->assign('users', $this->_getGlobalData('user_index_id'));
         } else {
             $this->_utilMsg->showMsg('请选择时间,用户,运营商', -2);
         }
     }
     $this->_utilMsg->createPackageNavBar();
     if ($_POST['xls']) {
         Tools::import('Util_ExportExcel');
         $this->_utilExportExcel = new Util_ExportExcel('用户详细统计', 'Excel/StatsUser', $statusList);
         $this->_utilExportExcel->outPutExcel();
     } else {
         $this->_view->display();
     }
 }
 public function actionSetupDel()
 {
     $this->_modelUser = $this->_getGlobalData('Model_User', 'object');
     $this->_setupFilePath = CACHE_DIR . '/program/position.cache.php';
     $dataList = $this->_getGlobalData('program/position');
     unset($dataList[$_GET['Id']]);
     if (count($dataList)) {
         $this->_addCache($dataList, $this->_setupFilePath);
     } else {
         unlink($this->_setupFilePath);
     }
     $this->_utilMsg->showMsg(false);
 }
 /**
  * 删除公告
  */
 public function actionDel()
 {
     $this->_checkOperatorAct();
     //检测服务器
     $this->getApi()->setUrl($_REQUEST['server_id'], self::API_HREF);
     $data = $this->getApi()->deleteNotice($_POST['idList']);
     $data = json_decode($data, true);
     if ($data['status'] == 1) {
         $this->_utilMsg->showMsg('删除公告成功', 1, Tools::url(CONTROL, 'Index', array('zp' => 'Sftx', 'server_id' => $_REQUEST['server_id'])), false);
     } else {
         $this->_utilMsg->showMsg('删除公告失败', 1, 1, false);
     }
 }
 private function _edit()
 {
     $this->_modelProgramDatework = $this->_getGlobalData('Model_ProgramDatework', 'object');
     if ($this->_isPost()) {
         $info = $this->_modelProgramDatework->edit($_POST);
         $this->_utilMsg->showMsg($info['msg'], $info['status'], $info['href']);
     } else {
         $dataList = $this->_modelProgramDatework->findById($_GET['Id']);
         $this->_view->assign('dataList', $dataList);
         $this->_utilMsg->createPackageNavBar();
         $this->_view->set_tpl(array('body' => 'ProgramDateWork/Edit.html'));
         $this->_view->display();
     }
 }