_N('selected canned response', 'selected canned responses', $count)); elseif(!$errors['err']) $errors['err'] = sprintf(__('Unable to delete %s'), _N('selected canned response', 'selected canned responses', $count)); break; default: $errors['err']=__('Unknown command'); } } break; default: $errors['err']=__('Unknown action'); break; } } $page='cannedresponses.inc.php'; $tip_namespace = 'knowledgebase.canned_response'; if($canned || ($_REQUEST['a'] && !strcasecmp($_REQUEST['a'],'add'))) { $page='cannedresponse.inc.php'; } $nav->setTabActive('kbase'); $ost->addExtraHeader('<meta name="tip-namespace" content="' . $tip_namespace . '" />', "$('#content').data('tipNamespace', '".$tip_namespace."');"); require(STAFFINC_DIR.'header.inc.php'); require(STAFFINC_DIR.$page); print $canned_form->getMedia(); include(STAFFINC_DIR.'footer.inc.php'); ?>
} elseif ($_REQUEST['a'] == 'print' && !$ticket->pdfExport($_REQUEST['psize'], $_REQUEST['notes'])) { $errors['err'] = __('Internal error: Unable to export the ticket to PDF for print.'); } } else { $inc = 'tickets.inc.php'; if ($_REQUEST['a'] == 'open' && $thisstaff->canCreateTickets()) { $inc = 'ticket-open.inc.php'; } elseif ($_REQUEST['a'] == 'export') { $ts = strftime('%Y%m%d'); if (!($token = $_REQUEST['h'])) { $errors['err'] = __('Query token required'); } elseif (!($query = $_SESSION['search_' . $token])) { $errors['err'] = __('Query token not found'); } elseif (!Export::saveTickets($query, "tickets-{$ts}.csv", 'csv')) { $errors['err'] = __('Internal error: Unable to dump query results'); } } //Clear active submenu on search with no status if ($_REQUEST['a'] == 'search' && !$_REQUEST['status']) { $nav->setActiveSubMenu(-1); } //set refresh rate if the user has it configured if (!$_POST && !$_REQUEST['a'] && ($min = $thisstaff->getRefreshRate())) { $js = "clearTimeout(window.ticket_refresh);\n window.ticket_refresh = setTimeout(\$.refreshTicketView," . $min * 60000 . ");"; $ost->addExtraHeader('<script type="text/javascript">' . $js . '</script>', $js); } } require_once STAFFINC_DIR . 'header.inc.php'; require_once STAFFINC_DIR . $inc; print $response_form->getMedia(); require_once STAFFINC_DIR . 'footer.inc.php';
$errors['err'] = sprintf(__('Unable to delete %s.'), __('this FAQ article')); } break; default: $errors['err'] = __('Invalid action'); } } break; default: $errors['err'] = __('Unknown action'); } } $inc = 'faq-categories.inc.php'; //FAQs landing page. if ($faq) { $inc = 'faq-view.inc.php'; if ($_REQUEST['a'] == 'edit' && $thisstaff->canManageFAQ()) { $inc = 'faq.inc.php'; } } elseif ($_REQUEST['a'] == 'add' && $thisstaff->canManageFAQ()) { $inc = 'faq.inc.php'; } elseif ($category && $_REQUEST['a'] != 'search') { $inc = 'faq-category.inc.php'; } $tip_namespace = 'knowledgebase.faq'; $nav->setTabActive('kbase'); $ost->addExtraHeader('<meta name="tip-namespace" content="' . $tip_namespace . '" />', "\$('#content').data('tipNamespace', '" . $tip_namespace . "');"); require_once STAFFINC_DIR . 'header.inc.php'; require_once STAFFINC_DIR . $inc; print $faq_form->getMedia(); require_once STAFFINC_DIR . 'footer.inc.php';