Пример #1
0
 public function index()
 {
     $first = empty($_GET['start']) ? 0 : (int) $_GET['start'];
     $cont['game_id'] = mod_product::get_cur_pid();
     $qtype = $_GET['qtype_id'];
     $qtype && ($cont['qtype_id'] = $qtype);
     $cont['operation'] = 1;
     $startdate = $_GET['startdate'] ? $_GET['startdate'] : date('Y-m-d', strtotime('-7 day'));
     $enddate = $_GET['enddate'] ? $_GET['enddate'] : date('Y-m-d', strtotime('today'));
     $tlist = mod_crmmanage::getqtype();
     $qlist = mod_crmmanage::getqlist($cont, $startdate, $enddate, $first, PAGE_ROWS);
     $where = $qlist['where'];
     $total = $qlist['total'];
     foreach ($tlist as $key => $value) {
         $newtype[$key + 1] = $value;
     }
     $newtype = genTree($newtype);
     pm_tpl::assign("ur_here", "问题列表");
     //pm_tpl::assign('gid',$gid);  //选择的游戏
     pm_tpl::assign('qtype', $qtype);
     pm_tpl::assign("qlist", $qlist['list']);
     pm_tpl::assign("tlist", $tlist);
     pm_tpl::assign("ser_tlist", $newtype);
     pm_tpl::assign("startdate", $startdate);
     pm_tpl::assign("enddate", $enddate);
     pm_tpl::assign('action_link_1', array('href' => '?c=crmoper&a=export&query=' . urlencode($where), 'target' => '__blank', 'text' => '导出html'));
     $cont && ($url = http_build_query($cont));
     pm_tpl::assign('page_url', '?c=crmoper&a=index&startdate=' . $startdate . '&enddate=' . $enddate . '&' . $url);
     pm_tpl::assign('pages', mod_pager::get_page_number_list($total, $first, PAGE_ROWS));
     pm_tpl::display('crmoper_index');
 }
Пример #2
0
 public function adminmsg()
 {
     $keyword = $_GET['keyword'] ? $_GET['keyword'] : '';
     $start = $_GET['start'] ? $_GET['start'] : 0;
     $data = mod_pmsys::adminmsg_list($keyword = '', $start = 0, $perpage = 20);
     pm_tpl::assign('page_url', "?c=pmsys&a=adminmsg");
     pm_tpl::assign('keyword', "{$keyword}");
     pm_tpl::assign('pages', mod_pager::get_page_number_list($data['total'], $start, PAGE_ROWS));
     pm_tpl::assign('list', $data['data']);
     $action_link = array('href' => '?c=pmsys&a=addadminmsg', 'text' => '添加通知');
     pm_tpl::assign('action_link', $action_link);
     pm_tpl::assign('ur_here', '权限管理 - 通知列表');
     pm_tpl::display('pmsys_adminmsg');
 }
Пример #3
0
 public function index()
 {
     $first = empty($_GET['start']) ? 0 : (int) $_GET['start'];
     $gid = $_GET['game_id'];
     $qtype = $_GET['qtype_id'];
     $qid = trim($_GET['question_id']);
     $account = trim($_GET['account']);
     $nick = trim($_GET['nick']);
     $content = trim($_GET['content']);
     $status = trim($_GET['status']);
     $operation = trim($_GET['operation']);
     $is_tel = $_GET['is_tel'];
     $gid && ($cont['game_id'] = $gid);
     $qtype && ($cont['qtype_id'] = $qtype);
     $qid && ($cont['question_id'] = $qid);
     $account && ($cont['account'] = $account);
     $nick && ($cont['nick'] = $nick);
     $content && ($cont['content'] = $content);
     $is_tel && ($cont['is_tel'] = $is_tel);
     $cont['status'] = $status;
     $cont['operation'] = $operation;
     $startdate = $_GET['startdate'] ? $_GET['startdate'] : date('Y-m-d', strtotime('-7 day'));
     $enddate = $_GET['enddate'] ? $_GET['enddate'] : date('Y-m-d', strtotime('today'));
     $plist = mod_product::getcrmproduct();
     $userlist = mod_crmmanage::getusername();
     $tlist = mod_crmmanage::getqtype();
     $qlist = mod_crmmanage::getqlist($cont, $startdate, $enddate, $first, PAGE_ROWS);
     foreach ($qlist['list'] as &$value) {
         if ($value['status'] == 'untreated' && $value['operation'] == '1') {
             if ($value['lastreply_time']) {
                 if ($value['lastreply_time'] + 5 * 24 * 3600 < time()) {
                     $value['color'] = '#FF3300';
                 }
             } else {
                 if ($value['create_time'] + 5 * 24 * 3600 < time()) {
                     $value['color'] = '#FF3300';
                 }
             }
         }
         if ($value['status'] == 'untreated' && $value['operation'] == 2) {
             $value['color'] = 'green';
         }
         if ($value['status'] == 'untreated' && $value['operation'] == 3) {
             $firstanswer = mod_crmmanage::getfirstanswerbyqid($value['question_id']);
             if ($firstanswer['creater_id'] == $value['lastreply_id']) {
                 $value['color'] = '#ffa500';
             }
         }
         foreach ($userlist as $val) {
             if ($value['create_id'] == $val['user_id']) {
                 $value['create_name'] = $val['truename'];
             }
         }
     }
     unset($value);
     $total = $qlist['total'];
     foreach ($tlist as $key => $value) {
         $newtype[$key + 1] = $value;
     }
     $newtype = genTree($newtype);
     pm_tpl::assign("ur_here", "问题列表");
     pm_tpl::assign('gid', $gid);
     //选择的游戏
     pm_tpl::assign('qid', $qid);
     pm_tpl::assign('account', $account);
     pm_tpl::assign('nick', $nick);
     pm_tpl::assign('is_tel', $is_tel);
     pm_tpl::assign('content', $content);
     pm_tpl::assign('status', $status);
     pm_tpl::assign('operation', $operation);
     pm_tpl::assign('qtype', $qtype);
     pm_tpl::assign("qlist", $qlist['list']);
     pm_tpl::assign("tlist", $tlist);
     pm_tpl::assign("ser_tlist", $newtype);
     pm_tpl::assign("startdate", $startdate);
     pm_tpl::assign("enddate", $enddate);
     pm_tpl::assign("plist", $plist);
     pm_tpl::assign('action_link', array('href' => '?c=crmmanage&a=addquestion', 'text' => '添加问题'));
     //pm_tpl::assign('action_link_1',array('href' => '?c=crmmanage&a=export&query='.urlencode($where),'target' =>'__blank','text' => '导出html'));
     $cont && ($url = http_build_query($cont));
     pm_tpl::assign('page_url', '?c=crmmanage&a=index&startdate=' . $startdate . '&enddate=' . $enddate . '&' . $url);
     pm_tpl::assign('pages', mod_pager::get_page_number_list($total, $first, PAGE_ROWS));
     pm_tpl::display('crmmanage_index');
 }
Пример #4
0
 public function logsmgdb()
 {
     $get = $_GET;
     $col = mongoinit('productmanage', 'oplogs');
     $start = empty($_GET['start']) ? 0 : (int) $_GET['start'];
     $username = $get['username'] ? $get['username'] : '';
     $ctr = $get['ctr'] ? $get['ctr'] : '';
     $act = $get['act'] ? $get['act'] : '';
     $start_date = $get['start_date'] ? $get['start_date'] : '';
     $start_dategsh = $get['start_date'] ? date('Ymd', strtotime($get['start_date'])) : '';
     $end_date = $get['end_date'] ? $get['end_date'] : '';
     $end_dategsh = $get['end_date'] ? date('Ymd', strtotime($get['end_date'])) : '';
     $logslist = mod_member::get_logslistmgdb($start, $username, $ctr, $act, $start_dategsh, $end_dategsh, $col, 20);
     //debug($logslist);
     if ($logslist) {
         pm_tpl::assign('logslist', $logslist['data']);
         pm_tpl::assign('page_url', "?c=member&a=logsmgdb&username={$username}&ctr={$ctr}&act={$act}&start_date={$start_date}&end_date={$end_date}");
         pm_tpl::assign('pages', mod_pager::get_page_number_list($logslist['total'], $start, 20));
     }
     pm_tpl::assign('ur_here', ' 权限系统 - 用户操作历史【Mongodb版】 ');
     pm_tpl::assign('username', $username);
     pm_tpl::assign('ctr', $ctr);
     pm_tpl::assign('act', $act);
     pm_tpl::assign('start_date', $start_date);
     pm_tpl::assign('end_date', $end_date);
     pm_tpl::display('member_logsmgdb');
 }