本文整理汇总了PHP中FSS_Input::GetString方法的典型用法代码示例。如果您正苦于以下问题:PHP FSS_Input::GetString方法的具体用法?PHP FSS_Input::GetString怎么用?PHP FSS_Input::GetString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FSS_Input
的用法示例。
在下文中一共展示了FSS_Input::GetString方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1:
<?php
/**
* @package Freestyle Joomla
* @author Freestyle Joomla
* @copyright (C) 2013 Freestyle Joomla
* @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
**/
$template = FSS_Input::GetString("print");
$custom_print = Support_Print::loadPrint($template);
defined('_JEXEC') or die;
if (!$custom_print || (int) $custom_print->noheader != 1) {
?>
<?php
echo FSS_Helper::PageStyle();
?>
<?php
echo FSS_Helper::PageSubTitle("TICKET_DETAILS");
}
?>
<?php
$this->print = true;
?>
<?php
if ($custom_print) {
?>
<?php
// need to convert the ticket to a SupportTicket class for the print
示例2: saveTicket
function saveTicket()
{
$subject = FSS_Input::getString('subject');
$body = FSS_Input::getBBCode('body');
$prodid = FSS_Input::getInt('prodid');
$deptid = FSS_Input::getInt('deptid');
$catid = FSS_Input::getInt('catid');
$priid = FSS_Input::getInt('priid');
$handler = FSS_Input::getInt('handler');
$user = JFactory::getUser();
$userid = $user->get('id');
$name = "";
$session = JFactory::getSession();
$this->admin_create = 0;
if ($session->Get('admin_create')) {
$this->admin_create = $session->Get('admin_create');
}
if ($this->admin_create == 1) {
$this->admin_create = 1;
$userid = $session->Get('admin_create_user_id');
} else {
if ($this->admin_create == 2) {
$userid = 0;
}
}
$db = JFactory::getDBO();
if ($priid < 1) {
$priid = FSS_Settings::get('support_default_priority');
}
$ticket['subject'] = $subject;
$ticket['body'] = $body;
$ticket['priid'] = $priid;
$ticket['handler'] = $handler;
$ok = true;
$errors['subject'] = '';
$errors['body'] = '';
$errors['cat'] = '';
$errors['captcha'] = '';
$fields = FSSCF::GetCustomFields(0, $prodid, $deptid);
if (FSS_Settings::get('support_subject_message_hide') == "subject") {
$ticket['subject'] = substr(strip_tags($ticket['body']), 0, 40);
$subject = $ticket['subject'];
}
if (FSS_Settings::get('support_altcat')) {
$cats = $this->get('Cats');
if (count($cats) > 0 && FSS_Input::getInt('catid') < 1) {
$errors['cat'] = JText::_("YOU_MUST_SELECT_A_CATEGORY");
$ok = false;
}
}
if ($body == "" && FSS_Settings::get('support_subject_message_hide') != "message" && FSS_Settings::get('support_subject_message_hide') != "both") {
$errors['body'] = JText::_("YOU_MUST_ENTER_A_MESSAGE_FOR_YOUR_SUPPORT_TICKET");
$ok = false;
}
if (!FSSCF::ValidateFields($fields, $errors)) {
$ok = false;
}
$email = "";
$password = "";
$now = FSS_Helper::CurDate();
$this->sortCaptchaType();
$captcha = new FSS_Captcha();
if (!$captcha->ValidateCaptcha('support_captcha_type')) {
$errors['captcha'] = JText::_("INVALID_SECURITY_CODE");
$ok = false;
}
if ($userid < 1) {
$email = FSSJ3Helper::getEscaped($db, $session->Get('ticket_email'));
if ($session->Get('ticket_name')) {
$name = FSSJ3Helper::getEscaped($db, $session->Get('ticket_name'));
}
if ($email == "" && $this->admin_create != 2) {
$ok = false;
} else {
$password = FSS_Helper::createRandomPassword();
$session->Set('ticket_pass', $password);
}
}
// assign handler to ticket
$admin_id = $handler;
if (!$admin_id) {
$admin_id = FSS_Ticket_Helper::AssignHandler($prodid, $deptid, $catid);
}
$now = FSS_Helper::CurDate();
$def_open = FSS_Ticket_Helper::GetStatusID('def_open');
if (FSS_Settings::get('support_subject_format') != "") {
$parser = new FSSParser();
foreach ($_POST as $var => $value) {
$parser->setVar($var, FSS_Input::GetString($var));
}
foreach ($fields as $field) {
$parser->setVar('custom_' . $field['alias'], FSS_Input::GetString('custom_' . $field['id']));
}
$user = JFactory::getUser($userid);
$parser->setVar('userid', $userid);
$parser->setVar('username', $user->username);
$parser->setVar('name', $user->name);
$parser->setVar('email', $user->email);
$parser->setVar('subject', $subject);
$parser->SetVar('product', FSS_EMail::GetProduct($prodid));
//.........这里部分代码省略.........
示例3: comment
function comment()
{
if (!$this->view->can_EditTicket()) {
exit;
}
$messageid = FSS_Input::getInt('messageid');
$_subject = FSS_Input::getString('subject', '-');
$_body = FSS_Input::getBBCode('body', '-');
$body = urldecode($_body);
$subject = urldecode($_subject);
$db = JFactory::getDBO();
$qry = "SELECT * FROM #__fss_ticket_messages WHERE id = " . FSSJ3Helper::getEscaped($db, $messageid);
$db->setQuery($qry);
$row = $db->LoadAssoc();
$ticket = new SupportTicket();
if ($ticket->load($row['ticket_ticket_id'])) {
if (JRequest::getVar('noaudit') == 1 && FSS_Settings::get('allow_edit_no_audit')) {
$ticket->audit_changes = false;
}
if ($subject == '-') {
$subject = $row['subject'];
}
if ($body == '-') {
$body = $row['body'];
}
if (FSS_Input::GetString('datefrom')) {
$timestart = strtotime(FSS_Input::getString('datefrom'));
$timeend = strtotime(FSS_Input::getString('dateto'));
$time = (int) (($timeend - $timestart) / 60);
// procecss and update new time
$ticket->updateMessage($messageid, $subject, $body, $time, $timestart, $timeend);
echo "{reload}";
} elseif (FSS_Input::GetString('timefrom')) {
$timestart = strtotime("1970-01-01 " . FSS_Input::getString('timefrom'));
$timeend = strtotime("1970-01-01 " . FSS_Input::getString('timeto'));
$time = (int) (($timeend - $timestart) / 60);
// procecss and update new time
$ticket->updateMessage($messageid, $subject, $body, $time, $timestart, $timeend);
echo "{reload}";
} elseif (JRequest::getVar('timehours', '-') != '-') {
$time = (int) (FSS_Input::getInt('timehours') * 60 + FSS_Input::getInt('timemins'));
$ticket->updateMessage($messageid, $subject, $body, $time);
echo "{reload}";
} else {
$ticket->updateMessage($messageid, $subject, $body);
echo "<h1>" . $_subject . "</h1>";
echo $_body;
}
}
exit;
}