本文整理汇总了PHP中FSS_Input类的典型用法代码示例。如果您正苦于以下问题:PHP FSS_Input类的具体用法?PHP FSS_Input怎么用?PHP FSS_Input使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了FSS_Input类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: display_edit
function display_edit()
{
$editid = FSS_Input::getInt('sigid');
if ($editid > 0) {
$db = JFactory::getDBO();
$qry = "SELECT * FROM #__fss_ticket_fragments WHERE id = " . FSSJ3Helper::getEscaped($db, $editid);
$db->setQuery($qry);
$this->sig_item = $db->loadObject();
$this->sig_item->params = json_decode($this->sig_item->params, true);
if (is_string($this->sig_item->params)) {
$this->sig_item->params = array();
}
$this->sig_item->personal = 0;
$userid = JFactory::getUser()->id;
if (isset($this->sig_item->params['userid'])) {
if ($this->sig_item->params['userid'] > 0 && $userid != $this->sig_item->params['userid']) {
$mainframe = JFactory::getApplication();
$link = JRoute::_('index.php?option=com_fss&view=admin_support&layout=signature&tmpl=component');
$mainframe->redirect($link);
}
$this->sig_item->personal = 1;
}
} else {
$this->sig_item = new stdClass();
$this->sig_item->id = 0;
$this->sig_item->description = "";
$this->sig_item->content = "";
$this->sig_item->personal = 1;
}
return $this->_display("edit");
}
开发者ID:vstorm83,项目名称:propertease,代码行数:31,代码来源:layout.signature.php
示例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);
}
开发者ID:vstorm83,项目名称:propertease,代码行数:25,代码来源:task.php
示例3: display
function display($tpl = null)
{
$db = JFactory::getDBO();
$test = FSS_Input::getInt('test');
if ($test > 0) {
error_reporting(E_ALL);
ini_set('display_errors', 1);
$qry = "SELECT * FROM #__fss_cron WHERE id = " . FSSJ3Helper::getEscaped($db, $test);
} else {
$qry = "SELECT * FROM #__fss_cron WHERE published = 1 AND ((UNIX_TIMESTAMP() - lastrun) - (`interval` * 60)) > 0";
}
$db->setQuery($qry);
$rows = $db->loadObjectList();
if (!$rows) {
exit;
}
foreach ($rows as $row) {
$db->setQuery("UPDATE #__fss_cron SET lastrun=UNIX_TIMESTAMP() WHERE id='{$row->id}' LIMIT 1");
$db->query();
$class = "FSSCron" . $row->class;
$file = strtolower($row->class) . ".php";
$path = JPATH_SITE . DS . 'components' . DS . 'com_fss' . DS . 'cron' . DS;
if (file_exists($path . $file)) {
require_once $path . $file;
$inst = new $class();
$inst->Execute($this->ParseParams($row->params));
if ($test > 0) {
echo "<pre>" . $inst->_log . "</pre>";
} else {
$inst->SaveLog();
}
}
}
exit;
}
开发者ID:vstorm83,项目名称:propertease,代码行数:35,代码来源:view.html.php
示例4: array
function &getAnnounce()
{
$db = JFactory::getDBO();
$announceid = FSS_Input::getInt('announceid', 0);
$query = "SELECT * FROM #__fss_announce";
$where = array();
$where[] = "id = '" . FSSJ3Helper::getEscaped($db, $announceid) . "'";
if (FSS_Permission::auth("core.edit", "com_fss.announce")) {
} else {
if (FSS_Permission::auth("core.edit.own", "com_fss.announce")) {
$where[] = " ( published = 1 OR author = {$this->content->userid} ) ";
} else {
$where[] = "published = 1";
}
}
$db = JFactory::getDBO();
$where[] = 'language in (' . $db->Quote(JFactory::getLanguage()->getTag()) . ',' . $db->Quote('*') . ')';
$user = JFactory::getUser();
$where[] = 'access IN (' . implode(',', $user->getAuthorisedViewLevels()) . ')';
if (count($where) > 0) {
$query .= " WHERE " . implode(" AND ", $where);
}
$db->setQuery($query);
$rows = $db->loadAssoc();
return $rows;
}
开发者ID:vstorm83,项目名称:propertease,代码行数:26,代码来源:announce.php
示例5: 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();
}
开发者ID:vstorm83,项目名称:propertease,代码行数:29,代码来源:layout.settings.php
示例6:
function &getProduct()
{
$db = JFactory::getDBO();
$prodid = FSS_Input::getInt('prodid');
$query = "SELECT * FROM #__fss_prod WHERE id = '" . FSSJ3Helper::getEscaped($db, $prodid) . "'";
$db->setQuery($query);
$rows = $db->loadAssoc();
return $rows;
}
开发者ID:vstorm83,项目名称:propertease,代码行数:9,代码来源:test.php
示例7: getLimits
function getLimits()
{
$mainframe = JFactory::getApplication();
$limit = $mainframe->getUserStateFromRequest('global.list.limit_ticket', 'limit', SupportUsers::getSetting('per_page'), 'int');
$limitstart = FSS_Input::getInt('limitstart');
$limitstart = $limit != 0 ? floor($limitstart / $limit) * $limit : 0;
$this->limit = $limit;
$this->limitstart = $limitstart;
}
开发者ID:vstorm83,项目名称:propertease,代码行数:9,代码来源:layout.emails.php
示例8: 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);
}
开发者ID:vstorm83,项目名称:propertease,代码行数:57,代码来源:fss_glossary.php
示例9: 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);
}
开发者ID:vstorm83,项目名称:propertease,代码行数:9,代码来源:layout.listhandlers.php
示例10: Save
function Save($id, $params)
{
$params = $this->parseParams($params);
$value = FSS_Input::getString("custom_{$id}");
if ($value == "xxxotherxxx") {
$value = FSS_Input::getString("custom_{$id}_other");
}
return $value;
}
开发者ID:vstorm83,项目名称:propertease,代码行数:9,代码来源:radioplus.php
示例11: HandleRefresh
function HandleRefresh()
{
$this->do_refresh = FSS_Settings::Get('support_admin_refresh');
if (FSS_Input::getInt("refresh") > 0) {
$output = array();
$output['count'] = $this->count;
header("Content-Type: application/json");
echo json_encode($output);
exit;
}
}
开发者ID:vstorm83,项目名称:propertease,代码行数:11,代码来源:layout.ticket.php
示例12: preview
function preview()
{
$this->ticketid = FSS_Input::getInt('ticketid');
$this->sigid = FSS_Input::getInt('sigid');
$ticket = new SupportTicket();
$ticket->load($this->ticketid);
$ticket->loadAll();
$this->ticket = $ticket;
$this->signature = SupportCanned::AppendSig($this->sigid, $this->ticket);
include $this->view->snippet(JPATH_SITE . DS . 'components' . DS . 'com_fss' . DS . 'views' . DS . 'admin_support' . DS . 'snippet' . DS . '_signature_preview.php');
return true;
}
开发者ID:vstorm83,项目名称:propertease,代码行数:12,代码来源:task.signature.php
示例13: Save
function Save($id, $params)
{
$params = $this->parseParams($params);
$value = FSS_Input::getInt("custom_{$id}");
if ($value < $params->min) {
$value = $params->min;
}
if ($value > $params->max) {
$value = $params->max;
}
return $value;
}
开发者ID:vstorm83,项目名称:propertease,代码行数:12,代码来源:int.php
示例14: Save
function Save($id, $params)
{
$checked = array();
$posted = FSS_Input::getInt("custom_{$id}_count");
if ($posted) {
for ($i = 1; $i <= $posted; $i++) {
$val = FSS_Input::getString("custom_{$id}_{$i}");
if ($val) {
$checked[] = $val;
}
}
}
return json_encode($checked);
}
开发者ID:vstorm83,项目名称:propertease,代码行数:14,代码来源:checkboxes.php
示例15: 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();
}
}
}
开发者ID:vstorm83,项目名称:propertease,代码行数:50,代码来源:task.batch.php
示例16: in
function in()
{
$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 = 0;
SupportUsers::updateUserSettings($values, $user_id);
JFactory::getApplication()->redirect(FSSRoute::_("index.php?option=com_fss&view=admin_support&layout=listhandlers", false));
}
开发者ID:vstorm83,项目名称:propertease,代码行数:14,代码来源:task.outofoffice.php
示例17: search
/**
* Updates the category for a ticket
*/
function search()
{
$q = FSS_Input::getString('q');
$db = JFactory::getDBO();
$qry = "SELECT username, name FROM #__users WHERE username LIKE '%" . $db->escape($q) . "%' OR name LIKE '%" . $db->escape($q) . "%' ORDER BY username LIMIT 10";
$db->setQuery($qry);
$users = $db->loadObjectList();
$output = array();
foreach ($users as $user) {
$output[$user->username] = $user->name;
}
header("Content-Type: application/json");
echo json_encode($output);
exit;
}
开发者ID:vstorm83,项目名称:propertease,代码行数:18,代码来源:task.users.php
示例18: 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();
}
开发者ID:vstorm83,项目名称:propertease,代码行数:15,代码来源:layout.multiprint.php
示例19: delete
function delete()
{
if (!$this->view->can_EditTicket()) {
return;
}
// load in tickets to do
$ticketid = FSS_Input::getInt('ticketid');
$fileid = FSS_Input::getInt('fileid');
$ticket = new SupportTicket();
if ($ticket->load($ticketid)) {
$ticket->deleteAttach($fileid);
}
JFactory::getApplication()->redirect(FSSRoute::_('index.php?option=com_fss&view=admin_support&layout=ticket&ticketid=' . $ticketid, false));
exit;
}
开发者ID:vstorm83,项目名称:propertease,代码行数:15,代码来源:task.attach.php
示例20: display
function display($tpl = NULL)
{
$this->current_userid = JFactory::getUser()->id;
$this->userid = FSS_Input::getInt('user_id', $this->current_userid);
if (!FSS_Permission::auth("fss.ticket_admin.ooo", "com_fss.support_admin", JFactory::getUser()->id)) {
$this->userid = $this->current_userid;
}
$this->user = JFactory::getUser($this->userid);
$this->loadTicketList();
$values = SupportUsers::getAllSettings($this->userid);
if ($values->out_of_office) {
return $this->showUserOut();
} else {
return $this->showUserIn();
}
//
}
开发者ID:vstorm83,项目名称:propertease,代码行数:17,代码来源:layout.outofoffice.php
注:本文中的FSS_Input类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论