Spade

Mini Shell

Directory:~$ /home/lmsyaran/public_html/joomla4/
Upload File

[Home] [System Details] [Kill Me]
Current File:~$ /home/lmsyaran/public_html/joomla4/types.zip

PK;�[#n��acl.phpnu�[���<?php
/**
 * @package	HikaShop for Joomla!
 * @version	2.2.3
 * @author	hikashop.com
 * @copyright	(C) 2010-2013 HIKARI SOFTWARE. All rights reserved.
 * @license	GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 */
defined('_JEXEC') or die('Restricted access');
?><?php

class hikashopAclType{
	function hikashopAclType(){

		$acl = JFactory::getACL();
		if(version_compare(JVERSION,'1.6.0','<')){
			$this->groups = $acl->get_group_children_tree( null,
'USERS', false );
		}else{
			$db = JFactory::getDBO();
			$db->setQuery('SELECT a.*, a.title as text, a.id as value  FROM
#__usergroups AS a ORDER BY a.lft ASC');
			$this->groups = $db->loadObjectList('id');
			foreach($this->groups as $id => $group){
				if(isset($this->groups[$group->parent_id])){
					$this->groups[$id]->level =
intval(@$this->groups[$group->parent_id]->level) + 1;
					$this->groups[$id]->text = str_repeat('- -
',$this->groups[$id]->level).$this->groups[$id]->text;
				}
			}
		}
		$this->choice = array();
		$this->choice[] =
JHTML::_('select.option','none',JText::_('HIKA_NONE'));
		$this->choice[] =
JHTML::_('select.option','all',JText::_('HIKA_ALL'));
		$this->choice[] =
JHTML::_('select.option','special',JText::_('HIKA_CUSTOM'));

		$js = "function updateACL(map){
			choice = eval('document.adminForm.choice_'+map);
			choiceValue = 'special';
			for (var i=0; i < choice.length; i++){
				 if (choice[i].checked){
					 choiceValue = choice[i].value;
				}
			}

			hiddenVar = document.getElementById('hidden_'+map);
			if(choiceValue != 'special'){
				hiddenVar.value = choiceValue;
				document.getElementById('div_'+map).style.display =
'none';
			}else{
				document.getElementById('div_'+map).style.display =
'';
				specialVar = eval('document.adminForm.special_'+map);
				finalValue = ',';
				for (var i=0; i < specialVar.length; i++){
					if (specialVar[i].checked){
							 finalValue += specialVar[i].value+',';
					}
				}
				hiddenVar.value = finalValue;
			}

		}";

		if (!HIKASHOP_PHP5) {
			$doc =& JFactory::getDocument();
		}else{
			$doc = JFactory::getDocument();
		}
		$doc->addScriptDeclaration( $js );

	}

	function display($map,$values,$type='discount'){
		$js ='window.addEvent(\'domready\', function(){
updateACL(\''.$map.'\'); });';
		if (!HIKASHOP_PHP5) {
			$doc =& JFactory::getDocument();
		}else{
			$doc = JFactory::getDocument();
		}
		$doc->addScriptDeclaration( $js );
		if(empty($values)) $values = 'all';

		$choiceValue = ($values == 'none' || $values ==
'all') ?  $values : 'special';
		$return = JHTML::_('hikaselect.radiolist',   $this->choice,
"choice_".$map,
'onclick="updateACL(\''.$map.'\');"',
'value', 'text',$choiceValue);
		$return .= '<input type="hidden"
name="data['.$type.']['.$map.']"
id="hidden_'.$map.'"
value="'.$values.'"/>';
		$valuesArray = explode(',',$values);
		$listAccess = '<div style="display:none"
id="div_'.$map.'"><table>';
		foreach($this->groups as $oneGroup){
			$listAccess .= '<tr><td>';
			if(version_compare(JVERSION,'1.6.0','>=') ||
!in_array($oneGroup->value,array(30))) $listAccess .= '<input
type="checkbox"
onclick="updateACL(\''.$map.'\');"
value="'.$oneGroup->value.'"
'.(in_array($oneGroup->value,$valuesArray) ? 'checked' :
'').' name="special_'.$map.'"
id="special_'.$map.'_'.$oneGroup->value.'"/>';
			$listAccess .= '</td><td><label
for="special_'.$map.'_'.$oneGroup->value.'">'.$oneGroup->text.'</label></td></tr>';
		}
		$listAccess .= '</table></div>';
		$return .= $listAccess;
		return $return;
	}
}
PK;�[���(acltable.phpnu�[���<?php
/**
 * @package	HikaShop for Joomla!
 * @version	2.2.3
 * @author	hikashop.com
 * @copyright	(C) 2010-2013 HIKARI SOFTWARE. All rights reserved.
 * @license	GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 */
defined('_JEXEC') or die('Restricted access');
?><?php
class hikashopAcltableType{
	function hikashopAcltableType(){
		if(version_compare(JVERSION,'1.6.0','<')){
			$acl =& JFactory::getACL();
			$this->groups = $acl->get_group_children_tree( null,
'USERS', false );
		}else{
			$db = JFactory::getDBO();
			$db->setQuery('SELECT a.*, a.title as text, a.id as value  FROM
#__usergroups AS a ORDER BY a.lft ASC');
			$this->groups = $db->loadObjectList('id');
			foreach($this->groups as $id => $group){
				if(isset($this->groups[$group->parent_id])){
					$this->groups[$id]->level =
intval(@$this->groups[$group->parent_id]->level) + 1;
					$this->groups[$id]->text = str_repeat('- -
',$this->groups[$id]->level).$this->groups[$id]->text;
				}
			}
		}
		$this->choice = array();
		$this->choice[] =
JHTML::_('select.option','all',JText::_('HIKA_ALL'));
		$this->choice[] =
JHTML::_('select.option','special',JText::_('HIKA_CUSTOM'));
		$this->config =& hikashop_config();
		$js = "function updateACLTable(cat, action) {
			choice = document['adminForm']['acl_'+cat];
			choiceValue = 'special';
			for (var i=0; i < choice.length; i++){
				 if (choice[i].checked){
					 choiceValue = choice[i].value;
				}
			}
			if(choiceValue == 'all'){
				document.getElementById('div_acl_'+cat).style.display =
'none';
			}else{
				document.getElementById('div_acl_'+cat).style.display =
'block';
				finalValue = '';
				for(i=0;i<allGroups.length;i++){
					var myvar =
document.getElementById('acl_'+cat+'_'+allGroups[i]+'_'+action);
					if(myvar && myvar.checked){
							 finalValue += myvar.value+',';
					}
				}
				document.getElementById('acl_'+cat+'_'+action).value
= finalValue;
			}
		}
		function updateGroup(cat,groupid,actions){
			for(i=0;i<actions.length;i++){
				var myvar =
document.getElementById('acl_'+cat+'_'+groupid+'_'+actions[i]);
				if(!myvar) return;
				myvar.checked = 1 - myvar.checked;
				updateACLTable(cat,actions[i]);
			}
		}
		function updateAction(cat,action){
			for(i=0;i<allGroups.length;i++){
				var myvar =
document.getElementById('acl_'+cat+'_'+allGroups[i]+'_'+action);
				if(myvar) myvar.checked = 1 - myvar.checked;
			}
			updateACLTable(cat,action);
		}
		var allGroups = new Array(";
		foreach($this->groups as $oneGroup){
			$js .= "'".$oneGroup->value."',";
		}
		$js = rtrim($js,',').");";
		if (!HIKASHOP_PHP5) {
			$doc =& JFactory::getDocument();
		}else{
			$doc = JFactory::getDocument();
		}
		$doc->addScriptDeclaration( $js );
	}

	function display($category,$actions){
		$oneAction = reset($actions);
		$app = JFactory::getApplication();
		if(($app->isAdmin() && !HIKASHOP_BACK_RESPONSIVE) ||
(!$app->isAdmin() && !HIKASHOP_RESPONSIVE)) {
			$acltable = '<table
class="acltable"><thead><tr><th></th>';
		}else{
			$acltable = '<table class="table table-striped
table-hover"><thead><tr><th></th>';
		}
		foreach($actions as $action){
			$trans = JText::_('HIKA_'.strtoupper($action));
			if($trans == 'HIKA_'.strtoupper($action)) $trans =
JText::_(strtoupper($action));
			$acltable .= '<th style="cursor:pointer"
onclick="updateAction(\''.$category.'\',\''.$action.'\')">'.$trans.'<input
type="hidden"
name="config[acl_'.$category.'_'.$action.']"
id="acl_'.$category.'_'.$action.'"
value="'.$this->config->get('acl_'.$category.'_'.$action,'all').'"/></th>';
		}
		$acltable .= '</tr></thead><tbody>';
		$custom = false;
		foreach($this->groups as $oneGroup){
			$acltable .= '<tr class="aclline"><td
valign="top" class="groupname"
style="cursor:pointer"
onclick="updateGroup(\''.$category.'\',\''.$oneGroup->value.'\',new
Array(\''.implode("','",$actions).'\'))">'.$oneGroup->text.'</td>';
			foreach($actions as $action){
				$acltable .= '<td class="checkfield">';
				$value =
$this->config->get('acl_'.$category.'_'.$action,'all');
				if(version_compare(JVERSION,'1.6.0','>=') ||
!in_array($oneGroup->value,array(29,30))){
					if(hikashop_isAllowed($value,$oneGroup->value,'group')){
						$checked = 'checked="checked"';
					}else{
						$custom = true;
						$checked = '';
					}
					$acltable .= '<input type="checkbox"
id="acl_'.$category.'_'.$oneGroup->value.'_'.$action.'"
onclick="updateACLTable(\''.$category.'\',\''.$action.'\');"
value="'.$oneGroup->value.'" '.$checked.'
/>';
				}
				$acltable .= '</td>';
			}
			$acltable .= '</tr>';
		}
		$acltable .= '</tbody></table>';
		$openDiv = JHTML::_('hikaselect.radiolist',   $this->choice,
"acl_$category",
'onclick="updateACLTable(\''.$category.'\',\''.$oneAction.'\');"',
'value', 'text',($custom ? 'special' :
'all'));
		$openDiv .= '<input type="hidden"
name="aclcat[]"
value="'.$category.'"/><div
id="div_acl_'.$category.'"'.($custom ?
'style="display:block"' :
'style="display:none"').'>';
		$return = $openDiv.$acltable.'</div>';
		return $return;
	}
}
PK;�[|��**address.phpnu�[���<?php
/**
 * @package	HikaShop for Joomla!
 * @version	2.2.3
 * @author	hikashop.com
 * @copyright	(C) 2010-2013 HIKARI SOFTWARE. All rights reserved.
 * @license	GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 */
defined('_JEXEC') or die('Restricted access');
?><?php
class hikashopAddressType{
	function load(){
		$this->values = array();
		$this->values[] = JHTML::_('select.option',
'',JText::_('NO_ADDRESS') );
		$this->values[] = JHTML::_('select.option',
'billing',JText::_('HIKASHOP_BILLING_ADDRESS'));
		$this->values[] = JHTML::_('select.option',
'shipping',JText::_('HIKASHOP_SHIPPING_ADDRESS'));
	}
	function display($map,$value){
		$this->load();
		return JHTML::_('select.genericlist',   $this->values, $map,
'class="inputbox" size="1"',
'value', 'text', $value );
	}
}
PK;�[C��϶�	allow.phpnu�[���<?php
/**
 * @package	HikaShop for Joomla!
 * @version	2.2.3
 * @author	hikashop.com
 * @copyright	(C) 2010-2013 HIKARI SOFTWARE. All rights reserved.
 * @license	GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 */
defined('_JEXEC') or die('Restricted access');
?><?php
class hikashopAllowType{
	function load(){
		$this->values = array();
		$this->values[] = JHTML::_('select.option',
'',JText::_('ALL_DATES') );
		$this->values[] = JHTML::_('select.option',
'past',JText::_('ONLY_PAST_DATES'));
		$this->values[] = JHTML::_('select.option',
'future',JText::_('ONLY_FUTURE_DATES'));

		JPluginHelper::importPlugin('hikashop');
		$dispatcher = JDispatcher::getInstance();
		$dispatcher->trigger('onFieldDateCheckSelect',
array(&$this->values));
	}
	function display($map,$value){
		$this->load();
		return JHTML::_('select.genericlist',   $this->values, $map,
'class="inputbox" size="1"',
'value', 'text', $value );
	}
}
PK;�[��b�~~	badge.phpnu�[���<?php
/**
 * @package	HikaShop for Joomla!
 * @version	2.2.3
 * @author	hikashop.com
 * @copyright	(C) 2010-2013 HIKARI SOFTWARE. All rights reserved.
 * @license	GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 */
defined('_JEXEC') or die('Restricted access');
?><?php
class hikashopBadgeType{
	function load(){
		$this->values = array();
		$this->values[] = JHTML::_('select.option',
'topright',JText::_('HIKA_TOP_RIGHT'));
		$this->values[] = JHTML::_('select.option',
'topleft',JText::_('HIKA_TOP_LEFT'));
		$this->values[] = JHTML::_('select.option',
'bottomright',JText::_('HIKA_BOTTOM_RIGHT'));
		$this->values[] = JHTML::_('select.option',
'bottomleft',JText::_('HIKA_BOTTOM_LEFT'));
	}
	function display($map,$value){
		$this->load();
		return JHTML::_('select.genericlist',   $this->values, $map,
'class="inputbox" size="1"',
'value', 'text', $value );
	}
}
PK;�[b&�ܕ�breadcrumb.phpnu�[���<?php
/**
 * @package	HikaShop for Joomla!
 * @version	2.2.3
 * @author	hikashop.com
 * @copyright	(C) 2010-2013 HIKARI SOFTWARE. All rights reserved.
 * @license	GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 */
defined('_JEXEC') or die('Restricted access');
?><?php
class hikashopBreadcrumbType{
	function display($map,$value,$type=''){
		$class = hikashop_get('class.category');
		$mainCategories = $class->getParents($value);
		$mainHTML = array();
		$ids = array();
		if(!empty($mainCategories)){
			foreach($mainCategories as $mainCategory){
				$ids[] = $mainCategory->category_id;
			}

			$where=array();
			if(!empty($type)){
				$where = array(' a.category_type IN
('.$class->database->Quote($type).',\'root\')');
			}
			$childs = $class->loadAllWithTrans($ids,false,$where,' ORDER BY
a.category_name ASC');

			foreach($mainCategories as $k => $mainCategory){
				$values = array();
				$current = 0;
				$values[]= '<option
value="'.$mainCategory->category_id.'">' .
JText::_('HIKA_NONE') . '</option>';
				foreach($childs as $child){
					if($child->category_parent_id==$mainCategory->category_id){
						$values[]= '<option value="'.
$child->category_id .'" '.
(in_array($child->category_id,$ids)?'selected="selected"
':'') .'>' . $child->translation .
'</option>';
					}
				}
				if(count($values)==1) continue;
				$mainHTML[]= '<select name="'. $map
.'_chooser_'.$k.'" id="'. $map
.'_chooser_'.$k.'" class="inputbox"
size="1"
onchange="document.getElementById(\''.$map.'\').value=this.value;
document.adminForm.submit();">'."\n".implode("\n",$values)."\n".'</select>';
			}
		}
		return implode('',$mainHTML);
	}
}
PK;�[�E-++
button.phpnu�[���<?php
/**
 * @package	HikaShop for Joomla!
 * @version	2.2.3
 * @author	hikashop.com
 * @copyright	(C) 2010-2013 HIKARI SOFTWARE. All rights reserved.
 * @license	GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 */
defined('_JEXEC') or die('Restricted access');
?><?php 
class hikashopButtonType{
	function load($value){
		$this->values = array();
		$this->values[] = JHTML::_('select.option',
'normal',JText::_('NORMAL'));
		if($value=='rounded'){
			$this->values[] = JHTML::_('select.option',
'rounded',JText::_('ROUNDED'));
		}
		$this->values[] = JHTML::_('select.option',
'css',JText::_('CSS'));
	}
	function display($map,$value){
		$this->load($value);
		return JHTML::_('select.genericlist',   $this->values, $map,
'class="inputbox" size="1"',
'value', 'text', $value );
	}
}
PK;�[�b1��cart_redirect.phpnu�[���<?php
/**
 * @package	HikaShop for Joomla!
 * @version	2.2.3
 * @author	hikashop.com
 * @copyright	(C) 2010-2013 HIKARI SOFTWARE. All rights reserved.
 * @license	GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 */
defined('_JEXEC') or die('Restricted access');
?><?php
class hikashopCart_redirectType{
	function load($value){
		$this->values = array();
		$this->values[] = JHTML::_('select.option',
'checkout',JText::_('ALWAYS_CHECKOUT'));
		$this->values[] = JHTML::_('select.option',
'stay',JText::_('ALWAYS_STAY'));
		if($value=='stay_if_cart') $this->values[] =
JHTML::_('select.option',
'stay_if_cart',JText::_('STAY_IF_CART_MODULE_DISPLAYED'));
		$this->values[] = JHTML::_('select.option',
'ask_user',JText::_('STAY_AND_DISPLAY_POPUP_NOTICE'));

	}
	function display($map,$value){
		$this->load($value);
		return JHTML::_('select.genericlist',   $this->values, $map,
'class="inputbox" size="1"',
'value', 'text', $value );
	}
}
PK;�[/TD���cart_share.phpnu�[���<?php
/**
 * @package	HikaShop for Joomla!
 * @version	4.4.1
 * @author	hikashop.com
 * @copyright	(C) 2010-2021 HIKARI SOFTWARE. All rights reserved.
 * @license	GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 */
defined('_JEXEC') or die('Restricted access');
?><?php
class hikashopCart_shareType {
	protected $values = null;

	public function load() {
		$values = array(
			'nobody' => 'HIKASHOP_NOBODY',
			'public' => 'HIKASHOP_EVERYBODY',
			'registered' => 'HIKASHOP_REGISTERED_USERS',
			'email' => 'HIKA_EMAIL',
		);
		if($this->values !== null)
			return $values;

		$this->values = array();
		foreach($values as $k => $v) {
			$this->values[] = JHTML::_('select.option', $k,
JText::_($v));
		}
		return $values;
	}

	public function display($map, $value) {
		if(empty($this->values))
			$this->load();
		return JHTML::_('select.genericlist', $this->values, $map,
'class="custom-select" size="1"',
'value', 'text', $value);
	}
}
PK;�[��ܴ�category.phpnu�[���<?php
/**
 * @package	HikaShop for Joomla!
 * @version	2.2.3
 * @author	hikashop.com
 * @copyright	(C) 2010-2013 HIKARI SOFTWARE. All rights reserved.
 * @license	GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 */
defined('_JEXEC') or die('Restricted access');
?><?php
class hikashopCategoryType{
	function load(){
		$this->values = array();
		$this->values[] = JHTML::_('select.option',
'product',JText::_('PRODUCT_CATEGORY') );
		$this->values[] = JHTML::_('select.option',
'tax',JText::_('TAXATION_CATEGORY'));
		$this->values[] = JHTML::_('select.option',
'status',JText::_('ORDER_STATUS'));
		$this->values[] = JHTML::_('select.option',
'manufacturer',JText::_('MANUFACTURER'));
	}
	function display($map,$value){
		$this->load();
		return JHTML::_('select.genericlist', $this->values, $map,
'class="inputbox" size="1"
'.(!empty($this->onchange)?'onchange="'.$this->onchange.'"':''),
'value', 'text', $value );
	}
}
PK;�[���11categorysub.phpnu�[���<?php
/**
 * @package	HikaShop for Joomla!
 * @version	2.2.3
 * @author	hikashop.com
 * @copyright	(C) 2010-2013 HIKARI SOFTWARE. All rights reserved.
 * @license	GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 */
defined('_JEXEC') or die('Restricted access');
?><?php
class hikashopCategorysubType{
	var $type='tax';
	var $value='';
	function load($form=true){
		static $data = array();
		if(!isset($data[$this->type])){
			$query = 'SELECT category_id FROM
'.hikashop_table('category').' WHERE 
category_parent_id=0 LIMIT 1';
			$db = JFactory::getDBO();
			$db->setQuery($query);
			$parent = (int)$db->loadResult();
			$select = 'SELECT
a.category_name,a.category_id,a.category_namekey';
			$table = ' FROM '.hikashop_table('category') .
' AS a';
			$app = JFactory::getApplication();
			$translationHelper = hikashop_get('helper.translation');

			if($app->isAdmin() && $translationHelper->isMulti()){
				$user = JFactory::getUser();
				$locale = $user->getParam('language');
				if(empty($locale)){
					$config = JFactory::getConfig();
					if(HIKASHOP_J30){
						$locale = $config->get('language');
					}else{
						$locale = $config->getValue('config.language');
					}
				}
				$lgid = $translationHelper->getId($locale);
				$select .= ',b.value';
				$trans_table = 'jf_content';
				if($translationHelper->falang){
					$trans_table = 'falang_content';
				}
				$table .=' LEFT JOIN
'.hikashop_table($trans_table,false).' AS b ON
a.category_id=b.reference_id AND
b.reference_table=\'hikashop_category\' AND
b.reference_field=\'category_name\' AND b.published=1 AND
language_id='.$lgid;
			}
			$query = $select.$table;
			$query .= ' WHERE  a.category_type =
\''.$this->type.'\' AND
a.category_parent_id!='.$parent.' ORDER BY a.category_ordering
ASC';
			if(!$app->isAdmin() && $translationHelper->isMulti(true)
&& class_exists('JFalangDatabase')){
				$db->setQuery($query);
				$this->categories =
$db->loadObjectList('','stdClass',false);
			}elseif(!$app->isAdmin() &&
$translationHelper->isMulti(true) &&
(class_exists('JFDatabase')||class_exists('JDatabaseMySQLx'))){
				$db->setQuery($query);
				$this->categories = $db->loadObjectList('',false);
			}else{
				$db->setQuery($query);
				$this->categories = $db->loadObjectList();
			}
			$data[$this->type] =& $this->categories;
		}else{
			$this->categories =& $data[$this->type];
		}
		$this->values = array();
		if($form){
			if(in_array($this->type,array('status','tax'))){
				$this->values[] = JHTML::_('select.option', '',
JText::_('HIKA_NONE') );
			}else{
				$this->values[] = JHTML::_('select.option', 0,
JText::_('HIKA_NONE') );
			}
		}else{
			if($this->type=='status'){
				$this->values[] = JHTML::_('select.option', '',
JText::_('ALL_STATUSES') );
			}else{
				$this->values[] = JHTML::_('select.option', 0,
JText::_('ALL_'.strtoupper($this->type)) );
			}
		}
		if(!empty($this->categories)){
			foreach($this->categories as $k => $category){
				if(empty($category->value)){
					$val = str_replace('
','_',strtoupper($category->category_name));
					$category->value = JText::_($val);
					if($val==$category->value){
						$category->value = $category->category_name;
					}
					$this->categories[$k]->value = $category->value;
				}

				if($this->type=='status'){
					$this->values[] = JHTML::_('select.option',
$category->category_name, $category->value );
				}elseif($this->type=='tax'){
					$field = $this->field;
					$this->values[] = JHTML::_('select.option',
$category->$field, $category->value );
				}else{
					$this->values[] = JHTML::_('select.option',
(int)$category->category_id, $category->value );
				}
			}
		}

	}

	function trans($status){

		foreach($this->categories as $value){
			if($value->category_name == $status){
				return $value->value;
			}
		}
		foreach($this->categories as $value){
			if($value->category_namekey == $status){
				return $value->value;
			}
		}
		return $status;
	}

	function get($val){
		foreach($this->values as $value){
			if($value->value == $val){
				return $value->text;
			}
		}
		return $val;
	}

	function display($map,$value,$form=true,$none=true,$id=''){
		$this->value = $value;
		if(!is_bool($form)){
			$attribute = $form;
			$form = $none;

		}elseif(!$form){
			$attribute = '
onchange="document.adminForm.submit();"';
		}else{
			$attribute = '';
		}
		$this->load($form);

		if(!in_array($this->type,array('status','tax'))){
			$value = (int)$value;
		}
		if(strpos($attribute,'size="')===false){
			$attribute.=' size="1"';
		}
		if(!empty($id)){
			return JHTML::_('select.genericlist', $this->values, $map,
'class="inputbox"'.$attribute, 'value',
'text', $value , $id);
		}else{
			return JHTML::_('select.genericlist', $this->values, $map,
'class="inputbox"'.$attribute, 'value',
'text', $value );
		}
	}

	public function displaySingle($map, $value, $type = '', $root =
0, $delete = false) {

		hikashop_loadJslib('otree');
		$id =
str_replace(array('[',']'),array('_',''),$map);

		$key = 0;
		$name = 'Root';
		if((int)$value > 0) {
			$categoryClass = hikashop_get('class.category');
			$category = $categoryClass->get((int)$value);
			if($category) {
				$key = (int)$value;
				$name = $category->category_name;
			}
		}

		if($delete && ($value === null || $value === '')) {
			$key = '';
			$name =
'<em>'.JText::_('HIKA_NONE').'</em>';
		}

		if(empty($type))
			$type =
array('product','manufacturer','vendor');

		$cleanText = '<em>'.str_replace("'",
"\\'",
JText::_('HIKA_NONE')).'</em>';

		$ret = '
<div class="nameboxes" id="'.$id.'"
onclick="window.nameboxes.focus(\''.$id.'\',\''.$id.'_text\');">
	<div class="namebox"
id="'.$id.'_namebox">
		<input type="hidden" name="'.$map.'"
id="'.$id.'_valuehidden"
value="'.$key.'"/><span
id="'.$id.'_valuetext">'.$name.'</span>
		'.(!$delete?'<a class="editbutton"
href="#" onclick="return
false;"><span>-</span></a>':
		'<a class="closebutton" href="#"
onclick="window.nameboxes.clean(\''.$id.'\',this,\''.$cleanText.'\');return
false;"><span>X</span></a>').'
	</div>
	<div class="nametext">
		<input id="'.$id.'_text" type="text"
style="width:50px;min-width:60px"
onfocus="window.nameboxes.focus(\''.$id.'\',this);"
onkeyup="window.nameboxes.simpleSearch(\''.$id.'\',this);"
onchange="window.nameboxes.simpleSearch(\''.$id.'\',this);"/>
		<span
style="position:absolute;top:0px;left:-2000px;visibility:hidden"
id="'.$id.'_span">span</span>
	</div>
	<div style="clear:both;float:none;"></div>
</div>
<div class="namebox-popup">
	<div id="'.$id.'_otree"
style="display:none;" class="oTree
namebox-popup-content"></div>
</div>
<script type="text/javascript">
var options = {rootImg:"'.HIKASHOP_IMAGES.'otree/",
showLoading:false};
var data = '.$this->getData($type, $root, $root == 0, $root ==
0).';
var '.$id.' = new
window.oTree("'.$id.'",options,null,data,false);
'.$id.'.addIcon("world","world.png");
'.$id.'.callbackSelection = function(tree,id) {
	var d = document, node = tree.get(id);
	if( node.value && node.name ) {
		var e = d.getElementById("'.$id.'_valuehidden");
		if(e) e.value = node.value;
		e = d.getElementById("'.$id.'_valuetext");
		if(e) e.innerHTML = node.name;
	}
	var c = d.getElementById("'.$id.'_otree");
	if(c) c.style.display = "none";
	c = d.getElementById("'.$id.'_text");
	if(c) c.value = "";
	tree.sel(0);
};
'.$id.'.render(true);
</script>';

		return $ret;
	}

	public function displayMultiple($map, $values, $type = '', $root
= 0) {
		if(substr($map,-2) == '[]')
			$map = substr($map,0,-2);
		$id =
str_replace(array('[',']'),array('_',''),$map);
		$ret = '<div class="nameboxes"
id="'.$id.'"
onclick="window.nameboxes.focus(\''.$id.'\',\''.$id.'_text\');">';
		if(!empty($values)) {
			foreach($values as $key => $name) {
				$obj = null;
				if(is_object($name)) {
					$obj = $name;
					$name = $name->category_name;
				}
				$ret .= '<div class="namebox"
id="'.$id.'_'.$key.'">'.
					'<input type="hidden"
name="'.$map.'[]"
value="'.$key.'"/>'.$name.
					' <a class="closebutton" href="#"
onclick="window.hikashop.deleteId(\''.$id.'_'.$key.'\');return
false;"><span>X</span></a>'.
					'</div>';
			}
		}

		$ret .= '<div class="namebox"
style="display:none;"
id="'.$id.'tpl">'.
				'<input type="hidden" name="{map}"
value="{key}"/>{name}'.
				' <a class="closebutton" href="#"
onclick="window.hikashop.deleteId(this.parentNode);window.Oby.cancelEvent();return
false;"><span>X</span></a>'.
				'</div>';

		$ret .= '<div class="nametext">'.
			'<input id="'.$id.'_text"
type="text" style="width:50px;min-width:60px"
onfocus="window.nameboxes.focus(\''.$id.'\',this);"
'. '
onkeyup="window.nameboxes.tree(\''.$id.'\',this);"
onchange="window.nameboxes.tree(\''.$id.'\',this);"/>'.
			'<span
style="position:absolute;top:0px;left:-2000px;visibility:hidden"
id="'.$id.'_span">span</span>'.
			'</div>';

		hikashop_loadJslib('otree');

		if(empty($type))
			$type =
array('product','manufacturer','vendor');

		$ret .= '<div
style="clear:both;float:none;"></div></div>
<div class="namebox-popup">
	<div id="'.$id.'_otree"
style="display:none;" class="oTree
namebox-popup-content"></div>
</div>
<script type="text/javascript">
var options = {rootImg:"'.HIKASHOP_IMAGES.'otree/",
showLoading:false};
var data = '.$this->getData($type, $root, true).';
var '.$id.' = new
window.oTree("'.$id.'",options,null,data,false);
'.$id.'.addIcon("world","world.png");
'.$id.'.callbackSelection = function(tree,id) {
	var d = document, node = tree.get(id);
	if( node.value && node.name) {
		var blocks = {map: "'.$map.'[]", key: node.value,
name: node.name}, cur =
d.getElementById("'.$id.'_"+node.value);
		if(!cur) {
			window.hikashop.dup("'.$id.'tpl", blocks,
"'.$id.'_"+node.value);
		}
	}
	var c = d.getElementById("'.$id.'_otree");
	if(c) c.style.display = "none";
	c = d.getElementById("'.$id.'_text");
	if(c) c.value = "";
	tree.sel(0);
};
'.$id.'.render(true);
</script>';

		return $ret;
	}

	public function displayTree($id, $root = 0, $type = null, $displayRoot =
false, $selectRoot = false) {
		hikashop_loadJslib('otree');
		if(empty($type))
			$type =
array('product','manufacturer','vendor');
		$ret = '';

		$ret .= '<div id="'.$id.'_otree"
class="oTree"></div>
<script type="text/javascript">
var options = {rootImg:"'.HIKASHOP_IMAGES.'otree/",
showLoading:false};
var data = '.$this->getData($type, $root, $displayRoot,
$selectRoot).';
var '.$id.' = new
window.oTree("'.$id.'",options,null,data,false);
'.$id.'.addIcon("world","world.png");
'.$id.'.render(true);
</script>';
		return $ret;
	}

	private function getData($type = 'product', $root = 0,
$displayRoot = false, $selectRoot = false) {
		$categoryClass = hikashop_get('class.category');
		if($root == 1)
			$root = 0;
		$elements = $categoryClass->getList($type, $root, $displayRoot);

		$ret = '[';
		$cpt = count($elements)-1;
		$sep = '';
		$rootDepth = 0;
		foreach($elements as $k => $element) {
			$next = null;
			if($k < $cpt)
				$next = $elements[$k+1];

			$status = 4;
			if(!empty($next) && $next->category_parent_id ==
$element->category_id)
				$status = 2;
			if($element->category_type == 'root') {
				$status = 5;
				$rootDepth = (int)$element->category_depth + 1;
			}
			if(($element->category_id == $root) || ($root == 0 &&
!$displayRoot && $rootDepth == 0))
				$rootDepth = (int)$element->category_depth;

			$ret .=
$sep.'{"status":'.$status.',"name":"'.str_replace('"','&quot;',$element->category_name).'"';

			if($element->category_type == 'root') {
				$ret .= ',"icon":"world"';
				if(!$selectRoot)
					$ret .= ',"noselection":1';
				else
					$ret .= ',"value":'.$element->category_id;
			} else {
				$ret .= ',"value":'.$element->category_id;
			}

			$sep = '';
			if(!empty($next)) {
				if($next->category_depth > $element->category_depth &&
$element->category_type != 'root') {
					$ret .= ',"data":[';
				} else if($next->category_depth < $element->category_depth) {
					$ret .= '}'.str_repeat(']}',
$element->category_depth - $next->category_depth);
					$sep = ',';
				} else {
					$ret .= '}';
					$sep = ',';
				}
			} else {
				$ret .= '}';
				if($element->category_depth >= $rootDepth)
					$ret .= str_repeat(']}', $element->category_depth -
$rootDepth);
			}
		}
		$ret .= ']';

		return $ret;
	}
}
PK;�[<"�##characteristic.phpnu�[���<?php
/**
 * @package	HikaShop for Joomla!
 * @version	2.2.3
 * @author	hikashop.com
 * @copyright	(C) 2010-2013 HIKARI SOFTWARE. All rights reserved.
 * @license	GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 */
defined('_JEXEC') or die('Restricted access');
?><?php
class hikashopCharacteristicType {
	var $characteristics=false;
	var $options="";
	function load($display_type=''){
		$type = 'onclick';
		if($display_type=='dropdown' ||
$display_type=='table'){
			$type = 'onchange';
		}
		$this->options=' '.$type.'="return
hikashopUpdateVariant(this);"';
		$ids = array_keys($this->characteristics);
		$list =
'[\''.implode('\',\'',$ids).'\']';
		$js = '
		function hikashopUpdateVariant(obj){
			var options = '.$list.';
			var len = options.length;
			var selection = \'\';
			var found=false;
			try { obj.blur(); } catch(e){}
			if(obj.type==\'radio\'){
				var form = document[\'hikashop_product_form\'];
				if(form){
					for (var i = 0; i < len; i++){
						var checkFields =
form.elements[\'hikashop_product_characteristic[\'+options[i]+\']\'];
						if(checkFields){
							if(!checkFields.length && checkFields.value){
								selection = selection + \'_\' + checkFields.value;
								continue;
							}
							var len2 = checkFields.length;
							for (var j = 0; j < len2; j++){
								if(checkFields[j].checked){
									selection = selection + \'_\' + checkFields[j].value;
									found=true;
								}
							}
						}
						if(!found){
							return true;
						}
					}
				}
			}else{
				for (var i = 0; i < len; i++){
					selection = selection + \'_\' +
document.getElementById(\'hikashop_product_characteristic_\'+options[i]).value;
				}
			}

			hikashopUpdateVariantData(selection);
			return true;
		}

		function hikashopUpdateVariantData(selection){

			if(selection){
				var names =
[\'id\',\'name\',\'code\',\'image\',\'price\',\'quantity\',\'description\',\'weight\',\'url\',\'width\',\'length\',\'height\',\'contact\',\'custom_info\',\'files\'];
				var len = names.length;
				for (var i = 0; i < len; i++){
					var el =
document.getElementById(\'hikashop_product_\'+names[i]+\'_main\');
					var el2 =
document.getElementById(\'hikashop_product_\'+names[i]+selection);

					if(el && el2) el.innerHTML=el2.innerHTML;
				}

				if(typeof this.window[\'hikashopRefreshOptionPrice\'] ==
\'function\') hikashopRefreshOptionPrice();
			}
			return true;
		}
		';
		if(!HIKASHOP_PHP5) {
			$doc =& JFactory::getDocument();
		}else{
			$doc = JFactory::getDocument();
		}
		$doc->addScriptDeclaration("\n<!--\n".$js."\n//-->\n");
	}
	function displayFE(&$element,$params){
		if(empty($element->main->characteristics)) return '';
		$this->characteristics=&$element->main->characteristics;
		$this->load($params->get('characteristic_display'));
		$app = JFactory::getApplication();
		$chromePath =
JPATH_THEMES.DS.$app->getTemplate().DS.'html'.DS.'hikashop_characteristics.php';
		if (file_exists($chromePath)){
			require_once ($chromePath);
			if(function_exists('hikashop_characteristics_html')){
				$html = hikashop_characteristics_html($element,$params,$this);
			}
		}

		if(empty($html)){
			switch($params->get('characteristic_display')){
				case 'table':
					if(count($this->characteristics)==2){
						$html = '';
						$firstCharacteristic = reset($this->characteristics);
						$secondCharacteristic = end($this->characteristics);

						$html.= '<table
class="hikashop_product_characteristic_chooser"><tr><td></td>';
						if(empty($secondCharacteristic->values)){

						}else{
							foreach($secondCharacteristic->values as $value){
								$html.='<td>'.$value->characteristic_value.'</td>';
							}
						}
						$html.='</tr>';
						$this->options=' onclick="return
hikashopUpdateVariantData(this.value);"';
						$size=0;
						if(!empty($firstCharacteristic->values)){
							foreach($firstCharacteristic->values as $value){
								$html.='<tr><td
style="text-align:right">'.$value->characteristic_value.'</td>';
								if(strlen($value->characteristic_value)>$size)$size=strlen($value->characteristic_value);
								if(!empty($secondCharacteristic->values)){
									foreach($secondCharacteristic->values as $value2){
										$class = '';
										$classspan = '';
										foreach($element->variants as $k => $variant){
											$char1 = false;
											$char2 = false;
											foreach($variant->characteristics as
$variantCharacteristic){
												if($variantCharacteristic->characteristic_id==$value->characteristic_id){
													$char1 = true;
												}elseif($variantCharacteristic->characteristic_id==$value2->characteristic_id){
													$char2 = true;
												}
												if($char1&&$char2){
													if(!$variant->product_published ||
$variant->product_quantity==0){
														$class = ' hikashop_product_variant_out_of_stock';
														$classspan='
hikashop_product_variant_out_of_stock_span';
													}
													break 2;
												}
											}
										}

										$name =
'_'.$value->characteristic_id.'_'.$value2->characteristic_id;
										$radio="\n\t<span
class=\"hikashop_product_characteristic_span".$classspan."\"><input
type=\"radio\"
class=\"hikashop_product_characteristic".$class."\"
name=\"hikashop_product_characteristic\"
id=\"hikashop_product_characteristic".$name."\"
value=\"".$name."\" ".$this->options;
										if($this->characteristics[$value->characteristic_parent_id]->default->characteristic_id==$value->characteristic_id
&&
!empty($this->characteristics[$value2->characteristic_parent_id]->default->characteristic_id)
&&
$this->characteristics[$value2->characteristic_parent_id]->default->characteristic_id==$value2->characteristic_id){
											$radio.=' checked';
										}
										$radio.=" /></span>";
										$html.='<td>'.$radio.'</td>';
									}
								}
								$html.='</tr>';
							}
						}
						$html.='</table>';
						if($params->get('characteristic_display_text')){
							$space = '';
							for($i=0;$i<=$size;$i++){
								$space.='&nbsp;&nbsp;';
							}
							$html='<table
class="hikashop_product_characteristic_chooser"><tr><td></td/><td>'.$space.$secondCharacteristic->characteristic_value.'</td></tr><tr><td>'.$firstCharacteristic->characteristic_value.'</td><td>'.$html.'</td></table>';
						}
						break;
					}
				default:
				case 'radio':
				case 'dropdown':
					$main_html = '<table
class="hikashop_product_characteristics_table">';
					$config =& hikashop_config();
					foreach($this->characteristics as $characteristic){
						$main_html.='<tr>';
						$values = array();
						if(!empty($characteristic->values)){
							foreach($characteristic->values as $k => $value){
								if(!$config->get('show_out_of_stock',1)){
									$hasQuantity = false;
									foreach($element->variants as $variant){
										foreach($variant->characteristics as $variantCharacteristic){
											if($variantCharacteristic->characteristic_id==$value->characteristic_id){
												if($variant->product_quantity != 0 ||
$element->product_id==$variant->product_id){
													$hasQuantity = true;
												}
											}
										}
									}
									if(!$hasQuantity) continue;
								}
								$values[$k]=$value->characteristic_value;
							}
						}

						$html=$this->display($characteristic->characteristic_id,@$characteristic->default->characteristic_id,$values,$params->get('characteristic_display'));
						if($params->get('characteristic_display_text')){
							$html=$characteristic->characteristic_value.'</td><td>'.$html;
						}
						$main_html.='<td>'.$html.'</td></tr>';
					}
					$main_html.='</table>';
					$html = $main_html;
					break;
			}
		}
		$html.='
		<noscript>
			<input type="submit" class="btn button"
name="characteristic"
value="'.JText::_('REFRESH_INFORMATION').'"/>
		</noscript>';
		return $html;
	}
	function
display($map,$value,$values,$characteristic_display='dropdown'){
		if(empty($values) || !is_array($values)){
			return JText::_('NO_VALUES_FOUND');
		}
		if(is_array($this->characteristics)){
			$characteristic_id = $map;
			$map =
'hikashop_product_characteristic['.$characteristic_id.']';
			$id = 'hikashop_product_characteristic_'.$characteristic_id;
		}else{
			$id = $map;
		}

		$this->values = array();
		foreach($values as $key => $val){
			if(strlen($val)!=0 && empty($val)){
				$val = $val.'&nbsp;';
			}
			$this->values[] = JHTML::_('select.option', $key,$val);
		}
		if($characteristic_display!='radio'){
			$characteristic_display='generic';
		}

		$html =
JHTML::_('select.'.$characteristic_display.'list',  
$this->values, $map, 'class="inputbox"
size="1"'.$this->options, 'value',
'text', (int)$value,$id );
		return $html;
	}
}
PK;�[�,�ص�characteristicdisplay.phpnu�[���<?php
/**
 * @package	HikaShop for Joomla!
 * @version	2.2.3
 * @author	hikashop.com
 * @copyright	(C) 2010-2013 HIKARI SOFTWARE. All rights reserved.
 * @license	GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 */
defined('_JEXEC') or die('Restricted access');
?><?php
class hikashopCharacteristicdisplayType{
	function load(){
		$this->values = array();
		$this->values[] = JHTML::_('select.option',
'dropdown',JText::_('DROPDOWN'));
		$this->values[] = JHTML::_('select.option',
'radio',JText::_('FIELD_RADIO'));
		$this->values[] = JHTML::_('select.option',
'table',JText::_('TABLE'));//table only works for 2
characteristics, it will default to dropdown if less or more
		$this->values[] = JHTML::_('select.option',
'list',JText::_('LIST'));
	}
	function display($map,$value){
		$this->load();
		return JHTML::_('select.genericlist',   $this->values, $map,
'class="inputbox" size="1"',
'value', 'text', $value );
	}
}
PK;�[Ieʁ��characteristiclist.phpnu�[���<?php
/**
 * @package	HikaShop for Joomla!
 * @version	2.2.3
 * @author	hikashop.com
 * @copyright	(C) 2010-2013 HIKARI SOFTWARE. All rights reserved.
 * @license	GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 */
defined('_JEXEC') or die('Restricted access');
?><?php

class hikashopCharacteristiclistType{

	function load(){
		$query = 'SELECT * FROM
'.hikashop_table('characteristic').' WHERE
characteristic_parent_id=0';
		$database = JFactory::getDBO();
		$database->setQuery($query);
		$object = $database->loadObjectList();
		$this->values = array();

		foreach($object as $val){
			$this->values[] = JHTML::_('select.option',
$val->characteristic_id, $val->characteristic_value);
		}
	}

	function display($map,$value,$options='class="inputbox"
size="1"'){
		$this->load();
		return JHTML::_('select.genericlist',   $this->values, $map,
$options, 'value', 'text', $value );
	}
}
PK;�[�A��eecharacteristicorder.phpnu�[���<?php
/**
 * @package	HikaShop for Joomla!
 * @version	2.2.3
 * @author	hikashop.com
 * @copyright	(C) 2010-2013 HIKARI SOFTWARE. All rights reserved.
 * @license	GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 */
defined('_JEXEC') or die('Restricted access');
?><?php
class hikashopCharacteristicorderType {
	function load(){
		$this->values = array();
		$this->values[] = JHTML::_('select.option',
'old',JText::_('ID'));
		$this->values[] = JHTML::_('select.option',
'alphabetic',JText::_('ALPHABETIC'));
		$this->values[] = JHTML::_('select.option',
'ordering',JText::_('ORDERING'));
		$this->values[] = JHTML::_('select.option',
'alias',JText::_('HIKA_ALIAS'));
	}
	function display($map,$value){
		$this->load();
		return JHTML::_('select.genericlist',   $this->values, $map,
'class="inputbox" size="1"',
'value', 'text', $value );
	}
}
PK;�[M�>AAcharset.phpnu�[���<?php
/**
 * @package	HikaShop for Joomla!
 * @version	2.2.3
 * @author	hikashop.com
 * @copyright	(C) 2010-2013 HIKARI SOFTWARE. All rights reserved.
 * @license	GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 */
defined('_JEXEC') or die('Restricted access');
?><?php
class hikashopCharsetType{
	function hikashopCharsetType(){
		$charsets = array(
					'BIG5'=>'BIG5',//Iconv,mbstring
					'ISO-8859-1'=>'ISO-8859-1',//Iconv,mbstring
					'ISO-8859-2'=>'ISO-8859-2',//Iconv,mbstring
					'ISO-8859-3'=>'ISO-8859-3',//Iconv,mbstring
					'ISO-8859-4'=>'ISO-8859-4',//Iconv,mbstring
					'ISO-8859-5'=>'ISO-8859-5',//Iconv,mbstring
					'ISO-8859-6'=>'ISO-8859-6',//Iconv,mbstring
					'ISO-8859-7'=>'ISO-8859-7',//Iconv,mbstring
					'ISO-8859-8'=>'ISO-8859-8',//Iconv,mbstring
					'ISO-8859-9'=>'ISO-8859-9',//Iconv,mbstring
					'ISO-8859-10'=>'ISO-8859-10',//Iconv,mbstring
					'ISO-8859-13'=>'ISO-8859-13',//Iconv,mbstring
					'ISO-8859-14'=>'ISO-8859-14',//Iconv,mbstring
					'ISO-8859-15'=>'ISO-8859-15',//Iconv,mbstring
					'ISO-2022-JP'=>'ISO-2022-JP',//mbstring for
sure... not sure about Iconv
					'US-ASCII'=>'US-ASCII', //Iconv,mbstring
					'UTF-7'=>'UTF-7',//Iconv,mbstring
					'UTF-8'=>'UTF-8',//Iconv,mbstring
					'Windows-1250'=>'Windows-1250',
//Iconv,mbstring
					'Windows-1251'=>'Windows-1251',
//Iconv,mbstring
					'Windows-1252'=>'Windows-1252'
//Iconv,mbstring
					);
		if(function_exists('iconv')){
			$charsets['ARMSCII-8'] = 'ARMSCII-8';
			$charsets['ISO-8859-16'] = 'ISO-8859-16';
		}
		$this->values = array();
		foreach($charsets as $code => $charset){
			$this->values[] = JHTML::_('select.option',
$code,$charset);
		}
	}

	function display($map,$value){
		return JHTML::_('select.genericlist', $this->values, $map ,
'size="1"', 'value', 'text',
$value);
	}
}
PK;�[ei [$$checkout.phpnu�[���<?php
/**
 * @package	HikaShop for Joomla!
 * @version	2.2.3
 * @author	hikashop.com
 * @copyright	(C) 2010-2013 HIKARI SOFTWARE. All rights reserved.
 * @license	GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 */
defined('_JEXEC') or die('Restricted access');
?><?php
class hikashopCheckoutType{
	function load(){
		$this->values = array();
		$this->values[] = JHTML::_('select.option',
0,JText::_('NO_CHECKOUT_PROGRESS'));
		$this->values[] = JHTML::_('select.option',
1,JText::_('CHECKOUT_PROGRESS'));
		$this->values[] = JHTML::_('select.option',
2,JText::_('CHECKOUT_PROGRESS_WITHOUT_END'));
	}
	function display($map,$value){
		$this->load();
		return JHTML::_('select.genericlist',   $this->values, $map,
'class="inputbox" size="1"',
'value', 'text', (int)$value );
	}
}
PK;�[ĘI�F�Fcheckout_workflow.phpnu�[���<?php
/**
 * @package	HikaShop for Joomla!
 * @version	4.4.1
 * @author	hikashop.com
 * @copyright	(C) 2010-2021 HIKARI SOFTWARE. All rights reserved.
 * @license	GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 */
defined('_JEXEC') or die('Restricted access');
?><?php
class hikashopCheckout_workflowType {
	protected $checkoutlist = null;

	protected function load() {
		if(!empty($this->checkoutlist))
			return $this->checkoutlist;

		$this->checkoutlist = array(
			'login' => array(
				'name' => JText::_('HIKASHOP_CHECKOUT_LOGIN'),
				'params' => array(),
			),
			'address' => array(
				'name' =>
JText::_('HIKASHOP_CHECKOUT_ADDRESS'),
				'params' => array(),
			),
			'shipping' => array(
				'name' =>
JText::_('HIKASHOP_CHECKOUT_SHIPPING'),
				'params' => array(),
			),
			'payment' => array(
				'name' =>
JText::_('HIKASHOP_CHECKOUT_PAYMENT'),
				'params' => array(),
			),
			'coupon' => array(
				'name' => JText::_('HIKASHOP_CHECKOUT_COUPON'),
				'params' => array(),
			),
			'cart' => array(
				'name' => JText::_('HIKASHOP_CHECKOUT_CART'),
				'params' => array(),
			),
			'cartstatus' => array(
				'name' =>
JText::_('HIKASHOP_CHECKOUT_CART_STATUS'),
				'params' => false, 'legacy' => true,
			),
			'status' => array(
				'name' => JText::_('HIKASHOP_CHECKOUT_STATUS'),
				'params' => array(),
			),
			'fields' => array(
				'name' => JText::_('HIKASHOP_CHECKOUT_FIELDS'),
				'params' => array(),
			),
			'terms' => array(
				'name' => JText::_('HIKASHOP_CHECKOUT_TERMS'),
				'params' => array(),
			),
			'text' => array(
				'name' => JText::_('HIKASHOP_CHECKOUT_TEXT'),
				'params' => array(), 'legacy' => false,
			),
			'separator' => array(
				'name' =>
JText::_('HIKASHOP_CHECKOUT_SEPARATOR'),
				'params' => array(), 'legacy' => false,
			),
		);

		foreach($this->checkoutlist as $k => &$v) {
			if(!empty($v['legacy']) || $v['params'] === false)
				continue;

			$helper = hikashop_get('helper.checkout-' . $k);
			if(empty($helper))
				continue;

			$v['params'] = $helper->getParams();

			unset($helper);

			if(empty($v['params']))
				continue;

			if(is_array($v['params'])) {
				foreach($v['params'] as &$p) {
					if(is_array($p))
						$p['name'] = JText::_($p['name']);
				}
			}
			unset($p);
		}
		unset($v);

		JPluginHelper::importPlugin('hikashop');
		JPluginHelper::importPlugin('hikashopshipping');
		JPluginHelper::importPlugin('hikashoppayment');
		$app = JFactory::getApplication();

		$list = array();
		$app->triggerEvent('onCheckoutStepList',
array(&$list));
		if(!empty($list)) {
			foreach($list as $k => $v) {
				if(isset($this->checkoutlist[$k]))
					continue;

				if(is_string($v))
					$v = array('name' => $v, 'params' =>
array());
				$this->checkoutlist[$k] = $v;
			}
		}

		return $this->checkoutlist;
	}

	public function &getCheckoutData() {
		$this->load();
		return $this->checkoutlist;
	}

	public function displayTextarea($map, $value) {
		$html = '<textarea class="inputbox"
name="'.$map.'" cols="30"
rows="5">'.$value.'</textarea>';
		return $html;
	}

	public function display($map, $value) {
		$checkoutlist = $this->load();
		$id = 'checkworkflow_'.
trim(str_replace(array('][','[',']'),
'_', $map), '_');

		$original_value = $value;
		$workflow = json_decode($value, true);
		if($workflow === null) {
			$workflow = $this->convertLegacyData($value);
			$value = json_encode($workflow);
		}

		foreach($checkoutlist as $k => $el) {
			if(!empty($el['legacy']))
				unset($checkoutlist[$k]);
		}

		$this->initJS($id, $checkoutlist);

		$html = '
<input type="hidden" name="'.$map.'"
id="'.$id.'"
value="'.$this->escape($value).'"/>
<div id="'.$id.'_container"
class="checkout_edition" data-checkout="container"
data-checkout-id="'.$id.'">';

		foreach($workflow['steps'] as $step_id => $step_content) {
			list($begin, $end) = $this->getStepTemplate((int)$step_id,
@$step_content['name'], ($step_id <
count($workflow['steps'])-1));
			$html .= $begin;
			unset($begin);

			foreach($step_content['content'] as $content) {
				if(!isset($checkoutlist[ $content['task'] ]))
					continue;

				$html .= str_replace(
					array(
						'{{TASK}}',
						'{{NAME}}',
						'{{PARAMS}}'
					),
					array(
						$this->escape($content['task']),
						$checkoutlist[$content['task']]['name'],
						$this->processParams(
$checkoutlist[$content['task']]['params'],
@$content['params'] )
					),
					$this->getBlockTemplate()
				);
			}

			$html .= $end;
		}

		$html .= '
	<div class="checkout_edition_add_step">
		<a href="#addStep" class="btn btn-primary"
data-checkout-id="'.$id.'" onclick="return
window.checkoutWorkflowEditor.addStep(this);">'.JText::_('HK_ADD_STEP').'</a>
	</div>
		';
		$html .= '
</div>';
		return $html;
	}

	public function newBlock($name) {
		$checkoutlist = $this->load();
		foreach($checkoutlist as $k => $el) {
			if(!empty($el['legacy']))
				unset($checkoutlist[$k]);
		}

		if(!isset($checkoutlist[$name]))
			return '';
		$null = null;
		return trim(str_replace(
			array(
				'{{TASK}}',
				'{{NAME}}',
				'{{PARAMS}}'
			),
			array(
				$this->escape($name),
				$checkoutlist[$name]['name'],
				$this->processParams( $checkoutlist[$name]['params'],
$null )
			),
			$this->getBlockTemplate()
		));
	}

	public function newStep($num) {
		return trim(implode('', $this->getStepTemplate($num)));
	}

	protected function getStepTemplate($id = null, $name = '', $add
= true) {
		if($id === null) {
			$id = '{ID}';
			$id_inc = '{NUM}';
		} else {
			$id = (int)$id;
			$id_inc = ($id + 1);
		}

		$end = '
		</div>
	</div>';

		if($add) {
			$checkoutlist = $this->load();
			foreach($checkoutlist as $k => $el) {
				if(!empty($el['legacy']))
					unset($checkoutlist[$k]);
			}

			$values = array();
			foreach($checkoutlist as $key => $v) {
				$values[$key] = JHTML::_('select.option', $key,
$v['name']);
			}

			$end = '
<div class="checkout_content_block checkout_content_new_block"
data-checkout="add">
	<div class="checkout_content_block_main">
		<span class="checkout_content_block_title
checkout_content_new_block_title">'.JText::_('NEW_BLOCK').'</span>
		'.JHTML::_('select.genericlist', $values, '',
'class="custom-select"
data-checkout="addlist"', 'value',
'text', '').'<div
class="checkout_content_add_block">
		<a href="#addblock" class="btn btn-primary"
onclick="return
window.checkoutWorkflowEditor.addBlock(this);">'.JText::_('HK_ADD_CHECKOUT_BLOCK').'</a></div>
	</div>
</div>'.$end;
		}

		return array('
	<div class="checkout_step_block"
data-checkout="step"
data-checkout-step="'.$id.'">
		<span
class="checkout_step_title">'.JText::sprintf('STEP_X',
'<span
data-checkout="num">'.$id_inc.'</span>').'</span>
		<input type="text"
value="'.$this->escape(@$name).'"
data-checkout-step-name="'.$id.'"
data-placeholder="'.JText::_('HIKASHOP_CHECKOUT_END').'"
onblur="window.checkoutWorkflowEditor.onChange(this);"/>
		<a href="#delete"
class="checkout_content_step_delete"
title="'.JText::_('DELETE_THIS_STEP').'"
onclick="return
window.checkoutWorkflowEditor.stepDelete(this);"></a>
		<div class="checkout_step_content"
data-consistencyheight=".checkout_content_block">',$end
		);
	}

	protected function getBlockTemplate() {
		return '
<div class="checkout_content_block {{TASK}}"
data-checkout="content"
data-checkout-content="{{TASK}}">
	<a href="#up" class="checkout_content_block_nav
checkout_content_block_up"
title="'.JText::_('SWAP_WITH_PREVIOUS_BLOCK').'"
onclick="return
window.checkoutWorkflowEditor.blockUp(this);"></a>
	<a href="#previous" class="checkout_content_block_nav
checkout_content_block_previous"
title="'.JText::_('MOVE_TO_PREVIOUS_STEP').'"
onclick="return
window.checkoutWorkflowEditor.blockPrevious(this);"></a>
	<div class="checkout_content_block_main">
		<span
class="checkout_content_block_title">{{NAME}}</span>
		<a href="#delete"
class="checkout_content_block_delete"
title="'.JText::_('DELETE_THIS_BLOCK').'"
onclick="return
window.checkoutWorkflowEditor.blockDelete(this);"></a>
		<div
class="checkout_block_params">{{PARAMS}}</div>
	</div>
	<a href="#next" class="checkout_content_block_nav
checkout_content_block_next"
title="'.JText::_('MOVE_TO_NEXT_STEP').'"
onclick="return
window.checkoutWorkflowEditor.blockNext(this);"></a>
	<a href="#down" class="checkout_content_block_nav
checkout_content_block_down"
title="'.JText::_('SWAP_WITH_NEXT_BLOCK').'"
onclick="return
window.checkoutWorkflowEditor.blockDown(this);"></a>
</div>';
	}

	protected function escape($value) {
		return htmlentities($value, ENT_QUOTES, 'UTF-8');
	}

	protected function initJS($id, $checkoutlist, $templates = array()) {
		static $init = false;

		$doc = JFactory::getDocument();
		$init_workflow = '
window.hikashop.ready(function(){
checkoutWorkflowEditor.init("'.$id.'"); });
';
		if($init) {
			$doc->addScriptDeclaration( $init_workflow );
			return;
		}

		$urls = array(
			'addblock' =>
hikashop_completeLink('config&task=checkout_newblock', true,
true),
			'addstep' =>
hikashop_completeLink('config&task=checkout_newstep', true,
true),
		);

		$js = '
window.checkoutBlocks = '.json_encode($checkoutlist).';
window.checkoutWorflowUrls = '.json_encode($urls).';
';

		$doc->addScriptDeclaration( $js . $init_workflow );
		$doc->addScript(HIKASHOP_JS .
'checkoutworkflow.js?v='.HIKASHOP_RESSOURCE_VERSION);
		$init = true;
	}

	public function processParams($structure, $data) {
		if(empty($structure))
			return '<span
class="checkout_content_block_no_options">'.JText::_('NO_OPTIONS').'</span>';

		if(!is_array($structure))
			return '<span
class="checkout_content_block_text">'.JText::_($structure).'</span>';

		$ret = '
<dl>';
		foreach($structure as $k => $s) {
			$attributes = (!empty($s['tooltip'])) ? '
'.trim($this->docTip($s['tooltip'])) : '';
			$showon = (!empty($s['showon'])) ? '
data-showon-key="'.$this->escape(@$s['showon']['key']).'"
data-showon-values="'.$this->escape(implode(',',
@$s['showon']['values'])).'"' :
'';

			$ret .= '
	<dt'.$attributes.$showon.'>'.$s['name'].'</dt>
	<dd'.$showon.'>';
			$ret .= $this->processParam($s, $k, $data);
			$ret .= '
	</dd>';
		}
		$ret .= '
</dl>';

		return $ret;
	}

	protected function getDoc($key) {
		$namekey = 'HK_CONFIG_' . strtoupper(trim($key));
		$ret = JText::_($namekey);
		if($ret == $namekey) {
			return '';
		}
		return $ret;
	}

	protected function docTip($key) {
		$ret = $this->getDoc($key);
		if(empty($ret))
			return '';
		return 	' data-toggle="hk-tooltip"
data-title="'.htmlspecialchars($ret, ENT_COMPAT,
'UTF-8').'"';
	}

	protected function processParam(&$s, $k, &$data) {
		$ret = '';
		$v = isset($data[$k]) ? $data[$k] : @$s['default'];
		$uuid = uniqid();
		$name = 'hkCheckout['.$uuid.']';
		$id = 'hkCheckout_'.$uuid;
		switch($s['type']) {
			case 'boolean':
				$ret .= JHtml::_('hikaselect.booleanlist', $name,
'data-checkout-param="'.$k.'"
onchange="window.checkoutWorkflowEditor.onChange(this);"',
$v);
				break;
			case 'inherit':
				$extraValues = null;
				if(isset($s['values']))
					$extraValues = $s['values'];
				$ret .= JHtml::_('hikaselect.inheritradiolist', $name, $v,
$extraValues, 'data-checkout-param="'.$k.'"
onchange="window.checkoutWorkflowEditor.onChange(this);"');
				break;
			case 'radio':
				if(!isset($s['values']))
					break;
				$ret .= JHTML::_('hikaselect.radiolist', 
$s['values'], $name,
'data-checkout-param="'.$k.'"
onclick="window.checkoutWorkflowEditor.onChange(this);"',
'value', 'text', $v);
				break;
			case 'list':
				if(!isset($s['values']))
					break;
				$ret .= JHTML::_('select.genericlist', 
$s['values'], $name, 'class="inputbox no-chzn"
data-checkout-param="'.$k.'"
onchange="window.checkoutWorkflowEditor.onChange(this);"',
'value', 'text', $v);
				break;
			case 'namebox':
				if(!isset($s['namebox']))
					break;
				$nameboxType = hikashop_get('type.namebox');
				if(!isset($s['select']))
					$s['select'] = hikashopNameboxType::NAMEBOX_SINGLE;
				if(!isset($s['namebox_params']))
					$s['namebox_params'] = array(
						'default_text' =>
'<em>'.JText::_('HIKA_NONE').'</em>',
						'returnOnEmpty' => false,
					);
				$s['namebox_params']['attributes'] =
'data-checkout-param="'.$k.'"
data-checkout-type="namebox"';
				$ret .= $nameboxType->display(
					$name,
					$v,
					$s['select'],
					$s['namebox'],
					$s['namebox_params']
				).'<script>window.hikashop.ready(function(){'.
					'var
fct=function(p){window.checkoutWorkflowEditor.onChange("'.$id.'");},
n=window.oNameboxes["'.$id.'"];'.
					'if(n){n.register("set",fct);n.register("unset",fct);}'.
					'});</script>';
				break;
			case 'group':
				if(empty($s['data']))
					break;
				foreach($s['data'] as $key => $one){
					$ret .= $this->processParam($one, $key, $data);
				}
				break;
			case 'html':
				$ret .= @$s['html'];
				break;
			case 'textarea':
				$ret .= '<textarea
data-checkout-param="'.$k.'"
'.@$s['attributes'].'
onchange="window.checkoutWorkflowEditor.onChange(this);"
>'.$v.'</textarea>';
				break;
			case 'text':
			default:
				$ret .= '<input type="text"
data-checkout-param="'.$k.'"
value="'.$v.'"
'.@$s['attributes'].'
onchange="window.checkoutWorkflowEditor.onChange(this);"
/>';
				break;
		}
		return $ret;
	}

	protected function convertLegacyData($checkout_config) {
		$legacy_steps = explode(',', $checkout_config);

		$checkout_workflow = array(
			'steps' => array()
		);
		foreach($legacy_steps as $steps) {
			$steps = explode('_', $steps);
			$content = array();
			foreach($steps as $step) {
				$c = array('task' => $step);
				if($step == 'cartstatus') {
					$c['task'] = 'cart';
					$c['params'] = array('readonly' => true);
				}
				$content[] = $c;
			}
			$checkout_workflow['steps'][] = array(
				'content' => $content
			);
		}
		return $checkout_workflow;
	}

	public function displayLegacy($map, $value) {
		$checkoutlist = $this->load();
		foreach($checkoutlist as $k => $el) {
			if(isset($el['legacy']) && $el['legacy'] ===
false)
				unset($checkoutlist[$k]);
		}

		$id = 'checkworkflow_'.
trim(str_replace(array('][','[',']'),
'_', $map), '_');

		$html = '<textarea class="inputbox"
name="'.$map.'" id="'.$id.'"
cols="30"
rows="5">'.$value.'</textarea>';

		hikashop_loadJsLib('jquery');

		$html .= '<div class="checkout_workflow_zone"
style="width:100%">' .
			'<ul id="'.$id.'_delete"
class="checkout_trash">' .
			'</ul>' .
			'<ul class="checkout_items">';

		foreach($checkoutlist as $k => $v) {
			$n = (is_array($v) ? $v['name'] : $v);
			$html .= '<li class="checkoutElem"
rel="'.$k.'">'.$n.'</li>';
		}

		$html .= '</ul>' .
			'<div style="clear:both">';

		$workflow = explode(',', $value);
		$checkoutRel = 0;
		if(!empty($workflow)) {
			foreach($workflow as $flow) {
				if( $flow == 'end')
					continue;

				$html.= '<ul class="checkout_step"
rel="'.$checkoutRel.'"
id="'.$id.'_step_'.$checkoutRel.'">';
				$checkoutRel++;
				$flow = explode('_', $flow);
				foreach($flow as $f) {
					if(!isset($checkoutlist[$f]))
						continue;
					$n = (is_array($checkoutlist[$f]) ?
$checkoutlist[$f]['name'] : $checkoutlist[$f]);
					$html .= '<li class="checkoutElem"
rel="'.$f.'">'. $n .'</li>';
				}
				$html .= '</ul>';
			}
		}

		$html .= '<ul class="checkout_step"
rel="'.$checkoutRel.'"
id="'.$id.'_step_'.$checkoutRel.'"></ul>'
.
			'</div>'.
			'<div style="clear:both"></div>'.
			'</div>';

		$this->initLegacyJS($id, $checkoutRel);
		return $html;
	}

	protected function initLegacyJS($id, $checkoutRel) {
		static $init = false;

		$js = '';
		if(!$init) {
			$js = "
var checkoutWorkflowHelper = {
	el_id: '',
	maxRel: 0,
	init: function(id, maxRel) {
		var t = this;
		t.maxRel = maxRel;
		t.el_id = id;
		jQuery('ul.checkout_trash').droppable({
			accept: 'ul.checkout_step li',
			hoverClass: 'drophover',
			drop: function(event, ui) { ui.draggable.remove(); }
		});
		jQuery('ul.checkout_items li').draggable({
			dropOnEmpty: true,
			connectToSortable: 'ul.checkout_step',
			helper: 'clone',
			revert: 'invalid'
		}).disableSelection();
		jQuery('ul.checkout_step').sortable({
			revert: true,
			dropOnEmpty: true,
			connectWith: 'ul.checkout_step, ul.checkout_trash',
			update: function(event, ui) { t.serialize(); }
		}).disableSelection();
		jQuery('#'+t.el_id).hide();
	},
	serialize: function() {
		var t = this, max = 0, data = '';
		jQuery('ul.checkout_step li').each(function(index, el) {
			var p = parseInt(jQuery(el).parent().attr('rel'), r =
jQuery(el).attr('rel'));
			if(p > max) {
				max = p;
				if( data != '')
					data += ',';
			} else if( data != '') {
				data += '_';
			}
			data += r;
		});
		data += '_confirm,end';
		jQuery('#'+t.el_id).val(data);

		if(max == this.maxRel) {
			this.maxRel++;
			var t = this;
			jQuery('<ul class=\"checkout_step\" rel=\"'
+ this.maxRel + '\" id=\"'+t.el_id+'_step_' +
this.maxRel +
'\"></ul>').insertAfter('#'+t.el_id+'_step_'
+ (this.maxRel-1) ).sortable({
				revert: true,
				dropOnEmpty: true,
				connectWith: 'ul.checkout_step, ul.checkout_trash',
				update: function(event, ui) { t.serialize(); }
			});
			jQuery('ul.checkout_step').sortable('refresh');
		}
		if(max < (this.maxRel - 1)) {
			for(var i = this.maxRel; i > (max+1); i--) {
				jQuery('#'+t.el_id+'_step_' +
i).sortable('destroy').remove();
				jQuery('ul.checkout_step').sortable('refresh');
			}
			this.maxRel = max + 1;
		}
	}
};
";
			$init = true;
		}

		$js .= '
window.hikashop.ready(function(){
checkoutWorkflowHelper.init("'.$id.'",'.$checkoutRel.');
});
';

		$doc = JFactory::getDocument();
		$doc->addScriptDeclaration( $js );
	}
}
PK;�[I�\���childdisplay.phpnu�[���<?php
/**
 * @package	HikaShop for Joomla!
 * @version	2.2.3
 * @author	hikashop.com
 * @copyright	(C) 2010-2013 HIKARI SOFTWARE. All rights reserved.
 * @license	GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 */
defined('_JEXEC') or die('Restricted access');
?><?php
class hikashopChilddisplayType {
	function load($show_inherit = true, $groupby = false) {
		$this->values = array(
			JHTML::_('select.option', 0,
JText::_('DIRECT_SUB_ELEMENTS')),
			JHTML::_('select.option', 1,
JText::_('ALL_SUB_ELEMENTS'))
		);
		if($groupby)
			$this->values[] = JHTML::_('select.option', 3,
JText::_('ALL_SUB_ELEMENTS_GROUP_BY_CATEGORY'));
		if($show_inherit && JRequest::getCmd('from_display',
false) == false)
			$this->values[] = JHTML::_('select.option',
2,JText::_('HIKA_INHERIT'));
	}
	function display($map, $value, $form = true, $show_inherit = true,
$groupby = false) {
		$this->load($show_inherit, $groupby);
		$options = 'class="inputbox" size="1" ';
		if(!$form) {
			$options .= 'onchange="this.form.submit();"';
		}
		return JHTML::_('select.genericlist', $this->values, $map,
$options, 'value', 'text', (int)$value );
	}
}
PK;�[W��O��	color.phpnu�[���<?php
/**
 * @package    HikaMarket for Joomla!
 * @version    3.1.1
 * @author     Obsidev S.A.R.L.
 * @copyright  (C) 2011-2020 OBSIDEV. All rights reserved.
 * @license    GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 */
defined('_JEXEC') or die('Restricted access');
?><?php
class hikamarketColorType {
	protected $values = null;
	protected $othervalues = array();

	protected function load() {
		if($this->values !== null)
			return;

		$this->values = array();
		for($red = 0; $red < 6; $red++) {
			$rhex = dechex($red * 0x33);
			$rhex = (strlen($rhex) < 2) ? "0".$rhex : $rhex;
			for($blue = 0; $blue < 6; $blue++) {
				$bhex = dechex($blue * 0x33);
				$bhex = (strlen($bhex) < 2) ? "0".$bhex : $bhex;
				for($green = 0; $green < 6; $green++) {
					$ghex = dechex($green * 0x33);
					$ghex = (strlen($ghex) < 2) ? "0".$ghex : $ghex;

					$this->values[$red][] = '#'.$rhex.$ghex.$bhex;
				}
			}
		}
		$this->othervalues = array(
			'#000000', '#111111', '#222222',
'#333333', '#444444', '#555555',
'#666666', '#777777', '#888888',
'#999999',
			'#AAAAAA', '#BBBBBB', '#CCCCCC',
'#DDDDDD', '#EEEEEE', '#FFFFFF',
'#FF0000', '#00FFFF', '#0000FF',
'#0000A0',
			'#FF0080', '#800080', '#FFFF00',
'#00FF00', '#FF00FF', '#FF8040',
'#804000', '#800000', '#808000',
'#408080',
		);
	}

	public function display($id, $map, $color) {
		$xmlConf = new SimpleXMLElement('<field
name="'.$map.'" type="color"
label=""></field>');
		JFormHelper::loadFieldClass('color');
		$jform = new JForm('hikashop');
		$fieldTag = new JFormFieldColor();
		$fieldTag->setForm($jform);
		$fieldTag->setup($xmlConf, $color);
		return $fieldTag->input;
	}

	public function displayAll($id, $map, $color) {
		return $this->display($id, $map, $color);
	}

	public function displayGrid($id = '') {
		$js = '
function applyColor'.$id.'(newcolor) {
	document.getElementById(\'color'.$id.'\').value =
newcolor;
	document.getElementById("colordiv'.$id.'").style.display
= "none";
	applyColorExample'.$id.'();
}
function applyColorExample'.$id.'() {
	document.getElementById(\'colorexample'.$id.'\').style.backgroundColor
= document.getElementById(\'color'.$id.'\').value;
	document.getElementById("colordiv'.$id.'").style.display
= "none";
}';
		$doc = JFactory::getDocument();
		$doc->addScriptDeclaration($js);

		$this->load();

		$text = '<table><tr>';
		foreach($this->othervalues as $oneColor) {
			$text .= '<td style="cursor:pointer"
width="10" height="10"
bgcolor="'.$oneColor.'"
onclick="applyColor'.$id.'(\''.$oneColor.'\')"></td>';
		}
		$text .= '</tr></table>';
		$text .= '<table>';
		foreach($this->values as $line) {
			$text .= '<tr>';
			foreach($line as $oneColor) {
				$text .= '<td style="cursor:pointer"
width="10" height="10"
bgcolor="'.$oneColor.'"
onclick="applyColor'.$id.'(\''.$oneColor.'\')"></td>';
			}
			$text .= '</tr>';
		}
		$text .= '</table>';
		return $text;
	}
}
PK;�[�����compare.phpnu�[���<?php
/**
 * @package	HikaShop for Joomla!
 * @version	2.2.3
 * @author	hikashop.com
 * @copyright	(C) 2010-2013 HIKARI SOFTWARE. All rights reserved.
 * @license	GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 */
defined('_JEXEC') or die('Restricted access');
?><?php
class hikashopCompareType{
	function load(){
		$this->values = array();

		$this->values[] = JHTML::_('select.option',
0,JText::_('HIKASHOP_NO'));
		$this->values[] = JHTML::_('select.option',
1,JText::_('LINK') );
		$this->values[] = JHTML::_('select.option',
2,JText::_('FIELD_CHECKBOX'));
	}
	function display($map,$value){
		$this->load();
		return JHTML::_('select.genericlist', $this->values, $map,
'class="inputbox" size="1"',
'value', 'text', (int)$value );
	}
}
PK;�[���contact.phpnu�[���<?php
/**
 * @package	HikaShop for Joomla!
 * @version	2.2.3
 * @author	hikashop.com
 * @copyright	(C) 2010-2013 HIKARI SOFTWARE. All rights reserved.
 * @license	GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 */
defined('_JEXEC') or die('Restricted access');
?><?php
class hikashopContactType{
	function load(){
		$this->values = array();

		$this->values[] = JHTML::_('select.option',
0,JText::_('HIKASHOP_NO'));
		$this->values[] = JHTML::_('select.option',
2,JText::_('FOR_ALL_PRODUCTS') );
		$this->values[] = JHTML::_('select.option',
1,JText::_('ON_A_PER_PRODUCT_BASIS'));
	}
	function display($map,$value){
		$this->load();
		return JHTML::_('select.genericlist',   $this->values, $map,
'class="inputbox" size="1"',
'value', 'text', (int)$value );
	}
}
PK;�[Q�R���content.phpnu�[���<?php
/**
 * @package	HikaShop for Joomla!
 * @version	2.2.3
 * @author	hikashop.com
 * @copyright	(C) 2010-2013 HIKARI SOFTWARE. All rights reserved.
 * @license	GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 */
defined('_JEXEC') or die('Restricted access');
?><?php
class hikashopContentType{
	function load(){
		$this->values = array();
		$this->values[] = JHTML::_('select.option',
'product',JText::_('PRODUCT') );
		$this->values[] = JHTML::_('select.option',
'category',JText::_('CATEGORY'));
		$this->values[] = JHTML::_('select.option',
'manufacturer',JText::_('MANUFACTURER'));
	}
	function
display($map,$value,&$js,$update=true,$control='',$module=false){
		$this->load();
		$options='';
		if($update){
			if(empty($value)){
				$value = 'product';
			}
			$options = 'var options = [\'product\',
\'category\'];';
			if ($module)
			{
				$js
.=$options.'switchPanelMod(\''.$value.'\',options,\'content\',\''.$control.'\');';
				$options='onchange="'.$options.'return
switchPanelMod(this.value,options,\'content\',\''.$control.'\');"';
			}
			else
			{
				$js
.=$options.'switchPanel(\''.$value.'\',options,\'content\');';
				$options='onchange="'.$options.'return
switchPanel(this.value,options,\'content\');"';
			}
		}
		return JHTML::_('select.genericlist',   $this->values, $map,
'class="inputbox" size="1" '.$options,
'value', 'text', $value,
'content_select'.$control );
	}
}
PK;�[�dl�??contentparser.phpnu�[���<?php
/**
 * @package	HikaShop for Joomla!
 * @version	4.4.1
 * @author	hikashop.com
 * @copyright	(C) 2010-2021 HIKARI SOFTWARE. All rights reserved.
 * @license	GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 */
defined('_JEXEC') or die('Restricted access');
?><?php
class hikashopContentparserType {
	protected $values = null;

	public function load() {
		if($this->values !== null)
			return $this->values;

		$values = array(
			'html' => array(
				'plugin' => null,
				'editor' => null,
				'name' => 'HTML',
			),
		);

		$plugin_values = array();

		JPluginHelper::importPlugin('hikashop');
		$app = JFactory::getApplication();
		$app->triggerEvent('onHkContentParserLoad',
array(&$plugin_values));

		if(!empty($plugin_values))
			$this->values = array_merge($values, $plugin_values, $values);
		else
			$this->values = $values;

		return $this->values;
	}

	public function display($map, $value, $options = '') {
		$parsers = $this->load();

		$values = array();
		foreach($parsers as $k => $parser) {
			$n = isset($parser['name']) ?
JText::_($parser['name']) : JText::_(strtoupper($k));
			$values[$k] = JHTML::_('select.option', $k, $n);
		}

		return JHTML::_('select.genericlist', $values, $map,
'class="custom-select" size="1" '.$options,
'value', 'text', $value);
	}
}
PK;�[����
�
country.phpnu�[���<?php
/**
 * @package	HikaShop for Joomla!
 * @version	2.2.3
 * @author	hikashop.com
 * @copyright	(C) 2010-2013 HIKARI SOFTWARE. All rights reserved.
 * @license	GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 */
defined('_JEXEC') or die('Restricted access');
?><?php
class hikashopCountryType{
	var $type = 'country';
	var $published = false;
	var $allName = 'HIKA_ALL';
	var $country_name = '';

	function load(){
		$filters = array();
		$leftjoin = '';
		$from = '';
		$db = JFactory::getDBO();
		if(is_array($this->type)){
			$filters[] ='a.zone_type IN
(\''.implode('\',\'',$this->type).'\')';
		}else{
			$filters[] =
'a.zone_type=\''.$this->type.'\'';
			if($this->type == 'state' &&
!empty($this->country_name)){
				$filters[]=
'b.zone_parent_namekey='.$db->Quote($this->country_name);
				$from = hikashop_table('zone_link').' AS b LEFT JOIN
';
				$leftjoin = ' ON b.zone_child_namekey=a.zone_namekey';
			}
		}
		if($this->published){
			$filters[] = 'a.zone_published=1';
		}

		$query = 'SELECT a.* FROM
'.$from.hikashop_table('zone').' AS a'.$leftjoin;
		$query .= ' WHERE '.implode(' AND ',$filters).'
ORDER BY a.zone_name_english ASC';

		$db->setQuery($query);
		return $db->loadObjectList('zone_namekey');
	}

	function display($map, $value, $form = true, $options =
'class="inputbox" size="1"',$id=false){
		$zones = $this->load();
		$this->values = array();
		if($form){
			$this->values[] = JHTML::_('select.option', '0',
JText::_($this->allName) );
			$options .= ' onchange="document.adminForm.submit(
);"';
		}
		foreach($zones as $oneZone){
			if(is_numeric($oneZone->zone_name_english)) $this->values[] =
JHTML::_('select.option', $oneZone->zone_id,
$oneZone->zone_name );
			else $this->values[] = JHTML::_('select.option',
$oneZone->zone_id, $oneZone->zone_name_english.' (
'.$oneZone->zone_name.' )' );
		}
		return JHTML::_('select.genericlist', $this->values, $map,
$options, 'value', 'text', (int)$value,$id );
	}

	function displayStateDropDown($namekey, $field_id, $field_namekey,
$field_type, $value = '', $field_options = array()) {
		$this->type = 'state';
		$this->published = true;
		$this->country_name = $namekey;
		$states = $this->load();

		$obj = new stdClass();
		$obj->suffix = '';
		$obj->prefix = '';
		$obj->excludeValue = array();

		$fieldClass = hikashop_get('class.field');
		$dropdown = new hikashopSingledropdown($obj);
		$field = new stdClass();
		$field->field_namekey = $field_id;
		$statesArray = array();
		if(!empty($states)) {
			$pleaseSelect = !empty($field_options['pleaseselect']);
			if($pleaseSelect){
				$pleaseSelect = 0;
				$title = 'PLEASE_SELECT';
				$obj = new stdClass();
				$obj->disabled = '0';
				$obj->value = $title;
				$statesArray[''] = $obj;
			}
			foreach($states as $state) {
				if(is_numeric($state->zone_name_english)){
					$title = $state->zone_name;
				}else{
					$title = $state->zone_name_english;
					if($state->zone_name_english != $state->zone_name){
						$title .= ' ('.$state->zone_name.')';
					}
				}
				$obj = new stdClass();
				$obj->disabled = '0';
				$obj->value = $title;
				$statesArray[$state->zone_namekey] = $obj;
			}
		} else {
			$value = 'no_state_found';
		}
		$field->field_value = $statesArray;
		if(!empty($field_type)) {
			$name =
'data['.$field_type.']['.$field_namekey.']';
		} else {
			$name = $field_namekey;
		}
		return $dropdown->display($field, $value, $name, '',
'');
	}
}
PK;�[��(ppcronreport.phpnu�[���<?php
/**
 * @package	HikaShop for Joomla!
 * @version	2.2.3
 * @author	hikashop.com
 * @copyright	(C) 2010-2013 HIKARI SOFTWARE. All rights reserved.
 * @license	GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 */
defined('_JEXEC') or die('Restricted access');
?><?php
class hikashopCronreportType{
	function hikashopCronreportType(){
		$this->values = array();
		$this->values[] = JHTML::_('select.option',
'0',JText::_('HIKA_NONE'));
		$this->values[] = JHTML::_('select.option',
'1',JText::_('EACH_TIME'));
		$this->values[] = JHTML::_('select.option',
'2',JText::_('ONLY_ACTION'));
		$js = "function updateCronReport(){";
			$js .= "cronsendreport =
window.document.getElementById('cronsendreport').value;";
			$js .= "if(cronsendreport != 0)
{window.document.getElementById('cronreportdetail').style.display
=
'block';}else{window.document.getElementById('cronreportdetail').style.display
= 'none';}";
		$js .= '}';
		$js .='window.addEvent(\'domready\', function(){
updateCronReport(); });';
		if (!HIKASHOP_PHP5) {
			$doc =& JFactory::getDocument();
		}else{
			$doc = JFactory::getDocument();
		}
		$doc->addScriptDeclaration( $js );
	}
	function display($map,$value){
		return JHTML::_('select.genericlist',   $this->values, $map,
'class="inputbox" size="1"
onchange="updateCronReport();"', 'value',
'text', (int) $value ,'cronsendreport');
	}
}
PK;�[�\�X��cronreportsave.phpnu�[���<?php
/**
 * @package	HikaShop for Joomla!
 * @version	2.2.3
 * @author	hikashop.com
 * @copyright	(C) 2010-2013 HIKARI SOFTWARE. All rights reserved.
 * @license	GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 */
defined('_JEXEC') or die('Restricted access');
?><?php
class hikashopCronreportsaveType{
	function hikashopCronreportsaveType(){
		$this->values = array();
		$this->values[] = JHTML::_('select.option',
'0',JText::_('HIKASHOP_NO'));
		$this->values[] = JHTML::_('select.option',
'1',JText::_('SIMPLIFIED_REPORT'));
		$this->values[] = JHTML::_('select.option',
'2',JText::_('DETAILED_REPORT'));
		$js = "function updateCronReportSave(){";
			$js .= "cronsavereport =
window.document.getElementById('cronsavereport').value;";
			$js .= "if(cronsavereport != 0)
{window.document.getElementById('cronreportsave').style.display =
'block';}else{window.document.getElementById('cronreportsave').style.display
= 'none';}";
		$js .= '}';
		$js .='window.addEvent(\'domready\', function(){
updateCronReportSave(); });';
		if (!HIKASHOP_PHP5) {
			$doc =& JFactory::getDocument();
		}else{
			$doc = JFactory::getDocument();
		}
		$doc->addScriptDeclaration( $js );
	}
	function display($map,$value){
		return JHTML::_('select.genericlist',   $this->values, $map,
'class="inputbox" size="1"
onchange="updateCronReportSave();"', 'value',
'text', (int) $value ,'cronsavereport');
	}
}
PK;�['@�.��css.phpnu�[���<?php
/**
 * @package    HikaMarket for Joomla!
 * @version    3.1.1
 * @author     Obsidev S.A.R.L.
 * @copyright  (C) 2011-2020 OBSIDEV. All rights reserved.
 * @license    GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 */
defined('_JEXEC') or die('Restricted access');
?><?php

class hikamarketCssType {

	private function load($type = '') {
		$this->values = array(
			JHTML::_('select.option',
'',JText::_('HIKA_NONE'))
		);

		jimport('joomla.filesystem.folder');
		$regex = '^'.$type.'_([-_A-Za-z0-9]*)\.css$';
		$allCSSFiles = JFolder::files(HIKAMARKET_MEDIA.'css', $regex);
		foreach($allCSSFiles as $oneFile) {
			preg_match('#'.$regex.'#i',$oneFile,$results);
			$this->values[] = JHTML::_('select.option',
$results[1],$results[1]);
		}
	}

	public function display($map, $type, $value) {
		$this->load($type);

		$shopConfig = hikamarket::config(false);

		$html = JHTML::_('select.genericlist', $this->values, $map,
'class="inputbox" style="margin:0"
size="1" onchange="var
e=document.getElementById(\'hikamarket_css_'.$type.'_edit\');if(this.value==\'\'||this.value==\'default\'){e.style.display=\'none\';}else{e.style.display=\'\';}"',
'value', 'text', $value,
'css_'.$type.'_choice' );
		$manage =
hikashop_isAllowed($shopConfig->get('acl_config_manage','all'));
		if(!$manage)
			return $html;

		$popup = hikamarket::get('shop.helper.popup');

		$aStyle = (empty($value) || $value == 'default') ? '
style="display:none"' : '';
		$aStyle.=' class="hikabtn hikabtn-primary"
title="'.JText::_('HIKA_EDIT').'"';
		$html .= $popup->display(
			'<i class="fas fa-pencil-alt"></i>',
			'CSS',
			'\''.'index.php?option=com_hikamarket&amp;tmpl=component&amp;ctrl=config&amp;task=css&amp;file='.$type.'_\'+document.getElementById(\'css_'.$type.'_choice'.'\').value+\'&amp;var='.$type.'\'',
			'hikamarket_css_'.$type.'_edit',
			760,480, $aStyle, '', 'link',true
		) . ' ';
		$html .= $popup->display(
			'<i class="fas fa-plus"></i>',
			'CSS',
			hikamarket::completeLink('config&task=css&var='.$type,
true),
			'hikamarket_css_'.$type.'_new',
			760,480, 'class="hikabtn hikabtn-primary"
title="'.JText::_('HIKA_NEW').'"',
'', 'link'
		);
		return '<div
class="hikamarket_css_selector">'.$html.'</div>';
	}
}
PK;�[4����csv.phpnu�[���<?php
/**
 * @package	HikaShop for Joomla!
 * @version	2.2.3
 * @author	hikashop.com
 * @copyright	(C) 2010-2013 HIKARI SOFTWARE. All rights reserved.
 * @license	GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 */
defined('_JEXEC') or die('Restricted access');
?><?php
class hikashopCsvType{
	function load(){
		$this->values = array();
		$this->values[] = JHTML::_('select.option',
',',JText::_('COMMA'));
		$this->values[] = JHTML::_('select.option',
';',JText::_('SEMICOLON'));
	}
	function display($map,$value){
		$this->load();
		return JHTML::_('select.genericlist',   $this->values, $map,
'class="inputbox" size="1"',
'value', 'text', $value );
	}
}
PK;�[��`��csvdecimal.phpnu�[���<?php
/**
 * @package	HikaShop for Joomla!
 * @version	4.4.1
 * @author	hikashop.com
 * @copyright	(C) 2010-2021 HIKARI SOFTWARE. All rights reserved.
 * @license	GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 */
defined('_JEXEC') or die('Restricted access');
?><?php
class hikashopCsvDecimalType{
	function load(){
		$this->values = array();
		$this->values[] = JHTML::_('select.option',
',',JText::_('COMMA'));
		$this->values[] = JHTML::_('select.option',
'.',JText::_('DOT'));
	}
	function display($map,$value){
		$this->load();
		return JHTML::_('select.genericlist',   $this->values, $map,
'class="custom-select" size="1"',
'value', 'text', $value );
	}
}
PK;�[A�gD++currency.phpnu�[���<?php
/**
 * @package	HikaShop for Joomla!
 * @version	2.2.3
 * @author	hikashop.com
 * @copyright	(C) 2010-2013 HIKARI SOFTWARE. All rights reserved.
 * @license	GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 */
defined('_JEXEC') or die('Restricted access');
?><?php
class hikashopCurrencyType{
	var $displayType = 'auto';
	var $currencies = array();
	function load($value){
		$config =& hikashop_config();
		$forced=array();
		$this->values = array();
		$forced[] = (int)$config->get('main_currency');
		$filters = array('currency_published=1');
		if($this->displayType=='auto'){
			$app = JFactory::getApplication();
			if($app->isAdmin()){
				if(is_array($value)){
					$forced = array_merge($forced,$value);
				}else{
					$forced[]=(int)$value;
				}
			}else{
				$filters[]='currency_displayed = 1';
			}
			$filters[]='currency_id IN
(\''.implode('\',\'',$forced).'\')';
		}elseif($this->displayType=='all'){
			$filters[]='currency_displayed = 1';
			$this->values[] = JHTML::_('select.option',
0,JText::_('HIKA_NONE'));
		}
		if(empty($this->currencies)){
			$query = 'SELECT * FROM
'.hikashop_table('currency').' WHERE 
'.implode(' OR ',$filters);
			$db = JFactory::getDBO();
			$db->setQuery($query);
			$this->currencies = $db->loadObjectList('currency_id');
		}
		if(!empty($this->currencies)){
			foreach($this->currencies as $currency){
				$this->values[] = JHTML::_('select.option',
(int)$currency->currency_id, $currency->currency_symbol.'
'.$currency->currency_code );
			}
		}
	}

	function
display($map,$value,$options='size="1"',$id=''){
		if(empty($this->values)){
			$this->load($value);
		}
		if(strpos($options,'class="')!==false){
			$options =
str_replace('class="','class="inputbox
',$options);
		}else{
			$options .= ' class="inputbox"';
		}
		if(!empty($id)){
			return JHTML::_('select.genericlist',   $this->values,
$map, $options, 'value', 'text', $value , $id);
		}else{
			return JHTML::_('select.genericlist',   $this->values,
$map, $options, 'value', 'text', $value );
		}
	}
}
PK;�[��r3��data_filter.phpnu�[���<?php
/**
 * @package	HikaShop for Joomla!
 * @version	2.2.3
 * @author	hikashop.com
 * @copyright	(C) 2010-2013 HIKARI SOFTWARE. All rights reserved.
 * @license	GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 */
defined('_JEXEC') or die('Restricted access');
?><?php

class hikashopData_filterType{
	var $allValues;
	function load($cursor){
		$this->allValues = array();
		if(!$cursor){
			$this->allValues["price"] = JText::_('PRICE');
			$this->allValues["category"] =
JText::_('CATEGORY');
			$this->allValues["characteristic"] =
JText::_('CHARACTERISTICS');
			$this->allValues["manufacturers"] =
JText::_('MANUFACTURERS');
			$this->allValues["sort"] = JText::_('SORT');
			$this->allValues["custom_field"] =
JText::_('FIELDS');
		}
		$this->allValues["information"] =
JText::_('PRODUCT_INFORMATION');
	}

	function display($map,$value, $cursor=false){
		$this->load($cursor);
		$id='';
		if($cursor){ $id='_cursor'; }

		$js = "function updateDataType".$id."(){
			newType = document.getElementById('filtertype').value;
			if(newType=='text' || newType=='cursor' ||
newType=='instockcheckbox' ){
				return 0;
			}
			unitType =
document.getElementById('product_information_value').value;
			if(unitType=='weight'){
				var unit='weight_unit';
			}else{
				var unit='dimension_unit';
			}

			newType =
document.getElementById('datatype".$id."').value;
			hiddenAll = new
Array('filterValues','filter_categories','sortOption','filterCharacteristics',
'productInfo', 'manufacturers', 'currencies',
'characteristic', 'sort_by',
'product_information', 'custom_field',
'dimension_unit', 'weight_unit');
			allTypes = new Array();
			allTypes['price'] = new Array('filterValues',
'currencies');
			allTypes['quantity'] = new Array();
			allTypes['category'] = new
Array('filter_categories');
			allTypes['characteristic'] = new
Array('characteristic');
			allTypes['manufacturers'] = new
Array('manufacturers');
			allTypes['sort'] = new Array('sort_by');
			allTypes['information'] = new
Array('product_information','filterValues', unit);
			allTypes['custom_field'] = new Array('custom_field',
'filterValues');
			for (var i=0; i < hiddenAll.length; i++){
				$$('tr[id='+hiddenAll[i]+']').each(function(el) {
					el.style.display = 'none';
				});
			}

			for (var i=0; i < allTypes[newType].length; i++){
				$$('tr[id='+allTypes[newType][i]+']').each(function(el)
{
					el.style.display = '';
				});
			}
		}
		window.addEvent('domready', function(){
updateDataType".$id."(); });";

		$doc = JFactory::getDocument();
		$doc->addScriptDeclaration( $js );

		$this->values = array();
		foreach($this->allValues as $oneType => $oneVal){
			$this->values[] = JHTML::_('select.option',
$oneType,$oneVal);
		}
		$select='select.genericlist';

		return JHTML::_($select, $this->values, $map ,
'size="1"
onchange="updateDataType'.$id.'();"',
'value', 'text', (string)
$value,'datatype'.$id.'');
	}
}
PK<�[�Y���
dategroup.phpnu�[���<?php
/**
 * @package	HikaShop for Joomla!
 * @version	2.2.3
 * @author	hikashop.com
 * @copyright	(C) 2010-2013 HIKARI SOFTWARE. All rights reserved.
 * @license	GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 */
defined('_JEXEC') or die('Restricted access');
?><?php
class hikashopDategroupType{
	function load(){
		$this->values = array();
		$this->values[] = JHTML::_('select.option', '%H %j
%Y',JText::_('HOURS'));
		$this->values[] = JHTML::_('select.option', '%j
%Y',JText::_('DAYS'));
		$this->values[] = JHTML::_('select.option', '%u
%Y',JText::_('WEEKS'));
		$this->values[] = JHTML::_('select.option', '%m
%Y',JText::_('MONTHS'));
		$this->values[] = JHTML::_('select.option',
'%Y',JText::_('YEARS'));
	}
	function display($map,$value){
		$this->load();
		return JHTML::_('select.genericlist',   $this->values, $map,
'class="inputbox" size="1"',
'value', 'text', $value );
	}
}
PK<�[�qx��datetype.phpnu�[���<?php
/**
 * @package	HikaShop for Joomla!
 * @version	2.2.3
 * @author	hikashop.com
 * @copyright	(C) 2010-2013 HIKARI SOFTWARE. All rights reserved.
 * @license	GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 */
defined('_JEXEC') or die('Restricted access');
?><?php
class hikashopDatetypeType{
	function load(){
		$this->values = array();
		$this->values[] = JHTML::_('select.option',
'created',JText::_('CREATED_FIELD'));
		$this->values[] = JHTML::_('select.option',
'modified',JText::_('HIKA_LAST_MODIFIED'));
	}
	function display($map,$value){
		$this->load();
		return JHTML::_('select.genericlist',   $this->values, $map,
'class="inputbox" size="1"',
'value', 'text', $value );
	}
}
PK<�[��\default_registration_view.phpnu�[���<?php
/**
 * @package	HikaShop for Joomla!
 * @version	4.4.1
 * @author	hikashop.com
 * @copyright	(C) 2010-2021 HIKARI SOFTWARE. All rights reserved.
 * @license	GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 */
defined('_JEXEC') or die('Restricted access');
?><?php
class hikashopDefault_registration_viewType{
	function load(){
		$this->values = array();
		$this->values[] = JHTML::_('select.option',
'login', JText::_('HIKA_LOGIN') );
		$this->values[] = JHTML::_('select.option', 0,
JText::_('HIKA_REGISTRATION'));
		$this->values[] = JHTML::_('select.option', 1,
JText::_('SIMPLIFIED_REGISTRATION'));
		$this->values[] = JHTML::_('select.option', 3,
JText::_('SIMPLIFIED_REGISTRATION_WITH_PASSWORD'));
		$this->values[] = JHTML::_('select.option', 2,
JText::_('GUEST'));
	}
	function display($map,$value){
		$this->load();
		$js="function changeDefaultRegistrationViewType(){
				var default_registration_view =
window.document.getElementById('configdefault_registration_view');
				if(!default_registration_view) default_registration_view =
window.document.getElementById('config[default_registration_view]');
				var display_login =
window.document.getElementById('config_display_login1');
				if(!display_login) display_login =
window.document.getElementById('config[display_login]1');
				var display_login_selection=display_login.checked;
				var normal =
window.document.getElementById('config_simplified_registration_normal');
				var simple =
window.document.getElementById('config_simplified_registration_simple');
				var simple_pwd =
window.document.getElementById('config_simplified_registration_simple_pwd');
				var guest =
window.document.getElementById('config_simplified_registration_guest');

				if(display_login_selection==true){
					addValue(default_registration_view,'login','".JText::_('HIKA_LOGIN',true)."');
				}else{
					removeByValue(default_registration_view, 'login');
				}
				if(normal.checked==true){
					addValue(default_registration_view,'0','".JText::_('HIKA_REGISTRATION',true)."');
				}else{
					removeByValue(default_registration_view, '0');
				}
				if(simple.checked==true){
					addValue(default_registration_view,'1','".JText::_('SIMPLIFIED_REGISTRATION',true)."');
				}else{
					removeByValue(default_registration_view, '1');
				}
				if(simple_pwd.checked==true){
					addValue(default_registration_view,'3','".JText::_('SIMPLIFIED_REGISTRATION_WITH_PASSWORD',true)."');
				}else{
					removeByValue(default_registration_view, '3');
				}
				if(guest.checked==true){
					addValue(default_registration_view,'2','".JText::_('GUEST',true)."');
				}else{
					removeByValue(default_registration_view, '2');
				}
			}
			function addValue(select, value,text) {
				if(existByValue(select, value)) return;
				var newListItem = document.createElement('OPTION');
				newListItem.text = text;
				newListItem.value = value;
				select.add(newListItem);
			}
			function removeByValue(select, value) {
				if(!existByValue(select, value)) return;
				for (var i=0, length = select.options.length; i< length; i++) {
					if (select.options[i] && select.options[i].value === value) {
						select.options[i] = null;
					}
				}
			}
			function existByValue(select, value) {
				for (var i=0, length = select.options.length; i< length; i++) {
					if (select.options[i] && select.options[i].value === value) {
						return true;
					}
				}
				return false;
			}
			window.hikashop.ready( function(){ window.hikashop.noChzn();
changeDefaultRegistrationViewType(); });";

		$doc = JFactory::getDocument();
		$doc->addScriptDeclaration( $js );
		return JHTML::_('select.genericlist',   $this->values, $map,
'class="custom-select chzn-done no-chzn"
size="1"', 'value', 'text', $value );
	}
}
PK<�[/n���	delay.phpnu�[���<?php
/**
 * @package	HikaShop for Joomla!
 * @version	2.2.3
 * @author	hikashop.com
 * @copyright	(C) 2010-2013 HIKARI SOFTWARE. All rights reserved.
 * @license	GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 */
defined('_JEXEC') or die('Restricted access');
?><?php
class hikashopDelayType{
	var $values = array();
	var $num = 0;
	var $onChange = '';
	function hikashopDelayType(){
		static $i = 0;
		$i++;
		$this->num = $i;
		$js = "function updateDelay".$this->num."(){";
			$js .= "delayvar =
window.document.getElementById('delayvar".$this->num."');";
			$js .= "delaytype =
window.document.getElementById('delaytype".$this->num."').value;";
			$js .= "delayvalue =
window.document.getElementById('delayvalue".$this->num."');";
			$js .= "realValue = delayvalue.value;";
			$js .= "if(delaytype == 'minute'){realValue =
realValue*60; }";
			$js .= "if(delaytype == 'hour'){realValue =
realValue*3600; }";
			$js .= "if(delaytype == 'day'){realValue =
realValue*86400; }";
			$js .= "if(delaytype == 'week'){realValue =
realValue*604800; }";
			$js .= "if(delaytype == 'month'){realValue =
realValue*2592000; }";
			$js .= "if(delaytype == 'year'){realValue =
realValue*31556926; }";
			$js .= "delayvar.value = realValue;";
		$js .= '}';
		if (!HIKASHOP_PHP5) {
			$doc =& JFactory::getDocument();
		}else{
			$doc = JFactory::getDocument();
		}
		$doc->addScriptDeclaration( $js );
	}
	function display($map,$value,$type = 1){
		$this->values=array();
		if($type == 0){
			$this->values[] = JHTML::_('select.option',
'second',JText::_('HIKA_SECONDS'));
			$this->values[] = JHTML::_('select.option',
'minute',JText::_('HIKA_MINUTES'));
		}elseif($type == 1){
			$this->values[] = JHTML::_('select.option',
'minute',JText::_('HIKA_MINUTES'));
			$this->values[] = JHTML::_('select.option',
'hour',JText::_('HOURS'));
			$this->values[] = JHTML::_('select.option',
'day',JText::_('DAYS'));
			$this->values[] = JHTML::_('select.option',
'week',JText::_('WEEKS'));
		}elseif($type == 2){
			$this->values[] = JHTML::_('select.option',
'minute',JText::_('HIKA_MINUTES'));
			$this->values[] = JHTML::_('select.option',
'hour',JText::_('HOURS'));
		}elseif($type == 3){
			$this->values[] = JHTML::_('select.option',
'hour',JText::_('HOURS'));
			$this->values[] = JHTML::_('select.option',
'day',JText::_('DAYS'));
			$this->values[] = JHTML::_('select.option',
'week',JText::_('WEEKS'));
			$this->values[] = JHTML::_('select.option',
'month',JText::_('MONTHS'));
		}elseif($type == 4){
			$this->values[] = JHTML::_('select.option',
'day',JText::_('DAYS'));
			$this->values[] = JHTML::_('select.option',
'week',JText::_('WEEKS'));
			$this->values[] = JHTML::_('select.option',
'month',JText::_('MONTHS'));
			$this->values[] = JHTML::_('select.option',
'year',JText::_('YEARS'));
		}
		$return = $this->get($value,$type);
		$delayValue = '<input class="inputbox"
onchange="updateDelay'.$this->num.'();'.$this->onChange.'"
type="text"
name="delayvalue'.$this->num.'"
id="delayvalue'.$this->num.'" size="10"
value="'.$return->value.'" /> ';
		$delayVar = '<input type="hidden"
name="'.$map.'"
id="delayvar'.$this->num.'"
value="'.$value.'"/>';
		return $delayValue.JHTML::_('select.genericlist',  
$this->values, 'delaytype'.$this->num,
'class="inputbox" size="1"
onchange="updateDelay'.$this->num.'();'.$this->onChange.'"',
'value', 'text', $return->type
,'delaytype'.$this->num).$delayVar;
	}
	function get($value,$type){
		$return = new stdClass();
		$return->value = $value;
		if($value%31556926 == 0){
			$return->type = 'year';
			$return->value = (int) $value / 31556926;
			return $return;
		}
		if($type == 0){
			$return->type = 'second';
		}else{
			$return->type = 'minute';
		}
		if($return->value >= 60  AND $return->value%60 == 0){
			$return->value = (int) $return->value / 60;
			$return->type = 'minute';
			if($type != 0 AND $return->value >=60 AND $return->value%60 ==
0){
				$return->type = 'hour';
				$return->value = $return->value / 60;
				if($type != 2 AND $return->value >=24 AND $return->value%24 ==
0){
					$return->type = 'day';
					$return->value = $return->value / 24;
					if($type == 3 AND $return->value >=30 AND $return->value%30
== 0){
						$return->type = 'month';
						$return->value = $return->value / 30;
					}elseif($return->value >=7 AND $return->value%7 == 0){
						$return->type = 'week';
						$return->value = $return->value / 7;
					}
				}
			}
		}
		return $return;
	}

	function displayDelay($value){
		if(empty($value)) return 0;
		$type = 'HIKA_SECONDS';
		if($value >= 60  AND $value%60 == 0){
			$value = (int) $value / 60;
			$type = 'HIKA_MINUTES';
			if($value >=60 AND $value%60 == 0){
				$type = 'HOURS';
				$value = $value/ 60;
				if($value >=24 AND $value%24 == 0){
					$type = 'DAYS';
					$value = $value / 24;
					if($value >= 30 AND $value%30 == 0){
						$type = 'MONTHS';
						$value = $value / 30;
					}elseif($value >=7 AND $value%7 == 0){
						$type = 'WEEKS';
						$value = $value / 7;
					}
				}
			}
		}
		return $value.' '.JText::_($type);
	}
	function displayDelaySECtoDAY($value,$type){
		if ( $type == 0 ){
			$value = (int) $value / 60;
			$value = round($value);
		}
		if ( $type == 1 ){
			$value = (int) $value / 3600;
			$value = round($value);
		}
		if ( $type == 2 ){
			$value = (int) $value / 86400;
			$value = round($value);
		}
		return $value;
	}
}
PK<�[���P��
direction.phpnu�[���<?php
/**
 * @package	HikaShop for Joomla!
 * @version	2.2.3
 * @author	hikashop.com
 * @copyright	(C) 2010-2013 HIKARI SOFTWARE. All rights reserved.
 * @license	GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 */
defined('_JEXEC') or die('Restricted access');
?><?php
class hikashopDirectionType{
	function load(){
		$this->values = array();
		$this->values[] = JHTML::_('select.option',
'horizontal',JText::_('HORIZONTAL'));
		$this->values[] = JHTML::_('select.option',
'vertical',JText::_('VERTICAL'));
	}
	function display($map,$value){
		$this->load();
		return JHTML::_('select.genericlist',   $this->values, $map,
'class="inputbox" size="1"',
'value', 'text', $value );
	}
}
PK<�[1��AAdiscount.phpnu�[���<?php
/**
 * @package	HikaShop for Joomla!
 * @version	2.2.3
 * @author	hikashop.com
 * @copyright	(C) 2010-2013 HIKARI SOFTWARE. All rights reserved.
 * @license	GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 */
defined('_JEXEC') or die('Restricted access');
?><?php
class HikashopDiscountType{
	function load($form){
		$this->values = array();
		if(!$form){
			$this->values[] = JHTML::_('select.option',
'all',JText::_('HIKA_ALL') );
		}
		$this->values[] = JHTML::_('select.option',
'discount',JText::_('DISCOUNTS'));
		$this->values[] = JHTML::_('select.option',
'coupon',JText::_('COUPONS'));
	}
	function display($map,$value,$form=false){
		$this->load($form);
		$attribute='';
		if(!$form){
			$attribute = ' onchange="document.adminForm.submit(
);"';
		}else{
			if(empty($value)){
				$value = 'discount';
			}
			$js = '
			function hikashopToggleDiscount(value){
				autoLoad = document.getElementById(\'hikashop_auto_load\');
				tax = document.getElementById(\'hikashop_tax\');
				minOrder = document.getElementById(\'hikashop_min_order\');
				hikashop_quota_per_user =
document.getElementById(\'hikashop_quota_per_user\');
				hikashop_min_products =
document.getElementById(\'hikashop_min_products\');
				hikashop_discount_coupon_product_only =
document.getElementById(\'hikashop_discount_coupon_product_only\');
				hikashop_discount_coupon_nodoubling =
document.getElementById(\'hikashop_discount_coupon_nodoubling\');
				hikashop_discount_affiliate =
document.getElementById(\'hikashop_discount_affiliate\');
				if(value==\'discount\'){
					if(autoLoad) autoLoad.style.display = \'none\';
					if(tax) tax.style.display = \'none\';
					if(minOrder) minOrder.style.display = \'none\';
					if(hikashop_quota_per_user) hikashop_quota_per_user.style.display =
\'none\';
					if(hikashop_min_products) hikashop_min_products.style.display =
\'none\';
					if(hikashop_discount_coupon_product_only)
hikashop_discount_coupon_product_only.style.display = \'none\';
					if(hikashop_discount_coupon_nodoubling)
hikashop_discount_coupon_nodoubling.style.display = \'none\';
					if(hikashop_discount_affiliate)
hikashop_discount_affiliate.style.display = \'none\';
				}else{
					if(autoLoad) autoLoad.style.display = \'\';
					if(tax) tax.style.display = \'\';
					if(minOrder) minOrder.style.display = \'\';
					if(hikashop_quota_per_user) hikashop_quota_per_user.style.display =
\'\';
					if(hikashop_min_products) hikashop_min_products.style.display =
\'\';
					if(hikashop_discount_coupon_product_only)
hikashop_discount_coupon_product_only.style.display = \'\';
					if(hikashop_discount_coupon_nodoubling)
hikashop_discount_coupon_nodoubling.style.display = \'\';
					if(hikashop_discount_affiliate)
hikashop_discount_affiliate.style.display = \'\';
				}
			}
			window.addEvent(\'domready\', function(){
				hikashopToggleDiscount(\''.$value.'\');
			});';
			$doc = JFactory::getDocument();
			$doc->addScriptDeclaration($js);
			$attribute = '
onchange="hikashopToggleDiscount(this.value);"';
		}
		return JHTML::_('select.genericlist',   $this->values, $map,
'class="inputbox" size="1"'.$attribute,
'value', 'text', $value );
	}

	public function displaySelector($map, $value, $delete = false, $type =
'coupon') {
		static $jsInit = null;

		$app = JFactory::getApplication();

		if($jsInit !== true) {
			$display_format = 'data.discount_code';
			if($app->isAdmin())
				$display_format = 'data.id + " - " +
data.discount_code';

			$js = '
if(!window.localPage)
	window.localPage = {};
window.localPage.fieldSetDiscount = function(el, name) {
	window.hikashop.submitFct = function(data) {
		var d = document,
			elemInput = d.getElementById(name + "_input_id"),
			elemSpan = d.getElementById(name + "_span_id");
		if(elemInput) { elemInput.value = data.id; }
		if(elemSpan) { elemSpan.innerHTML = '.$display_format.'; }
	};
	window.hikashop.openBox(el,null,(el.getAttribute("rel") ==
null));
	return false;
}
window.localPage.fieldRemDiscount = function(el, name) {
	var d = document,
		elemInput = d.getElementById(name + "_input_id"),
		elemSpan = d.getElementById(name + "_span_id");
	if(elemInput) { elemInput.value = ""; }
	if(elemSpan) { elemSpan.innerHTML = " - "; }
}
';
			$doc = JFactory::getDocument();
			$doc->addScriptDeclaration($js);

			$jsInit = true;
		}

		$discountClass = hikashop_get('class.discount');
		$popup = hikashop_get('helper.popup');

		$name = str_replace(array('][','[',']'),
'_', $map);
		$discount_id = (int)$value;
		$discount = $discountClass->get($discount_id);
		$discount_code = '';
		if(!empty($discount)) {
			$discount_code = @$discount->discount_code;
		} else {
			if(!empty($discount_id))
				$discount_code =
'<em>'.JText::_('INVALID_DISCOUNT_CODE').'</em>';
			$discount_id = '';
		}

		$discount_display_name = $discount_code;
		if($app->isAdmin())
			$discount_display_name = $discount_id.' - '.$discount_code;

		if(empty($type) || !in_array($type,
array('all','coupon','discount')))
			$type = 'all';

		$ret = '<span
id="'.$name.'_span_id">'.$discount_display_name.'</span>'
.
			'<input type="hidden"
id="'.$name.'_input_id"
name="'.$map.'"
value="'.$discount_id.'"/> '.
			$popup->display(
				'<img src="'.HIKASHOP_IMAGES.'edit.png"
style="vertical-align:middle;"/>',
				'DISCOUNT_SELECTION',
				hikashop_completeLink('discount&task=selection&filter_type='.$type.'&single=true',
true),
				'hikashop_set_discount_'.$name,
				760, 480, 'onclick="return
window.localPage.fieldSetDiscount(this,\''.$name.'\');"',
'', 'link'
			);

		if($delete)
			$ret .= ' <a
title="'.JText::_('HIKA_DELETE').'"
href="#'.JText::_('HIKA_DELETE').'"
onclick="return window.localPage.fieldRemDiscount(this,
\''.$name.'\');"><img
src="'.HIKASHOP_IMAGES.'cancel.png"
style="vertical-align:middle;"/></a>';

		return $ret;
	}
}
PK<�[؎����discount_display.phpnu�[���<?php
/**
 * @package	HikaShop for Joomla!
 * @version	2.2.3
 * @author	hikashop.com
 * @copyright	(C) 2010-2013 HIKARI SOFTWARE. All rights reserved.
 * @license	GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 */
defined('_JEXEC') or die('Restricted access');
?><?php
class hikashopDiscount_displayType{
	function load(){
		$this->values = array();
		if(JRequest::getCmd('from_display',false) == false)
			$this->values[] = JHTML::_('select.option',
3,JText::_('HIKA_INHERIT'));
		$this->values[] = JHTML::_('select.option',
2,JText::_('DISPLAY_PRICE_BEFORE_DISCOUNT'));
		$this->values[] = JHTML::_('select.option',
1,JText::_('DISPLAY_DISCOUNT_AMOUNT'));
		$this->values[] = JHTML::_('select.option',
0,JText::_('HIKASHOP_NO'));
	}
	function display($map,$value){
		$this->load();
		return JHTML::_('select.genericlist',   $this->values, $map,
'class="inputbox" size="1"',
'value', 'text', (int)$value );
	}
}
PK<�[��jxxdisplay_method.phpnu�[���<?php
/**
 * @package	HikaShop for Joomla!
 * @version	2.2.3
 * @author	hikashop.com
 * @copyright	(C) 2010-2013 HIKARI SOFTWARE. All rights reserved.
 * @license	GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 */
defined('_JEXEC') or die('Restricted access');
?><?php
class hikashopDisplay_methodType{
	function load(){
		$this->values = array();
		$this->values[] = JHTML::_('select.option', 0,
JText::_('ALL_IN_ONE_PAGE') );
		$this->values[] = JHTML::_('select.option', 1,
JText::_('SWITCHER'));
	}
	function display($map,$value){
		$this->load();
		$js="function changeRegistrationButtonType(){
				var
display=window.document.getElementById('config[display_method]0').checked;
				var normal =
window.document.getElementById('config[simplified_registration][normal]');
				var simple =
window.document.getElementById('config[simplified_registration][simple]');
				var simple_pwd =
window.document.getElementById('config[simplified_registration][simple_pwd]');
				var guest =
window.document.getElementById('config[simplified_registration][guest]');

				if(display==true){
					normal.type='radio';
					simple.type='radio';
					simple_pwd.type='radio';
					guest.type='radio';
				}else{
					normal.type='checkbox';
					simple.type='checkbox';
					simple_pwd.type='checkbox';
					guest.type='checkbox';
				}
				normal.checked=false; normal.parentNode.className = '';
normal.disabled=false;
				simple.checked=false; simple.parentNode.className = '';
simple.disabled=false;
				simple_pwd.checked=false; simple_pwd.parentNode.className =
''; simple_pwd.disabled=false;
				guest.checked=false;

			}";

		$doc = JFactory::getDocument();
		$doc->addScriptDeclaration( $js );
		return JHTML::_('select.radiolist',   $this->values, $map,
'class="inputbox" size="1"
onChange="changeRegistrationButtonType();"',
'value', 'text', (int)$value );
	}
}
PK<�[b+�"��div_position.phpnu�[���<?php
/**
 * @package	HikaShop for Joomla!
 * @version	2.2.3
 * @author	hikashop.com
 * @copyright	(C) 2010-2013 HIKARI SOFTWARE. All rights reserved.
 * @license	GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 */
defined('_JEXEC') or die('Restricted access');
?><?php
defined('_JEXEC') or die('Restricted access');
?>
<?php
class hikashopDiv_positionType{
	function load(){
		$this->values = array();
		$this->values[] = JHTML::_('select.option',
'top_left',JText::_('HIKA_TOP_LEFT'));
		$this->values[] = JHTML::_('select.option',
'top_right',JText::_('HIKA_TOP_RIGHT'));
		$this->values[] = JHTML::_('select.option',
'top_center',JText::_('HIKA_TOP_CENTER'));
		$this->values[] = JHTML::_('select.option',
'bottom_left',JText::_('HIKA_BOTTOM_LEFT'));
		$this->values[] = JHTML::_('select.option',
'bottom_right',JText::_('HIKA_BOTTOM_RIGHT'));
		$this->values[] = JHTML::_('select.option',
'bottom_center',JText::_('HIKA_BOTTOM_CENTER'));

	}
	function display($map,$value, $radio=false){
		$this->load();
		$type='select.genericlist';
		if($radio){
			$type='select.radiolist';
		}
		return JHTML::_($type, $this->values, $map,
'class="inputbox" size="1"',
'value', 'text', $value );
	}
}
PK<�[�98��
editor.phpnu�[���<?php
/**
 * @package	HikaShop for Joomla!
 * @version	2.2.3
 * @author	hikashop.com
 * @copyright	(C) 2010-2013 HIKARI SOFTWARE. All rights reserved.
 * @license	GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 */
defined('_JEXEC') or die('Restricted access');
?><?php
class hikashopEditorType{
	function hikashopEditorType(){
		if(version_compare(JVERSION,'1.6','<')){
			$query = 'SELECT element,name FROM
'.hikashop_table('plugins',false).' WHERE
folder=\'editors\' AND published=1 ORDER BY ordering ASC, name
ASC';
		}else{
			$query = 'SELECT element,name FROM
'.hikashop_table('extensions',false).' WHERE
folder=\'editors\' AND enabled=1 AND type=\'plugin\'
ORDER BY ordering ASC, name ASC';
		}
		$db = JFactory::getDBO();
		$db->setQuery($query);
		$joomEditors = $db->loadObjectList();
		$this->values = array();
		$this->values[] = JHTML::_('select.option',
'0',JText::_('HIKA_DEFAULT'));
		if(!empty($joomEditors)){
			foreach($joomEditors as $myEditor){
				$this->values[] = JHTML::_('select.option',
$myEditor->element,$myEditor->name);
			}
		}
	}
	function display($map,$value){
		return JHTML::_('select.genericlist', $this->values, $map ,
'size="1"', 'value', 'text',
$value);
	}
}
PK<�[���
effect.phpnu�[���<?php
/**
 * @package	HikaShop for Joomla!
 * @version	2.2.3
 * @author	hikashop.com
 * @copyright	(C) 2010-2013 HIKARI SOFTWARE. All rights reserved.
 * @license	GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 */
defined('_JEXEC') or die('Restricted access');
?><?php
defined('_JEXEC') or die('Restricted access');
?>
<?php
class hikashopEffectType{
	function load(){
		$this->values = array();
		$this->values[] = JHTML::_('select.option',
'slide',JText::_('SLIDE'));
		$this->values[] = JHTML::_('select.option',
'fade',JText::_('FADE'));
	}
	function display($map,$value, $options=''){
		$this->load();
		return JHTML::_('select.genericlist',   $this->values, $map,
'class="inputbox" size="1" '.$options,
'value', 'text', $value );
	}
}
PK<�[J��emailtemplate.phpnu�[���<?php
/**
 * @package	HikaShop for Joomla!
 * @version	4.4.1
 * @author	hikashop.com
 * @copyright	(C) 2010-2021 HIKARI SOFTWARE. All rights reserved.
 * @license	GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 */
defined('_JEXEC') or die('Restricted access');
?><?php
class hikashopEmailtemplateType {
	protected $values = null;

	public function load($mail_name = null) {
		$this->values = array(
			JHTML::_('select.option', '',
JText::_('HIKA_NONE'))
		);

		if(empty($mail_name))
			return $this->values;

		jimport('joomla.filesystem.folder');

		$regexcore = '^([-_A-Za-z0-9]*)\.html\.php$';
		$allTemplateCoreFiles =
JFolder::files(HIKASHOP_MEDIA.DS.'mail'.DS.'template',
$regexcore);
		foreach($allTemplateCoreFiles as $oneFile) {
			preg_match('#'.$regexcore.'#i', $oneFile,
$results);
			$n = $results[1];
			$this->values[$n] = JHTML::_('select.option', $n, $n);
		}

		$regexmodified = '^([-_A-Za-z0-9]*)\.html.modified.php$';
		$allTemplateModifiedFiles =
JFolder::files(HIKASHOP_MEDIA.DS.'mail'.DS.'template',
$regexmodified);
		foreach($allTemplateModifiedFiles as $oneFile) {
			preg_match('#'.$regexmodified.'#i', $oneFile,
$results);
			$n = $results[1];
			$override = isset($this->values[$n]);
			$this->values[$n] = JHTML::_('select.option', $n, $n .
($override ? ' *' : ''));
		}

		$external_template_files = array();
		JPluginHelper::importPlugin('hikashop');
		$app = JFactory::getApplication();
		$app->triggerEvent('onMailTemplateListing',
array(&$external_template_files, $mail_name));
		if(empty($external_template_files))
			return $this->values;
		foreach($external_template_files as $k => $f) {
			$this->values[$k] = JHTML::_('select.option', $k, $k);
		}

		return $this->values;
	}

	public function display($map, $value, $mail_name = false) {
		if($mail_name === false)
			$mail_name = hikaInput::get()->getCmd('mail_name', false);
		if($mail_name === false)
			$mail_name = $this->mail_name;

		if(empty($mail_name))
			return '';

		$this->load($mail_name);

		$html = JHTML::_('select.genericlist', $this->values, $map,
'class="custom-select" size="1"',
'value', 'text', $value, 'template');

		$popupHelper = hikashop_get('helper.popup');
		$html .= $popupHelper->display(
			'<i class="fas fa-pen"
aria-hidden="true"></i>',
			'TEMPLATE',
			'\''.'index.php?option=com_hikashop&amp;tmpl=component&amp;ctrl=email&amp;task=emailtemplate&amp;file=\'+document.getElementById(\'template\').value+\'&amp;email_name='.$mail_name.'\'',
			'hikashop_edit_template',
			760,480, 'class="btn btn-primary"
title="'.JText::_('HIKA_EDIT').'"',
'', 'link',true
		);

		$html .= $popupHelper->display(
			'<i class="fa fa-plus"
aria-hidden="true"></i>',
			'TEMPLATE',
			hikashop_completeLink('email&task=emailtemplate&email_name='.$mail_name,
true),
			'hikashop_new_template',
			760,480, 'class="btn btn-primary"
title="'.JText::_('HIKA_NEW').'"',
'', 'link'
		);

		return $html;
	}
}
PK<�[ڷ��''
email_log.phpnu�[���<?php
/**
 * @package	HikaShop for Joomla!
 * @version	4.4.1
 * @author	hikashop.com
 * @copyright	(C) 2010-2021 HIKARI SOFTWARE. All rights reserved.
 * @license	GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 */
defined('_JEXEC') or die('Restricted access');
?><?php
class HikashopEmail_logType{
	function load($form){
		$this->values = array();
		if(!$form){
			$this->values[] = JHTML::_('select.option',
'all',JText::_('HIKA_ALL') );
		}
		$db = JFactory::getDBO();
		$db->setQuery('SELECT distinct(email_log_name) as type from
#__hikashop_email_log;');
		$email_types = $db->loadObjectList();

		foreach($email_types as $type){
			$this->values[] = JHTML::_('select.option', $type->type,
str_replace('%s','',JText::_($type->type)));
		}
	}

	function display($map,$value,$form=false){
		$this->load($form);
		if(!$form){
			$options ='
onchange="document.adminForm.submit();"';
		}
		return JHTML::_('select.genericlist',   $this->values, $map,
'class="custom-select" size="1"'.$options,
'value', 'text', $value );
	}
}
PK<�[����ooencoding.phpnu�[���<?php
/**
 * @package	HikaShop for Joomla!
 * @version	2.2.3
 * @author	hikashop.com
 * @copyright	(C) 2010-2013 HIKARI SOFTWARE. All rights reserved.
 * @license	GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 */
defined('_JEXEC') or die('Restricted access');
?><?php
class hikashopEncodingType{
	function hikashopEncodingType(){
		$this->values = array();
		$this->values[] = JHTML::_('select.option',
'binary', 'Binary' );
		$this->values[] = JHTML::_('select.option',
'quoted-printable', 'Quoted-printable' );
		$this->values[] = JHTML::_('select.option',
'7bit', '7 Bit');
		$this->values[] = JHTML::_('select.option',
'8bit', '8 Bit' );
		$this->values[] = JHTML::_('select.option',
'base64', 'Base 64' );
	}
	function display($map,$value){
		return JHTML::_('select.genericlist', $this->values, $map ,
'size="1"', 'value', 'text',
$value);
	}
}
PK<�[۶-П�
fields.phpnu�[���<?php
/**
 * @package	HikaShop for Joomla!
 * @version	2.2.3
 * @author	hikashop.com
 * @copyright	(C) 2010-2013 HIKARI SOFTWARE. All rights reserved.
 * @license	GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 */
defined('_JEXEC') or die('Restricted access');
?><?php
class hikashopFieldsType {
	var $allValues;
	var $externalValues;
	var $externalOptions;
	var $options;

	function __construct() {
		$this->externalValues = null;
		$this->externalOptions = null;
		$this->options = array();
	}

	function load($type = '') {
		$this->allValues = array(
			'text' => array(
				'name' => JText::_('FIELD_TEXT'),
				'options' =>
array("size","required","default","columnname","filtering","maxlength","readonly")
			),
			'link' => array(
				'name' => JText::_('LINK'),
				'options' =>
array("size","required","default","columnname","filtering","maxlength","readonly")
			),
			'textarea' => array(
				'name' => JText::_('FIELD_TEXTAREA'),
				'options' =>
array("cols","rows","required","default","columnname","filtering","readonly","maxlength")
			),
			'wysiwyg' => array(
				'name' => JText::_('WYSIWYG'),
				'options' =>
array("cols","rows","required","default","columnname","filtering")
			),
			'radio' => array(
				'name' => JText::_('FIELD_RADIO'),
				'options' =>
array("multivalues","required","default","columnname")
			),
			'checkbox' => array(
				'name' => JText::_('FIELD_CHECKBOX'),
				'options' =>
array("multivalues","required","default","columnname")
			),
			'singledropdown' => array(
				'name' => JText::_('FIELD_SINGLEDROPDOWN'),
				'options' =>
array("multivalues","required","default","columnname")
			),
			'multipledropdown' => array(
				'name' => JText::_('FIELD_MULTIPLEDROPDOWN'),
				'options' =>
array("multivalues","size","default","columnname")
			),
			'date' => array(
				'name' => JText::_('FIELD_DATE'),
				'options' =>
array("required","format","size","default","columnname","allow")
			),
			'zone' => array(
				'name' => JText::_('FIELD_ZONE'),
				'options' =>
array("required","zone","default","columnname","pleaseselect")
			),
		);

		if(hikashop_level(2)) {
			if($type == 'entry'|| empty($type)) {
				$this->allValues["coupon"] = array(
					'name' => JText::_('HIKASHOP_COUPON'),
					'options' =>
array("size","required","default","columnname")
				);
			}
			$this->allValues["file"] = array(
				'name' => JText::_('HIKA_FILE'),
				'options' =>
array("required","default","columnname")
			);
			$this->allValues["image"] = array(
				'name' => JText::_('HIKA_IMAGE'),
				'options' =>
array("required","default","columnname")
			);
			$this->allValues['ajaxfile'] = array(
				'name' => JText::_('FIELD_AJAX_FILE'),
				'options' =>
array("required","default","columnname")
			);
			$this->allValues['ajaximage'] = array(
				'name' => JText::_('FIELD_AJAX_IMAGE'),
				'options' =>
array("required","default","columnname","imagesize")
			);
		}
		$this->allValues["customtext"] = array(
			'name' => JText::_('CUSTOM_TEXT'),
			'options' => array("customtext")
		);

		if($this->externalValues == null) {
			$this->externalValues = array();
			$this->externalOptions = array();
			JPluginHelper::importPlugin('hikashop');
			$dispatcher = JDispatcher::getInstance();
			$dispatcher->trigger('onFieldsLoad', array(
&$this->externalValues, &$this->externalOptions ) );
		}

		if(!empty($this->externalValues)) {
			foreach($this->externalValues as $value) {
				if(substr($value->name,0,4) != 'plg.')
					$value->name = 'plg.'.$value->name;
				$this->allValues[$value->name] = array(
					'name' => $value->text,
					'options' => @$value->options
				);
			}
		}

		foreach($this->allValues as $v) {
			if(!empty($v['options'])) {
				foreach($v['options'] as $o) {
					$this->options[$o] = $o;
				}
			}
		}
	}

	function addJS(){
		$this->load();
		$externalJS = '';
		if(!empty($this->externalValues)){
			foreach($this->externalValues as $value) {
				if(!empty($value->js))
					$externalJS .= "\r\n\t".$value->js;
			}
		}

		$types = array();
		foreach($this->allValues as $k => $v) {
			$t = '"' . $k . '": [';
			if(!empty($v['options'])) {
				$t .= '"' . implode('","',
$v['options']) . '"';
			}
			$t.=']';
			$types[] = $t;
		}

		$options = '';
		if(!empty($this->options)) {
			$options = '"' . implode('","',
$this->options) . '"';
		}

		$js = '
function updateFieldType() {
	var d = document,
		newType = "",
		key = "",
		el = d.getElementById("fieldtype"),
		hiddenAll = ['.$options.'],
		allTypes = {
			'.implode(",\r\n\t\t\t", $types).'
		};'.$externalJS.'

	if(el)
		newType = el.value;

	for(var i = 0; i < hiddenAll.length; i++) {
		key = hiddenAll[i]
		el = d.getElementById("fieldopt_" + key);
		if(el) {
			el.style.display = "none";
		} else {
			var j = 0;
			el = d.getElementById("fieldopt_" + key + "_" + j);
			while(el) {
				el.style.display = "none";
				j++;
				el = d.getElementById("fieldopt_" + key + "_" +
j);
			}
		}
	}
	for(var i = 0; i < allTypes[newType].length; i++) {
		key = allTypes[newType][i];
		el = d.getElementById("fieldopt_" + key);
		if(el) {
			el.style.display = "";
		} else {
			var j = 0;
			el = d.getElementById("fieldopt_" + key + "_" + j);
			while(el) {
				el.style.display = "";
				j++;
				el = d.getElementById("fieldopt_" + key + "_" +
j);
			}
		}
	}
}
window.hikashop.ready(function(){updateFieldType();});
';
		$doc = JFactory::getDocument();
		$doc->addScriptDeclaration( $js );
	}

	function display($map,$value,$type){
		$this->load($type);
		$this->addJS();

		$this->values = array();
		foreach($this->allValues as $oneType => $oneVal) {
			$this->values[] = JHTML::_('select.option', $oneType,
$oneVal['name']);
		}

		return JHTML::_('select.genericlist', $this->values, $map ,
'size="1" onchange="updateFieldType();"',
'value', 'text', (string)$value,
'fieldtype');
	}
}
PK<�[�M�M��file.phpnu�[���<?php
/**
 * @package	HikaShop for Joomla!
 * @version	2.2.3
 * @author	hikashop.com
 * @copyright	(C) 2010-2013 HIKARI SOFTWARE. All rights reserved.
 * @license	GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 */
defined('_JEXEC') or die('Restricted access');
?><?php
class hikashopFileType{
	function load(){
		$this->values = array();
		$this->values[] = JHTML::_('select.option',
'image',JText::_('IMG') );
		$this->values[] = JHTML::_('select.option',
'file',JText::_('HIKA_FILE'));
	}
	function display($map,$value){
		$this->load();
		return JHTML::_('select.genericlist',   $this->values, $map,
'class="inputbox" size="1"',
'value', 'text', $value );
	}
}
PK<�[>n�R--
filter.phpnu�[���<?php
/**
 * @package	HikaShop for Joomla!
 * @version	2.2.3
 * @author	hikashop.com
 * @copyright	(C) 2010-2013 HIKARI SOFTWARE. All rights reserved.
 * @license	GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 */
defined('_JEXEC') or die('Restricted access');
?><?php

class hikashopFilterType{
	var $allValues;
	function load(){
		$this->allValues = array();
		$this->allValues["text"] =
JText::_('FIELD_TEXT');
		$this->allValues["radio"] =
JText::_('FIELD_RADIO');
		$this->allValues["checkbox"] =
JText::_('FIELD_CHECKBOX');
		$this->allValues["singledropdown"] =
JText::_('FIELD_SINGLEDROPDOWN');
		$this->allValues["multipledropdown"] =
JText::_('FIELD_MULTIPLEDROPDOWN');
		$this->allValues["cursor"] = JText::_('CURSOR');
		$this->allValues["list"] = JText::_('LIST');
		$this->allValues["instockcheckbox"] =
JText::_('IN_STOCK_CHECKBOX');
		JPluginHelper::importPlugin( 'hikashop' );
		$dispatcher = JDispatcher::getInstance();
		$dispatcher->trigger( 'onFilterTypeDisplay', array( &
$this->allValues ) );
	}

	function display($map,$value){
		$this->load();
		$js = "function updateFilterType(){
			newType = document.getElementById('filtertype').value;
			hiddenAll = new Array('rangeSize',
'titlePositionCursor', 'cursorWidth',
'cursorEffet', 'cursorStep','applyOnCursor',
'textBoxSize',
'filterSize','titlePosition','applyOntext','applyOn','filterValues','filterCategories',
'cursorNumber', 'cursorMax', 'cursorMin',
'currencies', 'filter_categories','max_char',
'characteristic', 'sort_by',
'product_information', 'button_align',
'dimension_unit', 'weight_unit',
'searchProcessing');
			allTypes = new Array();
			allTypes['text'] = new
Array('applyOntext','titlePosition','max_char',
'textBoxSize', 'searchProcessing');
			allTypes['radio'] = new
Array('applyOn','titlePosition','filterValues','filterCategories',
'button_align');
			allTypes['checkbox'] = new
Array('applyOn','titlePosition','filterValues','filterCategories',
'button_align');
			allTypes['singledropdown'] = new
Array('applyOn','titlePosition','filterValues','filterCategories','filterSize');
			allTypes['multipledropdown'] = new
Array('applyOn','titlePosition','filterValues','filterCategories','filterSize');
			allTypes['cursor'] = new
Array('applyOnCursor','cursorStep',
'cursorNumber', 'cursorMax', 'cursorMin',
'cursorEffet', 'cursorWidth',
'titlePositionCursor', 'rangeSize');
			allTypes['instockcheckbox'] = new Array('');
			allTypes['list'] = new
Array('applyOn','titlePosition','filterValues','filterCategories','filterSize');
			for (var i=0; i < hiddenAll.length; i++){
				$$('tr[id='+hiddenAll[i]+']').each(function(el) {
					el.style.display = 'none';
				});
			}

			if(newType=='instockcheckbox'){
				return;
			}

			for (var i=0; i < allTypes[newType].length; i++){
				$$('tr[id='+allTypes[newType][i]+']').each(function(el)
{
					el.style.display = '';
				});
			}
			if(newType!='text' && newType!='cursor'){
				updateDataType();
			}
			if(newType=='cursor'){
				data_type =
document.getElementById('datafilterfilter_data_cursor').value;
				setVisibleUnit(data_type);
			}
		}
		window.addEvent('domready', function(){ updateFilterType();
});";

		$doc = JFactory::getDocument();
		$doc->addScriptDeclaration( $js );

		$this->values = array();
		foreach($this->allValues as $oneType => $oneVal){
			$this->values[] = JHTML::_('select.option',
$oneType,$oneVal);
		}


		return JHTML::_('select.genericlist', $this->values, $map ,
'size="1" onchange="updateFilterType();"',
'value', 'text', (string)
$value,'filtertype');
	}
}
PK=�[y(�oofilter_button_position.phpnu�[���<?php
/**
 * @package	HikaShop for Joomla!
 * @version	2.2.3
 * @author	hikashop.com
 * @copyright	(C) 2010-2013 HIKARI SOFTWARE. All rights reserved.
 * @license	GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 */
defined('_JEXEC') or die('Restricted access');
?><?php
defined('_JEXEC') or die('Restricted access');
?>
<?php
class hikashopFilter_button_positionType{
	function load(){
		$this->values = array();
		$this->values[] = JHTML::_('select.option',
'left',JText::_('HIKA_LEFT'));
		$this->values[] = JHTML::_('select.option',
'right',JText::_('HIKA_RIGHT'));
		$this->values[] = JHTML::_('select.option',
'inside',JText::_('HIKA_INSIDE'));

	}
	function display($map,$value, $options=''){
		$this->load();
		return JHTML::_('select.genericlist',   $this->values, $map,
'class="inputbox" size="1" '.$options,
'value', 'text', $value );
	}
}
PK=�[�#o,,
index.htmlnu�[���<html><body
bgcolor="#FFFFFF"></body></html>PK=�[}DwE,,item.phpnu�[���<?php
/**
 * @package	HikaShop for Joomla!
 * @version	2.2.3
 * @author	hikashop.com
 * @copyright	(C) 2010-2013 HIKARI SOFTWARE. All rights reserved.
 * @license	GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 */
defined('_JEXEC') or die('Restricted access');
?><?php
class hikashopItemType{
	function loadFromCustom($hikashopFiles, $template, $customDir, $files) {
		if (is_dir($customDir)) {
			$customFiles = JFolder::files($customDir);
			if (!empty($customFiles)) {
				$files = array();
				foreach ($customFiles as $file) {
					$notHikashop = true;
					foreach ($hikashopFiles as $hikashopfile) {
						if ($hikashopfile == $file) {
							$notHikashop = false;
							break;
						}
					}
					if ($notHikashop) $files[] = $file;
				}
				if (!empty($files)) {
					$files = array_keys(array_flip($files));
					$this->loadValues('-- ' .
JText::sprintf('FROM_TEMPLATE',basename($template)) . '
--', $files);
				}
			}
		}
	}

	function loadFromTemplates($hikashopFiles) {
		$files = array();
		$templates = JFolder::folders(JPATH_SITE . DS . 'templates',
'.', false, true);
		if (!empty($templates)) {
			foreach ($templates as $template) {
				$this->loadFromCustom($hikashopFiles, $template, $template . DS .
'html' . DS . 'com_hikashop' . DS .
'product', $files);
				$this->loadFromCustom($hikashopFiles, $template, $template . DS .
'html' . DS . 'com_hikashop' . DS .
'category', $files);
			}
		}
	}

	function loadValues($optGroup, $files) {
		$this->values[] = JHTML::_('select.optgroup', $optGroup);
		foreach($files as $file){
			if(preg_match('#^listing_((?!div|list|price|table|vote).*)\.php$#',$file,$match)){
				$val = strtoupper($match[1]);
				$trans = JText::_($val);
				if($trans==$val){
					$trans=$match[1];
				}
				$this->values[] = JHTML::_('select.option', $match[1],
$trans);
			}
		}
		if(version_compare(JVERSION,'1.6.0','>=')){
			$this->values[] = JHTML::_('select.optgroup', $optGroup);
		}
		if(JRequest::getVar('inherit',true) == true)
			$this->values[] = JHTML::_('select.option',
'inherit',JText::_('HIKA_INHERIT'));
	}

	function load(){
		$this->values = array();
		jimport('joomla.filesystem.folder');
		$product_folder =
HIKASHOP_FRONT.'views'.DS.'product'.DS.'tmpl'.DS;
		$category_folder =
HIKASHOP_FRONT.'views'.DS.'category'.DS.'tmpl'.DS;
		$files = JFolder::files($product_folder);
		$files =
array_keys(array_merge(array_flip($files),array_flip(JFolder::files($category_folder))));
		$this->loadValues('--
'.JText::_('FROM_HIKASHOP').' --', $files);
		$this->loadFromTemplates($files);
	}

	function display($map,$value,&$js, $option=''){
		$this->load();
		$options = 'class="inputbox" size="1"
'.$option;
		return JHTML::_('select.genericlist',   $this->values, $map,
$options, 'value', 'text', $value );
	}
}
PK=�[��3C�"�"joomla_acl.phpnu�[���<?php
/**
 * @package    HikaMarket for Joomla!
 * @version    3.1.1
 * @author     Obsidev S.A.R.L.
 * @copyright  (C) 2011-2020 OBSIDEV. All rights reserved.
 * @license    GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 */
defined('_JEXEC') or die('Restricted access');
?><?php
class hikamarketJoomla_aclType {

	protected $groups = null;

	protected function load() {
		$this->groups = array();
		$db = JFactory::getDBO();

		$db->setQuery('SELECT a.*, a.title as text, a.id as value FROM
`#__usergroups` AS a ORDER BY a.lft ASC');
		$groups = $db->loadObjectList('id');
		foreach($groups as &$group){
			if(isset($groups[$group->parent_id])){
				$group->level = intval(@$groups[$group->parent_id]->level) +
1;
			} else {
				$group->level = 0;
			}
		}
		unset($group);
		foreach($groups as &$group) {
			$this->groups[] = $group;
		}
	}

	public function getList() {
		if(empty($this->groups)) {
			$this->load();
		}
		return $this->groups;
	}

	public function display($map, $values, $allBtn = false, $min = false) {
		hikamarket::loadJslib('otree');
		if(empty($this->groups)) {
			$this->load();
		}
		$map = str_replace('"','',$map);
		$id = str_replace(array('[',']','
'),array('_','','_'),$map);
		$cpt = count($this->groups)-1;

		$ret = '<div id="'.$id.'_otree"
class="oTree"></div><input type="hidden"
value="'.$values.'" name="'.$map.'"
id="'.$id.'"/>
<script type="text/javascript">
var data_'.$id.' = ' . $this->getData($values, $allBtn,
$min) . ';
'.$id.' = new
window.oTree("'.$id.'",{rootImg:"'.HIKAMARKET_IMAGES.'otree/",
showLoading:false, useSelection:false,
checkbox:true},null,data_'.$id.',true);
'.$id.'.callbackCheck = function(treeObj, id, value) {
	var node = treeObj.get(id), d = document, e =
d.getElementById("'.$id.'");
	if(node.state == 5) {
		if(value === true) {
			treeObj.chks("*",false);
			e.value = "all";
		} else if(value === false) {
			treeObj.chks(false,false,true);
			e.value = "none";
		}
		return;
	}

	var v = treeObj.getChk();
	node = treeObj.get(0);
	if(v === false || v.length == 0) {
		e.value = "none";
		treeObj.chk(1,0,false,false);
	} else if( v.length > '.$cpt.') {
		e.value = "all";
		treeObj.chk(1,1,false,false);
	} else {
		e.value = "," + v.join(",") + ",";
' . (!$allBtn ? '' : '
		treeObj.config.tricheckbox = true;
		treeObj.chk(1,2,false,false);
		treeObj.config.tricheckbox = false; ') . '
	}
};
</script>';
		return $ret;
	}

	public function displayButton($map, $values) {
		hikamarket::loadJslib('otree');
		hikamarket::loadJslib('jquery');
		$ret = '';
		if(empty($this->groups)) {
			$this->load();
		}
		$map = str_replace('"','',$map);

		if(empty($this->id)) {
			$this->id = 'hikamarket_joomlaacl';
			$cpt = count($this->groups)-1;

			$ret .= '<script type="text/javascript">
if(!window.aclMgr) window.aclMgr = {};
if(!window.aclMgr.trees) window.aclMgr.trees = {};
if(!window.aclMgr.data) window.aclMgr.data = {};
if(!window.aclMgr.popups) window.aclMgr.popups = {};
if(!window.aclMgr.cpt) window.aclMgr.cpt = {};
window.aclMgr.data["'.$this->id.'"] = ' .
$this->getData($values) . ';
window.aclMgr.cpt["'.$this->id.'"] = ' . $cpt .
';
window.aclMgr.updateJoomlaAcl = function(el,id,tree_id) {
	var d = document, w = window, tree = d.getElementById(tree_id +
"_otree"), e = d.getElementById(id), values = e.value;
	if(w.aclMgr.popups[id] && tree) {
		tree.style.display = "none";
		w.Oby.removeEvent(document, "click", w.aclMgr.popups[id]);
		w.aclMgr.popups[id] = false;
		return false;
	}
	if(!tree) {
		tree = d.createElement("div");
		tree.id = tree_id + "_otree";
		tree.style.position = "absolute";
		tree.style.display = "none";
		tree.className = "oTree acl-popup-content";
		d.body.appendChild(tree);
		w.aclMgr.trees[tree_id] = new
w.oTree(tree_id,{rootImg:"'.HIKAMARKET_IMAGES.'otree/",
showLoading:false, useSelection:false,
checkbox:true},null,w.aclMgr.data[tree_id],true);
	}
	switch(values) {
		case "all":
			treevalues = "*";
			break;
		case "none":
			treevalues = "";
			break;
		default:
			treevalues = values.split(",");
			break;
	}
	w.aclMgr.trees[tree_id].callbackCheck = null;
	w.aclMgr.trees[tree_id].chks(treevalues, null, false);
	var p = jQuery(el).offset();
	if(tree.style.display != "none" && tree.style.top !=
((p.top + el.offsetHeight) + "px")) {
		setTimeout(function(){
			w.aclMgr.updateJoomlaAcl(el,id,tree_id);
		}, 100);
		return false;
	}
	tree.style.top = (p.top + el.offsetHeight + 5) + "px";
	tree.style.left = (p.left + el.offsetWidth - 200) + "px";

	var f = function(evt) {
		if (!evt) var evt = window.event;
		var trg = (window.event) ? evt.srcElement : evt.target;
		while(trg != null) {
			if(trg == tree || trg == el)
				return;
			trg = trg.parentNode;
		}
		tree.style.display = "none";
		w.Oby.removeEvent(document, "click", f);
		w.aclMgr.popups[id] = false;
	};
	w.Oby.addEvent(document, "click", f);
	w.aclMgr.popups[id] = f;

	w.aclMgr.trees[tree_id].callbackCheck = function(treeObj, id, value) {
		var v = treeObj.getChk();
		if(v === false || v.length == 0) {
			e.value = "none";
		} else if( v.length > w.aclMgr.cpt[tree_id]) {
			e.value = "all";
		} else {
			e.value = "," + v.join(",") + ",";
		}
	};

	tree.style.display = "";
	return false;
};
</script>';
		}

		$id =
str_replace(array('[',']'),array('_',''),$map);

		$ret .= '<a href="#" onclick="return
window.aclMgr.updateJoomlaAcl(this, \''.$id.'\',
\''.$this->id.'\');">'.
			'<img
src="'.HIKASHOP_IMAGES.'icons/icon-16-levels.png"
title="'.JText::_('ACCESS_LEVEL').'"
/>'.
			'</a><input type="hidden"
id="'.$id.'" name="'.$map.'"
value="'.$values.'" />';

		return $ret;
	}

	public function displayList($map, $value, $empty = 'HIKA_ALL')
{
		$ret = '';
		if(empty($this->groups))
			$this->load();
		$values = array(
			JHTML::_('select.option', '', JText::_($empty))
		);
		foreach($this->groups as $group) {
			$name = str_repeat('- ', $group->level) . $group->text;
			$values[] = JHTML::_('select.option', $group->value,
$name);
		}
		return JHTML::_('select.genericlist', $values, $map,
'class="inputbox" size="1"',
'value', 'text', $value);
	}

	public function getChildrenList() {
		if(empty($this->groups))
			$this->load();

		$ret = array();
		$level = 0;
		foreach($this->groups as $group) {
			$ret[ $group->id ] = array(
				'parent' => (int)$group->parent_id,
				'children' => array(),
				'level' => $group->level
			);
			$level = ($level > $group->level) ? $level : $group->level;
		}
		for($k = $level; $k >= 0; $k--) {
			foreach($ret as $i => $group) {
				if($group['level'] == $k &&
!empty($group['parent'])) {
					$ret[ $group['parent'] ]['children'][] = $i;
					$ret[ $group['parent'] ]['children'] =
array_merge($ret[ $group['parent'] ]['children'],
$group['children']);
				}
			}
		}
		return $ret;
	}

	public function getParentList() {
		if(empty($this->groups))
			$this->load();

		$ret = array();
		$level = 0;
		foreach($this->groups as $group) {
			$ret[ $group->id ] = array(
				'parent' => (int)$group->parent_id,
				'parents' => array((int)$group->parent_id),
				'level' => $group->level
			);
			$level = ($level > $group->level) ? $level : $group->level;
		}
		for($k = 1; $k <= $level; $k++) {
			foreach($ret as $i => $group) {
				if($group['level'] == $k &&
!empty($group['parent']))
					$ret[ $i ]['parents'] = array_merge($ret[
$group['parent'] ]['parents'], $ret[ $i
]['parents']);
			}
		}
		return $ret;
	}

	private function getData($values, $allBtn = false, $min = false) {
		$cpt = count($this->groups)-1;
		$sep = '';
		$ret = '[';
		$rootDepth = 0;
		$arrValues = explode(',', $values);

		if($allBtn) {
			$ret .=
'{"status":5,"name":"'.JText::_('HIKA_ALL').'","icon":"folder","value":""';
			if($values == 'all')
				$ret .= ',"checked":true';
			$ret .= '}';
			$sep = ',';
		}

		foreach($this->groups as $k => $group) {
			$next = null;
			if($k < $cpt)
				$next = $this->groups[$k+1];

			$status = 4;
			if(!empty($next) && $next->level > $group->level)
				$status = 2;

			if($min == true && $k == 0)
				$status = 3;

			$ret .=
$sep.'{"status":'.$status.',"name":"'.str_replace('"','&quot;',$group->text).'"';
			$ret .= ',"value":'.$group->id;

			if($values == 'all' || in_array($group->id, $arrValues)) {
				$ret .= ',"checked":true';
			}

			$sep = '';
			if(!empty($next)) {
				if($next->level > $group->level) {
					$ret .= ',"data":[';
				} else if($next->level < $group->level) {
					$ret .= '}'.str_repeat(']}', $group->level -
$next->level);
					$sep = ',';
				} else {
					$ret .= '}';
					$sep = ',';
				}
			} else {
				$ret .= '}'.str_repeat(']}', $group->level -
$rootDepth);
			}
		}
		$ret .= ']';
		return $ret;
	}
}
PK=�[T�D��
layout.phpnu�[���<?php
/**
 * @package	HikaShop for Joomla!
 * @version	2.2.3
 * @author	hikashop.com
 * @copyright	(C) 2010-2013 HIKARI SOFTWARE. All rights reserved.
 * @license	GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 */
defined('_JEXEC') or die('Restricted access');
?><?php
class hikashopLayoutType{
	function load(){
		$this->values = array();
		$this->values[] = JHTML::_('select.option',
'div',JText::_('DIV') );
		$this->values[] = JHTML::_('select.option',
'table',JText::_('TABLE'));
		$this->values[] = JHTML::_('select.option',
'list',JText::_('LIST'));
		if(JRequest::getCmd('from_display',false) == false)
			$this->values[] = JHTML::_('select.option',
'inherit',JText::_('HIKA_INHERIT'));
	}
	function
display($map,$value,&$js,$update=true,$id='',$control='',$module=false){
		$this->load();
		$options = '';
		if($update){
			$options = 'var options = [\'div\', \'table\',
\'list\'];';
			if ($module)
			{
				$js
.=$options.'switchPanelMod(\''.$value.'\',options,\'layout\',\''.$control.'\');';
				$options='onchange="'.$options.'return
switchPanelMod(this.value,options,\'layout\',\''.$control.'\');"';
			}
			else
			{
				$js
.=$options.'switchPanel(\''.$value.'\',options,\'layout\');';
				$options = 'onchange="'.$options.'return
switchPanel(this.value,options,\'layout\');"';
			}
		}
		if(!empty($id)){
			return JHTML::_('select.genericlist',   $this->values,
$map, 'class="inputbox" size="1" '.$options,
'value', 'text',
$value,'layout_select'.$control ,$id);
		}else{
			return JHTML::_('select.genericlist',   $this->values,
$map, 'class="inputbox" size="1" '.$options,
'value', 'text',
$value,'layout_select'.$control );
		}
	}
}
PK=�[�4B	limit.phpnu�[���<?php
/**
 * @package	HikaShop for Joomla!
 * @version	2.2.3
 * @author	hikashop.com
 * @copyright	(C) 2010-2013 HIKARI SOFTWARE. All rights reserved.
 * @license	GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 */
defined('_JEXEC') or die('Restricted access');
?><?php
class hikashopLimitType{
	function load(){
		$this->values = array();
		$this->values[] = JHTML::_('select.option',
'quantity',JText::_('PRODUCT_QUANTITY'));
		$this->values[] = JHTML::_('select.option',
'price',JText::_('PRICE'));
		$this->values[] = JHTML::_('select.option',
'weight',JText::_('PRODUCT_WEIGHT'));
	}
	function display($map,$value){
		$this->load();
		return JHTML::_('select.genericlist',   $this->values, $map,
'class="inputbox" size="1"',
'value', 'text', $value );
	}
}
PK=�[�j�qCClimitparent.phpnu�[���<?php
/**
 * @package	HikaShop for Joomla!
 * @version	2.2.3
 * @author	hikashop.com
 * @copyright	(C) 2010-2013 HIKARI SOFTWARE. All rights reserved.
 * @license	GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 */
defined('_JEXEC') or die('Restricted access');
?><?php
class hikashopLimitparentType{
	function load($type,$object){
		$this->values = array();
		$fieldClass = hikashop_get('class.field');
		$fields = $fieldClass->getData('',$type);
		if(!empty($fields)){
			foreach($fields as $field){
				if(is_object($object) && isset($object->field_namekey)
&& $object->field_namekey == $field->field_namekey)
continue;
				$this->values[] = JHTML::_('select.option',
$field->field_namekey,$field->field_realname);
			}
			if(count($this->values)){
				$this->values[] = JHTML::_('select.option',
'',JText::_('HIKA_ALL'));
			}
		}
	}
	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 ="
		function hikashopLoadParent(namekey){
			try{
				new Ajax('".$url."&namekey='+namekey, { method:
'get', onComplete: function(result) { old =
window.document.getElementById('parent_value'); if(old){
old.innerHTML = result;}}}).request();
			}catch(err){
				new Request({url:'".$url."&namekey='+namekey,
method: 'get', onComplete: function(result) { old =
window.document.getElementById('parent_value'); if(old){
old.innerHTML = result;}}}).send();
			}
		}
		window.addEvent('domready', function(){
			hikashopLoadParent(document.getElementById('limit_parent_select').value);
		});
		";
		$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' );
	}
}
PK=�[����list.phpnu�[���<?php
/**
 * @package	HikaShop for Joomla!
 * @version	2.2.3
 * @author	hikashop.com
 * @copyright	(C) 2010-2013 HIKARI SOFTWARE. All rights reserved.
 * @license	GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 */
defined('_JEXEC') or die('Restricted access');
?><?php
class hikashopListType{
	function load(){
		$this->values = array();
		$this->values[] = JHTML::_('select.option',
'nochild',JText::_('NO_CHILD') );
		$this->values[] = JHTML::_('select.option',
'allchilds',JText::_('ALL_CHILDS'));
		$this->values[] = JHTML::_('select.option',
'allchildsexpand',JText::_('ALL_CHILDS_EXPANDED'));
		if(JRequest::getCmd('from_display',false) == false)
			$this->values[] = JHTML::_('select.option',
'inherit',JText::_('HIKA_INHERIT'));

	}
	function display($map,$value){
		$this->load();
		return JHTML::_('select.genericlist',   $this->values, $map,
'class="inputbox" size="1"',
'value', 'text', $value );
	}
}
PK=�[�|e))manufacturer.phpnu�[���<?php
/**
 * @package	HikaShop for Joomla!
 * @version	2.2.3
 * @author	hikashop.com
 * @copyright	(C) 2010-2013 HIKARI SOFTWARE. All rights reserved.
 * @license	GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 */
defined('_JEXEC') or die('Restricted access');
?><?php
class hikashopManufacturerType{
	function load($value){
		$this->values = array();
		$query = 'SELECT category_id,category_name FROM
'.hikashop_table('category').' WHERE category_type =
"manufacturer" AND category_depth != 1 ORDER BY category_name
ASC';
		$db = JFactory::getDBO();
		$db->setQuery($query);
		$manufacturers = $db->loadObjectList('category_id');
		if(!empty($manufacturers)){
			$this->values[] = JHTML::_('select.option',
'',JText::_('MANUFACTURER'));
			$this->values[] = JHTML::_('select.option',
'none',JText::_('NO_MANUFACTURER'));
			foreach($manufacturers as $manufacturer){
				$this->values[] = JHTML::_('select.option',
(int)$manufacturer->category_id, $manufacturer->category_name );
			}
		}
	}
	function display($map,$value,$options=''){
		if(empty($this->values)){
			$this->load($value);
		}
		if ($this->values) return JHTML::_('select.genericlist',  
$this->values, $map, 'class="inputbox" size="1"
onchange="document.adminForm.submit();" '.$options,
'value', 'text', $value );
	}
}
PK@�[����
masstable.phpnu�[���<?php
/**
 * @package	HikaShop for Joomla!
 * @version	2.2.3
 * @author	hikashop.com
 * @copyright	(C) 2010-2013 HIKARI SOFTWARE. All rights reserved.
 * @license	GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 */
defined('_JEXEC') or die('Restricted access');
?><?php
class hikashopMasstableType {
	var $externalValues = null;

	function load($form=false) {
		$this->values = array();
		if(!$form) {
			$this->values[] = JHTML::_('select.option', '',
JText::_('HIKA_ALL') );
		}

		if($this->externalValues == null) {
			$this->externalValues = array();
			JPluginHelper::importPlugin('hikashop');
			$dispatcher = JDispatcher::getInstance();
			$dispatcher->trigger('onMassactionTableLoad', array(
&$this->externalValues ) );
			foreach($this->externalValues as $externalValue) {
				$this->values[] = JHTML::_('select.option',
$externalValue->value, $externalValue->text);
			}
		}
	}
	function display($map, $value, $form=false, $optionsArg=''){
		$this->load($form);
		$options ='class="inputbox" size="1"';
		if(!$form){
			$options.='
onchange="document.adminForm.submit();"';
		}
		return JHTML::_('select.genericlist', $this->values, $map,
$options.$optionsArg, 'value', 'text', $value);
	}
}
PK@�[�z��	menus.phpnu�[���<?php
/**
 * @package    HikaMarket for Joomla!
 * @version    3.1.1
 * @author     Obsidev S.A.R.L.
 * @copyright  (C) 2011-2020 OBSIDEV. All rights reserved.
 * @license    GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 */
defined('_JEXEC') or die('Restricted access');
?><?php
class hikamarketMenusType {
	private $values = null;
	private function load($value) {
		if(isset($this->values))
			return;
		if(!HIKASHOP_J30){
			$query = 'SELECT m.alias as name, m.id as itemid, mt.title '
.
				' FROM `#__menu` as m LEFT JOIN `#__menu_types` as mt on
m.menutype = mt.menutype '.
				' WHERE m.client_id = 0 AND m.parent_id != 0 ORDER BY mt.title
ASC, m.ordering ASC';
		} else {
			$query = 'SELECT m.alias as name, m.id as itemid, mt.title , m.link
'.
				' FROM `#__menu` as m LEFT JOIN `#__menu_types` as mt on
m.menutype = mt.menutype '.
				' WHERE m.client_id = 0 AND m.parent_id != 0 AND m.published = 1
AND m.type=\'component\' '.
				' ORDER BY mt.title ASC';
		}

		$db = JFactory::getDBO();
		$db->setQuery($query);
		$menus = $db->loadObjectList('itemid');

		$this->values = array(
			JHTML::_('select.option', '0',
JText::_('HIKA_NONE'))
		);

		$lastGroup = '';
		foreach($menus as $menu) {
			if($menu->title != $lastGroup) {
				if(!empty($lastGroup))
					$this->values[] = JHTML::_('select.option',
'</OPTGROUP>');
				$this->values[] = JHTML::_('select.option',
'<OPTGROUP>', $menu->title);
				$lastGroup = $menu->title;
			}
			if(strpos($menu->link,
'index.php?option='.HIKAMARKET_COMPONENT)===false &&
$menu->itemid != $value)
				continue;
			$this->values[] = JHTML::_('select.option',
$menu->itemid, $menu->name);
		}

		if(!empty($lastGroup))
			$this->values[] = JHTML::_('select.option',
'</OPTGROUP>');
	}

	public function display($map, $value) {
		$this->load($value);
		return JHTML::_('select.genericlist', $this->values, $map,
'class="custom-select" size="1"',
'value', 'text', $value);
	}
}
PK@�[W:����menu_style.phpnu�[���<?php
/**
 * @package	HikaShop for Joomla!
 * @version	2.2.3
 * @author	hikashop.com
 * @copyright	(C) 2010-2013 HIKARI SOFTWARE. All rights reserved.
 * @license	GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 */
defined('_JEXEC') or die('Restricted access');
?><?php
class hikashopMenu_styleType{
	function load(){
		$this->values = array();
		$this->values[] = JHTML::_('select.option',
'title_bottom',JText::_('TITLE_BOTTOM'));
		$this->values[] = JHTML::_('select.option',
'content_top',JText::_('CONTENT_TOP'));
	}
	function display($map,$value){
		$this->load();
		return JHTML::_('select.genericlist',   $this->values, $map,
'class="inputbox" size="1"',
'value', 'text', $value );
	}
}
PK@�[������
multilang.phpnu�[���<?php
/**
 * @package	HikaShop for Joomla!
 * @version	2.2.3
 * @author	hikashop.com
 * @copyright	(C) 2010-2013 HIKARI SOFTWARE. All rights reserved.
 * @license	GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 */
defined('_JEXEC') or die('Restricted access');
?><?php
class hikashopMultilangType{
	function load(){
		$this->values = array();
		$this->values[] = JHTML::_('select.option',
'popups','Popups');
		$this->values[] = JHTML::_('select.option',
'tabs','Tabs');
		$this->values[] = JHTML::_('select.option',
'sliders','Sliders');
	}
	function display($map,$value){
		$this->load();
		return JHTML::_('select.genericlist',   $this->values, $map,
'class="inputbox" size="1"',
'value', 'text', $value );
	}
}
PK@�[�%$�Q�Qnamebox.phpnu�[���<?php
/**
 * @package    HikaMarket for Joomla!
 * @version    3.1.1
 * @author     Obsidev S.A.R.L.
 * @copyright  (C) 2011-2020 OBSIDEV. All rights reserved.
 * @license    GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 */
defined('_JEXEC') or die('Restricted access');
?><?php
class hikamarketNameboxType {
	const NAMEBOX_SINGLE = 1;
	const NAMEBOX_MULTIPLE = 2;

	protected $type = '';
	protected $options = array();

	protected $types = array(
		'product' => array(
			'class' => 'class.product',
			'name' => 'product_name',
			'mode' => 'tree',
			'url' => 'product&task=getTree',
			'options' => array(
				'tree_url' =>
'product&task=getTree&category_id={ID}',
				'tree_key' => '{ID}',
				'onlyNode' => true
			),
		),
		'product_template' => array(
			'class' => 'class.product',
			'name' => 'product_name',
			'mode' => 'list',
			'url' =>
'product&task=getTree&namebox_mode=product_template',
			'displayFormat' => '{product_id} - {product_name} [
{product_code} ]',
			'params' => array(
				'product_type' => 'template'
			),
			'options' => array(
			),
		),
		'category' => array(
			'class' => 'class.category',
			'name' => 'category_name',
			'mode' => 'tree',
			'url' => 'category&task=getTree',
			'options' => array(
				'tree_url' =>
'category&task=getTree&category_id={ID}',
				'tree_key' => '{ID}',
			),
		),
		'brand' => array(
			'class' => 'class.category',
			'name' => 'category_name',
			'mode' => 'list',
			'params' => array(
				'category_type' => 'manufacturer',
				'filters' => array(
					'c.category_depth > 1'
				),
				'key' => 'category_id',
			),
			'url' =>
'category&task=findList&category_type=manufacturer',
			'options' => array(
				'tree_url' =>
'category&task=getTree&category_type=manufacturer&category_id={ID}',
				'tree_key' => '{ID}',
			),
		),
		'characteristic' => array(
			'class' => 'class.characteristic',
			'name' => 'characteristic_value',
			'mode' => 'list',
			'params' => array(
				'value' => false
			),
			'url' => 'characteristic&task=findList'
		),
		'characteristic_value' => array(
			'class' => 'class.characteristic',
			'name' => 'characteristic_value',
			'mode' => 'list',
			'params' => array(
				'value' => true
			),
			'url' =>
'characteristic&task=findList&characteristic_type=value&characteristic_parent_id={ID}',
			'url_params' => array('ID'),
			'options' => array(
				'add_url' =>
'characteristic&task=addCharacteristic&characteristic_type=value&characteristic_parent_id={ID}&tmpl=json',
			)
		),
		'discount' => array(
			'class' => 'class.discount',
			'name' => 'discount_code',
			'mode' => 'list',
			'displayFormat' => '{discount_code}
({discount_type})',
			'url' =>
'discount&task=findValue&displayFormat={displayFormat}',
			'params' => array(

			),
		),
		'modules' => array(
			'class' => 'class.modules',
			'name' => 'id',
			'mode' => 'list',
			'displayFormat' => '{title} ({id})',
			'url' => 'modules&task=getValues',
			'options' => array(
				'olist' => array(
					'table' => array('title' =>
'HIKA_NAME', 'module' => 'HIKA_TYPE',
'id' => 'ID'),
					'displayFormat' => '{title} ({id})'
				)
			)
		),
		'order_status' => array(
			'class' => 'shop.class.orderstatus',
			'name' => 'orderstatus_name',
			'mode' => 'list',
			'params' => array(
			),
			'url' =>
'category&task=findList&category_type=order_status'
		),
		'plugin_images' => array(
			'class' => 'class.plugin',
			'name' => 'image_name',
			'mode' => 'list',
			'displayFormat' => '{image_name}',
			'params' => array(
				'type' => 'images'
			),
			'url' =>
'plugin&task=findList&image_type={TYPE}',
			'url_params' => array('TYPE'),
			'options' => array(
				'olist' => array(
					'table' => array('image_name' =>
'HIKA_NAME', 'image_url' => 'HIKA_IMAGE'
),
					'displayFormat' => '{image_name}',
				)
			)
		),
		'shipping_methods' => array(
			'class' => 'class.shipping',
			'name' => 'shipping_namekey',
			'mode' => 'list',
			'params' => array(

			)
		),
		'payment_methods' => array(
			'class' => 'class.payment',
			'name' => 'payment_namekey',
			'mode' => 'list',
			'params' => array(

			)
		),
		'user' => array(
			'class' => 'class.user',
			'name' => 'user_id',
			'mode' => 'list',
			'displayFormat' => '{user_id} - {name}',
			'url' => 'user&task=getValues',
			'options' => array(
				'olist' => array(
					'table' => array('user_id' =>
'ID', 'name' => 'HIKA_NAME',
'user_email' => 'HIKA_EMAIL' ),
					'displayFormat' => '{user_id} - {name}',
				)
			)
		),
		'vendor' => array(
			'class' => 'class.vendor',
			'name' => 'vendor_name',
			'mode' => 'list',
			'displayFormat' => '{vendor_id} -
{vendor_name}',
			'url' => 'vendor&task=getValues',
			'options' => array(
				'olist' => array(
					'table' => array('vendor_id' =>
'ID', 'vendor_name' => 'HIKA_NAME',
'vendor_email' => 'HIKA_EMAIL'),
					'displayFormat' => '{vendor_id} -
{vendor_name}',
				)
			)
		),
		'warehouse' => array(
			'class' => 'class.warehouse',
			'name' => 'warehouse_name',
			'mode' => 'list',
			'displayFormat' => '{warehouse_name}',
			'url' =>
'product&task=findValue&displayFormat={displayFormat}',
			'params' => array(
			)
		),
		'zone' => array(
			'class' => 'class.zone',
			'name' => 'zone_namekey',
			'mode' => 'tree',
			'displayFormat' => '{zone_name_english}',
			'url' =>
'zone&task=getTree&displayFormat={displayFormat}',
			'options' => array(
				'tree_url' =>
'zone&task=getTree&displayFormat={displayFormat}&zone_key={ID}',
				'tree_key' => '{ID}',
			)
		),
		'address' => array(
			'class' => 'class.address',
			'name' => 'address_mini_format',
			'mode' => 'list',
			'displayFormat' => '{address_mini_format}',
			'url' =>
'user&task=getAddressList&address_type={ADDR_TYPE}&user_id={USER_ID}',
			'url_params' =>
array('USER_ID','ADDR_TYPE'),
		),
		'rawlist' => array(
			'class' => 'type.namebox_rawlist',
			'mode' => 'list'
		),
	);


	public function __construct() {
	}

	public function setType($type, $options = array()) {
		$this->type = $type;
		$this->options = $options;
	}

	private function load($type) {
		if(isset($this->types[$type]))
			return;

		static $loaded_types = false;
		if($loaded_types === false) {
			$loaded_types = array();

			JPluginHelper::importPlugin('hikashop');
			JFactory::getApplication()->triggerEvent('onNameboxTypesLoad',
array(&$loaded_types));
		}

		foreach($loaded_types as $k => $v) {
			if(!isset($this->types[$k]))
				$this->types[$k] = $v;
		}
	}

	private function getClass($class) {
		if(is_string($class))
			return hikamarket::get($class);
		if(is_object($class) && method_exists($class,
'getNameboxData'))
			return $class;
		if(is_array($class) && isset($class['file']) &&
file_exists($class['file']) &&
isset($class['name'])) {
			include_once($class['file']);
			$n = $class['name'];
			$ret = new $n;
			if(method_exists($ret, 'getNameboxData'))
				return $ret;
		}
		return null;
	}

	public function getValues($search = '', $type = '',
$options = array()) {
		if(empty($type))
			$type = $this->type;
		if(empty($type))
			return '';

		$this->load($type);

		if(!isset($this->types[$type]))
			return '';

		$typeConfig = $this->types[$type];

		$nameboxClass = $this->getClass($typeConfig['class']);
		if(empty($nameboxClass))
			return false;

		if(substr($typeConfig['class'], 0, 5) == 'shop.')
			hikamarket::get('shop.type.namebox');

		if(!empty($options['displayFormat']))
			$options['displayFormat'] =
$this->getDisplayFormat($options['displayFormat'], $type);
		if(empty($options['displayFormat']))
			$options['displayFormat'] =
@$typeConfig['displayFormat'];
		$fullLoad = true;
		list($elements, $values) = $nameboxClass->getNameboxData($typeConfig,
$fullLoad, hikamarketNameboxType::NAMEBOX_MULTIPLE, null, $search,
$options);

		if((!empty($typeConfig['mode']) &&
$typeConfig['mode'] == 'list') &&
empty($typeConfig['options']['olist']['table'])
&& !is_string(reset($elements))) {
			$n = $typeConfig['name'];
			foreach($elements as &$element) {
				if(!empty($options['displayFormat']))
					$element = $this->getDisplayValue($element, $typeConfig,
$options);
				else
					$element = $element->$n;
			}
			unset($element);
		}

		return $elements;
	}

	public function display($map, $value, $mode =
hikamarketNameboxType::NAMEBOX_MULTIPLE, $type = '', $options =
array()) {
		if(empty($type))
			$type = $this->type;
		if(empty($type))
			return '';

		$this->load($type);

		if(!isset($this->types[$type]))
			return '';

		$typeConfig = $this->types[$type];

		$config = hikamarket::config();
		$shopConfig = hikamarket::config(false);

		$nameboxClass = $this->getClass($typeConfig['class']);
		if(empty($nameboxClass))
			return '';

		if(substr($typeConfig['class'], 0, 5) == 'shop.')
			hikamarket::get('shop.type.namebox');

		hikamarket::loadJslib('otree');
		if($mode == hikamarketNameboxType::NAMEBOX_MULTIPLE &&
isset($options['sort']) && $options['sort'] ==
true)
			hikamarket::loadJslib('jquery');

		$id =
rtrim(str_replace(array('"',"'",'\\','[]','[',']','.'),array('','','','','_','','_'),$map),
'_');
		if(!empty($options['id']))
			$id = $options['id'];
		if(empty($id))
			$id = !empty($options['id']) ? $options['id'] :
'nb_'.uniqid();

		$key = '';
		$default_text = !empty($options['default_text']) ?
$options['default_text'] : 'HIKA_NONE';
		$name =
'<em>'.JText::_($default_text).'</em>';
		$cleanText = '<em>'.str_replace("'",
"\\'", JText::_($default_text)).'</em>';

		$fullLoad = true;
		list($elements, $values) = $nameboxClass->getNameboxData($typeConfig,
$fullLoad, $mode, $value, null, $options);

		if(isset($options['returnOnEmpty']) &&
empty($elements))
			return $options['returnOnEmpty'];

		$displayFormat = '';
		if(!empty($typeConfig['displayFormat']))
			$displayFormat = $typeConfig['displayFormat'];
		if(!empty($options['displayFormat']))
			$displayFormat = $options['displayFormat'];

		$style = '';
		if(!empty($options['style']))
			$style = ' style="' .
is_array($options['style']) ? implode(' ',
$options['style']) : $options['style'] .
'"';

		$attributes = '';
		if(!empty($options['attributes']))
			$attributes = ' '.trim($options['attributes']);

		$lang = JFactory::getLanguage();
		$leftOffset = ($lang->isRTL()) ? '2000px' :
'-2000px';

		if((!empty($typeConfig['mode']) &&
$typeConfig['mode'] == 'list') &&
empty($typeConfig['options']['olist']['table'])
&& !is_string(reset($elements))) {
			$n = $typeConfig['name'];
			foreach($elements as &$element) {
				if(!empty($displayFormat))
					$element = $this->getDisplayValue($element, $typeConfig,
$options);
				else
					$element = $element->$n;
			}
			unset($element);
		}

		$ret = '<div class="nameboxes"
id="'.$id.'"
onclick="window.oNameboxes[\''.$id.'\'].focus(\''.$id.'_text\');"'.$style.$attributes.'>';

		if($mode == hikamarketNameboxType::NAMEBOX_SINGLE) {
			if(!empty($values)) {
				$key = $value;
				$v = $values;
				if(is_array($values))
					$v = $values[$key];
				$name = $this->getDisplayValue($v, $typeConfig, $options);
			}

			$delete = (isset($options['delete']) &&
$options['delete'] == true);
			$ret .= '
	<div class="namebox"
id="'.$id.'_namebox">
		<input type="hidden" name="'.$map.'"
id="'.$id.'_valuehidden"
value="'.$key.'"/><span
id="'.$id.'_valuetext">'.$name.'</span>
		'.(!$delete ?
			'<a class="editbutton" href="#"
onclick="return
false;"><span>-</span></a>' :
			'<a class="closebutton" href="#"
onclick="window.oNameboxes[\''.$id.'\'].clean(this,\''.$cleanText.'\');return
false;"><span>X</span></a>'
		).'
	</div>
	<div class="nametext">
		<input id="'.$id.'_text" type="text"
style="width:50px;min-width:60px"
onfocus="window.oNameboxes[\''.$id.'\'].focus(this);"
onkeyup="window.oNameboxes[\''.$id.'\'].search(this);"
onchange="window.oNameboxes[\''.$id.'\'].search(this);"/>
		<span
style="position:absolute;top:0px;left:'.$leftOffset.';visibility:hidden"
id="'.$id.'_span">xxxxxx</span>
	</div>';
		}
		else {
			if(substr($map, -2) === '[]')
				$map = substr($map, 0, -2);

			if(!empty($values)) {
				$n = $typeConfig['name'];
				foreach($values as $key => $name) {
					$obj = null;
					if(is_object($name)) {
						$obj = $name;
						if(!empty($displayFormat))
							$name = $this->getDisplayValue($obj, $typeConfig, $options);
						else
							$name = $name->$n;
					}
					$ret .= "\r\n".'<div class="namebox"
id="'.$id.'-'.$key.'">'.
						'<input type="hidden"
name="'.$map.'[]"
value="'.$key.'"/>'.$name.
						' <a class="closebutton" href="#"
onclick="window.oNameboxes[\''.$id.'\'].unset(this,\''.$key.'\');window.oNamebox.cancelEvent();return
false;"><span>X</span></a>'.
						'</div>';
				}
			}
			$ret .= "\r\n".'<div class="namebox"
style="display:none;"
id="'.$id.'tpl">'.
				'<input type="hidden" name="{map}"
value="{key}"/>{name}'.
				' <a class="closebutton" href="#"
onclick="window.oNameboxes[\''.$id.'\'].unset(this,\'{key}\');window.oNamebox.cancelEvent();return
false;"><span>X</span></a>'.
				'</div>';
			$ret .= "\r\n".'<div
class="nametext">'.
				'<input id="'.$id.'_text"
type="text" style="width:50px;min-width:60px"
onfocus="window.oNameboxes[\''.$id.'\'].focus(this);"
onkeyup="window.oNameboxes[\''.$id.'\'].search(this);"
onchange="window.oNameboxes[\''.$id.'\'].search(this);"/>'.
				'<span
style="position:absolute;top:0px;left:'.$leftOffset.';visibility:hidden"
id="'.$id.'_span">span</span>'.
				'</div>';

			if(!empty($options['force_data']))
				$ret .= '<input type="hidden"
name="'.$map.'[]" value=""/>';
		}

		if(isset($options['add']) && $options['add']
== true) {
			$ret .= '<div id="'.$id.'_add"
style="display:none;float:right"><a href="#"
onclick="return
window.oNameboxes[\''.$id.'\'].create(this);"><img
src="'.HIKAMARKET_IMAGES.'icon-16/plus.png"
style="vertical-align:middle;margin:0px;padding:0px;"
alt="+"/></a></div>';
			$ret .= '<div id="'.$id.'_loading"
style="display:none;float:right"><img
src="'.HIKAMARKET_IMAGES.'icon-16/loading.gif"
style="vertical-align:middle;margin:0px;padding:0px;"
alt="loading..."/></div>';
		}

		$ret .= "\r\n\t".'<div
id="'.$id.'hikaclear"
style="clear:both;float:none;"></div></div>';

		$namebox_options = array(
			'mode' => $typeConfig['mode'],
			'img_dir' => HIKAMARKET_IMAGES,
			'map' => $map,
			'min' =>
$shopConfig->get('namebox_search_min_length', 3)
		);

		if($mode == hikamarketNameboxType::NAMEBOX_MULTIPLE &&
isset($options['sort']) && $options['sort'] ==
true)
			$namebox_options['sort'] = true;

		if(isset($options['add']) && $options['add']
== true &&
!empty($typeConfig['options']['add_url'])) {
			$namebox_options['add'] = true;
			$url = ''.
$typeConfig['options']['add_url'];
			if(!empty($typeConfig['url_params'])) {
				foreach($typeConfig['url_params'] as $k) {
					$p = '';
					if(isset($options['url_params'][$k])) {
						$p = $options['url_params'][$k];
					}
					$url = str_replace('{' . $k . '}', $p, $url);
				}
			}
			$url .= '&' . hikamarket::getFormToken() .
'=1';
			$namebox_options['add_url'] = hikamarket::completeLink($url,
false, false, true);
		}

		if($mode == hikamarketNameboxType::NAMEBOX_SINGLE) {
			$namebox_options['multiple'] = false;
			$namebox_options['default_text'] =
'<em>'.JText::_($default_text).'</em>';
		}

		if(isset($typeConfig['options'])) {
			foreach($typeConfig['options'] as $k => $v) {
				if(isset($namebox_options[$k]))
					continue;
				$namebox_options[$k] = $v;
			}
		}
		if(isset($namebox_options['olist']['table'])) {
			foreach($namebox_options['olist']['table'] as $k
=> $v) {
				$namebox_options['olist']['table'][$k] =
JText::_($v);
			}
		}

		if(!$fullLoad) {
			$url = '' . $typeConfig['url'];
			if(!empty($typeConfig['url_params'])) {
				foreach($typeConfig['url_params'] as $k) {
					$p = '';
					if(isset($options['url_params'][$k])) {
						$p = $options['url_params'][$k];
					}
					$url = str_replace('{' . $k . '}', $p, $url);
				}
			}
			if(strpos($url, '{displayFormat}') !== false)
				$url = str_replace('{displayFormat}',
$this->getDisplayFormatId($type, $displayFormat), $url);
			$url .= '&search=HIKASEARCH';

			if(empty($typeConfig['mode']) || $typeConfig['mode']
== 'list') {
				if(empty($namebox_options['olist']))
					$namebox_options['olist'] = array();
				$namebox_options['olist']['gradientLoad'] = true;
				$url .= '&start=HIKASTART';
				$namebox_options['url_pagination'] = 'HIKASTART';
			}

			if(substr($url, 0, 10) == 'index.php?')
				$namebox_options['url'] = str_replace('&amp;',
'&', JRoute::_($url));
			else
				$namebox_options['url'] =  hikamarket::completeLink($url,
false, false, true);
			$namebox_options['url_keyword'] = 'HIKASEARCH';
		}

		if(isset($namebox_options['tree_url'])) {
			if(strpos($namebox_options['tree_url'],
'{displayFormat}') !== false)
				$namebox_options['tree_url'] =
str_replace('{displayFormat}',
$this->getDisplayFormatId($type, $displayFormat),
$namebox_options['tree_url']);
			if(substr($namebox_options['tree_url'], 0, 10) ==
'index.php?')
				$namebox_options['tree_url'] =
str_replace('&amp;', '&',
JRoute::_($namebox_options['tree_url']));
			else
				$namebox_options['tree_url'] =
hikamarket::completeLink($namebox_options['tree_url'], false,
false, true);

		}

		if(!empty($typeConfig['mode']) &&
$typeConfig['mode'] == 'tree') {
			$ret .= '
<div class="namebox-popup">
	<div style="display:none;"
data-oresize="'.$id.'" class="namebox-popup-resize
namebox-popup-container">
		<div id="'.$id.'_otree" class="oTree
namebox-popup-content"></div>
	</div>
</div>
<script type="text/javascript">
new window.oNamebox(
	\''.$id.'\',
	'.json_encode($elements).',
	'.json_encode($namebox_options).'
);
</script>';
		}
		else {
			$ret .= '
<div class="namebox-popup">
	<div style="display:none;"
data-oresize="'.$id.'" class="namebox-popup-resize
namebox-popup-container">
		<div id="'.$id.'_olist" class="oList
namebox-popup-content"></div>
	</div>
</div>
<script type="text/javascript">
new window.oNamebox(
	\''.$id.'\',
	'.json_encode($elements).',
	'.json_encode($namebox_options).'
);';
			if(!empty($values) && $mode ==
hikamarketNameboxType::NAMEBOX_MULTIPLE) {
				$b = array();
				foreach($values as $key => $name) {
					$b[] = $key;
				}
				$ret .= '
try{
	window.oNameboxes[\''.$id.'\'].content.block('.json_encode($b).');
}catch(e){}';
			}

			$ret .= '
</script>';
		}

		return $ret;
	}

	public function getDisplayValue($value, $typeConfig, $options) {
		$ret = '';
		if(!empty($typeConfig['displayFormat']))
			$ret = $typeConfig['displayFormat'];
		if(!empty($options['displayFormat']))
			$ret = $options['displayFormat'];

		$n = @$typeConfig['name'];

		if(empty($ret)) {
			if(is_string($value))
				return $value;
			if(is_object($value) && isset($value->name))
				return $value->name;
			if(is_object($value) && isset($value->$n))
				return $value->$n;
			return $ret;
		}

		if(is_array($value))
			$v = reset($value);

		$matches = array();
		if(preg_match_all('#{([_a-zA-Z0-9]+)}#u', $ret, $matches)) {
			foreach($matches[1] as $m) {
				$v = '';
				if(isset($value->$m))
					$v = $value->$m;
				$ret = str_replace('{' . $m . '}', $v, $ret);
			}
		}
		return $ret;
	}

	public function getDisplayFormatId($displayFormat, $type = '')
{
		if(empty($type))
			$type = $this->type;
		if(empty($type))
			return false;

		$this->load($type);
		if(!isset($this->types[$type]))
			return false;

		$app = JFactory::getApplication();
		$displays =
$app->getUserState(HIKASHOP_COMPONENT.'.nameboxes.display',
null);
		if(empty($displays))
			$displays = array();
		if(!empty($displays[$type])) {
			foreach($displays[$type] as $k => $v) {
				if($v == $displayFormat)
					return $k;
			}
		} else {
			$displays[$type] = array();
		}

		$id = substr($type, 0, 2) . uniqid();
		$displays[$type][$id] = $displayFormat;
		$app->setUserState(HIKASHOP_COMPONENT.'.nameboxes.display',
$displays);

		return $id;
	}

	public function getDisplayFormat($id, $type = '') {
		if(empty($type))
			$type = $this->type;
		if(empty($type))
			return false;

		$this->load($type);
		if(!isset($this->types[$type]))
			return false;

		$app = JFactory::getApplication();
		$displays =
$app->getUserState(HIKASHOP_COMPONENT.'.nameboxes.display',
null);
		if(!isset($displays[$type]))
			return false;
		if(isset($displays[$type][$id]))
			return $displays[$type][$id];
		return false;
	}
}
PK@�[�ĉ��namebox_rawlist.phpnu�[���<?php
/**
 * @package    HikaMarket for Joomla!
 * @version    3.1.1
 * @author     Obsidev S.A.R.L.
 * @copyright  (C) 2011-2020 OBSIDEV. All rights reserved.
 * @license    GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 */
defined('_JEXEC') or die('Restricted access');
?><?php
class hikamarketNamebox_rawlistType {
	public function &getNameboxData($typeConfig, &$fullLoad, $mode,
$value, $search, $options) {
		$ret = array(
			0 => array(),
			1 => array()
		);

		$fullLoad = true;
		if(empty($options['rawdata']))
			return $ret;

		$ret[0] = $options['rawdata'];

		if(!empty($value) && !is_array($value)) {
			if(is_numeric($value))
				$value = (int)$value;
			$ret[1] = $ret[0][$value];
		} else if(!empty($value) && is_array($value)) {
			foreach($value as $v) {
				if(is_numeric($v))
					$v = (int)$v;
				$ret[1][$v] = $ret[0][$v];
			}
		}
		return $ret;
	}
}
PK@�[i۫E��
operators.phpnu�[���<?php
/**
 * @package	HikaShop for Joomla!
 * @version	2.2.3
 * @author	hikashop.com
 * @copyright	(C) 2010-2013 HIKARI SOFTWARE. All rights reserved.
 * @license	GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 */
defined('_JEXEC') or die('Restricted access');
?><?php

class hikashopOperatorsType{
	var $extra = '';
	function hikashopOperatorsType(){

		$this->values = array();

		$this->values[] = JHTML::_('select.option',
'<OPTGROUP>',JText::_('HIKA_NUMERIC'));
		$this->values[] = JHTML::_('select.option',
'=','=');
		$this->values[] = JHTML::_('select.option',
'!=','!=');
		$this->values[] = JHTML::_('select.option',
'>','>');
		$this->values[] = JHTML::_('select.option',
'<','<');
		$this->values[] = JHTML::_('select.option',
'>=','>=');
		$this->values[] = JHTML::_('select.option',
'<=','<=');
		$this->values[] = JHTML::_('select.option',
'</OPTGROUP>');
		$this->values[] = JHTML::_('select.option',
'<OPTGROUP>',JText::_('HIKA_STRING'));
		$this->values[] = JHTML::_('select.option',
'BEGINS',JText::_('HIKA_BEGINS_WITH'));
		$this->values[] = JHTML::_('select.option',
'END',JText::_('HIKA_ENDS_WITH'));
		$this->values[] = JHTML::_('select.option',
'CONTAINS',JText::_('HIKA_CONTAINS'));
		$this->values[] = JHTML::_('select.option',
'NOTCONTAINS',JText::_('HIKA_NOT_CONTAINS'));
		$this->values[] = JHTML::_('select.option',
'LIKE','LIKE');
		$this->values[] = JHTML::_('select.option', 'NOT
LIKE','NOT LIKE');
		$this->values[] = JHTML::_('select.option',
'REGEXP','REGEXP');
		$this->values[] = JHTML::_('select.option', 'NOT
REGEXP','NOT REGEXP');
		$this->values[] = JHTML::_('select.option',
'</OPTGROUP>');
		$this->values[] = JHTML::_('select.option',
'<OPTGROUP>',JText::_('OTHER'));
		$this->values[] = JHTML::_('select.option', 'IS
NULL','IS NULL');
		$this->values[] = JHTML::_('select.option', 'IS NOT
NULL','IS NOT NULL');
		$this->values[] = JHTML::_('select.option',
'</OPTGROUP>');

	}

	function display($map, $default ='',
$additionalClass=""){
		return JHTML::_('select.genericlist', $this->values, $map,
'class="inputbox '.$additionalClass.'"
size="1" style="width:120px;" '.$this->extra,
'value', 'text',$default);
	}

}
PK@�[����''operatorsin.phpnu�[���<?php
/**
 * @package	HikaShop for Joomla!
 * @version	2.2.3
 * @author	hikashop.com
 * @copyright	(C) 2010-2013 HIKARI SOFTWARE. All rights reserved.
 * @license	GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 */
defined('_JEXEC') or die('Restricted access');
?><?php

class hikashopOperatorsinType{
	var $js = '';
	function hikashopOperatorsinType(){

		$this->values = array();

		$this->values[] = JHTML::_('select.option',
'IN',JText::_('HIKA_IN'));
		$this->values[] = JHTML::_('select.option', 'NOT
IN',JText::_('HIKA_NOT_IN'));

	}

	function display($map, $default='',
$additionalClass=''){
		return JHTML::_('select.genericlist', $this->values, $map,
'class="inputbox '.$additionalClass.'"
size="1" style="width:120px;" '.$this->js,
'value', 'text',$default);
	}

}
PK@�[`J�

	order.phpnu�[���<?php
/**
 * @package	HikaShop for Joomla!
 * @version	2.2.3
 * @author	hikashop.com
 * @copyright	(C) 2010-2013 HIKARI SOFTWARE. All rights reserved.
 * @license	GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 */
defined('_JEXEC') or die('Restricted access');
?><?php
class hikashopOrderType {
	function load($type, $value ='', $inherit = true) {
		$filter = false;
		if($type == 'product_filter') {
			$type = 'product';
			$filter = true;
		}

		if(substr($type, 0, 1) != '#')
			$query = 'SELECT * FROM '.hikashop_table($type);
		else
			$query = 'SELECT * FROM '.hikashop_table(substr($type, 2),
false);

		$database = JFactory::getDBO();
		$database->setQuery($query, 0, 1);
		$arr = $database->loadAssoc();

		$object = new stdClass();
		if(!empty($arr)) {
			if(!is_array($value) && !isset($arr[$value])) {
				$arr[$value]=$value;
			}
			ksort($arr);
			foreach($arr as $key => $value) {
				if(!empty($key))
					$object->$key = $value;
			}
		}

		$this->values = array();
		if($type == 'product') {
			if(!$filter) {
				$this->values[] = JHTML::_('select.option',
'ordering', JText::_('ORDERING'));
			} else {
				$this->values[] = JHTML::_('select.option',
'all','all');
			}
		}
		if(!empty($object)) {
			foreach(get_object_vars($object) as $key => $val) {
				$this->values[] = JHTML::_('select.option', $key,$key);
			}
			if(JRequest::getCmd('from_display',false) == false &&
$inherit)
				$this->values[] = JHTML::_('select.option',
'inherit',JText::_('HIKA_INHERIT'));
		}
	}

	function display($map, $value, $type, $options =
'class="inputbox" size="1"', $inherit = true)
{
		$this->load($type, $value, $inherit);
		return JHTML::_('select.genericlist', $this->values, $map,
$options, 'value', 'text', $value);
	}
}
PK@�[$�EEorderdir.phpnu�[���<?php
/**
 * @package	HikaShop for Joomla!
 * @version	2.2.3
 * @author	hikashop.com
 * @copyright	(C) 2010-2013 HIKARI SOFTWARE. All rights reserved.
 * @license	GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 */
defined('_JEXEC') or die('Restricted access');
?><?php
class hikashopOrderdirType{
	function load(){
		$this->values = array();
		$this->values[] = JHTML::_('select.option',
'ASC',JText::_('ASCENDING'));
		$this->values[] = JHTML::_('select.option',
'DESC',JText::_('DESCENDING'));
		if(JRequest::getCmd('from_display',false) == false)
			$this->values[] = JHTML::_('select.option',
'inherit',JText::_('HIKA_INHERIT'));
	}
	function display($map,$value){
		$this->load();
		return JHTML::_('select.genericlist',   $this->values, $map,
'class="inputbox" size="1"',
'value', 'text', $value );
	}
}
PK@�[���iiorder_range.phpnu�[���<?php
/**
 * @package	HikaShop for Joomla!
 * @version	4.4.1
 * @author	hikashop.com
 * @copyright	(C) 2010-2021 HIKARI SOFTWARE. All rights reserved.
 * @license	GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 */
defined('_JEXEC') or die('Restricted access');
?><?php
class hikashopOrder_rangeType {
	public function __construct() {
		$this->values = array();
	}

	protected function load() {

		$this->values = array(
			'last 30 days' => JHTML::_('select.option',
'last 30 days', JText::_('IN_LAST_30_DAYS')),
			'last 6 months' => JHTML::_('select.option',
'last 6 months', JText::_('IN_LAST_6_MONTHS')),
		);
		$current_year = date("Y");
		$config = hikashop_config();
		$numberOfYears =
(int)$config->get('order_range_filter_years', 6);
		for($i = 0 ; $i < $numberOfYears ; $i++) {
			$this->values[$current_year-$i] = JHTML::_('select.option',
$current_year-$i, JText::sprintf('IN_YEAR', $current_year-$i));
		}
	}

	public function display($map, $value, $extra = '', $addAll =
false) {
		if(empty($this->values))
			$this->load();

		if($addAll) {
			$values = array_merge(
				array(JHTML::_('select.option', '',
JText::_('IN_TOTAL'))),
				$this->values
			);
		} else {
			$values = $this->values;
		}
		if(empty($extra))
			$extra = 'class="custom-select"';
		return JHTML::_('select.genericlist', $values, $map, $extra,
'value', 'text', $value);
	}

	public function displayFilter($key, $filterValues, $extra = '',
$addAll = true) {
		return $this->display('filter_'.$key,
@$filterValues->$key, $extra.' class="custom-select"
onchange="this.form.submit();"', $addAll);
	}
}
PK@�[8P�==order_status.phpnu�[���<?php
/**
 * @package    HikaMarket for Joomla!
 * @version    3.1.1
 * @author     Obsidev S.A.R.L.
 * @copyright  (C) 2011-2020 OBSIDEV. All rights reserved.
 * @license    GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 */
defined('_JEXEC') or die('Restricted access');
?><?php
class hikamarketOrder_statusType {
	protected $values;

	public function __construct() {
		$this->values = array();
	}

	protected function load() {
		$categoryClass = hikamarket::get('shop.class.category');
		$filters = array();
		$rows = $categoryClass->loadAllWithTrans('status', false,
$filters);
		foreach($rows as $row) {
			if(!empty($row->translation)) {
				$this->values[$row->category_name] =
JHTML::_('select.option', $row->category_name,
hikamarket::orderStatus($row->translation));
			} else {
				$this->values[$row->category_name] =
JHTML::_('select.option', $row->category_name,
hikamarket::orderStatus($row->category_name));
			}
		}
	}

	public function display($map, $value, $extra = '', $addAll =
false, $filters = array()) {
		if(empty($this->values))
			$this->load();
		if($addAll) {
			$values = array_merge(
				array(JHTML::_('select.option', '',
JText::_('ALL_STATUSES'))),
				$this->values
			);
		} else {
			$values = $this->values;
		}

		if(!empty($filters)) {
			if(is_string($filters))
				$filters = explode(',', $filters);

			foreach($values as $k => $v) {
				if(!in_array($k, $filters))
					unset($values[$k]);
			}
		}

		return JHTML::_('select.genericlist', $values, $map, $extra,
'value', 'text', $value);
	}
}
PK@�[�$�eepagination.phpnu�[���<?php
/**
 * @package	HikaShop for Joomla!
 * @version	2.2.3
 * @author	hikashop.com
 * @copyright	(C) 2010-2013 HIKARI SOFTWARE. All rights reserved.
 * @license	GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 */
defined('_JEXEC') or die('Restricted access');
?><?php
class hikashopPaginationType{
	function load(){
		$this->values = array();
		$this->values[] = JHTML::_('select.option',
'',JText::_('HIKASHOP_NO'));
		$this->values[] = JHTML::_('select.option',
'top',JText::_('HIKA_TOP'));
		$this->values[] = JHTML::_('select.option',
'bottom',JText::_('HIKA_BOTTOM'));
		$this->values[] = JHTML::_('select.option',
'both',JText::_('DISPLAY_BOTH_PAGINATION'));
	}
	function display($map,$value){
		$this->load();
		return JHTML::_('select.genericlist',   $this->values, $map,
'class="inputbox" size="1"',
'value', 'text', $value );
	}
}
PK@�[Q����partners.phpnu�[���<?php
/**
 * @package	HikaShop for Joomla!
 * @version	2.2.3
 * @author	hikashop.com
 * @copyright	(C) 2010-2013 HIKARI SOFTWARE. All rights reserved.
 * @license	GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 */
defined('_JEXEC') or die('Restricted access');
?><?php
class hikashopPartnersType{
	function load($value){
		$this->values = array();
		$db = JFactory::getDBO();
		$query = 'SELECT * FROM
'.hikashop_table('user').' WHERE user_partner_activated
= 1 OR user_id='.$db->Quote($value);
		$db->setQuery($query);
		$partners = $db->loadObjectList();
		if(!empty($partners)){
			foreach($partners as $partner){
				$this->values[] = JHTML::_('select.option',
$partner->user_id, $partner->user_id.'
'.$partner->user_partner_email );
			}
		}
	}
	function display($map,$value){
		$this->load($value);
		return JHTML::_('select.genericlist', $this->values, $map,
'class="inputbox" size="1"',
'value', 'text', $value );
	}
}
PK@�[XE�A��payment.phpnu�[���<?php
/**
 * @package	HikaShop for Joomla!
 * @version	2.2.3
 * @author	hikashop.com
 * @copyright	(C) 2010-2013 HIKARI SOFTWARE. All rights reserved.
 * @license	GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 */
defined('_JEXEC') or die('Restricted access');
?><?php
class hikashopPaymentType{
	var $extra = '';
	function load($form, $value = ''){
		$this->values = array();
		$pluginsClass = hikashop_get('class.plugins');
		$methods = $pluginsClass->getMethods('payment');

		if(!$form){
			$this->values[] = JHTML::_('select.option', '',
JText::_('ALL_PAYMENT_METHODS') );
		}

		if(!empty($methods)){
			foreach($methods as $method){
				if(isset($method->enabled) && !$method->enabled
&& $method->payment_type != $value) continue;
				$this->values[] = JHTML::_('select.option',
$method->payment_type, $method->payment_name );
			}
		}
	}
	function
display($map,$value,$form=true,$attribute='size="1"'){
		$this->load($form, $value);
		if(!$form){
			$attribute .= '
onchange="document.adminForm.submit();"';
		}
		return JHTML::_('select.genericlist', $this->values, $map,
'class="inputbox" '.$this->extra.'
'.$attribute, 'value', 'text', $value );
	}
}
PK@�[ϲbs
period.phpnu�[���<?php
/**
 * @package	HikaShop for Joomla!
 * @version	2.2.3
 * @author	hikashop.com
 * @copyright	(C) 2010-2013 HIKARI SOFTWARE. All rights reserved.
 * @license	GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 */
defined('_JEXEC') or die('Restricted access');
?><?php
defined('_JEXEC') or die('Restricted access');
?>
<?php
class hikashopPeriodType{
	function load($inside){
		$this->values = array();
		$this->values[] = JHTML::_('select.option',
'today',JText::_('TODAY'));
		$this->values[] = JHTML::_('select.option',
'yesterday',JText::_('YESTERDAY'));
		$this->values[] = JHTML::_('select.option',
'last24h',JText::_('LAST_24H'));
		$this->values[] = JHTML::_('select.option',
'thisWeek',JText::_('THIS_WEEK'));
		$this->values[] = JHTML::_('select.option',
'thisMonth',JText::_('THIS_MONTH'));
		$this->values[] = JHTML::_('select.option',
'thisYear',JText::_('THIS_YEAR'));
		$this->values[] = JHTML::_('select.option',
'previousWeek',JText::_('PREVIOUS_WEEK'));
		$this->values[] = JHTML::_('select.option',
'previousMonth',JText::_('PREVIOUS_MONTH'));
		$this->values[] = JHTML::_('select.option',
'previousYear',JText::_('PREVIOUS_YEAR'));
		$this->values[] = JHTML::_('select.option',
'all',JText::_('HIKA_ALL'));
	}
	function display($map,$value, $inside=true, $radio=false){
		$this->load($inside);
		$type='select.genericlist';
		if($radio){
			$type='select.radiolist';
		}
		return JHTML::_($type, $this->values, $map,
'class="inputbox" size="1"',
'value', 'text', $value );
	}
}
PK@�[�@z�88plugins.phpnu�[���<?php
/**
 * @package	HikaShop for Joomla!
 * @version	2.2.3
 * @author	hikashop.com
 * @copyright	(C) 2010-2013 HIKARI SOFTWARE. All rights reserved.
 * @license	GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 */
defined('_JEXEC') or die('Restricted access');
?><?php
class hikashopPluginsType{
	var $type = 'payment';
	var $order = null;
	function preload($backend=true){
		$pluginsClass = hikashop_get('class.plugins');
		$this->methods[$this->type][(string)@$this->order->order_id]
= $pluginsClass->getMethods($this->type);
		if(!empty($this->methods[$this->type][(string)@$this->order->order_id])){
			$max = 0;
			$already = array();
			foreach($this->methods[$this->type][(string)@$this->order->order_id]
as $method){
				if(!empty($method->ordering) &&
$max<$method->ordering){
					$max=$method->ordering;
				}
			}
			foreach($this->methods[$this->type][(string)@$this->order->order_id]
as $k => $method){
				if(empty($method->ordering)){
					$max++;
					$this->methods[$this->type][(string)@$this->order->order_id][$k]->ordering=$max;
				}
				while(isset($already[$this->methods[$this->type][(string)@$this->order->order_id][$k]->ordering])){
					$max++;
					$this->methods[$this->type][(string)@$this->order->order_id][$k]->ordering=$max;
				}
				$already[$this->methods[$this->type][(string)@$this->order->order_id][$k]->ordering]=true;
			}
		}
		if(!$backend){
			JPluginHelper::importPlugin( 'hikashoppayment' );
			$dispatcher = JDispatcher::getInstance();
			$usable_methods = null;
			$class = hikashop_get('class.order');
			$this->order =
$class->loadFullOrder($this->order->order_id,true);
			$dispatcher->trigger( 'onPaymentDisplay', array( &
$this->order,&$this->methods[$this->type][(string)@$this->order->order_id],&$usable_methods
) );
			if(!empty($usable_methods)){
				ksort($usable_methods);
			}
			$this->methods[$this->type][(string)@$this->order->order_id]=$usable_methods;
		}
		if($this->type=='shipping'){
			$unset=array();
			$add=array();
			foreach($this->methods[$this->type][(string)@$this->order->order_id]
as $k => $method){
				if($method->shipping_type!='manual'){
					$plugin = hikashop_import( 'hikashop'.$this->type,
$method->shipping_type );
					if($plugin &&
method_exists($plugin,'shippingMethods')){
						$methods = $plugin->shippingMethods($method);
						if(is_array($methods) && !empty($methods)){
							$unset[]=$k;
							foreach($methods as $id=>$name){
								$new = clone($method);
								$new->shipping_id = $id;
								$new->shipping_name = $method->shipping_name . ' -
' . $name;
								$add[]=$new;
							}
						}else{
							$unset[]=$k;
						}
					}else{
						$unset[]=$k;
					}
				}
			}
			foreach($unset as $k){
				unset($this->methods[$this->type][(string)@$this->order->order_id][$k]);
			}
			foreach($add as $v){
				$this->methods[$this->type][(string)@$this->order->order_id][]=$v;
			}
		}
		return true;
	}
	function load($type,$id){
		$this->values = array();

		$found = false;
		$app = JFactory::getApplication();
		if(!empty($this->methods[$this->type][(string)@$this->order->order_id])){
			$type_name = $this->type.'_type';
			$id_name = $this->type.'_id';
			$name = $this->type.'_name';

			foreach($this->methods[$this->type][(string)@$this->order->order_id]
as $method){
				if($method->$type_name==$type &&
$method->$id_name==$id){
					$found = true;
				}
				if(empty($method->$name)){
					if(empty($method->$type_name)){
						$method->$name = '';
					}else{
						$method->$name = $method->$type_name.($app->isAdmin()?'
'.$method->$id_name:'');
					}
				}

				$this->values[] = JHTML::_('select.option',
$method->$type_name.'_'.$method->$id_name,
$method->$name );
			}
		}
		if(!$found && !is_array($type)){

			if(empty($type)){
				$name = JText::_('HIKA_NONE');
			}else{
				$name =  $type.($app->isAdmin()?' '.$id:'');
			}
			$this->values[] = JHTML::_('select.option',
$type.'_'.$id, $name );
		}
	}

	function getName($type,$id){
		if(empty($this->methods[$this->type][(string)@$this->order->order_id])){
			$this->preload();
		}
		if(!empty($this->methods[$this->type][(string)@$this->order->order_id])){
			$type_name = $this->type.'_type';
			$id_name = $this->type.'_id';
			$name = $this->type.'_name';
			foreach($this->methods[$this->type][(string)@$this->order->order_id]
as $method){
				if($method->$type_name==$type &&
$method->$id_name==$id){
					return $method->$name;
				}
			}

		}
		return '';
	}
	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);
	}
}
PK@�[���33position.phpnu�[���<?php
/**
 * @package	HikaShop for Joomla!
 * @version	2.2.3
 * @author	hikashop.com
 * @copyright	(C) 2010-2013 HIKARI SOFTWARE. All rights reserved.
 * @license	GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 */
defined('_JEXEC') or die('Restricted access');
?><?php
class hikashopPositionType{
	function load($inside){
		$this->values = array();
		$this->values[] = JHTML::_('select.option',
'top',JText::_('HIKA_TOP'));
		$this->values[] = JHTML::_('select.option',
'bottom',JText::_('HIKA_BOTTOM'));
		$this->values[] = JHTML::_('select.option',
'left',JText::_('HIKA_LEFT'));
		$this->values[] = JHTML::_('select.option',
'right',JText::_('HIKA_RIGHT'));
		if($inside){
			$this->values[] = JHTML::_('select.option',
'inside',JText::_('HIKA_INSIDE'));
		}
	}
	function display($map,$value, $inside=true, $radio=false){
		$this->load($inside);
		$type='hikaselect.genericlist';
		if($radio){
			$type='hikaselect.radiolist';
		}
		return JHTML::_($type, $this->values, $map,
'class="inputbox" size="1"',
'value', 'text', $value );
	}
}
PK@�[�7����pricedisplay.phpnu�[���<?php
/**
 * @package	HikaShop for Joomla!
 * @version	2.2.3
 * @author	hikashop.com
 * @copyright	(C) 2010-2013 HIKARI SOFTWARE. All rights reserved.
 * @license	GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 */
defined('_JEXEC') or die('Restricted access');
?><?php
class hikashopPricedisplayType{
	function load(){
		$this->values = array();
		$this->values[] = JHTML::_('select.option',
'cheapest',JText::_('CHEAPEST_PRICE') );
		$this->values[] = JHTML::_('select.option',
'unit',JText::_('UNIT_PRICE_ONLY'));
		$this->values[] = JHTML::_('select.option',
'range',JText::_('PRICE_RANGE'));
		$this->values[] = JHTML::_('select.option',
'all',JText::_('HIKA_ALL'));
		if(JRequest::getCmd('from_display',false) == false)
			$this->values[] = JHTML::_('select.option',
'inherit',JText::_('HIKA_INHERIT'));
	}
	function display($map,$value){
		$this->load();
		return JHTML::_('select.genericlist', $this->values, $map,
'class="inputbox" size="1"',
'value', 'text', $value );
	}
}
PKA�[�����pricetax.phpnu�[���<?php
/**
 * @package	HikaShop for Joomla!
 * @version	2.2.3
 * @author	hikashop.com
 * @copyright	(C) 2010-2013 HIKARI SOFTWARE. All rights reserved.
 * @license	GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 */
defined('_JEXEC') or die('Restricted access');
?><?php
class hikashopPricetaxType{
	function load($inherit=false){
		$this->values = array();
		if($inherit){
			$this->values[] = JHTML::_('select.option',
3,JText::_('HIKA_INHERIT') );
		}
		$this->values[] = JHTML::_('select.option',
0,JText::_('NO_TAX') );
		$this->values[] = JHTML::_('select.option',
1,JText::_('WITH_TAX'));
		$this->values[] = JHTML::_('select.option',
2,JText::_('DISPLAY_BOTH_TAXES'));
	}
	function display($map,$value,$inherit=false){
		$this->load($inherit);
		return JHTML::_('select.genericlist',   $this->values, $map,
'class="inputbox" size="1"',
'value', 'text', (int)$value );
	}
}
PKA�[��i��product.phpnu�[���<?php
/**
 * @package	HikaShop for Joomla!
 * @version	2.2.3
 * @author	hikashop.com
 * @copyright	(C) 2010-2013 HIKARI SOFTWARE. All rights reserved.
 * @license	GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 */
defined('_JEXEC') or die('Restricted access');
?><?php
class HikashopProductType{
	var $onchange = 'document.adminForm.submit( );';
	function load(){
		$this->values = array();
		$this->values[] = JHTML::_('select.option',
'all',JText::_('HIKA_ALL') );
		$this->values[] = JHTML::_('select.option',
'main',JText::_('PRODUCTS'));
		$this->values[] = JHTML::_('select.option',
'variant',JText::_('VARIANTS'));
	}
	function display($map,$value, $additionalClass = ''){
		$this->load();
		return JHTML::_('select.genericlist',   $this->values, $map,
'class="inputbox '.$additionalClass.'"
size="1" '.
(!empty($this->onchange)?'onchange="'.$this->onchange.'"':''),
'value', 'text', $value );
	}
}
PKA�[����0�0productdisplay.phpnu�[���<?php
/**
 * @package	HikaShop for Joomla!
 * @version	2.2.3
 * @author	hikashop.com
 * @copyright	(C) 2010-2013 HIKARI SOFTWARE. All rights reserved.
 * @license	GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 */
defined('_JEXEC') or die('Restricted access');
?><?php
class hikashopProductdisplayType {
	var $default = array(
		'show_default',
		'show_reversed',
		'show_tabular'
	);

	function load(){
		$this->values = array();
		if(JRequest::getCmd('from_display',false) == false)
			$this->values[] = JHTML::_('select.option', '',
JText::_('HIKA_INHERIT'));
		$this->values[] = JHTML::_('select.optgroup', '--
'.JText::_('FROM_HIKASHOP').' --');
		foreach($this->default as $d) {
			$this->values[] = JHTML::_('select.option', $d,
JText::_(strtoupper($d)));
		}
		if(version_compare(JVERSION,'1.6.0','>=')){
			$this->values[] = JHTML::_('select.optgroup', '--
'.JText::_('FROM_HIKASHOP').' --');
		}

		$closeOpt = '';
		$values = $this->getLayout();
		foreach($values as $value) {
			if(substr($value,0,1) == '#') {
				if(version_compare(JVERSION,'1.6.0','>=')
&& !empty($closeOpt)){
					$this->values[] = JHTML::_('select.optgroup',
$closeOpt);
				}
				$value = substr($value,1);
				$closeOpt = '-- ' .
JText::sprintf('FROM_TEMPLATE',basename($value)) . '
--';
				$this->values[] = JHTML::_('select.optgroup', $closeOpt);
			} else {
				$this->values[] = JHTML::_('select.option', $value,
$value);
			}
		}
		if(version_compare(JVERSION,'1.6.0','>=')
&& !empty($closeOpt)){
			$this->values[] = JHTML::_('select.optgroup', $closeOpt);
		}
	}

	function display($map,$value) {
		$this->load();
		return JHTML::_('select.genericlist', $this->values, $map,
'class="inputbox" size="1"',
'value', 'text', $value );
	}

	function check($name,$template) {
		if($name == '' || in_array($name, $this->default))
			return true;
		$values = $this->getLayout($template);
		return in_array($name,$values);
	}

	function getLayout($template = '') {
		jimport('joomla.filesystem.folder');
		jimport('joomla.filesystem.file');
		static $values = null;
		if($values !== null)
			return $values;
		$client	= JApplicationHelper::getClientInfo(0); // 0: Front client
		$tplDir = $client->path.DS.'templates'.DS;
		$values = array();
		if(empty($template)) {
			$templates = JFolder::folders($tplDir);
			if(empty($templates))
				return null;
		} else {
			$templates = array($template);
		}
		$groupAdded = false;
		foreach($templates as $tpl) {
			$t = $tplDir.$tpl.DS.'html'.DS.HIKASHOP_COMPONENT.DS;
			if(!JFolder::exists($t))
				continue;
			$folders = JFolder::folders($t);
			if(empty($folders))
				continue;
			foreach($folders as $folder) {
				$files = JFolder::files($t.$folder.DS);
				if(empty($files))
					continue;
				foreach($files as $file) {
					if(substr($file,-4) == '.php')
						$file = substr($file,0,-4);
					if(substr($file,0,5) == 'show_' &&
!in_array($file,$this->default)) {
						if(!$groupAdded) {
							$values[] = '#'.$tpl;
							$groupAdded = true;
						}
						$values[] = $file;
					}
				}
			}
		}
		return $values;
	}

	public function displaySingle($map, $value, $display = '', $root
= 0, $delete = false) {
		hikashop_loadJslib('jquery');
		hikashop_loadJslib('otree');
		$id =
str_replace(array('[',']'),array('_',''),$map);

		$key = '';
		$name =
'<em>'.JText::_('HIKA_NONE').'</em>';
		$cleanText = '<em>'.str_replace("'",
"\\'",
JText::_('HIKA_NONE')).'</em>';
		$productClass = hikashop_get('class.product');
		if((int)$value > 0) {
			$product = $productClass->get((int)$value);
			if($product) {
				$key = (int)$value;
				$name = $product->product_name;
			}
		}

		$displayParam = '';
		if(!empty($display)) {
			$displayParam = '&display=' . urlencode($display);
		}
		$shopConfig = hikashop_config(false);
		$minSearch = $shopConfig->get('product_search_min_lenght',
3);
		$jsEvent =
'window.nameboxes.advSearch(\''.$id.'\', this,
\''.
hikashop_completeLink('product&task=findTree'.$displayParam
.'&search=HIKASEARCH', false, false, true) . '\',
\'HIKASEARCH\', '.$minSearch.');';

		$elements = $productClass->getTreeList((int)$root, 2, true,
$display);

		$ret = '
<div class="nameboxes" id="'.$id.'"
onclick="window.nameboxes.focus(\''.$id.'\',\''.$id.'_text\');">
	<div class="namebox"
id="'.$id.'_namebox">
		<input type="hidden" name="'.$map.'"
id="'.$id.'_valuehidden"
value="'.$key.'"/><span
id="'.$id.'_valuetext">'.$name.'</span>
		'.(!$delete?'<a class="editbutton"
href="#" onclick="return
false;"><span>-</span></a>':
		'<a class="closebutton" href="#"
onclick="window.nameboxes.clean(\''.$id.'\',this,\''.$cleanText.'\');return
false;"><span>X</span></a>').'
	</div>
	<div class="nametext">
		<input id="'.$id.'_text" type="text"
style="width:50px;min-width:60px"
onfocus="window.nameboxes.focus(\''.$id.'\',this);"
onblur="" onkeyup="'.$jsEvent.'"
onchange="'.$jsEvent.'"/>
		<span
style="position:absolute;top:0px;left:-2000px;visibility:hidden"
id="'.$id.'_span">span</span>
	</div>
	<div class="hikaclear"
style="clear:both;float:none;"></div>
</div>
<div class="namebox-popup">
	<div id="'.$id.'_otree"
style="display:none;" class="oTree
namebox-popup-content"></div>
</div>
<script type="text/javascript">
var options = {rootImg:"'.HIKASHOP_IMAGES.'otree/",
showLoading:true};
var data_'.$id.' = ' . json_encode($elements) . ',
orign_data_'.$id.' = true;
var '.$id.' = new
window.oTree("'.$id.'",options,null,data_'.$id.',false);
'.$id.'.addIcon("world","world.png");
'.$id.'.callbackFct = function(tree,node,ev) {
	return window.nameboxes.callbackFct(this, "'.
hikashop_completeLink('product&task=getTree'.$displayParam
.'&category_id=HIKACATID', false, false, true) .
'", "HIKACATID", tree, node, ev);
};
'.$id.'.callbackSelection = function(tree,id) {
	var d = document, node = tree.get(id);
	if(node.state == 0) {
		if( node.value && node.name ) {
			var e = d.getElementById("'.$id.'_valuehidden");
			if(e) e.value = node.value;
			e = d.getElementById("'.$id.'_valuetext");
			if(e) e.innerHTML = node.name;
		}
	} else if(node.state >= 1 && node.state <= 4) {
		tree.s(node);
		return;
	}
	var c = d.getElementById("'.$id.'_otree");
	if(c) c.style.display = "none";
	c = d.getElementById("'.$id.'_text");
	if(c) c.value = "";
	tree.sel(0);
};
'.$id.'.render(true);
</script>';

		return $ret;
	}

	public function displayMultiple($map, $values, $display = '',
$root = 0) {
		if(substr($map,-2) == '[]')
			$map = substr($map,0,-2);
		$id =
str_replace(array('[',']'),array('_',''),$map);
		$ret = '<div class="nameboxes"
id="'.$id.'"
onclick="'.$id.'_focus(\''.$id.'_text\');">';
		if(!empty($values)) {
			foreach($values as $key => $name) {
				$obj = null;
				if(is_object($name)) {
					$obj = $name;
					$name = $obj->product_name;
					$key = $obj->product_id;
				}
				$ret .= '<div class="namebox"
id="'.$id.'_'.$key.'">'.
					'<input type="hidden"
name="'.$map.'[]"
value="'.$key.'"/>'.$name.
					' <a class="closebutton" href="#"
onclick="window.hikashop.deleteId(\''.$id.'_'.$key.'\');window.Oby.cancelEvent(event);return
false;"><span>X</span></a>'.
					'</div>';
			}
		}

		$ret .= '<div class="namebox"
style="display:none;"
id="'.$id.'tpl">'.
				'<input type="hidden" name="{map}"
value="{key}"/>{name}'.
				' <a class="closebutton" href="#"
onclick="window.hikashop.deleteId(this.parentNode);window.Oby.cancelEvent(event);return
false;"><span>X</span></a>'.
				'</div>';

		$jsEvent = $id.'_tree';
		$ret .= '<div class="nametext">'.
			'<input id="'.$id.'_text"
type="text" style="width:50px;min-width:60px"
onfocus="'.$id.'_focus(this);"
onblur="'.$id.'_blur(this);"
onkeyup="'.$jsEvent.'(this);"
onchange="'.$jsEvent.'(this);"/>'.
			'<span
style="position:absolute;top:0px;left:-2000px;visibility:hidden"
id="'.$id.'_span">span</span>'.
			'</div>';

		hikashop_loadJslib('jquery');
		hikashop_loadJslib('otree');

		$config = hikashop_config(false);
		$minSearch = $config->get('product_search_min_lenght', 3);

		$productClass = hikashop_get('class.product');
		$elements = $productClass->getTreeList((int)$root, 2, true,
$display);

		$displayParam = '';
		if(!empty($display)) {
			$displayParam = '&display=' . urlencode($display);
		}

		$ret .= '<div class="hikaclear"
style="clear:both;float:none;"></div></div>
<div class="namebox-popup">
<div id="'.$id.'_otree"
style="display:none;" class="oTree
namebox-popup-content"></div>
</div>
<script type="text/javascript">
var options = {rootImg:"'.HIKASHOP_IMAGES.'otree/",
showLoading:true};
var data_'.$id.' = ' . json_encode($elements) . ',
orign_data_'.$id.' = true;
var '.$id.' = new
window.oTree("'.$id.'",options,null,data_'.$id.',false);
'.$id.'.addIcon("world","world.png");
'.$id.'.callbackFct = function(tree,node,ev) {
	var t = this, o = window.Oby, n = null;
	o.xRequest(
		"'.
hikashop_completeLink('product&task=getTree'.$displayParam
.'&category_id=HIKACATID', false, false, true) .
'".replace("HIKACATID", node.value),
		null,
		function(xhr,params) {
			var json = o.evalJSON(xhr.responseText);
			if(json.length > 0) {
				var s = json.length;
				for(var i = 0; i < s; i++) {
					n = json[i];
					t.add(node.id, n.status, n.name, n.value, n.url, n.icon);
				}
				t.update(node);
				if(t.selectOnOpen) {
					var n = t.find(t.selectOnOpen);
					if(n) { t.sel(n); }
					t.selectOnOpen = null;
				}
			} else {
				t.emptyDirectory(node);
			}
		},
		function(xhr, params) {
			t.add(node.id, 0, "error");
			t.update(node);
		}
	);
	return false;
};
'.$id.'.callbackSelection = function(tree,id) {
	var d = document, node = tree.get(id);
	if(node.state == 0) {
		if(node.value && node.name) {
			var blocks = {map: "'.$map.'[]", key: node.value,
name: node.name}, cur =
d.getElementById("'.$id.'_"+node.value);
			if(!cur) {
				window.hikashop.dup("'.$id.'tpl", blocks,
"'.$id.'_"+node.value);
			}
		}
	} else if(node.state >= 1 && node.state <= 4) {
		tree.s(node);
		return;
	}
	var c = d.getElementById("'.$id.'_otree");
	if(c) c.style.display = "none";
	c = d.getElementById("'.$id.'_text");
	if(c) c.value = "";
	tree.sel(0);
};
'.$id.'.render(true);

function '.$id.'_tree(el) {
	var d = document, s =
d.getElementById("'.$id.'_span");
	s.innerHTML = el.value;
	if(el.value.length < '.$minSearch.') {
		if(!orign_data_'.$id.') {
			window.oTrees["'.$id.'"].lNodes = [];
			window.oTrees["'.$id.'"].lNodes[0] = new
window.oNode(0,-1);
			window.oTrees["'.$id.'"].load(data_'.$id.');
			window.oTrees["'.$id.'"].render();
			orign_data_'.$id.' = true;
		}
		window.oTrees["'.$id.'"].search(el.value);
	} else {
		window.Oby.xRequest(
			"'.
hikashop_completeLink('product&task=findTree'.$displayParam
.'&search=HIKASEARCH', false, false, true) .
'".replace("HIKASEARCH", el.value),
			null,
			function(xhr,params) {
				orign_data_'.$id.' = false;
				window.oTrees["'.$id.'"].lNodes = [];
				window.oTrees["'.$id.'"].lNodes[0] = new
window.oNode(0,-1);
				var json = window.Oby.evalJSON(xhr.responseText);
				window.oTrees["'.$id.'"].load(json);
				window.oTrees["'.$id.'"].render();
			},
			function(xhr, params) { }
		);
	}
	el.style.width = s.offsetWidth + 30 + "px";
}
function '.$id.'_focus(el) {
	var d = document, c = d.getElementById("'.$id.'"); e =
d.getElementById("'.$id.'_otree");
	if(typeof(el) == "string")
		el = d.getElementById(el);
	el.focus();
	window.oTrees["'.$id.'"].search(el.value);
	if(e) {
		e.style.display = "";
		var f = function(evt) {
			var e = d.getElementById("'.$id.'_otree");
			if (!evt) var evt = window.event;
			var trg = (window.event) ? evt.srcElement : evt.target;
			while(trg != null) {
				if(trg == el || trg == e || trg == c)
					return;
				trg = trg.parentNode;
			}
			e.style.display = "none";
			window.Oby.removeEvent(document, "mousedown", f);
		};
		window.Oby.addEvent(document, "mousedown", f);
	}
}
function '.$id.'_blur(el) {
	return;
}

if(!window.hkjQuery) window.hkjQuery = window.jQuery;
hkjQuery(document).ready(function($) {
	$("#'.$id.'").sortable({
		cursor: "move",
		items: "div",
		stop: function(event, ui) {
			$("#'.$id.'
.nametext").appendTo("#'.$id.'");
			$("#'.$id.'
.hikaclear").appendTo("#'.$id.'");
		}
	});
	$("#'.$id.'").disableSelection();
});
</script>';

		return $ret;
	}
}
PKA�[qC(m��productslot.phpnu�[���<?php
/**
 * @package	HikaShop for Joomla!
 * @version	2.2.3
 * @author	hikashop.com
 * @copyright	(C) 2010-2013 HIKARI SOFTWARE. All rights reserved.
 * @license	GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 */
defined('_JEXEC') or die('Restricted access');
?><?php
class hikashopProductslotType {

	function load(){
		$this->values = array(
			'show' => array(
				'topBegin',
				'topEnd',
				'leftBegin',
				'leftEnd',
				'rightBegin',
				'rightMiddle',
				'rightEnd',
				'bottomBegin',
				'bottomMiddle',
				'bottomEnd'
			),
			'listing' => array(
				'top',
				'afterProductName',
				'bottom'
			)		
		);
	}

	function display($map, $value, $type = 'show') {
		$this->load();
		if(!isset($this->values[$type])) {
			$type = 'show';
		}
		return JHTML::_('select.genericlist', $this->values[$type],
$map, 'class="inputbox" size="1"',
'value', 'text', $value);
	}
}
PKA�["WJ���productsync.phpnu�[���<?php
/**
 * @package	HikaShop for Joomla!
 * @version	2.2.3
 * @author	hikashop.com
 * @copyright	(C) 2010-2013 HIKARI SOFTWARE. All rights reserved.
 * @license	GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 */
defined('_JEXEC') or die('Restricted access');
?><?php
class hikashopProductsyncType{
	function load(){
		$this->values = array();
		$this->values[] = JHTML::_('select.option',
2,JText::_('RELATED_PRODUCTS'));
		$this->values[] = JHTML::_('select.option',
1,JText::_('IN_SAME_CATEGORIES'));
		$this->values[] = JHTML::_('select.option',
3,JText::_('FROM_SAME_MANUFACTURER'));
		$this->values[] = JHTML::_('select.option',
0,JText::_('IN_MODULE_PARENT_CATEGORY'));
		if(JRequest::getCmd('from_display',false) == false)
			$this->values[] = JHTML::_('select.option',
4,JText::_('HIKA_INHERIT'));
	}
	function display($map,$value){
		$this->load();
		return JHTML::_('select.genericlist',   $this->values, $map,
'class="inputbox" size="1"',
'value', 'text', (int)$value );
	}
}
PKA�[�
 ��productweight.phpnu�[���<?php
/**
 * @package	HikaShop for Joomla!
 * @version	4.4.1
 * @author	hikashop.com
 * @copyright	(C) 2010-2021 HIKARI SOFTWARE. All rights reserved.
 * @license	GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 */
defined('_JEXEC') or die('Restricted access');
?><?php
class HikashopProductweightType{
	var $onchange = 'document.adminForm.submit( );';
	function load(){
		$this->values = array();
		$this->values[] = JHTML::_('select.option',
'all',JText::_('HIKA_ALL') );
		$this->values[] = JHTML::_('select.option',
'virtual',JText::_('WIZARD_VIRTUAL'));
		$this->values[] = JHTML::_('select.option',
'shippable',JText::_('WIZARD_REAL'));
	}
	function display($map,$value, $additionalClass = ''){
		$this->load();
		return JHTML::_('select.genericlist',   $this->values, $map,
'class="custom-select '.$additionalClass.'"
size="1" '.
(!empty($this->onchange)?'onchange="'.$this->onchange.'"':''),
'value', 'text', $value );
	}
}
PKA�[��f2::product_information.phpnu�[���<?php
/**
 * @package	HikaShop for Joomla!
 * @version	2.2.3
 * @author	hikashop.com
 * @copyright	(C) 2010-2013 HIKARI SOFTWARE. All rights reserved.
 * @license	GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 */
defined('_JEXEC') or die('Restricted access');
?><?php
class hikashopProduct_informationType{
	function load($fields,$id, $sort){

		$this->values = array();
		$this->values[] = JHTML::_('select.option',
'weight',JText::_('PRODUCT_WEIGHT'));
		$this->values[] = JHTML::_('select.option',
'volume',JText::_('PRODUCT_VOLUME'));
		$this->values[] = JHTML::_('select.option',
'height',JText::_('PRODUCT_HEIGHT'));
		$this->values[] = JHTML::_('select.option',
'length',JText::_('PRODUCT_LENGTH'));
		$this->values[] = JHTML::_('select.option',
'width',JText::_('PRODUCT_WIDTH'));
		$this->values[] = JHTML::_('select.option',
'surface',JText::_('PRODUCT_SURFACE'));
		if(empty($id) || $id=='datafilterfilter_data_cursor'){
			$this->values[] = JHTML::_('select.option',
'b.product_name',JText::_('PRODUCT_NAME'));
			$this->values[] = JHTML::_('select.option',
'price',JText::_('PRICE'));
			$this->values[] = JHTML::_('select.option',
'b.product_average_score',JText::_('RATING'));
		}
		if($sort){
			$this->values[] = JHTML::_('select.option',
'b.product_created',JText::_('CREATION_DATE'));
			$this->values[] = JHTML::_('select.option',
'b.product_sales',JText::_('SALES'));
			$this->values[] = JHTML::_('select.option',
'b.product_modified',JText::_('MODIFICATION_DATE'));
			$this->values[] = JHTML::_('select.option',
'b.product_hit',JText::_('CLICKS'));
		}

		$fieldClass=hikashop_get('class.field');
		if(!empty($fields) && is_array($fields)){
			foreach($fields as $field){
				$this->values[] = JHTML::_('select.option',
$field->field_namekey, $field->field_realname);
			}
		}
	}

	function display($map,$value, $fields='',
$option='size="1" ',$id=null, $sort=false){
		$this->load($fields,$id, $sort);
		return JHTML::_('select.genericlist', $this->values, $map,
'class="inputbox" '.$option, 'value',
'text', $value, $id );
	}

}
PKA�[Fq�022
published.phpnu�[���<?php
/**
 * @package	HikaShop for Joomla!
 * @version	2.2.3
 * @author	hikashop.com
 * @copyright	(C) 2010-2013 HIKARI SOFTWARE. All rights reserved.
 * @license	GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 */
defined('_JEXEC') or die('Restricted access');
?><?php
class hikashopPublishedType{
	function load(){
		$this->values = array();
		$this->values[] = JHTML::_('select.option',
0,JText::_('HIKA_ALL'));
		$this->values[] = JHTML::_('select.option',
2,JText::_('HIKA_PUBLISHED'));
		$this->values[] = JHTML::_('select.option',
1,JText::_('HIKA_UNPUBLISHED'));
	}
	function display($map,$value){
		$this->load();
		return JHTML::_('select.genericlist',   $this->values, $map,
'class="inputbox" size="1"
onchange="document.adminForm.submit( );"',
'value', 'text', (int)$value );
	}
}
PKA�[�~��quantity.phpnu�[���<?php
/**
 * @package    HikaMarket for Joomla!
 * @version    3.1.1
 * @author     Obsidev S.A.R.L.
 * @copyright  (C) 2011-2020 OBSIDEV. All rights reserved.
 * @license    GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 */
defined('_JEXEC') or die('Restricted access');
?><?php
class hikamarketQuantityType {
	public function display($map, $value) {
		$attribs = '';
		$label = '';
		$id =
str_replace(array('][','[',']'),array('__','_',''),
$map);

		return '<div class="hk-input-group
hkm_quantity_input">'.
			'<input type="text"
name="'.$map.'" id="'.$id.'"
value="'.$value.'" class="hk-form-control"
'.$attribs.'/>'.
			'<div class="hk-input-group-append">'.
				'<button class="hikabtn"
onclick="document.getElementById(\''.$id.'\').value=\''.JText::_('UNLIMITED',
true).'\';return false;"><i class="fas
fa-infinity"></i></button>'.
			'</div>'.
		'</div>';
	}
}
PKA�[��M\\quantitydisplay.phpnu�[���<?php
/**
 * @package	HikaShop for Joomla!
 * @version	4.4.1
 * @author	hikashop.com
 * @copyright	(C) 2010-2021 HIKARI SOFTWARE. All rights reserved.
 * @license	GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 */
defined('_JEXEC') or die('Restricted access');
?><?php
class hikashopQuantitydisplayType {
	var $default = array(
		'show_none',
		'show_default',
		'show_regrouped',
		'show_select',
		'show_select_price',
		'show_simple',
		'show_leftright',
		'show_simplified',
		'show_html5',
		'show_default_div'
	);

	function load(){
		$this->values = array();
		if(!HIKASHOP_J40) {
			if(hikaInput::get()->getCmd('from_display',false) ==
false)
				$this->values[] = JHTML::_('select.option', '',
JText::_('HIKA_INHERIT'));
			$this->values[] = JHTML::_('select.optgroup', '--
'.JText::_('FROM_HIKASHOP').' --');
			foreach($this->default as $d) {
				$this->values[] = JHTML::_('select.option', $d,
JText::_(strtoupper($d)));
			}
			$this->values[] = JHTML::_('select.optgroup', '--
'.JText::_('FROM_HIKASHOP').' --');

			$closeOpt = '';
			$values = $this->getLayout();
			foreach($values as $value) {
				if(substr($value,0,1) == '#') {
					if(!empty($closeOpt)){
						$this->values[] = JHTML::_('select.optgroup',
$closeOpt);
					}
					$value = substr($value,1);
					$closeOpt = '-- ' .
JText::sprintf('FROM_TEMPLATE',basename($value)) . '
--';
					$this->values[] = JHTML::_('select.optgroup',
$closeOpt);
				} else {
					$this->values[] = JHTML::_('select.option', $value,
$value);
				}
			}
			if(!empty($closeOpt)){
				$this->values[] = JHTML::_('select.optgroup', $closeOpt);
			}
			return;
		}
		if(hikaInput::get()->getCmd('from_display',false) == false)
			$this->values[''] = array('items' => array(
JHTML::_('select.option', '',
JText::_('HIKA_INHERIT'))) );
		$this->values['core'] = array(
			'text' => '--
'.JText::_('FROM_HIKASHOP').' --',
			'items' => array()
		);
		foreach($this->default as $d) {
			$this->values['core']['items'][] =
JHTML::_('select.option', $d, JText::_(strtoupper($d)));
		}
		$tmpl_name = '';
		$values = $this->getLayout();
		foreach($values as $value) {
			if(substr($value,0,1) == '#') {
				$value = substr($value,1);
				$tmpl_name = basename($value);
				$this->values[$tmpl_name] = array(
					'text' => '-- ' .
JText::sprintf('FROM_TEMPLATE',$tmpl_name) . ' --',
					'items' => array()
				);
			} else {
				$this->values[$tmpl_name]['items'][] =
JHTML::_('select.option', $value, $value);
			}
		}
	}

	function display($map,$value) {
		$this->load();

		if(!HIKASHOP_J40)
			return JHTML::_('select.genericlist', $this->values, $map,
'class="custom-select" size="1"',
'value', 'text', $value );
		return JHTML::_('select.groupedlist', $this->values, $map,
array('list.attr'=>'class="custom-select"',
'group.id' => 'id', 'list.select' =>
array($value)) );
	}

	function getLayout($template = '') {
		jimport('joomla.filesystem.folder');
		jimport('joomla.filesystem.file');
		static $values = null;
		if($values !== null)
			return $values;
		$client	= JApplicationHelper::getClientInfo(0); // 0: Front client
		$tplDir = $client->path.DS.'templates'.DS;
		$values = array();
		if(empty($template)) {
			$templates = JFolder::folders($tplDir);
			if(empty($templates))
				return null;
		} else {
			$templates = array($template);
		}
		$groupAdded = false;
		foreach($templates as $tpl) {
			$t = $tplDir.$tpl.DS.'html'.DS.HIKASHOP_COMPONENT.DS;
			if(!JFolder::exists($t))
				continue;
			$folders = JFolder::folders($t);
			if(empty($folders))
				continue;
			foreach($folders as $folder) {
				$files = JFolder::files($t.$folder.DS);
				if(empty($files))
					continue;
				foreach($files as $file) {
					if(substr($file,-4) == '.php')
						$file = substr($file,0,-4);
					if(substr($file,0,14) == 'show_quantity_' &&
!in_array($file,$this->default)) {
						if(!$groupAdded) {
							$values[] = '#'.$tpl;
							$groupAdded = true;
						}
						$values[] = $file;
					}
				}
			}
		}
		return $values;
	}

	function check($name, $template = null) {
		if($template === null) {
			$app = JFactory::getApplication();
			$template = $app->getTemplate();
		}

		if($name == '' || in_array($name, $this->default))
			return true;
		$values = $this->getLayout($template);
		return in_array($name,$values);
	}
}
?>
PKA�[S�q-JJ	radio.phpnu�[���<?php
/**
 * @package	HikaShop for Joomla!
 * @version	4.4.1
 * @author	hikashop.com
 * @copyright	(C) 2010-2021 HIKARI SOFTWARE. All rights reserved.
 * @license	GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 */
defined('_JEXEC') or die('Restricted access');
?><?php
class hikashopRadioType {
	static $event = false;

	protected function init() {
		if(self::$event)
			return true;

		self::$event = true;

		if(!HIKASHOP_J30) {
			hikashop_loadJslib('jquery');
		} else {
			JHtml::_('jquery.framework');
		}

		$doc = JFactory::getDocument();
		$doc->addScriptDeclaration('
setTimeout(function(){ 
    (function($){
    if(!window.hikashopLocal) window.hikashopLocal = {};
    window.hikashopLocal.radioEvent = function(el) {
    	var id = $(el).attr("id"), c =
$(el).attr("class"), lbl = $("label[for=\"" + id +
"\"]"), v = $(el).val(), target =
$(el).parent().find("label[data-default=\"1\"]");
    	if(v == "-1")
    		target.addClass("btn-default");
    	else
    		target.removeClass("btn-default");
    	if(c !== undefined && c.length > 0)
    		lbl.addClass(c);
    	lbl.addClass("active");
    	$("input[name=\"" + $(el).attr("name") +
"\"]").each(function() {
    		if($(this).attr("id") != id) {
    			c = $(this).attr("class");
    			lbl = $("label[for=\"" + $(this).attr("id")
+ "\"]");
    			if(c !== undefined && c.length > 0)
    				lbl.removeClass(c);
    			lbl.removeClass("active");
    		}
    	});
    }
    $(document).ready(function() {
    	$(".hikaradios .btn-group label").off("click");
    });
    })(jQuery);
}, 200);
');
	}

	public function booleanlist($name, $attribs = null, $selected = null, $yes
= 'JYES', $no = 'JNO', $id = false) {
		$arr = array(
			JHtml::_('select.option', '1', JText::_($yes)),
			JHtml::_('select.option', '0', JText::_($no))
		);
		$arr[0]->booleanlist = true;
		$arr[0]->class = 'hikabtn-success';

		$arr[1]->booleanlist = true;
		$arr[1]->class = 'hikabtn-danger';

		return $this->radiolist($arr, $name, $attribs, 'value',
'text', (int)$selected, $id);
	}

	public function radiolist($data, $name, $attribs = null, $optKey =
'value', $optText = 'text', $selected = null, $idtag =
false, $translate = false, $vertical = false, $default = '') {
		reset($data);
		$app = JFactory::getApplication();

		$this->init();

		$yes_text = JText::_('JYES');
		$no_text = JText::_('JNO');
		foreach($data as &$obj) {
			if(!empty($obj->class))
				continue;

			$obj->class = 'hikabtn-primary';
			if(($translate && $obj->$optText == 'JYES') ||
(!$translate && $obj->$optText == $yes_text))
				$obj->class = 'hikabtn-success';
			if(($translate && $obj->$optText == 'JNO') ||
(!$translate && $obj->$optText == $no_text))
				$obj->class = 'hikabtn-danger';
		}
		unset($obj);

		if(is_array($attribs))	{
			$attribs = array_map('strval', $attribs);
		}

		$id_text =
str_replace(array('[',']'),array('_',''),$idtag
? $idtag : $name);

		$backend = false &&
hikashop_isClient('administrator');
		$htmlLabels = '';
		$html = '<div class="hikaradios"
id="'.$id_text.'">';

		foreach ($data as $obj) {
			$k = $obj->$optKey;
			$t = $translate ? JText::_($obj->$optText) : $obj->$optText;
			$class = isset($obj->class) ? $obj->class : '';
			$sel = false;
			$extra = $attribs;
			$currId = $id_text . $k;
			if(isset($obj->id))
				$currId = $obj->id;

			if (is_array($selected)) {
				foreach ($selected as $val) {
					$k2 = is_object($val) ? $val->$optKey : $val;
					if ($k == $k2) {
						$extra .= ' selected="selected"';
						$sel = true;
						break;
					}
				}
			} elseif((string) $k == (string) $selected) {
				$extra .= ' checked="checked"';
				$sel = true;
			}

			$extra = ' '.$extra;
			if(strpos($extra, ' style="') !== false) {
				$extra = str_replace(' style="', '
style="display:none;', $extra);
			} elseif(strpos($extra, 'style=\'') !== false) {
				$extra = str_replace(' style=\'', '
style=\'display:none;', $extra);
			} else {
				$extra .= ' style="display:none;"';
			}
			if(strpos($extra, ' onchange="') !== false) {
				$extra = str_replace(' onchange="', '
onchange="hikashopLocal.radioEvent(this);', $extra);
			} elseif(strpos($extra, 'onchange=\'') !== false) {
				$extra = str_replace(' onchange=\'', '
onchange=\'hikashopLocal.radioEvent(this);', $extra);
			} else {
				$extra .= '
onchange="hikashopLocal.radioEvent(this);"';
			}
			if(!empty($obj->class)) {
				if(strpos($extra, 'class="') === false)
					$extra .= '
class="'.$obj->class.'"';
				else
					$extra = str_replace('class="',
'class="'.$obj->class.' ', $extra);
			}
			$html .= "\n\t" . '<input type="radio"
name="' . $name . '"' . ' id="' .
$currId . '" value="' . $k . '"' .
' ' . trim($extra) . '/>';

			$dataDefault = '0';
			$addClass = '';
			if(isset($obj->default) && $obj->default) {
				$dataDefault = '1';
				$addClass = 'hikabtn-default-lbl';
				if($selected == '-1')
					$addClass .= ' hikabtn-default';
			}

			$htmlLabels .= '<label for="' . $currId .
'"' . '
data-default="'.$dataDefault.'" class="hikabtn
'.$addClass.($sel ? ' active '.$class : '')
.'">' . $t . '</label>';
		}

		$html .= "\r\n" . '<div
class="hikabtn-group'. ($vertical?'
hikabtn-group-vertical':'').'"
data-toggle="">' . $htmlLabels . "\r\n" .
'</div>';
		$html .= "\r\n" . '</div>' . "\r\n";
		return $html;
	}
}
PKA�[�z�	�		rates.phpnu�[���<?php
/**
 * @package    HikaMarket for Joomla!
 * @version    3.1.1
 * @author     Obsidev S.A.R.L.
 * @copyright  (C) 2011-2020 OBSIDEV. All rights reserved.
 * @license    GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 */
defined('_JEXEC') or die('Restricted access');
?><?php
class hikamarketRatesType {
	protected $values = array();

	private function load() {
		$this->values = array(
			'none' => JHTML::_('select.option', '',
JText::_('HIKA_NONE'))
		);
		$this->values['none']->rate = 0.0;
		$this->values['none']->extra =
'data-rate="0.0"';

		$query = 'SELECT * FROM ' .
hikamarket::table('shop.tax');
		$db = JFactory::getDBO();
		$db->setQuery($query);
		$this->results = $db->loadObjectList();

		foreach($this->results as $result) {
			$this->values[$result->tax_namekey] =
JHTML::_('select.option', $result->tax_namekey,
$result->tax_namekey . ' (' . round($result->tax_rate *
100.0, 2) . '%)');
			$this->values[$result->tax_namekey]->rate =
(float)hikamarket::toFloat($result->tax_rate);
			$this->values[$result->tax_namekey]->extra =
'data-rate="'.$this->values[$result->tax_namekey]->rate.'"';
		}
	}

	public function display($map, $value, $rate = 0.0, $options =
'', $id = false) {
		if(empty($this->values))
			$this->load();

		$values = $this->values;
		$rate = (float)hikamarket::toFloat($rate);

		if($rate != 0.0 || (!empty($value) && !isset($values[$value])))
{
			$f = 0;
			foreach($values as $k => $v) {
				if($v->rate == $rate || ($v->rate - $rate <= 0.00001))
					$f++;
			}

			if(empty($f) || ($rate > 0.0 && empty($value) && $f
> 1) || (!empty($value) && !isset($values[$value]) &&
$rate > 0.0)) {
				$values[':'.$rate] = JHTML::_('select.option',
':'.$rate, JText::_('CUSTOM_RATE').' -
'.round($rate * 100.0, 2).'%');
				$values[':'.$rate]->rate = $rate;
				$values[':'.$rate]->extra =
'data-rate="'.$values[':'.$rate]->rate.'"';

				if(empty($value))
					$value = ':'.$rate;

			} else if($rate > 0.0 && empty($value) && $f == 1) {
				foreach($values as $k => $v) {
					if($v->rate == $rate) {
						$value = $k;
						break;
					}
				}
			}
		}

		if(empty($id))
			$id = false;

		$opt = array(
			'id' => $id,
			'list.attr' => $options,
			'list.translate' => false,
			'option.key' => 'value',
			'option.text' => 'text',
			'list.select' => $value,
			'option.attr' => 'extra',
		);
		return JHTML::_('select.genericlist', $values, $map, $opt);
	}
}
PKA�[�$�~~
region.phpnu�[���<?php
/**
 * @package	HikaShop for Joomla!
 * @version	2.2.3
 * @author	hikashop.com
 * @copyright	(C) 2010-2013 HIKARI SOFTWARE. All rights reserved.
 * @license	GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 */
defined('_JEXEC') or die('Restricted access');
?><?php
class hikashopRegionType{
	function load(){
		$this->values = array();
		$this->values[] = JHTML::_('select.option',
'world',JText::_('HIKA_ALL') );
		$this->values[] = JHTML::_('select.option',
'005',JText::_('SOUTH_AMERICA'));
		$this->values[] = JHTML::_('select.option',
'013',JText::_('CENTRAL_AMERICA'));
		$this->values[] = JHTML::_('select.option',
'021',JText::_('NORTH_AMERICA'));
		$this->values[] = JHTML::_('select.option',
'002',JText::_('AFRICA'));
		$this->values[] = JHTML::_('select.option',
'017',JText::_('CENTRAL_AFRICA'));
		$this->values[] = JHTML::_('select.option',
'015',JText::_('NORTHERN_AFRICA'));
		$this->values[] = JHTML::_('select.option',
'018',JText::_('SOUTHERN_AFRICA'));
		$this->values[] = JHTML::_('select.option',
'030',JText::_('EASTERN_ASIA'));
		$this->values[] = JHTML::_('select.option',
'034',JText::_('SOUTHERN_ASIA'));
		$this->values[] = JHTML::_('select.option',
'035',JText::_('ASIA_AND_PACIFIC'));
		$this->values[] = JHTML::_('select.option',
'143',JText::_('CENTRAL_ASIA'));
		$this->values[] = JHTML::_('select.option',
'145',JText::_('MIDDLE_EAST'));
		$this->values[] = JHTML::_('select.option',
'151',JText::_('NORTHERN_ASIA'));
		$this->values[] = JHTML::_('select.option',
'154',JText::_('NORTHERN_EUROPE'));
		$this->values[] = JHTML::_('select.option',
'155',JText::_('WESTERN_EUROPE'));
		$this->values[] = JHTML::_('select.option',
'039',JText::_('SOUTHERN_EUROPE'));
	}
	function display($map,$value){
		$this->load();
		return JHTML::_('select.genericlist',   $this->values, $map,
'class="inputbox" size="1"',
'value', 'text', $value );
	}
}
PKA�[���΁�registration.phpnu�[���<?php
/**
 * @package	HikaShop for Joomla!
 * @version	2.2.3
 * @author	hikashop.com
 * @copyright	(C) 2010-2013 HIKARI SOFTWARE. All rights reserved.
 * @license	GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 */
defined('_JEXEC') or die('Restricted access');
?><?php
class hikashopRegistrationType{
	function load(){
		$this->values = array();
		$this->values[] = JHTML::_('select.option',
0,JText::_('HIKA_REGISTRATION') );
		$this->values[] = JHTML::_('select.option',
1,JText::_('SIMPLIFIED_REGISTRATION'));
		$this->values[] = JHTML::_('select.option',
3,JText::_('SIMPLIFIED_REGISTRATION_WITH_PASSWORD'));
		$this->values[] = JHTML::_('select.option',
2,JText::_('NO_REGISTRATION'));
	}
	function display($map,$value){
		$this->load();
		return JHTML::_('select.radiolist',   $this->values, $map,
'class="inputbox" size="1"',
'value', 'text', (int)$value );
	}
}
PKA�[��tz��
search.phpnu�[���<?php
/**
 * @package    HikaMarket for Joomla!
 * @version    3.1.1
 * @author     Obsidev S.A.R.L.
 * @copyright  (C) 2011-2020 OBSIDEV. All rights reserved.
 * @license    GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 */
defined('_JEXEC') or die('Restricted access');
?><?php
class hikamarketSearchType {
	public function display($map, $value, $options = array()) {
		$app = JFactory::getApplication();
		if($app->isAdmin()) {
			return HIKASHOP_BACK_RESPONSIVE ? $this->displayBootstrap($map,
$value, $options) : $this->displayClassic($map, $value, $options);
		}
		return $this->displayClassic($map, $value, $options);
	}

	public function displayBootstrap($map, $value, $options = array()) {
		$id = isset($options['id']) ? $options['id'] : $map;

		return '
	<div class="input-prepend input-append">
		<span class="add-on"><i
class="icon-filter"></i></span>
		<input type="text" name="'.$map.'"
id="'.$id.'"
value="'.$this->escape($value).'"
class="text_area"
placeholder="'.JText::_('HIKA_SEARCH').'"/>
		<button class="btn"
onclick="if(this.form.limitstart){this.form.limitstart.value=0;}this.form.submit();"><i
class="icon-search"></i></button>
		<button class="btn"
onclick="if(this.form.limitstart){this.form.limitstart.value=0;}document.getElementById(\''.$id.'\').value=\'\';this.form.submit();"><i
class="icon-remove"></i></button>
	</div>';
	}

	public function displayClassic($map, $value, $options = array()) {
		$id = isset($options['id']) ? $options['id'] : $map;

		return '
	<div class="hikamarket_search_block">
		<input type="text" name="'.$map.'"
id="'.$id.'"
value="'.$this->escape($value).'"
class="text_area"
placeholder="'.JText::_('HIKA_SEARCH').'"/>
		<button class="hikabtn"
onclick="if(this.form.limitstart){this.form.limitstart.value=0;}this.form.submit();">'.JText::_('GO').'</button>
		<button class="hikabtn"
onclick="if(this.form.limitstart){this.form.limitstart.value=0;}document.getElementById(\''.$id.'\').value=\'\';this.form.submit();">'.JText::_('RESET').'</button>
	</div>
';
	}

	protected function escape($value) {
		return htmlspecialchars($value, ENT_COMPAT, 'UTF-8');
	}
}
PKA�[':m_
select.phpnu�[���<?php
/**
 * @package	HikaShop for Joomla!
 * @version	2.2.3
 * @author	hikashop.com
 * @copyright	(C) 2010-2013 HIKARI SOFTWARE. All rights reserved.
 * @license	GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 */
defined('_JEXEC') or die('Restricted access');
?><?php
class hikashopSelectType{
	function load(){
		$this->values = array();
		$this->values[] = JHTML::_('select.option',
0,JText::_('HIKASHOP_NO'));
		$this->values[] = JHTML::_('select.option',
2,JText::_('HIKASHOP_YES'));
		$this->values[] = JHTML::_('select.option',
1,JText::_('IF_ONLY_ONE_METHOD_AVAILABLE'));
	}
	function display($map,$value){
		$this->load();
		return JHTML::_('select.genericlist',   $this->values, $map,
'class="inputbox" size="1"',
'value', 'text', (int)$value );
	}
}
PKA�[��Ѻ��signpos.phpnu�[���<?php
/**
 * @package	HikaShop for Joomla!
 * @version	2.2.3
 * @author	hikashop.com
 * @copyright	(C) 2010-2013 HIKARI SOFTWARE. All rights reserved.
 * @license	GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 */
defined('_JEXEC') or die('Restricted access');
?><?php
class hikashopSignposType{
	function load(){
		$this->values = array();
		$this->values[] = JHTML::_('select.option', 0,'0
'.JText::_('PARENTHESIS_AROUND') );
		$this->values[] = JHTML::_('select.option', 1,'1
'.JText::_('SIGN_BEFORE'));
		$this->values[] = JHTML::_('select.option', 2,'2
'.JText::_('SIGN_AFTER'));
		$this->values[] = JHTML::_('select.option', 3,'3
'.JText::_('SIGN_BEFORE_SYMBOL'));
		$this->values[] = JHTML::_('select.option', 4,'4
'.JText::_('SIGN_AFTER_SYMBOL'));
	}
	function display($map,$value){
		$this->load();
		return JHTML::_('select.genericlist',   $this->values, $map,
'class="inputbox" size="1"',
'value', 'text', (int)$value );
	}
}
PKA�[n���slide_pagination.phpnu�[���<?php
/**
 * @package	HikaShop for Joomla!
 * @version	2.2.3
 * @author	hikashop.com
 * @copyright	(C) 2010-2013 HIKARI SOFTWARE. All rights reserved.
 * @license	GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 */
defined('_JEXEC') or die('Restricted access');
?><?php
defined('_JEXEC') or die('Restricted access');
?>
<?php
class hikashopSlide_paginationType{
	function load(){
		$this->values = array();
		$this->values[] = JHTML::_('select.option',
'no_pagination',JText::_('HIKASHOP_NO'));
		$this->values[] = JHTML::_('select.option',
'numbers',JText::_('NUMBERS'));
		$this->values[] = JHTML::_('select.option',
'thumbnails',JText::_('THUMBNAILS'));
		$this->values[] = JHTML::_('select.option',
'names',JText::_('HIKA_NAME'));
		$this->values[] = JHTML::_('select.option',
'rounds',JText::_('DOTS'));
	}
	function display($map,$value, $options=''){
		$this->load();
		return JHTML::_('select.genericlist',   $this->values, $map,
'class="inputbox" size="1" '.$options,
'value', 'text', $value );
	}
}
PKB�[�ȻT::subscription.phpnu�[���<?php
/**
 * @package	HikaShop for Joomla!
 * @version	2.2.3
 * @author	hikashop.com
 * @copyright	(C) 2010-2013 HIKARI SOFTWARE. All rights reserved.
 * @license	GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 */
defined('_JEXEC') or die('Restricted access');
?><?php

class hikashopSubscriptionType{
	function hikashopSubscriptionType(){
		if (!HIKASHOP_PHP5) {
			$acl =& JFactory::getACL();
		}else{
			$acl = JFactory::getACL();
		}
		if(!HIKASHOP_J16){
			$this->groups = $acl->get_group_children_tree( null,
'USERS', false );
		}else{
			$db = JFactory::getDBO();
			$db->setQuery('SELECT a.*, a.title as text, a.id as value  FROM
#__usergroups AS a ORDER BY a.lft ASC');
			$this->groups = $db->loadObjectList('id');
			foreach($this->groups as $id => $group){
				if(isset($this->groups[$group->parent_id])){
					$this->groups[$id]->level =
intval(@$this->groups[$group->parent_id]->level) + 1;
					$this->groups[$id]->text = str_repeat('- -
',$this->groups[$id]->level).$this->groups[$id]->text;
				}
			}
		}
		$this->choice = array();
		$this->choice[] =
JHTML::_('select.option','none',JText::_('HIKA_NONE'));
		$this->choice[] =
JHTML::_('select.option','special',JText::_('HIKA_CUSTOM'));

		$js = "function updateSubscription(map){
			choice = document.adminForm['choice_'+map];
			choiceValue = 'special';
			for (var i=0; i < choice.length; i++){
				if (choice[i].checked){
					choiceValue = choice[i].value;
				}
			}

			hiddenVar = document.getElementById('hidden_'+map);
			if(choiceValue != 'special'){
				hiddenVar.value = choiceValue;
				if(hiddenVar.value == 'none') hiddenVar.value =
'';
				document.getElementById('div_'+map).style.display =
'none';
			}else{
				document.getElementById('div_'+map).style.display =
'';
				specialVar = eval('document.adminForm.special_'+map);
				finalValue = '';
				for (var i=0; i < specialVar.length; i++){
					if (specialVar[i].checked){
						finalValue += specialVar[i].value;
					}
				}
				hiddenVar.value = finalValue;
			}
		}";

		if (!HIKASHOP_PHP5) {
			$doc =& JFactory::getDocument();
		}else{
			$doc = JFactory::getDocument();
		}
		$doc->addScriptDeclaration( $js );

	}

	function display($map,$values,$type='discount'){
		$js ='window.addEvent(\'domready\', function(){
updateSubscription(\''.$map.'\'); });';
		if (!HIKASHOP_PHP5) {
			$doc =& JFactory::getDocument();
		}else{
			$doc = JFactory::getDocument();
		}
		$doc->addScriptDeclaration( $js );
		if(empty($values)) $values = 'none';

		$choiceValue = ($values == 'none') ?  $values :
'special';
		$return = JHTML::_('hikaselect.radiolist',   $this->choice,
"choice_".$map,
'onchange="updateSubscription(\''.$map.'\');"',
'value', 'text',$choiceValue);
		$return .= '<input type="hidden"
name="data['.$type.']['.$map.']"
id="hidden_'.$map.'"
value="'.$values.'"/>';
		$valuesArray = explode(',',$values);
		$listAccess = '<div style="display:none"
id="div_'.$map.'"><table>';
		foreach($this->groups as $oneGroup){
			$listAccess .= '<tr><td>';
			if(version_compare(JVERSION,'1.6.0','>=') ||
!in_array($oneGroup->value,array(29,30))) $listAccess .= '<input
type="radio"
onchange="updateSubscription(\''.$map.'\');"
value="'.$oneGroup->value.'"
'.(in_array($oneGroup->value,$valuesArray) ? 'checked' :
'').' name="special_'.$map.'"
id="special_'.$map.'_'.$oneGroup->value.'"/>';
			$listAccess .= '</td><td><label
for="special_'.$map.'_'.$oneGroup->value.'">'.$oneGroup->text.'</label></td></tr>';
		}
		$listAccess .= '</table></div>';
		$return .= $listAccess;
		return $return;
	}
}
PKB�[q?$��	table.phpnu�[���<?php
/**
 * @package	HikaShop for Joomla!
 * @version	2.2.3
 * @author	hikashop.com
 * @copyright	(C) 2010-2013 HIKARI SOFTWARE. All rights reserved.
 * @license	GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 */
defined('_JEXEC') or die('Restricted access');
?><?php
class hikashopTableType {
	var $externalValues = null;

	function load($form=false) {
		$this->values = array();
		if(!$form) {
			$this->values[] = JHTML::_('select.option', '',
JText::_('HIKA_ALL') );
		}

		$this->values[] = JHTML::_('select.option',
'address', JText::_('ADDRESS'));
		if(hikashop_level(1)){
			$this->values[] = JHTML::_('select.option',
'user', JText::_('HIKA_USER') );
			$this->values[] = JHTML::_('select.option',
'product', JText::_('PRODUCT'));
			$this->values[] = JHTML::_('select.option',
'category', JText::_('CATEGORY'));
			if(hikashop_level(2)){
				$this->values[] = JHTML::_('select.option',
'order', JText::_('HIKASHOP_ORDER'));
				$this->values[] = JHTML::_('select.option',
'item', JText::_('HIKASHOP_ITEM'));
				$this->values[] = JHTML::_('select.option',
'entry', JText::_('HIKASHOP_ENTRY'));
			}

			if($this->externalValues == null) {
				$this->externalValues = array();
				JPluginHelper::importPlugin('hikashop');
				$dispatcher = JDispatcher::getInstance();
				$dispatcher->trigger('onTableFieldsLoad', array(
&$this->externalValues ) );
				foreach($this->externalValues as $externalValue) {
					if(!empty($externalValue->table) &&
substr($externalValue->value, 0, 4) != 'plg.')
						$externalValue->value = 'plg.' .
$externalValue->value;
					$this->values[] = JHTML::_('select.option',
$externalValue->value, $externalValue->text);
				}
			}
		}
	}
	function display($map, $value, $form=false, $optionsArg=''){
		$this->load($form);
		$options ='class="inputbox" size="1"';
		if(!$form){
			$options.='
onchange="document.adminForm.submit();"';
		}
		return JHTML::_('select.genericlist', $this->values, $map,
$options.$optionsArg, 'value', 'text', $value);
	}
}
PKB�[�d1  tax.phpnu�[���<?php
/**
 * @package	HikaShop for Joomla!
 * @version	2.2.3
 * @author	hikashop.com
 * @copyright	(C) 2010-2013 HIKARI SOFTWARE. All rights reserved.
 * @license	GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 */
defined('_JEXEC') or die('Restricted access');
?><?php
class hikashopTaxType{
	function load($form){
		$this->values = array();
		$this->values[] = JHTML::_('select.option',
'',JText::_('ALL_CUSTOMER_TYPES'));
		$this->values[] = JHTML::_('select.option',
'individual',JText::_('INDIVIDUAL'));
		$this->values[] = JHTML::_('select.option',
'company_without_vat_number',JText::_('COMPANY_WITHOUT_VAT_NUMBER'));
		$this->values[] = JHTML::_('select.option',
'company_with_vat_number',JText::_('COMPANY_WITH_VAT_NUMBER'));
	}
	function display($map,$value,$form=true){
		$this->load($form);
		$options = 'class="inputbox" size="1"';
		if(!$form){
			$options .='
onchange="document.adminForm.submit();"';
		}
		return JHTML::_('select.genericlist',   $this->values, $map,
$options, 'value', 'text', $value );
	}
}
PKB�[�JX��tax_zone.phpnu�[���<?php
/**
 * @package	HikaShop for Joomla!
 * @version	2.2.3
 * @author	hikashop.com
 * @copyright	(C) 2010-2013 HIKARI SOFTWARE. All rights reserved.
 * @license	GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 */
defined('_JEXEC') or die('Restricted access');
?><?php
class hikashopTax_zoneType{
	function load(){
		$this->values = array();
		$this->values[] = JHTML::_('select.option',
'billing',JText::_('BILLING'));
		$this->values[] = JHTML::_('select.option',
'shipping',JText::_('SHIPPING'));
	}
	function display($map,$value){
		$this->load();
		return JHTML::_('select.genericlist',   $this->values, $map,
'class="inputbox" size="1"',
'value', 'text', $value );
	}
}
PKB�[#O�?//template.phpnu�[���<?php
/**
 * @package	HikaShop for Joomla!
 * @version	2.2.3
 * @author	hikashop.com
 * @copyright	(C) 2010-2013 HIKARI SOFTWARE. All rights reserved.
 * @license	GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 */
defined('_JEXEC') or die('Restricted access');
?><?php
class hikashopTemplateType{
	function load($templates){
		$this->values = array();
		$this->values[] = JHTML::_('select.option',
'',JText::_('ALL_TEMPLATES'));
		foreach($templates as $template){
			$this->values[] = JHTML::_('select.option',
$template,$template);
		}
	}
	function display($map,$value,$templates){
		$this->load($templates);
		return JHTML::_('select.genericlist',   $this->values, $map,
'class="inputbox" size="1"
onchange="document.adminForm.submit();return false;"',
'value', 'text', $value );
	}
}
PKB�[�Nj���transition_effect.phpnu�[���<?php
/**
 * @package	HikaShop for Joomla!
 * @version	2.2.3
 * @author	hikashop.com
 * @copyright	(C) 2010-2013 HIKARI SOFTWARE. All rights reserved.
 * @license	GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 */
defined('_JEXEC') or die('Restricted access');
?><?php
defined('_JEXEC') or die('Restricted access');
?>
<?php
class hikashopTransition_effectType{
	function load(){
		$this->values = array();
		$this->values[] = JHTML::_('select.option',
'linear',JText::_('LINEAR'));
		$this->values[] = JHTML::_('select.option',
'bounce',JText::_('BOUNCE'));
		$this->values[] = JHTML::_('select.option',
'elastic',JText::_('ELASTIC'));
		$this->values[] = JHTML::_('select.option',
'sin',JText::_('SINUSOIDAL'));
		$this->values[] = JHTML::_('select.option',
'quad',JText::_('QUADRATIC'));
		$this->values[] = JHTML::_('select.option',
'expo',JText::_('EXPONENTIAL'));
		$this->values[] = JHTML::_('select.option',
'back',JText::_('HIKA_BACK'));
	}
	function display($map,$value){
		$this->load();
		return JHTML::_('select.genericlist',   $this->values, $map,
'class="inputbox" size="1"',
'value', 'text', $value );
	}
}
PKB�[�>�eeuploader.phpnu�[���<?php
/**
 * @package    HikaMarket for Joomla!
 * @version    3.1.1
 * @author     Obsidev S.A.R.L.
 * @copyright  (C) 2011-2020 OBSIDEV. All rights reserved.
 * @license    GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 */
defined('_JEXEC') or die('Restricted access');
?><?php
class HikaMarketUploaderType {

	protected static $init = false;

	public function __construct() {
		$this->popup = hikamarket::get('shop.helper.popup');
	}

	protected function initialize() {
		if(self::$init === true)
			return;

		hikamarket::loadJslib('jquery');
		hikamarket::loadJslib('jquery-upload');
		hikamarket::loadJslib('hkuploader');

		self::$init = true;
	}

	private function processOptions(&$options) {
		$t = hikamarket::getFormToken();

		if(!empty($options['uploader'])) {
			$params = '';
			if(!empty($options['vars'])) {
				$options['formData'] = $options['vars'];
				$options['formData'][$t] = 1;
				foreach($options['vars'] as $k => $v) {
					$params .= '&' . urlencode($k) . '=' .
urlencode($v);
				}
			}

			if(!empty($options['upload'])) {
				$options['uploadUrls'] = array(
					0 =>
hikamarket::completeLink('upload&task=image&uploader='.$options['uploader'][0].'&field='.$options['uploader'][1].$params.'&'.$t.'=1',true),
					1 =>
hikamarket::completeLink('upload&task=upload&upload=image&uploader='.$options['uploader'][0].'&field='.$options['uploader'][1],
true, false, true)
				);
			}

			if(!empty($options['gallery'])) {
				$options['browseUrl'] =
hikamarket::completeLink('upload&task=galleryimage&uploader='.$options['uploader'][0].'&field='.$options['uploader'][1].$params,true);
			}
		}
		if(empty($options['classes'])) {
			$options['classes'] = array(
				'mainDiv' => 'hikamarket_main_image_div'
			);
		}
		if(!isset($options['classes']['mainDiv']))
			$options['classes']['mainDiv'] = '';
		if(!isset($options['classes']['firstImg']))
			$options['classes']['firstImg'] =
'hikamarket_upload_imagethumb_main';
		if(!isset($options['classes']['otherImg']))
			$options['classes']['otherImg'] =
'hikamarket_upload_imagethumb_small';
		if(!isset($options['classes']['contentClass']))
			$options['classes']['contentClass'] = '';

		if(empty($options['uploadUrls']))
			$options['uploadUrls'] = null;
		if(empty($options['browseUrl']))
			$options['browseUrl'] = null;
		if(empty($options['text']))
			$options['text'] = '';
		if(!empty($options['formData'])) {
			if(!is_string($options['formData']))
				$options['formData'] =
json_encode($options['formData']);
		} else {
			$options['formData'] =
'{\''.$t.'\':1}';
		}
	}

	public function displayImageSingle($id, $content = '', $options
= array()) {
		$this->initialize();
		$this->processOptions($options);

		$ret = '
<div id="'.$id.'_main"
class="hikamarket_dropzone">
	<div
class="'.$options['classes']['mainDiv'].'">
		<div class="hikamarket_uploader_image_add
'.$id.'_add">';

		if(!empty($options['uploadUrls'])) {
			$ret .= $this->popup->display(
				'<span
class="hikam_upload_btn"></span>',
				'MARKET_UPLOAD_IMAGE',
				$options['uploadUrls'][0],
				$id.'_uploadpopup',
				750, 460, ' onclick="return
window.hkUploaderList[\''.$id.'\'].uploadFile(this);"',
'', 'link'
			);
		}

		if(!empty($options['browseUrl'])) {
			$ret .= $this->popup->display(
				'<span class="hikam_add_btn"></span>',
				'MARKET_ADD_IMAGE',
				$options['browseUrl'],
				$id.'_addpopup',
				750, 460, ' onclick="return
window.hkUploaderList[\''.$id.'\'].browseImage(this);"',
'', 'link'
			);
		}

		$ret .= '
		</div>
		<div id="'.$id.'_content"
class="hikamarket_uploader_singleimage_content">' .
$content . '</div>
		<div id="'.$id.'_empty"
class="hikamarket_uploader_image_empty"
style="'.(!empty($content) ? 'display:none;' :
'') . '">
			<span>'.$options['text'].'</span>
		</div>
	</div>
</div>';
		if(!empty($options['uploadUrls'])) {
			$ret .= '
<input id="'.$id.'" type="file"/>
<div id="'.$id.'_list"></div>
';
		}

		$js = '';
		if(!empty($options['uploadUrls'])) {
			$js .= "\r\n" . 'var hkUploader_'.$id.' = new
hkUploaderMgr("'.$id.'", {mode: \'single\',
url:\''.$options['uploadUrls'][1].'\',formData:'.$options['formData'].'})';
		}

		$doc = JFactory::getDocument();
		if(!empty($js))
			$doc->addScriptDeclaration("\r\n".'hkjQuery(document).ready(function($){'.$js."\r\n".'});');

		return $ret;
	}

	public function displayImageMultiple($id, $content = array(), $options =
array()) {
		$this->initialize();
		$this->processOptions($options);

		$ret = '
<div id="'.$id.'_main"
class="hikamarket_dropzone">
	<div
class="'.$options['classes']['mainDiv'].'">
		<div class="hikamarket_uploader_image_add
'.$id.'_add">';

		if(!empty($options['uploadUrls'])) {
			$ret .= $this->popup->display(
				'<span
class="hikam_upload_btn"></span>',
				'MARKET_UPLOAD_IMAGE',
				$options['uploadUrls'][0],
				$id.'_uploadpopup',
				750, 460, ' onclick="return
window.hkUploaderList[\''.$id.'\'].uploadFile(this);"',
'', 'link'
			);
		}

		if(!empty($options['browseUrl'])) {
			$ret .= $this->popup->display(
				'<span class="hikam_add_btn"></span>',
				'MARKET_ADD_IMAGE',
				$options['browseUrl'],
				$id.'_addpopup',
				750, 460, ' onclick="return
window.hkUploaderList[\''.$id.'\'].browseImage(this);"',
'', 'link'
			);
		}

		$contentHtml = '';
		if(!empty($content)) {
			if(is_string($content)) {
				$contentHtml = $content;
			} else {
				foreach($content as $k => $c) {
					$liClass = ($k == 0) ?
$options['classes']['firstImg'] :
$options['classes']['otherImg'];
					$contentHtml .= '<li
class="'.$liClass.'">'.$c.'</li>';
				}
			}
		}

		$ret .= '
		</div>
		<ul id="'.$id.'_content"
class="hikamarket_uploader_multiimage_content hkContent
'.$options['classes']['contentClass'].'">'
. $contentHtml . '</ul>
		<div id="'.$id.'_empty"
class="hikamarket_uploader_image_empty"
style="'.(!empty($content) ? 'display:none;' :
'') . '">
			<span>'.$options['text'].'</span>
		</div>
	</div>
</div>';
		if(!empty($options['uploadUrls'])) {
			$ret .= '
<input id="'.$id.'" type="file"
multiple/>
<div id="'.$id.'_list"></div>
';
		}

		$js = '';
		if(!empty($options['uploadUrls'])) {
			$js .= "\r\n" . 'var hkUploader_'.$id.' = new
hkUploaderMgr("'.$id.'", {mode: \'listImg\',
url:\''.$options['uploadUrls'][1].'\',
formData:'.$options['formData'].', options: {
imgClasses:[\''.$options['classes']['firstImg'].'\',\''.$options['classes']['otherImg'].'\']}
})';
		}

		$doc = JFactory::getDocument();
		if(!empty($js))
			$doc->addScriptDeclaration("\r\n".'hkjQuery(document).ready(function($){'.$js."\r\n".'});');

		return $ret;
	}
}
PKB�[���user.phpnu�[���<?php
/**
 * @package	HikaShop for Joomla!
 * @version	2.2.3
 * @author	hikashop.com
 * @copyright	(C) 2010-2013 HIKARI SOFTWARE. All rights reserved.
 * @license	GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 */
defined('_JEXEC') or die('Restricted access');
?><?php
class hikashopUserType{
	function load($value){
		$this->values = array();
		$query = 'SELECT user_id,user_email FROM
'.hikashop_table('user');
		$db = JFactory::getDBO();
		$db->setQuery($query);
		$users = $db->loadObjectList('user_id');
		if(!empty($users)){
			foreach($users as $user){
				$this->values[] = JHTML::_('select.option',
(int)$user->user_id, $user->user_email. ' '
.$user->user_id );
			}
		}
	}
	function display($map,$value,$options=''){
		if(empty($this->values)){
			$this->load($value);
		}
		return JHTML::_('hikaselect.genericlist',   $this->values,
$map, 'class="inputbox" size="1" '.$options,
'value', 'text', (int)$value );
	}
}
PKB�[�m�..user_partner.phpnu�[���<?php
/**
 * @package	HikaShop for Joomla!
 * @version	2.2.3
 * @author	hikashop.com
 * @copyright	(C) 2010-2013 HIKARI SOFTWARE. All rights reserved.
 * @license	GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 */
defined('_JEXEC') or die('Restricted access');
?><?php
class hikashopUser_partnerType{
	function load(){
		$this->values = array();
		$this->values[] = JHTML::_('select.option', 0,
JText::_('HIKA_ALL') );
		$this->values[] = JHTML::_('select.option', 1,
JText::_('PARTNERS_ONLY'));
		$this->values[] = JHTML::_('select.option', 2,
JText::_('CUSTOMERS_ONLY'));
	}
	function display($map,$value){
		$this->load();
		return JHTML::_('select.genericlist', $this->values, $map,
'class="inputbox" size="1"
onchange="document.adminForm.submit();"', 'value',
'text', $value );
	}
}
PKB�[`NDvat.phpnu�[���<?php
/**
 * @package	HikaShop for Joomla!
 * @version	2.2.3
 * @author	hikashop.com
 * @copyright	(C) 2010-2013 HIKARI SOFTWARE. All rights reserved.
 * @license	GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 */
defined('_JEXEC') or die('Restricted access');
?><?php
class hikashopVatType{
	function load(){
		$this->values = array();
		$this->values[] = JHTML::_('select.option',
0,JText::_('NO_VAT_CHECK'));
		$this->values[] = JHTML::_('select.option',
1,JText::_('FORMAT_CHECK'));
		$this->values[] = JHTML::_('select.option',
2,JText::_('ONLINE_CHECK'));
	}
	function display($map,$value){
		$this->load();
		return JHTML::_('select.genericlist',   $this->values, $map,
'class="inputbox" size="1"',
'value', 'text', (int)$value );
	}
}
PKB�[�m��::view.phpnu�[���<?php
/**
 * @package	HikaShop for Joomla!
 * @version	2.2.3
 * @author	hikashop.com
 * @copyright	(C) 2010-2013 HIKARI SOFTWARE. All rights reserved.
 * @license	GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 */
defined('_JEXEC') or die('Restricted access');
?><?php
class hikashopViewType{
	function load(){
		$this->values = array();
		$this->values[] = JHTML::_('select.option',
2,JText::_('FRONT_END_AND_BACK_END'));
		$this->values[] = JHTML::_('select.option',
0,JText::_('FRONT_END'));
		$this->values[] = JHTML::_('select.option',
1,JText::_('BACK_END'));
	}
	function display($map,$value){
		$this->load();
		return JHTML::_('select.genericlist',   $this->values, $map,
'class="inputbox" size="1"
onchange="document.adminForm.submit();return false;"',
'value', 'text', (int)$value );
	}
}
PKB�[�bR���
volume.phpnu�[���<?php
/**
 * @package	HikaShop for Joomla!
 * @version	2.2.3
 * @author	hikashop.com
 * @copyright	(C) 2010-2013 HIKARI SOFTWARE. All rights reserved.
 * @license	GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 */
defined('_JEXEC') or die('Restricted access');
?><?php
class hikashopVolumeType{

	function display($map,
$volume_unit,$type='dimension',$id=''){
		$config =& hikashop_config();
		$symbols =
explode(',',$config->get('volume_symbols','m,cm'));

		if(empty($volume_unit)){
			$volume_unit = $symbols[0];
		}
		$this->values = array();

		if(!in_array($volume_unit,$symbols)){
			$text = JText::_($volume_unit);
			if($type!='dimension') $text.='&sup3;';
			$this->values[] = JHTML::_('select.option',
$volume_unit,$text);
		}

		foreach($symbols as $symbol){
			$text = JText::_($symbol);
			if($type!='dimension') $text.='&sup3;';
			$this->values[] = JHTML::_('select.option',
$symbol,$text);
		}

		if(!empty($id)){
			return JHTML::_('select.genericlist', $this->values, $map,
'class="inputbox volumeselect" size="1"',
'value', 'text', $volume_unit,$id);
		}else{
			return JHTML::_('select.genericlist', $this->values, $map,
'class="inputbox volumeselect" size="1"',
'value', 'text', $volume_unit);
		}
	}
}
PKB�[�7[���vote.phpnu�[���<?php
/**
 * @package	HikaShop for Joomla!
 * @version	4.4.1
 * @author	hikashop.com
 * @copyright	(C) 2010-2021 HIKARI SOFTWARE. All rights reserved.
 * @license	GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 */
defined('_JEXEC') or die('Restricted access');
?><?php
class hikashopVoteType{

	var $values = array();

	function load() {
		$this->values['product'] = 
JHTML::_('select.option', 'product',
JText::_('PRODUCT'));
	}

	function display($map, $value, $extra = '') {
		if(empty($this->values))
			$this->load();
		$values = $this->values;
		return JHTML::_('select.genericlist', $values, $map, $extra,
'value', 'text', $value);
	}
}
PKB�[�X�waitlist.phpnu�[���<?php
/**
 * @package	HikaShop for Joomla!
 * @version	2.2.3
 * @author	hikashop.com
 * @copyright	(C) 2010-2013 HIKARI SOFTWARE. All rights reserved.
 * @license	GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 */
defined('_JEXEC') or die('Restricted access');
?><?php
class hikashopWaitlistType{
	function load(){
		$this->values = array();

		$this->values[] = JHTML::_('select.option',
0,JText::_('HIKASHOP_NO'));
		$this->values[] = JHTML::_('select.option',
2,JText::_('FOR_ALL_PRODUCTS') );
		$this->values[] = JHTML::_('select.option',
1,JText::_('ON_A_PER_PRODUCT_BASIS'));
	}
	function display($map,$value){
		$this->load();
		return JHTML::_('select.genericlist',   $this->values, $map,
'class="inputbox" size="1"',
'value', 'text', (int)$value );
	}
}
PKB�[[D��MM
warehouse.phpnu�[���<?php
/**
 * @package	HikaShop for Joomla!
 * @version	4.4.1
 * @author	hikashop.com
 * @copyright	(C) 2010-2021 HIKARI SOFTWARE. All rights reserved.
 * @license	GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 */
defined('_JEXEC') or die('Restricted access');
?><?php
class hikashopWarehouseType{

	var $values = array();

	function __construct() {
		$this->app = JFactory::getApplication();
	}

	function load($value) {
		$this->values = array();
		$db = JFactory::getDBO();

		$query = 'SELECT COUNT(*) FROM
'.hikashop_table('warehouse').' WHERE
warehouse_published = 1';
		$db->setQuery($query);
		$ret = (int)$db->loadResult();
		if($ret > 10) {
			$this->values = $ret;
			return;
		}

		$query = 'SELECT * FROM
'.hikashop_table('warehouse').' WHERE
warehouse_published = 1';
		$db->setQuery($query);
		$warehouses = $db->loadObjectList();
		$this->values[] = JHTML::_('select.option', 0,
JText::_('NO_WAREHOUSE'));
		if(!empty($warehouses)){
			foreach($warehouses as $warehouse){
				if($warehouse->warehouse_id == 0 || $warehouse->warehouse_id ==
1)
					continue;
				$this->values[] = JHTML::_('select.option',
$warehouse->warehouse_id, $warehouse->warehouse_id.'
'.$warehouse->warehouse_name);
			}
		}
	}

	public function displayDropdown($map, $value, $delete = false, $options =
'', $id = '') {
		if(empty($this->values))
			$this->load($value);
		return JHTML::_('select.genericlist', $this->values, $map,
$options, 'value', 'text', $value, $id);
	}
	function display($map, $value, $delete = false) {
		$nameboxType = hikashop_get('type.namebox');
		return $nameboxType->display(
			$map,
			(int)$value,
			hikashopNameboxType::NAMEBOX_SINGLE,
			'warehouse',
			array(
				'delete' => $delete,
				'default_text' =>
'<em>'.JText::_('HIKA_NONE').'</em>',
			)
		);
		return $ret;
	}
}
PKB�[E�›bb
weight.phpnu�[���<?php
/**
 * @package	HikaShop for Joomla!
 * @version	2.2.3
 * @author	hikashop.com
 * @copyright	(C) 2010-2013 HIKARI SOFTWARE. All rights reserved.
 * @license	GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 */
defined('_JEXEC') or die('Restricted access');
?><?php
class hikashopWeightType{

	function display($map, $weight_unit,$id=''){
		$config =& hikashop_config();
		$symbols =
explode(',',$config->get('weight_symbols','kg,g'));
		if(empty($weight_unit)){
			$weight_unit = $symbols[0];
		}
		if(!in_array($weight_unit,$symbols)){
			$this->values[] = JHTML::_('select.option',
$weight_unit,JText::_($weight_unit) );
		}
		$this->values = array();
		foreach($symbols as $symbol){
			$this->values[] = JHTML::_('select.option',
$symbol,JText::_($symbol) );
		}
		if(!empty($id)){
			return JHTML::_('select.genericlist', $this->values, $map,
'class="inputbox weightselect" size="1"',
'value', 'text', $weight_unit, $id );
		}else{
			return JHTML::_('select.genericlist', $this->values, $map,
'class="inputbox weightselect" size="1"',
'value', 'text', $weight_unit );
		}
	}
}
PKB�[r(�]��widgetcontent.phpnu�[���<?php
/**
 * @package	HikaShop for Joomla!
 * @version	2.2.3
 * @author	hikashop.com
 * @copyright	(C) 2010-2013 HIKARI SOFTWARE. All rights reserved.
 * @license	GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 */
defined('_JEXEC') or die('Restricted access');
?><?php
class hikashopWidgetcontentType{
	function load(){
		$this->values = array();
		$this->values[] = JHTML::_('select.option',
'orders',JText::_('ORDERS'));
		$this->values[] = JHTML::_('select.option',
'sales',JText::_('SALES'));
		$this->values[] = JHTML::_('select.option',
'taxes',JText::_('TAXES'));
		$this->values[] = JHTML::_('select.option',
'customers',JText::_('CUSTOMERS'));
		if(hikashop_level(2)){
			$this->values[] = JHTML::_('select.option',
'partners',JText::_('PARTNERS'));
		}
	}
	function display($map,$value){
		$this->load();
		if(empty($value))$value='orders';
		$js="
		function switchPie(name,value){
			var elSel = document.getElementById(name);
			if(value=='orders' || value=='sales' ||
value=='taxes'){
			 var i;
			 var found=false;
			 for (i = elSel.length - 1; i>=0; i--) {
				if (elSel.options[i].value=='pie') {
					found=true;
				}
			 }
			 if(!found){
				 var elOptNew = document.createElement('option');
				 elOptNew.text =
'".JText::_('PIE',true)."';
				 elOptNew.value = 'pie';
				 var elSel = document.getElementById(name);
				 try {
					 elSel.add(elOptNew, null);
				 }
				 catch(ex) {
					 elSel.add(elOptNew);
				 }
			}
			}else{
			 var i;
			 for (i = elSel.length - 1; i>=0; i--) {
				if (elSel.options[i].value=='pie') {
					elSel.remove(i);
				}
			 }
			}
			switchDisplay(document.getElementById('widget_display').value,'widget_limit','listing',1);
		}
		function switchListing(name,value){
			var elSel = document.getElementById(name);
			if(value!='taxes'){
			 var i;
			 var found=false;
			 for (i = elSel.length - 1; i>=0; i--) {
				if (elSel.options[i].value=='listing') {
					found=true;
				}
			 }
			 if(!found){
				 var elOptNew = document.createElement('option');
				 elOptNew.text =
'".JText::_('LISTING',true)."';
				 elOptNew.value = 'listing';
				 var elSel = document.getElementById(name);
				 try {
					 elSel.add(elOptNew, null);
				 }
				 catch(ex) {
					 elSel.add(elOptNew);
				 }
			}
			}else{
			 var i;
			 for (i = elSel.length - 1; i>=0; i--) {
				if (elSel.options[i].value=='listing') {
					elSel.remove(i);
				}
			 }
			}
			switchDisplay(document.getElementById('widget_display').value,'widget_limit','listing',1);
		}
		function switchDate(value,name,activevalue1,activevalue2,inverse){
			var el = document.getElementById(name);
			if(el){
				if(inverse){
					var show = value==activevalue1 || value==activevalue2;
				}else{
					var show = value!=activevalue1 && value!=activevalue2;
				}
				if(show){
					el.style.display='';
				}else{
					el.style.display='none';
				}
			}
		}
		window.addEvent('domready', function(){
switchListing('widget_display','".$value."');
switchPie('widget_display','".$value."');
switchDate('".$value."','widget_date','partners','customers',0);
switchDate('".$value."','widget_status','partners','customers',0);});
		";
		$doc =& JFactory::getDocument();
		$doc->addScriptDeclaration($js);
		$options='
onchange="switchListing(\'widget_display\',this.value);
switchPie(\'widget_display\',this.value);switchDate(this.value,\'widget_date\',\'orders\',\'sales\',1);switchDate(this.value,\'widget_status\',\'orders\',\'sales\',1);"';
		return JHTML::_('hikaselect.genericlist',   $this->values,
$map, 'class="inputbox" size="1"'.$options,
'value', 'text', $value );
	}
}
PKB�[({H��widgetdisplay.phpnu�[���<?php
/**
 * @package	HikaShop for Joomla!
 * @version	2.2.3
 * @author	hikashop.com
 * @copyright	(C) 2010-2013 HIKARI SOFTWARE. All rights reserved.
 * @license	GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 */
defined('_JEXEC') or die('Restricted access');
?><?php
class hikashopWidgetdisplayType{
	function load(){
		$this->values = array();
		$this->values[] = JHTML::_('select.option',
'gauge',JText::_('GAUGE'));
		$this->values[] = JHTML::_('select.option',
'graph',JText::_('GRAPH'));
		$this->values[] = JHTML::_('select.option',
'listing',JText::_('LISTING'));
		if(hikashop_level(2)){
			$this->values[] = JHTML::_('select.option',
'map',JText::_('MAP'));
		}
		$this->values[] = JHTML::_('select.option',
'pie',JText::_('PIE'));
	}
	function display($map,$value){
		$this->load();

		if(empty($value))$value='gauge';
		$js = "
		function switchDisplay(value,name,activevalue,inverse){
			var el = document.getElementById(name);
			if(el){
				if(inverse){
					var show = value==activevalue;
				}else{
					var show = value!=activevalue;
				}
				if(show){
					el.style.display='';
				}else{
					el.style.display='none';
				}
			}
		}
		function switchDate(value,name,activevalue1,activevalue2,inverse){
			var el = document.getElementById(name);
			if(el){
				if(inverse){
					var show = value==activevalue1 || value==activevalue2;
				}else{
					var show = value!=activevalue1 && value!=activevalue2;
				}
				if(show){
					el.style.display='';
				}else{
					el.style.display='none';
				}
			}
		}
		window.addEvent('domready', function(){
switchDisplay('".$value."','widget_region','map',1);
switchDisplay('".$value."','widget_limit','listing',1);
switchDate('".$value."','widget_group','graph','gauge',1);});
";
		$doc =& JFactory::getDocument();
		$doc->addScriptDeclaration($js);
		$options='
onchange="switchDisplay(this.value,\'widget_region\',\'map\',1);
switchDisplay(this.value,\'widget_limit\',\'listing\',1);
switchDate(this.value,\'widget_group\',\'graph\',\'gauge\',1);"';
		return JHTML::_('hikaselect.genericlist',   $this->values,
$map, 'class="inputbox" size="1"'.$options,
'value', 'text', $value,'widget_display' );
	}
}
PKB�[�b)ܵ�widget_data.phpnu�[���<?php
/**
 * @package	HikaShop for Joomla!
 * @version	2.2.3
 * @author	hikashop.com
 * @copyright	(C) 2010-2013 HIKARI SOFTWARE. All rights reserved.
 * @license	GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 */
defined('_JEXEC') or die('Restricted access');
?><?php
class hikashopwidget_dataType{
	function load(){
		$this->values = array();
		$this->values[] = JHTML::_('select.option',
'gauge',JText::_('GAUGE'));
		$this->values[] = JHTML::_('select.option',
'graph',JText::_('GRAPH'));
		$this->values[] = JHTML::_('select.option',
'column',JText::_('COLUMN'));
		$this->values[] = JHTML::_('select.option',
'line',JText::_('LINE'));
		$this->values[] = JHTML::_('select.option',
'area',JText::_('AREA'));
		$this->values[] = JHTML::_('select.option',
'pie',JText::_('PIE'));
		$this->values[] = JHTML::_('select.option',
'map',JText::_('MAP'));
		$this->values[] = JHTML::_('select.option',
'listing',JText::_('LISTING'));
		$this->values[] = JHTML::_('select.option',
'table',JText::_('TABLE'));
	}

	function display($map,$value, $option = '', $id, $widget_id =
null, $row_id = null, $widget_display = null){
		$this->load();

		$js = "
function updateDisplay(){
	var d = document, oldType = displayType, values = new
Array('gauge', 'column', 'graph',
'line', 'pie', 'area', 'map',
'listing', 'table');
	for(var i=0; i < values.length; i++){
		var newType =
d.getElementById('widget_display_'+values[i]).checked;
		if(newType){
			displayType =
d.getElementById('widget_display_'+values[i]).value;
		}
	}
	if(displayType=='table'){
		d.getElementById('widget_type').style.display='none';
		if(d.getElementById('widget_options'))d.getElementById('widget_options').style.display='none';
		d.getElementById('widget_date').style.display='none';
		d.getElementById('widget_group').style.display='none';
		d.getElementById('widget_period').style.display='none';
		d.getElementById('products_options').style.display='none';
		d.getElementById('filters').style.display='none';
		d.getElementById('customers_options').style.display='none';
		d.getElementById('partners_options').style.display='none';
		d.getElementById('orders_options').style.display='none';
		d.getElementById('product_datas').style.display='none';
		d.getElementById('widget_compare').style.display='none';
		d.getElementById('widget_limit').style.display='none';
		d.getElementById('map_options').style.display='none';
	}else{
		var 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');
		var hide = new
Array('type_listing_discounts','orders_options',
'widget_region','products_options','customers_options','partners_options','type_listing_prod','type_listing_cat','map_options');

		for(var i = 0; i < show.length; i++ ) {
			var e = d.getElementById(show[i]);
			if(e) {
				e.style.display = '';
			} else {
			}
		}
		for(var i = 0; i < hide.length; i++ ) {
			var e = d.getElementById(hide[i]);
			if(e) {
				e.style.display = 'none';
			} else {
			}
		}

		if(displayType=='map'){
			updateDisplayType();
		}
		if(displayType=='listing'){
			d.getElementById('type_listing_prod').style.display='';
			d.getElementById('type_listing_cat').style.display='';
			d.getElementById('type_listing_discounts').style.display='';
			d.getElementById('type_listing_sales').style.display='none';
			d.getElementById('type_listing_taxes').style.display='none';
			d.getElementById('widget_compare').style.display='none';
			updateDisplayType();
		}
		if(displayType=='gauge' || displayType=='pie' ||
displayType=='map'){
			d.getElementById('widget_compare').style.display='none';
			d.getElementById('widget_limit').style.display='none';
		}
		if(displayType=='listing' || displayType=='pie' ||
displayType=='map'){
			d.getElementById('widget_group').style.display='none';
		}
		if(displayType=='map'){
			d.getElementById('widget_region').style.display='';
		}
		if(displayType=='pie'){
			d.getElementById('partners_button').style.display='none';
			d.getElementById('customers_button').style.display='none';
		}
		updateDisplayType();
	}
}

function displayTablePopup(){
	var d = document, values = new Array('gauge',
'column', 'graph', 'line', 'pie',
'area', 'map', 'listing',
'table');
	for(var i=0; i<values.length; i++){
		newType =
d.getElementById('widget_display_'+values[i]).checked;
		if(newType==true){
			displayType =
d.getElementById('widget_display_'+values[i]).value;
		}
	}

	widget_display='".$widget_display."';
	if(displayType!='table' || widget_display=='table'){
return 0; }
	d.getElementById('widget_display_'+widget_display).checked=true;
	updateDisplay();
	hikashop.openBox('table_popup_link','".hikashop_completeLink('report&task=tableform&widget_id='.$widget_id.'&row_id='.$row_id.'&first=true',true,
true )."');
}

window.addEvent('domready', 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.'_' );
	}
}
PKB�[wEP^��zone.phpnu�[���<?php
/**
 * @package	HikaShop for Joomla!
 * @version	2.2.3
 * @author	hikashop.com
 * @copyright	(C) 2010-2013 HIKARI SOFTWARE. All rights reserved.
 * @license	GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 */
defined('_JEXEC') or die('Restricted access');
?><?php
class hikashopZoneType{
	function load($form=false){
		$this->values = array();
		if(!$form){
			$this->values[] = JHTML::_('select.option', '',
JText::_('ALL_ZONES') );
		}
		$this->values[] = JHTML::_('select.option',
'country',JText::_('COUNTRIES'));
		$this->values[] = JHTML::_('select.option',
'state',JText::_('STATES'));
		$this->values[] = JHTML::_('select.option',
'tax',JText::_('TAX_ZONES'));
		$this->values[] = JHTML::_('select.option',
'ship',JText::_('SHIP_ZONES'));
		$this->values[] = JHTML::_('select.option',
'discount',JText::_('DISCOUNT_ZONES'));
		$this->values[] = JHTML::_('select.option',
'payment',JText::_('PAYMENT_ZONES'));
	}
	function display($map,$value,$form=false){
		$this->load($form);
		$dynamic = ($form ? '' :
'onchange="document.adminForm.submit( );"');
		return JHTML::_('select.genericlist',   $this->values, $map,
'class="inputbox" size="1"'. $dynamic,
'value', 'text', $value );
	}
}
PK��[���11dropdown.phpnu�[���<?php
/**
 * @package    HikaMarket for Joomla!
 * @version    3.1.1
 * @author     Obsidev S.A.R.L.
 * @copyright  (C) 2011-2020 OBSIDEV. All rights reserved.
 * @license    GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 */
defined('_JEXEC') or die('Restricted access');
?><?php
class hikamarketDropdownType {

	public function __construct() {
		$this->app = JFactory::getApplication();
	}

	protected function getPlugins() {
		static $plugins = null;
		if($plugins !== null)
			return $plugins;
		$plugins = array();
		JPluginHelper::importPlugin('hikashop');
		JPluginHelper::importPlugin('hikamarket');
		JFactory::getApplication()->triggerEvent('onHkInterfaceDropdownList',
array( &$plugins ));
		return $plugins;
	}

	public function display($name, $data, $options = array()) {
	}

	public function displayBootstrap($name, $data, $options = array()) {
		$styles = '';
		$btnClasses = '';
		$name = '';
		$elements = array();

		if(!empty($btnClasses))
			$btnClasses = ' ' . trim($btnClasses);

		foreach($data as $d) {
			if($d == '-') {
				$elements[] = '<li
class="divider"></li>';
				continue;
			}
			$elements[] = '<li><a
href=""></a></li>';
		}

		return '<div class="btn-group"
style="'.$styles.'">' .
			'<button style="margin:0px;"
class="dropdown-toggle btn'.$btnClasses.'"
data-toggle="dropdown">' . $name . ' <span
class="caret"></span></button>'.
			'<ul
class="dropdown-menu">'.implode('',
$elements).'</ul>'.
			'</div>';
	}

	public function displayInternal($name, $data, $options = array()) {
	}
}
PK��[S�ssfilter_vendor.phpnu�[���<?php
/**
 * @package    HikaMarket for Joomla!
 * @version    3.1.1
 * @author     Obsidev S.A.R.L.
 * @copyright  (C) 2011-2020 OBSIDEV. All rights reserved.
 * @license    GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 */
defined('_JEXEC') or die('Restricted access');
?><?php
class hikamarketFilter_vendorType {

	protected $values = array();

	public function __construct() {
		$this->app = JFactory::getApplication();
	}

	protected function load($value) {
		$this->values = array();
		$db = JFactory::getDBO();

		$query = 'SELECT COUNT(*) FROM
'.hikamarket::table('vendor').' WHERE vendor_published
= 1';
		$db->setQuery($query);
		$ret = (int)$db->loadResult();
		if($ret > 15) {
			$this->values = $ret;
			return;
		}

		$query = 'SELECT * FROM
'.hikamarket::table('vendor').' WHERE vendor_published
= 1 ORDER BY vendor_name, vendor_id';
		$db->setQuery($query);
		$vendors = $db->loadObjectList();
		$this->values = array(
			JHTML::_('select.option', 0,
JText::_('ALL_VENDORS')),
			JHTML::_('select.option', 1,
JText::_('HIKAM_MY_VENDOR')),
		);
		if(!empty($vendors)) {
			foreach($vendors as $vendor) {
				if($vendor->vendor_id == 0 || $vendor->vendor_id == 1)
					continue;
				$this->values[] = JHTML::_('select.option',
$vendor->vendor_id, $vendor->vendor_name . ' [' .
$vendor->vendor_id . ']');
			}
		}
	}

	protected function initJs() {
		static $jsInit = null;
		if($jsInit === true)
			return;

		$vendor_format = 'data.vendor_name';
		if($this->app->isAdmin())
			$vendor_format = 'data.id + " - " +
data.vendor_name';

		$js = '
if(!window.localPage)
	window.localPage = {};
window.localPage.filterChooseVendor = function(el, name) {
	window.hikamarket.submitFct = function(data) {
		var d = document,
			vendorInput = d.getElementById(name + "_input_id"),
			vendorSpan = d.getElementById(name + "_span_id");
		if(vendorInput) { vendorInput.value = data.id; }
		if(vendorSpan) { vendorSpan.innerHTML = '.$vendor_format.'; }
		if(d.adminForm)
			d.adminForm.submit();
		else {
			var f = d.getElementById("adminForm");
			if(!f) f = d.getElementById("hikamarketForm");
			if(!f && el.form) f = el.form;
			if(f) f.submit();
		}
	};
	window.hikamarket.openBox(el,null,(el.getAttribute("rel") ==
null));
	return false;
};
window.localPage.filterSetVendor = function(el, name, value) {
	var d = document,
		vendorInput = d.getElementById(name + "_input_id"),
		vendorSpan = d.getElementById(name + "_span_id");
	if(vendorInput) { vendorInput.value = value; }
	if(vendorSpan) {
		if(value == 0)
			vendorSpan.innerHTML = "'.JText::_('NO_VENDOR',
true).'";
		else
			vendorSpan.innerHTML = "'.JText::_('ALL_VENDORS',
true).'";
	}
	if(d.adminForm)
		d.adminForm.submit();
	else {
		var f = d.getElementById("adminForm");
		if(!f) f = d.getElementById("hikamarketForm");
		if(!f && el.form) f = el.form;
		if(f) f.submit();
	}
};
';
		$doc = JFactory::getDocument();
		$doc->addScriptDeclaration($js);

		$jsInit = true;
	}

	public function display($map, $value, $invoicemap = '',
$invoicevalue = 0) {
		if(empty($this->values))
			$this->load($value);
		if(is_array($this->values)) {
			$ret = JHTML::_('select.genericlist', $this->values, $map,
'class="inputbox" size="1"
data-search-reset="-1"
onchange="document.adminForm.submit();"', 'value',
'text', $value);
		} else {
			$uuid = str_replace(array('][','[',']'),
'_', $map);
			$nameboxType = hikamarket::get('type.namebox');
			$ret = '<div
style="display:inline-block;min-width:240px;vertical-align:top;">'.
				$nameboxType->display(
					$map,
					(int)$value,
					hikamarketNameboxType::NAMEBOX_SINGLE,
					'vendor',
					array(
						'delete' => true,
						'id' => $uuid,
						'default_text' =>
'<em>'.JText::_('HIKA_NONE').'</em>'
					)
				) .
				'<script>
window.Oby.ready(function(){
window.oNameboxes["'.$uuid.'"].register("set",
function(e){
document.getElementById("'.$uuid.'_text").form.submit();
}); });
</script>'.
				'</div>';
		}

		if($value > 1 && !empty($invoicemap)) {
			$choices = array(
				JHTML::_('select.option', 0,
JText::_('VENDOR_SALES')),
				JHTML::_('select.option', 1,
JText::_('VENDOR_INVOICES')),
			);
			$ret .= JHTML::_('select.genericlist', $choices, $invoicemap,
'class="inputbox" size="1"
onchange="document.adminForm.submit();"', 'value',
'text', $invoicevalue);
		}

		return $ret;
	}
}
PK��[�GΠP
P
itemlayout.phpnu�[���<?php
/**
 * @package    HikaMarket for Joomla!
 * @version    3.1.1
 * @author     Obsidev S.A.R.L.
 * @copyright  (C) 2011-2020 OBSIDEV. All rights reserved.
 * @license    GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 */
defined('_JEXEC') or die('Restricted access');
?><?php
class hikamarketItemlayoutType {

	protected $values = array();

	protected function loadFromCustom($hikamarketFiles, $template, $customDir,
$files) {
		if(!is_dir($customDir))
			return;

		$customFiles = JFolder::files($customDir);
		if (empty($customFiles))
			return;

		$files = array();
		foreach ($customFiles as $file) {
			$notHikaMarket = true;
			foreach($hikamarketFiles as $hikamarketfile) {
				if ($hikamarketfile == $file) {
					$notHikaMarket = false;
					break;
				}
			}
			if($notHikaMarket)
				$files[] = $file;
		}
		if(!empty($files)) {
			$files = array_keys(array_flip($files));
			$this->loadValues('-- ' .
JText::sprintf('FROM_TEMPLATE', basename($template)) . '
--', $files);
		}
	}

	protected function loadFromTemplates($hikamarketFiles) {
		$files = array();
		$templates = JFolder::folders(JPATH_SITE . DS . 'templates',
'.', false, true);
		if(empty($templates))
			return;
		foreach($templates as $template) {
			$this->loadFromCustom($hikamarketFiles, $template, $template . DS .
'html' . DS . 'com_hikamarket' . DS .
'vendormarket', $files);
		}
	}

	protected function loadValues($optGroup, $files) {
		$this->values[] = JHTML::_('select.optgroup', $optGroup);
		foreach($files as $file){
			if(preg_match('#^listingcontent_(.*)\.php$#', $file, $match))
{
				$val = strtoupper($match[1]);
				$trans = JText::_($val);
				if($trans == $val)
					$trans = $match[1];
				$this->values[] = JHTML::_('select.option', $match[1],
$trans);
			}
		}
		$this->values[] = JHTML::_('select.optgroup', $optGroup);
		if(hikaInput::get()->getBool('inherit',true) == true)
			$this->values[] = JHTML::_('select.option',
'inherit', JText::_('HIKA_INHERIT'));
	}

	protected function load() {
		$this->values = array();
		jimport('joomla.filesystem.folder');
		$vendor_folder =
HIKAMARKET_FRONT.'views'.DS.'vendormarket'.DS.'tmpl'.DS;
		$files = JFolder::files($vendor_folder);
		$this->loadValues('--
'.JText::_('FROM_HIKAMARKET').' --', $files);
		$this->loadFromTemplates($files);
	}

	public function display($map, $value, &$js, $option = '') {
		if(empty($this->values))
			$this->load();
		$options = 'class="inputbox" size="1"
'.$option;
		return JHTML::_('select.genericlist', $this->values, $map,
$options, 'value', 'text', $value);
	}
}
PK��[�{�E�?�?market_acl.phpnu�[���<?php
/**
 * @package    HikaMarket for Joomla!
 * @version    3.1.1
 * @author     Obsidev S.A.R.L.
 * @copyright  (C) 2011-2020 OBSIDEV. All rights reserved.
 * @license    GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 */
defined('_JEXEC') or die('Restricted access');
?><?php
class hikamarketMarket_aclType {

	protected $acl = null;
	protected $cpt = 0;

	protected function load() {
		$this->acl = array(
			'order' => array(
				'add',
				'edit' => array(
					'general',
					'coupon',
					'shipping',
					'payment',
					'customfields',
					'customer',
					'billingaddress',
					'shippingaddress',
					'products',
					'vendor',
					'notify',
					'mail',
					'plugin' => array()
				),
				'export',
				'listing',
				'show' => array(
					'general',
					'customer',
					'customfields',
					'billingaddress',
					'shippingaddress ',
					'history',
					'vendors',
					'invoice',
					'shippinginvoice',
					'plugin' => array()
				),
				'notify',
				'request',
				'payments'
			),
			'product' => array(
				'add',
				'edit' => array(
					'name',
					'code',
					'published',
					'description',
					'category',
					'quantity',
					'price' => array(
						'value',
						'tax',
						'currency',
						'quantity',
						'acl',
						'user',
						'date'
					),
					'msrp',
					'tax',
					'saledates',
					'qtyperorder',
					'customfields',
					'related',
					'options',
					'bundles',
					'weight',
					'volume',
					'manufacturer',
					'pagetitle',
					'url',
					'metadescription',
					'keywords',
					'canonical',
					'alias',
					'acl',
					'translations',
					'vendor',
					'files' => array(
						'name',
						'limit',
						'free',
						'description',
						'upload',
						'delete'
					),
					'images' => array(
						'name',
						'title',
						'upload',
						'link',
						'delete'
					),
					'tags',
					'warehouse',
					'characteristics',
					'variants',
					'plugin' => array()
				),
				'new' => array(
					'name',
					'code',
					'published',
					'description',
					'category',
					'quantity',
					'price' => array(
						'value',
						'tax',
						'currency',
						'quantity',
						'acl',
						'user',
						'date'
					),
					'msrp',
					'tax',
					'saledates',
					'qtyperorder',
					'customfields',
					'related',
					'options',
					'bundles',
					'weight',
					'volume',
					'manufacturer',
					'pagetitle',
					'url',
					'metadescription',
					'keywords',
					'canonical',
					'alias',
					'acl',
					'translations',
					'vendor',
					'files' => array(
						'name',
						'limit',
						'free',
						'description',
						'upload',
						'delete'
					),
					'images' => array(
						'name',
						'title',
						'upload',
						'link',
						'delete'
					),
					'tags',
					'warehouse',
					'characteristics',
					'variants',
					'plugin' => array()
				),
				'variant' => array(
					'name',
					'code',
					'characteristics',
					'published',
					'description',
					'quantity',
					'price' => array(
						'value',
						'tax',
						'currency',
						'quantity',
						'acl',
						'user',
						'date'
					),
					'saledates',
					'qtyperorder',
					'customfields',
					'weight',
					'volume',
					'acl',
					'translations',
					'vendor',
					'files' => array(
						'name',
						'limit',
						'free',
						'description',
						'upload',
						'delete'
					),
					'images' => array(
						'name',
						'upload',
						'delete'
					),
					'plugin' => array()
				),
				'copy',
				'delete',
				'selection',
				'listing',
				'show',
				'approve',
				'sort',
				'subvendor'
			),
			'characteristic' => array(
				'add',
				'edit' => array(
					'value',
					'alias',
					'vendor'
				),
				'delete',
				'listing',
				'show',
				'values' => array(
					'add',
					'edit' => array(
						'value',
						'vendor'
					),
					'delete',
					'ordering'
				)
			),
			'category' => array(
				'add',
				'edit' => array(
					'name',
					'published',
					'parent',
					'customfields',
					'description',
					'metadescription',
					'pagetitle',
					'keywords',
					'alias',
					'acl',
					'translations',
					'images' => array(
						'upload',
						'delete'
					),
					'plugin' => array()
				),
				'delete',
				'listing',
				'show'
			),
			'user' => array(
				'edit' => array(
					'email',
					'customfields',
					'address'
				),
				'listing',
				'show' => array(
					'general',
					'address'
				)
			),
			'vendor' => array(
				'edit' => array(
					'name',
					'currency',
					'description',
					'terms',
					'paypalemail',
					'image',
					'location',
					'fields',
					'users',
					'plugin' => array()
				),
				'statistics'
			),
			'discount' => array(
				'add',
				'edit' => array(
					'code',
					'type',
					'flatamount',
					'percentamount',
					'taxcategory',
					'usedtimes',
					'published',
					'dates',
					'minorder',
					'minproducts',
					'quota',
					'peruser',
					'product',
					'category',
					'categorychild',
					'zone',
					'targetvendor',
					'user',
					'autoload',
					'percenttoproduct',
					'nodoubling',
					'acl',
					'plugin' => array()
				),
				'delete',
				'listing',
				'show'
			),
			'paymentplugin' => array(
				'add',
				'edit' => array(
					'name',
					'description',
					'published',
					'specific',
				),
				'delete',
				'listing',
			),
			'shippingplugin' => array(
				'add',
				'edit' => array(
					'name',
					'description',
					'published',
					'specific',
				),
				'delete',
				'listing',
			),
		);

		$tagsHelper = hikamarket::get('shop.helper.tags');
		if(empty($tagsHelper) || !$tagsHelper->isCompatible()) {
			$k = array_search('tags',
$this->acl['product']['edit']);
			if($k !== false)
				unset($this->acl['product']['edit'][$k]);
		}

		$paymentClass = hikamarket::get('class.payment');
		$fields = $paymentClass->loadConfigurationFields();
		foreach($fields['main'] as $k => $v) {
			$this->acl['paymentplugin']['edit'][] =
str_replace(array('params.payment_', 'payment_',
'_'), array('', '', '-'), $k);
		}
		if(!empty($fields['restriction'])) {
			$this->acl['paymentplugin']['edit']['restriction']
= array();
			foreach($fields['restriction'] as $k => $v) {
				$this->acl['paymentplugin']['edit']['restriction'][]
= str_replace(array('params.payment_', 'payment_',
'_'), array('', '', '-'), $k);
			}
		}

		$shippingClass = hikamarket::get('class.shipping');
		$fields = $shippingClass->loadConfigurationFields();
		foreach($fields['main'] as $k => $v) {
			$this->acl['shippingplugin']['edit'][] =
str_replace(array('params.shipping_', 'shipping_',
'_'), array('', '', '-'), $k);
		}
		if(!empty($fields['restriction'])) {
			$this->acl['shippingplugin']['edit']['restriction']
= array();
			foreach($fields['restriction'] as $k => $v) {
				$this->acl['shippingplugin']['edit']['restriction'][]
= str_replace(array('params.shipping_', 'shipping_',
'_'), array('', '', '-'), $k);
			}
		}

		$categories = array(
			'order' => array(),
			'product' => array(),
			'category' => array(),
			'vendor' => array(),
			'discount' => array(),
			'root' => array()
		);
		JPluginHelper::importPlugin('hikashop');
		JPluginHelper::importPlugin('hikamarket');
		JFactory::getApplication()->triggerEvent('onMarketAclPluginListing',
array(&$categories));

		foreach($categories as $name => $data) {
			if($name == 'root') {
				foreach($data as $k => $v) {
					if(!isset($this->acl[$k]))
						$this->acl[$k] = $v;
				}
				continue;
			}

			if(isset($this->acl[$name]) &&
isset($this->acl[$name]['edit']['plugin'])
&& !empty($data))
				$this->acl[$name]['edit']['plugin'] =
array_merge($this->acl[$name]['edit']['plugin'],
$data);

			if(empty($this->acl[$name]['edit']['plugin']))
				unset($this->acl[$name]['edit']['plugin']);

			if($name == 'order' &&
empty($this->acl[$name]['show']['plugin']))
				unset($this->acl[$name]['show']['plugin']);

			if($name == 'product') {
				if(isset($this->acl[$name]['variant']) &&
isset($this->acl[$name]['variant']['plugin'])
&& !empty($data))
					$this->acl[$name]['variant']['plugin'] =
array_merge($this->acl[$name]['variant']['plugin'],
$data);
				if(empty($this->acl[$name]['variant']['plugin']))
					unset($this->acl[$name]['variant']['plugin']);

				if(isset($this->acl[$name]) &&
isset($this->acl[$name]['new']['plugin']) &&
!empty($data))
					$this->acl[$name]['new']['plugin'] =
array_merge($this->acl[$name]['new']['plugin'],
$data);
				if(empty($this->acl[$name]['new']['plugin']))
					unset($this->acl[$name]['new']['plugin']);
			}
		}

		$this->cpt = 0;
		foreach($this->acl as $a) {
			$this->cpt++;
			if(is_array($a)) { foreach($a as $b) {
				$this->cpt++;
				if(is_array($b)) { foreach($b as $c) {
					$this->cpt++;
					if(is_array($c)) { foreach($c as $d) {
						$this->cpt++;
						if(is_array($d)) { $this->cpt += count($d); }
					}}
				}}
			}}
		}
	}

	public function getList() {
		if(empty($this->acl)) {
			$this->load();
		}
		return $this->acl;
	}

	public function compile($formData) {
		if(empty($this->acl)) {
			$this->load();
		}

		if(empty($formData))
			return '';

		$ret = array();
		$missing = false;

		foreach($this->acl as $groupKey => $groupAcls) {
			if(is_array($groupAcls)) {
				$subRet = array();
				$subRet = $this->subcompile($groupKey . '/', $formData,
$groupAcls);

				if($subRet !== true && count($subRet) == 0 &&
in_array($groupKey, $formData))
					$subRet = true;

				if($subRet === true) {
					$ret[] = $groupKey;
				} else {
					$ret = array_merge($ret, $subRet);
					$missing = true;
				}
			} else {
				if(in_array($groupAcls, $formData))
					$ret[] = $groupAcls;
				else
					$missing = true;
			}
		}

		if(!$missing)
			return '*';
		sort($ret, SORT_STRING);
		return implode(',', $ret);
	}

	public function subcompile($root, &$formData, &$data) {
		$all = true;
		$ret = array();

		foreach($data as $key => $acls) {
			if(is_array($acls)) {
				$name = $root . $key;
				$subRet = $this->subcompile($name. '/', $formData,
$acls);

				if($subRet !== true && count($subRet) == 0 &&
in_array($name, $formData))
					$subRet = true;

				if($subRet === true) {
					$ret[] = $name;
				} else {
					$all = false;
					$ret = array_merge($ret, $subRet);
				}
			} else {
				$name = $root.$acls;
				if(in_array($name, $formData))
					$ret[] = $name;
				else
					$all = false;
			}
		}
		if($all)
			return true;
		return $ret;
	}

	public function display($map, $value, $inherit = false) {
		hikamarket::loadJslib('otree');
		if(empty($this->acl)) {
			$this->load();
		}

		$id = str_replace(array('[',']','
'),'_',$map);
		$ret = '';
		$attribs = '';

		if($inherit !== false) {
			$ret .= '<label>' . JText::_('ACL_INHERIT') .
'</label> ' . JHTML::_('hikaselect.booleanlist',
$inherit, 'onchange="var el =
document.getElementById(\''.$id.'_otree\');if(this.value==\'0\'){el.style.display=\'\'}else{el.style.display=\'none\'}"',
empty($value));
			if(empty($value)) {
				$attribs = ' style="display:none;"';
				$value = '*';
			}
		}

		if($value != '*' && strpos($value, '/') ===
false) // ACL Compat
			$value = str_replace('_', '/', $value);

		$ret .= '<div id="'.$id.'_otree"
class="oTree"'.$attribs.'></div>
<input type="hidden" name="'.$map.'"
value="'.$value.'"
id="'.$id.'_values"/>
<script type="text/javascript">
var options = {rootImg:"'.HIKAMARKET_IMAGES.'otree/",
showLoading:false, useSelection:false, checkbox:"-",
tricheckbox:true};';

		$accesses = explode(',', trim(strtolower($value),
','));
		sort($accesses, SORT_STRING);

		$ret .= '
var data = ' . $this->getData($accesses) . ';
'.$id.' = new
window.oTree("'.$id.'",options,null,data,true);
'.$id.'.callbackCheck = function(treeObj, id, value) {
	var v = treeObj.getChk(), e =
document.getElementById("'.$id.'_values");
	if(v === false || v.length == 0) {
		e.value = "none";
	} else if( v.length > '.($this->cpt-1).') {
		e.value = "all";
	} else {
		e.value = v.join(",");
	}
};
</script>';

		return $ret;
	}

	public function displayButton($map, $values) {
		hikamarket::loadJslib('otree');
		hikamarket::loadJslib('jquery');
		$ret = '';
		if(empty($this->acl)) {
			$this->load();
		}
		$map = str_replace('"','',$map);

		if(empty($this->id)) {
			$this->id = 'hikamarket_marketacl';

			$ret .= '<script type="text/javascript">
var data_'.$this->id.' = ' . $this->getData($values) .
';
'.$this->id.' = null;
if(!window.aclMgr)
	window.aclMgr = {};
window.aclMgr.updateMarketAcl = function(el,id) {
	var d = document, tree =
d.getElementById("'.$this->id.'_otree"), e =
d.getElementById(id), values = e.value;
	if(!tree) {
		tree = d.createElement("div");
		tree.id = "'.$this->id.'_otree";
		tree.style.position = "absolute";
		tree.style.display = "none";
		tree.className = "oTree acl-popup-content";
		d.body.appendChild(tree);
		'.$this->id.' = new
window.oTree("'.$this->id.'",{rootImg:"'.HIKAMARKET_IMAGES.'otree/",
showLoading:false, useSelection:false,
checkbox:"'.$map.'",
tricheckbox:true},null,data_'.$this->id.',true);
	}
	switch(values) {
		case "all":
			treevalues = "*";
			break;
		case "none":
			treevalues = "";
			break;
		default:
			treevalues = values.split(",");
			break;
	}
	'.$this->id.'.callbackCheck = null;
	'.$this->id.'.chks(treevalues, null, false);
	var p = jQuery(el).offset();
	if(tree.style.display != "none" && tree.style.top !=
((p.top + el.offsetHeight) + "px")) {
		setTimeout(function(){
			window.aclMgr.updateMarketAcl(el,id);
		}, 100);
		return false;
	}
	tree.style.top = (p.top + el.offsetHeight + 5) + "px";
	tree.style.left = (p.left + el.offsetWidth - 200) + "px";

	var f = function(evt) {
		if (!evt) var evt = window.event;
		var trg = (window.event) ? evt.srcElement : evt.target;
		while(trg != null) {
			if(trg == tree || trg == el)
				return;
			trg = trg.parentNode;
		}
		tree.style.display = "none";
		window.Oby.removeEvent(document, "click", f);
	};
	window.Oby.addEvent(document, "click", f);

	'.$this->id.'.callbackCheck = function(treeObj, id, value) {
		var v = treeObj.getChk();
		if(v === false || v.length == 0) {
			e.value = "none";
		} else if( v.length > '.($this->cpt-1).') {
			e.value = "all";
		} else {
			e.value = v.join(",");
		}
	};

	tree.style.display = "";
	return false;
}
</script>';
		}

		$id =
str_replace(array('[',']'),array('_',''),$map);

		$ret .= '<a href="#" onclick="return
window.aclMgr.updateMarketAcl(this,
\''.$id.'\');">'.
			'<i class="fas fa-unlock-alt"></i>'.
			'</a><input type="hidden"
id="'.$id.'" name="'.$map.'"
value="'.$values.'" />';

		return $ret;
	}

	private function getAccess($action, $access) {
		$ret = hikamarket::aclTest($action, $access);
		if($ret === 1 || $ret === -1)
			$ret = 2;
		return $ret;
	}

	private function getData($accesses, $acls = null, $key = '') {
		$data = array();
		if($acls === null)
			$acls = $this->acl;
		foreach($acls as $groupKey => $groupAcls) {
			if(is_array($groupAcls)) {
				$status = 2;
				if(!empty($key))
					$status = 1;
				$subData = $this->getData($accesses, $groupAcls,
$key.$groupKey.'/');
				$data[] = array(
					'status' => $status,
					'name' => $groupKey,
					'value' => $key.$groupKey,
					'checked' => $this->getAccess($key.$groupKey,
$accesses),
					'data' => $subData
				);
			} else {
				$data[] = array(
					'status' => 0,
					'name' => $groupAcls,
					'value' => $key.$groupAcls,
					'checked' => $this->getAccess($key.$groupAcls,
$accesses)
				);
			}
		}

		if(empty($key))
			return json_encode($data);
		return $data;
	}
}
PK��[Z
�PPmenu_content.phpnu�[���<?php
/**
 * @package    HikaMarket for Joomla!
 * @version    3.1.1
 * @author     Obsidev S.A.R.L.
 * @copyright  (C) 2011-2020 OBSIDEV. All rights reserved.
 * @license    GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 */
defined('_JEXEC') or die('Restricted access');
?><?php
class hikamarketMenu_contentType {
	protected $values;

	public function __construct() {
		$this->values = array();
	}

	private function load() {
		$this->values = array(
			'vendor' => JHTML::_('select.option',
'vendor', JText::_('HIKA_VENDOR')),
		);
	}

	public function display($map, $value, &$js, $id = '',
$warning = false) {
		if(empty($this->values))
			$this->load();

		$options = '';
		if(!empty($id)) {
			if(empty($value))
				$value = 'vendor';

			$js .= "\r\n".
				'if(window.localPage.switchPanel)
window.localPage.switchPanel(\''.$id.'\',
"'.str_replace('"', '\\"',
$value).'", "content");'."\r\n";
			$options = 'onchange="if(window.localPage.switchPanel)
window.localPage.switchPanel(\''.$id.'\', this.value,
\'content\');"';
		}

		if(!isset($this->values[$value])) {
			$values = $this->values;
			$values[$value] = JHTML::_('select.option', $value, $value);
			$ret = '';
			if($warning)
				$ret .= JText::_('HIKAM_MENU_TYPE_NOT_SUPPORTED') .
'<br/>';
			return $ret . JHTML::_('select.genericlist', $values, $map,
'class="inputbox" size="1" ' . $options,
'value', 'text', $value, 'content_select');
		}

		return JHTML::_('select.genericlist', $this->values, $map,
'class="inputbox" size="1" ' . $options,
'value', 'text', $value, 'content_select');
	}
}
PK��[���١�menu_layout.phpnu�[���<?php
/**
 * @package    HikaMarket for Joomla!
 * @version    3.1.1
 * @author     Obsidev S.A.R.L.
 * @copyright  (C) 2011-2020 OBSIDEV. All rights reserved.
 * @license    GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 */
defined('_JEXEC') or die('Restricted access');
?><?php
class hikamarketMenu_layoutType {
	protected $values = null;

	protected function load() {
		if(!empty($this->values))
			return $this->values;

		$this->values = array(
			'div' => JHTML::_('select.option',
'div', JText::_('DIV')),
			'table' => JHTML::_('select.option',
'table', JText::_('TABLE')),
			'list' => JHTML::_('select.option',
'list', JText::_('LIST')),
			'inherit' => JHTML::_('select.option',
'inherit', JText::_('HIKA_INHERIT')),
		);

		JPluginHelper::importPlugin('hikashop');
		JFactory::getApplication()->triggerEvent('onHkmLayoutTypeLoad',
array(&$this->values));

		return $this->values;
	}

	public function display($map, $value, &$js, $id = '') {
		$values = $this->load();
		$options = '';

		if(hikaInput::get()->getCmd('from_display', false) !=
false)
			unset($values['inherit']);

		if(empty($id))
			return JHTML::_('select.genericlist', $values, $map,
'class="inputbox" size="1" '.$options,
'value', 'text', $value);

		$js .= '
if(!window.localPage) window.localPage = {};
if(window.localPage.switchPanel)
	window.localPage.switchPanel(\''.$id.'\',\''.$value.'\',\'layout\');
';
		$options = 'onchange="if(window.localPage.switchPanel)
window.localPage.switchPanel(\''.$id.'\',this.value,\'layout\');"';
		return JHTML::_('select.genericlist', $values, $map,
'class="inputbox" size="1" '.$options,
'value', 'text', $value);
	}
}
PK��[���
�
paymentmethods.phpnu�[���<?php
/**
 * @package    HikaMarket for Joomla!
 * @version    3.1.1
 * @author     Obsidev S.A.R.L.
 * @copyright  (C) 2011-2020 OBSIDEV. All rights reserved.
 * @license    GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 */
defined('_JEXEC') or die('Restricted access');
?><?php
class hikamarketPaymentmethodsType {

	protected $values = array();

	protected function loadBackend($vendor_id) {
		if(!empty($this->values[$vendor_id]))
			return;

		$db = JFactory::getDBO();

		$this->values[$vendor_id] = array( 0 => array('type'
=> 'manual', 'name' => 'Manual') );

		$payments = array('paypal');
		foreach($payments as &$p) {
			$p = $db->Quote($p);
			unset($p);
		}
		$query = 'SELECT payment_id, payment_type, payment_name FROM '
. hikamarket::table('shop.payment') . ' WHERE payment_type
IN (' . implode(',', $payments).')';

		$db->setQuery($query);
		$methods = $db->loadObjectList();
		foreach($methods as $m) {
			$this->values[$vendor_id][$m->payment_id] = array(
				'type' => $m->payment_type,
				'name' => $m->payment_name . '
('.$m->payment_type.' /
'.$m->payment_id.')'
			);
		}
	}

	protected function loadFrontend($form, $value = '', $vendor_id =
0) {
		if(!empty($this->values['front']))
			return;

		$this->values['front'] = array();

		$pluginsClass = hikashop_get('class.plugins');
		$methods = $pluginsClass->getMethods('payment');

		if(empty($methods))
			return;

		foreach($methods as $m) {
			if(isset($m->enabled) && !$m->enabled &&
$m->payment_id != $value)
				continue;
			if(isset($m->payment_published) && !$m->payment_published
&& $m->payment_id != $value)
				continue;
			if(isset($m->payment_vendor_id) &&
(int)$m->payment_vendor_id > 0 &&
(int)$m->payment_vendor_id != $vendor_id)
				continue;
			$this->values['front'][$m->payment_id] =
$m->payment_name;
		}
	}

	public function get($vendor_id, $payment_id) {
		$this->loadBackend($vendor_id);
		if(!empty($this->values[$vendor_id][$payment_id]))
			return $this->values[$vendor_id][$payment_id]['type'];
		return null;
	}

	public function display($map, $values, $options = array()) {
		if(is_string($options))
			$options = array('attribute' => $options);

		$attribute = 'size="1"';
		if(isset($options['attribute']))
			$attribute = implode(' ', $options['attribute']);
		$vendor_id = 0;
		if(isset($options['vendor_id']))
			$vendor_id = (int)$options['vendor_id'];
		$form = false;
		if(isset($options['form']))
			$form = (int)$options['form'];

		$app = JFactory::getApplication();
		if($app->isAdmin())
			return $this->displayBackend($vendor_id, $map, $values);

		$this->loadFrontend($form, $values, $vendor_id);
		$items = array();
		if(!$form) {
			$attribute .= '
onchange="document.adminForm.submit();"';
			$items[] = JHTML::_('select.option', '',
JText::_('ALL_PAYMENT_METHODS') );
		}
		foreach($this->values['front'] as $key => $text) {
			$items[] = JHTML::_('select.option', $key, $text);
		}
		return JHTML::_('select.genericlist', $items, $map,
'class="inputbox" '.$attribute, 'value',
'text', $values);
	}

	private function displayBackend($vendor_id, $map, $values, $attribute =
'size="1"') {
		$this->loadBackend($vendor_id);
		$items = array();
		foreach($this->values[$vendor_id] as $key => $text) {
			$items[] = JHTML::_('select.option', $key,
$text['name']);
		}
		return JHTML::_('select.genericlist', $items, $map,
'class="inputbox" '.$attribute, 'value',
'text', $values);
	}
}
PK��[�m�IIproducts.phpnu�[���<?php
/**
 * @package    HikaMarket for Joomla!
 * @version    3.1.1
 * @author     Obsidev S.A.R.L.
 * @copyright  (C) 2011-2020 OBSIDEV. All rights reserved.
 * @license    GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 */
defined('_JEXEC') or die('Restricted access');
?><?php
class hikamarketProductsType {

	public function display($map, $value) {
		return '';
	}

	public function displaySingle($map, $value, $display = '', $root
= 0, $delete = false) {

		if(empty($this->nameboxType))
			$this->nameboxType = hikamarket::get('type.namebox');

		return $this->nameboxType->display(
			$map,
			$value,
			hikamarketNameboxType::NAMEBOX_SINGLE,
			'product',
			array(
				'delete' => $delete,
				'root' => $root,
				'displayFormat' => $display,
				'default_text' =>
'<em>'.JText::_('HIKA_NONE').'</em>',
			)
		);
	}

	public function displayMultiple($map, $values, $display = '',
$root = 0) {

		if(empty($this->nameboxType))
			$this->nameboxType = hikamarket::get('type.namebox');

		return $this->nameboxType->display(
			$map,
			$values,
			hikamarketNameboxType::NAMEBOX_MULTIPLE,
			'product',
			array(
				'delete' => true,
				'root' => $root,
				'sort' => true,
				'displayFormat' => $display,
				'default_text' =>
'<em>'.JText::_('HIKA_NONE').'</em>',
			)
		);
	}
}
PK��[�h>shop_category.phpnu�[���<?php
/**
 * @package    HikaMarket for Joomla!
 * @version    3.1.1
 * @author     Obsidev S.A.R.L.
 * @copyright  (C) 2011-2020 OBSIDEV. All rights reserved.
 * @license    GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 */
defined('_JEXEC') or die('Restricted access');
?><?php
class hikamarketShop_categoryType {

	public function display($map, $value, $type = 'category', $field
= 'category_id', $form = true, $none = true) {
		$categoryType = hikamarket::get('shop.type.categorysub');
		$categoryType->type = $type;
		$categoryType->field = $field;
		return $categoryType->display($map, $value, $form, $none);
	}

	public function displaySingle($map, $value, $type = '', $root =
0, $delete = false) {

		if(empty($this->nameboxType))
			$this->nameboxType = hikamarket::get('type.namebox');

		return $this->nameboxType->display(
			$map,
			$value,
			hikamarketNameboxType::NAMEBOX_SINGLE,
			'category',
			array(
				'delete' => $delete,
				'root' => $root,
				'default_text' =>
'<em>'.JText::_('HIKA_NONE').'</em>',
			)
		);
	}

	public function displayMultiple($map, $values, $type = '', $root
= 0) {

		if(empty($this->nameboxType))
			$this->nameboxType = hikamarket::get('type.namebox');

		$first_element = reset($values);
		if(is_object($first_element))
			$values = array_keys($values);

		return $this->nameboxType->display(
			$map,
			$values,
			hikamarketNameboxType::NAMEBOX_MULTIPLE,
			'category',
			array(
				'delete' => true,
				'root' => $root,
				'sort' => true,
				'default_text' =>
'<em>'.JText::_('HIKA_NONE').'</em>',
			)
		);
	}

	public function displayTree($id, $root = 0, $type = null, $displayRoot =
false, $selectRoot = false, $openTo = null, $link = '') {
		hikamarket::loadJslib('otree');
		if(empty($type))
			$type = array('product','vendor');
		$ret = '';

		$ret .= '<div id="'.$id.'_otree"
class="oTree"></div>
<script type="text/javascript">
var options = {rootImg:"'.HIKAMARKET_IMAGES.'otree/",
showLoading:false};
var data = '.$this->getDataFull($type, $root, $displayRoot,
$selectRoot).';
var '.$id.' = new
window.oTree("'.$id.'",options,null,data,false);
'.$id.'.addIcon("world","world.png");
'.$id.'.render(true);
</script>';
		return $ret;
	}

	private function getData($type = 'product', $root = 0,
$displayRoot = false, $selectRoot = false, $value = null) {
		$categoryClass = hikamarket::get('class.category');
		$shopCategoryClass = hikamarket::get('shop.class.category');
		if($root == 1)
			$root = 0;
		if(empty($root)) {
			if(!is_array($type))
				$type = array($type);
			$type[] = 'root';
		}
		$typeConfig = array('params' =>
array('category_type' => $type), 'mode' =>
'tree');
		$fullLoad = false;
		$config = hikamarket::config();
		$options = array('depth' =>
$config->get('explorer_default_depth', 3), 'start'
=> $root);

		list($elements,$values) = $categoryClass->getNameboxData($typeConfig,
$fullLoad, null, null, null, $options);

		if($value !== null) {
			$parents = $shopCategoryClass->getParents($value);
			$parents = array_reverse($parents);
		}

		$data = array();
		if(!empty($parents)) {
			$first = true;
			foreach($parents as $p) {
				$o = new stdClass();
				$o->status = 2;
				if($first) {
					if($p->category_left + 1 == $p->category_right) {
						$o->status = 4;
					} else {
						$o->status = 3;
					}
					$first = false;
				}

				$o->name = JText::_($p->category_name);
				$o->value = (int)$p->category_id;
				$o->data = $data;

				$s = new stdClass();
				$s->status = 4;
				$s->name = '...';
				$s->value = -(int)$p->category_parent_id;
				$s->data = array();
				$data = array($o, $s);
			}
		}

	var_dump($data);
	var_dump($elements);
	return json_encode($elements);

		foreach($elements as $k => $el) {
			if($el->value != $data[0]->data[0]->value)
				continue;

			if(count($el->data)) {
				$found = false;
				foreach($el->data as $j => $e) {
					if($e->value == $data[0]->data[0]->data[0]->value) {
						$elements[$k]->data[$j]->data =
$data[0]->data[0]->data[0]->data;
						$elements[$k]->data[$j]->status = 2;
						$found = true;
					}
				}
				if(!$found) {
					$elements[$k]->data[] = $data[0]->data[0]->data[0];
				}
			} else {
				$elements[$k]->data = $data[0]->data[0]->data;
				$elements[$k]->status = 2;
			}
			break;
		}

		return json_encode($elements);
	}

	private function getDataFull($type = 'product', $root = 0,
$displayRoot = false, $selectRoot = false) {
		$marketCategory = hikamarket::get('class.category');
		if($root == 1)
			$root = 0;
		$elements = $marketCategory->getList($type, $root, $displayRoot);

		$d = null;
		foreach($elements as $k => $element) {
			if($d !== null && $element->category_depth > ($d + 1)) {
				unset($elements[$k]);
			} else {
				$d = (int)$element->category_depth;
			}
		}

		$ret = array();
		$tmp = array();
		foreach($elements as $k => $element) {
			$el = new stdClass();
			$el->status = 4;
			$el->name = $element->category_name;

			if($element->category_type == 'root') {
				$el->status = 5;
				$el->icon = 'world';
				if(!$selectRoot)
					$el->noselection = 1;
				else
					$el->value = (int)$element->category_id;
			} else {
				$el->value = (int)$element->category_id;
			}

			$tmp[ (int)$element->category_id ] =& $el;

			if(empty($element->category_parent_id) ||
empty($tmp[(int)$element->category_parent_id]) ||
$tmp[(int)$element->category_parent_id]->status == 5) {
				$ret[] =& $el;
				unset($el);
				continue;
			}

			unset($parent);
			$parent =& $tmp[(int)$element->category_parent_id];
			$parent->status = 2;
			if(empty($parent->data))
				$parent->data = array();
			$parent->data[] =& $el;
			unset($el);
		}
		unset($tmp);

		return json_encode($ret);
	}
}
PK��[�zv:zzvendor_selection.phpnu�[���<?php
/**
 * @package    HikaMarket for Joomla!
 * @version    3.1.1
 * @author     Obsidev S.A.R.L.
 * @copyright  (C) 2011-2020 OBSIDEV. All rights reserved.
 * @license    GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 */
defined('_JEXEC') or die('Restricted access');
?><?php
class hikamarketVendor_selectionType {

	public function __construct() {
		$this->app = JFactory::getApplication();
		$this->db = JFactory::getDBO();
	}

	protected function getVendorList($filters = array(), $sort =
'id') {
		static $vendorList = array();
		$key = 'default';
		if(!empty($filters) && $sort != 'vendor_id')
			$key = md5(serialize($filters).$sort);
		if(isset($vendorList[$key]))
			return $vendorList[$key];

		$sqlFilters = array('vendor.vendor_published = 1');
		foreach($filters as $filter) {

		}

		$sqlSort = 'vendor.vendor_id';
		if($sort == 'name')
			$sqlSort = 'vendor.vendor_name';

		$query = 'SELECT vendor.vendor_id, vendor.vendor_name '.
			' FROM ' . hikamarket::table('vendor') . ' AS
vendor '.
			' WHERE ('.implode(') AND (', $sqlFilters).')
'.
			' ORDER BY '.$sqlSort;
		$this->db->setQuery($query);
		$vendorList[$key] =
$this->db->loadObjectList('vendor_id');
		foreach($vendorList[$key] as &$vendor) {
			$vendor = $vendor->vendor_name;
		}
		unset($vendor);

		return $vendorList[$key];
	}

	public function displayDropdown($map, $value, $delete = false, $options =
'', $id = '') {
		$vendors = $this->getVendorList();
		if($delete) {
			$vendors = array_merge( array(0 =>
JText::_('PLEASE_SELECT')), $vendors);
		}
		return JHTML::_('select.genericlist', $vendors, $map, $options,
'value', 'text', $value, $id);
	}

	protected function initJs() {
		static $jsInit = null;
		if($jsInit === true)
			return;

		$vendor_format = 'data.vendor_name';
		if($this->app->isAdmin())
			$vendor_format = 'data.id + " - " +
data.vendor_name';

		$js = '
if(!window.localPage)
	window.localPage = {};
window.localPage.fieldSetVendor = function(el, name) {
	window.hikamarket.submitFct = function(data) {
		var d = document,
			vendorInput = d.getElementById(name + "_input_id"),
			vendorSpan = d.getElementById(name + "_span_id");
		if(vendorInput) { vendorInput.value = data.id; }
		if(vendorSpan) { vendorSpan.innerHTML = '.$vendor_format.'; }
	};
	window.hikamarket.openBox(el,null,(el.getAttribute("rel") ==
null));
	return false;
};
window.localPage.fieldRemVendor = function(el, name) {
	var d = document,
		vendorInput = d.getElementById(name + "_input_id"),
		vendorSpan = d.getElementById(name + "_span_id");
	if(vendorInput) { vendorInput.value = ""; }
	if(vendorSpan) { vendorSpan.innerHTML = " - "; }
	return false;
};
';
		$doc = JFactory::getDocument();
		$doc->addScriptDeclaration($js);

		$jsInit = true;
	}

	public function display($map, $value, $delete = false) {
		$this->initJs();

		$vendorClass = hikamarket::get('class.vendor');
		$popup = hikamarket::get('shop.helper.popup');

		$name = str_replace(array('][','[',']'),
'_', $map);
		$vendor_id = (int)$value;
		$vendor = $vendorClass->get($vendor_id);
		$vendor_name = '';
		if(!empty($vendor)) {
			$vendor_name = @$vendor->vendor_name;
		} else {
			$vendor_id = '';
		}

		$vendor_display_name = $vendor_name;
		if($this->app->isAdmin())
			$vendor_display_name = $vendor_id.' - '.$vendor_name;

		$ret = '<span
id="'.$name.'_span_id">'.$vendor_display_name.'</span>'
.
			'<input type="hidden"
id="'.$name.'_input_id"
name="'.$map.'"
value="'.$vendor_id.'"/> '.
			$popup->display(
				'<img
src="'.HIKAMARKET_IMAGES.'icon-16/edit.png"
style="vertical-align:middle;"/>',
				'VENDOR_SELECTION',
				hikamarket::completeLink('vendor&task=selection&single=true',
true),
				'market_set_vendor_'.$name,
				760, 480, 'onclick="return
window.localPage.fieldSetVendor(this,\''.$name.'\');"',
'', 'link'
			);

		if($delete)
			$ret .= ' <a
title="'.JText::_('HIKA_DELETE').'"
href="#'.JText::_('HIKA_DELETE').'"
onclick="return window.localPage.fieldRemVendor(this,
\''.$name.'\');"><img
src="'.HIKAMARKET_IMAGES.'icon-16/delete.png"
style="vertical-align:middle;"/></a>';

		return $ret;
	}
}
PK�,�[0��D��easyblog/config.xmlnu�[���<config>
	<params>
		<param name="easyblogcategoryid"
type="offlajneasyblog" default="0"
label="CATEGORIES_AS_TOP_LEVEL_CATEGORIES"
description="YOU_CAN_TEST_THE_WORKING_ON_OUR_DEMO_SITE_YOU_CAN_USE_CTRLCLICK_TO_SELECT_MULTIPLE"
height="10" />
		<param name="showproducts" type="offlajnonoff"
default="0" label="Show items with categories"
description="" />
		<param name="parenthref" type="offlajnonoff"
default="0" label="Parent items as link"
description="If enabled, the items which have subitems will be
openable." />
		<param name="displaynumprod" type="offlajnlist"
default="0" label="DISPLAY_THE_NUMBER_OF_PRODUCTS"
description="IF_YOU_CHECK_YES_IT_WILL_ADD_THE_COUNT_PRODUCTS_TO_THE_CATEGORY_EG_CATEGORY_NAME10">
			<option value="0">No</option>
			<option
value="1">YES_ONLY_THE_REAL_COUNT</option>
			<option
value="2">YES_THE_AGGREGATED_COUNT_ON_EACH_CATEGORY</option>
		</param>
		<param name="elementorder" type="offlajnlist"
default="0" label="ELEMENT_ORDER"
description="">
			<option value="0">COMPONENT_DEFAULT</option>
			<option value="1">ALPHABETICAL_ASCENDING</option>
			<option
value="2">ALPHABETICAL_DESCENDING</option>
		</param>
		<param name="subheader" type="offlajncombine"
default="0|*|50|*|" label="Menu-item description">
			<param type="offlajnonoff" check="conditions"
onoff="1" label="SHOW_SUBHEADER"
description="SHOW_SUBHEADER" />
			<param type="offlajntext"
label="LENGTH_SUBHEADER" validation="int"
size="3" description="LENGTH_SUBHEADER" />
		</param>
		<param name="menu_images" check="conditions"
type="offlajnonoff" default="0" label="Show
menu-item icons" description=""/>
		<param type="offlajncombine" if="menu_images"
name="resizeicon"
default="0|*|32||px|*|32||px|*|32||px|*|0" label="Resize
menu-item icons" description="">
			<param type="offlajnonoff" onoff="1"
label="Advanced" description=""/>
			<param size="2" validation="int"
type="offlajntext" label="Max width">
				<unit>px</unit>
			</param>
			<param type="offlajnclear"/>
			<param size="2" validation="int"
type="offlajntext" label="Width">
				<unit>px</unit>
			</param>
			<param size="2" validation="int"
type="offlajntext" label="Height">
				<unit>px</unit>
			</param>
			<param type="offlajnswitcher" label="-">
				<unit value="1">Scale</unit>
				<unit value="0">Crop</unit>
			</param>
		</param>
		<param type="offlajncombine" if="menu_images"
name="iconborderradius" default="0|*|0|*|0|*|0|*|px"
label="Menu-item icon &lt;br&gt; border-radius"
description="">
			<param size="2" validation="int"
type="offlajntext" label="Top-left"/>
			<param size="2" validation="int"
type="offlajntext" label="Top-right"/>
			<param size="2" validation="int"
type="offlajntext" label="Bottom-right"/>
			<param size="2" validation="int"
type="offlajntext" label="Bottom-left"/>
			<param type="offlajnswitcher" label="-">
				<unit value="%">%</unit>
				<unit value="px">px</unit>
			</param>
		</param>
	</params>
</config>PK�,�[
�H''easyblog/index.htmlnu�[���<html><head></head><body></body></html>PK�,�[�z�GPPeasyblog/menu.phpnu�[���<?php
/**
 * mod_vertical_menu - Vertical Menu
 *
 * @author    Balint Polgarfi
 * @copyright 2014-2019 Offlajn.com All Rights Reserved
 * @license   https://gnu.org/licenses/gpl-2.0.html
 * @link      https://offlajn.com
 */

defined('_JEXEC') or die('Restricted access');

if (!class_exists('OfflajnEasyBlogMenu2')) {

  require_once dirname(__FILE__) . '/../../core/MenuBase.php';
  require_once(JPATH_ADMINISTRATOR .
'/components/com_easyblog/includes/easyblog.php');

  class OfflajnEasyBlogMenu2 extends OfflajnMenuBase2
  {
    public function __construct(&$menu, &$module)
    {
      parent::__construct($menu, $module);
    }

    public function getAllItems()
    {
      $lang = JFactory::getLanguage()->getTag();
      $db = JFactory::getDBO();
      $categoryid = explode("|",
$this->_params->get('easyblogcategoryid'));
      $user = JFactory::getUser(); //get user for ACL
      $groups = implode(',',
$user->getAuthorisedViewLevels());

      $query = "SELECT DISTINCT a.id AS id, a.title AS name, a.alias,
a.description as description, a.avatar as categoryimg, ";
      if (!is_array($categoryid) && $categoryid != 0) {
        $query .= "IF(a.parent_id = " . $categoryid . ", 0 ,
IF(a.parent_id = 1, -1, a.parent_id)) AS parent, ";
      } else if (count($categoryid) && is_array($categoryid)
&& !in_array('0', $categoryid)) {
        $query .= "IF(a.id in (" . implode(',',
$categoryid) . "), 0 , IF(a.parent_id = 0, -1, a.parent_id)) AS
parent, ";
      } else {
        $query .= "IF(a.parent_id = 1, 0, a.parent_id) AS parent,
";
      }
      if ($this->_params->get('displaynumprod', 0) != 0) {
        $query .= "(SELECT COUNT(*) FROM #__easyblog_post AS ax WHERE
ax.category_id = a.id AND ax.published = 1) AS productnum";
      } else {
        $query .= "0 AS productnum";
      }
      $query .= ",'cat' AS typ ";
      $query .= " FROM #__easyblog_category AS a WHERE a.published = 1
";

      if ($this->_params->get('elementorder', 0) == 1) {
        $query .= "ORDER BY name ASC";
      } else if ($this->_params->get('elementorder', 0) ==
2) {
        $query .= "ORDER BY name DESC";
      } else {
        $query .= "ORDER BY a.lft ASC, name DESC";
      }

      $db->setQuery($query);
      $allItems = $db->loadObjectList('id');
      if ($this->_params->get('showproducts') == 1) {
        $query = "SELECT concat(a.category_id,'-',a.id) AS
id, a.id AS id2, a.title AS name, a.intro AS description, a.category_id AS
parent, a.permalink as link, 'prod' AS typ, 0 AS productnum
                  FROM #__easyblog_post AS a
                  WHERE a.published = 1 ";

        if ($this->_params->get('elementorder', 0) == 1) {
          $query .= "ORDER BY a.title ASC";
        } else if ($this->_params->get('elementorder', 0)
== 2) {
          $query .= "ORDER BY a.title DESC";
        } else {
          $query .= "ORDER BY a.ordering ASC, a.title DESC";
        }

        $db->setQuery($query);
        $rows = $db->loadObjectList('id');
        $allItems += $rows;
      }
      return $allItems;
    }

    public function getActiveItem()
    {
      $db = JFactory::getDBO();
      $active = null;
      if (JRequest::getVar('option') == 'com_easyblog')
{
        $content_id = 0;
        $category_id = 0;
        if (JRequest::getVar('view') == "categories")
{
          $category_id = JRequest::getInt('id');
        } elseif (JRequest::getVar('view') == "entry")
{
          $content_id = JRequest::getInt('id');
          $query = "SELECT category_id FROM #__easyblog_post WHERE
id=" . $content_id;
          $db->setQuery($query);
          $category_id = $db->loadResult();
        }
        if ($content_id > 0 &&
$this->_params->get('showproducts')) {
          $active = new StdClass();
          $active->id = $category_id . "-" . $content_id;
        } elseif ($category_id > 0) {
          $active = new StdClass();
          $active->id = $category_id;
        }
      }
      return $active;
    }

    public function getItemsTree()
    {
      $items = $this->getItems();
      if ($this->_params->get('displaynumprod') == 2) {
        for ($i = count($items) - 1; $i >= 0; $i--) {
          $items[$i]->parent->productnum +=
$items[$i]->productnum;
        }
      }
      return $items;
    }

    public function filterItem(&$item)
    {
      $item->nname = $item->title = stripslashes($item->name);
      $item->nname = '<span>' . $item->nname .
'</span>';
      if ($this->_params->get('displaynumprod') &&
$item->productnum != 0) {
        $length = strlen($item->productnum) == 1 ? "one" :
"more";
        $item->number = '<span class="productnum ' .
$length . '">' . $item->productnum .
'</span>';
      }
      $item->anchorAttr = '';

      if ($item->typ == 'cat') {
        if ($this->_params->get('menu_images')) {
            $item->image = JUri::Root()
.'/images/easyblog_cavatar/'. $item->categoryimg;
        }
        $link =
EBR::_('index.php?option=com_easyblog&view=categories&id='
. $item->id . '&layout=listings');
        $item->anchorAttr = 'href="' . $link .
'"';

      } else if ($item->typ == 'prod') {
      	$post = EB::post($item->id2);
        $item->anchorAttr = 'href="' .
$post->getPermalink() . '"';
      }
      if (isset($item->note)) {
        // badges
        if ($this->_params->get('badge')) {
          if (preg_match('/^[\[\(](.+?)[\]\)]/', $item->note,
$m)) {
            $item->note = trim(substr($item->note, strlen($m[0])));
            $class = $m[0][0] == '[' ?
'"sm-square-badge"' :
'"sm-round-badge"';
            $item->badge = "<span
class=$class>{$m[1]}</span>";
          }
        }
      }

      if (isset($item->note) || isset($item->description)) {
        $subHeader =
OfflajnParser::parse($this->_params->get('subheader'));
        if ($subHeader[0]) {
          $desc = !empty($item->note) ? $item->note :
strip_tags($item->description);
          $item->description = strlen($desc) <= $subHeader[1] ? $desc
: substr($desc, 0, $subHeader[1]) . '...';
        } else {
          $item->description = '';
        }
      }
    }
  }
}
PK�,�[.��i��hikashop/config.xmlnu�[���<config>
  <params>
      <param name="hikashopcategoryid"
type="offlajnhikashopcategories" default="0"
label="CATEGORIES_AS_TOP_LEVEL_CATEGORIES"
description="YOU_CAN_TEST_THE_WORKING_ON_OUR_DEMO_SITE_YOU_CAN_USE_CTRLCLICK_TO_SELECT_MULTIPLE"
height="10" />
      <param name="showproducts" type="offlajnonoff"
default="0" label="SHOW_PRODUCTS_WITH_THE_CATEGORIES"
description="" />
			<param name="parenthref" type="offlajnonoff"
default="0" label="Parent items as link"
description="If enabled, the items which have subitems will be
openable." />
    <param name="displaynumprod" type="offlajnlist"
default="0" label="DISPLAY_THE_NUMBER_OF_PRODUCTS"
description="IF_YOU_CHECK_YES_IT_WILL_ADD_THE_COUNT_PRODUCTS_TO_THE_CATEGORY_EG_CATEGORY_NAME10">
      <option value="0">No</option>
      <option
value="1">YES_ONLY_THE_REAL_COUNT</option>
      <option
value="2">YES_THE_AGGREGATED_COUNT_ON_EACH_CATEGORY</option>
    </param>
    <param name="elementorder" type="offlajnlist"
default="0" label="ELEMENT_ORDER"
description="">
      <option value="0">COMPONENT_DEFAULT</option>
      <option
value="1">ALPHABETICAL_ASCENDING</option>
      <option
value="2">ALPHABETICAL_DESCENDING</option>
    </param>       
 <param name="hikashopitemid" type="offlajnmenuitem"
default="" label="Override menu-items Itemid"
description="This menu item will be used for URL generation"
element="com_hikashop" >
            <option value="">[ Default ]</option>
    </param>
  </params>
</config>PK�,�[�#o,,hikashop/index.htmlnu�[���<html><body
bgcolor="#FFFFFF"></body></html>PK�,�[R&7��hikashop/menu.phpnu�[���<?php
/**
 * mod_vertical_menu - Vertical Menu
 *
 * @author    Balint Polgarfi
 * @copyright 2014-2019 Offlajn.com All Rights Reserved
 * @license   https://gnu.org/licenses/gpl-2.0.html
 * @link      https://offlajn.com
 */

defined('_JEXEC') or die('Restricted access');

if (!class_exists('OfflajnHikashopMenu2')) {

  if (!is_dir(JPATH_ROOT .
'/components/com_hikashop/controllers')) {
    echo JText::_("Hikashop component is not installed!");
    return;
  }

  require_once dirname(__FILE__) . '/../../core/MenuBase.php';
  require_once JPATH_ADMINISTRATOR .
'/components/com_hikashop/helpers/helper.php';

  class OfflajnHikashopMenu2 extends OfflajnMenuBase2
  {
    public function __construct($module, $params)
    {
      parent::__construct($module, $params);
      $this->hikaMenu = hikashop_get('class.menus');
      $this->hikaProduct = hikashop_get('class.product');
    }

    public function getAllItems()
    {
      $db = JFactory::getDBO();
      $filters = array(); //get ACL filters
      hikashop_addACLFilters($filters, "category_access");
      hikashop_addACLFilters($filters, "product_access");

      $filter = "";
      if (isset($filters[0])) {
        $filter = " AND " . $filters[0] . " ";
      }

      $categoryid = explode("|",
$this->_params->get('hikashopcategoryid'));
      $query = "SELECT DISTINCT
        category_id AS id,
        category_name AS name, category_alias AS alias, ";
      if ($this->_params->get('displaynumprod', 0) != 0) {
        $query .= "(SELECT COUNT(*) FROM #__hikashop_product_category
AS ax LEFT JOIN #__hikashop_product AS bp ON ax.product_id = bp.product_id
WHERE ax.category_id = id AND bp.product_published=1";
        $query .= ") AS productnum, ";
      } else {
        $query .= "0 AS productnum, ";
      }
      if (!is_array($categoryid) && $categoryid != 0) {
        $query .= "IF(category_parent_id = " . $categoryid .
", 0 , IF(category_parent_id = 0, -1, category_parent_id)) AS parent,
";
      } elseif (count($categoryid) && is_array($categoryid)
&& !in_array('0', $categoryid)) {
        $query .= "IF(category_id in (" . implode(',',
$categoryid) . "), 0 , IF(category_parent_id = 0, -1,
category_parent_id)) AS parent, ";
      } else {
        $query .= "category_parent_id AS parent, ";
      }
      $query .= "'cat' AS typ ";
      $query .= " FROM #__hikashop_category
                WHERE ((category_published =1 AND
category_type='product') OR (category_type='root' AND
category_published =0)) " . $filter;
      if ($this->_params->get('elementorder', 0) == 0) {
        $query .= "ORDER BY category_ordering ASC, category_name
DESC";
      } else if ($this->_params->get('elementorder', 0) ==
1) {
        $query .= "ORDER BY category_name ASC";
      } else if ($this->_params->get('elementorder', 0) ==
2) {
        $query .= "ORDER BY category_name DESC";
      }

      $db->setQuery($query);

      $allItems = $db->loadObjectList('id');

      if ($this->_params->get('showproducts') == 1) {
        if ($filters[1]) {
          $filter = " AND " . $filters[1] . " ";
        }

        $query = "
          SELECT DISTINCT b.product_id, concat( a.category_id,
'-', a.product_id ) AS id, b.product_name AS name, a.category_id
AS parent, 'prod' AS typ, 0 AS productnum
          FROM #__hikashop_product_category AS a
          LEFT JOIN #__hikashop_product AS b ON a.product_id =
b.product_id
          WHERE product_published = 1 " . $filter;
        if ($this->_params->get('elementorder', 0) == 2) {
          $query .= "ORDER BY product_name DESC";
        } else {
          $query .= "ORDER BY product_name ASC";
        }

        $db->setQuery($query);

        $allItems += $db->loadObjectList('id');
      }
      return $allItems;
    }

    public function getActiveItem()
    {
      $active = null;
      if (JRequest::getVar('option') == 'com_hikashop')
{
        $content_id = 0;
        $category_id = 0;
        if (JRequest::getString('ctrl') == "category")
{
          $category_id = JRequest::getInt('cid');
        } elseif (JRequest::getString('ctrl') ==
"product") {
          $content_id = JRequest::getInt('cid');
          $category_id = JRequest::getInt('categoryp');
        }
        if ($content_id > 0 &&
$this->_params->get('showcontents')) {
          $active = new StdClass();
          $active->id = $category_id . "-" . $content_id;
        } elseif ($category_id > 0) {
          $active = new StdClass();
          $active->id = $category_id;
        }
      }
      return $active;
    }

    public function getItemsTree()
    {
      return $this->getItems();
    }

    public function filterItem(&$item)
    {
      $item->nname = $item->title = stripslashes($item->name);

      $length = strlen($item->productnum) == 1 ? "one" :
"more";
      if ($this->_params->get('displaynumprod', 0) == 1
&& $item->typ == 'cat' && $item->productnum
> 0) {
        $item->number = '<span class="productnum ' .
$length . '">' . $item->productnum .
'</span>';
        $item->nname .= $item->number;
      } elseif ($this->_params->get('displaynumprod', 0) ==
2 && $item->typ == 'cat') {
        $item->number = '<span class="productnum ' .
$length . '">' . $item->productnum .
'</span>';
        $item->nname .= $item->number;
      }
      $item->nname = '<span>' . $item->nname .
'</span>';

      $item->anchorAttr = '';
      if ($item->typ == 'cat') {
        if ($this->_params->get('parentlink') == 0
&& $item->p) {
          $item->nname = '<a>' . $item->nname .
'</a>';
        } else {
          $Itemid = (int)
$this->_params->get('hikashopitemid');
          if (!$Itemid) {
            $Itemid = (int)
$this->hikaMenu->getItemidFromCategory($item->id,
"category");
          }
          $item->anchorAttr = 'href="' .
JRoute::_("index.php?option=com_hikashop&ctrl=category&task=listing&name={$item->alias}&cid={$item->id}&Itemid=$Itemid")
. '"';
          $item->nname = '<a ' . $item->anchorAttr .
'>' . $item->nname . '</a>';
        }
      } elseif ($item->typ == 'prod') {
        $id = explode("-", $item->id);
        $product = $this->hikaProduct->get((int) $id[1]);
        $Itemid = (int)
$this->_params->get('hikashopitemid');
        if (!$Itemid) {
          $Itemid = (int)
$this->hikaMenu->getItemidFromCategory($product->product_id,
"product");
        }
        $url_itemid = $Itemid ? '&Itemid=' . $Itemid :
'';
        $this->hikaProduct->addAlias($product);
        $item->anchorAttr = 'href="' .
hikashop_contentLink('product&task=show&cid=' .
$product->product_id . '&name=' . $product->alias .
$url_itemid, $product) . '"';
        $item->nname = '<a ' . $item->anchorAttr .
'>' . $item->nname . '</a>';
      }
    }

  }
}
PK�,�[7��hikashopbrands/config.xmlnu�[���<config>
  <params>
      <param name="hikashopcategoryid"
type="offlajnhikashopbrands" default="0"
label="CATEGORIES_AS_TOP_LEVEL_CATEGORIES"
description="YOU_CAN_TEST_THE_WORKING_ON_OUR_DEMO_SITE_YOU_CAN_USE_CTRLCLICK_TO_SELECT_MULTIPLE"
height="10" />
      <param name="showproducts" type="offlajnonoff"
default="0" label="SHOW_PRODUCTS_WITH_THE_CATEGORIES"
description="" />
			<param name="parenthref" type="offlajnonoff"
default="0" label="Parent items as link"
description="If enabled, the items which have subitems will be
openable." />
    <param name="displaynumprod" type="offlajnlist"
default="0" label="DISPLAY_THE_NUMBER_OF_PRODUCTS"
description="IF_YOU_CHECK_YES_IT_WILL_ADD_THE_COUNT_PRODUCTS_TO_THE_CATEGORY_EG_CATEGORY_NAME10">
      <option value="0">No</option>
      <option
value="1">YES_ONLY_THE_REAL_COUNT</option>
      <option
value="2">YES_THE_AGGREGATED_COUNT_ON_EACH_CATEGORY</option>
    </param>
    <param name="elementorder" type="offlajnlist"
default="0" label="ELEMENT_ORDER"
description="">
      <option value="0">COMPONENT_DEFAULT</option>
      <option
value="1">ALPHABETICAL_ASCENDING</option>
      <option
value="2">ALPHABETICAL_DESCENDING</option>
    </param>       
 <param name="hikashopitemid" type="offlajnmenuitem"
default="" label="Override menu-items Itemid"
description="This menu item will be used for URL generation"
element="com_hikashop" >
            <option value="">[ Default ]</option>
    </param>
  </params>
</config>PK�,�[
�H''hikashopbrands/index.htmlnu�[���<html><head></head><body></body></html>PK�,�[N	+c��hikashopbrands/menu.phpnu�[���<?php
/**
 * mod_vertical_menu - Vertical Menu
 *
 * @author    Balint Polgarfi
 * @copyright 2014-2019 Offlajn.com All Rights Reserved
 * @license   https://gnu.org/licenses/gpl-2.0.html
 * @link      https://offlajn.com
 */

defined('_JEXEC') or die('Restricted access');

if (!class_exists('OfflajnHikashopMenu2')) {

  if (!is_dir(JPATH_ROOT .
'/components/com_hikashop/controllers')) {
    echo JText::_("Hikashop component is not installed!");
    return;
  }

  require_once dirname(__FILE__) . '/../../core/MenuBase.php';
  require_once JPATH_ADMINISTRATOR .
'/components/com_hikashop/helpers/helper.php';

  class OfflajnHikashopbrandsMenu2 extends OfflajnMenuBase2
  {
    public function __construct($module, $params)
    {
      parent::__construct($module, $params);
      $this->hikaMenu = hikashop_get('class.menus');
      $this->hikaProduct = hikashop_get('class.product');
    }

    public function getAllItems()
    {
      $db = JFactory::getDBO();
      $filters = array(); //get ACL filters
      hikashop_addACLFilters($filters, "category_access");
      hikashop_addACLFilters($filters, "product_access");

      $filter = "";
      if (isset($filters[0])) {
        $filter = " AND " . $filters[0] . " ";
      }

      $categoryid = explode("|",
$this->_params->get('hikashopcategoryid'));
      $query = "SELECT DISTINCT
        category_id AS id,
        category_name AS name, category_alias AS alias, ";
      if ($this->_params->get('displaynumprod', 0) != 0) {
        $query .= "(SELECT COUNT(*) FROM #__hikashop_product_category
AS ax LEFT JOIN #__hikashop_product AS bp ON ax.product_id = bp.product_id
WHERE ax.category_id = id AND bp.product_published=1";
        $query .= ") AS productnum, ";
      } else {
        $query .= "0 AS productnum, ";
      }
      if (!is_array($categoryid) && $categoryid != 0) {
        $query .= "IF(category_parent_id = " . $categoryid .
", 0 , IF(category_parent_id = 0, -1, category_parent_id)) AS parent,
";
      } elseif (count($categoryid) && is_array($categoryid)
&& !in_array('0', $categoryid)) {
        $query .= "IF(category_id in (" . implode(',',
$categoryid) . "), 0 , IF(category_parent_id = 0, -1,
category_parent_id)) AS parent, ";
      } else {
        $query .= "category_parent_id AS parent, ";
      }
      $query .= "'cat' AS typ ";
      $query .= " FROM #__hikashop_category
                WHERE ((category_type='manufacturer' AND
category_published = 1) OR (category_type='root' AND
category_published =0)) " . $filter;
      if ($this->_params->get('elementorder', 0) == 0) {
        $query .= "ORDER BY category_ordering ASC, category_name
DESC";
      } else if ($this->_params->get('elementorder', 0) ==
1) {
        $query .= "ORDER BY category_name ASC";
      } else if ($this->_params->get('elementorder', 0) ==
2) {
        $query .= "ORDER BY category_name DESC";
      }

      $db->setQuery($query);

      $allItems = $db->loadObjectList('id');

      if ($this->_params->get('showproducts') == 1) {
        if ($filters[1]) {
          $filter = " AND " . $filters[1] . " ";
        }

        $query = "
          SELECT DISTINCT b.product_id, concat( a.category_id,
'-', a.product_id ) AS id, b.product_name AS name, a.category_id
AS parent, 'prod' AS typ, 0 AS productnum
          FROM #__hikashop_product_category AS a
          LEFT JOIN #__hikashop_product AS b ON a.product_id =
b.product_id
          WHERE product_published = 1 " . $filter;
        if ($this->_params->get('elementorder', 0) == 2) {
          $query .= "ORDER BY product_name DESC";
        } else {
          $query .= "ORDER BY product_name ASC";
        }

        $db->setQuery($query);

        $allItems += $db->loadObjectList('id');
      }
      return $allItems;
    }

    public function getActiveItem()
    {

      $active = null;
      if (JRequest::getVar('option') == 'com_hikashop')
{
        $content_id = 0;
        $category_id = 0;
        if (JRequest::getString('ctrl') == "category")
{
          $category_id = JRequest::getInt('cid');
        } elseif (JRequest::getString('ctrl') ==
"product") {
          $content_id = JRequest::getInt('cid');
          $category_id = JRequest::getInt('categoryp');
        }
        if ($content_id > 0 &&
$this->_params->get('showcontents')) {
          $active = new StdClass();
          $active->id = $category_id . "-" . $content_id;
        } elseif ($category_id > 0) {
          $active = new StdClass();
          $active->id = $category_id;
        }
      }
      return $active;
    }

    public function getItemsTree()
    {

      return $this->getItems();
    }

    public function filterItem(&$item)
    {
      $item->nname = $item->title = stripslashes($item->name);

      $length = strlen($item->productnum) == 1 ? "one" :
"more";
      if ($this->_params->get('displaynumprod', 0) == 1
&& $item->typ == 'cat' && $item->productnum
> 0) {
        $item->number = '<span class="productnum ' .
$length . '">' . $item->productnum .
'</span>';
        $item->nname .= $item->number;
      } elseif ($this->_params->get('displaynumprod', 0) ==
2 && $item->typ == 'cat') {
        $item->number = '<span class="productnum ' .
$length . '">' . $item->productnum .
'</span>';
        $item->nname .= $item->number;
      }
      $item->nname = '<span>' . $item->nname .
'</span>';

      $item->anchorAttr = '';
      if ($item->typ == 'cat') {
        if ($this->_params->get('parentlink') == 0
&& $item->p) {
          $item->nname = '<a>' . $item->nname .
'</a>';
        } else {
          $Itemid = (int)
$this->_params->get('hikashopitemid');
          if (!$Itemid) {
            $Itemid = (int)
$this->hikaMenu->getItemidFromCategory($item->id,
"category");
          }
          $item->anchorAttr = 'href="' .
JRoute::_("index.php?option=com_hikashop&ctrl=category&task=listing&name={$item->alias}&cid={$item->id}&Itemid=$Itemid")
. '"';
          $item->nname = '<a ' . $item->anchorAttr .
'>' . $item->nname . '</a>';
        }
      } elseif ($item->typ == 'prod') {
        $id = explode("-", $item->id);
        $product = $this->hikaProduct->get((int) $id[1]);
        $Itemid = (int)
$this->_params->get('hikashopitemid');
        if (!$Itemid) {
          $Itemid = (int)
$this->hikaMenu->getItemidFromCategory($product->product_id,
"product");
        }
        $url_itemid = $Itemid ? '&Itemid=' . $Itemid :
'';
        $this->hikaProduct->addAlias($product);
        $item->anchorAttr = 'href="' .
hikashop_contentLink('product&task=show&cid=' .
$product->product_id . '&name=' . $product->alias .
$url_itemid, $product) . '"';
        $item->nname = '<a ' . $item->anchorAttr .
'>' . $item->nname . '</a>';
      }
    }

  }
}
PK�,�[E�B��
�
joomla/config.xmlnu�[���<?xml version="1.0"
encoding="UTF-8"?>
<form>
  <params>
    <param name="joomlamenu" type="offlajnmenu"
default="mainmenu" label="MENU_NAME"
description="THE_NAME_OF_THE_MENU_DEFAULT_IS_MAINMENU" />
    <param name="joomlamenutype"
type="offlajnmenuitemextended" default="mainmenu"
label="Menu-items" description="Here you can select which
menu-items do you want to show" height="10" />
		<param name="parenthref" type="offlajnonoff"
default="0" label="Parent items as link"
description="If enabled, the items which have subitems will be
openable." />
    <param name="displaynumprod" check="conditions"
type="offlajnlist" default="0" label="Display
count &lt;br&gt; of sub-items" description="">
      <option value="0">No</option>
      <option
value="1">YES_ONLY_THE_REAL_COUNT</option>
      <option
value="2">YES_THE_AGGREGATED_COUNT_ON_EACH_CATEGORY</option>
    </param>
    <param name="subheader" type="offlajncombine"
default="0|*|50|*|" label="Menu-item description">
      <param type="offlajnonoff" check="conditions"
onoff="1" label="SHOW_SUBHEADER"
description="SHOW_SUBHEADER" />
      <param type="offlajntext"
label="LENGTH_SUBHEADER" validation="int"
size="3" description="LENGTH_SUBHEADER" />
    </param>
    <param name="menu_images" check="conditions"
type="offlajnonoff" default="0" label="Show
menu-item icons" description=""/>
    <param type="offlajncombine" if="menu_images"
name="resizeicon"
default="0|*|32||px|*|32||px|*|32||px|*|0" label="Resize
menu-item icons" description="">
      <param type="offlajnonoff" onoff="1"
label="Advanced" description=""/>
      <param size="2" validation="int"
type="offlajntext" label="Max width">
        <unit>px</unit>
      </param>
      <param type="offlajnclear"/>
      <param size="2" validation="int"
type="offlajntext" label="Width">
        <unit>px</unit>
      </param>
      <param size="2" validation="int"
type="offlajntext" label="Height">
        <unit>px</unit>
      </param>
      <param type="offlajnswitcher" label="-">
        <unit value="1">Scale</unit>
        <unit value="0">Crop</unit>
      </param>
    </param>
    <param type="offlajncombine" if="menu_images"
name="iconborderradius" default="0|*|0|*|0|*|0|*|px"
label="Menu-item icon &lt;br&gt; border-radius"
description="">
      <param size="2" validation="int"
type="offlajntext" label="Top-left"/>
      <param size="2" validation="int"
type="offlajntext" label="Top-right"/>
      <param size="2" validation="int"
type="offlajntext" label="Bottom-right"/>
      <param size="2" validation="int"
type="offlajntext" label="Bottom-left"/>
      <param type="offlajnswitcher" label="-">
        <unit value="%">%</unit>
        <unit value="px">px</unit>
      </param>
    </param>
  </params>
</form>PK�,�[�#o,,joomla/index.htmlnu�[���<html><body
bgcolor="#FFFFFF"></body></html>PK�,�[���*�*joomla/menu.phpnu�[���<?php
/**
 * mod_vertical_menu - Vertical Menu
 *
 * @author    Balint Polgarfi
 * @copyright 2014-2019 Offlajn.com All Rights Reserved
 * @license   https://gnu.org/licenses/gpl-2.0.html
 * @link      https://offlajn.com
 */

defined('_JEXEC') or die('Restricted access');

if (!class_exists('OfflajnJoomlaMenu2')) {
  jimport('joomla.application.menu');
  jimport('joomla.html.parameter');

  require_once dirname(__FILE__) . '/../../core/MenuBase.php';

  class OfflajnJoomlaMenu2 extends OfflajnMenuBase2
  {
    public function __construct($module, $params)
    {
      parent::__construct($module, $params);
      $this->alias = array();
      $this->parentName = 'parent_id';
      $this->name = 'title';
    }

    public function getAllItems()
    {
      $options = array();
      $menu = JMenu::getInstance('site', $options);
      $items = $menu->getMenu();
      $keys = array_keys($items);
      $allItems = array();
      for ($x = 0; $x < count($keys); $x++) {
        //Check J! 3.5 new feature if the menu item set to not show in menu
module
        if (version_compare(JVERSION, '3.5', 'ge')) {
          $params = new
OfflajnBaseJParameter($items[$keys[$x]]->params);
          if (!$params->get('menu_show', 1)) {
            continue;
          }

        }
        $allItems[$keys[$x]] = clone ($items[$keys[$x]]);
      }
      return $allItems;
    }

    public function getActiveItem()
    {
      $options = array();
      $menu = JMenu::getInstance('site', $options);
      return $menu->getActive();
    }

    public function getItemsTree()
    {
      $items = $this->getItems();
      $displaynum = $this->_params->get('displaynumprod',
0);

      if ($displaynum > 0) {
        for ($i = count($items) - 1; $i >= 0; $i--) {
          if (!property_exists($items[$i]->parent,
'productnum')) {
            $items[$i]->parent->productnum = -1;
          }
          if (!property_exists($items[$i], 'productnum')) {
            $items[$i]->productnum = -1;
            $items[$i]->parent->productnum++;
          } elseif ($displaynum == 1) {
            $items[$i]->parent->productnum++;
          } elseif ($displaynum == 2) {
            $items[$i]->parent->productnum +=
$items[$i]->productnum;
          }
        }
      }
      return $items;
    }

    public function filterItems()
    {
      $this->helper = array();
      $user = JFactory::getUser();
      $aid = $user->getAuthorisedViewLevels();
      //Get current language
      $lang = JFactory::getLanguage();
      $curLang = $lang->getTag();
      $menutype = $this->_params->get('joomlamenu');
      $ids = $this->_params->get('joomlamenutype');

      $ids = explode("|", $ids);

      // if (!is_array($ids) && is_string($ids)) $ids =
array($ids)
      // if (!is_array($ids)) $ids = array();

      if (!in_array(0, $ids) && count($ids) > 0) {
        if (count($ids) == 1) {
          $keys = array_keys($this->allItems);
          $newParent = $ids[0];
          for ($x = 0; $x < count($keys); $x++) {
            $el = &$this->allItems[$keys[$x]];
            if ($el->{$this->parentName} == $newParent) {
              $el->{$this->parentName} = 1;
            } elseif ($el->{$this->parentName} == 1) {
              $el->{$this->parentName} = -1;
            }

          }
        } else {
          $keys = array_keys($this->allItems);
          for ($x = 0; $x < count($keys); $x++) {
            $el = &$this->allItems[$keys[$x]];
            if (in_array($el->id, $ids)) {
              $el->{$this->parentName} = 1;
            } elseif ($el->{$this->parentName} == 1) {
              $el->{$this->parentName} = -1;
            }

          }
        }
      }
      $keys = array_keys($this->allItems);
      for ($x = 0; $x < count($keys); $x++) {
        $item = &$this->allItems[$keys[$x]];
        if (!is_object($item)) {
          continue;
        }

        $item->parent = $item->{$this->parentName} == 1 ? 0 :
$item->{$this->parentName};
        $item->ordering = $x;
        if ($item->menutype == $menutype && (is_array($aid) ?
in_array($item->access, $aid) : $item->access <= $aid) &&
($item->language == "*" || $item->language == $curLang)) {
          $item->p = false; // parent
          $item->fib = false; // First in Branch
          $item->lib = false; // Last in Branch
          if (!property_exists($item, 'opened')) {
            if ($this->opened == -1) {
              $item->opened = true; // Opened
            } else {
              $item->opened = false; // Opened
            }
          }
          $item->active = false; // Active
          $this->helper[$item->parent][] = $item;
          $item->cparams = version_compare(JVERSION, '3.0',
'ge') ? new OfflajnBaseJParameter($item->params) : new
JParameter($item->params);
          if ($item->type == 'menulink' || $item->type ==
'alias') {
            $itemid = $item->cparams->get('aliasoptions');
            if (!isset($this->alias[$itemid])) {
              $this->alias[$itemid] = $item->id;
            }

          }
        }
      }
    }

    public function filterItem(&$item)
    {
      $item->cparams = version_compare(JVERSION, '3.0',
'ge') ? new OfflajnBaseJParameter($item->params) : new
JParameter($item->params);
      if ($item->type == 'menulink' || $item->type ==
'alias') {
        $itemid = $item->cparams->get('aliasoptions');
        if (isset($this->allItems[$itemid])) {
          $newItem = $this->allItems[$itemid];
          $item->link = $newItem->link;
          $item->ttype = $newItem->type;
          $item->id = $newItem->id;
        } else {
          $item->ttype = 'separator';
        }
      } else {
        $item->ttype = $item->type;
      }

      $item->title = $item->{$this->name};
      $item->nname = '<span>' . $item->title .
'</span>';

      if ($this->_params->get('displaynumprod', 0) > 0
&& $item->productnum > 0) {
        $length = strlen($item->productnum) == 1 ? "one" :
"more";
        $item->number = '<span class="productnum ' .
$length . '">' . $item->productnum .
'</span>';
        $item->nname .= $item->number;
      }

      $item->image = $image = '';

      $imgalign = "";
      switch ($this->_params->get('menu_images_align', 0))
{
        case 0:
          $imgalign = "align='left'";
          break;
        case 1:
          $imgalign = "align='right'";
          break;
        default:
          $imgalign = "";
          break;
      }
      if ($this->_params->get('menu_images') &&
$item->params->get('menu_image') &&
$item->params->get('menu_image') != -1) {
        $item->image = JURI::root() .
$item->params->get('menu_image');
        $image = '<img src="' . $item->image .
'" ' . $imgalign . ' alt="' . $item->alias
. '" />';
        if ($this->_params->get('menu_images_link')) {
          $item->nname = null;
        }

        switch ($this->_params->get('menu_images_align',
0)) {
          case 1:
            $item->nname = $item->nname . $image;
            break;
          default:
            $item->nname = $image . $item->nname;
            break;
        }
      }

      if (!empty($item->note)) {
        // badges
        if ($this->_params->get('badge')) {
          if (preg_match('/^[\[\(](.+?)[\]\)]/', $item->note,
$m)) {
            $item->note = substr($item->note, strlen($m[0]));
            $class = $m[0][0] == '[' ?
'"sm-square-badge"' :
'"sm-round-badge"';
            $item->badge = "<span
class=$class>{$m[1]}</span>";
          }
        }

        $subHeader =
OfflajnParser::parse($this->_params->get('subheader'));
        if ($subHeader[0]) {
          $desc = strip_tags($item->note);
          $item->description = strlen($desc) <= $subHeader[1] ? $desc
: substr($desc, 0, $subHeader[1]) . '...';
        }
      }

      if ($this->_params->get('parentlink') == 0 &&
$item->p) {
        $item->ttype = 'separator';
      }

      switch ($item->ttype) {
        case 'separator':
        case 'heading':
          $item->url = '';
          return true;
        case 'url':
          if ((strpos($item->link, 'index.php?') === 0)
&& (strpos($item->link, 'Itemid=') === false)) {
            $item->url = $item->link . '&amp;Itemid=' .
$item->id;
          } else {
            $item->url = $item->link;
          }
          break;
        default:
          $router = JSite::getRouter();
          $item->url = $router->getMode() == JROUTER_MODE_SEF ?
'index.php?Itemid=' . $item->id : $item->link .
'&Itemid=' . $item->id;
          break;
      }

      $item->anchorAttr = '';
      //Get the additional CSS class from the menu manager
      if ($item->params->get('menu-anchor_css')) {
        $item->anchorAttr .= 'class="' .
$item->params->get('menu-anchor_css') . '"
';
      }

      //Get link title if set from the menu manager
      if ($item->params->get('menu-anchor_title')) {
        $item->anchorAttr .= ' title="' .
$item->params->get('menu-anchor_title') . '"
';
      }

      if ($item->url != '') {
        // Handle SSL links
        $iSecure = $item->cparams->def('secure', 0);
        if ($item->home == 1) {
          $item->url = JURI::base();
        } elseif (strcasecmp(substr($item->url, 0, 4), 'http')
&& (strpos($item->link, 'index.php?') !== false)) {
          $item->url = JRoute::_($item->url, true, $iSecure);
        } else {
          $item->url = str_replace('&',
'&amp;', $item->url);
        }

        switch ($item->browserNav) {
          default:
          case 0: // _top
            $item->anchorAttr .= 'href="' . $item->url
. '"';
            $item->nname = '<a ' . $item->anchorAttr .
'>' . $item->nname . '</a>';
            break;
          case 1: // _blank
            $item->anchorAttr .= 'href="' . $item->url
. '" target="_blank"';
            $item->nname = '<a ' . $item->anchorAttr .
'>' . $item->nname . '</a>';
            break;
          case 2: // window.open
            $specs =
'toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,'
. $this->_params->get('window_open');
            $link = str_replace('index.php',
'index2.php', $item->url);
            $item->anchorAttr .= 'href="' . $item->url
. '"
onclick="window.open(this.href,\'targetWindow\',\''
. $specs . '\');return false;"';
            $item->nname = '<a ' . $item->anchorAttr .
'>' . $item->nname . '</a>';
            break;
        }
      } else {
        $item->nname = '<a>' . $item->nname .
'</a>';
      }
    }

    public function menuOrdering(&$a, &$b)
    {
      if ($a->ordering == $b->ordering) {
        return 0;
      }
      return ($a->ordering < $b->ordering) ? -1 : 1;
    }
  }
}
PK�,�[�^�RRjoomlacontent/config.xmlnu�[���<!--root
translate="1">
    <params
label="Joomla_categories_and_articles_menu_properties">
        <param name="rootasitem" type="onoff"
default="0" label="Singe_root_as_menuitem"
description="If_enabled_and_one_selected_in_the_previous__"/>
        <param name="maxitemsincat" type="text"
default="20" label="Max_articles_per_Category"
description="Used_if_Show_articles_enabled_0_means_unlimited"
/>
        <param name="emptycategory" type="onoff"
default="1" label="Show_empty_categories" />
        <param name="order" type="radio"
label="Order" default="0">
            <option
value="0">Components_default</option>
            <option value="asc">Ascending</option>
            <option value="desc">Descending</option>
        </param>
    </params>
</root-->
<config>
  <params>
		<param name="joomlacategoryid"
type="offlajnjoomlacategories" default="0"
label="CATEGORIES_AS_TOP_LEVEL_CATEGORIES" height="10"
/>
		<param name="showproducts" type="offlajnonoff"
default="0" label="Show articles with categories"
description="" />
		<param name="parenthref" type="offlajnonoff"
default="0" label="Parent items as link"
description="If enabled, the items which have subitems will be
openable." />
    <param name="displaynumprod" check="conditions"
type="offlajnlist" default="0" label="Display
count &lt;br&gt; of sub-items" description="">
      <option value="0">No</option>
      <option
value="1">YES_ONLY_THE_REAL_COUNT</option>
      <option
value="2">YES_THE_AGGREGATED_COUNT_ON_EACH_CATEGORY</option>
    </param>
		<param name="categorylayout" type="offlajnradio"
default="" label="Category layout">
				<option value="">List</option>
				<option value="blog">Blog</option>
		</param>
    <param name="elementorder" type="offlajnlist"
default="0" label="ELEMENT_ORDER"
description="">
      <option value="0">COMPONENT_DEFAULT</option>
      <option
value="1">ALPHABETICAL_ASCENDING</option>
      <option
value="2">ALPHABETICAL_DESCENDING</option>
    </param>
    <param name="subheader" type="offlajncombine"
default="0|*|50|*|" label="Menu-item description">
      <param type="offlajnonoff" check="conditions"
onoff="1" label="SHOW_SUBHEADER"
description="SHOW_SUBHEADER" />
      <param type="offlajntext"
label="LENGTH_SUBHEADER" validation="int"
size="3" description="LENGTH_SUBHEADER" />
    </param>
		<param name="menu_images" check="conditions"
type="offlajnonoff" default="0" label="Show
menu-item icons" description=""/>
    <param type="offlajncombine" if="menu_images"
name="resizeicon"
default="0|*|32||px|*|32||px|*|32||px|*|0" label="Resize
menu-item icons" description="">
      <param type="offlajnonoff" onoff="1"
label="Advanced" description=""/>
      <param size="2" validation="int"
type="offlajntext" label="Max width">
        <unit>px</unit>
      </param>
      <param type="offlajnclear"/>
      <param size="2" validation="int"
type="offlajntext" label="Width">
        <unit>px</unit>
      </param>
      <param size="2" validation="int"
type="offlajntext" label="Height">
        <unit>px</unit>
      </param>
      <param type="offlajnswitcher" label="-">
        <unit value="1">Scale</unit>
        <unit value="0">Crop</unit>
      </param>
    </param>
    <param type="offlajncombine" if="menu_images"
name="iconborderradius" default="0|*|0|*|0|*|0|*|px"
label="Menu-item icon &lt;br&gt; border-radius"
description="">
      <param size="2" validation="int"
type="offlajntext" label="Top-left"/>
      <param size="2" validation="int"
type="offlajntext" label="Top-right"/>
      <param size="2" validation="int"
type="offlajntext" label="Bottom-right"/>
      <param size="2" validation="int"
type="offlajntext" label="Bottom-left"/>
      <param type="offlajnswitcher" label="-">
        <unit value="%">%</unit>
        <unit value="px">px</unit>
      </param>
    </param>
  </params>
</config>PK�,�[�#o,,joomlacontent/index.htmlnu�[���<html><body
bgcolor="#FFFFFF"></body></html>PK�,�[�΀��joomlacontent/menu.phpnu�[���<?php
/**
 * mod_vertical_menu - Vertical Menu
 *
 * @author    Balint Polgarfi
 * @copyright 2014-2019 Offlajn.com All Rights Reserved
 * @license   https://gnu.org/licenses/gpl-2.0.html
 * @link      https://offlajn.com
 */

defined('_JEXEC') or die('Restricted access');

if (!class_exists('OfflajnJoomlaContentMenu2')) {

  require_once dirname(__FILE__) . '/../../core/MenuBase.php';

  class OfflajnJoomlaContentMenu2 extends OfflajnMenuBase2
  {
    public function __construct(&$menu, &$module)
    {
      parent::__construct($menu, $module);
    }

    public function getAllItems()
    {
      $lang = JFactory::getLanguage()->getTag();
      $db = JFactory::getDBO();
      $categoryid = explode("|",
$this->_params->get('joomlacategoryid'));
      $user = JFactory::getUser(); //get user for ACL
      $groups = implode(',',
$user->getAuthorisedViewLevels());
      $query = "SELECT DISTINCT a.id AS id, a.title AS name, a.alias,
a.note, params, ";
      if (!is_array($categoryid) && $categoryid != 0) {
        $query .= "IF(a.parent_id = " . $categoryid . ", 0 ,
IF(a.parent_id = 1, -1, a.parent_id)) AS parent, ";
      } else if (count($categoryid) && is_array($categoryid)
&& !in_array('0', $categoryid)) {
        $query .= "IF(a.id in (" . implode(',',
$categoryid) . "), 0 , IF(a.parent_id = 1, -1, a.parent_id)) AS
parent, ";
      } else {
        $query .= "IF(a.parent_id = 1, 0, a.parent_id) AS parent,
";
      }
      $query .= "'cat' AS typ, ";
      if ($this->_params->get('displaynumprod', 0) != 0) {
        $query .= "(SELECT COUNT(*) FROM #__content AS ax WHERE
ax.catid = a.id AND ax.state = 1 AND ax.access IN ($groups) AND
(ax.language = '*' OR ax.language = '$lang')) AS
productnum";
      } else {
        $query .= "0 AS productnum";
      }

      $query .= " FROM #__categories AS a WHERE a.published = 1 AND
a.extension = 'com_content' AND access IN ($groups) AND
(a.language = '*' OR a.language = '$lang') ";

      if ($this->_params->get('elementorder', 0) == 1) {
        $query .= "ORDER BY name ASC";
      } else if ($this->_params->get('elementorder', 0) ==
2) {
        $query .= "ORDER BY name DESC";
      } else {
        $query .= "ORDER BY a.lft ASC, name DESC";
      }

      $db->setQuery($query);
      $allItems = $db->loadObjectList('id');

      if ($this->_params->get('showproducts') == 1) {

        $query = "SELECT concat(a.catid,'-',a.id) AS id,
a.id AS id2, a.title AS name, a.introtext AS description, a.catid AS
parent, a.alias, a.access, 'prod' AS typ, 0 AS productnum,
'' AS image
                FROM #__content AS a
                WHERE a.state = 1 AND a.access IN ($groups) AND (a.language
= '*' OR a.language = '$lang') ";

        if ($this->_params->get('elementorder', 0) == 1) {
          $query .= "ORDER BY a.title ASC";
        } else if ($this->_params->get('elementorder', 0)
== 2) {
          $query .= "ORDER BY a.title DESC";
        } else {
          $query .= "ORDER BY a.ordering ASC, a.title DESC";
        }

        $db->setQuery($query);
        $rows = $db->loadObjectList('id');
        /*
        if ($this->_config['maxitemsincat'] > 0) {
        $cats = array();
        $keys = array_keys($rows);
        for ($x = 0; $x < count($keys); ++$x) {
        $value = $rows[$keys[$x]];
        if (!isset($cats[$value->parent])) {
        $cats[$value->parent] = 0;
        }
        $cats[$value->parent] ++;
        if ($cats[$value->parent] >
$this->_config['maxitemsincat']) {
        unset($rows[$keys[$x]]);
        }
        }
        }
         */
        $allItems += $rows;
      }
      return $allItems;
    }

    public function getActiveItem()
    {
      $db = JFactory::getDBO();
      $active = null;
      if (JRequest::getVar('option') == 'com_content')
{
        $content_id = 0;
        $category_id = 0;
        if (JRequest::getVar('view') == "category") {
          $category_id = JRequest::getInt('id');
        } elseif (JRequest::getVar('view') ==
"article") {
          $content_id = JRequest::getInt('id');
          $query = "SELECT catid FROM #__content WHERE id=" .
$content_id;
          $db->setQuery($query);
          $category_id = $db->loadResult();
        }
        if ($content_id > 0 &&
$this->_params->get('showproducts')) {
          $active = new StdClass();
          $active->id = $category_id . "-" . $content_id;
        } elseif ($category_id > 0) {
          $active = new StdClass();
          $active->id = $category_id;
        }
      }
      return $active;
    }

    public function getItemsTree()
    {
      $items = $this->getItems();
      if ($this->_params->get('displaynumprod') == 2) {
        for ($i = count($items) - 1; $i >= 0; $i--) {
          $items[$i]->parent->productnum +=
$items[$i]->productnum;
        }
      }
      /*
      if (!$this->_config['emptycategory']) {
      for ($i = count($items) - 1; $i >= 0; $i--) {
      if ($items[$i]->productnum == 0 && $items[$i]->typ ==
'cat') {

      $parent = &$this->helper[$items[$i]->parent->id];

      if ($items[$i]->lib) {
      array_splice($parent, count($parent) - 1, 1);
      if (count($parent) != 0) {
      $parent[count($parent) - 1]->lib = true;
      }
      } else if ($items[$i]->fib) {
      array_splice($parent, 0, 1);
      if (count($parent) != 0) {
      $parent[0]->fib = true;
      }
      } else {
      $key = array_search($items[$i], $parent);
      if ($key !== false) {
      array_splice($parent, $key, 1);
      }
      }
      array_splice($items, $i, 1);
      }
      }
      }
       */
      return $items;
    }

    public function filterItem(&$item)
    {
      $item->nname = $item->title = stripslashes($item->name);
      $item->nname = '<span>' . $item->nname .
'</span>';
      if ($this->_params->get('displaynumprod') &&
$item->productnum != 0) {
        $length = strlen($item->productnum) == 1 ? "one" :
"more";
        $item->number = '<span class="productnum ' .
$length . '">' . $item->productnum .
'</span>';
      }
      $item->anchorAttr = '';
      if ($item->typ == 'cat') {

        if ($this->_params->get('menu_images')) {
          $params = new JRegistry($item->params);
          if (($image = $params->get('image', ''))
!= '') {
            $item->image = JUri::Root() . $image;
          }
        }

        $item->anchorAttr = 'href="' .
       
JRoute::_('index.php?option=com_content&view=category&id='
.
          $item->id .
($this->_params->get('categorylayout') != '' ?
'&layout=' .
$this->_params->get('categorylayout') : '')) .
'"';

      } else if ($item->typ == 'prod') {
        $id = explode("-", $item->id);
        $item->anchorAttr = 'href="' .
       
JRoute::_('index.php?option=com_content&view=article&id='
. $id[1] . ':' . $item->alias . '&catid=' .
$id[0] . ':' . $item->parent->alias) . '"';
      }
      if (isset($item->note)) {
        // badges
        if ($this->_params->get('badge')) {
          if (preg_match('/^[\[\(](.+?)[\]\)]/', $item->note,
$m)) {
            $item->note = trim(substr($item->note, strlen($m[0])));
            $class = $m[0][0] == '[' ?
'"sm-square-badge"' :
'"sm-round-badge"';
            $item->badge = "<span
class=$class>{$m[1]}</span>";
          }
        }
      }
      if (isset($item->note) || isset($item->description)) {
        $subHeader =
OfflajnParser::parse($this->_params->get('subheader'));
        if ($subHeader[0]) {
          $desc = !empty($item->note) ? $item->note :
strip_tags($item->description);
          $item->description = strlen($desc) <= $subHeader[1] ? $desc
: substr($desc, 0, $subHeader[1]) . '...';
        } else {
          $item->description = '';
        }

      }
    }

  }
}
PK�,�[�[�bbjshopping/config.xmlnu�[���<config>
  <params>
      <param name="jshoppingcategoryid"
type="offlajnjshoppingcategories" default="0"
label="CATEGORIES_AS_TOP_LEVEL_CATEGORIES"
description="YOU_CAN_TEST_THE_WORKING_ON_OUR_DEMO_SITE_YOU_CAN_USE_CTRLCLICK_TO_SELECT_MULTIPLE"
height="10" />
			<param name="parenthref" type="offlajnonoff"
default="0" label="Parent items as link"
description="If enabled, the items which have subitems will be
openable." />
    <param name="displaynumprod" type="offlajnlist"
default="0" label="DISPLAY_THE_NUMBER_OF_PRODUCTS"
description="IF_YOU_CHECK_YES_IT_WILL_ADD_THE_COUNT_PRODUCTS_TO_THE_CATEGORY_EG_CATEGORY_NAME10">
      <option value="0">No</option>
      <option
value="1">YES_ONLY_THE_REAL_COUNT</option>
      <option
value="2">YES_THE_AGGREGATED_COUNT_ON_EACH_CATEGORY</option>
    </param>
    <param name="elementorder" type="offlajnlist"
default="0" label="ELEMENT_ORDER"
description="">
      <option value="0">COMPONENT_DEFAULT</option>
      <option
value="1">ALPHABETICAL_ASCENDING</option>
      <option
value="2">ALPHABETICAL_DESCENDING</option>
    </param>
  </params>
</config>PK�,�[�#o,,jshopping/index.htmlnu�[���<html><body
bgcolor="#FFFFFF"></body></html>PK�,�[��RRjshopping/menu.phpnu�[���<?php
/**
 * mod_vertical_menu - Vertical Menu
 *
 * @author    Balint Polgarfi
 * @copyright 2014-2019 Offlajn.com All Rights Reserved
 * @license   https://gnu.org/licenses/gpl-2.0.html
 * @link      https://offlajn.com
 */

defined('_JEXEC') or die('Restricted access');

if (!class_exists('OfflajnJshoppingMenu2')) {

  if (!is_dir(JPATH_ROOT .
'/components/com_jshopping/controllers')) {
    echo JText::_("JShopping component is not installed!");
    return;
  }

  require_once dirname(__FILE__) . '/../../core/MenuBase.php';

  class OfflajnJshoppingMenu2 extends OfflajnMenuBase2
  {
    public function __construct($module, $params)
    {
      parent::__construct($module, $params);
    }

    public function getAllItems()
    {
      $db = JFactory::getDBO();
      $lang = JFactory::getLanguage()->getTag();
      $categoryid = $this->_params->get('categoryid');
      $query = "SELECT DISTINCT
        category_id AS id,
        `name_$lang` AS name, ";
      if ($this->_params->get('displaynumprod', 0) != 0) {
        $query .= "(SELECT COUNT(*) FROM
#__jshopping_products_to_categories AS ax LEFT JOIN #__jshopping_products
AS bp ON ax.product_id = bp.product_id WHERE ax.category_id = id AND
bp.product_publish=1";
        $query .= ") AS productnum, ";
      } else {
        $query .= "0 AS productnum, ";
      }
      if (!is_array($categoryid) && $categoryid != 0) {
        $query .= "IF(category_parent_id = " . $categoryid .
", 0 , IF(category_parent_id = 0, -1, category_parent_id)) AS parent,
";
      } elseif (count($categoryid) && is_array($categoryid)
&& !in_array('0', $categoryid)) {
        $query .= "IF(category_id in (" . implode(',',
$categoryid) . "), 0 , IF(category_parent_id = 0, -1,
category_parent_id)) AS parent, ";
      } else {
        $query .= "category_parent_id AS parent, ";
      }
      $query .= "'cat' AS typ ";
      $query .= " FROM #__jshopping_categories WHERE category_publish
=1 ";
      if ($this->_params->get('elementorder', 0) == 0) {
        $query .= "ORDER BY ordering ASC, `name_$lang` DESC";
      } else if ($this->_params->get('elementorder', 0) ==
1) {
        $query .= "ORDER BY `name_$lang` ASC";
      } else if ($this->_params->get('elementorder', 0) ==
2) {
        $query .= "ORDER BY `name_$lang` DESC";
      }

      $db->setQuery($query);
      $allItems = $db->loadObjectList('id');

      if ($this->_params->get('showcontents') == 1) {
        $query = "
          SELECT DISTINCT b.product_id, concat( a.category_id,
'-', a.product_id ) AS id, b.product_name AS name, a.category_id
AS parent, 'prod' AS typ, 0 AS productnum
          FROM #__jshopping_products_to_categories AS a
          LEFT JOIN #__jshopping_products AS b ON a.product_id =
b.product_id
          WHERE product_publish = 1 ";
        if ($this->_params->get('elementorder', 0) == 2) {
          $query .= "ORDER BY name_$lang DESC";
        } else {
          $query .= "ORDER BY name_$lang ASC";
        }

        $db->setQuery($query);
        $allItems += $db->loadObjectList('id');
      }
      return $allItems;
    }

    public function getActiveItem()
    {
      $active = null;
      if (JRequest::getVar('option') ==
'com_jshopping') {
        $content_id = 0;
        $category_id = 0;
        if (JRequest::getString('controller') ==
"category") {
          $category_id = JRequest::getInt('category_id');
        } elseif (JRequest::getString('controller') ==
"product") {
          $content_id = JRequest::getInt('product_id');
          $category_id = JRequest::getInt('category_id');
        }
        if ($content_id > 0 &&
$this->_params->get('showcontents')) {
          $active = new StdClass();
          $active->id = $category_id . "-" . $content_id;
        } elseif ($category_id > 0) {
          $active = new StdClass();
          $active->id = $category_id;
        }
      }
      return $active;
    }

    public function getItemsTree()
    {
      $items = $this->getItems();

      return $items;
    }

    public function filterItem(&$item)
    {
      $item->nname = $item->title = stripslashes($item->name);

      if (!empty($item->productnum)) {
        $length = strlen($item->productnum) == 1 ? "one" :
"more";
        if ($this->_params->get('displaynumprod', 0) == 1
&& $item->typ == 'cat' && $item->productnum
> 0) {
          $item->number = '<span class="productnum ' .
$length . '">' . $item->productnum .
'</span>';
          $item->nname .= $item->number;
        } elseif ($this->_params->get('displaynumprod', 0)
== 2 && $item->typ == 'cat') {
          $item->number = '<span class="productnum ' .
$length . '">' . $item->productnum .
'</span>';
          $item->nname .= $item->number;
        }
      }
      $item->nname = '<span>' . $item->nname .
'</span>';

      $item->anchorAttr = '';
      if ($item->typ == 'cat') {
        if ($this->_params->get('parentlink') == 0
&& $item->p) {
          $item->nname = '<a>' . $item->nname .
'</a>';
        } else {
          $item->anchorAttr = 'href="' .
JRoute::_('index.php?option=com_jshopping&controller=category&task=view&category_id='
. $item->id) . '"';
          $item->nname = '<a ' . $item->anchorAttr .
'>' . $item->nname . '</a>';
        }
      } elseif ($item->typ == 'prod') {
        $id = explode("-", $item->id);
        $item->anchorAttr = 'href="' .
JRoute::_('index.php?option=com_jshopping&controller=product&task=view&product_id='
. $id[1] . '&category_id=' . $id[0]) . '"';
        $item->nname = '<a ' . $item->anchorAttr .
'>' . $item->nname . '</a>';
      }
    }

  }
}
PK�,�[e�>6
k2/config.xmlnu�[���<config>
  <params>
    <param name="k2categoryid"
type="offlajnk2categories" default="0"
label="Categories as top level categories"
description="" height="10" />
    <param name="showcontents" type="offlajnonoff"
default="0" label="Show items with categories"
description="" />
		<param name="parenthref" type="offlajnonoff"
default="0" label="Parent items as link"
description="If enabled, the items which have subitems will be
openable." />
    <param name="displaynumprod" type="offlajnlist"
default="0" label="Display the number of sub-items"
description="IF_YOU_CHECK_YES_IT_WILL_ADD_THE_COUNT_PRODUCTS_TO_THE_CATEGORY_EG_CATEGORY_NAME10">
      <option value="0">No</option>
      <option
value="1">YES_ONLY_THE_REAL_COUNT</option>
      <option
value="2">YES_THE_AGGREGATED_COUNT_ON_EACH_CATEGORY</option>
    </param>
    <param name="elementorder" type="offlajnlist"
default="0" label="ELEMENT_ORDER"
description="">
      <option value="0">COMPONENT_DEFAULT</option>
      <option
value="1">ALPHABETICAL_ASCENDING</option>
      <option
value="2">ALPHABETICAL_DESCENDING</option>
    </param>
    <!--param name="maxitemsincat"
type="offlajntext" default="20" label="Max. Items
per Category" description=""
attach_unit="0"/-->
    <param name="menu_images" check="conditions"
type="offlajnonoff" default="0" label="Show
menu-item icons" description=""/>
    <param type="offlajncombine" if="menu_images"
name="resizeicon"
default="0|*|32||px|*|32||px|*|32||px|*|0" label="Resize
menu-item icons" description="">
      <param type="offlajnonoff" default="0"
onoff="1" label="Advanced"
description=""/>
      <param size="2" validation="int"
type="offlajntext" label="Max width">
        <unit>px</unit>
      </param>
      <param type="offlajnclear"/>
      <param size="2" validation="int"
type="offlajntext" label="Width">
        <unit>px</unit>
      </param>
      <param size="2" validation="int"
type="offlajntext" label="Height">
        <unit>px</unit>
      </param>
      <param type="offlajnswitcher" label="-">
        <unit value="1">Scale</unit>
        <unit value="0">Crop</unit>
      </param>
    </param>
    <param type="offlajncombine" if="menu_images"
name="iconborderradius" default="0|*|0|*|0|*|0|*|px"
label="Menu-item icon &lt;br&gt; border-radius"
description="">
      <param size="2" validation="int"
type="offlajntext" label="Top-left"/>
      <param size="2" validation="int"
type="offlajntext" label="Top-right"/>
      <param size="2" validation="int"
type="offlajntext" label="Bottom-right"/>
      <param size="2" validation="int"
type="offlajntext" label="Bottom-left"/>
      <param type="offlajnswitcher" label="-">
        <unit value="%">%</unit>
        <unit value="px">px</unit>
      </param>
    </param>
  </params>
</config>PK�,�[�#o,,
k2/index.htmlnu�[���<html><body
bgcolor="#FFFFFF"></body></html>PK�,�[x�vppk2/menu.phpnu�[���<?php
/**
 * mod_vertical_menu - Vertical Menu
 *
 * @author    Balint Polgarfi
 * @copyright 2014-2019 Offlajn.com All Rights Reserved
 * @license   https://gnu.org/licenses/gpl-2.0.html
 * @link      https://offlajn.com
 */

defined('_JEXEC') or die('Restricted access');

if (!class_exists('OfflajnK2Menu2')) {

  if (!is_dir(JPATH_SITE . '/components/com_k2/helpers')) {
    echo JText::_("K2 component is not installed!");
    return;
  }

  require_once dirname(__FILE__) . '/../../core/MenuBase.php';
  require_once JPATH_SITE .
'/components/com_k2/helpers/route.php';

  class OfflajnK2Menu2 extends OfflajnMenuBase2
  {

    public function __construct($module, $params)
    {
      parent::__construct($module, $params);
    }

    public function getAllItems()
    {
      $db = JFactory::getDBO();
      $categoryid = explode("|",
$this->_params->get('k2categoryid'));

      //for user level check
      $user = JFactory::getUser();
      $aid = $user->get('aid');

      $query = "SELECT DISTINCT
        id AS id,
        name AS name,
        image as itemimage, ";
      if (!is_array($categoryid) && $categoryid != 0) {
        $query .= "IF(parent = " . $categoryid . ", 0 ,
IF(parent = 0, -1, parent)) AS parent, ";
      } elseif (count($categoryid) && is_array($categoryid)
&& !in_array('0', $categoryid)) {
        $query .= "IF(id in (" . implode(',',
$categoryid) . "), 0 , IF(parent = 0, -1, parent)) AS parent, ";
      } else {
        $query .= "parent AS parent, ";
      }
      $query .= "'cat' AS typ ";
      $query .= " FROM #__k2_categories
                WHERE published=1 AND trash=0";

      if (K2_JVERSION != '15') {
        $query .= " AND access IN(" . implode(',',
$user->getAuthorisedViewLevels()) . ") ";
      } else {
        $query .= " AND access<={$aid} ";
      }

      if ($this->_params->get('elementorder', 0) == 0) {
        $query .= "ORDER BY ordering ASC, name DESC";
      } else if ($this->_params->get('elementorder', 0) ==
1) {
        $query .= "ORDER BY name ASC";
      } else if ($this->_params->get('elementorder', 0) ==
2) {
        $query .= "ORDER BY name DESC";
      }

      $db->setQuery($query);

      $allItems = $db->loadObjectList('id');

      if ($this->_params->get('showcontents') == 1) {
        $query = "
          SELECT concat(a.catid,'-',a.id) AS id, a.id AS
id2,a.title AS name, a.catid AS parent, a.access, a.alias, 'con'
AS typ, ";

        if ($this->_params->get('displaynumprod', 0) != 0)
{
          $query .= "(SELECT COUNT(*) FROM #__k2_categories AS bp LEFT
JOIN #__k2_items AS ax  ON ax.catid = bp.id WHERE bp.id=a.catid AND
ax.published = 1 AND ax.trash = 0 ";
          $query .= ") AS productnum";
        } else {
          $query .= "0 AS productnum";
        }

        $query .= " FROM #__k2_items AS a
            WHERE a.published = 1 AND
            a.trash = 0 ";

        if (K2_JVERSION != '15') {
          $query .= " AND a.access IN(" . implode(',',
$user->getAuthorisedViewLevels()) . ") ";
        } else {
          $query .= " AND a.access<={$aid} ";
        }

        if ($this->_params->get('elementorder', 0) == 0) {
          $query .= "ORDER BY a.ordering ASC, a.title DESC";
        } else if ($this->_params->get('elementorder', 0)
== 1) {
          $query .= "ORDER BY a.title ASC";
        } else if ($this->_params->get('elementorder', 0)
== 2) {
          $query .= "ORDER BY a.title DESC";
        }

        $db->setQuery($query);
        $rows = $db->loadObjectList('id');
        $cats = array();
        $unset = "";
        $keys = array_keys($rows);
        for ($x = 0; $x < count($keys); ++$x) {
          $value = $rows[$keys[$x]];
          if (!isset($cats[$value->parent])) {
            $cats[$value->parent] = 0;
          }

          $cats[$value->parent]++;
          /*if
($cats[$value->parent]>$this->_params->get('maxitemsincat',
20))
        unset($rows[$keys[$x]]);  */
        }
        $allItems += $rows;
      }
      return $allItems;
    }

    public function getActiveItem()
    {
      $db = JFactory::getDBO();
      $active = null;
      if (JRequest::getVar('option') == 'com_k2') {
        $content_id = 0;
        $category_id = 0;
        if (JRequest::getVar('task') == "category") {
          $category_id = JRequest::getInt('id');
        } elseif (JRequest::getVar('view') == "item")
{
          $content_id = JRequest::getInt('id');
          $query = "SELECT catid FROM #__k2_items WHERE id=" .
$content_id;
          $db->setQuery($query);
          $category_id = $db->loadResult();
        }
        if ($content_id > 0 &&
$this->_params->get('showcontents')) {
          $active = new StdClass();
          $active->id = $category_id . "-" . $content_id;
        } elseif ($category_id > 0) {
          $active = new StdClass();
          $active->id = $category_id;
        }
      }
      return $active;
    }

    public function getItemsTree()
    {
      $items = $this->getItems();
      $displaynumprod =
$this->_params->get('displaynumprod', 0);
      if ($displaynumprod > 0) {
        for ($i = count($items); $i--;) {
          if (!($items[$i]->typ == "con" && $items[$i
- 1]->typ == "con" && $items[$i]->parent ==
$items[$i - 1]->parent)) {
            if (!isset($items[$i]->parent->productnum)) {
              $items[$i]->parent->productnum = -1;
            }

            if ($displaynumprod == 1) {
              $items[$i]->parent->productnum++;
            } else {
              $items[$i]->parent->productnum +=
isset($items[$i]->productnum) ? $items[$i]->productnum : 1;
            }

          }
        }
      }
      return $items;
    }

    public function filterItem(&$item)
    {
      $item->title = $item->name;

      if (!empty($item->productnum)) {
        $length = strlen($item->productnum) == 1 ? "one" :
"more";
        if ($this->_params->get('displaynumprod', 0) == 1
&& $item->typ == 'cat' &&
@$item->productnum > 0) {
          $item->number = '<span class="productnum ' .
$length . '">' . $item->productnum .
'</span>';
          $item->nname .= $item->number;
        } elseif ($this->_params->get('displaynumprod', 0)
== 2 && $item->typ == 'cat') {
          $item->number = '<span class="productnum ' .
$length . '">' . $item->productnum .
'</span>';
          $item->nname .= $item->number;
        }
      }
      $item->nname = '<span>' . $item->title .
'</span>';

      $image = '';
      if ($this->_params->get('menu_images') &&
$item->itemimage != '') {
        $item->image = JUri::Root(false) .
'/media/k2/categories/' . $item->itemimage;
        $image = '<img src="' . $item->itemimage .
'" />';
        switch ($this->_params->get('menu_images_align',
0)) {
          case 1:
            $item->nname = $item->nname . $image;
            break;
          default:
            $item->nname = $image . $item->nname;
            break;
        }
      }

      $item->anchorAttr = '';
      if ($item->typ == 'cat') {
        if ($this->_params->get('parentlink') == 0
&& $item->p) {
          $item->nname = '<a>' . $item->nname .
'</a>';
        } else {
          $item->anchorAttr = 'href="' .
JRoute::_(K2HelperRoute::getCategoryRoute($item->id)) .
'"';
          $item->nname = '<a ' . $item->anchorAttr .
'>' . $item->nname . '</a>';
        }
      } elseif ($item->typ == 'con') {
        $id = explode("-", $item->id);
        $item->anchorAttr = 'href="' .
JRoute::_(K2HelperRoute::getItemRoute($id[1], $id[0])) .
'"';
        $item->nname = '<a ' . $item->anchorAttr .
'>' . $item->nname . '</a>';
      }
    }

  }
}
PK�,�[�(`}>>mijoshop/config.xmlnu�[���<config>
  <params>
      <param name="mijoshopcategories"
type="offlajnmijoshopcategories" default="0"
label="CATEGORIES_AS_TOP_LEVEL_CATEGORIES"
description="YOU_CAN_TEST_THE_WORKING_ON_OUR_DEMO_SITE_YOU_CAN_USE_CTRLCLICK_TO_SELECT_MULTIPLE"
height="10" />
      <param name="showproducts" type="offlajnonoff"
default="0" label="SHOW_PRODUCTS_WITH_THE_CATEGORIES"
description="" />
			<param name="parenthref" type="offlajnonoff"
default="0" label="Parent items as link"
description="If enabled, the items which have subitems will be
openable." />
    <param name="displaynumprod" type="offlajnlist"
default="0" label="DISPLAY_THE_NUMBER_OF_PRODUCTS"
description="IF_YOU_CHECK_YES_IT_WILL_ADD_THE_COUNT_PRODUCTS_TO_THE_CATEGORY_EG_CATEGORY_NAME10">
      <option value="0">No</option>
      <option
value="1">YES_ONLY_THE_REAL_COUNT</option>
      <option
value="2">YES_THE_AGGREGATED_COUNT_ON_EACH_CATEGORY</option>
    </param>
    <param name="subheader" type="offlajncombine"
default="0|*|50|*|" label="Menu-item description">
      <param type="offlajnonoff" check="conditions"
onoff="1" label="SHOW_SUBHEADER"
description="SHOW_SUBHEADER" />
      <param type="offlajntext"
label="LENGTH_SUBHEADER" validation="int"
size="3" description="LENGTH_SUBHEADER" />
    </param>
    <param name="elementorder" type="offlajnlist"
default="0" label="ELEMENT_ORDER"
description="">
      <option value="0">COMPONENT_DEFAULT</option>
      <option
value="1">ALPHABETICAL_ASCENDING</option>
      <option
value="2">ALPHABETICAL_DESCENDING</option>
    </param>
  </params>
</config>PK�,�[�#o,,mijoshop/index.htmlnu�[���<html><body
bgcolor="#FFFFFF"></body></html>PK�,�[�q�Do(o(mijoshop/menu.phpnu�[���<?php
/**
 * mod_vertical_menu - Vertical Menu
 *
 * @author    Balint Polgarfi
 * @copyright 2014-2019 Offlajn.com All Rights Reserved
 * @license   https://gnu.org/licenses/gpl-2.0.html
 * @link      https://offlajn.com
 */

defined('_JEXEC') or die('Restricted access');

if (!class_exists('OfflajnMijoShopMenu2')) {

  require_once dirname(__FILE__) . '/../../core/MenuBase.php';
  require_once JPATH_ROOT .
'/components/com_mijoshop/mijoshop/mijoshop.php';

  class OfflajnMijoShopMenu2 extends OfflajnMenuBase2
  {

    public function __construct($module, $params)
    {
      parent::__construct($module, $params);
    }

    public function getAllItems()
    {
      //MijoShop init
      $config =
MijoShop::get('opencart')->get('config');
      $this->_config['lang'] = 1;
      if (is_object($config)) {
        $this->_config['lang'] =
intval($config->get('config_language_id'));
      }
      $this->_router = MijoShop::get('router');
      $this->_mijoshopmenu = $this->_router->getMenu();
      $component =
JComponentHelper::getComponent('com_mijoshop');
      $this->mijoshopitems =
$this->_mijoshopmenu->getItems('component_id',
$component->id);
      $this->mijoshopstoreid =
MijoShop::get('base')->getStoreId();
      $this->mijoshopitemid = $this->getHomeItemid();
      $this->_config['root'] = explode("|",
$this->_params->get('mijoshopcategories'));
      if (count($this->_config['root']) == 0) {
        $this->_config['root'] = array(0);
      }$this->_config['showproducts'] =
$this->_params->get('showproducts');
      $this->_config['emptycategory'] =
$this->_params->get('emptycategory');
      $this->_config['order'] =
$this->_params->get('elementorder');
      $db = JFactory::getDBO();

      $query = "SELECT DISTINCT c.category_id AS id, cd.name,
cd.description, '" . $this->mijoshopitemid . "' AS
itemid, ";
      if ($this->_config['displaynum'] ||
!$this->_config['emptycategory']) {
        $query .= "( SELECT COUNT(*) FROM
#__mijoshop_product_to_category AS ax LEFT JOIN #__mijoshop_product AS bp
ON ax.product_id = bp.product_id WHERE ax.category_id = c.category_id AND
bp.status=1";
        $query .= ") AS productnum, ";
      } else {
        $query .= "0 AS productnum, ";
      }if (!$this->_config['rootasitem'] &&
count($this->_config['root']) == 1) {
        $query .= "IF(c.parent_id = " .
$this->_config['root'][0] . ", 0 , IF(c.parent_id = 0,
-1, c.parent_id)) AS parent, ";
      } else if (!in_array('0',
$this->_config['root'])) {
        $query .= "IF(c.category_id in (" .
implode(',', $this->_config['root']) . "), 0 ,
IF(c.parent_id = 0, -1, c.parent_id)) AS parent, ";
      } else {
        $query .= "c.parent_id AS parent, ";
      }$query .= "'cat' AS typ ";
      $query .= " FROM #__mijoshop_category AS c LEFT JOIN
#__mijoshop_category_description AS cd ON cd.category_id = c.category_id
WHERE c.status = 1 AND cd.language_id = " .
$this->_config['lang'] . " ";
      if ($this->_config['order'] == "asc") {
        $query .= "ORDER BY cd.name ASC";
      } else if ($this->_config['order'] == "desc")
{
        $query .= "ORDER BY cd.name DESC";
      } else {
        $query .= "ORDER BY sort_order ASC, cd.name ASC";
      }$db->setQuery($query);
      $allItems = $db->loadObjectList('id');

      if ($this->_config['showproducts']) {
        $query = " SELECT DISTINCT p.product_id, '" .
$this->mijoshopitemid . "' AS itemid, pd.description AS
description, concat( pc.category_id, '-', p.product_id ) AS id,
pd.name, pc.category_id AS parent, 'prod' AS typ, 0 AS productnum
FROM #__mijoshop_product AS p LEFT JOIN #__mijoshop_product_description AS
pd ON p.product_id = pd.product_id LEFT JOIN
#__mijoshop_product_to_category AS pc ON p.product_id = pc.product_id WHERE
p.status = 1 AND pd.language_id = " .
$this->_config['lang'] . " ";
        if ($this->_config['order'] == "desc") {
          $query .= "ORDER BY pd.name DESC";
        } else {
          $query .= "ORDER BY pd.name ASC";
        }$db->setQuery($query);
        $allItems += $db->loadObjectList('id');
      }
      return $allItems;
    }

    public function getActiveItem()
    {
      $active = null;
      if (JRequest::getVar('option') == 'com_mijoshop')
{
        $product_id = 0;
        $category_id = 0;
        if (JRequest::getVar('route') ==
'product/category' && JRequest::getVar('path')
!= '') {
          $cats = explode('_',
JRequest::getVar('path'));
          $category_id = $cats[count($cats) - 1];
        } else if (JRequest::getVar('route') ==
'product/product' &&
JRequest::getInt('product_id') > 0) {
          $product_id = JRequest::getInt('product_id');
          $db = JFactory::getDBO();
          $db->setQuery('SELECT category_id FROM
#__mijoshop_product_to_category WHERE product_id = "' .
$product_id . '"');
          $categories = $db->loadRowList();
          foreach ($categories as $c) {
            if (isset($this->allItems[$c[0] . '-' .
$product_id])) {
              $category_id = $c[0];
              break;
            }
          }
        }if ($product_id > 0 &&
$this->_config['showproducts']) {
          $active = new StdClass();
          $active->id = $category_id . "-" . $product_id;
        } elseif ($category_id > 0) {
          $active = new StdClass();
          $active->id = $category_id;
        }
      }
      return $active;
    }

    public function getItemsTree()
    {
      return $this->getItems();
    }

    public function filterItem(&$item)
    {
      $item->nname = $item->title = stripslashes($item->name);

      if (!empty($item->description)) {
        // badges
        if ($this->_params->get('badge')) {
          if (preg_match('/^[\[\(](.+?)[\]\)]/', $item->note,
$m)) {
            $item->note = substr($item->note, strlen($m[0]));
            $class = $m[0][0] == '[' ?
'"sm-square-badge"' :
'"sm-round-badge"';
            $item->badge = "<span
class=$class>{$m[1]}</span>";
          }
        }

        $subHeader =
OfflajnParser::parse($this->_params->get('subheader'));
        if ($subHeader[0]) {
          $desc = strip_tags(html_entity_decode($item->description));
          $item->description = strlen($desc) <= $subHeader[1] ? $desc
: substr($desc, 0, $subHeader[1]) . '...';
        } else {
          $item->description = "";
        }
      }

      $length = strlen($item->productnum) == 1 ? "one" :
"more";
      if ($this->_params->get('displaynumprod', 0) == 1
&& $item->typ == 'cat' && $item->productnum
> 0) {
        $item->number = '<span class="productnum ' .
$length . '">' . $item->productnum .
'</span>';
        $item->nname .= $item->number;
      } elseif ($this->_params->get('displaynumprod', 0) ==
2 && $item->typ == 'cat') {
        $item->number = '<span class="productnum ' .
$length . '">' . $item->productnum .
'</span>';
        $item->nname .= $item->number;
      }
      $item->nname = '<span>' . $item->nname .
'</span>';

      $item->anchorAttr = '';
      if ($item->typ == 'cat') {
        if ($this->_params->get('parentlink') == 0
&& $item->p) {
          $item->nname = '<a>' . $item->nname .
'</a>';
        } else {
          $item->itemid = $this->getCategoryItemid($item);
          $item->anchorAttr = 'href="' .
$this->route('index.php?option=com_mijoshop&route=product/category&path='
. $item->id . '&Itemid=' . $item->itemid) .
'"';
          $item->nname = '<a ' . $item->anchorAttr .
'>' . $item->nname . '</a>';
        }
      } elseif ($item->typ == 'prod') {
        $id = explode("-", $item->id);
        $item->itemid = $this->getCategoryItemid($item);
        $item->anchorAttr = 'href="' .
$this->route('index.php?option=com_mijoshop&route=product/product&product_id='
. $id[1] . '&Itemid=' . $item->itemid) .
'"';
        $item->nname = '<a ' . $item->anchorAttr .
'>' . $item->nname . '</a>';
      }
    }

    public function route($url)
    {
      $url = JRoute::_($url);
      $url = str_replace('&amp;', '&', $url);
      $url = str_replace('component/mijoshop/shop',
'component/mijoshop', $url);
      return $url;
    }

    public function getCategoryItemid($it)
    {
      $menu_id = null;
      foreach ($this->mijoshopitems as $item) {
        $params = $item->params instanceof JRegistry ? $item->params
: $menu->getParams($item->id);

        if ($params->get('mijoshop_store_id', 0) !=
$this->mijoshopstoreid) {
          continue;
        }
        if (isset($item->query['view']) &&
$item->query['view'] == 'category') {
          if (isset($item->query['path']) &&
$item->query['path'] == $it->id) {
            $menu_id = $item->id;
            break;
          }
        }
      }
      if (empty($menu_id)) {
        if (empty($it->parent->itemid)) {
          $it->parent->itemid = $this->mijoshopitemid;
        }

        return $it->parent->itemid;
      }
      return $menu_id;
    }

    public function getProductItemid($it)
    {
      $menu_id = null;
      foreach ($this->mijoshopitems as $item) {
        $params = $item->params instanceof JRegistry ? $item->params
: $menu->getParams($item->id);

        if ($params->get('mijoshop_store_id', 0) !=
$this->mijoshopstoreid) {
          continue;
        }
        if (isset($item->query['view']) &&
$item->query['view'] == 'product') {
          if (isset($item->query['path']) &&
$item->query['path'] == $it->id) {
            $menu_id = $item->id;
            break;
          }
        }
      }
      if (empty($menu_id)) {
        if (empty($it->parent->itemid)) {
          $it->parent->itemid = $this->mijoshopitemid;
        }

        return $it->parent->itemid;
      }
      return $menu_id;
    }

    public function getHomeItemid()
    {
      $home_id = null;
      foreach ($this->mijoshopitems as $item) {
        $params = $item->params instanceof JRegistry ? $item->params
: $menu->getParams($item->id);

        if ($params->get('mijoshop_store_id', 0) !=
$this->mijoshopstoreid) {
          continue;
        }
        if (isset($item->query['view']) &&
$item->query['view'] == 'home') {
          $home_id = $item->id;
          break;
        }
      }
      return $home_id;
    }

  }
}
PK�,�[u^:Kredshop/config.xmlnu�[���<config>
  <params addPath="/modules/mod_accordion_menu/params">
      <param name="redshopcategoryid"
type="offlajnredshopcategories" default="0"
label="CATEGORIES_AS_TOP_LEVEL_CATEGORIES"
description="YOU_CAN_TEST_THE_WORKING_ON_OUR_DEMO_SITE_YOU_CAN_USE_CTRLCLICK_TO_SELECT_MULTIPLE"
height="10" />
      <param name="showproducts" type="offlajnonoff"
default="0" label="SHOW_PRODUCTS_WITH_THE_CATEGORIES"
description="" />
			<param name="parenthref" type="offlajnonoff"
default="0" label="Parent items as link"
description="If enabled, the items which have subitems will be
openable." />
			<param name="displaynumprod" type="offlajnlist"
default="0" label="DISPLAY_THE_NUMBER_OF_PRODUCTS"
description="IF_YOU_CHECK_YES_IT_WILL_ADD_THE_COUNT_PRODUCTS_TO_THE_CATEGORY_EG_CATEGORY_NAME10">
      <option value="0">No</option>
      <option
value="1">YES_ONLY_THE_REAL_COUNT</option>
      <option
value="2">YES_THE_AGGREGATED_COUNT_ON_EACH_CATEGORY</option>
    </param>
    <param name="elementorder" type="offlajnlist"
default="0" label="ELEMENT_ORDER"
description="">
      <option value="0">COMPONENT_DEFAULT</option>
      <option
value="1">ALPHABETICAL_ASCENDING</option>
      <option
value="2">ALPHABETICAL_DESCENDING</option>
    </param>
  </params>
</config>PK�,�[�#o,,redshop/index.htmlnu�[���<html><body
bgcolor="#FFFFFF"></body></html>PK�,�[;��wwredshop/menu.phpnu�[���<?php
/**
 * mod_vertical_menu - Vertical Menu
 *
 * @author    Balint Polgarfi
 * @copyright 2014-2019 Offlajn.com All Rights Reserved
 * @license   https://gnu.org/licenses/gpl-2.0.html
 * @link      https://offlajn.com
 */

defined('_JEXEC') or die('Restricted access');

if (!class_exists('OfflajnRedshopMenu2')) {

  if (!is_dir(JPATH_ROOT .
'/components/com_redshop/controllers')) {
    echo JText::_("RedShop component is not installed!");
    return;
  }

  require_once dirname(__FILE__) . '/../../core/MenuBase.php';

  class OfflajnRedshopMenu2 extends OfflajnMenuBase2
  {

    public function __construct($module, $params)
    {
      parent::__construct($module, $params);
    }

    public function getAllItems()
    {
      $db = JFactory::getDBO();

      $categoryid = explode("|",
$this->_params->get('redshopcategoryid'));

      $query = "SELECT DISTINCT
        category_id AS id,
        category_name AS name, ";
      if ($this->_params->get('displaynumprod', 0) != 0) {
        $query .= "(SELECT COUNT(*) FROM
#__redshop_product_category_xref AS ax LEFT JOIN #__redshop_product AS bp
ON ax.product_id = bp.product_id WHERE ax.category_id = id";
        if (CHECK_STOCK && PSHOP_SHOW_OUT_OF_STOCK_PRODUCTS !=
"1") {
          $query .= " AND bp.product_in_stock > 0 ";
        }
        $query .= ") AS productnum, ";
      } else {
        $query .= "0 AS productnum, ";
      }
      if (!is_array($categoryid) && $categoryid != 0) {
        $query .= "IF(f.category_parent_id = " . $categoryid .
", 0 , IF(f.category_parent_id = 0, -1, f.category_parent_id)) AS
parent, ";
      } elseif (count($categoryid) && is_array($categoryid)
&& !in_array('0', $categoryid)) {
        $query .= "IF(a.category_id in (" .
implode(',', $categoryid) . "), 0 , IF(f.category_parent_id
= 0, -1, f.category_parent_id)) AS parent, ";
      } else {
        $query .= "f.category_parent_id AS parent, ";
      }
      $query .= "'cat' AS typ ";
      $query .= " FROM #__redshop_category AS a,
#__redshop_category_xref AS f
                WHERE published=1 AND a.category_id = f.category_child_id
";
      if ($this->_params->get('elementorder', 0) == 0) {
        $query .= "ORDER BY ordering ASC, name ASC";
      } else if ($this->_params->get('elementorder', 0) ==
1) {
        $query .= "ORDER BY name ASC";
      } else if ($this->_params->get('elementorder', 0) ==
2) {
        $query .= "ORDER BY name DESC";
      }

      $db->setQuery($query);

      $allItems = $db->loadObjectList('id');

      if ($this->_params->get('showcontents') == 1) {
        $query = "
          SELECT DISTINCT b.product_id, concat( a.category_id,
'-', a.product_id ) AS id, b.product_name AS name, a.category_id
AS parent, 'prod' AS typ, 0 AS productnum
          FROM #__redshop_product_category_xref AS a
          LEFT JOIN #__redshop_product AS b ON a.product_id = b.product_id
          WHERE b.product_parent_id =0 ";
        if ($this->_params->get('elementorder', 0) == 1) {
          $query .= "ORDER BY name ASC";
        } else {
          $query .= "ORDER BY name DESC";
        }

        $db->setQuery($query);
        $allItems += $db->loadObjectList('id');
      }
      return $allItems;
    }

    public function getActiveItem()
    {
      $active = null;
      if (JRequest::getVar('option') == 'com_redshop')
{
        $content_id = 0;
        $category_id = 0;
        if (JRequest::getVar('view') == "category") {
          $category_id = JRequest::getInt('cid');
        } elseif (JRequest::getVar('view') ==
"product") {
          $content_id = JRequest::getInt('pid');
          $category_id = JRequest::getInt('cid');
        }
        if ($content_id > 0 &&
$this->_params->get('showcontents')) {
          $active = new StdClass();
          $active->id = $category_id . "-" . $content_id;
        } elseif ($category_id > 0) {
          $active = new StdClass();
          $active->id = $category_id;
        }
      }
      return $active;
    }

    public function getItemsTree()
    {
      return $this->getItems();
    }

    public function filterItem(&$item)
    {
      $item->nname = $item->title = stripslashes($item->name);

      $length = strlen($item->productnum) == 1 ? "one" :
"more";
      if ($this->_params->get('displaynumprod', 0) == 1
&& $item->typ == 'cat' && $item->productnum
> 0) {
        $item->number = '<span class="productnum ' .
$length . '">' . $item->productnum .
'</span>';
        $item->nname .= $item->number;
      } elseif ($this->_params->get('displaynumprod', 0) ==
2 && $item->typ == 'cat') {
        $item->number = '<span class="productnum ' .
$length . '">' . $item->productnum .
'</span>';
        $item->nname .= $item->number;
      }
      $item->nname = '<span>' . $item->nname .
'</span>';

      $item->anchorAttr = '';
      if ($item->typ == 'cat') {
        if ($this->_params->get('parentlink') == 0
&& $item->p) {
          $item->nname = '<a>' . $item->nname .
'</a>';
        } else {
          $item->anchorAttr = 'href="' .
JRoute::_('index.php?option=com_redshop&view=category&cid='
. $item->id . '&layout=detail&Itemid=' .
JRequest::getVar('Itemid')) . '"';
          $item->nname = '<a ' . $item->anchorAttr .
'>' . $item->nname . '</a>';
        }
      } elseif ($item->typ == 'prod') {
        $id = explode("-", $item->id);
        $item->anchorAttr = 'href="' .
JRoute::_('index.php?option=com_redshop&view=product&pid='
. $id[1] . '&cid=' . $id[0] . '&Itemid=' .
JRequest::getVar('Itemid')) . '"';
        $item->nname = '<a ' . $item->anchorAttr .
'>' . $item->nname . '</a>';
      }
    }

  }
}
PK�,�[��q��virtuemart2/config.xmlnu�[���<?xml
version="1.0" encoding="UTF-8"?>
<form>
  <params>
    <param name="vm2categoryid"
type="offlajnvm2categories" default="0"
label="CATEGORIES_AS_TOP_LEVEL_CATEGORIES"
description="YOU_CAN_TEST_THE_WORKING_ON_OUR_DEMO_SITE_YOU_CAN_USE_CTRLCLICK_TO_SELECT_MULTIPLE"
height="10"/>
		<param name="showproducts" type="offlajnonoff"
default="0" label="SHOW_PRODUCTS_WITH_THE_CATEGORIES"
description="" />
		<param name="parenthref" type="offlajnonoff"
default="0" label="Parent items as link"
description="If enabled, the items which have subitems will be
openable." />
    <param name="displaynumprod" type="offlajnlist"
default="0" label="DISPLAY_THE_NUMBER_OF_PRODUCTS"
description="IF_YOU_CHECK_YES_IT_WILL_ADD_THE_COUNT_PRODUCTS_TO_THE_CATEGORY_EG_CATEGORY_NAME10">
      <option value="0">No</option>
      <option
value="1">YES_ONLY_THE_REAL_COUNT</option>
      <option
value="2">YES_THE_AGGREGATED_COUNT_ON_EACH_CATEGORY</option>
    </param>
    <param name="elementorder" type="offlajnlist"
default="0" label="ELEMENT_ORDER"
description="">
      <option value="0">COMPONENT_DEFAULT</option>
      <option
value="1">ALPHABETICAL_ASCENDING</option>
      <option
value="2">ALPHABETICAL_DESCENDING</option>
    </param>
    <param name="showdescasmenuimg"
type="offlajnonoff" default="0"
label="SHOW_CATEGORY_DESCRIPTION_AS_MENU_IMAGE"
description="" />
    <param name="subheader" type="offlajncombine"
default="0|*|50|*|" label="Menu-item description">
      <param type="offlajnonoff" check="conditions"
onoff="1" label="SHOW_SUBHEADER"
description="SHOW_SUBHEADER" />
      <param type="offlajntext"
label="LENGTH_SUBHEADER" validation="int"
size="3" description="LENGTH_SUBHEADER" />
    </param>
    <param name="menu_images" check="conditions"
type="offlajnonoff" default="0" label="Show
menu-item icons" description=""/>
    <param type="offlajncombine" if="menu_images"
name="resizeicon"
default="0|*|32||px|*|32||px|*|32||px|*|0" label="Resize
menu-item icons" description="">
      <param type="offlajnonoff" onoff="1"
label="Advanced" description=""/>
      <param size="2" validation="int"
type="offlajntext" label="Max width">
        <unit>px</unit>
      </param>
      <param type="offlajnclear"/>
      <param size="2" validation="int"
type="offlajntext" label="Width">
        <unit>px</unit>
      </param>
      <param size="2" validation="int"
type="offlajntext" label="Height">
        <unit>px</unit>
      </param>
      <param type="offlajnswitcher" label="-">
        <unit value="1">Scale</unit>
        <unit value="0">Crop</unit>
      </param>
    </param>
    <param type="offlajncombine" if="menu_images"
name="iconborderradius" default="0|*|0|*|0|*|0|*|px"
label="Menu-item icon &lt;br&gt; border-radius"
description="">
      <param size="2" validation="int"
type="offlajntext" label="Top-left"/>
      <param size="2" validation="int"
type="offlajntext" label="Top-right"/>
      <param size="2" validation="int"
type="offlajntext" label="Bottom-right"/>
      <param size="2" validation="int"
type="offlajntext" label="Bottom-left"/>
      <param type="offlajnswitcher" label="-">
        <unit value="%">%</unit>
        <unit value="px">px</unit>
      </param>
    </param>
  </params>
</form>PK�,�[�#o,,virtuemart2/index.htmlnu�[���<html><body
bgcolor="#FFFFFF"></body></html>PK�,�[?Zfw�*�*virtuemart2/menu.phpnu�[���<?php
/**
 * mod_vertical_menu - Vertical Menu
 *
 * @author    Balint Polgarfi
 * @copyright 2014-2019 Offlajn.com All Rights Reserved
 * @license   https://gnu.org/licenses/gpl-2.0.html
 * @link      https://offlajn.com
 */

defined('_JEXEC') or die('Restricted access');

global $mosConfig_absolute_path, $VM_LANG, $database;

if (!class_exists('OfflajnVirtuemart2Menu2')) {

  if (!class_exists('VmConfig')) {
    require JPATH_ADMINISTRATOR .
'/components/com_virtuemart/helpers/config.php';
  }
  $config = VmConfig::loadConfig();
  if (!class_exists('TableCategories')) {
    require JPATH_VM_ADMINISTRATOR . '/tables/categories.php';
  }
  if (!class_exists('VirtueMartModelCategory')) {
    require JPATH_VM_ADMINISTRATOR . '/models/category.php';
  }
  if (!class_exists('VirtueMartModelProduct')) {
    require JPATH_VM_ADMINISTRATOR . '/models/product.php';
  }

  require_once dirname(__FILE__) . '/../../core/MenuBase.php';

  class OfflajnVirtuemart2Menu2 extends OfflajnMenuBase2
  {

    public function __construct($module, $params)
    {
      parent::__construct($module, $params);
      $this->root = JURI::root(true);
      if ($this->root != '/') {
        $this->root .= '/';
      }

    }

    public function getAllItems()
    {
      $options = array();

      $db = JFactory::getDBO();

      $currLang = VMLANG;
      if ($this->_params->get('vmLangFix') || !VMLANG) {
        $lang = JFactory::getLanguage();
        $currLang = strtolower(str_replace("-", "_",
$lang->getTag()));
      }

      $categoryid = explode("|",
$this->_params->get('vm2categoryid'));

      $query = "SELECT DISTINCT
        a.virtuemart_category_id AS id,
        a.category_description  AS description,
        m.file_url AS categoryimg,
        a.category_name AS name, ";

      if (!is_array($categoryid) && $categoryid != 0) {
        $query .= "IF(f.category_parent_id = " . $categoryid .
", 0 , IF(f.category_parent_id = 0, -1, f.category_parent_id)) AS
parent, ";
      } elseif (count($categoryid) && is_array($categoryid)
&& !in_array('0', $categoryid)) {
        $query .= "IF(a.virtuemart_category_id in (" .
implode(',', $categoryid) . "), 0 , IF(f.category_parent_id
= 0, -1, f.category_parent_id)) AS parent, ";
      } else {
        $query .= "f.category_parent_id AS parent, ";
      }

      $query .= "'cat' AS typ, ";
      if ($this->_params->get('displaynumprod', 0) != 0) {
        $query .= "(SELECT COUNT(*) FROM
#__virtuemart_product_categories AS ax LEFT JOIN #__virtuemart_products AS
bp ON ax.virtuemart_product_id = bp.virtuemart_product_id WHERE
ax.virtuemart_category_id = a.virtuemart_category_id AND
bp.published='1' ";
        if (VmConfig::get('check_stock') &&
Vmconfig::get('show_out_of_stock_products') != '1') {
          $query .= " AND bp.product_in_stock > 0 ";
        }
        $query .= ") AS productnum";
      } else {
        $query .= "0 AS productnum";
      }
      $query .= " FROM #__virtuemart_categories_" . $currLang .
" AS a
                LEFT JOIN #__virtuemart_category_categories AS f ON
a.virtuemart_category_id = f.category_child_id
                LEFT JOIN #__virtuemart_categories AS b ON
a.virtuemart_category_id = b.virtuemart_category_id
                LEFT JOIN #__virtuemart_category_medias AS cm ON
a.virtuemart_category_id = cm.virtuemart_category_id
                LEFT JOIN #__virtuemart_medias AS m ON
cm.virtuemart_media_id = m.virtuemart_media_id
                WHERE b.published='1' AND
a.virtuemart_category_id = f.category_child_id ";
      if ($this->_params->get('elementorder', 0) == 0) {
        $query .= "ORDER BY b.ordering ASC";
      } elseif ($this->_params->get('elementorder', 0) ==
1) {
        $query .= "ORDER BY a.category_name ASC";
      } elseif ($this->_params->get('elementorder', 0) ==
2) {
        $query .= "ORDER BY a.category_name DESC";
      }

      $db->setQuery($query);
      $allItems = $db->loadObjectList('id');

      /*
      Get products for the categories
       */
      if ($this->_params->get('showproducts', 0)) {
        $query = "
          SELECT DISTINCT
            a.virtuemart_product_id,
           
concat(a.virtuemart_category_id,'-',a.virtuemart_product_id) AS
id,
            c.product_name AS name,
            a.virtuemart_category_id AS parent,
            'prod' AS typ,
            0 AS productnum
                  FROM #__virtuemart_product_categories AS a
                  LEFT JOIN #__virtuemart_products AS b ON
a.virtuemart_product_id = b.virtuemart_product_id
                  LEFT JOIN #__virtuemart_products_" . $currLang .
" AS c ON a.virtuemart_product_id = c.virtuemart_product_id

                  WHERE b.product_parent_id = 0 AND b.published =
'1'";
        if (VmConfig::get('check_stock') &&
Vmconfig::get('show_out_of_stock_products') != '1') {
          $query .= " AND b.product_in_stock > 0 ";
        }
        if ($this->_params->get('elementorder', 0) == 0) {
          $query .= " ORDER BY a.ordering ASC";
        } elseif ($this->_params->get('elementorder', 0) ==
1) {
          $query .= " ORDER BY name ASC";
        } elseif ($this->_params->get('elementorder', 0) ==
2) {
          $query .= " ORDER BY name DESC";
        }

        $db->setQuery($query);
        $allItems += $db->loadObjectList('id');
      }

      return $allItems;
    }

    public function getActiveItem()
    {
      $active = null;
      if (JRequest::getVar('option') ==
'com_virtuemart') {
        $product_id = JRequest::getInt('virtuemart_product_id');
        $category_id =
JRequest::getInt('virtuemart_category_id');
        if ($product_id > 0 &&
$this->_params->get('showproducts')) {
          if ($category_id > 0) {
            $active = new stdClass();
            $active->id = $category_id . '-' . $product_id;
          } else {
            $active = new stdClass();
            $productModel = new VirtueMartModelProduct();
            $r =
$productModel->getProductSingle($product_id)->categories;
            if (is_array($r)) {
              $r = $r[0];
            }
            $active->id = $r . '-' . $product_id;
          }
        } else {
          if ($category_id > 0) {
            $active = new stdClass();
            $active->id = $category_id;
          } elseif ($product_id > 0) {
            $active = new stdClass();
            $productModel = new VirtueMartModelProduct();
            $r =
$productModel->getProductSingle($product_id)->categories;
            if (is_array($r)) {
              $r = $r[0];
            }
            $active->id = $r;
          }
        }
      }
      return $active;
    }

    public function getItemsTree()
    {
      $items = $this->getItems();
      if ($this->_params->get('displaynumprod', 0) == 2) {
        for ($i = count($items); $i--;) {
          if (!isset($items[$i]->parent->productnum)) {
            $items[$i]->parent->productnum = 0;
          }

          $items[$i]->parent->productnum +=
empty($items[$i]->productnum) ? 0 : $items[$i]->productnum;
        }
      }
      return $items;
    }

    public function filterItem(&$item)
    {
      global $sess;
      $item->nname = $item->title = stripslashes($item->name);

      $length = strlen($item->productnum) == 1 ? "one" :
"more";
      if ($this->_params->get('displaynumprod', 0) == 1
&& $item->typ == 'cat' && $item->productnum
> 0) {
        $item->number = '<span class="productnum ' .
$length . '">' . $item->productnum .
'</span>';
        $item->nname .= $item->number;
      } elseif ($this->_params->get('displaynumprod', 0) ==
2 && $item->typ == 'cat' &&
$item->productnum > 0) {
        $item->number = '<span class="productnum ' .
$length . '">' . $item->productnum .
'</span>';
        $item->nname .= $item->number;
      }

      $item->nname = '<span>' . $item->nname .
'</span>';

      $item->image = $image = '';
      if ($this->_params->get('menu_images')) {
        //if category has image, else try to parse it from the description
        if ($item->categoryimg) {
          $image = $item->categoryimg;
        } elseif (!empty($item->description)) {
         
preg_match('/<img.*?src=["\'](.*?((jpg)|(png)|(jpeg)))["\'].*?>/i',
$item->description, $out);
          if ($out[1]) {
            $image = $out[1];
          }

        }
        if ($image) {
          $item->image = $this->root . $image;
          $image = '<img src="' . $item->image .
'" ' . (isset($imgalign) ? $imgalign : '') .
' height="16" />';
        }
        switch ($this->_params->get('menu_images_align',
0)) {
          case 1:
            $item->nname = $item->nname . $image;
            break;
          default:
            $item->nname = $image . $item->nname;
            break;
        }
      }

      if (!empty($item->description)) {
        // badges
        if ($this->_params->get('badge')) {
          $desc = strip_tags($item->description);
          if (preg_match('/^[\[\(](.+?)[\]\)]/', $desc, $m)) {
            $item->description = substr($desc, strlen($m[0]));
            $class = $m[0][0] == '[' ?
'"sm-square-badge"' :
'"sm-round-badge"';
            $item->badge = "<span
class=$class>{$m[1]}</span>";
          }
        }

        $subHeader =
OfflajnParser::parse($this->_params->get('subheader'));
        if ($subHeader[0]) {
          $desc = strip_tags($item->description);
          $item->description = strlen($desc) <= $subHeader[1] ? $desc
: substr($desc, 0, $subHeader[1]) . '...';
          $item->nname .= '<span
class="subname">' . $item->description .
'</span>';
        } else {
          $item->description = '';
        }
      }

      $item->anchorAttr = '';
      if ($item->typ == 'cat') {
        if ($this->_params->get('parentlink') == 0
&& $item->p) {
          $item->nname = '<a>' . $item->nname .
'</a>';
        } else {
          $url =
JRoute::_('index.php?option=com_virtuemart&view=category&virtuemart_category_id='
. $item->id);
          if (defined('DEMO') && strstr($url,
'Itemid') === false) {
            $url .= '&Itemid=' .
$_REQUEST['Itemid'];
          }
          $item->anchorAttr = 'href="' . $url .
'"';
          $item->nname = '<a ' . $item->anchorAttr .
'>' . $item->nname . '</a>';
        }
      } elseif ($item->typ == 'prod') {
        $ids = explode('-', $item->id);
        $url =
JRoute::_('index.php?option=com_virtuemart&view=productdetails&virtuemart_category_id='
. $ids[0] . '&virtuemart_product_id=' . $ids[1]);
        if (defined('DEMO') && strstr($url,
'Itemid') === false) {
          $url .= '&Itemid=' .
$_REQUEST['Itemid'];
        }
        $item->anchorAttr = 'href="' . $url .
'"';
        $item->nname = '<a ' . $item->anchorAttr .
'>' . $item->nname . '</a>';
      }
    }

  }
}
PK�,�[!�P�KKzoo/config.xmlnu�[���<?xml
version="1.0" encoding="UTF-8"?>
<form>
<params addPath="/modules/mod_accordion_menu/params">
    <param name="zooapps" type="offlajnzooapps"
default="all" label="APP_NAME"
description="THE_NAME_OF_THE_APP_DEFAULT_IS_ALL" />
    <param name="zoocategories"
type="offlajnzoocategoriesextended" default=""
label="Menu-items" description="Here you can select which
menu-items do you want to show" height="10" />
    <!--<param name="zoocategories"
type="offlajnzoocategories"
label="CATEGORIES_AS_TOP_LEVEL_CATEGORIES"
description="" />-->
    <param name="showitems" type="offlajnradio"
default="0" label="Show items within the categories"
description="">
      <option value="0">No</option>
      <option value="1">Yes</option>
    </param>
		<param name="parenthref" type="offlajnonoff"
default="0" label="Parent items as link"
description="If enabled, the items which have subitems will be
openable." />
    <param name="displaynumprod" type="offlajnlist"
default="0" label="DISPLAY_THE_NUMBER_OF_PRODUCTS"
description="IF_YOU_CHECK_YES_IT_WILL_ADD_THE_COUNT_PRODUCTS_TO_THE_CATEGORY_EG_CATEGORY_NAME10">
      <option value="0">No</option>
      <option
value="1">YES_ONLY_THE_REAL_COUNT</option>
      <option
value="2">YES_THE_AGGREGATED_COUNT_ON_EACH_CATEGORY</option>
    </param>
    <param name="elementorder" type="offlajnlist"
default="0" label="ELEMENT_ORDER"
description="">
      <option value="0">COMPONENT_DEFAULT</option>
      <option
value="1">ALPHABETICAL_ASCENDING</option>
      <option
value="2">ALPHABETICAL_DESCENDING</option>
    </param>
  </params>
</form>PK�,�[zoo/index.htmlnu�[���PK�,�[��.G��zoo/menu.phpnu�[���<?php
/**
 * mod_vertical_menu - Vertical Menu
 *
 * @author    Balint Polgarfi
 * @copyright 2014-2019 Offlajn.com All Rights Reserved
 * @license   https://gnu.org/licenses/gpl-2.0.html
 * @link      https://offlajn.com
 */

defined('_JEXEC') or die('Restricted access');

if (!class_exists('OfflajnZooMenu2')) {

  require_once dirname(__FILE__) . '/../../core/MenuBase.php';
  require_once JPATH_ADMINISTRATOR .
'/components/com_zoo/config.php';

  class OfflajnZooMenu2 extends OfflajnMenuBase2
  {

    public function __construct($module, $params)
    {
      parent::__construct($module, $params);
    }

    public function getAllItems()
    {
      $db = JFactory::getDBO();
      $categoryid = explode("|",
$this->_params->get('zoocategories', 0));
      $appname = $this->_params->get('zooapps');
      $query = "SELECT DISTINCT
        c.id AS id,
        c.name AS name, ";
      if (!is_array($categoryid) && $categoryid != 0) {
        $query .= "IF(c.parent = " . $categoryid . ", 0 ,
IF(c.parent = 0, -1, c.parent)) AS parent, ";
      } elseif (count($categoryid) && is_array($categoryid)
&& !in_array('0', $categoryid)) {
        $query .= "IF(c.parent in (" . implode(',',
$categoryid) . "), 0 , IF(c.parent = 0, -1, parent)) AS parent,
";
      } else {
        $query .= "c.parent AS parent, ";
      }

      $query .= "'cat' AS typ, ";
      if ($this->_params->get('displaynumprod', 0) != 0) {
        $query .= "(SELECT COUNT(*) FROM #__zoo_category_item AS bp
LEFT JOIN #__zoo_item AS ax ON ax.id = bp.item_id WHERE bp.category_id=c.id
AND ax.state = 1 ";
        $query .= ") AS productnum";
      } else {
        $query .= "0 AS productnum";
      }
      $query .= " FROM #__zoo_category AS c
          LEFT JOIN #__zoo_application AS app ON c.application_id = app.id
                WHERE published=1 AND app.name ='" . $appname .
"' ";
      if ($this->_params->get('elementorder', 0) == 0) {
        $query .= "ORDER BY ordering ASC, name DESC";
      } else if ($this->_params->get('elementorder', 0) ==
1) {
        $query .= "ORDER BY name ASC";
      } else if ($this->_params->get('elementorder', 0) ==
2) {
        $query .= "ORDER BY name DESC";
      }

      $db->setQuery($query);

      $allItems = $db->loadObjectList('id');

      if ($this->_params->get('showitems') == 1) {
        $query = "
          SELECT concat(c.category_id,'-',a.id) AS id, a.id AS
id2,a.name AS name, c.category_id AS parent, a.access, a.alias,
'con' AS typ ";
        $query .= " FROM #__zoo_item AS a
                      LEFT JOIN #__zoo_category_item AS c ON c.item_id =
a.id
            WHERE a.state = 1 AND c.category_id <> 0 ";
        if ($this->_params->get('elementorder', 0) == 0) {
          $query .= "ORDER BY a.id ASC, a.name DESC";
        } else if ($this->_params->get('elementorder', 0)
== 1) {
          $query .= "ORDER BY a.name ASC";
        } else if ($this->_params->get('elementorder', 0)
== 2) {
          $query .= "ORDER BY a.name DESC";
        }

        $db->setQuery($query);
        $rows = $db->loadObjectList('id');

        $cats = array();
        $unset = "";
        $keys = array_keys($rows);
        for ($x = 0; $x < count($keys); ++$x) {
          $value = $rows[$keys[$x]];
          if (!isset($cats[$value->parent])) {
            $cats[$value->parent] = 0;
          }

          $cats[$value->parent]++;
          if ($cats[$value->parent] >
$this->_params->get('maxitemsincat', 20)) {
            unset($rows[$keys[$x]]);
          }

        }
        $allItems += $rows;
      }
      return $allItems;
    }

    public function getActiveItem()
    {
      $db = JFactory::getDBO();
      $active = null;
      if (JRequest::getVar('option') == 'com_zoo') {
        $content_id = 0;
        $category_id = 0;
        $zoo = App::getInstance('zoo');
        if ($item = $zoo->table->item->get((int)
$zoo->request->getInt('item_id',
$zoo->system->application->getParams()->get('item_id',
0)))) {
          $content_id = $item->id;
          $category_id = $item->getPrimaryCategoryId();
        } else {
          $category_id = (int)
$zoo->request->getInt('category_id',
$zoo->system->application->getParams()->get('category'));
        }
        if ($content_id > 0 &&
$this->_params->get('showitems')) {
          $active = new StdClass();
          $active->id = $category_id . "-" . $content_id;
        } elseif ($category_id > 0) {
          $active = new StdClass();
          $active->id = $category_id;
        }
      }
      return $active;
    }

    public function getItemsTree()
    {
      $items = $this->getItems();
      if ($this->_params->get('displaynumprod', 0) == 2) {
        for ($i = count($items) - 1; $i >= 0; $i--) {
          if (!($items[$i]->typ == "con" && $items[$i
- 1]->typ == "con" && $items[$i]->parent ==
$items[$i - 1]->parent)) {
            $items[$i]->parent->productnum +=
$items[$i]->productnum;
          }
        }
      }
      return $items;
    }

    public function filterItem(&$item)
    {
      $item->title = $item->name;
      if ($this->_params->get('displaynumprod', 0) > 0
&& $item->productnum != 0) {
        $length = strlen($item->productnum) == 1 ? "one" :
"more";
        $item->number = '<span class="productnum ' .
$length . '">' . $item->productnum .
'</span>';
        $item->nname .= $item->number;
      }
      $item->nname = '<span>' . $item->title .
'</span>';

      $item->anchorAttr = '';
      if ($item->typ == 'cat') {
        if ($this->_params->get('parentlink') == 0
&& $item->p) {
          $item->nname = '<a>' . $item->nname .
'</a>';
        } else {
          //$item->anchorAttr =
'href="'.JRoute::_('index.php?option=com_zoo&task=category&category_id='.$item->id).'"';
          $cat =
App::getInstance('zoo')->table->category->get($item->id);
          $item->anchorAttr = 'href="' .
App::getInstance('zoo')->route->category($cat, true) .
'"';
          $item->nname = '<a ' . $item->anchorAttr .
'>' . $item->nname . '</a>';
        }
      } elseif ($item->typ == 'con') {
        $id = explode("-", $item->id);
        //$item->anchorAttr =
'href="'.JRoute::_('index.php?option=com_zoo&view=item&layout=item&item_id='.$item->id2).'"';
        $zooitem =
App::getInstance('zoo')->table->item->get($item->id2);
        $item->anchorAttr = 'href="' .
App::getInstance('zoo')->route->item($zooitem) .
'"';
        $item->nname = '<a ' . $item->anchorAttr .
'>' . $item->nname . '</a>';
      }
    }

  }
}
PK;�[#n��acl.phpnu�[���PK;�[���(?acltable.phpnu�[���PK;�[|��**�"address.phpnu�[���PK;�[C��϶�	�%allow.phpnu�[���PK;�[��b�~~	�)badge.phpnu�[���PK;�[b&�ܕ��-breadcrumb.phpnu�[���PK;�[�E-++
i4button.phpnu�[���PK;�[�b1���7cart_redirect.phpnu�[���PK;�[/TD����;cart_share.phpnu�[���PK;�[��ܴ��?category.phpnu�[���PK;�[���11�Ccategorysub.phpnu�[���PK;�[<"�##$ucharacteristic.phpnu�[���PK;�[�,�ص�j�characteristicdisplay.phpnu�[���PK;�[Ieʁ��h�characteristiclist.phpnu�[���PK;�[�A��eeG�characteristicorder.phpnu�[���PK;�[M�>AA�charset.phpnu�[���PK;�[ei
[$$o�checkout.phpnu�[���PK;�[ĘI�F�FϮcheckout_workflow.phpnu�[���PK;�[I�\����childdisplay.phpnu�[���PK;�[W��O��	��color.phpnu�[���PK;�[�����fcompare.phpnu�[���PK;�[����	contact.phpnu�[���PK;�[Q�R����content.phpnu�[���PK;�[�dl�??�contentparser.phpnu�[���PK;�[����
�
Lcountry.phpnu�[���PK;�[��(ppU&cronreport.phpnu�[���PK;�[�\�X��,cronreportsave.phpnu�[���PK;�['@�.���1css.phpnu�[���PK;�[4�����:csv.phpnu�[���PK;�[��`���=csvdecimal.phpnu�[���PK;�[A�gD++�@currency.phpnu�[���PK;�[��r3��,Idata_filter.phpnu�[���PK<�[�Y���
Udategroup.phpnu�[���PK<�[�qx���Xdatetype.phpnu�[���PK<�[��\�[default_registration_view.phpnu�[���PK<�[/n���	@kdelay.phpnu�[���PK<�[���P��
�direction.phpnu�[���PK<�[1��AA�discount.phpnu�[���PK<�[؎������discount_display.phpnu�[���PK<�[��jxxq�display_method.phpnu�[���PK<�[b+�"��+�div_position.phpnu�[���PK<�[�98��
9�editor.phpnu�[���PK<�[���
G�effect.phpnu�[���PK<�[J�ī����emailtemplate.phpnu�[���PK<�[ڷ��''
��email_log.phpnu�[���PK<�[����oo��encoding.phpnu�[���PK<�[۶-П�
��fields.phpnu�[���PK<�[�M�M��i�file.phpnu�[���PK<�[>n�R--
R�filter.phpnu�[���PK=�[y(�oo��filter_button_position.phpnu�[���PK=�[�#o,,
r�index.htmlnu�[���PK=�[}DwE,,�item.phpnu�[���PK=�[��3C�"�"<joomla_acl.phpnu�[���PK=�[T�D��
k$layout.phpnu�[���PK=�[�4B	I+limit.phpnu�[���PK=�[�j�qCC�.limitparent.phpnu�[���PK=�[����7list.phpnu�[���PK=�[�|e))�:manufacturer.phpnu�[���PK@�[����
g@masstable.phpnu�[���PK@�[�z��	�Emenus.phpnu�[���PK@�[W:����Mmenu_style.phpnu�[���PK@�[������
�Pmultilang.phpnu�[���PK@�[�%$�Q�Q�Snamebox.phpnu�[���PK@�[�ĉ����namebox_rawlist.phpnu�[���PK@�[i۫E��
��operators.phpnu�[���PK@�[����''n�operatorsin.phpnu�[���PK@�[`J�

	Եorder.phpnu�[���PK@�[$�EE�orderdir.phpnu�[���PK@�[���ii��order_range.phpnu�[���PK@�[8P�==C�order_status.phpnu�[���PK@�[�$�ee��pagination.phpnu�[���PK@�[Q����c�partners.phpnu�[���PK@�[XE�A��^�payment.phpnu�[���PK@�[ϲbs
K�period.phpnu�[���PK@�[�@z�88��plugins.phpnu�[���PK@�[���33��position.phpnu�[���PK@�[�7����i�pricedisplay.phpnu�[���PKA�[�������pricetax.phpnu�[���PKA�[��i��eproduct.phpnu�[���PKA�[����0�0Eproductdisplay.phpnu�[���PKA�[qC(m��}8productslot.phpnu�[���PKA�["WJ���]<productsync.phpnu�[���PKA�[�
���@productweight.phpnu�[���PKA�[��f2::�Dproduct_information.phpnu�[���PKA�[Fq�022
Mpublished.phpnu�[���PKA�[�~���Pquantity.phpnu�[���PKA�[��M\\ETquantitydisplay.phpnu�[���PKA�[S�q-JJ	�eradio.phpnu�[���PKA�[�z�	�		g{rates.phpnu�[���PKA�[�$�~~
[�region.phpnu�[���PKA�[���΁��registration.phpnu�[���PKA�[��tz��
Ԑsearch.phpnu�[���PKA�[':m_
��select.phpnu�[���PKA�[��Ѻ��ۜsignpos.phpnu�[���PKA�[n���۠slide_pagination.phpnu�[���PKB�[�ȻT::-�subscription.phpnu�[���PKB�[q?$��	��table.phpnu�[���PKB�[�d1

߻tax.phpnu�[���PKB�[�JX��6�tax_zone.phpnu�[���PKB�[#O�?///�template.phpnu�[���PKB�[�Nj�����transition_effect.phpnu�[���PKB�[�>�eec�uploader.phpnu�[���PKB�[����user.phpnu�[���PKB�[�m�..��user_partner.phpnu�[���PKB�[`NDj�vat.phpnu�[���PKB�[�m��::��view.phpnu�[���PKB�[�bR���
�volume.phpnu�[���PKB�[�7[���C�vote.phpnu�[���PKB�[�X��waitlist.phpnu�[���PKB�[[D��MM
n�warehouse.phpnu�[���PKB�[E�›bb
�weight.phpnu�[���PKB�[r(�]���widgetcontent.phpnu�[���PKB�[({H��Uwidgetdisplay.phpnu�[���PKB�[�b)ܵ�S#widget_data.phpnu�[���PKB�[wEP^��G9zone.phpnu�[���PK��[���11M>dropdown.phpnu�[���PK��[S�ss�Dfilter_vendor.phpnu�[���PK��[�GΠP
P
nVitemlayout.phpnu�[���PK��[�{�E�?�?�`market_acl.phpnu�[���PK��[Z
�PP��menu_content.phpnu�[���PK��[���١�N�menu_layout.phpnu�[���PK��[���
�
.�paymentmethods.phpnu�[���PK��[�m�II1�products.phpnu�[���PK��[�h>��shop_category.phpnu�[���PK��[�zv:zz	�vendor_selection.phpnu�[���PK�,�[0��D����easyblog/config.xmlnu�[���PK�,�[
�H''��easyblog/index.htmlnu�[���PK�,�[�z�GPP
�easyblog/menu.phpnu�[���PK�,�[.��i���hikashop/config.xmlnu�[���PK�,�[�#o,,�hikashop/index.htmlnu�[���PK�,�[R&7��Chikashop/menu.phpnu�[���PK�,�[7��[0hikashopbrands/config.xmlnu�[���PK�,�[
�H''�6hikashopbrands/index.htmlnu�[���PK�,�[N	+c���6hikashopbrands/menu.phpnu�[���PK�,�[E�B��
�
Rjoomla/config.xmlnu�[���PK�,�[�#o,,Q]joomla/index.htmlnu�[���PK�,�[���*�*�]joomla/menu.phpnu�[���PK�,�[�^�RR��joomlacontent/config.xmlnu�[���PK�,�[�#o,,(�joomlacontent/index.htmlnu�[���PK�,�[�΀����joomlacontent/menu.phpnu�[���PK�,�[�[�bb��jshopping/config.xmlnu�[���PK�,�[�#o,,Y�jshopping/index.htmlnu�[���PK�,�[��RRɼjshopping/menu.phpnu�[���PK�,�[e�>6
]�k2/config.xmlnu�[���PK�,�[�#o,,
��k2/index.htmlnu�[���PK�,�[x�vpp�k2/menu.phpnu�[���PK�,�[�(`}>>��mijoshop/config.xmlnu�[���PK�,�[�#o,,;mijoshop/index.htmlnu�[���PK�,�[�q�Do(o(�mijoshop/menu.phpnu�[���PK�,�[u^:KZ-redshop/config.xmlnu�[���PK�,�[�#o,,�2redshop/index.htmlnu�[���PK�,�[;��ww3redshop/menu.phpnu�[���PK�,�[��q���Ivirtuemart2/config.xmlnu�[���PK�,�[�#o,,�Vvirtuemart2/index.htmlnu�[���PK�,�[?Zfw�*�*\Wvirtuemart2/menu.phpnu�[���PK�,�[!�P�KK��zoo/config.xmlnu�[���PK�,�[�zoo/index.htmlnu�[���PK�,�[��.G��T�zoo/menu.phpnu�[���PK��g0��