Exemplo n.º 1
0
    function listing()
    {
        hikashop_setTitle(JText::_('DOCUMENTATION'), 'help_header', 'documentation');
        if (!HIKASHOP_PHP5) {
            $bar =& JToolBar::getInstance('toolbar');
        } else {
            $bar = JToolBar::getInstance('toolbar');
        }
        $bar->appendButton('Link', 'hikashop', JText::_('HIKASHOP_CPANEL'), hikashop_completeLink('dashboard'));
        $config =& hikashop_config();
        $level = $config->get('level');
        $url = HIKASHOP_HELPURL . 'documentation&level=' . $level;
        if (hikashop_isSSL()) {
            $url = str_replace('http://', 'https://', $url);
        }
        $config =& hikashop_config();
        $menu_style = $config->get('menu_style', 'title_bottom');
        if (HIKASHOP_J30) {
            $menu_style = 'content_top';
        }
        if ($menu_style == 'content_top') {
            echo hikashop_getMenu('', $menu_style);
        }
        ?>
				<div id="hikashop_div">
						<iframe allowtransparency="true" scrolling="auto" height="450px" frameborder="0" width="100%" name="hikashop_frame" id="hikashop_frame" src="<?php 
        echo $url;
        ?>
">
						</iframe>
				</div>
<?php 
    }
Exemplo n.º 2
0
 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;
 }
Exemplo n.º 3
0
Arquivo: reds.php Projeto: rodhoff/MNW
 function importFromRedshop()
 {
     @ob_clean();
     echo $this->getHtmlPage();
     $this->token = hikashop_getFormToken();
     flush();
     if (isset($_GET['import']) && $_GET['import'] == '1') {
         $time = microtime(true);
         $processed = $this->doImport();
         if ($processed) {
             $elasped = microtime(true) - $time;
             if (!$this->refreshPage) {
                 echo '<p></br><a' . $this->linkstyle . 'href="' . hikashop_completeLink('import&task=import&importfrom=redshop&' . $this->token . '=1&import=1&time=' . time()) . '">' . JText::_('HIKA_NEXT') . '</a></p>';
             }
             echo '<p style="font-size:0.85em; color:#605F5D;">Elasped time: ' . round($elasped * 1000, 2) . 'ms</p>';
         } else {
             echo '<a' . $this->linkstyle . 'href="' . hikashop_completeLink('import&task=show') . '">' . JText::_('HIKA_BACK') . '</a>';
         }
     } else {
         echo $this->getStartPage();
     }
     if ($this->refreshPage) {
         echo "<script type=\"text/javascript\">\r\nr = true;\r\n</script>";
     }
     echo '</body></html>';
     exit;
 }
Exemplo n.º 4
0
 function save()
 {
     if ($this->store()) {
         echo '<html><head><script type="text/javascript">parent.window.location.href=\'' . hikashop_completeLink('dashboard', false, true) . '\';</script></head><body></body></html>';
         exit;
     }
 }
Exemplo n.º 5
0
 function cancel()
 {
     $dashboard = JRequest::getVar('dashboard');
     if ($dashboard) {
         $this->setRedirect(hikashop_completeLink('dashboard', false, true));
     } else {
         $this->setRedirect(hikashop_completeLink('report', false, true));
     }
 }
Exemplo n.º 6
0
 function cancel()
 {
     $app = JFactory::getApplication();
     global $Itemid;
     $url = '';
     if (!empty($Itemid)) {
         $url = '&Itemid=' . $Itemid;
     }
     $app->redirect(hikashop_completeLink('user' . $url, false, true));
 }
Exemplo n.º 7
0
 function update()
 {
     hikashop_setTitle(JText::_('UPDATE_ABOUT'), 'install', 'update');
     if (!HIKASHOP_PHP5) {
         $bar =& JToolBar::getInstance('toolbar');
     } else {
         $bar = JToolBar::getInstance('toolbar');
     }
     $bar->appendButton('Link', 'hikashop', JText::_('HIKASHOP_CPANEL'), hikashop_completeLink('dashboard'));
     return $this->_iframe(HIKASHOP_UPDATEURL . 'update');
 }
Exemplo n.º 8
0
 function form()
 {
     $user = JFactory::getUser();
     if ($user->guest) {
         JRequest::setVar('layout', 'form');
         return $this->display();
     } else {
         $app = JFactory::getApplication();
         $app->redirect(hikashop_completeLink('user&task=cpanel', false, true));
         return false;
     }
 }
Exemplo n.º 9
0
 function display($map, $value, $option = '', $id, $widget_id = null, $row_id = null, $widget_display = null)
 {
     $this->load();
     $js = "\r\nfunction updateDisplay(){\r\n\tvar d = document, oldType = displayType, values = new Array('gauge', 'column', 'graph', 'line', 'pie', 'area', 'map', 'listing', 'table');\r\n\tfor(var i=0; i < values.length; i++){\r\n\t\tvar newType = d.getElementById('widget_display_'+values[i]).checked;\r\n\t\tif(newType){\r\n\t\t\tdisplayType = d.getElementById('widget_display_'+values[i]).value;\r\n\t\t}\r\n\t}\r\n\tif(displayType=='table'){\r\n\t\td.getElementById('widget_type').style.display='none';\r\n\t\tif(d.getElementById('widget_options'))d.getElementById('widget_options').style.display='none';\r\n\t\td.getElementById('widget_date').style.display='none';\r\n\t\td.getElementById('widget_group').style.display='none';\r\n\t\td.getElementById('widget_period').style.display='none';\r\n\t\td.getElementById('products_options').style.display='none';\r\n\t\td.getElementById('filters').style.display='none';\r\n\t\td.getElementById('customers_options').style.display='none';\r\n\t\td.getElementById('partners_options').style.display='none';\r\n\t\td.getElementById('orders_options').style.display='none';\r\n\t\td.getElementById('product_datas').style.display='none';\r\n\t\td.getElementById('widget_compare').style.display='none';\r\n\t\td.getElementById('widget_limit').style.display='none';\r\n\t\td.getElementById('map_options').style.display='none';\r\n\t}else{\r\n\t\tvar show = new Array('widget_type', 'widget_options', 'filters','widget_date', 'widget_specific_options', 'widget_compare', 'widget_group','widget_period','widget_limit','type_listing_sales','type_listing_taxes','partners_button','customers_button');\r\n\t\tvar hide = new Array('type_listing_discounts','orders_options', 'widget_region','products_options','customers_options','partners_options','type_listing_prod','type_listing_cat','map_options');\r\n\r\n\t\tfor(var i = 0; i < show.length; i++ ) {\r\n\t\t\tvar e = d.getElementById(show[i]);\r\n\t\t\tif(e) {\r\n\t\t\t\te.style.display = '';\r\n\t\t\t} else {\r\n\t\t\t}\r\n\t\t}\r\n\t\tfor(var i = 0; i < hide.length; i++ ) {\r\n\t\t\tvar e = d.getElementById(hide[i]);\r\n\t\t\tif(e) {\r\n\t\t\t\te.style.display = 'none';\r\n\t\t\t} else {\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(displayType=='map'){\r\n\t\t\tupdateDisplayType();\r\n\t\t}\r\n\t\tif(displayType=='listing'){\r\n\t\t\td.getElementById('type_listing_prod').style.display='';\r\n\t\t\td.getElementById('type_listing_cat').style.display='';\r\n\t\t\td.getElementById('type_listing_discounts').style.display='';\r\n\t\t\td.getElementById('type_listing_sales').style.display='none';\r\n\t\t\td.getElementById('type_listing_taxes').style.display='none';\r\n\t\t\td.getElementById('widget_compare').style.display='none';\r\n\t\t\tupdateDisplayType();\r\n\t\t}\r\n\t\tif(displayType=='gauge' || displayType=='pie' || displayType=='map'){\r\n\t\t\td.getElementById('widget_compare').style.display='none';\r\n\t\t\td.getElementById('widget_limit').style.display='none';\r\n\t\t}\r\n\t\tif(displayType=='listing' || displayType=='pie' || displayType=='map'){\r\n\t\t\td.getElementById('widget_group').style.display='none';\r\n\t\t}\r\n\t\tif(displayType=='map'){\r\n\t\t\td.getElementById('widget_region').style.display='';\r\n\t\t}\r\n\t\tif(displayType=='pie'){\r\n\t\t\td.getElementById('partners_button').style.display='none';\r\n\t\t\td.getElementById('customers_button').style.display='none';\r\n\t\t}\r\n\t\tupdateDisplayType();\r\n\t}\r\n}\r\n\r\nfunction displayTablePopup(){\r\n\tvar d = document, values = new Array('gauge', 'column', 'graph', 'line', 'pie', 'area', 'map', 'listing', 'table');\r\n\tfor(var i=0; i<values.length; i++){\r\n\t\tnewType = d.getElementById('widget_display_'+values[i]).checked;\r\n\t\tif(newType==true){\r\n\t\t\tdisplayType = d.getElementById('widget_display_'+values[i]).value;\r\n\t\t}\r\n\t}\r\n\r\n\twidget_display='" . $widget_display . "';\r\n\tif(displayType!='table' || widget_display=='table'){ return 0; }\r\n\td.getElementById('widget_display_'+widget_display).checked=true;\r\n\tupdateDisplay();\r\n\thikashop.openBox('table_popup_link','" . hikashop_completeLink('report&task=tableform&widget_id=' . $widget_id . '&row_id=' . $row_id . '&first=true', true, true) . "');\r\n}\r\n\r\nwindow.hikashop.ready( function(){ updateDisplay(); });";
     if (!HIKASHOP_PHP5) {
         $doc =& JFactory::getDocument();
     } else {
         $doc = JFactory::getDocument();
     }
     $doc->addScriptDeclaration($js);
     return '<a href="#" rel="{handler: \'iframe\', size: {x: 760, y: 480}}" style="display:none;" id="table_popup_link"></a>' . JHTML::_('hikaselect.radiolist', $this->values, $map, 'class="inputbox" size="1" onchange="updateDisplay(); displayTablePopup();"' . $option, 'value', 'text', $value, $id . '_');
 }
Exemplo n.º 10
0
Arquivo: tax.php Projeto: rodhoff/MNW
 function cancel()
 {
     $return = JRequest::getString('return');
     if (!empty($return)) {
         if (strpos($return, HIKASHOP_LIVE) === false && preg_match('#^https?://.*#', $return)) {
             return false;
         }
         $this->setRedirect(hikashop_completeLink(urldecode($return), false, true));
     } else {
         return $this->listing();
     }
     return true;
 }
Exemplo n.º 11
0
 function wizard()
 {
     $db = JFactory::getDBO();
     hikashop_setTitle(JText::_('HIKA_WIZARD'), 'config', 'update&task=wizard');
     if (!HIKASHOP_PHP5) {
         $bar =& JToolBar::getInstance('toolbar');
     } else {
         $bar = JToolBar::getInstance('toolbar');
     }
     $bar->appendButton('Link', 'hikashop', JText::_('HIKA_SKIP'), hikashop_completeLink('update&task=post_install&fromversion=&update=0'));
     $languagesCodes = array();
     $languagesNames = array();
     if (HIKASHOP_J25) {
         $db->setQuery('SELECT * FROM ' . hikashop_table('languages', false) . ' WHERE `published` = 1');
         $languages = $db->loadObjectList();
         foreach ($languages as $language) {
             $path = JLanguage::getLanguagePath(JPATH_ROOT) . DS . $language->lang_code . DS . $language->lang_code . '.com_hikashop.ini';
             if (!JFile::exists($path)) {
                 $languagesCodes[] = $language->lang_code;
                 $languagesNames[] = $language->title;
             }
         }
     }
     if (!empty($languagesCodes)) {
         $languageCodes = implode('_', $languagesCodes);
     }
     if (!empty($languagesNames)) {
         $languagesNames = implode(', ', $languagesNames);
     }
     $this->assignRef('languageCodes', $languageCodes);
     $this->assignRef('languageNames', $languagesNames);
     $fieldsClass = hikashop_get('class.field');
     $this->assignRef('fieldsClass', $fieldsClass);
     static $Itemid;
     if (isset($Itemid) && !empty($Itemid)) {
         $url_itemid = '&item_id=' . $Itemid;
     } else {
         $url_itemid = '';
     }
     $address = new stdClass();
     $extraFields = array();
     $extraFields['address'] = $fieldsClass->getFields('frontcomp', $address, 'address', 'update&task=state' . $url_itemid);
     $this->assignRef('extraFields', $extraFields);
     $this->assignRef('address', $address);
     $db->setQuery('SELECT * FROM ' . hikashop_table('currency') . ' WHERE 1 ORDER BY `currency_code`');
     $currencies = $db->loadObjectList();
     $this->assignRef('currencies', $currencies);
     hikashop_loadJslib('jquery');
     $app = JFactory::getApplication();
     $app->enqueueMessage(JText::_('WELCOME_WIZARD', 'success'));
 }
Exemplo n.º 12
0
 function display($map, $value, $type, $parent_value, $object = null)
 {
     $this->load($type, $object);
     if (!count($this->values)) {
         return JText::_('AT_LEAST_ONE_FIELD_PUBLISHED');
     }
     if (is_array($parent_value)) {
         $parent_value = implode(',', $parent_value);
     }
     $url = hikashop_completeLink('field&task=parentfield&type=' . $type . '&value=' . $parent_value, true, true);
     $js = "\n\t\tfunction hikashopLoadParent(namekey){\n\t\t\ttry{\n\t\t\t\tnew Ajax('" . $url . "&namekey='+namekey, { method: 'get', onComplete: function(result) { old = window.document.getElementById('parent_value'); if(old){ old.innerHTML = result;}}}).request();\n\t\t\t}catch(err){\n\t\t\t\tnew Request({url:'" . $url . "&namekey='+namekey, method: 'get', onComplete: function(result) { old = window.document.getElementById('parent_value'); if(old){ old.innerHTML = result;}}}).send();\n\t\t\t}\n\t\t}\n\t\twindow.hikashop.ready(function(){\n\t\t\thikashopLoadParent(document.getElementById('limit_parent_select').value);\n\t\t});\n\t\t";
     $doc = JFactory::getDocument();
     $doc->addScriptDeclaration($js);
     return JHTML::_('select.genericlist', $this->values, $map, 'class="inputbox" size="1" onChange="hikashopLoadParent(this.value);"', 'value', 'text', $value, 'limit_parent_select');
 }
Exemplo n.º 13
0
 function cpanel()
 {
     $config =& hikashop_config();
     global $Itemid;
     $url_itemid = '';
     if (!empty($Itemid)) {
         $url_itemid = '&Itemid=' . $Itemid;
     }
     $buttons = array();
     $buttons['address'] = array('link' => hikashop_completeLink('address' . $url_itemid), 'level' => 0, 'image' => 'address', 'text' => JText::_('ADDRESSES'), 'description' => '<ul><li>' . JText::_('MANAGE_ADDRESSES') . '</li></ul>');
     $buttons['order'] = array('link' => hikashop_completeLink('order' . $url_itemid), 'level' => 0, 'image' => 'order', 'text' => JText::_('ORDERS'), 'description' => '<ul><li>' . JText::_('VIEW_ORDERS') . '</li></ul>');
     if (hikashop_level(1)) {
         if ($config->get('enable_multicart')) {
             $buttons['cart'] = array('link' => hikashop_completeLink('cart&task=showcarts&cart_type=cart' . $url_itemid), 'level' => 0, 'image' => 'cart', 'text' => JText::_('CARTS'), 'description' => '<ul><li>' . JText::_('DISPLAY_THE_CARTS') . '</li></ul>');
         } else {
             $buttons['cart'] = array('link' => hikashop_completeLink('cart&task=showcart&cart_type=cart' . $url_itemid), 'level' => 0, 'image' => 'cart', 'text' => JText::_('CARTS'), 'description' => '<ul><li>' . JText::_('DISPLAY_THE_CART') . '</li></ul>');
         }
         if ($config->get('enable_wishlist')) {
             if ($config->get('enable_multicart')) {
                 $buttons['wishlist'] = array('link' => hikashop_completeLink('cart&task=showcarts&cart_type=wishlist' . $url_itemid), 'level' => 0, 'image' => 'wishlist', 'text' => JText::_('WISHLISTS'), 'description' => '<ul><li>' . JText::_('DISPLAY_THE_WISHLISTS') . '</li></ul>');
             } else {
                 $buttons['wishlist'] = array('link' => hikashop_completeLink('cart&task=showcart&cart_type=wishlist' . $url_itemid), 'level' => 0, 'image' => 'wishlist', 'text' => JText::_('WISHLISTS'), 'description' => '<ul><li>' . JText::_('DISPLAY_THE_WISHLIST') . '</li></ul>');
             }
         }
         if ($config->get('enable_customer_downloadlist')) {
             $buttons['download'] = array('link' => hikashop_completeLink('user&task=downloads' . $url_itemid), 'level' => 0, 'image' => 'downloads', 'text' => JText::_('DOWNLOADS'), 'description' => '<ul><li>' . JText::_('DISPLAY_THE_DOWNLOADS') . '</li></ul>');
         }
     }
     JPluginHelper::importPlugin('hikashop');
     JPluginHelper::importPlugin('hikashoppayment');
     JPluginHelper::importPlugin('hikashopshipping');
     $dispatcher = JDispatcher::getInstance();
     $dispatcher->trigger('onUserAccountDisplay', array(&$buttons));
     $this->assignRef('buttons', $buttons);
     if (!HIKASHOP_PHP5) {
         $app =& JFactory::getApplication();
         $pathway =& $app->getPathway();
     } else {
         $app = JFactory::getApplication();
         $pathway = $app->getPathway();
     }
     $items = $pathway->getPathway();
     if (!count($items)) {
         $pathway->addItem(JText::_('CUSTOMER_ACCOUNT'), hikashop_completeLink('user'));
     }
     hikashop_setPageTitle('CUSTOMER_ACCOUNT');
 }
Exemplo n.º 14
0
 function display($tpl = null, $title = '', $menu_style = '')
 {
     $this->assignRef('title', $title);
     $this->assignRef('menu_style', $menu_style);
     if (!HIKASHOP_PHP5) {
         $doc =& JFactory::getDocument();
     } else {
         $doc = JFactory::getDocument();
     }
     $doc->addStyleSheet(HIKASHOP_CSS . 'menu.css');
     $config = hikashop_config();
     $function = $this->getLayout();
     if (method_exists($this, $function)) {
         $this->{$function}();
     }
     $plugin = JPluginHelper::getPlugin('system', 'hikashopaffiliate');
     $menus = array('system' => array('name' => JText::_('SYSTEM'), 'check' => 'ctrl=config', 'acl' => 'config', 'task' => 'manage', 'icon' => 'icon-16-config', 'url' => !HIKASHOP_J16 || JFactory::getUser()->authorise('core.admin', 'com_hikashop') ? hikashop_completeLink('config') : '#', 'children' => array(array('name' => JText::_('HIKA_CONFIGURATION'), 'check' => 'ctrl=config', 'acl' => 'config', 'task' => 'manage', 'icon' => 'icon-16-config', 'url' => hikashop_completeLink('config'), 'display' => !HIKASHOP_J16 || JFactory::getUser()->authorise('core.admin', 'com_hikashop')), array('name' => JText::_('ZONES'), 'check' => 'ctrl=zone', 'acl' => 'zone', 'icon' => 'icon-16-language', 'url' => hikashop_completeLink('zone')), array('name' => JText::_('PAYMENT_METHODS'), 'check' => array('ctrl' => 'plugins', 'plugin_type' => 'payment'), 'acl' => 'plugins', 'icon' => 'icon-16-plugin', 'url' => hikashop_completeLink('plugins&plugin_type=payment')), array('name' => JText::_('SHIPPING_METHODS'), 'check' => array('ctrl' => 'plugins', 'plugin_type' => 'shipping'), 'acl' => 'plugins', 'icon' => 'icon-16-plugin', 'url' => hikashop_completeLink('plugins&plugin_type=shipping')), array('name' => JText::_('PLUGINS'), 'check' => array('ctrl' => 'plugins', 'plugin_type' => 'plugin'), 'acl' => 'plugins', 'icon' => 'icon-16-plugin', 'url' => hikashop_completeLink('plugins&plugin_type=plugin')), array('name' => JText::_('WAREHOUSE'), 'check' => array('ctrl' => 'warehouse'), 'acl' => 'warehouse', 'icon' => 'icon-16-warehouse', 'url' => hikashop_completeLink('warehouse')), array('name' => JText::_('TAXES'), 'check' => array('ctrl' => 'taxation'), 'acl' => 'taxation', 'icon' => 'icon-16-tax', 'url' => hikashop_completeLink('taxation')), array('name' => JText::_('CURRENCIES'), 'check' => array('ctrl' => 'currency'), 'acl' => 'currency', 'icon' => 'icon-16-currency', 'url' => hikashop_completeLink('currency')), array('name' => JText::_('ORDER_STATUSES'), 'check' => array('ctrl' => 'category', 'filter_id' => 'status'), 'acl' => 'config', 'icon' => 'icon-16-order', 'url' => hikashop_completeLink('category&filter_id=status')), array('name' => JText::_('EMAILS'), 'check' => array('ctrl' => 'email'), 'acl' => 'email', 'url' => hikashop_completeLink('email'), 'icon' => 'icon-16-email', 'display' => hikashop_level(2)), array('name' => JText::_('HIKA_MASSACTION'), 'check' => 'ctrl=massaction', 'acl' => 'massaction', 'url' => hikashop_completeLink('massaction'), 'icon' => 'icon-16-massaction'))), 'products' => array('name' => JText::_('PRODUCTS'), 'check' => array('ctrl' => 'product', '!task' => array('add')), 'acl' => 'product', 'icon' => 'icon-16-product', 'url' => hikashop_completeLink('product'), 'children' => array(array('name' => JText::_('ADD_PRODUCT'), 'check' => array('ctrl' => 'procut', 'task' => 'add'), 'acl' => 'product', 'task' => 'manage', 'icon' => 'icon-16-addproduct', 'url' => hikashop_completeLink('product&task=add')), array('name' => JText::_('PRODUCTS'), 'check' => array('ctrl' => 'product', '!task' => array('add')), 'acl' => 'product', 'icon' => 'icon-16-product', 'url' => hikashop_completeLink('product')), array('name' => JText::_('HIKA_CATEGORIES'), 'check' => array('ctrl' => 'category', 'filter_id' => 'product'), 'acl' => 'category', 'icon' => 'icon-16-category', 'url' => hikashop_completeLink('category&filter_id=product')), array('name' => JText::_('CHARACTERISTICS'), 'check' => 'ctrl=characteristic', 'acl' => 'characteristic', 'icon' => 'icon-16-characteristic', 'url' => hikashop_completeLink('characteristic')), array('name' => JText::_('MANUFACTURERS'), 'check' => array('ctrl' => 'category', 'filter_id' => 'manufacturer'), 'acl' => 'category', 'icon' => 'icon-16-category', 'url' => hikashop_completeLink('category&filter_id=manufacturer')), array('name' => JText::_('HIKA_BADGES'), 'check' => 'ctrl=badge', 'acl' => 'badge', 'icon' => 'icon-16-badge', 'url' => hikashop_completeLink('badge')), array('name' => JText::_('LIMIT'), 'check' => 'ctrl=limit', 'icon' => 'icon-16-limit', 'acl' => 'limit', 'url' => hikashop_completeLink('limit'), 'display' => hikashop_level(1)), array('name' => JText::_('IMPORT'), 'check' => 'ctrl=import', 'acl' => 'import', 'icon' => 'icon-16-import', 'url' => hikashop_completeLink('import&task=show')))), 'customers' => array('name' => JText::_('CUSTOMERS'), 'check' => array('ctrl' => 'user', 'filter_partner' => 0, '!task' => array('clicks')), 'acl' => 'user', 'icon' => 'icon-16-user', 'url' => hikashop_completeLink('user&filter_partner=0'), 'children' => array(array('name' => JText::_('CUSTOMERS'), 'check' => array('ctrl' => 'user', 'filter_partner' => 0, '!task' => array('clicks')), 'acl' => 'user', 'icon' => 'icon-16-user', 'url' => hikashop_completeLink('user&filter_partner=0')), array('name' => JText::_('VOTE'), 'check' => 'ctrl=vote', 'acl' => 'vote', 'icon' => 'icon-16-vote', 'url' => hikashop_completeLink('vote')), array('name' => JText::_('HIKASHOP_CHECKOUT_CART'), 'check' => array('ctrl' => 'cart', 'cart_type' => 'cart'), 'acl' => 'cart', 'icon' => 'icon-16-cart', 'url' => hikashop_completeLink('cart&cart_type=cart'), 'display' => hikashop_level(1)), array('name' => JText::_('WISHLISTS'), 'check' => array('ctrl' => 'cart', 'cart_type' => 'wishlist'), 'acl' => 'wishlist', 'icon' => 'icon-16-wishlist', 'url' => hikashop_completeLink('cart&cart_type=wishlist'), 'display' => hikashop_level(1) && $config->get('enable_wishlist', 0)), array('name' => JText::_('HIKA_WAITLIST'), 'check' => array('ctrl' => 'waitlist'), 'acl' => 'waitlist', 'icon' => 'icon-16-wishlist', 'url' => hikashop_completeLink('waitlist'), 'display' => hikashop_level(1) && $config->get('product_waitlist', 1)))), 'orders' => array('name' => JText::_('ORDERS'), 'check' => array('ctrl' => 'order', 'filter_partner' => 0), 'acl' => 'order', 'icon' => 'icon-16-order', 'url' => hikashop_completeLink('order&order_type=sale&filter_partner=0'), 'children' => array(array('name' => JText::_('ORDERS'), 'check' => array('ctrl' => 'order', 'filter_partner' => 0), 'acl' => 'order', 'icon' => 'icon-16-order', 'url' => hikashop_completeLink('order&order_type=sale&filter_partner=0')), array('name' => JText::_('DISCOUNTS'), 'check' => array('ctrl=discount', 'filter_type' => 'discount'), 'acl' => 'discount', 'icon' => 'icon-16-discount', 'url' => hikashop_completeLink('discount&filter_type=discount')), array('name' => JText::_('COUPONS'), 'check' => array('ctrl=discount', 'filter_type' => 'coupon'), 'acl' => 'discount', 'icon' => 'icon-16-discount', 'url' => hikashop_completeLink('discount&filter_type=coupon')), array('name' => JText::_('HIKASHOP_ENTRIES'), 'check' => 'ctrl=entry', 'acl' => 'entry', 'icon' => 'icon-16-article', 'url' => hikashop_completeLink('entry'), 'display' => hikashop_level(2)), array('name' => JText::_('HIKASHOP_REPORTS'), 'check' => 'ctrl=report', 'acl' => 'report', 'icon' => 'icon-16-report', 'url' => hikashop_completeLink('report'), 'display' => hikashop_level(1)))), 'affiliates' => array('name' => JText::_('AFFILIATES'), 'check' => array('ctrl' => 'user', 'filter_partner' => '1'), 'acl' => 'affiliates', 'icon' => 'icon-16-affiliate', 'url' => hikashop_completeLink('user&filter_partner=1'), 'display' => !empty($plugin) && hikashop_level(2), 'children' => array(array('name' => JText::_('PARTNERS'), 'check' => array('ctrl' => 'user', 'filter_partner' => '1'), 'acl' => 'affiliates', 'icon' => 'icon-16-affiliate', 'url' => hikashop_completeLink('user&filter_partner=1')), array('name' => JText::_('HIKA_BANNERS'), 'check' => 'ctrl=banner', 'acl' => 'banner', 'icon' => 'icon-16-banner', 'url' => hikashop_completeLink('banner')), array('name' => JText::_('AFFILIATES_SALES'), 'check' => array('ctrl' => 'order', 'filter_partner' => '1'), 'acl' => 'order', 'icon' => 'icon-16-order', 'url' => hikashop_completeLink('order&order_type=sale&filter_partner=1')), array('name' => JText::_('CLICKS'), 'check' => array('ctrl' => 'user', 'task' => 'clicks'), 'acl' => 'order', 'icon' => 'icon-16-click', 'url' => hikashop_completeLink('user&task=clicks')))), 'display' => array('name' => JText::_('DISPLAY'), 'check' => 'ctrl=view', 'acl' => 'view', 'icon' => 'icon-16-views', 'url' => hikashop_completeLink('view'), 'children' => array(array('name' => JText::_('VIEWS'), 'check' => 'ctrl=view', 'acl' => 'view', 'icon' => 'icon-16-views', 'url' => hikashop_completeLink('view')), array('name' => JText::_('CONTENT_MENUS'), 'check' => 'ctrl=menus', 'acl' => 'menus', 'icon' => 'icon-16-menu', 'url' => hikashop_completeLink('menus'), 'display' => !HIKASHOP_J30), array('name' => JText::_('CONTENT_MODULES'), 'check' => 'ctrl=modules', 'acl' => 'modules', 'icon' => 'icon-16-module', 'url' => hikashop_completeLink('modules'), 'display' => !HIKASHOP_J30), array('name' => JText::_('FIELDS'), 'check' => 'ctrl=field', 'acl' => 'field', 'icon' => 'icon-16-field', 'url' => hikashop_completeLink('field')), array('name' => JText::_('FILTERS'), 'check' => 'ctrl=filter', 'acl' => 'filter', 'icon' => 'icon-16-filter', 'url' => hikashop_completeLink('filter'), 'display' => hikashop_level(2)))), 'help' => array('name' => JText::_('DOCUMENTATION'), 'check' => 'ctrl=documentation', 'acl' => 'documentation', 'icon' => 'icon-16-help', 'url' => hikashop_completeLink('documentation'), 'children' => array(array('name' => JText::_('DOCUMENTATION'), 'check' => 'ctrl=documentation', 'acl' => 'documentation', 'icon' => 'icon-16-help', 'url' => hikashop_completeLink('documentation')), array('name' => JText::_('UPDATE_ABOUT'), 'check' => 'ctrl=update', 'acl' => 'update_about', 'icon' => 'icon-16-install', 'url' => hikashop_completeLink('update')), array('name' => JText::_('FORUM'), 'options' => 'target="_blank"', 'acl' => 'forum', 'icon' => 'icon-16-info', 'url' => HIKASHOP_URL . 'support/forum.html'))));
     $this->_checkActive($menus);
     $this->assignRef('menus', $menus);
     parent::display($tpl);
 }
Exemplo n.º 15
0
 function save()
 {
     global $Itemid;
     $url = 'checkout';
     if (!empty($Itemid)) {
         $url .= '&Itemid=' . $Itemid;
     }
     $app = JFactory::getApplication();
     $fieldClass = hikashop_get('class.field');
     $null = null;
     $entriesData = $fieldClass->getInput('entry', $null);
     $app->setUserState(HIKASHOP_COMPONENT . '.entries_fields', null);
     $ok = true;
     if (empty($entriesData)) {
         $app->redirect(hikashop_completeLink('entry', false, true));
     }
     $cartClass = hikashop_get('class.cart');
     $fields =& $fieldClass->getData('frontcomp', 'entry');
     $cartClass->addToCartFromFields($entriesData, $fields);
     $app->setUserState(HIKASHOP_COMPONENT . '.entries_fields', $entriesData);
     $app->redirect(hikashop_completeLink($url, false, true));
 }
Exemplo n.º 16
0
 function onHistoryDisplay(&$histories)
 {
     foreach ($histories as $k => $history) {
         if ($history->history_payment_method == $this->name && !empty($history->history_data)) {
             $data = unserialize(base64_decode($history->history_data));
             $string = '';
             if (!empty($data->cc_type)) {
                 $string .= JText::_('CARD_TYPE') . ': ' . $data->cc_type . '<br />';
             }
             $string .= JText::_('DATE') . ': ' . $data->cc_month . '/' . $data->cc_year . '<br />';
             $string .= JText::_('BEGINNING_OF_CREDIT_CARD_NUMBER') . ': ' . $data->cc_number . '<br />';
             $string .= '<a href="' . hikashop_completeLink('order&task=remove_history_data&history_id=' . $history->history_id) . '"><img src="' . HIKASHOP_IMAGES . 'delete.png" /></a>';
             $histories[$k]->history_data = $string;
             static $done = false;
             if (!$done) {
                 $done = true;
                 $app = JFactory::getApplication();
                 $app->enqueueMessage(JText::_('CREDITCARD_WARNING'));
             }
         }
     }
 }
Exemplo n.º 17
0
Arquivo: vm1.php Projeto: rodhoff/MNW
 function getStartPage()
 {
     $app = JFactory::getApplication();
     $returnString = '<p ' . $this->titlefont . '><span' . $this->titlestyle . '>Step 0</span></p>';
     $this->vmprefix = $app->getUserStateFromRequest($this->sessionParams . 'vmPrefix', 'vmPrefix', '', 'string');
     if (empty($this->vmprefix)) {
         $this->vmprefix = $this->db->getPrefix();
     } elseif (substr($this->vmprefix, -1, 1) != '_') {
         $this->vmprefix .= '_';
     }
     if (strpos($this->vmprefix, '__') !== false && $this->vmprefix != '#__') {
         $this->vmprefix = str_replace('__', '_', $this->vmprefix);
     }
     $app->setUserState($this->sessionParams . 'vmPrefix', $this->vmprefix);
     $this->db->setQuery("SHOW TABLES LIKE '" . $this->vmprefix . "vm_product'");
     $table = $this->db->loadObjectList();
     if (!$table) {
         $returnString .= '<p style="color:red; font-size:0.9em;">There is no table with the prefix \'' . $this->vmprefix . '\' in your Joomla database.</p>';
     } else {
         $returnString = 'First, make a backup of your database.<br/>' . 'When ready, click on <a ' . $this->linkstyle . ' href="' . hikashop_completeLink('import&task=import&importfrom=vm&' . $this->token . '=1&import=1') . '">' . JText::_('HIKA_NEXT') . '</a>, otherwise ';
     }
     $returnString .= '<a' . $this->linkstyle . ' href="' . hikashop_completeLink('import&task=show') . '">' . JText::_('HIKA_BACK') . '</a>';
     return $returnString;
 }
Exemplo n.º 18
0
 function addtocart()
 {
     global $Itemid;
     $app = JFactory::getApplication();
     $from_id = JRequest::getInt('cart_id', 0);
     $cart_type = JRequest::getString('cart_type', 'cart');
     $action = JRequest::getString('action', '');
     if ($action != 'compare') {
         $cart_type_id = $cart_type . '_id';
         if ($cart_type == 'cart') {
             $addTo = 'wishlist';
         } else {
             $addTo = 'cart';
         }
         JRequest::setVar('from_id', $from_id);
         if ($addTo == 'wishlist' && hikashop_loadUser() == null) {
             $app->enqueueMessage(JText::_('LOGIN_REQUIRED_FOR_WISHLISTS'));
         } else {
             $cart_type_id = $addTo . '_id';
             $cart_id = $app->getUserState(HIKASHOP_COMPONENT . '.' . $cart_type_id, '0');
             $app->setUserState(HIKASHOP_COMPONENT . '.' . $cart_type . '_new', '0');
             if (empty($cart_id)) {
                 $cart_id = 0;
             }
             JRequest::setVar('cart_type', $addTo);
             JRequest::setVar($cart_type_id, $cart_id);
             $cartClass = hikashop_get('class.cart');
             $formData = JRequest::getVar('data', array(), '', 'array');
             $i = 0;
             if (isset($formData['products'])) {
                 $cart_product_id = 0;
                 $fromProducts = $cartClass->get(0, true, $cart_type);
                 foreach ($formData['products'] as $product_id => $product) {
                     if (!empty($product['checked'])) {
                         $i++;
                         if (!isset($product['quantity'])) {
                             $product['quantity'] = 1;
                         }
                         $options = array();
                         foreach ($fromProducts as $fromProduct) {
                             if ($fromProduct->product_id == $product_id) {
                                 $cart_product_id = $fromProduct->cart_product_id;
                             }
                         }
                         foreach ($fromProducts as $fromProduct) {
                             if ($fromProduct->cart_product_option_parent_id == $cart_product_id) {
                                 $options[] = $fromProduct->product_id;
                             }
                         }
                         JRequest::setVar('hikashop_product_option', $options);
                         $cartClass->update((int) $product_id, (int) $product['quantity'], 1);
                     }
                 }
             }
             if ($i == 0) {
                 $app->enqueueMessage(JText::_('PLEASE_SELECT_A_PRODUCT_FIRST'));
             }
         }
         if ($action != '') {
             $url = $action;
         } else {
             $url = 'cart&task=showcart&cart_type=' . $cart_type . '&cart_id=' . $from_id . '&Itemid=' . $Itemid;
             $url = hikashop_completeLink($url, false, true);
         }
     } else {
         $formData = JRequest::getVar('data', array(), '', 'array');
         if (isset($formData['products'])) {
             $cidList = '';
             foreach ($formData['products'] as $product_id => $product) {
                 if (!empty($product['checked'])) {
                     $cidList .= "&cid[]=" . $product_id;
                 }
             }
             $url = hikashop_completeLink('product&task=compare' . $cidList . '&Itemid=' . $Itemid, false, true);
         } else {
             $url = 'cart&task=showcart&cart_type=' . $cart_type . '&cart_id=' . $from_id . '&Itemid=' . $Itemid;
             $url = hikashop_completeLink($url, false, true);
         }
     }
     $this->setRedirect($url);
 }
Exemplo n.º 19
0
 function &_order($type)
 {
     $order_id = hikashop_getCID('order_id');
     $app = JFactory::getApplication();
     if (empty($order_id)) {
         $order_id = $app->getUserState('com_hikashop.order_id');
     }
     if (!empty($order_id)) {
         $class = hikashop_get('class.order');
         $order = $class->loadFullOrder($order_id, $type == 'order' ? true : false);
     }
     if (empty($order)) {
         $app->redirect(hikashop_completeLink('order&task=listing', false, true));
     }
     $config =& hikashop_config();
     $this->assignRef('config', $config);
     $store = str_replace(array("\r\n", "\n", "\r"), array('<br/>', '<br/>', '<br/>'), $config->get('store_address', ''));
     if (JText::_($store) != $store) {
         $store = JText::_($store);
     }
     if (!empty($order->order_payment_id)) {
         $pluginsPayment = hikashop_get('type.plugins');
         $pluginsPayment->type = 'payment';
         $this->assignRef('payment', $pluginsPayment);
     }
     if (!empty($order->order_shipping_id)) {
         $pluginsShipping = hikashop_get('type.plugins');
         $pluginsShipping->type = 'shipping';
         $this->assignRef('shipping', $pluginsShipping);
         $shippingClass = hikashop_get('class.shipping');
         $this->assignRef('shippingClass', $shippingClass);
         if (empty($order->order_shipping_method)) {
             $shippings_data = array();
             $shipping_ids = explode(';', $order->order_shipping_id);
             foreach ($shipping_ids as $key) {
                 $shipping_data = '';
                 list($k, $w) = explode('@', $key);
                 $shipping_id = $k;
                 if (isset($order->shippings[$shipping_id])) {
                     $shipping = $order->shippings[$shipping_id];
                     $shipping_data = $shipping->shipping_name;
                 } else {
                     foreach ($order->products as $order_product) {
                         if ($order_product->order_product_shipping_id == $key) {
                             if (!is_numeric($order_product->order_product_shipping_id)) {
                                 $shipping_name = $this->getShippingName($order_product->order_product_shipping_method, $shipping_id);
                                 $shipping_data = $shipping_name;
                             } else {
                                 $shipping_method_data = $this->shippingClass->get($shipping_id);
                                 $shipping_data = $shipping_method_data->shipping_name;
                             }
                             break;
                         }
                     }
                     if (empty($shipping_data)) {
                         $shipping_data = '[ ' . $key . ' ]';
                     }
                 }
                 $shippings_data[] = $shipping_data;
             }
             $order->order_shipping_method = $shippings_data;
         }
     }
     $this->assignRef('store_address', $store);
     $this->assignRef('element', $order);
     $this->assignRef('order', $order);
     $this->assignRef('invoice_type', $type);
     $display_type = 'frontcomp';
     $this->assignRef('display_type', $display_type);
     $currencyClass = hikashop_get('class.currency');
     $this->assignRef('currencyHelper', $currencyClass);
     $fieldsClass = hikashop_get('class.field');
     $this->assignRef('fieldsClass', $fieldsClass);
     if (is_string($order->order_shipping_method)) {
         $currentShipping = hikashop_import('hikashopshipping', $order->order_shipping_method);
     } else {
         $currentShipping = hikashop_import('hikashopshipping', reset($order->order_shipping_method));
     }
     $this->assignRef('currentShipping', $currentShipping);
     $fields = array();
     if (hikashop_level(2)) {
         $null = null;
         $fields['entry'] = $fieldsClass->getFields('frontcomp', $null, 'entry');
         $fields['item'] = $fieldsClass->getFields('frontcomp', $null, 'item');
         $fields['order'] = $fieldsClass->getFields('', $null, 'order');
     }
     $this->assignRef('fields', $fields);
     return $order;
 }
Exemplo n.º 20
0
 * @author	hikashop.com
 * @copyright	(C) 2010-2016 HIKARI SOFTWARE. All rights reserved.
 * @license	GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 */
defined('_JEXEC') or die('Restricted access');
?>
<div class="hika_toolbar">
	<div class="hika_toolbar_btn hika_btn_32">
		<div class="hika_toolbar_right">
			<div class="btn"><a href="#save" onclick="return window.hikashop.submitform('save','hikashop_order_product_form');"><span class="btnIcon icon-32-apply"></span><span class="btnName">Save</span></a></div>
		</div>
		<div style="clear:right"></div>
	</div>
</div>
<form action="<?php 
echo hikashop_completeLink('order&task=save&subtask=products&tmpl=component');
?>
" name="hikashop_order_product_form" id="hikashop_order_product_form" method="post" enctype="multipart/form-data">
	<dl class="hika_options">
		<dt class="hikashop_order_product_id"><label><?php 
echo JText::_('PRODUCT');
?>
</label></dt>
		<dd class="hikashop_order_product_id"><?php 
echo (int) @$this->orderProduct->product_id;
?>
 - <?php 
echo @$this->originalProduct->product_name;
?>
</dd>
Exemplo n.º 21
0
</td>
						<td><?php 
        echo date('d/m/Y', $downloadFile->max_order_created);
        ?>
</td>
					</tr>
<?php 
    }
    ?>
			</tbody>
			<tfoot>
				<tr>
					<td colspan="10">
						<div class="pagination">
							<form action="<?php 
    echo hikashop_completeLink('user&task=downloads' . $url_itemid);
    ?>
" method="post" name="adminForm_bottom">
								<?php 
    $this->pagination->form = '_bottom';
    echo $this->pagination->getListFooter();
    ?>
								<?php 
    echo $this->pagination->getResultsCounter();
    ?>
								<input type="hidden" name="option" value="<?php 
    echo HIKASHOP_COMPONENT;
    ?>
" />
								<input type="hidden" name="task" value="downloads" />
								<input type="hidden" name="ctrl" value="<?php 
Exemplo n.º 22
0
defined('_JEXEC') or die('Restricted access');
?>
<fieldset>
	<div class="toolbar" id="toolbar" style="float: right;">
		<button class="btn" type="button" onclick="submitbutton('savefields');"><img src="<?php 
echo HIKASHOP_IMAGES;
?>
save.png"/><?php 
echo JText::_('OK');
?>
</button>
	</div>
</fieldset>
<div class="iframedoc" id="iframedoc"></div>
<form action="<?php 
echo hikashop_completeLink('order', true);
?>
" method="post"  name="adminForm" id="adminForm" enctype="multipart/form-data">
	<table width="100%" class="admintable table">
		<?php 
if (!empty($this->fields['order'])) {
    foreach ($this->fields['order'] as $fieldName => $oneExtraField) {
        ?>
				<tr>
					<td class="key">
						<?php 
        echo $this->fieldsClass->getFieldName($oneExtraField);
        ?>
					</td>
					<td>
						<?php 
Exemplo n.º 23
0
Arquivo: show.php Projeto: rodhoff/MNW
         }
     } else {
         $download_number_limit = $this->download_number_limit;
     }
     if (!empty($download_number_limit) && $download_number_limit <= $file->download_number) {
         $fileHtml = JText::_('MAX_REACHED_NO_DOWNLOAD');
     }
     if (empty($fileHtml)) {
         if (empty($file->file_name)) {
             $file->file_name = JText::_('DOWNLOAD_NOW');
         }
         $file_pos = '';
         if (!empty($file->file_pos)) {
             $file_pos = '&file_pos=' . $file->file_pos;
         }
         $fileHtml = '<a href="' . hikashop_completeLink('order&task=download&file_id=' . $file->file_id . '&order_id=' . $this->order->order_id . $file_pos . $url_itemid) . '">' . $file->file_name . '</a>';
         $order_created = empty($this->order->order_invoice_created) ? $this->order->order_created : $this->order->order_invoice_created;
         if (!empty($this->download_time_limit)) {
             $fileHtml .= ' / ' . JText::sprintf('UNTIL_THE_DATE', hikashop_getDate($order_created + $this->download_time_limit));
         }
         if (!empty($download_number_limit)) {
             $fileHtml .= ' / ' . JText::sprintf('X_DOWNLOADS_LEFT', $download_number_limit - $file->download_number);
         }
     } else {
         if (empty($file->file_name)) {
             $file->file_name = JText::_('EMPTY_FILENAME');
         }
         $fileHtml = $file->file_name . ' ' . $fileHtml;
     }
     $html[] = $fileHtml;
 }
Exemplo n.º 24
0
Arquivo: form.php Projeto: rodhoff/MNW
/**
 * @package	HikaShop for Joomla!
 * @version	2.6.1
 * @author	hikashop.com
 * @copyright	(C) 2010-2016 HIKARI SOFTWARE. All rights reserved.
 * @license	GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 */
defined('_JEXEC') or die('Restricted access');
global $Itemid;
$url_itemid = '';
if (!empty($Itemid)) {
    $url_itemid = '&Itemid=' . $Itemid;
}
?>
<form action="<?php 
echo hikashop_completeLink('user&task=register' . $url_itemid);
?>
" method="post" name="hikashop_registration_form" enctype="multipart/form-data" onsubmit="hikashopSubmitForm('hikashop_registration_form'); return false;">
	<div class="hikashop_user_registration_page">
		<fieldset class="input">
			<h2><?php 
echo JText::_('HIKA_REGISTRATION');
?>
</h2>
			<?php 
$this->setLayout('registration');
$this->registration_page = true;
$this->form_name = 'hikashop_registration_form';
$usersConfig = JComponentHelper::getParams('com_users');
$allowRegistration = $usersConfig->get('allowUserRegistration');
if ($allowRegistration || $this->simplified_registration == 2) {
Exemplo n.º 25
0
 function process($toolbar)
 {
     $config =& hikashop_config();
     if (!HIKASHOP_PHP5) {
         $bar =& JToolBar::getInstance('toolbar');
     } else {
         $bar = JToolBar::getInstance('toolbar');
     }
     foreach ($toolbar as $tool) {
         if (!empty($tool) && is_string($tool)) {
             $tool = array('name' => $tool);
         }
         if (empty($tool['name']) || isset($tool['display']) && $tool['display'] === false) {
             continue;
         }
         $toolname = $tool['name'];
         $standard = array('addNew' => array('new', 'add', 'New', false), 'makeDefault' => array('default', 'default', 'Default', false), 'assign' => array('assign', 'assign', 'Assign', false), 'publish' => array('publish', 'publish', 'Publish', false), 'publishList' => array('publish', 'publish', 'Publish', true), 'editList' => array('edit', 'edit', 'Edit', true), 'unpublish' => array('unpublish', 'unpublish', 'Unpublish', false), 'unpublishList' => array('unpublish', 'unpublish', 'Unpublish', true), 'trash' => array('trash', 'remove', 'Trash', true), 'apply' => array('apply', 'apply', 'Apply', false), 'copy' => array('copy', 'copy', 'HIKA_COPY', true), 'save' => array('save', 'save', 'Save', false), 'save2new' => array('save-new', 'save2new', 'JTOOLBAR_SAVE_AND_NEW', false), 'save2copy' => array('save-copy', 'save2copy', 'JTOOLBAR_SAVE_AS_COPY', false), 'cancel' => array('cancel', 'cancel', 'Cancel', false));
         if (isset($standard[$toolname])) {
             $icon = $standard[$toolname][0];
             $task = $standard[$toolname][1];
             $alt = $standard[$toolname][2];
             if (HIKASHOP_J16 && substr($alt, 0, 5) != 'JTOOL' && substr($alt, 0, 5) != 'HIKA_') {
                 $alt = 'JTOOLBAR_' . strtoupper($alt);
             }
             $check = $standard[$toolname][3];
             if (!empty($tool['icon'])) {
                 $icon = $tool['icon'];
             }
             if (!empty($tool['task'])) {
                 $task = $tool['task'];
             }
             if (isset($tool['alt'])) {
                 $alt = $tool['alt'];
             }
             if (isset($tool['check'])) {
                 $check = $tool['check'];
             }
             $bar->appendButton('Standard', $icon, $alt, $task, $check, false);
             continue;
         }
         $ret = $this->customTool($bar, strtolower($toolname), $tool);
         if (!$ret) {
             switch (strtolower($toolname)) {
                 case '-':
                     $width = '';
                     if (!empty($tool['width'])) {
                         $width = (int) $tool['width'];
                     }
                     $bar->appendButton('Separator', 'spacer', $width);
                     break;
                 case '|':
                     $bar->appendButton('Separator', 'divider');
                     break;
                 case 'deletelist':
                     $tool = array_merge(array('task' => 'remove', 'alt' => 'HIKA_DELETE', 'msg' => '', 'confirm' => true), $tool);
                     if ($tool['confirm'] && empty($tool['msg'])) {
                         $tool['msg'] = JText::_('HIKA_VALIDDELETEITEMS');
                     }
                     if (!empty($tool['msg'])) {
                         $bar->appendButton('Confirm', $tool['msg'], 'delete', $tool['alt'], $tool['task'], true);
                     } else {
                         $bar->appendButton('Standard', 'delete', $tool['alt'], $tool['task'], true);
                     }
                     break;
                 case 'custom':
                     $tool = array_merge(array('icon' => '', 'task' => '', 'alt' => '', 'check' => true, 'hide' => false), $tool);
                     $bar->appendButton('Standard', $tool['icon'], $tool['alt'], $tool['task'], $tool['check'], $tool['hide']);
                     break;
                 case 'confirm':
                     $tool = array_merge(array('icon' => '', 'task' => '', 'alt' => '', 'check' => true, 'hide' => false, 'msg' => ''), $tool);
                     $bar->appendButton('Confirm', $tool['msg'], $tool['icon'], $tool['alt'], $tool['task'], $tool['check'], $tool['hide']);
                     break;
                 case 'preview':
                     if (!empty($tool['target']) || !empty($tool['url'])) {
                         $url = '';
                         if (!empty($tool['target'])) {
                             $url = $tool['target'];
                         }
                         if (!empty($tool['url'])) {
                             $url = $tool['url'];
                         }
                         $bar->appendButton('Popup', 'preview', 'Preview', $url . '&task=preview');
                     }
                     break;
                 case 'preferences':
                     $tool = array_merge(array('component' => 'com_hikashop', 'path' => ''), $tool);
                     $component = urlencode($tool['component']);
                     $path = urlencode($tool['path']);
                     if (HIKASHOP_J30) {
                         $uri = (string) JUri::getInstance();
                         $return = urlencode(base64_encode($uri));
                         $bar->appendButton('Link', 'options', 'JToolbar_Options', 'index.php?option=com_config&amp;view=component&amp;component=' . $component . '&amp;path=' . $path . '&amp;return=' . $return);
                     } else {
                         $top = 0;
                         $left = 0;
                         $height = '550';
                         $width = '875';
                         $bar->appendButton('Popup', 'options', 'JToolbar_Options', 'index.php?option=com_config&amp;view=component&amp;component=' . $component . '&amp;path=' . $path . '&amp;tmpl=component', $width, $height, $top, $left, '');
                     }
                     break;
                 case 'help':
                     break;
                 case 'back':
                     break;
                 case 'link':
                     $tool = array_merge(array('icon' => '', 'url' => '', 'alt' => ''), $tool);
                     $bar->appendButton('Link', $tool['icon'], $tool['alt'], $tool['url']);
                     break;
                 case 'popup':
                     $tool = array_merge(array('icon' => '', 'url' => '', 'alt' => '', 'width' => 640, 'height' => 480, 'top' => 0, 'left' => 0, 'onClose' => '', 'title' => '', 'footer' => ''), $tool);
                     if (HIKASHOP_J30) {
                         if (!empty($tool['id'])) {
                             $tool['icon'] = $tool['id'] . '#' . $tool['icon'];
                         } else {
                             $tool['icon'] = $tool['icon'] . '#' . $tool['icon'];
                         }
                     }
                     $bar->appendButton('HikaPopup', $tool['icon'], $tool['alt'], $tool['url'], $tool['width'], $tool['height'], $tool['top'], $tool['left'], $tool['onClose'], $tool['title'], $tool['footer']);
                     break;
                 case 'close':
                     $bar->appendButton('Standard', 'cancel', JText::_('HIKA_CLOSE'), 'cancel', false, false);
                     break;
                 case 'hikacancel':
                     $cancel_url = JRequest::getVar('cancel_redirect');
                     if (!empty($cancel_url) || !empty($tool['url'])) {
                         if (!empty($cancel_url)) {
                             $cancel_url = base64_decode($cancel_url);
                             if (!hikashop_disallowUrlRedirect($cancel_url)) {
                                 $bar->appendButton('Link', 'cancel', JText::_('HIKA_CANCEL'), $cancel_url);
                             }
                         } else {
                             $bar->appendButton('Link', 'cancel', JText::_('HIKA_CANCEL'), $tool['url']);
                         }
                     } else {
                         $bar->appendButton('Standard', 'cancel', JText::_('HIKA_CANCEL'), 'cancel', false, false);
                     }
                     break;
                 case 'pophelp':
                     if (!empty($tool['target'])) {
                         $bar->appendButton('Pophelp', $tool['target']);
                     }
                     break;
                 case 'export':
                     $bar->appendButton('Export');
                     break;
                 case 'dashboard':
                     if (hikashop_isAllowed($config->get('acl_dashboard_view', 'all'))) {
                         $bar->appendButton('Link', 'hikashop', JText::_('HIKASHOP_CPANEL'), hikashop_completeLink('dashboard'));
                     }
                     break;
             }
         }
     }
 }
Exemplo n.º 26
0
<?php

/**
 * @package	HikaShop for Joomla!
 * @version	2.6.0
 * @author	hikashop.com
 * @copyright	(C) 2010-2015 HIKARI SOFTWARE. All rights reserved.
 * @license	GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 */
defined('_JEXEC') or die('Restricted access');
?>
<div class="iframedoc" id="iframedoc"></div>
<form action="<?php 
echo hikashop_completeLink('email');
?>
" method="post" name="adminForm" id="adminForm" enctype="multipart/form-data">
	<?php 
if (JRequest::getString('tmpl') == 'component') {
    ?>
		<fieldset>
			<div class="toolbar" id="toolbar" style="float: right;">
				<button class="btn" type="button" onclick="javascript:submitbutton('apply'); return false;"><img src="<?php 
    echo HIKASHOP_IMAGES;
    ?>
save.png"/><?php 
    echo JText::_('HIKA_SAVE', true);
    ?>
</button>
			</div>
		</fieldset>
Exemplo n.º 27
0
<?php 
if (!HIKASHOP_BACK_RESPONSIVE) {
    ?>
				<table style="width:100%">
					<tr>
						<td>
<?php 
} else {
    ?>
				<div class="row-fluid">
					<div class="span6">
<?php 
}
?>
							<a href="<?php 
echo hikashop_completeLink('order&task=product_select&filter_id=0' . $parameters, true);
?>
"><?php 
echo JText::_('ROOT');
?>
/</a>
							<?php 
echo $this->breadCrumb . '<br/>' . JText::_('FILTER');
?>
:
							<input type="text" name="search" id="search" value="<?php 
echo $this->escape($this->pageInfo->search);
?>
" class="text_area" onchange="document.adminForm.submit();" />
							<button class="btn" onclick="this.form.submit();"><?php 
echo JText::_('GO');
Exemplo n.º 28
0
Arquivo: show.php Projeto: rodhoff/MNW
				<div class="hika_edit"><?php 
    echo $this->popup->display('<img style="vertical-align:middle;" alt="' . JText::_('HIKA_EDIT') . '" src="' . HIKASHOP_IMAGES . 'edit.png"/>', 'HIKA_EDIT', hikashop_completeLink('order&task=partner&order_id=' . $this->order->order_id, true), 'hikashop_edit_partner', 760, 480, '', '', 'link');
    ?>
</div>
				<table class="admintable table">
					<tr>
						<td class="key"><?php 
    echo JText::_('PARTNER_EMAIL');
    ?>
</td>
						<td>
							<?php 
    echo $this->order->partner->user_email;
    ?>
							<a href="<?php 
    echo hikashop_completeLink('user&task=edit&cid[]=' . $this->order->partner->user_id . '&order_id=' . $this->order->order_id);
    ?>
">
								<img style="vertical-align:middle;" src="<?php 
    echo HIKASHOP_IMAGES;
    ?>
go.png" alt="go" />
							</a>
						</td>
					</tr>
<?php 
    if (!empty($this->order->partner->name)) {
        ?>
					<tr>
						<td class="key"><?php 
        echo JText::_('PARTNER_NAME');
Exemplo n.º 29
0
					<?php 
    echo $this->pagination->getRowOffset($i);
    ?>
					</td>
					<td align="center">
						<?php 
    echo JHTML::_('grid.id', $i, $row->entry_id);
    ?>
					</td>
					<td align="center">
						<?php 
    if (!empty($row->order_id)) {
        if ($this->manage) {
            ?>
									<a href="<?php 
            echo hikashop_completeLink('order&task=edit&cid[]=' . $row->order_id . '&cancel_redirect=' . urlencode(base64_encode(hikashop_completeLink('entry'))));
            ?>
">
										<?php 
            echo $row->order_number;
            ?>
									</a>
						<?php 
        }
    }
    ?>
					</td>
					<?php 
    if (!empty($this->fields)) {
        foreach ($this->fields as $field) {
            $namekey = $field->field_namekey;
Exemplo n.º 30
0
 function display($map, $type, $id, $backend = true, $attribute = 'size="1"')
 {
     if (empty($this->methods[$this->type][(string) @$this->order->order_id])) {
         $this->preload($backend);
     }
     $this->load($type, $id);
     if (is_array($type)) {
         $selected = array();
         foreach ($type as $k => $t) {
             $selected[] = $t . '_' . $id[$k];
         }
     } else {
         $selected = $type . '_' . $id;
     }
     if ($backend && !empty($this->order)) {
         $doc = JFactory::getDocument();
         $doc->addScriptDeclaration(' var ' . "default_" . $this->type . '=\'' . $selected . '\'; ');
         $attribute .= ' onchange="if(this.value==default_' . $this->type . '){return;} hikashop.openBox(\'plugin_change_link\', \'' . hikashop_completeLink('order&task=changeplugin&order_id=' . $this->order->order_id, true) . '&plugin=\' +this.value+\'&type=' . $this->type . '\'); this.value=default_' . $this->type . '; if(typeof(jQuery)!=\'undefined\'){jQuery(this).trigger(\'liszt:updated\');}"';
     }
     return JHTML::_('select.genericlist', $this->values, $map, 'class="inputbox" ' . $attribute, 'value', 'text', $selected, $map . (string) @$this->order->order_id);
 }