예제 #1
0
파일: faqs.php 프로젝트: armpit/e107
}
if ($action == "cat" && $idx) {
    $ftmp = $faq->view_faq($idx);
    define("e_PAGETITLE", FAQLAN_FAQ . " - " . $ftmp['title']);
    require_once HEADERF;
    $ns->tablerender($ftmp['caption'], $ftmp['text']);
}
if ($action == "cat") {
    $ftmp = $faq->view_cat_list($action, $id);
    define("e_PAGETITLE", strip_tags($ftmp['title'] . $ftmp['caption']));
    require_once HEADERF;
    $ns->tablerender($ftmp['caption'], $ftmp['text']);
}
if ((check_class($faqpref['add_faq']) || ADMIN) && ($action == "new" || $action == "edit")) {
    require_once HEADERF;
    $faq->add_faq($action, $id, $idx);
}
require_once FOOTERF;
exit;
// ====== +++++++++++++++++++++++++++++
class faq
{
    var $pref = array();
    protected $sc = null;
    protected $template = null;
    protected $pageTitle = null;
    protected $pageDescription = null;
    function __construct()
    {
        $sc = e107::getScBatch('faqs', true);
        $this->pref = e107::pref('faqs');