本文整理汇总了PHP中FSS_Input::getString方法的典型用法代码示例。如果您正苦于以下问题:PHP FSS_Input::getString方法的具体用法?PHP FSS_Input::getString怎么用?PHP FSS_Input::getString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FSS_Input
的用法示例。
在下文中一共展示了FSS_Input::getString方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: 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();
}
示例2: save
function save()
{
// if we are saving, then save
$saveid = FSS_Input::getInt('saveid', -1);
if ($saveid != -1) {
$description = FSS_Input::getString('description');
$is_personal = FSS_Input::getInt('personal');
$content = FSS_Input::getHTML('content');
$params = array();
if ($is_personal) {
$params['userid'] = JFactory::getUser()->id;
}
$params = json_encode($params);
if ($saveid == 0) {
$qry = "INSERT INTO #__fss_ticket_fragments (description, params, content, type) VALUES (";
$qry .= "'" . FSSJ3Helper::getEscaped($db, $description) . "',";
$qry .= "'" . FSSJ3Helper::getEscaped($db, $params) . "',";
$qry .= "'" . FSSJ3Helper::getEscaped($db, $content) . "', 1)";
$db = JFactory::getDBO();
$db->setQuery($qry);
$db->Query();
} else {
$qry = "UPDATE #__fss_ticket_fragments SET description = '" . FSSJ3Helper::getEscaped($db, $description) . "', ";
$qry .= "params = '" . FSSJ3Helper::getEscaped($db, $params) . "', ";
$qry .= "content = '" . FSSJ3Helper::getEscaped($db, $content) . "' WHERE id = " . FSSJ3Helper::getEscaped($db, $saveid);
$db = JFactory::getDBO();
$db->setQuery($qry);
$db->Query();
}
}
$mainframe = JFactory::getApplication();
$link = JRoute::_('index.php?option=com_fss&view=admin_support&layout=signature&tmpl=component', false);
$mainframe->redirect($link);
}
示例3: 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;
}
示例4: 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);
}
示例5: 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();
}
}
}
示例6: 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;
}
示例7: 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();
}
示例8: removecc
function removecc()
{
$this->loadTicket();
if ($this->ticket) {
$ids = FSS_Input::getString('ids');
$is_admin = FSS_Input::getInt('is_admin');
$ids = explode(",", $ids);
$this->ticket->removeCC($ids, $is_admin);
}
if (FSS_Input::getInt('nr') != 1) {
$link = FSSRoute::_("index.php?option=com_fss&view=admin_support&layout=ticket&ticketid=" . $this->ticket->id, false);
JFactory::getApplication()->redirect($link);
} else {
exit;
}
}
示例9: display
function display($tpl = null)
{
if (FSS_Settings::Get('support_only_admin_open')) {
return $this->noPermission("Access Denied", "CREATING_NEW_TICKETS_BY_USERS_IS_CURRENTLY_DISABLED");
}
if (!FSS_Permission::auth("fss.ticket.open", "com_fss.support_user")) {
return FSS_Helper::NoPerm();
}
$mainframe = JFactory::getApplication();
$user = JFactory::getUser();
$userid = $user->get('id');
$this->assign('userid', $userid);
$this->assign('email', '');
// defaults for blank ticket
$this->ticket = new stdClass();
$this->ticket->prodid = FSS_Input::getInt('prodid');
$this->ticket->deptid = FSS_Input::getInt('deptid');
$this->ticket->catid = FSS_Input::getInt('catid');
$this->ticket->priid = FSS_Input::getInt('priid');
$this->ticket->subject = FSS_Input::getString('subject');
$this->ticket->body = FSS_Input::getBBCode('body');
$this->errors['subject'] = '';
$this->errors['body'] = '';
$this->errors['cat'] = '';
$what = FSS_Input::getCmd('what');
// done with ticket, try and save, if not, display any errors
if ($what == "add") {
if ($this->saveTicket()) {
echo "Saved OK!";
exit;
$link = 'index.php?option=com_fss&view=ticket&layout=view&Itemid=' . FSS_Input::getInt('Itemid') . '&ticketid=' . $this->ticketid;
$mainframe->redirect($link);
return;
}
}
$this->product = $this->get('Product');
$this->dept = $this->get('Department');
$this->cats = SupportHelper::getCategories();
$this->pris = SupportHelper::getPriorities();
$this->support_user_attach = FSS_Settings::get('support_user_attach');
$this->fields = FSSCF::GetCustomFields(0, $prodid, $deptid);
parent::display();
}
示例10:
echo JText::_('VIEW');
?>
</a>
<?php
}
?>
</p>
<div class="clearfix"></div>
<div id="system">
<form id="fss_form" action="<?php
echo FSSRoute::_('index.php?option=com_fss&view=admin_content&type=' . $this->id);
?>
" method='post' class='form-horizontal form-condensed'>
<input type="hidden" name="return" value="<?php
echo FSS_Input::getString("return", "");
?>
" />
<input type="hidden" name="id" value="<?php
echo $this->item['id'];
?>
" />
<input type="hidden" name="what" value="" />
<?php
if (FSS_Permission::auth("core.edit.state", $this->getAsset())) {
?>
<div class="control-group">
<label class="control-label"><?php
echo JText::_('PUBLISHED');
?>
示例11: searchFields
private function searchFields(&$wherebits)
{
// search custom fields that are set to be searched
$fields = FSSCF::GetAllCustomFields(true);
foreach ($fields as $field) {
if (!$field['basicsearch']) {
continue;
}
if (!$field['peruser']) {
continue;
}
$fieldid = $field['id'];
$search = FSS_Input::getString('search');
if ($field['type'] == "checkbox") {
if ($search == "1") {
$search = "on";
} else {
$search = "";
}
}
if ($field['type'] == "plugin") {
// try to do a plugin based search
$data = array();
foreach ($field['values'] as $item) {
list($key, $value) = explode("=", $item, 2);
$data[$key] = $value;
}
if (array_key_exists("plugin", $data)) {
$plugins = FSSCF::get_plugins();
if (array_key_exists($data['plugin'], $plugins)) {
$po = $plugins[$data['plugin']];
if (method_exists($po, "Search")) {
$res = $po->Search($data['plugindata'], $search, true);
if ($res !== false) {
$wherebits[] = $this->IDsToWhere($res, "id", "user_id") . " /* Per User Plugin - " . $field['id'] . " */";
continue;
}
}
}
}
}
$qry = "SELECT user_id FROM #__fss_ticket_user_field WHERE field_id = '" . FSSJ3Helper::getEscaped($db, $fieldid) . "' AND value LIKE '%" . FSSJ3Helper::getEscaped($db, $search) . "%'";
$db->setQuery($qry);
$res = $db->loadObjectList();
$wherebits[] = $this->IDsToWhere($res, "id", "user_id") . " /* Per User CF - " . $field['id'] . " */";
}
}
示例12: 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 = "";
}
//.........这里部分代码省略.........
示例13: LoadData
function LoadData()
{
if (!$this->xml) {
return;
}
$qry = (string) $this->xml->sql;
$where = array();
if ($this->xml->where) {
foreach ($this->xml->where as $w) {
$where[] = (string) $w;
}
}
if ($this->xml->addbtntext) {
$this->addbtntext = (string) $this->xml->addbtntext;
}
if ($this->xml->use_auth) {
// sort out which articles the user can view here, based on published, access, author
// sort published out here
$published = (string) $this->xml->use_auth->attributes()->published;
$access = (string) $this->xml->use_auth->attributes()->access;
$author = (string) $this->xml->use_auth->attributes()->author;
$where[] = "{$published} = 1";
}
$this->search = FSS_Input::getString('search');
if ($this->search != "") {
foreach ($this->xml->filters->search->field as $field) {
$field = (string) $field;
$where[] = "{$field} LIKE '%" . FSSJ3Helper::getEscaped($db, $this->search) . "%'";
}
}
foreach ($this->xml->filters->filter as $filter) {
$type = (string) $filter->attributes()->type;
$field = (string) $filter->attributes()->field;
$filter_id = (string) $filter->attributes()->id;
if ($type == "lookup") {
$key = (string) $filter->key;
$display = (string) $filter->display;
$var = "filter_" . $filter_id;
$value = trim(FSS_Input::getString($var));
$this->{$var} = FSS_Input::getString($var);
if ($value != "") {
$where[] = "{$field} = '" . FSSJ3Helper::getEscaped($db, $value) . "'";
}
}
}
if (count($where) > 0) {
$qry .= " WHERE " . implode(" AND ", $where);
}
$this->order = FSS_Input::getCmd('filter_order');
$this->orderdir = FSS_Input::getCmd('filter_order_Dir', 'ASC');
if ($this->order == "" && $this->xml->ordering) {
$this->order = (string) $this->xml->ordering;
}
if ($this->order) {
$qry .= " ORDER\tBY {$this->order} {$this->orderdir} ";
}
$db = JFactory::getDBO();
$db->setQuery($qry);
//echo "Qry : $qry<br>";
$db->query();
$this->num_rows = $db->getNumRows();
$mainframe = JFactory::getApplication();
$this->limit = $mainframe->getUserStateFromRequest('global.list.limitpick', 'limit', 10, 'int');
$this->limitstart = FSS_Input::getInt('limitstart');
$this->limitstart = $this->limit != 0 ? floor($this->limitstart / $this->limit) * $this->limit : 0;
$this->pagination = new JPaginationEx($this->num_rows, $this->limitstart, $this->limit);
$db->setQuery($qry, $this->limitstart, $this->limit);
$this->data = $db->loadObjectList();
//echo $qry."<br>";
//print_p($this->data);
}
示例14: showWord
function showWord()
{
$db = JFactory::getDBO();
$word_id = FSS_Input::getString('word');
if (is_numeric($word_id)) {
$qry = "SELECT * FROM #__fss_glossary WHERE id = '" . $db->escape($word_id) . "'";
} else {
$word = FSS_Input::getString('word');
$word = urldecode($word);
$qry = "SELECT * FROM #__fss_glossary WHERE word = '" . $word . "'";
}
$db->setQuery($qry);
$this->glossary = $db->loadObject();
if (FSS_Input::getCmd('tmpl') == 'component') {
parent::display('modal');
} else {
parent::display();
}
}
示例15:
<div class="controls">
<input type="text" name="admin_create_email" class="inputbox" value="<?php
echo FSS_Helper::escape(FSS_Input::getString('admin_create_email'));
?>
">
</div>
</div>
<div class="control-group">
<label class="control-label"><?php
echo JText::_("NAME");
?>
</label>
<div class="controls">
<input type="text" name="admin_create_name" class="inputbox" value="<?php
echo FSS_Helper::escape(FSS_Input::getString('admin_create_name'));
?>
">
</div>
</div>
<div class="control-group">
<label class="control-label"></label>
<div class="controls">
<input class='btn btn-primary' type="submit" id="new_ticket" value="<?php
echo JText::_("OPEN_TICKET_FOR_USER");
?>
">
<a class='btn btn-default' href="<?php
echo FSSRoute::_('index.php?option=com_fss&view=admin_support');
?>