本文整理汇总了PHP中mslib_fe::RemoveXSS方法的典型用法代码示例。如果您正苦于以下问题:PHP mslib_fe::RemoveXSS方法的具体用法?PHP mslib_fe::RemoveXSS怎么用?PHP mslib_fe::RemoveXSS使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类mslib_fe
的用法示例。
在下文中一共展示了mslib_fe::RemoveXSS方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: renderInterface
function renderInterface($params, &$that)
{
mslib_fe::init($that);
//hook to let other plugins further manipulate the method
if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/multishop/pi1/class.tx_mslib_admin_interface.php']['renderInterfacePreProc'])) {
foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/multishop/pi1/class.tx_mslib_admin_interface.php']['renderInterfacePreProc'] as $funcRef) {
\TYPO3\CMS\Core\Utility\GeneralUtility::callUserFunction($funcRef, $params, $this);
}
}
// for pagination
$this->get = $that->get;
$this->post = $that->post;
if ($this->post) {
if ($params['postErno']) {
if (count($params['postErno'])) {
$returnMarkup = '
<div style="display:none" id="msAdminPostMessage">
<table class="table table-striped table-bordered">
<thead>
<tr>
<th class="text-center">Status</th>
<th>Message</th>
</tr>
</thead>
<tbody>
';
foreach ($params['postErno'] as $item) {
switch ($item['status']) {
case 'error':
$item['status'] = '<span class="fa-stack text-danger"><i class="fa fa-circle fa-stack-2x"></i><i class="fa fa-thumbs-down fa-stack-1x fa-inverse"></i></span>';
break;
case 'info':
$item['status'] = '<span class="fa-stack"><i class="fa fa-circle fa-stack-2x"></i><i class="fa fa-thumbs-up fa-stack-1x fa-inverse"></i></span>';
break;
}
$returnMarkup .= '<tr><td class="text-center">' . $item['status'] . '</td><td>' . $item['message'] . '</td></tr>' . "\n";
}
$returnMarkup .= '</tbody></table></div>';
$tableContent .= $returnMarkup;
$GLOBALS['TSFE']->additionalHeaderData[] = '<script type="text/javascript" data-ignore="1">
jQuery(document).ready(function ($) {
$.confirm({
title: \'\',
content: $(\'#msAdminPostMessage\').html()
});
});
</script>
';
}
}
}
$updateCookie = 0;
if ($that->get['Search'] and $that->get['limit'] != $that->cookie['limit']) {
$that->cookie['limit'] = $that->get['limit'];
$updateCookie = 1;
}
if ($that->get['Search'] and $that->get['display_all_records'] != $that->cookie['display_all_records']) {
$that->cookie['display_all_records'] = $that->get['display_all_records'];
$updateCookie = 1;
}
if ($updateCookie) {
$GLOBALS['TSFE']->fe_user->setKey('ses', 'tx_multishop_cookie', $that->cookie);
$GLOBALS['TSFE']->storeSessionData();
}
if ($that->cookie['display_all_records']) {
$that->get['display_all_records'] = $that->cookie['display_all_records'];
} else {
$that->get['display_all_records'] = '';
}
if ($that->cookie['limit']) {
$that->get['limit'] = $that->cookie['limit'];
} else {
$that->get['limit'] = 50;
}
$that->ms['MODULES']['PAGESET_LIMIT'] = $that->get['limit'];
if ($params['settings']['limit'] && is_numeric($params['settings']['limit'])) {
$that->ms['MODULES']['PAGESET_LIMIT'] = $params['settings']['limit'];
}
if (is_numeric($that->get['p'])) {
$p = $that->get['p'];
}
$that->searchKeywords = array();
if ($that->get['tx_multishop_pi1']['keyword']) {
// using $_REQUEST cause TYPO3 converts "Command & Conquer" to "Conquer" (the & sign sucks ass)
$that->get['tx_multishop_pi1']['keyword'] = trim($that->get['tx_multishop_pi1']['keyword']);
$that->get['tx_multishop_pi1']['keyword'] = $GLOBALS['TSFE']->csConvObj->utf8_encode($that->get['tx_multishop_pi1']['keyword'], $GLOBALS['TSFE']->metaCharset);
$that->get['tx_multishop_pi1']['keyword'] = $GLOBALS['TSFE']->csConvObj->entities_to_utf8($that->get['tx_multishop_pi1']['keyword'], true);
$that->get['tx_multishop_pi1']['keyword'] = mslib_fe::RemoveXSS($that->get['tx_multishop_pi1']['keyword']);
$that->searchKeywords[] = $that->get['tx_multishop_pi1']['keyword'];
$that->searchMode = '%keyword%';
}
$limit_search_result_selectbox = '<select name="limit" class="form-control">';
$limits = array();
$limits[] = '10';
$limits[] = '15';
$limits[] = '20';
$limits[] = '25';
$limits[] = '30';
$limits[] = '40';
$limits[] = '50';
//.........这里部分代码省略.........
示例2: array
if ($this->ms['MODULES']['CACHE_FRONT_END'] and !$this->ms['MODULES']['CACHE_TIME_OUT_SEARCH_PAGES']) {
$this->ms['MODULES']['CACHE_FRONT_END'] = 0;
}
if ($this->ms['MODULES']['CACHE_FRONT_END']) {
$options = array('caching' => true, 'cacheDir' => $this->DOCUMENT_ROOT . 'uploads/tx_multishop/tmp/cache/', 'lifeTime' => $this->ms['MODULES']['CACHE_TIME_OUT_SEARCH_PAGES']);
$Cache_Lite = new Cache_Lite($options);
$string = md5('admin_search_' . $this->showCatalogFromPage . '_' . $this->get['ms_admin_skeyword'] . '_' . $this->get['page']);
}
if (!$this->ms['MODULES']['CACHE_FRONT_END'] or $this->ms['MODULES']['CACHE_FRONT_END'] and !($content = $Cache_Lite->get($string))) {
$data = array();
if ($this->get['ms_admin_skeyword']) {
$this->get['q'] = $this->get['ms_admin_skeyword'];
$this->get['q'] = trim($this->get['q']);
$this->get['q'] = $GLOBALS['TSFE']->csConvObj->utf8_encode($this->get['q'], $GLOBALS['TSFE']->metaCharset);
$this->get['q'] = $GLOBALS['TSFE']->csConvObj->entities_to_utf8($this->get['q'], true);
$this->get['q'] = mslib_fe::RemoveXSS($this->get['q']);
}
/**
* Perform a simple text replace
* This should be used when the string does not contain HTML
* (off by default)
*/
define('STR_HIGHLIGHT_SIMPLE', 1);
/**
* Only match whole words in the string
* (off by default)
*/
define('STR_HIGHLIGHT_WHOLEWD', 2);
/**
* Case sensitive matching
* (on by default)
示例3: trim
}
// custom page hook that can be controlled by third-party plugin eof
$query = $GLOBALS['TYPO3_DB']->INSERTquery('fe_groups', $insertArray);
$res = $GLOBALS['TYPO3_DB']->sql_query($query);
}
}
$this->cObj->data['header'] = $this->pi_getLL('groups');
$this->hideHeader = 1;
$this->ms['MODULES']['ADMIN_CUSTOMERS_LISTING_LIMIT'] = 25;
if ($_REQUEST['skeyword']) {
// using $_REQUEST cause TYPO3 converts "Command & Conquer" to "Conquer" (the & sign sucks ass)
$this->get['skeyword'] = $_REQUEST['skeyword'];
$this->get['skeyword'] = trim($this->get['skeyword']);
$this->get['skeyword'] = $GLOBALS['TSFE']->csConvObj->utf8_encode($this->get['skeyword'], $GLOBALS['TSFE']->metaCharset);
$this->get['skeyword'] = $GLOBALS['TSFE']->csConvObj->entities_to_utf8($this->get['skeyword'], true);
$this->get['skeyword'] = mslib_fe::RemoveXSS($this->get['skeyword']);
}
if (is_numeric($this->get['p'])) {
$p = $this->get['p'];
}
if ($p > 0) {
$offset = $p * $this->ms['MODULES']['ADMIN_CUSTOMERS_LISTING_LIMIT'];
} else {
$p = 0;
$offset = 0;
}
$user = $GLOBALS['TSFE']->fe_user->user;
$content = '<div class="panel panel-default">
<div class="panel-heading"><h3>' . $this->pi_getLL('add_new_group') . '</h3></div>
<div class="panel-body">
<form id="form1" class="form-horizontal" name="form1" method="post" action="' . mslib_fe::typolink($this->shop_pid . ',2003', 'tx_multishop_pi1[page_section]=admin_customer_groups') . '">
示例4: array
}
}
}
}
exit;
break;
case 'product':
if ($this->ADMIN_USER) {
// custom page hook that can be controlled by third-party plugin
if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/multishop/scripts/ajax_pages/core.php']['ajaxSortingProducts'])) {
$params = array();
foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/multishop/scripts/ajax_pages/core.php']['ajaxSortingProducts'] as $funcRef) {
\TYPO3\CMS\Core\Utility\GeneralUtility::callUserFunction($funcRef, $params, $this);
}
} else {
$cat_id = mslib_fe::RemoveXSS(\TYPO3\CMS\Core\Utility\GeneralUtility::_GET('catid'));
$getPost = $this->post['productlisting'];
$sort_type = $this->ms['MODULES']['PRODUCTS_LISTING_SORT_ORDER_OPTION'];
if ($sort_type == 'desc') {
$no = time();
} else {
$no = 1;
}
foreach ($getPost as $prod_id) {
if (is_numeric($prod_id) and is_numeric($cat_id)) {
$where = 'categories_id = ' . $cat_id . ' and products_id = ' . $prod_id;
$updateArray = array('sort_order' => $no);
$query = $GLOBALS['TYPO3_DB']->UPDATEquery('tx_multishop_products_to_categories', $where, $updateArray);
$res = $GLOBALS['TYPO3_DB']->sql_query($query);
$query = $GLOBALS['TYPO3_DB']->UPDATEquery('tx_multishop_products', "products_id = {$prod_id}", $updateArray);
$res = $GLOBALS['TYPO3_DB']->sql_query($query);
示例5: typolink
<?php
// deprecated, missing too much functionality
require_once PATH_tslib . 'class.tslib_pibase.php';
require_once PATH_tslib . 'class.tslib_eidtools.php';
tslib_eidtools::connectDB();
$GLOBALS['TSFE']->fe_user = tslib_eidtools::initFeUser();
$this->ms['eID'] = 1;
include_once \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('multishop') . 'pi1/classes/class.mslib_fe.php';
include_once \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('multishop') . 'pi1/classes/class.mslib_befe.php';
//require_once(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('pagepath').'class.tx_pagepath_api.php');
$typeGet = mslib_fe::RemoveXSS(\TYPO3\CMS\Core\Utility\GeneralUtility::_GET('type'));
// pagepath plugin must be added soon to support cooluri urls when working in eID
/*
function typolink ($page_id='', $vars='')
{
if (!$page_id) $page_id=$GLOBALS["TSFE"]->id;
$conf=array();
$conf['parameter']=$page_id;
if ($vars) $conf['additionalParams']='&'.$vars;
$conf['returnLast'] = 'url'; // get it as URL
// $url = htmlspecialchars($GLOBALS["TSFE"]->cObj->typolink(NULL, $conf));
$url = tx_pagepath_api::getPagePath($page_id, $conf);
// $url = $GLOBALS["TSFE"]->cObj->typolink(NULL, $conf);
return $url;
}
*/
示例6: foreach
//print_r($fields);
foreach ($fields as $field) {
if (strstr($field, ":")) {
$array = explode(":", $field);
$key = $array[0];
} else {
$key = $field;
}
//echo $key;
if ($key == 'input_keywords') {
$content .= '<div class="input_keywords">
<input name="id" type="hidden" value="' . $this->conf['search_page_pid'] . '" />
<input name="tx_multishop_pi1[page_section]" type="hidden" value="products_search" />
<div class="form-fieldset">
<label for="skeyword">' . ucfirst($this->pi_getLL('keyword')) . ':</label>
<input name="skeyword" type="text" value="' . htmlspecialchars(mslib_fe::RemoveXSS($this->get['skeyword'])) . '" id="skeyword" class="option-attributes"/>
<input name="Submit" type="button" value="' . htmlspecialchars($this->pi_getLL('search')) . '" class="option-attributes"/>
</div>
</div>
';
continue;
} elseif ($key == 'option_slider') {
$array = explode(":", $field);
// $ids=explode("-",$array[1]);
// get lowest left side
/*
$str="SELECT po.products_options_name, pov.products_options_values_id,pov.products_options_values_name from tx_multishop_products_options_values pov, tx_multishop_products_attributes pa, tx_multishop_products_options po where pa.options_id='".$array[1]."' and pa.options_id=po.products_options_id and po.language_id ='".$this->sys_language_uid."' and pov.products_options_values_id=pa.options_values_id order by products_options_values_name asc limit 1";
$res=$GLOBALS['TYPO3_DB']->sql_query($str);
if($GLOBALS['TYPO3_DB']->sql_num_rows($res) > 0)
{
$row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res);
示例7: array
if ($this->cookie['cmsLimit']) {
$this->get['cmsLimit'] = $this->cookie['cmsLimit'];
} else {
$this->get['cmsLimit'] = 30;
}
$this->ms['MODULES']['PAGESET_LIMIT'] = $this->get['cmsLimit'];
if (is_numeric($this->get['p'])) {
$p = $this->get['p'];
}
$this->searchKeywords = array();
if ($this->get['tx_multishop_pi1']['keyword']) {
// using $_REQUEST cause TYPO3 converts "Command & Conquer" to "Conquer" (the & sign sucks ass)
$this->get['tx_multishop_pi1']['keyword'] = trim($this->get['tx_multishop_pi1']['keyword']);
$this->get['tx_multishop_pi1']['keyword'] = $GLOBALS['TSFE']->csConvObj->utf8_encode($this->get['tx_multishop_pi1']['keyword'], $GLOBALS['TSFE']->metaCharset);
$this->get['tx_multishop_pi1']['keyword'] = $GLOBALS['TSFE']->csConvObj->entities_to_utf8($this->get['tx_multishop_pi1']['keyword'], true);
$this->get['tx_multishop_pi1']['keyword'] = mslib_fe::RemoveXSS($this->get['tx_multishop_pi1']['keyword']);
$this->searchKeywords[] = $this->get['tx_multishop_pi1']['keyword'];
$this->searchMode = '%keyword%';
}
$limit_search_result_selectbox = '<div class="form-inline"><div class="form-group"><label>' . $this->pi_getLL('limit_number_of_records_to') . ':</label><select name="cmsLimit" class="form-control">';
$limits = array();
$limits[] = '10';
$limits[] = '15';
$limits[] = '20';
$limits[] = '25';
$limits[] = '30';
$limits[] = '40';
$limits[] = '50';
$limits[] = '100';
$limits[] = '150';
$limits[] = '200';
示例8: str_replace
$array2[] = $this->ms['MODULES']['STORE_NAME'];
$array1[] = '###CUSTOMER_ID###';
$array2[] = $customer_id;
if ($page[0]['name']) {
$page[0]['name'] = str_replace($array1, $array2, $page[0]['name']);
$content .= '<div class="main-heading"><h3>' . $page[0]['name'] . '</h3></div>';
}
if ($page[0]['content']) {
$page[0]['content'] = str_replace($array1, $array2, $page[0]['content']);
$content .= $page[0]['content'];
}
}
} else {
$erno = array();
if ($this->post) {
$this->post['email'] = mslib_fe::RemoveXSS($this->post['email']);
$mslib_user = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('tx_mslib_user');
$mslib_user->init($this);
if ($this->ms['MODULES']['CREATE_ACCOUNT_REGULAR_USERNAME'] && isset($this->post['username']) && !empty($this->post['username'])) {
$mslib_user->setUsername($this->post['username']);
} else {
$mslib_user->setUsername($this->post['email']);
}
$mslib_user->setEmail($this->post['email']);
$mslib_user->setConfirmation_email($this->post['email_confirm']);
$mslib_user->setGender($this->post['gender']);
$mslib_user->setPassword($this->post['password']);
$mslib_user->setConfirmation_password($this->post['password_confirm']);
$mslib_user->setFirst_name($this->post['first_name']);
$mslib_user->setMiddle_name($this->post['middle_name']);
$mslib_user->setLast_name($this->post['last_name']);
示例9: function
} else {
jQuery("#skeyword").autocomplete("search");
}
},
focus: function(event, ui) {
jQuery("#skeyword").val(ui.item.skeyword);
jQuery("#page").val(0);
return false;
}
}).data(\'ui-autocomplete\')._renderItem = function (ul, item) {
return jQuery("<li></li>").data("item.autocomplete", item).append(jQuery("<a></a>").html(item.label)).appendTo(ul);
};
});
</script>';
}
// fill the row marker with the expanded rows
$subpartArray['###SEARCH_PAGE_PID###'] = $this->conf['search_page_pid'];
$subpartArray['###LABEL_KEYWORD###'] = $this->pi_getLL('keyword');
$subpartArray['###LABEL_PLACEHOLDER_KEYWORD###'] = $this->pi_getLL('keyword');
$subpartArray['###LANGUAGE_UID###'] = $this->sys_language_uid;
$subpartArray['###KEYWORD_VALUE###'] = htmlspecialchars(mslib_fe::RemoveXSS($this->get['skeyword']));
$subpartArray['###LABEL_SUBMIT_BUTTON###'] = htmlspecialchars($this->pi_getLL('search'));
// custom hook that can be controlled by third-party plugin
if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/multishop/scripts/front_pages/includes/content_elements/searchform.php']['searchFormCEPostHook'])) {
$params = array('subpartArray' => &$subpartArray);
foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/multishop/scripts/front_pages/includes/content_elements/searchform.php']['searchFormCEPostHook'] as $funcRef) {
\TYPO3\CMS\Core\Utility\GeneralUtility::callUserFunction($funcRef, $params, $this);
}
}
// completed the template expansion by replacing the "item" marker in the template
$content = $this->cObj->substituteMarkerArrayCached($subparts['template'], null, $subpartArray);
示例10: number_format
if ($discount_percentage) {
$mslib_cart = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('tx_mslib_cart');
$mslib_cart->init($this);
$cart = $mslib_cart->getCart();
$cart['coupon_code'] = '';
$cart['discount'] = $discount_percentage;
$cart['discount_type'] = 'percentage';
//$GLOBALS['TSFE']->fe_user->setKey('ses', $this->cart_page_uid, $cart);
//$GLOBALS['TSFE']->fe_user->storeSessionData();
tx_mslib_cart::storeCart($cart);
$content = number_format($discount_percentage) . '%';
}
}
//if(!$discount_percentage)
if (!empty($_POST['code']) && $_POST['code'] != 'undefined') {
$code = mslib_fe::RemoveXSS(mslib_befe::strtolower($_POST['code']));
$time = time();
$str = "SELECT * from tx_multishop_coupons where code = '" . addslashes($code) . "' and status = 1 and (page_uid=0 or page_uid='" . $this->showCatalogFromPage . "') and (startdate <= '" . $time . "' and enddate >= '" . $time . "')";
$qry = $GLOBALS['TYPO3_DB']->sql_query($str);
if ($GLOBALS['TYPO3_DB']->sql_num_rows($qry) > 0) {
$row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($qry);
$continue_calculate_discount = true;
if ($row['max_usage'] > 0) {
if ($row['times_used'] >= $row['max_usage']) {
$content = "0%";
$continue_calculate_discount = false;
}
}
if ($continue_calculate_discount) {
switch ($row['discount_type']) {
case 'percentage':