本文整理汇总了PHP中FSS_Input::getHTML方法的典型用法代码示例。如果您正苦于以下问题:PHP FSS_Input::getHTML方法的具体用法?PHP FSS_Input::getHTML怎么用?PHP FSS_Input::getHTML使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FSS_Input
的用法示例。
在下文中一共展示了FSS_Input::getHTML方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: 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()
{
$db = JFactory::getDBO();
$this->item = array();
$this->item['id'] = FSS_Input::getInt('id', 0);
$user = JFactory::getUser();
$userid = $user->get('id');
$this->errors = array();
$ok = true;
foreach ($this->edit as $edit) {
$field = $this->GetField($edit);
$this->item[$field->field] = FSS_Input::getString($field->input_name, '');
if ($field->type == "text") {
$this->item[$field->field] = FSS_Input::getHTML($field->input_name, '');
}
if ($field->more) {
if (strpos($this->item[$field->field], "system-readmore") > 0) {
$pos = strpos($this->item[$field->field], "system-readmore");
$top = substr($this->item[$field->field], 0, $pos);
$top = substr($top, 0, strrpos($top, "<"));
$bottom = substr($this->item[$field->field], $pos);
$bottom = substr($bottom, strpos($bottom, ">") + 1);
$this->item[$field->field] = $top;
$this->item[$field->more] = $bottom;
} else {
$this->item[$field->more] = '';
}
}
if ($field->required) {
if ($this->item[$field->field] == "") {
$ok = false;
$this->errors[$field->field] = $field->required;
}
}
}
$now = FSS_Helper::CurDate();
// if errors
if ($ok) {
if ($this->item['id']) {
$qry = "UPDATE " . $this->table . " SET ";
$sets = array();
foreach ($this->edit as $edit) {
$field = $this->GetField($edit);
if ($field->type != "related" && $field->type != "tags") {
$sets[] = $field->field . " = '" . FSSJ3Helper::getEscaped($db, $this->item[$field->field]) . "'";
}
if ($field->more) {
$sets[] = "`" . $field->more . "` = '" . FSSJ3Helper::getEscaped($db, $this->item[$field->more]) . "'";
}
}
if (FSS_Permission::auth("core.edit.state", $this->getAsset())) {
$sets[] = "published = " . FSS_Input::getInt('published', 0);
if ($this->has_author) {
$sets[] = "author = " . FSS_Input::getInt('author', 0);
}
}
if ($this->has_modified) {
$sets[] = "modified = '{$now}'";
}
$qry .= implode(", ", $sets);
$qry .= " WHERE id = '" . FSSJ3Helper::getEscaped($db, $this->item['id']) . "'";
} else {
$fieldlist = array();
if ($this->has_author) {
$fieldlist[] = "author";
}
if ($this->has_added) {
$fieldlist[] = "added";
}
$setlist = array();
foreach ($this->edit as $edit) {
$field = $this->GetField($edit);
if ($field->type == "related" || $field->type == "tags") {
continue;
}
$fieldlist[] = $field->field;
$setlist[] = "'" . FSSJ3Helper::getEscaped($db, $this->item[$field->field]) . "'";
if ($field->more) {
$fieldlist[] = "`" . $field->more . "`";
$setlist[] = "'" . FSSJ3Helper::getEscaped($db, $this->item[$field->more]) . "'";
}
}
if ($this->has_modified) {
$fieldlist[] = "modified";
$setlist[] = "'{$now}'";
$fieldlist[] = "created";
$setlist[] = "'{$now}'";
}
$fieldlist[] = "published";
if (FSS_Permission::auth("core.edit.state", $this->getAsset())) {
$setlist[] = FSS_Input::getInt('published', 0);
} else {
$setlist[] = "0";
}
if ($this->has_ordering) {
// need to get ordering value
$order = $this->GetOrderValue();
if ($order < 1) {
$order = 1;
}
//.........这里部分代码省略.........
示例4: display
function display($tpl = NULL)
{
FSS_Helper::AddSCEditor();
$editid = FSS_Input::getInt('cannedid', -2);
if ($editid != -2) {
if ($editid > 0) {
$db = JFactory::getDBO();
$qry = "SELECT * FROM #__fss_ticket_fragments WHERE id = " . FSSJ3Helper::getEscaped($db, $editid);
$db->setQuery($qry);
$this->canned_item = $db->loadObject();
} else {
$this->canned_item = new stdClass();
$this->canned_item->id = 0;
$this->canned_item->description = "";
$this->canned_item->grouping = "";
$this->canned_item->content = "";
}
return $this->_display("edit");
}
// if we are saving, then save
$saveid = FSS_Input::getInt('saveid', -2);
if ($saveid != -2) {
$description = FSS_Input::getString('description');
$grouping = FSS_Input::getString('grouping');
$content = FSS_Input::getHTML('content');
if ($saveid == 0) {
$qry = "INSERT INTO #__fss_ticket_fragments (description, grouping, content, type) VALUES (";
$qry .= "'" . FSSJ3Helper::getEscaped($db, $description) . "',";
$qry .= "'" . FSSJ3Helper::getEscaped($db, $grouping) . "',";
$qry .= "'" . FSSJ3Helper::getEscaped($db, $content) . "', 0)";
$db = JFactory::getDBO();
$db->setQuery($qry);
$db->Query();
} else {
$qry = "UPDATE #__fss_ticket_fragments SET description = '" . FSSJ3Helper::getEscaped($db, $description) . "', ";
$qry .= "grouping = '" . FSSJ3Helper::getEscaped($db, $grouping) . "', ";
$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=canned&tmpl=component', false);
$mainframe->redirect($link);
}
// if we are editing then show edit
// otherwise show list
$deleteid = FSS_Input::getInt('deleteid');
if ($deleteid > 0) {
$qry = "DELETE FROM #__fss_ticket_fragments WHERE id = " . FSSJ3Helper::getEscaped($db, $deleteid);
$db = JFactory::getDBO();
$db->setQuery($qry);
$db->Query();
}
$search = FSS_Input::getString('search');
if ($search) {
$db = JFactory::getDBO();
$qry = "SELECT * FROM #__fss_ticket_fragments WHERE type = 0 AND (description LIKE '%" . $db->escape($search) . "%' OR content LIKE '%" . $db->escape($search) . "%')";
$db->setQuery($qry);
$this->canned = $db->loadObjectList();
} else {
$this->canned = SupportCanned::GetCannedReplies();
}
$this->_display("list");
}
示例5: enablePreview
function enablePreview()
{
$session = JFactory::getSession();
$session->Set('preview', 1);
$this->layoutpreview = 1;
echo "<div class='fss_layout_preview'><a href='" . FSSRoute::_('&preview=-1', false) . "'>List Preview - Click to close</a></div>";
// FIX LINK
$list_template = FSS_Input::getString('list_template');
$list_head = FSS_Input::getHTML('list_head');
$list_row = FSS_Input::getHTML('list_row');
$db = JFactory::getDBO();
if ($list_template) {
if ($list_template == "custom") {
$qry = "REPLACE INTO #__fss_templates (template, tpltype, value) VALUES ('preview',0,'" . FSSJ3Helper::getEscaped($db, $list_row) . "')";
$db->setQuery($qry);
$db->Query();
$qry = "REPLACE INTO #__fss_templates (template, tpltype, value) VALUES ('preview',1,'" . FSSJ3Helper::getEscaped($db, $list_head) . "')";
$db->setQuery($qry);
$db->Query();
} else {
$qry = "SELECT tpltype, value FROM #__fss_templates WHERE template = '" . FSSJ3Helper::getEscaped($db, $list_template) . "'";
$db->setQuery($qry);
$rows = $db->loadAssocList();
foreach ($rows as $row) {
$qry = "REPLACE INTO #__fss_templates (template, tpltype, value) VALUES ('preview'," . FSSJ3Helper::getEscaped($db, $row['tpltype']) . ",'" . FSSJ3Helper::getEscaped($db, $row['value']) . "')";
$db->setQuery($qry);
$db->Query();
}
}
}
}
示例6: SaveSettings
function SaveSettings()
{
return FSS_Input::getHTML('plugin_html_output');
}