示例#1
0
文件: vote.php 项目: q0821/esportshop
 function __construct($config = array(), $skip = false)
 {
     parent::__construct($config, $skip);
     if (!$skip) {
         $this->registerDefaultTask('save');
     }
     $this->display[] = 'save';
 }
示例#2
0
文件: user.php 项目: q0821/esportshop
 function downloads()
 {
     if (!$this->_checkLogin()) {
         return true;
     }
     JRequest::setVar('layout', 'downloads');
     return parent::display();
 }
示例#3
0
文件: report.php 项目: rodhoff/MNW
 function __construct($config = array())
 {
     $this->modify[] = 'apply_table';
     parent::__construct($config);
     $this->modify_views[] = 'tableform';
     $this->display[] = 'csv';
     $this->display[] = 'edit';
 }
示例#4
0
 function __construct()
 {
     parent::__construct();
     $this->db = JFactory::getDBO();
     $this->modify[] = 'import';
     $this->registerDefaultTask('show');
     $this->helper = hikashop_get('helper.import');
 }
示例#5
0
 function __construct($config = array(), $skip = false)
 {
     $this->display[] = 'update';
     if (!$skip) {
         parent::__construct($config, $skip);
         $this->registerDefaultTask('update');
     }
     JRequest::setVar('tmpl', 'component');
 }
示例#6
0
文件: dashboard.php 项目: rodhoff/MNW
 function __construct($config = array())
 {
     $this->display = array('listing', 'csv', 'cpanel');
     $this->modify_views = array('edit');
     $this->add = array('add');
     $this->modify = array('save');
     $this->delete = array('delete', 'remove');
     parent::__construct($config);
 }
示例#7
0
 function export()
 {
     $cids = JRequest::getVar('cid');
     if (!empty($cids)) {
         $_SESSION['hikashop']['entries'] = $cids;
     } else {
         $_SESSION['hikashop']['entries'] = '';
     }
     JRequest::setVar('layout', 'export');
     return parent::display();
 }
示例#8
0
 function __construct($config = array(), $skip = false)
 {
     parent::__construct($config, $skip);
     $this->display = array('');
     $this->modify_views = array('form', 'edit', 'newentry', 'save');
     $this->add = array();
     $this->modify = array();
     $this->delete = array();
     if (!$skip) {
         $this->registerDefaultTask('edit');
     }
 }
示例#9
0
 function __construct($config = array(), $skip = false)
 {
     parent::__construct($config, $skip);
     $this->display = array('clicks', 'leads', 'sales', 'cancel', '');
     $this->modify_views = array('show');
     $this->add = array();
     $this->modify = array('save', 'apply');
     $this->delete = array();
     if (!$skip) {
         $this->registerDefaultTask('show');
     }
 }
示例#10
0
 function edit()
 {
     if (JRequest::getInt('fromjoomla')) {
         $app = JFactory::getApplication();
         $context = 'com_modules.edit.module';
         $id = hikashop_getCID('id');
         if ($id) {
             $values = (array) $app->getUserState($context . '.id');
             $index = array_search((int) $id, $values, true);
             if (is_int($index)) {
                 unset($values[$index]);
                 $app->setUserState($context . '.id', $values);
             }
         }
     }
     return parent::edit();
 }
示例#11
0
 public function galleryimage()
 {
     $upload_key = JRequest::getVar('field', '');
     if (empty($this->controller)) {
         return false;
     }
     $uploadConfig = $this->controller->getUploadSetting($upload_key, 'galleryimage');
     if ($uploadConfig === false) {
         return false;
     }
     if (!empty($uploadConfig['type']) && $uploadConfig['type'] != 'image') {
         return false;
     }
     JRequest::setVar('layout', 'galleryimage');
     JRequest::setVar('uploadConfig', $uploadConfig);
     return parent::display();
 }
示例#12
0
 function listing()
 {
     $user = JFactory::getUser();
     if ($user->guest) {
         $app = JFactory::getApplication();
         $app->enqueueMessage(JText::_('PLEASE_LOGIN_FIRST'));
         global $Itemid;
         $url = '';
         if (!empty($Itemid)) {
             $url = '&Itemid=' . $Itemid;
         }
         if (version_compare(JVERSION, '1.6', '<')) {
             $url = 'index.php?option=com_user&view=login' . $url;
         } else {
             $url = 'index.php?option=com_users&view=login' . $url;
         }
         $app->redirect(JRoute::_($url . '&return=' . urlencode(base64_encode(hikashop_currentUrl('', false))), false));
         return false;
     }
     return parent::listing();
 }
示例#13
0
 public function addcharacteristic_ajax()
 {
     JRequest::checkToken('request') || die('Invalid Token');
     $tmpl = JRequest::getCmd('tmpl', '');
     $characteristic_parent_id = JRequest::getInt('characteristic_parent_id', 0);
     $characteristic_type = JRequest::getCmd('characteristic_type', '');
     $value = JRequest::getString('value', '');
     if (empty($value)) {
         return false;
     }
     $value = trim($value);
     $vendor_id = 0;
     $ret = false;
     if ($characteristic_type == 'value') {
         if (!hikashop_acl('characteristic/values/add')) {
             return false;
         }
         if ($characteristic_parent_id <= 0) {
             return false;
         }
         $characteristicClass = hikashop_get('class.characteristic');
         $characteristic_vendor_id = $vendor_id;
         if ($characteristic_vendor_id == 0 && hikashop_acl('characteristic/values/edit/vendor')) {
             $characteristic_vendor_id = (int) JRequest::getInt('characteristic_vendor_id', 0);
         }
         if ($characteristicClass->findValue($value, $characteristic_parent_id, $characteristic_vendor_id) > 0) {
             return false;
         }
         // hikamarket::deny('vendor', JText::sprintf('HIKAM_ACTION_ERROR', JText::_('HIKAM_WRONG_DATA')));
         $element = new stdClass();
         $element->characteristic_parent_id = $characteristic_parent_id;
         $element->characteristic_value = $value;
         if (!empty($characteristic_vendor_id)) {
             $element->characteristic_vendor_id = $characteristic_vendor_id;
         }
         $ret = $characteristicClass->save($element);
     } else {
         if (!hikashop_acl('characteristic/add')) {
             return false;
         }
         $characteristicClass = hikashop_get('class.characteristic');
         $characteristic_vendor_id = $vendor_id;
         if ($characteristic_vendor_id == 0 && hikashop_acl('characteristic/edit/vendor')) {
             $characteristic_vendor_id = (int) JRequest::getInt('characteristic_vendor_id', 0);
         }
         if ($characteristicClass->findValue($value, 0, $characteristic_vendor_id) > 0) {
             return false;
         }
         $element = new stdClass();
         $element->characteristic_parent_id = 0;
         $element->characteristic_value = $value;
         $element->characteristic_alias = strtolower($value);
         $ret = $characteristicClass->save($element);
     }
     if ($tmpl == 'json') {
         if (!empty($ret)) {
             $data = array('value' => $ret, 'name' => $value);
             echo json_encode($data);
         } else {
             echo '{err:"failed"}';
         }
         exit;
     }
     JRequest::setVar('layout', 'listing');
     return parent::display();
 }
示例#14
0
 function results()
 {
     JRequest::setVar('layout', 'results');
     return parent::display();
 }
示例#15
0
文件: shipping.php 项目: rodhoff/MNW
 function __construct($config = array())
 {
     parent::__construct($config);
     $this->modify_views[] = 'unpublish';
     $this->modify_views[] = 'publish';
 }
示例#16
0
文件: currency.php 项目: rodhoff/MNW
 function __construct()
 {
     parent::__construct();
     $this->modify[] = 'update';
 }
示例#17
0
 function display($cachable = false, $urlparams = array())
 {
     static $done = false;
     $result = true;
     if (!$done) {
         $done = true;
         $result = parent::display();
     }
     return $result;
 }
示例#18
0
文件: order.php 项目: rodhoff/MNW
 public function product_create()
 {
     $formData = JRequest::getVar('data', array(), '', 'array');
     $product_quantity = -1;
     if (isset($formData['order']['product']['order_product_quantity'])) {
         $product_quantity = (int) $formData['order']['product']['order_product_quantity'];
     }
     if ($product_quantity >= 0) {
         $orderClass = hikashop_get('class.order');
         $status = $orderClass->saveForm('products');
         if ($status) {
             JRequest::setVar('cid', $status);
             JRequest::setVar('fail', null);
         }
     } else {
         JRequest::setVar('layout', 'edit_products');
         return parent::display();
     }
     return $this->show_products();
 }
示例#19
0
 function selectstatus()
 {
     JRequest::setVar('layout', 'selectstatus');
     return parent::display();
 }
示例#20
0
文件: choose.php 项目: rodhoff/MNW
 function filters()
 {
     JRequest::setVar('layout', 'filters');
     return parent::display();
 }
示例#21
0
文件: zone.php 项目: q0821/esportshop
 function newchild()
 {
     JRequest::setVar('layout', 'newchildform');
     return parent::display();
 }
示例#22
0
文件: cart.php 项目: q0821/esportshop
 public function customer_save()
 {
     $class = hikashop_get('class.cart');
     if ($class === null) {
         return false;
     }
     $cart = new stdClass();
     $cart->cart_id = JRequest::getVar('cart_id', '0');
     $cart->user_id = JRequest::getVar('user_id', '0');
     $cart->session_id = JRequest::getVar('session_id', '0');
     $status = $class->save($cart);
     if ($status) {
         JRequest::setVar('cid', $status);
     }
     JRequest::setVar('layout', 'form');
     return parent::display();
 }
示例#23
0
文件: stats.php 项目: rodhoff/MNW
 function __construct($config = array())
 {
     parent::__construct($config);
 }
示例#24
0
 function checkdb()
 {
     $databaseHelper = hikashop_get('helper.database');
     $html = $databaseHelper->checkdb();
     JRequest::setVar('layout', 'checkdb');
     return parent::display();
 }
示例#25
0
 function state()
 {
     JRequest::setVar('layout', 'state');
     return parent::display();
 }
示例#26
0
 function useselection()
 {
     JRequest::setVar('layout', 'useselection');
     return parent::display();
 }
示例#27
0
文件: product.php 项目: rodhoff/MNW
 public function __construct($config = array(), $skip = false)
 {
     parent::__construct($config, $skip);
     $this->display = array_merge($this->display, array('updatecart', 'cart', 'cleancart', 'contact', 'compare', 'waitlist', 'send_email', 'add_waitlist', 'price', 'download', 'printcart', 'sendcart'));
 }
示例#28
0
文件: cart.php 项目: q0821/esportshop
 function setcurrent()
 {
     $app = JFactory::getApplication();
     $db = JFactory::getDBO();
     $cart_id = JRequest::getVar('cart_id', '0');
     $cart_type = JRequest::getString('cart_type', 'cart');
     $cartClass = hikashop_get('class.cart');
     $cartClass->cart_type = $cart_type;
     $cartInfo = $cartClass->loadCart($cart_id);
     $currUser = hikashop_loadUser(true);
     if ($cartInfo != null && $currUser->user_cms_id == $cartInfo->user_id) {
         $result = $cartClass->setCurrent($cart_id, $cart_type);
         if ($result) {
             $app->setUserState(HIKASHOP_COMPONENT . '.' . $cart_type . '_id', $cart_id);
         }
     }
     JRequest::setVar('layout', 'showcarts');
     return parent::display();
 }
示例#29
0
 function __construct($config = array())
 {
     parent::__construct($config);
     $this->modify[] = 'trigger';
 }