Ejemplo n.º 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');
 }
Ejemplo n.º 2
0
 function getAnswerList()
 {
     $tlist = mod_crmmanage::getqtype();
     foreach ($tlist as $key => $value) {
         $newtype[$key + 1] = $value;
     }
     $newtype = genTree($newtype);
     //$answer_id=mod_crmtest::getAnswerId();
     //debug($alist['answer_id']);
     $alist = mod_crmtest::getanswerlist();
     //debug($alist);
     //$a=mb_substr($alist['3']['content'],0,2);
     pm_tpl::assign("ser_tlist", $newtype);
     pm_tpl::assign("alist", $alist);
     pm_tpl::display('crmtest_getanswerlist');
 }
 public function orgComboData()
 {
     $org_id = getFormGetPostValue("org_id");
     if (empty($org_id)) {
         $org_id = 0;
     }
     $Model = M("SysOrg");
     $data = $Model->where('org_id<>%u', $org_id)->select();
     return $this->ajaxReturn(genTree($data, 'org_id', 'pid', 'title'));
 }
Ejemplo n.º 4
0
 public function addquestion()
 {
     if ($_POST) {
         unset($_POST['submit']);
         $data = $_POST;
         $lastone = mod_crmmanage::getlastqid();
         $date = substr($lastone, 1, 8);
         if ($date != date('Ymd')) {
             $qid = date('Ymd') . "00001";
         } else {
             $qid = substr($lastone, 1) + 1;
         }
         $data['question_id'] = 'Q' . $qid;
         $data['create_id'] = ADMINUSERID;
         $data['create_time'] = time();
         $data['add_role'] = 1;
         $id = pm_db::insert('crm_question', $data, true);
         if ($id) {
             mod_login::message('添加成功', "?c=crmmanage&a=answerlist&qid=" . $data['question_id']);
         } else {
             mod_login::message('添加失败');
         }
         exit;
     }
     $plist = mod_product::getcrmproduct();
     $slist = mod_crmmanage::getserverlist($plist[0]['pid']);
     $tlist = mod_crmmanage::getqtype();
     foreach ($tlist as $key => $value) {
         $newtype[$key + 1] = $value;
     }
     $newtype = genTree($newtype);
     pm_tpl::assign('action_link', array('href' => '?c=crmmanage&a=index', 'text' => '返回问题列表'));
     pm_tpl::assign("tlist", $newtype);
     pm_tpl::assign("json_type", json_encode($newtype));
     pm_tpl::assign("plist", $plist);
     pm_tpl::assign("slist", $slist);
     pm_tpl::assign("ur_here", "添加问题");
     pm_tpl::display('crmmanage_addquestion');
 }