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 addbatch()
 {
     $givingid = 100001;
     $counter = 88;
     $rule = "none";
     $remark = "��ע��ע";
     $_ceffectivetime = '2013-08-20';
     $gameid = mod_product::get_cur_pid();
     $createrid = USERNAME;
     $ceffectivetime = strtotime($_ceffectivetime . ' 00:00:00');
     $code_ceffectivetime = substr(str_replace("-", "", $_ceffectivetime), 2);
     if ($counter < 1 || $counter > 9999) {
         mod_login::message("�������������1~9999֮��");
     }
     $current_batchid = mod_test::get_giving_max_batchid($givingid);
     if ($current_batchid >= 99) {
         mod_login::message("��ǰ����������Ѿ�����99");
     }
     $batchid = $current_batchid + 1;
     mod_test::add_giving_batch($batchid, $givingid, $rule, $ceffectivetime, $remark, $gameid, $createrid);
     mod_test::generate_giving_code($batchid, $givingid, $counter, $code_ceffectivetime, $gameid);
 }
示例#3
0
 public static function menulistbypandr()
 {
     $product_id = mod_product::get_cur_pid();
     $sql_1 = "SELECT a.* FROM iosadm_menu a left JOIN iosadm_menu_product b on(a.menu_id=b.menu_id) WHERE  b.product_id={$product_id}  and  a.status=1";
     $sql_1 .= " ORDER BY a.status DESC, a.is_show DESC, a.sort ASC";
     $list = pm_db::fetch_all(pm_db::query($sql_1));
     if (!$list) {
         return null;
     }
     if (ADMINLEVEL == 1) {
         return self::getparents($list);
     } else {
         $usermenu = mod_member::get_user_menus(ADMINUSERID);
         //权限菜单
         foreach ($list as $value) {
             foreach ($usermenu as $val) {
                 if ($value['menu_id'] == $val['menu_id']) {
                     $com[] = $val;
                 }
             }
         }
         if (!$com) {
             return null;
         }
         return self::getparents($com);
     }
 }