Ejemplo n.º 1
0
 public function show()
 {
     JRequest::setVar('layout', 'show_order_back_show');
     $tmpl = JRequest::getString('tmpl', '');
     if ($tmpl === 'component') {
         ob_end_clean();
         parent::display();
         exit;
     }
     return parent::display();
 }
Ejemplo n.º 2
0
 public function remove()
 {
     JRequest::checkToken() || die('Invalid Token');
     $cids = JRequest::getVar('cid', array(), '', 'array');
     $serialClass = hikaserial::get('class.serial');
     $num = $serialClass->delete($cids);
     if ($num) {
         $app = JFactory::getApplication();
         $app->enqueueMessage(JText::sprintf('SUCC_DELETE_ELEMENTS', count($cids)), 'message');
     }
     return parent::listing();
 }
Ejemplo n.º 3
0
 public function import()
 {
     JRequest::checkToken('request') || die('Invalid Token');
     $importFrom = JRequest::getCmd('importfrom');
     $this->helper = hikaserial::get('helper.import');
     switch ($importFrom) {
         case 'csv':
             $this->importCsvFile();
             break;
         case 'textarea':
             $this->importTextarea();
             break;
     }
     JRequest::setVar('layout', 'show');
     return parent::display();
 }
Ejemplo n.º 4
0
 public function useselection()
 {
     if (!hikaserial::initMarket()) {
         return false;
     }
     if (!hikamarket::loginVendor()) {
         return false;
     }
     $marketConfig = hikamarket::config();
     if (!$marketConfig->get('frontend_edition', 0)) {
         return false;
     }
     if (!hikamarket::acl('product_edit_plugin_hikaserial')) {
         return hikamarket::deny('vendor', JText::sprintf('HIKAM_ACTION_DENY', JText::sprintf('HIKAM_ACT_PLUGIN', HIKASERIAL_NAME)));
     }
     JRequest::setVar('layout', 'useselection');
     return parent::display();
 }
Ejemplo n.º 5
0
 public function download()
 {
     $app = JFactory::getApplication();
     JRequest::setVar('layout', 'consume');
     $order_id = hikaserial::getCID('order_id');
     $file_id = JRequest::getInt('file_id');
     $file_pos = JRequest::getInt('file_pos', 1);
     $serial = JRequest::getString('serial', '');
     if (empty($order_id)) {
         return parent::display();
     }
     $downloadClass = hikaserial::get('class.download');
     $ret = $downloadClass->downloadHikaShopFile($file_id, $order_id, $file_pos, $serial);
     if ($ret !== true) {
         switch ($ret) {
             case 'login':
                 break;
             case 'no_order':
                 break;
             default:
                 break;
         }
     }
     return parent::display();
 }
Ejemplo n.º 6
0
 protected function toggle($cid, $publish)
 {
     if (empty($cid)) {
         JError::raiseWarning(500, 'No items selected');
     }
     $this->plugin = JRequest::getCmd('name', '');
     $this->plugin_type = JRequest::getCmd('plugin_type', 'generator');
     if (empty($this->plugin) || !in_array($this->plugin_type, array('generator', 'consumer', 'plugin'))) {
         return false;
     }
     $data = hikaserial::import('hikaserial', $this->plugin);
     if ($data === false) {
         return false;
     }
     if (!$data->isMultiple()) {
         JError::raiseWarning(500, 'Not allowed');
     }
     if (isset($data->toggle)) {
         $this->toggle = $data->toggle;
     } else {
         $this->toggle = array($this->type . '_published' => $this->type . '_id');
     }
     JRequest::setVar('subtask', '');
     $this->publish_return_view = 'edit';
     return parent::toggle($cid, $publish);
 }
Ejemplo n.º 7
0
 public function useselection()
 {
     JRequest::setVar('layout', 'useselection');
     return parent::display();
 }
Ejemplo n.º 8
0
 public function share()
 {
     JRequest::checkToken() || die('Invalid Token');
     if ($this->savelng()) {
         JRequest::setVar('layout', 'share');
         return parent::display();
     }
     return $this->language();
 }
Ejemplo n.º 9
0
 public function __construct($config = array())
 {
     parent::__construct($config);
 }