本文整理汇总了PHP中FSS_Input::getCmd方法的典型用法代码示例。如果您正苦于以下问题:PHP FSS_Input::getCmd方法的具体用法?PHP FSS_Input::getCmd怎么用?PHP FSS_Input::getCmd使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FSS_Input
的用法示例。
在下文中一共展示了FSS_Input::getCmd方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: out
function out()
{
$current_user = JFactory::getUser()->id;
$manager = FSS_Permission::auth("fss.ticket_admin.ooo", "com_fss.support_admin", JFactory::getUser()->id);
$user_id = FSS_Input::getInt('user_id');
if (!$manager && $current_user != $user_id) {
return $this->cancel();
}
// update the current users setting
$values = SupportUsers::getAllSettings($user_id);
$values->out_of_office = 1;
SupportUsers::updateUserSettings($values, $user_id);
$assign = FSS_Input::getCmd('assign');
$handler = FSS_Input::getInt('handler');
$body = FSS_Input::getHTML('body');
if ($assign == "auto" || $assign == "handler") {
$this->loadTicketList($user_id);
foreach ($this->tickets->tickets as $ticket) {
if ($assign == "auto") {
$handler = FSS_Ticket_Helper::AssignHandler($ticket->prod_id, $ticket->ticket_dept_id, $ticket->ticket_cat_id, true);
}
if ($assign == "unassigned") {
$handler = 0;
}
$ticket->assignHandler($handler);
if ($body) {
$ticket->addMessage($body, "", $user_id, TICKET_MESSAGE_PRIVATE);
FSS_EMail::Admin_Forward($ticket, $ticket->title, $body);
}
}
}
JFactory::getApplication()->redirect(FSSRoute::_("index.php?option=com_fss&view=admin_support&layout=listhandlers", false));
}
示例2: HandleTasks
static function HandleTasks($view)
{
$task = strtolower(FSS_Input::getCmd('task'));
$task = str_replace("-", "_", $task);
$bits = explode(".", $task);
if (count($bits) != 2) {
return false;
}
$task_class = preg_replace("/[^a-z0-9\\_]/", '', $bits[0]);
$task_ident = preg_replace("/[^a-z0-9\\_]/", '', $bits[1]);
$task_file = JPATH_SITE . DS . 'components' . DS . FSS_Input::getCmd('option') . DS . 'views' . DS . FSS_Input::getCmd('view') . DS . 'task.' . $task_class . '.php';
if (!file_exists($task_file)) {
//echo "No file : $task_file<br>";
return false;
}
require_once $task_file;
$task_class_name = "Task_" . $task_class;
if (!class_exists($task_class_name)) {
echo "No class : {$task_class}<br>";
return false;
}
$task_obj = new $task_class_name();
$task_obj->view = $view;
return $task_obj->execute($task_ident);
}
示例3: display
function display($tpl = NULL)
{
$action = FSS_Input::getCmd('action');
if ($action == "cancel") {
$mainframe = JFactory::getApplication();
$link = FSSRoute::_('index.php?option=com_fss&view=admin_support', false);
$mainframe->redirect($link);
return;
}
if ($action == "save" || $action == "apply") {
$all = array('per_page', 'group_products', 'group_departments', 'group_cats', 'group_group', 'group_pri', 'return_on_reply', 'return_on_close', 'reverse_order', 'reports_separator');
$values = array();
$values = SupportUsers::getAllSettings();
foreach ($all as $setting) {
$new = FSS_Input::getString($setting, 0);
$values->{$setting} = $new;
}
SupportUsers::updateUserSettings($values);
if ($action == "save") {
$link = FSSRoute::_('index.php?option=com_fss&view=admin_support', false);
} else {
$link = FSSRoute::_('index.php?option=com_fss&view=admin_support&layout=settings', false);
}
$mainframe = JFactory::getApplication();
$mainframe->redirect($link, JText::_('SETTINGS_SAVED'));
return;
}
$this->_display();
}
示例4: display
function display($tpl = null)
{
$type = FSS_Input::getCmd('type');
if ($type) {
return parent::display($type);
}
parent::display();
}
示例5: onContentPrepare
public function onContentPrepare($context, &$row, &$params, $page = 0)
{
if (is_object($row)) {
if (property_exists($row, "id")) {
$context .= "." . $row->id;
}
} else {
if (is_array($row)) {
if (array_key_exists("id", $row)) {
$context .= "." . $row['id'];
}
}
}
FSS_Glossary::$context = $context;
$ignore = FSS_Settings::Get('glossary_ignore');
$option = FSS_Input::getCmd('option');
if (trim($ignore) != "") {
$ignore = explode("\n", $ignore);
foreach ($ignore as $ign) {
$ign = trim($ign);
if ($ign == "") {
continue;
}
if (stripos($context, $ign) !== FALSE) {
return true;
}
if ($option) {
if (stripos($option, $ign) !== FALSE) {
return true;
}
}
}
}
// skip plugin on freestyle components
if (strpos($context, "_fss") > 0) {
return true;
}
// Don't run this plugin when the content is being indexed
if (strpos($context, 'finder.indexer') > 0) {
return true;
}
if (is_object($row)) {
if (!empty($row->noglossary)) {
// skip glossary plugin on fss content
return true;
}
//$row->text .= "\n\n\n<div style='display:none;' id='fss_glossary_context'>$context</div>\n\n\n";
return $this->_glossary($row->text, $params);
} else {
if (is_array($row)) {
//$row['text'] .= "\n\n\n<div style='display:none;' id='fss_glossary_context'>$context</div>\n\n\n";
return $this->_glossary($row['text'], $params);
}
}
//$row .= "<div style='display:none;' id='fss_glossary_context'>$context</div>";
return $this->_glossary($row, $params);
}
示例6: parseRequest
function parseRequest()
{
$this->prodid = FSS_Input::getInt('prodid');
$this->deptid = FSS_Input::getInt('deptid');
$this->catid = FSS_Input::getInt('catid');
$this->mode = FSS_Input::getInt('mode');
$def_open = FSS_Ticket_Helper::GetStatusID("def_open");
$this->status = FSS_Input::getCmd('status', $def_open);
}
示例7: display
function display($tpl = NULL)
{
// view a ticket!
$this->ticketid = FSS_Input::getInt('ticketid');
$document = JFactory::getDocument();
$document->addScript(JURI::root() . 'components/com_fss/assets/js/bootstrap/bootstrap-timepicker.min.js');
$this->ticket = new SupportTicket();
if (!$this->ticket->load($this->ticketid)) {
if ($this->ticket->checkExist($this->ticketid)) {
return $this->_display("noperm");
} else {
return JError::raiseWarning(404, JText::_('Ticket not found'));
}
}
if ($this->ticket->merged > 0 && FSS_Input::getInt('no_redirect') != '1') {
JFactory::getApplication()->redirect(FSSRoute::_('index.php?option=com_fss&view=admin_support&layout=ticket&ticketid=' . $this->ticket->merged . "&Itemid=" . FSS_Input::getInt('Itemid'), false));
}
$reverse = JRequest::getInt('sort', null);
if ($reverse !== null) {
if ($reverse) {
// we want messages in opposite order to normal
if (SupportUsers::getSetting("reverse_order")) {
$reverse = true;
} else {
$reverse = false;
}
} else {
// we want messages in normal order
$reverse = null;
}
}
$this->ticket->loadAll($reverse);
$this->loadMerged();
$pathway = JFactory::getApplication()->getPathway();
$pathway->addItem(JText::_("SUPPORT"), FSSRoute::_('index.php?option=com_fss&view=admin_support&tickets=' . $this->ticket_view));
$pathway->addItem(JText::_("VIEW_TICKET") . " : " . $this->ticket->reference . " - " . $this->ticket->title);
$this->assignOnOpen();
$this->tryLock();
if ($this->ticket->admin_id > 0) {
$this->adminuser = SupportUsers::getUser($this->ticket->admin_id);
}
$this->ticket_view = $this->ticket->ticket_status_id;
$this->HandleRefresh();
if (FSS_Settings::get('time_tracking') == "auto") {
$session = JFactory::getSession();
$session->set('ticket_' . $this->ticket->id . "_opened", time());
}
FSS_Helper::IncludeModal();
FSS_Helper::AddSCEditor();
$this->HandleRefresh();
$this->print = FSS_Input::getCmd('print');
if ($this->print) {
return $this->_display("print");
}
$this->_display();
}
示例8: Display
function Display($tpl = NULL)
{
if (!FSS_Permission::auth("core.edit", $this->getAsset()) && !FSS_Permission::auth("core.edit.own", $this->getAsset())) {
return FSS_Admin_Helper::NoPerm();
}
$this->Init();
$db = JFactory::getDBO();
$this->what = FSS_Input::getCmd('what', '');
$user = JFactory::getUser();
$userid = $user->get('id');
$this->viewurl = "";
$return = FSS_Input::getString('return', '');
if ($return == 1) {
JRequest::setVar('return', $_SERVER['HTTP_REFERER']);
}
if ($this->what == "pick") {
return $this->HandlePick();
}
if ($this->what == "author") {
return $this->HandleAuthor();
}
if ($this->what == "publish" || $this->what == "unpublish") {
return $this->HandlePublish();
}
if ($this->what == "cancel") {
$mainframe = JFactory::getApplication();
$link = FSSRoute::_('index.php?option=com_fss&view=admin_content&type=' . $this->id, false);
$return = FSS_Input::getString('return', '');
if ($return && $return != 1) {
$link = $return;
}
$mainframe->redirect($link);
}
if ($this->what == "save" || $this->what == "apply" || $this->what == "savenew") {
return $this->Save();
}
if ($this->what == "new") {
return $this->Create();
}
if ($this->what == "edit") {
$this->item = $this->getSingle();
$this->viewurl = $this->getArtLink();
if (FSS_Permission::auth("core.edit", $this->getAsset())) {
$this->authorselect = $this->AuthorSelect($this->item);
}
FSS_Helper::IncludeModal();
$this->Output("form");
return;
}
$this->GetListFilter();
$this->data = $this->getList();
$this->Output("list");
}
示例9: display
function display($tpl = NULL)
{
$preview = FSS_Input::getCmd('preview');
if ($preview) {
return $this->showPreview($preview);
}
FSS_Helper::IncludeModal();
$this->state = FSS_Input::getCmd('state');
$this->ticket_view = "";
$this->getLimits();
$this->pending = $this->loadPending();
$this->_display();
}
示例10:
function &getAnnounces()
{
if (empty($this->_data)) {
$query = $this->_buildQuery();
if (FSS_Input::getCmd('feed') == "rss") {
$this->_db->setQuery($query, 0, 20);
} else {
$this->_db->setQuery($query, $this->getState('limitstart'), $this->getState('limit'));
}
$this->_data = $this->_db->loadAssocList();
}
return $this->_data;
}
示例11: process
function process()
{
$posted = JRequest::get('post');
$ticket_ids = array();
foreach ($posted as $var => $value) {
if (substr($var, 0, 7) == "ticket_") {
$ticket_id = (int) substr($var, 7);
if ($ticket_id > 0) {
$ticket_ids[$ticket_id] = $ticket_id;
}
}
}
if (count($ticket_ids) == 0) {
return;
}
$db = JFactory::getDBO();
$tickets = array();
foreach ($ticket_ids as $ticketid) {
$ticket = new SupportTicket();
if ($ticket->Load($ticketid)) {
$ticket->is_batch = true;
$tickets[$ticketid] = $ticket;
} else {
unset($ticket_ids[$ticket_id]);
}
}
$new_pri = FSS_Input::getInt('batch_priority');
if ($new_pri > 0) {
foreach ($ticket_ids as $ticketid) {
$tickets[$ticketid]->updatePriority($new_pri);
}
}
$new_status = FSS_Input::getInt('batch_status');
if ($new_status > 0) {
foreach ($ticket_ids as $ticketid) {
$tickets[$ticketid]->updateStatus($new_status);
}
}
if (FSS_Input::getString('batch_handler') != "") {
foreach ($ticket_ids as $ticketid) {
$tickets[$ticketid]->assignHandler(FSS_Input::getInt('batch_handler'));
}
}
$should_delete = FSS_Input::getCmd('batch_status');
if ($should_delete == "delete") {
foreach ($ticket_ids as $ticketid) {
$tickets[$ticketid]->delete();
}
}
}
示例12: display
function display($tpl = NULL)
{
$this->ticket_ids = FSS_Input::getString("ticketids");
$this->ticket_ids = explode(":", trim($this->ticket_ids));
$this->tickets = array();
foreach ($this->ticket_ids as $ticketid) {
$ticket = new SupportTicket();
if ($ticket->load($ticketid)) {
$ticket->loadAll();
$this->tickets[] = $ticket;
}
}
$this->print = FSS_Input::getCmd('print');
$this->_display();
}
示例13: display
function display($tpl = NULL)
{
$type = FSS_Input::getCmd('type');
$session = JFactory::getSession();
$session->clear('admin_create');
$session->clear('admin_create_user_id');
$session->clear('ticket_email');
$session->clear('ticket_name');
$session->clear('ticket_reference');
if ($type == "registered") {
return $this->displayRegistered();
}
if ($type == "unregistered") {
return $this->displayUnRegistered();
}
$this->_display();
}
示例14: init
function init()
{
$user = JFactory::getUser();
$this->userid = $user->get('id');
$this->model = $this->getModel("admin_support");
if (!FSS_Permission::auth("fss.handler", "com_fss.support_admin")) {
return FSS_Admin_Helper::NoPerm();
}
$this->def_open = FSS_Ticket_Helper::GetStatusID('def_open');
$this->ticket_view = FSS_Input::getCmd('tickets', $this->def_open);
$this->count = SupportTickets::getTicketCount();
FSS_Helper::StylesAndJS(array('calendar', 'base64'));
if (Task_Helper::HandleTasks($this)) {
return false;
}
return true;
}
示例15: NoPerm
static function NoPerm()
{
if (array_key_exists('REQUEST_URI', $_SERVER)) {
$url = $_SERVER['REQUEST_URI'];
//JURI::current() . "?" . $_SERVER['QUERY_STRING'];
} else {
$option = FSS_Input::getCmd('option', '');
$view = FSS_Input::getCmd('view', '');
$layout = FSS_Input::getCmd('layout', '');
$Itemid = FSS_Input::getInt('Itemid', 0);
$url = FSSRoute::_("index.php?option=" . $option . "&view=" . $view . "&layout=" . $layout . "&Itemid=" . $Itemid);
}
$url = str_replace("&what=find", "", $url);
$url = base64_encode($url);
$return = $url;
require_once JPATH_SITE . DS . 'components' . DS . 'com_fss' . DS . 'views' . DS . 'admin' . DS . 'tmpl' . DS . 'noperm.php';
return false;
}