Example #1
0
 /**
  * 异步得到输入编辑器HTML
  *
  */
 public function htmlAction()
 {
     // 不使用视图
     QP_Layout::stop();
     $id = $this->request->getGet('id', 0);
     if ($id > 0) {
         // 得到要编辑的BUG模板内容
         $info = $this->model->bugtplInfo($id);
         $tplname = $info['tplname'];
         $defaultTpl = $info['tplhtml'];
     } else {
         // 默认的模板内容
         $tplname = '';
         $defaultTpl = getDefaultBugTpl();
     }
     $this->view->tplname = $tplname;
     $this->view->tplhtml = $defaultTpl;
 }
Example #2
0
 /**
  * 得到BUG模板内容
  */
 public function bugtplAction()
 {
     $id = $this->request->getGet('id', 0);
     if ($id == 0) {
         $info['tplhtml'] = getDefaultBugTpl();
     } else {
         $info = $this->profileModel->bugtplInfo($id);
     }
     $this->outputJson(0, 'ok', $info);
 }