本文整理匯總了PHP中sys::import方法的典型用法代碼示例。如果您正苦於以下問題:PHP sys::import方法的具體用法?PHP sys::import怎麽用?PHP sys::import使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類sys
的用法示例。
在下文中一共展示了sys::import方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: publications_userapi_getitemlinks
/**
* utility function to pass individual item links to a caller
*
* @param $args['itemids'] array of item ids to get
* @return array Array containing the itemlink(s) for the item(s).
*/
function publications_userapi_getitemlinks($args)
{
$itemlinks = array();
sys::import('xaraya.structures.query');
$xartable = xarDB::getTables();
$q = new Query('SELECT', $xartable['publications']);
$q->addfield('id');
$q->addfield('title');
$q->addfield('description');
$q->addfield('pubtype_id');
$q->in('state', array(3, 4));
if (!empty($args['itemids'])) {
$itemids = explode(',', $args['itemids']);
$q->in('id', $itemids);
}
$q->addorder('title');
$q->run();
$result = $q->output();
if (empty($result)) {
return $itemlinks;
}
foreach ($result as $item) {
if (empty($item['title'])) {
$item['title'] = xarML('Display Publication');
}
$itemlinks[$item['id']] = array('url' => xarModURL('publications', 'user', 'display', array('id' => $item['id'])), 'title' => $item['title'], 'label' => $item['description']);
}
return $itemlinks;
}
示例2: shop_userapi_getproducts
/**
* Get products
*/
function shop_userapi_getproducts($args)
{
$startnum = 1;
extract($args);
if (!xarSecurityCheck('ViewShop')) {
return;
}
if (!isset($items_per_page)) {
$items_per_page = xarModVars::get('shop', 'items_per_page');
}
$data['items_per_page'] = $items_per_page;
// Load the DD master object class. This line will likely disappear in future versions
sys::import('modules.dynamicdata.class.objects.master');
sys::import('modules.dynamicdata.class.properties.master');
// Get the object we'll be working with. Note this is a so called object list
$mylist = DataObjectMaster::getObjectList(array('name' => 'shop_products'));
$data['sort'] = xarMod::ApiFunc('shop', 'admin', 'sort', array('sortfield_fallback' => 'id', 'ascdesc_fallback' => 'ASC'));
// We have some filters for the items
$filters = array('startnum' => $startnum, 'status' => DataPropertyMaster::DD_DISPLAYSTATE_ACTIVE, 'sort' => $data['sort']);
if (isset($where)) {
$filters['where'] = $where;
}
// Get the items
$products = $mylist->getItems($filters);
// return the products
$data['products'] = $products;
// Return the template variables defined in this function
return $data;
}
示例3: shop_user_viewcart
/**
* View the cart
*/
function shop_user_viewcart()
{
// If the user returns to the cart after taking other steps, unset any errors from earlier in the session.
xarSession::delVar('errors');
sys::import('modules.dynamicdata.class.objects.master');
$subtotals = array();
$products = array();
$total = 0;
// May want to display cust info with the cart...
$cust = xarMod::APIFunc('shop', 'user', 'customerinfo');
$data['cust'] = $cust;
$shop = xarSession::getVar('shop');
foreach ($shop as $pid => $val) {
// If this post variable is set, we must need to update the quantity
if (isset($_POST['qty' . $pid])) {
unset($qty_new);
// Have to unset this since we're in a foreach
if (!xarVarFetch('qty' . $pid, 'isset', $qty_new, NULL, XARVAR_DONT_SET)) {
return;
}
if ($qty_new == 0) {
unset($shop[$pid]);
} else {
$shop[$pid]['qty'] = $qty_new;
}
}
// If the quantity hasn't been set to zero, add it to the $products array...
if (isset($shop[$pid])) {
// Commas in the quantity seem to mess up our math
$products[$pid]['qty'] = str_replace(',', '', $shop[$pid]['qty']);
// Get the product info
$object = DataObjectMaster::getObject(array('name' => 'shop_products'));
$some_id = $object->getItem(array('itemid' => $pid));
$values = $object->getFieldValues();
$products[$pid]['title'] = xarVarPrepForDisplay($values['title']);
$products[$pid]['price'] = $values['price'];
$subtotal = $values['price'] * $products[$pid]['qty'];
$subtotals[] = $subtotal;
// so we can use array_sum() to add it all up
if (substr($subtotal, 0, 1) == '.') {
$subtotal = '0' . $subtotal;
}
$products[$pid]['subtotal'] = number_format($subtotal, 2);
}
}
xarSession::setVar('shop', $shop);
$total = array_sum($subtotals);
// Add a zero to the front of the number if it starts with a decimal...
if (substr($total, 0, 1) == '.') {
$total = '0' . $total;
}
$total = number_format($total, 2);
xarSession::setVar('products', $products);
// update the session variable
$data['products'] = $products;
// don't want too much session stuff in the templates
xarSession::setVar('total', $total);
$data['total'] = $total;
return $data;
}
示例4: publications_adminapi_delete
/**
* Publications Module
*
* @package modules
* @subpackage publications module
* @category Third Party Xaraya Module
* @version 2.0.0
* @copyright (C) 2011 Netspan AG
* @license GPL {@link http://www.gnu.org/licenses/gpl.html}
* @author Marc Lutolf <mfl@netspan.ch>
*/
function publications_adminapi_delete($args)
{
// Get arguments from argument array
extract($args);
// Argument check
if (!isset($itemid)) {
$msg = xarML('Invalid #(1) for #(2) function #(3)() in module #(4)', 'publication ID', 'admin', 'delete', 'Publications');
throw new BadParameterException(null, $msg);
}
$ids = !is_array($itemid) ? explode(',', $itemid) : $itemid;
if (!isset($deletetype)) {
$deletetype = 0;
}
sys::import('xaraya.structures.query');
$table = xarDB::getTables();
switch ($deletetype) {
case 0:
default:
$q = new Query('UPDATE', $table['publications']);
$q->addfield('state', 0);
break;
case 10:
$q = new Query('DELETE', $table['publications']);
break;
}
$q->in('id', $ids);
if (!$q->run()) {
return false;
}
return true;
}
示例5: wurfl_init
/**
* Initialize WURFL
*
*/
function wurfl_init($args = array())
{
if (!isset($args['mode'])) {
$args['mode'] = 'performance';
}
sys::import('modules.wurfl.xarincludes.WURFL.Application');
$resourcesDir = sys::code() . 'modules/wurfl/xarincludes/resources';
$persistenceDir = $resourcesDir . '/storage/persistence';
$cacheDir = $resourcesDir . '/storage/cache';
// Create WURFL Configuration
$wurflConfig = new WURFL_Configuration_InMemoryConfig();
// Set location of the WURFL File
$wurflConfig->wurflFile($resourcesDir . '/wurfl.xml');
// Set the match mode for the API ('performance' or 'accuracy')
$wurflConfig->matchMode($args['mode']);
// Setup WURFL Persistence
$wurflConfig->persistence('file', array('dir' => $persistenceDir));
// Setup Caching
$wurflConfig->cache('file', array('dir' => $cacheDir, 'expiration' => 36000));
// Create a WURFL Manager Factory from the WURFL Configuration
$wurflManagerFactory = new WURFL_WURFLManagerFactory($wurflConfig);
// Create a WURFL Manager
/* @var $wurflManager WURFL_WURFLManager */
$wurflManager = $wurflManagerFactory->create();
return $wurflManager;
}
示例6: calendar_userapi_getUserDateTimeInfo
function calendar_userapi_getUserDateTimeInfo()
{
// dates come in as YYYYMMDD
xarVarFetch('cal_date', 'str:4:8', $cal_date, xarLocaleFormatDate('%Y%m%d'));
$data = array();
$data['cal_date'] =& $cal_date;
if (!preg_match('/([\\d]{4,4})([\\d]{2,2})?([\\d]{2,2})?/', $cal_date, $match)) {
$year = xarLocaleFormateDate('Y');
$month = xarLocaleFormateDate('m');
$day = xarLocaleFormateDate('d');
} else {
$year = $match[1];
if (isset($match[2])) {
$month = $match[2];
} else {
$month = '01';
}
if (isset($match[3])) {
$day = $match[3];
} else {
$day = '01';
}
}
//$data['selected_date'] = (int) $year.$month.$day;
$data['cal_day'] = (int) $day;
$data['cal_month'] = (int) $month;
$data['cal_year'] = (int) $year;
//$data['selected_timestamp'] = gmmktime(0,0,0,$month,$day,$year);
sys::import('xaraya.structures.datetime');
$today = new XarDateTime();
$usertz = xarModUserVars::get('roles', 'usertimezone', xarSession::getVar('role_id'));
$useroffset = $today->getTZOffset($usertz);
$data['now'] = getdate(time() + $useroffset);
return $data;
}
示例7: publications_user_view_pages
/**
* Publications Module
*
* @package modules
* @subpackage publications module
* @category Third Party Xaraya Module
* @version 2.0.0
* @copyright (C) 2011 Netspan AG
* @license GPL {@link http://www.gnu.org/licenses/gpl.html}
* @author Marc Lutolf <mfl@netspan.ch>
*/
function publications_user_view_pages($args)
{
extract($args);
if (!xarSecurityCheck('ManagePublications')) {
return;
}
// Accept a parameter to allow selection of a single tree.
xarVarFetch('contains', 'id', $contains, 0, XARVAR_NOT_REQUIRED);
$data = xarMod::apiFunc('publications', 'user', 'getpagestree', array('key' => 'index', 'dd_flag' => false, 'tree_contains_pid' => $contains));
if (empty($data['pages'])) {
// TODO: pass to template.
return $data;
//xarML('NO PAGES DEFINED');
} else {
$data['pages'] = xarMod::apiFunc('publications', 'tree', 'array_maptree', $data['pages']);
}
$data['contains'] = $contains;
// Check modify and delete privileges on each page.
// EditPage - allows basic changes, but no moving or renaming (good for sub-editors who manage content)
// AddPage - new pages can be added (further checks may limit it to certain page types)
// DeletePage - page can be renamed, moved and deleted
if (!empty($data['pages'])) {
// Bring in the access property for security checks
sys::import('modules.dynamicdata.class.properties.master');
$accessproperty = DataPropertyMaster::getProperty(array('name' => 'access'));
$accessproperty->module = 'publications';
$accessproperty->component = 'Page';
foreach ($data['pages'] as $key => $page) {
$thisinstance = $page['name'] . ':' . $page['ptid']['name'];
// Do we have admin access?
$args = array('instance' => $thisinstance, 'level' => 800);
$adminaccess = $accessproperty->check($args);
// Decide whether this page can be modified by the current user
/*try {
$args = array(
'instance' => $thisinstance,
'group' => $page['access']['modify_access']['group'],
'level' => $page['access']['modify_access']['level'],
);
} catch (Exception $e) {
$args = array();
}*/
$data['pages'][$key]['edit_allowed'] = $adminaccess || $accessproperty->check($args);
/*
// Decide whether this page can be deleted by the current user
try {
$args = array(
'instance' => $thisinstance,
'group' => $page['access']['delete_access']['group'],
'level' => $page['access']['delete_access']['level'],
);
} catch (Exception $e) {
$args = array();
}*/
$data['pages'][$key]['delete_allowed'] = $adminaccess || $accessproperty->check($args);
}
}
return $data;
}
示例8: shop_admin_modifycustomer
/**
* Modify a customer
*/
function shop_admin_modifycustomer()
{
if (!xarVarFetch('itemid', 'id', $data['itemid'], NULL, XARVAR_DONT_SET)) {
return;
}
if (!xarVarFetch('confirm', 'bool', $data['confirm'], false, XARVAR_NOT_REQUIRED)) {
return;
}
$objectname = 'shop_customers';
$data['objectname'] = $objectname;
// Check if we still have no id of the item to modify.
if (empty($data['itemid'])) {
$msg = xarML('Invalid #(1) for #(2) function #(3)() in module #(4)', 'item id', 'admin', 'modify', 'shop');
throw new Exception($msg);
}
if (!xarSecurityCheck('AdminShop', 1, 'Item', $data['itemid'])) {
return;
}
sys::import('modules.dynamicdata.class.objects.master');
$object = DataObjectMaster::getObject(array('name' => $objectname));
$data['object'] = $object;
$data['label'] = $object->label;
$object->getItem(array('itemid' => $data['itemid']));
$values = $object->getFieldValues();
foreach ($values as $name => $value) {
$data[$name] = xarVarPrepForDisplay($value);
}
$rolesobject = DataObjectMaster::getObject(array('name' => 'roles_users'));
$rolesobject->getItem(array('itemid' => $data['itemid']));
if ($data['confirm']) {
// Check for a valid confirmation key
if (!xarSecConfirmAuthKey()) {
return xarTplModule('privileges', 'user', 'errors', array('layout' => 'bad_author'));
}
// Get the data from the form
$isvalid = $object->checkInput();
if (!$isvalid) {
// Bad data: redisplay the form with the data we picked up and with error messages
return xarTplModule('shop', 'admin', 'modifycustomer', $data);
} elseif (isset($data['preview'])) {
// Show a preview, same thing as the above essentially
return xarTplModule('shop', 'admin', 'modifycustomer', $data);
} else {
$first_name = $object->properties['first_name']->getValue();
$last_name = $object->properties['last_name']->getValue();
$rolesobject->properties['name']->setValue($first_name . ' ' . $last_name);
$rolesobject->updateItem();
$object->updateItem();
// Jump to the next page
xarResponse::redirect(xarModURL('shop', 'admin', 'modifycustomer', array('itemid' => $data['itemid'])));
return $data;
}
} else {
// Get that specific item of the object
$object->getItem(array('itemid' => $data['itemid']));
}
// Return the template variables defined in this function
return $data;
}
示例9: shop_user_newcustomer
/**
* Create a new customer
*/
function shop_user_newcustomer()
{
if (!xarVarFetch('objectid', 'id', $data['objectid'], NULL, XARVAR_DONT_SET)) {
return;
}
if (!xarVarFetch('returnurl', 'str', $returnurl, NULL, XARVAR_NOT_REQUIRED)) {
return;
}
sys::import('modules.dynamicdata.class.objects.master');
$rolesobject = DataObjectMaster::getObject(array('name' => 'roles_users'));
$data['properties'] = $rolesobject->properties;
// Check if we are in 'preview' mode from the input here - the rest is handled by checkInput()
// Here we are testing for a button clicked, so we test for a string
if (!xarVarFetch('preview', 'str', $data['preview'], NULL, XARVAR_DONT_SET)) {
return;
}
// Check if we are submitting the form
// Here we are testing for a hidden field we define as true on the template, so we can use a boolean (true/false)
if (!xarVarFetch('confirm', 'bool', $data['confirm'], false, XARVAR_NOT_REQUIRED)) {
return;
}
if ($data['confirm']) {
// Check for a valid confirmation key. The value is automatically gotten from the template
if (!xarSecConfirmAuthKey()) {
return xarTplModule('privileges', 'user', 'errors', array('layout' => 'bad_author'));
}
// Get the data from the form and see if it is all valid
// Either way the values are now stored in the object
$isvalid = $rolesobject->properties['email']->checkInput();
$isvalid2 = $rolesobject->properties['password']->checkInput();
if (!$isvalid || !$isvalid2) {
// Bad data: redisplay the form with the data we picked up and with error messages
return xarTplModule('shop', 'user', 'newcustomer', $data);
} else {
$email = $rolesobject->properties['email']->getValue();
$password = $rolesobject->properties['password']->getValue();
$rolesobject->properties['name']->setValue($email);
$rolesobject->properties['email']->setValue($email);
$rolesobject->properties['uname']->setValue($email);
$rolesobject->properties['password']->setValue($password);
$rolesobject->properties['state']->setValue(3);
$authmodule = (int) xarMod::getID('shop');
$rolesobject->properties['authmodule']->setValue($authmodule);
$uid = $rolesobject->createItem();
$custobject = DataObjectMaster::getObject(array('name' => 'shop_customers'));
$custobject->createItem(array('id' => $uid));
if (isset($returnurl)) {
xarMod::APIFunc('authsystem', 'user', 'login', array('uname' => $email, 'pass' => $password));
xarResponse::redirect($returnurl);
} else {
xarResponse::redirect(xarModURL('shop'));
}
// Always add the next line even if processing never reaches it
return true;
}
}
// Return the template variables defined in this function
return $data;
}
示例10: switch
/**
* Factory method that allows the creation of new objects
* @version $Id: factory.php,v 1.5 2003/06/24 21:30:30 roger Exp $
* @param string $class the name of the object to create
* @return object the created object
*/
function &calendar_userapi_factory($class)
{
static $calobject;
static $icalobject;
static $eventobject;
static $importobject;
static $exportobject;
static $alarmobject;
static $modinfo;
if (!isset($modinfo)) {
$modInfo =& xarMod::getInfo(xarMod::getRegID('calendar'));
}
switch (strtolower($class)) {
case 'calendar':
if (!isset($calobject)) {
sys::import("modules.{$modInfo['osdirectory']}.class.calendar");
$calobject =& new Calendar();
}
return $calobject;
break;
case 'ical_parser':
if (!isset($icalobject)) {
sys::import("modules.{$modInfo['osdirectory']}.class.ical_parser");
$icalobject =& new iCal_Parser();
}
return $icalobject;
break;
case 'event':
if (!isset($eventobject)) {
sys::import("modules.{$modInfo['osdirectory']}.class.event");
$eventobject =& new Event();
}
return $eventobject;
break;
/*
case 'import':
break;
case 'export':
break;
case 'alarm':
break;
*/
/*
case 'import':
break;
case 'export':
break;
case 'alarm':
break;
*/
default:
return;
break;
}
}
示例11: loadJPGraph
public static function loadJPGraph()
{
// load jpgraph function
sys::import('jpgraph.src.jpgraph');
sys::import('jpgraph.src.jpgraph_bar');
sys::import('jpgraph.src.jpgraph_flags');
sys::import('jpgraph.src.jpgraph_pie');
sys::import('jpgraph.src.jpgraph_line');
}
示例12: shop_admin_attributes
/**
* List the product attributes
*/
function shop_admin_attributes()
{
if (!xarVarFetch('startnum', 'isset', $data['startnum'], NULL, XARVAR_DONT_SET)) {
return;
}
if (!xarVarFetch('user_id', 'isset', $user_id, NULL, XARVAR_DONT_SET)) {
return;
}
$objectname = 'shop_attributes';
$data['objectname'] = $objectname;
// Security check - important to do this as early as possible to avoid
// potential security holes or just too much wasted processing
if (!xarSecurityCheck('AdminShop')) {
return;
}
$data['items_per_page'] = xarModVars::get('shop', 'items_per_page');
// Load the DD master object class. This line will likely disappear in future versions
sys::import('modules.dynamicdata.class.objects.master');
// Get the object label for the template
$object = DataObjectMaster::getObject(array('name' => $objectname));
$data['label'] = $object->label;
// Get the fields to display in the admin interface
$config = $object->configuration;
if (!empty($config['adminfields'])) {
$data['adminfields'] = $config['adminfields'];
} else {
$data['adminfields'] = array_keys($object->getProperties());
}
// Get the object we'll be working with. Note this is a so called object list
$mylist = DataObjectMaster::getObjectList(array('name' => $objectname));
// Load the DD master property class. This line will likely disappear in future versions
sys::import('modules.dynamicdata.class.properties.master');
$data['sort'] = xarMod::ApiFunc('shop', 'admin', 'sort', array('sortfield_fallback' => 'ID', 'ascdesc_fallback' => 'ASC'));
// We have some filters for the items
$filters = array('startnum' => $data['startnum'], 'status' => DataPropertyMaster::DD_DISPLAYSTATE_ACTIVE, 'sort' => $data['sort']);
if (isset($user_id)) {
$filters['where'] = 'user_id eq ' . $user_id;
}
// Get the items
$items = $mylist->getItems($filters);
if (isset($user_id)) {
// Get the object we'll be working with. Note this is a so called object list
$mylist2 = DataObjectMaster::getObjectList(array('name' => 'shop_customers'));
$filters = array();
if (isset($user_id)) {
$filters['where'] = 'ID eq ' . $user_id;
}
$items2 = $mylist2->getItems($filters);
$data['fname'] = $items2[$user_id]['FirstName'];
$data['lname'] = $items2[$user_id]['LastName'];
}
$data['mylist'] = $mylist;
// Return the template variables defined in this function
return $data;
}
示例13: ws_proccess
function ws_proccess($search, $getParams, $controller, $postParams, $jsonItems, $start, $limit)
{
$GLOBALS["Webi_PageTime"] = microtime(true);
include 'lib/bootstrap.php';
/* Load Webi Core */
sys::import('webi.core');
wbCore::init();
$_GET['jsonItems'] = $jsonItems;
if (!empty($getParams)) {
$getParams =& wbUtil::jsonDecode($getParams);
} else {
$getParams = array();
}
if (json_decode($postParams) > 0) {
$postParams = json_decode($postParams);
} else {
$postParams = array();
}
$controller =& wbUtil::jsonDecode($controller);
$type = $controller['type'];
if (!empty($getParams)) {
foreach ($getParams as $key => $value) {
$_GET[$key] = $value;
}
}
if (!empty($postParams)) {
foreach ($postParams as $key => $value) {
$_POST[$key] = $value;
}
}
$_GET['module'] = $controller['module'];
$_GET['class'] = $controller['class'];
$_GET['method'] = $controller['method'];
list($module, $class, $method) = wbRequest::getController();
$callback = wbRequest::getVarClean('callback');
if (!wbModule::isAvailable($module, $class, $type)) {
header("HTTP/1.1 400 Bad Request");
return;
}
try {
$result = wbModule::call($module, $class, $method, array(), $type);
} catch (Exception $e) {
$result = array('items' => array(), 'total' => 0, 'success' => false, 'message' => $e->getMessage());
}
$return = array();
$return['success'] = $result['success'];
$return['message'] = $result['message'];
$return['total'] = (int) $result['total'];
$return['data'] = $result['items'];
$return['current'] = (int) $result['current'];
$return['rowCount'] = (int) $result['rowCount'];
$return = base64_encode(serialize($return));
return $return;
}
示例14: publications_userapi_fieldoutput
/**
* Show some predefined form field in a template
*
* @param $args array containing the definition of the field (object, itemid, property, value, ...)
* @return string containing the HTML (or other) text to output in the BL template
*/
function publications_userapi_fieldoutput($args)
{
extract($args);
if (!isset($object) || !isset($itemid) || !isset($field)) {
return '';
}
sys::import('modules.dynamicdata.class.objects.master');
$object = DataObjectMaster::getObject(array('name' => $object));
$itemid = xarMod::apiFunc('publications', 'user', 'gettranslationid', array('id' => $itemid));
$object->getItem(array('itemid' => $itemid));
$field = $object->properties[$field]->getValue();
return $field;
}
示例15: shop_admin_newproduct
/**
* Create a new product
*/
function shop_admin_newproduct()
{
// See if the current user has the privilege to add an item. We cannot pass any extra arguments here
if (!xarSecurityCheck('Addshop')) {
return;
}
if (!xarVarFetch('objectid', 'id', $data['objectid'], NULL, XARVAR_DONT_SET)) {
return;
}
$objectname = 'shop_products';
$data['objectname'] = $objectname;
// Load the DD master object class. This line will likely disappear in future versions
sys::import('modules.dynamicdata.class.objects.master');
$object = DataObjectMaster::getObject(array('name' => $objectname));
$data['label'] = $object->label;
$data['object'] = $object;
// Check if we are in 'preview' mode from the input here - the rest is handled by checkInput()
// Here we are testing for a button clicked, so we test for a string
if (!xarVarFetch('preview', 'str', $data['preview'], NULL, XARVAR_DONT_SET)) {
return;
}
// Check if we are submitting the form
// Here we are testing for a hidden field we define as true on the template, so we can use a boolean (true/false)
if (!xarVarFetch('confirm', 'bool', $data['confirm'], false, XARVAR_NOT_REQUIRED)) {
return;
}
if ($data['confirm']) {
// Check for a valid confirmation key. The value is automatically gotten from the template
if (!xarSecConfirmAuthKey()) {
return xarTplModule('privileges', 'user', 'errors', array('layout' => 'bad_author'));
}
// Get the data from the form and see if it is all valid
// Either way the values are now stored in the object
$isvalid = $data['object']->checkInput();
if (!$isvalid) {
// Bad data: redisplay the form with the data we picked up and with error messages
return xarTplModule('shop', 'admin', 'newproduct', $data);
} elseif (isset($data['preview'])) {
// Show a preview, same thing as the above essentially
return xarTplModule('shop', 'admin', 'newproduct', $data);
} else {
$itemid = $data['object']->createItem();
// Jump to the next page
xarResponse::redirect(xarModURL('shop', 'admin', 'products'));
return true;
}
}
// Return the template variables defined in this function
return $data;
}