本文整理汇总了PHP中FSS_Helper::AllowCache方法的典型用法代码示例。如果您正苦于以下问题:PHP FSS_Helper::AllowCache方法的具体用法?PHP FSS_Helper::AllowCache怎么用?PHP FSS_Helper::AllowCache使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FSS_Helper
的用法示例。
在下文中一共展示了FSS_Helper::AllowCache方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: searchTickets
function searchTickets()
{
FSS_Helper::IncludeModal();
FSS_Helper::AllowCache();
$this->ticket_count = 0;
$this->refresh = 0;
$this->do_refresh = 0;
$pathway = JFactory::getApplication()->getPathway();
$pathway->addItem(JText::_("SUPPORT"), FSSRoute::_('index.php?option=com_fss&view=admin_support&tickets=' . $this->ticket_view, false));
$pathway->addItem(JText::_("SEARCH_RESULTS"));
$tags = FSS_Input::getString('tags');
$tags = trim($tags, ';');
if ($tags) {
$tags = explode(";", $tags);
$this->tags = $tags;
}
$this->ticket_list = new SupportTickets();
$this->ticket_list->limitstart = $this->limitstart;
$this->ticket_list->limit = $this->limit;
$this->ticket_list->loadTicketsBySearch();
$this->ticket_count = $this->ticket_list->ticket_count;
$this->pagination = new JPaginationJS($this->ticket_count, $this->limitstart, $this->limit);
$this->displayTicketList();
}
示例2: searchArticles
function searchArticles()
{
$mainframe = JFactory::getApplication();
$aparams = FSS_Settings::GetViewSettingsObj('kb');
$search = FSS_Input::getString('kbsearch', '');
$prodid = FSS_Input::getInt('prodid');
$catid = FSS_Input::getInt('catid');
$this->assign('cat_art_pages', $aparams->get('cat_art_pages', 0));
$search = FSS_Input::getString('kbsearch');
$this->assign('view_mode', $aparams->get('cat_cat_arts'));
$document = JFactory::getDocument();
$document->setTitle(JText::_("KNOWLEDGE_BASE") . ' - ' . JText::_("SEARCH_RESULTS"));
$pagination = $this->get('ArtPaginationSearch');
$this->pagination = $pagination;
$this->assign('limit', $this->get("ArtLimit"));
$this->product = $this->get("Product");
$this->cat = $this->get("Cat");
$this->results = $this->get("ArtsWhat");
$this->search = $search;
$pathway = $mainframe->getPathway();
if (FSS_Helper::NeedBaseBreadcrumb($pathway, array('view' => 'kb'))) {
$pathway->addItem(JText::_('KNOWLEDGE_BASE'), FSSRoute::_('index.php?option=com_fss&view=kb'));
}
$pathway->addItem(JText::_("SEARCH_RESULTS"));
FSS_Helper::AllowCache();
parent::display("kbsearch");
}
示例3: JOIN
function &getTickets()
{
$db = JFactory::getDBO();
$user = JFactory::getUser();
$userid = $user->get('id');
$uidlist = $this->getUIDS($userid);
$tidlist = $this->getTIDS($userid);
$query = "SELECT t.*, s.title as status, s.color, u.name, au.name as assigned, u.email as useremail, u.username as username, au.email as handleremail, au.username as handlerusername, ";
$query .= " dept.title as department, cat.title as category, prod.title as product, pri.title as priority, pri.color as pricolor, ";
$query .= " grp.groupname as groupname, grp.id as group_id ";
$query .= " , pri.translation as ptl, dept.translation as dtr, s.translation as str, cat.translation as ctr, prod.translation as prtr";
$query .= " FROM #__fss_ticket_ticket as t ";
$query .= " LEFT JOIN #__fss_ticket_status as s ON t.ticket_status_id = s.id ";
$query .= " LEFT JOIN #__users as u ON t.user_id = u.id ";
$query .= " LEFT JOIN #__users as au ON t.admin_id = au.id ";
$query .= " LEFT JOIN #__fss_ticket_dept as dept ON t.ticket_dept_id = dept.id ";
$query .= " LEFT JOIN #__fss_ticket_cat as cat ON t.ticket_cat_id = cat.id ";
$query .= " LEFT JOIN #__fss_prod as prod ON t.prod_id = prod.id ";
$query .= " LEFT JOIN #__fss_ticket_pri as pri ON t.ticket_pri_id = pri.id ";
$query .= " LEFT JOIN (SELECT group_id, user_id FROM #__fss_ticket_group_members GROUP BY user_id) as mem ON t.user_id = mem.user_id ";
$query .= " LEFT JOIN #__fss_ticket_group as grp ON grp.id = mem.group_id ";
// add product, department and category
$query .= " WHERE ( t.user_id IN (" . implode(", ", $uidlist) . ") OR t.id IN (" . implode(", ", $tidlist) . ") ) ";
$query .= " AND " . SupportSource::user_list_sql();
$tickets = FSS_Input::getCmd('tickets', 'open');
if (FSS_Settings::get('support_simple_userlist_tabs')) {
$tickets = "all";
}
if (FSS_Input::getCmd('search_all')) {
$tickets = "";
}
if ($tickets == 'open') {
$allopen = FSS_Ticket_Helper::GetStatusIDs("is_closed", true);
// tickets that arent closed
$query .= " AND ticket_status_id IN ( " . implode(", ", $allopen) . ") ";
}
if ($tickets == 'closed') {
$allopen = FSS_Ticket_Helper::GetStatusIDs("is_closed");
// remove the archived tickets from the list to deal with
$def_archive = FSS_Ticket_Helper::GetStatusID('def_archive');
foreach ($allopen as $offset => $value) {
if ($value == $def_archive) {
unset($allopen[$offset]);
}
}
// tickets that are closed
$query .= " AND ticket_status_id IN ( " . implode(", ", $allopen) . ") ";
} else {
if ($tickets > 0) {
$statuss = SupportHelper::getStatuss(false);
$status_list = array();
$status_list[] = (int) $tickets;
foreach ($statuss as $status) {
if ($status->combine_with == (int) $tickets) {
$status_list[] = $status->id;
}
}
$query .= " AND ticket_status_id IN (" . implode(", ", $status_list) . ")";
}
}
$search = FSS_Input::getString('search');
if ($search != "") {
FSS_Helper::AllowCache();
// We have the nearly full query here, so use it to get a list of ticket ids
$db->setQuery($query);
$recs = $db->loadObjectList();
$ids = array();
$ids[] = 0;
foreach ($recs as $rec) {
$ids[] = $rec->id;
}
$mode = "";
if (FSS_Helper::contains($search, array('*', '+', '-', '<', '>', '(', ')', '~', '"'))) {
$mode = "IN BOOLEAN MODE";
}
$msgsrch = "SELECT ticket_ticket_id FROM #__fss_ticket_messages WHERE ticket_ticket_id IN (" . implode(", ", $ids) . ") AND admin < 3 AND ";
$msgsrch .= " MATCH (body) AGAINST ('" . $db->escape($search) . "' {$mode}) ";
$db->setQuery($msgsrch);
$results = $db->loadObjectList();
$ids = array();
$ids[] = 0;
foreach ($results as $rec) {
$ids[] = $rec->ticket_ticket_id;
}
// search custom fields that are set to be searched
$fields = FSSCF::GetAllCustomFields(true);
foreach ($fields as $field) {
if (!$field["basicsearch"]) {
continue;
}
if ($field['permissions'] > 1 && $field['permissions'] < 5) {
continue;
}
$fieldid = $field['id'];
if ($field['type'] == "checkbox") {
if ($search == "1") {
$search = "on";
} else {
$search = "";
}
//.........这里部分代码省略.........
示例4: display
function display($tpl = null)
{
if (!FSS_Permission::auth("fss.view", "com_fss.faq")) {
return FSS_Helper::NoPerm();
}
require_once JPATH_SITE . DS . 'components' . DS . 'com_fss' . DS . 'helper' . DS . 'content' . DS . 'faqs.php';
$this->content = new FSS_ContentEdit_FAQs();
$this->content->Init();
$model = $this->getModel();
$model->content = $this->content;
$mainframe = JFactory::getApplication();
$faqid = FSS_Input::getInt('faqid');
$aparams = FSS_Settings::GetViewSettingsObj('faqs');
if ($faqid > 0) {
$tmpl = FSS_Input::getCmd('tmpl');
$this->tmpl = $tmpl;
$this->setLayout("faq");
$faq = $this->get("Faq");
$this->faq = $faq;
if (!$this->faq) {
return JError::raiseWarning(404, JText::_('FAQ NOT FOUND'));
}
$pathway = $mainframe->getPathway();
if (FSS_Helper::NeedBaseBreadcrumb($pathway, array('view' => 'faq'))) {
$pathway->addItem(JText::_('FREQUENTLY_ASKED_QUESTIONS'), FSSRoute::_('index.php?option=com_fss&view=faq'));
}
$pathway->addItem($faq['title'], FSSRoute::_('&limitstart=&layout=&faqid=&catid=' . $faq['faq_cat_id']));
// FIX LINK
$pathway->addItem($faq['question']);
if (FSS_Settings::get('faq_use_content_plugins')) {
// apply plugins to article body
$dispatcher =& JDispatcher::getInstance();
JPluginHelper::importPlugin('content');
$art = new stdClass();
$art->text = $faq['answer'];
$art->noglossary = 1;
$this->params = $mainframe->getParams('com_fss');
$results = $dispatcher->trigger('onContentPrepare', array('com_fss.faq', &$art, &$this->params, 0));
$faq['answer'] = $art->text;
}
// load tags
$db = JFactory::getDBO();
$qry = "SELECT * FROM #__fss_faq_tags WHERE faq_id IN (" . FSSJ3Helper::getEscaped($db, $faqid) . ") GROUP BY tag ORDER BY tag";
$db->setQuery($qry);
$rows = $db->loadObjectList();
$this->tags = array();
foreach ($rows as &$row) {
$id = $row->faq_id;
$this->tags[] = "<a href='" . FSSRoute::_('index.php?option=com_fss&view=faq&tag=' . urlencode($row->tag) . '&Itemid=' . FSS_Input::getInt('Itemid')) . "'>{$row->tag}</a>";
}
//$document = JFactory::getDocument();
//$document->setTitle(JText::_("FAQS") . ' - ' . $faq['title']);
if (FSS_Input::getCmd('tmpl') == "component") {
return parent::display("popup");
}
parent::display();
return;
}
$pathway = $mainframe->getPathway();
if (FSS_Helper::NeedBaseBreadcrumb($pathway, array('view' => 'faq'))) {
$pathway->addItem(JText::_('FREQUENTLY_ASKED_QUESTIONS'), FSSRoute::_('index.php?option=com_fss&view=faq'));
}
$hide_allfaqs = $aparams->get('hide_allfaqs', 0);
$show_featured = $aparams->get('show_featured', 0);
$hide_tags = $aparams->get('hide_tags', 0);
$hide_search = $aparams->get('hide_search', 0);
$view_mode = $aparams->get('view_mode', 'questionwithpopup');
$view_mode_cat = $aparams->get('view_mode_cat', 'list');
$view_mode_incat = $aparams->get('view_mode_incat', 'list');
$enable_pages = $aparams->get('enable_pages', 1);
$num_cat_colums = $aparams->get('num_cat_colums', 1);
if ($num_cat_colums < 1 && !$num_cat_colums) {
$num_cat_colums = 1;
}
if ($view_mode_cat != "list") {
$num_cat_colums = 1;
}
$catlist = $this->get("CatList");
$search = $this->get("Search");
$curcatdesc = $this->get("CurCatDesc");
$curcatimage = $this->get("CurCatImage");
$curcattitle = $this->get("CurCatTitle");
$curcatid = $this->get("CurCatID");
// Get data from the model
if ($curcatid == -4) {
return $this->listTags();
}
if ($curcatid == -5) {
$curcattitle = "Featured FAQs";
$curcatimage = "/components/com_fss/assets/images/featured.png";
}
$pagination = $this->get('Pagination');
$model = $this->getModel();
$search = $model->_search;
if ($search || $curcatid > 0 || FSS_Input::getInt('catid') != "" || FSS_Input::getString('tag') != "") {
$view_mode_cat = "";
}
if ($search) {
FSS_Helper::AllowCache();
}
//.........这里部分代码省略.........