本文整理汇总了PHP中hikashop_secureField函数的典型用法代码示例。如果您正苦于以下问题:PHP hikashop_secureField函数的具体用法?PHP hikashop_secureField怎么用?PHP hikashop_secureField使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了hikashop_secureField函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: saveForm
function saveForm()
{
$limit = new stdClass();
$limit->limit_id = hikashop_getCID('limit_id');
$formData = JRequest::getVar('data', array(), '', 'array');
jimport('joomla.filter.filterinput');
$safeHtmlFilter =& JFilterInput::getInstance(null, null, 1, 1);
foreach ($formData['limit'] as $column => $value) {
hikashop_secureField($column);
if (is_array($value)) {
$value = implode(',', $value);
}
$limit->{$column} = $safeHtmlFilter->clean(strip_tags($value), 'string');
}
if (!empty($limit->limit_start)) {
$limit->limit_start = hikashop_getTime($limit->limit_start);
}
if (!empty($limit->limit_end)) {
$limit->limit_end = hikashop_getTime($limit->limit_end);
}
if (empty($limit->limit_id)) {
$limit->limit_created = time();
}
$limit->limit_modified = time();
$status = $this->save($limit);
return $status;
}
示例2: saveForm
function saveForm()
{
$entry = new stdClass();
$entry->entry_id = hikashop_getCID('entry_id');
$formData = JRequest::getVar('data', array(), '', 'array');
jimport('joomla.filter.filterinput');
$safeHtmlFilter =& JFilterInput::getInstance(null, null, 1, 1);
foreach ($formData['entry'] as $column => $value) {
hikashop_secureField($column);
$entry->{$column} = $safeHtmlFilter->clean($value, 'string');
}
$status = $this->save($entry);
if (JRequest::getVar('tmpl', '') == 'component') {
if ($status) {
$url = hikashop_completeLink('order&task=edit&cid=' . $entry->order_id, false, true);
echo '<html><head><script type="text/javascript">parent.window.location.href=\'' . $url . '\';</script></head><body></body></html>';
exit;
} else {
$app = JFactory::getApplication();
if (version_compare(JVERSION, '1.6', '<')) {
$session =& JFactory::getSession();
$session->set('application.queue', $app->_messageQueue);
}
echo '<html><head><script type="text/javascript">javascript: history.go(-1);</script></head><body></body></html>';
exit;
}
}
return $status;
}
示例3: saveForm
function saveForm()
{
$discount = new stdClass();
$discount->discount_id = hikashop_getCID('discount_id');
$formData = JRequest::getVar('data', array(), '', 'array');
jimport('joomla.filter.filterinput');
$safeHtmlFilter =& JFilterInput::getInstance(null, null, 1, 1);
$nameboxes = array('discount_product_id', 'discount_category_id', 'discount_zone_id');
foreach ($formData['discount'] as $column => $value) {
hikashop_secureField($column);
if (in_array($column, $nameboxes)) {
if ($column == 'discount_zone_id') {
$discount->{$column} = array();
foreach ($value as $i => $v) {
$discount->{$column}[] = $safeHtmlFilter->clean(strip_tags($v), 'string');
}
} else {
JArrayHelper::toInteger($value);
}
$discount->{$column} = $value;
} else {
$discount->{$column} = $safeHtmlFilter->clean(strip_tags($value), 'string');
}
}
foreach ($nameboxes as $namebox) {
if (!isset($discount->{$namebox})) {
$discount->{$namebox} = '';
}
}
if (!empty($discount->discount_category_id) && !empty($discount->discount_product_id)) {
$app = JFactory::getApplication();
$app->enqueueMessage('If you set both categories and products in a discount/coupon, only the products will be taken into account.', 'error');
}
if (!empty($discount->discount_start)) {
$discount->discount_start = hikashop_getTime($discount->discount_start);
}
if (!empty($discount->discount_end)) {
$discount->discount_end = hikashop_getTime($discount->discount_end);
}
if (!empty($discount->discount_id) && !empty($discount->discount_code)) {
$query = 'SELECT discount_id FROM ' . hikashop_table('discount') . ' WHERE discount_code = ' . $this->database->Quote($discount->discount_code) . ' LIMIT 1';
$this->database->setQuery($query);
$res = $this->database->loadResult();
if (!empty($res) && $res != $discount->discount_id) {
$app = JFactory::getApplication();
$app->enqueueMessage(JText::_('DISCOUNT_CODE_ALREADY_USED'), 'error');
JRequest::setVar('fail', $discount);
return false;
}
}
$status = $this->save($discount);
if (!$status) {
JRequest::setVar('fail', $discount);
$app = JFactory::getApplication();
$app->enqueueMessage(JText::_('DISCOUNT_CODE_ALREADY_USED'));
}
return $status;
}
示例4: saveForm
function saveForm()
{
$element = new stdClass();
$element->warehouse_id = hikashop_getCID('warehouse_id');
$formData = JRequest::getVar('data', array(), '', 'array');
jimport('joomla.filter.filterinput');
$safeHtmlFilter =& JFilterInput::getInstance(null, null, 1, 1);
foreach ($formData['warehouse'] as $column => $value) {
hikashop_secureField($column);
$element->{$column} = $safeHtmlFilter->clean(strip_tags($value), 'string');
}
$class = hikashop_get('helper.translation');
$class->getTranslations($element);
$status = $this->save($element);
return $status;
}
示例5: saveForm
function saveForm()
{
$element = new stdClass();
$element->waitlist_id = hikashop_getCID('waitlist_id');
$formData = JRequest::getVar('data', array(), '', 'array');
jimport('joomla.filter.filterinput');
$safeHtmlFilter =& JFilterInput::getInstance(null, null, 1, 1);
foreach ($formData['waitlist'] as $column => $value) {
hikashop_secureField($column);
$element->{$column} = $safeHtmlFilter->clean(strip_tags($value), 'string');
}
if (!empty($element->date)) {
$element->date = hikashop_getTime($element->date);
}
$result = $this->save($element);
return $result;
}
示例6: saveForm
function saveForm()
{
$tax = new stdClass();
$formData = JRequest::getVar('data', array(), '', 'array');
jimport('joomla.filter.filterinput');
$safeHtmlFilter =& JFilterInput::getInstance(null, null, 1, 1);
foreach ($formData['tax'] as $column => $value) {
hikashop_secureField($column);
if ($column == 'tax_rate') {
$tax->{$column} = (double) strip_tags(str_replace('"', '', $value)) / 100.0;
} else {
$tax->{$column} = $safeHtmlFilter->clean(strip_tags($value), 'string');
}
}
if (JRequest::getVar('task') != 'save2new') {
JRequest::setVar('tax_namekey', $tax->tax_namekey);
}
return $this->save($tax);
}
示例7: saveForm
function saveForm()
{
$zone = new stdClass();
$zone->zone_id = hikashop_getCID('zone_id');
$formData = JRequest::getVar('data', array(), '', 'array');
$status = false;
if (!empty($formData['zone'])) {
jimport('joomla.filter.filterinput');
$safeHtmlFilter = JFilterInput::getInstance(null, null, 1, 1);
foreach ($formData['zone'] as $column => $value) {
hikashop_secureField($column);
$zone->{$column} = $safeHtmlFilter->clean(strip_tags($value), 'string');
}
$status = $this->save($zone);
if (!$status) {
JRequest::setVar('fail', $zone);
$app =& JFactory::getApplication();
$app->enqueueMessage(JText::_('DUPLICATE_ZONE'), 'error');
}
}
return $status;
}
示例8: saveForm
function saveForm()
{
$element = new stdClass();
$element->banner_id = hikashop_getCID('banner_id');
$formData = JRequest::getVar('data', array(), '', 'array');
jimport('joomla.filter.filterinput');
$safeHtmlFilter =& JFilterInput::getInstance(null, null, 1, 1);
foreach ($formData['banner'] as $column => $value) {
hikashop_secureField($column);
$element->{$column} = $safeHtmlFilter->clean($value);
if ($column != 'banner_comment') {
$element->{$column} = strip_tags($element->{$column});
}
}
$class = hikashop_get('helper.translation');
$class->getTranslations($element);
$result = $this->save($element);
if ($result) {
$class->handleTranslations('banner', $result, $element);
}
return $result;
}
示例9: saveForm
function saveForm()
{
$taxation = new stdClass();
$taxation->taxation_id = hikashop_getCID('taxation_id');
$formData = JRequest::getVar('data', array(), '', 'array');
jimport('joomla.filter.filterinput');
$safeHtmlFilter =& JFilterInput::getInstance(null, null, 1, 1);
foreach ($formData['taxation'] as $column => $value) {
hikashop_secureField($column);
if (in_array($column, array('zone_namekey', 'taxation_type'))) {
if (is_array($value)) {
$value = implode(',', $value);
if ($column == 'taxation_type' && !empty($value)) {
$value = ',' . $value . ',';
}
}
}
$taxation->{$column} = $safeHtmlFilter->clean(strip_tags($value), 'string');
}
if (!isset($taxation->taxation_type)) {
$taxation->taxation_type = '';
}
if (!isset($taxation->zone_namekey)) {
$taxation->zone_namekey = '';
}
if (!empty($taxation->taxation_date_start)) {
$taxation->taxation_date_start = hikashop_getTime($taxation->taxation_date_start);
}
if (!empty($taxation->taxation_date_end)) {
$taxation->taxation_date_end = hikashop_getTime($taxation->taxation_date_end);
}
if (!empty($taxation->taxation_site_id) && $taxation->taxation_site_id == '[unselected]') {
$taxation->taxation_site_id = '';
}
return $this->save($taxation);
}
示例10: saveForm
function saveForm()
{
$element = new stdClass();
$element->characteristic_id = hikashop_getCID('characteristic_id');
$formData = JRequest::getVar('data', array(), '', 'array');
jimport('joomla.filter.filterinput');
$safeHtmlFilter =& JFilterInput::getInstance(null, null, 1, 1);
foreach ($formData['characteristic'] as $column => $value) {
hikashop_secureField($column);
$element->{$column} = $safeHtmlFilter->clean($value, 'string');
}
$element->values = JRequest::getVar('characteristic', array(), '', 'array');
JArrayHelper::toInteger($element->values);
$element->values_ordering = JRequest::getVar('characteristic_ordering', array(), '', 'array');
JArrayHelper::toInteger($element->values);
JArrayHelper::toInteger($element->values_ordering);
$status = $this->save($element);
if (!$status) {
JRequest::setVar('fail', $element);
} elseif (@$element->characteristic_parent_id == 0) {
$this->updateValues($element, $status);
}
return $status;
}
示例11: saveForm
function saveForm()
{
$element = new stdClass();
$element->badge_id = hikashop_getCID('badge_id');
$formData = JRequest::getVar('data', array(), '', 'array');
jimport('joomla.filter.filterinput');
$safeHtmlFilter = JFilterInput::getInstance(null, null, 1, 1);
$nameboxes = array('badge_discount_id', 'badge_category_id', 'badge_product_id');
foreach ($formData['badge'] as $column => $value) {
hikashop_secureField($column);
if (in_array($column, $nameboxes)) {
JArrayHelper::toInteger($value);
$element->{$column} = ',' . implode(',', $value) . ',';
} else {
$element->{$column} = $safeHtmlFilter->clean(strip_tags($value), 'string');
}
}
foreach ($nameboxes as $namebox) {
if (!isset($element->{$namebox})) {
$element->{$namebox} = '';
}
}
if (!empty($element->badge_start)) {
$element->badge_start = hikashop_getTime($element->badge_start);
}
if (!empty($element->badge_end)) {
$element->badge_end = hikashop_getTime($element->badge_end);
}
$class = hikashop_get('class.file');
$element->badge_image = $class->saveFile();
if (empty($element->badge_image)) {
unset($element->badge_image);
}
$status = $this->save($element);
return $status;
}
示例12: add_waitlist
function add_waitlist()
{
JRequest::checkToken('request') || jexit('Invalid Token');
$element = new stdClass();
$formData = JRequest::getVar('data', array(), '', 'array');
foreach ($formData['register'] as $column => $value) {
hikashop_secureField($column);
$element->{$column} = strip_tags($value);
}
$user = JFactory::getUser();
$app = JFactory::getApplication();
if (empty($element->email) && $user->guest) {
$app->enqueueMessage(JText::_('VALID_EMAIL'));
return $this->waitlist();
}
$config =& hikashop_config();
if (!$config->get('product_waitlist', 0)) {
return $this->waitlist();
}
$waitlist_subscribe_limit = $config->get('product_waitlist_sub_limit', 10);
$product_id = 0;
$itemId = JRequest::getVar('Itemid');
$url_itemid = '';
if (!empty($itemId)) {
$url_itemid = '&Itemid=' . $itemId;
}
$alias = '';
if (!empty($element->product_id)) {
$class = hikashop_get('class.product');
$product = $class->get((int) $element->product_id);
if (!empty($product)) {
if ($product->product_type == 'variant') {
$db = JFactory::getDBO();
$db->setQuery('SELECT * FROM ' . hikashop_table('variant') . ' AS a LEFT JOIN ' . hikashop_table('characteristic') . ' AS b ON a.variant_characteristic_id=b.characteristic_id WHERE a.variant_product_id=' . (int) $element->product_id . ' ORDER BY a.ordering');
$product->characteristics = $db->loadObjectList();
$parentProduct = $class->get((int) $product->product_parent_id);
$class->checkVariant($product, $parentProduct);
}
$product_id = (int) $product->product_id;
$class->addAlias($product);
$alias = $product->alias;
}
}
if ($product_id == 0) {
return $this->waitlist();
}
$email = !empty($element->email) ? $element->email : '';
$name = !empty($element->name) ? $element->name : '';
$db = JFactory::getDBO();
$sql = 'SELECT waitlist_id FROM ' . hikashop_table('waitlist') . ' WHERE email=' . $db->quote($email) . ' AND product_id=' . (int) $product_id;
$db->setQuery($sql);
$subscription = $db->loadResult();
if (empty($subscription)) {
$sql = 'SELECT count(*) FROM ' . hikashop_table('waitlist') . ' WHERE product_id=' . (int) $product_id;
$db->setQuery($sql);
$subscriptions = $db->loadResult();
if ($subscriptions < $waitlist_subscribe_limit || $waitlist_subscribe_limit <= 0) {
$sql = 'INSERT IGNORE INTO ' . hikashop_table('waitlist') . ' (`product_id`,`date`,`email`,`name`,`product_item_id`) VALUES (' . (int) $product_id . ', ' . time() . ', ' . $db->quote($email) . ', ' . $db->quote($name) . ', ' . (int) $itemId . ');';
$db->setQuery($sql);
$db->query();
$app->enqueueMessage(JText::_('WAITLIST_SUBSCRIBE'));
$subject = JText::_('WAITLIST_REQUEST');
if (!empty($product->product_name)) {
$subject = JText::sprintf('WAITLIST_REQUEST_FOR_PRODUCT', strip_tags($product->product_name));
}
$mailClass = hikashop_get('class.mail');
$infos = new stdClass();
$infos->user =& $element;
$infos->product =& $product;
$mail = $mailClass->get('waitlist_admin_notification', $infos);
$mail->subject = $subject;
$mail->from_email = $config->get('from_email');
$mail->from_name = $config->get('from_name');
$mail->reply_email = $element->email;
if (empty($mail->dst_email)) {
$mail->dst_email = array($config->get('from_email'));
}
$status = $mailClass->sendMail($mail);
} else {
$app->enqueueMessage(JText::_('WAITLIST_FULL'));
}
} else {
$app->enqueueMessage(JText::_('ALREADY_REGISTER_WAITLIST'));
}
$app->enqueueMessage(JText::sprintf('CLICK_HERE_TO_GO_BACK_TO_PRODUCT', hikashop_contentLink('product&task=show&cid=' . $product->product_id . '&name=' . $alias . $url_itemid, $product)));
$url = JRequest::getVar('redirect_url');
if (!empty($url)) {
$app->redirect($url);
} else {
$this->waitlist();
}
}
示例13: saveForm
//.........这里部分代码省略.........
if (empty($task) || $task == $currentTask) {
$order_user_id = (int) $data['order']['order_user_id'];
if ($order_user_id > 0) {
$order->order_user_id = $order_user_id;
$do = true;
$set_address = JRequest::getInt('set_user_address', 0);
if ($set_address) {
$db = JFactory::getDBO();
$db->setQuery('SELECT address_id FROM ' . hikashop_table('address') . ' WHERE address_user_id = ' . (int) $order_user_id . ' AND address_published = 1 ORDER BY address_default DESC, address_id ASC LIMIT 1');
$address_id = $db->loadResult();
if ($address_id) {
$order->order_billing_address_id = (int) $address_id;
$order->order_shipping_address_id = (int) $address_id;
}
}
}
}
$currentTask = 'products';
$config = hikashop_config();
$createdStatus = $config->get('order_created_status', 'created');
$noUpdateQty = 0;
if ($createdStatus == $order->order_status && $config->get('update_stock_after_confirm')) {
$noUpdateQty = 1;
}
if ((empty($task) || $task == $currentTask) && !empty($data[$currentTask])) {
$orderProductClass = hikashop_get('class.order_product');
$productData = $data['order']['product'];
if (isset($productData['many']) && $productData['many'] == true) {
unset($productData['many']);
$product = new stdClass();
$order->product = array();
foreach ($productData as $singleProduct) {
foreach ($singleProduct as $key => $value) {
hikashop_secureField($key);
$product->{$key} = $safeHtmlFilter->clean($value, 'string');
}
if ($noUpdateQty) {
$product->no_update_qty = true;
}
$orderProductClass->update($product);
$order->product[] = $product;
}
} else {
if (isset($productData['order_id'])) {
$product = new stdClass();
$fieldClass = hikashop_get('class.field');
$oldData = null;
$item_fields = $fieldClass->getData('backend', 'item');
$ret = $fieldClass->_checkOneInput($item_fields, $productData, $product, 'item', $oldData);
foreach ($productData as $key => $value) {
hikashop_secureField($key);
if (isset($items_fields[$key])) {
continue;
}
$product->{$key} = $safeHtmlFilter->clean($value, 'string');
}
$product->order_id = (int) $order_id;
if ($noUpdateQty) {
$product->no_update_qty = true;
}
$orderProductClass->update($product);
$order->product = array($product);
} else {
$order->product = array();
foreach ($productData as $data) {
$product = new stdClass();
示例14: saveForm
function saveForm()
{
$widget = new stdClass();
$table = new stdClass();
$formData = JRequest::getVar('data', array(), '', 'array');
$deleteRow = JRequest::getVar('delete_row');
$widget->widget_id = hikashop_getCID('widget_id');
jimport('joomla.filter.filterinput');
$safeHtmlFilter =& JFilterInput::getInstance(null, null, 1, 1);
if (!empty($formData)) {
if (isset($formData['edit_row'])) {
$widget_id = $formData['widget']['widget_id'];
$class = hikashop_get('class.widget');
if (!empty($widget_id)) {
$widget = $class->get($widget_id);
}
$widget->widget_name = $safeHtmlFilter->clean(strip_tags($formData['widget']['widget_name']), 'string');
$widget->widget_published = (int) $formData['widget']['widget_published'];
$widget->widget_access = $safeHtmlFilter->clean(strip_tags($formData['widget']['widget_access']), 'string');
if (!isset($widget->widget_params)) {
$widget->widget_params = new stdClass();
}
$widget->widget_params->display = 'table';
foreach ($formData['widget']['widget_params']['table'] as $key => $tab) {
$theKey = $key;
}
foreach ($formData['widget']['widget_params']['table'][$theKey] as $column => $value) {
hikashop_secureField($column);
if (is_array($value)) {
$table->{$column} = new stdClass();
foreach ($value as $k2 => $v2) {
hikashop_secureField($k2);
if ($k2 == 'start' || $k2 == 'end') {
$v2 = hikashop_getTime($v2);
}
if (is_array($v2)) {
if ($k2 == 'filters' || $k2 == "compares") {
$v2 = serialize($v2);
} else {
$v2 = implode(',', $v2);
}
}
$table->{$column}->{$k2} = $safeHtmlFilter->clean(strip_tags($v2), 'string');
}
} else {
$table->{$column} = $safeHtmlFilter->clean(strip_tags($value), 'string');
}
}
$categories = JRequest::getVar('row_category', array(), '', 'array');
JArrayHelper::toInteger($categories);
$cat = array();
foreach ($categories as $category) {
$cat[] = $category;
}
if (empty($cat)) {
$cat = 'all';
} else {
$cat = implode(',', $cat);
}
$widget->widget_params->categories = $cat;
$coupons = JRequest::getVar('row_coupon', array(), '', 'array');
JArrayHelper::toInteger($coupons);
$coupons = serialize($coupons);
$widget->widget_params->coupons = $coupons;
$widget->widget_params->table[$theKey] = $table;
} else {
if ($formData['widget']['widget_params']['display'] == 'table') {
$class = hikashop_get('class.widget');
if (!empty($widget->widget_id)) {
$widget = $class->get($widget->widget_id);
}
if ($deleteRow >= 0) {
unset($widget->widget_params->table[$deleteRow]);
} else {
$widget->widget_name = $safeHtmlFilter->clean(strip_tags($formData['widget']['widget_name']), 'string');
$widget->widget_published = (int) $formData['widget']['widget_published'];
$widget->widget_access = $safeHtmlFilter->clean(strip_tags($formData['widget']['widget_access']), 'string');
}
} else {
if ($formData['widget']['widget_params']['periodType'] && isset($formData['widget']['widget_params']['proposedPeriod']) && $formData['widget']['widget_params']['proposedPeriod'] == 'all') {
$formData['widget']['widget_params']['period_compare'] = 'none';
}
foreach ($formData['widget'] as $column => $value) {
hikashop_secureField($column);
if (is_array($value)) {
$widget->{$column} = new stdClass();
foreach ($value as $k2 => $v2) {
hikashop_secureField($k2);
if (is_array($v2)) {
if ($k2 == 'filters' || $k2 == "compares") {
$v2 = serialize($v2);
} else {
$v2 = implode(',', $v2);
}
}
$widget->{$column}->{$k2} = $safeHtmlFilter->clean(strip_tags($v2), 'string');
}
} else {
$widget->{$column} = $safeHtmlFilter->clean(strip_tags($value), 'string');
}
//.........这里部分代码省略.........
示例15: saveForm
function saveForm()
{
$legacy = JRequest::getInt('legacy', 0);
if (!$legacy) {
$subtask = JRequest::getCmd('subtask', '');
if ($subtask == 'variant') {
return $this->backSaveVariantForm();
}
return $this->backSaveForm();
}
$oldProduct = null;
$product_id = hikashop_getCID('product_id');
$categories = JRequest::getVar('category', array(), '', 'array');
$app = JFactory::getApplication();
JArrayHelper::toInteger($categories);
$newCategories = array();
if (count($categories)) {
foreach ($categories as $category) {
$newCategory = new stdClass();
$newCategory->category_id = $category;
$newCategories[] = $newCategory;
}
}
if ($product_id) {
$oldProduct = $this->get($product_id);
$oldProduct->categories = $newCategories;
} else {
$oldProduct = new stdClass();
$oldProduct->categories = $newCategories;
}
$fieldsClass = hikashop_get('class.field');
$element = $fieldsClass->getInput('product', $oldProduct);
$status = true;
if (empty($element)) {
$element = $_SESSION['hikashop_product_data'];
$status = false;
}
if ($product_id) {
$element->product_id = $product_id;
}
if (isset($element->product_price_percentage)) {
$element->product_price_percentage = hikashop_toFloat($element->product_price_percentage);
}
$element->categories = $categories;
if (empty($element->product_id) && !count($element->categories) && (empty($element->product_type) || $element->product_type == 'main')) {
$id = $app->getUserState(HIKASHOP_COMPONENT . '.product.filter_id');
if (empty($id) || !is_numeric($id)) {
$id = 'product';
$class = hikashop_get('class.category');
$class->getMainElement($id);
}
if (!empty($id)) {
$element->categories = array($id);
}
}
$element->related = array();
$related = JRequest::getVar('related', array(), '', 'array');
JArrayHelper::toInteger($related);
if (!empty($related)) {
$related_ordering = JRequest::getVar('related_ordering', array(), '', 'array');
JArrayHelper::toInteger($related_ordering);
foreach ($related as $id) {
$obj = new stdClass();
$obj->product_related_id = $id;
$obj->product_related_ordering = $related_ordering[$id];
$element->related[$id] = $obj;
}
}
$options = JRequest::getVar('options', array(), '', 'array');
$element->options = array();
JArrayHelper::toInteger($element->options);
if (!empty($options)) {
$related_ordering = JRequest::getVar('options_ordering', array(), '', 'array');
JArrayHelper::toInteger($related_ordering);
foreach ($options as $id) {
$obj = new stdClass();
$obj->product_related_id = $id;
$obj->product_related_ordering = $related_ordering[$id];
$element->options[$id] = $obj;
}
}
$element->images = JRequest::getVar('image', array(), '', 'array');
JArrayHelper::toInteger($element->images);
$element->files = JRequest::getVar('file', array(), '', 'array');
JArrayHelper::toInteger($element->files);
$element->imagesorder = JRequest::getVar('imageorder', array(), '', 'array');
JArrayHelper::toInteger($element->imagesorder);
$element->tags = JRequest::getVar('tags', array(), '', 'array');
$priceData = JRequest::getVar('price', array(), '', 'array');
$element->prices = array();
foreach ($priceData as $column => $value) {
hikashop_secureField($column);
if ($column == 'price_access') {
if (!empty($value)) {
foreach ($value as $k => $v) {
$value[$k] = preg_replace('#[^a-z0-9,]#i', '', $v);
}
}
} elseif ($column == 'price_site_id') {
jimport('joomla.filter.filterinput');
//.........这里部分代码省略.........