本文整理汇总了PHP中MG::defenderXss_decode方法的典型用法代码示例。如果您正苦于以下问题:PHP MG::defenderXss_decode方法的具体用法?PHP MG::defenderXss_decode怎么用?PHP MG::defenderXss_decode使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MG
的用法示例。
在下文中一共展示了MG::defenderXss_decode方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getSearchData
/**
* Получает список продуктов при вводе в поле поиска.
*/
public function getSearchData()
{
$keyword = MG::defenderXss_decode(URL::getQueryParametr('text'));
if (!empty($keyword)) {
$keyword = $this->convertLang($keyword);
$catalog = new Models_Catalog();
$items = $catalog->getListProductByKeyWord($keyword, true, true, false, 'groupBy');
foreach ($items['catalogItems'] as $key => $value) {
$path = URL::$documentRoot . DIRECTORY_SEPARATOR . 'uploads' . DIRECTORY_SEPARATOR . 'thumbs' . DIRECTORY_SEPARATOR . '30_' . $value["image_url"];
if (!file_exists($path)) {
$items['catalogItems'][$key]['noneFile'] = SITE . '/uploads/thumbs/30_' . $value['image_url'];
}
}
$searchData = array('status' => 'success', 'item' => array('keyword' => $keyword, 'count' => $items['numRows'], 'items' => $items), 'currency' => MG::getSetting('currency'));
}
echo json_encode($searchData);
exit;
}
示例2: getSearchData
/**
* Получает список продуктов при вводе в поле поиска.
*/
public function getSearchData()
{
$keyword = MG::defenderXss_decode(URL::getQueryParametr('text'));
if (!empty($keyword)) {
$keyword = $this->convertLang($keyword);
$catalog = new Models_Catalog();
$items = $catalog->getListProductByKeyWord($keyword, true, true, false, 'groupBy');
foreach ($items['catalogItems'] as $key => $value) {
$items['catalogItems'][$key]['image_url'] = mgImageProductPath($value["image_url"], $value['id'], 'small');
}
$searchData = array('status' => 'success', 'item' => array('keyword' => $keyword, 'count' => $items['numRows'], 'items' => $items), 'currency' => MG::getSetting('currency'));
}
echo json_encode($searchData);
exit;
}