Exemplo n.º 1
0
 function show_question($params)
 {
     global $REQUEST_ASSOC, $TDB, $TMS, $TPA;
     $q = 'select * from faq where id=' . $REQUEST_ASSOC['qid'];
     $TMS->AddFileSection(Common::get_fmodule_tpl_path('faq', $params['qTemplate']));
     $question = $TDB->get_results($q);
     $question = $question[1];
     $anc = $this->_tree->getNodeInfo($question['cat_id']);
     $question['category'] = $anc['params']['Name'];
     $question['ancestor'] = $anc['id'];
     $question['back'] = $TPA->page_link . '/~show_category/cid/' . $anc['basic'];
     $TMS->AddMassReplace('question', $question);
     $tmp = $TMS->parseSection('question');
     if ($this->question_alias) {
         $question['Alias'] = $this->question_alias;
         $this->question_alias = null;
     } else {
         $question['Alias'] = Enhance::cut_words2(array($question["question"], ' ', 40, '', '...', true));
     }
     $this->get_bones($anc, $question);
     return $tmp;
 }