Spade

Mini Shell

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

[Home] [System Details] [Kill Me]
Current File:~$ /home/lmsyaran/www/joomla4/views.tar

dashboard/tmpl/default.php000064400000015136151156263400011615
0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_notifly
 *
 * @copyright   Copyright (C) 2005 - 2017 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html');

JHtml::_('bootstrap.tooltip');
JHtml::_('behavior.multiselect');
JHtml::_('formbehavior.chosen',
'.multipleAccessLevels', null,
array('placeholder_text_multiple' =>
JText::_('JOPTION_SELECT_ACCESS')));
JHtml::_('formbehavior.chosen', '.multipleAuthors',
null, array('placeholder_text_multiple' =>
JText::_('JOPTION_SELECT_AUTHOR')));
JHtml::_('formbehavior.chosen', '.multipleCategories',
null, array('placeholder_text_multiple' =>
JText::_('JOPTION_SELECT_CATEGORY')));
JHtml::_('formbehavior.chosen', '.multipleTags', null,
array('placeholder_text_multiple' =>
JText::_('JOPTION_SELECT_TAG')));
JHtml::_('formbehavior.chosen', 'select');

// Chart JS
JHtml::_('script', 'com_notifly/chart.min.js',
array('version' => 'auto', 'relative'
=> true));

$user      = JFactory::getUser();
$userId    = $user->get('id');

?>

<form action="<?php echo
JRoute::_('index.php?option=com_notifly&view=dashboard');
?>" method="post" name="adminForm"
id="adminForm">
	<div id="cf" class="dashboard tx-flex">
		<?php if (!empty( $this->sidebar)) : ?>
		<div class="tx-sidebar">
			<?php echo $this->sidebar; ?>
		</div>
		<div class="tx-main">
		<?php else : ?>
		<div class="tx-main">
		<?php endif; ?>
			<div class="page-header">
				<div class="row">
					<div class="col-md-9">
						<h1>Dashboard</h1>
					</div>
					<div class="col-md-3">
						<?php 
						$update = NotiflyHelper::getUpdateStatus(); 
						$link =
JRoute::_('index.php?option=com_installer&view=update&task=update.find&'.JSession::getFormToken()
. '=1');
						?>

						<!-- 
						// comment due to design reason
						<div class="media well well-sm" style="margin:
0;">
							<div class="media-left">
								<i class="cfi-download-cloud text-success"
style="font-size: 40px;"></i>
							</div>
							<div class="media-body">
								<p>
									<span class="muted">Installed
Version:</span> 
									<span class="label label-success"><?php echo
$update['old']; ?></span>
								</p>
				  				<p>
				  					<span class="muted">Lateset Version</span>

				  					<span class="label label-info"><?php echo
$update['new']; ?></span>
				  				</p>
							</div>
		  					<a href="<?php echo $link ?>" class="btn
btn-default btn-xs">
		  						<i class="cfi-refresh-cw"></i> Update Now
		  					</a>
						</div> -->

					</div>
				</div>
			</div>
			<div class="page-content">
				<div class="row">
					<div class="col-md-12">
						<?php echo NotiflyHelper::showWarning(); ?>
						<?php echo $this->loadTemplate('update'); ?>
						
						<h4><?php echo date('M 01, Y') ?> to <?php
echo date('M d, Y') ?> be like:</h4>
						<div class="panel panel-default">
							<div class="panel-body">
								<div style="width:100%;">
						        <canvas id="nf-chart"></canvas>
						    </div>
						    <script>
						    	// console.log('<?php //echo
json_encode($this->items); ?>');
						    	// console.log('<?php //echo
date("Y-m-".sprintf("%02d", 22)." 00:00:00");
?>');
						    	var ctx = document.getElementById("nf-chart");
						    	var data = {
						    		labels: [<?php for($i=1; $i <= date("d"); $i++)
{
						    			echo "$i" . ($i!=(date("d")) ?
"," : "");
					    			} ?>],
							        datasets: [
										{
											label: 'Clicks',
											data: [<?php for($i=1; $i <= date("d"); $i++) {
												$date = date("Y-m-".sprintf("%02d",
$i)." 00:00:00");
						    					echo (isset($this->items[$date]->click) ?
$this->items[$date]->click : "0") .
($i!=date("d") ? "," : "");
							    			} ?>],
							    			fill: false,
								    		borderColor: 'rgb(255, 99, 132)', backgroundColor:
'rgb(255, 99, 132)'
								        }
										,
								        {
											label: 'Shown',
											data: [<?php for($i=1; $i <= date("d"); $i++) {
												$date = date("Y-m-".sprintf("%02d",
$i)." 00:00:00");
							    				echo (isset($this->items[$date]->view) ?
$this->items[$date]->view : "0") . ($i!=date("d")
? "," : "");
								    		} ?>],
								    		fill: false,
								    		borderColor: 'rgb(54, 162, 235)', backgroundColor:
'rgb(54, 162, 235)'
								        }
						        	]
						        };
						    	var myLineChart = new Chart(ctx, {
									    type: 'line',
									    data: data,
									    options: {
							                responsive: true,
							                title:{
							                    display:true,
							                    text:'Notifly monthly reports'
							                },
							                tooltips: {
							                    mode: 'index',
							                    intersect: false,
							                },
							                hover: {
							                    mode: 'nearest',
							                    intersect: true
							                },
							                scales: {
							                    xAxes: [{
							                        display: true,
							                        scaleLabel: {
							                            display: true,
							                            labelString: 'Day of month'
							                        }
							                    }],
							                    yAxes: [{
							                        display: true,
							                        scaleLabel: {
							                            display: true,
							                            labelString: 'Counts'
							                        }
							                    }]
							                }
							            }
									});
						    </script>
							</div>
						</div>
					</div>
					<!--
					<div class="col-md-12">
						<h4><?php echo
JText::_('COM_NOTIFLY_ENABLED_INTEGRATIONS'); ?></h4>
						<?php $plugins = NotiflyHelper::getGroupPlugins(); ?>
						<div class="panel panel-default">
							<ul class="list-group" style="margin-left:
0;">
							<?php foreach ($plugins as $key => $plugin) { ?>
								<li class="list-group-item">
									<p style="color:<?php echo ($plugin->enabled ?
'green' : 'red'); ?>">
										<i class="<?php echo ($plugin->enabled ?
'cfi-check-circle' : 'cfi-x-circle');
?>"></i>
										<?php echo JText::_(ucfirst($plugin->element));
?></p>
								</li>
							<?php } ?>
							</ul>
						</div>
					</div>
					-->
				</div>
			</div>

			<input type="hidden" name="task"
value="" />
			<input type="hidden" name="dashboard"
value="1" />
			<input type="hidden" name="boxchecked"
value="0" />
			<?php echo JHtml::_('form.token'); ?>
			</div>
	</div>
</form>
dashboard/tmpl/default.xml000064400000000324151156263400011617
0ustar00<?xml version="1.0" encoding="utf-8"?>
<metadata>
	<layout title="COM_NOTIFLY_DASHBOARD_VIEW_DEFAULT_TITLE">
		<message>
			<![CDATA[COM_NOTIFLY_DASHBOARD_VIEW_DEFAULT_DESC]]>
		</message>
	</layout>
</metadata>
dashboard/tmpl/default_update.php000064400000001203151156263420013147
0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_notifly
 *
 * @copyright   Copyright (C) 2005 - 2017 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;
$username = $this->config->get('username', '');
$key = $this->config->get('key', '');
?>
<?php if(empty($key) or empty($username)): ?>
<div class="alert alert-info">
	<p>
		<strong class="text-uppercase"><?php echo
JText::_('COM_NOTIFLY_API_KEY_MISSING'); ?></strong> 
		<br>
		<?php echo JText::_('COM_NOTIFLY_API_KEY_MISSING_DESC');
?>
	</p>
</div>
<?php endif;
?>dashboard/tmpl/default_warning.php000064400000001160151156263420013334
0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_notifly
 *
 * @copyright   Copyright (C) 2005 - 2017 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;
$systemPlugin = JPluginHelper::getPlugin( 'system' ,
'notifly' );
?>
<?php if(!$systemPlugin): ?>
<div class="alert alert-danger">
	<p>
		<strong class="text-uppercase"><?php echo
JText::_('COM_NOTIFLY_SYSTEM_PLUGIN_DISABLED');
?></strong> 
		<br>
		<?php echo
JText::_('COM_NOTIFLY_SYSTEM_PLUGIN_DISABLED_DESC'); ?>
	</p>
</div>
<?php endif; ?>

dashboard/view.html.php000064400000005265151156263440011140
0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_notifly
 *
 * @copyright   Copyright (C) 2005 - 2017 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

/**
 * View class for a list of featured articles.
 *
 * @since  1.6
 */
class NotiflyViewDashboard extends JViewLegacy
{
	/**
	 * The sidebar markup
	 *
	 * @var  string
	 */
	protected $sidebar;

	/**
	 * component config
	 *
	 * @var  jobject
	 */
	protected $config;

	/**
	 * Display the view
	 *
	 * @param   string  $tpl  The name of the template file to parse;
automatically searches through the template paths.
	 *
	 * @return  mixed  A string if successful, otherwise an Error object.
	 */
	public function display($tpl = null)
	{
		NotiflyHelper::addSubmenu('dashboard');
		$this->config = JComponentHelper::getParams('com_notifly');
		
		// Check for errors.
		if (count($errors = $this->get('Errors')))
		{
			throw new Exception(implode("\n", $errors), 500);
		}
		$this->items = $this->getLogs();
		// print_r($this->items);die;
		$this->addToolbar();
		$this->sidebar = JHtmlSidebar::render();

		return parent::display($tpl);
	}

	/**
	 * Add the page title and toolbar.
	 *
	 * @return  void
	 *
	 * @since   1.6
	 */
	protected function addToolbar()
	{
		// $state = $this->get('State');
		$canDo = JHelperContent::getActions('com_notifly');

		JToolbarHelper::title(JText::_('COM_NOTIFLY_DASHBOARD_TITLE'),
'star dashboard');

		// JToolbarHelper::custom('articles.unfeatured',
'unfeatured.png', 'featured_f2.png',
'JUNFEATURE', true);

		if ($canDo->get('core.admin') ||
$canDo->get('core.options'))
		{
			JToolbarHelper::preferences('com_notifly');
		}
		
		$help_url  = 'https://www.themexpert.com/docs';
		JToolbarHelper::help( 'COM_NOTIFLY_HELP_SITE', false, $help_url
);
	}

	public function getLogs(){
		// $date = date('m', strtotime('+1 month'));
		$db = JFactory::getDbo();
		$query = $db->getQuery(true);
		$query->select("a.*")
			  ->from('#__notifly_logs as a')
			  // $db->quote(JFactory::getDate()->format('Y-m-d') .
' 00:00:00')
			  ->where($db->quoteName('a.date') . ' BETWEEN
' . $db->quote(JFactory::getDate()->format('Y-m-01') .
' 00:00:00') . ' AND ' .
$db->quote(JFactory::getDate()->format('Y-m-'.
date("t")) . ' 00:00:00'))
			  ->group($db->quoteName('a.date'))
			  ->order($db->quoteName('a.id') . ' DESC')


			  // get the limit form config
			  ->limit('20');
		// echo $query->__toString();die;
		$db->setQuery($query);
		$results = $db->loadObjectList();
		$return = [];
		foreach ($results as $key => $result) {
			$return[$result->date] = $result;
		}
		// print_r($return);die;
		return $return;
	}

	
}
design/index.html000064400000000054151156263450010021
0ustar00<html><body
bgcolor="#FFFFFF"></body></html>design/tmpl/default.php000064400000007021151156263460011137
0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_notifly
 *
 * @copyright   Copyright (C) 2005 - 2017 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html');

JHtml::_('bootstrap.tooltip');
JHtml::_('behavior.multiselect');
JHtml::_('formbehavior.chosen',
'.multipleAccessLevels', null,
array('placeholder_text_multiple' =>
JText::_('JOPTION_SELECT_ACCESS')));
JHtml::_('formbehavior.chosen', '.multipleAuthors',
null, array('placeholder_text_multiple' =>
JText::_('JOPTION_SELECT_AUTHOR')));
JHtml::_('formbehavior.chosen', '.multipleCategories',
null, array('placeholder_text_multiple' =>
JText::_('JOPTION_SELECT_CATEGORY')));
JHtml::_('formbehavior.chosen', '.multipleTags', null,
array('placeholder_text_multiple' =>
JText::_('JOPTION_SELECT_TAG')));
JHtml::_('formbehavior.chosen', 'select');

$user      = JFactory::getUser();
$userId    = $user->get('id');
?>

<form action="<?php echo
JRoute::_('index.php?option=com_notifly&view=design');
?>" method="post" name="adminForm"
id="adminForm" class="form-horizontal">
	<div id="cf" class="design tx-flex">
		<?php if (!empty( $this->sidebar)) : ?>
		<div class="tx-sidebar">
			<?php echo $this->sidebar; ?>
		</div>
		<div class="tx-main">
		<?php else : ?>
		<div class="tx-main">
		<?php endif; ?>
			<div class="page-header">
			  <h1>Design</h1>
			  <!-- Nav tabs -->
			  <ul class="nav nav-tabs" role="tablist">
			    <li class="active"><a href="#design"
aria-controls="home" role="tab"
data-toggle="tab">Design</a></li>
			    <!-- <li><a href="#theme"
aria-controls="profile" role="tab"
data-toggle="tab">Theme</a></li> -->
			  </ul>
			</div>

			<div class="page-content">
				<?php echo NotiflyHelper::showWarning(); ?>
				<div class="tab-content">
					<div class="tab-pane active" id="design">
						<div class="row">
							<div class="col-md-6">
								<div class="panel panel-default">
									<div class="panel-heading">Design</div>
									<div class="panel-body">
										<?php 
										$fieldSets = $this->form->getFieldsets();
										foreach ($fieldSets as $name => $fieldSet) :
											if($name != 'design') continue;
											foreach ($this->form->getFieldset($name) as $field):
									    		echo $field->getControlGroup();
										  	endforeach;
										endforeach;
										 ?>
									</div>
								</div>
							</div>
							<div class="col-md-6">
								<div class="panel panel-default">
									<div class="panel-heading">Behavior</div>
									<div class="panel-body">
										<?php 
										$fieldSets = $this->form->getFieldsets();
										foreach ($fieldSets as $name => $fieldSet) :
											if($name != 'behavior') continue;
											foreach ($this->form->getFieldset($name) as $field):
									    		echo $field->getControlGroup();
										  	endforeach;
										endforeach;
										 ?>
									</div>
								</div>
							</div>
						</div>
					</div>
					<div class="tab-pane" id="theme">
						<div class="panel panel-default">
							<div class="panel-body">Theme</div>
						</div>
					</div>
				</div>
			</div>

			<input type="hidden" name="id"
value="<?php echo $this->component->id; ?>" />
			<input type="hidden" name="option"
value="<?php echo $this->component->option; ?>" />
			<input type="hidden" name="view"
value="design" />
			<input type="hidden" name="task"
value="" />

			<?php echo JHtml::_('form.token'); ?>
		</div>
	</div> <!-- cf end -->
</form>
design/tmpl/index.html000064400000000054151156263460010776
0ustar00<html><body
bgcolor="#FFFFFF"></body></html>design/view.html.php000064400000004467151156263460010467
0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_notifly
 *
 * @copyright   Copyright (C) 2005 - 2017 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

/**
 * View class for a list of featured articles.
 *
 * @since  1.6
 */
class NotiflyViewDesign extends JViewLegacy
{
	/**
	 * The sidebar markup
	 *
	 * @var  string
	 */
	protected $sidebar;

	/**
	 * Display the view
	 *
	 * @param   string  $tpl  The name of the template file to parse;
automatically searches through the template paths.
	 *
	 * @return  mixed  A string if successful, otherwise an Error object.
	 */
	public function display($tpl = null)
	{
		NotiflyHelper::addSubmenu('design');
		
		$form = null;
		$component = null;

		try
		{
			$form = $this->get('Form');
			$component = $this->get('Component');
			$user = JFactory::getUser();
		}
		catch (Exception $e)
		{
			JFactory::getApplication()->enqueueMessage($e->getMessage(),
'error');

			return false;
		}

		// Bind the form to the data.
		if ($form && $component->params)
		{
			$form->bind($component->params);
		}

		$this->form = &$form;
		$this->component = &$component;

		$this->userIsSuperAdmin = $user->authorise('core.admin');
		$this->currentComponent =
JFactory::getApplication()->input->get('component');
		$this->return =
JFactory::getApplication()->input->get('return',
'', 'base64');

		// JFactory::getApplication()->input->set('hidemainmenu',
true);

		
		// Check for errors.
		if (count($errors = $this->get('Errors')))
		{
			throw new Exception(implode("\n", $errors), 500);
		}

		$this->addToolbar();
		$this->sidebar = JHtmlSidebar::render();

		return parent::display($tpl);
	}

	/**
	 * Add the page title and toolbar.
	 *
	 * @return  void
	 *
	 * @since   1.6
	 */
	protected function addToolbar()
	{
		// $state = $this->get('State');
		$canDo = JHelperContent::getActions('com_notifly');

		JToolbarHelper::title(JText::_('COM_NOTIFLY_DESIGN_TITLE'),
'star design');

		JToolBarHelper::save('design.save');
		JToolBarHelper::apply('design.apply');
		JToolBarHelper::divider();

		JToolBarHelper::cancel('design.cancel',
'JTOOLBAR_CLOSE');

		if ($canDo->get('core.admin') ||
$canDo->get('core.options'))
		{
			JToolbarHelper::preferences('com_notifly');
		}
	}

	
}
?>
event/tmpl/edit.php000064400000007324151156263500010311 0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_notifly
 *
 * @copyright   Copyright (C) 2005 - 2017 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

use Joomla\Registry\Registry;

// Include the component HTML helpers.
JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html');
JHtml::_('behavior.formvalidator');
JHtml::_('behavior.keepalive');
JHtml::_('formbehavior.chosen', '#jform_catid', null,
array('disable_search_threshold' => 0 ));
JHtml::_('formbehavior.chosen', 'select');

// Create shortcut to parameters.
$params = clone($this->state->get('params'));
$params->merge(new Registry($this->item->attribs));

$app = JFactory::getApplication();
$input = $app->input;

JFactory::getDocument()->addScriptDeclaration('
	Joomla.submitbutton = function(task)
	{
		if (task == "event.cancel" ||
document.formvalidator.isValid(document.getElementById("item-form")))
		{
			jQuery("#permissions-sliders
select").attr("disabled", "disabled");
			Joomla.submitform(task, document.getElementById("item-form"));

			// @deprecated 4.0  The following js is not needed since 3.7.0.
			if (task !== "event.apply")
			{
				window.parent.jQuery("#templateEdit' . (int)
$this->item->id . 'Modal").modal("hide");
			}
		}
	};
');

// In case of modal
$isModal = $input->get('layout') == 'modal' ? true :
false;
$layout  = $isModal ? 'modal' : 'edit';
$tmpl    = $isModal || $input->get('tmpl', '',
'cmd') === 'component' ?
'&tmpl=component' : '';
?>
<style type="text/css">
	#cf .input-append input[type="text"]{
		display: inline-block;
	}
</style>
<form action="<?php echo
JRoute::_('index.php?option=com_notifly&view=event&layout='
. $layout . $tmpl . '&id=' . (int) $this->item->id);
?>" method="post" name="adminForm"
id="item-form" class="form-validate">
<div id="cf" class="event-edit tx-flex">
	<?php if (!empty( $this->sidebar)) : ?>
		<div class="tx-sidebar">
			<?php echo $this->sidebar; ?>
		</div>
	<?php endif;?>
	<div class="tx-main">
		<div class="page-header">
		  <h1>Edit Event</h1>
		  <!-- Nav tabs -->
		  <ul class="nav nav-tabs" role="tablist">
		    <li class="active"><a href="#message"
aria-controls="home" role="tab"
data-toggle="tab">Message</a></li>
		  </ul>
		</div> <!-- page header -->
		<div class="page-content">
			<div class="tab-content">
				<div class="tab-pane active" id="message">
					<div class="row">
						<div class="col-md-8">
							<div class="panel panel-default">
								<div class="panel-heading">Event
options</div>
								<div class="panel-body">
									<?php echo
$this->form->renderField('template'); ?>
									<?php echo $this->form->renderField('url');
?>
									<?php echo
$this->form->renderField('image_url'); ?>
									<?php echo $this->form->renderField('title');
?>
									<?php echo $this->form->renderField('name');
?>
									<?php echo $this->form->renderField('email');
?>
									<?php echo $this->form->renderField('ip');
?>
									
									<?php echo $this->form->renderField('city');
?>
									<?php echo $this->form->renderField('state');
?>
									<?php echo $this->form->renderField('country');
?>
									
									<?php echo $this->form->renderField('created');
?>

								</div>
							</div>
						</div>
						<div class="col-md-4">
							<!-- 
							<h4>Help Document</h4>
							<div class="panel panel-default">
								<div class="panel-body">
									Coming soon...
								</div>
							</div>
							 -->
						</div>
					</div>
				</div>			
			</div>
		</div>
	</div>
</div>

	<input type="hidden" name="task" value=""
/>
	<input type="hidden" name="return"
value="<?php echo $input->getCmd('return');
?>" />
	<?php echo JHtml::_('form.token'); ?>
</form>
event/tmpl/edit.xml000064400000000530151156263500010312 0ustar00<?xml
version="1.0" encoding="utf-8"?>
<metadata>
	<layout title="COM_NOTIFLY_ARTICLE_VIEW_EDIT_TITLE">
		<message>
			<![CDATA[COM_NOTIFLY_ARTICLE_VIEW_EDIT_DESC]]>
		</message>
	</layout>
	<fieldset name="request">
		<fields name="request">
			<field
				name="id"
				type="hidden"
				default="0"
			/>
		</fields>
	</fieldset>
</metadata>
event/tmpl/modal.php000064400000002551151156263500010455 0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_notifly
 *
 * @copyright   Copyright (C) 2005 - 2017 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

JHtml::_('bootstrap.tooltip', '.hasTooltip',
array('placement' => 'bottom'));

// @deprecated 4.0 the function parameter, the inline js and the buttons
are not needed since 3.7.0.
$function  =
JFactory::getApplication()->input->getCmd('function',
'jEditArticle_' . (int) $this->item->id);

// Function to update input title when changed
JFactory::getDocument()->addScriptDeclaration('
	function jEditTemplateModal() {
		if (window.parent &&
document.formvalidator.isValid(document.getElementById("item-form")))
{
			return window.parent.' . $this->escape($function) .
'(document.getElementById("jform_title").value);
		}
	}
');
?>
<button id="applyBtn" type="button"
class="hidden"
onclick="Joomla.submitbutton('event.apply');
jEditTemplateModal();"></button>
<button id="saveBtn" type="button"
class="hidden"
onclick="Joomla.submitbutton('event.save');
jEditTemplateModal();"></button>
<button id="closeBtn" type="button"
class="hidden"
onclick="Joomla.submitbutton('event.cancel');"></button>

<div class="container-popup">
	<?php $this->setLayout('edit'); ?>
	<?php echo $this->loadTemplate(); ?>
</div>
event/view.html.php000064400000010443151156263500010321 0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_notifly
 *
 * @copyright   Copyright (C) 2005 - 2017 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

/**
 * View to edit an event.
 *
 * @since  1.6
 */
class NotiflyViewEvent extends JViewLegacy
{
	/**
	 * The JForm object
	 *
	 * @var  JForm
	 */
	protected $form;

	/**
	 * The active item
	 *
	 * @var  object
	 */
	protected $item;

	/**
	 * The model state
	 *
	 * @var  object
	 */
	protected $state;

	/**
	 * The actions the user is authorised to perform
	 *
	 * @var  JObject
	 */
	protected $canDo;

	/**
	 * The sidebar markup
	 *
	 * @var  string
	 */
	protected $sidebar;
	
	/**
	 * Execute and display a event script.
	 *
	 * @param   string  $tpl  The name of the event file to parse;
automatically searches through the event paths.
	 *
	 * @return  mixed  A string if successful, otherwise an Error object.
	 *
	 * @since   1.6
	 */
	public function display($tpl = null)
	{
		if ($this->getLayout() == 'pagebreak')
		{

			return parent::display($tpl);
		}

		$this->form  = $this->get('Form');
		$this->item  = $this->get('Item');
		$this->state = $this->get('State');
		$this->canDo = JHelperContent::getActions('com_notifly',
'event', $this->item->id);

		// Check for errors.
		if (count($errors = $this->get('Errors')))
		{
			throw new Exception(implode("\n", $errors), 500);
		}

		// If we are forcing a language in modal (used for associations).
		if ($this->getLayout() === 'modal' &&
$forcedLanguage =
JFactory::getApplication()->input->get('forcedLanguage',
'', 'cmd'))
		{
			// Set the language field to the forcedLanguage and disable changing it.
			$this->form->setValue('language', null,
$forcedLanguage);
			$this->form->setFieldAttribute('language',
'readonly', 'true');

			// Only allow to select categories with All language or with the forced
language.
			$this->form->setFieldAttribute('catid',
'language', '*,' . $forcedLanguage);

			// Only allow to select tags with All language or with the forced
language.
			$this->form->setFieldAttribute('tags',
'language', '*,' . $forcedLanguage);
		}

		NotiflyHelper::addSubmenu('templates');
		
		$this->addToolbar();
		$this->sidebar = JHtmlSidebar::render();

		return parent::display($tpl);
	}

	/**
	 * Add the page title and toolbar.
	 *
	 * @return  void
	 *
	 * @since   1.6
	 */
	protected function addToolbar()
	{
		JFactory::getApplication()->input->set('hidemainmenu',
true);
		$user       = JFactory::getUser();
		$userId     = $user->id;
		$isNew      = ($this->item->id == 0);
		$checkedOut = !($this->item->checked_out == 0 ||
$this->item->checked_out == $userId);

		// Built the actions for new and existing records.
		$canDo = $this->canDo;

		JToolbarHelper::title(
			JText::_('COM_NOTIFLY_PAGE_EDIT_EVENT'),
			'pencil-2 event-add'
		);

		// For new records, check the create permission.
		if ($isNew &&
(count($user->getAuthorisedCategories('com_notifly',
'core.create')) > 0))
		{
			JToolbarHelper::apply('event.apply');
			JToolbarHelper::save('event.save');
			JToolbarHelper::save2new('event.save2new');
			JToolbarHelper::cancel('event.cancel');
		}
		else
		{
			// Since it's an existing record, check the edit permission, or
fall back to edit own if the owner.
			$itemEditable = $canDo->get('core.edit') ||
($canDo->get('core.edit.own') &&
$this->item->created_by == $userId);

			// Can't save the record if it's checked out and editable
			if (!$checkedOut && $itemEditable)
			{
				JToolbarHelper::apply('event.apply');
				JToolbarHelper::save('event.save');

				// We can save this record, but check the create permission to see if
we can return to make a new one.
				// if ($canDo->get('core.create'))
				// {
				// 	JToolbarHelper::save2new('event.save2new');
				// }
			}

			// If checked out, we can still save
			// if ($canDo->get('core.create'))
			// {
			// 	JToolbarHelper::save2copy('event.save2copy');
			// }

			if (JComponentHelper::isEnabled('com_notifly') &&
$this->state->params->get('save_history', 0) &&
$itemEditable)
			{
				JToolbarHelper::versions('com_notifly.event',
$this->item->id);
			}

			JToolbarHelper::cancel('event.cancel',
'JTOOLBAR_CLOSE');
		}

		JToolbarHelper::divider();
		JToolbarHelper::help('JHELP_CONTENT_EVENT_MANAGER_EDIT');
	}
}
events/tmpl/default.php000064400000012032151156263520011165
0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_notifly
 *
 * @copyright   Copyright (C) 2005 - 2017 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html');
JLoader::register('NotiflyMessageHelper',
JPATH_COMPONENT_ADMINISTRATOR . '/helpers/message.php');

JHtml::_('bootstrap.tooltip');
JHtml::_('behavior.multiselect');
JHtml::_('formbehavior.chosen',
'.multipleAccessLevels', null,
array('placeholder_text_multiple' =>
JText::_('JOPTION_SELECT_ACCESS')));
JHtml::_('formbehavior.chosen', '.multipleAuthors',
null, array('placeholder_text_multiple' =>
JText::_('JOPTION_SELECT_AUTHOR')));
JHtml::_('formbehavior.chosen', '.multipleCategories',
null, array('placeholder_text_multiple' =>
JText::_('JOPTION_SELECT_CATEGORY')));
JHtml::_('formbehavior.chosen', '.multipleTags', null,
array('placeholder_text_multiple' =>
JText::_('JOPTION_SELECT_TAG')));
JHtml::_('formbehavior.chosen', 'select');

$user      = JFactory::getUser();
$userId    = $user->get('id');

JHtml::_('jquery.framework');
JHtml::_('script', 'com_notifly/showdown.min.js',
array('version' => 'auto', 'relative'
=> true));
?>

<form action="<?php echo
JRoute::_('index.php?option=com_notifly&view=events');
?>" method="post" name="adminForm"
id="adminForm">
	<div id="cf" class="events tx-flex">
		<?php if (!empty( $this->sidebar)) : ?>
		<div class="tx-sidebar">
			<?php echo $this->sidebar; ?>
		</div>
		<div class="tx-main">
			<?php else : ?>
		<div class="tx-main">
			<?php endif; ?>
			<div class="page-header">
			  <h1>Events</h1>
			  <?php
				// Search tools bar
				// echo JLayoutHelper::render('joomla.searchtools.default',
array('view' => $this));
				?>
			  <nav class="navbar navbar-default">
			  	<div class="container-fluid">
			  		<div class="collapse navbar-collapse">
			  			<div class="navbar-form navbar-left">
			  				<?php 
			  				$filters = $this->filterForm->getGroup('filter');
			  				?>
			  				<?php foreach ($filters as $fieldName => $field) : ?>
							<?php if ($fieldName == 'filter_extension_id') : ?>
								<?php $dataShowOn = ''; ?>
								<?php if ($field->showon) : ?>
									<?php JHtml::_('jquery.framework'); ?>
									<?php JHtml::_('script', 'jui/cms.js',
array('version' => 'auto', 'relative'
=> true)); ?>
									<?php $dataShowOn = " data-showon='" .
json_encode(JFormHelper::parseShowOnConditions($field->showon,
$field->formControl, $field->group)) . "'"; ?>
								<?php endif; ?>
								<div class="js-stools-field-filter"<?php echo
$dataShowOn; ?>>
									<?php echo $field->input; ?>
								</div>
							<?php endif; ?>
						<?php endforeach; ?>
					  	</div>
					  	<div class="navbar-form navbar-right">
					  		<!-- 
					  		<div class="input-group">
						      <input name="filter[search]"
id="filter_search" type="text"
class="form-control" placeholder="Search events...">
						      <span class="input-group-btn">
						        <button class="btn btn-default"
type="button">Search</button>
						      </span>
						    </div>
						     -->
						     <!-- /input-group -->
					  	</div>
			  		</div>
			  	</div>
			  </nav>
			</div>
			<div class="page-content">
				<?php echo NotiflyHelper::showWarning(); ?>
				
				<table class="table table-hover">
					<tbody>
					<?php foreach ($this->items as $i => $item) : ?>
						<?php $token = JFactory::getSession()->getFormToken(); ?>
						<?php 
						if(!$item->image_url) $img =
"//logo.clearbit.com/themesgrove.com"; else $img =
$item->image_url;
						 ?>
						<tr>
							<td width="70%">
								<div class="row">
									<div class="col-md-2">
							      		<h3><img class="media-object img-circle" 
							      			src="<?php echo $img ?>"
alt="Image" 
							      			style="width: 64px; height: 64px; margin: 0
auto;"
						      			/></h3>
								  </div>
								  <div class="col-md-10">
								    <h4 class="muted text-uppercase"><?php echo
$item->template; ?></h4>
								    <p class="event-message"><?php echo
NotiflyMessageHelper::parseMessage($item->message, $item);
?></p>
								  </div>
								</div>
							</td>
							<td width="15%">
								<strong>Created</strong> <br> <?php echo
date("D, M jS Y", strtotime($item->created)); ?>
							</td>
							<td width="15%">
								<a
href="index.php?option=com_notifly&task=event.edit&id=<?php
echo $item->id; ?>&<?php echo $token; ?>=1"
class="btn btn-primary"><i
class="cfi-edit"></i> Edit</a>
								<a
href="index.php?option=com_notifly&task=event.delete&cid=<?php
echo $item->id; ?>&<?php echo $token; ?>=1"
class="btn btn-warning"><i
class="cfi-trash-2"></i></a>
							</td>
						</tr>
					<?php endforeach; ?>
					</tbody>
				</table>
			
			<?php echo $this->pagination->getListFooter(); ?>
			
			</div>
			
			<input type="hidden" name="task"
value="" />
			<input type="hidden" name="boxchecked"
value="0" />
			<?php echo JHtml::_('form.token'); ?>
		</div>
	</div>
</form>
<script
type="text/javascript">window.convertFromMarkdown();</script>
events/tmpl/default.xml000064400000000322151156263540011177
0ustar00<?xml version="1.0" encoding="utf-8"?>
<metadata>
	<layout title="COM_NOTIFLY_ARTICLES_VIEW_DEFAULT_TITLE">
		<message>
			<![CDATA[COM_NOTIFLY_ARTICLES_VIEW_DEFAULT_DESC]]>
		</message>
	</layout>
</metadata>
events/tmpl/modal.php000064400000013344151156263540010646 0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_notifly
 *
 * @copyright   Copyright (C) 2005 - 2017 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

$app = JFactory::getApplication();

if ($app->isClient('site'))
{
	JSession::checkToken('get') or
die(JText::_('JINVALID_TOKEN'));
}

JLoader::register('NotiflyHelperRoute', JPATH_ROOT .
'/components/com_notifly/helpers/route.php');

// Include the component HTML helpers.
JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html');

JHtml::_('behavior.core');
JHtml::_('behavior.polyfill', array('event'), 'lt
IE 9');
JHtml::_('script',
'com_notifly/admin-articles-modal.min.js',
array('version' => 'auto', 'relative'
=> true));
JHtml::_('bootstrap.tooltip', '.hasTooltip',
array('placement' => 'bottom'));
JHtml::_('formbehavior.chosen', 'select');

// Special case for the search field tooltip.
$searchFilterDesc =
$this->filterForm->getFieldAttribute('search',
'description', null, 'filter');
JHtml::_('bootstrap.tooltip', '#filter_search',
array('title' => JText::_($searchFilterDesc),
'placement' => 'bottom'));

$function  = $app->input->getCmd('function',
'jSelectArticle');
$editor    = $app->input->getCmd('editor', '');
$listOrder =
$this->escape($this->state->get('list.ordering'));
$listDirn  =
$this->escape($this->state->get('list.direction'));
$onclick   = $this->escape($function);

if (!empty($editor))
{
	// This view is used also in com_menus. Load the xtd script only if the
editor is set!
	JFactory::getDocument()->addScriptOptions('xtd-articles',
array('editor' => $editor));
	$onclick = "jSelectArticle";
}
?>
<div class="container-popup">

	<form action="<?php echo
JRoute::_('index.php?option=com_notifly&view=articles&layout=modal&tmpl=component&function='
. $function . '&' . JSession::getFormToken() .
'=1&editor=' . $editor); ?>" method="post"
name="adminForm" id="adminForm"
class="form-inline">

		<?php echo
JLayoutHelper::render('joomla.searchtools.default',
array('view' => $this)); ?>

		<div class="clearfix"></div>

		<?php if (empty($this->items)) : ?>
			<div class="alert alert-no-items">
				<?php echo JText::_('JGLOBAL_NO_MATCHING_RESULTS'); ?>
			</div>
		<?php else : ?>
			<table class="table table-striped table-condensed">
				<thead>
					<tr>
						<th width="1%" class="center nowrap">
							<?php echo JHtml::_('searchtools.sort',
'JSTATUS', 'a.state', $listDirn, $listOrder); ?>
						</th>
						<th class="title">
							<?php echo JHtml::_('searchtools.sort',
'JGLOBAL_TITLE', 'a.title', $listDirn, $listOrder);
?>
						</th>
						<th width="10%" class="nowrap
hidden-phone">
							<?php echo JHtml::_('searchtools.sort',
'JGRID_HEADING_ACCESS', 'a.access', $listDirn,
$listOrder); ?>
						</th>
						<th width="15%" class="nowrap">
							<?php echo JHtml::_('searchtools.sort',
'JGRID_HEADING_LANGUAGE', 'language', $listDirn,
$listOrder); ?>
						</th>
						<th width="5%" class="nowrap hidden-phone">
							<?php echo JHtml::_('searchtools.sort',
'JDATE', 'a.created', $listDirn, $listOrder); ?>
						</th>
						<th width="1%" class="nowrap hidden-phone">
						<?php echo JHtml::_('searchtools.sort',
'JGRID_HEADING_ID', 'a.id', $listDirn, $listOrder);
?>
						</th>
					</tr>
				</thead>
				<tfoot>
					<tr>
						<td colspan="6">
							<?php echo $this->pagination->getListFooter(); ?>
						</td>
					</tr>
				</tfoot>
				<tbody>
				<?php
				$iconStates = array(
					-2 => 'icon-trash',
					0  => 'icon-unpublish',
					1  => 'icon-publish',
					2  => 'icon-archive',
				);
				?>
				<?php foreach ($this->items as $i => $item) : ?>
					<?php if ($item->language &&
JLanguageMultilang::isEnabled())
					{
						$tag = strlen($item->language);
						if ($tag == 5)
						{
							$lang = substr($item->language, 0, 2);
						}
						elseif ($tag == 6)
						{
							$lang = substr($item->language, 0, 3);
						}
						else {
							$lang = '';
						}
					}
					elseif (!JLanguageMultilang::isEnabled())
					{
						$lang = '';
					}
					?>
					<tr class="row<?php echo $i % 2; ?>">
						<td class="center">
							<span class="<?php echo
$iconStates[$this->escape($item->state)]; ?>"
aria-hidden="true"></span>
						</td>
						<td>
							<?php $attribs = 'data-function="' .
$this->escape($onclick) . '"'
								. ' data-id="' . $item->id . '"'
								. ' data-title="' .
$this->escape(addslashes($item->title)) . '"'
								. ' data-cat-id="' .
$this->escape($item->catid) . '"'
								. ' data-uri="' .
$this->escape(NotiflyHelperRoute::getArticleRoute($item->id,
$item->catid, $item->language)) . '"'
								. ' data-language="' . $this->escape($lang) .
'"';
							?>
							<a class="select-link"
href="javascript:void(0)" <?php echo $attribs; ?>>
								<?php echo $this->escape($item->title); ?>
							</a>
							<div class="small">
								<?php echo JText::_('JCATEGORY') . ': ' .
$this->escape($item->category_title); ?>
							</div>
						</td>
						<td class="small hidden-phone">
							<?php echo $this->escape($item->access_level); ?>
						</td>
						<td class="small">
							<?php echo
JLayoutHelper::render('joomla.content.language', $item); ?>
						</td>
						<td class="nowrap small hidden-phone">
							<?php echo JHtml::_('date', $item->created,
JText::_('DATE_FORMAT_LC4')); ?>
						</td>
						<td class="nowrap small hidden-phone">
							<?php echo (int) $item->id; ?>
						</td>
					</tr>
				<?php endforeach; ?>
				</tbody>
			</table>
		<?php endif; ?>

		<input type="hidden" name="task"
value="" />
		<input type="hidden" name="boxchecked"
value="0" />
		<input type="hidden" name="forcedLanguage"
value="<?php echo
$app->input->get('forcedLanguage', '',
'CMD'); ?>" />
		<?php echo JHtml::_('form.token'); ?>

	</form>
</div>
events/view.html.php000064400000011336151156263540010512 0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_notifly
 *
 * @copyright   Copyright (C) 2005 - 2017 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

/**
 * View class for a list of events.
 *
 * @since  1.6
 */
class NotiflyViewEvents extends JViewLegacy
{
	/**
	 * The item authors
	 *
	 * @var  stdClass
	 */
	protected $authors;

	/**
	 * An array of items
	 *
	 * @var  array
	 */
	protected $items;

	/**
	 * The pagination object
	 *
	 * @var  JPagination
	 */
	protected $pagination;

	/**
	 * The model state
	 *
	 * @var  object
	 */
	protected $state;

	/**
	 * Form object for search filters
	 *
	 * @var  JForm
	 */
	public $filterForm;

	/**
	 * The active search filters
	 *
	 * @var  array
	 */
	public $activeFilters;

	/**
	 * The sidebar markup
	 *
	 * @var  string
	 */
	protected $sidebar;

	/**
	 * Display the view
	 *
	 * @param   string  $tpl  The name of the template file to parse;
automatically searches through the template paths.
	 *
	 * @return  mixed  A string if successful, otherwise an Error object.
	 */
	public function display($tpl = null)
	{
		NotiflyHelper::addSubmenu('events');

		$this->items         = $this->get('Items');
		$this->pagination    = $this->get('Pagination');
		$this->state         = $this->get('State');
		$this->authors       = $this->get('Authors');
		$this->filterForm    = $this->get('FilterForm');
		$this->activeFilters = $this->get('ActiveFilters');
		
		// Check for errors.
		if (count($errors = $this->get('Errors')))
		{
			throw new Exception(implode("\n", $errors), 500);
		}


		$this->addToolbar();
		$this->sidebar = JHtmlSidebar::render();

		return parent::display($tpl);
	}

	/**
	 * Add the page title and toolbar.
	 *
	 * @return  void
	 *
	 * @since   1.6
	 */
	protected function addToolbar()
	{
		$canDo = JHelperContent::getActions('com_notifly',
'events');
		$user  = JFactory::getUser();

		// Get the toolbar object instance
		$bar = JToolbar::getInstance('toolbar');

		JToolbarHelper::title(JText::_('COM_NOTIFLY_EVENTS_TITLE'),
'stack events');

		// if ($canDo->get('core.create') ||
count($user->getAuthorisedCategories('com_notifly',
'core.create')) > 0)
		// {
		// 	JToolbarHelper::addNew('event.add');
		// }

		// if ($canDo->get('core.edit') ||
$canDo->get('core.edit.own'))
		// {
		// 	JToolbarHelper::editList('event.edit');
		// }

		// if ($canDo->get('core.edit.state'))
		// {
		// 	JToolbarHelper::publish('events.publish',
'JTOOLBAR_PUBLISH', true);
		// 	JToolbarHelper::unpublish('events.unpublish',
'JTOOLBAR_UNPUBLISH', true);
		// 	JToolbarHelper::custom('events.featured',
'featured.png', 'featured_f2.png',
'JFEATURE', true);
		// 	JToolbarHelper::custom('events.unfeatured',
'unfeatured.png', 'featured_f2.png',
'JUNFEATURE', true);
		// 	JToolbarHelper::archiveList('events.archive');
		// 	JToolbarHelper::checkin('events.checkin');
		// }

		// Add a batch button
		// if ($user->authorise('core.create',
'com_notifly')
		// 	&& $user->authorise('core.edit',
'com_notifly')
		// 	&& $user->authorise('core.edit.state',
'com_notifly'))
		// {
		// 	$title = JText::_('JTOOLBAR_BATCH');

		// 	// Instantiate a new JLayoutFile instance and render the batch button
		// 	$layout = new JLayoutFile('joomla.toolbar.batch');

		// 	$dhtml = $layout->render(array('title' => $title));
		// 	$bar->appendButton('Custom', $dhtml, 'batch');
		// }

		// if ($this->state->get('filter.published') == -2
&& $canDo->get('core.delete'))
		// {
		// 	JToolbarHelper::deleteList('JGLOBAL_CONFIRM_DELETE',
'events.delete', 'JTOOLBAR_EMPTY_TRASH');
		// }
		// elseif ($canDo->get('core.edit.state'))
		// {
		// 	JToolbarHelper::trash('events.trash');
		// }

		if ($user->authorise('core.admin', 'com_notifly')
|| $user->authorise('core.options', 'com_notifly'))
		{
			JToolbarHelper::preferences('com_notifly');
		}

		$help_url  = 'https://www.themexpert.com/docs';
		JToolbarHelper::help( 'COM_NOTIFLY_HELP_SITE', false, $help_url
);
	}

	/**
	 * Returns an array of fields the table can be sorted by
	 *
	 * @return  array  Array containing the field name to sort by as the key
and display text as value
	 *
	 * @since   3.0
	 */
	protected function getSortFields()
	{
		return array(
			'a.ordering'     =>
JText::_('JGRID_HEADING_ORDERING'),
			'a.state'        => JText::_('JSTATUS'),
			'a.title'        => JText::_('JGLOBAL_TITLE'),
			'category_title' => JText::_('JCATEGORY'),
			'access_level'   =>
JText::_('JGRID_HEADING_ACCESS'),
			'a.created_by'   => JText::_('JAUTHOR'),
			'language'       =>
JText::_('JGRID_HEADING_LANGUAGE'),
			'a.created'      => JText::_('JDATE'),
			'a.id'           => JText::_('JGRID_HEADING_ID'),
			'a.featured'     => JText::_('JFEATURED')
		);
	}
}
integration/tmpl/edit.php000064400000012652151156263540011517
0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_notifly
 *
 * @copyright   Copyright (C) 2005 - 2017 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

use Joomla\Registry\Registry;

// Include the component HTML helpers.
JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html');

JHtml::_('behavior.formvalidator');
JHtml::_('behavior.keepalive');
JHtml::_('formbehavior.chosen', '#jform_catid', null,
array('disable_search_threshold' => 0 ));
JHtml::_('formbehavior.chosen', 'select');

$this->configFieldsets  = array('editorConfig');
$this->hiddenFieldsets  = array('basic-limited');
$this->ignore_fieldsets = array('jmetadata',
'item_associations');

// Create shortcut to parameters.
$params = clone($this->state->get('params'));
$params->merge(new Registry($this->item->attribs));

$app = JFactory::getApplication();
$input = $app->input;

$assoc = JLanguageAssociations::isEnabled();

JFactory::getDocument()->addScriptDeclaration('
	Joomla.submitbutton = function(task)
	{
		if (task == "article.cancel" ||
document.formvalidator.isValid(document.getElementById("item-form")))
		{
			jQuery("#permissions-sliders
select").attr("disabled", "disabled");
			' . $this->form->getField('articletext')->save()
. '
			Joomla.submitform(task, document.getElementById("item-form"));

			// @deprecated 4.0  The following js is not needed since 3.7.0.
			if (task !== "article.apply")
			{
				window.parent.jQuery("#articleEdit' . (int)
$this->item->id . 'Modal").modal("hide");
			}
		}
	};
');

// In case of modal
$isModal = $input->get('layout') == 'modal' ? true :
false;
$layout  = $isModal ? 'modal' : 'edit';
$tmpl    = $isModal || $input->get('tmpl', '',
'cmd') === 'component' ?
'&tmpl=component' : '';
?>

<form action="<?php echo
JRoute::_('index.php?option=com_notifly&layout=' . $layout .
$tmpl . '&id=' . (int) $this->item->id); ?>"
method="post" name="adminForm" id="item-form"
class="form-validate">

	<?php echo JLayoutHelper::render('joomla.edit.title_alias',
$this); ?>

	<div class="form-horizontal">
		<?php echo JHtml::_('bootstrap.startTabSet',
'myTab', array('active' => 'general'));
?>

		<?php echo JHtml::_('bootstrap.addTab', 'myTab',
'general', JText::_('COM_NOTIFLY_ARTICLE_CONTENT'));
?>
		<div class="row-fluid">
			<div class="span9">
				<fieldset class="adminform">
					<?php echo $this->form->getInput('articletext');
?>
				</fieldset>
			</div>
			<div class="span3">
				<?php echo JLayoutHelper::render('joomla.edit.global',
$this); ?>
			</div>
		</div>
		<?php echo JHtml::_('bootstrap.endTab'); ?>

		<?php // Do not show the images and links options if the edit form is
configured not to. ?>
		<?php if ($params->get('show_urls_images_backend') == 1)
: ?>
			<?php echo JHtml::_('bootstrap.addTab', 'myTab',
'images',
JText::_('COM_NOTIFLY_FIELDSET_URLS_AND_IMAGES')); ?>
			<div class="row-fluid form-horizontal-desktop">
				<div class="span6">
					<?php echo $this->form->renderField('images');
?>
					<?php foreach ($this->form->getGroup('images') as
$field) : ?>
						<?php echo $field->renderField(); ?>
					<?php endforeach; ?>
				</div>
				<div class="span6">
					<?php foreach ($this->form->getGroup('urls') as
$field) : ?>
						<?php echo $field->renderField(); ?>
					<?php endforeach; ?>
				</div>
			</div>
			<?php echo JHtml::_('bootstrap.endTab'); ?>
		<?php endif; ?>

		<?php $this->show_options =
$params->get('show_article_options', 1); ?>
		<?php echo JLayoutHelper::render('joomla.edit.params',
$this); ?>

		<?php // Do not show the publishing options if the edit form is
configured not to. ?>
		<?php if ($params->get('show_publishing_options', 1) ==
1) : ?>
			<?php echo JHtml::_('bootstrap.addTab', 'myTab',
'publishing',
JText::_('COM_NOTIFLY_FIELDSET_PUBLISHING')); ?>
			<div class="row-fluid form-horizontal-desktop">
				<div class="span6">
					<?php echo
JLayoutHelper::render('joomla.edit.publishingdata', $this); ?>
				</div>
				<div class="span6">
					<?php echo JLayoutHelper::render('joomla.edit.metadata',
$this); ?>
				</div>
			</div>
			<?php echo JHtml::_('bootstrap.endTab'); ?>
		<?php endif; ?>


		<?php if ( ! $isModal && $assoc) : ?>
			<?php echo JHtml::_('bootstrap.addTab', 'myTab',
'associations',
JText::_('JGLOBAL_FIELDSET_ASSOCIATIONS')); ?>
			<?php echo $this->loadTemplate('associations'); ?>
			<?php echo JHtml::_('bootstrap.endTab'); ?>
		<?php elseif ($isModal && $assoc) : ?>
			<div class="hidden"><?php echo
$this->loadTemplate('associations'); ?></div>
		<?php endif; ?>

		<?php if ($this->canDo->get('core.admin')) : ?>
			<?php echo JHtml::_('bootstrap.addTab', 'myTab',
'editor',
JText::_('COM_NOTIFLY_SLIDER_EDITOR_CONFIG')); ?>
			<?php echo
$this->form->renderFieldset('editorConfig'); ?>
			<?php echo JHtml::_('bootstrap.endTab'); ?>
		<?php endif; ?>

		<?php if ($this->canDo->get('core.admin')) : ?>
			<?php echo JHtml::_('bootstrap.addTab', 'myTab',
'permissions', JText::_('COM_NOTIFLY_FIELDSET_RULES'));
?>
				<?php echo $this->form->getInput('rules'); ?>
			<?php echo JHtml::_('bootstrap.endTab'); ?>
		<?php endif; ?>

		<?php echo JHtml::_('bootstrap.endTabSet'); ?>

		<input type="hidden" name="task"
value="" />
		<input type="hidden" name="return"
value="<?php echo $input->getCmd('return');
?>" />
		<input type="hidden" name="forcedLanguage"
value="<?php echo $input->get('forcedLanguage',
'', 'cmd'); ?>" />
		<?php echo JHtml::_('form.token'); ?>
	</div>
</form>
integration/tmpl/edit.xml000064400000000530151156263540011520
0ustar00<?xml version="1.0" encoding="utf-8"?>
<metadata>
	<layout title="COM_NOTIFLY_ARTICLE_VIEW_EDIT_TITLE">
		<message>
			<![CDATA[COM_NOTIFLY_ARTICLE_VIEW_EDIT_DESC]]>
		</message>
	</layout>
	<fieldset name="request">
		<fields name="request">
			<field
				name="id"
				type="hidden"
				default="0"
			/>
		</fields>
	</fieldset>
</metadata>
integration/tmpl/modal.php000064400000002554151156263540011666
0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_notifly
 *
 * @copyright   Copyright (C) 2005 - 2017 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

JHtml::_('bootstrap.tooltip', '.hasTooltip',
array('placement' => 'bottom'));

// @deprecated 4.0 the function parameter, the inline js and the buttons
are not needed since 3.7.0.
$function  =
JFactory::getApplication()->input->getCmd('function',
'jEditArticle_' . (int) $this->item->id);

// Function to update input title when changed
JFactory::getDocument()->addScriptDeclaration('
	function jEditArticleModal() {
		if (window.parent &&
document.formvalidator.isValid(document.getElementById("item-form")))
{
			return window.parent.' . $this->escape($function) .
'(document.getElementById("jform_title").value);
		}
	}
');
?>
<button id="applyBtn" type="button"
class="hidden"
onclick="Joomla.submitbutton('article.apply');
jEditArticleModal();"></button>
<button id="saveBtn" type="button"
class="hidden"
onclick="Joomla.submitbutton('article.save');
jEditArticleModal();"></button>
<button id="closeBtn" type="button"
class="hidden"
onclick="Joomla.submitbutton('article.cancel');"></button>

<div class="container-popup">
	<?php $this->setLayout('edit'); ?>
	<?php echo $this->loadTemplate(); ?>
</div>
integration/view.html.php000064400000010327151156263540011530
0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_notifly
 *
 * @copyright   Copyright (C) 2005 - 2017 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

/**
 * View to edit an article.
 *
 * @since  1.6
 */
class NotiflyViewArticle extends JViewLegacy
{
	/**
	 * The JForm object
	 *
	 * @var  JForm
	 */
	protected $form;

	/**
	 * The active item
	 *
	 * @var  object
	 */
	protected $item;

	/**
	 * The model state
	 *
	 * @var  object
	 */
	protected $state;

	/**
	 * The actions the user is authorised to perform
	 *
	 * @var  JObject
	 */
	protected $canDo;

	/**
	 * Execute and display a template script.
	 *
	 * @param   string  $tpl  The name of the template file to parse;
automatically searches through the template paths.
	 *
	 * @return  mixed  A string if successful, otherwise an Error object.
	 *
	 * @since   1.6
	 */
	public function display($tpl = null)
	{
		if ($this->getLayout() == 'pagebreak')
		{

			return parent::display($tpl);
		}

		$this->form  = $this->get('Form');
		$this->item  = $this->get('Item');
		$this->state = $this->get('State');
		$this->canDo = JHelperNotifly::getActions('com_notifly',
'article', $this->item->id);

		// Check for errors.
		if (count($errors = $this->get('Errors')))
		{
			throw new Exception(implode("\n", $errors), 500);
		}

		// If we are forcing a language in modal (used for associations).
		if ($this->getLayout() === 'modal' &&
$forcedLanguage =
JFactory::getApplication()->input->get('forcedLanguage',
'', 'cmd'))
		{
			// Set the language field to the forcedLanguage and disable changing it.
			$this->form->setValue('language', null,
$forcedLanguage);
			$this->form->setFieldAttribute('language',
'readonly', 'true');

			// Only allow to select categories with All language or with the forced
language.
			$this->form->setFieldAttribute('catid',
'language', '*,' . $forcedLanguage);

			// Only allow to select tags with All language or with the forced
language.
			$this->form->setFieldAttribute('tags',
'language', '*,' . $forcedLanguage);
		}

		$this->addToolbar();

		return parent::display($tpl);
	}

	/**
	 * Add the page title and toolbar.
	 *
	 * @return  void
	 *
	 * @since   1.6
	 */
	protected function addToolbar()
	{
		JFactory::getApplication()->input->set('hidemainmenu',
true);
		$user       = JFactory::getUser();
		$userId     = $user->id;
		$isNew      = ($this->item->id == 0);
		$checkedOut = !($this->item->checked_out == 0 ||
$this->item->checked_out == $userId);

		// Built the actions for new and existing records.
		$canDo = $this->canDo;

		JToolbarHelper::title(
			JText::_('COM_NOTIFLY_PAGE_' . ($checkedOut ?
'VIEW_ARTICLE' : ($isNew ? 'ADD_ARTICLE' :
'EDIT_ARTICLE'))),
			'pencil-2 article-add'
		);

		// For new records, check the create permission.
		if ($isNew &&
(count($user->getAuthorisedCategories('com_notifly',
'core.create')) > 0))
		{
			JToolbarHelper::apply('article.apply');
			JToolbarHelper::save('article.save');
			JToolbarHelper::save2new('article.save2new');
			JToolbarHelper::cancel('article.cancel');
		}
		else
		{
			// Since it's an existing record, check the edit permission, or
fall back to edit own if the owner.
			$itemEditable = $canDo->get('core.edit') ||
($canDo->get('core.edit.own') &&
$this->item->created_by == $userId);

			// Can't save the record if it's checked out and editable
			if (!$checkedOut && $itemEditable)
			{
				JToolbarHelper::apply('article.apply');
				JToolbarHelper::save('article.save');

				// We can save this record, but check the create permission to see if
we can return to make a new one.
				if ($canDo->get('core.create'))
				{
					JToolbarHelper::save2new('article.save2new');
				}
			}

			// If checked out, we can still save
			if ($canDo->get('core.create'))
			{
				JToolbarHelper::save2copy('article.save2copy');
			}

			if (JComponentHelper::isEnabled('com_notiflyhistory')
&& $this->state->params->get('save_history', 0)
&& $itemEditable)
			{
				JToolbarHelper::versions('com_notifly.article',
$this->item->id);
			}

			JToolbarHelper::cancel('article.cancel',
'JTOOLBAR_CLOSE');
		}

		JToolbarHelper::divider();
		JToolbarHelper::help('JHELP_CONTENT_ARTICLE_MANAGER_EDIT');
	}
}
integrations/tmpl/default.php000064400000010655151156263540012402
0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_notifly
 *
 * @copyright   Copyright (C) 2005 - 2017 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html');

JHtml::_('bootstrap.tooltip');
JHtml::_('behavior.multiselect');
JHtml::_('formbehavior.chosen', 'select');

$user      = JFactory::getUser();
$userId    = $user->get('id');
$list = array_chunk($this->items, 4);

?>

<form action="<?php echo
JRoute::_('index.php?option=com_notifly&view=dashboard');
?>" method="post" name="adminForm"
id="adminForm">
<div id="cf" class="integrations tx-flex">
	<?php if (!empty( $this->sidebar)) : ?>
	<div class="tx-sidebar">
		<?php echo $this->sidebar; ?>
	</div>
	<div class="tx-main">
	<?php else : ?>
	<div class="tx-main">
	<?php endif; ?>
		<div class="page-header">
		  <h1>Integrations</h1>
		</div>
		<div class="page-content">
			<?php echo NotiflyHelper::showWarning(); ?>
			
			<?php foreach ($list as $key => $items) { ?>
				<div class="row">
				<?php foreach ($items as $key => $item) { ?>
					<?php 
					// Load language file for use throughout the plugin
					JFactory::getLanguage()->load($item->name, JPATH_ADMINISTRATOR);
					 ?>
					<div class="col-md-3">
						<div class="panel panel-default text-center">
							<div class="panel-body">
								<img class="int-logo" src="<?php echo
Juri::root() .
'plugins/notifly/'.$item->element.'/media/logo.png';
?>" alt="<?php echo $item->element; ?>">
								<h4><?php echo JText::_(strtoupper($item->name));
?></h4>
							</div>
							<div class="panel-footer">
								<?php if($item->enabled){ ?>
									<?php $link =
'index.php?option=com_plugins&task=plugin.edit&layout=modal&tmpl=component&extension_id='
. $item->extension_id; ?>
									<a href="#integrationEdit<?php echo
$item->extension_id; ?>Modal" role="button"
class="btn btn-primary btn-block" data-toggle="modal"
title="<?php echo
JText::_('COM_MENUS_EDIT_INTEGRATION_SETTINGS'); ?>"
id="title-<?php echo $item->extension_id; ?>">
										<?php echo
JText::_('COM_NOTIFLY_CONFIGURE_INTEGRATION'); ?>
									</a>
								<?php  }else{ ?>
									<?php $token = JFactory::getSession()->getFormToken(); ?>
									<?php $link =
'index.php?option=com_notifly&task=integrations.enable&'.$token.'=1&ids[]='.$item->extension_id;
?>
									<a href="<?php echo $link; ?>" class="btn
btn-default btn-block">
										<?php echo
JText::_('COM_NOTIFLY_CONFIGURE_INTEGRATION_ENABLE'); ?>
									</a>
								<?php } ?>
							</div>
							<?php echo JHtml::_(
								'bootstrap.renderModal',
								'integrationEdit' . $item->extension_id .
'Modal',
								array(
									'title'       =>
JText::_('COM_NOTIFLY_EDIT_INTEGRATION_SETTINGS'),
									'backdrop'    => 'static',
									'keyboard'    => false,
									'closeButton' => true,
									'url'         => $link,
									'bodyHeight'  => '70',
									'footer'      => '<button
type="button" class="tx-btn btn btn-primary"
aria-hidden="true"'
											. ' onclick="jQuery(\'#integrationEdit' .
$item->extension_id . 'Modal
iframe\').contents().find(\'#saveBtn\').click();">'
											. JText::_('JSAVE') . '</button>'
											// . '<button type="button" class="tx-btn
btn btn-primary" aria-hidden="true"'
											// . ' onclick="jQuery(\'#integrationEdit' .
$item->extension_id . 'Modal
iframe\').contents().find(\'#closeBtn\').click();">'
											// . JText::_('JCANCEL') .
'</button>',
								)
							); ?>

						</div>
					</div>
				<?php } ?>
				</div>
			<?php } ?>
			<div class="row">
				<div class="col-md-10 col-md-offset-1">
					<div class="request-block">
						<div class="media"> 
							<div class="media-body"> 
								<h4 class="media-heading">Need Your Extension
Integration?</h4> 
								We'd love to integrate your extention out-of-the-box. All you
have to let us know.
							</div> 
							<div class="media-right"> <a class="btn
btn-success" href="http://suggest.themexpert.com"
target="_blank"><i
class="cfi-twitter"></i> Let Us Know</a>
</div> 
						</div>
					</div>
				</div>
			</div>

			<?php echo $this->pagination->getListFooter(); ?>

		</div>

			<input type="hidden" name="task"
value="" />
			<input type="hidden" name="dashboard"
value="1" />
			<input type="hidden" name="boxchecked"
value="0" />
			<?php echo JHtml::_('form.token'); ?>
		</div> <!-- container -->
	</div>
</form>integrations/tmpl/default.xml000064400000000322151156263570012404
0ustar00<?xml version="1.0" encoding="utf-8"?>
<metadata>
	<layout title="COM_NOTIFLY_ARTICLES_VIEW_DEFAULT_TITLE">
		<message>
			<![CDATA[COM_NOTIFLY_ARTICLES_VIEW_DEFAULT_DESC]]>
		</message>
	</layout>
</metadata>
integrations/tmpl/modal.php000064400000013344151156263570012053
0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_notifly
 *
 * @copyright   Copyright (C) 2005 - 2017 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

$app = JFactory::getApplication();

if ($app->isClient('site'))
{
	JSession::checkToken('get') or
die(JText::_('JINVALID_TOKEN'));
}

JLoader::register('NotiflyHelperRoute', JPATH_ROOT .
'/components/com_notifly/helpers/route.php');

// Include the component HTML helpers.
JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html');

JHtml::_('behavior.core');
JHtml::_('behavior.polyfill', array('event'), 'lt
IE 9');
JHtml::_('script',
'com_notifly/admin-articles-modal.min.js',
array('version' => 'auto', 'relative'
=> true));
JHtml::_('bootstrap.tooltip', '.hasTooltip',
array('placement' => 'bottom'));
JHtml::_('formbehavior.chosen', 'select');

// Special case for the search field tooltip.
$searchFilterDesc =
$this->filterForm->getFieldAttribute('search',
'description', null, 'filter');
JHtml::_('bootstrap.tooltip', '#filter_search',
array('title' => JText::_($searchFilterDesc),
'placement' => 'bottom'));

$function  = $app->input->getCmd('function',
'jSelectArticle');
$editor    = $app->input->getCmd('editor', '');
$listOrder =
$this->escape($this->state->get('list.ordering'));
$listDirn  =
$this->escape($this->state->get('list.direction'));
$onclick   = $this->escape($function);

if (!empty($editor))
{
	// This view is used also in com_menus. Load the xtd script only if the
editor is set!
	JFactory::getDocument()->addScriptOptions('xtd-articles',
array('editor' => $editor));
	$onclick = "jSelectArticle";
}
?>
<div class="container-popup">

	<form action="<?php echo
JRoute::_('index.php?option=com_notifly&view=articles&layout=modal&tmpl=component&function='
. $function . '&' . JSession::getFormToken() .
'=1&editor=' . $editor); ?>" method="post"
name="adminForm" id="adminForm"
class="form-inline">

		<?php echo
JLayoutHelper::render('joomla.searchtools.default',
array('view' => $this)); ?>

		<div class="clearfix"></div>

		<?php if (empty($this->items)) : ?>
			<div class="alert alert-no-items">
				<?php echo JText::_('JGLOBAL_NO_MATCHING_RESULTS'); ?>
			</div>
		<?php else : ?>
			<table class="table table-striped table-condensed">
				<thead>
					<tr>
						<th width="1%" class="center nowrap">
							<?php echo JHtml::_('searchtools.sort',
'JSTATUS', 'a.state', $listDirn, $listOrder); ?>
						</th>
						<th class="title">
							<?php echo JHtml::_('searchtools.sort',
'JGLOBAL_TITLE', 'a.title', $listDirn, $listOrder);
?>
						</th>
						<th width="10%" class="nowrap
hidden-phone">
							<?php echo JHtml::_('searchtools.sort',
'JGRID_HEADING_ACCESS', 'a.access', $listDirn,
$listOrder); ?>
						</th>
						<th width="15%" class="nowrap">
							<?php echo JHtml::_('searchtools.sort',
'JGRID_HEADING_LANGUAGE', 'language', $listDirn,
$listOrder); ?>
						</th>
						<th width="5%" class="nowrap hidden-phone">
							<?php echo JHtml::_('searchtools.sort',
'JDATE', 'a.created', $listDirn, $listOrder); ?>
						</th>
						<th width="1%" class="nowrap hidden-phone">
						<?php echo JHtml::_('searchtools.sort',
'JGRID_HEADING_ID', 'a.id', $listDirn, $listOrder);
?>
						</th>
					</tr>
				</thead>
				<tfoot>
					<tr>
						<td colspan="6">
							<?php echo $this->pagination->getListFooter(); ?>
						</td>
					</tr>
				</tfoot>
				<tbody>
				<?php
				$iconStates = array(
					-2 => 'icon-trash',
					0  => 'icon-unpublish',
					1  => 'icon-publish',
					2  => 'icon-archive',
				);
				?>
				<?php foreach ($this->items as $i => $item) : ?>
					<?php if ($item->language &&
JLanguageMultilang::isEnabled())
					{
						$tag = strlen($item->language);
						if ($tag == 5)
						{
							$lang = substr($item->language, 0, 2);
						}
						elseif ($tag == 6)
						{
							$lang = substr($item->language, 0, 3);
						}
						else {
							$lang = '';
						}
					}
					elseif (!JLanguageMultilang::isEnabled())
					{
						$lang = '';
					}
					?>
					<tr class="row<?php echo $i % 2; ?>">
						<td class="center">
							<span class="<?php echo
$iconStates[$this->escape($item->state)]; ?>"
aria-hidden="true"></span>
						</td>
						<td>
							<?php $attribs = 'data-function="' .
$this->escape($onclick) . '"'
								. ' data-id="' . $item->id . '"'
								. ' data-title="' .
$this->escape(addslashes($item->title)) . '"'
								. ' data-cat-id="' .
$this->escape($item->catid) . '"'
								. ' data-uri="' .
$this->escape(NotiflyHelperRoute::getArticleRoute($item->id,
$item->catid, $item->language)) . '"'
								. ' data-language="' . $this->escape($lang) .
'"';
							?>
							<a class="select-link"
href="javascript:void(0)" <?php echo $attribs; ?>>
								<?php echo $this->escape($item->title); ?>
							</a>
							<div class="small">
								<?php echo JText::_('JCATEGORY') . ': ' .
$this->escape($item->category_title); ?>
							</div>
						</td>
						<td class="small hidden-phone">
							<?php echo $this->escape($item->access_level); ?>
						</td>
						<td class="small">
							<?php echo
JLayoutHelper::render('joomla.content.language', $item); ?>
						</td>
						<td class="nowrap small hidden-phone">
							<?php echo JHtml::_('date', $item->created,
JText::_('DATE_FORMAT_LC4')); ?>
						</td>
						<td class="nowrap small hidden-phone">
							<?php echo (int) $item->id; ?>
						</td>
					</tr>
				<?php endforeach; ?>
				</tbody>
			</table>
		<?php endif; ?>

		<input type="hidden" name="task"
value="" />
		<input type="hidden" name="boxchecked"
value="0" />
		<input type="hidden" name="forcedLanguage"
value="<?php echo
$app->input->get('forcedLanguage', '',
'CMD'); ?>" />
		<?php echo JHtml::_('form.token'); ?>

	</form>
</div>
integrations/view.html.php000064400000010551151156263570011715
0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_notifly
 *
 * @copyright   Copyright (C) 2005 - 2017 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

/**
 * View class for a list of articles.
 *
 * @since  1.6
 */
class NotiflyViewIntegrations extends JViewLegacy
{

	/**
	 * An array of items
	 *
	 * @var  array
	 */
	protected $items;

	/**
	 * The pagination object
	 *
	 * @var  JPagination
	 */
	protected $pagination;

	/**
	 * The model state
	 *
	 * @var  object
	 */
	protected $state;

	/**
	 * Form object for search filters
	 *
	 * @var  JForm
	 */
	public $filterForm;

	/**
	 * The active search filters
	 *
	 * @var  array
	 */
	public $activeFilters;

	/**
	 * The sidebar markup
	 *
	 * @var  string
	 */
	protected $sidebar;

	/**
	 * Display the view
	 *
	 * @param   string  $tpl  The name of the template file to parse;
automatically searches through the template paths.
	 *
	 * @return  mixed  A string if successful, otherwise an Error object.
	 */
	public function display($tpl = null)
	{
		$this->items         = $this->get('Items');
		$this->pagination    = $this->get('Pagination');
		$this->state         = $this->get('State');
		// $this->filterForm    = $this->get('FilterForm');
		$this->activeFilters = $this->get('ActiveFilters');
		
		NotiflyHelper::addSubmenu('integrations');
		
		// Check for errors.
		if (count($errors = $this->get('Errors')))
		{
			throw new Exception(implode("\n", $errors), 500);
		}

		$this->addToolbar();
		$this->sidebar = JHtmlSidebar::render();

		return parent::display($tpl);
	}

	/**
	 * Add the page title and toolbar.
	 *
	 * @return  void
	 *
	 * @since   1.6
	 */
	protected function addToolbar()
	{
		$canDo = JHelperContent::getActions('com_notifly',
'integrations');
		$user  = JFactory::getUser();

		// Get the toolbar object instance
		$bar = JToolbar::getInstance('toolbar');

		JToolbarHelper::title(JText::_('COM_NOTIFLY_INTEGRATIONS_TITLE'),
'stack integrations');

		// if ($canDo->get('core.create') ||
count($user->getAuthorisedCategories('com_notifly',
'core.create')) > 0)
		// {
		// 	JToolbarHelper::addNew('article.add');
		// }

		// if ($canDo->get('core.edit') ||
$canDo->get('core.edit.own'))
		// {
		// 	JToolbarHelper::editList('article.edit');
		// }

		// if ($canDo->get('core.edit.state'))
		// {
		// 	JToolbarHelper::publish('articles.publish',
'JTOOLBAR_PUBLISH', true);
		// 	JToolbarHelper::unpublish('articles.unpublish',
'JTOOLBAR_UNPUBLISH', true);
		// 	JToolbarHelper::custom('articles.featured',
'featured.png', 'featured_f2.png',
'JFEATURE', true);
		// 	JToolbarHelper::custom('articles.unfeatured',
'unfeatured.png', 'featured_f2.png',
'JUNFEATURE', true);
		// 	JToolbarHelper::archiveList('articles.archive');
		// 	JToolbarHelper::checkin('articles.checkin');
		// }

		// Add a batch button
		// if ($user->authorise('core.create',
'com_notifly')
		// 	&& $user->authorise('core.edit',
'com_notifly')
		// 	&& $user->authorise('core.edit.state',
'com_notifly'))
		// {
		// 	$title = JText::_('JTOOLBAR_BATCH');

		// 	// Instantiate a new JLayoutFile instance and render the batch button
		// 	$layout = new JLayoutFile('joomla.toolbar.batch');

		// 	$dhtml = $layout->render(array('title' => $title));
		// 	$bar->appendButton('Custom', $dhtml, 'batch');
		// }
		
		if ($user->authorise('core.admin', 'com_notifly')
|| $user->authorise('core.options', 'com_notifly'))
		{
			JToolbarHelper::preferences('com_notifly');
		}

		$help_url  = 'https://www.themexpert.com/docs';
		JToolbarHelper::help( 'COM_NOTIFLY_HELP_SITE', false, $help_url
);
	}

	/**
	 * Returns an array of fields the table can be sorted by
	 *
	 * @return  array  Array containing the field name to sort by as the key
and display text as value
	 *
	 * @since   3.0
	 */
	protected function getSortFields()
	{
		return array(
			'a.ordering'     =>
JText::_('JGRID_HEADING_ORDERING'),
			'a.state'        => JText::_('JSTATUS'),
			'a.title'        => JText::_('JGLOBAL_TITLE'),
			'category_title' => JText::_('JCATEGORY'),
			'access_level'   =>
JText::_('JGRID_HEADING_ACCESS'),
			'a.created_by'   => JText::_('JAUTHOR'),
			'language'       =>
JText::_('JGRID_HEADING_LANGUAGE'),
			'a.created'      => JText::_('JDATE'),
			'a.id'           => JText::_('JGRID_HEADING_ID'),
			'a.featured'     => JText::_('JFEATURED')
		);
	}
}
template/tmpl/edit.php000064400000012707151156263570011013 0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_notifly
 *
 * @copyright   Copyright (C) 2005 - 2017 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

use Joomla\Registry\Registry;

// Include the component HTML helpers.
JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html');
JHtml::_('behavior.formvalidator');
JHtml::_('behavior.keepalive');
JHtml::_('formbehavior.chosen', '#jform_catid', null,
array('disable_search_threshold' => 0 ));
JHtml::_('formbehavior.chosen', 'select');

// Create shortcut to parameters.
$params = clone($this->state->get('params'));
$params->merge(new Registry($this->item->attribs));

$app = JFactory::getApplication();
$input = $app->input;

JFactory::getDocument()->addScriptDeclaration('
	Joomla.submitbutton = function(task)
	{
		if (task == "template.cancel" ||
document.formvalidator.isValid(document.getElementById("item-form")))
		{
			jQuery("#permissions-sliders
select").attr("disabled", "disabled");
			Joomla.submitform(task, document.getElementById("item-form"));

			// @deprecated 4.0  The following js is not needed since 3.7.0.
			if (task !== "template.apply")
			{
				window.parent.jQuery("#templateEdit' . (int)
$this->item->id . 'Modal").modal("hide");
			}
		}
	};
');

// In case of modal
$isModal = $input->get('layout') == 'modal' ? true :
false;
$layout  = $isModal ? 'modal' : 'edit';
$tmpl    = $isModal || $input->get('tmpl', '',
'cmd') === 'component' ?
'&tmpl=component' : '';

JFactory::getDocument()->addScript('https://cdnjs.cloudflare.com/ajax/libs/showdown/1.8.1/showdown.min.js');
JFactory::getDocument()->addScript('https://rawgit.com/janl/mustache.js/master/mustache.min.js');
?>

<script>
	jQuery(function() {
		parseMessage();
		jQuery('#jform_message').bind('input propertychange',
function(){
			parseMessage();
		});
  });
  var sample = {
		  title: "Awesome Product",
		  name: 'Parvez Akther',
		  country: 'BD',
		  city: 'Dhaka',
		  province: 'Dhaka',
		  url: 'https://www.themexpert.com',
		  time: "2h ago",
		  image_url :
'https://www.gravatar.com/avatar/8c9aaae8b39d1036f844f218caf3995e?s=80&d=mm&r=g',
		};
  function parseMessage(){
		var msg = jQuery('#jform_message').val();
		// Markdown converter
		var converter 		= new showdown.Converter(),
    		renderedHtml 	= converter.makeHtml(Mustache.render(msg, sample));
    jQuery('#preview > .notifly-image >
img').attr('src', sample.image_url);
		jQuery('#preview .notifly-content').html(renderedHtml);
		jQuery('#preview time').html(sample.time);
	}
</script>

<form action="<?php echo
JRoute::_('index.php?option=com_notifly&view=template&layout='
. $layout . $tmpl . '&id=' . (int) $this->item->id);
?>" method="post" name="adminForm"
id="item-form" class="form-validate">
<div id="cf" class="template-edit tx-flex">
	<?php if (!empty( $this->sidebar)) : ?>
		<div class="tx-sidebar">
			<?php echo $this->sidebar; ?>
		</div>
	<?php endif;?>
	<div class="tx-main">
		<div class="page-header">
		  <h1>Edit Template</h1>
		  <!-- Nav tabs -->
		  <ul class="nav nav-tabs" role="tablist">
		    <li class="active"><a href="#message"
aria-controls="home" role="tab"
data-toggle="tab">Message</a></li>
		    <!-- <li><a href="#image"
aria-controls="profile" role="tab"
data-toggle="tab">Image</a></li> -->
		  </ul>
		</div> <!-- page header -->
		<div class="page-content">
			<div class="tab-content">
				<div class="tab-pane active" id="message">
					<div class="row">
						<div class="col-md-8">
							<div class="panel panel-default">
								<div class="panel-heading">Message
Template</div>
								<div class="panel-body">
									<?php echo $this->form->renderField('name');
?>
									<?php echo $this->form->renderField('message');
?>
									<p><strong>Markdown supported</strong>:
<code>*emphasized* _underline_ [Link Text](http://mycompany.com/url)
**strong**</code></p>
									<p>
										<strong>Variables: </strong>
										<span class="label label-default">{{ name
}}</span> 
										<span class="label label-default">{{ city
}}</span> 
										<span class="label label-default">{{ province
}}</span> 
										<span class="label label-default">{{ country
}}</span> 
										<span class="label label-default">{{ title
}}</span> 
										<span class="label label-default">{{
title_with_link }}</span> 
										<span class="label label-default">{{ url
}}</span> 
										<span class="label label-default">{{ time_ago
}}</span>
									</p>
									<?php echo $this->form->renderField('alias');
?>
									<?php echo
$this->form->renderField('extension_id'); ?>

								</div>
							</div>
						</div>
						<div class="col-md-4">
							<!-- 
							<h4>Preview</h4>
							<div class="panel panel-default">
								<div class="panel-body">
									Coming soon...
								</div>
							</div>
							 -->
						</div>
					</div>
				</div>
				<!-- 
				<div class="tab-pane" id="image">
					<div class="panel panel-default">
						<div class="panel-heading">Image Options</div>
						<div class="panel-body">
							<?php echo
$this->form->renderField('image_disable'); ?>
							<?php echo $this->form->renderField('avatar');
?>
							<?php echo $this->form->renderField('image_url');
?>
						</div>
					</div>
				</div>
				 -->
			</div>
		</div>
	</div>
</div>

	<input type="hidden" name="task" value=""
/>
	<input type="hidden" name="return"
value="<?php echo $input->getCmd('return');
?>" />
	<?php echo JHtml::_('form.token'); ?>
</form>
template/tmpl/edit.xml000064400000000530151156263570011013 0ustar00<?xml
version="1.0" encoding="utf-8"?>
<metadata>
	<layout title="COM_NOTIFLY_ARTICLE_VIEW_EDIT_TITLE">
		<message>
			<![CDATA[COM_NOTIFLY_ARTICLE_VIEW_EDIT_DESC]]>
		</message>
	</layout>
	<fieldset name="request">
		<fields name="request">
			<field
				name="id"
				type="hidden"
				default="0"
			/>
		</fields>
	</fieldset>
</metadata>
template/tmpl/modal.php000064400000002562151156263600011152
0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_notifly
 *
 * @copyright   Copyright (C) 2005 - 2017 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

JHtml::_('bootstrap.tooltip', '.hasTooltip',
array('placement' => 'bottom'));

// @deprecated 4.0 the function parameter, the inline js and the buttons
are not needed since 3.7.0.
$function  =
JFactory::getApplication()->input->getCmd('function',
'jEditArticle_' . (int) $this->item->id);

// Function to update input title when changed
JFactory::getDocument()->addScriptDeclaration('
	function jEditTemplateModal() {
		if (window.parent &&
document.formvalidator.isValid(document.getElementById("item-form")))
{
			return window.parent.' . $this->escape($function) .
'(document.getElementById("jform_title").value);
		}
	}
');
?>
<button id="applyBtn" type="button"
class="hidden"
onclick="Joomla.submitbutton('template.apply');
jEditTemplateModal();"></button>
<button id="saveBtn" type="button"
class="hidden"
onclick="Joomla.submitbutton('template.save');
jEditTemplateModal();"></button>
<button id="closeBtn" type="button"
class="hidden"
onclick="Joomla.submitbutton('template.cancel');"></button>

<div class="container-popup">
	<?php $this->setLayout('edit'); ?>
	<?php echo $this->loadTemplate(); ?>
</div>
template/view.html.php000064400000010534151156263600011015 0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_notifly
 *
 * @copyright   Copyright (C) 2005 - 2017 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

/**
 * View to edit an template.
 *
 * @since  1.6
 */
class NotiflyViewTemplate extends JViewLegacy
{
	/**
	 * The JForm object
	 *
	 * @var  JForm
	 */
	protected $form;

	/**
	 * The active item
	 *
	 * @var  object
	 */
	protected $item;

	/**
	 * The model state
	 *
	 * @var  object
	 */
	protected $state;

	/**
	 * The actions the user is authorised to perform
	 *
	 * @var  JObject
	 */
	protected $canDo;

	/**
	 * The sidebar markup
	 *
	 * @var  string
	 */
	protected $sidebar;
	
	/**
	 * Execute and display a template script.
	 *
	 * @param   string  $tpl  The name of the template file to parse;
automatically searches through the template paths.
	 *
	 * @return  mixed  A string if successful, otherwise an Error object.
	 *
	 * @since   1.6
	 */
	public function display($tpl = null)
	{
		if ($this->getLayout() == 'pagebreak')
		{

			return parent::display($tpl);
		}

		$this->form  = $this->get('Form');
		$this->item  = $this->get('Item');
		$this->state = $this->get('State');
		$this->canDo = JHelperContent::getActions('com_notifly',
'template', $this->item->id);

		// Check for errors.
		if (count($errors = $this->get('Errors')))
		{
			throw new Exception(implode("\n", $errors), 500);
		}

		// If we are forcing a language in modal (used for associations).
		if ($this->getLayout() === 'modal' &&
$forcedLanguage =
JFactory::getApplication()->input->get('forcedLanguage',
'', 'cmd'))
		{
			// Set the language field to the forcedLanguage and disable changing it.
			$this->form->setValue('language', null,
$forcedLanguage);
			$this->form->setFieldAttribute('language',
'readonly', 'true');

			// Only allow to select categories with All language or with the forced
language.
			$this->form->setFieldAttribute('catid',
'language', '*,' . $forcedLanguage);

			// Only allow to select tags with All language or with the forced
language.
			$this->form->setFieldAttribute('tags',
'language', '*,' . $forcedLanguage);
		}

		NotiflyHelper::addSubmenu('templates');
		
		$this->addToolbar();
		$this->sidebar = JHtmlSidebar::render();

		return parent::display($tpl);
	}

	/**
	 * Add the page title and toolbar.
	 *
	 * @return  void
	 *
	 * @since   1.6
	 */
	protected function addToolbar()
	{
		JFactory::getApplication()->input->set('hidemainmenu',
true);
		$user       = JFactory::getUser();
		$userId     = $user->id;
		$isNew      = ($this->item->id == 0);
		$checkedOut = !($this->item->checked_out == 0 ||
$this->item->checked_out == $userId);

		// Built the actions for new and existing records.
		$canDo = $this->canDo;

		JToolbarHelper::title(
			JText::_('COM_NOTIFLY_PAGE_EDIT_TEMPLATE'),
			'pencil-2 template-add'
		);

		// For new records, check the create permission.
		if ($isNew &&
(count($user->getAuthorisedCategories('com_notifly',
'core.create')) > 0))
		{
			JToolbarHelper::apply('template.apply');
			JToolbarHelper::save('template.save');
			JToolbarHelper::save2new('template.save2new');
			JToolbarHelper::cancel('template.cancel');
		}
		else
		{
			// Since it's an existing record, check the edit permission, or
fall back to edit own if the owner.
			$itemEditable = $canDo->get('core.edit') ||
($canDo->get('core.edit.own') &&
$this->item->created_by == $userId);

			// Can't save the record if it's checked out and editable
			if (!$checkedOut && $itemEditable)
			{
				JToolbarHelper::apply('template.apply');
				JToolbarHelper::save('template.save');

				// We can save this record, but check the create permission to see if
we can return to make a new one.
				// if ($canDo->get('core.create'))
				// {
				// 	JToolbarHelper::save2new('template.save2new');
				// }
			}

			// If checked out, we can still save
			// if ($canDo->get('core.create'))
			// {
			// 	JToolbarHelper::save2copy('template.save2copy');
			// }

			if (JComponentHelper::isEnabled('com_notifly') &&
$this->state->params->get('save_history', 0) &&
$itemEditable)
			{
				JToolbarHelper::versions('com_notifly.template',
$this->item->id);
			}

			JToolbarHelper::cancel('template.cancel',
'JTOOLBAR_CLOSE');
		}

		JToolbarHelper::divider();
		JToolbarHelper::help('JHELP_CONTENT_TEMPLATE_MANAGER_EDIT');
	}
}
templates/tmpl/default.php000064400000006027151156263620011667
0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_notifly
 *
 * @copyright   Copyright (C) 2005 - 2017 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html');

JHtml::_('bootstrap.tooltip');
JHtml::_('behavior.multiselect');
JHtml::_('formbehavior.chosen', 'select');

$user      = JFactory::getUser();
$userId    = $user->get('id');
?>

<form action="<?php echo
JRoute::_('index.php?option=com_notifly&view=dashboard');
?>" method="post" name="adminForm"
id="adminForm">
	<div id="cf" class="templates tx-flex">
		<?php if (!empty( $this->sidebar)) : ?>
		<div class="tx-sidebar">
			<?php echo $this->sidebar; ?>
		</div>
		<div class="tx-main">
		<?php else : ?>
		<div class="tx-main">
		<?php endif; ?>
			<div class="page-header">
			  <h1>Templates</h1>
			</div>
			<div class="page-content">
				<?php echo NotiflyHelper::showWarning(); ?>

				<?php foreach ($this->items as $key => $item) : ?>
				<div class="panel panel-default <?php echo ($item->state
? '' : 'panel-disabled'); ?>">
					<div class="panel-body">
						<div class="media">
							<div class="media-body">
								<h3 class="media-heading">
									<?php echo ucfirst($item->name); ?>
									
									<!-- 
									<div class="switch pull-right">
						                <label>
							                <span class="muted"><?php echo
($item->state ? 'Active' : 'Disabled');
?></span>
							                <input
onclick="window.updateTemplateStatus(this);"
data-id="<?php echo $item->id; ?>"
class="toggleIntegration" name="jform[state]"
type="checkbox" <?php echo ($item->state ?
'checked' : ''); ?> />
							                <span class="lever"></span>
						                </label>
						             </div>
						            -->
								</h3>
								<p class="well"><?php echo $item->message;
?></p>
								<p><strong>Template ID:</strong> <span
class="muted"><?php echo $item->id;
?></span></p>
								<p><strong>Template Name:</strong> <span
class="muted"><?php echo $item->alias;
?></span></p>
								<p><strong>Source:</strong> <span
class="muted"><?php echo ucfirst($item->source);
?></span></p>
							</div>
							<div class="media-right tx-action-btns">
								<a
href="index.php?option=com_notifly&task=template.edit&id=<?php
echo $item->id; ?>" class="btn btn-primary
btn-block"><i class="cfi-edit"></i>
Edit</a>
								<!-- 
								<a
href="index.php?option=com_notifly&task=template.trash&id=<?php
echo $item->id; ?>" class="btn btn-danger
btn-block"><i class="cfi-trash-2"></i>
Delete</a> 
								-->
							</div>
						</div>
					</div>
				</div>
				<?php endforeach; // end foreach ?>
				
				<?php echo $this->pagination->getListFooter(); ?>
				
			</div>

			<input type="hidden" name="task"
value="" />
			<input type="hidden" name="dashboard"
value="1" />
			<input type="hidden" name="boxchecked"
value="0" />
			<?php echo JHtml::_('form.token'); ?>
		</div> <!-- container -->	
	</div>
</form>templates/tmpl/default.xml000064400000000322151156263620011670
0ustar00<?xml version="1.0" encoding="utf-8"?>
<metadata>
	<layout title="COM_NOTIFLY_ARTICLES_VIEW_DEFAULT_TITLE">
		<message>
			<![CDATA[COM_NOTIFLY_ARTICLES_VIEW_DEFAULT_DESC]]>
		</message>
	</layout>
</metadata>
templates/view.html.php000064400000011340151156263620011176
0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_notifly
 *
 * @copyright   Copyright (C) 2005 - 2017 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

/**
 * View class for a list of templates.
 *
 * @since  1.6
 */
class NotiflyViewTemplates extends JViewLegacy
{

	/**
	 * An array of items
	 *
	 * @var  array
	 */
	protected $items;

	/**
	 * The pagination object
	 *
	 * @var  JPagination
	 */
	protected $pagination;

	/**
	 * The model state
	 *
	 * @var  object
	 */
	protected $state;

	/**
	 * Form object for search filters
	 *
	 * @var  JForm
	 */
	public $filterForm;

	/**
	 * The active search filters
	 *
	 * @var  array
	 */
	public $activeFilters;

	/**
	 * The sidebar markup
	 *
	 * @var  string
	 */
	protected $sidebar;

	/**
	 * Display the view
	 *
	 * @param   string  $tpl  The name of the template file to parse;
automatically searches through the template paths.
	 *
	 * @return  mixed  A string if successful, otherwise an Error object.
	 */
	public function display($tpl = null)
	{
		NotiflyHelper::addSubmenu('templates');
		
		$this->items         = $this->get('Items');
		$this->pagination    = $this->get('Pagination');
		$this->state         = $this->get('State');
		// $this->filterForm    = $this->get('FilterForm');
		$this->activeFilters = $this->get('ActiveFilters');
		$this->vote          = JPluginHelper::isEnabled('content',
'vote');

		// Check for errors.
		if (count($errors = $this->get('Errors')))
		{
			throw new Exception(implode("\n", $errors), 500);
		}

		
		$this->addToolbar();
		$this->sidebar = JHtmlSidebar::render();


		return parent::display($tpl);
	}

	/**
	 * Add the page title and toolbar.
	 *
	 * @return  void
	 *
	 * @since   1.6
	 */
	protected function addToolbar()
	{
		$canDo = JHelperContent::getActions('com_notifly',
'templates');
		$user  = JFactory::getUser();

		// Get the toolbar object instance
		$bar = JToolbar::getInstance('toolbar');

		JToolbarHelper::title(JText::_('COM_NOTIFLY_TEMPLATES_TITLE'),
'stack templates');

		// if ($canDo->get('core.create') ||
count($user->getAuthorisedCategories('com_notifly',
'core.create')) > 0)
		// {
		// 	JToolbarHelper::addNew('template.add');
		// }

		// if ($canDo->get('core.edit') ||
$canDo->get('core.edit.own'))
		// {
		// 	JToolbarHelper::editList('template.edit');
		// }

		// if ($canDo->get('core.edit.state'))
		// {
		// 	JToolbarHelper::publish('templates.publish',
'JTOOLBAR_PUBLISH', true);
		// 	JToolbarHelper::unpublish('templates.unpublish',
'JTOOLBAR_UNPUBLISH', true);
		// 	JToolbarHelper::custom('templates.featured',
'featured.png', 'featured_f2.png',
'JFEATURE', true);
		// 	JToolbarHelper::custom('templates.unfeatured',
'unfeatured.png', 'featured_f2.png',
'JUNFEATURE', true);
		// 	JToolbarHelper::archiveList('templates.archive');
		// 	JToolbarHelper::checkin('templates.checkin');
		// }

		// Add a batch button
		// if ($user->authorise('core.create',
'com_notifly')
		// 	&& $user->authorise('core.edit',
'com_notifly')
		// 	&& $user->authorise('core.edit.state',
'com_notifly'))
		// {
		// 	$title = JText::_('JTOOLBAR_BATCH');

		// 	// Instantiate a new JLayoutFile instance and render the batch button
		// 	$layout = new JLayoutFile('joomla.toolbar.batch');

		// 	$dhtml = $layout->render(array('title' => $title));
		// 	$bar->appendButton('Custom', $dhtml, 'batch');
		// }

		// if ($this->state->get('filter.published') == -2
&& $canDo->get('core.delete'))
		// {
		// 	JToolbarHelper::deleteList('JGLOBAL_CONFIRM_DELETE',
'templates.delete', 'JTOOLBAR_EMPTY_TRASH');
		// }
		// elseif ($canDo->get('core.edit.state'))
		// {
		// 	JToolbarHelper::trash('templates.trash');
		// }

		if ($user->authorise('core.admin', 'com_notifly')
|| $user->authorise('core.options', 'com_notifly'))
		{
			JToolbarHelper::preferences('com_notifly');
		}

		$help_url  = 'https://www.themexpert.com/docs';
		JToolbarHelper::help( 'COM_NOTIFLY_HELP_SITE', false, $help_url
);

	}

	/**
	 * Returns an array of fields the table can be sorted by
	 *
	 * @return  array  Array containing the field name to sort by as the key
and display text as value
	 *
	 * @since   3.0
	 */
	protected function getSortFields()
	{
		return array(
			'a.ordering'     =>
JText::_('JGRID_HEADING_ORDERING'),
			'a.state'        => JText::_('JSTATUS'),
			'a.title'        => JText::_('JGLOBAL_TITLE'),
			'category_title' => JText::_('JCATEGORY'),
			'access_level'   =>
JText::_('JGRID_HEADING_ACCESS'),
			'a.created_by'   => JText::_('JAUTHOR'),
			'language'       =>
JText::_('JGRID_HEADING_LANGUAGE'),
			'a.created'      => JText::_('JDATE'),
			'a.id'           => JText::_('JGRID_HEADING_ID'),
			'a.featured'     => JText::_('JFEATURED')
		);
	}
}
capabilities/tmpl/default.php000064400000003363151156267220012322
0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_privacy
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

/** @var PrivacyViewCapabilities $this */

?>
<?php if (!empty($this->sidebar)) : ?>
	<div id="j-sidebar-container" class="span2">
		<?php echo $this->sidebar; ?>
	</div>
	<div id="j-main-container" class="span10">
<?php else : ?>
	<div id="j-main-container">
<?php endif; ?>
	<div class="alert alert-info">
		<h4 class="alert-heading"><?php echo
JText::_('COM_PRIVACY_MSG_CAPABILITIES_ABOUT_THIS_INFORMATION');
?></h4>
		<?php echo
JText::_('COM_PRIVACY_MSG_CAPABILITIES_INTRODUCTION'); ?>
	</div>
	<?php if (empty($this->capabilities)) : ?>
		<div class="alert alert-no-items">
			<?php echo
JText::_('COM_PRIVACY_MSG_CAPABILITIES_NO_CAPABILITIES'); ?>
		</div>
	<?php else : ?>
		<?php $i = 0; ?>
		<?php echo JHtml::_('bootstrap.startAccordion',
'slide-capabilities', array('active' =>
'slide-0')); ?>

		<?php foreach ($this->capabilities as $extension =>
$capabilities) : ?>
			<?php echo JHtml::_('bootstrap.addSlide',
'slide-capabilities', $extension, 'slide-' . $i); ?>
				<?php if (empty($capabilities)) : ?>
					<div class="alert alert-no-items">
						<?php echo
JText::_('COM_PRIVACY_MSG_EXTENSION_NO_CAPABILITIES'); ?>
					</div>
				<?php else : ?>
					<ul>
						<?php foreach ($capabilities as $capability) : ?>
							<li><?php echo $capability; ?></li>
						<?php endforeach; ?>
					</ul>
				<?php endif; ?>
			<?php echo JHtml::_('bootstrap.endSlide'); ?>
			<?php $i++; ?>
		<?php endforeach; ?>

		<?php echo JHtml::_('bootstrap.endAccordion'); ?>
	<?php endif; ?>
</div>
capabilities/view.html.php000064400000003346151156267220011640
0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_privacy
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

/**
 * Capabilities view class
 *
 * @since  3.9.0
 */
class PrivacyViewCapabilities extends JViewLegacy
{
	/**
	 * The reported extension capabilities
	 *
	 * @var    array
	 * @since  3.9.0
	 */
	protected $capabilities;

	/**
	 * The HTML markup for the sidebar
	 *
	 * @var    string
	 * @since  3.9.0
	 */
	protected $sidebar;

	/**
	 * The state information
	 *
	 * @var    JObject
	 * @since  3.9.0
	 */
	protected $state;

	/**
	 * Execute and display a template script.
	 *
	 * @param   string  $tpl  The name of the template file to parse;
automatically searches through the template paths.
	 *
	 * @return  mixed  A string if successful, otherwise an Error object.
	 *
	 * @see     JViewLegacy::loadTemplate()
	 * @since   3.9.0
	 * @throws  Exception
	 */
	public function display($tpl = null)
	{
		// Initialise variables
		$this->capabilities = $this->get('Capabilities');
		$this->state        = $this->get('State');

		// Check for errors.
		if (count($errors = $this->get('Errors')))
		{
			throw new Exception(implode("\n", $errors), 500);
		}

		$this->addToolbar();

		$this->sidebar = JHtmlSidebar::render();

		return parent::display($tpl);
	}

	/**
	 * Add the page title and toolbar.
	 *
	 * @return  void
	 *
	 * @since   3.9.0
	 */
	protected function addToolbar()
	{
		JToolbarHelper::title(JText::_('COM_PRIVACY_VIEW_CAPABILITIES'),
'lock');

		JToolbarHelper::preferences('com_privacy');

		JToolbarHelper::help('JHELP_COMPONENTS_PRIVACY_CAPABILITIES');
	}
}
consents/tmpl/default.php000064400000010207151156267230011521
0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_privacy
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

/** @var PrivacyViewConsent $this */

// Load the tooltip behavior.
JHtml::_('bootstrap.tooltip');
JHtml::_('behavior.multiselect');
JHtml::_('formbehavior.chosen', 'select');

$user       = JFactory::getUser();
$listOrder  =
$this->escape($this->state->get('list.ordering'));
$listDirn   =
$this->escape($this->state->get('list.direction'));
$now        = JFactory::getDate();
$stateIcons = array(-1 => 'trash', 0 =>
'archive', 1 => 'publish');
$stateMsgs  = array(-1 =>
JText::_('COM_PRIVACY_CONSENTS_STATE_INVALIDATED'), 0 =>
JText::_('COM_PRIVACY_CONSENTS_STATE_OBSOLETE'), 1 =>
JText::_('COM_PRIVACY_CONSENTS_STATE_VALID'));

?>
<form action="<?php echo
JRoute::_('index.php?option=com_privacy&view=consents');
?>" method="post" name="adminForm"
id="adminForm">
	<?php if (!empty($this->sidebar)) : ?>
		<div id="j-sidebar-container" class="span2">
			<?php echo $this->sidebar; ?>
		</div>
		<div id="j-main-container" class="span10">
	<?php else : ?>
		<div id="j-main-container">
	<?php endif; ?>
		<?php echo
JLayoutHelper::render('joomla.searchtools.default',
array('view' => $this)); ?>
		<div class="clearfix"> </div>
		<?php if (empty($this->items)) : ?>
			<div class="alert alert-no-items">
				<?php echo
JText::_('COM_PRIVACY_MSG_CONSENTS_NO_CONSENTS'); ?>
			</div>
		<?php else : ?>
			<table class="table table-striped"
id="consentList">
				<thead>
					<tr>
						<th width="1%" class="center">
							<?php echo JHtml::_('grid.checkall'); ?>
						</th>
						<th width="1%" class="nowrap center">
							<?php echo JHtml::_('searchtools.sort',
'JSTATUS', 'a.state', $listDirn, $listOrder); ?>
						</th>
						<th width="10%" class="nowrap">
							<?php echo JHtml::_('searchtools.sort',
'JGLOBAL_USERNAME', 'u.username', $listDirn,
$listOrder); ?>
						</th>
						<th width="1%" class="nowrap">
							<?php echo JHtml::_('searchtools.sort',
'COM_PRIVACY_HEADING_USERID', 'a.user_id', $listDirn,
$listOrder); ?>
						</th>
						<th width="10%" class="nowrap">
							<?php echo JHtml::_('searchtools.sort',
'COM_PRIVACY_HEADING_CONSENTS_SUBJECT', 'a.subject',
$listDirn, $listOrder); ?>
						</th>
						<th class="nowrap">
							<?php echo
JText::_('COM_PRIVACY_HEADING_CONSENTS_BODY'); ?>
						</th>
						<th width="15%" class="nowrap">
							<?php echo JHtml::_('searchtools.sort',
'COM_PRIVACY_HEADING_CONSENTS_CREATED', 'a.created',
$listDirn, $listOrder); ?>
						</th>
						<th width="1%" class="nowrap hidden-phone">
							<?php echo JHtml::_('searchtools.sort',
'JGRID_HEADING_ID', 'a.id', $listDirn, $listOrder);
?>
						</th>
					</tr>
				</thead>
				<tfoot>
					<tr>
						<td colspan="9">
							<?php echo $this->pagination->getListFooter(); ?>
						</td>
					</tr>
				</tfoot>
				<tbody>
					<?php foreach ($this->items as $i => $item) : ?>
						<tr class="row<?php echo $i % 2; ?>">
							<td class="center">
								<?php echo JHtml::_('grid.id', $i, $item->id);
?>
							</td>
							<td>
								<span class="icon icon-<?php echo
$stateIcons[$item->state]; ?>" title="<?php echo
$stateMsgs[$item->state]; ?>"></span>
							</td>
							<td>
								<?php echo $item->username; ?>
							</td>
							<td>
								<?php echo $item->user_id; ?>
							</td>
							<td>
								<?php echo JText::_($item->subject); ?>
							</td>
							<td>
								<?php echo $item->body; ?>
							</td>
							<td class="break-word">
								<span class="hasTooltip" title="<?php echo
JHtml::_('date', $item->created,
JText::_('DATE_FORMAT_LC6')); ?>">
									<?php echo JHtml::_('date.relative', new
JDate($item->created), null, $now); ?>
								</span>
							</td>
							<td class="hidden-phone">
								<?php echo (int) $item->id; ?>
							</td>
						</tr>
					<?php endforeach; ?>
				</tbody>
			</table>
		<?php endif; ?>

		<input type="hidden" name="task"
value="" />
		<input type="hidden" name="boxchecked"
value="0" />
		<?php echo JHtml::_('form.token'); ?>
	</div>
</form>
consents/tmpl/default.xml000064400000000322151156267230011527
0ustar00<?xml version="1.0" encoding="utf-8"?>
<metadata>
	<layout title="COM_PRIVACY_CONSENTS_VIEW_DEFAULT_TITLE">
		<message>
			<![CDATA[COM_PRIVACY_CONSENTS_VIEW_DEFAULT_DESC]]>
		</message>
	</layout>
</metadata>
consents/view.html.php000064400000005676151156267230011054 0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_privacy
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

/**
 * Consents view class
 *
 * @since  3.9.0
 */
class PrivacyViewConsents extends JViewLegacy
{
	/**
	 * The active search tools filters
	 *
	 * @var    array
	 * @since  3.9.0
	 * @note   Must be public to be accessed from the search tools layout
	 */
	public $activeFilters;

	/**
	 * Form instance containing the search tools filter form
	 *
	 * @var    JForm
	 * @since  3.9.0
	 * @note   Must be public to be accessed from the search tools layout
	 */
	public $filterForm;

	/**
	 * The items to display
	 *
	 * @var    array
	 * @since  3.9.0
	 */
	protected $items;

	/**
	 * The pagination object
	 *
	 * @var    JPagination
	 * @since  3.9.0
	 */
	protected $pagination;

	/**
	 * The HTML markup for the sidebar
	 *
	 * @var    string
	 * @since  3.9.0
	 */
	protected $sidebar;

	/**
	 * The state information
	 *
	 * @var    JObject
	 * @since  3.9.0
	 */
	protected $state;

	/**
	 * Execute and display a template script.
	 *
	 * @param   string  $tpl  The name of the template file to parse;
automatically searches through the template paths.
	 *
	 * @return  mixed  A string if successful, otherwise an Error object.
	 *
	 * @see     JViewLegacy::loadTemplate()
	 * @since   3.9.0
	 * @throws  Exception
	 */
	public function display($tpl = null)
	{
		// Initialise variables
		$this->items         = $this->get('Items');
		$this->pagination    = $this->get('Pagination');
		$this->state         = $this->get('State');
		$this->filterForm    = $this->get('FilterForm');
		$this->activeFilters = $this->get('ActiveFilters');

		// Check for errors.
		if (count($errors = $this->get('Errors')))
		{
			throw new Exception(implode("\n", $errors), 500);
		}

		$this->addToolbar();

		$this->sidebar = JHtmlSidebar::render();

		return parent::display($tpl);
	}

	/**
	 * Add the page title and toolbar.
	 *
	 * @return  void
	 *
	 * @since   3.9.0
	 */
	protected function addToolbar()
	{
		JToolbarHelper::title(JText::_('COM_PRIVACY_VIEW_CONSENTS'),
'lock');

		$bar = JToolbar::getInstance('toolbar');

		// Add a button to invalidate a consent
		$bar->appendButton(
			'Confirm',
			'COM_PRIVACY_CONSENTS_TOOLBAR_INVALIDATE_CONFIRM_MSG',
			'trash',
			'COM_PRIVACY_CONSENTS_TOOLBAR_INVALIDATE',
			'consents.invalidate',
			true
		);

		// If the filter is restricted to a specific subject, show the
"Invalidate all" button
		if ($this->state->get('filter.subject') != '')
		{
			$bar->appendButton(
				'Confirm',
				'COM_PRIVACY_CONSENTS_TOOLBAR_INVALIDATE_ALL_CONFIRM_MSG',
				'cancel',
				'COM_PRIVACY_CONSENTS_TOOLBAR_INVALIDATE_ALL',
				'consents.invalidateAll',
				false
			);
		}

		JToolbarHelper::preferences('com_privacy');

		JToolbarHelper::help('JHELP_COMPONENTS_PRIVACY_CONSENTS');
	}
}
export/view.xml.php000064400000002655151156267230010367 0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_privacy
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

JLoader::register('PrivacyHelper', JPATH_ADMINISTRATOR .
'/components/com_privacy/helpers/privacy.php');

/**
 * Export view class
 *
 * @since  3.9.0
 *
 * @property-read   \Joomla\CMS\Document\XmlDocument  $document
 */
class PrivacyViewExport extends JViewLegacy
{
	/**
	 * Execute and display a template script.
	 *
	 * @param   string  $tpl  The name of the template file to parse;
automatically searches through the template paths.
	 *
	 * @return  mixed  A string if successful, otherwise an Error object.
	 *
	 * @see     JViewLegacy::loadTemplate()
	 * @since   3.9.0
	 * @throws  Exception
	 */
	public function display($tpl = null)
	{
		/** @var PrivacyModelExport $model */
		$model = $this->getModel();

		$exportData = $model->collectDataForExportRequest();

		// Check for errors.
		if (count($errors = $this->get('Errors')))
		{
			throw new Exception(implode("\n", $errors), 500);
		}

		$requestId = $model->getState($model->getName() .
'.request_id');

		// This document should always be downloaded
		$this->document->setDownload(true);
		$this->document->setName('export-request-' . $requestId);

		echo PrivacyHelper::renderDataAsXml($exportData);
	}
}
request/tmpl/default.php000064400000005571151156267230011365
0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_privacy
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

/** @var PrivacyViewRequest $this */

// Include the component HTML helpers.
JHtml::addIncludePath(JPATH_ADMINISTRATOR .
'/components/com_privacy/helpers/html');

JHtml::_('behavior.formvalidator');
JHtml::_('behavior.keepalive');

$js = <<< JS
Joomla.submitbutton = function(task) {
	if (task === 'request.cancel' ||
document.formvalidator.isValid(document.getElementById('item-form')))
{
		Joomla.submitform(task, document.getElementById('item-form'));
	}
};
JS;

JFactory::getDocument()->addScriptDeclaration($js);
?>

<form action="<?php echo
JRoute::_('index.php?option=com_privacy&view=request&id='
. (int) $this->item->id); ?>" method="post"
name="adminForm" id="item-form"
class="form-validate">
	<div class="row-fluid">
		<div class="span4">
			<h3><?php echo
JText::_('COM_PRIVACY_HEADING_REQUEST_INFORMATION');
?></h3>
			<dl class="dl-horizontal">
				<dt><?php echo JText::_('JGLOBAL_EMAIL');
?>:</dt>
				<dd><?php echo $this->item->email; ?></dd>

				<dt><?php echo JText::_('JSTATUS');
?>:</dt>
				<dd><?php echo
JHtml::_('PrivacyHtml.helper.statusLabel',
$this->item->status); ?></dd>

				<dt><?php echo
JText::_('COM_PRIVACY_FIELD_REQUEST_TYPE_LABEL');
?>:</dt>
				<dd><?php echo
JText::_('COM_PRIVACY_HEADING_REQUEST_TYPE_TYPE_' .
$this->item->request_type); ?></dd>

				<dt><?php echo
JText::_('COM_PRIVACY_FIELD_REQUESTED_AT_LABEL');
?>:</dt>
				<dd><?php echo JHtml::_('date',
$this->item->requested_at, JText::_('DATE_FORMAT_LC6'));
?></dd>
			</dl>
		</div>
		<div class="span8">
			<h3><?php echo
JText::_('COM_PRIVACY_HEADING_ACTION_LOG'); ?></h3>
			<?php if (empty($this->actionlogs)) : ?>
				<div class="alert alert-no-items">
					<?php echo JText::_('JGLOBAL_NO_MATCHING_RESULTS'); ?>
				</div>
			<?php else : ?>
				<table class="table table-striped table-hover">
					<thead>
						<th>
							<?php echo JText::_('COM_ACTIONLOGS_ACTION'); ?>
						</th>
						<th>
							<?php echo JText::_('COM_ACTIONLOGS_DATE'); ?>
						</th>
						<th>
							<?php echo JText::_('COM_ACTIONLOGS_NAME'); ?>
						</th>
					</thead>
					<tbody>
						<?php foreach ($this->actionlogs as $i => $item) : ?>
							<tr class="row<?php echo $i % 2; ?>">
								<td>
									<?php echo ActionlogsHelper::getHumanReadableLogMessage($item);
?>
								</td>
								<td>
									<?php echo JHtml::_('date', $item->log_date,
JText::_('DATE_FORMAT_LC6')); ?>
								</td>
								<td>
									<?php echo $item->name; ?>
								</td>
							</tr>
						<?php endforeach; ?>
					</tbody>
				</table>
			<?php endif;?>
		</div>
	</div>

	<input type="hidden" name="task" value=""
/>
	<?php echo JHtml::_('form.token'); ?>
</form>
request/tmpl/edit.php000064400000002466151156267230010666 0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_privacy
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

/** @var PrivacyViewRequest $this */

JHtml::_('behavior.formvalidator');
JHtml::_('behavior.keepalive');
JHtml::_('formbehavior.chosen', 'select');

$js = <<< JS
Joomla.submitbutton = function(task) {
	if (task === 'request.cancel' ||
document.formvalidator.isValid(document.getElementById('item-form')))
{
		Joomla.submitform(task, document.getElementById('item-form'));
	}
};
JS;

JFactory::getDocument()->addScriptDeclaration($js);
?>

<form action="<?php echo
JRoute::_('index.php?option=com_privacy&view=request&layout=edit&id='
. (int) $this->item->id); ?>" method="post"
name="adminForm" id="item-form"
class="form-validate">
	<div class="form-horizontal">
		<div class="row-fluid">
			<div class="span9">
				<fieldset class="adminform">
					<?php echo $this->form->renderField('email'); ?>
					<?php echo $this->form->renderField('status');
?>
					<?php echo
$this->form->renderField('request_type'); ?>
				</fieldset>
			</div>
		</div>

		<input type="hidden" name="task"
value="" />
		<?php echo JHtml::_('form.token'); ?>
	</div>
</form>
request/view.html.php000064400000010445151156267230010676 0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_privacy
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

/**
 * Request view class
 *
 * @since  3.9.0
 */
class PrivacyViewRequest extends JViewLegacy
{
	/**
	 * The action logs for the item
	 *
	 * @var    array
	 * @since  3.9.0
	 */
	protected $actionlogs;

	/**
	 * The form object
	 *
	 * @var    JForm
	 * @since  3.9.0
	 */
	protected $form;

	/**
	 * The item record
	 *
	 * @var    JObject
	 * @since  3.9.0
	 */
	protected $item;

	/**
	 * The state information
	 *
	 * @var    JObject
	 * @since  3.9.0
	 */
	protected $state;

	/**
	 * Execute and display a template script.
	 *
	 * @param   string  $tpl  The name of the template file to parse;
automatically searches through the template paths.
	 *
	 * @return  mixed  A string if successful, otherwise an Error object.
	 *
	 * @see     JViewLegacy::loadTemplate()
	 * @since   3.9.0
	 * @throws  Exception
	 */
	public function display($tpl = null)
	{
		// Initialise variables.
		$this->item  = $this->get('Item');
		$this->state = $this->get('State');

		// Variables only required for the default layout
		if ($this->getLayout() === 'default')
		{
			/** @var ActionlogsModelActionlogs $logsModel */
			$logsModel = $this->getModel('actionlogs');

			$this->actionlogs =
$logsModel->getLogsForItem('com_privacy.request',
$this->item->id);

			// Load the com_actionlogs language strings for use in the layout
			$lang = JFactory::getLanguage();
			$lang->load('com_actionlogs', JPATH_ADMINISTRATOR, null,
false, true)
				|| $lang->load('com_actionlogs', JPATH_ADMINISTRATOR .
'/components/com_actionlogs', null, false, true);
		}

		// Variables only required for the edit layout
		if ($this->getLayout() === 'edit')
		{
			$this->form = $this->get('Form');
		}

		// Check for errors.
		if (count($errors = $this->get('Errors')))
		{
			throw new Exception(implode("\n", $errors), 500);
		}

		$this->addToolbar();

		return parent::display($tpl);
	}

	/**
	 * Add the page title and toolbar.
	 *
	 * @return  void
	 *
	 * @since   3.9.0
	 */
	protected function addToolbar()
	{
		JFactory::getApplication('administrator')->set('hidemainmenu',
true);

		// Set the title and toolbar based on the layout
		if ($this->getLayout() === 'edit')
		{
			JToolbarHelper::title(JText::_('COM_PRIVACY_VIEW_REQUEST_ADD_REQUEST'),
'lock');

			JToolbarHelper::apply('request.save');
			JToolbarHelper::cancel('request.cancel');
			JToolbarHelper::help('JHELP_COMPONENTS_PRIVACY_REQUEST_EDIT');
		}
		else
		{
			JToolbarHelper::title(JText::_('COM_PRIVACY_VIEW_REQUEST_SHOW_REQUEST'),
'lock');

			$bar = JToolbar::getInstance('toolbar');

			// Add transition and action buttons based on item status
			switch ($this->item->status)
			{
				case '0':
					$bar->appendButton('Standard', 'cancel-circle',
'COM_PRIVACY_TOOLBAR_INVALIDATE', 'request.invalidate',
false);

					break;

				case '1':
					$return = '&return=' .
base64_encode('index.php?option=com_privacy&view=request&id='
. (int) $this->item->id);

					$bar->appendButton('Standard', 'apply',
'COM_PRIVACY_TOOLBAR_COMPLETE', 'request.complete',
false);
					$bar->appendButton('Standard', 'cancel-circle',
'COM_PRIVACY_TOOLBAR_INVALIDATE', 'request.invalidate',
false);

					if ($this->item->request_type === 'export')
					{
						JToolbarHelper::link(
							JRoute::_('index.php?option=com_privacy&task=request.export&format=xml&id='
. (int) $this->item->id . $return),
							'COM_PRIVACY_ACTION_EXPORT_DATA',
							'download'
						);

						if (JFactory::getConfig()->get('mailonline', 1))
						{
							JToolbarHelper::link(
								JRoute::_('index.php?option=com_privacy&task=request.emailexport&id='
. (int) $this->item->id . $return),
								'COM_PRIVACY_ACTION_EMAIL_EXPORT_DATA',
								'mail'
							);
						}
					}

					if ($this->item->request_type === 'remove')
					{
						$bar->appendButton('Standard', 'delete',
'COM_PRIVACY_ACTION_DELETE_DATA', 'request.remove',
false);
					}

					break;

				// Item is in a "locked" state and cannot transition
				default:
					break;
			}

			JToolbarHelper::cancel('request.cancel',
'JTOOLBAR_CLOSE');
			JToolbarHelper::help('JHELP_COMPONENTS_PRIVACY_REQUEST');
		}
	}
}
requests/tmpl/default.php000064400000013366151156267230011551
0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_privacy
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

/** @var PrivacyViewRequests $this */

// Include the component HTML helpers.
JHtml::addIncludePath(JPATH_ADMINISTRATOR .
'/components/com_privacy/helpers/html');

// Load the tooltip behavior.
JHtml::_('bootstrap.tooltip');
JHtml::_('behavior.multiselect');
JHtml::_('formbehavior.chosen', 'select');

$user      = JFactory::getUser();
$listOrder =
$this->escape($this->state->get('list.ordering'));
$listDirn  =
$this->escape($this->state->get('list.direction'));
$now       = JFactory::getDate();

$urgentRequestDate= clone $now;
$urgentRequestDate->sub(new DateInterval('P' .
$this->urgentRequestAge . 'D'));
?>
<form action="<?php echo
JRoute::_('index.php?option=com_privacy&view=requests');
?>" method="post" name="adminForm"
id="adminForm">
	<?php if (!empty($this->sidebar)) : ?>
		<div id="j-sidebar-container" class="span2">
			<?php echo $this->sidebar; ?>
		</div>
		<div id="j-main-container" class="span10">
	<?php else : ?>
		<div id="j-main-container">
	<?php endif; ?>
		<?php echo
JLayoutHelper::render('joomla.searchtools.default',
array('view' => $this)); ?>
		<div class="clearfix"> </div>
		<?php if (empty($this->items)) : ?>
			<div class="alert alert-no-items">
				<?php echo
JText::_('COM_PRIVACY_MSG_REQUESTS_NO_REQUESTS'); ?>
			</div>
		<?php else : ?>
			<table class="table table-striped"
id="requestList">
				<thead>
					<tr>
						<th width="5%" class="nowrap center">
							<?php echo JText::_('COM_PRIVACY_HEADING_ACTIONS');
?>
						</th>
						<th width="5%" class="nowrap center">
							<?php echo JText::_('JSTATUS'); ?>
						</th>
						<th class="nowrap">
							<?php echo JHtml::_('searchtools.sort',
'JGLOBAL_EMAIL', 'a.email', $listDirn, $listOrder);
?>
						</th>
						<th width="10%" class="nowrap">
							<?php echo JHtml::_('searchtools.sort',
'COM_PRIVACY_HEADING_REQUEST_TYPE', 'a.request_type',
$listDirn, $listOrder); ?>
						</th>
						<th width="20%" class="nowrap">
							<?php echo JHtml::_('searchtools.sort',
'COM_PRIVACY_HEADING_REQUESTED_AT', 'a.requested_at',
$listDirn, $listOrder); ?>
						</th>
						<th width="1%" class="nowrap hidden-phone">
							<?php echo JHtml::_('searchtools.sort',
'JGRID_HEADING_ID', 'a.id', $listDirn, $listOrder);
?>
						</th>
					</tr>
				</thead>
				<tfoot>
					<tr>
						<td colspan="7">
							<?php echo $this->pagination->getListFooter(); ?>
						</td>
					</tr>
				</tfoot>
				<tbody>
					<?php foreach ($this->items as $i => $item) : ?>
						<?php
						$itemRequestedAt = new JDate($item->requested_at);
						?>
						<tr class="row<?php echo $i % 2; ?>">
							<td class="center">
								<div class="btn-group">
									<?php if ($item->status == 1 &&
$item->request_type === 'export') : ?>
										<a class="btn btn-micro hasTooltip"
href="<?php echo
JRoute::_('index.php?option=com_privacy&task=request.export&format=xml&id='
. (int) $item->id); ?>" title="<?php echo
JText::_('COM_PRIVACY_ACTION_EXPORT_DATA');
?>"><span class="icon-download"
aria-hidden="true"></span><span
class="element-invisible"><?php echo
JText::_('COM_PRIVACY_ACTION_EXPORT_DATA');
?></span></a>
										<?php if ($this->sendMailEnabled) : ?>
											<a class="btn btn-micro hasTooltip"
href="<?php echo
JRoute::_('index.php?option=com_privacy&task=request.emailexport&id='
. (int) $item->id . '&' .
JFactory::getSession()->getFormToken() . '=1'); ?>"
title="<?php echo
JText::_('COM_PRIVACY_ACTION_EMAIL_EXPORT_DATA');
?>"><span class="icon-mail"
aria-hidden="true"></span><span
class="element-invisible"><?php echo
JText::_('COM_PRIVACY_ACTION_EMAIL_EXPORT_DATA');
?></span></a>
										<?php endif; ?>
									<?php endif; ?>
									<?php if ($item->status == 1 &&
$item->request_type === 'remove') : ?>
										<a class="btn btn-micro hasTooltip"
href="<?php echo
JRoute::_('index.php?option=com_privacy&task=request.remove&id='
. (int) $item->id . '&' .
JFactory::getSession()->getFormToken() . '=1'); ?>"
title="<?php echo
JText::_('COM_PRIVACY_ACTION_DELETE_DATA');
?>"><span class="icon-delete"
aria-hidden="true"></span><span
class="element-invisible"><?php echo
JText::_('COM_PRIVACY_ACTION_DELETE_DATA');
?></span></a>
									<?php endif; ?>
								</div>
							</td>
							<td class="center">
								<?php echo JHtml::_('PrivacyHtml.helper.statusLabel',
$item->status); ?>
							</td>
							<td>
								<?php if ($item->status == 1 && $urgentRequestDate
>= $itemRequestedAt) : ?>
									<span class="pull-right label
label-important"><?php echo
JText::_('COM_PRIVACY_BADGE_URGENT_REQUEST'); ?></span>
								<?php endif; ?>
								<a class="hasTooltip" href="<?php echo
JRoute::_('index.php?option=com_privacy&view=request&id='
. (int) $item->id); ?>" title="<?php echo
JText::_('COM_PRIVACY_ACTION_VIEW'); ?>">
									<?php echo
JStringPunycode::emailToUTF8($this->escape($item->email)); ?>
								</a>
							</td>
							<td class="break-word">
								<?php echo
JText::_('COM_PRIVACY_HEADING_REQUEST_TYPE_TYPE_' .
$item->request_type); ?>
							</td>
							<td class="break-word">
								<span class="hasTooltip" title="<?php echo
JHtml::_('date', $item->requested_at,
JText::_('DATE_FORMAT_LC6')); ?>">
									<?php echo JHtml::_('date.relative',
$itemRequestedAt, null, $now); ?>
								</span>
							</td>
							<td class="hidden-phone">
								<?php echo (int) $item->id; ?>
							</td>
						</tr>
					<?php endforeach; ?>
				</tbody>
			</table>
		<?php endif; ?>

		<input type="hidden" name="task"
value="" />
		<input type="hidden" name="boxchecked"
value="0" />
		<?php echo JHtml::_('form.token'); ?>
	</div>
</form>
requests/tmpl/default.xml000064400000000322151156267230011546
0ustar00<?xml version="1.0" encoding="utf-8"?>
<metadata>
	<layout title="COM_PRIVACY_REQUESTS_VIEW_DEFAULT_TITLE">
		<message>
			<![CDATA[COM_PRIVACY_REQUESTS_VIEW_DEFAULT_DESC]]>
		</message>
	</layout>
</metadata>
requests/view.html.php000064400000005634151156267230011065 0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_privacy
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

/**
 * Requests view class
 *
 * @since  3.9.0
 */
class PrivacyViewRequests extends JViewLegacy
{
	/**
	 * The active search tools filters
	 *
	 * @var    array
	 * @since  3.9.0
	 * @note   Must be public to be accessed from the search tools layout
	 */
	public $activeFilters;

	/**
	 * Form instance containing the search tools filter form
	 *
	 * @var    JForm
	 * @since  3.9.0
	 * @note   Must be public to be accessed from the search tools layout
	 */
	public $filterForm;

	/**
	 * The items to display
	 *
	 * @var    array
	 * @since  3.9.0
	 */
	protected $items;

	/**
	 * The pagination object
	 *
	 * @var    JPagination
	 * @since  3.9.0
	 */
	protected $pagination;

	/**
	 * Flag indicating the site supports sending email
	 *
	 * @var    boolean
	 * @since  3.9.0
	 */
	protected $sendMailEnabled;

	/**
	 * The HTML markup for the sidebar
	 *
	 * @var    string
	 * @since  3.9.0
	 */
	protected $sidebar;

	/**
	 * The state information
	 *
	 * @var    JObject
	 * @since  3.9.0
	 */
	protected $state;

	/**
	 * The age of urgent requests
	 *
	 * @var    integer
	 * @since  3.9.0
	 */
	protected $urgentRequestAge;

	/**
	 * Execute and display a template script.
	 *
	 * @param   string  $tpl  The name of the template file to parse;
automatically searches through the template paths.
	 *
	 * @return  mixed  A string if successful, otherwise an Error object.
	 *
	 * @see     JViewLegacy::loadTemplate()
	 * @since   3.9.0
	 * @throws  Exception
	 */
	public function display($tpl = null)
	{
		// Initialise variables
		$this->items            = $this->get('Items');
		$this->pagination       = $this->get('Pagination');
		$this->state            = $this->get('State');
		$this->filterForm       = $this->get('FilterForm');
		$this->activeFilters    = $this->get('ActiveFilters');
		$this->urgentRequestAge = (int)
JComponentHelper::getParams('com_privacy')->get('notify',
14);
		$this->sendMailEnabled  = (bool)
JFactory::getConfig()->get('mailonline', 1);

		// Check for errors.
		if (count($errors = $this->get('Errors')))
		{
			throw new Exception(implode("\n", $errors), 500);
		}

		$this->addToolbar();

		$this->sidebar = JHtmlSidebar::render();

		return parent::display($tpl);
	}

	/**
	 * Add the page title and toolbar.
	 *
	 * @return  void
	 *
	 * @since   3.9.0
	 */
	protected function addToolbar()
	{
		JToolbarHelper::title(JText::_('COM_PRIVACY_VIEW_REQUESTS'),
'lock');

		// Requests can only be created if mail sending is enabled
		if (JFactory::getConfig()->get('mailonline', 1))
		{
			JToolbarHelper::addNew('request.add');
		}

		JToolbarHelper::preferences('com_privacy');
		JToolbarHelper::help('JHELP_COMPONENTS_PRIVACY_REQUESTS');

	}
}
item/tmpl/edit.php000064400000017737151156304170010136 0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_menus
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

// Include the component HTML helpers.
JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html');

JHtml::_('behavior.core');
JHtml::_('behavior.tabstate');
JHtml::_('behavior.formvalidator');
JHtml::_('formbehavior.chosen',
'#jform_request_filter_tag', null,
array('placeholder_text_multiple' =>
JText::_('JGLOBAL_TYPE_OR_SELECT_SOME_TAGS')));
JHtml::_('formbehavior.chosen', 'select');
JHtml::_('behavior.keepalive');

JText::script('ERROR');
JText::script('JGLOBAL_VALIDATION_FORM_FAILED');

$assoc = JLanguageAssociations::isEnabled();

// Ajax for parent items
$script = "
jQuery(document).ready(function ($){
	$('#jform_menutype').change(function(){
		var menutype = $(this).val();
		$.ajax({
			url:
'index.php?option=com_menus&task=item.getParentItem&menutype='
+ menutype,
			dataType: 'json'
		}).done(function(data) {
			$('#jform_parent_id option').each(function() {
				if ($(this).val() != '1') {
					$(this).remove();
				}
			});

			$.each(data, function (i, val) {
				var option = $('<option>');
				option.text(val.title).val(val.id);
				$('#jform_parent_id').append(option);
			});
			$('#jform_parent_id').trigger('liszt:updated');
		});
	});

	// Menu type Login Form specific
	$('#item-form').on('submit', function() {
		if ($('#jform_params_login_redirect_url') &&
$('#jform_params_logout_redirect_url')) {
			// Login
			if
($('#jform_params_login_redirect_url').closest('.control-group').css('display')
=== 'block') {
				$('#jform_params_login_redirect_menuitem_id').val('');
			}
			if
($('#jform_params_login_redirect_menuitem_name').closest('.control-group').css('display')
=== 'block') {
				$('#jform_params_login_redirect_url').val('');

			}

			// Logout
			if
($('#jform_params_logout_redirect_url').closest('.control-group').css('display')
=== 'block') {
				$('#jform_params_logout_redirect_menuitem_id').val('');
			}
			if
($('#jform_params_logout_redirect_menuitem_id').closest('.control-group').css('display')
=== 'block') {
				$('#jform_params_logout_redirect_url').val('');
			}
		}
	});
});

Joomla.submitbutton = function(task, type){
	if (task == 'item.setType' || task ==
'item.setMenuType')
	{
		if (task == 'item.setType')
		{
			jQuery('#item-form
input[name=\"jform[type]\"]').val(type);
			jQuery('#fieldtype').val('type');
		} else {
			jQuery('#item-form
input[name=\"jform[menutype]\"]').val(type);
		}
		Joomla.submitform('item.setType',
document.getElementById('item-form'));
	} else if (task == 'item.cancel' ||
document.formvalidator.isValid(document.getElementById('item-form')))
	{
		Joomla.submitform(task, document.getElementById('item-form'));

		// @deprecated 4.0  The following js is not needed since 3.7.0.
		if (task !== 'item.apply')
		{
			window.parent.jQuery('#menuEdit" . (int) $this->item->id
. "Modal').modal('hide');
		}
	}
	else
	{
		// special case for modal popups validation response
		jQuery('#item-form .modal-value.invalid').each(function(){
			var field = jQuery(this),
				idReversed =
field.attr('id').split('').reverse().join(''),
				separatorLocation = idReversed.indexOf('_'),
				nameId = '#' +
idReversed.substr(separatorLocation).split('').reverse().join('')
+ 'name';
			jQuery(nameId).addClass('invalid');
		});
	}
};
";

$input = JFactory::getApplication()->input;

// Add the script to the document head.
JFactory::getDocument()->addScriptDeclaration($script);
// In case of modal
$isModal  = $input->get('layout') == 'modal' ? true
: false;
$layout   = $isModal ? 'modal' : 'edit';
$tmpl     = $isModal || $input->get('tmpl', '',
'cmd') === 'component' ?
'&tmpl=component' : '';
$clientId = $this->state->get('item.client_id', 0);
$lang     = JFactory::getLanguage()->getTag();

// Load mod_menu.ini file when client is administrator
if ($clientId === 1)
{
	JFactory::getLanguage()->load('mod_menu',
JPATH_ADMINISTRATOR, null, false, true);
}
?>
<form action="<?php echo
JRoute::_('index.php?option=com_menus&view=item&client_id='
. $clientId . '&layout=' . $layout . $tmpl .
'&id=' . (int) $this->item->id); ?>"
method="post" name="adminForm" id="item-form"
class="form-validate">

	<?php echo JLayoutHelper::render('joomla.edit.title_alias',
$this); ?>

	<?php // Add the translation of the menu item title when client is
administrator ?>
	<?php if ($clientId === 1 && $this->item->id != 0) :
?>
		<div class="form-inline form-inline-header">
			<div class="control-group">
				<div class="control-label">
					<label><?php echo
JText::sprintf('COM_MENUS_TITLE_TRANSLATION', $lang);
?></label>
				</div>
				<div class="controls">
					<input class="input-xlarge" value="<?php echo
JText::_($this->item->title); ?>"
readonly="readonly" type="text">
				</div>
			</div>
		</div>
	<?php endif; ?>

	<div class="form-horizontal">
		<?php echo JHtml::_('bootstrap.startTabSet',
'myTab', array('active' => 'details'));
?>

		<?php echo JHtml::_('bootstrap.addTab', 'myTab',
'details', JText::_('COM_MENUS_ITEM_DETAILS')); ?>
		<div class="row-fluid">
			<div class="span9">
				<?php
				echo $this->form->renderField('type');

				if ($this->item->type == 'alias')
				{
					echo $this->form->renderField('aliasoptions',
'params');
				}

				if ($this->item->type == 'separator')
				{
					echo $this->form->renderField('text_separator',
'params');
				}

				echo $this->form->renderFieldset('request');

				if ($this->item->type == 'url')
				{
					$this->form->setFieldAttribute('link',
'readonly', 'false');
					$this->form->setFieldAttribute('link',
'required', 'true');
				}

				echo $this->form->renderField('link');

				if ($this->item->type == 'alias')
				{
					echo $this->form->renderField('alias_redirect',
'params');
				}

				echo $this->form->renderField('browserNav');
				echo $this->form->renderField('template_style_id');

				if (!$isModal && $this->item->type ==
'container')
				{
					echo $this->loadTemplate('container');
				}
				?>
			</div>
			<div class="span3">
				<?php
				// Set main fields.
				$this->fields = array(
					'id',
					'client_id',
					'menutype',
					'parent_id',
					'menuordering',
					'published',
					'home',
					'access',
					'language',
					'note',
				);

				if ($this->item->type != 'component')
				{
					$this->fields = array_diff($this->fields,
array('home'));
				}

				echo JLayoutHelper::render('joomla.edit.global', $this);
?>
			</div>
		</div>
		<?php echo JHtml::_('bootstrap.endTab'); ?>

		<?php
		$this->fieldsets = array();
		$this->ignore_fieldsets = array('aliasoptions',
'request', 'item_associations');
		echo JLayoutHelper::render('joomla.edit.params', $this);
		?>

		<?php if (!$isModal && $assoc &&
$this->state->get('item.client_id') != 1) : ?>
			<?php if ($this->item->type !== 'alias' &&
$this->item->type !== 'url'
				&& $this->item->type !== 'separator' &&
$this->item->type !== 'heading') : ?>
				<?php echo JHtml::_('bootstrap.addTab', 'myTab',
'associations',
JText::_('JGLOBAL_FIELDSET_ASSOCIATIONS')); ?>
				<?php echo $this->loadTemplate('associations'); ?>
				<?php echo JHtml::_('bootstrap.endTab'); ?>
			<?php endif; ?>
		<?php elseif ($isModal && $assoc &&
$this->state->get('item.client_id') != 1) : ?>
			<div class="hidden"><?php echo
$this->loadTemplate('associations'); ?></div>
		<?php endif; ?>

		<?php if (!empty($this->modules)) : ?>
			<?php echo JHtml::_('bootstrap.addTab', 'myTab',
'modules',
JText::_('COM_MENUS_ITEM_MODULE_ASSIGNMENT')); ?>
			<?php echo $this->loadTemplate('modules'); ?>
			<?php echo JHtml::_('bootstrap.endTab'); ?>
		<?php endif; ?>

		<?php echo JHtml::_('bootstrap.endTabSet'); ?>
	</div>

	<input type="hidden" name="task" value=""
/>
	<input type="hidden" name="forcedLanguage"
value="<?php echo $input->get('forcedLanguage',
'', 'cmd'); ?>" />
	<?php echo $this->form->getInput('component_id'); ?>
	<?php echo JHtml::_('form.token'); ?>
	<input type="hidden" id="fieldtype"
name="fieldtype" value="" />
</form>
item/tmpl/edit.xml000064400000000763151156304170010136 0ustar00<?xml
version="1.0" encoding="utf-8"?>
<metadata>
	<layout title="COM_MENUS_ITEM_VIEW_EDIT_TITLE">
		<message>
			<![CDATA[COM_MENUS_ITEM_VIEW_EDIT_DESC]]>
		</message>
	</layout>
	<fieldset name="request">
		<fields name="request">
			<field
				name="menutype"
				type="menu"
				label="COM_MENUS_ITEMS_CHOOSE_MENU_LABEL"
				description="COM_MENUS_ITEMS_CHOOSE_MENU_DESC"
				clientid=""
				>
				<option value="">COM_MENUS_SELECT_MENU</option>
			</field>
		</fields>
	</fieldset>
</metadata>
item/tmpl/edit_associations.php000064400000000523151156304170012676
0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_menus
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

echo JLayoutHelper::render('joomla.edit.associations', $this);
item/tmpl/edit_container.php000064400000011621151156304170012162
0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_menus
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */
defined('_JEXEC') or die;

use Joomla\Registry\Registry;

// Initialise related data.
$menuLinks = MenusHelper::getMenuLinks('main');

JHtml::_('script', 'jui/treeselectmenu.jquery.min.js',
array('version' => 'auto', 'relative'
=> true));

$script = <<<'JS'
	jQuery(document).ready(function ($) {
		var propagate = function () {
			var $this = $(this);
			var sub = $this.closest('li').find('.treeselect-sub
[type="checkbox"]');
			sub.prop('checked', this.checked);
			if ($this.val() == 1)
				sub.each(propagate);
			else
				sub.attr('disabled', this.checked ? 'disabled' :
null);
		};
		$('.treeselect')
			.on('click', '[type="checkbox"]',
propagate)
			.find('[type="checkbox"]:checked').each(propagate);
	});
JS;

$style = <<<'CSS'
	.checkbox-toggle {
		display: none !important;
	}
	.checkbox-toggle[disabled] ~ .btn-hide {
		opacity: 0.5;
	}
	.checkbox-toggle ~ .btn-show {
		display: inline;
	}
	.checkbox-toggle ~ .btn-hide {
		display: none;
	}
	.checkbox-toggle:checked ~ .btn-show {
		display: none;
	}
	.checkbox-toggle:checked ~ .btn-hide {
		display: inline;
	}
CSS;

JFactory::getDocument()->addScriptDeclaration($script);
JFactory::getDocument()->addStyleDeclaration($style);
?>
<div id="menuselect-group" class="control-group">
	<div class="control-label"><?php echo
$this->form->getLabel('hideitems', 'params');
?></div>

	<div id="jform_params_hideitems"
class="controls">
		<?php if (!empty($menuLinks)) : ?>
		<?php $id = 'jform_params_hideitems'; ?>

		<div class="well well-small">
			<div class="form-inline">
				<span class="small"><?php echo
JText::_('COM_MENUS_ACTION_EXPAND'); ?>:
					<a id="treeExpandAll"
href="javascript://"><?php echo JText::_('JALL');
?></a>,
					<a id="treeCollapseAll"
href="javascript://"><?php echo
JText::_('JNONE'); ?></a>|
					<?php echo JText::_('JSHOW'); ?>:
					<a id="treeUncheckAll"
href="javascript://"><?php echo JText::_('JALL');
?></a>,
					<a id="treeCheckAll"
href="javascript://"><?php echo
JText::_('JNONE'); ?></a>
				</span>
				<input type="text" id="treeselectfilter"
name="treeselectfilter" class="input-medium search-query
pull-right" size="16"
					autocomplete="off" placeholder="<?php echo
JText::_('JSEARCH_FILTER'); ?>"
aria-invalid="false" tabindex="-1">
			</div>

			<div class="clearfix"></div>

			<hr class="hr-condensed" />

			<ul class="treeselect">

				<?php if (count($menuLinks)) : ?>
					<?php $prevlevel = 0; ?>
					<div class="alert alert-info"><?php echo
JText::_('COM_MENUS_ITEM_FIELD_COMPONENTS_CONTAINER_HIDE_ITEMS_DESC')?></div>
					<li>
					<?php
					$params      = new Registry($this->item->params);
					$hiddenLinks = (array) $params->get('hideitems');

					foreach ($menuLinks as $i => $link) : ?>
						<?php
						if ($extension = $link->element):
							$lang->load("$extension.sys", JPATH_ADMINISTRATOR,
null, false, true)
							|| $lang->load("$extension.sys", JPATH_ADMINISTRATOR .
'/components/' . $extension, null, false, true);
						endif;

						if ($prevlevel < $link->level)
						{
							echo '<ul class="treeselect-sub">';
						}
						elseif ($prevlevel > $link->level)
						{
							echo str_repeat('</li></ul>', $prevlevel -
$link->level);
						}
						else
						{
							echo '</li>';
						}

						$selected = in_array($link->value, $hiddenLinks) ? 1 : 0;
						?>
							<li>
								<div class="treeselect-item pull-left">
									<input type="checkbox" <?php echo $link->value
> 1 ? ' name="jform[params][hideitems][]" ' :
''; ?>
										   id="<?php echo $id . $link->value; ?>"
value="<?php echo (int) $link->value; ?>"
class="novalidate checkbox-toggle"
										<?php echo $selected ? '
checked="checked"' : ''; ?> />

									<?php if ($link->value == 1): ?>
										<label for="<?php echo $id . $link->value;
?>" class="btn btn-mini btn-info pull-left"><?php
echo JText::_('JALL') ?></label>
									<?php else: ?>
										<label for="<?php echo $id . $link->value;
?>" class="btn btn-mini btn-danger btn-hide
pull-left"><?php echo JText::_('JHIDE')
?></label>
										<label for="<?php echo $id . $link->value;
?>" class="btn btn-mini btn-success btn-show
pull-left"><?php echo JText::_('JSHOW')
?></label>
										<label for="<?php echo $id . $link->value;
?>" class="pull-left"><?php echo
JText::_($link->text); ?></label>
									<?php endif; ?>
								</div>
						<?php

						if (!isset($menuLinks[$i + 1]))
						{
							echo str_repeat('</li></ul>',
$link->level);
						}
						$prevlevel = $link->level;
						?>
						<?php endforeach; ?>
					</li>
					<?php endif; ?>

			</ul>
			<div id="noresultsfound" style="display:none;"
class="alert alert-no-items">
				<?php echo JText::_('JGLOBAL_NO_MATCHING_RESULTS'); ?>
			</div>
		</div>
		<?php endif; ?>
	</div>
</div>
item/tmpl/edit_modules.php000064400000013140151156304170011646
0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_menus
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

JHtml::_('behavior.core');

foreach ($this->levels as $key => $value) {
	$allLevels[$value->id] = $value->title;
}

JFactory::getDocument()->addScriptDeclaration('
	var viewLevels = ' . json_encode($allLevels) . ',
		menuId = parseInt(' . (int) $this->item->id . ');

	jQuery(function($) {
		var baseLink =
"index.php?option=com_modules&amp;client_id=0&amp;task=module.edit&amp;tmpl=component&amp;view=module&amp;layout=modal&amp;id=",
			iFrameAttr = "class=\"iframe jviewport-height70\"";

		$(document)
			.on("click",
"input:radio[id^=\'jform_toggle_modules_assigned1\']",
function (event) {
				$(".table tr.no").hide();
			})
			.on("click",
"input:radio[id^=\'jform_toggle_modules_assigned0\']",
function (event) {
				$(".table tr.no").show();
			})
			.on("click",
"input:radio[id^=\'jform_toggle_modules_published1\']",
function (event) {
				$(".table tr.unpublished").hide();
			})
			.on("click",
"input:radio[id^=\'jform_toggle_modules_published0\']",
function (event) {
				$(".table tr.unpublished").show();
			})
			.on("click", ".module-edit-link", function () {
				var link = baseLink + $(this).data("moduleId"),
					iFrame = $("<iframe src=\"" + link + "\"
" + iFrameAttr + "></iframe>");

				$("#moduleEditModal").modal()
					.find(".modal-body").empty().prepend(iFrame);
			})
			.on("click", "#moduleEditModal .modal-footer .btn",
function () {
				var target = $(this).data("target");

				if (target) {
					$("#moduleEditModal
iframe").contents().find(target).click();
				}
			});
	});
');

JFactory::getDocument()->addStyleDeclaration('
ul.horizontal-buttons li {
  display: inline-block;
  padding-right: 10%;
}
');

// Set up the bootstrap modal that will be used for all module editors
echo JHtml::_(
	'bootstrap.renderModal',
	'moduleEditModal',
	array(
		'title'       =>
JText::_('COM_MENUS_EDIT_MODULE_SETTINGS'),
		'backdrop'    => 'static',
		'keyboard'    => false,
		'closeButton' => false,
		'bodyHeight'  => '70',
		'modalWidth'  => '80',
		'footer'      => '<button type="button"
class="btn" data-dismiss="modal"
data-target="#closeBtn">'
				. JText::_('JLIB_HTML_BEHAVIOR_CLOSE') .
'</button>'
				. '<button type="button" class="btn
btn-primary" data-dismiss="modal"
data-target="#saveBtn">'
				. JText::_('JSAVE') . '</button>'
				. '<button type="button" class="btn
btn-success" data-target="#applyBtn">'
				. JText::_('JAPPLY') . '</button>',
	)
);

?>
<?php
// Set main fields.
$this->fields =
array('toggle_modules_assigned','toggle_modules_published');

echo JLayoutHelper::render('joomla.menu.edit_modules', $this);
?>

	<table class="table table-striped">
		<thead>
		<tr>
			<th class="left">
				<?php echo JText::_('COM_MENUS_HEADING_ASSIGN_MODULE');
?>
			</th>
			<th>
				<?php echo JText::_('COM_MENUS_HEADING_LEVELS'); ?>
			</th>
			<th>
				<?php echo JText::_('COM_MENUS_HEADING_POSITION'); ?>
			</th>
			<th>
				<?php echo JText::_('COM_MENUS_HEADING_DISPLAY'); ?>
			</th>
			<th>
				<?php echo JText::_('COM_MENUS_HEADING_PUBLISHED_ITEMS');
?>
			</th>
		</tr>
		</thead>
		<tbody>
		<?php foreach ($this->modules as $i => &$module) : ?>
			<?php if (is_null($module->menuid)) : ?>
				<?php if (!$module->except || $module->menuid < 0) : ?>
					<?php $no = 'no '; ?>
				<?php else : ?>
					<?php $no = ''; ?>
				<?php endif; ?>
			<?php else : ?>
				<?php $no = ''; ?>
			<?php endif; ?>
			<?php if ($module->published) : ?>
				<?php $status = ''; ?>
			<?php else : ?>
				<?php $status = 'unpublished '; ?>
			<?php endif; ?>
			<tr class="<?php echo $no; ?><?php echo $status;
?>row<?php echo $i % 2; ?>" id="tr-<?php echo
$module->id; ?>" style="display:table-row">
				<td id="<?php echo $module->id; ?>">
					<button type="button"
						data-target="#moduleEditModal"
						class="btn btn-link module-edit-link"
						title="<?php echo
JText::_('COM_MENUS_EDIT_MODULE_SETTINGS'); ?>"
						id="title-<?php echo $module->id; ?>"
						data-module-id="<?php echo $module->id; ?>">
						<?php echo $this->escape($module->title);
?></button>
				</td>
				<td id="access-<?php echo $module->id; ?>">
					<?php echo $this->escape($module->access_title); ?>
				</td>
				<td id="position-<?php echo $module->id; ?>">
					<?php echo $this->escape($module->position); ?>
				</td>
				<td id="menus-<?php echo $module->id; ?>">
					<?php if (is_null($module->menuid)) : ?>
						<?php if ($module->except) : ?>
							<span class="label label-success">
								<?php echo JText::_('JYES'); ?>
							</span>
						<?php else : ?>
							<span class="label label-important">
								<?php echo JText::_('JNO'); ?>
							</span>
						<?php endif; ?>
					<?php elseif ($module->menuid > 0) : ?>
						<span class="label label-success">
							<?php echo JText::_('JYES'); ?>
						</span>
					<?php elseif ($module->menuid < 0) : ?>
						<span class="label label-important">
							<?php echo JText::_('JNO'); ?>
						</span>
					<?php else : ?>
						<span class="label label-info">
							<?php echo JText::_('JALL'); ?>
						</span>
					<?php endif; ?>
				</td>
				<td id="status-<?php echo $module->id; ?>">
						<?php if ($module->published) : ?>
							<span class="label label-success">
								<?php echo JText::_('JYES'); ?>
							</span>
						<?php else : ?>
							<span class="label label-important">
								<?php echo JText::_('JNO'); ?>
							</span>
						<?php endif; ?>
				</td>
			</tr>
		<?php endforeach; ?>
		</tbody>
	</table>
item/tmpl/edit_options.php000064400000002703151156304170011674
0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_menus
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;
?>
<?php
	echo JHtml::_('bootstrap.startAccordion',
'menuOptions', array('active' =>
'collapse0'));
	$fieldSets = $this->form->getFieldsets('params');
	$i = 0;

	foreach ($fieldSets as $name => $fieldSet) :
		if (!(($this->item->link ==
'index.php?option=com_wrapper&view=wrapper') &&
$fieldSet->name == 'request')
				&& !($this->item->link == 'index.php?Itemid='
&& $fieldSet->name == 'aliasoptions')) :
			$label = !empty($fieldSet->label) ? $fieldSet->label :
'COM_MENUS_' . $name . '_FIELDSET_LABEL';
			echo JHtml::_('bootstrap.addSlide', 'menuOptions',
JText::_($label), 'collapse' . ($i++));
				if (isset($fieldSet->description) &&
trim($fieldSet->description)) :
					echo '<p class="tip">' .
$this->escape(JText::_($fieldSet->description)) .
'</p>';
				endif;
				?>
					<?php foreach ($this->form->getFieldset($name) as $field) :
?>

						<div class="control-group">

							<div class="control-label">
								<?php echo $field->label; ?>
							</div>
							<div class="controls">
								<?php echo $field->input; ?>
							</div>

						</div>
					<?php endforeach;
			echo JHtml::_('bootstrap.endSlide');
		endif;
	endforeach; ?>
<?php

echo JHtml::_('bootstrap.endAccordion');
item/tmpl/modal.php000064400000002525151156304170010272 0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_menus
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

JHtml::_('bootstrap.tooltip', '.hasTooltip',
array('placement' => 'bottom'));

// @deprecated 4.0 the function parameter, the inline js and the buttons
are not needed since 3.7.0.
$function  =
JFactory::getApplication()->input->getCmd('function',
'jEditMenu_' . (int) $this->item->id);

// Function to update input title when changed
JFactory::getDocument()->addScriptDeclaration('
	function jEditMenuModal() {
		if (window.parent &&
document.formvalidator.isValid(document.getElementById("item-form")))
{
			return window.parent.' . $this->escape($function) .
'(document.getElementById("jform_title").value);
		}
	}
');
?>
<button id="applyBtn" type="button"
class="hidden"
onclick="Joomla.submitbutton('item.apply');
jEditMenuModal();"></button>
<button id="saveBtn" type="button"
class="hidden"
onclick="Joomla.submitbutton('item.save');
jEditMenuModal();"></button>
<button id="closeBtn" type="button"
class="hidden"
onclick="Joomla.submitbutton('item.cancel');"></button>

<div class="container-popup">
	<?php $this->setLayout('edit'); ?>
	<?php echo $this->loadTemplate(); ?>
</div>
item/tmpl/modal_associations.php000064400000000523151156304170013045
0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_menus
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

echo JLayoutHelper::render('joomla.edit.associations', $this);
item/tmpl/modal_options.php000064400000002703151156304170012043
0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_menus
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;
?>
<?php
	echo JHtml::_('bootstrap.startAccordion',
'menuOptions', array('active' =>
'collapse0'));
	$fieldSets = $this->form->getFieldsets('params');
	$i = 0;

	foreach ($fieldSets as $name => $fieldSet) :
		if (!(($this->item->link ==
'index.php?option=com_wrapper&view=wrapper') &&
$fieldSet->name == 'request')
				&& !($this->item->link == 'index.php?Itemid='
&& $fieldSet->name == 'aliasoptions')) :
			$label = !empty($fieldSet->label) ? $fieldSet->label :
'COM_MENUS_' . $name . '_FIELDSET_LABEL';
			echo JHtml::_('bootstrap.addSlide', 'menuOptions',
JText::_($label), 'collapse' . ($i++));
				if (isset($fieldSet->description) &&
trim($fieldSet->description)) :
					echo '<p class="tip">' .
$this->escape(JText::_($fieldSet->description)) .
'</p>';
				endif;
				?>
					<?php foreach ($this->form->getFieldset($name) as $field) :
?>

						<div class="control-group">

							<div class="control-label">
								<?php echo $field->label; ?>
							</div>
							<div class="controls">
								<?php echo $field->input; ?>
							</div>

						</div>
					<?php endforeach;
			echo JHtml::_('bootstrap.endSlide');
		endif;
	endforeach; ?>
<?php

echo JHtml::_('bootstrap.endAccordion');
item/view.html.php000064400000010512151156304170010132 0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_menus
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

/**
 * The HTML Menus Menu Item View.
 *
 * @since  1.6
 */
class MenusViewItem extends JViewLegacy
{
	/**
	 * @var  JForm
	 */
	protected $form;

	/**
	 * @var  object
	 */
	protected $item;

	/**
	 * @var  mixed
	 */
	protected $modules;

	/**
	 * @var  JObject
	 */
	protected $state;

	/**
	 * @var  JObject
	 */
	protected $canDo;

	/**
	 * Display the view
	 *
	 * @param   string  $tpl  The name of the template file to parse;
automatically searches through the template paths.
	 *
	 * @return  void
	 *
	 * @since   1.6
	 */
	public function display($tpl = null)
	{
		$user = JFactory::getUser();

		$this->state   = $this->get('State');
		$this->form    = $this->get('Form');
		$this->item    = $this->get('Item');
		$this->modules = $this->get('Modules');
		$this->levels  = $this->get('ViewLevels');
		$this->canDo   = JHelperContent::getActions('com_menus',
'menu', (int)
$this->state->get('item.menutypeid'));

		// Check if we're allowed to edit this item
		// No need to check for create, because then the moduletype select is
empty
		if (!empty($this->item->id) &&
!$this->canDo->get('core.edit'))
		{
			throw new Exception(JText::_('JERROR_ALERTNOAUTHOR'), 403);
		}

		// Check for errors.
		if (count($errors = $this->get('Errors')))
		{
			JError::raiseError(500, implode("\n", $errors));

			return;
		}

		// If we are forcing a language in modal (used for associations).
		if ($this->getLayout() === 'modal' &&
$forcedLanguage =
JFactory::getApplication()->input->get('forcedLanguage',
'', 'cmd'))
		{
			// Set the language field to the forcedLanguage and disable changing it.
			$this->form->setValue('language', null,
$forcedLanguage);
			$this->form->setFieldAttribute('language',
'readonly', 'true');

			// Only allow to select categories with All language or with the forced
language.
			$this->form->setFieldAttribute('parent_id',
'language', '*,' . $forcedLanguage);
		}

		parent::display($tpl);
		$this->addToolbar();
	}

	/**
	 * Add the page title and toolbar.
	 *
	 * @return  void
	 *
	 * @since   1.6
	 */
	protected function addToolbar()
	{
		$input = JFactory::getApplication()->input;
		$input->set('hidemainmenu', true);

		$user       = JFactory::getUser();
		$isNew      = ($this->item->id == 0);
		$checkedOut = !($this->item->checked_out == 0 ||
$this->item->checked_out == $user->get('id'));
		$canDo      = $this->canDo;
		$clientId   = $this->state->get('item.client_id', 0);

		JToolbarHelper::title(JText::_($isNew ?
'COM_MENUS_VIEW_NEW_ITEM_TITLE' :
'COM_MENUS_VIEW_EDIT_ITEM_TITLE'), 'list menu-add');

		// If a new item, can save the item.  Allow users with edit permissions
to apply changes to prevent returning to grid.
		if ($isNew && $canDo->get('core.create'))
		{
			if ($canDo->get('core.edit'))
			{
				JToolbarHelper::apply('item.apply');
			}

			JToolbarHelper::save('item.save');
		}

		// If not checked out, can save the item.
		if (!$isNew && !$checkedOut &&
$canDo->get('core.edit'))
		{
			JToolbarHelper::apply('item.apply');
			JToolbarHelper::save('item.save');
		}

		// If the user can create new items, allow them to see Save & New
		if ($canDo->get('core.create'))
		{
			JToolbarHelper::save2new('item.save2new');
		}

		// If an existing item, can save to a copy only if we have create rights.
		if (!$isNew && $canDo->get('core.create'))
		{
			JToolbarHelper::save2copy('item.save2copy');
		}

		if (!$isNew && JLanguageAssociations::isEnabled() &&
JComponentHelper::isEnabled('com_associations') &&
$clientId != 1)
		{
			JToolbarHelper::custom('item.editAssociations',
'contract', 'contract',
'JTOOLBAR_ASSOCIATIONS', false, false);
		}

		if ($isNew)
		{
			JToolbarHelper::cancel('item.cancel');
		}
		else
		{
			JToolbarHelper::cancel('item.cancel',
'JTOOLBAR_CLOSE');
		}

		JToolbarHelper::divider();

		// Get the help information for the menu item.
		$lang = JFactory::getLanguage();

		$help = $this->get('Help');

		if ($lang->hasKey($help->url))
		{
			$debug = $lang->setDebug(false);
			$url   = JText::_($help->url);
			$lang->setDebug($debug);
		}
		else
		{
			$url = $help->url;
		}

		JToolbarHelper::help($help->key, $help->local, $url);
	}
}
items/tmpl/default.php000064400000027020151156304170011002 0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_menus
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

// Include the component HTML helpers.
JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html');

JHtml::_('bootstrap.tooltip');
JHtml::_('behavior.multiselect');
JHtml::_('formbehavior.chosen', 'select');

$user       = JFactory::getUser();
$app        = JFactory::getApplication();
$userId     = $user->get('id');
$listOrder  =
$this->escape($this->state->get('list.ordering'));
$listDirn   =
$this->escape($this->state->get('list.direction'));
$ordering   = ($listOrder == 'a.lft');
$saveOrder  = ($listOrder == 'a.lft' &&
strtolower($listDirn) == 'asc');
$menuType   = (string)
$app->getUserState('com_menus.items.menutype', '',
'string');

if ($saveOrder && $menuType)
{
	$saveOrderingUrl =
'index.php?option=com_menus&task=items.saveOrderAjax&tmpl=component';
	JHtml::_('sortablelist.sortable', 'itemList',
'adminForm', strtolower($listDirn), $saveOrderingUrl, false,
true);
}

$assoc   = JLanguageAssociations::isEnabled() &&
$this->state->get('filter.client_id') == 0;
$colSpan = $assoc ? 10 : 9;

if ($menuType == '')
{
	$colSpan--;
}
?>
<?php // Set up the filter bar. ?>
<form action="<?php echo
JRoute::_('index.php?option=com_menus&view=items');
?>" method="post" name="adminForm"
id="adminForm">
<?php if (!empty( $this->sidebar)) : ?>
	<div id="j-sidebar-container" class="span2">
		<?php echo $this->sidebar; ?>
	</div>
	<div id="j-main-container" class="span10">
<?php else : ?>
	<div id="j-main-container">
<?php endif;?>
		<?php echo
JLayoutHelper::render('joomla.searchtools.default',
array('view' => $this, 'options' =>
array('selectorFieldName' => 'menutype'))); ?>
		<?php if (empty($this->items)) : ?>
			<div class="alert alert-no-items">
				<?php echo JText::_('JGLOBAL_NO_MATCHING_RESULTS'); ?>
			</div>
		<?php else : ?>
			<table class="table table-striped"
id="itemList">
				<thead>
					<tr>
						<?php if ($menuType) : ?>
							<th width="1%" class="nowrap center
hidden-phone">
								<?php echo JHtml::_('searchtools.sort', '',
'a.lft', $listDirn, $listOrder, null, 'asc',
'JGRID_HEADING_ORDERING', 'icon-menu-2'); ?>
							</th>
						<?php endif; ?>
						<th width="1%" class="nowrap center">
							<?php echo JHtml::_('grid.checkall'); ?>
						</th>
						<th width="1%" class="nowrap center">
							<?php echo JHtml::_('searchtools.sort',
'JSTATUS', 'a.published', $listDirn, $listOrder); ?>
						</th>
						<th class="title">
							<?php echo JHtml::_('searchtools.sort',
'JGLOBAL_TITLE', 'a.title', $listDirn, $listOrder);
?>
						</th>
						<th class="nowrap hidden-phone">
							<?php echo JHtml::_('searchtools.sort',
'COM_MENUS_HEADING_MENU', 'menutype_title', $listDirn,
$listOrder); ?>
						</th>
						<?php if ($this->state->get('filter.client_id') ==
0) : ?>
						<th width="5%" class="center nowrap
hidden-phone">
							<?php echo JHtml::_('searchtools.sort',
'COM_MENUS_HEADING_HOME', 'a.home', $listDirn,
$listOrder); ?>
						</th>
						<?php endif; ?>
						<?php if ($this->state->get('filter.client_id') ==
0) : ?>
						<th width="10%" class="nowrap
hidden-phone">
							<?php echo JHtml::_('searchtools.sort', 
'JGRID_HEADING_ACCESS', 'a.access', $listDirn,
$listOrder); ?>
						</th>
						<?php endif; ?>
						<?php if ($assoc) : ?>
							<th width="5%" class="nowrap
hidden-phone">
								<?php echo JHtml::_('searchtools.sort',
'COM_MENUS_HEADING_ASSOCIATION', 'association',
$listDirn, $listOrder); ?>
							</th>
						<?php endif; ?>
						<?php if ($this->state->get('filter.client_id') ==
0) : ?>
						<th width="15%" class="nowrap
hidden-phone">
							<?php echo JHtml::_('searchtools.sort',
'JGRID_HEADING_LANGUAGE', 'language', $listDirn,
$listOrder); ?>
						</th>
						<?php endif; ?>
						<th width="1%" class="nowrap hidden-phone">
							<?php echo JHtml::_('searchtools.sort',
'JGRID_HEADING_ID', 'a.id', $listDirn, $listOrder);
?>
						</th>
					</tr>
				</thead>
				<tfoot>
					<tr>
						<td colspan="<?php echo $colSpan; ?>">
							<?php echo $this->pagination->getListFooter(); ?>
						</td>
					</tr>
				</tfoot>

				<tbody>
				<?php

				foreach ($this->items as $i => $item) :
					$orderkey   = array_search($item->id,
$this->ordering[$item->parent_id]);
					$canCreate  = $user->authorise('core.create',    
'com_menus.menu.' . $item->menutype_id);
					$canEdit    = $user->authorise('core.edit',      
'com_menus.menu.' . $item->menutype_id);
					$canCheckin = $user->authorise('core.manage',    
'com_checkin') || $item->checked_out ==
$user->get('id')|| $item->checked_out == 0;
					$canChange  = $user->authorise('core.edit.state',
'com_menus.menu.' . $item->menutype_id) &&
$canCheckin;

					// Get the parents of item for sorting
					if ($item->level > 1)
					{
						$parentsStr = '';
						$_currentParentId = $item->parent_id;
						$parentsStr = ' ' . $_currentParentId;

						for ($j = 0; $j < $item->level; $j++)
						{
							foreach ($this->ordering as $k => $v)
							{
								$v = implode('-', $v);
								$v = '-' . $v . '-';

								if (strpos($v, '-' . $_currentParentId . '-')
!== false)
								{
									$parentsStr .= ' ' . $k;
									$_currentParentId = $k;
									break;
								}
							}
						}
					}
					else
					{
						$parentsStr = '';
					}
					?>
					<tr class="row<?php echo $i % 2; ?>"
sortable-group-id="<?php echo $item->parent_id; ?>"
item-id="<?php echo $item->id; ?>"
parents="<?php echo $parentsStr; ?>" level="<?php
echo $item->level; ?>">
						<?php if ($menuType) : ?>
							<td class="order nowrap center hidden-phone">
								<?php
								$iconClass = '';

								if (!$canChange)
								{
									$iconClass = ' inactive';
								}
								elseif (!$saveOrder)
								{
									$iconClass = ' inactive tip-top hasTooltip"
title="' . JHtml::_('tooltipText',
'JORDERINGDISABLED');
								}
								?>
								<span class="sortable-handler<?php echo $iconClass
?>">
									<span class="icon-menu"
aria-hidden="true"></span>
								</span>
								<?php if ($canChange && $saveOrder) : ?>
									<input type="text" style="display:none"
name="order[]" size="5" value="<?php echo
$orderkey + 1; ?>" />
								<?php endif; ?>
							</td>
						<?php endif; ?>
						<td class="center">
							<?php echo JHtml::_('grid.id', $i, $item->id); ?>
						</td>
						<td class="center">
							<?php
							// Show protected items as published always. We don't allow
state change for them. Show/Hide is the module's job.
							$published = $item->protected ? 3 : $item->published;
							echo JHtml::_('MenusHtml.Menus.state', $published, $i,
$canChange && !$item->protected, 'cb'); ?>
						</td>
						<td>
							<?php $prefix =
JLayoutHelper::render('joomla.html.treeprefix',
array('level' => $item->level)); ?>
							<?php echo $prefix; ?>
							<?php if ($item->checked_out) : ?>
								<?php echo JHtml::_('jgrid.checkedout', $i,
$item->editor, $item->checked_out_time, 'items.',
$canCheckin); ?>
							<?php endif; ?>
							<?php if ($canEdit && !$item->protected) : ?>
								<a class="hasTooltip" href="<?php echo
JRoute::_('index.php?option=com_menus&task=item.edit&id='
. (int) $item->id); ?>" title="<?php echo
JText::_('JACTION_EDIT'); ?>">
									<?php echo $this->escape($item->title); ?></a>
							<?php else : ?>
								<?php echo $this->escape($item->title); ?>
							<?php endif; ?>
							<span class="small">
							<?php if ($item->type != 'url') : ?>
								<?php if (empty($item->note)) : ?>
									<?php echo JText::sprintf('JGLOBAL_LIST_ALIAS',
$this->escape($item->alias)); ?>
								<?php else : ?>
									<?php echo JText::sprintf('JGLOBAL_LIST_ALIAS_NOTE',
$this->escape($item->alias), $this->escape($item->note)); ?>
								<?php endif; ?>
							<?php elseif ($item->type == 'url' &&
$item->note) : ?>
								<?php echo JText::sprintf('JGLOBAL_LIST_NOTE',
$this->escape($item->note)); ?>
							<?php endif; ?>
							</span>
							<?php echo JHtml::_('MenusHtml.Menus.visibility',
$item->params); ?>
							<div title="<?php echo $this->escape($item->path);
?>">
								<?php echo $prefix; ?>
								<span class="small"  title="<?php echo
isset($item->item_type_desc) ?
htmlspecialchars($this->escape($item->item_type_desc), ENT_COMPAT,
'UTF-8') : ''; ?>">
									<?php echo $this->escape($item->item_type);
?></span>
							</div>
						</td>
						<td class="small hidden-phone">
							<?php echo $this->escape($item->menutype_title ?:
ucwords($item->menutype)); ?>
						</td>
						<?php if ($this->state->get('filter.client_id') ==
0) : ?>
						<td class="center hidden-phone">
							<?php if ($item->type == 'component') : ?>
								<?php if ($item->language == '*' || $item->home
== '0') : ?>
									<?php echo JHtml::_('jgrid.isdefault',
$item->home, $i, 'items.', ($item->language !=
'*' || !$item->home) && $canChange &&
!$item->protected); ?>
								<?php elseif ($canChange) : ?>
									<a href="<?php echo
JRoute::_('index.php?option=com_menus&task=items.unsetDefault&cid[]='
. $item->id . '&' . JSession::getFormToken() .
'=1'); ?>">
										<?php if ($item->language_image) : ?>
											<?php echo JHtml::_('image',
'mod_languages/' . $item->language_image . '.gif',
$item->language_title, array('title' =>
JText::sprintf('COM_MENUS_GRID_UNSET_LANGUAGE',
$item->language_title)), true); ?>
										<?php else : ?>
											<span class="label" title="<?php echo
JText::sprintf('COM_MENUS_GRID_UNSET_LANGUAGE',
$item->language_title); ?>"><?php echo
$item->language_sef; ?></span>
										<?php endif; ?>
									</a>
								<?php else : ?>
									<?php if ($item->language_image) : ?>
										<?php echo JHtml::_('image',
'mod_languages/' . $item->language_image . '.gif',
$item->language_title, array('title' =>
$item->language_title), true); ?>
									<?php else : ?>
										<span class="label" title="<?php echo
$item->language_title; ?>"><?php echo
$item->language_sef; ?></span>
									<?php endif; ?>
								<?php endif; ?>
							<?php endif; ?>
						</td>
						<?php endif; ?>
						<?php if ($this->state->get('filter.client_id') ==
0) : ?>
						<td class="small hidden-phone">
							<?php echo $this->escape($item->access_level); ?>
						</td>
						<?php endif; ?>
						<?php if ($assoc) : ?>
							<td class="small hidden-phone">
								<?php if ($item->association) : ?>
									<?php echo JHtml::_('MenusHtml.Menus.association',
$item->id); ?>
								<?php endif; ?>
							</td>
						<?php endif; ?>
						<?php if ($this->state->get('filter.client_id') ==
0) : ?>
						<td class="small hidden-phone">
							<?php echo
JLayoutHelper::render('joomla.content.language', $item); ?>
						</td>
						<?php endif; ?>
						<td class="hidden-phone">
							<span title="<?php echo sprintf('%d-%d',
$item->lft, $item->rgt); ?>">
								<?php echo (int) $item->id; ?>
							</span>
						</td>
					</tr>
					<?php endforeach; ?>
				</tbody>
			</table>
			<?php // Load the batch processing form if user is allowed ?>
			<?php if ($user->authorise('core.create',
'com_menus') || $user->authorise('core.edit',
'com_menus')) : ?>
				<?php echo JHtml::_(
					'bootstrap.renderModal',
					'collapseModal',
					array(
						'title' =>
JText::_('COM_MENUS_BATCH_OPTIONS'),
						'footer' =>
$this->loadTemplate('batch_footer')
					),
					$this->loadTemplate('batch_body')
				); ?>
			<?php endif; ?>
		<?php endif; ?>

		<input type="hidden" name="task"
value="" />
		<input type="hidden" name="boxchecked"
value="0" />
		<?php echo JHtml::_('form.token'); ?>
	</div>
</form>
items/tmpl/default.xml000064400000000773151156304170011021 0ustar00<?xml
version="1.0" encoding="utf-8"?>
<metadata>
	<layout title="COM_MENUS_ITEMS_VIEW_DEFAULT_TITLE">
		<message>
			<![CDATA[COM_MENUS_ITEMS_VIEW_DEFAULT_DESC]]>
		</message>
	</layout>
	<fieldset name="request">
		<fields name="request">
			<field
				name="menutype"
				type="menu"
				label="COM_MENUS_ITEMS_CHOOSE_MENU_LABEL"
				description="COM_MENUS_ITEMS_CHOOSE_MENU_DESC"
				clientid=""
				>
				<option value="">COM_MENUS_SELECT_MENU</option>
			</field>
		</fields>
	</fieldset>
</metadata>
items/tmpl/default_batch_body.php000064400000005442151156304170013164
0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_menus
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */
defined('_JEXEC') or die;

$options = array(
	JHtml::_('select.option', 'c',
JText::_('JLIB_HTML_BATCH_COPY')),
	JHtml::_('select.option', 'm',
JText::_('JLIB_HTML_BATCH_MOVE'))
);
$published = (int) $this->state->get('filter.published');
$clientId  = (int) $this->state->get('filter.client_id');
$menuType  =
JFactory::getApplication()->getUserState('com_menus.items.menutype');
if ($clientId == 1) :
	JFactory::getDocument()->addScriptDeclaration(
		'
			jQuery(document).ready(function($){
				if ($("#batch-menu-id").length){var batchSelector =
$("#batch-menu-id");}
				if ($("#batch-copy-move").length) {
					$("#batch-copy-move").hide();
					batchSelector.on("change", function(){
						if (batchSelector.val() != 0 || batchSelector.val() != "")
{
							$("#batch-copy-move").show();
						} else {
							$("#batch-copy-move").hide();
						}
					});
				}
			});
		'
	);
endif;

?>
<div class="container-fluid">
	<?php if (strlen($menuType) && $menuType != '*') :
?>
	<?php if ($clientId != 1) : ?>
	<div class="row-fluid">
		<div class="control-group span6">
			<div class="controls">
				<?php echo JHtml::_('batch.language'); ?>
			</div>
		</div>
		<div class="control-group span6">
			<div class="controls">
				<?php echo JHtml::_('batch.access'); ?>
			</div>
		</div>
	</div>
	<?php endif; ?>
	<div class="row-fluid">
		<?php if ($published >= 0) : ?>
			<div id="batch-choose-action" class="combo
control-group">
				<label id="batch-choose-action-lbl"
class="control-label" for="batch-menu-id">
					<?php echo JText::_('COM_MENUS_BATCH_MENU_LABEL'); ?>
				</label>
				<div class="controls">
					<select name="batch[menu_id]"
id="batch-menu-id">
						<option value=""><?php echo
JText::_('JLIB_HTML_BATCH_NO_CATEGORY'); ?></option>
						<?php
						$opts     = array(
							'published' => $published,
							'checkacl'  => (int)
$this->state->get('menutypeid'),
							'clientid'  => (int) $clientId,
						);
						echo JHtml::_('select.options',
JHtml::_('menu.menuitems', $opts));
						?>
					</select>
				</div>
			</div>
			<div id="batch-copy-move" class="control-group
radio">
				<?php echo JText::_('JLIB_HTML_BATCH_MOVE_QUESTION');
?>
				<?php echo JHtml::_('select.radiolist', $options,
'batch[move_copy]', '', 'value',
'text', 'm'); ?>
			</div>
		<?php endif; ?>

		<?php if ($published < 0 && $clientId == 1): ?>
			<p><?php echo
JText::_('COM_MENUS_SELECT_MENU_FILTER_NOT_TRASHED');
?></p>
		<?php endif; ?>
	</div>
	<?php else : ?>
	<div class="row-fluid">
		<p><?php echo JText::_('COM_MENUS_SELECT_MENU_FIRST');
?></p>
	</div>
	<?php endif; ?>
</div>
items/tmpl/default_batch_footer.php000064400000001777151156304170013534
0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_menus
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */
defined('_JEXEC') or die;
$published = $this->state->get('filter.published');
$clientId  = $this->state->get('filter.client_id');
$menuType =
JFactory::getApplication()->getUserState('com_menus.items.menutype');
?>
<button type="button" class="btn"
onclick="document.getElementById('batch-menu-id').value='';document.getElementById('batch-access').value='';document.getElementById('batch-language-id').value=''"
data-dismiss="modal">
	<?php echo JText::_('JCANCEL'); ?>
</button>
<?php if ((strlen($menuType) && $menuType != '*'
&& $clientId == 0) || ($published > 0 && $clientId ==
1)): ?>
	<button type="submit" class="btn btn-success"
onclick="Joomla.submitbutton('item.batch');return
false;">
		<?php echo JText::_('JGLOBAL_BATCH_PROCESS'); ?>
	</button>
<?php endif; ?>
items/tmpl/modal.php000064400000017014151156304170010454 0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_menus
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

$app = JFactory::getApplication();

if ($app->isClient('site'))
{
	JSession::checkToken('get') or
die(JText::_('JINVALID_TOKEN'));
}

JHtml::addIncludePath(JPATH_COMPONENT_ADMINISTRATOR .
'/helpers/html');

JHtml::_('behavior.core');
JHtml::_('behavior.polyfill', array('event'), 'lt
IE 9');
JHtml::_('script',
'com_menus/admin-items-modal.min.js', array('version'
=> 'auto', 'relative' => true));
JHtml::_('bootstrap.tooltip', '.hasTooltip',
array('placement' => 'bottom'));
JHtml::_('bootstrap.popover', '.hasPopover',
array('placement' => 'bottom'));
JHtml::_('formbehavior.chosen', 'select');

// Special case for the search field tooltip.
$searchFilterDesc =
$this->filterForm->getFieldAttribute('search',
'description', null, 'filter');
JHtml::_('bootstrap.tooltip', '#filter_search',
array('title' => JText::_($searchFilterDesc),
'placement' => 'bottom'));

$function     = $app->input->get('function',
'jSelectMenuItem', 'cmd');
$editor    = $app->input->getCmd('editor', '');
$listOrder    =
$this->escape($this->state->get('list.ordering'));
$listDirn     =
$this->escape($this->state->get('list.direction'));
$link         =
'index.php?option=com_menus&view=items&layout=modal&tmpl=component&'
. JSession::getFormToken() . '=1';

if (!empty($editor))
{
	// This view is used also in com_menus. Load the xtd script only if the
editor is set!
	JFactory::getDocument()->addScriptOptions('xtd-menus',
array('editor' => $editor));
	$onclick = "jSelectMenuItem";
	$link    =
'index.php?option=com_menus&view=items&layout=modal&tmpl=component&editor='
. $editor . '&' . JSession::getFormToken() . '=1';
}
?>
<div class="container-popup">

	<form action="<?php echo JRoute::_($link); ?>"
method="post" name="adminForm" id="adminForm"
class="form-inline">

		<?php echo
JLayoutHelper::render('joomla.searchtools.default',
array('view' => $this, 'options' =>
array('selectorFieldName' => 'menutype'))); ?>

		<?php if (empty($this->items)) : ?>
			<div class="alert alert-no-items">
				<?php echo JText::_('JGLOBAL_NO_MATCHING_RESULTS'); ?>
			</div>
		<?php else : ?>
			<table class="table table-striped table-condensed">
				<thead>
					<tr>
						<th width="1%" class="nowrap center">
							<?php echo JHtml::_('searchtools.sort',
'JSTATUS', 'a.published', $listDirn, $listOrder); ?>
						</th>
						<th class="title">
							<?php echo JHtml::_('searchtools.sort',
'JGLOBAL_TITLE', 'a.title', $listDirn, $listOrder);
?>
						</th>
						<th class="nowrap hidden-phone">
							<?php echo JHtml::_('searchtools.sort',
'COM_MENUS_HEADING_MENU', 'menutype_title', $listDirn,
$listOrder); ?>
						</th>
						<th width="5%" class="center nowrap
hidden-phone">
							<?php echo JHtml::_('searchtools.sort',
'COM_MENUS_HEADING_HOME', 'a.home', $listDirn,
$listOrder); ?>
						</th>
						<th width="10%" class="nowrap
hidden-phone">
							<?php echo JHtml::_('searchtools.sort', 
'JGRID_HEADING_ACCESS', 'a.access', $listDirn,
$listOrder); ?>
						</th>
						<th width="15%" class="nowrap
hidden-phone">
							<?php echo JHtml::_('searchtools.sort',
'JGRID_HEADING_LANGUAGE', 'language', $listDirn,
$listOrder); ?>
						</th>
						<th width="1%" class="nowrap hidden-phone">
							<?php echo JHtml::_('searchtools.sort',
'JGRID_HEADING_ID', 'a.id', $listDirn, $listOrder);
?>
						</th>
					</tr>
				</thead>
				<tfoot>
					<tr>
						<td colspan="7">
							<?php echo $this->pagination->getListFooter(); ?>
						</td>
					</tr>
				</tfoot>
				<tbody>
				<?php foreach ($this->items as $i => $item) : ?>
				<?php $uselessMenuItem = in_array($item->type,
array('separator', 'heading', 'alias',
'url', 'container')); ?>
					<?php if ($item->language &&
JLanguageMultilang::isEnabled())
					{
						if ($item->language !== '*')
						{
							$language = $item->language;
						}
						else
						{
							$language = '';
						}
					}
					elseif (!JLanguageMultilang::isEnabled())
					{
						$language = '';
					}
					?>
					<tr class="row<?php echo $i % 2; ?>">
						<td class="center">
							<?php echo JHtml::_('MenusHtml.Menus.state',
$item->published, $i, 0); ?>
						</td>
						<td>
							<?php $prefix =
JLayoutHelper::render('joomla.html.treeprefix',
array('level' => $item->level)); ?>
							<?php echo $prefix; ?>
							<?php if (!$uselessMenuItem) : ?>
								<a class="select-link"
href="javascript:void(0)" data-function="<?php echo
$this->escape($function); ?>" data-id="<?php echo
$item->id; ?>" data-title="<?php echo
$this->escape($item->title); ?>" data-uri="<?php echo
'index.php?Itemid=' . $item->id; ?>"
data-language="<?php echo $this->escape($language);
?>">
									<?php echo $this->escape($item->title); ?>
								</a>
							<?php else : ?>
								<?php echo $this->escape($item->title); ?>
							<?php endif; ?>
							<span class="small">
								<?php if (empty($item->note)) : ?>
									<?php echo JText::sprintf('JGLOBAL_LIST_ALIAS',
$this->escape($item->alias)); ?>
								<?php else : ?>
									<?php echo JText::sprintf('JGLOBAL_LIST_ALIAS_NOTE',
$this->escape($item->alias), $this->escape($item->note)); ?>
								<?php endif; ?>
							</span>
							<div title="<?php echo $this->escape($item->path);
?>">
								<?php echo $prefix; ?>
								<span class="small" title="<?php echo
isset($item->item_type_desc) ?
htmlspecialchars($this->escape($item->item_type_desc), ENT_COMPAT,
'UTF-8') : ''; ?>">
									<?php echo $this->escape($item->item_type);
?></span>
							</div>
						</td>
						<td class="small hidden-phone">
							<?php echo $this->escape($item->menutype_title); ?>
						</td>
						<td class="center hidden-phone">
							<?php if ($item->type == 'component') : ?>
								<?php if ($item->language == '*' || $item->home
== '0') : ?>
									<?php echo JHtml::_('jgrid.isdefault',
$item->home, $i, 'items.', ($item->language !=
'*' || !$item->home) && 0); ?>
								<?php else : ?>
									<?php if ($item->language_image) : ?>
										<?php echo JHtml::_('image',
'mod_languages/' . $item->language_image . '.gif',
$item->language_title, array('title' =>
$item->language_title), true); ?>
									<?php else : ?>
										<span class="label" title="<?php echo
$item->language_title; ?>"><?php echo
$item->language_sef; ?></span>
									<?php endif; ?>
								<?php endif; ?>
							<?php endif; ?>
						</td>
						<td class="small hidden-phone">
							<?php echo $this->escape($item->access_level); ?>
						</td>
						<td class="small hidden-phone">
							<?php if ($item->language == '') : ?>
								<?php echo JText::_('JDEFAULT'); ?>
							<?php elseif ($item->language == '*') : ?>
								<?php echo JText::alt('JALL', 'language');
?>
							<?php else : ?>
								<?php echo
JLayoutHelper::render('joomla.content.language', $item); ?>
							<?php endif; ?>
						</td>
						<td class="hidden-phone">
							<span title="<?php echo sprintf('%d-%d',
$item->lft, $item->rgt); ?>">
								<?php echo (int) $item->id; ?>
							</span>
						</td>
					</tr>
				<?php endforeach; ?>
				</tbody>
			</table>
		<?php endif; ?>

		<input type="hidden" name="task"
value="" />
		<input type="hidden" name="boxchecked"
value="0" />
		<input type="hidden" name="function"
value="<?php echo $function; ?>" />
		<input type="hidden" name="forcedLanguage"
value="<?php echo
$app->input->get('forcedLanguage', '',
'cmd'); ?>" />
		<?php echo JHtml::_('form.token'); ?>

	</form>
</div>
items/view.html.php000064400000025662151156304170010331 0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_menus
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

/**
 * The HTML Menus Menu Items View.
 *
 * @since  1.6
 */
class MenusViewItems extends JViewLegacy
{
	/**
	 * @var  array
	 */
	protected $f_levels;

	/**
	 * @var  mixed
	 */
	protected $items;

	/**
	 * @var  JPagination
	 */
	protected $pagination;

	/**
	 * @var  JObject
	 */
	protected $state;

	/**
	 * Display the view
	 *
	 * @param   string  $tpl  The name of the template file to parse;
automatically searches through the template paths.
	 *
	 * @return  void
	 *
	 * @since   1.6
	 */
	public function display($tpl = null)
	{
		$lang = JFactory::getLanguage();
		$this->items         = $this->get('Items');
		$this->pagination    = $this->get('Pagination');
		$this->total         = $this->get('Total');
		$this->state         = $this->get('State');
		$this->filterForm    = $this->get('FilterForm');
		$this->activeFilters = $this->get('ActiveFilters');

		// We don't need toolbar in the modal window.
		if ($this->getLayout() !== 'modal')
		{
			MenusHelper::addSubmenu('items');
		}

		// Check for errors.
		if (count($errors = $this->get('Errors')))
		{
			throw new Exception(implode("\n", $errors), 500);
		}

		$this->ordering = array();

		// Preprocess the list of items to find ordering divisions.
		foreach ($this->items as $item)
		{
			$this->ordering[$item->parent_id][] = $item->id;

			// Item type text
			switch ($item->type)
			{
				case 'url':
					$value = JText::_('COM_MENUS_TYPE_EXTERNAL_URL');
					break;

				case 'alias':
					$value = JText::_('COM_MENUS_TYPE_ALIAS');
					break;

				case 'separator':
					$value = JText::_('COM_MENUS_TYPE_SEPARATOR');
					break;

				case 'heading':
					$value = JText::_('COM_MENUS_TYPE_HEADING');
					break;

				case 'container':
					$value = JText::_('COM_MENUS_TYPE_CONTAINER');
					break;

				case 'component':
				default:
					// Load language
						$lang->load($item->componentname . '.sys',
JPATH_ADMINISTRATOR, null, false, true)
					|| $lang->load($item->componentname . '.sys',
JPATH_ADMINISTRATOR . '/components/' . $item->componentname,
null, false, true);

					if (!empty($item->componentname))
					{
						$titleParts   = array();
						$titleParts[] = JText::_($item->componentname);
						$vars         = null;

						parse_str($item->link, $vars);

						if (isset($vars['view']))
						{
							// Attempt to load the view xml file.
							$file = JPATH_SITE . '/components/' .
$item->componentname . '/views/' . $vars['view'] .
'/metadata.xml';

							if (!is_file($file))
							{
								$file = JPATH_SITE . '/components/' .
$item->componentname . '/view/' . $vars['view'] .
'/metadata.xml';
							}

							if (is_file($file) && $xml = simplexml_load_file($file))
							{
								// Look for the first view node off of the root node.
								if ($view = $xml->xpath('view[1]'))
								{
									// Add view title if present.
									if (!empty($view[0]['title']))
									{
										$viewTitle = trim((string) $view[0]['title']);

										// Check if the key is valid. Needed due to B/C so we don't
show untranslated keys. This check should be removed with Joomla 4.
										if ($lang->hasKey($viewTitle))
										{
											$titleParts[] = JText::_($viewTitle);
										}
									}
								}
							}

							$vars['layout'] = isset($vars['layout']) ?
$vars['layout'] : 'default';

							// Attempt to load the layout xml file.
							// If Alternative Menu Item, get template folder for layout file
							if (strpos($vars['layout'], ':') > 0)
							{
								// Use template folder for layout file
								$temp = explode(':', $vars['layout']);
								$file = JPATH_SITE . '/templates/' . $temp[0] .
'/html/' . $item->componentname . '/' .
$vars['view'] . '/' . $temp[1] . '.xml';

								// Load template language file
								$lang->load('tpl_' . $temp[0] . '.sys',
JPATH_SITE, null, false, true)
								||	$lang->load('tpl_' . $temp[0] . '.sys',
JPATH_SITE . '/templates/' . $temp[0], null, false, true);
							}
							else
							{
								// Get XML file from component folder for standard layouts
								$file = JPATH_SITE . '/components/' .
$item->componentname . '/views/' . $vars['view'] .
'/tmpl/' . $vars['layout'] . '.xml';

								if (!file_exists($file))
								{
									$file = JPATH_SITE . '/components/' .
$item->componentname . '/view/' . $vars['view'] .
'/tmpl/' . $vars['layout'] . '.xml';
								}
							}

							if (is_file($file) && $xml = simplexml_load_file($file))
							{
								// Look for the first view node off of the root node.
								if ($layout = $xml->xpath('layout[1]'))
								{
									if (!empty($layout[0]['title']))
									{
										$titleParts[] = JText::_(trim((string)
$layout[0]['title']));
									}
								}

								if (!empty($layout[0]->message[0]))
								{
									$item->item_type_desc = JText::_(trim((string)
$layout[0]->message[0]));
								}
							}

							unset($xml);

							// Special case if neither a view nor layout title is found
							if (count($titleParts) == 1)
							{
								$titleParts[] = $vars['view'];
							}
						}

						$value = implode(' » ', $titleParts);
					}
					else
					{
						if (preg_match("/^index.php\?option=([a-zA-Z\-0-9_]*)/",
$item->link, $result))
						{
							$value = JText::sprintf('COM_MENUS_TYPE_UNEXISTING',
$result[1]);
						}
						else
						{
							$value = JText::_('COM_MENUS_TYPE_UNKNOWN');
						}
					}
					break;
			}

			$item->item_type = $value;
			$item->protected = $item->menutype == 'main';
		}

		// Levels filter.
		$options   = array();
		$options[] = JHtml::_('select.option', '1',
JText::_('J1'));
		$options[] = JHtml::_('select.option', '2',
JText::_('J2'));
		$options[] = JHtml::_('select.option', '3',
JText::_('J3'));
		$options[] = JHtml::_('select.option', '4',
JText::_('J4'));
		$options[] = JHtml::_('select.option', '5',
JText::_('J5'));
		$options[] = JHtml::_('select.option', '6',
JText::_('J6'));
		$options[] = JHtml::_('select.option', '7',
JText::_('J7'));
		$options[] = JHtml::_('select.option', '8',
JText::_('J8'));
		$options[] = JHtml::_('select.option', '9',
JText::_('J9'));
		$options[] = JHtml::_('select.option', '10',
JText::_('J10'));

		$this->f_levels = $options;

		// We don't need toolbar in the modal window.
		if ($this->getLayout() !== 'modal')
		{
			$this->addToolbar();
			$this->sidebar = JHtmlSidebar::render();
		}
		else
		{
			// In menu associations modal we need to remove language filter if
forcing a language.
			if ($forcedLanguage =
JFactory::getApplication()->input->get('forcedLanguage',
'', 'CMD'))
			{
				// If the language is forced we can't allow to select the
language, so transform the language selector filter into a hidden field.
				$languageXml = new SimpleXMLElement('<field
name="language" type="hidden" default="' .
$forcedLanguage . '" />');
				$this->filterForm->setField($languageXml, 'filter',
true);

				// Also, unset the active language filter so the search tools is not
open by default with this filter.
				unset($this->activeFilters['language']);
			}
		}

		// Allow a system plugin to insert dynamic menu types to the list shown
in menus:
		JEventDispatcher::getInstance()->trigger('onBeforeRenderMenuItems',
array($this));

		parent::display($tpl);
	}

	/**
	 * Add the page title and toolbar.
	 *
	 * @return  void
	 *
	 * @since   1.6
	 */
	protected function addToolbar()
	{
		$menutypeId = (int) $this->state->get('menutypeid');

		$canDo = JHelperContent::getActions('com_menus',
'menu', (int) $menutypeId);
		$user  = JFactory::getUser();

		// Get the menu title
		$menuTypeTitle =
$this->get('State')->get('menutypetitle');

		// Get the toolbar object instance
		$bar = JToolbar::getInstance('toolbar');

		if ($menuTypeTitle)
		{
			JToolbarHelper::title(JText::sprintf('COM_MENUS_VIEW_ITEMS_MENU_TITLE',
$menuTypeTitle), 'list menumgr');
		}
		else
		{
			JToolbarHelper::title(JText::_('COM_MENUS_VIEW_ITEMS_ALL_TITLE'),
'list menumgr');
		}

		if ($canDo->get('core.create'))
		{
			JToolbarHelper::addNew('item.add');
		}

		$protected = $this->state->get('filter.menutype') ==
'main';

		if ($canDo->get('core.edit') && !$protected)
		{
			JToolbarHelper::editList('item.edit');
		}

		if ($canDo->get('core.edit.state') && !$protected)
		{
			JToolbarHelper::publish('items.publish',
'JTOOLBAR_PUBLISH', true);
			JToolbarHelper::unpublish('items.unpublish',
'JTOOLBAR_UNPUBLISH', true);
		}

		if (JFactory::getUser()->authorise('core.admin') &&
!$protected)
		{
			JToolbarHelper::checkin('items.checkin',
'JTOOLBAR_CHECKIN', true);
		}

		if ($canDo->get('core.edit.state') &&
$this->state->get('filter.client_id') == 0)
		{
			JToolbarHelper::makeDefault('items.setDefault',
'COM_MENUS_TOOLBAR_SET_HOME');
		}

		if (JFactory::getUser()->authorise('core.admin'))
		{
			JToolbarHelper::custom('items.rebuild',
'refresh.png', 'refresh_f2.png',
'JToolbar_Rebuild', false);
		}

		// Add a batch button
		if (!$protected && $user->authorise('core.create',
'com_menus')
			&& $user->authorise('core.edit',
'com_menus')
			&& $user->authorise('core.edit.state',
'com_menus'))
		{
			$title = JText::_('JTOOLBAR_BATCH');

			// Instantiate a new JLayoutFile instance and render the batch button
			$layout = new JLayoutFile('joomla.toolbar.batch');

			$dhtml = $layout->render(array('title' => $title));
			$bar->appendButton('Custom', $dhtml, 'batch');
		}

		if (!$protected &&
$this->state->get('filter.published') == -2 &&
$canDo->get('core.delete'))
		{
			JToolbarHelper::deleteList('JGLOBAL_CONFIRM_DELETE',
'items.delete', 'JTOOLBAR_EMPTY_TRASH');
		}
		elseif (!$protected &&
$canDo->get('core.edit.state'))
		{
			JToolbarHelper::trash('items.trash');
		}

		if ($canDo->get('core.admin') ||
$canDo->get('core.options'))
		{
			JToolbarHelper::divider();
			JToolbarHelper::preferences('com_menus');
		}

		JToolbarHelper::help('JHELP_MENUS_MENU_ITEM_MANAGER');
	}

	/**
	 * Returns an array of fields the table can be sorted by
	 *
	 * @return  array  Array containing the field name to sort by as the key
and display text as value
	 *
	 * @since   3.0
	 */
	protected function getSortFields()
	{
		$this->state = $this->get('State');

		if ($this->state->get('filter.client_id') == 0)
		{
			return array(
				'a.lft'       =>
JText::_('JGRID_HEADING_ORDERING'),
				'a.published' => JText::_('JSTATUS'),
				'a.title'     => JText::_('JGLOBAL_TITLE'),
				'a.home'      =>
JText::_('COM_MENUS_HEADING_HOME'),
				'a.access'    =>
JText::_('JGRID_HEADING_ACCESS'),
				'association' =>
JText::_('COM_MENUS_HEADING_ASSOCIATION'),
				'language'    =>
JText::_('JGRID_HEADING_LANGUAGE'),
				'a.id'        => JText::_('JGRID_HEADING_ID')
			);
		}
		else
		{
			return array(
				'a.lft'       =>
JText::_('JGRID_HEADING_ORDERING'),
				'a.published' => JText::_('JSTATUS'),
				'a.title'     => JText::_('JGLOBAL_TITLE'),
				'a.id'        => JText::_('JGRID_HEADING_ID')
			);
		}
	}
}
menu/tmpl/edit.php000064400000003577151156304170010141 0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_menus
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

// Include the component HTML helpers.
JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html');

JHtml::_('behavior.core');
JHtml::_('behavior.formvalidator');
JHtml::_('formbehavior.chosen', 'select');

JText::script('ERROR');

JFactory::getDocument()->addScriptDeclaration("
		Joomla.submitbutton = function(task)
		{
			var form = document.getElementById('item-form');
			if (task == 'menu.cancel' ||
document.formvalidator.isValid(form))
			{
				Joomla.submitform(task, form);
			}
		};
");
?>
<form action="<?php echo
JRoute::_('index.php?option=com_menus&layout=edit&id=' .
(int) $this->item->id); ?>" method="post"
name="adminForm" id="item-form">

	<?php echo JLayoutHelper::render('joomla.edit.title_alias',
$this); ?>

	<div class="form-horizontal">
		<?php echo JHtml::_('bootstrap.startTabSet',
'myTab', array('active' => 'details'));
?>

			<?php echo JHtml::_('bootstrap.addTab', 'myTab',
'details', JText::_('COM_MENUS_MENU_DETAILS')); ?>

			<?php
			echo $this->form->renderField('menutype');

			echo $this->form->renderField('description');

			echo $this->form->renderField('client_id');

			echo $this->form->renderField('preset');
			?>

			<?php echo JHtml::_('bootstrap.endTab'); ?>

			<?php if ($this->canDo->get('core.admin')) : ?>
				<?php echo JHtml::_('bootstrap.addTab', 'myTab',
'permissions', JText::_('COM_MENUS_FIELDSET_RULES'));
?>
					<?php echo $this->form->getInput('rules'); ?>
				<?php echo JHtml::_('bootstrap.endTab'); ?>
			<?php endif; ?>

		<?php echo JHtml::_('bootstrap.endTabSet'); ?>
		<input type="hidden" name="task"
value="" />
		<?php echo JHtml::_('form.token'); ?>

	</div>
</form>
menu/tmpl/edit.xml000064400000000300151156304170010127 0ustar00<?xml
version="1.0" encoding="utf-8"?>
<metadata>
	<layout title="COM_MENUS_MENU_VIEW_EDIT_TITLE">
		<message>
			<![CDATA[COM_MENUS_MENU_VIEW_EDIT_DESC]]>
		</message>
	</layout>
</metadata>
menu/view.html.php000064400000033042151156304170010143 0ustar00<?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 MenuViewMenu extends hikashopView{
	var $triggerView = true;

	function display($tpl =
null,$title='',$menu_style=''){
		$this->assignRef('title',$title);
		$this->assignRef('menu_style',$menu_style);
		if (!HIKASHOP_PHP5) {
			$doc =& JFactory::getDocument();
		}else{
			$doc = JFactory::getDocument();
		}
		$doc->addStyleSheet(HIKASHOP_CSS.'menu.css');
		$config = hikashop_config();
		$function = $this->getLayout();
		if(method_exists($this,$function)) $this->$function();

		$plugin = JPluginHelper::getPlugin('system',
'hikashopaffiliate');

		$menus = array(
			array(
				'name' => JText::_('SYSTEM'),
				'check' => 'ctrl=config',
				'acl' => 'config',
				'task' => 'manage',
				'icon' => 'icon-16-config',
				'url' => (!HIKASHOP_J16 ||
JFactory::getUser()->authorise('core.admin',
'com_hikashop')) ? hikashop_completeLink('config') :
'#',
				'children' => array(
					array(
						'name' => JText::_('HIKA_CONFIGURATION'),
						'check' => 'ctrl=config',
						'acl' => 'config',
						'task' => 'manage',
						'icon' => 'icon-16-config',
						'url' => hikashop_completeLink('config'),
						'display'=>(!HIKASHOP_J16 ||
JFactory::getUser()->authorise('core.admin',
'com_hikashop'))
					),
					array(
						'name' => JText::_('ZONES'),
						'check' => 'ctrl=zone',
						'acl' => 'zone',
						'icon' => 'icon-16-language',
						'url' => hikashop_completeLink('zone')
					),
					array(
						'name' => JText::_('PAYMENT_METHODS'),
						'check' =>
array('ctrl'=>'plugins',
'plugin_type'=>'payment'),
						'acl' => 'plugins',
						'icon' => 'icon-16-plugin',
						'url' =>
hikashop_completeLink('plugins&plugin_type=payment')
					),
					array(
						'name' => JText::_('SHIPPING_METHODS'),
						'check' =>
array('ctrl'=>'plugins',
'plugin_type'=>'shipping'),
						'acl' => 'plugins',
						'icon' => 'icon-16-plugin',
						'url' =>
hikashop_completeLink('plugins&plugin_type=shipping')
					),
					array(
						'name' => JText::_('TAXES'),
						'check' =>
array('ctrl'=>'taxation'),
						'acl' => 'taxation',
						'icon' => 'icon-16-tax',
						'url' => hikashop_completeLink('taxation')
					),
					array(
						'name' => JText::_('CURRENCIES'),
						'check' =>
array('ctrl'=>'currency'),
						'acl' => 'currency',
						'icon' => 'icon-16-currency',
						'url' => hikashop_completeLink('currency')
					),
					array(
						'name' => JText::_('ORDER_STATUSES'),
						'check' =>
array('ctrl'=>'category','filter_id' =>
'status'),
						'acl' => 'config',
						'icon' => 'icon-16-order',
						'url' =>
hikashop_completeLink('category&filter_id=status')
					),
					array(
						'name' => JText::_('EMAILS'),
						'check' => 'ctrl=email',
						'acl' => 'email',
						'url' => hikashop_completeLink('email'),
						'icon' => 'icon-16-email',
						'display' => hikashop_level(2)
					),
					array(
						'name' => JText::_('HIKA_MASSACTION'),
						'check' => 'ctrl=massaction',
						'acl' => 'massaction',
						'url' => hikashop_completeLink('massaction'),
						'icon' => 'icon-16-massaction'
					)
				)
			),
			array(
				'name' => JText::_('PRODUCTS'),
				'check' => array('ctrl'=>'product',
'!task'=>array('add')),
				'acl' => 'product',
				'icon' => 'icon-16-product',
				'url' => hikashop_completeLink('product'),
				'children' => array(
					array(
						'name' => JText::_('ADD_PRODUCT'),
						'check' =>
array('ctrl'=>'procut',
'task'=>'add'),
						'acl' => 'product',
						'task' => 'manage',
						'icon' => 'icon-16-addproduct',
						'url' =>
hikashop_completeLink('product&task=add')
					),
					array(
						'name' => JText::_('PRODUCTS'),
						'check' =>
array('ctrl'=>'product',
'!task'=>array('add')),
						'acl' => 'product',
						'icon' => 'icon-16-product',
						'url' => hikashop_completeLink('product')
					),
					array(
						'name' => JText::_('HIKA_CATEGORIES'),
						'check' =>
array('ctrl'=>'category','filter_id'=>'product'),
						'acl' => 'category',
						'icon' => 'icon-16-category',
						'url' =>
hikashop_completeLink('category&filter_id=product')
					),
					array(
						'name' => JText::_('CHARACTERISTICS'),
						'check' => 'ctrl=characteristic',
						'acl' => 'characteristic',
						'icon' => 'icon-16-characteristic',
						'url' =>
hikashop_completeLink('characteristic')
					),
					array(
						'name' => JText::_('MANUFACTURERS'),
						'check' =>
array('ctrl'=>'category','filter_id'=>'manufacturer'),
						'acl' => 'category',
						'icon' => 'icon-16-category',
						'url' =>
hikashop_completeLink('category&filter_id=manufacturer')
					),
					array(
						'name' => JText::_('HIKA_BADGES'),
						'check'=> 'ctrl=badge',
						'acl' => 'badge',
						'icon' => 'icon-16-badge',
						'url' => hikashop_completeLink('badge')
					),
					array(
						'name' => JText::_('IMPORT'),
						'check' => 'ctrl=import',
						'acl' => 'import',
						'icon' => 'icon-16-import',
						'url' =>
hikashop_completeLink('import&task=show')
					)
				)
			),
			array(
				'name' => JText::_('CUSTOMERS'),
				'check' =>
array('ctrl'=>'user','filter_partner'=>0,
'!task'=>array('clicks')),
				'acl' => 'user',
				'icon' => 'icon-16-user',
				'url' =>
hikashop_completeLink('user&filter_partner=0'),
				'children' => array(
					array(
						'name' => JText::_('CUSTOMERS'),
						'check' =>
array('ctrl'=>'user','filter_partner'=>0,
'!task'=>array('clicks')),
						'acl' => 'user',
						'icon' => 'icon-16-user',
						'url' =>
hikashop_completeLink('user&filter_partner=0')
					),
					array(
						'name' => JText::_('VOTE'),
						'check' => 'ctrl=vote',
						'acl' => 'vote',
						'icon' => 'icon-16-vote',
						'url' => hikashop_completeLink('vote')
					),
					array(
						'name' => JText::_('HIKASHOP_CHECKOUT_CART'),
						'check' =>
array('ctrl'=>'cart','cart_type'=>'cart'),
						'acl' => 'cart',
						'icon' => 'icon-16-cart',
						'url' =>
hikashop_completeLink('cart&cart_type=cart'),
						'display' => hikashop_level(1) &&
$config->get('enable_multicart', 1)
					),
					array(
						'name' => JText::_('WISHLISTS'),
						'check' =>
array('ctrl'=>'cart','cart_type'=>'wishlist'),
						'acl' => 'cart',
						'icon' => 'icon-16-wishlist',
						'url' =>
hikashop_completeLink('cart&cart_type=wishlist'),
						'display' => hikashop_level(1) &&
$config->get('enable_wishlist', 0)
					),
					array(
						'name' => JText::_('HIKA_WAITLIST'),
						'check' =>
array('ctrl'=>'waitlist'),
						'acl' => 'waitlist',
						'icon' => 'icon-16-wishlist',
						'url' => hikashop_completeLink('waitlist'),
						'display' => hikashop_level(1) &&
$config->get('product_waitlist', 1)
					)
				)
			),
			array(
				'name' => JText::_('ORDERS'),
				'check' =>
array('ctrl'=>'order','filter_partner'=>0),
				'acl' => 'order',
				'icon' => 'icon-16-order',
				'url' =>
hikashop_completeLink('order&order_type=sale&filter_partner=0'),
				'children' => array(
					array(
						'name' => JText::_('ORDERS'),
						'check' =>
array('ctrl'=>'order','filter_partner'=>0),
						'acl' => 'order',
						'icon' => 'icon-16-order',
						'url' =>
hikashop_completeLink('order&order_type=sale&filter_partner=0')
					),
					array(
						'name' => JText::_('DISCOUNTS'),
						'check' => 'ctrl=discount',
						'acl' => 'discount',
						'icon' => 'icon-16-discount',
						'url' => hikashop_completeLink('discount')
					),
					array(
						'name' => JText::_('HIKASHOP_ENTRIES'),
						'check' => 'ctrl=entry',
						'acl' => 'entry',
						'icon' => 'icon-16-article',
						'url' => hikashop_completeLink('entry'),
						'display' => hikashop_level(2)
					),
					array(
						'name' => JText::_('HIKASHOP_REPORTS'),
						'check' => 'ctrl=report',
						'acl' => 'report',
						'icon' => 'icon-16-report',
						'url' => hikashop_completeLink('report'),
						'display' => hikashop_level(1)
					)
				)
			),
			array(
				'name' => JText::_('AFFILIATES'),
				'check' =>
array('ctrl'=>'user','filter_partner'=>'1'),
				'acl' => 'user',
				'icon' => 'icon-16-affiliate',
				'url' =>
hikashop_completeLink('user&filter_partner=1'),
				'display' => (!empty($plugin) &&
hikashop_level(2)),
				'children' => array(
					array(
						'name' => JText::_('PARTNERS'),
						'check' =>
array('ctrl'=>'user','filter_partner'=>'1'),
						'acl' => 'user',
						'icon' => 'icon-16-affiliate',
						'url' =>
hikashop_completeLink('user&filter_partner=1')
					),
					array(
						'name' => JText::_('HIKA_BANNERS'),
						'check' => 'ctrl=banner',
						'acl' => 'banner',
						'icon' => 'icon-16-banner',
						'url' => hikashop_completeLink('banner')
					),
					array(
						'name' => JText::_('AFFILIATES_SALES'),
						'check' =>
array('ctrl'=>'order','filter_partner'=>'1'),
						'acl' => 'order',
						'icon' => 'icon-16-order',
						'url' =>
hikashop_completeLink('order&order_type=sale&filter_partner=1')
					),
					array(
						'name' => JText::_('CLICKS'),
						'check' => array('ctrl'=>'user',
'task'=>'clicks'),
						'acl' => 'order',
						'icon' => 'icon-16-click',
						'url' =>
hikashop_completeLink('user&task=clicks')
					)
				)
			),
			array(
				'name' => JText::_('DISPLAY'),
				'check' => 'ctrl=view',
				'acl' => 'view',
				'icon' => 'icon-16-views',
				'url' => hikashop_completeLink('view'),
				'children' => array(
					array(
						'name' => JText::_('VIEWS'),
						'check' => 'ctrl=view',
						'acl' => 'view',
						'icon' => 'icon-16-views',
						'url' => hikashop_completeLink('view')
					),
					array(
						'name' => JText::_('CONTENT_MENUS'),
						'check' => 'ctrl=menus',
						'acl' => 'menus',
						'icon' => 'icon-16-menu',
						'url' => hikashop_completeLink('menus')
					),
					array(
						'name' => JText::_('CONTENT_MODULES'),
						'check' => 'ctrl=modules',
						'acl' => 'modules',
						'icon' => 'icon-16-module',
						'url' => hikashop_completeLink('modules')
					),
					array(
						'name' => JText::_('FIELDS'),
						'check' => 'ctrl=field',
						'acl' => 'field',
						'icon' => 'icon-16-field',
						'url' => hikashop_completeLink('field')
					),
					array(
						'name' => JText::_('FILTERS'),
						'check' => 'ctrl=filter',
						'acl' => 'filter',
						'icon' => 'icon-16-filter',
						'url' => hikashop_completeLink('filter'),
						'display' => hikashop_level(2)
					)
				)
			),
			array(
				'name' => JText::_('DOCUMENTATION'),
				'check' => 'ctrl=documentation',
				'acl' => 'documentation',
				'icon' => 'icon-16-help',
				'url' =>
hikashop_completeLink('documentation'),
				'children' => array(
					array(
						'name' => JText::_('DOCUMENTATION'),
						'check' => 'ctrl=documentation',
						'acl' => 'documentation',
						'icon' => 'icon-16-help',
						'url' =>
hikashop_completeLink('documentation')
					),
					array(
						'name' => JText::_('UPDATE_ABOUT'),
						'check' => 'ctrl=update',
						'acl' => 'update_about',
						'icon' => 'icon-16-install',
						'url' => hikashop_completeLink('update')
					),
					array(
						'name' => JText::_('FORUM'),
						'options' => 'target="_blank"',
						'acl' => 'forum',
						'icon' => 'icon-16-info',
						'url' => HIKASHOP_URL.'support/forum.html'
					)
				)
			)
		);

		$this->_checkActive($menus);
		$this->assignRef('menus',$menus);

		parent::display($tpl);
	}

	function _checkActive(&$menus, $level = 0){
		if($level >= 2)
			return;

		if(empty($this->request)) {
			$this->request = array();
			$this->request['option'] =
JRequest::getCmd('option', HIKASHOP_COMPONENT);
			$this->request['ctrl'] = JRequest::getCmd('ctrl',
null);
			$this->request['task'] = JRequest::getCmd('task',
null);
		}

		foreach($menus as $k => $menu) {
			if(!empty($menu['check'])) {
				if(is_array($menu['check'])) {
					$active = true;
					if(!isset($menu['check']['option'])) {
						$menu['check']['option'] = HIKASHOP_COMPONENT;
					}
					foreach($menu['check'] as $key => $value) {
						$invert = false;
						if(substr($key, 0, 1) == '!') {
							$key = substr($key,1);
							$invert = true;
						}

						if(!isset($this->request[$key])) {
							$this->request[$key] = JRequest::getCmd($key, null);
						}

						if($value === 0 && empty($this->request[$key])) {
							continue;
						}
						if($invert) {
							if(is_array($value)) {
								$active = !in_array($this->request[$key], $value);
							} else {
								$active = ($this->request[$key] != $value);
							}
						} else {
							$active = ($this->request[$key] == $value);
						}
						if(!$active)
							break;
					}
					if($active) {
						$menus[$k]['active'] = true;
					}
				} else {
					if(strpos($menu['check'], 'option=') === false) {
						if($this->request['option'] == HIKASHOP_COMPONENT
&& strpos(@$_SERVER['QUERY_STRING'],
$menu['check']) !== false) {
							$menus[$k]['active'] = true;
						}
					} elseif(strpos(@$_SERVER['QUERY_STRING'],
$menu['check']) !== false) {
						$menus[$k]['active'] = true;
					}
				}
			}
			if(isset($menu['display']) &&
!$menu['display']) {
				unset($menus[$k]);
				continue;
			}
			if(!empty($menu['children'])) {
				$this->_checkActive($menus[$k]['children'], $level+1);
			}
		}
	}
}
menu/view.xml.php000064400000006641151156304170010004 0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_menus
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */
defined('_JEXEC') or die;

use Joomla\CMS\Menu\MenuHelper;

/**
 * The HTML Menus Menu Item View.
 *
 * @since  3.8.0
 */
class MenusViewMenu extends JViewLegacy
{
	/**
	 * @var  stdClass[]
	 *
	 * @since  3.8.0
	 */
	protected $items;

	/**
	 * @var  JObject
	 *
	 * @since  3.8.0
	 */
	protected $state;

	/**
	 * Display the view
	 *
	 * @param   string  $tpl  The name of the template file to parse;
automatically searches through the template paths.
	 *
	 * @return  void
	 *
	 * @since   3.8.0
	 */
	public function display($tpl = null)
	{
		$app      = JFactory::getApplication();
		$menutype = $app->input->getCmd('menutype');

		if ($menutype)
		{
			$items = MenusHelper::getMenuItems($menutype, true);
		}

		if (empty($items))
		{
			JLog::add(JText::_('COM_MENUS_SELECT_MENU_FIRST_EXPORT'),
JLog::WARNING, 'jerror');

			$app->redirect(JRoute::_('index.php?option=com_menus&view=menus',
false));

			return;
		}

		$this->items = MenuHelper::createLevels($items);

		$xml = new SimpleXMLElement('<menu ' .
			'xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
' .
			'xmlns="urn:joomla.org"	xsi:schemaLocation="urn:joomla.org
menu.xsd"' .
			'></menu>'
		);

		foreach ($this->items as $item)
		{
			$this->addXmlChild($xml, $item);
		}

		if (headers_sent($file, $line))
		{
			JLog::add("Headers already sent at $file:$line.", JLog::ERROR,
'jerror');

			return;
		}

		header('content-type: application/xml');
		header('content-disposition: attachment; filename="' .
$menutype . '.xml"');
		header("Cache-Control: no-cache, must-revalidate");
		header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
		header('Pragma: private');

		$dom = new DOMDocument;
		$dom->preserveWhiteSpace = true;
		$dom->formatOutput = true;
		$dom->loadXML($xml->asXML());

		echo $dom->saveXML();

		$app->close();
	}

	/**
	 * Add a child node to the xml
	 *
	 * @param   SimpleXMLElement  $xml   The current XML node which would
become the parent to the new node
	 * @param   stdClass          $item  The menuitem object to create the
child XML node from
	 *
	 * @return  void
	 *
	 * @since   3.8.0
	 */
	protected function addXmlChild($xml, $item)
	{
		$node = $xml->addChild('menuitem');

		$node['type'] = $item->type;

		if ($item->title)
		{
			$node['title'] = $item->title;
		}

		if ($item->link)
		{
			$node['link'] = $item->link;
		}

		if ($item->element)
		{
			$node['element'] = $item->element;
		}

		if ($item->class)
		{
			$node['class'] = $item->class;
		}

		if ($item->access)
		{
			$node['access'] = $item->access;
		}

		if ($item->browserNav)
		{
			$node['target'] = '_blank';
		}

		if (count($item->params))
		{
			$hideitems = $item->params->get('hideitems');

			if (count($hideitems))
			{
				$db    = JFactory::getDbo();
				$query = $db->getQuery(true);

				$query->select('e.element')->from('#__extensions
e')
					->join('inner', '#__menu m ON m.component_id =
e.extension_id')
					->where('m.id IN (' . implode(', ',
$db->quote($hideitems)) . ')');

				$hideitems = $db->setQuery($query)->loadColumn();

				$item->params->set('hideitems', $hideitems);
			}

			$node->addChild('params', (string) $item->params);
		}

		foreach ($item->submenu as $sub)
		{
			$this->addXmlChild($node, $sub);
		}
	}
}
menus/tmpl/default.php000064400000026746151156304170011026 0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_menus
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

// Include the component HTML helpers.
JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html');

JHtml::_('bootstrap.tooltip');
JHtml::_('behavior.multiselect');
JHtml::_('formbehavior.chosen', 'select');

$uri       = JUri::getInstance();
$return    = base64_encode($uri);
$user      = JFactory::getUser();
$listOrder =
$this->escape($this->state->get('list.ordering'));
$listDirn  =
$this->escape($this->state->get('list.direction'));
$modMenuId = (int) $this->get('ModMenuId');

$script = array();
$script[] = 'jQuery(document).ready(function() {';

foreach ($this->items as $item) :
	if ($user->authorise('core.edit', 'com_menus')) :
		$script[] = '	function jSelectPosition_' . $item->id .
'(name) {';
		$script[] = '		document.getElementById("' . $item->id .
'").value = name;';
		$script[] =
'		jQuery(".modal").modal("hide");';
		$script[] = '	};';
	endif;
endforeach;

$script[] = '	jQuery(".modal").on("hidden",
function () {';
$script[] = '		setTimeout(function(){';
$script[] = '			window.parent.location.reload();';
$script[] = '		},1000);';
$script[] = '	});';
$script[] = '});';
$script[] = '
	(function (originalFn) {
		Joomla.submitform = function(task, form) {
		 	originalFn(task, form);
		 	if (task == "menu.exportXml") {
		 		document.adminForm.task.value = "";
		 	}
		};
	})(Joomla.submitform);
';

JFactory::getDocument()->addScriptDeclaration(implode("\n",
$script));
?>
<form action="<?php echo
JRoute::_('index.php?option=com_menus&view=menus');
?>" method="post" name="adminForm"
id="adminForm">
<?php if (!empty( $this->sidebar)) : ?>
	<div id="j-sidebar-container" class="span2">
		<?php echo $this->sidebar; ?>
	</div>
	<div id="j-main-container" class="span10">
<?php else : ?>
	<div id="j-main-container">
<?php endif; ?>
		<?php echo
JLayoutHelper::render('joomla.searchtools.default',
array('view' => $this, 'options' =>
array('filterButton' => false))); ?>
		<div class="clearfix"> </div>
		<?php if (empty($this->items)) : ?>
			<div class="alert alert-no-items">
				<?php echo JText::_('JGLOBAL_NO_MATCHING_RESULTS'); ?>
			</div>
		<?php else : ?>
			<table class="table table-striped"
id="menuList">
				<thead>
					<tr>
						<th width="1%">
							<?php echo JHtml::_('grid.checkall'); ?>
						</th>
						<th>
							<?php echo JHtml::_('searchtools.sort',
'JGLOBAL_TITLE', 'a.title', $listDirn, $listOrder);
?>
						</th>
						<th width="10%" class="nowrap center">
							<span class="icon-publish"
aria-hidden="true"></span>
							<span class="hidden-phone"><?php echo
JText::_('COM_MENUS_HEADING_PUBLISHED_ITEMS'); ?></span>
						</th>
						<th width="10%" class="nowrap center">
							<span class="icon-unpublish"
aria-hidden="true"></span>
							<span class="hidden-phone"><?php echo
JText::_('COM_MENUS_HEADING_UNPUBLISHED_ITEMS');
?></span>
						</th>
						<th width="10%" class="nowrap center">
							<span class="icon-trash"
aria-hidden="true"></span>
							<span class="hidden-phone"><?php echo
JText::_('COM_MENUS_HEADING_TRASHED_ITEMS'); ?></span>
						</th>
						<th width="20%" class="nowrap center">
							<span class="icon-cube"
aria-hidden="true"></span>
							<span class="hidden-phone"><?php echo
JText::_('COM_MENUS_HEADING_LINKED_MODULES'); ?></span>
						</th>
						<th width="1%" class="nowrap hidden-phone">
							<?php echo JHtml::_('searchtools.sort',
'JGRID_HEADING_ID', 'a.id', $listDirn, $listOrder);
?>
						</th>
					</tr>
				</thead>
				<tfoot>
					<tr>
						<td colspan="15">
							<?php echo $this->pagination->getListFooter(); ?>
						</td>
					</tr>
				</tfoot>
				<tbody>
				<?php foreach ($this->items as $i => $item) :
					$canEdit        = $user->authorise('core.edit',  
'com_menus.menu.' . (int) $item->id);
					$canManageItems = $user->authorise('core.manage',
'com_menus.menu.' . (int) $item->id);
				?>
					<tr class="row<?php echo $i % 2; ?>">
						<td class="center">
							<?php echo JHtml::_('grid.id', $i, $item->id); ?>
						</td>
						<td>
							<?php if ($canManageItems) : ?>
							<a href="<?php echo
JRoute::_('index.php?option=com_menus&view=items&menutype='
. $item->menutype); ?>">
								<?php echo $this->escape($item->title); ?></a>
							<?php else : ?>
								<?php echo $this->escape($item->title); ?>
							<?php endif; ?>
							<div class="small">
								<?php echo JText::_('COM_MENUS_MENU_MENUTYPE_LABEL');
?>:
								<?php if ($canEdit) : ?>
									<a href="<?php echo
JRoute::_('index.php?option=com_menus&task=menu.edit&id='
. $item->id); ?>" title="<?php echo
$this->escape($item->description); ?>">
									<?php echo $this->escape($item->menutype);
?></a>
								<?php else : ?>
									<?php echo $this->escape($item->menutype); ?>
								<?php endif; ?>
							</div>
						</td>
						<td class="center btns">
							<?php if ($canManageItems) : ?>
								<a class="badge<?php if ($item->count_published >
0) echo ' badge-success'; ?>" href="<?php echo
JRoute::_('index.php?option=com_menus&view=items&menutype='
. $item->menutype . '&filter[published]=1');
?>">
									<?php echo $item->count_published; ?></a>
							<?php else : ?>
								<span class="badge<?php if ($item->count_published
> 0) echo ' badge-success'; ?>">
									<?php echo $item->count_published; ?></span>
							<?php endif; ?>
						</td>
						<td class="center btns">
							<?php if ($canManageItems) : ?>
								<a class="badge<?php if ($item->count_unpublished
> 0) echo ' badge-important'; ?>" href="<?php
echo
JRoute::_('index.php?option=com_menus&view=items&menutype='
. $item->menutype . '&filter[published]=0');
?>">
									<?php echo $item->count_unpublished; ?></a>
							<?php else : ?>
								<span class="badge<?php if ($item->count_unpublished
> 0) echo ' badge-important'; ?>">
									<?php echo $item->count_unpublished; ?></span>
							<?php endif; ?>
						</td>
						<td class="center btns">
							<?php if ($canManageItems) : ?>
								<a class="badge<?php if ($item->count_trashed > 0)
echo ' badge-inverse'; ?>" href="<?php echo
JRoute::_('index.php?option=com_menus&view=items&menutype='
. $item->menutype . '&filter[published]=-2');
?>">
									<?php echo $item->count_trashed; ?></a>
							<?php else : ?>
								<span class="badge<?php if ($item->count_trashed >
0) echo ' badge-inverse'; ?>">
									<?php echo $item->count_trashed; ?></span>
							<?php endif; ?>
						</td>
						<td class="center">
							<?php if (isset($this->modules[$item->menutype])) : ?>
								<div class="btn-group">
									<button type="button" class="btn btn-small
dropdown-toggle" data-toggle="dropdown">
										<?php echo JText::_('COM_MENUS_MODULES'); ?>
										<span class="caret"></span>
									</button>
									<ul class="dropdown-menu dropdown-reverse">
										<?php foreach ($this->modules[$item->menutype] as
&$module) : ?>
											<li>
												<?php if ($user->authorise('core.edit',
'com_modules.module.' . (int) $module->id)) : ?>
													<?php $link =
JRoute::_('index.php?option=com_modules&task=module.edit&id='
. $module->id . '&return=' . $return .
'&tmpl=component&layout=modal'); ?>
													<a role="button" href="#moduleEdit<?php
echo $module->id; ?>Modal" class="button"
data-toggle="modal" title="<?php echo
JText::_('COM_MENUS_EDIT_MODULE_SETTINGS'); ?>">
														<?php echo
JText::sprintf('COM_MENUS_MODULE_ACCESS_POSITION',
$this->escape($module->title),
$this->escape($module->access_title),
$this->escape($module->position)); ?></a>
												<?php else : ?>
													<a href="#" class="disabled"
disabled="disabled">
														<?php echo
JText::sprintf('COM_MENUS_MODULE_ACCESS_POSITION',
$this->escape($module->title),
$this->escape($module->access_title),
$this->escape($module->position)); ?></a>
												<?php endif; ?>
											</li>
										<?php endforeach; ?>
									</ul>
								 </div>
								<?php foreach ($this->modules[$item->menutype] as
&$module) : ?>
									<?php if ($user->authorise('core.edit',
'com_modules.module.' . (int) $module->id)) : ?>
										<?php $link =
JRoute::_('index.php?option=com_modules&task=module.edit&id='
. $module->id . '&return=' . $return .
'&tmpl=component&layout=modal'); ?>
										<?php echo JHtml::_(
												'bootstrap.renderModal',
												'moduleEdit' . $module->id . 'Modal',
												array(
													'title'       =>
JText::_('COM_MENUS_EDIT_MODULE_SETTINGS'),
													'backdrop'    => 'static',
													'keyboard'    => false,
													'closeButton' => false,
													'url'         => $link,
													'height'      => '400px',
													'width'       => '800px',
													'bodyHeight'  => '70',
													'modalWidth'  => '80',
													'footer'      => '<button
type="button" class="btn"
data-dismiss="modal"'
															. ' onclick="jQuery(\'#moduleEdit' .
$module->id . 'Modal
iframe\').contents().find(\'#closeBtn\').click();">'
															. JText::_('JLIB_HTML_BEHAVIOR_CLOSE') .
'</button>'
															. '<button type="button" class="btn
btn-primary"'
															. ' onclick="jQuery(\'#moduleEdit' .
$module->id . 'Modal
iframe\').contents().find(\'#saveBtn\').click();">'
															. JText::_('JSAVE') . '</button>'
															. '<button type="button" class="btn
btn-success"'
															. ' onclick="jQuery(\'#moduleEdit' .
$module->id . 'Modal
iframe\').contents().find(\'#applyBtn\').click();">'
															. JText::_('JAPPLY') .
'</button>',
												)
											); ?>
									<?php endif; ?>
								<?php endforeach; ?>
							<?php elseif ($modMenuId) : ?>
								<?php $link =
JRoute::_('index.php?option=com_modules&task=module.add&eid='
. $modMenuId . '&params[menutype]=' . $item->menutype .
'&tmpl=component&layout=modal'); ?>
								<button type="button" class="btn btn-small
btn-primary" data-toggle="modal"
data-target="#moduleAddModal"><?php echo
JText::_('COM_MENUS_ADD_MENU_MODULE'); ?></button>
								<?php echo JHtml::_(
										'bootstrap.renderModal',
										'moduleAddModal',
										array(
											'title'       =>
JText::_('COM_MENUS_ADD_MENU_MODULE'),
											'backdrop'    => 'static',
											'keyboard'    => false,
											'closeButton' => false,
											'url'         => $link,
											'height'      => '400px',
											'width'       => '800px',
											'bodyHeight'  => '70',
											'modalWidth'  => '80',
											'footer'      => '<button
type="button" class="btn"
data-dismiss="modal"'
													. ' onclick="jQuery(\'#moduleAddModal
iframe\').contents().find(\'#closeBtn\').click();">'
													. JText::_('JLIB_HTML_BEHAVIOR_CLOSE') .
'</button>'
													. '<button type="button" class="btn
btn-primary"'
													. ' onclick="jQuery(\'#moduleAddModal
iframe\').contents().find(\'#saveBtn\').click();">'
													. JText::_('JSAVE') . '</button>'
													. '<button type="button" class="btn
btn-success"'
													. ' onclick="jQuery(\'#moduleAddModal
iframe\').contents().find(\'#applyBtn\').click();">'
													. JText::_('JAPPLY') . '</button>',
										)
									); ?>
							<?php endif; ?>
						</td>
						<td class="hidden-phone">
							<?php echo $item->id; ?>
						</td>
					</tr>
					<?php endforeach; ?>
				</tbody>
			</table>
		<?php endif; ?>

		<input type="hidden" name="task"
value="" />
		<input type="hidden" name="boxchecked"
value="0" />
		<?php echo JHtml::_('form.token'); ?>
	</div>
</form>
menus/tmpl/default.xml000064400000000310151156304170011012 0ustar00<?xml
version="1.0" encoding="utf-8"?>
<metadata>
	<layout title="COM_MENUS_MENUS_VIEW_DEFAULT_TITLE">
		<message>
			<![CDATA[COM_MENUS_MENUS_VIEW_DEFAULT_DESC]]>
		</message>
	</layout>
</metadata>
menus/view.html.php000064400000032172151156304170010331 0ustar00<?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 MenusViewMenus extends hikashopView{
	var $ctrl= 'menus';
	var $nameListing = 'MENUS';
	var $nameForm = 'MENU';
	var $icon = 'menu';
	function display($tpl = null,$params=null){
		$this->paramBase =
HIKASHOP_COMPONENT.'.'.$this->getName();
		$function = $this->getLayout();
		if(method_exists($this,$function)) $this->$function($params);
		parent::display($tpl);
	}

	function _loadCategory(&$element){
		if(empty($element)) $element = new stdClass();
		if(!isset($element->hikashop_params)) $element->hikashop_params =
array();
		if(empty($element->hikashop_params['selectparentlisting'])){
			$db 	= JFactory::getDBO();
			$query = 'SELECT category_id FROM
'.hikashop_table('category').' WHERE
category_type=\'root\' AND category_parent_id=0 LIMIT 1';
			$db->setQuery($query);
			$root = $db->loadResult();
			$query = 'SELECT category_id FROM
'.hikashop_table('category').' WHERE
category_type=\'product\' AND
category_parent_id='.$root.' LIMIT 1';
			$db->setQuery($query);
			$element->hikashop_params['selectparentlisting'] =
$db->loadResult();
		}
		if(!empty($element->hikashop_params['selectparentlisting'])){
			$class=hikashop_get('class.category');
			$element->category =
$class->get($element->hikashop_params['selectparentlisting']);
		}
	}

	function _assignTypes(){
		$js = "
		var old_value_layout = '';
		var old_value_content = '';
		function switchPanel(name,options,type){
			var len = options.length;
			if(type=='layout'){
				if(name=='table'){
					el4 = document.getElementById('content_select');
					if(el4 && (el4.value=='category' ||
el4.value=='manufacturer')){
						el5 = document.getElementById('layout_select');
						el5.value = old_value_layout;
						alert('".JText::_('CATEGORY_CONTENT_DOES_NOT_SUPPORT_TABLE_LAYOUT',true)."');
						return;
					}
				}
				el3 = document.getElementById('number_of_columns');
				if(el3){
					if(name=='table'){
						el3.style.display='none';
					}else{
						el3.style.display='';
					}
				}
			}else if(type=='content'){
				if(name=='manufacturer'){
					name = 'category';
				}
				if(name=='category'){
					el4 = document.getElementById('layout_select');
					if(el4 && el4.value=='table'){
						el5 = document.getElementById('content_select');
						el5.value = old_value_content;
						alert('".JText::_('CATEGORY_CONTENT_DOES_NOT_SUPPORT_TABLE_LAYOUT',true)."');
						return;
					}
				}
			}
			for (var i = 0; i < len; i++){
				var el = document.getElementById(type+'_'+options[i]);
				if(el) el.style.display='none';
			}
			if(type=='layout'){
				old_value_layout = name;
			}else{
				old_value_content = name;
			}
			var el2 = document.getElementById(type+'_'+name);
			if(el2) el2.style.display='block';
		}
		function switchDisplay(value,name,activevalue){
			var el = document.getElementById(name);
			if(el){
				if(value==activevalue){
					el.style.display='';
				}else{
					el.style.display='none';
				}
			}
		}
		";
		$document= JFactory::getDocument();
		$document->addScriptDeclaration($js);
		JHTML::_('behavior.modal');
		$colorType = hikashop_get('type.color');
		$this->assignRef('colorType',$colorType);
		$listType = hikashop_get('type.list');
		$this->assignRef('listType',$listType);
		$contentType = hikashop_get('type.content');
		$this->assignRef('contentType',$contentType);
		$layoutType = hikashop_get('type.layout');
		$this->assignRef('layoutType',$layoutType);
		$orderdirType = hikashop_get('type.orderdir');
		$this->assignRef('orderdirType',$orderdirType);
		$orderType = hikashop_get('type.order');
		$this->assignRef('orderType',$orderType);
		$itemType = hikashop_get('type.item');
		$this->assignRef('itemType',$itemType);
		$childdisplayType = hikashop_get('type.childdisplay');
		$this->assignRef('childdisplayType',$childdisplayType);
		$pricetaxType = hikashop_get('type.pricetax');
		$this->assignRef('pricetaxType',$pricetaxType);
		$priceDisplayType = hikashop_get('type.pricedisplay');
		$this->assignRef('priceDisplayType',$priceDisplayType);
		$discountDisplayType = hikashop_get('type.discount_display');
		$this->assignRef('discountDisplayType',$discountDisplayType);
		$transition_effectType =
hikashop_get('type.transition_effect');
		$this->assignRef('transition_effectType',$transition_effectType);
		$popup = hikashop_get('helper.popup');
		$this->assignRef('popup',$popup);
		$this->toolbar = array(
			'save',
			'apply',
			'cancel',
			'|',
			array('name' => 'pophelp', 'target'
=> $this->ctrl.'-form')
		);
		if(!empty($this->toolbarJoomlaMenu)){
			array_unshift($this->toolbar,'|');
			array_unshift($this->toolbar,$this->toolbarJoomlaMenu);
		}
	}

	function form(){
		$cid = hikashop_getCID('id');
		if(empty($cid)){
			$element = new stdClass();
			$config = hikashop_config();
			$element->hikashop_params =
$config->get('default_params');
			$task='add';
			$control = 'config[menu_0]';
			$element->hikashop_params['link_to_product_page'] =
'1';
			$element->hikashop_params['border_visible']= true;

			$element->hikashop_params['layout_type'] =
'inherit';
			$element->hikashop_params['columns'] = '';
			$element->hikashop_params['limit'] = '';
			$element->hikashop_params['random'] = '-1';
			$element->hikashop_params['order_dir'] =
'inherit';
			$element->hikashop_params['filter_type'] = 2;
			$element->hikashop_params['product_order'] =
'inherit';
			$element->hikashop_params['recently_viewed'] =
'-1';
			$element->hikashop_params['add_to_cart'] = '-1';
			$element->hikashop_params['add_to_wishlist'] =
'-1';
			$element->hikashop_params['link_to_product_page'] =
'-1';
			$element->hikashop_params['show_vote_product'] =
'-1';
			$element->hikashop_params['show_price'] = '-1';
			$element->hikashop_params['price_with_tax'] = 3;
			$element->hikashop_params['show_original_price'] =
'-1';
			$element->hikashop_params['show_discount'] = 3;
			$element->hikashop_params['price_display_type'] =
'inherit';
			$element->hikashop_params['display_custom_item_fields'] =
'-1';
			$element->hikashop_params['display_badges'] =
'-1';
			$element->hikashop_params['category_order'] =
'inherit';
			$element->hikashop_params['child_display_type'] =
'inherit';
			$element->hikashop_params['child_limit'] = '';
			$element->hikashop_params['number_of_products'] =
'-1';
			$element->hikashop_params['only_if_products'] =
'-1';
			$element->hikashop_params['div_item_layout_type'] =
'inherit';
			$element->hikashop_params['background_color'] =
'';
			$element->hikashop_params['margin'] = '';
			$element->hikashop_params['border_visible'] =
'-1';
			$element->hikashop_params['rounded_corners'] =
'-1';
			$element->hikashop_params['text_center'] = '-1';
			$element->hikashop_params['ul_class_name'] = '';

		}else{
			$modulesClass = hikashop_get('class.menus');
			$element = $modulesClass->get($cid);
			$task='edit';
			$config = hikashop_config();
			$control = 'config[menu_'.$cid.']';
			if(strpos($element->link,'view=product')!==false){
				$element->hikashop_params['content_type'] =
'product';
			}elseif(empty($element->hikashop_params['content_type']) ||
!in_array($element->hikashop_params['content_type'],array('manufacturer','category'))){
				$element->hikashop_params['content_type'] =
'category';
			}
			$element->content_type =
$element->hikashop_params['content_type'];

			if(!isset($element->hikashop_params['link_to_product_page'])){
				$element->hikashop_params['link_to_product_page'] =
'1';
			}
		}
		if(!isset($element->hikashop_params['layout_type'])){
			$element->hikashop_params['layout_type'] =
'div';
		}
		hikashop_setTitle(JText::_($this->nameForm),$this->icon,$this->ctrl.'&task='.$task.'&cid[]='.$cid);
		$this->_loadCategory($element);
		if(!empty($cid)){
			if(!HIKASHOP_J16){
				$url =
JRoute::_('index.php?option=com_menus&task=edit&cid[]='.$element->id);
			}else{
				$url =
JRoute::_('index.php?option=com_menus&task=item.edit&id='.$element->id);
			}
			$this->toolbarJoomlaMenu =
array('name'=>'link','icon'=>'upload','alt'=>
JText::_('JOOMLA_MENU_OPTIONS'),'url'=>$url);
		}
		$js="
		function setVisibleLayoutEffect(value){
			if(value==\"slider_vertical\" ||
value==\"slider_horizontal\"){
				document.getElementById('product_effect').style.display =
'';
				document.getElementById('product_effect_duration').style.display
= '';
			}else if(value==\"fade\"){
				document.getElementById('product_effect').style.display =
'none';
				document.getElementById('product_effect_duration').style.display
= '';
			}else if(value==\"img_pane\"){
				document.getElementById('product_effect').style.display =
'none';
				document.getElementById('product_effect_duration').style.display
= 'none';
			}else{
				document.getElementById('product_effect').style.display =
'none';
				document.getElementById('product_effect_duration').style.display
= 'none';
			}
		}";
		$doc = JFactory::getDocument();
	 	$doc->addScriptDeclaration($js);
		$this->assignRef('element',$element);
		$this->assignRef('control',$control);
		$this->_assignTypes();
	}

	function listing(){
		$app = JFactory::getApplication();
		$pageInfo = new stdClass();
		$pageInfo->filter = new stdClass();
		$pageInfo->filter->order = new stdClass();
		$pageInfo->limit = new stdClass();
		$pageInfo->search = $app->getUserStateFromRequest(
$this->paramBase.".search", 'search', '',
'string' );
		$pageInfo->filter->order->value =
$app->getUserStateFromRequest(
$this->paramBase.".filter_order",
'filter_order',	'id','cmd' );
		$pageInfo->filter->order->dir	=
$app->getUserStateFromRequest(
$this->paramBase.".filter_order_Dir",
'filter_order_Dir',	'desc',	'word' );
		$database	= JFactory::getDBO();
		if(version_compare(JVERSION,'1.6','<')){
			$query = 'SELECT id FROM
'.hikashop_table('components',false).' WHERE
link=\'option='.HIKASHOP_COMPONENT.'\' LIMIT 1';
			$database->setQuery($query);
			$filters =
array('(componentid='.$database->loadResult().' OR
(componentid=0 AND link LIKE
\'%option='.HIKASHOP_COMPONENT.'%\'))','type=\'component\'');
			$searchMap =
array('alias','link','name');
		}else{
			$query = 'SELECT extension_id FROM
'.hikashop_table('extensions',false).' WHERE
type=\'component\' AND
element=\''.HIKASHOP_COMPONENT.'\' LIMIT 1';
			$database->setQuery($query);
			$filters =
array('(component_id='.$database->loadResult().' OR
(component_id=0 AND link LIKE
\'%option='.HIKASHOP_COMPONENT.'%\'))','type=\'component\'','client_id=0');
			$searchMap =
array('alias','link','title');
		}
		$filters[] = 'published>-2';
		if(!empty($pageInfo->search)){
			$searchVal =
'\'%'.hikashop_getEscaped(JString::strtolower(
$pageInfo->search ),true).'%\'';
			$filters[] =  implode(" LIKE $searchVal OR
",$searchMap)." LIKE $searchVal";
		}
		$order = '';
		if(!empty($pageInfo->filter->order->value)){
			$order = ' ORDER BY
'.$pageInfo->filter->order->value.'
'.$pageInfo->filter->order->dir;
		}
		if(!empty($filters)){
			$filters = ' WHERE ('. implode(') AND
(',$filters).')';
		}else{
			$filters = '';
		}
		$query = ' FROM '.hikashop_table('menu',false).'
'.$filters.$order;
		$database->setQuery('SELECT *'.$query);
		$rows = $database->loadObjectList();
		if(!empty($pageInfo->search)){
			$rows = hikashop_search($pageInfo->search,$rows,'id');
		}
		$database->setQuery('SELECT COUNT(*)'.$query);
		$pageInfo->elements = new stdClass();
		$pageInfo->elements->total = $database->loadResult();
		$pageInfo->elements->page = count($rows);

		$toggleClass = hikashop_get('helper.toggle');
		$this->assignRef('toggleClass',$toggleClass);
		$config =& hikashop_config();
		$unset=array();
		foreach($rows as $k => $row){
			if(strpos($row->link,'view=product')!==false  &&
strpos($row->link,'layout=show')===false){
				$rows[$k]->hikashop_params =
$config->get('menu_'.$row->id);
				$rows[$k]->hikashop_params['content_type'] =
'product';
			}elseif(strpos($row->link,'view=category')!==false ||
strpos($row->link,'view=')===false){
				$rows[$k]->hikashop_params =
$config->get('menu_'.$row->id);
				$rows[$k]->hikashop_params['content_type'] =
'category';
			}else{
				$unset[]=$k;
				continue;
			}
			if(empty($rows[$k]->hikashop_params)){
				$rows[$k]->hikashop_params =
$config->get('default_params');
			}

			$rows[$k]->content_type =
$rows[$k]->hikashop_params['content_type'];
		}
		foreach($unset as $u){
			unset($rows[$u]);
		}
		$this->assignRef('rows',$rows);
		$this->assignRef('pageInfo',$pageInfo);
		hikashop_setTitle(JText::_($this->nameListing),$this->icon,$this->ctrl);
		$config =& hikashop_config();
		$manage =
hikashop_isAllowed($config->get('acl_menus_manage','all'));
		$this->assignRef('manage',$manage);
		$this->toolbar = array(
			array('name'=>'editList','display'=>$manage),
			array('name'=>'deleteList','display'=>hikashop_isAllowed($config->get('acl_menus_delete','all'))),
			'|',
			array('name' => 'pophelp', 'target'
=> $this->ctrl.'-listing'),
			'dashboard'
		);
	}
}
menutypes/tmpl/default.php000064400000003601151156304170011711
0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_menus
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

$input = JFactory::getApplication()->input;

// Checking if loaded via index.php or component.php
$tmpl = ($input->getCmd('tmpl') != '') ?
'1' : '';

JHtml::_('behavior.core');
JFactory::getDocument()->addScriptDeclaration('
		setmenutype = function(type) {
			var tmpl = ' . json_encode($tmpl) . ';
			if (tmpl)
			{
				window.parent.Joomla.submitbutton("item.setType", type);
				window.parent.jQuery("#menuTypeModal").modal("hide");
			}
			else
			{
				window.location="index.php?option=com_menus&view=item&task=item.setType&layout=edit&type="
+ type;
			}
		};
');

?>
<?php echo JHtml::_('bootstrap.startAccordion',
'collapseTypes', array('active' =>
'slide1')); ?>
	<?php $i = 0; ?>
	<?php foreach ($this->types as $name => $list) : ?>
		<?php echo JHtml::_('bootstrap.addSlide',
'collapseTypes', $name, 'collapse' . ($i++)); ?>
			<ul class="nav nav-tabs nav-stacked">
				<?php foreach ($list as $title => $item) : ?>
					<li>
						<?php $menutype = array('id' => $this->recordId,
'title' => isset($item->type) ? $item->type :
$item->title, 'request' => $item->request); ?>
						<?php $menutype = base64_encode(json_encode($menutype)); ?>
						<a class="choose_type" href="#"
title="<?php echo JText::_($item->description); ?>"
							onclick="setmenutype('<?php echo $menutype;
?>')">
							<?php echo $title;?>
							<small class="muted">
								<?php echo JText::_($item->description); ?>
							</small>
						</a>
					</li>
				<?php endforeach; ?>
			</ul>
		<?php echo JHtml::_('bootstrap.endSlide'); ?>
	<?php endforeach; ?>
<?php echo JHtml::_('bootstrap.endSlide'); ?>
<?php echo JHtml::_('bootstrap.endAccordion');
menutypes/view.html.php000064400000006347151156304170011240
0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_menus
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

/**
 * The HTML Menus Menu Item Types View.
 *
 * @since  1.6
 */
class MenusViewMenutypes extends JViewLegacy
{
	/**
	 * @var  JObject[]
	 */
	protected $types;

	/**
	 * Display the view
	 *
	 * @param   string  $tpl  The name of the template file to parse;
automatically searches through the template paths.
	 *
	 * @return  void
	 *
	 * @since   1.6
	 */
	public function display($tpl = null)
	{
		$app            = JFactory::getApplication();
		$this->recordId = $app->input->getInt('recordId');

		$types = $this->get('TypeOptions');

		$this->addCustomTypes($types);

		$sortedTypes = array();

		foreach ($types as $name => $list)
		{
			$tmp = array();

			foreach ($list as $item)
			{
				$tmp[JText::_($item->title)] = $item;
			}

			uksort($tmp, 'strcasecmp');
			$sortedTypes[JText::_($name)] = $tmp;
		}

		uksort($sortedTypes, 'strcasecmp');

		$this->types = $sortedTypes;

		$this->addToolbar();

		parent::display($tpl);
	}

	/**
	 * Add the page title and toolbar.
	 *
	 * @return  void
	 *
	 * @since   3.0
	 */
	protected function addToolbar()
	{
		// Add page title
		JToolbarHelper::title(JText::_('COM_MENUS'), 'list
menumgr');

		// Get the toolbar object instance
		$bar = JToolbar::getInstance('toolbar');

		// Cancel
		$title = JText::_('JTOOLBAR_CANCEL');
		$dhtml = "<button
onClick=\"location.href='index.php?option=com_menus&view=items'\"
class=\"btn\">
					<span class=\"icon-remove\"
title=\"$title\"></span>
					$title</button>";
		$bar->appendButton('Custom', $dhtml, 'new');
	}

	/**
	 * Method to add system link types to the link types array
	 *
	 * @param   array  $types  The list of link types
	 *
	 * @return  void
	 *
	 * @since   3.7.0
	 */
	protected function addCustomTypes(&$types)
	{
		if (empty($types))
		{
			$types = array();
		}

		// Adding System Links
		$list           = array();
		$o              = new JObject;
		$o->title       = 'COM_MENUS_TYPE_EXTERNAL_URL';
		$o->type        = 'url';
		$o->description = 'COM_MENUS_TYPE_EXTERNAL_URL_DESC';
		$o->request     = null;
		$list[]         = $o;

		$o              = new JObject;
		$o->title       = 'COM_MENUS_TYPE_ALIAS';
		$o->type        = 'alias';
		$o->description = 'COM_MENUS_TYPE_ALIAS_DESC';
		$o->request     = null;
		$list[]         = $o;

		$o              = new JObject;
		$o->title       = 'COM_MENUS_TYPE_SEPARATOR';
		$o->type        = 'separator';
		$o->description = 'COM_MENUS_TYPE_SEPARATOR_DESC';
		$o->request     = null;
		$list[]         = $o;

		$o              = new JObject;
		$o->title       = 'COM_MENUS_TYPE_HEADING';
		$o->type        = 'heading';
		$o->description = 'COM_MENUS_TYPE_HEADING_DESC';
		$o->request     = null;
		$list[]         = $o;

		if ($this->get('state')->get('client_id') == 1)
		{
			$o              = new JObject;
			$o->title       = 'COM_MENUS_TYPE_CONTAINER';
			$o->type        = 'container';
			$o->description = 'COM_MENUS_TYPE_CONTAINER_DESC';
			$o->request     = null;
			$list[]         = $o;
		}

		$types['COM_MENUS_TYPE_SYSTEM'] = $list;
	}
}
newsfeed/tmpl/edit.php000064400000010520151156460100010753 0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_newsfeeds
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

// Include the component HTML helpers.
JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html');

JHtml::_('behavior.formvalidator');
JHtml::_('behavior.keepalive');
JHtml::_('formbehavior.chosen', '#jform_catid', null,
array('disable_search_threshold' => 0 ));
JHtml::_('formbehavior.chosen', '#jform_tags', null,
array('placeholder_text_multiple' =>
JText::_('JGLOBAL_TYPE_OR_SELECT_SOME_TAGS')));
JHtml::_('formbehavior.chosen', 'select');

$app   = JFactory::getApplication();
$input = $app->input;

$assoc = JLanguageAssociations::isEnabled();

JFactory::getDocument()->addScriptDeclaration('
	Joomla.submitbutton = function(task)
	{
		if (task == "newsfeed.cancel" ||
document.formvalidator.isValid(document.getElementById("newsfeed-form")))
{
			Joomla.submitform(task,
document.getElementById("newsfeed-form"));

			// @deprecated 4.0  The following js is not needed since 3.7.0.
			if (task !== "newsfeed.apply")
			{
				window.parent.jQuery("#newsfeedEdit' . $this->item->id
. 'Modal").modal("hide");
			}
		}
	};
');

// Fieldsets to not automatically render by /layouts/joomla/edit/params.php
$this->ignore_fieldsets = array('images', 'jbasic',
'jmetadata', 'item_associations');

// In case of modal
$isModal = $input->get('layout') == 'modal' ? true :
false;
$layout  = $isModal ? 'modal' : 'edit';
$tmpl    = $isModal || $input->get('tmpl', '',
'cmd') === 'component' ?
'&tmpl=component' : '';
?>

<form action="<?php echo
JRoute::_('index.php?option=com_newsfeeds&layout=' . $layout
. $tmpl . '&id=' . (int) $this->item->id); ?>"
method="post" name="adminForm"
id="newsfeed-form" class="form-validate">

	<?php echo JLayoutHelper::render('joomla.edit.title_alias',
$this); ?>

	<div class="form-horizontal">
		<?php echo JHtml::_('bootstrap.startTabSet',
'myTab', array('active' => 'details'));
?>

		<?php echo JHtml::_('bootstrap.addTab', 'myTab',
'details', empty($this->item->id) ?
JText::_('COM_NEWSFEEDS_NEW_NEWSFEED') :
JText::_('COM_NEWSFEEDS_EDIT_NEWSFEED')); ?>
		<div class="row-fluid">
			<div class="span9">
				<div class="form-vertical">
					<?php echo $this->form->renderField('link'); ?>
					<?php echo $this->form->renderField('description');
?>
				</div>
			</div>
			<div class="span3">
				<?php echo JLayoutHelper::render('joomla.edit.global',
$this); ?>
			</div>
		</div>
		<?php echo JHtml::_('bootstrap.endTab'); ?>

		<?php echo JHtml::_('bootstrap.addTab', 'myTab',
'images', JText::_('JGLOBAL_FIELDSET_IMAGE_OPTIONS'));
?>
		<div class="row-fluid">
			<div class="span6">
					<?php echo $this->form->renderField('images');
?>
					<?php foreach ($this->form->getGroup('images') as
$field) : ?>
						<?php echo $field->renderField(); ?>
					<?php endforeach; ?>
				</div>
			</div>
		<?php echo JHtml::_('bootstrap.endTab'); ?>

		<?php echo JHtml::_('bootstrap.addTab', 'myTab',
'attrib-jbasic',
JText::_('JGLOBAL_FIELDSET_DISPLAY_OPTIONS')); ?>
		<?php echo $this->loadTemplate('display'); ?>
		<?php echo JHtml::_('bootstrap.endTab'); ?>

		<?php echo JLayoutHelper::render('joomla.edit.params',
$this); ?>

		<?php echo JHtml::_('bootstrap.addTab', 'myTab',
'publishing', JText::_('JGLOBAL_FIELDSET_PUBLISHING'));
?>
		<div class="row-fluid form-horizontal-desktop">
			<div class="span6">
				<?php echo
JLayoutHelper::render('joomla.edit.publishingdata', $this); ?>
			</div>
			<div class="span6">
				<?php echo JLayoutHelper::render('joomla.edit.metadata',
$this); ?>
			</div>
		</div>
		<?php echo JHtml::_('bootstrap.endTab'); ?>

		<?php if ( ! $isModal && $assoc) : ?>
			<?php echo JHtml::_('bootstrap.addTab', 'myTab',
'associations',
JText::_('JGLOBAL_FIELDSET_ASSOCIATIONS')); ?>
			<?php echo $this->loadTemplate('associations'); ?>
			<?php echo JHtml::_('bootstrap.endTab'); ?>
		<?php elseif ($isModal && $assoc) : ?>
			<div class="hidden"><?php echo
$this->loadTemplate('associations'); ?></div>
		<?php endif; ?>

		<?php echo JHtml::_('bootstrap.endTabSet'); ?>
	</div>
	<input type="hidden" name="task" value=""
/>
	<input type="hidden" name="forcedLanguage"
value="<?php echo $input->get('forcedLanguage',
'', 'cmd'); ?>" />
	<?php echo JHtml::_('form.token'); ?>
</form>
newsfeed/tmpl/edit_associations.php000064400000000527151156460100013540
0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_newsfeeds
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

echo JLayoutHelper::render('joomla.edit.associations', $this);
newsfeed/tmpl/edit_display.php000064400000000557151156460100012511
0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_newsfeeds
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

$this->fieldset = 'jbasic';
echo JLayoutHelper::render('joomla.edit.fieldset', $this);
newsfeed/tmpl/edit_metadata.php000064400000000523151156460100012615
0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_newsfeeds
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

echo JLayoutHelper::render('joomla.edit.metadata', $this);
newsfeed/tmpl/edit_params.php000064400000001630151156460100012320
0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_newsfeeds
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

$fieldSets = $this->form->getFieldsets('params');
foreach ($fieldSets as $name => $fieldSet) :
	?>
	<div class="tab-pane" id="params-<?php echo $name;
?>">
	<?php if (isset($fieldSet->description) &&
trim($fieldSet->description)) : ?>
		<p class="alert alert-info"><?php echo
$this->escape(JText::_($fieldSet->description)); ?></p>
	<?php endif; ?>
			<?php foreach ($this->form->getFieldset($name) as $field) :
?>
				<div class="control-group">
					<div class="control-label"><?php echo
$field->label; ?></div>
					<div class="controls"><?php echo $field->input;
?></div>
				</div>
			<?php endforeach; ?>
	</div>
<?php endforeach; ?>
newsfeed/tmpl/modal.php000064400000002570151156460100011130
0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_newsfeeds
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

JHtml::_('bootstrap.tooltip', '.hasTooltip',
array('placement' => 'bottom'));

// @deprecated 4.0 the function parameter, the inline js and the buttons
are not needed since 3.7.0.
$function  =
JFactory::getApplication()->input->getCmd('function',
'jEditNewsfeed_' . (int) $this->item->id);

// Function to update input title when changed
JFactory::getDocument()->addScriptDeclaration('
	function jEditNewsfeedModal() {
		if (window.parent &&
document.formvalidator.isValid(document.getElementById("newsfeed-form")))
{
			return window.parent.' . $this->escape($function) .
'(document.getElementById("jform_name").value);
		}
	}
');
?>
<button id="applyBtn" type="button"
class="hidden"
onclick="Joomla.submitbutton('newsfeed.apply');
jEditNewsfeedModal();"></button>
<button id="saveBtn" type="button"
class="hidden"
onclick="Joomla.submitbutton('newsfeed.save');
jEditNewsfeedModal();"></button>
<button id="closeBtn" type="button"
class="hidden"
onclick="Joomla.submitbutton('newsfeed.cancel');"></button>

<div class="container-popup">
	<?php $this->setLayout('edit'); ?>
	<?php echo $this->loadTemplate(); ?>
</div>
newsfeed/tmpl/modal_associations.php000064400000000527151156460100013707
0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_newsfeeds
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

echo JLayoutHelper::render('joomla.edit.associations', $this);
newsfeed/tmpl/modal_display.php000064400000000557151156460100012660
0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_newsfeeds
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

$this->fieldset = 'jbasic';
echo JLayoutHelper::render('joomla.edit.fieldset', $this);
newsfeed/tmpl/modal_metadata.php000064400000000523151156460100012764
0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_newsfeeds
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

echo JLayoutHelper::render('joomla.edit.metadata', $this);
newsfeed/tmpl/modal_params.php000064400000001630151156460100012467
0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_newsfeeds
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

$fieldSets = $this->form->getFieldsets('params');
foreach ($fieldSets as $name => $fieldSet) :
	?>
	<div class="tab-pane" id="params-<?php echo $name;
?>">
	<?php if (isset($fieldSet->description) &&
trim($fieldSet->description)) : ?>
		<p class="alert alert-info"><?php echo
$this->escape(JText::_($fieldSet->description)); ?></p>
	<?php endif; ?>
			<?php foreach ($this->form->getFieldset($name) as $field) :
?>
				<div class="control-group">
					<div class="control-label"><?php echo
$field->label; ?></div>
					<div class="controls"><?php echo $field->input;
?></div>
				</div>
			<?php endforeach; ?>
	</div>
<?php endforeach; ?>
newsfeed/view.html.php000064400000007654151156460100011005 0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_newsfeeds
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

/**
 * View to edit a newsfeed.
 *
 * @since  1.6
 */
class NewsfeedsViewNewsfeed extends JViewLegacy
{
	/**
	 * The item object for the newsfeed
	 *
	 * @var    JObject
	 * @since  1.6
	 */
	protected $item;

	/**
	 * The form object for the newsfeed
	 *
	 * @var    JForm
	 * @since  1.6
	 */
	protected $form;

	/**
	 * The model state of the newsfeed
	 *
	 * @var    JObject
	 * @since  1.6
	 */
	protected $state;

	/**
	 * Execute and display a template script.
	 *
	 * @param   string  $tpl  The name of the template file to parse;
automatically searches through the template paths.
	 *
	 * @return  mixed  A string if successful, otherwise an Error object.
	 *
	 * @since   1.6
	 */
	public function display($tpl = null)
	{
		$this->state = $this->get('State');
		$this->item  = $this->get('Item');
		$this->form  = $this->get('Form');

		// Check for errors.
		if (count($errors = $this->get('Errors')))
		{
			throw new Exception(implode("\n", $errors), 500);
		}

		// If we are forcing a language in modal (used for associations).
		if ($this->getLayout() === 'modal' &&
$forcedLanguage =
JFactory::getApplication()->input->get('forcedLanguage',
'', 'cmd'))
		{
			// Set the language field to the forcedLanguage and disable changing it.
			$this->form->setValue('language', null,
$forcedLanguage);
			$this->form->setFieldAttribute('language',
'readonly', 'true');

			// Only allow to select categories with All language or with the forced
language.
			$this->form->setFieldAttribute('catid',
'language', '*,' . $forcedLanguage);

			// Only allow to select tags with All language or with the forced
language.
			$this->form->setFieldAttribute('tags',
'language', '*,' . $forcedLanguage);
		}

		$this->addToolbar();
		parent::display($tpl);
	}

	/**
	 * Add the page title and toolbar.
	 *
	 * @return  void
	 *
	 * @since   1.6
	 */
	protected function addToolbar()
	{
		JFactory::getApplication()->input->set('hidemainmenu',
true);

		$user       = JFactory::getUser();
		$isNew      = ($this->item->id == 0);
		$checkedOut = !($this->item->checked_out == 0 ||
$this->item->checked_out == $user->get('id'));

		// Since we don't track these assets at the item level, use the
category id.
		$canDo = JHelperContent::getActions('com_newsfeeds',
'category', $this->item->catid);

		JToolbarHelper::title($isNew ?
JText::_('COM_NEWSFEEDS_MANAGER_NEWSFEED_NEW') :
JText::_('COM_NEWSFEEDS_MANAGER_NEWSFEED_EDIT'), 'feed
newsfeeds');

		// If not checked out, can save the item.
		if (!$checkedOut && ($canDo->get('core.edit') ||
count($user->getAuthorisedCategories('com_newsfeeds',
'core.create')) > 0))
		{
			JToolbarHelper::apply('newsfeed.apply');
			JToolbarHelper::save('newsfeed.save');
		}

		if (!$checkedOut &&
count($user->getAuthorisedCategories('com_newsfeeds',
'core.create')) > 0)
		{
			JToolbarHelper::save2new('newsfeed.save2new');
		}

		// If an existing item, can save to a copy.
		if (!$isNew && $canDo->get('core.create'))
		{
			JToolbarHelper::save2copy('newsfeed.save2copy');
		}

		if (!$isNew && JLanguageAssociations::isEnabled() &&
JComponentHelper::isEnabled('com_associations'))
		{
			JToolbarHelper::custom('newsfeed.editAssociations',
'contract', 'contract',
'JTOOLBAR_ASSOCIATIONS', false, false);
		}

		if (empty($this->item->id))
		{
			JToolbarHelper::cancel('newsfeed.cancel');
		}
		else
		{
			if (JComponentHelper::isEnabled('com_contenthistory')
&& $this->state->params->get('save_history', 0)
&& $canDo->get('core.edit'))
			{
				JToolbarHelper::versions('com_newsfeeds.newsfeed',
$this->item->id);
			}

			JToolbarHelper::cancel('newsfeed.cancel',
'JTOOLBAR_CLOSE');
		}

		JToolbarHelper::divider();
		JToolbarHelper::help('JHELP_COMPONENTS_NEWSFEEDS_FEEDS_EDIT');
	}
}
newsfeeds/tmpl/default.php000064400000020120151156460100011632
0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_newsfeeds
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

// Include the component HTML helpers.
JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html');

JHtml::_('bootstrap.tooltip');
JHtml::_('behavior.multiselect');
JHtml::_('formbehavior.chosen', 'select');

$user      = JFactory::getUser();
$listOrder =
$this->escape($this->state->get('list.ordering'));
$listDirn  =
$this->escape($this->state->get('list.direction'));
$saveOrder = $listOrder == 'a.ordering';
$assoc     = JLanguageAssociations::isEnabled();

if ($saveOrder)
{
	$saveOrderingUrl =
'index.php?option=com_newsfeeds&task=newsfeeds.saveOrderAjax&tmpl=component';
	JHtml::_('sortablelist.sortable', 'newsfeedList',
'adminForm', strtolower($listDirn), $saveOrderingUrl);
}
?>
<form action="<?php echo
JRoute::_('index.php?option=com_newsfeeds&view=newsfeeds');
?>" method="post" name="adminForm"
id="adminForm">
	<?php if (!empty( $this->sidebar)) : ?>
	<div id="j-sidebar-container" class="span2">
		<?php echo $this->sidebar; ?>
	</div>
	<div id="j-main-container" class="span10">
	<?php else : ?>
	<div id="j-main-container">
	<?php endif; ?>
		<?php echo
JLayoutHelper::render('joomla.searchtools.default',
array('view' => $this)); ?>
		<div class="clearfix"></div>
		<?php if (empty($this->items)) : ?>
			<div class="alert alert-no-items">
				<?php echo JText::_('JGLOBAL_NO_MATCHING_RESULTS'); ?>
			</div>
		<?php else : ?>
			<table class="table table-striped"
id="newsfeedList">
				<thead>
					<tr>
						<th width="1%" class="nowrap center
hidden-phone">
							<?php echo JHtml::_('searchtools.sort', '',
'a.ordering', $listDirn, $listOrder, null, 'asc',
'JGRID_HEADING_ORDERING', 'icon-menu-2'); ?>
						</th>
						<th width="1%">
							<?php echo JHtml::_('grid.checkall'); ?>
						</th>
						<th width="5%" class="nowrap center">
							<?php echo JHtml::_('searchtools.sort',
'JSTATUS', 'a.published', $listDirn, $listOrder); ?>
						</th>
						<th class="title">
							<?php echo JHtml::_('searchtools.sort',
'JGLOBAL_TITLE', 'a.name', $listDirn, $listOrder);
?>
						</th>
						<th width="5%" class="nowrap hidden-phone">
							<?php echo JHtml::_('searchtools.sort',
'JGRID_HEADING_ACCESS', 'access_level', $listDirn,
$listOrder); ?>
						</th>
						<th width="10%" class="nowrap
hidden-phone">
							<?php echo JHtml::_('searchtools.sort',
'COM_NEWSFEEDS_NUM_ARTICLES_HEADING', 'numarticles',
$listDirn, $listOrder); ?>
						</th>
						<th width="5%" class="nowrap hidden-phone
hidden-tablet">
							<?php echo JHtml::_('searchtools.sort',
'COM_NEWSFEEDS_CACHE_TIME_HEADING', 'a.cache_time',
$listDirn, $listOrder); ?>
						</th>
						<?php if ($assoc) : ?>
						<th width="5%" class="nowrap hidden-phone
hidden-tablet">
							<?php echo JHtml::_('searchtools.sort',
'COM_NEWSFEEDS_HEADING_ASSOCIATION', 'association',
$listDirn, $listOrder); ?>
						</th>
						<?php endif; ?>
						<th width="10%" class="nowrap
hidden-phone">
							<?php echo JHtml::_('searchtools.sort',
'JGRID_HEADING_LANGUAGE', 'language_title', $listDirn,
$listOrder); ?>
						</th>
						<th width="1%" class="nowrap hidden-phone">
							<?php echo JHtml::_('searchtools.sort',
'JGRID_HEADING_ID', 'a.id', $listDirn, $listOrder);
?>
						</th>
					</tr>
				</thead>
				<tfoot>
					<tr>
						<td colspan="11">
							<?php echo $this->pagination->getListFooter(); ?>
						</td>
					</tr>
				</tfoot>
				<tbody>
				<?php foreach ($this->items as $i => $item) :
					$ordering   = ($listOrder == 'a.ordering');
					$canCreate  = $user->authorise('core.create',    
'com_newsfeeds.category.' . $item->catid);
					$canEdit    = $user->authorise('core.edit',      
'com_newsfeeds.category.' . $item->catid);
					$canCheckin = $user->authorise('core.manage',    
'com_checkin') || $item->checked_out ==
$user->get('id') || $item->checked_out == 0;
					$canEditOwn = $user->authorise('core.edit.own',  
'com_newsfeeds.category.' . $item->catid) &&
$item->created_by == $user->id;
					$canChange  = $user->authorise('core.edit.state',
'com_newsfeeds.category.' . $item->catid) &&
$canCheckin;
					?>
					<tr class="row<?php echo $i % 2; ?>"
sortable-group-id="<?php echo $item->catid; ?>">
						<td class="order nowrap center hidden-phone">
							<?php
							$iconClass = '';
							if (!$canChange)
							{
								$iconClass = ' inactive';
							}
							elseif (!$saveOrder)
							{
								$iconClass = ' inactive tip-top hasTooltip"
title="' . JHtml::_('tooltipText',
'JORDERINGDISABLED');
							}
							?>
							<span class="sortable-handler<?php echo $iconClass
?>">
								<span class="icon-menu"
aria-hidden="true"></span>
							</span>
							<?php if ($canChange && $saveOrder) : ?>
								<input type="text" style="display:none"
name="order[]" size="5" value="<?php echo
$item->ordering; ?>" class="width-20 text-area-order"
/>
							<?php endif; ?>
						</td>
						<td class="center">
							<?php echo JHtml::_('grid.id', $i, $item->id); ?>
						</td>
						<td class="center">
							<div class="btn-group">
								<?php echo JHtml::_('jgrid.published',
$item->published, $i, 'newsfeeds.', $canChange,
'cb', $item->publish_up, $item->publish_down); ?>
								<?php // Create dropdown items and render the dropdown list.
								if ($canChange)
								{
									JHtml::_('actionsdropdown.' . ((int) $item->published
=== 2 ? 'un' : '') . 'archive',
'cb' . $i, 'newsfeeds');
									JHtml::_('actionsdropdown.' . ((int) $item->published
=== -2 ? 'un' : '') . 'trash', 'cb'
. $i, 'newsfeeds');
									echo JHtml::_('actionsdropdown.render',
$this->escape($item->name));
								}
								?>
							</div>
						</td>
						<td class="nowrap has-context">
							<div class="pull-left">
								<?php if ($item->checked_out) : ?>
									<?php echo JHtml::_('jgrid.checkedout', $i,
$item->editor, $item->checked_out_time, 'newsfeeds.',
$canCheckin); ?>
								<?php endif; ?>
								<?php if ($canEdit || $canEditOwn) : ?>
									<a href="<?php echo
JRoute::_('index.php?option=com_newsfeeds&task=newsfeed.edit&id='
. (int) $item->id); ?>">
										<?php echo $this->escape($item->name); ?></a>
								<?php else : ?>
										<?php echo $this->escape($item->name); ?>
								<?php endif; ?>
								<span class="small">
									<?php echo JText::sprintf('JGLOBAL_LIST_ALIAS',
$this->escape($item->alias)); ?>
								</span>
								<div class="small">
									<?php echo JText::_('JCATEGORY') . ': ' .
$this->escape($item->category_title); ?>
								</div>
							</div>
						</td>
						<td class="small hidden-phone">
							<?php echo $this->escape($item->access_level); ?>
						</td>
						<td class="hidden-phone">
							<?php echo (int) $item->numarticles; ?>
						</td>
						<td class="hidden-phone hidden-tablet">
							<?php echo (int) $item->cache_time; ?>
						</td>
						<?php if ($assoc) : ?>
						<td class="hidden-phone hidden-tablet">
							<?php if ($item->association) : ?>
								<?php echo JHtml::_('newsfeed.association',
$item->id); ?>
							<?php endif; ?>
						</td>
						<?php endif; ?>
						<td class="small hidden-phone">
							<?php echo
JLayoutHelper::render('joomla.content.language', $item); ?>
						</td>
						<td class="hidden-phone">
							<?php echo (int) $item->id; ?>
						</td>
					</tr>
					<?php endforeach; ?>
				</tbody>
			</table>
			<?php // Load the batch processing form if user is allowed ?>
			<?php if ($user->authorise('core.create',
'com_newsfeeds')
				&& $user->authorise('core.edit',
'com_newsfeeds')
				&& $user->authorise('core.edit.state',
'com_newsfeeds')) : ?>
				<?php echo JHtml::_(
					'bootstrap.renderModal',
					'collapseModal',
					array(
						'title'  =>
JText::_('COM_NEWSFEEDS_BATCH_OPTIONS'),
						'footer' =>
$this->loadTemplate('batch_footer'),
					),
					$this->loadTemplate('batch_body')
				); ?>
			<?php endif; ?>
		<?php endif; ?>
		<input type="hidden" name="task"
value="" />
		<input type="hidden" name="boxchecked"
value="0" />
		<?php echo JHtml::_('form.token'); ?>
	</div>
</form>
newsfeeds/tmpl/default_batch_body.php000064400000001766151156460100014027
0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_newsfeeds
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */
defined('_JEXEC') or die;
$published = (int) $this->state->get('filter.published');
?>

<div class="container-fluid">
	<div class="row-fluid">
		<div class="control-group span6">
			<div class="controls">
				<?php echo JHtml::_('batch.language'); ?>
			</div>
		</div>
		<div class="control-group span6">
			<div class="controls">
				<?php echo JHtml::_('batch.access'); ?>
			</div>
		</div>
	</div>
	<div class="row-fluid">
		<?php if ($published >= 0) : ?>
			<div class="control-group span6">
				<div class="controls">
					<?php echo JHtml::_('batch.item',
'com_newsfeeds'); ?>
				</div>
			</div>
		<?php endif; ?>
		<div class="control-group span6">
			<div class="controls">
				<?php echo JHtml::_('batch.tag'); ?>
			</div>
		</div>
	</div>
</div>
newsfeeds/tmpl/default_batch_footer.php000064400000001401151156460100014352
0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_newsfeeds
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */
defined('_JEXEC') or die;

?>
<button type="button" class="btn"
onclick="document.getElementById('batch-category-id').value='';document.getElementById('batch-access').value='';document.getElementById('batch-language-id').value='';document.getElementById('batch-tag-id').value=''"
data-dismiss="modal">
	<?php echo JText::_('JCANCEL'); ?>
</button>
<button type="submit" class="btn btn-success"
onclick="Joomla.submitbutton('newsfeed.batch');return
false;">
	<?php echo JText::_('JGLOBAL_BATCH_PROCESS'); ?>
</button>
newsfeeds/tmpl/modal.php000064400000011364151156460100011314
0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_newsfeeds
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

JLoader::register('NewsfeedsHelperRoute', JPATH_ROOT .
'/components/com_newsfeeds/helpers/route.php');

JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html');

JHtml::_('behavior.core');
JHtml::_('bootstrap.tooltip', '.hasTooltip',
array('placement' => 'bottom'));
JHtml::_('bootstrap.popover', '.hasPopover',
array('placement' => 'bottom'));
JHtml::_('formbehavior.chosen', 'select');

// Special case for the search field tooltip.
$searchFilterDesc =
$this->filterForm->getFieldAttribute('search',
'description', null, 'filter');
JHtml::_('bootstrap.tooltip', '#filter_search',
array('title' => JText::_($searchFilterDesc),
'placement' => 'bottom'));

$app = JFactory::getApplication();

$function  = $app->input->getCmd('function',
'jSelectNewsfeed');
$listOrder =
$this->escape($this->state->get('list.ordering'));
$listDirn  =
$this->escape($this->state->get('list.direction'));
?>
<div class="container-popup">

	<form action="<?php echo
JRoute::_('index.php?option=com_newsfeeds&view=newsfeeds&layout=modal&tmpl=component&function='
. $function); ?>" method="post"
name="adminForm" id="adminForm"
class="form-inline">

		<?php echo
JLayoutHelper::render('joomla.searchtools.default',
array('view' => $this)); ?>

		<?php if (empty($this->items)) : ?>
			<div class="alert alert-no-items">
				<?php echo JText::_('JGLOBAL_NO_MATCHING_RESULTS'); ?>
			</div>
		<?php else : ?>
			<table class="table table-striped table-condensed">
				<thead>
					<tr>
						<th width="1%" class="nowrap center">
							<?php echo JHtml::_('searchtools.sort',
'JSTATUS', 'a.published', $listDirn, $listOrder); ?>
						</th>
						<th class="nowrap title">
							<?php echo JHtml::_('searchtools.sort',
'JGLOBAL_TITLE', 'a.name', $listDirn, $listOrder);
?>
						</th>
						<th width="15%" class="nowrap
hidden-phone">
							<?php echo JHtml::_('searchtools.sort',
'JGRID_HEADING_ACCESS', 'access_level', $listDirn,
$listOrder); ?>
						</th>
						<th width="15%" class="nowrap
hidden-phone">
							<?php echo JHtml::_('searchtools.sort',
'JGRID_HEADING_LANGUAGE', 'language_title', $listDirn,
$listOrder); ?>
						</th>
						<th width="1%" class="nowrap hidden-phone">
							<?php echo JHtml::_('searchtools.sort',
'JGRID_HEADING_ID', 'a.id', $listDirn, $listOrder);
?>
						</th>
					</tr>
				</thead>
				<tfoot>
					<tr>
						<td colspan="5">
							<?php echo $this->pagination->getListFooter(); ?>
						</td>
					</tr>
				</tfoot>
				<tbody>
				<?php
				$iconStates = array(
					-2 => 'icon-trash',
					0  => 'icon-unpublish',
					1  => 'icon-publish',
					2  => 'icon-archive',
				);
				?>
				<?php foreach ($this->items as $i => $item) : ?>
					<?php if ($item->language &&
JLanguageMultilang::isEnabled())
					{
						$tag = strlen($item->language);
						if ($tag == 5)
						{
							$lang = substr($item->language, 0, 2);
						}
						elseif ($tag == 6)
						{
							$lang = substr($item->language, 0, 3);
						}
						else {
							$lang = '';
						}
					}
					elseif (!JLanguageMultilang::isEnabled())
					{
						$lang = '';
					}
					?>
					<tr class="row<?php echo $i % 2; ?>">
						<td class="center">
							<span class="<?php echo
$iconStates[$this->escape($item->published)]; ?>"
aria-hidden="true"></span>
						</td>
						<td>
							<a href="javascript:void(0)" onclick="if
(window.parent) window.parent.<?php echo $this->escape($function);
?>('<?php echo $item->id; ?>', '<?php echo
$this->escape(addslashes($item->name)); ?>', '<?php
echo $this->escape($item->catid); ?>', null, '<?php
echo $this->escape(NewsfeedsHelperRoute::getNewsfeedRoute($item->id,
$item->catid, $item->language)); ?>', '<?php echo
$this->escape($lang); ?>', null);">
							<?php echo $this->escape($item->name); ?></a>
							<div class="small">
								<?php echo JText::_('JCATEGORY') . ': ' .
$this->escape($item->category_title); ?>
							</div>
						</td>
						<td class="small hidden-phone">
							<?php echo $this->escape($item->access_level); ?>
						</td>
						<td class="small hidden-phone">
							<?php echo
JLayoutHelper::render('joomla.content.language', $item); ?>
						</td>
						<td class="hidden-phone">
							<?php echo (int) $item->id; ?>
						</td>
					</tr>
				<?php endforeach; ?>
				</tbody>
			</table>
		<?php endif; ?>

		<input type="hidden" name="task"
value="" />
		<input type="hidden" name="boxchecked"
value="0" />
		<input type="hidden" name="forcedLanguage"
value="<?php echo
$app->input->get('forcedLanguage', '',
'CMD'); ?>" />
		<?php echo JHtml::_('form.token'); ?>

	</form>
</div>
newsfeeds/view.html.php000064400000012670151156460100011162
0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_newsfeeds
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

/**
 * View class for a list of newsfeeds.
 *
 * @since  1.6
 */
class NewsfeedsViewNewsfeeds extends JViewLegacy
{
	/**
	 * The list of newsfeeds
	 *
	 * @var    JObject
	 * @since  1.6
	 */
	protected $items;

	/**
	 * The pagination object
	 *
	 * @var    JPagination
	 * @since  1.6
	 */
	protected $pagination;

	/**
	 * The model state
	 *
	 * @var    JObject
	 * @since  1.6
	 */
	protected $state;

	/**
	 * Execute and display a template script.
	 *
	 * @param   string  $tpl  The name of the template file to parse;
automatically searches through the template paths.
	 *
	 * @return  mixed  A string if successful, otherwise an Error object.
	 *
	 * @since   1.6
	 */
	public function display($tpl = null)
	{
		$this->items         = $this->get('Items');
		$this->pagination    = $this->get('Pagination');
		$this->state         = $this->get('State');
		$this->filterForm    = $this->get('FilterForm');
		$this->activeFilters = $this->get('ActiveFilters');

		// Modal layout doesn't need the submenu.
		if ($this->getLayout() !== 'modal')
		{
			NewsfeedsHelper::addSubmenu('newsfeeds');
		}

		// Check for errors.
		if (count($errors = $this->get('Errors')))
		{
			JError::raiseError(500, implode("\n", $errors));

			return false;
		}

		// We don't need toolbar in the modal layout.
		if ($this->getLayout() !== 'modal')
		{
			$this->addToolbar();
			$this->sidebar = JHtmlSidebar::render();
		}
		else
		{
			// In article associations modal we need to remove language filter if
forcing a language.
			// We also need to change the category filter to show show categories
with All or the forced language.
			if ($forcedLanguage =
JFactory::getApplication()->input->get('forcedLanguage',
'', 'CMD'))
			{
				// If the language is forced we can't allow to select the
language, so transform the language selector filter into a hidden field.
				$languageXml = new SimpleXMLElement('<field
name="language" type="hidden" default="' .
$forcedLanguage . '" />');
				$this->filterForm->setField($languageXml, 'filter',
true);

				// Also, unset the active language filter so the search tools is not
open by default with this filter.
				unset($this->activeFilters['language']);

				// One last changes needed is to change the category filter to just
show categories with All language or with the forced language.
				$this->filterForm->setFieldAttribute('category_id',
'language', '*,' . $forcedLanguage,
'filter');
			}
		}

		parent::display($tpl);
	}

	/**
	 * Add the page title and toolbar.
	 *
	 * @return  void
	 *
	 * @since   1.6
	 */
	protected function addToolbar()
	{
		$state = $this->get('State');
		$canDo = JHelperContent::getActions('com_newsfeeds',
'category', $state->get('filter.category_id'));
		$user  = JFactory::getUser();

		// Get the toolbar object instance
		$bar = JToolbar::getInstance('toolbar');
		JToolbarHelper::title(JText::_('COM_NEWSFEEDS_MANAGER_NEWSFEEDS'),
'feed newsfeeds');

		if (count($user->getAuthorisedCategories('com_newsfeeds',
'core.create')) > 0)
		{
			JToolbarHelper::addNew('newsfeed.add');
		}

		if ($canDo->get('core.edit') ||
$canDo->get('core.edit.own'))
		{
			JToolbarHelper::editList('newsfeed.edit');
		}

		if ($canDo->get('core.edit.state'))
		{
			JToolbarHelper::publish('newsfeeds.publish',
'JTOOLBAR_PUBLISH', true);
			JToolbarHelper::unpublish('newsfeeds.unpublish',
'JTOOLBAR_UNPUBLISH', true);
			JToolbarHelper::archiveList('newsfeeds.archive');
		}

		if ($canDo->get('core.admin'))
		{
			JToolbarHelper::checkin('newsfeeds.checkin');
		}

		// Add a batch button
		if ($user->authorise('core.create',
'com_newsfeeds')
			&& $user->authorise('core.edit',
'com_newsfeeds')
			&& $user->authorise('core.edit.state',
'com_newsfeeds'))
		{
			$title = JText::_('JTOOLBAR_BATCH');

			// Instantiate a new JLayoutFile instance and render the batch button
			$layout = new JLayoutFile('joomla.toolbar.batch');

			$dhtml = $layout->render(array('title' => $title));
			$bar->appendButton('Custom', $dhtml, 'batch');
		}

		if ($state->get('filter.published') == -2 &&
$canDo->get('core.delete'))
		{
			JToolbarHelper::deleteList('JGLOBAL_CONFIRM_DELETE',
'newsfeeds.delete', 'JTOOLBAR_EMPTY_TRASH');
		}
		elseif ($canDo->get('core.edit.state'))
		{
			JToolbarHelper::trash('newsfeeds.trash');
		}

		if ($user->authorise('core.admin',
'com_newsfeeds') || $user->authorise('core.options',
'com_newsfeeds'))
		{
			JToolbarHelper::preferences('com_newsfeeds');
		}

		JToolbarHelper::help('JHELP_COMPONENTS_NEWSFEEDS_FEEDS');
	}

	/**
	 * Returns an array of fields the table can be sorted by
	 *
	 * @return  array  Array containing the field name to sort by as the key
and display text as value
	 *
	 * @since   3.0
	 */
	protected function getSortFields()
	{
		return array(
			'a.ordering'     =>
JText::_('JGRID_HEADING_ORDERING'),
			'a.published'    => JText::_('JSTATUS'),
			'a.name'         => JText::_('JGLOBAL_TITLE'),
			'category_title' => JText::_('JCATEGORY'),
			'a.access'       =>
JText::_('JGRID_HEADING_ACCESS'),
			'numarticles'    =>
JText::_('COM_NEWSFEEDS_NUM_ARTICLES_HEADING'),
			'a.cache_time'   =>
JText::_('COM_NEWSFEEDS_CACHE_TIME_HEADING'),
			'a.language'     =>
JText::_('JGRID_HEADING_LANGUAGE'),
			'a.id'           => JText::_('JGRID_HEADING_ID')
		);
	}
}
banner/tmpl/edit.php000064400000006103151156536720010436 0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_banners
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html');

JHtml::_('jquery.framework');
JHtml::_('behavior.formvalidator');
JHtml::_('formbehavior.chosen', '#jform_catid', null,
array('disable_search_threshold' => 0 ));
JHtml::_('formbehavior.chosen', 'select');

JFactory::getDocument()->addScriptDeclaration('
	Joomla.submitbutton = function(task)
	{
		if (task == "banner.cancel" ||
document.formvalidator.isValid(document.getElementById("banner-form")))
		{
			Joomla.submitform(task,
document.getElementById("banner-form"));
		}
	};
	jQuery(document).ready(function ($){
		$("#jform_type").on("change", function (a, params) {

			var v = typeof(params) !== "object" ?
$("#jform_type").val() : params.selected;

			var img_url = $("#image, #url");
			var custom  = $("#custom");

			switch (v) {
				case "0":
					// Image
					img_url.show();
					custom.hide();
					break;
				case "1":
					// Custom
					img_url.hide();
					custom.show();
					break;
			}
		}).trigger("change");
	});
');
?>

<form action="<?php echo
JRoute::_('index.php?option=com_banners&layout=edit&id='
. (int) $this->item->id); ?>" method="post"
name="adminForm" id="banner-form"
class="form-validate">

	<?php echo JLayoutHelper::render('joomla.edit.title_alias',
$this); ?>

	<div class="form-horizontal">
		<?php echo JHtml::_('bootstrap.startTabSet',
'myTab', array('active' => 'details'));
?>

		<?php echo JHtml::_('bootstrap.addTab', 'myTab',
'details', JText::_('COM_BANNERS_BANNER_DETAILS'));
?>
		<div class="row-fluid">
			<div class="span9">
				<?php echo $this->form->renderField('type'); ?>
				<div id="image">
					<?php echo $this->form->renderFieldset('image');
?>
				</div>
				<div id="custom">
					<?php echo
$this->form->renderField('custombannercode'); ?>
				</div>
				<?php
				echo $this->form->renderField('clickurl');
				echo $this->form->renderField('description');
				?>
			</div>
			<div class="span3">
				<?php echo JLayoutHelper::render('joomla.edit.global',
$this); ?>
			</div>
		</div>
		<?php echo JHtml::_('bootstrap.endTab'); ?>

		<?php echo JHtml::_('bootstrap.addTab', 'myTab',
'otherparams',
JText::_('COM_BANNERS_GROUP_LABEL_BANNER_DETAILS')); ?>
		<?php echo $this->form->renderFieldset('otherparams');
?>
		<?php echo JHtml::_('bootstrap.endTab'); ?>

		<?php echo JHtml::_('bootstrap.addTab', 'myTab',
'publishing', JText::_('JGLOBAL_FIELDSET_PUBLISHING'));
?>
		<div class="row-fluid form-horizontal-desktop">
			<div class="span6">
				<?php echo
JLayoutHelper::render('joomla.edit.publishingdata', $this); ?>
			</div>
			<div class="span6">
				<?php echo $this->form->renderFieldset('metadata');
?>
			</div>
		</div>
		<?php echo JHtml::_('bootstrap.endTab'); ?>

		<?php echo JHtml::_('bootstrap.endTabSet'); ?>
	</div>

	<input type="hidden" name="task" value=""
/>
	<?php echo JHtml::_('form.token'); ?>
</form>
banner/view.html.php000064400000012254151156536720010456 0ustar00<?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 BannerViewBanner extends hikashopView{
	var $ctrl= 'banner';
	var $nameListing = 'HIKA_BANNERS';
	var $nameForm = 'HIKA_BANNERS';
	var $icon = 'banner';
	function display($tpl = null){
		$this->paramBase =
HIKASHOP_COMPONENT.'.'.$this->getName();
		$function = $this->getLayout();
		if(method_exists($this,$function)) $this->$function();
		parent::display($tpl);
	}

	function listing(){
		$app = JFactory::getApplication();
		$pageInfo = new stdClass();
		$pageInfo->filter = new stdClass();
		$pageInfo->filter->order = new stdClass();
		$pageInfo->limit = new stdClass();
		$pageInfo->search = $app->getUserStateFromRequest(
$this->paramBase.".search", 'search', '',
'string' );
		$pageInfo->filter->order->value =
$app->getUserStateFromRequest(
$this->paramBase.".filter_order",
'filter_order',	'a.banner_id','cmd' );
		$pageInfo->filter->order->dir	=
$app->getUserStateFromRequest(
$this->paramBase.".filter_order_Dir",
'filter_order_Dir',	'desc',	'word' );
		$pageInfo->limit->value = $app->getUserStateFromRequest(
$this->paramBase.'.list_limit', 'limit',
$app->getCfg('list_limit'), 'int' );
		$pageInfo->limit->start = $app->getUserStateFromRequest(
$this->paramBase.'.limitstart', 'limitstart', 0,
'int' );
		$database	= JFactory::getDBO();

		$filters = array();
		$searchMap =
array('a.banner_id','a.banner_title','a.banner_url','a.banner_image_url');

		if(!empty($pageInfo->search)){
			$searchVal =
'\'%'.hikashop_getEscaped(JString::strtolower(
$pageInfo->search ),true).'%\'';
			$filters[] =  implode(" LIKE $searchVal OR
",$searchMap)." LIKE $searchVal";
		}
		$order = '';
		if(!empty($pageInfo->filter->order->value)){
			$order = ' ORDER BY
'.$pageInfo->filter->order->value.'
'.$pageInfo->filter->order->dir;
		}
		if(!empty($filters)){
			$filters = ' WHERE ('. implode(') AND
(',$filters).')';
		}else{
			$filters = '';
		}
		$query = ' FROM '.hikashop_table('banner').' AS
a '.$filters.$order;
		$database->setQuery('SELECT
a.*'.$query,(int)$pageInfo->limit->start,(int)$pageInfo->limit->value);
		$rows = $database->loadObjectList();
		if(!empty($pageInfo->search)){
			$rows =
hikashop_search($pageInfo->search,$rows,'banner_id');
		}
		$database->setQuery('SELECT COUNT(*)'.$query);
		$pageInfo->elements = new stdClass();
		$pageInfo->elements->total = $database->loadResult();
		$pageInfo->elements->page = count($rows);

		$toggleClass = hikashop_get('helper.toggle');
		$this->assignRef('toggleClass',$toggleClass);
		$this->assignRef('rows',$rows);
		$this->assignRef('pageInfo',$pageInfo);
		$order = new stdClass();
		$order->ordering = true;
		$order->orderUp = 'orderup';
		$order->orderDown = 'orderdown';
		$order->reverse = false;
		if($pageInfo->filter->order->value ==
'a.banner_ordering'){
			if($pageInfo->filter->order->dir == 'desc'){
				$order->orderUp = 'orderdown';
				$order->orderDown = 'orderup';
				$order->reverse = true;
			}
		}
		$this->assignRef('order',$order);
		hikashop_setTitle(JText::_($this->nameListing),$this->icon,$this->ctrl);
		$this->getPagination();

		$config =& hikashop_config();
		$manage =
hikashop_isAllowed($config->get('acl_banner_manage','all'));
		$this->assignRef('manage',$manage);
		$this->toolbar = array(
			array('name'=>'addNew','display'=>$manage),
			array('name'=>'editList','display'=>$manage),
			array('name'=>'deleteList','display'=>hikashop_isAllowed($config->get('acl_banner_delete','all'))),
			'|',
			array('name' => 'pophelp', 'target'
=> $this->ctrl.'-listing'),
			'dashboard'
		);
	}
	function form(){
		$banner_id = hikashop_getCID('banner_id');
		$class = hikashop_get('class.banner');
		if(!empty($banner_id)){
			$element = $class->get($banner_id,true);
			$task='edit';
		}else{
			$element = new stdClass();
			$element->banner_url = HIKASHOP_LIVE;
			$element->banner_published = 1;
			$task='add';
		}

		hikashop_setTitle(JText::_($this->nameForm),$this->icon,$this->ctrl.'&task='.$task.'&banner_id='.$banner_id);

		$this->toolbar = array(
			'save',
			array('name' => 'save2new', 'display'
=> version_compare(JVERSION,'1.7','>=')),
			'apply',
			'cancel',
			'|',
			array('name' => 'pophelp', 'target'
=> $this->ctrl.'-form')
		);

		$this->assignRef('element',$element);
		$translation = false;
		$transHelper = hikashop_get('helper.translation');
		if($transHelper && $transHelper->isMulti()){
			$translation = true;
			$transHelper->load('hikashop_banner',@$element->banner_id,$element);
			jimport('joomla.html.pane');
			$config =& hikashop_config();
			$multilang_display=$config->get('multilang_display','tabs');
			if($multilang_display=='popups') $multilang_display =
'tabs';
			$tabs = hikashop_get('helper.tabs');
			$this->assignRef('tabs',$tabs);
			$this->assignRef('transHelper',$transHelper);

		}
		$toggle=hikashop_get('helper.toggle');
		$this->assignRef('toggle',$toggle);
		$this->assignRef('translation',$translation);

	}
}
banners/tmpl/default.php000064400000017623151156536720011331
0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_banners
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html');

JHtml::_('bootstrap.tooltip');
JHtml::_('behavior.multiselect');
JHtml::_('formbehavior.chosen', 'select');

$user      = JFactory::getUser();
$userId    = $user->get('id');
$listOrder =
$this->escape($this->state->get('list.ordering'));
$listDirn  =
$this->escape($this->state->get('list.direction'));
$saveOrder = $listOrder == 'a.ordering';

if ($saveOrder)
{
	$saveOrderingUrl =
'index.php?option=com_banners&task=banners.saveOrderAjax&tmpl=component';
	JHtml::_('sortablelist.sortable', 'articleList',
'adminForm', strtolower($listDirn), $saveOrderingUrl);
}
?>
<form action="<?php echo
JRoute::_('index.php?option=com_banners&view=banners');
?>" method="post" name="adminForm"
id="adminForm">
	<div id="j-sidebar-container" class="span2">
		<?php echo $this->sidebar; ?>
	</div>
	<div id="j-main-container" class="span10">
		<?php
		// Search tools bar
		echo JLayoutHelper::render('joomla.searchtools.default',
array('view' => $this));
		?>
		<?php if (empty($this->items)) : ?>
			<div class="alert alert-no-items">
				<?php echo JText::_('JGLOBAL_NO_MATCHING_RESULTS'); ?>
			</div>
		<?php else : ?>
			<table class="table table-striped"
id="articleList">
				<thead>
					<tr>
						<th width="1%" class="nowrap center
hidden-phone">
							<?php echo JHtml::_('searchtools.sort', '',
'a.ordering', $listDirn, $listOrder, null, 'asc',
'JGRID_HEADING_ORDERING', 'icon-menu-2'); ?>
						</th>
						<th width="1%" class="center">
							<?php echo JHtml::_('grid.checkall'); ?>
						</th>
						<th width="1%" class="nowrap center">
							<?php echo JHtml::_('searchtools.sort',
'JSTATUS', 'a.state', $listDirn, $listOrder); ?>
						</th>
						<th>
							<?php echo JHtml::_('searchtools.sort',
'COM_BANNERS_HEADING_NAME', 'a.name', $listDirn,
$listOrder); ?>
						</th>
						<th width="1%" class="nowrap center
hidden-phone">
							<?php echo JHtml::_('searchtools.sort',
'COM_BANNERS_HEADING_STICKY', 'a.sticky', $listDirn,
$listOrder); ?>
						</th>
						<th width="10%" class="nowrap
hidden-phone">
							<?php echo JHtml::_('searchtools.sort',
'COM_BANNERS_HEADING_CLIENT', 'client_name', $listDirn,
$listOrder); ?>
						</th>
						<th width="10%" class="nowrap
hidden-phone">
							<?php echo JHtml::_('searchtools.sort',
'COM_BANNERS_HEADING_IMPRESSIONS', 'impmade',
$listDirn, $listOrder); ?>
						</th>
						<th width="10%" class="nowrap
hidden-phone">
							<?php echo JHtml::_('searchtools.sort',
'COM_BANNERS_HEADING_CLICKS', 'clicks', $listDirn,
$listOrder); ?>
						</th>
						<th width="10%" class="nowrap
hidden-phone">
							<?php echo JHtml::_('searchtools.sort',
'JGRID_HEADING_LANGUAGE', 'a.language', $listDirn,
$listOrder); ?>
						</th>
						<th width="1%" class="nowrap hidden-phone">
							<?php echo JHtml::_('searchtools.sort',
'JGRID_HEADING_ID', 'a.id', $listDirn, $listOrder);
?>
						</th>
					</tr>
				</thead>
				<tfoot>
					<tr>
						<td colspan="13">
							<?php echo $this->pagination->getListFooter(); ?>
						</td>
					</tr>
				</tfoot>
				<tbody>
					<?php foreach ($this->items as $i => $item) :
						$ordering  = ($listOrder == 'ordering');
						$item->cat_link =
JRoute::_('index.php?option=com_categories&extension=com_banners&task=edit&type=other&cid[]='
. $item->catid);
						$canCreate  = $user->authorise('core.create',    
'com_banners.category.' . $item->catid);
						$canEdit    = $user->authorise('core.edit',      
'com_banners.category.' . $item->catid);
						$canCheckin = $user->authorise('core.manage',    
'com_checkin') || $item->checked_out == $userId ||
$item->checked_out == 0;
						$canChange  = $user->authorise('core.edit.state',
'com_banners.category.' . $item->catid) &&
$canCheckin;
						?>
						<tr class="row<?php echo $i % 2; ?>"
sortable-group-id="<?php echo $item->catid; ?>">
							<td class="order nowrap center hidden-phone">
								<?php
								$iconClass = '';

								if (!$canChange)
								{
									$iconClass = ' inactive';
								}
								elseif (!$saveOrder)
								{
									$iconClass = ' inactive tip-top hasTooltip"
title="' . JHtml::_('tooltipText',
'JORDERINGDISABLED');
								}
								?>
								<span class="sortable-handler <?php echo $iconClass
?>">
									<span class="icon-menu"
aria-hidden="true"></span>
								</span>
								<?php if ($canChange && $saveOrder) : ?>
									<input type="text" style="display:none"
name="order[]" size="5"
										value="<?php echo $item->ordering; ?>"
class="width-20 text-area-order" />
								<?php endif; ?>
							</td>
							<td class="center">
								<?php echo JHtml::_('grid.id', $i, $item->id);
?>
							</td>
							<td class="center">
								<div class="btn-group">
									<?php echo JHtml::_('jgrid.published',
$item->state, $i, 'banners.', $canChange, 'cb',
$item->publish_up, $item->publish_down); ?>
									<?php // Create dropdown items and render the dropdown list.
									if ($canChange)
									{
										JHtml::_('actionsdropdown.' . ((int) $item->state
=== 2 ? 'un' : '') . 'archive',
'cb' . $i, 'banners');
										JHtml::_('actionsdropdown.' . ((int) $item->state
=== -2 ? 'un' : '') . 'trash', 'cb'
. $i, 'banners');
										echo JHtml::_('actionsdropdown.render',
$this->escape($item->name));
									}
									?>
								</div>
							</td>
							<td class="has-context">
								<div class="pull-left break-word">
									<?php if ($item->checked_out) : ?>
										<?php echo JHtml::_('jgrid.checkedout', $i,
$item->editor, $item->checked_out_time, 'banners.',
$canCheckin); ?>
									<?php endif; ?>
									<?php if ($canEdit) : ?>
										<a href="<?php echo
JRoute::_('index.php?option=com_banners&task=banner.edit&id='
. (int) $item->id); ?>">
											<?php echo $this->escape($item->name); ?></a>
									<?php else : ?>
										<?php echo $this->escape($item->name); ?>
									<?php endif; ?>
									<span class="small break-word">
										<?php echo JText::sprintf('JGLOBAL_LIST_ALIAS',
$this->escape($item->alias)); ?>
									</span>
									<div class="small">
										<?php echo JText::_('JCATEGORY') . ': ' .
$this->escape($item->category_title); ?>
									</div>
								</div>
							</td>
							<td class="center hidden-phone">
								<?php echo JHtml::_('banner.pinned', $item->sticky,
$i, $canChange); ?>
							</td>
							<td class="small hidden-phone">
								<?php echo $item->client_name; ?>
							</td>
							<td class="small hidden-phone">
								<?php echo JText::sprintf('COM_BANNERS_IMPRESSIONS',
$item->impmade, $item->imptotal ?:
JText::_('COM_BANNERS_UNLIMITED')); ?>
							</td>
							<td class="small hidden-phone">
								<?php echo $item->clicks; ?> -
								<?php echo sprintf('%.2f%%', $item->impmade ? 100 *
$item->clicks / $item->impmade : 0); ?>
							</td>
							<td class="small nowrap hidden-phone">
								<?php echo
JLayoutHelper::render('joomla.content.language', $item); ?>
							</td>
							<td class="hidden-phone">
								<?php echo $item->id; ?>
							</td>
						</tr>
					<?php endforeach; ?>
				</tbody>
			</table>
			<?php // Load the batch processing form. ?>
			<?php if ($user->authorise('core.create',
'com_banners')
				&& $user->authorise('core.edit',
'com_banners')
				&& $user->authorise('core.edit.state',
'com_banners')) : ?>
				<?php echo JHtml::_(
					'bootstrap.renderModal',
					'collapseModal',
					array(
						'title'  =>
JText::_('COM_BANNERS_BATCH_OPTIONS'),
						'footer' =>
$this->loadTemplate('batch_footer'),
					),
					$this->loadTemplate('batch_body')
				); ?>
			<?php endif; ?>
		<?php endif; ?>

		<input type="hidden" name="task"
value="" />
		<input type="hidden" name="boxchecked"
value="0" />
		<?php echo JHtml::_('form.token'); ?>
	</div>
</form>
banners/tmpl/default_batch_body.php000064400000001566151156536720013506
0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_banners
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

$published = $this->state->get('filter.published');
?>

<div class="container-fluid">
	<div class="row-fluid">
		<div class="control-group span6">
			<div class="controls">
				<?php echo JHtml::_('batch.language'); ?>
			</div>
		</div>
		<div class="control-group span6">
			<div class="controls">
				<?php echo JHtml::_('banner.clients'); ?>
			</div>
		</div>
	</div>
	<div class="row-fluid">
		<?php if ($published >= 0) : ?>
			<div class="control-group span6">
				<div class="controls">
					<?php echo JHtml::_('batch.item',
'com_banners'); ?>
				</div>
			</div>
		<?php endif; ?>
	</div>
</div>
banners/tmpl/default_batch_footer.php000064400000001317151156536720014041
0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_banners
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;
?>
<button type="button" class="btn"
onclick="document.getElementById('batch-category-id').value='';document.getElementById('batch-client-id').value='';document.getElementById('batch-language-id').value=''"
data-dismiss="modal">
	<?php echo JText::_('JCANCEL'); ?>
</button>
<button type="submit" class="btn btn-success"
onclick="Joomla.submitbutton('banner.batch');return
false;">
	<?php echo JText::_('JGLOBAL_BATCH_PROCESS'); ?>
</button>
banners/view.html.php000064400000011156151156536720010641 0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_banners
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

/**
 * View class for a list of banners.
 *
 * @since  1.6
 */
class BannersViewBanners extends JViewLegacy
{
	/**
	 * Category data
	 *
	 * @var  array
	 */
	protected $categories;

	/**
	 * An array of items
	 *
	 * @var  array
	 */
	protected $items;

	/**
	 * The pagination object
	 *
	 * @var  JPagination
	 */
	protected $pagination;

	/**
	 * The model state
	 *
	 * @var  object
	 */
	protected $state;

	/**
	 * Method to display the view.
	 *
	 * @param   string  $tpl  A template file to load. [optional]
	 *
	 * @return  mixed  A string if successful, otherwise a JError object.
	 *
	 * @since   1.6
	 */
	public function display($tpl = null)
	{
		$this->categories    = $this->get('CategoryOrders');
		$this->items         = $this->get('Items');
		$this->pagination    = $this->get('Pagination');
		$this->state         = $this->get('State');
		$this->filterForm    = $this->get('FilterForm');
		$this->activeFilters = $this->get('ActiveFilters');

		// Check for errors.
		if (count($errors = $this->get('Errors')))
		{
			throw new Exception(implode("\n", $errors), 500);
		}

		BannersHelper::addSubmenu('banners');

		$this->addToolbar();

		// Include the component HTML helpers.
		JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html');

		$this->sidebar = JHtmlSidebar::render();

		return parent::display($tpl);
	}

	/**
	 * Add the page title and toolbar.
	 *
	 * @return  void
	 *
	 * @since   1.6
	 */
	protected function addToolbar()
	{
		JLoader::register('BannersHelper', JPATH_ADMINISTRATOR .
'/components/com_banners/helpers/banners.php');

		$canDo = JHelperContent::getActions('com_banners',
'category',
$this->state->get('filter.category_id'));
		$user  = JFactory::getUser();

		JToolbarHelper::title(JText::_('COM_BANNERS_MANAGER_BANNERS'),
'bookmark banners');

		if (count($user->getAuthorisedCategories('com_banners',
'core.create')) > 0)
		{
			JToolbarHelper::addNew('banner.add');
		}

		if ($canDo->get('core.edit'))
		{
			JToolbarHelper::editList('banner.edit');
		}

		if ($canDo->get('core.edit.state'))
		{
			if ($this->state->get('filter.published') != 2)
			{
				JToolbarHelper::publish('banners.publish',
'JTOOLBAR_PUBLISH', true);
				JToolbarHelper::unpublish('banners.unpublish',
'JTOOLBAR_UNPUBLISH', true);
			}

			if ($this->state->get('filter.published') != -1)
			{
				if ($this->state->get('filter.published') != 2)
				{
					JToolbarHelper::archiveList('banners.archive');
				}
				elseif ($this->state->get('filter.published') == 2)
				{
					JToolbarHelper::unarchiveList('banners.publish');
				}
			}
		}

		if ($canDo->get('core.edit.state'))
		{
			JToolbarHelper::checkin('banners.checkin');
		}

		// Add a batch button
		if ($user->authorise('core.create', 'com_banners')
			&& $user->authorise('core.edit',
'com_banners')
			&& $user->authorise('core.edit.state',
'com_banners'))
		{
			$title = JText::_('JTOOLBAR_BATCH');

			// Instantiate a new JLayoutFile instance and render the batch button
			$layout = new JLayoutFile('joomla.toolbar.batch');

			$dhtml = $layout->render(array('title' => $title));
			JToolbar::getInstance('toolbar')->appendButton('Custom',
$dhtml, 'batch');
		}

		if ($this->state->get('filter.published') == -2
&& $canDo->get('core.delete'))
		{
			JToolbarHelper::deleteList('JGLOBAL_CONFIRM_DELETE',
'banners.delete', 'JTOOLBAR_EMPTY_TRASH');
		}
		elseif ($canDo->get('core.edit.state'))
		{
			JToolbarHelper::trash('banners.trash');
		}

		if ($user->authorise('core.admin', 'com_banners')
|| $user->authorise('core.options', 'com_banners'))
		{
			JToolbarHelper::preferences('com_banners');
		}

		JToolbarHelper::help('JHELP_COMPONENTS_BANNERS_BANNERS');
	}

	/**
	 * Returns an array of fields the table can be sorted by
	 *
	 * @return  array  Array containing the field name to sort by as the key
and display text as value
	 *
	 * @since   3.0
	 */
	protected function getSortFields()
	{
		return array(
			'ordering'    =>
JText::_('JGRID_HEADING_ORDERING'),
			'a.state'     => JText::_('JSTATUS'),
			'a.name'      =>
JText::_('COM_BANNERS_HEADING_NAME'),
			'a.sticky'    =>
JText::_('COM_BANNERS_HEADING_STICKY'),
			'client_name' =>
JText::_('COM_BANNERS_HEADING_CLIENT'),
			'impmade'     =>
JText::_('COM_BANNERS_HEADING_IMPRESSIONS'),
			'clicks'      =>
JText::_('COM_BANNERS_HEADING_CLICKS'),
			'a.language'  =>
JText::_('JGRID_HEADING_LANGUAGE'),
			'a.id'        => JText::_('JGRID_HEADING_ID'),
		);
	}
}
client/tmpl/edit.php000064400000004136151156536720010453 0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_banners
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html');
JHtml::_('behavior.formvalidator');
JHtml::_('formbehavior.chosen', 'select');

JFactory::getDocument()->addScriptDeclaration('
	Joomla.submitbutton = function(task)
	{
		if (task == "client.cancel" ||
document.formvalidator.isValid(document.getElementById("client-form")))
		{
			Joomla.submitform(task,
document.getElementById("client-form"));
		}
	};
');
?>

<form action="<?php echo
JRoute::_('index.php?option=com_banners&layout=edit&id='
. (int) $this->item->id); ?>" method="post"
name="adminForm" id="client-form"
class="form-validate">

	<?php echo JLayoutHelper::render('joomla.edit.title_alias',
$this); ?>

	<div class="form-horizontal">
		<?php echo JHtml::_('bootstrap.startTabSet',
'myTab', array('active' => 'general'));
?>

		<?php echo JHtml::_('bootstrap.addTab', 'myTab',
'general', empty($this->item->id) ?
JText::_('COM_BANNERS_NEW_CLIENT') :
JText::_('COM_BANNERS_EDIT_CLIENT')); ?>
		<div class="row-fluid">
			<div class="span9">
				<?php
				echo $this->form->renderField('contact');
				echo $this->form->renderField('email');
				echo $this->form->renderField('purchase_type');
				echo $this->form->renderField('track_impressions');
				echo $this->form->renderField('track_clicks');
				echo $this->form->renderFieldset('extra');
				?>
			</div>
			<div class="span3">
				<?php echo JLayoutHelper::render('joomla.edit.global',
$this); ?>
			</div>
		</div>
		<?php echo JHtml::_('bootstrap.endTab'); ?>

		<?php echo JHtml::_('bootstrap.addTab', 'myTab',
'metadata',
JText::_('JGLOBAL_FIELDSET_METADATA_OPTIONS')); ?>
		<?php echo $this->form->renderFieldset('metadata');
?>
		<?php echo JHtml::_('bootstrap.endTab'); ?>

		<?php echo JHtml::_('bootstrap.endTabSet'); ?>
	</div>

	<input type="hidden" name="task" value=""
/>
	<?php echo JHtml::_('form.token'); ?>
</form>
client/view.html.php000064400000005551151156536720010471 0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_banners
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

JLoader::register('BannersHelper', JPATH_ADMINISTRATOR .
'/components/com_banners/helpers/banners.php');

/**
 * View to edit a client.
 *
 * @since  1.5
 */
class BannersViewClient extends JViewLegacy
{
	/**
	 * The JForm object
	 *
	 * @var  JForm
	 */
	protected $form;

	/**
	 * The active item
	 *
	 * @var  object
	 */
	protected $item;

	/**
	 * The model state
	 *
	 * @var  object
	 */
	protected $state;

	/**
	 * Object containing permissions for the item
	 *
	 * @var  JObject
	 */
	protected $canDo;

	/**
	 * Display the view
	 *
	 * @param   string  $tpl  The name of the template file to parse;
automatically searches through the template paths.
	 *
	 * @return  mixed  A string if successful, otherwise an Error object.
	 */
	public function display($tpl = null)
	{
		$this->form  = $this->get('Form');
		$this->item  = $this->get('Item');
		$this->state = $this->get('State');
		$this->canDo = JHelperContent::getActions('com_banners');

		// Check for errors.
		if (count($errors = $this->get('Errors')))
		{
			throw new Exception(implode("\n", $errors), 500);
		}

		$this->addToolbar();

		return parent::display($tpl);
	}

	/**
	 * Add the page title and toolbar.
	 *
	 * @return  void
	 *
	 * @since   1.6
	 */
	protected function addToolbar()
	{
		JFactory::getApplication()->input->set('hidemainmenu',
true);

		$user       = JFactory::getUser();
		$isNew      = ($this->item->id == 0);
		$checkedOut = !($this->item->checked_out == 0 ||
$this->item->checked_out == $user->id);
		$canDo      = $this->canDo;

		JToolbarHelper::title(
			$isNew ? JText::_('COM_BANNERS_MANAGER_CLIENT_NEW') :
JText::_('COM_BANNERS_MANAGER_CLIENT_EDIT'),
			'bookmark banners-clients'
		);

		// If not checked out, can save the item.
		if (!$checkedOut && ($canDo->get('core.edit') ||
$canDo->get('core.create')))
		{
			JToolbarHelper::apply('client.apply');
			JToolbarHelper::save('client.save');
		}

		if (!$checkedOut && $canDo->get('core.create'))
		{
			JToolbarHelper::save2new('client.save2new');
		}

		// If an existing item, can save to a copy.
		if (!$isNew && $canDo->get('core.create'))
		{
			JToolbarHelper::save2copy('client.save2copy');
		}

		if (empty($this->item->id))
		{
			JToolbarHelper::cancel('client.cancel');
		}
		else
		{
			if (JComponentHelper::isEnabled('com_contenthistory')
&& $this->state->params->get('save_history', 0)
&& $canDo->get('core.edit'))
			{
				JToolbarHelper::versions('com_banners.client',
$this->item->id);
			}

			JToolbarHelper::cancel('client.cancel',
'JTOOLBAR_CLOSE');
		}

		JToolbarHelper::divider();
		JToolbarHelper::help('JHELP_COMPONENTS_BANNERS_CLIENTS_EDIT');
	}
}
clients/tmpl/default.php000064400000017240151156536720011335
0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_banners
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html');

JHtml::_('bootstrap.tooltip');
JHtml::_('behavior.multiselect');
JHtml::_('formbehavior.chosen', 'select');

$purchaseTypes = array(
		'1' => 'UNLIMITED',
		'2' => 'YEARLY',
		'3' => 'MONTHLY',
		'4' => 'WEEKLY',
		'5' => 'DAILY',
);

$user       = JFactory::getUser();
$userId     = $user->get('id');
$listOrder  =
$this->escape($this->state->get('list.ordering'));
$listDirn   =
$this->escape($this->state->get('list.direction'));
$params     = isset($this->state->params) ?
$this->state->params : new JObject;
?>
<form action="<?php echo
JRoute::_('index.php?option=com_banners&view=clients');
?>" method="post" name="adminForm"
id="adminForm">
	<div id="j-sidebar-container" class="span2">
		<?php echo $this->sidebar; ?>
	</div>
	<div id="j-main-container" class="span10">
		<?php
		// Search tools bar
		echo JLayoutHelper::render('joomla.searchtools.default',
array('view' => $this));
		?>
		<?php if (empty($this->items)) : ?>
			<div class="alert alert-no-items">
				<?php echo JText::_('JGLOBAL_NO_MATCHING_RESULTS'); ?>
			</div>
		<?php else : ?>
			<table class="table table-striped">
				<thead>
					<tr>
						<th width="1%" class="center">
							<?php echo JHtml::_('grid.checkall'); ?>
						</th>
						<th width="5%" class="nowrap center">
							<?php echo JHtml::_('searchtools.sort',
'JSTATUS', 'a.state', $listDirn, $listOrder); ?>
						</th>
						<th>
							<?php echo JHtml::_('searchtools.sort',
'COM_BANNERS_HEADING_CLIENT', 'a.name', $listDirn,
$listOrder); ?>
						</th>
						<th width="20%" class="hidden-phone">
							<?php echo JHtml::_('searchtools.sort',
'COM_BANNERS_HEADING_CONTACT', 'a.contact', $listDirn,
$listOrder); ?>
						</th>
						<th width="1%" class="nowrap center hidden-phone
hidden-tablet">
							<span class="icon-publish hasTooltip"
aria-hidden="true" title="<?php echo
JText::_('COM_BANNERS_COUNT_PUBLISHED_ITEMS');
?>"><span class="element-invisible"><?php
echo JText::_('COM_BANNERS_COUNT_PUBLISHED_ITEMS');
?></span></span>
						</th>
						<th width="1%" class="nowrap center hidden-phone
hidden-tablet">
							<span class="icon-unpublish hasTooltip"
aria-hidden="true" title="<?php echo
JText::_('COM_BANNERS_COUNT_UNPUBLISHED_ITEMS');
?>"><span class="element-invisible"><?php
echo JText::_('COM_BANNERS_COUNT_UNPUBLISHED_ITEMS');
?></span></span>
						</th>
						<th width="1%" class="nowrap center hidden-phone
hidden-tablet">
							<span class="icon-archive hasTooltip"
aria-hidden="true" title="<?php echo
JText::_('COM_BANNERS_COUNT_ARCHIVED_ITEMS');
?>"><span class="element-invisible"><?php
echo JText::_('COM_BANNERS_COUNT_ARCHIVED_ITEMS');
?></span></span>
						</th>
						<th width="1%" class="nowrap center hidden-phone
hidden-tablet">
							<span class="icon-trash hasTooltip"
aria-hidden="true" title="<?php echo
JText::_('COM_BANNERS_COUNT_TRASHED_ITEMS');
?>"><span class="element-invisible"><?php
echo JText::_('COM_BANNERS_COUNT_TRASHED_ITEMS');
?></span></span>
						</th>
						<th width="10%" class="nowrap
hidden-phone">
							<?php echo JHtml::_('searchtools.sort',
'COM_BANNERS_HEADING_PURCHASETYPE', 'a.purchase_type',
$listDirn, $listOrder); ?>
						</th>
						<th width="1%" class="nowrap hidden-phone">
							<?php echo JHtml::_('searchtools.sort',
'JGRID_HEADING_ID', 'a.id', $listDirn, $listOrder);
?>
						</th>
					</tr>
				</thead>
				<tfoot>
					<tr>
						<td colspan="11">
							<?php echo $this->pagination->getListFooter(); ?>
						</td>
					</tr>
				</tfoot>
				<tbody>
					<?php foreach ($this->items as $i => $item) :
						$canCreate  = $user->authorise('core.create',    
'com_banners');
						$canEdit    = $user->authorise('core.edit',      
'com_banners');
						$canCheckin = $user->authorise('core.manage',    
'com_checkin') || $item->checked_out ==
$user->get('id') || $item->checked_out == 0;
						$canChange  = $user->authorise('core.edit.state',
'com_banners') && $canCheckin;
						?>
						<tr class="row<?php echo $i % 2; ?>">
							<td class="center">
								<?php echo JHtml::_('grid.id', $i, $item->id);
?>
							</td>
							<td class="center">
								<div class="btn-group">
									<?php echo JHtml::_('jgrid.published',
$item->state, $i, 'clients.', $canChange); ?>
									<?php // Create dropdown items and render the dropdown list.

									if ($canChange)
									{
										JHtml::_('actionsdropdown.' . ((int) $item->state
=== 2 ? 'un' : '') . 'archive',
'cb' . $i, 'clients');
										JHtml::_('actionsdropdown.' . ((int) $item->state
=== -2 ? 'un' : '') . 'trash', 'cb'
. $i, 'clients');
										echo JHtml::_('actionsdropdown.render',
$this->escape($item->name));
									}
									?>
								</div>
							</td>
							<td class="nowrap has-context">
								<div class="pull-left">
									<?php if ($item->checked_out) : ?>
										<?php echo JHtml::_('jgrid.checkedout', $i,
$item->editor, $item->checked_out_time, 'clients.',
$canCheckin); ?>
									<?php endif; ?>
									<?php if ($canEdit) : ?>
										<a href="<?php echo
JRoute::_('index.php?option=com_banners&task=client.edit&id='
. (int) $item->id); ?>">
											<?php echo $this->escape($item->name); ?></a>
									<?php else : ?>
										<?php echo $this->escape($item->name); ?>
									<?php endif; ?>
								</div>
							</td>
							<td class="small hidden-phone">
								<?php echo $item->contact; ?>
							</td>
							<td class="center btns hidden-phone hidden-tablet">
								<a class="badge <?php if ($item->count_published >
0) echo 'badge-success'; ?>" href="<?php echo
JRoute::_('index.php?option=com_banners&view=banners&filter[client_id]='
. (int) $item->id . '&filter[published]=1');
?>">
									<?php echo $item->count_published; ?></a>
							</td>
							<td class="center btns hidden-phone hidden-tablet">
								<a class="badge <?php if ($item->count_unpublished
> 0) echo 'badge-important'; ?>" href="<?php
echo
JRoute::_('index.php?option=com_banners&view=banners&filter[client_id]='
. (int) $item->id . '&filter[published]=0');
?>">
									<?php echo $item->count_unpublished; ?></a>
							</td>
							<td class="center btns hidden-phone hidden-tablet">
								<a class="badge <?php if ($item->count_archived >
0) echo 'badge-info'; ?>" href="<?php echo
JRoute::_('index.php?option=com_banners&view=banners&filter[client_id]='
. (int) $item->id . '&filter[published]=2');
?>">
									<?php echo $item->count_archived; ?></a>
							</td>
							<td class="center btns hidden-phone hidden-tablet">
								<a class="badge <?php if ($item->count_trashed >
0) echo 'badge-inverse'; ?>" href="<?php echo
JRoute::_('index.php?option=com_banners&view=banners&filter[client_id]='
. (int) $item->id . '&filter[published]=-2');
?>">
									<?php echo $item->count_trashed; ?></a>
							</td>
							<td class="small hidden-phone">
								<?php if ($item->purchase_type < 0) : ?>
									<?php echo JText::sprintf('COM_BANNERS_DEFAULT',
JText::_('COM_BANNERS_FIELD_VALUE_' .
$purchaseTypes[$params->get('purchase_type')])); ?>
								<?php else : ?>
									<?php echo JText::_('COM_BANNERS_FIELD_VALUE_' .
$purchaseTypes[$item->purchase_type]); ?>
								<?php endif; ?>
							</td>
							<td class="hidden-phone">
								<?php echo $item->id; ?>
							</td>
						</tr>
					<?php endforeach; ?>
				</tbody>
			</table>
		<?php endif; ?>

		<input type="hidden" name="task"
value="" />
		<input type="hidden" name="boxchecked"
value="0" />
		<?php echo JHtml::_('form.token'); ?>
	</div>
</form>
clients/view.html.php000064400000006354151156536720010656 0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_banners
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

JLoader::register('BannersHelper', JPATH_ADMINISTRATOR .
'/components/com_banners/helpers/banners.php');

/**
 * View class for a list of clients.
 *
 * @since  1.6
 */
class BannersViewClients extends JViewLegacy
{
	/**
	 * An array of items
	 *
	 * @var  array
	 */
	protected $items;

	/**
	 * The pagination object
	 *
	 * @var  JPagination
	 */
	protected $pagination;

	/**
	 * The model state
	 *
	 * @var  object
	 */
	protected $state;

	/**
	 * Display the view
	 *
	 * @param   string  $tpl  The name of the template file to parse;
automatically searches through the template paths.
	 *
	 * @return  mixed  A string if successful, otherwise an Error object.
	 */
	public function display($tpl = null)
	{
		$this->items         = $this->get('Items');
		$this->pagination    = $this->get('Pagination');
		$this->state         = $this->get('State');
		$this->filterForm    = $this->get('FilterForm');
		$this->activeFilters = $this->get('ActiveFilters');

		// Check for errors.
		if (count($errors = $this->get('Errors')))
		{
			throw new Exception(implode("\n", $errors), 500);
		}

		BannersHelper::addSubmenu('clients');

		$this->addToolbar();
		$this->sidebar = JHtmlSidebar::render();

		return parent::display($tpl);
	}

	/**
	 * Add the page title and toolbar.
	 *
	 * @return  void
	 *
	 * @since   1.6
	 */
	protected function addToolbar()
	{
		$canDo = JHelperContent::getActions('com_banners');

		JToolbarHelper::title(JText::_('COM_BANNERS_MANAGER_CLIENTS'),
'bookmark banners-clients');

		if ($canDo->get('core.create'))
		{
			JToolbarHelper::addNew('client.add');
		}

		if ($canDo->get('core.edit'))
		{
			JToolbarHelper::editList('client.edit');
		}

		if ($canDo->get('core.edit.state'))
		{
			JToolbarHelper::publish('clients.publish',
'JTOOLBAR_PUBLISH', true);
			JToolbarHelper::unpublish('clients.unpublish',
'JTOOLBAR_UNPUBLISH', true);
			JToolbarHelper::archiveList('clients.archive');
			JToolbarHelper::checkin('clients.checkin');
		}

		if ($this->state->get('filter.state') == -2 &&
$canDo->get('core.delete'))
		{
			JToolbarHelper::deleteList('JGLOBAL_CONFIRM_DELETE',
'clients.delete', 'JTOOLBAR_EMPTY_TRASH');
		}
		elseif ($canDo->get('core.edit.state'))
		{
			JToolbarHelper::trash('clients.trash');
		}

		if ($canDo->get('core.admin') ||
$canDo->get('core.options'))
		{
			JToolbarHelper::preferences('com_banners');
		}

		JToolbarHelper::help('JHELP_COMPONENTS_BANNERS_CLIENTS');
	}

	/**
	 * Returns an array of fields the table can be sorted by
	 *
	 * @return  array  Array containing the field name to sort by as the key
and display text as value
	 *
	 * @since   3.0
	 */
	protected function getSortFields()
	{
		return array(
			'a.status'    => JText::_('JSTATUS'),
			'a.name'      =>
JText::_('COM_BANNERS_HEADING_CLIENT'),
			'contact'     =>
JText::_('COM_BANNERS_HEADING_CONTACT'),
			'client_name' =>
JText::_('COM_BANNERS_HEADING_CLIENT'),
			'nbanners'    =>
JText::_('COM_BANNERS_HEADING_ACTIVE'),
			'a.id'        => JText::_('JGRID_HEADING_ID')
		);
	}
}
download/tmpl/default.php000064400000002100151156536720011470
0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_banners
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

JHtml::_('bootstrap.tooltip', '.hasTooltip',
array('placement' => 'bottom'));
?>
<div class="container-popup">
	<form
		class="form-horizontal form-validate"
		id="download-form"
		name="adminForm"
		action="<?php echo
JRoute::_('index.php?option=com_banners&task=tracks.display&format=raw');
?>"
		method="post">

		<?php foreach ($this->form->getFieldset() as $field) : ?>
			<?php echo $this->form->renderField($field->fieldname);
?>
		<?php endforeach; ?>

		<button class="hidden"
			id="closeBtn"
			type="button"
			onclick="window.parent.jQuery('#modal-download').modal('hide');">
		</button>
		<button class="hidden"
			id="exportBtn"
			type="button"
			onclick="this.form.submit();window.top.setTimeout('window.parent.jQuery(\'#downloadModal\').modal(\'hide\')',
700);">
		</button>
	</form>
</div>
download/view.html.php000064400000001654151156536720011022 0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_banners
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

/**
 * View class for download a list of tracks.
 *
 * @since  1.6
 */
class BannersViewDownload extends JViewLegacy
{
	/**
	 * The JForm object
	 *
	 * @var  JForm
	 */
	protected $form;

	/**
	 * Display the view
	 *
	 * @param   string  $tpl  The name of the template file to parse;
automatically searches through the template paths.
	 *
	 * @return  mixed  A string if successful, otherwise an Error object.
	 */
	public function display($tpl = null)
	{
		$this->form = $this->get('Form');

		// Check for errors.
		if (count($errors = $this->get('Errors')))
		{
			throw new Exception(implode("\n", $errors), 500);
		}

		return parent::display($tpl);
	}
}
tracks/tmpl/default.php000064400000007620151156536730011165
0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_banners
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

JHtml::_('formbehavior.chosen', 'select');
JHtml::_('bootstrap.tooltip');

$listOrder  =
$this->escape($this->state->get('list.ordering'));
$listDirn   =
$this->escape($this->state->get('list.direction'));
?>
<form action="<?php echo
JRoute::_('index.php?option=com_banners&view=tracks');
?>" method="post" name="adminForm"
id="adminForm">
<?php if (!empty( $this->sidebar)) : ?>
	<div id="j-sidebar-container" class="span2">
		<?php echo $this->sidebar; ?>
	</div>
	<div id="j-main-container" class="span10">
<?php else : ?>
	<div id="j-main-container">
<?php endif; ?>
		<?php echo
JLayoutHelper::render('joomla.searchtools.default',
array('view' => $this)); ?>
		<?php if (empty($this->items)) : ?>
			<div class="alert alert-no-items">
				<?php echo JText::_('JGLOBAL_NO_MATCHING_RESULTS'); ?>
			</div>
		<?php else : ?>
			<table class="table table-striped">
				<thead>
					<tr>
						<th class="title">
							<?php echo JHtml::_('searchtools.sort',
'COM_BANNERS_HEADING_NAME', 'b.name', $listDirn,
$listOrder); ?>
						</th>
						<th width="20%" class="nowrap">
							<?php echo JHtml::_('searchtools.sort',
'COM_BANNERS_HEADING_CLIENT', 'cl.name', $listDirn,
$listOrder); ?>
						</th>
						<th width="10%" class="nowrap
hidden-phone">
							<?php echo JHtml::_('searchtools.sort',
'COM_BANNERS_HEADING_TYPE', 'a.track_type', $listDirn,
$listOrder); ?>
						</th>
						<th width="10%" class="nowrap
hidden-phone">
							<?php echo JHtml::_('searchtools.sort',
'COM_BANNERS_HEADING_COUNT', 'a.count', $listDirn,
$listOrder); ?>
						</th>
						<th width="10%" class="nowrap
hidden-phone">
							<?php echo JHtml::_('searchtools.sort',
'JDATE', 'a.track_date', $listDirn, $listOrder); ?>
						</th>
					</tr>
				</thead>
				<tfoot>
					<tr>
						<td colspan="5">
							<?php echo $this->pagination->getListFooter(); ?>
						</td>
					</tr>
				</tfoot>
				<tbody>
					<?php foreach ($this->items as $i => $item) : ?>
						<tr class="row<?php echo $i % 2; ?>">
							<td>
								<?php echo $item->banner_name; ?>
								<div class="small">
									<?php echo JText::_('JCATEGORY') . ': ' .
$this->escape($item->category_title); ?>
								</div>
							</td>
							<td>
								<?php echo $item->client_name; ?>
							</td>
							<td class="small hidden-phone">
								<?php echo $item->track_type == 1 ?
JText::_('COM_BANNERS_IMPRESSION') :
JText::_('COM_BANNERS_CLICK'); ?>
							</td>
							<td class="hidden-phone">
								<?php echo $item->count; ?>
							</td>
							<td class="hidden-phone">
								<?php echo JHtml::_('date', $item->track_date,
JText::_('DATE_FORMAT_LC5')); ?>
							</td>
						</tr>
					<?php endforeach; ?>
				</tbody>
			</table>
		<?php endif; ?>

		<?php // Load the export form ?>
		<?php echo JHtml::_(
			'bootstrap.renderModal',
			'downloadModal',
			array(
				'title'       =>
JText::_('COM_BANNERS_TRACKS_DOWNLOAD'),
				'url'         =>
JRoute::_('index.php?option=com_banners&amp;view=download&amp;tmpl=component'),
				'height'      => '370px',
				'width'       => '300px',
				'modalWidth'  => '40',
				'footer'      => '<button type="button"
class="btn" data-dismiss="modal"'
						. ' onclick="jQuery(\'#downloadModal
iframe\').contents().find(\'#closeBtn\').click();">'
						. JText::_('COM_BANNERS_CANCEL') .
'</button>'
						. '<button type="button" class="btn
btn-success"'
						. ' onclick="jQuery(\'#downloadModal
iframe\').contents().find(\'#exportBtn\').click();">'
						. JText::_('COM_BANNERS_TRACKS_EXPORT') .
'</button>',
			)
		); ?>

		<input type="hidden" name="task"
value="" />
		<input type="hidden" name="boxchecked"
value="0" />
		<?php echo JHtml::_('form.token'); ?>
	</div>
</form>
tracks/view.html.php000064400000006241151156536730010500 0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_banners
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

JLoader::register('BannersHelper', JPATH_ADMINISTRATOR .
'/components/com_banners/helpers/banners.php');

/**
 * View class for a list of tracks.
 *
 * @since  1.6
 */
class BannersViewTracks extends JViewLegacy
{
	/**
	 * An array of items
	 *
	 * @var  array
	 */
	protected $items;

	/**
	 * The pagination object
	 *
	 * @var  JPagination
	 */
	protected $pagination;

	/**
	 * The model state
	 *
	 * @var  object
	 */
	protected $state;

	/**
	 * Display the view
	 *
	 * @param   string  $tpl  The name of the template file to parse;
automatically searches through the template paths.
	 *
	 * @return  mixed  A string if successful, otherwise an Error object.
	 */
	public function display($tpl = null)
	{
		$this->items         = $this->get('Items');
		$this->pagination    = $this->get('Pagination');
		$this->state         = $this->get('State');
		$this->filterForm    = $this->get('FilterForm');
		$this->activeFilters = $this->get('ActiveFilters');

		// Check for errors.
		if (count($errors = $this->get('Errors')))
		{
			throw new Exception(implode("\n", $errors), 500);
		}

		BannersHelper::addSubmenu('tracks');

		$this->addToolbar();

		$this->sidebar = JHtmlSidebar::render();

		return parent::display($tpl);
	}

	/**
	 * Add the page title and toolbar.
	 *
	 * @return  void
	 *
	 * @since   1.6
	 */
	protected function addToolbar()
	{
		$canDo = JHelperContent::getActions('com_banners',
'category',
$this->state->get('filter.category_id'));

		JToolbarHelper::title(JText::_('COM_BANNERS_MANAGER_TRACKS'),
'bookmark banners-tracks');

		$bar = JToolbar::getInstance('toolbar');

		// Instantiate a new JLayoutFile instance and render the export button
		$layout = new JLayoutFile('joomla.toolbar.modal');

		$dhtml  = $layout->render(
			array(
				'selector' => 'downloadModal',
				'icon'     => 'download',
				'text'     => JText::_('JTOOLBAR_EXPORT'),
			)
		);

		$bar->appendButton('Custom', $dhtml, 'download');

		if ($canDo->get('core.delete'))
		{
			$bar->appendButton('Confirm',
'COM_BANNERS_DELETE_MSG', 'delete',
'COM_BANNERS_TRACKS_DELETE', 'tracks.delete', false);
			JToolbarHelper::divider();
		}

		if ($canDo->get('core.admin') ||
$canDo->get('core.options'))
		{
			JToolbarHelper::preferences('com_banners');
			JToolbarHelper::divider();
		}

		JToolbarHelper::help('JHELP_COMPONENTS_BANNERS_TRACKS');

		JHtmlSidebar::setAction('index.php?option=com_banners&view=tracks');
	}

	/**
	 * Returns an array of fields the table can be sorted by
	 *
	 * @return  array  Array containing the field name to sort by as the key
and display text as value
	 *
	 * @since   3.0
	 */
	protected function getSortFields()
	{
		return array(
			'b.name'     =>
JText::_('COM_BANNERS_HEADING_NAME'),
			'cl.name'    =>
JText::_('COM_BANNERS_HEADING_CLIENT'),
			'track_type' =>
JText::_('COM_BANNERS_HEADING_TYPE'),
			'count'      =>
JText::_('COM_BANNERS_HEADING_COUNT'),
			'track_date' => JText::_('JDATE')
		);
	}
}
tracks/view.raw.php000064400000002254151156536730010325 0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_banners
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

/**
 * View class for a list of tracks.
 *
 * @since  1.6
 */
class BannersViewTracks extends JViewLegacy
{
	/**
	 * Display the view
	 *
	 * @param   string  $tpl  The name of the template file to parse;
automatically searches through the template paths.
	 *
	 * @return  void
	 */
	public function display($tpl = null)
	{
		$basename = $this->get('BaseName');
		$filetype = $this->get('FileType');
		$mimetype = $this->get('MimeType');
		$content  = $this->get('Content');

		// Check for errors.
		if (count($errors = $this->get('Errors')))
		{
			throw new Exception(implode("\n", $errors), 500);
		}

		$document = JFactory::getDocument();
		$document->setMimeEncoding($mimetype);
		JFactory::getApplication()
			->setHeader(
				'Content-disposition',
				'attachment; filename="' . $basename . '.' .
$filetype . '"; creation-date="' .
JFactory::getDate()->toRFC822() . '"',
				true
			);
		echo $content;
	}
}
import/index.html000064400000000054151156754620010066
0ustar00<html><body
bgcolor="#FFFFFF"></body></html>import/tmpl/default.php000064400000022122151156754620011202
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				Lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.77
	@build			6th April, 2022
	@created		22nd July, 2020
	@package		Moojla
	@subpackage		default.php
	@author			Lmskaran <http://Lmskaran.com>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

JHtml::_('jquery.framework');
JHtml::_('bootstrap.tooltip');
JHtml::_('script', 'system/core.js', false, true);
JHtml::_('behavior.keepalive');
?>
<script type="text/javascript">
<?php if ($this->hasPackage &&
MoojlaHelper::checkArray($this->headerList)) : ?>
	Joomla.continueImport = function()
	{
		var form = document.getElementById('adminForm');
		var error = false;
		var therequired = [<?php $i = 0; foreach($this->headerList as $name
=> $title) { echo ($i != 0)? ',
"vdm_'.$name.'"':'"vdm_'.$name.'"';
$i++; } ?>];
		for(i = 0; i < therequired.length; i++)
		{
			if(jQuery('#'+therequired[i]).val() == "" )
			{
				error = true;
				break;
			}
		}
		// do field validation
		if (error)
		{
			alert("<?php echo
JText::_('COM_MOOJLA_IMPORT_MSG_PLEASE_SELECT_ALL_COLUMNS',
true); ?>");
		}
		else
		{
			jQuery('#loading').css('display',
'block');

			form.gettype.value = 'continue';
			form.submit();
		}
	};
<?php else: ?>
	Joomla.submitbutton = function()
	{
		var form = document.getElementById('adminForm');

		// do field validation
		if (form.import_package.value == "")
		{
			alert("<?php echo
JText::_('COM_MOOJLA_IMPORT_MSG_PLEASE_SELECT_A_FILE', true);
?>");
		}
		else
		{
			jQuery('#loading').css('display',
'block');

			form.gettype.value = 'upload';
			form.submit();
		}
	};

	Joomla.submitbutton3 = function()
	{
		var form = document.getElementById('adminForm');

		// do field validation
		if (form.import_directory.value == ""){
			alert("<?php echo
JText::_('COM_MOOJLA_IMPORT_MSG_PLEASE_SELECT_A_DIRECTORY',
true); ?>");
		}
		else
		{
			jQuery('#loading').css('display',
'block');

			form.gettype.value = 'folder';
			form.submit();
		}
	};

	Joomla.submitbutton4 = function()
	{
		var form = document.getElementById('adminForm');

		// do field validation
		if (form.import_url.value == "" || form.import_url.value ==
"http://")
		{
			alert("<?php echo
JText::_('COM_MOOJLA_IMPORT_MSG_ENTER_A_URL', true);
?>");
		}
		else
		{
			jQuery('#loading').css('display',
'block');

			form.gettype.value = 'url';
			form.submit();
		}
	};
<?php endif; ?>

// Add spindle-wheel for importations:
jQuery(document).ready(function($) {
	var outerDiv = $('body');

	$('<div id="loading"></div>')
		.css("background", "rgba(255, 255, 255, .8)
url('components/com_moojla/assets/images/import.gif') 50% 15%
no-repeat")
		.css("top", outerDiv.position().top - $(window).scrollTop())
		.css("left", outerDiv.position().left - $(window).scrollLeft())
		.css("width", outerDiv.width())
		.css("height", outerDiv.height())
		.css("position", "fixed")
		.css("opacity", "0.80")
		.css("-ms-filter",
"progid:DXImageTransform.Microsoft.Alpha(Opacity = 80)")
		.css("filter", "alpha(opacity = 80)")
		.css("display", "none")
		.appendTo(outerDiv);
});

</script>

<div id="installer-import" class="clearfix">
<form enctype="multipart/form-data" action="<?php echo
JRoute::_('index.php?option=com_moojla&view=import');?>"
method="post" name="adminForm" id="adminForm"
class="form-horizontal form-validate">

	<?php if (!empty( $this->sidebar)) : ?>
		<div id="j-sidebar-container" class="span2">
			<?php echo $this->sidebar; ?>
		</div>
		<div id="j-main-container" class="span10">
	<?php else : ?>
		<div id="j-main-container">
	<?php endif;?>

	<?php if ($this->hasPackage &&
MoojlaHelper::checkArray($this->headerList) &&
MoojlaHelper::checkArray($this->headers)) : ?>
		<fieldset class="uploadform">
			<legend><?php echo
JText::_('COM_MOOJLA_IMPORT_LINK_FILE_TO_TABLE_COLUMNS');
?></legend>
			<div class="control-group">
				<label class="control-label" ><h4><?php echo
JText::_('COM_MOOJLA_IMPORT_TABLE_COLUMNS');
?></h4></label>
				<div class="controls">
					<label class="control-label" ><h4><?php echo
JText::_('COM_MOOJLA_IMPORT_FILE_COLUMNS');
?></h4></label>
				</div>
			</div>
			<?php foreach($this->headerList as $name => $title): ?>
				<div class="control-group">
					<label for="<?php echo $name; ?>"
class="control-label" ><?php echo $title;
?></label>
					<div class="controls">
					<select  name="<?php echo $name; ?>" 
id="vdm_<?php echo $name; ?>" required class="required
input_box" >
						<option value=""><?php echo
JText::_('COM_MOOJLA_IMPORT_PLEASE_SELECT_COLUMN');
?></option>
						<option value="IGNORE"><?php echo
JText::_('COM_MOOJLA_IMPORT_IGNORE_COLUMN'); ?></option>
						<?php foreach($this->headers as $value => $option): ?>
							<?php $selected = (strtolower($option) ==  strtolower ($title) ||
strtolower($option) == strtolower($name))?
'selected="selected"':''; ?>
							<option value="<?php echo
MoojlaHelper::htmlEscape($value); ?>" class="required"
<?php echo $selected ?>><?php echo
MoojlaHelper::htmlEscape($option); ?></option>
						<?php endforeach; ?>
					</select>
					</div>
				</div>
			<?php endforeach; ?>
			<div class="form-actions">
				<input class="btn btn-primary" type="button"
value="<?php echo JText::_('COM_MOOJLA_IMPORT_CONTINUE');
?>" onclick="Joomla.continueImport()" />
			</div>
		</fieldset>
		<input type="hidden" name="gettype"
value="continue" />
	<?php else: ?>
		<?php echo JHtml::_('bootstrap.startTabSet',
'myTab', array('active' => 'upload'));
?>
		
		<?php echo JHtml::_('bootstrap.addTab', 'myTab',
'upload', JText::_('COM_MOOJLA_IMPORT_FROM_UPLOAD',
true)); ?>
			<fieldset class="uploadform">
				<legend><?php echo
JText::_('COM_MOOJLA_IMPORT_UPDATE_DATA'); ?></legend>
				<div class="control-group">
					<label for="import_package"
class="control-label"><?php echo
JText::_('COM_MOOJLA_IMPORT_SELECT_FILE'); ?></label>
					<div class="controls">
						<input class="input_box" id="import_package"
name="import_package" type="file" size="57"
/>
					</div>
				</div>
				<div class="form-actions">
					<input class="btn btn-primary" type="button"
value="<?php echo
JText::_('COM_MOOJLA_IMPORT_UPLOAD_BOTTON'); ?>"
onclick="Joomla.submitbutton()"
/>&nbsp;&nbsp;&nbsp;<small><?php echo
JText::_('COM_MOOJLA_IMPORT_FORMATS_ACCEPTED'); ?> (.csv .xls
.ods)</small>
				</div>
			</fieldset>
		<?php echo JHtml::_('bootstrap.endTab'); ?>
		
		<?php echo JHtml::_('bootstrap.addTab', 'myTab',
'directory',
JText::_('COM_MOOJLA_IMPORT_FROM_DIRECTORY', true)); ?>
			<fieldset class="uploadform">
				<legend><?php echo
JText::_('COM_MOOJLA_IMPORT_UPDATE_DATA'); ?></legend>
				<div class="control-group">
					<label for="import_directory"
class="control-label"><?php echo
JText::_('COM_MOOJLA_IMPORT_SELECT_FILE_DIRECTORY');
?></label>
					<div class="controls">
						<input type="text" id="import_directory"
name="import_directory" class="span5 input_box"
size="70" value="<?php echo
$this->state->get('import.directory'); ?>" />
					</div>
				</div>
				<div class="form-actions">
					<input type="button" class="btn btn-primary"
value="<?php echo
JText::_('COM_MOOJLA_IMPORT_GET_BOTTON'); ?>"
onclick="Joomla.submitbutton3()"
/>&nbsp;&nbsp;&nbsp;<small><?php echo
JText::_('COM_MOOJLA_IMPORT_FORMATS_ACCEPTED'); ?> (.csv .xls
.ods)</small>
				</div>
				</fieldset>
		<?php echo JHtml::_('bootstrap.endTab'); ?>

		<?php echo JHtml::_('bootstrap.addTab', 'myTab',
'url', JText::_('COM_MOOJLA_IMPORT_FROM_URL', true));
?>
			<fieldset class="uploadform">
				<legend><?php echo
JText::_('COM_MOOJLA_IMPORT_UPDATE_DATA'); ?></legend>
				<div class="control-group">
					<label for="import_url"
class="control-label"><?php echo
JText::_('COM_MOOJLA_IMPORT_SELECT_FILE_URL');
?></label>
					<div class="controls">
						<input type="text" id="import_url"
name="import_url" class="span5 input_box"
size="70" value="http://" />
					</div>
				</div>
				<div class="form-actions">
					<input type="button" class="btn btn-primary"
value="<?php echo
JText::_('COM_MOOJLA_IMPORT_GET_BOTTON'); ?>"
onclick="Joomla.submitbutton4()"
/>&nbsp;&nbsp;&nbsp;<small><?php echo
JText::_('COM_MOOJLA_IMPORT_FORMATS_ACCEPTED'); ?> (.csv .xls
.ods)</small>
				</div>
			</fieldset>
		<?php echo JHtml::_('bootstrap.endTab'); ?>
		<?php echo JHtml::_('bootstrap.endTabSet'); ?>
		<input type="hidden" name="gettype"
value="upload" />
	<?php endif; ?>
	<input type="hidden" name="task"
value="import.import" />
	<?php echo JHtml::_('form.token'); ?>
</form>
</div>import/tmpl/index.html000064400000000054151156754620011042
0ustar00<html><body
bgcolor="#FFFFFF"></body></html>import/view.html.php000064400000006073151156754620010526
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				Lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.77
	@build			6th April, 2022
	@created		22nd July, 2020
	@package		Moojla
	@subpackage		view.html.php
	@author			Lmskaran <http://Lmskaran.com>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

/**
 * Moojla Import View
 */
class MoojlaViewImport extends JViewLegacy
{
	protected $headerList;
	protected $hasPackage = false;
	protected $headers;
	protected $hasHeader = 0;
	protected $dataType;

	public function display($tpl = null)
	{		
		if ($this->getLayout() !== 'modal')
		{
			// Include helper submenu
			MoojlaHelper::addSubmenu('import');
		}

		$paths = new stdClass;
		$paths->first = '';
		$state = $this->get('state');

		$this->paths = &$paths;
		$this->state = &$state;
                // get global action permissions
		$this->canDo = MoojlaHelper::getActions('import');

		// We don't need toolbar in the modal window.
		if ($this->getLayout() !== 'modal')
		{
			$this->addToolbar();
			$this->sidebar = JHtmlSidebar::render();
		}

		// get the session object
		$session = JFactory::getSession();
		// check if it has package
		$this->hasPackage 	= $session->get('hasPackage', false);
		$this->dataType 	= $session->get('dataType', false);
		if($this->hasPackage && $this->dataType)
		{
			$this->headerList 	=
json_decode($session->get($this->dataType.'_VDM_IMPORTHEADERS',
false),true);
			$this->headers 		= MoojlaHelper::getFileHeaders($this->dataType);
			// clear the data type
			$session->clear('dataType');
		}
		
		// Check for errors.
		if (count($errors = $this->get('Errors')))
		{
			throw new Exception(implode("\n", $errors), 500);
		}

		// Display the template
		parent::display($tpl);
	}

	/**
	 * Setting the toolbar
	 */
	protected function addToolBar()
	{
		JToolBarHelper::title(JText::_('COM_MOOJLA_IMPORT_TITLE'),
'upload');
		JHtmlSidebar::setAction('index.php?option=com_moojla&view=import');

		if ($this->canDo->get('core.admin') ||
$this->canDo->get('core.options'))
		{
			JToolBarHelper::preferences('com_moojla');
		}

		// set help url for this view if found
		$help_url = MoojlaHelper::getHelpUrl('import');
		if (MoojlaHelper::checkString($help_url))
		{
			   JToolbarHelper::help('COM_MOOJLA_HELP_MANAGER', false,
$help_url);
		}
	}
}
index.html000064400000000054151156754620006554 0ustar00<html><body
bgcolor="#FFFFFF"></body></html>molation/index.html000064400000000054151156754620010376
0ustar00<html><body
bgcolor="#FFFFFF"></body></html>molation/tmpl/default.php000064400000003606151156754620011520
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.0
	@build			24th July, 2022
	@created		13th July, 2022
	@package		Molation
	@subpackage		default.php
	@author			farhad shahbazi <http://lmskaran.ir>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

JHtml::_('behavior.tooltip');

?>
<div id="j-main-container">
	<div class="span9">
		<?php echo JHtml::_('bootstrap.startAccordion',
'dashboard_left', array('active' =>
'main')); ?>
			<?php echo JHtml::_('bootstrap.addSlide',
'dashboard_left', 'cPanel', 'main'); ?>
				<?php echo $this->loadTemplate('main');?>
			<?php echo JHtml::_('bootstrap.endSlide'); ?>
		<?php echo JHtml::_('bootstrap.endAccordion'); ?>
	</div>
	<div class="span3">
		<?php echo JHtml::_('bootstrap.startAccordion',
'dashboard_right', array('active' =>
'vdm')); ?>
			<?php echo JHtml::_('bootstrap.addSlide',
'dashboard_right', 'lmskaran', 'vdm'); ?>
				<?php echo $this->loadTemplate('vdm');?>
			<?php echo JHtml::_('bootstrap.endSlide'); ?>
		<?php echo JHtml::_('bootstrap.endAccordion'); ?>
	</div>
</div>molation/tmpl/default_main.php000064400000003656151156754620012531
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.0
	@build			24th July, 2022
	@created		13th July, 2022
	@package		Molation
	@subpackage		default_main.php
	@author			farhad shahbazi <http://lmskaran.ir>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

?>
<?php if(isset($this->icons['main']) &&
is_array($this->icons['main'])) :?>
	<?php foreach($this->icons['main'] as $icon): ?>
		<div class="dashboard-wraper">
			<div class="dashboard-content"> 
				<a class="icon" href="<?php echo $icon->url;
?>">
					<img alt="<?php echo $icon->alt; ?>"
src="components/com_molation/assets/images/icons/<?php  echo
$icon->image; ?>">
					<span class="dashboard-title"><?php echo
JText::_($icon->name); ?></span>
				</a>
			 </div>
		</div>
	<?php endforeach; ?>
	<div class="clearfix"></div>
<?php else: ?>
	<div class="alert alert-error"><h4
class="alert-heading"><?php echo JText::_("Permission
denied, or not correctly set"); ?></h4><div
class="alert-message"><?php echo JText::_("Please
notify your System Administrator if result is unexpected.");
?></div></div>
<?php endif;
?>molation/tmpl/default_vdm.php000064400000005065151156754620012367
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.0
	@build			24th July, 2022
	@created		13th July, 2022
	@package		Molation
	@subpackage		default_vdm.php
	@author			farhad shahbazi <http://lmskaran.ir>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

?>
<img alt="<?php echo JText::_('COM_MOLATION');
?>"
src="components/com_molation/assets/images/vdm-component.jpg">
<ul class="list-striped">
	<li><b><?php echo
JText::_('COM_MOLATION_VERSION'); ?>:</b> <?php echo
$this->manifest->version; ?>&nbsp;&nbsp;<span
class="update-notice"></span></li>
	<li><b><?php echo JText::_('COM_MOLATION_DATE');
?>:</b> <?php echo $this->manifest->creationDate;
?></li>
	<li><b><?php echo
JText::_('COM_MOLATION_AUTHOR'); ?>:</b> <a
href="mailto:<?php echo $this->manifest->authorEmail;
?>"><?php echo $this->manifest->author;
?></a></li>
	<li><b><?php echo
JText::_('COM_MOLATION_WEBSITE'); ?>:</b> <a
href="<?php echo $this->manifest->authorUrl; ?>"
target="_blank"><?php echo
$this->manifest->authorUrl; ?></a></li>
	<li><b><?php echo
JText::_('COM_MOLATION_LICENSE'); ?>:</b> <?php echo
$this->manifest->license; ?></li>
	<li><b><?php echo $this->manifest->copyright;
?></b></li>
</ul>
<div class="clearfix"></div>
<?php if(MolationHelper::checkArray($this->contributors)): ?>
	<?php if(count($this->contributors) > 1): ?>
		<h3><?php echo JText::_('COM_MOLATION_CONTRIBUTORS');
?></h3>
	<?php else: ?>
		<h3><?php echo JText::_('COM_MOLATION_CONTRIBUTOR');
?></h3>
	<?php endif; ?>
	<ul class="list-striped">
		<?php foreach($this->contributors as $contributor): ?>
		<li><b><?php echo $contributor['title'];
?>:</b> <?php echo $contributor['name'];
?></li>
		<?php endforeach; ?>
	</ul>
	<div class="clearfix"></div>
<?php endif;
?>molation/tmpl/index.html000064400000000054151156754620011352
0ustar00<html><body
bgcolor="#FFFFFF"></body></html>molation/view.html.php000064400000005531151156754620011034
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.0
	@build			24th July, 2022
	@created		13th July, 2022
	@package		Molation
	@subpackage		view.html.php
	@author			farhad shahbazi <http://lmskaran.ir>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

/**
 * Molation View class
 */
class MolationViewMolation extends JViewLegacy
{
	/**
	 * View display method
	 * @return void
	 */
	function display($tpl = null)
	{
		// Assign data to the view
		$this->icons			= $this->get('Icons');
		$this->contributors		= MolationHelper::getContributors();
		
		// get the manifest details of the component
		$this->manifest = MolationHelper::manifest();
		
		// Set the toolbar
		$this->addToolBar();
		
		// Check for errors.
		if (count($errors = $this->get('Errors')))
		{
			throw new Exception(implode("\n", $errors), 500);
		}

		// Display the template
		parent::display($tpl);

		// Set the document
		$this->setDocument();
	}

	/**
	 * Setting the toolbar
	 */
	protected function addToolBar()
	{
		$canDo = MolationHelper::getActions('molation');
		JToolBarHelper::title(JText::_('COM_MOLATION_DASHBOARD'),
'grid-2');

		// set help url for this view if found
		$help_url = MolationHelper::getHelpUrl('molation');
		if (MolationHelper::checkString($help_url))
		{
			JToolbarHelper::help('COM_MOLATION_HELP_MANAGER', false,
$help_url);
		}

		if ($canDo->get('core.admin') ||
$canDo->get('core.options'))
		{
			JToolBarHelper::preferences('com_molation');
		}
	}

	/**
	 * Method to set up the document properties
	 *
	 * @return void
	 */
	protected function setDocument()
	{
		$document = JFactory::getDocument();
		
		// add dashboard style sheets
		$document->addStyleSheet(JURI::root() .
"administrator/components/com_molation/assets/css/dashboard.css");
		
		// set page title
		$document->setTitle(JText::_('COM_MOLATION_DASHBOARD'));
		
		// add manifest to page JavaScript
		$document->addScriptDeclaration("var manifest =
jQuery.parseJSON('" . json_encode($this->manifest) .
"');", "text/javascript");
	}
}
m_relation/submitbutton.js000064400000002756151156754620012020
0ustar00/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.0
	@build			24th July, 2022
	@created		13th July, 2022
	@package		Molation
	@subpackage		submitbutton.js
	@author			farhad shahbazi <http://lmskaran.ir>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

Joomla.submitbutton = function(task)
{
	if (task == ''){
		return false;
	} else { 
		var action = task.split('.');
		if (action[1] == 'cancel' || action[1] == 'close' ||
document.formvalidator.isValid(document.getElementById("adminForm"))){
			Joomla.submitform(task, document.getElementById("adminForm"));
			return true;
		} else {
			alert(Joomla.JText._('m_relation, some values are not
acceptable.','Some values are unacceptable'));
			return false;
		}
	}
}m_relation/tmpl/edit.php000064400000011377151156754620011334
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.0
	@build			24th July, 2022
	@created		13th July, 2022
	@package		Molation
	@subpackage		edit.php
	@author			farhad shahbazi <http://lmskaran.ir>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html');
JHtml::_('behavior.tooltip');
JHtml::_('behavior.formvalidation');
JHtml::_('formbehavior.chosen', 'select');
JHtml::_('behavior.keepalive');
$componentParams = $this->params; // will be removed just use
$this->params instead
?>
<script type="text/javascript">
	// waiting spinner
	var outerDiv = jQuery('body');
	jQuery('<div id="loading"></div>')
		.css("background", "rgba(255, 255, 255, .8)
url('components/com_molation/assets/images/import.gif') 50% 15%
no-repeat")
		.css("top", outerDiv.position().top -
jQuery(window).scrollTop())
		.css("left", outerDiv.position().left -
jQuery(window).scrollLeft())
		.css("width", outerDiv.width())
		.css("height", outerDiv.height())
		.css("position", "fixed")
		.css("opacity", "0.80")
		.css("-ms-filter",
"progid:DXImageTransform.Microsoft.Alpha(Opacity = 80)")
		.css("filter", "alpha(opacity = 80)")
		.css("display", "none")
		.appendTo(outerDiv);
	jQuery('#loading').show();
	// when page is ready remove and show
	jQuery(window).load(function() {
		jQuery('#molation_loader').fadeIn('fast');
		jQuery('#loading').hide();
	});
</script>
<div id="molation_loader" style="display: none;">
<form action="<?php echo
JRoute::_('index.php?option=com_molation&layout=edit&id='.
(int) $this->item->id . $this->referral); ?>"
method="post" name="adminForm" id="adminForm"
class="form-validate" enctype="multipart/form-data">

<div class="form-horizontal">

	<?php echo JHtml::_('bootstrap.startTabSet',
'm_relationTab', array('active' =>
'details')); ?>

	<?php echo JHtml::_('bootstrap.addTab',
'm_relationTab', 'details',
JText::_('COM_MOLATION_M_RELATION_DETAILS', true)); ?>
		<div class="row-fluid form-horizontal-desktop">
			<div class="span6">
				<?php echo
JLayoutHelper::render('m_relation.details_left', $this); ?>
			</div>
			<div class="span6">
				<?php echo
JLayoutHelper::render('m_relation.details_right', $this); ?>
			</div>
		</div>
	<?php echo JHtml::_('bootstrap.endTab'); ?>

	<?php $this->ignore_fieldsets =
array('details','metadata','vdmmetadata','accesscontrol');
?>
	<?php $this->tab_name = 'm_relationTab'; ?>
	<?php echo JLayoutHelper::render('joomla.edit.params',
$this); ?>

	<?php if ($this->canDo->get('core.edit.created_by') ||
$this->canDo->get('core.edit.created') ||
$this->canDo->get('core.edit.state') ||
($this->canDo->get('core.delete') &&
$this->canDo->get('core.edit.state'))) : ?>
	<?php echo JHtml::_('bootstrap.addTab',
'm_relationTab', 'publishing',
JText::_('COM_MOLATION_M_RELATION_PUBLISHING', true)); ?>
		<div class="row-fluid form-horizontal-desktop">
			<div class="span6">
				<?php echo JLayoutHelper::render('m_relation.publishing',
$this); ?>
			</div>
			<div class="span6">
				<?php echo JLayoutHelper::render('m_relation.publlshing',
$this); ?>
			</div>
		</div>
	<?php echo JHtml::_('bootstrap.endTab'); ?>
	<?php endif; ?>

	<?php if ($this->canDo->get('core.admin')) : ?>
	<?php echo JHtml::_('bootstrap.addTab',
'm_relationTab', 'permissions',
JText::_('COM_MOLATION_M_RELATION_PERMISSION', true)); ?>
		<div class="row-fluid form-horizontal-desktop">
			<div class="span12">
				<fieldset class="adminform">
					<div class="adminformlist">
					<?php foreach
($this->form->getFieldset('accesscontrol') as $field):
?>
						<div>
							<?php echo $field->label; echo $field->input;?>
						</div>
						<div class="clearfix"></div>
					<?php endforeach; ?>
					</div>
				</fieldset>
			</div>
		</div>
	<?php echo JHtml::_('bootstrap.endTab'); ?>
	<?php endif; ?>

	<?php echo JHtml::_('bootstrap.endTabSet'); ?>

	<div>
		<input type="hidden" name="task"
value="m_relation.edit" />
		<?php echo JHtml::_('form.token'); ?>
	</div>
</div>
</form>
</div>
m_relation/tmpl/index.html000064400000000054151156754620011661
0ustar00<html><body
bgcolor="#FFFFFF"></body></html>m_relation/view.html.php000064400000015403151156754620011342
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.0
	@build			24th July, 2022
	@created		13th July, 2022
	@package		Molation
	@subpackage		view.html.php
	@author			farhad shahbazi <http://lmskaran.ir>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

/**
 * M_relation View class
 */
class MolationViewM_relation extends JViewLegacy
{
	/**
	 * display method of View
	 * @return void
	 */
	public function display($tpl = null)
	{
		// set params
		$this->params = JComponentHelper::getParams('com_molation');
		// Assign the variables
		$this->form = $this->get('Form');
		$this->item = $this->get('Item');
		$this->script = $this->get('Script');
		$this->state = $this->get('State');
		// get action permissions
		$this->canDo = MolationHelper::getActions('m_relation',
$this->item);
		// get input
		$jinput = JFactory::getApplication()->input;
		$this->ref = $jinput->get('ref', 0, 'word');
		$this->refid = $jinput->get('refid', 0, 'int');
		$return = $jinput->get('return', null, 'base64');
		// set the referral string
		$this->referral = '';
		if ($this->refid && $this->ref)
		{
			// return to the item that referred to this item
			$this->referral = '&ref=' . (string)$this->ref .
'&refid=' . (int)$this->refid;
		}
		elseif($this->ref)
		{
			// return to the list view that referred to this item
			$this->referral = '&ref=' . (string)$this->ref;
		}
		// check return value
		if (!is_null($return))
		{
			// add the return value
			$this->referral .= '&return=' . (string)$return;
		}

		// Set the toolbar
		$this->addToolBar();
		
		// Check for errors.
		if (count($errors = $this->get('Errors')))
		{
			throw new Exception(implode("\n", $errors), 500);
		}

		// Display the template
		parent::display($tpl);

		// Set the document
		$this->setDocument();
	}


	/**
	 * Setting the toolbar
	 */
	protected function addToolBar()
	{
		JFactory::getApplication()->input->set('hidemainmenu',
true);
		$user = JFactory::getUser();
		$userId	= $user->id;
		$isNew = $this->item->id == 0;

		JToolbarHelper::title( JText::_($isNew ?
'COM_MOLATION_M_RELATION_NEW' :
'COM_MOLATION_M_RELATION_EDIT'), 'pencil-2
article-add');
		// Built the actions for new and existing records.
		if (MolationHelper::checkString($this->referral))
		{
			if ($this->canDo->get('core.create') && $isNew)
			{
				// We can create the record.
				JToolBarHelper::save('m_relation.save',
'JTOOLBAR_SAVE');
			}
			elseif ($this->canDo->get('core.edit'))
			{
				// We can save the record.
				JToolBarHelper::save('m_relation.save',
'JTOOLBAR_SAVE');
			}
			if ($isNew)
			{
				// Do not creat but cancel.
				JToolBarHelper::cancel('m_relation.cancel',
'JTOOLBAR_CANCEL');
			}
			else
			{
				// We can close it.
				JToolBarHelper::cancel('m_relation.cancel',
'JTOOLBAR_CLOSE');
			}
		}
		else
		{
			if ($isNew)
			{
				// For new records, check the create permission.
				if ($this->canDo->get('core.create'))
				{
					JToolBarHelper::apply('m_relation.apply',
'JTOOLBAR_APPLY');
					JToolBarHelper::save('m_relation.save',
'JTOOLBAR_SAVE');
					JToolBarHelper::custom('m_relation.save2new',
'save-new.png', 'save-new_f2.png',
'JTOOLBAR_SAVE_AND_NEW', false);
				};
				JToolBarHelper::cancel('m_relation.cancel',
'JTOOLBAR_CANCEL');
			}
			else
			{
				if ($this->canDo->get('core.edit'))
				{
					// We can save the new record
					JToolBarHelper::apply('m_relation.apply',
'JTOOLBAR_APPLY');
					JToolBarHelper::save('m_relation.save',
'JTOOLBAR_SAVE');
					// We can save this record, but check the create permission to see
					// if we can return to make a new one.
					if ($this->canDo->get('core.create'))
					{
						JToolBarHelper::custom('m_relation.save2new',
'save-new.png', 'save-new_f2.png',
'JTOOLBAR_SAVE_AND_NEW', false);
					}
				}
				$canVersion = ($this->canDo->get('core.version')
&& $this->canDo->get('m_relation.version'));
				if ($this->state->params->get('save_history', 1)
&& $this->canDo->get('core.edit') &&
$canVersion)
				{
					JToolbarHelper::versions('com_molation.m_relation',
$this->item->id);
				}
				if ($this->canDo->get('core.create'))
				{
					JToolBarHelper::custom('m_relation.save2copy',
'save-copy.png', 'save-copy_f2.png',
'JTOOLBAR_SAVE_AS_COPY', false);
				}
				JToolBarHelper::cancel('m_relation.cancel',
'JTOOLBAR_CLOSE');
			}
		}
		JToolbarHelper::divider();
		// set help url for this view if found
		$help_url = MolationHelper::getHelpUrl('m_relation');
		if (MolationHelper::checkString($help_url))
		{
			JToolbarHelper::help('COM_MOLATION_HELP_MANAGER', false,
$help_url);
		}
	}

	/**
	 * Escapes a value for output in a view script.
	 *
	 * @param   mixed  $var  The output to escape.
	 *
	 * @return  mixed  The escaped value.
	 */
	public function escape($var)
	{
		if(strlen($var) > 30)
		{
    		// use the helper htmlEscape method instead and shorten the string
			return MolationHelper::htmlEscape($var, $this->_charset, true, 30);
		}
		// use the helper htmlEscape method instead.
		return MolationHelper::htmlEscape($var, $this->_charset);
	}

	/**
	 * Method to set up the document properties
	 *
	 * @return void
	 */
	protected function setDocument()
	{
		$isNew = ($this->item->id < 1);
		if (!isset($this->document))
		{
			$this->document = JFactory::getDocument();
		}
		$this->document->setTitle(JText::_($isNew ?
'COM_MOLATION_M_RELATION_NEW' :
'COM_MOLATION_M_RELATION_EDIT'));
		$this->document->addStyleSheet(JURI::root() .
"administrator/components/com_molation/assets/css/m_relation.css",
(MolationHelper::jVersion()->isCompatible('3.8.0')) ?
array('version' => 'auto') : 'text/css');
		$this->document->addScript(JURI::root() . $this->script,
(MolationHelper::jVersion()->isCompatible('3.8.0')) ?
array('version' => 'auto') :
'text/javascript');
		$this->document->addScript(JURI::root() .
"administrator/components/com_molation/views/m_relation/submitbutton.js",
(MolationHelper::jVersion()->isCompatible('3.8.0')) ?
array('version' => 'auto') :
'text/javascript'); 
		JText::script('view not acceptable. Error');
	}
}
m_relations/index.html000064400000000054151156754620011070
0ustar00<html><body
bgcolor="#FFFFFF"></body></html>m_relations/tmpl/default.php000064400000006021151156754620012204
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.0
	@build			24th July, 2022
	@created		13th July, 2022
	@package		Molation
	@subpackage		default.php
	@author			farhad shahbazi <http://lmskaran.ir>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

JHtml::_('behavior.tooltip');
JHtml::_('behavior.multiselect');
JHtml::_('dropdown.init');
JHtml::_('formbehavior.chosen',
'.multipleAccessLevels', null,
array('placeholder_text_multiple' => '- ' .
JText::_('COM_MOLATION_FILTER_SELECT_ACCESS') . ' -'));
JHtml::_('formbehavior.chosen', 'select');
if ($this->saveOrder)
{
	$saveOrderingUrl =
'index.php?option=com_molation&task=m_relations.saveOrderAjax&tmpl=component';
	JHtml::_('sortablelist.sortable', 'm_relationList',
'adminForm', strtolower($this->listDirn), $saveOrderingUrl);
}
?>
<form action="<?php echo
JRoute::_('index.php?option=com_molation&view=m_relations');
?>" method="post" name="adminForm"
id="adminForm">
<?php if(!empty( $this->sidebar)): ?>
	<div id="j-sidebar-container" class="span2">
		<?php echo $this->sidebar; ?>
	</div>
	<div id="j-main-container" class="span10">
<?php else : ?>
	<div id="j-main-container">
<?php endif; ?>
<?php
	// Add the searchtools
	echo JLayoutHelper::render('joomla.searchtools.default',
array('view' => $this));
?>
<?php if (empty($this->items)): ?>
	<div class="alert alert-no-items">
		<?php echo JText::_('JGLOBAL_NO_MATCHING_RESULTS'); ?>
	</div>
<?php else : ?>
	<table class="table table-striped"
id="m_relationList">
		<thead><?php echo
$this->loadTemplate('head');?></thead>
		<tfoot><?php echo
$this->loadTemplate('foot');?></tfoot>
		<tbody><?php echo
$this->loadTemplate('body');?></tbody>
	</table>
	<?php // Load the batch processing form. ?>
	<?php if ($this->canCreate && $this->canEdit) : ?>
		<?php echo JHtml::_(
			'bootstrap.renderModal',
			'collapseModal',
			array(
				'title' =>
JText::_('COM_MOLATION_M_RELATIONS_BATCH_OPTIONS'),
				'footer' =>
$this->loadTemplate('batch_footer')
			),
			$this->loadTemplate('batch_body')
		); ?>
	<?php endif; ?>
	<input type="hidden" name="boxchecked"
value="0" />
	</div>
<?php endif; ?>
	<input type="hidden" name="task" value=""
/>
	<?php echo JHtml::_('form.token'); ?>
</form>
m_relations/tmpl/default_batch_body.php000064400000002347151156754620014371
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.0
	@build			24th July, 2022
	@created		13th July, 2022
	@package		Molation
	@subpackage		default_batch_body.php
	@author			farhad shahbazi <http://lmskaran.ir>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

?>

<p><?php echo
JText::_('COM_MOLATION_M_RELATIONS_BATCH_TIP'); ?></p>
<?php echo $this->batchDisplay;
?>m_relations/tmpl/default_batch_footer.php000064400000002743151156754620014732
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.0
	@build			24th July, 2022
	@created		13th July, 2022
	@package		Molation
	@subpackage		default_batch_footer.php
	@author			farhad shahbazi <http://lmskaran.ir>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

?>
<!-- clear the batch values if cancel -->
<button class="btn" type="button"
onclick="" data-dismiss="modal">
	<?php echo JText::_('JCANCEL'); ?>
</button>
<!-- post the batch values if process -->
<button class="btn btn-success" type="submit"
onclick="Joomla.submitbutton('m_relation.batch');">
	<?php echo JText::_('JGLOBAL_BATCH_PROCESS'); ?>
</button>m_relations/tmpl/default_body.php000064400000007630151156754620013230
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.0
	@build			24th July, 2022
	@created		13th July, 2022
	@package		Molation
	@subpackage		default_body.php
	@author			farhad shahbazi <http://lmskaran.ir>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

$edit =
"index.php?option=com_molation&view=m_relations&task=m_relation.edit";

?>
<?php foreach ($this->items as $i => $item): ?>
	<?php
		$canCheckin = $this->user->authorise('core.manage',
'com_checkin') || $item->checked_out == $this->user->id
|| $item->checked_out == 0;
		$userChkOut = JFactory::getUser($item->checked_out);
		$canDo =
MolationHelper::getActions('m_relation',$item,'m_relations');
	?>
	<tr class="row<?php echo $i % 2; ?>">
		<td class="order nowrap center hidden-phone">
		<?php if ($canDo->get('core.edit.state')): ?>
			<?php
				$iconClass = '';
				if (!$this->saveOrder)
				{
					$iconClass = ' inactive tip-top" hasTooltip"
title="' . JHtml::tooltipText('JORDERINGDISABLED');
				}
			?>
			<span class="sortable-handler<?php echo $iconClass;
?>">
				<i class="icon-menu"></i>
			</span>
			<?php if ($this->saveOrder) : ?>
				<input type="text" style="display:none"
name="order[]" size="5"
				value="<?php echo $item->ordering; ?>"
class="width-20 text-area-order " />
			<?php endif; ?>
		<?php else: ?>
			&#8942;
		<?php endif; ?>
		</td>
		<td class="nowrap center">
		<?php if ($canDo->get('core.edit')): ?>
				<?php if ($item->checked_out) : ?>
					<?php if ($canCheckin) : ?>
						<?php echo JHtml::_('grid.id', $i, $item->id); ?>
					<?php else: ?>
						&#9633;
					<?php endif; ?>
				<?php else: ?>
					<?php echo JHtml::_('grid.id', $i, $item->id); ?>
				<?php endif; ?>
		<?php else: ?>
			&#9633;
		<?php endif; ?>
		</td>
		<td class="nowrap">
			<div class="name">
				<?php if ($canDo->get('core.edit')): ?>
					<a href="<?php echo $edit; ?>&id=<?php echo
$item->id; ?>"><?php echo
JFactory::getUser((int)$item->user)->name; ?></a>
					<?php if ($item->checked_out): ?>
						<?php echo JHtml::_('jgrid.checkedout', $i,
$userChkOut->name, $item->checked_out_time, 'm_relations.',
$canCheckin); ?>
					<?php endif; ?>
				<?php else: ?>
					<?php echo JFactory::getUser((int)$item->user)->name; ?>
				<?php endif; ?>
			</div>
		</td>
		<td class="hidden-phone">
			<?php echo $this->escape($item->module_id); ?>
		</td>
		<td class="center">
		<?php if ($canDo->get('core.edit.state')) : ?>
				<?php if ($item->checked_out) : ?>
					<?php if ($canCheckin) : ?>
						<?php echo JHtml::_('jgrid.published',
$item->published, $i, 'm_relations.', true, 'cb');
?>
					<?php else: ?>
						<?php echo JHtml::_('jgrid.published',
$item->published, $i, 'm_relations.', false, 'cb');
?>
					<?php endif; ?>
				<?php else: ?>
					<?php echo JHtml::_('jgrid.published',
$item->published, $i, 'm_relations.', true, 'cb');
?>
				<?php endif; ?>
		<?php else: ?>
			<?php echo JHtml::_('jgrid.published', $item->published,
$i, 'm_relations.', false, 'cb'); ?>
		<?php endif; ?>
		</td>
		<td class="nowrap center hidden-phone">
			<?php echo $item->id; ?>
		</td>
	</tr>
<?php endforeach;
?>m_relations/tmpl/default_foot.php000064400000002313151156754620013233
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.0
	@build			24th July, 2022
	@created		13th July, 2022
	@package		Molation
	@subpackage		default_foot.php
	@author			farhad shahbazi <http://lmskaran.ir>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

?>
<tr>
	<td colspan="6"><?php echo
$this->pagination->getListFooter(); ?></td>
</tr>m_relations/tmpl/default_head.php000064400000004665151156754620013201
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.0
	@build			24th July, 2022
	@created		13th July, 2022
	@package		Molation
	@subpackage		default_head.php
	@author			farhad shahbazi <http://lmskaran.ir>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

?>
<tr>
	<?php if ($this->canEdit&& $this->canState): ?>
		<th width="1%" class="nowrap center
hidden-phone">
			<?php echo JHtml::_('searchtools.sort', '',
'a.ordering', $this->listDirn, $this->listOrder, null,
'asc', 'JGRID_HEADING_ORDERING',
'icon-menu-2'); ?>
		</th>
		<th width="20" class="nowrap center">
			<?php echo JHtml::_('grid.checkall'); ?>
		</th>
	<?php else: ?>
		<th width="20" class="nowrap center
hidden-phone">
			&#9662;
		</th>
		<th width="20" class="nowrap center">
			&#9632;
		</th>
	<?php endif; ?>
	<th class="nowrap" >
			<?php echo JText::_('COM_MOLATION_M_RELATION_USER_LABEL');
?>
	</th>
	<th class="nowrap hidden-phone" >
			<?php echo JHtml::_('searchtools.sort',
'COM_MOLATION_M_RELATION_MODULE_ID_LABEL',
'a.module_id', $this->listDirn, $this->listOrder); ?>
	</th>
	<?php if ($this->canState): ?>
		<th width="10" class="nowrap center" >
			<?php echo JHtml::_('searchtools.sort',
'COM_MOLATION_M_RELATION_STATUS', 'a.published',
$this->listDirn, $this->listOrder); ?>
		</th>
	<?php else: ?>
		<th width="10" class="nowrap center" >
			<?php echo JText::_('COM_MOLATION_M_RELATION_STATUS');
?>
		</th>
	<?php endif; ?>
	<th width="5" class="nowrap center hidden-phone"
>
			<?php echo JHtml::_('searchtools.sort',
'COM_MOLATION_M_RELATION_ID', 'a.id',
$this->listDirn, $this->listOrder); ?>
	</th>
</tr>m_relations/tmpl/default_toolbar.php000064400000007065151156754620013737
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.0
	@build			24th July, 2022
	@created		13th July, 2022
	@package		Molation
	@subpackage		default_toolbar.php
	@author			farhad shahbazi <http://lmskaran.ir>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

?>
<div id="filter-bar" class="btn-toolbar">
        <div class="filter-search btn-group pull-left">
            <label for="filter_search"
class="element-invisible"><?php echo
JText::_('Search');?></label>
            <input type="text" name="filter_search"
id="filter_search" placeholder="<?php echo
JText::_('JSEARCH_FILTER'); ?>" value="<?php echo
$this->escape($this->state->get('filter.search'));
?>" class="hasTooltip" title="<?php echo
JHtml::tooltipText('Search M_relations'); ?>" />
        </div>
        <div class="btn-group pull-left">
            <button type="submit" class="btn
hasTooltip" title="<?php echo
JHtml::tooltipText('JSEARCH_FILTER_SUBMIT'); ?>"><i
class="icon-search"></i></button>
            <button type="button" class="btn
hasTooltip" title="<?php echo
JHtml::tooltipText('JSEARCH_FILTER_CLEAR'); ?>"
onclick="document.id('filter_search').value='';this.form.submit();"><i
class="icon-remove"></i></button>
        </div>
        <div class="btn-group pull-right hidden-phone">
            <label for="limit"
class="element-invisible"><?php echo
JText::_('JFIELD_PLG_SEARCH_SEARCHLIMIT_DESC');?></label>
            <?php echo $this->pagination->getLimitBox(); ?>
        </div>
        <div class="btn-group pull-right hidden-phone">
            <label for="directionTable"
class="element-invisible"><?php echo
JText::_('JFIELD_ORDERING_DESC');?></label>
            <select name="directionTable"
id="directionTable" class="input-medium"
onchange="Joomla.orderTable()">
                <option value=""><?php echo
JText::_('JFIELD_ORDERING_DESC');?></option>
                <option value="asc" <?php if
($this->listDirn == 'asc') echo
'selected="selected"'; ?>><?php echo
JText::_('JGLOBAL_ORDER_ASCENDING');?></option>
                <option value="desc" <?php if
($this->listDirn == 'desc') echo
'selected="selected"'; ?>><?php echo
JText::_('JGLOBAL_ORDER_DESCENDING');?></option>
            </select>
        </div>
        <div class="btn-group pull-right">
            <label for="sortTable"
class="element-invisible"><?php echo
JText::_('JGLOBAL_SORT_BY');?></label>
            <select name="sortTable" id="sortTable"
class="input-medium" onchange="Joomla.orderTable()">
                <option value=""><?php echo
JText::_('JGLOBAL_SORT_BY');?></option>
                <?php echo JHtml::_('select.options',
$this->getSortFields(), 'value', 'text',
$this->listOrder);?>
            </select>
        </div>
    </div>
<div class="clearfix">
</div>m_relations/tmpl/index.html000064400000000054151156754620012044
0ustar00<html><body
bgcolor="#FFFFFF"></body></html>m_relations/view.html.php000064400000016716151156754620011535
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.0
	@build			24th July, 2022
	@created		13th July, 2022
	@package		Molation
	@subpackage		view.html.php
	@author			farhad shahbazi <http://lmskaran.ir>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

/**
 * Molation View class for the M_relations
 */
class MolationViewM_relations extends JViewLegacy
{
	/**
	 * M_relations view display method
	 * @return void
	 */
	function display($tpl = null)
	{
		if ($this->getLayout() !== 'modal')
		{
			// Include helper submenu
			MolationHelper::addSubmenu('m_relations');
		}

		// Assign data to the view
		$this->items = $this->get('Items');
		$this->pagination = $this->get('Pagination');
		$this->state = $this->get('State');
		$this->user = JFactory::getUser();
		// Load the filter form from xml.
		$this->filterForm = $this->get('FilterForm');
		// Load the active filters.
		$this->activeFilters = $this->get('ActiveFilters');
		// Add the list ordering clause.
		$this->listOrder =
$this->escape($this->state->get('list.ordering',
'a.id'));
		$this->listDirn =
$this->escape($this->state->get('list.direction',
'DESC'));
		$this->saveOrder = $this->listOrder == 'a.ordering';
		// set the return here value
		$this->return_here = urlencode(base64_encode((string)
JUri::getInstance()));
		// get global action permissions
		$this->canDo = MolationHelper::getActions('m_relation');
		$this->canEdit = $this->canDo->get('core.edit');
		$this->canState =
$this->canDo->get('core.edit.state');
		$this->canCreate = $this->canDo->get('core.create');
		$this->canDelete = $this->canDo->get('core.delete');
		$this->canBatch = $this->canDo->get('core.batch');

		// We don't need toolbar in the modal window.
		if ($this->getLayout() !== 'modal')
		{
			$this->addToolbar();
			$this->sidebar = JHtmlSidebar::render();
			// load the batch html
			if ($this->canCreate && $this->canEdit &&
$this->canState)
			{
				$this->batchDisplay = JHtmlBatch_::render();
			}
		}
		
		// Check for errors.
		if (count($errors = $this->get('Errors')))
		{
			throw new Exception(implode("\n", $errors), 500);
		}

		// Display the template
		parent::display($tpl);

		// Set the document
		$this->setDocument();
	}

	/**
	 * Setting the toolbar
	 */
	protected function addToolBar()
	{
		JToolBarHelper::title(JText::_('COM_MOLATION_M_RELATIONS'),
'joomla');
		JHtmlSidebar::setAction('index.php?option=com_molation&view=m_relations');
		JFormHelper::addFieldPath(JPATH_COMPONENT . '/models/fields');

		if ($this->canCreate)
		{
			JToolBarHelper::addNew('m_relation.add');
		}

		// Only load if there are items
		if (MolationHelper::checkArray($this->items))
		{
			if ($this->canEdit)
			{
				JToolBarHelper::editList('m_relation.edit');
			}

			if ($this->canState)
			{
				JToolBarHelper::publishList('m_relations.publish');
				JToolBarHelper::unpublishList('m_relations.unpublish');
				JToolBarHelper::archiveList('m_relations.archive');

				if ($this->canDo->get('core.admin'))
				{
					JToolBarHelper::checkin('m_relations.checkin');
				}
			}

			// Add a batch button
			if ($this->canBatch && $this->canCreate &&
$this->canEdit && $this->canState)
			{
				// Get the toolbar object instance
				$bar = JToolBar::getInstance('toolbar');
				// set the batch button name
				$title = JText::_('JTOOLBAR_BATCH');
				// Instantiate a new JLayoutFile instance and render the batch button
				$layout = new JLayoutFile('joomla.toolbar.batch');
				// add the button to the page
				$dhtml = $layout->render(array('title' => $title));
				$bar->appendButton('Custom', $dhtml, 'batch');
			}

			if ($this->state->get('filter.published') == -2
&& ($this->canState && $this->canDelete))
			{
				JToolbarHelper::deleteList('',
'm_relations.delete', 'JTOOLBAR_EMPTY_TRASH');
			}
			elseif ($this->canState && $this->canDelete)
			{
				JToolbarHelper::trash('m_relations.trash');
			}

			if ($this->canDo->get('core.export') &&
$this->canDo->get('m_relation.export'))
			{
				JToolBarHelper::custom('m_relations.exportData',
'download', '', 'COM_MOLATION_EXPORT_DATA',
true);
			}
		}

		if ($this->canDo->get('core.import') &&
$this->canDo->get('m_relation.import'))
		{
			JToolBarHelper::custom('m_relations.importData',
'upload', '', 'COM_MOLATION_IMPORT_DATA',
false);
		}

		// set help url for this view if found
		$help_url = MolationHelper::getHelpUrl('m_relations');
		if (MolationHelper::checkString($help_url))
		{
				JToolbarHelper::help('COM_MOLATION_HELP_MANAGER', false,
$help_url);
		}

		// add the options comp button
		if ($this->canDo->get('core.admin') ||
$this->canDo->get('core.options'))
		{
			JToolBarHelper::preferences('com_molation');
		}

		// Only load published batch if state and batch is allowed
		if ($this->canState && $this->canBatch)
		{
			JHtmlBatch_::addListSelection(
				JText::_('COM_MOLATION_KEEP_ORIGINAL_STATE'),
				'batch[published]',
				JHtml::_('select.options',
JHtml::_('jgrid.publishedOptions', array('all' =>
false)), 'value', 'text', '', true)
			);
		}

		// Only load access batch if create, edit and batch is allowed
		if ($this->canBatch && $this->canCreate &&
$this->canEdit)
		{
			JHtmlBatch_::addListSelection(
				JText::_('COM_MOLATION_KEEP_ORIGINAL_ACCESS'),
				'batch[access]',
				JHtml::_('select.options',
JHtml::_('access.assetgroups'), 'value',
'text')
			);
		}
	}

	/**
	 * Method to set up the document properties
	 *
	 * @return void
	 */
	protected function setDocument()
	{
		if (!isset($this->document))
		{
			$this->document = JFactory::getDocument();
		}
		$this->document->setTitle(JText::_('COM_MOLATION_M_RELATIONS'));
		$this->document->addStyleSheet(JURI::root() .
"administrator/components/com_molation/assets/css/m_relations.css",
(MolationHelper::jVersion()->isCompatible('3.8.0')) ?
array('version' => 'auto') : 'text/css');
	}

	/**
	 * Escapes a value for output in a view script.
	 *
	 * @param   mixed  $var  The output to escape.
	 *
	 * @return  mixed  The escaped value.
	 */
	public function escape($var)
	{
		if(strlen($var) > 50)
		{
			// use the helper htmlEscape method instead and shorten the string
			return MolationHelper::htmlEscape($var, $this->_charset, true);
		}
		// use the helper htmlEscape method instead.
		return MolationHelper::htmlEscape($var, $this->_charset);
	}

	/**
	 * Returns an array of fields the table can be sorted by
	 *
	 * @return  array  Array containing the field name to sort by as the key
and display text as value
	 */
	protected function getSortFields()
	{
		return array(
			'a.ordering' =>
JText::_('JGRID_HEADING_ORDERING'),
			'a.published' => JText::_('JSTATUS'),
			'a.module_id' =>
JText::_('COM_MOLATION_M_RELATION_MODULE_ID_LABEL'),
			'a.id' => JText::_('JGRID_HEADING_ID')
		);
	}
}
checkin/tmpl/default.php000064400000004340151157555660011302
0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_checkin
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

JHtml::_('bootstrap.tooltip');
JHtml::_('behavior.multiselect');
JHtml::_('formbehavior.chosen', 'select');

$listOrder =
$this->escape($this->state->get('list.ordering'));
$listDirn  =
$this->escape($this->state->get('list.direction'));
?>
<form action="<?php echo
JRoute::_('index.php?option=com_checkin'); ?>"
method="post" name="adminForm"
id="adminForm">
<?php if (!empty( $this->sidebar)) : ?>
	<div id="j-sidebar-container" class="span2">
		<?php echo $this->sidebar; ?>
	</div>
	<div id="j-main-container" class="span10">
<?php else : ?>
	<div id="j-main-container">
<?php endif;?>
		<?php echo
JLayoutHelper::render('joomla.searchtools.default',
array('view' => $this)); ?>
		<?php if ($this->total > 0) : ?>
			<table id="global-checkin" class="table
table-striped">
				<thead>
					<tr>
						<th width="1%"><?php echo
JHtml::_('grid.checkall'); ?></th>
						<th><?php echo JHtml::_('searchtools.sort',
'COM_CHECKIN_DATABASE_TABLE', 'table', $listDirn,
$listOrder); ?></th>
						<th><?php echo JHtml::_('searchtools.sort',
'COM_CHECKIN_ITEMS_TO_CHECK_IN', 'count', $listDirn,
$listOrder); ?></th>
					</tr>
				</thead>
				<tfoot>
					<tr>
						<td colspan="3">
							<?php echo $this->pagination->getListFooter(); ?>
						</td>
					</tr>
				</tfoot>
				<tbody>
					<?php $i = 0; ?>
					<?php foreach ($this->items as $table => $count) : ?>
						<tr class="row<?php echo $i % 2; ?>">
							<td class="center"><?php echo
JHtml::_('grid.id', $i, $table); ?></td>
							<td>
								<label for="cb<?php echo $i ?>">
									<?php echo JText::sprintf('COM_CHECKIN_TABLE',
$table); ?>
								</label>
							</td>
							<td>
								<span class="label label-warning"><?php echo
$count; ?></span>
							</td>
						</tr>
						<?php $i++; ?>
					<?php endforeach; ?>
				</tbody>
			</table>
		<?php endif; ?>
		<input type="hidden" name="task"
value="" />
		<input type="hidden" name="boxchecked"
value="0" />
		<?php echo JHtml::_('form.token'); ?>
	</div>
</form>
checkin/tmpl/default.xml000064400000000320151157555660011305
0ustar00<?xml version="1.0" encoding="utf-8"?>
<metadata>
	<layout title="COM_CHECKIN_CHECKIN_VIEW_DEFAULT_TITLE">
		<message>
			<![CDATA[COM_CHECKIN_CHECKIN_VIEW_DEFAULT_DESC]]>
		</message>
	</layout>
</metadata>
checkin/view.html.php000064400000004176151157555670010627 0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_checkin
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

/**
 * HTML View class for the Checkin component
 *
 * @since  1.0
 */
class CheckinViewCheckin extends JViewLegacy
{
	/**
	 * Unused class variable
	 *
	 * @var  object
	 * @deprecated  4.0
	 */
	protected $tables;

	/**
	 * An array of items
	 *
	 * @var  array
	 */
	protected $items;

	/**
	 * The pagination object
	 *
	 * @var  JPagination
	 */
	protected $pagination;

	/**
	 * The model state
	 *
	 * @var  object
	 */
	protected $state;

	/**
	 * The sidebar markup
	 *
	 * @var  string
	 */
	protected $sidebar;

	/**
	 * Execute and display a template script.
	 *
	 * @param   string  $tpl  The name of the template file to parse;
automatically searches through the template paths.
	 *
	 * @return  mixed  A string if successful, otherwise an Error object.
	 */
	public function display($tpl = null)
	{
		$this->items         = $this->get('Items');
		$this->pagination    = $this->get('Pagination');
		$this->state         = $this->get('State');
		$this->total         = $this->get('Total');
		$this->filterForm    = $this->get('FilterForm');
		$this->activeFilters = $this->get('ActiveFilters');

		// Check for errors.
		if (count($errors = $this->get('Errors')))
		{
			throw new Exception(implode("\n", $errors), 500);
		}

		$this->addToolbar();
		$this->sidebar = JHtmlSidebar::render();

		return parent::display($tpl);
	}

	/**
	 * Add the page title and toolbar.
	 *
	 * @return  void
	 *
	 * @since   1.6
	 */
	protected function addToolbar()
	{
		JToolbarHelper::title(JText::_('COM_CHECKIN_GLOBAL_CHECK_IN'),
'checkin');

		JToolbarHelper::custom('checkin', 'checkin.png',
'checkin_f2.png', 'JTOOLBAR_CHECKIN', true);

		if (JFactory::getUser()->authorise('core.admin',
'com_checkin'))
		{
			JToolbarHelper::divider();
			JToolbarHelper::preferences('com_checkin');
			JToolbarHelper::divider();
		}

		JToolbarHelper::help('JHELP_SITE_MAINTENANCE_GLOBAL_CHECK-IN');
	}
}
mangopaymarket/index.html000064400000000054151157631400011562
0ustar00<html><body
bgcolor="#FFFFFF"></body></html>mangopaymarket/tmpl/bank.php000064400000011656151157631400012177
0ustar00<?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');
?><h1><?php echo JText::_('HIKAM_MANGOPAY_TITLE');
?></h1>
<form action="<?php echo
hikamarket::completeLink('mangopay');?>"
method="post" name="hikamarket_form"
id="hikamarket_mangopay_bank_form">
	<dl class="mangopay_bank_addition dl-horizontal">
		<dt><?php echo JText::_('MANGOPAY_BANK_TYPE');
?></dt>
		<dd><?php
			$values = array(
				'IBAN' => JHTML::_('select.option',
'IBAN', JText::_('MANGOPAY_BANK_TYPE_IBAN')),
				'GB' => JHTML::_('select.option',
'GB', JText::_('MANGOPAY_BANK_TYPE_GB')),
				'US' => JHTML::_('select.option',
'US', JText::_('MANGOPAY_BANK_TYPE_US')),
				'CA' => JHTML::_('select.option',
'CA', JText::_('MANGOPAY_BANK_TYPE_CA')),
				'OTHER' => JHTML::_('select.option',
'OTHER', JText::_('MANGOPAY_BANK_TYPE_OTHER')),
			);
			echo JHTML::_('select.genericlist', $values,
'mangobank[type]', '
onchange="window.localPage.setBankType(this);"',
'value', 'text', 'IBAN');
		?></dd>

		<dt><?php echo JText::_('MANGOPAY_BANK_OWNER_NAME');
?></dt>
		<dd>
			<input type="text" name="mangobank[ownername]"
value=""/>
		</dd>

		<dt><?php echo
JText::_('MANGOPAY_BANK_OWNER_ADDRESS'); ?></dt>
		<dd>
			<input type="text" name="mangobank[owneraddress]"
value=""/>
		</dd>

	</dl>

	<dl id="mangopay_bank_iban"
class="mangopay_bank_addition dl-horizontal">
		<dt><?php echo JText::_('MANGOPAY_BANK_IBAN');
?></dt>
		<dd>
			<input type="text" name="mangobank[iban][iban]"
value=""/>
		</dd>
		<dt><?php echo JText::_('MANGOPAY_BANK_BIC');
?></dt>
		<dd>
			<input type="text" name="mangobank[iban][bic]"
value=""/>
		</dd>
	</dl>

	<dl id="mangopay_bank_gb" class="mangopay_bank_addition
dl-horizontal" style="display:none;">
		<dt><?php echo
JText::_('MANGOPAY_BANK_ACCOUNTNUMBER'); ?></dt>
		<dd>
			<input type="text"
name="mangobank[gb][accountnumber]" value=""/>
		</dd>
		<dt><?php echo JText::_('MANGOPAY_BANK_SORTCODE');
?></dt>
		<dd>
			<input type="text" name="mangobank[gb][sortcode]"
value=""/>
		</dd>
	</dl>

	<dl id="mangopay_bank_us" class="mangopay_bank_addition
dl-horizontal" style="display:none;">
		<dt><?php echo
JText::_('MANGOPAY_BANK_ACCOUNTNUMBER'); ?></dt>
		<dd>
			<input type="text"
name="mangobank[us][accountnumber]" value=""/>
		</dd>
		<dt><?php echo JText::_('MANGOPAY_BANK_ABA');
?></dt>
		<dd>
			<input type="text" name="mangobank[us][aba]"
value=""/>
		</dd>
	</dl>

	<dl id="mangopay_bank_ca" class="mangopay_bank_addition
dl-horizontal" style="display:none;">
		<dt><?php echo JText::_('MANGOPAY_BANK_BANKNAME');
?></dt>
		<dd>
			<input type="text" name="mangobank[ca][bankname]"
value=""/>
		</dd>
		<dt><?php echo
JText::_('MANGOPAY_BANK_INSTITUTIONNUMBER'); ?></dt>
		<dd>
			<input type="text"
name="mangobank[ca][institutionnumber]" value=""/>
		</dd>
		<dt><?php echo JText::_('MANGOPAY_BANK_BRANCHCODE');
?></dt>
		<dd>
			<input type="text"
name="mangobank[ca][branchcode]" value=""/>
		</dd>
		<dt><?php echo
JText::_('MANGOPAY_BANK_ACCOUNTNUMBER'); ?></dt>
		<dd>
			<input type="text"
name="mangobank[ca][accountnumber]" value=""/>
		</dd>
	</dl>

	<dl id="mangopay_bank_other"
class="mangopay_bank_addition dl-horizontal"
style="display:none;">
		<dt><?php echo JText::_('MANGOPAY_BANK_COUNTRY');
?></dt>
		<dd>
			<input type="text"
name="mangobank[other][country]" value=""/>
		</dd>
		<dt><?php echo JText::_('MANGOPAY_BANK_BIC');
?></dt>
		<dd>
			<input type="text" name="mangobank[other][bic]"
value=""/>
		</dd>
		<dt><?php echo
JText::_('MANGOPAY_BANK_ACCOUNTNUMBER'); ?></dt>
		<dd>
			<input type="text"
name="mangobank[other][accountnumber]" value=""/>
		</dd>
	</dl>

	<div>
		<input class="btn btn-primary" value="<?php echo
JText::_('MANGOPAY_SAVE_BANKACCOUNT'); ?>"
type="submit" onclick="return
window.hikamarket.submitform('addbank','hikamarket_mangopay_bank_form');"/>
		<div style="float:right">
			<a class="btn btn-info" href="<?php echo
hikamarket::completeLink('mangopay'); ?>"><?php
echo JText::_('HIKA_CANCEL'); ?></a>
		</div>
	</div>

	<input type="hidden" name="option"
value="<?php echo HIKAMARKET_COMPONENT; ?>"/>
	<input type="hidden" name="task"
value="bank"/>
	<input type="hidden" name="ctrl"
value="mangopay"/>
	<?php echo JHTML::_('form.token'); ?>
</form>
<script type="text/javascript">
if(!window.localPage)
	window.localPage = {};
window.localPage.bankType = 'iban';
window.localPage.setBankType = function(el) {
	var d = document, e = null;
	e = d.getElementById('mangopay_bank_' +
window.localPage.bankType);
	if(e) e.style.display = 'none';

	window.localPage.bankType = el.value.toLowerCase();

	e = d.getElementById('mangopay_bank_' +
window.localPage.bankType);
	if(e) e.style.display = '';
};
</script>
mangopaymarket/tmpl/document.php000064400000004062151157631400013073
0ustar00<?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');
?><h1><?php echo JText::_('HIKAM_MANGOPAY_TITLE');
?></h1>
<form action="<?php echo
hikamarket::completeLink('mangopay');?>"
method="post" name="hikamarket_form"
id="hikamarket_mangopay_document_form"
enctype="multipart/form-data">
	<dl class="mangopay_documents dl-horizontal">
		<dt><?php
			echo JText::_('MANGOPAY_DOCUMENT_TYPE');
		?></dt>
		<dd><?php
			$values = array(
				'IDENTITY_PROOF' => JHTML::_('select.option',
'IDENTITY_PROOF',
JText::_('MANGOPAY_DOC_IDENTITY_PROOF')),
				'REGISTRATION_PROOF' =>
JHTML::_('select.option', 'REGISTRATION_PROOF',
JText::_('MANGOPAY_DOC_REGISTRATION_PROOF')),
				'ARTICLES_OF_ASSOCIATION' =>
JHTML::_('select.option', 'ARTICLES_OF_ASSOCIATION',
JText::_('MANGOPAY_DOC_ARTICLES_OF_ASSOCIATION')),
				'SHAREHOLDER_DECLARATION' =>
JHTML::_('select.option', 'SHAREHOLDER_DECLARATION',
JText::_('MANGOPAY_DOC_SHAREHOLDER_DECLARATION')),
			);
			echo JHTML::_('select.genericlist', $values,
'mangodoc[type]', '', 'value',
'text', '');
		?></dd>

		<dt><?php
			echo JText::_('MANGOPAY_DOCUMENT_FILE');
		?></dt>
		<dd>
			<input type="file" name="mangodoc_page"/>
		</dd>
	</dl>

	<div>
		<input class="btn btn-primary" value="<?php echo
JText::_('MANGOPAY_ADD_DOCUMENT'); ?>"
type="submit" onclick="return
window.hikamarket.submitform('adddocument','hikamarket_mangopay_document_form');"/>
		<div style="float:right">
			<a class="btn btn-info" href="<?php echo
hikamarket::completeLink('mangopay'); ?>"><?php
echo JText::_('HIKA_CANCEL'); ?></a>
		</div>
	</div>
	<div style="clear:both"></div>

	<input type="hidden" name="option"
value="<?php echo HIKAMARKET_COMPONENT; ?>"/>
	<input type="hidden" name="task"
value="bank"/>
	<input type="hidden" name="ctrl"
value="mangopay"/>
	<?php echo JHTML::_('form.token'); ?>
</form>
mangopaymarket/tmpl/index.html000064400000000054151157631400012536
0ustar00<html><body
bgcolor="#FFFFFF"></body></html>mangopaymarket/tmpl/payout.php000064400000005077151157631400012605
0ustar00<?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');
?><h1><?php echo JText::_('HIKAM_MANGOPAY_TITLE');
?></h1>
<form action="<?php echo
hikamarket::completeLink('mangopay');?>"
method="post" name="hikamarket_form"
id="hikamarket_mangopay_payout_form">
	<dl class="mangopay_payout dl-horizontal">
		<dt><?php echo JText::_('MANGOPAY_CURRENT_BALANCE');
?></dt>
		<dd><?php echo
$this->currencyClass->format($this->mango_wallet->Balance->Amount
/ 100, $this->currency_id); ?></dd>
		<dt><?php echo JText::_('MANGOPAY_AUTHORIZED_PAYOUT');
?></dt>
		<dd><?php echo
$this->currencyClass->format($this->maximum_authorized,
$this->currency_id); ?></dd>
	</dl>
	<dl class="mangopay_payout dl-horizontal">
		<dt><?php echo JText::_('MANGOPAY_PAYOUT_VALUE');
?></dt>
		<dd>
			<input type="text" value="<?php echo
number_format($this->maximum_authorized, 2, '.',
''); ?>" placeholder="<?php echo
number_format($this->maximum_authorized, 2, '.',
''); ?>" name="payout[value]"/>
			<?php echo $this->mango_wallet->Balance->Currency;?>
		</dd>
		<dt><?php echo JText::_('MANGOPAY_PAYOUT_BANK');
?></dt>
		<dd><?php
			if(empty($this->mango_bank_accounts)) {
				echo '<em>' .
JText::_('MANGOPAY_NO_BANK_ACCOUNT') . '</em>';
			} else {
				$bank_accounts = array();
				foreach($this->mango_bank_accounts as $bank_account) {
					$bank_accounts[] = JHTML::_('select.option',
$bank_account->Id, $bank_account->OwnerName . ' ' .
$bank_account->OwnerAddress . ' (' . $bank_account->Type .
')');
				}
				echo JHTML::_('select.genericlist', $bank_accounts,
'payout[bank]', ' style="width:100%"',
'value', 'text', '');
			}
		?></dd>
	</dl>
	<div>
		<input class="btn btn-primary" value="<?php echo
JText::_('MANGOPAY_PAYOUT'); ?>" type="submit"
onclick="return
window.hikamarket.submitform('dopayout','hikamarket_mangopay_payout_form');"/>
		<div style="float:right">
			<a class="btn btn-info" href="<?php echo
hikamarket::completeLink('mangopay'); ?>"><?php
echo JText::_('HIKA_CANCEL'); ?></a>
		</div>
	</div>
	<div style="clear:both"></div>
	<input type="hidden" name="payout[wallet]"
value="<?php echo $this->walletId; ?>"/>

	<input type="hidden" name="option"
value="<?php echo HIKAMARKET_COMPONENT; ?>"/>
	<input type="hidden" name="task"
value="payout"/>
	<input type="hidden" name="ctrl"
value="mangopay"/>
	<?php echo JHTML::_('form.token'); ?>
</form>
mangopaymarket/tmpl/show.php000064400000022460151157631400012237
0ustar00<?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');
?><h1><?php echo JText::_('HIKAM_MANGOPAY_TITLE');
?></h1>
<form action="<?php echo
hikamarket::completeLink('mangopay');?>"
method="post" name="hikamarket_form"
id="hikamarket_mangopay_form">
	<ul class="hikam_tabs"
rel="tabs:hikamarket_mangopay_tab_">
		<li class="active"><a href="#wallet"
rel="tab:1" onclick="return
window.hikamarket.switchTab(this);"><?php echo
JText::_('HIKAM_MANGO_WALLET'); ?></a></li>
		<li><a href="#bank" rel="tab:2"
onclick="return window.hikamarket.switchTab(this);"><?php
echo JText::_('HIKAM_MANGO_BANK'); ?></a></li>
		<li><a href="#profile" rel="tab:3"
onclick="return window.hikamarket.switchTab(this);"><?php
echo JText::_('HIKAM_MANGO_PROFILE'); ?></a></li>
		<li><a href="#document" rel="tab:4"
onclick="return window.hikamarket.switchTab(this);"><?php
echo JText::_('HIKAM_MANGO_DOCUMENTS');
?></a></li>
	</ul>
	<div style="clear:both"></div>

<div id="hikamarket_mangopay_tab_1">
<?php
	if(count($this->mango_wallets) == 1) {
		$wallet = reset($this->mango_wallets);
?>
	<dl class="mangopay_wallet_details dl-horizontal">
		<dt><?php echo JText::_('CURRENCY'); ?></dt>
		<dd><?php echo $wallet->Currency; ?></dd>
		<dt><?php echo JText::_('MANGOPAY_BALANCE');
?></dt>
		<dd><?php
			$currency_id =
$this->convertCurrency($wallet->Balance->Currency);
			$amount = (float)hikamarket::toFloat($wallet->Balance->Amount) /
100;
			echo $this->currencyClass->format($amount, $currency_id);
		?></dd>
		<dt><?php echo JText::_('MANGOPAY_PAYOUT');
?></dt>
		<dd><?php
			if($amount > 0)
				echo '<a
href="'.hikamarket::completeLink('mangopay&task=payout&wallet='.(int)$wallet->Id).'">'.JText::_('MANGOPAY_DO_PAYOUT').'</a>';
			else
				echo
'<em>'.JText::_('MANGOPAY_NO_PAYOUT').'</em>';
		?></dd>
	</dl>
<?php
	} else {
?>
	<table class="hikam_listing <?php echo
(HIKASHOP_RESPONSIVE)?'table table-striped
table-hover':'hikam_table'; ?>"
style="width:100%">
		<thead>
			<tr>
				<th><?php echo JText::_('CURRENCY');
?></th>
				<th><?php echo JText::_('MANGOPAY_BALANCE');
?></th>
				<th><?php echo JText::_('MANGOPAY_PAYOUT');
?></th>
			</tr>
		</thead>
		<tbody>
<?php
		foreach($this->mango_wallets as $wallet) {
?>
			<tr>
				<td><?php echo $wallet->Currency; ?></td>
				<td><?php
					$currency_id =
$this->convertCurrency($wallet->Balance->Currency);
					$amount = (float)hikamarket::toFloat($wallet->Balance->Amount) /
100;
					echo $this->currencyClass->format($amount, $currency_id);
				?></td>
				<td><?php
					if($amount > 0)
						echo '<a class="btn btn-success"
href="'.hikamarket::completeLink('mangopay&task=payout&wallet='.(int)$wallet->Id).'">'.JText::_('MANGOPAY_DO_PAYOUT').'</a>';
					else
						echo
'<em>'.JText::_('MANGOPAY_NO_PAYOUT').'</em>';
				?></td>
			</tr>
<?php
		}
?>
		</tbody>
	</table>
<?php
	}
?>
</div>

<div id="hikamarket_mangopay_tab_2"
style="display:none;">
<?php
	if(!empty($this->mango_bank_accounts)) {
?>
	<table class="hikam_listing <?php echo
(HIKASHOP_RESPONSIVE)?'table table-striped
table-bordered':'hikam_table'; ?>"
style="width:100%">
		<thead>
			<tr>
				<th><?php echo JText::_('MANGOPAY_BANK_TYPE');
?></th>
				<th><?php echo JText::_('MANGOPAY_BANK_OWNER_NAME');
?></th>
				<th><?php echo
JText::_('MANGOPAY_BANK_OWNER_ADDRESS'); ?></th>
			</tr>
		</thead>
		<tbody>
<?php
			foreach($this->mango_bank_accounts as $bank) {
?>
			<tr>
				<td><?php echo $this->escape($bank->Type);
?></td>
				<td><?php echo $this->escape($bank->OwnerName);
?></td>
				<td><?php echo $this->escape($bank->OwnerAddress);
?></td>
			</tr>
			<tr><td colspan="3">
				<dl class="mangopay_bank_details
dl-horizontal"><?php
					foreach($bank->Details as $k => $v) {
						echo
'<dt>'.JText::_('MANGOPAY_BANK_'.$k).'</dt>'.
							'<dd>'.$this->escape($v).'</dd>';
					}
				?></dl>
			</td></tr>
<?php
		}
?>
		</tbody>
	</table>
<?php
	} else {
		echo
'<p><em>'.JText::_('MANGOPAY_NO_BANKACOUNT').'</em></p>';
	}
?>
	<a class="btn btn-info" href="<?php echo
hikamarket::completeLink('mangopay&task=bank');
?>"><?php echo
JText::_('MANGOPAY_ADD_BANKACCOUNT'); ?></a>
</div>

<div id="hikamarket_mangopay_tab_3"
style="display:none;">
	<dl class="mangopay_profile_main dl-horizontal">
		<dt><?php
			echo JText::_('HIKA_NAME');
		?></dt>
		<dd><input type="text" name="mango[name]"
value="<?php echo
$this->escape($this->mango_vendor->Name);
?>"/></dd>
		<dt><?php
			echo JText::_('MANGOPAY_EMAIL');
		?></dt>
		<dd><input type="text" name="mango[email]"
value="<?php echo
$this->escape($this->mango_vendor->Email);
?>"/></dd>
		<dt><?php
			echo JText::_('MANGOPAY_LEGALPERSONTYPE');
		?></dt>
		<dd><?php
			$values = array(
				'BUSINESS' => JHTML::_('select.option',
'BUSINESS', JText::_('MANGOPAY_PERSONTYPE_BUSINESS')),
				'ORGANIZATION' => JHTML::_('select.option',
'ORGANIZATION',
JText::_('MANGOPAY_PERSONTYPE_ORGANIZATION')),
				'SOLETRADER' => JHTML::_('select.option',
'SOLETRADER',
JText::_('MANGOPAY_PERSONTYPE_SOLETRADER')),
			);
			echo JHTML::_('select.genericlist', $values,
'mango[legalpersontype]', '', 'value',
'text', $this->mango_vendor->LegalPersonType);
		?></dd>
		<dt><?php
			echo JText::_('MANGOPAY_HEADQUARTERSADDRESS');
		?></dt>
		<dd><input type="text"
name="mango[headquartersaddress]" value="<?php echo
$this->escape($this->mango_vendor->HeadquartersAddress);
?>"/></dd>
	</dl>

	<h3><?php echo
JText::_('MANGOPAY_LEGALREPRESENTATIVE'); ?></h3>
	<dl class="mangopay_profile_legal dl-horizontal">
		<dt><?php
			echo JText::_('MANGOPAY_LEGALREPRESENTATIVEFIRSTNAME');
		?></dt>
		<dd><input type="text"
name="mango[legalrepresentativefirstname]" value="<?php
echo
$this->escape($this->mango_vendor->LegalRepresentativeFirstName);
?>"/></dd>
		<dt><?php
			echo JText::_('MANGOPAY_LEGALREPRESENTATIVELASTNAME');
		?></dt>
		<dd><input type="text"
name="mango[legalrepresentativelastname]" value="<?php
echo
$this->escape($this->mango_vendor->LegalRepresentativeLastName);
?>"/></dd>
		<dt><?php
			echo JText::_('MANGOPAY_LEGALREPRESENTATIVEADDRESS');
		?></dt>
		<dd><input type="text"
name="mango[legalrepresentativeaddress]" value="<?php
echo
$this->escape($this->mango_vendor->LegalRepresentativeAddress);
?>"/></dd>
		<dt><?php
			echo JText::_('MANGOPAY_LEGALREPRESENTATIVEEMAIL');
		?></dt>
		<dd><input type="text"
name="mango[legalrepresentativeemail]" value="<?php echo
$this->escape($this->mango_vendor->LegalRepresentativeEmail);
?>"/></dd>
		<dt><?php
			echo JText::_('MANGOPAY_LEGALREPRESENTATIVEBIRTHDAY');
		?></dt>
		<dd><?php
			$birthday =
(int)$this->mango_vendor->LegalRepresentativeBirthday;
			if(empty($birthday))
				$birthday = time();
			echo JHTML::_('calendar',
hikamarket::getDate($birthday,'%Y-%m-%d'),
'mango[legalrepresentativebirthday]','mango_legalrepresentativebirthday','%Y-%m-%d',array('size'
=> '20'));
		?></dd>
		<dt><?php
			echo JText::_('MANGOPAY_LEGALREPRESENTATIVENATIONALITY');
		?></dt>
		<dd><?php
			$countries = $this->getCountryList();
			echo JHTML::_('select.genericlist', $countries,
'mango[legalrepresentativenationality]', '',
'value', 'text',
$this->mango_vendor->LegalRepresentativeNationality);
		?></dd>
		<dt><?php
			echo
JText::_('MANGOPAY_LEGALREPRESENTATIVECOUNTRYOFRESIDENCE');
		?></dt>
		<dd><?php
			echo JHTML::_('select.genericlist', $countries,
'mango[legalrepresentativecountryofresidence]', '',
'value', 'text',
$this->mango_vendor->LegalRepresentativeCountryOfResidence);
		?></dd>
	</dl>

	<input class="btn btn-primary" value="<?php echo
JText::_('HIKA_SAVE'); ?>" type="submit"
onclick="return
window.hikamarket.submitform('save','hikamarket_mangopay_form');"/>
</div>

<div id="hikamarket_mangopay_tab_4"
style="display:none;">
	<dl class="mangopay_profile_documents dl-horizontal">
		<dt><?php
			echo JText::_('MANGOPAY_STATUTE');
		?></dt>
		<dd><?php
			if($this->mango_vendor->Statute == null) {
				echo '<em>' . JText::_('HIKA_NONE') .
'</em>';
			} else {
				echo $this->escape($this->mango_vendor->Statute);
			}
		?></dd>
		<dt><?php
			echo JText::_('MANGOPAY_PROOF_REGISTRATION');
		?></dt>
		<dd><?php
			if($this->mango_vendor->ProofOfRegistration == null) {
				echo '<em>' . JText::_('HIKA_NONE') .
'</em>';
			} else {
				echo $this->escape($this->mango_vendor->ProofOfRegistration);
			}
		?></dd>
<?php
		if($this->mango_vendor->LegalPersonType == 'BUSINESS') {
?>
		<dt><?php
			echo JText::_('MANGOPAY_SHAREHOLDER_DECLARATION');
		?></dt>
		<dd><?php
			if($this->mango_vendor->ShareholderDeclaration == null) {
				echo '<em>' . JText::_('HIKA_NONE') .
'</em>';
			} else {
				echo
$this->escape($this->mango_vendor->ShareholderDeclaration);
			}
		?></dd>
<?php
		}
?>
	</dl>
	<a class="btn btn-info" href="<?php echo
hikamarket::completeLink('mangopay&task=document');
?>"><?php echo JText::_('MANGOPAY_ADD_DOCUMENT');
?></a>
</div>

	<input type="hidden" name="option"
value="<?php echo HIKAMARKET_COMPONENT; ?>"/>
	<input type="hidden" name="task"
value="show"/>
	<input type="hidden" name="ctrl"
value="mangopay"/>
	<?php echo JHTML::_('form.token'); ?>
</form>
mangopaymarket/view.html.php000064400000013655151157631400012226
0ustar00<?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 mangopaymarketViewmangopaymarket extends HikamarketView {
	public function display($tpl = null, $params = array()) {
		$this->params =& $params;
		$fct = $this->getLayout();
		if(method_exists($this, $fct)) {
			if($this->$fct() === false)
				return;
		}
		parent::display($tpl);
	}

	protected function loadCSS() {
		$doc = JFactory::getDocument();
		$doc->addStyleSheet(JURI::base(true).'/plugins/hikamarket/mangopay/media/mangopay.css?v='.HIKAMARKET_RESSOURCE_VERSION);
	}

	public function show() {
		$this->loadCSS();

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

		$this->vendor = hikamarket::loadVendor(true);
		if(is_string($this->vendor->vendor_params) &&
!empty($this->vendor->vendor_params))
			$this->vendor->vendor_params =
hikamarket::unserialize($this->vendor->vendor_params);

		$this->currencyClass =
hikamarket::get('shop.class.currency');
		$this->mangoClass = hikamarket::get('class.plg_mangopay');

		$this->mangopayPlugin = $this->mangoClass->getMangoPlugin();
		$this->api = $this->mangoClass->getMangoAPI();
		$this->mango_vendor = null;
		$this->mango_wallets = null;
		$this->mango_bank_accounts = null;

		$this->mango_vendor =
$this->mangopayPlugin->getVendor($this->vendor);

		if(!empty($this->mango_vendor->Id)) {

			$this->mango_wallets =
$this->mangopayPlugin->getVendorWallets($this->vendor);

			if(empty($this->mango_wallets)) {
				$wallet =
$this->mangopayPlugin->getVendorWallet($this->vendor, null,
true);
				$this->mango_wallets[ strtolower($wallet->Currency) ] = $wallet;
			}

			try {

				$this->mango_bank_accounts =
$this->api->Users->GetBankAccounts($this->mango_vendor->Id);

			}
			catch (MangoPay\ResponseException $e) {
$this->mangoClass->mangoDebug($e, true); }
			catch (MangoPay\Exception $e) { $this->mangoClass->mangoDebug($e,
false); }
			catch (Exception $e) {}
		}

		$this->toolbar = array(
			array(
				'icon' => 'back',
				'name' => JText::_('HIKA_BACK'),
				'url' => hikamarket::completeLink('vendor')
			)
		);
	}

	public function payout() {
		$this->loadCSS();

		$config = hikamarket::config();
		$shopConfig = hikamarket::config(false);
		$app = JFactory::getApplication();

		$this->vendor = hikamarket::loadVendor(true);
		if(is_string($this->vendor->vendor_params) &&
!empty($this->vendor->vendor_params))
			$this->vendor->vendor_params =
hikamarket::unserialize($this->vendor->vendor_params);

		$walletId = hikaInput::get()->getInt('wallet', 0);
		if(empty($walletId)) {
			$app->enqueueMessage(JText::_('MANGO_INVALID_REQUEST'));
			$app->redirect( hikamarket::completeLink('mangopay', false,
true, false) );
		}

		$this->currencyClass =
hikamarket::get('shop.class.currency');
		$this->mangoClass = hikamarket::get('class.plg_mangopay');

		$this->mangopayPlugin = $this->mangoClass->getMangoPlugin();

		$this->mango_vendor =
$this->mangopayPlugin->getVendor($this->vendor);
		if(empty($this->mango_vendor->Id)) {
			$app->enqueueMessage(JText::_('MANGO_INVALID_REQUEST'));
			$app->redirect( hikamarket::completeLink('mangopay', false,
true, false) );
		}

		$this->api = $this->mangoClass->getMangoAPI();
		$this->mango_wallets = null;
		$this->mango_bank_accounts = null;

		$mango_wallets =
$this->mangopayPlugin->getVendorWallets($this->vendor);
		$this->mango_wallet = null;
		foreach($mango_wallets as $mango_wallet) {
			if((int)$mango_wallet->Id == $walletId) {
				$this->mango_wallet = $mango_wallet;
				break;
			}
		}
		if(empty($this->mango_wallet)) {
			$app->enqueueMessage(JText::_('MANGO_INVALID_WALLET'));
			$app->redirect( hikamarket::completeLink('mangopay', false,
true, false) );
		}
		$this->assignRef('walletId', $walletId);

		$duration = 31;
		if(isset($this->mangopayPlugin->params))
			$duration =
(int)$this->mangopayPlugin->params->get('payout_waiting_duration',
31);
		if($duration <= 0)
			$duration = 31;

		$this->currency_id =
$this->convertCurrency($this->mango_wallet->Balance->Currency);
		$this->transactions =
$this->mangoClass->getTransactions($this->mango_wallet->Id,
$duration);

		$this->transactions_total = 0.0;
		foreach($this->transactions as $transaction) {
			if($transaction->Nature == 'REGULAR')
				$this->transactions_total +=
($transaction->CreditedFunds->Amount / 100);

			if($transaction->Nature == 'REFUND')
				$this->transactions_total -=
($transaction->CreditedFunds->Amount / 100);
		}
		if($this->transactions_total < 0)
			$this->transactions_total = 0.0;

		$this->maximum_authorized =
($this->mango_wallet->Balance->Amount / 100) -
$this->transactions_total;
		if($this->maximum_authorized < 0)
			$this->maximum_authorized = 0.0;

		try {

			$this->mango_bank_accounts =
$this->api->Users->GetBankAccounts($this->mango_vendor->Id);

		}
		catch (MangoPay\ResponseException $e) {
$this->mangoClass->mangoDebug($e, true); }
		catch (MangoPay\Exception $e) { $this->mangoClass->mangoDebug($e,
false); }
		catch (Exception $e) {}
	}

	public function document() {
	}

	public function getCountryList() {
		if(empty($this->mangopayPlugin))
			$this->mangopayPlugin = $this->mangoClass->getMangoPlugin();
		$countries = $this->mangopayPlugin->getCountryList();
		$ret = array();
		foreach($countries as $country) {
			$ret[] = JHTML::_('select.option', $country, $country);
		}
		return $ret;
	}

	protected function convertCurrency($currency_code) {
		$db = JFactory::getDBO();
		$query = 'SELECT currency_id FROM ' .
hikamarket::table('shop.currency') . ' WHERE currency_code =
' . $db->Quote(strtoupper(trim($currency_code)));
		$db->setQuery($query);
		$ret = (int)$db->loadResult();
		return $ret;
	}
}
gateway/tmpl/edit.php000064400000003447151160174530010632 0ustar00<?php
/**
 * This file is part of Joomla Estate Agency - Joomla! extension for real
estate agency
 *
 * @package     Joomla.Administrator
 * @subpackage  com_jea
 * @copyright   Copyright (C) 2008 - 2020 PHILIP Sylvain. All rights
reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

/**
 * @var $this JeaViewGateway
 */
JHtml::stylesheet('media/com_jea/css/jea.admin.css');
?>

<form action="" method="post"
id="adminForm" class="form-validate">

	<div class="form-horizontal">
		<div class="control-group">
			<div class="control-label"><?php echo
$this->form->getLabel('title') ?></div>
			<div class="controls"><div
class="input-append"><?php echo
$this->form->getInput('title')
?></div></div>
		</div>

		<div class="control-group">
			<div class="control-label"><?php echo
$this->form->getLabel('provider') ?></div>
			<div class="controls"><div
class="input-append"><?php echo
$this->form->getInput('provider')
?></div></div>
		</div>

		<div class="control-group">
			<div class="control-label"><?php echo
$this->form->getLabel('published') ?></div>
			<div class="controls"><div
class="input-append"><?php echo
$this->form->getInput('published')
?></div></div>
		</div>
	</div>

	<fieldset>
		<legend><?php echo
JText::_('COM_JEA_GATEWAY_PARAMS')?></legend>

		<?php if (!empty($this->item->id)): ?>
		<div class="form-horizontal">
			<?php foreach ($this->form->getGroup('params') as
$field) echo $field->renderField() ?>
		</div>
		<?php else : ?>
		<p><?php echo
JText::_('COM_JEA_GATEWAY_PARAMS_APPEAR_AFTER_SAVE')?></p>
		<?php endif?>
	</fieldset>

	<div>
		<input type="hidden" name="task"
value="" />
		<?php echo $this->form->getInput('id') ?>
		<?php echo $this->form->getInput('type') ?>
		<?php echo JHtml::_('form.token') ?>
	</div>
</form>
gateway/view.html.php000064400000003104151160174530010634 0ustar00<?php
/**
 * This file is part of Joomla Estate Agency - Joomla! extension for real
estate agency
 *
 * @package     Joomla.Administrator
 * @subpackage  com_jea
 * @copyright   Copyright (C) 2008 - 2020 PHILIP Sylvain. All rights
reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

/**
 * Gateway View
 *
 * @package     Joomla.Administrator
 * @subpackage  com_jea
 *
 * @since       2.0
 */
class JeaViewGateway extends JViewLegacy
{
	/**
	 * The form object
	 *
	 * @var JForm
	 */
	protected $form;

	/**
	 * The database record
	 *
	 * @var JObject|boolean
	 */
	protected $item;

	/**
	 * The model state
	 *
	 * @var JObject
	 */
	protected $state;

	/**
	 * Overrides parent method.
	 *
	 * @param   string  $tpl  The name of the template file to parse.
	 *
	 * @return  mixed  A string if successful, otherwise an Error object.
	 *
	 * @see     JViewLegacy::display()
	 */
	public function display($tpl = null)
	{
		JeaHelper::addSubmenu('tools');

		$this->state = $this->get('State');

		$title = JText::_('COM_JEA_GATEWAYS');

		$this->item = $this->get('Item');

		switch ($this->_layout)
		{
			case 'edit':
				$this->form = $this->get('Form');

				JToolBarHelper::apply('gateway.apply');
				JToolBarHelper::save('gateway.save');
				JToolBarHelper::cancel('gateway.cancel');
				$isNew = ($this->item->id == 0);
				$title .= ' : ' . ($isNew ?
JText::_('JACTION_CREATE') : JText::_('JACTION_EDIT') .
' : ' . $this->item->title);
				break;
		}

		JToolBarHelper::title($title, 'jea');

		parent::display($tpl);
	}
}
gateways/tmpl/import.php000064400000001411151160174530011367
0ustar00<?php
/**
 * This file is part of Joomla Estate Agency - Joomla! extension for real
estate agency
 *
 * @package     Joomla.Administrator
 * @subpackage  com_jea
 * @copyright   Copyright (C) 2008 - 2020 PHILIP Sylvain. All rights
reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

/**
 * @var $this JeaViewGateways
 */

JHtml::stylesheet('media/com_jea/css/jea.admin.css');
?>

<div id="j-sidebar-container" class="span2">
	<?php echo $this->sidebar?>
</div>

<div id="j-main-container" class="span10">
	<?php echo JLayoutHelper::render('jea.gateways.nav',
array('action' => 'import', 'view' =>
'console'))?>
	<?php echo JLayoutHelper::render('jea.gateways.consoles',
array('action' => 'import')) ?>
</div>gateways/tmpl/default.php000064400000014045151160174530011510
0ustar00<?php
/**
 * This file is part of Joomla Estate Agency - Joomla! extension for real
estate agency
*
* @package     Joomla.Administrator
* @subpackage  com_jea
* @copyright   Copyright (C) 2008 - 2020 PHILIP Sylvain. All rights
reserved.
* @license     GNU General Public License version 2 or later; see
LICENSE.txt
*/

defined('_JEXEC') or die;

/**
 * @var $this JeaViewGateways
 */

JHtml::stylesheet('media/com_jea/css/jea.admin.css');
JHtml::_('behavior.multiselect');

$listOrder     =
$this->escape($this->state->get('list.ordering'));
$listDirection =
$this->escape($this->state->get('list.direction'));

if ($listOrder == 'ordering')
{
	$saveOrderingUrl =
'index.php?option=com_jea&task=gateways.saveOrderAjax&tmpl=component';
	JHtml::_('sortablelist.sortable', 'gateways-list',
'adminForm', strtolower($listDirection), $saveOrderingUrl);
}

$script = <<<JS
jQuery(document).ready(function($) {

	$('.show-logs').click( function(e) {
		$('#modal').data('gatewayId',
$(this).data('gatewayId'));
		e.preventDefault();
	});

	$('#modal').modal({show: false}).on('shown.bs.modal',
function(e) {

		var gatewayId = $(this).data('gatewayId');

		$.get('index.php', {option : 'com_jea', task
:'gateway.getLogs', id: gatewayId}, function(response) {
			$('#logs').text(response);
		});

		$(this).find('a').each(function() {
			this.href = this.href.replace(/id=[0-9]*/, 'id=' + gatewayId);
		});

		$('.ajax-refresh-logs').click( function(e) {
			$.get( this.href, {}, function(response) {
				$('#logs').text(response);
			});
			e.preventDefault();
		});

	}).on('hide.bs.modal', function () {
		$('#logs').empty();
	});
});
JS;

$document = JFactory::getDocument();
$document->addScriptDeclaration($script);
?>

<div id="j-sidebar-container" class="span2">
	<?php echo $this->sidebar ?>
</div>

<div id="j-main-container" class="span10">

	<?php echo JLayoutHelper::render('jea.gateways.nav',
array('action' =>
$this->state->get('filter.type'), 'view' =>
'gateways'), JPATH_COMPONENT_ADMINISTRATOR )?>

	<hr />
	<form action="<?php echo
JRoute::_('index.php?option=com_jea&view=gateways')
?>" method="post" name="adminForm"
id="adminForm">

		<table class="table table-striped"
id="gateways-list">
			<thead>
				<tr>
					<th width="1%" class="nowrap center">
						<?php echo JHtml::_('grid.sort', '',
'ordering', $listDirection, $listOrder, null, 'asc',
'JGRID_HEADING_ORDERING', 'icon-menu-2'); ?>
					</th>

					<th width="1%" class="nowrap">
						<?php echo JHtml::_('grid.checkall') ?>
					</th>

					<th width="1%" class="nowrap">
						<?php echo JHtml::_('grid.sort', 'JSTATUS',
'published', $listDirection , $listOrder ) ?>
					</th>

					<th width="86%" class="nowrap">
						<?php echo JHtml::_('grid.sort',
'JGLOBAL_TITLE', 'title', $listDirection , $listOrder )
?>
					</th>

					<th width="5%" class="nowrap center">
						<?php echo JText::_('COM_JEA_LOGS') ?>
					</th>

					<th width="5%" class="nowrap center">
						<?php echo JHtml::_('grid.sort',
'COM_JEA_GATEWAY_FIELD_PROVIDER_LABEL', 'provider',
$listDirection , $listOrder ) ?>
					</th>

					<th width="1%" class="nowrap hidden-phone">
						<?php echo JHtml::_('grid.sort',
'JGRID_HEADING_ID', 'id', $listDirection, $listOrder);
?>
					</th>
				</tr>
			</thead>

			<tfoot>
				<tr>
					<td colspan="12"></td>
				</tr>
			</tfoot>

			<tbody>
				<?php foreach ($this->items as $i => $item) : ?>
				<tr class="row<?php echo $i % 2 ?>">
					<td width="1%" class="order nowrap center
hidden-phone">
					<?php
					$iconClass = '';
					if ($listOrder != 'ordering') $iconClass = ' inactive
tip-top hasTooltip" title="' .
JHtml::tooltipText('JORDERINGDISABLED');
					?>
						<span class="sortable-handler<?php echo $iconClass
?>"><span
class="icon-menu"></span></span>
					<?php if ($listOrder == 'ordering') : ?>
						<input type="text" style="display:none"
name="order[]" size="5" value="<?php echo
$item->ordering ?>" class="width-20 text-area-order "
/>
					<?php endif ?>
					</td>

					<td class="nowrap center">
						<?php echo JHtml::_('grid.id', $i, $item->id) ?>
					</td>

					<td width="1%" class="nowrap center">
						<?php echo JHtml::_('jgrid.published',
$item->published, $i, 'gateways.', true, 'cb') ?>
					</td>

					<td width="86%" class="title">
						<a href="<?php echo
JRoute::_('index.php?option=com_jea&task=gateway.edit&type='.
$this->state->get('filter.type')
.'&id='.(int) $item->id) ?>">
						<?php echo $item->title ?></a>
					</td>
					<td width="5%" class="nowrap center">
						<button class="btn btn-info show-logs"
data-toggle="modal" data-target="#modal"
data-gateway-id="<?php echo $item->id ?>">
						<?php echo JText::_('COM_JEA_LOGS') ?>
						</button>
					</td>
					<td width="5%" class="nowrap center">
						<?php echo $item->provider ?>
					</td>
					<td class="hidden-phone">
						<?php echo (int) $item->id ?>
					</td>
				</tr>
				<?php endforeach ?>
			</tbody>
		</table>
		<?php echo $this->pagination->getListFooter() ?>
		<div>
			<input type="hidden" name="task"
value="" />
			<input type="hidden" name="type"
value="<?php echo
$this->state->get('filter.type')?>" />
			<input type="hidden" name="boxchecked"
value="0" />
			<input type="hidden" name="filter_order"
value="<?php echo $listOrder ?>" />
			<input type="hidden" name="filter_order_Dir"
value="<?php echo $listDirection ?>" />
			<?php echo JHtml::_('form.token') ?>
		</div>
	</form>
</div>


<?php ob_start()?>
<p>
	<a class="ajax-refresh-logs" href="<?php echo
JRoute::_('index.php?option=com_jea&task=gateway.getLogs&id=')
?>">
		<?php echo JText::_('JGLOBAL_HELPREFRESH_BUTTON') ?>
	</a> |

	<a class="ajax-refresh-logs" href="<?php echo
JRoute::_('index.php?option=com_jea&task=gateway.deleteLogs&id=')
?>" id="delete_logs">
		<?php echo JText::_('JACTION_DELETE') ?>
	</a> |

	<a href="<?php echo
JRoute::_('index.php?option=com_jea&task=gateway.downloadLogs&id=')
?>" id="download_logs">
		<?php echo JText::_('COM_JEA_DOWNLOAD') ?>
	</a>
</p>

<pre id="logs"></pre>
<?php
$modalBody = ob_get_contents();
ob_end_clean();
echo JHtml::_('bootstrap.renderModal', 'modal',
array('title' => JText::_('COM_JEA_LOGS')),
$modalBody);
?>
gateways/tmpl/export.php000064400000001412151160174530011377
0ustar00<?php
/**
 * This file is part of Joomla Estate Agency - Joomla! extension for real
estate agency
 *
 * @package     Joomla.Administrator
 * @subpackage  com_jea
 * @copyright   Copyright (C) 2008 - 2020 PHILIP Sylvain. All rights
reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

/**
 * @var $this JeaViewGateways
 */

JHtml::stylesheet('media/com_jea/css/jea.admin.css');
?>

<div id="j-sidebar-container" class="span2">
	<?php echo $this->sidebar?>
</div>

<div id="j-main-container" class="span10">
	<?php echo JLayoutHelper::render('jea.gateways.nav',
array('action' => 'export', 'view' =>
'console')) ?>
	<?php echo JLayoutHelper::render('jea.gateways.consoles',
array('action' => 'export')) ?>
</div>gateways/view.html.php000064400000004245151160174530011026
0ustar00<?php
/**
 * This file is part of Joomla Estate Agency - Joomla! extension for real
estate agency
 *
 * @package     Joomla.Administrator
 * @subpackage  com_jea
 * @copyright   Copyright (C) 2008 - 2020 PHILIP Sylvain. All rights
reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

/**
 * Gateways View
 *
 * @package     Joomla.Administrator
 * @subpackage  com_jea
 *
 * @since       2.0
 */
class JeaViewGateways extends JViewLegacy
{
	/**
	 * The user object
	 *
	 * @var JUser
	 */
	protected $user;

	/**
	 * Array of database records
	 *
	 * @var Jobject[]
	 */
	protected $items;

	/**
	 * The pagination object
	 *
	 * @var JPagination
	 */
	protected $pagination;

	/**
	 * The model state
	 *
	 * @var Jobject
	 */
	protected $state;

	/**
	 * The sidebar output
	 *
	 * @var string
	 */
	protected $sidebar = '';

	/**
	 * Overrides parent method.
	 *
	 * @param   string  $tpl  The name of the template file to parse.
	 *
	 * @return  mixed  A string if successful, otherwise an Error object.
	 *
	 * @see     JViewLegacy::display()
	 */
	public function display($tpl = null)
	{
		JeaHelper::addSubmenu('tools');

		$this->state = $this->get('State');

		$this->sidebar = JHtmlSidebar::render();

		$title = JText::_('COM_JEA_GATEWAYS');

		switch ($this->_layout)
		{
			case 'export':
				$title = JText::_('COM_JEA_EXPORT');
				JToolBarHelper::back('JTOOLBAR_BACK',
'index.php?option=com_jea&view=tools');
				break;
			case 'import':
				$title = JText::_('COM_JEA_IMPORT');
				JToolBarHelper::back('JTOOLBAR_BACK',
'index.php?option=com_jea&view=tools');
				break;
			default:
				$this->user = JFactory::getUser();
				$this->items = $this->get('Items');
				$this->pagination = $this->get('Pagination');
				JToolBarHelper::addNew('gateway.add');
				JToolBarHelper::editList('gateway.edit');
				JToolBarHelper::publish('gateways.publish',
'JTOOLBAR_PUBLISH', true);
				JToolBarHelper::unpublish('gateways.unpublish',
'JTOOLBAR_UNPUBLISH', true);
				JToolBarHelper::deleteList(JText::_('COM_JEA_MESSAGE_CONFIRM_DELETE'),
'gateways.delete');
		}

		JToolBarHelper::title($title, 'jea');

		parent::display($tpl);
	}
}
about/tmpl/default.php000064400000004260151160174530010774 0ustar00<?php
/**
 * This file is part of Joomla Estate Agency - Joomla! extension for real
estate agency
 *
 * @package     Joomla.Administrator
 * @subpackage  com_jea
 * @copyright   Copyright (C) 2008 - 2020 PHILIP Sylvain. All rights
reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

/**
 * @var $this JeaViewAbout
 */

JHtml::stylesheet('media/com_jea/css/jea.admin.css');
?>

<?php if (!empty($this->sidebar)) : ?>
<div id="j-sidebar-container" class="span2">
	<?php echo $this->sidebar; ?>
</div>
<?php endif ?>

<div id="j-main-container" class="span10">
	<?php echo JHtml::_('bootstrap.startTabSet',
'aboutTab', array('active' => 'pan1'))
?>

	<?php echo JHtml::_('bootstrap.addTab', 'aboutTab',
'pan1', JText::_('COM_JEA_ABOUT')) ?>
	<div class="row-fluid">
		<div class="span2">
			<img src="../media/com_jea/images/logo.png"
alt="logo.png" />
		</div>
		<div class="span10">
			<p>
				<strong>Joomla Estate Agency <?php echo $this->getVersion()
?> </strong>
			</p>
			<p>
				<a href="http://jea.sphilip.com/"
target="_blank"><?php echo
JText::_('COM_JEA_PROJECT_HOME') ?></a>
			</p>
			<p>
				<a href="http://jea.sphilip.com/forum/"
target="_blank"><?php echo
JText::_('COM_JEA_FORUM') ?></a>
			</p>
			<p>
				<a
href="https://github.com/JoomlaEstateAgency/com_jea/wiki/"
target="_blank"><?php echo
JText::_('COM_JEA_DOCUMENTATION') ?></a>
			</p>
			<p>
				<?php echo JText::_('COM_JEA_MAIN_DEVELOPER') ?> :
<a href="http://www.sphilip.com"
target="_blank">Sylvain Philip</a><br />
				<?php echo JText::_('COM_JEA_CREDITS') ?> : <a
href="https://twitter.com/#!/phproberto"
target="_blank">Roberto Segura</a>
			</p>
		</div>
	</div>
	<?php echo JHtml::_('bootstrap.endTab') ?>

	<?php echo JHtml::_('bootstrap.addTab', 'aboutTab',
'pan2', JText::_('COM_JEA_LICENCE')) ?>
	<pre>
	<?php require JPATH_COMPONENT . '/LICENCE.txt' ?>
	</pre>
	<?php echo JHtml::_('bootstrap.endTab') ?>

	<?php echo JHtml::_('bootstrap.addTab', 'aboutTab',
'pan3', JText::_('COM_JEA_VERSIONS')) ?>
	<pre>
	<?php require JPATH_COMPONENT . '/NEWS.txt' ?>
	</pre>
	<?php echo JHtml::_('bootstrap.endTab') ?>

	<?php echo JHtml::_('bootstrap.endTabSet') ?>
</div>
about/view.html.php000064400000002556151160174530010317 0ustar00<?php
/**
 * This file is part of Joomla Estate Agency - Joomla! extension for real
estate agency
 *
 * @package     Joomla.Administrator
 * @subpackage  com_jea
 * @copyright   Copyright (C) 2008 - 2020 PHILIP Sylvain. All rights
reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

/**
 * JEA about view.
 *
 * @package     Joomla.Administrator
 * @subpackage  com_jea
 *
 * @since       2.0
 */
class JeaViewAbout extends JViewLegacy
{
	/**
	 * The sidebar output
	 *
	 * @var string
	 */
	protected $sidebar = '';

	/**
	 * Overrides parent method.
	 *
	 * @param   string  $tpl  The name of the template file to parse.
	 *
	 * @return  mixed  A string if successful, otherwise an Error object.
	 *
	 * @see     JViewLegacy::display()
	 */
	public function display($tpl = null)
	{
		JeaHelper::addSubmenu('about');
		JToolbarHelper::title('Joomla Estate Agency', 'jea');

		$canDo = JeaHelper::getActions();

		if ($canDo->get('core.admin'))
		{
			JToolBarHelper::preferences('com_jea');
		}

		$this->sidebar = JHtmlSidebar::render();

		parent::display($tpl);
	}

	/**
	 * Get version of JEA
	 *
	 * @return string
	 */
	protected function getVersion()
	{
		if (is_file(JPATH_COMPONENT . '/jea.xml'))
		{
			$xml = simplexml_load_file(JPATH_COMPONENT . '/jea.xml');

			return $xml->version;
		}

		return '';
	}
}
features/tmpl/default.php000064400000003645151160174530011506
0ustar00<?php
/**
 * This file is part of Joomla Estate Agency - Joomla! extension for real
estate agency
 *
 * @package     Joomla.Administrator
 * @subpackage  com_jea
 * @copyright   Copyright (C) 2008 - 2020 PHILIP Sylvain. All rights
reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

/**
 * @var $this JeaViewFeatures
 */

JHtml::stylesheet('media/com_jea/css/jea.admin.css');
JHtml::_('behavior.multiselect');
$count = 0;
?>

<form action="<?php echo
JRoute::_('index.php?option=com_jea&view=properties')
?>" method="post" name="adminForm"
	id="adminForm" enctype="multipart/form-data">

	<div id="j-sidebar-container" class="span2">
		<?php echo $this->sidebar; ?>
	</div>

	<div id="j-main-container" class="span10">
		<table class="table table-striped">
			<thead>
				<tr>
					<th width="1%" class="center">
						<?php echo JHtml::_('grid.checkall') ?>
					</th>
					<th width="60%">
						<?php echo
JText::_('COM_JEA_HEADING_FEATURES_LIST_NAME') ?>
					</th>
					<th width="39%" class="center">
						<?php echo
JText::_('COM_JEA_HEADING_FEATURES_IMPORT_CSV') ?>
					</th>
				</tr>
			</thead>

			<tbody>
			<?php foreach ($this->items as $i => $item) : $count++ ?>
				<tr class="row<?php echo $count % 2 ?>">
					<td>
						<?php echo JHtml::_('grid.id', $i, $item->name) ?>
					</td>

					<td>
						<a href="<?php echo
JRoute::_('index.php?option=com_jea&view=featurelist&feature='.$item->name)
?>">
						<?php echo
JText::_(JString::strtoupper("com_jea_list_of_{$item->name}_title"))
?>
						</a>
					</td>

					<td class="center">
						<input type="file" name="csv[<?php echo
$item->name ?>]" value="" size="20" />
					</td>
				</tr>
			<?php endforeach ?>
			</tbody>
		</table>

		<div>
			<input type="hidden" name="task"
value="" />
			<input type="hidden" name="boxchecked"
value="0" />
			<?php echo JHtml::_('form.token') ?>
		</div>
	</div>
</form>
features/view.html.php000064400000003361151160174530011016 0ustar00<?php
/**
 * This file is part of Joomla Estate Agency - Joomla! extension for real
estate agency
 *
 * @package     Joomla.Administrator
 * @subpackage  com_jea
 * @copyright   Copyright (C) 2008 - 2020 PHILIP Sylvain. All rights
reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

/**
 * View to manage all features tables.
 *
 * @package     Joomla.Administrator
 * @subpackage  com_jea
 *
 * @since       2.0
 */
class JeaViewFeatures extends JViewLegacy
{
	/**
	 * Array of managed features
	 *
	 * @var stdClass[]
	 */
	protected $items;

	/**
	 * The model state
	 *
	 * @var Jobject
	 */
	protected $state;

	/**
	 * The sidebar output
	 *
	 * @var string
	 */
	protected $sidebar = '';

	/**
	 * Overrides parent method.
	 *
	 * @param   string  $tpl  The name of the template file to parse.
	 *
	 * @return  mixed  A string if successful, otherwise an Error object.
	 *
	 * @see     JViewLegacy::display()
	 */
	public function display($tpl = null)
	{
		$this->items = $this->get('Items');
		$this->state = $this->get('State');

		JeaHelper::addSubmenu('features');

		$this->addToolbar();

		$this->sidebar = JHtmlSidebar::render();

		parent::display($tpl);
	}

	/**
	 * Add the page title and toolbar.
	 *
	 * @return void
	 */
	protected function addToolbar()
	{
		$canDo = JeaHelper::getActions();

		JToolBarHelper::title(JText::_('COM_JEA_FEATURES_MANAGEMENT'),
'jea');

		if ($canDo->get('core.manage'))
		{
			JToolBarHelper::custom('features.import',
'database', '', 'Import', false);
		}

		JToolBarHelper::custom('features.export', 'download',
'', 'Export', false);

		if ($canDo->get('core.admin'))
		{
			JToolBarHelper::divider();
			JToolBarHelper::preferences('com_jea');
		}
	}
}
feature/tmpl/edit.php000064400000002213151160174530010612 0ustar00<?php
/**
 * This file is part of Joomla Estate Agency - Joomla! extension for real
estate agency
 *
 * @package     Joomla.Administrator
 * @subpackage  com_jea
 * @copyright   Copyright (C) 2008 - 2020 PHILIP Sylvain. All rights
reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

/**
 * @var $this JeaViewFeature
 */
$app = JFactory::getApplication();
JHtml::_('formbehavior.chosen', 'select');
JHtml::stylesheet('media/com_jea/css/jea.admin.css');
?>
<form action="<?php echo
JRoute::_('index.php?option=com_jea&layout=edit&id='.(int)
$this->item->id) ?>"
	method="post" name="adminForm"
id="adminForm" class="form-validate">

	<div class="form-horizontal">
	<?php foreach ($this->form->getFieldset('feature') as
$field): ?>
		<?php echo $field->renderField() ?>
	<?php endforeach ?>
	</div>

	<div>
		<input type="hidden" name="task"
value="" />
		<input type="hidden" name="feature"
value="<?php echo
$this->state->get('feature.name')?>" />
		<input type="hidden" name="return"
value="<?php echo $app->input->getCmd('return')
?>" />
		<?php echo JHtml::_('form.token') ?>
	</div>
</form>
feature/view.html.php000064400000003427151160174530010636 0ustar00<?php
/**
 * This file is part of Joomla Estate Agency - Joomla! extension for real
estate agency
 *
 * @package     Joomla.Administrator
 * @subpackage  com_jea
 * @copyright   Copyright (C) 2008 - 2020 PHILIP Sylvain. All rights
reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

/**
 * View to edit a feature.
 *
 * @package     Joomla.Administrator
 * @subpackage  com_jea
 *
 * @since       2.0
 */
class JeaViewFeature extends JViewLegacy
{
	/**
	 * The form object
	 *
	 * @var JForm
	 */
	protected $form;

	/**
	 * The database record
	 *
	 * @var JObject|boolean
	 */
	protected $item;

	/**
	 * The model state
	 *
	 * @var JObject
	 */
	protected $state;

	/**
	 * Overrides parent method.
	 *
	 * @param   string  $tpl  The name of the template file to parse.
	 *
	 * @return  mixed  A string if successful, otherwise an Error object.
	 *
	 * @see     JViewLegacy::display()
	 */
	public function display($tpl = null)
	{
		$this->form = $this->get('Form');
		$this->item = $this->get('Item');
		$this->state = $this->get('State');

		$this->addToolbar();

		parent::display($tpl);
	}

	/**
	 * Add the page title and toolbar.
	 *
	 * @return void
	 */
	protected function addToolbar()
	{
		JFactory::getApplication()->input->set('hidemainmenu',
true);
		$canDo = JeaHelper::getActions();

		$title = $this->item->id ? JText::_('JACTION_EDIT') .
' ' . $this->escape($this->item->value) :
JText::_('JACTION_CREATE');
		JToolBarHelper::title($title, 'jea');

		// For new records, check the create permission.
		if ($canDo->get('core.create'))
		{
			JToolBarHelper::apply('feature.apply');
			JToolBarHelper::save('feature.save');
			JToolBarHelper::save2new('feature.save2new');
		}

		JToolBarHelper::cancel('feature.cancel');
	}
}
properties/tmpl/default.php000064400000017517151160174530012067
0ustar00<?php
/**
 * This file is part of Joomla Estate Agency - Joomla! extension for real
estate agency
 *
 * @package     Joomla.Administrator
 * @subpackage  com_jea
 * @copyright   Copyright (C) 2008 - 2020 PHILIP Sylvain. All rights
reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

/**
 * @var $this JeaViewProperties
 */
JHtml::stylesheet('media/com_jea/css/jea.admin.css');

JHtml::_('bootstrap.tooltip');
JHtml::_('behavior.multiselect');
JHtml::_('formbehavior.chosen', 'select');

$listOrder     =
$this->escape($this->state->get('list.ordering'));
$listDirection =
$this->escape($this->state->get('list.direction'));

$saveOrder     = $listOrder == 'p.ordering';

if ($saveOrder)
{
	$saveOrderingUrl =
'index.php?option=com_jea&task=properties.saveOrderAjax&tmpl=component';
	JHtml::_('sortablelist.sortable', 'propertiesList',
'adminForm', strtolower($listDirection), $saveOrderingUrl);
}
?>

<form action="<?php echo
JRoute::_('index.php?option=com_jea&view=properties')
?>" method="post" name="adminForm"
id="adminForm">

	<div id="j-sidebar-container" class="span2">
		<?php echo $this->sidebar ?>
	</div>

	<div id="j-main-container" class="span10">
		<?php echo
JLayoutHelper::render('joomla.searchtools.default',
array('view' => $this)) ?>

		<?php if (empty($this->items)) : ?>
			<div class="alert alert-no-items">
				<?php echo JText::_('JGLOBAL_NO_MATCHING_RESULTS'); ?>
			</div>
		<?php else : ?>
		<table class="table table-striped"
id="propertiesList">
			<thead>
				<tr>
					<th width="1%" class="nowrap center
hidden-phone">
						<?php echo JHtml::_('searchtools.sort', '',
'p.ordering', $listDirection, $listOrder, null, 'asc',
'JGRID_HEADING_ORDERING', 'icon-menu-2'); ?>
					</th>
					<th width="1%" class="center">
						<?php echo JHtml::_('grid.checkall') ?>
					</th>
					<th width="10%" class="nowrap">
						<?php echo JHtml::_('searchtools.sort',
'COM_JEA_FIELD_REF_LABEL', 'p.ref', $listDirection ,
$listOrder ) ?>
					</th>
					<th class="nowrap">
						<?php echo JText::_('COM_JEA_FIELD_PROPERTY_TYPE_LABEL')
?>
					</th>
					<th width="27%" class="nowrap">
						<?php echo JText::_('COM_JEA_FIELD_ADDRESS_LABEL') ?>
					</th>
					<th width="10%" class="nowrap">
						<?php echo JText::_('COM_JEA_FIELD_TOWN_LABEL') ?>
					</th>
					<th width="10%" class="nowrap">
						<?php echo JText::_('COM_JEA_FIELD_DEPARTMENT_LABEL')
?>
					</th>
					<th width="10%" class="nowrap">
						<?php echo JHtml::_('searchtools.sort',
'COM_JEA_FIELD_PRICE_LABEL', 'p.price', $listDirection
, $listOrder ) ?>
					</th>
					<th width="1%" class="nowrap">
						<?php echo JHtml::_('searchtools.sort',
'JFEATURED', 'p.featured', $listDirection , $listOrder
) ?>
					</th>
					<th width="1%" class="nowrap">
						<?php echo JHtml::_('searchtools.sort',
'JSTATUS', 'p.published', $listDirection , $listOrder )
?>
					</th>
					<th width="5%" class="nowrap">
						<?php echo JHtml::_('searchtools.sort',
'JGRID_HEADING_ACCESS', 'access_level', $listDirection,
$listOrder); ?>
					</th>
					<th width="10%" class="nowrap">
						<?php echo JHtml::_('searchtools.sort',
'JGRID_HEADING_CREATED_BY', 'author', $listDirection ,
$listOrder ) ?>
					</th>
					<th width="5%" class="nowrap">
						<?php echo JHtml::_('searchtools.sort',
'JDATE', 'p.created', $listDirection , $listOrder )
?>
					</th>
					<th width="1%" class="nowrap">
						<?php echo JHtml::_('searchtools.sort',
'JGLOBAL_HITS', 'p.hits', $listDirection , $listOrder )
?>
					</th>
					<th width="5%" class="nowrap">
						<?php echo JHtml::_('searchtools.sort',
'JGRID_HEADING_LANGUAGE', 'language', $listDirection,
$listOrder); ?>
					</th>
					<th width="1%" class="nowrap">
						<?php echo JHtml::_('searchtools.sort',
'JGRID_HEADING_ID', 'p.id', $listDirection , $listOrder
) ?>
					</th>
				</tr>
			</thead>

			<tfoot>
				<tr>
					<td colspan="16"></td>
				</tr>
			</tfoot>

			<tbody>
			<?php foreach ($this->items as $i => $item) : ?>
<?php
$canEdit  = $this->user->authorise('core.edit',    
'com_jea.property.'.$item->id);
$canCheckin = $this->user->authorise('core.manage',  
'com_checkin') || $item->checked_out == $this->user->id
|| $item->checked_out == 0;
$canEditOwn = $this->user->authorise('core.edit.own',  
'com_jea.property.'.$item->id) && $item->created_by
== $this->user->id;
$canChange  = $this->user->authorise('core.edit.state',
'com_jea.property.'.$item->id) && $canCheckin;
?>

				<tr class="row<?php echo $i % 2 ?>">
					<td class="order nowrap center hidden-phone">
						<?php
						$iconClass = '';
						if (!$canChange)
						{
							$iconClass = ' inactive';
						}
						elseif (!$saveOrder)
						{
							$iconClass = ' inactive tip-top hasTooltip"
title="' . JHtml::_('tooltipText',
'JORDERINGDISABLED');
						}
						?>
						<span class="sortable-handler<?php echo $iconClass
?>">
							<span class="icon-menu"
aria-hidden="true"></span>
						</span>
						<?php if ($canChange && $saveOrder) : ?>
							<input type="text" style="display:none"
name="order[]" size="5" value="<?php echo
$item->ordering; ?>" class="width-20 text-area-order"
/>
						<?php endif; ?>
					</td>
					<td class="center">
						<?php echo JHtml::_('grid.id', $i, $item->id) ?>
					</td>
					<td class="has-context">
					<?php if ($item->checked_out) : ?>
						<?php echo JHtml::_('jgrid.checkedout', $i,
$item->author, $item->checked_out_time, 'properties.',
$canCheckin); ?>
					<?php endif ?>
					<?php if ($canEdit || $canEditOwn) : ?>
						<a href="<?php echo
JRoute::_('index.php?option=com_jea&task=property.edit&id='.(int)
$item->id); ?>">
						<?php echo $this->escape($item->ref); ?>
						</a>
					<?php else : ?>
						<?php echo $this->escape($item->ref); ?>
					<?php endif ?>
					</td>
					<td>
						<?php echo $this->escape( $item->type ) ?>
					</td>
					<td>
						<?php echo $this->escape( $item->address ) ?>
					</td>
					<td>
						<?php echo $this->escape( $item->town ) ?>
					</td>
					<td class="left nowrap">
						<?php echo $this->escape( $item->department ) ?>
					</td>
					<td class="right">
						<?php echo $item->price ?> <?php echo
$this->params->get('currency_symbol',
'&euro;') ?>
						<?php if ($item->transaction_type == 'RENTING') echo
JText::_('COM_JEA_PRICE_PER_FREQUENCY_'.
$item->rate_frequency) ?>
					</td>
					<td class="center">
						<?php echo JHtml::_('contentadministrator.featured',
$item->featured, $i, $canChange) ?>
					</td>
					<td class="center">
						<?php echo JHtml::_('jgrid.published',
$item->published, $i, 'properties.', $canChange,
'cb', $item->publish_up, $item->publish_down) ?>
					</td>
					<td class="center">
						<?php echo $this->escape($item->access_level); ?>
					</td>
					<td>
					<?php if ( $this->user->authorise( 'com_users',
'manage' ) ): ?>
						<a href="<?php echo JRoute::_(
'index.php?option=com_users&task=user.edit&id='.
$item->created_by )  ?>" title="<?php echo
JText::_('COM_JEA_EDIT_USER') ?> ">
						<?php echo $this->escape( $item->author ) ?>
						</a>
					<?php else : echo $this->escape( $item->author ) ?>
					<?php endif ?>
					</td>
					<td class="center">
						<?php echo JHtml::_('date',  $item->created,
JText::_('DATE_FORMAT_LC4')) ?>
					</td>
					<td class="center"><?php echo $item->hits
?></td>
					<td class="center">
					<?php if ($item->language=='*'): ?>
						<?php echo JText::alt('JALL', 'language')
?>
					<?php else: ?>
						<?php echo $item->language_title ?
$this->escape($item->language_title) :
JText::_('JUNDEFINED') ?>
					<?php endif ?>
					</td>
					<td class="center">
						<?php echo $item->id ?>
					</td>
				</tr>
			<?php endforeach ?>
			</tbody>
		</table>

		<?php echo $this->pagination->getListFooter() ?>

		<?php endif ?>

		<div>
			<input type="hidden" name="task"
value="" />
			<input type="hidden" name="boxchecked"
value="0" />
			<?php echo JHtml::_('form.token') ?>
		</div>
	</div>
</form>
properties/view.html.php000064400000005752151160174530011402
0ustar00<?php
/**
 * This file is part of Joomla Estate Agency - Joomla! extension for real
estate agency
 *
 * @package     Joomla.Administrator
 * @subpackage  com_jea
 * @copyright   Copyright (C) 2008 - 2020 PHILIP Sylvain. All rights
reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

/**
 * Properties list View.
 *
 * @package     Joomla.Administrator
 * @subpackage  com_jea
 *
 * @since       2.0
 */
class JeaViewProperties extends JViewLegacy
{
	/**
	 * The component parameters
	 *
	 * @var Joomla\Registry\Registry
	 */
	protected $params;

	/**
	 * The user object
	 *
	 * @var JUser
	 */
	protected $user;

	/**
	 * Array of database records
	 *
	 * @var Jobject[]
	 */
	protected $items;

	/**
	 * The pagination object
	 *
	 * @var JPagination
	 */
	protected $pagination;

	/**
	 * The model state
	 *
	 * @var Jobject
	 */
	protected $state;

	/**
	 * The sidebar output
	 *
	 * @var string
	 */
	protected $sidebar = '';

	/**
	 * The form object for search filters
	 *
	 * @var JForm
	 */
	public $filterForm;

	/**
	 * The active search filters
	 *
	 * @var  array
	 */
	public $activeFilters;

	/**
	 * Overrides parent method.
	 *
	 * @param   string  $tpl  The name of the template file to parse.
	 *
	 * @return  mixed  A string if successful, otherwise an Error object.
	 *
	 * @see     JViewLegacy::display()
	 */
	public function display($tpl = null)
	{
		$this->params = JComponentHelper::getParams('com_jea');

		JeaHelper::addSubmenu('properties');

		$this->user = JFactory::getUser();
		$this->items = $this->get('Items');
		$this->pagination = $this->get('Pagination');
		$this->state = $this->get('State');

		$this->filterForm    = $this->get('FilterForm');
		$this->activeFilters = $this->get('ActiveFilters');

		$this->sidebar = JHtmlSidebar::render();

		$this->addToolbar();

		parent::display($tpl);
	}

	/**
	 * Add the page title and toolbar.
	 *
	 * @return void
	 */
	protected function addToolbar()
	{
		$canDo = JeaHelper::getActions();

		JToolBarHelper::title(JText::_('COM_JEA_PROPERTIES_MANAGEMENT'),
'jea');

		if ($canDo->get('core.create'))
		{
			JToolBarHelper::addNew('property.add');
			JToolBarHelper::custom('properties.copy',
'copy.png', 'copy_f2.png', 'COM_JEA_COPY');
		}

		if (($canDo->get('core.edit')) ||
($canDo->get('core.edit.own')))
		{
			JToolBarHelper::editList('property.edit');
		}

		if ($canDo->get('core.edit.state'))
		{
			JToolBarHelper::divider();
			JToolBarHelper::publish('properties.publish',
'JTOOLBAR_PUBLISH', true);
			JToolBarHelper::unpublish('properties.unpublish',
'JTOOLBAR_UNPUBLISH', true);
			JToolBarHelper::custom('properties.featured',
'featured.png', 'featured_f2.png',
'JFEATURED', true);
		}

		if ($canDo->get('core.delete'))
		{
			JToolBarHelper::divider();
			JToolBarHelper::deleteList(JText::_('COM_JEA_MESSAGE_CONFIRM_DELETE'),
'properties.delete');
		}

		if ($canDo->get('core.admin'))
		{
			JToolBarHelper::divider();
			JToolBarHelper::preferences('com_jea');
		}
	}
}
featurelist/tmpl/default.php000064400000011344151160174530012212
0ustar00<?php
/**
 * This file is part of Joomla Estate Agency - Joomla! extension for real
estate agency
 *
 * @package     Joomla.Administrator
 * @subpackage  com_jea
 * @copyright   Copyright (C) 2008 - 2020 PHILIP Sylvain. All rights
reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

/**
 * @var $this JeaViewFeaturelist
 */

JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html');

JHtml::_('bootstrap.tooltip');
JHtml::_('behavior.multiselect');
JHtml::_('formbehavior.chosen', 'select');

$listOrder =
$this->escape($this->state->get('list.ordering'));
$listDirection =
$this->escape($this->state->get('list.direction'));
$saveOrder = $listOrder == 'f.ordering';

if ($saveOrder)
{
	$saveOrderingUrl =
'index.php?option=com_jea&task=featurelist.saveOrderAjax&tmpl=component';
	JHtml::_('sortablelist.sortable', 'featureList',
'adminForm', strtolower($listDirection), $saveOrderingUrl);
}

JHtml::stylesheet('media/com_jea/css/jea.admin.css');
?>

<form action="<?php echo
JRoute::_('index.php?option=com_jea&view=featurelist')
?>" method="post" name="adminForm"
id="adminForm">

	<?php if (!empty( $this->sidebar)) : ?>
	<div id="j-sidebar-container" class="span2">
		<?php echo $this->sidebar ?>
	</div>
	<?php endif ?>

	<div id="j-main-container" class="span10">
		<?php echo
JLayoutHelper::render('joomla.searchtools.default',
array('view' => $this)) ?>

		<?php if (empty($this->items)) : ?>
			<div class="alert alert-no-items">
				<?php echo JText::_('JGLOBAL_NO_MATCHING_RESULTS'); ?>
			</div>
		<?php else : ?>
		<table class="table table-striped"
id="featureList">
			<thead>
				<tr>
					<th width="1%" class="nowrap center
hidden-phone">
						<?php echo JHtml::_('searchtools.sort', '',
'f.ordering', $listDirection, $listOrder, null, 'asc',
'JGRID_HEADING_ORDERING', 'icon-menu-2'); ?>
					</th>
					<th width="1%">
						<?php echo JHtml::_('grid.checkall'); ?>
					</th>
					<th width="88%">
						<?php echo JHTML::_('searchtools.sort',
'COM_JEA_FIELD_'.$this->state->get('feature.name').'_LABEL',
'f.value', $listDirection , $listOrder ) ?>
					</th>
					<?php if ($this->state->get('language_enabled')):
?>
					<th width="5%" class="nowrap">
						<?php echo JHtml::_('searchtools.sort',
'JGRID_HEADING_LANGUAGE', 'l.title', $listDirection,
$listOrder); ?>
					</th>
					<?php endif ?>
					<th width="5%" class="nowrap">
						<?php echo JHTML::_('searchtools.sort',
'JGRID_HEADING_ID', 'f.id', $listDirection , $listOrder
) ?>
					</th>
				</tr>
			</thead>

			<tfoot>
				<tr>
					<td colspan="<?php echo
$this->state->get('language_enabled') ?  5: 4
?>"></td>
				</tr>
			</tfoot>

			<tbody>
			<?php foreach ($this->items as $i => $item) : ?>
			<?php
			$canEdit  = $this->user->authorise('core.edit');
			$canChange  = $this->user->authorise('core.edit.state');
			?>
				<tr class="row<?php echo $i % 2 ?>">
					<td class="order nowrap center hidden-phone">
						<?php
						$iconClass = '';
						if (!$canChange)
						{
							$iconClass = ' inactive';
						}
						elseif (!$saveOrder)
						{
							$iconClass = ' inactive tip-top hasTooltip"
title="' . JHtml::_('tooltipText',
'JORDERINGDISABLED');
						}
						?>
						<span class="sortable-handler<?php echo $iconClass
?>">
							<span class="icon-menu"
aria-hidden="true"></span>
						</span>
						<?php if ($canChange && $saveOrder) : ?>
							<input type="text" style="display:none"
name="order[]" size="5" value="<?php echo
$item->ordering ?>" class="width-20 text-area-order"
/>
						<?php endif ?>
					</td>
					<td class="center">
						<?php echo JHtml::_('grid.id', $i, $item->id) ?>
					</td>
					<td>
					<?php if ($canEdit) : ?>
						<a href="<?php echo
JRoute::_('index.php?option=com_jea&task=feature.edit&id='.(int)
$item->id . '&feature='.
$this->state->get('feature.name')); ?>">
						<?php echo $this->escape($item->value) ?>
						</a>
					<?php else : ?>
						<?php echo $this->escape($item->value) ?>
					<?php endif ?>
					</td>
					<?php if ($this->state->get('language_enabled')):
?>
					<td>
						<?php if ($item->language == '*'): ?>
							<?php echo JText::alt('JALL', 'language')
?>
						<?php else: ?>
							<?php echo $item->language_title ?
$this->escape($item->language_title) :
JText::_('JUNDEFINED') ?>
						<?php endif ?>
					</td>
					<?php endif ?>
					<td class="center"><?php echo $item->id
?></td>
				</tr>
			<?php endforeach ?>
			</tbody>
		</table>
		<?php echo $this->pagination->getListFooter() ?>
		<?php endif ?>
	</div>

	<div>
		<input type="hidden" name="task"
value="" />
		<input type="hidden" name="boxchecked"
value="0" />
		<input type="hidden" name="feature"
value="<?php echo
$this->state->get('feature.name')?>" />
		<?php echo JHtml::_('form.token') ?>
	</div>
</form>
featurelist/view.html.php000064400000004575151160174530011537
0ustar00<?php
/**
 * This file is part of Joomla Estate Agency - Joomla! extension for real
estate agency
 *
 * @package     Joomla.Administrator
 * @subpackage  com_jea
 * @copyright   Copyright (C) 2008 - 2020 PHILIP Sylvain. All rights
reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

use Joomla\String\StringHelper;

/**
 * View to manage a feature list.
 *
 * @package     Joomla.Administrator
 * @subpackage  com_jea
 *
 * @since       2.0
 */
class JeaViewFeaturelist extends JViewLegacy
{
	/**
	 * The user object
	 *
	 * @var JUser
	 */
	protected $user;

	/**
	 * Array of database records
	 *
	 * @var Jobject[]
	 */
	protected $items;

	/**
	 * The pagination object
	 *
	 * @var JPagination
	 */
	protected $pagination;

	/**
	 * The model state
	 *
	 * @var Jobject
	 */
	protected $state;

	/**
	 * The sidebar output
	 *
	 * @var string
	 */
	protected $sidebar = '';

	/**
	 * The form object for search filters
	 *
	 * @var JForm
	 */
	public $filterForm;

	/**
	 * The active search filters
	 *
	 * @var  array
	 */
	public $activeFilters;

	/**
	 * Overrides parent method.
	 *
	 * @param   string  $tpl  The name of the template file to parse.
	 *
	 * @return  mixed  A string if successful, otherwise an Error object.
	 *
	 * @see     JViewLegacy::display()
	 */
	public function display($tpl = null)
	{
		JeaHelper::addSubmenu('features');

		$this->user = JFactory::getUser();
		$this->items = $this->get('Items');
		$this->pagination = $this->get('Pagination');
		$this->state = $this->get('State');
		$this->sidebar = JHtmlSidebar::render();
		$this->filterForm    = $this->get('FilterForm');
		$this->activeFilters = $this->get('ActiveFilters');

		$this->addToolbar();

		parent::display($tpl);
	}

	/**
	 * Add the page title and toolbar.
	 *
	 * @return void
	 */
	protected function addToolbar()
	{
		$canDo = JeaHelper::getActions();
		$feature = $this->state->get('feature.name');

		JToolBarHelper::title(JText::_(StringHelper::strtoupper("com_jea_list_of_{$feature}_title")),
'jea');

		if ($canDo->get('core.create'))
		{
			JToolBarHelper::addNew('feature.add');
		}

		if ($canDo->get('core.edit'))
		{
			JToolBarHelper::editList('feature.edit');
		}

		if ($canDo->get('core.delete'))
		{
			JToolBarHelper::divider();
			JToolBarHelper::deleteList(JText::_('COM_JEA_MESSAGE_CONFIRM_DELETE'),
'featurelist.delete');
		}
	}
}
tools/tmpl/default.php000064400000001175151160174530011024 0ustar00<?php
/**
 * This file is part of Joomla Estate Agency - Joomla! extension for real
estate agency
 *
 * @package     Joomla.Administrator
 * @subpackage  com_jea
 * @copyright   Copyright (C) 2008 - 2020 PHILIP Sylvain. All rights
reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

JHtml::stylesheet('media/com_jea/css/jea.admin.css');

/**
 * @var $this JeaViewTools
 */
?>

<div id="j-sidebar-container" class="span2">
	<?php echo $this->sidebar ?>
</div>

<div id="j-main-container" class="span10">
	<div class="cpanel"><?php echo
$this->getIcons()?></div>
</div>
tools/view.html.php000064400000003102151160174530010331 0ustar00<?php
/**
 * This file is part of Joomla Estate Agency - Joomla! extension for real
estate agency
 *
 * @package     Joomla.Administrator
 * @subpackage  com_jea
 * @copyright   Copyright (C) 2008 - 2020 PHILIP Sylvain. All rights
reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

/**
 * JEA tools view.
 *
 * @package     Joomla.Administrator
 * @subpackage  com_jea
 *
 * @since       2.0
 */
class JeaViewTools extends JViewLegacy
{
	/**
	 * The sidebar output
	 *
	 * @var string
	 */
	protected $sidebar = '';

	/**
	 * Overrides parent method.
	 *
	 * @param   string  $tpl  The name of the template file to parse.
	 *
	 * @return  mixed  A string if successful, otherwise an Error object.
	 *
	 * @see     JViewLegacy::display()
	 */
	public function display($tpl = null)
	{
		JeaHelper::addSubmenu('tools');
		JToolBarHelper::title(JText::_('COM_JEA_TOOLS'),
'jea');

		$canDo = JeaHelper::getActions();

		if ($canDo->get('core.admin'))
		{
			JToolBarHelper::preferences('com_jea');
		}

		$this->sidebar = JHtmlSidebar::render();

		parent::display($tpl);
	}

	/**
	 * Return tools icons.
	 *
	 * @return  array  An array of icons
	 */
	protected function getIcons()
	{
		$buttons = JeaHelper::getToolsIcons();

		foreach ($buttons as $button)
		{
			if (! empty($button['name']))
			{
				$styleSheet = 'media/com_jea/' . $button['name'] .
'/styles.css';

				if (file_exists(JPATH_ROOT . '/' . $styleSheet))
				{
					JHtml::stylesheet($styleSheet);
				}
			}
		}

		return JHtml::_('icons.buttons', $buttons);
	}
}
property/tmpl/edit.php000064400000011047151160174530011050 0ustar00<?php
/**
 * This file is part of Joomla Estate Agency - Joomla! extension for real
estate agency
 *
 * @package     Joomla.Administrator
 * @subpackage  com_jea
 * @copyright   Copyright (C) 2008 - 2020 PHILIP Sylvain. All rights
reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

/**
 * @var $this JeaViewProperty
 */

$dispatcher = JDispatcher::getInstance();
JPluginHelper::importPlugin( 'jea' );

JHtml::_('behavior.framework');
JHtml::stylesheet('media/com_jea/css/jea.admin.css');
JHtml::script('media/com_jea/js/property.form.js');

JHtml::_('behavior.keepalive');
JHtml::_('behavior.tabstate');
JHtml::_('formbehavior.chosen', 'select');
?>
<div id="ajaxupdating">
	<h3><?php echo
JText::_('COM_JEA_FEATURES_UPDATED_WARNING')?></h3>
</div>

<form action="<?php echo
JRoute::_('index.php?option=com_jea&layout=edit&id='.(int)
$this->item->id) ?>" method="post"
id="adminForm"
	class="form-validate"
enctype="multipart/form-data">

	<div class="form-inline form-inline-header">
		<?php echo $this->form->renderField('title') ?>
		<?php echo $this->form->renderField('ref') ?>
		<?php echo $this->form->renderField('alias') ?>
	</div>

	<div class="form-horizontal">

		<?php echo JHtml::_('bootstrap.startTabSet',
'propertyTab', array('active' =>
'general')) ?>

		<?php echo JHtml::_('bootstrap.addTab',
'propertyTab', 'general',
JText::_('COM_JEA_CONFIG_GENERAL')) ?>
		<div class="row-fluid">
			<div class="span8">
				<fieldset class="adminform">
					<?php echo
$this->form->renderField('transaction_type') ?>
					<?php echo $this->form->renderField('type_id')
?>
					<?php echo $this->form->renderField('description')
?>
				</fieldset>
			</div>
			<div class="span4">
				<fieldset class="form-vertical">
					<?php echo $this->form->renderField('published')
?>
					<?php echo $this->form->renderField('featured')
?>
					<?php echo $this->form->renderField('access') ?>
					<?php echo $this->form->renderField('language')
?>
					<?php echo $this->form->renderField('slogan_id')
?>
				</fieldset>

				<?php echo JHtml::_('sliders.start',
'property-sliders', array('useCookie'=>1)) ?>
				<?php $dispatcher->trigger('onAfterStartPanels',
array(&$this->item)) ?>

				<?php echo JHtml::_('sliders.panel',
JText::_('COM_JEA_PICTURES'), 'picture-pane') ?>
				<fieldset>
					<?php echo $this->form->getInput('images') ?>
				</fieldset>

				<?php echo JHtml::_('sliders.panel',
JText::_('COM_JEA_NOTES'), 'note-pane') ?>
				<fieldset class="form-vertical panelform">
					<?php echo $this->form->renderField('notes') ?>

				</fieldset>
				<?php $dispatcher->trigger('onBeforeEndPanels',
array(&$this->item)) ?>
				<?php echo JHtml::_('sliders.end') ?>
			</div>
		</div>
		<?php echo JHtml::_('bootstrap.endTab') ?>

		<?php echo JHtml::_('bootstrap.addTab',
'propertyTab', 'details',
JText::_('COM_JEA_DETAILS')) ?>
			<div class="row-fluid">
				<div class="span4">
					<fieldset>
						<legend><?php echo
JText::_('COM_JEA_FINANCIAL_INFORMATIONS')?></legend>
						<?php foreach
($this->form->getFieldset('financial_informations') as
$field) echo $field->renderField() ?>
					</fieldset>
					<fieldset class="advantages">
						<legend><?php echo
JText::_('COM_JEA_AMENITIES')?></legend>
						<?php echo $this->form->getInput('amenities')
?>
					</fieldset>
				</div>

				<div class="span4">
					<fieldset>
						<legend><?php echo
JText::_('COM_JEA_LOCALIZATION')?></legend>
						<?php foreach
($this->form->getFieldset('localization') as $field) echo
$field->renderField() ?>
					</fieldset>
				</div>

				<div class="span4">
					<fieldset>
						<?php foreach ($this->form->getFieldset('details')
as $field) echo $field->renderField() ?>
					</fieldset>
				</div>
			</div>
		<?php echo JHtml::_('bootstrap.endTab') ?>

		<?php echo JHtml::_('bootstrap.addTab',
'propertyTab', 'publication',
JText::_('COM_JEA_PUBLICATION_INFO')) ?>
			<?php foreach
($this->form->getFieldset('publication') as $field) echo
$field->renderField() ?>
		<?php echo JHtml::_('bootstrap.endTab') ?>

		<?php if ($this->canDo->get('core.admin')): ?>
		<?php echo JHtml::_('bootstrap.addTab',
'propertyTab', 'permissions',
JText::_('COM_JEA_FIELDSET_RULES')) ?>
			<?php echo $this->form->getInput('rules') ?>
		<?php echo JHtml::_('bootstrap.endTab') ?>
		<?php endif ?>

		<?php echo JHtml::_('bootstrap.endTabSet'); ?>

	</div>

	<div>
		<input type="hidden" name="task"
value="" />
		<input type="hidden" name="return"
value="<?php echo
JFactory::getApplication()->input->getCmd('return')
?>" />
		<?php echo JHtml::_('form.token') ?>
	</div>
</form>
property/view.html.php000064400000005753151160174530011073 0ustar00<?php
/**
 * This file is part of Joomla Estate Agency - Joomla! extension for real
estate agency
 *
 * @package     Joomla.Administrator
 * @subpackage  com_jea
 * @copyright   Copyright (C) 2008 - 2020 PHILIP Sylvain. All rights
reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

/**
 * View to edit property.
 *
 * @package     Joomla.Administrator
 * @subpackage  com_jea
 *
 * @since       2.0
 */
class JeaViewProperty extends JViewLegacy
{
	/**
	 * The form object
	 *
	 * @var JForm
	 */
	protected $form;

	/**
	 * The database record
	 *
	 * @var JObject|boolean
	 */
	protected $item;

	/**
	 * The model state
	 *
	 * @var JObject
	 */
	protected $state;

	/**
	 * The actions the user is authorised to perform
	 *
	 * @var  JObject
	 */
	protected $canDo;

	/**
	 * Overrides parent method.
	 *
	 * @param   string  $tpl  The name of the template file to parse.
	 *
	 * @return  mixed  A string if successful, otherwise an Error object.
	 *
	 * @see     JViewLegacy::display()
	 */
	public function display($tpl = null)
	{
		$this->form = $this->get('Form');
		$this->item = $this->get('Item');
		$this->state = $this->get('State');
		$this->canDo = JeaHelper::getActions($this->item->id);

		$this->addToolbar();

		parent::display($tpl);
	}

	/**
	 * Add the page title and toolbar.
	 *
	 * @return void
	 */
	protected function addToolbar()
	{
		JFactory::getApplication()->input->set('hidemainmenu',
true);
		$user = JFactory::getUser();

		$isNew = ($this->item->id == 0);
		$checkedOut = ! ($this->item->checked_out == 0 ||
$this->item->checked_out == $user->id);

		$title = JText::_('COM_JEA_PROPERTIES_MANAGEMENT') . ' :
';
		$title .= $isNew ? JText::_('JACTION_CREATE') :
JText::_('JACTION_EDIT');

		JToolBarHelper::title($title, 'jea');

		// Built the actions for new and existing records.
		// For new records, check the create permission.
		if ($isNew && ($this->canDo->get('core.create')))
		{
			JToolBarHelper::apply('property.apply');
			JToolBarHelper::save('property.save');
			JToolBarHelper::save2new('property.save2new');
			JToolBarHelper::cancel('property.cancel');
		}
		else
		{
			// Can't save the record if it's checked out.
			if (! $checkedOut)
			{
				// Since it's an existing record, check the edit permission, or
				// fall back to edit own if the owner.
				if ($this->canDo->get('core.edit') ||
($this->canDo->get('core.edit.own') &&
$this->item->created_by == $user->id))
				{
					JToolBarHelper::apply('property.apply');
					JToolBarHelper::save('property.save');

					// We can save this record, but check the create permission
					// to see if we can return to make a new one.
					if ($this->canDo->get('core.create'))
					{
						JToolBarHelper::save2new('property.save2new');
					}
				}
			}

			// If checked out, we can still save
			if ($this->canDo->get('core.create'))
			{
				JToolBarHelper::save2copy('property.save2copy');
			}

			JToolBarHelper::cancel('property.cancel',
'JTOOLBAR_CLOSE');
		}
	}
}
filter/tmpl/edit.php000064400000006744151160203430010451 0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_finder
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

JHtml::_('behavior.formvalidator');
JHtml::_('behavior.keepalive');
JHtml::_('formbehavior.chosen', 'select');
JHtml::_('behavior.tabstate');

JFactory::getDocument()->addScriptDeclaration('
	Joomla.submitbutton = function(task)
	{
		if (task == "filter.cancel" ||
document.formvalidator.isValid(document.getElementById("adminForm")))
		{
			Joomla.submitform(task, document.getElementById("adminForm"));
		}
	};

	jQuery(document).ready(function($) {
		$("#rightbtn").on("click", function() {
			if($(this).text() == "' .
JText::_('COM_FINDER_FILTER_SHOW_ALL') . '") {
				$(".collapse:not(.in)").each(function (index) {
					$(this).collapse("toggle");
				});
				$(this).text("' .
JText::_('COM_FINDER_FILTER_HIDE_ALL') . '");
			} else {
				$(this).text("' .
JText::_('COM_FINDER_FILTER_SHOW_ALL') . '");
				$(".collapse.in").each(function (index) {
				$(this).collapse("toggle");
			});
		}
		return false;
		});

		$(".filter-node").change(function() {
			$(\'input[id="jform_map_count"]\').val(document.querySelectorAll(\'input[type="checkbox"]:checked\').length);
		});


	});
');

JFactory::getDocument()->addStyleDeclaration('
	.accordion-inner .control-group .controls {
		margin-left: 10px;
	}
	.accordion-inner > .control-group {
		margin-bottom: 0;
	}
	');
?>

<form action="<?php echo
JRoute::_('index.php?option=com_finder&view=filter&layout=edit&filter_id='
. (int) $this->item->filter_id); ?>" method="post"
name="adminForm" id="adminForm"
class="form-validate">

	<?php echo JLayoutHelper::render('joomla.edit.title_alias',
$this); ?>

	<div class="form-horizontal">
		<?php echo JHtml::_('bootstrap.startTabSet',
'myTab', array('active' => 'details'));
?>

		<?php echo JHtml::_('bootstrap.addTab', 'myTab',
'details', JText::_('COM_FINDER_EDIT_FILTER')); ?>
		<div class="row-fluid">
			<div class="span9">
				<?php if ($this->total > 0) : ?>
					<div class="well">
						<?php echo $this->form->renderField('map_count');
?>
					</div>
					<button class="btn jform-rightbtn"
type="button"
onclick="jQuery('.filter-node').each(function () {
this.click(); });">
						<span class="icon-checkbox-partial"
aria-hidden="true"></span> <?php echo
JText::_('JGLOBAL_SELECTION_INVERT'); ?></button>

					<button class="btn pull-right" type="button"
id="rightbtn" ><?php echo
JText::_('COM_FINDER_FILTER_SHOW_ALL'); ?></button>
					<hr>
				<?php endif; ?>

				<?php echo JHtml::_('filter.slider',
array('selected_nodes' => $this->filter->data)); ?>
			</div>
			<div class="span3">
				<?php echo JLayoutHelper::render('joomla.edit.global',
$this); ?>
			</div>
		</div>
		<?php echo JHtml::_('bootstrap.endTab'); ?>

		<?php echo JHtml::_('bootstrap.addTab', 'myTab',
'publishing', JText::_('JGLOBAL_FIELDSET_PUBLISHING'));
?>
		<div class="row-fluid form-horizontal-desktop">
			<?php echo
JLayoutHelper::render('joomla.edit.publishingdata', $this); ?>
		</div>
		<?php echo JHtml::_('bootstrap.endTab'); ?>

		<?php echo JLayoutHelper::render('joomla.edit.params',
$this); ?>

		<?php echo JHtml::_('bootstrap.endTabSet'); ?>
	</div>

	<input type="hidden" name="task" value=""
/>
	<input type="hidden" name="return"
value="<?php echo
JFactory::getApplication()->input->get('return',
'', 'BASE64'); ?>" />
	<?php echo JHtml::_('form.token'); ?>
</form>
filter/view.html.php000064400000024531151160203430010457 0ustar00<?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 FilterViewFilter extends hikashopView{

	var $ctrl= 'filter';
	var $nameListing = 'FILTERS';
	var $nameForm = 'FILTER';
	var $icon = 'filter';

	function display($tpl = null){
		$function = $this->getLayout();
		$this->paramBase =
HIKASHOP_COMPONENT.'.'.$this->getName();
		if(method_exists($this,$function)) $this->$function();

		parent::display($tpl);
	}

	function listing(){
		$app = JFactory::getApplication();
		$pageInfo = new stdClass();
		$pageInfo->filter = new stdClass();
		$pageInfo->filter->order = new stdClass();
		$pageInfo->limit = new stdClass();
		$pageInfo->filter->order->value =
$app->getUserStateFromRequest(
$this->paramBase.".filter_order",
'filter_order',	'a.filter_id','cmd' );
		$pageInfo->filter->order->dir	=
$app->getUserStateFromRequest(
$this->paramBase.".filter_order_Dir",
'filter_order_Dir',	'desc',	'word' );
		$pageInfo->search = $app->getUserStateFromRequest(
$this->paramBase.".search", 'search', '',
'string' );
		$pageInfo->search = JString::strtolower( $pageInfo->search );
		$pageInfo->limit->value = $app->getUserStateFromRequest(
$this->paramBase.'.list_limit', 'limit',
$app->getCfg('list_limit'), 'int' );
		if(empty($pageInfo->limit->value)) $pageInfo->limit->value =
500;
		$pageInfo->limit->start = $app->getUserStateFromRequest(
$this->paramBase.'.limitstart', 'limitstart', 0,
'int' );
		$database	= JFactory::getDBO();
		$searchMap = array('a.filter_id', 'a.filter_name');
		$filters = array();
		if(!empty($pageInfo->search)){
			$searchVal =
'\'%'.hikashop_getEscaped($pageInfo->search,true).'%\'';
			$filters[] = implode(" LIKE $searchVal OR ",$searchMap)."
LIKE $searchVal";
		}

		$query = ' FROM '.hikashop_table('filter').' AS
a';
		if(!empty($filters)){
			$query.= ' WHERE ('.implode(') AND
(',$filters).')';
		}
		if(!empty($pageInfo->filter->order->value)){
			$query .= ' ORDER BY
'.$pageInfo->filter->order->value.'
'.$pageInfo->filter->order->dir;
		}

		$database->setQuery('SELECT
a.*'.$query,$pageInfo->limit->start,$pageInfo->limit->value);
		$rows = $database->loadObjectList();
		if(!empty($pageInfo->search)){
			$rows =
hikashop_search($pageInfo->search,$rows,'filter_id');
		}
		$database->setQuery('SELECT count(*)'.$query );
		$pageInfo->elements = new stdClass();
		$pageInfo->elements->total = $database->loadResult();
		$pageInfo->elements->page = count($rows);
		if($pageInfo->limit->value == 500) $pageInfo->limit->value =
0;

		hikashop_setTitle(JText::_($this->nameListing),$this->icon,$this->ctrl);

		$config =& hikashop_config();
		$manage =
hikashop_isAllowed($config->get('acl_filter_manage','all'));
		$this->assignRef('manage',$manage);

		$this->toolbar = array(
			array('name'=>'addNew','display'=>$manage),
			array('name'=>'editList','display'=>$manage),
			array('name'=>'deleteList','display'=>hikashop_isAllowed($config->get('acl_filter_delete','all'))),
			'|',
			array('name' => 'pophelp', 'target'
=> $this->ctrl.'-listing'),
			'dashboard'
		);

		$toggleClass = hikashop_get('helper.toggle');
		$this->assignRef('toggleClass',$toggleClass);
		$this->assignRef('rows',$rows);
		$this->assignRef('pageInfo',$pageInfo);
		$this->getPagination();

		$order = new stdClass();
		if($this->pageInfo->filter->order->value!='a.filter_ordering'){
			$order->ordering = false;
		}else{
			$order->ordering = true;
		}

		$order->orderUp = 'orderup';
		$order->orderDown = 'orderdown';
		$order->reverse = false;
		if($pageInfo->filter->order->value ==
'a.filter_ordering'){
			if($pageInfo->filter->order->dir == 'desc'){
				$order->orderUp = 'orderdown';
				$order->orderDown = 'orderup';
				$order->reverse = true;
			}
		}
		$this->assignRef('order',$order);
	}

	function form(){
		$filter_id = hikashop_getCID('filter_id',false);
		if(!empty($filter_id)){
			$class = hikashop_get('class.filter');
			$element = $class->get($filter_id);
			$task='edit';
		}else{
			$element = JRequest::getVar('fail');
			if(empty($element)){
				$element = new stdClass();
				$app = JFactory::getApplication();
				$type = $app->getUserState(
$this->paramBase.".filter_type");
				if(!in_array($type,array('all','nochilds'))){
					$element->filter_type = $type;
				}else{
					$element->filter_type = 'textarea';
				}
				$element->filter_published=1;
				$element->filter_options['title_position']='top';
				$element->filter_options['cursor_number']='2';
			}
			$task='add';
		}
		$database = JFactory::getDBO();
		if(!empty($filter_id)){
			$query = 'SELECT category_name FROM
'.hikashop_table('filter').' AS a INNER JOIN
'.hikashop_table('category').' AS b ON
a.filter_category_id=b.category_id WHERE filter_id =
'.(int)$filter_id;
			$database->setQuery($query);
			$element->filter_category_name = $database->loadResult();
			$element->filter_options=unserialize($element->filter_options);

			$element->filter_data=unserialize($element->filter_data);

			$categories=array();
			if(!empty($element->filter_options['parent_category_id'])){
				$query= 'SELECT category_name FROM
'.hikashop_table('category').' WHERE
category_id='.(int)$element->filter_options['parent_category_id'].'';
				$database->setQuery($query);
				$element->filter_options['parent_category_name']=$database->loadResult();
			}
		}

		$fields=array();

		if(isset($element->filter_category_id)){
			if($element->filter_category_childs){
				$categories_filter=array();
				$categoryClass = hikashop_get('class.category');
				$childs =
$categoryClass->getChilds($element->filter_category_id,true);
				$parents =
$categoryClass->getParents($element->filter_category_id);
				foreach($childs as $cat){
					 $categories_filter[]='field_categories LIKE
\'%,'.$cat->category_id.',%\'';
				}
				$filters=implode(' OR ',$categories_filter);
				$categories_filter=array();
				if(!empty($parents)){
					foreach($parents as $cat){
						 $categories_filter[]='field_categories LIKE
\'%,'.$cat->category_id.',%\'';
					}
					if(!empty($filters)){ $filters.=' OR ';}
					$filters.=' ('.implode(' OR
',$categories_filter).' AND field_with_sub_categories=1) ';
				}
				if(empty($filters)){
					$filters.= ' field_categories LIKE
\'%,'.(int)$element->filter_category_id.',%\'';
				}else{
					$filters.= 'OR field_categories LIKE
\'%,'.(int)$element->filter_category_id.',%\'';
				}
			}else{
				$filters= 'field_categories LIKE
\'%,'.(int)$element->filter_category_id.',%\'';
			}
			$database->setQuery('SELECT * FROM
'.hikashop_table('field').' WHERE
('.$filters.' OR field_categories LIKE "all") AND
field_table IN ("product") AND field_published=1');
			$fields=$database->loadObjectList('field_realname');
		}

		if(!empty($element->filter_value)){
				$element->filter_value=explode("\n",
$element->filter_value);
			 foreach($element->filter_value as $key => $val){
				 $temp=explode("::", $val);
				 $element->filter_value[$key]=$temp[1];
			 }
		}

		hikashop_setTitle(JText::_($this->nameForm),$this->icon,$this->ctrl.'&task='.$task.'&filter_id='.$filter_id);

		$js='
		function addLine(){
			var myTable=window.document.getElementById("tablevalues");
			var newline = document.createElement(\'tr\');
			var column2 = document.createElement(\'td\');
			var input = document.createElement(\'input\');
			input.type = \'text\';
			input.name = \'filter_values[value][]\';
			column2.appendChild(input);
			newline.appendChild(column2);
			myTable.appendChild(newline);
		}

		function deleteRow(divName,inputName,rowName){
			var d = document.getElementById(divName);
			var olddiv = document.getElementById(inputName);
			if(d && olddiv){
				d.removeChild(olddiv);
				document.getElementById(rowName).style.display="none";
			}
			return false;
		}

		function setVisibleUnit(value){
		if(value==\'weight\'){
			document.getElementById(\'weight_unit\').style.display =
\'\';
			document.getElementById(\'dimension_unit\').style.display =
\'none\';
		}else if(value==\'height\' || value==\'volume\' ||
value==\'surface\' || value==\'length\' ||
value==\'width\'){
			document.getElementById(\'weight_unit\').style.display =
\'none\';
			document.getElementById(\'dimension_unit\').style.display =
\'\';
		}else{
			document.getElementById(\'weight_unit\').style.display =
\'none\';
			document.getElementById(\'dimension_unit\').style.display =
\'none\';
		}
	}
		';
		$doc = JFactory::getDocument();
		$doc->addScriptDeclaration( $js);

		$this->toolbar = array(
			'save',
			'apply',
			'cancel',
			'|',
			array('name' => 'pophelp', 'target'
=> $this->ctrl.'-form')
		);

		$this->assignRef('element',$element);
		$status = hikashop_get('type.categorysub');
		$status->type='status';
		$filterType = hikashop_get('type.filter');
		$this->assignRef('filterType',$filterType);
		$positionType = hikashop_get('type.position');
		$this->assignRef('positionType',$positionType);
		$divPositionType = hikashop_get('type.div_position');
		$this->assignRef('div_positionType',$divPositionType);
		$data_filterType = hikashop_get('type.data_filter');
		$this->assignRef('data_filterType',$data_filterType);
		$limitparentType = hikashop_get('type.limitparent');
		$this->assignRef('limitparentType',$limitparentType);
		$orderType = hikashop_get('type.order');
		$this->assignRef('orderType',$orderType);
		$volumeType = hikashop_get('type.volume');
	$this->assignRef('volume',$volumeType);
	$weightType = hikashop_get('type.weight');
		$this->assignRef('weight',$weightType);
		$currencyType = hikashop_get('type.currency');
		$this->assignRef('currencyType',$currencyType);
		$product_informationType =
hikashop_get('type.product_information');
		$this->assignRef('product_informationType',$product_informationType);
		$characteristiclistType =
hikashop_get('type.characteristiclist');
		$this->assignRef('characteristiclistType',$characteristiclistType);
		$categoryType = hikashop_get('type.categorysub');
		$categoryType->type='tax';
		$categoryType->field='category_id';
		$this->assignRef('categoryType',$categoryType);
		$this->assignRef('fields',$fields);
		$popup=hikashop_get('helper.popup');
		$this->assignRef('popup',$popup);
	}

}
filters/tmpl/default.php000064400000011643151160203430011325
0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_finder
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

JHtml::_('formbehavior.chosen', 'select');
JHtml::_('bootstrap.tooltip');

$user      = JFactory::getUser();
$userId    = $user->get('id');
$listOrder =
$this->escape($this->state->get('list.ordering'));
$listDirn  =
$this->escape($this->state->get('list.direction'));

JText::script('COM_FINDER_INDEX_CONFIRM_DELETE_PROMPT');

JFactory::getDocument()->addScriptDeclaration('
	Joomla.submitbutton = function(pressbutton)
	{
		if (pressbutton == "filters.delete")
		{
			if
(confirm(Joomla.JText._("COM_FINDER_INDEX_CONFIRM_DELETE_PROMPT")))
			{
				Joomla.submitform(pressbutton);
			}
			else
			{
				return false;
			}
		}
		Joomla.submitform(pressbutton);
	};
');
?>
<form action="<?php echo
JRoute::_('index.php?option=com_finder&view=filters');
?>" method="post" name="adminForm"
id="adminForm">
	<?php if (!empty( $this->sidebar)) : ?>
	<div id="j-sidebar-container" class="span2">
		<?php echo $this->sidebar; ?>
	</div>
	<div id="j-main-container" class="span10">
	<?php else : ?>
	<div id="j-main-container">
	<?php endif; ?>
		<?php echo
JLayoutHelper::render('joomla.searchtools.default',
array('view' => $this)); ?>
		<div class="clearfix"> </div>
		<?php if (empty($this->items)) : ?>
		<div class="alert alert-no-items">
			<?php echo JText::_('COM_FINDER_NO_RESULTS_OR_FILTERS');
?>
		</div>
		<?php else : ?>
		<table class="table table-striped">
			<thead>
				<tr>
					<th width="1%" class="nowrap center">
						<?php echo JHtml::_('grid.checkall'); ?>
					</th>
					<th width="1%" class="nowrap">
						<?php echo JHtml::_('searchtools.sort',
'JSTATUS', 'a.state', $listDirn, $listOrder); ?>
					</th>
					<th class="nowrap">
						<?php echo JHtml::_('searchtools.sort',
'JGLOBAL_TITLE', 'a.title', $listDirn, $listOrder);
?>
					</th>
					<th width="10%" class="nowrap hidden-phone">
						<?php echo JHtml::_('searchtools.sort',
'COM_FINDER_HEADING_CREATED_BY', 'a.created_by_alias',
$listDirn, $listOrder); ?>
					</th>
					<th width="10%" class="nowrap hidden-phone">
						<?php echo JHtml::_('searchtools.sort',
'COM_FINDER_HEADING_CREATED_ON', 'a.created',
$listDirn, $listOrder); ?>
					</th>
					<th width="5%" class="nowrap hidden-phone">
						<?php echo JHtml::_('searchtools.sort',
'COM_FINDER_HEADING_MAP_COUNT', 'a.map_count',
$listDirn, $listOrder); ?>
					</th>
					<th width="1%" class="nowrap hidden-phone">
						<?php echo JHtml::_('searchtools.sort',
'JGRID_HEADING_ID', 'a.filter_id', $listDirn,
$listOrder); ?>
					</th>
				</tr>
			</thead>
			<tfoot>
				<tr>
					<td colspan="7">
						<?php echo $this->pagination->getListFooter(); ?>
					</td>
				</tr>
			</tfoot>
			<tbody>
				<?php
				$canCreate                  =
$user->authorise('core.create', 'com_finder');
				$canEdit                    =
$user->authorise('core.edit', 'com_finder');
				$userAuthoriseCoreManage    =
$user->authorise('core.manage', 'com_checkin');
				$userAuthoriseCoreEditState =
$user->authorise('core.edit.state', 'com_finder');
				$userId                     = $user->get('id');
				foreach ($this->items as $i => $item) :
					$canCheckIn   = $userAuthoriseCoreManage || $item->checked_out ==
$userId || $item->checked_out == 0;
					$canChange    = $userAuthoriseCoreEditState && $canCheckIn;
					$escapedTitle = $this->escape($item->title);
					?>
					<tr class="row<?php echo $i % 2; ?>">
						<td class="center">
							<?php echo JHtml::_('grid.id', $i,
$item->filter_id); ?>
						</td>
						<td class="center nowrap">
							<?php echo JHtml::_('jgrid.published', $item->state,
$i, 'filters.', $canChange); ?>
						</td>
						<td>
							<?php if ($item->checked_out) : ?>
								<?php echo JHtml::_('jgrid.checkedout', $i,
$item->editor, $item->checked_out_time, 'filters.',
$canCheckIn); ?>
							<?php endif; ?>
							<?php if ($canEdit) : ?>
								<a href="<?php echo
JRoute::_('index.php?option=com_finder&task=filter.edit&filter_id='
. (int) $item->filter_id); ?>">
									<?php echo $escapedTitle; ?></a>
							<?php else : ?>
								<?php echo $escapedTitle; ?>
							<?php endif; ?>
						</td>
						<td class="nowrap hidden-phone">
							<?php echo $item->created_by_alias ?: $item->user_name;
?>
						</td>
						<td class="nowrap hidden-phone">
							<?php echo JHtml::_('date', $item->created,
JText::_('DATE_FORMAT_LC4')); ?>
						</td>
						<td class="nowrap hidden-phone">
							<?php echo $item->map_count; ?>
						</td>
						<td class="hidden-phone">
							<?php echo (int) $item->filter_id; ?>
						</td>
					</tr>
				<?php endforeach; ?>
			</tbody>
		</table>
		<?php endif; ?>
		<input type="hidden" name="task"
value="" />
		<input type="hidden" name="boxchecked"
value="0" />
		<?php echo JHtml::_('form.token'); ?>
	</div>
</form>
filters/view.html.php000064400000005765151160203430010652 0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_finder
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

/**
 * Filters view class for Finder.
 *
 * @since  2.5
 */
class FinderViewFilters extends JViewLegacy
{
	/**
	 * An array of items
	 *
	 * @var  array
	 *
	 * @since  3.6.1
	 */
	protected $items;

	/**
	 * The pagination object
	 *
	 * @var  JPagination
	 *
	 * @since  3.6.1
	 */
	protected $pagination;

	/**
	 * The HTML markup for the sidebar
	 *
	 * @var  string
	 *
	 * @since  3.6.1
	 */
	protected $sidebar;

	/**
	 * The model state
	 *
	 * @var  mixed
	 *
	 * @since  3.6.1
	 */
	protected $state;

	/**
	 * The total number of items
	 *
	 * @var  integer
	 *
	 * @since  3.6.1
	 */
	protected $total;

	/**
	 * Method to display the view.
	 *
	 * @param   string  $tpl  A template file to load. [optional]
	 *
	 * @return  mixed  A string if successful, otherwise a JError object.
	 *
	 * @since   2.5
	 */
	public function display($tpl = null)
	{
		// Load the view data.
		$this->items         = $this->get('Items');
		$this->pagination    = $this->get('Pagination');
		$this->total         = $this->get('Total');
		$this->state         = $this->get('State');
		$this->filterForm    = $this->get('FilterForm');
		$this->activeFilters = $this->get('ActiveFilters');

		FinderHelper::addSubmenu('filters');

		// Check for errors.
		if (count($errors = $this->get('Errors')))
		{
			throw new Exception(implode("\n", $errors), 500);
		}

		JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html');

		// Configure the toolbar.
		$this->addToolbar();
		$this->sidebar = JHtmlSidebar::render();

		return parent::display($tpl);
	}

	/**
	 * Method to configure the toolbar for this view.
	 *
	 * @return  void
	 *
	 * @since   2.5
	 */
	protected function addToolbar()
	{
		$canDo = JHelperContent::getActions('com_finder');

		JToolbarHelper::title(JText::_('COM_FINDER_FILTERS_TOOLBAR_TITLE'),
'zoom-in finder');
		$toolbar = JToolbar::getInstance('toolbar');

		if ($canDo->get('core.create'))
		{
			JToolbarHelper::addNew('filter.add');
			JToolbarHelper::editList('filter.edit');
			JToolbarHelper::divider();
		}

		if ($canDo->get('core.edit.state'))
		{
			JToolbarHelper::publishList('filters.publish');
			JToolbarHelper::unpublishList('filters.unpublish');
			JToolbarHelper::checkin('filters.checkin');
			JToolbarHelper::divider();
		}

		if ($canDo->get('core.admin') ||
$canDo->get('core.options'))
		{
			JToolbarHelper::preferences('com_finder');
		}

		JToolbarHelper::divider();
		$toolbar->appendButton('Popup', 'bars',
'COM_FINDER_STATISTICS',
'index.php?option=com_finder&view=statistics&tmpl=component',
550, 350);
		JToolbarHelper::divider();
		JToolbarHelper::help('JHELP_COMPONENTS_FINDER_MANAGE_SEARCH_FILTERS');

		if ($canDo->get('core.delete'))
		{
			JToolbarHelper::deleteList('', 'filters.delete');
			JToolbarHelper::divider();
		}
	}
}
index/tmpl/default.php000064400000011624151160203430010763 0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_finder
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

JHtml::_('bootstrap.tooltip');
JHtml::_('formbehavior.chosen', 'select');
JHtml::_('bootstrap.popover');

$listOrder =
$this->escape($this->state->get('list.ordering'));
$listDirn  =
$this->escape($this->state->get('list.direction'));
$lang      = JFactory::getLanguage();

JText::script('COM_FINDER_INDEX_CONFIRM_PURGE_PROMPT');
JText::script('COM_FINDER_INDEX_CONFIRM_DELETE_PROMPT');

JFactory::getDocument()->addScriptDeclaration('
	Joomla.submitbutton = function(pressbutton)
	{
		if (pressbutton == "index.purge")
		{
			if
(confirm(Joomla.JText._("COM_FINDER_INDEX_CONFIRM_PURGE_PROMPT")))
			{
				Joomla.submitform(pressbutton);
			}
			else
			{
				return false;
			}
		}
		if (pressbutton == "index.delete")
		{
			if
(confirm(Joomla.JText._("COM_FINDER_INDEX_CONFIRM_DELETE_PROMPT")))
			{
				Joomla.submitform(pressbutton);
			}
			else
			{
				return false;
			}
		}

		Joomla.submitform(pressbutton);
	};
');
?>
<form action="<?php echo
JRoute::_('index.php?option=com_finder&view=index');
?>" method="post" name="adminForm"
id="adminForm">
<?php if (!empty( $this->sidebar)) : ?>
	<div id="j-sidebar-container" class="span2">
		<?php echo $this->sidebar; ?>
	</div>
	<div id="j-main-container" class="span10">
<?php else : ?>
	<div id="j-main-container">
<?php endif; ?>
		<?php echo
JLayoutHelper::render('joomla.searchtools.default',
array('view' => $this)); ?>
		<table class="table table-striped">
			<thead>
				<tr>
					<th width="1%" class="nowrap center">
						<?php echo JHtml::_('grid.checkall'); ?>
					</th>
					<th width="1%" class="nowrap center">
						<?php echo JHtml::_('searchtools.sort',
'JSTATUS', 'l.published', $listDirn, $listOrder); ?>
					</th>
					<th class="nowrap">
						<?php echo JHtml::_('searchtools.sort',
'JGLOBAL_TITLE', 'l.title', $listDirn, $listOrder);
?>
					</th>
					<th width="5%" class="nowrap hidden-phone">
						<?php echo JHtml::_('searchtools.sort',
'COM_FINDER_INDEX_HEADING_INDEX_TYPE', 't.title',
$listDirn, $listOrder); ?>
					</th>
					<th width="1%" class="nowrap hidden-phone">
						<?php echo JHtml::_('searchtools.sort',
'COM_FINDER_INDEX_HEADING_INDEX_DATE', 'l.indexdate',
$listDirn, $listOrder); ?>
					</th>
					<th width="1%" class="nowrap center hidden-phone
hidden-tablet">
						<?php echo JText::_('COM_FINDER_INDEX_HEADING_DETAILS');
?>
					</th>
					<th width="35%" class="nowrap hidden-phone
hidden-tablet">
						<?php echo JHtml::_('searchtools.sort',
'COM_FINDER_INDEX_HEADING_LINK_URL', 'l.url',
$listDirn, $listOrder); ?>
					</th>
				</tr>
			</thead>
			<tfoot>
				<tr>
					<td colspan="7">
						<?php echo $this->pagination->getListFooter(); ?>
					</td>
				</tr>
			</tfoot>
			<tbody>
				<?php $canChange =
JFactory::getUser()->authorise('core.manage',
'com_finder'); ?>
				<?php foreach ($this->items as $i => $item) : ?>
				<tr class="row<?php echo $i % 2; ?>">
					<td class="center">
						<?php echo JHtml::_('grid.id', $i, $item->link_id);
?>
					</td>
					<td class="center">
						<?php echo JHtml::_('jgrid.published',
$item->published, $i, 'index.', $canChange, 'cb');
?>
					</td>
					<td>
						<label for="cb<?php echo $i ?>">
							<?php echo $this->escape($item->title); ?>
						</label>
					</td>
					<td class="small nowrap hidden-phone">
						<?php
						$key = FinderHelperLanguage::branchSingular($item->t_title);
						echo $lang->hasKey($key) ? JText::_($key) : $item->t_title;
						?>
					</td>
					<td class="small nowrap hidden-phone">
						<?php echo JHtml::_('date', $item->indexdate,
JText::_('DATE_FORMAT_LC4')); ?>
					</td>
					<td class="center hidden-phone hidden-tablet">
						<?php if ((int) $item->publish_start_date || (int)
$item->publish_end_date || (int) $item->start_date || (int)
$item->end_date) : ?>
							<span class="icon-calendar pop hasPopover"
aria-hidden="true" data-placement="left"
title="<?php echo
JText::_('COM_FINDER_INDEX_DATE_INFO_TITLE'); ?>"
data-content="<?php echo
JText::sprintf('COM_FINDER_INDEX_DATE_INFO',
$item->publish_start_date, $item->publish_end_date,
$item->start_date, $item->end_date); ?>"></span>
							<span class="element-invisible"><?php echo
JText::sprintf('COM_FINDER_INDEX_DATE_INFO',
$item->publish_start_date, $item->publish_end_date,
$item->start_date, $item->end_date); ?></span>
						<?php endif; ?>
					</td>
					<td class="small break-word hidden-phone
hidden-tablet">
						<?php echo (strlen($item->url) > 80) ? substr($item->url,
0, 70) . '...' : $item->url; ?>
					</td>
				</tr>

				<?php endforeach; ?>
			</tbody>
		</table>
		<input type="hidden" name="task"
value="display" />
		<input type="hidden" name="boxchecked"
value="0" />
		<?php echo JHtml::_('form.token'); ?>
	</div>
</form>
index/view.html.php000064400000007537151160203430010310 0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_finder
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

JLoader::register('FinderHelperLanguage', JPATH_ADMINISTRATOR .
'/components/com_finder/helpers/language.php');

/**
 * Index view class for Finder.
 *
 * @since  2.5
 */
class FinderViewIndex extends JViewLegacy
{
	/**
	 * An array of items
	 *
	 * @var  array
	 *
	 * @since  3.6.1
	 */
	protected $items;

	/**
	 * The pagination object
	 *
	 * @var  JPagination
	 *
	 * @since  3.6.1
	 */
	protected $pagination;

	/**
	 * The state of core Smart Search plugins
	 *
	 * @var  array
	 *
	 * @since  3.6.1
	 */
	protected $pluginState;

	/**
	 * The HTML markup for the sidebar
	 *
	 * @var  string
	 *
	 * @since  3.6.1
	 */
	protected $sidebar;

	/**
	 * The model state
	 *
	 * @var  mixed
	 *
	 * @since  3.6.1
	 */
	protected $state;

	/**
	 * The total number of items
	 *
	 * @var  integer
	 *
	 * @since  3.6.1
	 */
	protected $total;

	/**
	 * Method to display the view.
	 *
	 * @param   string  $tpl  A template file to load. [optional]
	 *
	 * @return  mixed  A string if successful, otherwise a JError object.
	 *
	 * @since   2.5
	 */
	public function display($tpl = null)
	{
		// Load plugin language files.
		FinderHelperLanguage::loadPluginLanguage();

		$this->items         = $this->get('Items');
		$this->total         = $this->get('Total');
		$this->pagination    = $this->get('Pagination');
		$this->state         = $this->get('State');
		$this->pluginState   = $this->get('pluginState');
		$this->filterForm    = $this->get('FilterForm');
		$this->activeFilters = $this->get('ActiveFilters');

		FinderHelper::addSubmenu('index');

		// Check for errors.
		if (count($errors = $this->get('Errors')))
		{
			JError::raiseError(500, implode("\n", $errors));

			return false;
		}

		if (!$this->pluginState['plg_content_finder']->enabled)
		{
			$link =
JRoute::_('index.php?option=com_plugins&task=plugin.edit&extension_id='
. FinderHelper::getFinderPluginId());
			JFactory::getApplication()->enqueueMessage(JText::sprintf('COM_FINDER_INDEX_PLUGIN_CONTENT_NOT_ENABLED',
$link), 'warning');
		}
		elseif ($this->get('TotalIndexed') === 0)
		{
			JFactory::getApplication()->enqueueMessage(JText::_('COM_FINDER_INDEX_NO_DATA')
. '  ' . JText::_('COM_FINDER_INDEX_TIP'),
'notice');
		}

		JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html');

		// Configure the toolbar.
		$this->addToolbar();
		$this->sidebar = JHtmlSidebar::render();

		return parent::display($tpl);
	}

	/**
	 * Method to configure the toolbar for this view.
	 *
	 * @return  void
	 *
	 * @since   2.5
	 */
	protected function addToolbar()
	{
		$canDo = JHelperContent::getActions('com_finder');

		JToolbarHelper::title(JText::_('COM_FINDER_INDEX_TOOLBAR_TITLE'),
'zoom-in finder');

		$toolbar = JToolbar::getInstance('toolbar');
		$toolbar->appendButton(
			'Popup', 'archive', 'COM_FINDER_INDEX',
'index.php?option=com_finder&view=indexer&tmpl=component',
500, 210, 0, 0,
			'window.parent.location.reload()',
'COM_FINDER_HEADING_INDEXER'
		);

		if ($canDo->get('core.edit.state'))
		{
			JToolbarHelper::publishList('index.publish');
			JToolbarHelper::unpublishList('index.unpublish');
		}

		if ($canDo->get('core.admin') ||
$canDo->get('core.options'))
		{
			JToolbarHelper::preferences('com_finder');
		}

		$toolbar->appendButton('Popup', 'bars',
'COM_FINDER_STATISTICS',
'index.php?option=com_finder&view=statistics&tmpl=component',
550, 350);

		if ($canDo->get('core.delete'))
		{
			JToolbarHelper::deleteList('', 'index.delete');
		}

		if ($canDo->get('core.edit.state'))
		{
			JToolbarHelper::trash('index.purge',
'COM_FINDER_INDEX_TOOLBAR_PURGE', false);
		}

		JToolbarHelper::help('JHELP_COMPONENTS_FINDER_MANAGE_INDEXED_CONTENT');
	}
}
indexer/tmpl/default.php000064400000002162151160203430011307
0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_finder
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

JHtml::_('behavior.keepalive');
JHtml::_('behavior.core');
JHtml::_('jquery.framework');
JHtml::_('script', 'com_finder/indexer.js',
array('version' => 'auto', 'relative'
=> true));
JFactory::getDocument()->addScriptDeclaration('var msg =
"' . JText::_('COM_FINDER_INDEXER_MESSAGE_COMPLETE') .
'";');
?>

<div id="finder-indexer-container">
	<br /><br />
	<h1 id="finder-progress-header"><?php echo
JText::_('COM_FINDER_INDEXER_HEADER_INIT'); ?></h1>

	<p id="finder-progress-message"><?php echo
JText::_('COM_FINDER_INDEXER_MESSAGE_INIT'); ?></p>

	<div id="progress" class="progress progress-striped
active">
		<div id="progress-bar" class="bar bar-success"
aria-valuenow="0" aria-valuemin="0"
aria-valuemax="100"></div>
	</div>

	<input id="finder-indexer-token" type="hidden"
name="<?php echo JFactory::getSession()->getFormToken();
?>" value="1" />
</div>
indexer/view.html.php000064400000000602151160203430010621 0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_finder
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

/**
 * Indexer view class for Finder.
 *
 * @since  2.5
 */
class FinderViewIndexer extends JViewLegacy
{

}
maps/tmpl/default.php000064400000013227151160203430010615 0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_finder
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

JHtml::_('formbehavior.chosen', 'select');
JHtml::_('bootstrap.tooltip');

$listOrder     =
$this->escape($this->state->get('list.ordering'));
$listDirn      =
$this->escape($this->state->get('list.direction'));
$lang          = JFactory::getLanguage();
$branchFilter  =
$this->escape($this->state->get('filter.branch'));
$colSpan       = $branchFilter ? 5 : 6;
JText::script('COM_FINDER_MAPS_CONFIRM_DELETE_PROMPT');

JFactory::getDocument()->addScriptDeclaration('
	Joomla.submitbutton = function(pressbutton)
	{
		if (pressbutton == "map.delete")
		{
			if
(confirm(Joomla.JText._("COM_FINDER_MAPS_CONFIRM_DELETE_PROMPT")))
			{
				Joomla.submitform(pressbutton);
			}
			else
			{
				return false;
			}
		}
		Joomla.submitform(pressbutton);
	};
');
?>
<form action="<?php echo
JRoute::_('index.php?option=com_finder&view=maps');
?>" method="post" name="adminForm"
id="adminForm">
<?php if (!empty( $this->sidebar)) : ?>
	<div id="j-sidebar-container" class="span2">
		<?php echo $this->sidebar; ?>
	</div>
	<div id="j-main-container" class="span10">
<?php else : ?>
	<div id="j-main-container">
<?php endif; ?>
		<?php echo
JLayoutHelper::render('joomla.searchtools.default',
array('view' => $this)); ?>
		<div class="clearfix"> </div>
		<?php if (empty($this->items)) : ?>
		<div class="alert alert-no-items">
			<?php echo JText::_('COM_FINDER_MAPS_NO_CONTENT'); ?>
		</div>
		<?php else : ?>
		<table class="table table-striped">
			<thead>
				<tr>
					<th width="1%" class="center nowrap">
						<?php echo JHtml::_('grid.checkall'); ?>
					</th>
					<th width="1%" class="center nowrap">
						<?php echo JHtml::_('searchtools.sort',
'JSTATUS', 'a.state', $listDirn, $listOrder); ?>
					</th>
					<th class="nowrap">
						<?php echo JHtml::_('searchtools.sort',
'JGLOBAL_TITLE', 'd.branch_title', $listDirn,
$listOrder); ?>
					</th>
					<?php if (!$branchFilter) : ?>
					<th width="1%" class="nowrap center">
						<?php echo JText::_('COM_FINDER_HEADING_CHILDREN');
?>
					</th>
					<?php endif; ?>
					<th width="1%" class="nowrap center">
						<span class="icon-publish"
aria-hidden="true"></span>
						<span class="hidden-phone"><?php echo
JText::_('COM_FINDER_MAPS_COUNT_PUBLISHED_ITEMS');
?></span>
					</th>
					<th width="1%" class="nowrap center">
						<span class="icon-unpublish"
aria-hidden="true"></span>
						<span class="hidden-phone"><?php echo
JText::_('COM_FINDER_MAPS_COUNT_UNPUBLISHED_ITEMS');
?></span>
					</th>
				</tr>
			</thead>
			<tfoot>
				<tr>
					<td colspan="<?php echo $colSpan; ?>">
						<?php echo $this->pagination->getListFooter(); ?>
					</td>
				</tr>
			</tfoot>
			<tbody>
				<?php $canChange =
JFactory::getUser()->authorise('core.manage',
'com_finder'); ?>
				<?php foreach ($this->items as $i => $item) : ?>
				<tr class="row<?php echo $i % 2; ?>">
					<td class="center">
						<?php echo JHtml::_('grid.id', $i, $item->id); ?>
					</td>
					<td class="center nowrap">
						<?php echo JHtml::_('jgrid.published', $item->state,
$i, 'maps.', $canChange, 'cb'); ?>
					</td>
					<td>
					<?php
					if (trim($item->parent_title, '**') ===
'Language')
					{
						$title = FinderHelperLanguage::branchLanguageTitle($item->title);
					}
					else
					{
						$key = FinderHelperLanguage::branchSingular($item->title);
						$title = $lang->hasKey($key) ? JText::_($key) : $item->title;
					}
					?>
					<?php if ((int) $item->num_children === 0) : ?>
						<span class="gi">&mdash;</span>
					<?php endif; ?>
					<label for="cb<?php echo $i; ?>"
style="display:inline-block;">
						<?php echo $this->escape($title); ?>
					</label>
					<?php if ($this->escape(trim($title, '**')) ===
'Language' && JLanguageMultilang::isEnabled()) : ?>
						<strong><?php echo
JText::_('COM_FINDER_MAPS_MULTILANG'); ?></strong>
					<?php endif; ?>
					</td>
					<?php if (!$branchFilter) : ?>
					<td class="center btns">
					<?php if ((int) $item->num_children !== 0) : ?>
						<a href="<?php echo
JRoute::_('index.php?option=com_finder&view=maps&filter[branch]='
. $item->id); ?>">
							<span class="badge <?php if ($item->num_children >
0) echo 'badge-info'; ?>"><?php echo
$item->num_children; ?></span></a>
					<?php else : ?>
						-
					<?php endif; ?>
					</td>
					<?php endif; ?>
					<td class="center btns">
					<?php if ((int) $item->num_children === 0) : ?>
						<a class="badge <?php if ((int) $item->count_published
> 0) echo 'badge-success'; ?>" title="<?php
echo JText::_('COM_FINDER_MAPS_COUNT_PUBLISHED_ITEMS');
?>" href="<?php echo
JRoute::_('index.php?option=com_finder&view=index&filter[state]=1&filter[content_map]='
. $item->id); ?>">
						<?php echo (int) $item->count_published; ?></a>
					<?php else : ?>
						-
					<?php endif; ?>
					</td>
					<td class="center btns">
					<?php if ((int) $item->num_children === 0) : ?>
						<a class="badge <?php if ((int)
$item->count_unpublished > 0) echo 'badge-important';
?>" title="<?php echo
JText::_('COM_FINDER_MAPS_COUNT_UNPUBLISHED_ITEMS'); ?>"
href="<?php echo
JRoute::_('index.php?option=com_finder&view=index&filter[state]=0&filter[content_map]='
. $item->id); ?>">
						<?php echo (int) $item->count_unpublished; ?></a>
					<?php else : ?>
						-
					<?php endif; ?>
					</td>
				</tr>
				<?php endforeach; ?>
			</tbody>
		</table>
		<?php endif; ?>
	</div>

	<input type="hidden" name="task"
value="display" />
	<input type="hidden" name="boxchecked"
value="0" />
	<?php echo JHtml::_('form.token'); ?>
</form>
maps/view.html.php000064400000005716151160203430010136 0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_finder
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

JLoader::register('FinderHelperLanguage', JPATH_ADMINISTRATOR .
'/components/com_finder/helpers/language.php');

/**
 * Groups view class for Finder.
 *
 * @since  2.5
 */
class FinderViewMaps extends JViewLegacy
{
	/**
	 * An array of items
	 *
	 * @var  array
	 *
	 * @since  3.6.1
	 */
	protected $items;

	/**
	 * The pagination object
	 *
	 * @var  JPagination
	 *
	 * @since  3.6.1
	 */
	protected $pagination;

	/**
	 * The HTML markup for the sidebar
	 *
	 * @var  string
	 *
	 * @since  3.6.1
	 */
	protected $sidebar;

	/**
	 * The model state
	 *
	 * @var  object
	 *
	 * @since  3.6.1
	 */
	protected $state;

	/**
	 * The total number of items
	 *
	 * @var  object
	 *
	 * @since  3.6.1
	 */
	protected $total;

	/**
	 * Method to display the view.
	 *
	 * @param   string  $tpl  A template file to load. [optional]
	 *
	 * @return  mixed  A string if successful, otherwise a JError object.
	 *
	 * @since   2.5
	 */
	public function display($tpl = null)
	{
		// Load plugin language files.
		FinderHelperLanguage::loadPluginLanguage();

		// Load the view data.
		$this->items         = $this->get('Items');
		$this->total         = $this->get('Total');
		$this->pagination    = $this->get('Pagination');
		$this->state         = $this->get('State');
		$this->filterForm    = $this->get('FilterForm');
		$this->activeFilters = $this->get('ActiveFilters');

		FinderHelper::addSubmenu('maps');

		// Check for errors.
		if (count($errors = $this->get('Errors')))
		{
			throw new Exception(implode("\n", $errors), 500);
		}

		JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html');

		// Prepare the view.
		$this->addToolbar();
		$this->sidebar = JHtmlSidebar::render();

		return parent::display($tpl);
	}

	/**
	 * Method to configure the toolbar for this view.
	 *
	 * @return  void
	 *
	 * @since   2.5
	 */
	protected function addToolbar()
	{
		$canDo = JHelperContent::getActions('com_finder');

		JToolbarHelper::title(JText::_('COM_FINDER_MAPS_TOOLBAR_TITLE'),
'zoom-in finder');

		if ($canDo->get('core.edit.state'))
		{
			JToolbarHelper::publishList('maps.publish');
			JToolbarHelper::unpublishList('maps.unpublish');
			JToolbarHelper::divider();
		}

		if ($canDo->get('core.admin') ||
$canDo->get('core.options'))
		{
			JToolbarHelper::preferences('com_finder');
		}

		JToolbarHelper::divider();
		JToolbar::getInstance('toolbar')->appendButton(
			'Popup',
			'bars',
			'COM_FINDER_STATISTICS',
			'index.php?option=com_finder&view=statistics&tmpl=component',
			550,
			350
		);
		JToolbarHelper::divider();
		JToolbarHelper::help('JHELP_COMPONENTS_FINDER_MANAGE_CONTENT_MAPS');

		if ($canDo->get('core.delete'))
		{
			JToolbarHelper::deleteList('', 'maps.delete');
			JToolbarHelper::divider();
		}
	}
}
statistics/tmpl/default.php000064400000004117151160203430012045
0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_finder
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;
?>
<h3>
	<?php echo JText::_('COM_FINDER_STATISTICS_TITLE'); ?>
</h3>

<div class="row-fluid">
	<div class="span12">
		<p class="tab-description"><?php echo
JText::sprintf('COM_FINDER_STATISTICS_STATS_DESCRIPTION',
number_format($this->data->term_count, 0,
JText::_('DECIMALS_SEPARATOR'),
JText::_('THOUSANDS_SEPARATOR')),
number_format($this->data->link_count, 0,
JText::_('DECIMALS_SEPARATOR'),
JText::_('THOUSANDS_SEPARATOR')),
number_format($this->data->taxonomy_node_count, 0,
JText::_('DECIMALS_SEPARATOR'),
JText::_('THOUSANDS_SEPARATOR')),
number_format($this->data->taxonomy_branch_count, 0,
JText::_('DECIMALS_SEPARATOR'),
JText::_('THOUSANDS_SEPARATOR'))); ?></p>
		<table class="table table-striped table-condensed">
			<thead>
				<tr>
					<th>
						<?php echo
JText::_('COM_FINDER_STATISTICS_LINK_TYPE_HEADING'); ?>
					</th>
					<th>
						<?php echo
JText::_('COM_FINDER_STATISTICS_LINK_TYPE_COUNT'); ?>
					</th>
				</tr>
			</thead>
			<tbody>
				<?php foreach ($this->data->type_list as $type) : ?>
				<tr>
					<td>
						<?php
						$lang_key    = 'PLG_FINDER_STATISTICS_' .
str_replace(' ', '_', $type->type_title);
						$lang_string = JText::_($lang_key);
						echo $lang_string === $lang_key ? $type->type_title :
$lang_string;
						?>
					</td>
					<td>
						<span class="badge badge-info"><?php echo
number_format($type->link_count, 0,
JText::_('DECIMALS_SEPARATOR'),
JText::_('THOUSANDS_SEPARATOR')); ?></span>
					</td>
				</tr>
				<?php endforeach; ?>
				<tr>
					<td>
						<strong><?php echo
JText::_('COM_FINDER_STATISTICS_LINK_TYPE_TOTAL');
?></strong>
					</td>
					<td>
						<span class="badge badge-info"><?php echo
number_format($this->data->link_count, 0,
JText::_('DECIMALS_SEPARATOR'),
JText::_('THOUSANDS_SEPARATOR')); ?></span>
					</td>
				</tr>
			</tbody>
		</table>
	</div>
</div>
statistics/view.html.php000064400000001702151160203430011357
0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_finder
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

/**
 * Statistics view class for Finder.
 *
 * @since  2.5
 */
class FinderViewStatistics extends JViewLegacy
{
	/**
	 * The index statistics
	 *
	 * @var  JObject
	 *
	 * @since  3.6.1
	 */
	protected $data;

	/**
	 * Method to display the view.
	 *
	 * @param   string  $tpl  A template file to load. [optional]
	 *
	 * @return  mixed  A string if successful, otherwise a JError object.
	 *
	 * @since   2.5
	 */
	public function display($tpl = null)
	{
		// Load the view data.
		$this->data = $this->get('Data');

		// Check for errors.
		if (count($errors = $this->get('Errors')))
		{
			throw new Exception(implode("\n", $errors), 500);
		}

		return parent::display($tpl);
	}
}
help/tmpl/default.php000064400000003476151160315330010615 0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_admin
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

JHtml::_('bootstrap.tooltip');
?>
<form action="<?php echo
JRoute::_('index.php?option=com_admin&amp;view=help');
?>" method="post" name="adminForm"
id="adminForm">
	<div class="row-fluid">
		<div id="sidebar" class="span3">
			<div class="clearfix"></div>
			<div class="sidebar-nav">
				<ul class="nav nav-list">
					<li><?php echo JHtml::_('link',
JHelp::createUrl('JHELP_START_HERE'),
JText::_('COM_ADMIN_START_HERE'), array('target' =>
'helpFrame')); ?></li>
					<li><?php echo JHtml::_('link',
$this->latest_version_check,
JText::_('COM_ADMIN_LATEST_VERSION_CHECK'),
array('target' => 'helpFrame')); ?></li>
					<li><?php echo JHtml::_('link',
'https://www.gnu.org/licenses/gpl-2.0.html',
JText::_('COM_ADMIN_LICENSE'), array('target' =>
'helpFrame')); ?></li>
					<li><?php echo JHtml::_('link',
JHelp::createUrl('JHELP_GLOSSARY'),
JText::_('COM_ADMIN_GLOSSARY'), array('target' =>
'helpFrame')); ?></li>
					<li class="divider"></li>
					<li class="nav-header"><?php echo
JText::_('COM_ADMIN_ALPHABETICAL_INDEX'); ?></li>
					<?php foreach ($this->toc as $k => $v) : ?>
						<li>
							<?php $url = JHelp::createUrl('JHELP_' .
strtoupper($k)); ?>
							<?php echo JHtml::_('link', $url, $v,
array('target' => 'helpFrame')); ?>
						</li>
					<?php endforeach; ?>
				</ul>
			</div>
		</div>
		<div class="span9">
			<iframe name="helpFrame" title="helpFrame"
height="2100px" src="<?php echo $this->page;
?>" class="helpFrame table
table-bordered"></iframe>
		</div>
	</div>
	<input class="textarea" type="hidden"
name="option" value="com_admin" />
</form>
help/tmpl/default.xml000064400000000306151160315330010613 0ustar00<?xml
version="1.0" encoding="utf-8"?>
<metadata>
	<layout title="COM_ADMIN_HELP_VIEW_DEFAULT_TITLE">
		<message>
			<![CDATA[COM_ADMIN_HELP_VIEW_DEFAULT_DESC]]>
		</message>
	</layout>
</metadata>
help/tmpl/langforum.php000064400000001140151160315330011145
0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_admin
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

JFactory::getLanguage()->load('mod_menu', JPATH_ADMINISTRATOR,
null, false, true);

$forumId   = (int)
JText::_('MOD_MENU_HELP_SUPPORT_OFFICIAL_LANGUAGE_FORUM_VALUE');

if (empty($forumId))
{
	$forumId = 511;
}

$forum_url = 'https://forum.joomla.org/viewforum.php?f=' .
$forumId;

JFactory::getApplication()->redirect($forum_url);
help/view.html.php000064400000003573151160315330010130 0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_admin
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

/**
 * HTML View class for the Admin component
 *
 * @since  1.6
 */
class AdminViewHelp extends JViewLegacy
{
	/**
	 * The search string
	 *
	 * @var    string
	 * @since  1.6
	 */
	protected $help_search = null;

	/**
	 * The page to be viewed
	 *
	 * @var    string
	 * @since  1.6
	 */
	protected $page = null;

	/**
	 * The iso language tag
	 *
	 * @var    string
	 * @since  1.6
	 */
	protected $lang_tag = null;

	/**
	 * Table of contents
	 *
	 * @var    array
	 * @since  1.6
	 */
	protected $toc = array();

	/**
	 * URL for the latest version check
	 *
	 * @var    string
	 * @since  1.6
	 */
	protected $latest_version_check =
'https://downloads.joomla.org/latest';

	/**
	 * URL for the start here link
	 *
	 * @var    string
	 * @since  1.6
	 */
	protected $start_here = null;

	/**
	 * Execute and display a template script.
	 *
	 * @param   string  $tpl  The name of the template file to parse;
automatically searches through the template paths.
	 *
	 * @return  mixed  A string if successful, otherwise an Error object.
	 *
	 * @since   1.6
	 */
	public function display($tpl = null)
	{
		$this->help_search          = $this->get('HelpSearch');
		$this->page                 = $this->get('Page');
		$this->toc                  = $this->get('Toc');
		$this->lang_tag             = $this->get('LangTag');
		$this->latest_version_check =
$this->get('LatestVersionCheck');

		$this->addToolbar();

		return parent::display($tpl);
	}

	/**
	 * Setup the Toolbar
	 *
	 * @return  void
	 *
	 * @since   1.6
	 */
	protected function addToolbar()
	{
		JToolbarHelper::title(JText::_('COM_ADMIN_HELP'), 'support
help_header');
	}
}
profile/tmpl/edit.php000064400000010245151160315330010616 0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_admin
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

// Include the component HTML helpers.
JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html');

JHtml::_('behavior.formvalidator');

JFactory::getDocument()->addScriptDeclaration('
	Joomla.submitbutton = function(task)
	{
		if (task == "profile.cancel" ||
document.formvalidator.isValid(document.getElementById("profile-form")))
		{
			Joomla.submitform(task,
document.getElementById("profile-form"));
		}
	};
	Joomla.twoFactorMethodChange = function(e)
	{
		var selectedPane = "com_admin_twofactor_" +
jQuery("#jform_twofactor_method").val();

		jQuery.each(jQuery("#com_admin_twofactor_forms_container>div"),
function(i, el)
		{
			if (el.id != selectedPane)
			{
				jQuery("#" + el.id).hide(0);
			}
			else
			{
				jQuery("#" + el.id).show(0);
			}
		});
	}
');

// Load chosen.css
JHtml::_('formbehavior.chosen', 'select');

// Fieldsets to not automatically render by /layouts/joomla/edit/params.php
$this->ignore_fieldsets = array('user_details');
?>

<form action="<?php echo
JRoute::_('index.php?option=com_admin&view=profile&layout=edit&id='
. $this->item->id); ?>" method="post"
name="adminForm" id="profile-form"
class="form-validate form-horizontal"
enctype="multipart/form-data">
	<?php echo JHtml::_('bootstrap.startTabSet',
'myTab', array('active' => 'account'));
?>
	<?php echo JHtml::_('bootstrap.addTab', 'myTab',
'account', JText::_('COM_ADMIN_USER_ACCOUNT_DETAILS'));
?>
	<?php foreach ($this->form->getFieldset('user_details')
as $field) : ?>
		<?php if ($field->fieldname === 'password2') : ?>
			<?php // Disables autocomplete ?>
			<input type="password" style="display:none">
		<?php endif; ?>
		<?php echo $field->renderField(); ?>
	<?php endforeach; ?>
	<?php echo JHtml::_('bootstrap.endTab'); ?>
	<?php if (count($this->twofactormethods) > 1) : ?>
		<?php echo JHtml::_('bootstrap.addTab', 'myTab',
'twofactorauth',
JText::_('COM_USERS_USER_TWO_FACTOR_AUTH')); ?>
		<fieldset>
			<div class="control-group">
				<div class="control-label">
					<label id="jform_twofactor_method-lbl"
for="jform_twofactor_method" class="hasTooltip"
						title="<?php echo '<strong>' .
JText::_('COM_USERS_USER_FIELD_TWOFACTOR_LABEL') .
'</strong><br />' .
JText::_('COM_USERS_USER_FIELD_TWOFACTOR_DESC'); ?>">
						<?php echo
JText::_('COM_USERS_USER_FIELD_TWOFACTOR_LABEL'); ?>
					</label>
				</div>
				<div class="controls">
					<?php echo JHtml::_('select.genericlist',
$this->twofactormethods, 'jform[twofactor][method]',
array('onchange' =>
'Joomla.twoFactorMethodChange()'), 'value',
'text', $this->otpConfig->method,
'jform_twofactor_method', false); ?>
				</div>
			</div>
			<div id="com_admin_twofactor_forms_container">
				<?php foreach ($this->twofactorform as $form) : ?>
					<?php $style = $form['method'] ==
$this->otpConfig->method ? 'display: block' :
'display: none'; ?>
					<div id="com_admin_twofactor_<?php echo
$form['method']; ?>" style="<?php echo $style;
?>">
						<?php echo $form['form']; ?>
					</div>
				<?php endforeach; ?>
			</div>
		</fieldset>
		<fieldset>
			<legend>
				<?php echo JText::_('COM_USERS_USER_OTEPS'); ?>
			</legend>
			<div class="alert alert-info">
				<?php echo JText::_('COM_USERS_USER_OTEPS_DESC'); ?>
			</div>
			<?php if (empty($this->otpConfig->otep)) : ?>
				<div class="alert alert-warning">
					<?php echo JText::_('COM_USERS_USER_OTEPS_WAIT_DESC');
?>
				</div>
			<?php else : ?>
				<?php foreach ($this->otpConfig->otep as $otep) : ?>
					<span class="span3">
						<?php echo substr($otep, 0, 4); ?>-<?php echo substr($otep,
4, 4); ?>-<?php echo substr($otep, 8, 4); ?>-<?php echo
substr($otep, 12, 4); ?>
					</span>
				<?php endforeach; ?>
				<div class="clearfix"></div>
			<?php endif; ?>
		</fieldset>
		<?php echo JHtml::_('bootstrap.endTab'); ?>
	<?php endif; ?>
	<?php echo JLayoutHelper::render('joomla.edit.params',
$this); ?>
	<?php echo JHtml::_('bootstrap.endTabSet'); ?>
	<input type="hidden" name="task" value=""
/>
	<?php echo JHtml::_('form.token'); ?>
</form>
profile/view.html.php000064400000004376151160315330010642 0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_admin
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

JLoader::register('UsersHelper', JPATH_ADMINISTRATOR .
'/components/com_users/helpers/users.php');

/**
 * View class to allow users edit their own profile.
 *
 * @since  1.6
 */
class AdminViewProfile extends JViewLegacy
{
	/**
	 * The JForm object
	 *
	 * @var    JForm
	 * @since  1.6
	 */
	protected $form;

	/**
	 * The item being viewed
	 *
	 * @var    object
	 * @since  1.6
	 */
	protected $item;

	/**
	 * The model state
	 *
	 * @var    object
	 * @since  1.6
	 */
	protected $state;

	/**
	 * Execute and display a template script.
	 *
	 * @param   string  $tpl  The name of the template file to parse;
automatically searches through the template paths.
	 *
	 * @return  mixed  A string if successful, otherwise an Error object.
	 *
	 * @since   1.6
	 */
	public function display($tpl = null)
	{
		$this->form             = $this->get('Form');
		$this->item             = $this->get('Item');
		$this->state            = $this->get('State');
		$this->twofactorform    = $this->get('Twofactorform');
		$this->twofactormethods = UsersHelper::getTwoFactorMethods();
		$this->otpConfig        = $this->get('OtpConfig');

		// Load the language strings for the 2FA
		JFactory::getLanguage()->load('com_users',
JPATH_ADMINISTRATOR);

		// Check for errors.
		if (count($errors = $this->get('Errors')))
		{
			throw new Exception(implode("\n", $errors), 500);
		}

		$this->form->setValue('password',	null);
		$this->form->setValue('password2',	null);

		$this->addToolbar();

		return parent::display($tpl);
	}

	/**
	 * Add the page title and toolbar.
	 *
	 * @return  void
	 *
	 * @since   1.6
	 */
	protected function addToolbar()
	{
		JFactory::getApplication()->input->set('hidemainmenu',
1);

		JToolbarHelper::title(JText::_('COM_ADMIN_VIEW_PROFILE_TITLE'),
'user user-profile');
		JToolbarHelper::apply('profile.apply');
		JToolbarHelper::save('profile.save');
		JToolbarHelper::cancel('profile.cancel',
'JTOOLBAR_CLOSE');
		JToolbarHelper::divider();
		JToolbarHelper::help('JHELP_ADMIN_USER_PROFILE_EDIT');
	}
}
sysinfo/tmpl/default.php000064400000003546151160315340011356
0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_admin
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

// Add specific helper files for html generation
JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html');
?>

<form action="<?php echo
JRoute::_('index.php?option=com_admin&view=sysinfo');
?>" method="post" name="adminForm"
id="adminForm">
	<div class="row-fluid">
		<!-- Begin Content -->
		<div class="span12">
			<?php echo JHtml::_('bootstrap.startTabSet',
'myTab', array('active' => 'site')); ?>

			<?php echo JHtml::_('bootstrap.addTab', 'myTab',
'site', JText::_('COM_ADMIN_SYSTEM_INFORMATION'));
?>
			<?php echo $this->loadTemplate('system'); ?>
			<?php echo JHtml::_('bootstrap.endTab'); ?>

			<?php echo JHtml::_('bootstrap.addTab', 'myTab',
'phpsettings', JText::_('COM_ADMIN_PHP_SETTINGS'));
?>
			<?php echo $this->loadTemplate('phpsettings'); ?>
			<?php echo JHtml::_('bootstrap.endTab'); ?>

			<?php echo JHtml::_('bootstrap.addTab', 'myTab',
'config', JText::_('COM_ADMIN_CONFIGURATION_FILE'));
?>
			<?php echo $this->loadTemplate('config'); ?>
			<?php echo JHtml::_('bootstrap.endTab'); ?>

			<?php echo JHtml::_('bootstrap.addTab', 'myTab',
'directory',
JText::_('COM_ADMIN_DIRECTORY_PERMISSIONS')); ?>
			<?php echo $this->loadTemplate('directory'); ?>
			<?php echo JHtml::_('bootstrap.endTab'); ?>

			<?php echo JHtml::_('bootstrap.addTab', 'myTab',
'phpinfo', JText::_('COM_ADMIN_PHP_INFORMATION'));
?>
			<?php echo $this->loadTemplate('phpinfo'); ?>
			<?php echo JHtml::_('bootstrap.endTab'); ?>

			<?php echo JHtml::_('bootstrap.endTabSet'); ?>
		</div>
		<input type="hidden" name="task"
value="" />
		<?php echo JHtml::_('form.token'); ?>
		<!-- End Content -->
	</div>
</form>
sysinfo/tmpl/default.xml000064400000000314151160315340011355
0ustar00<?xml version="1.0" encoding="utf-8"?>
<metadata>
	<layout title="COM_ADMIN_SYSINFO_VIEW_DEFAULT_TITLE">
		<message>
			<![CDATA[COM_ADMIN_SYSINFO_VIEW_DEFAULT_DESC]]>
		</message>
	</layout>
</metadata>
sysinfo/tmpl/default_config.php000064400000001656151160315340012703
0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_admin
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;
?>
<fieldset class="adminform">
	<legend><?php echo
JText::_('COM_ADMIN_CONFIGURATION_FILE'); ?></legend>
	<table class="table table-striped">
		<thead>
			<tr>
				<th width="300">
					<?php echo JText::_('COM_ADMIN_SETTING'); ?>
				</th>
				<th>
					<?php echo JText::_('COM_ADMIN_VALUE'); ?>
				</th>
			</tr>
		</thead>
		<tfoot>
			<tr>
				<td colspan="2">&#160;</td>
			</tr>
		</tfoot>
		<tbody>
			<?php foreach ($this->config as $key => $value) : ?>
				<tr>
					<td>
						<?php echo $key; ?>
					</td>
					<td>
						<?php echo htmlspecialchars($value, ENT_QUOTES); ?>
					</td>
				</tr>
			<?php endforeach; ?>
		</tbody>
	</table>
</fieldset>
sysinfo/tmpl/default_directory.php000064400000001764151160315340013442
0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_admin
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;
?>
<fieldset class="adminform">
	<legend><?php echo
JText::_('COM_ADMIN_DIRECTORY_PERMISSIONS'); ?></legend>
	<table class="table table-striped">
		<thead>
			<tr>
				<th width="650">
					<?php echo JText::_('COM_ADMIN_DIRECTORY'); ?>
				</th>
				<th>
					<?php echo JText::_('COM_ADMIN_STATUS'); ?>
				</th>
			</tr>
		</thead>
		<tfoot>
			<tr>
				<td colspan="2">&#160;</td>
			</tr>
		</tfoot>
		<tbody>
			<?php foreach ($this->directory as $dir => $info) : ?>
				<tr>
					<td>
						<?php echo JHtml::_('directory.message', $dir,
$info['message']); ?>
					</td>
					<td>
						<?php echo JHtml::_('directory.writable',
$info['writable']); ?>
					</td>
				</tr>
			<?php endforeach; ?>
		</tbody>
	</table>
</fieldset>
sysinfo/tmpl/default_phpinfo.php000064400000000646151160315340013077
0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_admin
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;
?>
<fieldset class="adminform">
	<legend><?php echo
JText::_('COM_ADMIN_PHP_INFORMATION'); ?></legend>
	<?php echo $this->php_info; ?>
</fieldset>
sysinfo/tmpl/default_phpsettings.php000064400000010023151160315340013772
0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_admin
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;
?>
<fieldset class="adminform">
	<legend><?php echo
JText::_('COM_ADMIN_RELEVANT_PHP_SETTINGS'); ?></legend>
	<table class="table table-striped">
		<thead>
			<tr>
				<th width="250">
					<?php echo JText::_('COM_ADMIN_SETTING'); ?>
				</th>
				<th>
					<?php echo JText::_('COM_ADMIN_VALUE'); ?>
				</th>
			</tr>
		</thead>
		<tfoot>
			<tr>
				<td colspan="2">&#160;
				</td>
			</tr>
		</tfoot>
		<tbody>
			<tr>
				<td>
					<?php echo JText::_('COM_ADMIN_SAFE_MODE'); ?>
				</td>
				<td>
					<?php echo JHtml::_('phpsetting.boolean',
$this->php_settings['safe_mode']); ?>
				</td>
			</tr>
			<tr>
				<td>
					<?php echo JText::_('COM_ADMIN_OPEN_BASEDIR'); ?>
				</td>
				<td>
					<?php echo JHtml::_('phpsetting.string',
$this->php_settings['open_basedir']); ?>
				</td>
			</tr>
			<tr>
				<td>
					<?php echo JText::_('COM_ADMIN_DISPLAY_ERRORS'); ?>
				</td>
				<td>
					<?php echo JHtml::_('phpsetting.boolean',
$this->php_settings['display_errors']); ?>
				</td>
			</tr>
			<tr>
				<td>
					<?php echo JText::_('COM_ADMIN_SHORT_OPEN_TAGS'); ?>
				</td>
				<td>
					<?php echo JHtml::_('phpsetting.boolean',
$this->php_settings['short_open_tag']); ?>
				</td>
			</tr>
			<tr>
				<td>
					<?php echo JText::_('COM_ADMIN_FILE_UPLOADS'); ?>
				</td>
				<td>
					<?php echo JHtml::_('phpsetting.boolean',
$this->php_settings['file_uploads']); ?>
				</td>
			</tr>
			<tr>
				<td>
					<?php echo JText::_('COM_ADMIN_MAGIC_QUOTES'); ?>
				</td>
				<td>
					<?php echo JHtml::_('phpsetting.boolean',
$this->php_settings['magic_quotes_gpc']); ?>
				</td>
			</tr>
			<tr>
				<td>
					<?php echo JText::_('COM_ADMIN_REGISTER_GLOBALS'); ?>
				</td>
				<td>
					<?php echo JHtml::_('phpsetting.boolean',
$this->php_settings['register_globals']); ?>
				</td>
			</tr>
			<tr>
				<td>
					<?php echo JText::_('COM_ADMIN_OUTPUT_BUFFERING'); ?>
				</td>
				<td>
					<?php echo JHtml::_('phpsetting.boolean',
$this->php_settings['output_buffering']); ?>
				</td>
			</tr>
			<tr>
				<td>
					<?php echo JText::_('COM_ADMIN_SESSION_SAVE_PATH'); ?>
				</td>
				<td>
					<?php echo JHtml::_('phpsetting.string',
$this->php_settings['session.save_path']); ?>
				</td>
			</tr>
			<tr>
				<td>
					<?php echo JText::_('COM_ADMIN_SESSION_AUTO_START');
?>
				</td>
				<td>
					<?php echo JHtml::_('phpsetting.integer',
$this->php_settings['session.auto_start']); ?>
				</td>
			</tr>
			<tr>
				<td>
					<?php echo JText::_('COM_ADMIN_XML_ENABLED'); ?>
				</td>
				<td>
					<?php echo JHtml::_('phpsetting.set',
$this->php_settings['xml']); ?>
				</td>
			</tr>
			<tr>
				<td>
					<?php echo JText::_('COM_ADMIN_ZLIB_ENABLED'); ?>
				</td>
				<td>
					<?php echo JHtml::_('phpsetting.set',
$this->php_settings['zlib']); ?>
				</td>
			</tr>
			<tr>
				<td>
					<?php echo JText::_('COM_ADMIN_ZIP_ENABLED'); ?>
				</td>
				<td>
					<?php echo JHtml::_('phpsetting.set',
$this->php_settings['zip']); ?>
				</td>
			</tr>
			<tr>
				<td>
					<?php echo JText::_('COM_ADMIN_DISABLED_FUNCTIONS');
?>
				</td>
				<td class="break-word">
					<?php echo JHtml::_('phpsetting.string',
$this->php_settings['disable_functions']); ?>
				</td>
			</tr>
			<tr>
				<td>
					<?php echo JText::_('COM_ADMIN_MBSTRING_ENABLED'); ?>
				</td>
				<td>
					<?php echo JHtml::_('phpsetting.set',
$this->php_settings['mbstring']); ?>
				</td>
			</tr>
			<tr>
				<td>
					<?php echo JText::_('COM_ADMIN_ICONV_AVAILABLE'); ?>
				</td>
				<td>
					<?php echo JHtml::_('phpsetting.set',
$this->php_settings['iconv']); ?>
				</td>
			</tr>
			<tr>
				<td>
					<?php echo JText::_('COM_ADMIN_MAX_INPUT_VARS'); ?>
				</td>
				<td>
					<?php echo JHtml::_('phpsetting.integer',
$this->php_settings['max_input_vars']); ?>
				</td>
			</tr>
		</tbody>
	</table>
</fieldset>
sysinfo/tmpl/default_system.php000064400000005243151160315340012756
0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_admin
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;
?>
<fieldset class="adminform">
	<legend><?php echo
JText::_('COM_ADMIN_SYSTEM_INFORMATION'); ?></legend>
	<table class="table table-striped">
		<thead>
			<tr>
				<th width="25%">
					<?php echo JText::_('COM_ADMIN_SETTING'); ?>
				</th>
				<th>
					<?php echo JText::_('COM_ADMIN_VALUE'); ?>
				</th>
			</tr>
		</thead>
		<tfoot>
			<tr>
				<td colspan="2">&#160;</td>
			</tr>
		</tfoot>
		<tbody>
			<tr>
				<td>
					<strong><?php echo
JText::_('COM_ADMIN_PHP_BUILT_ON'); ?></strong>
				</td>
				<td>
					<?php echo $this->info['php']; ?>
				</td>
			</tr>
			<tr>
				<td>
					<strong><?php echo
JText::_('COM_ADMIN_DATABASE_TYPE'); ?></strong>
				</td>
				<td>
					<?php echo $this->info['dbserver']; ?>
				</td>
			</tr>			
			<tr>
				<td>
					<strong><?php echo
JText::_('COM_ADMIN_DATABASE_VERSION'); ?></strong>
				</td>
				<td>
					<?php echo $this->info['dbversion']; ?>
				</td>
			</tr>
			<tr>
				<td>
					<strong><?php echo
JText::_('COM_ADMIN_DATABASE_COLLATION'); ?></strong>
				</td>
				<td>
					<?php echo $this->info['dbcollation']; ?>
				</td>
			</tr>
			<tr>
				<td>
					<strong><?php echo
JText::_('COM_ADMIN_DATABASE_CONNECTION_COLLATION');
?></strong>
				</td>
				<td>
					<?php echo $this->info['dbconnectioncollation']; ?>
				</td>
			</tr>
			<tr>
				<td>
					<strong><?php echo
JText::_('COM_ADMIN_PHP_VERSION'); ?></strong>
				</td>
				<td>
					<?php echo $this->info['phpversion']; ?>
				</td>
			</tr>
			<tr>
				<td>
					<strong><?php echo
JText::_('COM_ADMIN_WEB_SERVER'); ?></strong>
				</td>
				<td>
					<?php echo JHtml::_('system.server',
$this->info['server']); ?>
				</td>
			</tr>
			<tr>
				<td>
					<strong><?php echo
JText::_('COM_ADMIN_WEBSERVER_TO_PHP_INTERFACE');
?></strong>
				</td>
				<td>
					<?php echo $this->info['sapi_name']; ?>
				</td>
			</tr>
			<tr>
				<td>
					<strong><?php echo
JText::_('COM_ADMIN_JOOMLA_VERSION'); ?></strong>
				</td>
				<td>
					<?php echo $this->info['version']; ?>
				</td>
			</tr>
			<tr>
				<td>
					<strong><?php echo
JText::_('COM_ADMIN_PLATFORM_VERSION'); ?></strong>
				</td>
				<td>
					<?php echo $this->info['platform']; ?>
				</td>
			</tr>
			<tr>
				<td>
					<strong><?php echo
JText::_('COM_ADMIN_USER_AGENT'); ?></strong>
				</td>
				<td>
					<?php echo htmlspecialchars($this->info['useragent'],
ENT_COMPAT, 'UTF-8'); ?>
				</td>
			</tr>
		</tbody>
	</table>
</fieldset>
sysinfo/view.html.php000064400000005167151160315340010674 0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_admin
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

/**
 * Sysinfo View class for the Admin component
 *
 * @since  1.6
 */
class AdminViewSysinfo extends JViewLegacy
{
	/**
	 * Some PHP settings
	 *
	 * @var    array
	 * @since  1.6
	 */
	protected $php_settings = array();

	/**
	 * Config values
	 *
	 * @var    array
	 * @since  1.6
	 */
	protected $config = array();

	/**
	 * Some system values
	 *
	 * @var    array
	 * @since  1.6
	 */
	protected $info = array();

	/**
	 * PHP info
	 *
	 * @var    string
	 * @since  1.6
	 */
	protected $php_info = null;

	/**
	 * Information about writable state of directories
	 *
	 * @var    array
	 * @since  1.6
	 */
	protected $directory = array();

	/**
	 * Execute and display a template script.
	 *
	 * @param   string  $tpl  The name of the template file to parse;
automatically searches through the template paths.
	 *
	 * @return  mixed  A string if successful, otherwise an Error object.
	 *
	 * @since   1.6
	 */
	public function display($tpl = null)
	{
		// Access check.
		if (!JFactory::getUser()->authorise('core.admin'))
		{
			throw new
JAccessExceptionNotallowed(JText::_('JERROR_ALERTNOAUTHOR'),
403);
		}

		$this->php_settings = $this->get('PhpSettings');
		$this->config       = $this->get('config');
		$this->info         = $this->get('info');
		$this->php_info     = $this->get('PhpInfo');
		$this->directory    = $this->get('directory');

		$this->addToolbar();
		$this->_setSubMenu();

		return parent::display($tpl);
	}

	/**
	 * Setup the SubMenu
	 *
	 * @return  void
	 *
	 * @since   1.6
	 * @note    Necessary for Hathor compatibility
	 * @deprecated  4.0 To be removed with Hathor
	 */
	protected function _setSubMenu()
	{
		try
		{
			$contents = $this->loadTemplate('navigation');
			$document = JFactory::getDocument();
			$document->setBuffer($contents, 'modules',
'submenu');
		}
		catch (Exception $e)
		{
		}
	}

	/**
	 * Setup the Toolbar
	 *
	 * @return  void
	 *
	 * @since   1.6
	 */
	protected function addToolbar()
	{
		JToolbarHelper::title(JText::_('COM_ADMIN_SYSTEM_INFORMATION'),
'info-2 systeminfo');
		JToolbarHelper::link(JRoute::_('index.php?option=com_admin&view=sysinfo&format=text'),
'COM_ADMIN_DOWNLOAD_SYSTEM_INFORMATION_TEXT',
'download');
		JToolbarHelper::link(JRoute::_('index.php?option=com_admin&view=sysinfo&format=json'),
'COM_ADMIN_DOWNLOAD_SYSTEM_INFORMATION_JSON',
'download');
		JToolbarHelper::help('JHELP_SITE_SYSTEM_INFORMATION');
	}
}
sysinfo/view.json.php000064400000003161151160315340010671 0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_admin
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

/**
 * Sysinfo View class for the Admin component
 *
 * @since  3.5
 */
class AdminViewSysinfo extends JViewLegacy
{
	/**
	 * Execute and display a template script.
	 *
	 * @param   string  $tpl  The name of the template file to parse;
automatically searches through the template paths.
	 *
	 * @return  mixed  A string if successful, otherwise an Error object.
	 *
	 * @since   3.5
	 */
	public function display($tpl = null)
	{
		// Access check.
		if (!JFactory::getUser()->authorise('core.admin'))
		{
			throw new
JAccessExceptionNotallowed(JText::_('JERROR_ALERTNOAUTHOR'),
403);
		}

		header('MIME-Version: 1.0');
		header('Content-Disposition: attachment;
filename="systeminfo-' . date('c') .
'.json"');
		header('Content-Transfer-Encoding: binary');

		$data = $this->getLayoutData();

		echo json_encode($data);

		JFactory::getApplication()->close();
	}

	/**
	 * Get the data for the view
	 *
	 * @return  array
	 *
	 * @since   3.5
	 */
	protected function getLayoutData()
	{
		$model = $this->getModel();

		return array(
			'info'        => $model->getSafeData('info'),
			'phpSettings' =>
$model->getSafeData('phpSettings'),
			'config'      =>
$model->getSafeData('config'),
			'directories' =>
$model->getSafeData('directory', true),
			'phpInfo'     =>
$model->getSafeData('phpInfoArray'),
			'extensions'  =>
$model->getSafeData('extensions')
		);
	}
}
sysinfo/view.text.php000064400000010306151160315340010703 0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_admin
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

/**
 * Sysinfo View class for the Admin component
 *
 * @since  3.5
 */
class AdminViewSysinfo extends JViewLegacy
{
	/**
	 * Execute and display a template script.
	 *
	 * @param   string  $tpl  The name of the template file to parse;
automatically searches through the template paths.
	 *
	 * @return  mixed  A string if successful, otherwise an Error object.
	 *
	 * @since   3.5
	 */
	public function display($tpl = null)
	{
		// Access check.
		if (!JFactory::getUser()->authorise('core.admin'))
		{
			throw new
JAccessExceptionNotallowed(JText::_('JERROR_ALERTNOAUTHOR'),
403);
		}

		header('Content-Type: text/plain; charset=utf-8');
		header('Content-Description: File Transfer');
		header('Content-Disposition: attachment;
filename="systeminfo-' . date('c') .
'.txt"');
		header('Cache-Control: must-revalidate');

		$data = $this->getLayoutData();

		$lines = array();

		foreach ($data as $sectionName => $section)
		{
			$customRenderingMethod = 'render' . ucfirst($sectionName);

			if (method_exists($this, $customRenderingMethod))
			{
				$lines[] =
$this->$customRenderingMethod($section['title'],
$section['data']);
			}
			else
			{
				$lines[] = $this->renderSection($section['title'],
$section['data']);
			}
		}

		echo str_replace(JPATH_ROOT, 'xxxxxx',
implode("\n\n", $lines));

		JFactory::getApplication()->close();
	}

	/**
	 * Get the data for the view
	 *
	 * @return  array
	 *
	 * @since   3.5
	 */
	protected function getLayoutData()
	{
		$model = $this->getModel();

		return array(
			'info' => array(
				'title' =>
JText::_('COM_ADMIN_SYSTEM_INFORMATION', true),
				'data'  => $model->getSafeData('info')
			),
			'phpSettings' => array(
				'title' => JText::_('COM_ADMIN_PHP_SETTINGS',
true),
				'data'  => $model->getSafeData('phpSettings')
			),
			'config' => array(
				'title' =>
JText::_('COM_ADMIN_CONFIGURATION_FILE', true),
				'data'  => $model->getSafeData('config')
			),
			'directories' => array(
				'title' =>
JText::_('COM_ADMIN_DIRECTORY_PERMISSIONS', true),
				'data'  => $model->getSafeData('directory',
true)
			),
			'phpInfo' => array(
				'title' => JText::_('COM_ADMIN_PHP_INFORMATION',
true),
				'data'  =>
$model->getSafeData('phpInfoArray')
			),
			'extensions' => array(
				'title' => JText::_('COM_ADMIN_EXTENSIONS',
true),
				'data'  => $model->getSafeData('extensions')
			)
		);
	}

	/**
	 * Render a section
	 *
	 * @param   string   $sectionName  Name of the section to render
	 * @param   array    $sectionData  Data of the section to render
	 * @param   integer  $level        Depth level for indentation
	 *
	 * @return  string
	 *
	 * @since   3.5
	 */
	protected function renderSection($sectionName, $sectionData, $level = 0)
	{
		$lines = array();

		$margin = ($level > 0) ? str_repeat("\t", $level) : null;

		$lines[] = $margin . '=============';
		$lines[] = $margin . $sectionName;
		$lines[] = $margin . '=============';
		$level++;

		foreach ($sectionData as $name => $value)
		{
			if (is_array($value))
			{
				if ($name == 'Directive')
				{
					continue;
				}

				$lines[] = '';
				$lines[] = $this->renderSection($name, $value, $level);
			}
			else
			{
				if (is_bool($value))
				{
					$value = $value ? 'true' : 'false';
				}

				if (is_int($name) && ($name == 0 || $name == 1))
				{
					$name = ($name == 0 ? 'Local Value' : 'Master
Value');
				}

				$lines[] = $margin . $name . ': ' . $value;
			}
		}

		return implode("\n", $lines);
	}

	/**
	 * Specific rendering for directories
	 *
	 * @param   string   $sectionName  Name of the section
	 * @param   array    $sectionData  Directories information
	 * @param   integer  $level        Starting level
	 *
	 * @return  string
	 *
	 * @since   3.5
	 */
	protected function renderDirectories($sectionName, $sectionData, $level =
-1)
	{
		foreach ($sectionData as $directory => $data)
		{
			$sectionData[$directory] = $data['writable'] ? '
writable' : ' NOT writable';
		}

		return $this->renderSection($sectionName, $sectionData, $level);
	}
}
actionlogs/tmpl/default.php000064400000011375151160326440012030
0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_actionlogs
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

use Joomla\CMS\Factory;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Layout\LayoutHelper;
use Joomla\CMS\Router\Route;

/** @var ActionlogsViewActionlogs $this */

JLoader::register('ActionlogsHelper', JPATH_ADMINISTRATOR .
'/components/com_actionlogs/helpers/actionlogs.php');

HTMLHelper::_('bootstrap.tooltip');
HTMLHelper::_('behavior.multiselect');
HTMLHelper::_('formbehavior.chosen', 'select');

$listOrder  =
$this->escape($this->state->get('list.ordering'));
$listDirn   =
$this->escape($this->state->get('list.direction'));

Factory::getDocument()->addScriptDeclaration('
	Joomla.submitbutton = function(task)
	{
		if (task == "actionlogs.exportLogs")
		{
			Joomla.submitform(task,
document.getElementById("exportForm"));
			
			return;
		}

		if (task == "actionlogs.exportSelectedLogs")
		{
			// Get id of selected action logs item and pass it to export form hidden
input
			var cids = [];

			jQuery("input[name=\'cid[]\']:checked").each(function()
{
					cids.push(jQuery(this).val());
			});

			document.exportForm.cids.value = cids.join(",");
			Joomla.submitform(task,
document.getElementById("exportForm"));

			return;
		}

		Joomla.submitform(task);
	};
');
?>
<form action="<?php echo
Route::_('index.php?option=com_actionlogs&view=actionlogs');
?>" method="post" name="adminForm"
id="adminForm">
	<div id="j-main-container">
		<?php echo
LayoutHelper::render('joomla.searchtools.default',
array('view' => $this)); ?>
		<?php if (empty($this->items)) : ?>
			<div class="alert alert-no-items">
				<?php echo Text::_('JGLOBAL_NO_MATCHING_RESULTS'); ?>
			</div>
		<?php else : ?>
			<table class="table table-striped table-hover"
id="logsList">
				<thead>
					<th width="1%" class="center">
						<?php echo HTMLHelper::_('grid.checkall'); ?>
					</th>
					<th>
						<?php echo HTMLHelper::_('searchtools.sort',
'COM_ACTIONLOGS_ACTION', 'a.message', $listDirn,
$listOrder); ?>
					</th>
					<th width="15%" class="nowrap">
						<?php echo HTMLHelper::_('searchtools.sort',
'COM_ACTIONLOGS_EXTENSION', 'a.extension', $listDirn,
$listOrder); ?>
					</th>
					<th width="15%" class="nowrap">
						<?php echo HTMLHelper::_('searchtools.sort',
'COM_ACTIONLOGS_DATE', 'a.log_date', $listDirn,
$listOrder); ?>
					</th>
					<th width="10%" class="nowrap">
						<?php echo HTMLHelper::_('searchtools.sort',
'COM_ACTIONLOGS_NAME', 'a.user_id', $listDirn,
$listOrder); ?>
					</th>
					<?php if ($this->showIpColumn) : ?>
						<th width="10%" class="nowrap">
							<?php echo HTMLHelper::_('searchtools.sort',
'COM_ACTIONLOGS_IP_ADDRESS', 'a.ip_address', $listDirn,
$listOrder); ?>
						</th>
					<?php endif; ?>
					<th width="1%" class="nowrap hidden-phone">
						<?php echo HTMLHelper::_('searchtools.sort',
'JGRID_HEADING_ID', 'a.id', $listDirn, $listOrder);
?>
					</th>
				</thead>
				<tfoot>
					<tr>
						<td colspan="7">
							<?php echo $this->pagination->getListFooter(); ?>
						</td>
					</tr>
				</tfoot>
				<tbody>
					<?php foreach ($this->items as $i => $item) :
						$extension = strtok($item->extension, '.');
						ActionlogsHelper::loadTranslationFiles($extension); ?>
						<tr class="row<?php echo $i % 2; ?>">
							<td class="center">
								<?php echo HTMLHelper::_('grid.id', $i, $item->id);
?>
							</td>
							<td>
								<?php echo ActionlogsHelper::getHumanReadableLogMessage($item);
?>
							</td>
							<td>
								<?php echo $this->escape(Text::_($extension)); ?>
							</td>
							<td>
								<span class="hasTooltip" title="<?php echo
HTMLHelper::_('date', $item->log_date,
Text::_('DATE_FORMAT_LC6')); ?>">
									<?php echo HTMLHelper::_('date.relative',
$item->log_date); ?>
								</span>
							</td>
							<td>
								<?php echo $this->escape($item->name); ?>
							</td>
							<?php if ($this->showIpColumn) : ?>
								<td>
									<?php echo Text::_($this->escape($item->ip_address));
?>
								</td>
							<?php endif;?>
							<td class="hidden-phone">
								<?php echo (int) $item->id; ?>
							</td>
						</tr>
					<?php endforeach; ?>
				</tbody>
			</table>
		<?php endif;?>
		<input type="hidden" name="task"
value="" />
		<input type="hidden" name="boxchecked"
value="0" />
		<?php echo HTMLHelper::_('form.token'); ?>
	</div>
</form>
<form action="<?php echo
Route::_('index.php?option=com_actionlogs&view=actionlogs');
?>" method="post" name="exportForm"
id="exportForm">
	<input type="hidden" name="task" value=""
/>
	<input type="hidden" name="cids" value=""
/>
	<?php echo HTMLHelper::_('form.token'); ?>
</form>
actionlogs/tmpl/default.xml000064400000000307151160326440012032
0ustar00<?xml version="1.0" encoding="utf-8"?>
<metadata>
	<layout title="COM_ACTIONLOGS_VIEW_DEFAULT_TITLE">
		<message>
			<![CDATA[COM_ACTIONLOGS_VIEW_DEFAULT_DESC]]>
		</message>
	</layout>
</metadata>

actionlogs/view.html.php000064400000005254151160326440011344
0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_actionlogs
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Toolbar\Toolbar;
use Joomla\CMS\Toolbar\ToolbarHelper;

JLoader::register('ActionlogsHelper', JPATH_ADMINISTRATOR .
'/components/com_actionlogs/helpers/actionlogs.php');

/**
 * View class for a list of logs.
 *
 * @since  3.9.0
 */
class ActionlogsViewActionlogs extends JViewLegacy
{
	/**
	 * An array of items.
	 *
	 * @var    array
	 * @since  3.9.0
	 */
	protected $items;

	/**
	 * The model state
	 *
	 * @var    array
	 * @since  3.9.0
	 */
	protected $state;

	/**
	 * The pagination object
	 *
	 * @var    JPagination
	 * @since  3.9.0
	 */
	protected $pagination;

	/**
	 * The active search filters
	 *
	 * @var    array
	 * @since  3.9.0
	 */
	public $activeFilters;

	/**
	 * Method to display the view.
	 *
	 * @param   string  $tpl  A template file to load. [optional]
	 *
	 * @return  mixed  A string if successful, otherwise an Error object.
	 *
	 * @since   3.9.0
	 */
	public function display($tpl = null)
	{
		$params = ComponentHelper::getParams('com_actionlogs');

		$this->items         = $this->get('Items');
		$this->state         = $this->get('State');
		$this->filterForm    = $this->get('FilterForm');
		$this->activeFilters = $this->get('ActiveFilters');
		$this->pagination    = $this->get('Pagination');
		$this->showIpColumn  = (bool) $params->get('ip_logging',
0);

		if (count($errors = $this->get('Errors')))
		{
			JError::raiseError(500, implode("\n", $errors));

			return false;
		}

		$this->addToolBar();

		// Load all actionlog plugins language files
		ActionlogsHelper::loadActionLogPluginsLanguage();

		return parent::display($tpl);
	}

	/**
	 * Add the page title and toolbar.
	 *
	 * @return  void
	 *
	 * @since   3.9.0
	 */
	protected function addToolbar()
	{
		ToolbarHelper::title(Text::_('COM_ACTIONLOGS_MANAGER_USERLOGS'),
'list-2');

		ToolbarHelper::deleteList('JGLOBAL_CONFIRM_DELETE',
'actionlogs.delete');
		$bar = Toolbar::getInstance('toolbar');
		$bar->appendButton('Confirm',
'COM_ACTIONLOGS_PURGE_CONFIRM', 'delete',
'COM_ACTIONLOGS_TOOLBAR_PURGE', 'actionlogs.purge',
false);
		ToolbarHelper::preferences('com_actionlogs');
		ToolbarHelper::help('JHELP_COMPONENTS_ACTIONLOGS');
		ToolBarHelper::custom('actionlogs.exportSelectedLogs',
'download', '', 'COM_ACTIONLOGS_EXPORT_CSV',
true);
		ToolBarHelper::custom('actionlogs.exportLogs',
'download', '',
'COM_ACTIONLOGS_EXPORT_ALL_CSV', false);
	}
}
categories_map/index.html000064400000000054151160405130011516
0ustar00<html><body
bgcolor="#FFFFFF"></body></html>categories_map/tmpl/default.php000064400000005556151160405140012647
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				Lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.77
	@build			6th April, 2022
	@created		22nd July, 2020
	@package		Moojla
	@subpackage		default.php
	@author			Lmskaran <http://Lmskaran.com>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

JHtml::_('behavior.tooltip');
JHtml::_('behavior.multiselect');
JHtml::_('dropdown.init');
JHtml::_('formbehavior.chosen', 'select');
if ($this->saveOrder)
{
	$saveOrderingUrl =
'index.php?option=com_moojla&task=categories_map.saveOrderAjax&tmpl=component';
	JHtml::_('sortablelist.sortable', 'category_mapList',
'adminForm', strtolower($this->listDirn), $saveOrderingUrl);
}
?>
<form action="<?php echo
JRoute::_('index.php?option=com_moojla&view=categories_map');
?>" method="post" name="adminForm"
id="adminForm">
<?php if(!empty( $this->sidebar)): ?>
	<div id="j-sidebar-container" class="span2">
		<?php echo $this->sidebar; ?>
	</div>
	<div id="j-main-container" class="span10">
<?php else : ?>
	<div id="j-main-container">
<?php endif; ?>
<?php
	// Add the searchtools
	echo JLayoutHelper::render('joomla.searchtools.default',
array('view' => $this));
?>
<?php if (empty($this->items)): ?>
	<div class="alert alert-no-items">
		<?php echo JText::_('JGLOBAL_NO_MATCHING_RESULTS'); ?>
	</div>
<?php else : ?>
	<table class="table table-striped"
id="category_mapList">
		<thead><?php echo
$this->loadTemplate('head');?></thead>
		<tfoot><?php echo
$this->loadTemplate('foot');?></tfoot>
		<tbody><?php echo
$this->loadTemplate('body');?></tbody>
	</table>
	<?php // Load the batch processing form. ?>
	<?php if ($this->canCreate && $this->canEdit) : ?>
		<?php echo JHtml::_(
			'bootstrap.renderModal',
			'collapseModal',
			array(
				'title' =>
JText::_('COM_MOOJLA_CATEGORIES_MAP_BATCH_OPTIONS'),
				'footer' =>
$this->loadTemplate('batch_footer')
			),
			$this->loadTemplate('batch_body')
		); ?>
	<?php endif; ?>
	<input type="hidden" name="boxchecked"
value="0" />
	</div>
<?php endif; ?>
	<input type="hidden" name="task" value=""
/>
	<?php echo JHtml::_('form.token'); ?>
</form>
categories_map/tmpl/default_batch_body.php000064400000002341151160405140015012
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				Lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.77
	@build			6th April, 2022
	@created		22nd July, 2020
	@package		Moojla
	@subpackage		default_batch_body.php
	@author			Lmskaran <http://Lmskaran.com>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

?>

<p><?php echo
JText::_('COM_MOOJLA_CATEGORIES_MAP_BATCH_TIP'); ?></p>
<?php echo $this->batchDisplay;
?>categories_map/tmpl/default_batch_footer.php000064400000002736151160405140015363
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				Lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.77
	@build			6th April, 2022
	@created		22nd July, 2020
	@package		Moojla
	@subpackage		default_batch_footer.php
	@author			Lmskaran <http://Lmskaran.com>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

?>
<!-- clear the batch values if cancel -->
<button class="btn" type="button"
onclick="" data-dismiss="modal">
	<?php echo JText::_('JCANCEL'); ?>
</button>
<!-- post the batch values if process -->
<button class="btn btn-success" type="submit"
onclick="Joomla.submitbutton('category_map.batch');">
	<?php echo JText::_('JGLOBAL_BATCH_PROCESS'); ?>
</button>categories_map/tmpl/default_body.php000064400000007611151160405140013656
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				Lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.77
	@build			6th April, 2022
	@created		22nd July, 2020
	@package		Moojla
	@subpackage		default_body.php
	@author			Lmskaran <http://Lmskaran.com>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

$edit =
"index.php?option=com_moojla&view=categories_map&task=category_map.edit";

?>
<?php foreach ($this->items as $i => $item): ?>
	<?php
		$canCheckin = $this->user->authorise('core.manage',
'com_checkin') || $item->checked_out == $this->user->id
|| $item->checked_out == 0;
		$userChkOut = JFactory::getUser($item->checked_out);
		$canDo =
MoojlaHelper::getActions('category_map',$item,'categories_map');
	?>
	<tr class="row<?php echo $i % 2; ?>">
		<td class="order nowrap center hidden-phone">
		<?php if ($canDo->get('core.edit.state')): ?>
			<?php
				$iconClass = '';
				if (!$this->saveOrder)
				{
					$iconClass = ' inactive tip-top" hasTooltip"
title="' . JHtml::tooltipText('JORDERINGDISABLED');
				}
			?>
			<span class="sortable-handler<?php echo $iconClass;
?>">
				<i class="icon-menu"></i>
			</span>
			<?php if ($this->saveOrder) : ?>
				<input type="text" style="display:none"
name="order[]" size="5"
				value="<?php echo $item->ordering; ?>"
class="width-20 text-area-order " />
			<?php endif; ?>
		<?php else: ?>
			&#8942;
		<?php endif; ?>
		</td>
		<td class="nowrap center">
		<?php if ($canDo->get('core.edit')): ?>
				<?php if ($item->checked_out) : ?>
					<?php if ($canCheckin) : ?>
						<?php echo JHtml::_('grid.id', $i, $item->id); ?>
					<?php else: ?>
						&#9633;
					<?php endif; ?>
				<?php else: ?>
					<?php echo JHtml::_('grid.id', $i, $item->id); ?>
				<?php endif; ?>
		<?php else: ?>
			&#9633;
		<?php endif; ?>
		</td>
		<td class="nowrap">
			<div class="name">
				<?php if ($canDo->get('core.edit')): ?>
					<a href="<?php echo $edit; ?>&id=<?php echo
$item->id; ?>"><?php echo
$this->escape($item->jcatid); ?></a>
					<?php if ($item->checked_out): ?>
						<?php echo JHtml::_('jgrid.checkedout', $i,
$userChkOut->name, $item->checked_out_time,
'categories_map.', $canCheckin); ?>
					<?php endif; ?>
				<?php else: ?>
					<?php echo $this->escape($item->jcatid); ?>
				<?php endif; ?>
			</div>
		</td>
		<td class="hidden-phone">
			<?php echo $this->escape($item->mcatid); ?>
		</td>
		<td class="center">
		<?php if ($canDo->get('core.edit.state')) : ?>
				<?php if ($item->checked_out) : ?>
					<?php if ($canCheckin) : ?>
						<?php echo JHtml::_('jgrid.published',
$item->published, $i, 'categories_map.', true,
'cb'); ?>
					<?php else: ?>
						<?php echo JHtml::_('jgrid.published',
$item->published, $i, 'categories_map.', false,
'cb'); ?>
					<?php endif; ?>
				<?php else: ?>
					<?php echo JHtml::_('jgrid.published',
$item->published, $i, 'categories_map.', true,
'cb'); ?>
				<?php endif; ?>
		<?php else: ?>
			<?php echo JHtml::_('jgrid.published', $item->published,
$i, 'categories_map.', false, 'cb'); ?>
		<?php endif; ?>
		</td>
		<td class="nowrap center hidden-phone">
			<?php echo $item->id; ?>
		</td>
	</tr>
<?php endforeach;
?>categories_map/tmpl/default_foot.php000064400000002304151160405140013662
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				Lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.77
	@build			6th April, 2022
	@created		22nd July, 2020
	@package		Moojla
	@subpackage		default_foot.php
	@author			Lmskaran <http://Lmskaran.com>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

?>
<tr>
	<td colspan="6"><?php echo
$this->pagination->getListFooter(); ?></td>
</tr>categories_map/tmpl/default_head.php000064400000004755151160405140013630
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				Lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.77
	@build			6th April, 2022
	@created		22nd July, 2020
	@package		Moojla
	@subpackage		default_head.php
	@author			Lmskaran <http://Lmskaran.com>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

?>
<tr>
	<?php if ($this->canEdit&& $this->canState): ?>
		<th width="1%" class="nowrap center
hidden-phone">
			<?php echo JHtml::_('searchtools.sort', '',
'a.ordering', $this->listDirn, $this->listOrder, null,
'asc', 'JGRID_HEADING_ORDERING',
'icon-menu-2'); ?>
		</th>
		<th width="20" class="nowrap center">
			<?php echo JHtml::_('grid.checkall'); ?>
		</th>
	<?php else: ?>
		<th width="20" class="nowrap center
hidden-phone">
			&#9662;
		</th>
		<th width="20" class="nowrap center">
			&#9632;
		</th>
	<?php endif; ?>
	<th class="nowrap" >
			<?php echo JHtml::_('searchtools.sort',
'COM_MOOJLA_CATEGORY_MAP_JCATID_LABEL', 'a.jcatid',
$this->listDirn, $this->listOrder); ?>
	</th>
	<th class="nowrap hidden-phone" >
			<?php echo JHtml::_('searchtools.sort',
'COM_MOOJLA_CATEGORY_MAP_MCATID_LABEL', 'a.mcatid',
$this->listDirn, $this->listOrder); ?>
	</th>
	<?php if ($this->canState): ?>
		<th width="10" class="nowrap center" >
			<?php echo JHtml::_('searchtools.sort',
'COM_MOOJLA_CATEGORY_MAP_STATUS', 'a.published',
$this->listDirn, $this->listOrder); ?>
		</th>
	<?php else: ?>
		<th width="10" class="nowrap center" >
			<?php echo JText::_('COM_MOOJLA_CATEGORY_MAP_STATUS');
?>
		</th>
	<?php endif; ?>
	<th width="5" class="nowrap center hidden-phone"
>
			<?php echo JHtml::_('searchtools.sort',
'COM_MOOJLA_CATEGORY_MAP_ID', 'a.id',
$this->listDirn, $this->listOrder); ?>
	</th>
</tr>categories_map/tmpl/default_toolbar.php000064400000007061151160405140014362
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				Lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.77
	@build			6th April, 2022
	@created		22nd July, 2020
	@package		Moojla
	@subpackage		default_toolbar.php
	@author			Lmskaran <http://Lmskaran.com>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

?>
<div id="filter-bar" class="btn-toolbar">
        <div class="filter-search btn-group pull-left">
            <label for="filter_search"
class="element-invisible"><?php echo
JText::_('Search');?></label>
            <input type="text" name="filter_search"
id="filter_search" placeholder="<?php echo
JText::_('JSEARCH_FILTER'); ?>" value="<?php echo
$this->escape($this->state->get('filter.search'));
?>" class="hasTooltip" title="<?php echo
JHtml::tooltipText('Search Categories_map'); ?>" />
        </div>
        <div class="btn-group pull-left">
            <button type="submit" class="btn
hasTooltip" title="<?php echo
JHtml::tooltipText('JSEARCH_FILTER_SUBMIT'); ?>"><i
class="icon-search"></i></button>
            <button type="button" class="btn
hasTooltip" title="<?php echo
JHtml::tooltipText('JSEARCH_FILTER_CLEAR'); ?>"
onclick="document.id('filter_search').value='';this.form.submit();"><i
class="icon-remove"></i></button>
        </div>
        <div class="btn-group pull-right hidden-phone">
            <label for="limit"
class="element-invisible"><?php echo
JText::_('JFIELD_PLG_SEARCH_SEARCHLIMIT_DESC');?></label>
            <?php echo $this->pagination->getLimitBox(); ?>
        </div>
        <div class="btn-group pull-right hidden-phone">
            <label for="directionTable"
class="element-invisible"><?php echo
JText::_('JFIELD_ORDERING_DESC');?></label>
            <select name="directionTable"
id="directionTable" class="input-medium"
onchange="Joomla.orderTable()">
                <option value=""><?php echo
JText::_('JFIELD_ORDERING_DESC');?></option>
                <option value="asc" <?php if
($this->listDirn == 'asc') echo
'selected="selected"'; ?>><?php echo
JText::_('JGLOBAL_ORDER_ASCENDING');?></option>
                <option value="desc" <?php if
($this->listDirn == 'desc') echo
'selected="selected"'; ?>><?php echo
JText::_('JGLOBAL_ORDER_DESCENDING');?></option>
            </select>
        </div>
        <div class="btn-group pull-right">
            <label for="sortTable"
class="element-invisible"><?php echo
JText::_('JGLOBAL_SORT_BY');?></label>
            <select name="sortTable" id="sortTable"
class="input-medium" onchange="Joomla.orderTable()">
                <option value=""><?php echo
JText::_('JGLOBAL_SORT_BY');?></option>
                <?php echo JHtml::_('select.options',
$this->getSortFields(), 'value', 'text',
$this->listOrder);?>
            </select>
        </div>
    </div>
<div class="clearfix">
</div>categories_map/tmpl/index.html000064400000000054151160405140012473
0ustar00<html><body
bgcolor="#FFFFFF"></body></html>categories_map/view.html.php000064400000015507151160405140012161
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				Lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.77
	@build			6th April, 2022
	@created		22nd July, 2020
	@package		Moojla
	@subpackage		view.html.php
	@author			Lmskaran <http://Lmskaran.com>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

/**
 * Moojla View class for the Categories_map
 */
class MoojlaViewCategories_map extends JViewLegacy
{
	/**
	 * Categories_map view display method
	 * @return void
	 */
	function display($tpl = null)
	{
		if ($this->getLayout() !== 'modal')
		{
			// Include helper submenu
			MoojlaHelper::addSubmenu('categories_map');
		}

		// Assign data to the view
		$this->items = $this->get('Items');
		$this->pagination = $this->get('Pagination');
		$this->state = $this->get('State');
		$this->user = JFactory::getUser();
		// Load the filter form from xml.
		$this->filterForm = $this->get('FilterForm');
		// Load the active filters.
		$this->activeFilters = $this->get('ActiveFilters');
		// Add the list ordering clause.
		$this->listOrder =
$this->escape($this->state->get('list.ordering',
'a.id'));
		$this->listDirn =
$this->escape($this->state->get('list.direction',
'DESC'));
		$this->saveOrder = $this->listOrder == 'a.ordering';
		// set the return here value
		$this->return_here = urlencode(base64_encode((string)
JUri::getInstance()));
		// get global action permissions
		$this->canDo = MoojlaHelper::getActions('category_map');
		$this->canEdit = $this->canDo->get('core.edit');
		$this->canState =
$this->canDo->get('core.edit.state');
		$this->canCreate = $this->canDo->get('core.create');
		$this->canDelete = $this->canDo->get('core.delete');
		$this->canBatch = $this->canDo->get('core.batch');

		// We don't need toolbar in the modal window.
		if ($this->getLayout() !== 'modal')
		{
			$this->addToolbar();
			$this->sidebar = JHtmlSidebar::render();
			// load the batch html
			if ($this->canCreate && $this->canEdit &&
$this->canState)
			{
				$this->batchDisplay = JHtmlBatch_::render();
			}
		}
		
		// Check for errors.
		if (count($errors = $this->get('Errors')))
		{
			throw new Exception(implode("\n", $errors), 500);
		}

		// Display the template
		parent::display($tpl);

		// Set the document
		$this->setDocument();
	}

	/**
	 * Setting the toolbar
	 */
	protected function addToolBar()
	{
		JToolBarHelper::title(JText::_('COM_MOOJLA_CATEGORIES_MAP'),
'file-2');
		JHtmlSidebar::setAction('index.php?option=com_moojla&view=categories_map');
		JFormHelper::addFieldPath(JPATH_COMPONENT . '/models/fields');

		if ($this->canCreate)
		{
			JToolBarHelper::addNew('category_map.add');
		}

		// Only load if there are items
		if (MoojlaHelper::checkArray($this->items))
		{
			if ($this->canEdit)
			{
				JToolBarHelper::editList('category_map.edit');
			}

			if ($this->canState)
			{
				JToolBarHelper::publishList('categories_map.publish');
				JToolBarHelper::unpublishList('categories_map.unpublish');
				JToolBarHelper::archiveList('categories_map.archive');

				if ($this->canDo->get('core.admin'))
				{
					JToolBarHelper::checkin('categories_map.checkin');
				}
			}

			// Add a batch button
			if ($this->canBatch && $this->canCreate &&
$this->canEdit && $this->canState)
			{
				// Get the toolbar object instance
				$bar = JToolBar::getInstance('toolbar');
				// set the batch button name
				$title = JText::_('JTOOLBAR_BATCH');
				// Instantiate a new JLayoutFile instance and render the batch button
				$layout = new JLayoutFile('joomla.toolbar.batch');
				// add the button to the page
				$dhtml = $layout->render(array('title' => $title));
				$bar->appendButton('Custom', $dhtml, 'batch');
			}

			if ($this->state->get('filter.published') == -2
&& ($this->canState && $this->canDelete))
			{
				JToolbarHelper::deleteList('',
'categories_map.delete', 'JTOOLBAR_EMPTY_TRASH');
			}
			elseif ($this->canState && $this->canDelete)
			{
				JToolbarHelper::trash('categories_map.trash');
			}
		}

		// set help url for this view if found
		$help_url = MoojlaHelper::getHelpUrl('categories_map');
		if (MoojlaHelper::checkString($help_url))
		{
				JToolbarHelper::help('COM_MOOJLA_HELP_MANAGER', false,
$help_url);
		}

		// add the options comp button
		if ($this->canDo->get('core.admin') ||
$this->canDo->get('core.options'))
		{
			JToolBarHelper::preferences('com_moojla');
		}

		// Only load published batch if state and batch is allowed
		if ($this->canState && $this->canBatch)
		{
			JHtmlBatch_::addListSelection(
				JText::_('COM_MOOJLA_KEEP_ORIGINAL_STATE'),
				'batch[published]',
				JHtml::_('select.options',
JHtml::_('jgrid.publishedOptions', array('all' =>
false)), 'value', 'text', '', true)
			);
		}
	}

	/**
	 * Method to set up the document properties
	 *
	 * @return void
	 */
	protected function setDocument()
	{
		if (!isset($this->document))
		{
			$this->document = JFactory::getDocument();
		}
		$this->document->setTitle(JText::_('COM_MOOJLA_CATEGORIES_MAP'));
		$this->document->addStyleSheet(JURI::root() .
"administrator/components/com_moojla/assets/css/categories_map.css",
(MoojlaHelper::jVersion()->isCompatible('3.8.0')) ?
array('version' => 'auto') : 'text/css');
	}

	/**
	 * Escapes a value for output in a view script.
	 *
	 * @param   mixed  $var  The output to escape.
	 *
	 * @return  mixed  The escaped value.
	 */
	public function escape($var)
	{
		if(strlen($var) > 50)
		{
			// use the helper htmlEscape method instead and shorten the string
			return MoojlaHelper::htmlEscape($var, $this->_charset, true);
		}
		// use the helper htmlEscape method instead.
		return MoojlaHelper::htmlEscape($var, $this->_charset);
	}

	/**
	 * Returns an array of fields the table can be sorted by
	 *
	 * @return  array  Array containing the field name to sort by as the key
and display text as value
	 */
	protected function getSortFields()
	{
		return array(
			'a.ordering' =>
JText::_('JGRID_HEADING_ORDERING'),
			'a.published' => JText::_('JSTATUS'),
			'a.jcatid' =>
JText::_('COM_MOOJLA_CATEGORY_MAP_JCATID_LABEL'),
			'a.mcatid' =>
JText::_('COM_MOOJLA_CATEGORY_MAP_MCATID_LABEL'),
			'a.id' => JText::_('JGRID_HEADING_ID')
		);
	}
}
category_map/submitbutton.js000064400000002751151160405140012315
0ustar00/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				Lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.77
	@build			6th April, 2022
	@created		22nd July, 2020
	@package		Moojla
	@subpackage		submitbutton.js
	@author			Lmskaran <http://Lmskaran.com>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

Joomla.submitbutton = function(task)
{
	if (task == ''){
		return false;
	} else { 
		var action = task.split('.');
		if (action[1] == 'cancel' || action[1] == 'close' ||
document.formvalidator.isValid(document.getElementById("adminForm"))){
			Joomla.submitform(task, document.getElementById("adminForm"));
			return true;
		} else {
			alert(Joomla.JText._('category_map, some values are not
acceptable.','Some values are unacceptable'));
			return false;
		}
	}
}category_map/tmpl/edit.php000064400000011404151160405140011625
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				Lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.77
	@build			6th April, 2022
	@created		22nd July, 2020
	@package		Moojla
	@subpackage		edit.php
	@author			Lmskaran <http://Lmskaran.com>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html');
JHtml::_('behavior.tooltip');
JHtml::_('behavior.formvalidation');
JHtml::_('formbehavior.chosen', 'select');
JHtml::_('behavior.keepalive');
$componentParams = $this->params; // will be removed just use
$this->params instead
?>
<script type="text/javascript">
	// waiting spinner
	var outerDiv = jQuery('body');
	jQuery('<div id="loading"></div>')
		.css("background", "rgba(255, 255, 255, .8)
url('components/com_moojla/assets/images/import.gif') 50% 15%
no-repeat")
		.css("top", outerDiv.position().top -
jQuery(window).scrollTop())
		.css("left", outerDiv.position().left -
jQuery(window).scrollLeft())
		.css("width", outerDiv.width())
		.css("height", outerDiv.height())
		.css("position", "fixed")
		.css("opacity", "0.80")
		.css("-ms-filter",
"progid:DXImageTransform.Microsoft.Alpha(Opacity = 80)")
		.css("filter", "alpha(opacity = 80)")
		.css("display", "none")
		.appendTo(outerDiv);
	jQuery('#loading').show();
	// when page is ready remove and show
	jQuery(window).load(function() {
		jQuery('#moojla_loader').fadeIn('fast');
		jQuery('#loading').hide();
	});
</script>
<div id="moojla_loader" style="display: none;">
<form action="<?php echo
JRoute::_('index.php?option=com_moojla&layout=edit&id='.
(int) $this->item->id . $this->referral); ?>"
method="post" name="adminForm" id="adminForm"
class="form-validate" enctype="multipart/form-data">

<div class="form-horizontal">

	<?php echo JHtml::_('bootstrap.startTabSet',
'category_mapTab', array('active' =>
'details')); ?>

	<?php echo JHtml::_('bootstrap.addTab',
'category_mapTab', 'details',
JText::_('COM_MOOJLA_CATEGORY_MAP_DETAILS', true)); ?>
		<div class="row-fluid form-horizontal-desktop">
			<div class="span6">
				<?php echo
JLayoutHelper::render('category_map.details_left', $this); ?>
			</div>
			<div class="span6">
				<?php echo
JLayoutHelper::render('category_map.details_right', $this); ?>
			</div>
		</div>
	<?php echo JHtml::_('bootstrap.endTab'); ?>

	<?php $this->ignore_fieldsets =
array('details','metadata','vdmmetadata','accesscontrol');
?>
	<?php $this->tab_name = 'category_mapTab'; ?>
	<?php echo JLayoutHelper::render('joomla.edit.params',
$this); ?>

	<?php if ($this->canDo->get('core.edit.created_by') ||
$this->canDo->get('core.edit.created') ||
$this->canDo->get('core.edit.state') ||
($this->canDo->get('core.delete') &&
$this->canDo->get('core.edit.state'))) : ?>
	<?php echo JHtml::_('bootstrap.addTab',
'category_mapTab', 'publishing',
JText::_('COM_MOOJLA_CATEGORY_MAP_PUBLISHING', true)); ?>
		<div class="row-fluid form-horizontal-desktop">
			<div class="span6">
				<?php echo
JLayoutHelper::render('category_map.publishing', $this); ?>
			</div>
			<div class="span6">
				<?php echo
JLayoutHelper::render('category_map.publlshing', $this); ?>
			</div>
		</div>
	<?php echo JHtml::_('bootstrap.endTab'); ?>
	<?php endif; ?>

	<?php if ($this->canDo->get('core.admin')) : ?>
	<?php echo JHtml::_('bootstrap.addTab',
'category_mapTab', 'permissions',
JText::_('COM_MOOJLA_CATEGORY_MAP_PERMISSION', true)); ?>
		<div class="row-fluid form-horizontal-desktop">
			<div class="span12">
				<fieldset class="adminform">
					<div class="adminformlist">
					<?php foreach
($this->form->getFieldset('accesscontrol') as $field):
?>
						<div>
							<?php echo $field->label; echo $field->input;?>
						</div>
						<div class="clearfix"></div>
					<?php endforeach; ?>
					</div>
				</fieldset>
			</div>
		</div>
	<?php echo JHtml::_('bootstrap.endTab'); ?>
	<?php endif; ?>

	<?php echo JHtml::_('bootstrap.endTabSet'); ?>

	<div>
		<input type="hidden" name="task"
value="category_map.edit" />
		<?php echo JHtml::_('form.token'); ?>
	</div>
</div>
</form>
</div>
category_map/tmpl/index.html000064400000000054151160405140012163
0ustar00<html><body
bgcolor="#FFFFFF"></body></html>category_map/view.html.php000064400000015410151160405140011642
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				Lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.77
	@build			6th April, 2022
	@created		22nd July, 2020
	@package		Moojla
	@subpackage		view.html.php
	@author			Lmskaran <http://Lmskaran.com>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

/**
 * Category_map View class
 */
class MoojlaViewCategory_map extends JViewLegacy
{
	/**
	 * display method of View
	 * @return void
	 */
	public function display($tpl = null)
	{
		// set params
		$this->params = JComponentHelper::getParams('com_moojla');
		// Assign the variables
		$this->form = $this->get('Form');
		$this->item = $this->get('Item');
		$this->script = $this->get('Script');
		$this->state = $this->get('State');
		// get action permissions
		$this->canDo = MoojlaHelper::getActions('category_map',
$this->item);
		// get input
		$jinput = JFactory::getApplication()->input;
		$this->ref = $jinput->get('ref', 0, 'word');
		$this->refid = $jinput->get('refid', 0, 'int');
		$return = $jinput->get('return', null, 'base64');
		// set the referral string
		$this->referral = '';
		if ($this->refid && $this->ref)
		{
			// return to the item that referred to this item
			$this->referral = '&ref=' . (string)$this->ref .
'&refid=' . (int)$this->refid;
		}
		elseif($this->ref)
		{
			// return to the list view that referred to this item
			$this->referral = '&ref=' . (string)$this->ref;
		}
		// check return value
		if (!is_null($return))
		{
			// add the return value
			$this->referral .= '&return=' . (string)$return;
		}

		// Set the toolbar
		$this->addToolBar();
		
		// Check for errors.
		if (count($errors = $this->get('Errors')))
		{
			throw new Exception(implode("\n", $errors), 500);
		}

		// Display the template
		parent::display($tpl);

		// Set the document
		$this->setDocument();
	}


	/**
	 * Setting the toolbar
	 */
	protected function addToolBar()
	{
		JFactory::getApplication()->input->set('hidemainmenu',
true);
		$user = JFactory::getUser();
		$userId	= $user->id;
		$isNew = $this->item->id == 0;

		JToolbarHelper::title( JText::_($isNew ?
'COM_MOOJLA_CATEGORY_MAP_NEW' :
'COM_MOOJLA_CATEGORY_MAP_EDIT'), 'pencil-2
article-add');
		// Built the actions for new and existing records.
		if (MoojlaHelper::checkString($this->referral))
		{
			if ($this->canDo->get('core.create') && $isNew)
			{
				// We can create the record.
				JToolBarHelper::save('category_map.save',
'JTOOLBAR_SAVE');
			}
			elseif ($this->canDo->get('core.edit'))
			{
				// We can save the record.
				JToolBarHelper::save('category_map.save',
'JTOOLBAR_SAVE');
			}
			if ($isNew)
			{
				// Do not creat but cancel.
				JToolBarHelper::cancel('category_map.cancel',
'JTOOLBAR_CANCEL');
			}
			else
			{
				// We can close it.
				JToolBarHelper::cancel('category_map.cancel',
'JTOOLBAR_CLOSE');
			}
		}
		else
		{
			if ($isNew)
			{
				// For new records, check the create permission.
				if ($this->canDo->get('core.create'))
				{
					JToolBarHelper::apply('category_map.apply',
'JTOOLBAR_APPLY');
					JToolBarHelper::save('category_map.save',
'JTOOLBAR_SAVE');
					JToolBarHelper::custom('category_map.save2new',
'save-new.png', 'save-new_f2.png',
'JTOOLBAR_SAVE_AND_NEW', false);
				};
				JToolBarHelper::cancel('category_map.cancel',
'JTOOLBAR_CANCEL');
			}
			else
			{
				if ($this->canDo->get('core.edit'))
				{
					// We can save the new record
					JToolBarHelper::apply('category_map.apply',
'JTOOLBAR_APPLY');
					JToolBarHelper::save('category_map.save',
'JTOOLBAR_SAVE');
					// We can save this record, but check the create permission to see
					// if we can return to make a new one.
					if ($this->canDo->get('core.create'))
					{
						JToolBarHelper::custom('category_map.save2new',
'save-new.png', 'save-new_f2.png',
'JTOOLBAR_SAVE_AND_NEW', false);
					}
				}
				$canVersion = ($this->canDo->get('core.version')
&& $this->canDo->get('category_map.version'));
				if ($this->state->params->get('save_history', 1)
&& $this->canDo->get('core.edit') &&
$canVersion)
				{
					JToolbarHelper::versions('com_moojla.category_map',
$this->item->id);
				}
				if ($this->canDo->get('core.create'))
				{
					JToolBarHelper::custom('category_map.save2copy',
'save-copy.png', 'save-copy_f2.png',
'JTOOLBAR_SAVE_AS_COPY', false);
				}
				JToolBarHelper::cancel('category_map.cancel',
'JTOOLBAR_CLOSE');
			}
		}
		JToolbarHelper::divider();
		// set help url for this view if found
		$help_url = MoojlaHelper::getHelpUrl('category_map');
		if (MoojlaHelper::checkString($help_url))
		{
			JToolbarHelper::help('COM_MOOJLA_HELP_MANAGER', false,
$help_url);
		}
	}

	/**
	 * Escapes a value for output in a view script.
	 *
	 * @param   mixed  $var  The output to escape.
	 *
	 * @return  mixed  The escaped value.
	 */
	public function escape($var)
	{
		if(strlen($var) > 30)
		{
    		// use the helper htmlEscape method instead and shorten the string
			return MoojlaHelper::htmlEscape($var, $this->_charset, true, 30);
		}
		// use the helper htmlEscape method instead.
		return MoojlaHelper::htmlEscape($var, $this->_charset);
	}

	/**
	 * Method to set up the document properties
	 *
	 * @return void
	 */
	protected function setDocument()
	{
		$isNew = ($this->item->id < 1);
		if (!isset($this->document))
		{
			$this->document = JFactory::getDocument();
		}
		$this->document->setTitle(JText::_($isNew ?
'COM_MOOJLA_CATEGORY_MAP_NEW' :
'COM_MOOJLA_CATEGORY_MAP_EDIT'));
		$this->document->addStyleSheet(JURI::root() .
"administrator/components/com_moojla/assets/css/category_map.css",
(MoojlaHelper::jVersion()->isCompatible('3.8.0')) ?
array('version' => 'auto') : 'text/css');
		$this->document->addScript(JURI::root() . $this->script,
(MoojlaHelper::jVersion()->isCompatible('3.8.0')) ?
array('version' => 'auto') :
'text/javascript');
		$this->document->addScript(JURI::root() .
"administrator/components/com_moojla/views/category_map/submitbutton.js",
(MoojlaHelper::jVersion()->isCompatible('3.8.0')) ?
array('version' => 'auto') :
'text/javascript'); 
		JText::script('view not acceptable. Error');
	}
}
cohort/submitbutton.js000064400000002743151160405150011143
0ustar00/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				Lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.77
	@build			6th April, 2022
	@created		22nd July, 2020
	@package		Moojla
	@subpackage		submitbutton.js
	@author			Lmskaran <http://Lmskaran.com>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

Joomla.submitbutton = function(task)
{
	if (task == ''){
		return false;
	} else { 
		var action = task.split('.');
		if (action[1] == 'cancel' || action[1] == 'close' ||
document.formvalidator.isValid(document.getElementById("adminForm"))){
			Joomla.submitform(task, document.getElementById("adminForm"));
			return true;
		} else {
			alert(Joomla.JText._('cohort, some values are not
acceptable.','Some values are unacceptable'));
			return false;
		}
	}
}cohort/tmpl/edit.php000064400000011266151160405150010460 0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				Lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.77
	@build			6th April, 2022
	@created		22nd July, 2020
	@package		Moojla
	@subpackage		edit.php
	@author			Lmskaran <http://Lmskaran.com>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html');
JHtml::_('behavior.tooltip');
JHtml::_('behavior.formvalidation');
JHtml::_('formbehavior.chosen', 'select');
JHtml::_('behavior.keepalive');
$componentParams = $this->params; // will be removed just use
$this->params instead
?>
<script type="text/javascript">
	// waiting spinner
	var outerDiv = jQuery('body');
	jQuery('<div id="loading"></div>')
		.css("background", "rgba(255, 255, 255, .8)
url('components/com_moojla/assets/images/import.gif') 50% 15%
no-repeat")
		.css("top", outerDiv.position().top -
jQuery(window).scrollTop())
		.css("left", outerDiv.position().left -
jQuery(window).scrollLeft())
		.css("width", outerDiv.width())
		.css("height", outerDiv.height())
		.css("position", "fixed")
		.css("opacity", "0.80")
		.css("-ms-filter",
"progid:DXImageTransform.Microsoft.Alpha(Opacity = 80)")
		.css("filter", "alpha(opacity = 80)")
		.css("display", "none")
		.appendTo(outerDiv);
	jQuery('#loading').show();
	// when page is ready remove and show
	jQuery(window).load(function() {
		jQuery('#moojla_loader').fadeIn('fast');
		jQuery('#loading').hide();
	});
</script>
<div id="moojla_loader" style="display: none;">
<form action="<?php echo
JRoute::_('index.php?option=com_moojla&layout=edit&id='.
(int) $this->item->id . $this->referral); ?>"
method="post" name="adminForm" id="adminForm"
class="form-validate" enctype="multipart/form-data">

<div class="form-horizontal">

	<?php echo JHtml::_('bootstrap.startTabSet',
'cohortTab', array('active' =>
'details')); ?>

	<?php echo JHtml::_('bootstrap.addTab',
'cohortTab', 'details',
JText::_('COM_MOOJLA_COHORT_DETAILS', true)); ?>
		<div class="row-fluid form-horizontal-desktop">
			<div class="span6">
				<?php echo JLayoutHelper::render('cohort.details_left',
$this); ?>
			</div>
			<div class="span6">
				<?php echo JLayoutHelper::render('cohort.details_right',
$this); ?>
			</div>
		</div>
	<?php echo JHtml::_('bootstrap.endTab'); ?>

	<?php $this->ignore_fieldsets =
array('details','metadata','vdmmetadata','accesscontrol');
?>
	<?php $this->tab_name = 'cohortTab'; ?>
	<?php echo JLayoutHelper::render('joomla.edit.params',
$this); ?>

	<?php if ($this->canDo->get('core.edit.created_by') ||
$this->canDo->get('core.edit.created') ||
$this->canDo->get('core.edit.state') ||
($this->canDo->get('core.delete') &&
$this->canDo->get('core.edit.state'))) : ?>
	<?php echo JHtml::_('bootstrap.addTab',
'cohortTab', 'publishing',
JText::_('COM_MOOJLA_COHORT_PUBLISHING', true)); ?>
		<div class="row-fluid form-horizontal-desktop">
			<div class="span6">
				<?php echo JLayoutHelper::render('cohort.publishing',
$this); ?>
			</div>
			<div class="span6">
				<?php echo JLayoutHelper::render('cohort.publlshing',
$this); ?>
			</div>
		</div>
	<?php echo JHtml::_('bootstrap.endTab'); ?>
	<?php endif; ?>

	<?php if ($this->canDo->get('core.admin')) : ?>
	<?php echo JHtml::_('bootstrap.addTab',
'cohortTab', 'permissions',
JText::_('COM_MOOJLA_COHORT_PERMISSION', true)); ?>
		<div class="row-fluid form-horizontal-desktop">
			<div class="span12">
				<fieldset class="adminform">
					<div class="adminformlist">
					<?php foreach
($this->form->getFieldset('accesscontrol') as $field):
?>
						<div>
							<?php echo $field->label; echo $field->input;?>
						</div>
						<div class="clearfix"></div>
					<?php endforeach; ?>
					</div>
				</fieldset>
			</div>
		</div>
	<?php echo JHtml::_('bootstrap.endTab'); ?>
	<?php endif; ?>

	<?php echo JHtml::_('bootstrap.endTabSet'); ?>

	<div>
		<input type="hidden" name="task"
value="cohort.edit" />
		<?php echo JHtml::_('form.token'); ?>
	</div>
</div>
</form>
</div>
cohort/tmpl/index.html000064400000000054151160405150011010
0ustar00<html><body
bgcolor="#FFFFFF"></body></html>cohort/view.html.php000064400000015162151160405150010473
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				Lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.77
	@build			6th April, 2022
	@created		22nd July, 2020
	@package		Moojla
	@subpackage		view.html.php
	@author			Lmskaran <http://Lmskaran.com>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

/**
 * Cohort View class
 */
class MoojlaViewCohort extends JViewLegacy
{
	/**
	 * display method of View
	 * @return void
	 */
	public function display($tpl = null)
	{
		// set params
		$this->params = JComponentHelper::getParams('com_moojla');
		// Assign the variables
		$this->form = $this->get('Form');
		$this->item = $this->get('Item');
		$this->script = $this->get('Script');
		$this->state = $this->get('State');
		// get action permissions
		$this->canDo = MoojlaHelper::getActions('cohort',
$this->item);
		// get input
		$jinput = JFactory::getApplication()->input;
		$this->ref = $jinput->get('ref', 0, 'word');
		$this->refid = $jinput->get('refid', 0, 'int');
		$return = $jinput->get('return', null, 'base64');
		// set the referral string
		$this->referral = '';
		if ($this->refid && $this->ref)
		{
			// return to the item that referred to this item
			$this->referral = '&ref=' . (string)$this->ref .
'&refid=' . (int)$this->refid;
		}
		elseif($this->ref)
		{
			// return to the list view that referred to this item
			$this->referral = '&ref=' . (string)$this->ref;
		}
		// check return value
		if (!is_null($return))
		{
			// add the return value
			$this->referral .= '&return=' . (string)$return;
		}

		// Set the toolbar
		$this->addToolBar();
		
		// Check for errors.
		if (count($errors = $this->get('Errors')))
		{
			throw new Exception(implode("\n", $errors), 500);
		}

		// Display the template
		parent::display($tpl);

		// Set the document
		$this->setDocument();
	}


	/**
	 * Setting the toolbar
	 */
	protected function addToolBar()
	{
		JFactory::getApplication()->input->set('hidemainmenu',
true);
		$user = JFactory::getUser();
		$userId	= $user->id;
		$isNew = $this->item->id == 0;

		JToolbarHelper::title( JText::_($isNew ?
'COM_MOOJLA_COHORT_NEW' : 'COM_MOOJLA_COHORT_EDIT'),
'pencil-2 article-add');
		// Built the actions for new and existing records.
		if (MoojlaHelper::checkString($this->referral))
		{
			if ($this->canDo->get('core.create') && $isNew)
			{
				// We can create the record.
				JToolBarHelper::save('cohort.save',
'JTOOLBAR_SAVE');
			}
			elseif ($this->canDo->get('core.edit'))
			{
				// We can save the record.
				JToolBarHelper::save('cohort.save',
'JTOOLBAR_SAVE');
			}
			if ($isNew)
			{
				// Do not creat but cancel.
				JToolBarHelper::cancel('cohort.cancel',
'JTOOLBAR_CANCEL');
			}
			else
			{
				// We can close it.
				JToolBarHelper::cancel('cohort.cancel',
'JTOOLBAR_CLOSE');
			}
		}
		else
		{
			if ($isNew)
			{
				// For new records, check the create permission.
				if ($this->canDo->get('core.create'))
				{
					JToolBarHelper::apply('cohort.apply',
'JTOOLBAR_APPLY');
					JToolBarHelper::save('cohort.save',
'JTOOLBAR_SAVE');
					JToolBarHelper::custom('cohort.save2new',
'save-new.png', 'save-new_f2.png',
'JTOOLBAR_SAVE_AND_NEW', false);
				};
				JToolBarHelper::cancel('cohort.cancel',
'JTOOLBAR_CANCEL');
			}
			else
			{
				if ($this->canDo->get('core.edit'))
				{
					// We can save the new record
					JToolBarHelper::apply('cohort.apply',
'JTOOLBAR_APPLY');
					JToolBarHelper::save('cohort.save',
'JTOOLBAR_SAVE');
					// We can save this record, but check the create permission to see
					// if we can return to make a new one.
					if ($this->canDo->get('core.create'))
					{
						JToolBarHelper::custom('cohort.save2new',
'save-new.png', 'save-new_f2.png',
'JTOOLBAR_SAVE_AND_NEW', false);
					}
				}
				$canVersion = ($this->canDo->get('core.version')
&& $this->canDo->get('cohort.version'));
				if ($this->state->params->get('save_history', 1)
&& $this->canDo->get('core.edit') &&
$canVersion)
				{
					JToolbarHelper::versions('com_moojla.cohort',
$this->item->id);
				}
				if ($this->canDo->get('core.create'))
				{
					JToolBarHelper::custom('cohort.save2copy',
'save-copy.png', 'save-copy_f2.png',
'JTOOLBAR_SAVE_AS_COPY', false);
				}
				JToolBarHelper::cancel('cohort.cancel',
'JTOOLBAR_CLOSE');
			}
		}
		JToolbarHelper::divider();
		// set help url for this view if found
		$help_url = MoojlaHelper::getHelpUrl('cohort');
		if (MoojlaHelper::checkString($help_url))
		{
			JToolbarHelper::help('COM_MOOJLA_HELP_MANAGER', false,
$help_url);
		}
	}

	/**
	 * Escapes a value for output in a view script.
	 *
	 * @param   mixed  $var  The output to escape.
	 *
	 * @return  mixed  The escaped value.
	 */
	public function escape($var)
	{
		if(strlen($var) > 30)
		{
    		// use the helper htmlEscape method instead and shorten the string
			return MoojlaHelper::htmlEscape($var, $this->_charset, true, 30);
		}
		// use the helper htmlEscape method instead.
		return MoojlaHelper::htmlEscape($var, $this->_charset);
	}

	/**
	 * Method to set up the document properties
	 *
	 * @return void
	 */
	protected function setDocument()
	{
		$isNew = ($this->item->id < 1);
		if (!isset($this->document))
		{
			$this->document = JFactory::getDocument();
		}
		$this->document->setTitle(JText::_($isNew ?
'COM_MOOJLA_COHORT_NEW' : 'COM_MOOJLA_COHORT_EDIT'));
		$this->document->addStyleSheet(JURI::root() .
"administrator/components/com_moojla/assets/css/cohort.css",
(MoojlaHelper::jVersion()->isCompatible('3.8.0')) ?
array('version' => 'auto') : 'text/css');
		$this->document->addScript(JURI::root() . $this->script,
(MoojlaHelper::jVersion()->isCompatible('3.8.0')) ?
array('version' => 'auto') :
'text/javascript');
		$this->document->addScript(JURI::root() .
"administrator/components/com_moojla/views/cohort/submitbutton.js",
(MoojlaHelper::jVersion()->isCompatible('3.8.0')) ?
array('version' => 'auto') :
'text/javascript'); 
		JText::script('view not acceptable. Error');
	}
}
cohorts/index.html000064400000000054151160405150010217
0ustar00<html><body
bgcolor="#FFFFFF"></body></html>cohorts/tmpl/default.php000064400000005515151160405150011342
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				Lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.77
	@build			6th April, 2022
	@created		22nd July, 2020
	@package		Moojla
	@subpackage		default.php
	@author			Lmskaran <http://Lmskaran.com>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

JHtml::_('behavior.tooltip');
JHtml::_('behavior.multiselect');
JHtml::_('dropdown.init');
JHtml::_('formbehavior.chosen', 'select');
if ($this->saveOrder)
{
	$saveOrderingUrl =
'index.php?option=com_moojla&task=cohorts.saveOrderAjax&tmpl=component';
	JHtml::_('sortablelist.sortable', 'cohortList',
'adminForm', strtolower($this->listDirn), $saveOrderingUrl);
}
?>
<form action="<?php echo
JRoute::_('index.php?option=com_moojla&view=cohorts');
?>" method="post" name="adminForm"
id="adminForm">
<?php if(!empty( $this->sidebar)): ?>
	<div id="j-sidebar-container" class="span2">
		<?php echo $this->sidebar; ?>
	</div>
	<div id="j-main-container" class="span10">
<?php else : ?>
	<div id="j-main-container">
<?php endif; ?>
<?php
	// Add the searchtools
	echo JLayoutHelper::render('joomla.searchtools.default',
array('view' => $this));
?>
<?php if (empty($this->items)): ?>
	<div class="alert alert-no-items">
		<?php echo JText::_('JGLOBAL_NO_MATCHING_RESULTS'); ?>
	</div>
<?php else : ?>
	<table class="table table-striped"
id="cohortList">
		<thead><?php echo
$this->loadTemplate('head');?></thead>
		<tfoot><?php echo
$this->loadTemplate('foot');?></tfoot>
		<tbody><?php echo
$this->loadTemplate('body');?></tbody>
	</table>
	<?php // Load the batch processing form. ?>
	<?php if ($this->canCreate && $this->canEdit) : ?>
		<?php echo JHtml::_(
			'bootstrap.renderModal',
			'collapseModal',
			array(
				'title' =>
JText::_('COM_MOOJLA_COHORTS_BATCH_OPTIONS'),
				'footer' =>
$this->loadTemplate('batch_footer')
			),
			$this->loadTemplate('batch_body')
		); ?>
	<?php endif; ?>
	<input type="hidden" name="boxchecked"
value="0" />
	</div>
<?php endif; ?>
	<input type="hidden" name="task" value=""
/>
	<?php echo JHtml::_('form.token'); ?>
</form>
cohorts/tmpl/default_batch_body.php000064400000002332151160405150013512
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				Lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.77
	@build			6th April, 2022
	@created		22nd July, 2020
	@package		Moojla
	@subpackage		default_batch_body.php
	@author			Lmskaran <http://Lmskaran.com>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

?>

<p><?php echo JText::_('COM_MOOJLA_COHORTS_BATCH_TIP');
?></p>
<?php echo $this->batchDisplay;
?>cohorts/tmpl/default_batch_footer.php000064400000002730151160405150014055
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				Lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.77
	@build			6th April, 2022
	@created		22nd July, 2020
	@package		Moojla
	@subpackage		default_batch_footer.php
	@author			Lmskaran <http://Lmskaran.com>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

?>
<!-- clear the batch values if cancel -->
<button class="btn" type="button"
onclick="" data-dismiss="modal">
	<?php echo JText::_('JCANCEL'); ?>
</button>
<!-- post the batch values if process -->
<button class="btn btn-success" type="submit"
onclick="Joomla.submitbutton('cohort.batch');">
	<?php echo JText::_('JGLOBAL_BATCH_PROCESS'); ?>
</button>cohorts/tmpl/default_body.php000064400000007532151160405150012360
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				Lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.77
	@build			6th April, 2022
	@created		22nd July, 2020
	@package		Moojla
	@subpackage		default_body.php
	@author			Lmskaran <http://Lmskaran.com>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

$edit =
"index.php?option=com_moojla&view=cohorts&task=cohort.edit";

?>
<?php foreach ($this->items as $i => $item): ?>
	<?php
		$canCheckin = $this->user->authorise('core.manage',
'com_checkin') || $item->checked_out == $this->user->id
|| $item->checked_out == 0;
		$userChkOut = JFactory::getUser($item->checked_out);
		$canDo =
MoojlaHelper::getActions('cohort',$item,'cohorts');
	?>
	<tr class="row<?php echo $i % 2; ?>">
		<td class="order nowrap center hidden-phone">
		<?php if ($canDo->get('core.edit.state')): ?>
			<?php
				$iconClass = '';
				if (!$this->saveOrder)
				{
					$iconClass = ' inactive tip-top" hasTooltip"
title="' . JHtml::tooltipText('JORDERINGDISABLED');
				}
			?>
			<span class="sortable-handler<?php echo $iconClass;
?>">
				<i class="icon-menu"></i>
			</span>
			<?php if ($this->saveOrder) : ?>
				<input type="text" style="display:none"
name="order[]" size="5"
				value="<?php echo $item->ordering; ?>"
class="width-20 text-area-order " />
			<?php endif; ?>
		<?php else: ?>
			&#8942;
		<?php endif; ?>
		</td>
		<td class="nowrap center">
		<?php if ($canDo->get('core.edit')): ?>
				<?php if ($item->checked_out) : ?>
					<?php if ($canCheckin) : ?>
						<?php echo JHtml::_('grid.id', $i, $item->id); ?>
					<?php else: ?>
						&#9633;
					<?php endif; ?>
				<?php else: ?>
					<?php echo JHtml::_('grid.id', $i, $item->id); ?>
				<?php endif; ?>
		<?php else: ?>
			&#9633;
		<?php endif; ?>
		</td>
		<td class="nowrap">
			<div class="name">
				<?php if ($canDo->get('core.edit')): ?>
					<a href="<?php echo $edit; ?>&id=<?php echo
$item->id; ?>"><?php echo
$this->escape($item->mcohort); ?></a>
					<?php if ($item->checked_out): ?>
						<?php echo JHtml::_('jgrid.checkedout', $i,
$userChkOut->name, $item->checked_out_time, 'cohorts.',
$canCheckin); ?>
					<?php endif; ?>
				<?php else: ?>
					<?php echo $this->escape($item->mcohort); ?>
				<?php endif; ?>
			</div>
		</td>
		<td class="hidden-phone">
			<?php echo $this->escape($item->course_group_title); ?>
		</td>
		<td class="center">
		<?php if ($canDo->get('core.edit.state')) : ?>
				<?php if ($item->checked_out) : ?>
					<?php if ($canCheckin) : ?>
						<?php echo JHtml::_('jgrid.published',
$item->published, $i, 'cohorts.', true, 'cb'); ?>
					<?php else: ?>
						<?php echo JHtml::_('jgrid.published',
$item->published, $i, 'cohorts.', false, 'cb');
?>
					<?php endif; ?>
				<?php else: ?>
					<?php echo JHtml::_('jgrid.published',
$item->published, $i, 'cohorts.', true, 'cb'); ?>
				<?php endif; ?>
		<?php else: ?>
			<?php echo JHtml::_('jgrid.published', $item->published,
$i, 'cohorts.', false, 'cb'); ?>
		<?php endif; ?>
		</td>
		<td class="nowrap center hidden-phone">
			<?php echo $item->id; ?>
		</td>
	</tr>
<?php endforeach;
?>cohorts/tmpl/default_foot.php000064400000002304151160405150012362
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				Lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.77
	@build			6th April, 2022
	@created		22nd July, 2020
	@package		Moojla
	@subpackage		default_foot.php
	@author			Lmskaran <http://Lmskaran.com>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

?>
<tr>
	<td colspan="6"><?php echo
$this->pagination->getListFooter(); ?></td>
</tr>cohorts/tmpl/default_head.php000064400000004621151160405150012320
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				Lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.77
	@build			6th April, 2022
	@created		22nd July, 2020
	@package		Moojla
	@subpackage		default_head.php
	@author			Lmskaran <http://Lmskaran.com>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

?>
<tr>
	<?php if ($this->canEdit&& $this->canState): ?>
		<th width="1%" class="nowrap center
hidden-phone">
			<?php echo JHtml::_('searchtools.sort', '',
'a.ordering', $this->listDirn, $this->listOrder, null,
'asc', 'JGRID_HEADING_ORDERING',
'icon-menu-2'); ?>
		</th>
		<th width="20" class="nowrap center">
			<?php echo JHtml::_('grid.checkall'); ?>
		</th>
	<?php else: ?>
		<th width="20" class="nowrap center
hidden-phone">
			&#9662;
		</th>
		<th width="20" class="nowrap center">
			&#9632;
		</th>
	<?php endif; ?>
	<th class="nowrap" >
			<?php echo JHtml::_('searchtools.sort',
'COM_MOOJLA_COHORT_MCOHORT_LABEL', 'g.name',
$this->listDirn, $this->listOrder); ?>
	</th>
	<th class="nowrap hidden-phone" >
			<?php echo
JText::_('COM_MOOJLA_COHORT_COURSE_GROUP_LABEL'); ?>
	</th>
	<?php if ($this->canState): ?>
		<th width="10" class="nowrap center" >
			<?php echo JHtml::_('searchtools.sort',
'COM_MOOJLA_COHORT_STATUS', 'a.published',
$this->listDirn, $this->listOrder); ?>
		</th>
	<?php else: ?>
		<th width="10" class="nowrap center" >
			<?php echo JText::_('COM_MOOJLA_COHORT_STATUS'); ?>
		</th>
	<?php endif; ?>
	<th width="5" class="nowrap center hidden-phone"
>
			<?php echo JHtml::_('searchtools.sort',
'COM_MOOJLA_COHORT_ID', 'a.id', $this->listDirn,
$this->listOrder); ?>
	</th>
</tr>cohorts/tmpl/default_toolbar.php000064400000007052151160405150013062
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				Lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.77
	@build			6th April, 2022
	@created		22nd July, 2020
	@package		Moojla
	@subpackage		default_toolbar.php
	@author			Lmskaran <http://Lmskaran.com>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

?>
<div id="filter-bar" class="btn-toolbar">
        <div class="filter-search btn-group pull-left">
            <label for="filter_search"
class="element-invisible"><?php echo
JText::_('Search');?></label>
            <input type="text" name="filter_search"
id="filter_search" placeholder="<?php echo
JText::_('JSEARCH_FILTER'); ?>" value="<?php echo
$this->escape($this->state->get('filter.search'));
?>" class="hasTooltip" title="<?php echo
JHtml::tooltipText('Search Cohorts'); ?>" />
        </div>
        <div class="btn-group pull-left">
            <button type="submit" class="btn
hasTooltip" title="<?php echo
JHtml::tooltipText('JSEARCH_FILTER_SUBMIT'); ?>"><i
class="icon-search"></i></button>
            <button type="button" class="btn
hasTooltip" title="<?php echo
JHtml::tooltipText('JSEARCH_FILTER_CLEAR'); ?>"
onclick="document.id('filter_search').value='';this.form.submit();"><i
class="icon-remove"></i></button>
        </div>
        <div class="btn-group pull-right hidden-phone">
            <label for="limit"
class="element-invisible"><?php echo
JText::_('JFIELD_PLG_SEARCH_SEARCHLIMIT_DESC');?></label>
            <?php echo $this->pagination->getLimitBox(); ?>
        </div>
        <div class="btn-group pull-right hidden-phone">
            <label for="directionTable"
class="element-invisible"><?php echo
JText::_('JFIELD_ORDERING_DESC');?></label>
            <select name="directionTable"
id="directionTable" class="input-medium"
onchange="Joomla.orderTable()">
                <option value=""><?php echo
JText::_('JFIELD_ORDERING_DESC');?></option>
                <option value="asc" <?php if
($this->listDirn == 'asc') echo
'selected="selected"'; ?>><?php echo
JText::_('JGLOBAL_ORDER_ASCENDING');?></option>
                <option value="desc" <?php if
($this->listDirn == 'desc') echo
'selected="selected"'; ?>><?php echo
JText::_('JGLOBAL_ORDER_DESCENDING');?></option>
            </select>
        </div>
        <div class="btn-group pull-right">
            <label for="sortTable"
class="element-invisible"><?php echo
JText::_('JGLOBAL_SORT_BY');?></label>
            <select name="sortTable" id="sortTable"
class="input-medium" onchange="Joomla.orderTable()">
                <option value=""><?php echo
JText::_('JGLOBAL_SORT_BY');?></option>
                <?php echo JHtml::_('select.options',
$this->getSortFields(), 'value', 'text',
$this->listOrder);?>
            </select>
        </div>
    </div>
<div class="clearfix">
</div>cohorts/tmpl/index.html000064400000000054151160405150011173
0ustar00<html><body
bgcolor="#FFFFFF"></body></html>cohorts/view.html.php000064400000020356151160405150010657
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				Lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.77
	@build			6th April, 2022
	@created		22nd July, 2020
	@package		Moojla
	@subpackage		view.html.php
	@author			Lmskaran <http://Lmskaran.com>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

/**
 * Moojla View class for the Cohorts
 */
class MoojlaViewCohorts extends JViewLegacy
{
	/**
	 * Cohorts view display method
	 * @return void
	 */
	function display($tpl = null)
	{
		if ($this->getLayout() !== 'modal')
		{
			// Include helper submenu
			MoojlaHelper::addSubmenu('cohorts');
		}

		// Assign data to the view
		$this->items = $this->get('Items');
		$this->pagination = $this->get('Pagination');
		$this->state = $this->get('State');
		$this->user = JFactory::getUser();
		// Load the filter form from xml.
		$this->filterForm = $this->get('FilterForm');
		// Load the active filters.
		$this->activeFilters = $this->get('ActiveFilters');
		// Add the list ordering clause.
		$this->listOrder =
$this->escape($this->state->get('list.ordering',
'a.id'));
		$this->listDirn =
$this->escape($this->state->get('list.direction',
'DESC'));
		$this->saveOrder = $this->listOrder == 'a.ordering';
		// set the return here value
		$this->return_here = urlencode(base64_encode((string)
JUri::getInstance()));
		// get global action permissions
		$this->canDo = MoojlaHelper::getActions('cohort');
		$this->canEdit = $this->canDo->get('core.edit');
		$this->canState =
$this->canDo->get('core.edit.state');
		$this->canCreate = $this->canDo->get('core.create');
		$this->canDelete = $this->canDo->get('core.delete');
		$this->canBatch = $this->canDo->get('core.batch');

		// We don't need toolbar in the modal window.
		if ($this->getLayout() !== 'modal')
		{
			$this->addToolbar();
			$this->sidebar = JHtmlSidebar::render();
			// load the batch html
			if ($this->canCreate && $this->canEdit &&
$this->canState)
			{
				$this->batchDisplay = JHtmlBatch_::render();
			}
		}
		
		// Check for errors.
		if (count($errors = $this->get('Errors')))
		{
			throw new Exception(implode("\n", $errors), 500);
		}

		// Display the template
		parent::display($tpl);

		// Set the document
		$this->setDocument();
	}

	/**
	 * Setting the toolbar
	 */
	protected function addToolBar()
	{
		JToolBarHelper::title(JText::_('COM_MOOJLA_COHORTS'),
'joomla');
		JHtmlSidebar::setAction('index.php?option=com_moojla&view=cohorts');
		JFormHelper::addFieldPath(JPATH_COMPONENT . '/models/fields');

		if ($this->canCreate)
		{
			JToolBarHelper::addNew('cohort.add');
		}

		// Only load if there are items
		if (MoojlaHelper::checkArray($this->items))
		{
			if ($this->canEdit)
			{
				JToolBarHelper::editList('cohort.edit');
			}

			if ($this->canState)
			{
				JToolBarHelper::publishList('cohorts.publish');
				JToolBarHelper::unpublishList('cohorts.unpublish');
				JToolBarHelper::archiveList('cohorts.archive');

				if ($this->canDo->get('core.admin'))
				{
					JToolBarHelper::checkin('cohorts.checkin');
				}
			}

			// Add a batch button
			if ($this->canBatch && $this->canCreate &&
$this->canEdit && $this->canState)
			{
				// Get the toolbar object instance
				$bar = JToolBar::getInstance('toolbar');
				// set the batch button name
				$title = JText::_('JTOOLBAR_BATCH');
				// Instantiate a new JLayoutFile instance and render the batch button
				$layout = new JLayoutFile('joomla.toolbar.batch');
				// add the button to the page
				$dhtml = $layout->render(array('title' => $title));
				$bar->appendButton('Custom', $dhtml, 'batch');
			}

			if ($this->state->get('filter.published') == -2
&& ($this->canState && $this->canDelete))
			{
				JToolbarHelper::deleteList('', 'cohorts.delete',
'JTOOLBAR_EMPTY_TRASH');
			}
			elseif ($this->canState && $this->canDelete)
			{
				JToolbarHelper::trash('cohorts.trash');
			}
		}

		// set help url for this view if found
		$help_url = MoojlaHelper::getHelpUrl('cohorts');
		if (MoojlaHelper::checkString($help_url))
		{
				JToolbarHelper::help('COM_MOOJLA_HELP_MANAGER', false,
$help_url);
		}

		// add the options comp button
		if ($this->canDo->get('core.admin') ||
$this->canDo->get('core.options'))
		{
			JToolBarHelper::preferences('com_moojla');
		}

		// Only load published batch if state and batch is allowed
		if ($this->canState && $this->canBatch)
		{
			JHtmlBatch_::addListSelection(
				JText::_('COM_MOOJLA_KEEP_ORIGINAL_STATE'),
				'batch[published]',
				JHtml::_('select.options',
JHtml::_('jgrid.publishedOptions', array('all' =>
false)), 'value', 'text', '', true)
			);
		}

		// Only load Mcohort Name batch if create, edit, and batch is allowed
		if ($this->canBatch && $this->canCreate &&
$this->canEdit)
		{
			// Set Mcohort Name Selection
			$this->mcohortNameOptions =
JFormHelper::loadFieldType('Mcohort')->options;
			// We do some sanitation for Mcohort Name filter
			if (MoojlaHelper::checkArray($this->mcohortNameOptions) &&
				isset($this->mcohortNameOptions[0]->value) &&
				!MoojlaHelper::checkString($this->mcohortNameOptions[0]->value))
			{
				unset($this->mcohortNameOptions[0]);
			}
			// Mcohort Name Batch Selection
			JHtmlBatch_::addListSelection(
				'- Keep Original
'.JText::_('COM_MOOJLA_COHORT_MCOHORT_LABEL').'
-',
				'batch[mcohort]',
				JHtml::_('select.options', $this->mcohortNameOptions,
'value', 'text')
			);
		}

		// Only load Course Group Title batch if create, edit, and batch is
allowed
		if ($this->canBatch && $this->canCreate &&
$this->canEdit)
		{
			// Set Course Group Title Selection
			$this->course_groupTitleOptions =
JFormHelper::loadFieldType('Customusergroup')->options;
			// We do some sanitation for Course Group Title filter
			if (MoojlaHelper::checkArray($this->course_groupTitleOptions)
&&
				isset($this->course_groupTitleOptions[0]->value) &&
				!MoojlaHelper::checkString($this->course_groupTitleOptions[0]->value))
			{
				unset($this->course_groupTitleOptions[0]);
			}
			// Course Group Title Batch Selection
			JHtmlBatch_::addListSelection(
				'- Keep Original
'.JText::_('COM_MOOJLA_COHORT_COURSE_GROUP_LABEL').'
-',
				'batch[course_group]',
				JHtml::_('select.options',
$this->course_groupTitleOptions, 'value', 'text')
			);
		}
	}

	/**
	 * Method to set up the document properties
	 *
	 * @return void
	 */
	protected function setDocument()
	{
		if (!isset($this->document))
		{
			$this->document = JFactory::getDocument();
		}
		$this->document->setTitle(JText::_('COM_MOOJLA_COHORTS'));
		$this->document->addStyleSheet(JURI::root() .
"administrator/components/com_moojla/assets/css/cohorts.css",
(MoojlaHelper::jVersion()->isCompatible('3.8.0')) ?
array('version' => 'auto') : 'text/css');
	}

	/**
	 * Escapes a value for output in a view script.
	 *
	 * @param   mixed  $var  The output to escape.
	 *
	 * @return  mixed  The escaped value.
	 */
	public function escape($var)
	{
		if(strlen($var) > 50)
		{
			// use the helper htmlEscape method instead and shorten the string
			return MoojlaHelper::htmlEscape($var, $this->_charset, true);
		}
		// use the helper htmlEscape method instead.
		return MoojlaHelper::htmlEscape($var, $this->_charset);
	}

	/**
	 * Returns an array of fields the table can be sorted by
	 *
	 * @return  array  Array containing the field name to sort by as the key
and display text as value
	 */
	protected function getSortFields()
	{
		return array(
			'a.ordering' =>
JText::_('JGRID_HEADING_ORDERING'),
			'a.published' => JText::_('JSTATUS'),
			'g.name' =>
JText::_('COM_MOOJLA_COHORT_MCOHORT_LABEL'),
			'a.id' => JText::_('JGRID_HEADING_ID')
		);
	}
}
content/submitbutton.js000064400000002744151160405150011320
0ustar00/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				Lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.77
	@build			6th April, 2022
	@created		22nd July, 2020
	@package		Moojla
	@subpackage		submitbutton.js
	@author			Lmskaran <http://Lmskaran.com>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

Joomla.submitbutton = function(task)
{
	if (task == ''){
		return false;
	} else { 
		var action = task.split('.');
		if (action[1] == 'cancel' || action[1] == 'close' ||
document.formvalidator.isValid(document.getElementById("adminForm"))){
			Joomla.submitform(task, document.getElementById("adminForm"));
			return true;
		} else {
			alert(Joomla.JText._('content, some values are not
acceptable.','Some values are unacceptable'));
			return false;
		}
	}
}content/tmpl/edit.php000064400000011132151160405150010624 0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				Lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.77
	@build			6th April, 2022
	@created		22nd July, 2020
	@package		Moojla
	@subpackage		edit.php
	@author			Lmskaran <http://Lmskaran.com>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html');
JHtml::_('behavior.tooltip');
JHtml::_('behavior.formvalidation');
JHtml::_('formbehavior.chosen', 'select');
JHtml::_('behavior.keepalive');
$componentParams = $this->params; // will be removed just use
$this->params instead
?>
<script type="text/javascript">
	// waiting spinner
	var outerDiv = jQuery('body');
	jQuery('<div id="loading"></div>')
		.css("background", "rgba(255, 255, 255, .8)
url('components/com_moojla/assets/images/import.gif') 50% 15%
no-repeat")
		.css("top", outerDiv.position().top -
jQuery(window).scrollTop())
		.css("left", outerDiv.position().left -
jQuery(window).scrollLeft())
		.css("width", outerDiv.width())
		.css("height", outerDiv.height())
		.css("position", "fixed")
		.css("opacity", "0.80")
		.css("-ms-filter",
"progid:DXImageTransform.Microsoft.Alpha(Opacity = 80)")
		.css("filter", "alpha(opacity = 80)")
		.css("display", "none")
		.appendTo(outerDiv);
	jQuery('#loading').show();
	// when page is ready remove and show
	jQuery(window).load(function() {
		jQuery('#moojla_loader').fadeIn('fast');
		jQuery('#loading').hide();
	});
</script>
<div id="moojla_loader" style="display: none;">
<form action="<?php echo
JRoute::_('index.php?option=com_moojla&layout=edit&id='.
(int) $this->item->id . $this->referral); ?>"
method="post" name="adminForm" id="adminForm"
class="form-validate" enctype="multipart/form-data">

<div class="form-horizontal">

	<?php echo JHtml::_('bootstrap.startTabSet',
'contentTab', array('active' =>
'details')); ?>

	<?php echo JHtml::_('bootstrap.addTab',
'contentTab', 'details',
JText::_('COM_MOOJLA_CONTENT_DETAILS', true)); ?>
		<div class="row-fluid form-horizontal-desktop">
			<div class="span12">
				<?php echo JLayoutHelper::render('content.details_left',
$this); ?>
			</div>
		</div>
	<?php echo JHtml::_('bootstrap.endTab'); ?>

	<?php $this->ignore_fieldsets =
array('details','metadata','vdmmetadata','accesscontrol');
?>
	<?php $this->tab_name = 'contentTab'; ?>
	<?php echo JLayoutHelper::render('joomla.edit.params',
$this); ?>

	<?php if ($this->canDo->get('core.edit.created_by') ||
$this->canDo->get('core.edit.created') ||
$this->canDo->get('core.edit.state') ||
($this->canDo->get('core.delete') &&
$this->canDo->get('core.edit.state'))) : ?>
	<?php echo JHtml::_('bootstrap.addTab',
'contentTab', 'publishing',
JText::_('COM_MOOJLA_CONTENT_PUBLISHING', true)); ?>
		<div class="row-fluid form-horizontal-desktop">
			<div class="span6">
				<?php echo JLayoutHelper::render('content.publishing',
$this); ?>
			</div>
			<div class="span6">
				<?php echo JLayoutHelper::render('content.publlshing',
$this); ?>
			</div>
		</div>
	<?php echo JHtml::_('bootstrap.endTab'); ?>
	<?php endif; ?>

	<?php if ($this->canDo->get('core.admin')) : ?>
	<?php echo JHtml::_('bootstrap.addTab',
'contentTab', 'permissions',
JText::_('COM_MOOJLA_CONTENT_PERMISSION', true)); ?>
		<div class="row-fluid form-horizontal-desktop">
			<div class="span12">
				<fieldset class="adminform">
					<div class="adminformlist">
					<?php foreach
($this->form->getFieldset('accesscontrol') as $field):
?>
						<div>
							<?php echo $field->label; echo $field->input;?>
						</div>
						<div class="clearfix"></div>
					<?php endforeach; ?>
					</div>
				</fieldset>
			</div>
		</div>
	<?php echo JHtml::_('bootstrap.endTab'); ?>
	<?php endif; ?>

	<?php echo JHtml::_('bootstrap.endTabSet'); ?>

	<div>
		<input type="hidden" name="task"
value="content.edit" />
		<?php echo JHtml::_('form.token'); ?>
	</div>
</div>
</form>
</div>
content/tmpl/index.html000064400000000054151160405150011164
0ustar00<html><body
bgcolor="#FFFFFF"></body></html>content/view.html.php000064400000015213151160405150010644
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				Lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.77
	@build			6th April, 2022
	@created		22nd July, 2020
	@package		Moojla
	@subpackage		view.html.php
	@author			Lmskaran <http://Lmskaran.com>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

/**
 * Content View class
 */
class MoojlaViewContent extends JViewLegacy
{
	/**
	 * display method of View
	 * @return void
	 */
	public function display($tpl = null)
	{
		// set params
		$this->params = JComponentHelper::getParams('com_moojla');
		// Assign the variables
		$this->form = $this->get('Form');
		$this->item = $this->get('Item');
		$this->script = $this->get('Script');
		$this->state = $this->get('State');
		// get action permissions
		$this->canDo = MoojlaHelper::getActions('content',
$this->item);
		// get input
		$jinput = JFactory::getApplication()->input;
		$this->ref = $jinput->get('ref', 0, 'word');
		$this->refid = $jinput->get('refid', 0, 'int');
		$return = $jinput->get('return', null, 'base64');
		// set the referral string
		$this->referral = '';
		if ($this->refid && $this->ref)
		{
			// return to the item that referred to this item
			$this->referral = '&ref=' . (string)$this->ref .
'&refid=' . (int)$this->refid;
		}
		elseif($this->ref)
		{
			// return to the list view that referred to this item
			$this->referral = '&ref=' . (string)$this->ref;
		}
		// check return value
		if (!is_null($return))
		{
			// add the return value
			$this->referral .= '&return=' . (string)$return;
		}

		// Set the toolbar
		$this->addToolBar();
		
		// Check for errors.
		if (count($errors = $this->get('Errors')))
		{
			throw new Exception(implode("\n", $errors), 500);
		}

		// Display the template
		parent::display($tpl);

		// Set the document
		$this->setDocument();
	}


	/**
	 * Setting the toolbar
	 */
	protected function addToolBar()
	{
		JFactory::getApplication()->input->set('hidemainmenu',
true);
		$user = JFactory::getUser();
		$userId	= $user->id;
		$isNew = $this->item->id == 0;

		JToolbarHelper::title( JText::_($isNew ?
'COM_MOOJLA_CONTENT_NEW' : 'COM_MOOJLA_CONTENT_EDIT'),
'pencil-2 article-add');
		// Built the actions for new and existing records.
		if (MoojlaHelper::checkString($this->referral))
		{
			if ($this->canDo->get('core.create') && $isNew)
			{
				// We can create the record.
				JToolBarHelper::save('content.save',
'JTOOLBAR_SAVE');
			}
			elseif ($this->canDo->get('core.edit'))
			{
				// We can save the record.
				JToolBarHelper::save('content.save',
'JTOOLBAR_SAVE');
			}
			if ($isNew)
			{
				// Do not creat but cancel.
				JToolBarHelper::cancel('content.cancel',
'JTOOLBAR_CANCEL');
			}
			else
			{
				// We can close it.
				JToolBarHelper::cancel('content.cancel',
'JTOOLBAR_CLOSE');
			}
		}
		else
		{
			if ($isNew)
			{
				// For new records, check the create permission.
				if ($this->canDo->get('core.create'))
				{
					JToolBarHelper::apply('content.apply',
'JTOOLBAR_APPLY');
					JToolBarHelper::save('content.save',
'JTOOLBAR_SAVE');
					JToolBarHelper::custom('content.save2new',
'save-new.png', 'save-new_f2.png',
'JTOOLBAR_SAVE_AND_NEW', false);
				};
				JToolBarHelper::cancel('content.cancel',
'JTOOLBAR_CANCEL');
			}
			else
			{
				if ($this->canDo->get('core.edit'))
				{
					// We can save the new record
					JToolBarHelper::apply('content.apply',
'JTOOLBAR_APPLY');
					JToolBarHelper::save('content.save',
'JTOOLBAR_SAVE');
					// We can save this record, but check the create permission to see
					// if we can return to make a new one.
					if ($this->canDo->get('core.create'))
					{
						JToolBarHelper::custom('content.save2new',
'save-new.png', 'save-new_f2.png',
'JTOOLBAR_SAVE_AND_NEW', false);
					}
				}
				$canVersion = ($this->canDo->get('core.version')
&& $this->canDo->get('content.version'));
				if ($this->state->params->get('save_history', 1)
&& $this->canDo->get('core.edit') &&
$canVersion)
				{
					JToolbarHelper::versions('com_moojla.content',
$this->item->id);
				}
				if ($this->canDo->get('core.create'))
				{
					JToolBarHelper::custom('content.save2copy',
'save-copy.png', 'save-copy_f2.png',
'JTOOLBAR_SAVE_AS_COPY', false);
				}
				JToolBarHelper::cancel('content.cancel',
'JTOOLBAR_CLOSE');
			}
		}
		JToolbarHelper::divider();
		// set help url for this view if found
		$help_url = MoojlaHelper::getHelpUrl('content');
		if (MoojlaHelper::checkString($help_url))
		{
			JToolbarHelper::help('COM_MOOJLA_HELP_MANAGER', false,
$help_url);
		}
	}

	/**
	 * Escapes a value for output in a view script.
	 *
	 * @param   mixed  $var  The output to escape.
	 *
	 * @return  mixed  The escaped value.
	 */
	public function escape($var)
	{
		if(strlen($var) > 30)
		{
    		// use the helper htmlEscape method instead and shorten the string
			return MoojlaHelper::htmlEscape($var, $this->_charset, true, 30);
		}
		// use the helper htmlEscape method instead.
		return MoojlaHelper::htmlEscape($var, $this->_charset);
	}

	/**
	 * Method to set up the document properties
	 *
	 * @return void
	 */
	protected function setDocument()
	{
		$isNew = ($this->item->id < 1);
		if (!isset($this->document))
		{
			$this->document = JFactory::getDocument();
		}
		$this->document->setTitle(JText::_($isNew ?
'COM_MOOJLA_CONTENT_NEW' : 'COM_MOOJLA_CONTENT_EDIT'));
		$this->document->addStyleSheet(JURI::root() .
"administrator/components/com_moojla/assets/css/content.css",
(MoojlaHelper::jVersion()->isCompatible('3.8.0')) ?
array('version' => 'auto') : 'text/css');
		$this->document->addScript(JURI::root() . $this->script,
(MoojlaHelper::jVersion()->isCompatible('3.8.0')) ?
array('version' => 'auto') :
'text/javascript');
		$this->document->addScript(JURI::root() .
"administrator/components/com_moojla/views/content/submitbutton.js",
(MoojlaHelper::jVersion()->isCompatible('3.8.0')) ?
array('version' => 'auto') :
'text/javascript'); 
		JText::script('view not acceptable. Error');
	}
}
contents/index.html000064400000000054151160405150010373
0ustar00<html><body
bgcolor="#FFFFFF"></body></html>contents/tmpl/default.php000064400000005522151160405150011514
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				Lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.77
	@build			6th April, 2022
	@created		22nd July, 2020
	@package		Moojla
	@subpackage		default.php
	@author			Lmskaran <http://Lmskaran.com>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

JHtml::_('behavior.tooltip');
JHtml::_('behavior.multiselect');
JHtml::_('dropdown.init');
JHtml::_('formbehavior.chosen', 'select');
if ($this->saveOrder)
{
	$saveOrderingUrl =
'index.php?option=com_moojla&task=contents.saveOrderAjax&tmpl=component';
	JHtml::_('sortablelist.sortable', 'contentList',
'adminForm', strtolower($this->listDirn), $saveOrderingUrl);
}
?>
<form action="<?php echo
JRoute::_('index.php?option=com_moojla&view=contents');
?>" method="post" name="adminForm"
id="adminForm">
<?php if(!empty( $this->sidebar)): ?>
	<div id="j-sidebar-container" class="span2">
		<?php echo $this->sidebar; ?>
	</div>
	<div id="j-main-container" class="span10">
<?php else : ?>
	<div id="j-main-container">
<?php endif; ?>
<?php
	// Add the searchtools
	echo JLayoutHelper::render('joomla.searchtools.default',
array('view' => $this));
?>
<?php if (empty($this->items)): ?>
	<div class="alert alert-no-items">
		<?php echo JText::_('JGLOBAL_NO_MATCHING_RESULTS'); ?>
	</div>
<?php else : ?>
	<table class="table table-striped"
id="contentList">
		<thead><?php echo
$this->loadTemplate('head');?></thead>
		<tfoot><?php echo
$this->loadTemplate('foot');?></tfoot>
		<tbody><?php echo
$this->loadTemplate('body');?></tbody>
	</table>
	<?php // Load the batch processing form. ?>
	<?php if ($this->canCreate && $this->canEdit) : ?>
		<?php echo JHtml::_(
			'bootstrap.renderModal',
			'collapseModal',
			array(
				'title' =>
JText::_('COM_MOOJLA_CONTENTS_BATCH_OPTIONS'),
				'footer' =>
$this->loadTemplate('batch_footer')
			),
			$this->loadTemplate('batch_body')
		); ?>
	<?php endif; ?>
	<input type="hidden" name="boxchecked"
value="0" />
	</div>
<?php endif; ?>
	<input type="hidden" name="task" value=""
/>
	<?php echo JHtml::_('form.token'); ?>
</form>
contents/tmpl/default_batch_body.php000064400000002333151160405150013667
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				Lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.77
	@build			6th April, 2022
	@created		22nd July, 2020
	@package		Moojla
	@subpackage		default_batch_body.php
	@author			Lmskaran <http://Lmskaran.com>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

?>

<p><?php echo JText::_('COM_MOOJLA_CONTENTS_BATCH_TIP');
?></p>
<?php echo $this->batchDisplay;
?>contents/tmpl/default_batch_footer.php000064400000002731151160405150014232
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				Lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.77
	@build			6th April, 2022
	@created		22nd July, 2020
	@package		Moojla
	@subpackage		default_batch_footer.php
	@author			Lmskaran <http://Lmskaran.com>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

?>
<!-- clear the batch values if cancel -->
<button class="btn" type="button"
onclick="" data-dismiss="modal">
	<?php echo JText::_('JCANCEL'); ?>
</button>
<!-- post the batch values if process -->
<button class="btn btn-success" type="submit"
onclick="Joomla.submitbutton('content.batch');">
	<?php echo JText::_('JGLOBAL_BATCH_PROCESS'); ?>
</button>contents/tmpl/default_body.php000064400000010146151160405150012527
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				Lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.77
	@build			6th April, 2022
	@created		22nd July, 2020
	@package		Moojla
	@subpackage		default_body.php
	@author			Lmskaran <http://Lmskaran.com>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

$edit =
"index.php?option=com_moojla&view=contents&task=content.edit";

?>
<?php foreach ($this->items as $i => $item): ?>
	<?php
		$canCheckin = $this->user->authorise('core.manage',
'com_checkin') || $item->checked_out == $this->user->id
|| $item->checked_out == 0;
		$userChkOut = JFactory::getUser($item->checked_out);
		$canDo =
MoojlaHelper::getActions('content',$item,'contents');
	?>
	<tr class="row<?php echo $i % 2; ?>">
		<td class="order nowrap center hidden-phone">
		<?php if ($canDo->get('core.edit.state')): ?>
			<?php
				$iconClass = '';
				if (!$this->saveOrder)
				{
					$iconClass = ' inactive tip-top" hasTooltip"
title="' . JHtml::tooltipText('JORDERINGDISABLED');
				}
			?>
			<span class="sortable-handler<?php echo $iconClass;
?>">
				<i class="icon-menu"></i>
			</span>
			<?php if ($this->saveOrder) : ?>
				<input type="text" style="display:none"
name="order[]" size="5"
				value="<?php echo $item->ordering; ?>"
class="width-20 text-area-order " />
			<?php endif; ?>
		<?php else: ?>
			&#8942;
		<?php endif; ?>
		</td>
		<td class="nowrap center">
		<?php if ($canDo->get('core.edit')): ?>
				<?php if ($item->checked_out) : ?>
					<?php if ($canCheckin) : ?>
						<?php echo JHtml::_('grid.id', $i, $item->id); ?>
					<?php else: ?>
						&#9633;
					<?php endif; ?>
				<?php else: ?>
					<?php echo JHtml::_('grid.id', $i, $item->id); ?>
				<?php endif; ?>
		<?php else: ?>
			&#9633;
		<?php endif; ?>
		</td>
		<td class="nowrap">
			<div class="name">
				<?php if ($canDo->get('core.edit')): ?>
					<a href="<?php echo $edit; ?>&id=<?php echo
$item->id; ?>"><?php echo
$this->escape($item->contents_module_id); ?></a>
					<?php if ($item->checked_out): ?>
						<?php echo JHtml::_('jgrid.checkedout', $i,
$userChkOut->name, $item->checked_out_time, 'contents.',
$canCheckin); ?>
					<?php endif; ?>
				<?php else: ?>
					<?php echo $this->escape($item->contents_module_id); ?>
				<?php endif; ?>
			</div>
		</td>
		<td class="hidden-phone">
			<?php echo $this->escape($item->type); ?>
		</td>
		<td class="hidden-phone">
			<?php echo $this->escape($item->filename); ?>
		</td>
		<td class="hidden-phone">
			<?php echo $this->escape($item->mimetype); ?>
		</td>
		<td class="hidden-phone">
			<?php echo $this->escape($item->file); ?>
		</td>
		<td class="center">
		<?php if ($canDo->get('core.edit.state')) : ?>
				<?php if ($item->checked_out) : ?>
					<?php if ($canCheckin) : ?>
						<?php echo JHtml::_('jgrid.published',
$item->published, $i, 'contents.', true, 'cb');
?>
					<?php else: ?>
						<?php echo JHtml::_('jgrid.published',
$item->published, $i, 'contents.', false, 'cb');
?>
					<?php endif; ?>
				<?php else: ?>
					<?php echo JHtml::_('jgrid.published',
$item->published, $i, 'contents.', true, 'cb');
?>
				<?php endif; ?>
		<?php else: ?>
			<?php echo JHtml::_('jgrid.published', $item->published,
$i, 'contents.', false, 'cb'); ?>
		<?php endif; ?>
		</td>
		<td class="nowrap center hidden-phone">
			<?php echo $item->id; ?>
		</td>
	</tr>
<?php endforeach;
?>contents/tmpl/default_foot.php000064400000002304151160405150012536
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				Lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.77
	@build			6th April, 2022
	@created		22nd July, 2020
	@package		Moojla
	@subpackage		default_foot.php
	@author			Lmskaran <http://Lmskaran.com>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

?>
<tr>
	<td colspan="9"><?php echo
$this->pagination->getListFooter(); ?></td>
</tr>contents/tmpl/default_head.php000064400000005341151160405150012474
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				Lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.77
	@build			6th April, 2022
	@created		22nd July, 2020
	@package		Moojla
	@subpackage		default_head.php
	@author			Lmskaran <http://Lmskaran.com>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

?>
<tr>
	<?php if ($this->canEdit&& $this->canState): ?>
		<th width="1%" class="nowrap center
hidden-phone">
			<?php echo JHtml::_('searchtools.sort', '',
'a.ordering', $this->listDirn, $this->listOrder, null,
'asc', 'JGRID_HEADING_ORDERING',
'icon-menu-2'); ?>
		</th>
		<th width="20" class="nowrap center">
			<?php echo JHtml::_('grid.checkall'); ?>
		</th>
	<?php else: ?>
		<th width="20" class="nowrap center
hidden-phone">
			&#9662;
		</th>
		<th width="20" class="nowrap center">
			&#9632;
		</th>
	<?php endif; ?>
	<th class="nowrap" >
			<?php echo JHtml::_('searchtools.sort',
'COM_MOOJLA_CONTENT_CONTENTS_MODULE_ID_LABEL',
'a.contents_module_id', $this->listDirn, $this->listOrder);
?>
	</th>
	<th class="nowrap hidden-phone" >
			<?php echo JText::_('COM_MOOJLA_CONTENT_TYPE_LABEL'); ?>
	</th>
	<th class="nowrap hidden-phone" >
			<?php echo JText::_('COM_MOOJLA_CONTENT_FILENAME_LABEL');
?>
	</th>
	<th class="nowrap hidden-phone" >
			<?php echo JText::_('COM_MOOJLA_CONTENT_MIMETYPE_LABEL');
?>
	</th>
	<th class="nowrap hidden-phone" >
			<?php echo JText::_('COM_MOOJLA_CONTENT_FILE_LABEL'); ?>
	</th>
	<?php if ($this->canState): ?>
		<th width="10" class="nowrap center" >
			<?php echo JHtml::_('searchtools.sort',
'COM_MOOJLA_CONTENT_STATUS', 'a.published',
$this->listDirn, $this->listOrder); ?>
		</th>
	<?php else: ?>
		<th width="10" class="nowrap center" >
			<?php echo JText::_('COM_MOOJLA_CONTENT_STATUS'); ?>
		</th>
	<?php endif; ?>
	<th width="5" class="nowrap center hidden-phone"
>
			<?php echo JHtml::_('searchtools.sort',
'COM_MOOJLA_CONTENT_ID', 'a.id', $this->listDirn,
$this->listOrder); ?>
	</th>
</tr>contents/tmpl/default_toolbar.php000064400000007053151160405150013237
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				Lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.77
	@build			6th April, 2022
	@created		22nd July, 2020
	@package		Moojla
	@subpackage		default_toolbar.php
	@author			Lmskaran <http://Lmskaran.com>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

?>
<div id="filter-bar" class="btn-toolbar">
        <div class="filter-search btn-group pull-left">
            <label for="filter_search"
class="element-invisible"><?php echo
JText::_('Search');?></label>
            <input type="text" name="filter_search"
id="filter_search" placeholder="<?php echo
JText::_('JSEARCH_FILTER'); ?>" value="<?php echo
$this->escape($this->state->get('filter.search'));
?>" class="hasTooltip" title="<?php echo
JHtml::tooltipText('Search Contents'); ?>" />
        </div>
        <div class="btn-group pull-left">
            <button type="submit" class="btn
hasTooltip" title="<?php echo
JHtml::tooltipText('JSEARCH_FILTER_SUBMIT'); ?>"><i
class="icon-search"></i></button>
            <button type="button" class="btn
hasTooltip" title="<?php echo
JHtml::tooltipText('JSEARCH_FILTER_CLEAR'); ?>"
onclick="document.id('filter_search').value='';this.form.submit();"><i
class="icon-remove"></i></button>
        </div>
        <div class="btn-group pull-right hidden-phone">
            <label for="limit"
class="element-invisible"><?php echo
JText::_('JFIELD_PLG_SEARCH_SEARCHLIMIT_DESC');?></label>
            <?php echo $this->pagination->getLimitBox(); ?>
        </div>
        <div class="btn-group pull-right hidden-phone">
            <label for="directionTable"
class="element-invisible"><?php echo
JText::_('JFIELD_ORDERING_DESC');?></label>
            <select name="directionTable"
id="directionTable" class="input-medium"
onchange="Joomla.orderTable()">
                <option value=""><?php echo
JText::_('JFIELD_ORDERING_DESC');?></option>
                <option value="asc" <?php if
($this->listDirn == 'asc') echo
'selected="selected"'; ?>><?php echo
JText::_('JGLOBAL_ORDER_ASCENDING');?></option>
                <option value="desc" <?php if
($this->listDirn == 'desc') echo
'selected="selected"'; ?>><?php echo
JText::_('JGLOBAL_ORDER_DESCENDING');?></option>
            </select>
        </div>
        <div class="btn-group pull-right">
            <label for="sortTable"
class="element-invisible"><?php echo
JText::_('JGLOBAL_SORT_BY');?></label>
            <select name="sortTable" id="sortTable"
class="input-medium" onchange="Joomla.orderTable()">
                <option value=""><?php echo
JText::_('JGLOBAL_SORT_BY');?></option>
                <?php echo JHtml::_('select.options',
$this->getSortFields(), 'value', 'text',
$this->listOrder);?>
            </select>
        </div>
    </div>
<div class="clearfix">
</div>contents/tmpl/index.html000064400000000054151160405150011347
0ustar00<html><body
bgcolor="#FFFFFF"></body></html>contents/view.html.php000064400000020462151160405150011031
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				Lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.77
	@build			6th April, 2022
	@created		22nd July, 2020
	@package		Moojla
	@subpackage		view.html.php
	@author			Lmskaran <http://Lmskaran.com>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

/**
 * Moojla View class for the Contents
 */
class MoojlaViewContents extends JViewLegacy
{
	/**
	 * Contents view display method
	 * @return void
	 */
	function display($tpl = null)
	{
		if ($this->getLayout() !== 'modal')
		{
			// Include helper submenu
			MoojlaHelper::addSubmenu('contents');
		}

		// Assign data to the view
		$this->items = $this->get('Items');
		$this->pagination = $this->get('Pagination');
		$this->state = $this->get('State');
		$this->user = JFactory::getUser();
		// Load the filter form from xml.
		$this->filterForm = $this->get('FilterForm');
		// Load the active filters.
		$this->activeFilters = $this->get('ActiveFilters');
		// Add the list ordering clause.
		$this->listOrder =
$this->escape($this->state->get('list.ordering',
'a.id'));
		$this->listDirn =
$this->escape($this->state->get('list.direction',
'DESC'));
		$this->saveOrder = $this->listOrder == 'a.ordering';
		// set the return here value
		$this->return_here = urlencode(base64_encode((string)
JUri::getInstance()));
		// get global action permissions
		$this->canDo = MoojlaHelper::getActions('content');
		$this->canEdit = $this->canDo->get('core.edit');
		$this->canState =
$this->canDo->get('core.edit.state');
		$this->canCreate = $this->canDo->get('core.create');
		$this->canDelete = $this->canDo->get('core.delete');
		$this->canBatch = $this->canDo->get('core.batch');

		// We don't need toolbar in the modal window.
		if ($this->getLayout() !== 'modal')
		{
			$this->addToolbar();
			$this->sidebar = JHtmlSidebar::render();
			// load the batch html
			if ($this->canCreate && $this->canEdit &&
$this->canState)
			{
				$this->batchDisplay = JHtmlBatch_::render();
			}
		}
		
		// Check for errors.
		if (count($errors = $this->get('Errors')))
		{
			throw new Exception(implode("\n", $errors), 500);
		}

		// Display the template
		parent::display($tpl);

		// Set the document
		$this->setDocument();
	}

	/**
	 * Setting the toolbar
	 */
	protected function addToolBar()
	{
		JToolBarHelper::title(JText::_('COM_MOOJLA_CONTENTS'),
'bubble-quote');
		JHtmlSidebar::setAction('index.php?option=com_moojla&view=contents');
		JFormHelper::addFieldPath(JPATH_COMPONENT . '/models/fields');

		if ($this->canCreate)
		{
			JToolBarHelper::addNew('content.add');
		}

		// Only load if there are items
		if (MoojlaHelper::checkArray($this->items))
		{
			if ($this->canEdit)
			{
				JToolBarHelper::editList('content.edit');
			}

			if ($this->canState)
			{
				JToolBarHelper::publishList('contents.publish');
				JToolBarHelper::unpublishList('contents.unpublish');
				JToolBarHelper::archiveList('contents.archive');

				if ($this->canDo->get('core.admin'))
				{
					JToolBarHelper::checkin('contents.checkin');
				}
			}

			// Add a batch button
			if ($this->canBatch && $this->canCreate &&
$this->canEdit && $this->canState)
			{
				// Get the toolbar object instance
				$bar = JToolBar::getInstance('toolbar');
				// set the batch button name
				$title = JText::_('JTOOLBAR_BATCH');
				// Instantiate a new JLayoutFile instance and render the batch button
				$layout = new JLayoutFile('joomla.toolbar.batch');
				// add the button to the page
				$dhtml = $layout->render(array('title' => $title));
				$bar->appendButton('Custom', $dhtml, 'batch');
			}

			if ($this->state->get('filter.published') == -2
&& ($this->canState && $this->canDelete))
			{
				JToolbarHelper::deleteList('', 'contents.delete',
'JTOOLBAR_EMPTY_TRASH');
			}
			elseif ($this->canState && $this->canDelete)
			{
				JToolbarHelper::trash('contents.trash');
			}
		}

		// set help url for this view if found
		$help_url = MoojlaHelper::getHelpUrl('contents');
		if (MoojlaHelper::checkString($help_url))
		{
				JToolbarHelper::help('COM_MOOJLA_HELP_MANAGER', false,
$help_url);
		}

		// add the options comp button
		if ($this->canDo->get('core.admin') ||
$this->canDo->get('core.options'))
		{
			JToolBarHelper::preferences('com_moojla');
		}

		// Only load published batch if state and batch is allowed
		if ($this->canState && $this->canBatch)
		{
			JHtmlBatch_::addListSelection(
				JText::_('COM_MOOJLA_KEEP_ORIGINAL_STATE'),
				'batch[published]',
				JHtml::_('select.options',
JHtml::_('jgrid.publishedOptions', array('all' =>
false)), 'value', 'text', '', true)
			);
		}

		// Only load Contents Module Id batch if create, edit, and batch is
allowed
		if ($this->canBatch && $this->canCreate &&
$this->canEdit)
		{
			// Set Contents Module Id Selection
			$this->contents_module_idOptions =
JFormHelper::loadFieldType('contentsfiltercontentsmoduleid')->options;
			// We do some sanitation for Contents Module Id filter
			if (MoojlaHelper::checkArray($this->contents_module_idOptions)
&&
				isset($this->contents_module_idOptions[0]->value) &&
				!MoojlaHelper::checkString($this->contents_module_idOptions[0]->value))
			{
				unset($this->contents_module_idOptions[0]);
			}
			// Contents Module Id Batch Selection
			JHtmlBatch_::addListSelection(
				'- Keep Original
'.JText::_('COM_MOOJLA_CONTENT_CONTENTS_MODULE_ID_LABEL').'
-',
				'batch[contents_module_id]',
				JHtml::_('select.options',
$this->contents_module_idOptions, 'value', 'text')
			);
		}

		// Only load Mimetype batch if create, edit, and batch is allowed
		if ($this->canBatch && $this->canCreate &&
$this->canEdit)
		{
			// Set Mimetype Selection
			$this->mimetypeOptions =
JFormHelper::loadFieldType('contentsfiltermimetype')->options;
			// We do some sanitation for Mimetype filter
			if (MoojlaHelper::checkArray($this->mimetypeOptions) &&
				isset($this->mimetypeOptions[0]->value) &&
				!MoojlaHelper::checkString($this->mimetypeOptions[0]->value))
			{
				unset($this->mimetypeOptions[0]);
			}
			// Mimetype Batch Selection
			JHtmlBatch_::addListSelection(
				'- Keep Original
'.JText::_('COM_MOOJLA_CONTENT_MIMETYPE_LABEL').'
-',
				'batch[mimetype]',
				JHtml::_('select.options', $this->mimetypeOptions,
'value', 'text')
			);
		}
	}

	/**
	 * Method to set up the document properties
	 *
	 * @return void
	 */
	protected function setDocument()
	{
		if (!isset($this->document))
		{
			$this->document = JFactory::getDocument();
		}
		$this->document->setTitle(JText::_('COM_MOOJLA_CONTENTS'));
		$this->document->addStyleSheet(JURI::root() .
"administrator/components/com_moojla/assets/css/contents.css",
(MoojlaHelper::jVersion()->isCompatible('3.8.0')) ?
array('version' => 'auto') : 'text/css');
	}

	/**
	 * Escapes a value for output in a view script.
	 *
	 * @param   mixed  $var  The output to escape.
	 *
	 * @return  mixed  The escaped value.
	 */
	public function escape($var)
	{
		if(strlen($var) > 50)
		{
			// use the helper htmlEscape method instead and shorten the string
			return MoojlaHelper::htmlEscape($var, $this->_charset, true);
		}
		// use the helper htmlEscape method instead.
		return MoojlaHelper::htmlEscape($var, $this->_charset);
	}

	/**
	 * Returns an array of fields the table can be sorted by
	 *
	 * @return  array  Array containing the field name to sort by as the key
and display text as value
	 */
	protected function getSortFields()
	{
		return array(
			'a.ordering' =>
JText::_('JGRID_HEADING_ORDERING'),
			'a.published' => JText::_('JSTATUS'),
			'a.contents_module_id' =>
JText::_('COM_MOOJLA_CONTENT_CONTENTS_MODULE_ID_LABEL'),
			'a.id' => JText::_('JGRID_HEADING_ID')
		);
	}
}
course/submitbutton.js000064400000002743151160405150011145
0ustar00/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				Lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.77
	@build			6th April, 2022
	@created		22nd July, 2020
	@package		Moojla
	@subpackage		submitbutton.js
	@author			Lmskaran <http://Lmskaran.com>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

Joomla.submitbutton = function(task)
{
	if (task == ''){
		return false;
	} else { 
		var action = task.split('.');
		if (action[1] == 'cancel' || action[1] == 'close' ||
document.formvalidator.isValid(document.getElementById("adminForm"))){
			Joomla.submitform(task, document.getElementById("adminForm"));
			return true;
		} else {
			alert(Joomla.JText._('course, some values are not
acceptable.','Some values are unacceptable'));
			return false;
		}
	}
}course/tmpl/edit.php000064400000014357151160405150010466 0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				Lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.77
	@build			6th April, 2022
	@created		22nd July, 2020
	@package		Moojla
	@subpackage		edit.php
	@author			Lmskaran <http://Lmskaran.com>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html');
JHtml::_('behavior.tooltip');
JHtml::_('behavior.formvalidation');
JHtml::_('formbehavior.chosen', 'select');
JHtml::_('behavior.keepalive');
$componentParams = $this->params; // will be removed just use
$this->params instead
?>
<script type="text/javascript">
	// waiting spinner
	var outerDiv = jQuery('body');
	jQuery('<div id="loading"></div>')
		.css("background", "rgba(255, 255, 255, .8)
url('components/com_moojla/assets/images/import.gif') 50% 15%
no-repeat")
		.css("top", outerDiv.position().top -
jQuery(window).scrollTop())
		.css("left", outerDiv.position().left -
jQuery(window).scrollLeft())
		.css("width", outerDiv.width())
		.css("height", outerDiv.height())
		.css("position", "fixed")
		.css("opacity", "0.80")
		.css("-ms-filter",
"progid:DXImageTransform.Microsoft.Alpha(Opacity = 80)")
		.css("filter", "alpha(opacity = 80)")
		.css("display", "none")
		.appendTo(outerDiv);
	jQuery('#loading').show();
	// when page is ready remove and show
	jQuery(window).load(function() {
		jQuery('#moojla_loader').fadeIn('fast');
		jQuery('#loading').hide();
	});
</script>
<div id="moojla_loader" style="display: none;">
<form action="<?php echo
JRoute::_('index.php?option=com_moojla&layout=edit&id='.
(int) $this->item->id . $this->referral); ?>"
method="post" name="adminForm" id="adminForm"
class="form-validate" enctype="multipart/form-data">

	<?php echo JLayoutHelper::render('course.details_above',
$this); ?>
<div class="form-horizontal">

	<?php echo JHtml::_('bootstrap.startTabSet',
'courseTab', array('active' =>
'details')); ?>

	<?php echo JHtml::_('bootstrap.addTab',
'courseTab', 'details',
JText::_('COM_MOOJLA_COURSE_DETAILS', true)); ?>
		<div class="row-fluid form-horizontal-desktop">
			<div class="span6">
				<?php echo JLayoutHelper::render('course.details_left',
$this); ?>
			</div>
			<div class="span6">
				<?php echo JLayoutHelper::render('course.details_right',
$this); ?>
			</div>
		</div>
	<?php echo JHtml::_('bootstrap.endTab'); ?>

	<?php echo JHtml::_('bootstrap.addTab',
'courseTab', 'templates',
JText::_('COM_MOOJLA_COURSE_TEMPLATES', true)); ?>
		<div class="row-fluid form-horizontal-desktop">
			<div class="span6">
				<?php echo JLayoutHelper::render('course.templates_left',
$this); ?>
			</div>
			<div class="span6">
				<?php echo JLayoutHelper::render('course.templates_right',
$this); ?>
			</div>
		</div>
	<?php echo JHtml::_('bootstrap.endTab'); ?>

	<?php echo JHtml::_('bootstrap.addTab',
'courseTab', 'moodle_access',
JText::_('COM_MOOJLA_COURSE_MOODLE_ACCESS', true)); ?>
		<div class="row-fluid form-horizontal-desktop">
			<div class="span6">
				<?php echo
JLayoutHelper::render('course.moodle_access_left', $this); ?>
			</div>
			<div class="span6">
				<?php echo
JLayoutHelper::render('course.moodle_access_right', $this); ?>
			</div>
		</div>
	<?php echo JHtml::_('bootstrap.endTab'); ?>

	<?php echo JHtml::_('bootstrap.addTab',
'courseTab', 'video',
JText::_('COM_MOOJLA_COURSE_VIDEO', true)); ?>
		<div class="row-fluid form-horizontal-desktop">
			<div class="span12">
				<?php echo JLayoutHelper::render('course.video_left',
$this); ?>
			</div>
		</div>
	<?php echo JHtml::_('bootstrap.endTab'); ?>

	<?php echo JHtml::_('bootstrap.addTab',
'courseTab', 'audio',
JText::_('COM_MOOJLA_COURSE_AUDIO', true)); ?>
		<div class="row-fluid form-horizontal-desktop">
			<div class="span12">
				<?php echo JLayoutHelper::render('course.audio_left',
$this); ?>
			</div>
		</div>
	<?php echo JHtml::_('bootstrap.endTab'); ?>

	<?php $this->ignore_fieldsets =
array('details','metadata','vdmmetadata','accesscontrol');
?>
	<?php $this->tab_name = 'courseTab'; ?>
	<?php echo JLayoutHelper::render('joomla.edit.params',
$this); ?>

	<?php if ($this->canDo->get('core.edit.created_by') ||
$this->canDo->get('core.edit.created') ||
$this->canDo->get('core.edit.state') ||
($this->canDo->get('course.delete') &&
$this->canDo->get('core.edit.state'))) : ?>
	<?php echo JHtml::_('bootstrap.addTab',
'courseTab', 'publishing',
JText::_('COM_MOOJLA_COURSE_PUBLISHING', true)); ?>
		<div class="row-fluid form-horizontal-desktop">
			<div class="span6">
				<?php echo JLayoutHelper::render('course.publishing',
$this); ?>
			</div>
			<div class="span6">
				<?php echo JLayoutHelper::render('course.metadata',
$this); ?>
			</div>
		</div>
	<?php echo JHtml::_('bootstrap.endTab'); ?>
	<?php endif; ?>

	<?php if ($this->canDo->get('core.admin')) : ?>
	<?php echo JHtml::_('bootstrap.addTab',
'courseTab', 'permissions',
JText::_('COM_MOOJLA_COURSE_PERMISSION', true)); ?>
		<div class="row-fluid form-horizontal-desktop">
			<div class="span12">
				<fieldset class="adminform">
					<div class="adminformlist">
					<?php foreach
($this->form->getFieldset('accesscontrol') as $field):
?>
						<div>
							<?php echo $field->label; echo $field->input;?>
						</div>
						<div class="clearfix"></div>
					<?php endforeach; ?>
					</div>
				</fieldset>
			</div>
		</div>
	<?php echo JHtml::_('bootstrap.endTab'); ?>
	<?php endif; ?>

	<?php echo JHtml::_('bootstrap.endTabSet'); ?>

	<div>
		<input type="hidden" name="task"
value="course.edit" />
		<?php echo JHtml::_('form.token'); ?>
	</div>
</div>
</form>
</div>
course/tmpl/index.html000064400000000054151160405160011013
0ustar00<html><body
bgcolor="#FFFFFF"></body></html>course/view.html.php000064400000015354151160405160010501
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				Lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.77
	@build			6th April, 2022
	@created		22nd July, 2020
	@package		Moojla
	@subpackage		view.html.php
	@author			Lmskaran <http://Lmskaran.com>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

/**
 * Course View class
 */
class MoojlaViewCourse extends JViewLegacy
{
	/**
	 * display method of View
	 * @return void
	 */
	public function display($tpl = null)
	{
		// set params
		$this->params = JComponentHelper::getParams('com_moojla');
		// Assign the variables
		$this->form = $this->get('Form');
		$this->item = $this->get('Item');
		$this->script = $this->get('Script');
		$this->state = $this->get('State');
		// get action permissions
		$this->canDo = MoojlaHelper::getActions('course',
$this->item);
		// get input
		$jinput = JFactory::getApplication()->input;
		$this->ref = $jinput->get('ref', 0, 'word');
		$this->refid = $jinput->get('refid', 0, 'int');
		$return = $jinput->get('return', null, 'base64');
		// set the referral string
		$this->referral = '';
		if ($this->refid && $this->ref)
		{
			// return to the item that referred to this item
			$this->referral = '&ref=' . (string)$this->ref .
'&refid=' . (int)$this->refid;
		}
		elseif($this->ref)
		{
			// return to the list view that referred to this item
			$this->referral = '&ref=' . (string)$this->ref;
		}
		// check return value
		if (!is_null($return))
		{
			// add the return value
			$this->referral .= '&return=' . (string)$return;
		}

		// Set the toolbar
		$this->addToolBar();
		
		// Check for errors.
		if (count($errors = $this->get('Errors')))
		{
			throw new Exception(implode("\n", $errors), 500);
		}

		// Display the template
		parent::display($tpl);

		// Set the document
		$this->setDocument();
	}


	/**
	 * Setting the toolbar
	 */
	protected function addToolBar()
	{
		JFactory::getApplication()->input->set('hidemainmenu',
true);
		$user = JFactory::getUser();
		$userId	= $user->id;
		$isNew = $this->item->id == 0;

		JToolbarHelper::title( JText::_($isNew ?
'COM_MOOJLA_COURSE_NEW' : 'COM_MOOJLA_COURSE_EDIT'),
'pencil-2 article-add');
		// Built the actions for new and existing records.
		if (MoojlaHelper::checkString($this->referral))
		{
			if ($this->canDo->get('course.create') &&
$isNew)
			{
				// We can create the record.
				JToolBarHelper::save('course.save',
'JTOOLBAR_SAVE');
			}
			elseif ($this->canDo->get('course.edit'))
			{
				// We can save the record.
				JToolBarHelper::save('course.save',
'JTOOLBAR_SAVE');
			}
			if ($isNew)
			{
				// Do not creat but cancel.
				JToolBarHelper::cancel('course.cancel',
'JTOOLBAR_CANCEL');
			}
			else
			{
				// We can close it.
				JToolBarHelper::cancel('course.cancel',
'JTOOLBAR_CLOSE');
			}
		}
		else
		{
			if ($isNew)
			{
				// For new records, check the create permission.
				if ($this->canDo->get('course.create'))
				{
					JToolBarHelper::apply('course.apply',
'JTOOLBAR_APPLY');
					JToolBarHelper::save('course.save',
'JTOOLBAR_SAVE');
					JToolBarHelper::custom('course.save2new',
'save-new.png', 'save-new_f2.png',
'JTOOLBAR_SAVE_AND_NEW', false);
				};
				JToolBarHelper::cancel('course.cancel',
'JTOOLBAR_CANCEL');
			}
			else
			{
				if ($this->canDo->get('course.edit'))
				{
					// We can save the new record
					JToolBarHelper::apply('course.apply',
'JTOOLBAR_APPLY');
					JToolBarHelper::save('course.save',
'JTOOLBAR_SAVE');
					// We can save this record, but check the create permission to see
					// if we can return to make a new one.
					if ($this->canDo->get('course.create'))
					{
						JToolBarHelper::custom('course.save2new',
'save-new.png', 'save-new_f2.png',
'JTOOLBAR_SAVE_AND_NEW', false);
					}
				}
				$canVersion = ($this->canDo->get('core.version')
&& $this->canDo->get('course.version'));
				if ($this->state->params->get('save_history', 1)
&& $this->canDo->get('course.edit') &&
$canVersion)
				{
					JToolbarHelper::versions('com_moojla.course',
$this->item->id);
				}
				if ($this->canDo->get('course.create'))
				{
					JToolBarHelper::custom('course.save2copy',
'save-copy.png', 'save-copy_f2.png',
'JTOOLBAR_SAVE_AS_COPY', false);
				}
				JToolBarHelper::cancel('course.cancel',
'JTOOLBAR_CLOSE');
			}
		}
		JToolbarHelper::divider();
		// set help url for this view if found
		$help_url = MoojlaHelper::getHelpUrl('course');
		if (MoojlaHelper::checkString($help_url))
		{
			JToolbarHelper::help('COM_MOOJLA_HELP_MANAGER', false,
$help_url);
		}
	}

	/**
	 * Escapes a value for output in a view script.
	 *
	 * @param   mixed  $var  The output to escape.
	 *
	 * @return  mixed  The escaped value.
	 */
	public function escape($var)
	{
		if(strlen($var) > 30)
		{
    		// use the helper htmlEscape method instead and shorten the string
			return MoojlaHelper::htmlEscape($var, $this->_charset, true, 30);
		}
		// use the helper htmlEscape method instead.
		return MoojlaHelper::htmlEscape($var, $this->_charset);
	}

	/**
	 * Method to set up the document properties
	 *
	 * @return void
	 */
	protected function setDocument()
	{
		$isNew = ($this->item->id < 1);
		if (!isset($this->document))
		{
			$this->document = JFactory::getDocument();
		}
		$this->document->setTitle(JText::_($isNew ?
'COM_MOOJLA_COURSE_NEW' : 'COM_MOOJLA_COURSE_EDIT'));
		$this->document->addStyleSheet(JURI::root() .
"administrator/components/com_moojla/assets/css/course.css",
(MoojlaHelper::jVersion()->isCompatible('3.8.0')) ?
array('version' => 'auto') : 'text/css');
		// Add Ajax Token
		$this->document->addScriptDeclaration("var token =
'".JSession::getFormToken()."';");
		$this->document->addScript(JURI::root() . $this->script,
(MoojlaHelper::jVersion()->isCompatible('3.8.0')) ?
array('version' => 'auto') :
'text/javascript');
		$this->document->addScript(JURI::root() .
"administrator/components/com_moojla/views/course/submitbutton.js",
(MoojlaHelper::jVersion()->isCompatible('3.8.0')) ?
array('version' => 'auto') :
'text/javascript'); 
		JText::script('view not acceptable. Error');
	}
}
courses/index.html000064400000000054151160405160010222
0ustar00<html><body
bgcolor="#FFFFFF"></body></html>courses/tmpl/default.php000064400000005770151160405160011350
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				Lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.77
	@build			6th April, 2022
	@created		22nd July, 2020
	@package		Moojla
	@subpackage		default.php
	@author			Lmskaran <http://Lmskaran.com>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

JHtml::_('behavior.tooltip');
JHtml::_('behavior.multiselect');
JHtml::_('dropdown.init');
JHtml::_('formbehavior.chosen', '.multipleCategories',
null, array('placeholder_text_multiple' => '- ' .
JText::_('COM_MOOJLA_FILTER_SELECT_COURSES_CATEGORIES') . '
-'));
JHtml::_('formbehavior.chosen', 'select');
if ($this->saveOrder)
{
	$saveOrderingUrl =
'index.php?option=com_moojla&task=courses.saveOrderAjax&tmpl=component';
	JHtml::_('sortablelist.sortable', 'courseList',
'adminForm', strtolower($this->listDirn), $saveOrderingUrl);
}
?>
<form action="<?php echo
JRoute::_('index.php?option=com_moojla&view=courses');
?>" method="post" name="adminForm"
id="adminForm">
<?php if(!empty( $this->sidebar)): ?>
	<div id="j-sidebar-container" class="span2">
		<?php echo $this->sidebar; ?>
	</div>
	<div id="j-main-container" class="span10">
<?php else : ?>
	<div id="j-main-container">
<?php endif; ?>
<?php
	// Add the searchtools
	echo JLayoutHelper::render('joomla.searchtools.default',
array('view' => $this));
?>
<?php if (empty($this->items)): ?>
	<div class="alert alert-no-items">
		<?php echo JText::_('JGLOBAL_NO_MATCHING_RESULTS'); ?>
	</div>
<?php else : ?>
	<table class="table table-striped"
id="courseList">
		<thead><?php echo
$this->loadTemplate('head');?></thead>
		<tfoot><?php echo
$this->loadTemplate('foot');?></tfoot>
		<tbody><?php echo
$this->loadTemplate('body');?></tbody>
	</table>
	<?php // Load the batch processing form. ?>
	<?php if ($this->canCreate && $this->canEdit) : ?>
		<?php echo JHtml::_(
			'bootstrap.renderModal',
			'collapseModal',
			array(
				'title' =>
JText::_('COM_MOOJLA_COURSES_BATCH_OPTIONS'),
				'footer' =>
$this->loadTemplate('batch_footer')
			),
			$this->loadTemplate('batch_body')
		); ?>
	<?php endif; ?>
	<input type="hidden" name="boxchecked"
value="0" />
	</div>
<?php endif; ?>
	<input type="hidden" name="task" value=""
/>
	<?php echo JHtml::_('form.token'); ?>
</form>
courses/tmpl/default_batch_body.php000064400000002332151160405160013515
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				Lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.77
	@build			6th April, 2022
	@created		22nd July, 2020
	@package		Moojla
	@subpackage		default_batch_body.php
	@author			Lmskaran <http://Lmskaran.com>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

?>

<p><?php echo JText::_('COM_MOOJLA_COURSES_BATCH_TIP');
?></p>
<?php echo $this->batchDisplay;
?>courses/tmpl/default_batch_footer.php000064400000002730151160405160014060
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				Lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.77
	@build			6th April, 2022
	@created		22nd July, 2020
	@package		Moojla
	@subpackage		default_batch_footer.php
	@author			Lmskaran <http://Lmskaran.com>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

?>
<!-- clear the batch values if cancel -->
<button class="btn" type="button"
onclick="" data-dismiss="modal">
	<?php echo JText::_('JCANCEL'); ?>
</button>
<!-- post the batch values if process -->
<button class="btn btn-success" type="submit"
onclick="Joomla.submitbutton('course.batch');">
	<?php echo JText::_('JGLOBAL_BATCH_PROCESS'); ?>
</button>courses/tmpl/default_body.php000064400000010152151160405160012353
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				Lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.77
	@build			6th April, 2022
	@created		22nd July, 2020
	@package		Moojla
	@subpackage		default_body.php
	@author			Lmskaran <http://Lmskaran.com>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

$edit =
"index.php?option=com_moojla&view=courses&task=course.edit";

?>
<?php foreach ($this->items as $i => $item): ?>
	<?php
		$canCheckin = $this->user->authorise('core.manage',
'com_checkin') || $item->checked_out == $this->user->id
|| $item->checked_out == 0;
		$userChkOut = JFactory::getUser($item->checked_out);
		$canDo =
MoojlaHelper::getActions('course',$item,'courses');
	?>
	<tr class="row<?php echo $i % 2; ?>">
		<td class="order nowrap center hidden-phone">
		<?php if ($canDo->get('core.edit.state')): ?>
			<?php
				$iconClass = '';
				if (!$this->saveOrder)
				{
					$iconClass = ' inactive tip-top" hasTooltip"
title="' . JHtml::tooltipText('JORDERINGDISABLED');
				}
			?>
			<span class="sortable-handler<?php echo $iconClass;
?>">
				<i class="icon-menu"></i>
			</span>
			<?php if ($this->saveOrder) : ?>
				<input type="text" style="display:none"
name="order[]" size="5"
				value="<?php echo $item->ordering; ?>"
class="width-20 text-area-order " />
			<?php endif; ?>
		<?php else: ?>
			&#8942;
		<?php endif; ?>
		</td>
		<td class="nowrap center">
		<?php if ($canDo->get('course.edit')): ?>
				<?php if ($item->checked_out) : ?>
					<?php if ($canCheckin) : ?>
						<?php echo JHtml::_('grid.id', $i, $item->id); ?>
					<?php else: ?>
						&#9633;
					<?php endif; ?>
				<?php else: ?>
					<?php echo JHtml::_('grid.id', $i, $item->id); ?>
				<?php endif; ?>
		<?php else: ?>
			&#9633;
		<?php endif; ?>
		</td>
		<td class="nowrap">
			<div>
			<?php if ($canDo->get('course.edit')): ?>
				<a href="<?php echo $edit; ?>&id=<?php echo
$item->id; ?>"><?php echo
$this->escape($item->shortname); ?></a>
				<?php if ($item->checked_out): ?>
					<?php echo JHtml::_('jgrid.checkedout', $i,
$userChkOut->name, $item->checked_out_time, 'courses.',
$canCheckin); ?>
				<?php endif; ?>
			<?php else: ?>
				<?php echo $this->escape($item->shortname); ?>
			<?php endif; ?><br />moodle price: 
			<?php echo $this->escape($item->cost); ?><br />moodle
course id: 
			<?php echo $this->escape($item->remoteid); ?>

<!--  [1040]=> shortname; [1035]=> cost; [1042]=> remoteid
-->
			</div>
		</td>
		<td class="hidden-phone">
			<?php echo $this->escape($item->fullname); ?>
		</td>
		<td class="hidden-phone">
			<?php echo $this->escape($item->category_title); ?>
		</td>
		<td class="center">
		<?php if ($canDo->get('core.edit.state')) : ?>
				<?php if ($item->checked_out) : ?>
					<?php if ($canCheckin) : ?>
						<?php echo JHtml::_('jgrid.published',
$item->published, $i, 'courses.', true, 'cb'); ?>
					<?php else: ?>
						<?php echo JHtml::_('jgrid.published',
$item->published, $i, 'courses.', false, 'cb');
?>
					<?php endif; ?>
				<?php else: ?>
					<?php echo JHtml::_('jgrid.published',
$item->published, $i, 'courses.', true, 'cb'); ?>
				<?php endif; ?>
		<?php else: ?>
			<?php echo JHtml::_('jgrid.published', $item->published,
$i, 'courses.', false, 'cb'); ?>
		<?php endif; ?>
		</td>
		<td class="nowrap center hidden-phone">
			<?php echo $item->id; ?>
		</td>
	</tr>
<?php endforeach;
?>courses/tmpl/default_foot.php000064400000002304151160405160012365
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				Lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.77
	@build			6th April, 2022
	@created		22nd July, 2020
	@package		Moojla
	@subpackage		default_foot.php
	@author			Lmskaran <http://Lmskaran.com>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

?>
<tr>
	<td colspan="7"><?php echo
$this->pagination->getListFooter(); ?></td>
</tr>courses/tmpl/default_head.php000064400000005217151160405160012325
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				Lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.77
	@build			6th April, 2022
	@created		22nd July, 2020
	@package		Moojla
	@subpackage		default_head.php
	@author			Lmskaran <http://Lmskaran.com>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

?>
<tr>
	<?php if ($this->canEdit&& $this->canState): ?>
		<th width="1%" class="nowrap center
hidden-phone">
			<?php echo JHtml::_('searchtools.sort', '',
'a.ordering', $this->listDirn, $this->listOrder, null,
'asc', 'JGRID_HEADING_ORDERING',
'icon-menu-2'); ?>
		</th>
		<th width="20" class="nowrap center">
			<?php echo JHtml::_('grid.checkall'); ?>
		</th>
	<?php else: ?>
		<th width="20" class="nowrap center
hidden-phone">
			&#9662;
		</th>
		<th width="20" class="nowrap center">
			&#9632;
		</th>
	<?php endif; ?>
	<th class="nowrap" >
			<?php echo JHtml::_('searchtools.sort',
'COM_MOOJLA_COURSE_SHORTNAME_LABEL', 'a.shortname',
$this->listDirn, $this->listOrder); ?>
	</th>
	<th class="nowrap hidden-phone" >
			<?php echo JHtml::_('searchtools.sort',
'COM_MOOJLA_COURSE_FULLNAME_LABEL', 'a.fullname',
$this->listDirn, $this->listOrder); ?>
	</th>
	<th class="nowrap hidden-phone" >
			<?php echo JHtml::_('searchtools.sort',
'COM_MOOJLA_COURSE_COURSES_CATEGORIES',
'category_title', $this->listDirn, $this->listOrder); ?>
	</th>
	<?php if ($this->canState): ?>
		<th width="10" class="nowrap center" >
			<?php echo JHtml::_('searchtools.sort',
'COM_MOOJLA_COURSE_STATUS', 'a.published',
$this->listDirn, $this->listOrder); ?>
		</th>
	<?php else: ?>
		<th width="10" class="nowrap center" >
			<?php echo JText::_('COM_MOOJLA_COURSE_STATUS'); ?>
		</th>
	<?php endif; ?>
	<th width="5" class="nowrap center hidden-phone"
>
			<?php echo JHtml::_('searchtools.sort',
'COM_MOOJLA_COURSE_ID', 'a.id', $this->listDirn,
$this->listOrder); ?>
	</th>
</tr>courses/tmpl/default_toolbar.php000064400000007052151160405160013065
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				Lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.77
	@build			6th April, 2022
	@created		22nd July, 2020
	@package		Moojla
	@subpackage		default_toolbar.php
	@author			Lmskaran <http://Lmskaran.com>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

?>
<div id="filter-bar" class="btn-toolbar">
        <div class="filter-search btn-group pull-left">
            <label for="filter_search"
class="element-invisible"><?php echo
JText::_('Search');?></label>
            <input type="text" name="filter_search"
id="filter_search" placeholder="<?php echo
JText::_('JSEARCH_FILTER'); ?>" value="<?php echo
$this->escape($this->state->get('filter.search'));
?>" class="hasTooltip" title="<?php echo
JHtml::tooltipText('Search Courses'); ?>" />
        </div>
        <div class="btn-group pull-left">
            <button type="submit" class="btn
hasTooltip" title="<?php echo
JHtml::tooltipText('JSEARCH_FILTER_SUBMIT'); ?>"><i
class="icon-search"></i></button>
            <button type="button" class="btn
hasTooltip" title="<?php echo
JHtml::tooltipText('JSEARCH_FILTER_CLEAR'); ?>"
onclick="document.id('filter_search').value='';this.form.submit();"><i
class="icon-remove"></i></button>
        </div>
        <div class="btn-group pull-right hidden-phone">
            <label for="limit"
class="element-invisible"><?php echo
JText::_('JFIELD_PLG_SEARCH_SEARCHLIMIT_DESC');?></label>
            <?php echo $this->pagination->getLimitBox(); ?>
        </div>
        <div class="btn-group pull-right hidden-phone">
            <label for="directionTable"
class="element-invisible"><?php echo
JText::_('JFIELD_ORDERING_DESC');?></label>
            <select name="directionTable"
id="directionTable" class="input-medium"
onchange="Joomla.orderTable()">
                <option value=""><?php echo
JText::_('JFIELD_ORDERING_DESC');?></option>
                <option value="asc" <?php if
($this->listDirn == 'asc') echo
'selected="selected"'; ?>><?php echo
JText::_('JGLOBAL_ORDER_ASCENDING');?></option>
                <option value="desc" <?php if
($this->listDirn == 'desc') echo
'selected="selected"'; ?>><?php echo
JText::_('JGLOBAL_ORDER_DESCENDING');?></option>
            </select>
        </div>
        <div class="btn-group pull-right">
            <label for="sortTable"
class="element-invisible"><?php echo
JText::_('JGLOBAL_SORT_BY');?></label>
            <select name="sortTable" id="sortTable"
class="input-medium" onchange="Joomla.orderTable()">
                <option value=""><?php echo
JText::_('JGLOBAL_SORT_BY');?></option>
                <?php echo JHtml::_('select.options',
$this->getSortFields(), 'value', 'text',
$this->listOrder);?>
            </select>
        </div>
    </div>
<div class="clearfix">
</div>courses/tmpl/index.html000064400000000054151160405160011176
0ustar00<html><body
bgcolor="#FFFFFF"></body></html>courses/view.html.php000064400000022454151160405160010663
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				Lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.77
	@build			6th April, 2022
	@created		22nd July, 2020
	@package		Moojla
	@subpackage		view.html.php
	@author			Lmskaran <http://Lmskaran.com>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

/**
 * Moojla View class for the Courses
 */
class MoojlaViewCourses extends JViewLegacy
{
	/**
	 * Courses view display method
	 * @return void
	 */
	function display($tpl = null)
	{
		if ($this->getLayout() !== 'modal')
		{
			// Include helper submenu
			MoojlaHelper::addSubmenu('courses');
		}

		// Assign data to the view
		$this->items = $this->get('Items');
		$this->pagination = $this->get('Pagination');
		$this->state = $this->get('State');
		$this->user = JFactory::getUser();
		// Load the filter form from xml.
		$this->filterForm = $this->get('FilterForm');
		// Load the active filters.
		$this->activeFilters = $this->get('ActiveFilters');
		// Add the list ordering clause.
		$this->listOrder =
$this->escape($this->state->get('list.ordering',
'a.id'));
		$this->listDirn =
$this->escape($this->state->get('list.direction',
'DESC'));
		$this->saveOrder = $this->listOrder == 'a.ordering';
		// set the return here value
		$this->return_here = urlencode(base64_encode((string)
JUri::getInstance()));
		// get global action permissions
		$this->canDo = MoojlaHelper::getActions('course');
		$this->canEdit = $this->canDo->get('course.edit');
		$this->canState =
$this->canDo->get('core.edit.state');
		$this->canCreate = $this->canDo->get('course.create');
		$this->canDelete = $this->canDo->get('course.delete');
		$this->canBatch = $this->canDo->get('core.batch');

		// We don't need toolbar in the modal window.
		if ($this->getLayout() !== 'modal')
		{
			$this->addToolbar();
			$this->sidebar = JHtmlSidebar::render();
			// load the batch html
			if ($this->canCreate && $this->canEdit &&
$this->canState)
			{
				$this->batchDisplay = JHtmlBatch_::render();
			}
		}
		
		// Check for errors.
		if (count($errors = $this->get('Errors')))
		{
			throw new Exception(implode("\n", $errors), 500);
		}

		// Display the template
		parent::display($tpl);

		// Set the document
		$this->setDocument();
	}

	/**
	 * Setting the toolbar
	 */
	protected function addToolBar()
	{
		JToolBarHelper::title(JText::_('COM_MOOJLA_COURSES'),
'list');
		JHtmlSidebar::setAction('index.php?option=com_moojla&view=courses');
		JFormHelper::addFieldPath(JPATH_COMPONENT . '/models/fields');

		if ($this->canCreate)
		{
			JToolBarHelper::addNew('course.add');
		}

		// Only load if there are items
		if (MoojlaHelper::checkArray($this->items))
		{
			if ($this->canEdit)
			{
				JToolBarHelper::editList('course.edit');
			}

			if ($this->canState)
			{
				JToolBarHelper::publishList('courses.publish');
				JToolBarHelper::unpublishList('courses.unpublish');
				JToolBarHelper::archiveList('courses.archive');

				if ($this->canDo->get('core.admin'))
				{
					JToolBarHelper::checkin('courses.checkin');
				}
			}

			// Add a batch button
			if ($this->canBatch && $this->canCreate &&
$this->canEdit && $this->canState)
			{
				// Get the toolbar object instance
				$bar = JToolBar::getInstance('toolbar');
				// set the batch button name
				$title = JText::_('JTOOLBAR_BATCH');
				// Instantiate a new JLayoutFile instance and render the batch button
				$layout = new JLayoutFile('joomla.toolbar.batch');
				// add the button to the page
				$dhtml = $layout->render(array('title' => $title));
				$bar->appendButton('Custom', $dhtml, 'batch');
			}
			if ($this->user->authorise('course.update_courses',
'com_moojla'))
			{
				// add Update courses button.
				JToolBarHelper::custom('courses.updateCourse', 'book
custom-button-updatecourse', '',
'COM_MOOJLA_UPDATE_COURSES', 'true');
			}
			if ($this->user->authorise('course.sync_tag',
'com_moojla'))
			{
				// add Sync tag button.
				JToolBarHelper::custom('courses.syncTags', 'tags
custom-button-synctags', '',
'COM_MOOJLA_SYNC_TAG', 'true');
			}
			if
($this->user->authorise('course.fetch_moojla_enrolment',
'com_moojla'))
			{
				// add Fetch moojla enrolment button.
				JToolBarHelper::custom('courses.fetchMoojlaEnrolment',
'address custom-button-fetchmoojlaenrolment', '',
'COM_MOOJLA_FETCH_MOOJLA_ENROLMENT', 'true');
			}
			if
($this->user->authorise('course.migrate_from_joomdle',
'com_moojla'))
			{
				// add Migrate from Joomdle button.
				JToolBarHelper::custom('courses.migrateFromJoomdle',
'database custom-button-migratefromjoomdle', '',
'COM_MOOJLA_MIGRATE_FROM_JOOMDLE', 'true');
			}

			if ($this->state->get('filter.published') == -2
&& ($this->canState && $this->canDelete))
			{
				JToolbarHelper::deleteList('', 'courses.delete',
'JTOOLBAR_EMPTY_TRASH');
			}
			elseif ($this->canState && $this->canDelete)
			{
				JToolbarHelper::trash('courses.trash');
			}

			if ($this->canDo->get('core.export') &&
$this->canDo->get('course.export'))
			{
				JToolBarHelper::custom('courses.exportData',
'download', '', 'COM_MOOJLA_EXPORT_DATA',
true);
			}
		}
		if ($this->user->authorise('course.fetch',
'com_moojla'))
		{
			// add Fetch button.
			JToolBarHelper::custom('courses.fetchCourses', 'contract
custom-button-fetchcourses', '',
'COM_MOOJLA_FETCH', false);
		}
		if ($this->user->authorise('course.sections',
'com_moojla'))
		{
			// add Sections button.
			JToolBarHelper::custom('courses.goToSections', 'briefcase
custom-button-gotosections', '',
'COM_MOOJLA_SECTIONS', false);
		}
		if ($this->user->authorise('course.modules',
'com_moojla'))
		{
			// add Modules button.
			JToolBarHelper::custom('courses.goToModules', 'image
custom-button-gotomodules', '',
'COM_MOOJLA_MODULES', false);
		}
		if ($this->user->authorise('course.contents',
'com_moojla'))
		{
			// add Contents button.
			JToolBarHelper::custom('courses.goToContents',
'bubble-quote custom-button-gotocontents', '',
'COM_MOOJLA_CONTENTS', false);
		}

		if ($this->canDo->get('core.import') &&
$this->canDo->get('course.import'))
		{
			JToolBarHelper::custom('courses.importData',
'upload', '', 'COM_MOOJLA_IMPORT_DATA',
false);
		}

		// set help url for this view if found
		$help_url = MoojlaHelper::getHelpUrl('courses');
		if (MoojlaHelper::checkString($help_url))
		{
				JToolbarHelper::help('COM_MOOJLA_HELP_MANAGER', false,
$help_url);
		}

		// add the options comp button
		if ($this->canDo->get('core.admin') ||
$this->canDo->get('core.options'))
		{
			JToolBarHelper::preferences('com_moojla');
		}

		// Only load published batch if state and batch is allowed
		if ($this->canState && $this->canBatch)
		{
			JHtmlBatch_::addListSelection(
				JText::_('COM_MOOJLA_KEEP_ORIGINAL_STATE'),
				'batch[published]',
				JHtml::_('select.options',
JHtml::_('jgrid.publishedOptions', array('all' =>
false)), 'value', 'text', '', true)
			);
		}

		if ($this->canBatch && $this->canCreate &&
$this->canEdit)
		{
			// Category Batch selection.
			JHtmlBatch_::addListSelection(
				JText::_('COM_MOOJLA_KEEP_ORIGINAL_CATEGORY'),
				'batch[category]',
				JHtml::_('select.options',
JHtml::_('category.options', 'com_moojla.course'),
'value', 'text')
			);
		}
	}

	/**
	 * Method to set up the document properties
	 *
	 * @return void
	 */
	protected function setDocument()
	{
		if (!isset($this->document))
		{
			$this->document = JFactory::getDocument();
		}
		$this->document->setTitle(JText::_('COM_MOOJLA_COURSES'));
		$this->document->addStyleSheet(JURI::root() .
"administrator/components/com_moojla/assets/css/courses.css",
(MoojlaHelper::jVersion()->isCompatible('3.8.0')) ?
array('version' => 'auto') : 'text/css');
	}

	/**
	 * Escapes a value for output in a view script.
	 *
	 * @param   mixed  $var  The output to escape.
	 *
	 * @return  mixed  The escaped value.
	 */
	public function escape($var)
	{
		if(strlen($var) > 50)
		{
			// use the helper htmlEscape method instead and shorten the string
			return MoojlaHelper::htmlEscape($var, $this->_charset, true);
		}
		// use the helper htmlEscape method instead.
		return MoojlaHelper::htmlEscape($var, $this->_charset);
	}

	/**
	 * Returns an array of fields the table can be sorted by
	 *
	 * @return  array  Array containing the field name to sort by as the key
and display text as value
	 */
	protected function getSortFields()
	{
		return array(
			'a.ordering' =>
JText::_('JGRID_HEADING_ORDERING'),
			'a.published' => JText::_('JSTATUS'),
			'a.shortname' =>
JText::_('COM_MOOJLA_COURSE_SHORTNAME_LABEL'),
			'a.fullname' =>
JText::_('COM_MOOJLA_COURSE_FULLNAME_LABEL'),
			'category_title' =>
JText::_('COM_MOOJLA_COURSE_COURSES_CATEGORIES'),
			'a.id' => JText::_('JGRID_HEADING_ID')
		);
	}
}
course_fields_mapper/index.html000064400000000054151160405160012731
0ustar00<html><body
bgcolor="#FFFFFF"></body></html>course_fields_mapper/tmpl/default.php000064400000007317151160405160014056
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				Lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.77
	@build			6th April, 2022
	@created		22nd July, 2020
	@package		Moojla
	@subpackage		default.php
	@author			Lmskaran <http://Lmskaran.com>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

JHtml::_('behavior.tooltip');
JHtml::_('behavior.multiselect');
JHtml::_('dropdown.init');
JHtml::_('formbehavior.chosen',
'.multipleAccessLevels', null,
array('placeholder_text_multiple' => '- ' .
JText::_('COM_MOOJLA_FILTER_SELECT_ACCESS') . ' -'));
JHtml::_('formbehavior.chosen', 'select');
if ($this->saveOrder)
{
	$saveOrderingUrl =
'index.php?option=com_moojla&task=course_fields_mapper.saveOrderAjax&tmpl=component';
	JHtml::_('sortablelist.sortable',
'course_field_mapperList', 'adminForm',
strtolower($this->listDirn), $saveOrderingUrl);
}
?>
<form action="<?php echo
JRoute::_('index.php?option=com_moojla&view=course_fields_mapper');
?>" method="post" name="adminForm"
id="adminForm">
<?php if(!empty( $this->sidebar)): ?>
	<div id="j-sidebar-container" class="span2">
		<?php echo $this->sidebar; ?>
	</div>
	<div id="j-main-container" class="span10">
<?php else : ?>
	<div id="j-main-container">
<?php endif; ?>
<?php
	// Add the searchtools
	echo JLayoutHelper::render('joomla.searchtools.default',
array('view' => $this));
?>
<?php if (empty($this->items)): ?>
	<div class="alert alert-no-items">
		<?php echo JText::_('JGLOBAL_NO_MATCHING_RESULTS'); ?>
	</div>
<?php else : ?>
	<table class="table table-striped"
id="course_field_mapperList">
		<thead><?php echo
$this->loadTemplate('head');?></thead>
		<tfoot><?php echo
$this->loadTemplate('foot');?></tfoot>
		<tbody><?php echo
$this->loadTemplate('body');?></tbody>
	</table>
	<?php // Load the batch processing form. ?>
	<?php if ($this->canCreate && $this->canEdit) : ?>
		<?php echo JHtml::_(
			'bootstrap.renderModal',
			'collapseModal',
			array(
				'title' =>
JText::_('COM_MOOJLA_COURSE_FIELDS_MAPPER_BATCH_OPTIONS'),
				'footer' =>
$this->loadTemplate('batch_footer')
			),
			$this->loadTemplate('batch_body')
		); ?>
	<?php endif; ?>
	<input type="hidden" name="boxchecked"
value="0" />
	</div>
<?php endif; ?>
	<input type="hidden" name="task" value=""
/>
	<?php echo JHtml::_('form.token'); ?>
</form>
<script type="text/javascript">
// course_fields_mapper footer script
/***[JCBGUI.admin_view.javascript_views_footer.138.$$$$]***/
jQuery(document).ready(function($){  	
	$('#course_field_mapperList tbody tr
td:nth-child(5)').each(function(){ 
      	var imgPath = '<?php echo JURI::root(true) .
"/";?>' + $(this).text();
      	$(this).html('<img rel="popover" src="'+
imgPath +'" width="30" data-img="'+ imgPath
+'" />');
    });  
  	$('img[rel=popover]').popover({
      html: true,
      trigger: 'hover',
      placement: 'bottom',
      content: function(){return '<img
src="'+$(this).data('img') + '"
/>';}
    });
});
/***[/JCBGUI$$$$]***/

</script>
course_fields_mapper/tmpl/default_batch_body.php000064400000002347151160405160016232
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				Lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.77
	@build			6th April, 2022
	@created		22nd July, 2020
	@package		Moojla
	@subpackage		default_batch_body.php
	@author			Lmskaran <http://Lmskaran.com>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

?>

<p><?php echo
JText::_('COM_MOOJLA_COURSE_FIELDS_MAPPER_BATCH_TIP');
?></p>
<?php echo $this->batchDisplay;
?>course_fields_mapper/tmpl/default_batch_footer.php000064400000002745151160405160016575
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				Lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.77
	@build			6th April, 2022
	@created		22nd July, 2020
	@package		Moojla
	@subpackage		default_batch_footer.php
	@author			Lmskaran <http://Lmskaran.com>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

?>
<!-- clear the batch values if cancel -->
<button class="btn" type="button"
onclick="" data-dismiss="modal">
	<?php echo JText::_('JCANCEL'); ?>
</button>
<!-- post the batch values if process -->
<button class="btn btn-success" type="submit"
onclick="Joomla.submitbutton('course_field_mapper.batch');">
	<?php echo JText::_('JGLOBAL_BATCH_PROCESS'); ?>
</button>course_fields_mapper/tmpl/default_body.php000064400000010066151160405160015066
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				Lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.77
	@build			6th April, 2022
	@created		22nd July, 2020
	@package		Moojla
	@subpackage		default_body.php
	@author			Lmskaran <http://Lmskaran.com>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

$edit =
"index.php?option=com_moojla&view=course_fields_mapper&task=course_field_mapper.edit";

?>
<?php foreach ($this->items as $i => $item): ?>
	<?php
		$canCheckin = $this->user->authorise('core.manage',
'com_checkin') || $item->checked_out == $this->user->id
|| $item->checked_out == 0;
		$userChkOut = JFactory::getUser($item->checked_out);
		$canDo =
MoojlaHelper::getActions('course_field_mapper',$item,'course_fields_mapper');
	?>
	<tr class="row<?php echo $i % 2; ?>">
		<td class="order nowrap center hidden-phone">
		<?php if ($canDo->get('core.edit.state')): ?>
			<?php
				$iconClass = '';
				if (!$this->saveOrder)
				{
					$iconClass = ' inactive tip-top" hasTooltip"
title="' . JHtml::tooltipText('JORDERINGDISABLED');
				}
			?>
			<span class="sortable-handler<?php echo $iconClass;
?>">
				<i class="icon-menu"></i>
			</span>
			<?php if ($this->saveOrder) : ?>
				<input type="text" style="display:none"
name="order[]" size="5"
				value="<?php echo $item->ordering; ?>"
class="width-20 text-area-order " />
			<?php endif; ?>
		<?php else: ?>
			&#8942;
		<?php endif; ?>
		</td>
		<td class="nowrap center">
		<?php if ($canDo->get('core.edit')): ?>
				<?php if ($item->checked_out) : ?>
					<?php if ($canCheckin) : ?>
						<?php echo JHtml::_('grid.id', $i, $item->id); ?>
					<?php else: ?>
						&#9633;
					<?php endif; ?>
				<?php else: ?>
					<?php echo JHtml::_('grid.id', $i, $item->id); ?>
				<?php endif; ?>
		<?php else: ?>
			&#9633;
		<?php endif; ?>
		</td>
		<td class="nowrap">
			<div class="name">
				<?php if ($canDo->get('core.edit')): ?>
					<a href="<?php echo $edit; ?>&id=<?php echo
$item->id; ?>"><?php echo
$this->escape($item->coursefield_name); ?></a>
					<?php if ($item->checked_out): ?>
						<?php echo JHtml::_('jgrid.checkedout', $i,
$userChkOut->name, $item->checked_out_time,
'course_fields_mapper.', $canCheckin); ?>
					<?php endif; ?>
				<?php else: ?>
					<?php echo $this->escape($item->coursefield_name); ?>
				<?php endif; ?>
			</div>
		</td>
		<td class="hidden-phone">
			<?php echo $this->escape($item->mcoursefields_id); ?>
		</td>
		<td class="hidden-phone">
			<?php echo $this->escape($item->field_icon); ?>
		</td>
		<td class="center">
		<?php if ($canDo->get('core.edit.state')) : ?>
				<?php if ($item->checked_out) : ?>
					<?php if ($canCheckin) : ?>
						<?php echo JHtml::_('jgrid.published',
$item->published, $i, 'course_fields_mapper.', true,
'cb'); ?>
					<?php else: ?>
						<?php echo JHtml::_('jgrid.published',
$item->published, $i, 'course_fields_mapper.', false,
'cb'); ?>
					<?php endif; ?>
				<?php else: ?>
					<?php echo JHtml::_('jgrid.published',
$item->published, $i, 'course_fields_mapper.', true,
'cb'); ?>
				<?php endif; ?>
		<?php else: ?>
			<?php echo JHtml::_('jgrid.published', $item->published,
$i, 'course_fields_mapper.', false, 'cb'); ?>
		<?php endif; ?>
		</td>
		<td class="nowrap center hidden-phone">
			<?php echo $item->id; ?>
		</td>
	</tr>
<?php endforeach;
?>course_fields_mapper/tmpl/default_foot.php000064400000002304151160405160015074
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				Lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.77
	@build			6th April, 2022
	@created		22nd July, 2020
	@package		Moojla
	@subpackage		default_foot.php
	@author			Lmskaran <http://Lmskaran.com>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

?>
<tr>
	<td colspan="7"><?php echo
$this->pagination->getListFooter(); ?></td>
</tr>course_fields_mapper/tmpl/default_head.php000064400000005016151160405160015031
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				Lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.77
	@build			6th April, 2022
	@created		22nd July, 2020
	@package		Moojla
	@subpackage		default_head.php
	@author			Lmskaran <http://Lmskaran.com>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

?>
<tr>
	<?php if ($this->canEdit&& $this->canState): ?>
		<th width="1%" class="nowrap center
hidden-phone">
			<?php echo JHtml::_('searchtools.sort', '',
'a.ordering', $this->listDirn, $this->listOrder, null,
'asc', 'JGRID_HEADING_ORDERING',
'icon-menu-2'); ?>
		</th>
		<th width="20" class="nowrap center">
			<?php echo JHtml::_('grid.checkall'); ?>
		</th>
	<?php else: ?>
		<th width="20" class="nowrap center
hidden-phone">
			&#9662;
		</th>
		<th width="20" class="nowrap center">
			&#9632;
		</th>
	<?php endif; ?>
	<th class="nowrap" >
			<?php echo
JText::_('COM_MOOJLA_COURSE_FIELD_MAPPER_COURSEFIELD_LABEL');
?>
	</th>
	<th class="nowrap hidden-phone" >
			<?php echo
JText::_('COM_MOOJLA_COURSE_FIELD_MAPPER_MCOURSEFIELDS_LABEL');
?>
	</th>
	<th class="nowrap hidden-phone" >
			<?php echo
JText::_('COM_MOOJLA_COURSE_FIELD_MAPPER_FIELD_ICON_LABEL');
?>
	</th>
	<?php if ($this->canState): ?>
		<th width="10" class="nowrap center" >
			<?php echo JHtml::_('searchtools.sort',
'COM_MOOJLA_COURSE_FIELD_MAPPER_STATUS', 'a.published',
$this->listDirn, $this->listOrder); ?>
		</th>
	<?php else: ?>
		<th width="10" class="nowrap center" >
			<?php echo
JText::_('COM_MOOJLA_COURSE_FIELD_MAPPER_STATUS'); ?>
		</th>
	<?php endif; ?>
	<th width="5" class="nowrap center hidden-phone"
>
			<?php echo JHtml::_('searchtools.sort',
'COM_MOOJLA_COURSE_FIELD_MAPPER_ID', 'a.id',
$this->listDirn, $this->listOrder); ?>
	</th>
</tr>course_fields_mapper/tmpl/default_toolbar.php000064400000007067151160405160015602
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				Lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.77
	@build			6th April, 2022
	@created		22nd July, 2020
	@package		Moojla
	@subpackage		default_toolbar.php
	@author			Lmskaran <http://Lmskaran.com>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

?>
<div id="filter-bar" class="btn-toolbar">
        <div class="filter-search btn-group pull-left">
            <label for="filter_search"
class="element-invisible"><?php echo
JText::_('Search');?></label>
            <input type="text" name="filter_search"
id="filter_search" placeholder="<?php echo
JText::_('JSEARCH_FILTER'); ?>" value="<?php echo
$this->escape($this->state->get('filter.search'));
?>" class="hasTooltip" title="<?php echo
JHtml::tooltipText('Search Course_fields_mapper'); ?>"
/>
        </div>
        <div class="btn-group pull-left">
            <button type="submit" class="btn
hasTooltip" title="<?php echo
JHtml::tooltipText('JSEARCH_FILTER_SUBMIT'); ?>"><i
class="icon-search"></i></button>
            <button type="button" class="btn
hasTooltip" title="<?php echo
JHtml::tooltipText('JSEARCH_FILTER_CLEAR'); ?>"
onclick="document.id('filter_search').value='';this.form.submit();"><i
class="icon-remove"></i></button>
        </div>
        <div class="btn-group pull-right hidden-phone">
            <label for="limit"
class="element-invisible"><?php echo
JText::_('JFIELD_PLG_SEARCH_SEARCHLIMIT_DESC');?></label>
            <?php echo $this->pagination->getLimitBox(); ?>
        </div>
        <div class="btn-group pull-right hidden-phone">
            <label for="directionTable"
class="element-invisible"><?php echo
JText::_('JFIELD_ORDERING_DESC');?></label>
            <select name="directionTable"
id="directionTable" class="input-medium"
onchange="Joomla.orderTable()">
                <option value=""><?php echo
JText::_('JFIELD_ORDERING_DESC');?></option>
                <option value="asc" <?php if
($this->listDirn == 'asc') echo
'selected="selected"'; ?>><?php echo
JText::_('JGLOBAL_ORDER_ASCENDING');?></option>
                <option value="desc" <?php if
($this->listDirn == 'desc') echo
'selected="selected"'; ?>><?php echo
JText::_('JGLOBAL_ORDER_DESCENDING');?></option>
            </select>
        </div>
        <div class="btn-group pull-right">
            <label for="sortTable"
class="element-invisible"><?php echo
JText::_('JGLOBAL_SORT_BY');?></label>
            <select name="sortTable" id="sortTable"
class="input-medium" onchange="Joomla.orderTable()">
                <option value=""><?php echo
JText::_('JGLOBAL_SORT_BY');?></option>
                <?php echo JHtml::_('select.options',
$this->getSortFields(), 'value', 'text',
$this->listOrder);?>
            </select>
        </div>
    </div>
<div class="clearfix">
</div>course_fields_mapper/tmpl/index.html000064400000000054151160405160013705
0ustar00<html><body
bgcolor="#FFFFFF"></body></html>course_fields_mapper/view.html.php000064400000017041151160405160013366
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				Lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.77
	@build			6th April, 2022
	@created		22nd July, 2020
	@package		Moojla
	@subpackage		view.html.php
	@author			Lmskaran <http://Lmskaran.com>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

/**
 * Moojla View class for the Course_fields_mapper
 */
class MoojlaViewCourse_fields_mapper extends JViewLegacy
{
	/**
	 * Course_fields_mapper view display method
	 * @return void
	 */
	function display($tpl = null)
	{
		if ($this->getLayout() !== 'modal')
		{
			// Include helper submenu
			MoojlaHelper::addSubmenu('course_fields_mapper');
		}

		// Assign data to the view
		$this->items = $this->get('Items');
		$this->pagination = $this->get('Pagination');
		$this->state = $this->get('State');
		$this->user = JFactory::getUser();
		// Load the filter form from xml.
		$this->filterForm = $this->get('FilterForm');
		// Load the active filters.
		$this->activeFilters = $this->get('ActiveFilters');
		// Add the list ordering clause.
		$this->listOrder =
$this->escape($this->state->get('list.ordering',
'a.id'));
		$this->listDirn =
$this->escape($this->state->get('list.direction',
'DESC'));
		$this->saveOrder = $this->listOrder == 'a.ordering';
		// set the return here value
		$this->return_here = urlencode(base64_encode((string)
JUri::getInstance()));
		// get global action permissions
		$this->canDo =
MoojlaHelper::getActions('course_field_mapper');
		$this->canEdit = $this->canDo->get('core.edit');
		$this->canState =
$this->canDo->get('core.edit.state');
		$this->canCreate = $this->canDo->get('core.create');
		$this->canDelete = $this->canDo->get('core.delete');
		$this->canBatch = $this->canDo->get('core.batch');

		// We don't need toolbar in the modal window.
		if ($this->getLayout() !== 'modal')
		{
			$this->addToolbar();
			$this->sidebar = JHtmlSidebar::render();
			// load the batch html
			if ($this->canCreate && $this->canEdit &&
$this->canState)
			{
				$this->batchDisplay = JHtmlBatch_::render();
			}
		}
		
		// Check for errors.
		if (count($errors = $this->get('Errors')))
		{
			throw new Exception(implode("\n", $errors), 500);
		}

		// Display the template
		parent::display($tpl);

		// Set the document
		$this->setDocument();
	}

	/**
	 * Setting the toolbar
	 */
	protected function addToolBar()
	{
		JToolBarHelper::title(JText::_('COM_MOOJLA_COURSE_FIELDS_MAPPER'),
'screwdriver');
		JHtmlSidebar::setAction('index.php?option=com_moojla&view=course_fields_mapper');
		JFormHelper::addFieldPath(JPATH_COMPONENT . '/models/fields');

		if ($this->canCreate)
		{
			JToolBarHelper::addNew('course_field_mapper.add');
		}

		// Only load if there are items
		if (MoojlaHelper::checkArray($this->items))
		{
			if ($this->canEdit)
			{
				JToolBarHelper::editList('course_field_mapper.edit');
			}

			if ($this->canState)
			{
				JToolBarHelper::publishList('course_fields_mapper.publish');
				JToolBarHelper::unpublishList('course_fields_mapper.unpublish');
				JToolBarHelper::archiveList('course_fields_mapper.archive');

				if ($this->canDo->get('core.admin'))
				{
					JToolBarHelper::checkin('course_fields_mapper.checkin');
				}
			}

			// Add a batch button
			if ($this->canBatch && $this->canCreate &&
$this->canEdit && $this->canState)
			{
				// Get the toolbar object instance
				$bar = JToolBar::getInstance('toolbar');
				// set the batch button name
				$title = JText::_('JTOOLBAR_BATCH');
				// Instantiate a new JLayoutFile instance and render the batch button
				$layout = new JLayoutFile('joomla.toolbar.batch');
				// add the button to the page
				$dhtml = $layout->render(array('title' => $title));
				$bar->appendButton('Custom', $dhtml, 'batch');
			}

			if ($this->state->get('filter.published') == -2
&& ($this->canState && $this->canDelete))
			{
				JToolbarHelper::deleteList('',
'course_fields_mapper.delete', 'JTOOLBAR_EMPTY_TRASH');
			}
			elseif ($this->canState && $this->canDelete)
			{
				JToolbarHelper::trash('course_fields_mapper.trash');
			}

			if ($this->canDo->get('core.export') &&
$this->canDo->get('course_field_mapper.export'))
			{
				JToolBarHelper::custom('course_fields_mapper.exportData',
'download', '', 'COM_MOOJLA_EXPORT_DATA',
true);
			}
		}

		if ($this->canDo->get('core.import') &&
$this->canDo->get('course_field_mapper.import'))
		{
			JToolBarHelper::custom('course_fields_mapper.importData',
'upload', '', 'COM_MOOJLA_IMPORT_DATA',
false);
		}

		// set help url for this view if found
		$help_url = MoojlaHelper::getHelpUrl('course_fields_mapper');
		if (MoojlaHelper::checkString($help_url))
		{
				JToolbarHelper::help('COM_MOOJLA_HELP_MANAGER', false,
$help_url);
		}

		// add the options comp button
		if ($this->canDo->get('core.admin') ||
$this->canDo->get('core.options'))
		{
			JToolBarHelper::preferences('com_moojla');
		}

		// Only load published batch if state and batch is allowed
		if ($this->canState && $this->canBatch)
		{
			JHtmlBatch_::addListSelection(
				JText::_('COM_MOOJLA_KEEP_ORIGINAL_STATE'),
				'batch[published]',
				JHtml::_('select.options',
JHtml::_('jgrid.publishedOptions', array('all' =>
false)), 'value', 'text', '', true)
			);
		}

		// Only load access batch if create, edit and batch is allowed
		if ($this->canBatch && $this->canCreate &&
$this->canEdit)
		{
			JHtmlBatch_::addListSelection(
				JText::_('COM_MOOJLA_KEEP_ORIGINAL_ACCESS'),
				'batch[access]',
				JHtml::_('select.options',
JHtml::_('access.assetgroups'), 'value',
'text')
			);
		}
	}

	/**
	 * Method to set up the document properties
	 *
	 * @return void
	 */
	protected function setDocument()
	{
		if (!isset($this->document))
		{
			$this->document = JFactory::getDocument();
		}
		$this->document->setTitle(JText::_('COM_MOOJLA_COURSE_FIELDS_MAPPER'));
		$this->document->addStyleSheet(JURI::root() .
"administrator/components/com_moojla/assets/css/course_fields_mapper.css",
(MoojlaHelper::jVersion()->isCompatible('3.8.0')) ?
array('version' => 'auto') : 'text/css');
	}

	/**
	 * Escapes a value for output in a view script.
	 *
	 * @param   mixed  $var  The output to escape.
	 *
	 * @return  mixed  The escaped value.
	 */
	public function escape($var)
	{
		if(strlen($var) > 50)
		{
			// use the helper htmlEscape method instead and shorten the string
			return MoojlaHelper::htmlEscape($var, $this->_charset, true);
		}
		// use the helper htmlEscape method instead.
		return MoojlaHelper::htmlEscape($var, $this->_charset);
	}

	/**
	 * Returns an array of fields the table can be sorted by
	 *
	 * @return  array  Array containing the field name to sort by as the key
and display text as value
	 */
	protected function getSortFields()
	{
		return array(
			'a.ordering' =>
JText::_('JGRID_HEADING_ORDERING'),
			'a.published' => JText::_('JSTATUS'),
			'a.id' => JText::_('JGRID_HEADING_ID')
		);
	}
}
course_field_mapper/submitbutton.js000064400000002760151160405160013654
0ustar00/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				Lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.77
	@build			6th April, 2022
	@created		22nd July, 2020
	@package		Moojla
	@subpackage		submitbutton.js
	@author			Lmskaran <http://Lmskaran.com>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

Joomla.submitbutton = function(task)
{
	if (task == ''){
		return false;
	} else { 
		var action = task.split('.');
		if (action[1] == 'cancel' || action[1] == 'close' ||
document.formvalidator.isValid(document.getElementById("adminForm"))){
			Joomla.submitform(task, document.getElementById("adminForm"));
			return true;
		} else {
			alert(Joomla.JText._('course_field_mapper, some values are not
acceptable.','Some values are unacceptable'));
			return false;
		}
	}
}course_field_mapper/tmpl/edit.php000064400000011352151160405160013166
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				Lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.77
	@build			6th April, 2022
	@created		22nd July, 2020
	@package		Moojla
	@subpackage		edit.php
	@author			Lmskaran <http://Lmskaran.com>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html');
JHtml::_('behavior.tooltip');
JHtml::_('behavior.formvalidation');
JHtml::_('formbehavior.chosen', 'select');
JHtml::_('behavior.keepalive');
$componentParams = $this->params; // will be removed just use
$this->params instead
?>
<script type="text/javascript">
	// waiting spinner
	var outerDiv = jQuery('body');
	jQuery('<div id="loading"></div>')
		.css("background", "rgba(255, 255, 255, .8)
url('components/com_moojla/assets/images/import.gif') 50% 15%
no-repeat")
		.css("top", outerDiv.position().top -
jQuery(window).scrollTop())
		.css("left", outerDiv.position().left -
jQuery(window).scrollLeft())
		.css("width", outerDiv.width())
		.css("height", outerDiv.height())
		.css("position", "fixed")
		.css("opacity", "0.80")
		.css("-ms-filter",
"progid:DXImageTransform.Microsoft.Alpha(Opacity = 80)")
		.css("filter", "alpha(opacity = 80)")
		.css("display", "none")
		.appendTo(outerDiv);
	jQuery('#loading').show();
	// when page is ready remove and show
	jQuery(window).load(function() {
		jQuery('#moojla_loader').fadeIn('fast');
		jQuery('#loading').hide();
	});
</script>
<div id="moojla_loader" style="display: none;">
<form action="<?php echo
JRoute::_('index.php?option=com_moojla&layout=edit&id='.
(int) $this->item->id . $this->referral); ?>"
method="post" name="adminForm" id="adminForm"
class="form-validate" enctype="multipart/form-data">

<div class="form-horizontal">

	<?php echo JHtml::_('bootstrap.startTabSet',
'course_field_mapperTab', array('active' =>
'details')); ?>

	<?php echo JHtml::_('bootstrap.addTab',
'course_field_mapperTab', 'details',
JText::_('COM_MOOJLA_COURSE_FIELD_MAPPER_DETAILS', true)); ?>
		<div class="row-fluid form-horizontal-desktop">
			<div class="span12">
				<?php echo
JLayoutHelper::render('course_field_mapper.details_left', $this);
?>
			</div>
		</div>
	<?php echo JHtml::_('bootstrap.endTab'); ?>

	<?php $this->ignore_fieldsets =
array('details','metadata','vdmmetadata','accesscontrol');
?>
	<?php $this->tab_name = 'course_field_mapperTab'; ?>
	<?php echo JLayoutHelper::render('joomla.edit.params',
$this); ?>

	<?php if ($this->canDo->get('core.edit.created_by') ||
$this->canDo->get('core.edit.created') ||
$this->canDo->get('core.edit.state') ||
($this->canDo->get('core.delete') &&
$this->canDo->get('core.edit.state'))) : ?>
	<?php echo JHtml::_('bootstrap.addTab',
'course_field_mapperTab', 'publishing',
JText::_('COM_MOOJLA_COURSE_FIELD_MAPPER_PUBLISHING', true));
?>
		<div class="row-fluid form-horizontal-desktop">
			<div class="span6">
				<?php echo
JLayoutHelper::render('course_field_mapper.publishing', $this);
?>
			</div>
			<div class="span6">
				<?php echo
JLayoutHelper::render('course_field_mapper.publlshing', $this);
?>
			</div>
		</div>
	<?php echo JHtml::_('bootstrap.endTab'); ?>
	<?php endif; ?>

	<?php if ($this->canDo->get('core.admin')) : ?>
	<?php echo JHtml::_('bootstrap.addTab',
'course_field_mapperTab', 'permissions',
JText::_('COM_MOOJLA_COURSE_FIELD_MAPPER_PERMISSION', true));
?>
		<div class="row-fluid form-horizontal-desktop">
			<div class="span12">
				<fieldset class="adminform">
					<div class="adminformlist">
					<?php foreach
($this->form->getFieldset('accesscontrol') as $field):
?>
						<div>
							<?php echo $field->label; echo $field->input;?>
						</div>
						<div class="clearfix"></div>
					<?php endforeach; ?>
					</div>
				</fieldset>
			</div>
		</div>
	<?php echo JHtml::_('bootstrap.endTab'); ?>
	<?php endif; ?>

	<?php echo JHtml::_('bootstrap.endTabSet'); ?>

	<div>
		<input type="hidden" name="task"
value="course_field_mapper.edit" />
		<?php echo JHtml::_('form.token'); ?>
	</div>
</div>
</form>
</div>
course_field_mapper/tmpl/index.html000064400000000054151160405160013522
0ustar00<html><body
bgcolor="#FFFFFF"></body></html>course_field_mapper/view.html.php000064400000015667151160405160013217
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				Lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.77
	@build			6th April, 2022
	@created		22nd July, 2020
	@package		Moojla
	@subpackage		view.html.php
	@author			Lmskaran <http://Lmskaran.com>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

/**
 * Course_field_mapper View class
 */
class MoojlaViewCourse_field_mapper extends JViewLegacy
{
	/**
	 * display method of View
	 * @return void
	 */
	public function display($tpl = null)
	{
		// set params
		$this->params = JComponentHelper::getParams('com_moojla');
		// Assign the variables
		$this->form = $this->get('Form');
		$this->item = $this->get('Item');
		$this->script = $this->get('Script');
		$this->state = $this->get('State');
		// get action permissions
		$this->canDo =
MoojlaHelper::getActions('course_field_mapper', $this->item);
		// get input
		$jinput = JFactory::getApplication()->input;
		$this->ref = $jinput->get('ref', 0, 'word');
		$this->refid = $jinput->get('refid', 0, 'int');
		$return = $jinput->get('return', null, 'base64');
		// set the referral string
		$this->referral = '';
		if ($this->refid && $this->ref)
		{
			// return to the item that referred to this item
			$this->referral = '&ref=' . (string)$this->ref .
'&refid=' . (int)$this->refid;
		}
		elseif($this->ref)
		{
			// return to the list view that referred to this item
			$this->referral = '&ref=' . (string)$this->ref;
		}
		// check return value
		if (!is_null($return))
		{
			// add the return value
			$this->referral .= '&return=' . (string)$return;
		}

		// Set the toolbar
		$this->addToolBar();
		
		// Check for errors.
		if (count($errors = $this->get('Errors')))
		{
			throw new Exception(implode("\n", $errors), 500);
		}

		// Display the template
		parent::display($tpl);

		// Set the document
		$this->setDocument();
	}


	/**
	 * Setting the toolbar
	 */
	protected function addToolBar()
	{
		JFactory::getApplication()->input->set('hidemainmenu',
true);
		$user = JFactory::getUser();
		$userId	= $user->id;
		$isNew = $this->item->id == 0;

		JToolbarHelper::title( JText::_($isNew ?
'COM_MOOJLA_COURSE_FIELD_MAPPER_NEW' :
'COM_MOOJLA_COURSE_FIELD_MAPPER_EDIT'), 'pencil-2
article-add');
		// Built the actions for new and existing records.
		if (MoojlaHelper::checkString($this->referral))
		{
			if ($this->canDo->get('core.create') && $isNew)
			{
				// We can create the record.
				JToolBarHelper::save('course_field_mapper.save',
'JTOOLBAR_SAVE');
			}
			elseif ($this->canDo->get('core.edit'))
			{
				// We can save the record.
				JToolBarHelper::save('course_field_mapper.save',
'JTOOLBAR_SAVE');
			}
			if ($isNew)
			{
				// Do not creat but cancel.
				JToolBarHelper::cancel('course_field_mapper.cancel',
'JTOOLBAR_CANCEL');
			}
			else
			{
				// We can close it.
				JToolBarHelper::cancel('course_field_mapper.cancel',
'JTOOLBAR_CLOSE');
			}
		}
		else
		{
			if ($isNew)
			{
				// For new records, check the create permission.
				if ($this->canDo->get('core.create'))
				{
					JToolBarHelper::apply('course_field_mapper.apply',
'JTOOLBAR_APPLY');
					JToolBarHelper::save('course_field_mapper.save',
'JTOOLBAR_SAVE');
					JToolBarHelper::custom('course_field_mapper.save2new',
'save-new.png', 'save-new_f2.png',
'JTOOLBAR_SAVE_AND_NEW', false);
				};
				JToolBarHelper::cancel('course_field_mapper.cancel',
'JTOOLBAR_CANCEL');
			}
			else
			{
				if ($this->canDo->get('core.edit'))
				{
					// We can save the new record
					JToolBarHelper::apply('course_field_mapper.apply',
'JTOOLBAR_APPLY');
					JToolBarHelper::save('course_field_mapper.save',
'JTOOLBAR_SAVE');
					// We can save this record, but check the create permission to see
					// if we can return to make a new one.
					if ($this->canDo->get('core.create'))
					{
						JToolBarHelper::custom('course_field_mapper.save2new',
'save-new.png', 'save-new_f2.png',
'JTOOLBAR_SAVE_AND_NEW', false);
					}
				}
				$canVersion = ($this->canDo->get('core.version')
&&
$this->canDo->get('course_field_mapper.version'));
				if ($this->state->params->get('save_history', 1)
&& $this->canDo->get('core.edit') &&
$canVersion)
				{
					JToolbarHelper::versions('com_moojla.course_field_mapper',
$this->item->id);
				}
				if ($this->canDo->get('core.create'))
				{
					JToolBarHelper::custom('course_field_mapper.save2copy',
'save-copy.png', 'save-copy_f2.png',
'JTOOLBAR_SAVE_AS_COPY', false);
				}
				JToolBarHelper::cancel('course_field_mapper.cancel',
'JTOOLBAR_CLOSE');
			}
		}
		JToolbarHelper::divider();
		// set help url for this view if found
		$help_url = MoojlaHelper::getHelpUrl('course_field_mapper');
		if (MoojlaHelper::checkString($help_url))
		{
			JToolbarHelper::help('COM_MOOJLA_HELP_MANAGER', false,
$help_url);
		}
	}

	/**
	 * Escapes a value for output in a view script.
	 *
	 * @param   mixed  $var  The output to escape.
	 *
	 * @return  mixed  The escaped value.
	 */
	public function escape($var)
	{
		if(strlen($var) > 30)
		{
    		// use the helper htmlEscape method instead and shorten the string
			return MoojlaHelper::htmlEscape($var, $this->_charset, true, 30);
		}
		// use the helper htmlEscape method instead.
		return MoojlaHelper::htmlEscape($var, $this->_charset);
	}

	/**
	 * Method to set up the document properties
	 *
	 * @return void
	 */
	protected function setDocument()
	{
		$isNew = ($this->item->id < 1);
		if (!isset($this->document))
		{
			$this->document = JFactory::getDocument();
		}
		$this->document->setTitle(JText::_($isNew ?
'COM_MOOJLA_COURSE_FIELD_MAPPER_NEW' :
'COM_MOOJLA_COURSE_FIELD_MAPPER_EDIT'));
		$this->document->addStyleSheet(JURI::root() .
"administrator/components/com_moojla/assets/css/course_field_mapper.css",
(MoojlaHelper::jVersion()->isCompatible('3.8.0')) ?
array('version' => 'auto') : 'text/css');
		$this->document->addScript(JURI::root() . $this->script,
(MoojlaHelper::jVersion()->isCompatible('3.8.0')) ?
array('version' => 'auto') :
'text/javascript');
		$this->document->addScript(JURI::root() .
"administrator/components/com_moojla/views/course_field_mapper/submitbutton.js",
(MoojlaHelper::jVersion()->isCompatible('3.8.0')) ?
array('version' => 'auto') :
'text/javascript'); 
		JText::script('view not acceptable. Error');
	}
}
course_group_map/submitbutton.js000064400000002755151160405160013222
0ustar00/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				Lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.77
	@build			6th April, 2022
	@created		22nd July, 2020
	@package		Moojla
	@subpackage		submitbutton.js
	@author			Lmskaran <http://Lmskaran.com>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

Joomla.submitbutton = function(task)
{
	if (task == ''){
		return false;
	} else { 
		var action = task.split('.');
		if (action[1] == 'cancel' || action[1] == 'close' ||
document.formvalidator.isValid(document.getElementById("adminForm"))){
			Joomla.submitform(task, document.getElementById("adminForm"));
			return true;
		} else {
			alert(Joomla.JText._('course_group_map, some values are not
acceptable.','Some values are unacceptable'));
			return false;
		}
	}
}course_group_map/tmpl/edit.php000064400000011470151160405160012531
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				Lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.77
	@build			6th April, 2022
	@created		22nd July, 2020
	@package		Moojla
	@subpackage		edit.php
	@author			Lmskaran <http://Lmskaran.com>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html');
JHtml::_('behavior.tooltip');
JHtml::_('behavior.formvalidation');
JHtml::_('formbehavior.chosen', 'select');
JHtml::_('behavior.keepalive');
$componentParams = $this->params; // will be removed just use
$this->params instead
?>
<script type="text/javascript">
	// waiting spinner
	var outerDiv = jQuery('body');
	jQuery('<div id="loading"></div>')
		.css("background", "rgba(255, 255, 255, .8)
url('components/com_moojla/assets/images/import.gif') 50% 15%
no-repeat")
		.css("top", outerDiv.position().top -
jQuery(window).scrollTop())
		.css("left", outerDiv.position().left -
jQuery(window).scrollLeft())
		.css("width", outerDiv.width())
		.css("height", outerDiv.height())
		.css("position", "fixed")
		.css("opacity", "0.80")
		.css("-ms-filter",
"progid:DXImageTransform.Microsoft.Alpha(Opacity = 80)")
		.css("filter", "alpha(opacity = 80)")
		.css("display", "none")
		.appendTo(outerDiv);
	jQuery('#loading').show();
	// when page is ready remove and show
	jQuery(window).load(function() {
		jQuery('#moojla_loader').fadeIn('fast');
		jQuery('#loading').hide();
	});
</script>
<div id="moojla_loader" style="display: none;">
<form action="<?php echo
JRoute::_('index.php?option=com_moojla&layout=edit&id='.
(int) $this->item->id . $this->referral); ?>"
method="post" name="adminForm" id="adminForm"
class="form-validate" enctype="multipart/form-data">

<div class="form-horizontal">

	<?php echo JHtml::_('bootstrap.startTabSet',
'course_group_mapTab', array('active' =>
'details')); ?>

	<?php echo JHtml::_('bootstrap.addTab',
'course_group_mapTab', 'details',
JText::_('COM_MOOJLA_COURSE_GROUP_MAP_DETAILS', true)); ?>
		<div class="row-fluid form-horizontal-desktop">
			<div class="span6">
				<?php echo
JLayoutHelper::render('course_group_map.details_left', $this);
?>
			</div>
			<div class="span6">
				<?php echo
JLayoutHelper::render('course_group_map.details_right', $this);
?>
			</div>
		</div>
	<?php echo JHtml::_('bootstrap.endTab'); ?>

	<?php $this->ignore_fieldsets =
array('details','metadata','vdmmetadata','accesscontrol');
?>
	<?php $this->tab_name = 'course_group_mapTab'; ?>
	<?php echo JLayoutHelper::render('joomla.edit.params',
$this); ?>

	<?php if ($this->canDo->get('core.edit.created_by') ||
$this->canDo->get('core.edit.created') ||
$this->canDo->get('core.edit.state') ||
($this->canDo->get('core.delete') &&
$this->canDo->get('core.edit.state'))) : ?>
	<?php echo JHtml::_('bootstrap.addTab',
'course_group_mapTab', 'publishing',
JText::_('COM_MOOJLA_COURSE_GROUP_MAP_PUBLISHING', true)); ?>
		<div class="row-fluid form-horizontal-desktop">
			<div class="span6">
				<?php echo
JLayoutHelper::render('course_group_map.publishing', $this);
?>
			</div>
			<div class="span6">
				<?php echo
JLayoutHelper::render('course_group_map.publlshing', $this);
?>
			</div>
		</div>
	<?php echo JHtml::_('bootstrap.endTab'); ?>
	<?php endif; ?>

	<?php if ($this->canDo->get('core.admin')) : ?>
	<?php echo JHtml::_('bootstrap.addTab',
'course_group_mapTab', 'permissions',
JText::_('COM_MOOJLA_COURSE_GROUP_MAP_PERMISSION', true)); ?>
		<div class="row-fluid form-horizontal-desktop">
			<div class="span12">
				<fieldset class="adminform">
					<div class="adminformlist">
					<?php foreach
($this->form->getFieldset('accesscontrol') as $field):
?>
						<div>
							<?php echo $field->label; echo $field->input;?>
						</div>
						<div class="clearfix"></div>
					<?php endforeach; ?>
					</div>
				</fieldset>
			</div>
		</div>
	<?php echo JHtml::_('bootstrap.endTab'); ?>
	<?php endif; ?>

	<?php echo JHtml::_('bootstrap.endTabSet'); ?>

	<div>
		<input type="hidden" name="task"
value="course_group_map.edit" />
		<?php echo JHtml::_('form.token'); ?>
	</div>
</div>
</form>
</div>
course_group_map/tmpl/index.html000064400000000054151160405160013064
0ustar00<html><body
bgcolor="#FFFFFF"></body></html>course_group_map/view.html.php000064400000015554151160405160012554
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				Lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.77
	@build			6th April, 2022
	@created		22nd July, 2020
	@package		Moojla
	@subpackage		view.html.php
	@author			Lmskaran <http://Lmskaran.com>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

/**
 * Course_group_map View class
 */
class MoojlaViewCourse_group_map extends JViewLegacy
{
	/**
	 * display method of View
	 * @return void
	 */
	public function display($tpl = null)
	{
		// set params
		$this->params = JComponentHelper::getParams('com_moojla');
		// Assign the variables
		$this->form = $this->get('Form');
		$this->item = $this->get('Item');
		$this->script = $this->get('Script');
		$this->state = $this->get('State');
		// get action permissions
		$this->canDo = MoojlaHelper::getActions('course_group_map',
$this->item);
		// get input
		$jinput = JFactory::getApplication()->input;
		$this->ref = $jinput->get('ref', 0, 'word');
		$this->refid = $jinput->get('refid', 0, 'int');
		$return = $jinput->get('return', null, 'base64');
		// set the referral string
		$this->referral = '';
		if ($this->refid && $this->ref)
		{
			// return to the item that referred to this item
			$this->referral = '&ref=' . (string)$this->ref .
'&refid=' . (int)$this->refid;
		}
		elseif($this->ref)
		{
			// return to the list view that referred to this item
			$this->referral = '&ref=' . (string)$this->ref;
		}
		// check return value
		if (!is_null($return))
		{
			// add the return value
			$this->referral .= '&return=' . (string)$return;
		}

		// Set the toolbar
		$this->addToolBar();
		
		// Check for errors.
		if (count($errors = $this->get('Errors')))
		{
			throw new Exception(implode("\n", $errors), 500);
		}

		// Display the template
		parent::display($tpl);

		// Set the document
		$this->setDocument();
	}


	/**
	 * Setting the toolbar
	 */
	protected function addToolBar()
	{
		JFactory::getApplication()->input->set('hidemainmenu',
true);
		$user = JFactory::getUser();
		$userId	= $user->id;
		$isNew = $this->item->id == 0;

		JToolbarHelper::title( JText::_($isNew ?
'COM_MOOJLA_COURSE_GROUP_MAP_NEW' :
'COM_MOOJLA_COURSE_GROUP_MAP_EDIT'), 'pencil-2
article-add');
		// Built the actions for new and existing records.
		if (MoojlaHelper::checkString($this->referral))
		{
			if ($this->canDo->get('core.create') && $isNew)
			{
				// We can create the record.
				JToolBarHelper::save('course_group_map.save',
'JTOOLBAR_SAVE');
			}
			elseif ($this->canDo->get('core.edit'))
			{
				// We can save the record.
				JToolBarHelper::save('course_group_map.save',
'JTOOLBAR_SAVE');
			}
			if ($isNew)
			{
				// Do not creat but cancel.
				JToolBarHelper::cancel('course_group_map.cancel',
'JTOOLBAR_CANCEL');
			}
			else
			{
				// We can close it.
				JToolBarHelper::cancel('course_group_map.cancel',
'JTOOLBAR_CLOSE');
			}
		}
		else
		{
			if ($isNew)
			{
				// For new records, check the create permission.
				if ($this->canDo->get('core.create'))
				{
					JToolBarHelper::apply('course_group_map.apply',
'JTOOLBAR_APPLY');
					JToolBarHelper::save('course_group_map.save',
'JTOOLBAR_SAVE');
					JToolBarHelper::custom('course_group_map.save2new',
'save-new.png', 'save-new_f2.png',
'JTOOLBAR_SAVE_AND_NEW', false);
				};
				JToolBarHelper::cancel('course_group_map.cancel',
'JTOOLBAR_CANCEL');
			}
			else
			{
				if ($this->canDo->get('core.edit'))
				{
					// We can save the new record
					JToolBarHelper::apply('course_group_map.apply',
'JTOOLBAR_APPLY');
					JToolBarHelper::save('course_group_map.save',
'JTOOLBAR_SAVE');
					// We can save this record, but check the create permission to see
					// if we can return to make a new one.
					if ($this->canDo->get('core.create'))
					{
						JToolBarHelper::custom('course_group_map.save2new',
'save-new.png', 'save-new_f2.png',
'JTOOLBAR_SAVE_AND_NEW', false);
					}
				}
				$canVersion = ($this->canDo->get('core.version')
&& $this->canDo->get('course_group_map.version'));
				if ($this->state->params->get('save_history', 1)
&& $this->canDo->get('core.edit') &&
$canVersion)
				{
					JToolbarHelper::versions('com_moojla.course_group_map',
$this->item->id);
				}
				if ($this->canDo->get('core.create'))
				{
					JToolBarHelper::custom('course_group_map.save2copy',
'save-copy.png', 'save-copy_f2.png',
'JTOOLBAR_SAVE_AS_COPY', false);
				}
				JToolBarHelper::cancel('course_group_map.cancel',
'JTOOLBAR_CLOSE');
			}
		}
		JToolbarHelper::divider();
		// set help url for this view if found
		$help_url = MoojlaHelper::getHelpUrl('course_group_map');
		if (MoojlaHelper::checkString($help_url))
		{
			JToolbarHelper::help('COM_MOOJLA_HELP_MANAGER', false,
$help_url);
		}
	}

	/**
	 * Escapes a value for output in a view script.
	 *
	 * @param   mixed  $var  The output to escape.
	 *
	 * @return  mixed  The escaped value.
	 */
	public function escape($var)
	{
		if(strlen($var) > 30)
		{
    		// use the helper htmlEscape method instead and shorten the string
			return MoojlaHelper::htmlEscape($var, $this->_charset, true, 30);
		}
		// use the helper htmlEscape method instead.
		return MoojlaHelper::htmlEscape($var, $this->_charset);
	}

	/**
	 * Method to set up the document properties
	 *
	 * @return void
	 */
	protected function setDocument()
	{
		$isNew = ($this->item->id < 1);
		if (!isset($this->document))
		{
			$this->document = JFactory::getDocument();
		}
		$this->document->setTitle(JText::_($isNew ?
'COM_MOOJLA_COURSE_GROUP_MAP_NEW' :
'COM_MOOJLA_COURSE_GROUP_MAP_EDIT'));
		$this->document->addStyleSheet(JURI::root() .
"administrator/components/com_moojla/assets/css/course_group_map.css",
(MoojlaHelper::jVersion()->isCompatible('3.8.0')) ?
array('version' => 'auto') : 'text/css');
		$this->document->addScript(JURI::root() . $this->script,
(MoojlaHelper::jVersion()->isCompatible('3.8.0')) ?
array('version' => 'auto') :
'text/javascript');
		$this->document->addScript(JURI::root() .
"administrator/components/com_moojla/views/course_group_map/submitbutton.js",
(MoojlaHelper::jVersion()->isCompatible('3.8.0')) ?
array('version' => 'auto') :
'text/javascript'); 
		JText::script('view not acceptable. Error');
	}
}
course_group_maps/index.html000064400000000054151160405160012273
0ustar00<html><body
bgcolor="#FFFFFF"></body></html>course_group_maps/tmpl/default.php000064400000006053151160405160013414
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				Lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.77
	@build			6th April, 2022
	@created		22nd July, 2020
	@package		Moojla
	@subpackage		default.php
	@author			Lmskaran <http://Lmskaran.com>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

JHtml::_('behavior.tooltip');
JHtml::_('behavior.multiselect');
JHtml::_('dropdown.init');
JHtml::_('formbehavior.chosen',
'.multipleCoursegroupmapsfilterrole', null,
array('placeholder_text_multiple' => '- ' .
JText::_('COM_MOOJLA_FILTER_SELECT_ROLE') . ' -'));
JHtml::_('formbehavior.chosen', 'select');
if ($this->saveOrder)
{
	$saveOrderingUrl =
'index.php?option=com_moojla&task=course_group_maps.saveOrderAjax&tmpl=component';
	JHtml::_('sortablelist.sortable',
'course_group_mapList', 'adminForm',
strtolower($this->listDirn), $saveOrderingUrl);
}
?>
<form action="<?php echo
JRoute::_('index.php?option=com_moojla&view=course_group_maps');
?>" method="post" name="adminForm"
id="adminForm">
<?php if(!empty( $this->sidebar)): ?>
	<div id="j-sidebar-container" class="span2">
		<?php echo $this->sidebar; ?>
	</div>
	<div id="j-main-container" class="span10">
<?php else : ?>
	<div id="j-main-container">
<?php endif; ?>
<?php
	// Add the searchtools
	echo JLayoutHelper::render('joomla.searchtools.default',
array('view' => $this));
?>
<?php if (empty($this->items)): ?>
	<div class="alert alert-no-items">
		<?php echo JText::_('JGLOBAL_NO_MATCHING_RESULTS'); ?>
	</div>
<?php else : ?>
	<table class="table table-striped"
id="course_group_mapList">
		<thead><?php echo
$this->loadTemplate('head');?></thead>
		<tfoot><?php echo
$this->loadTemplate('foot');?></tfoot>
		<tbody><?php echo
$this->loadTemplate('body');?></tbody>
	</table>
	<?php // Load the batch processing form. ?>
	<?php if ($this->canCreate && $this->canEdit) : ?>
		<?php echo JHtml::_(
			'bootstrap.renderModal',
			'collapseModal',
			array(
				'title' =>
JText::_('COM_MOOJLA_COURSE_GROUP_MAPS_BATCH_OPTIONS'),
				'footer' =>
$this->loadTemplate('batch_footer')
			),
			$this->loadTemplate('batch_body')
		); ?>
	<?php endif; ?>
	<input type="hidden" name="boxchecked"
value="0" />
	</div>
<?php endif; ?>
	<input type="hidden" name="task" value=""
/>
	<?php echo JHtml::_('form.token'); ?>
</form>
course_group_maps/tmpl/default_batch_body.php000064400000002344151160405160015571
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				Lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.77
	@build			6th April, 2022
	@created		22nd July, 2020
	@package		Moojla
	@subpackage		default_batch_body.php
	@author			Lmskaran <http://Lmskaran.com>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

?>

<p><?php echo
JText::_('COM_MOOJLA_COURSE_GROUP_MAPS_BATCH_TIP');
?></p>
<?php echo $this->batchDisplay;
?>course_group_maps/tmpl/default_batch_footer.php000064400000002742151160405170016135
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				Lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.77
	@build			6th April, 2022
	@created		22nd July, 2020
	@package		Moojla
	@subpackage		default_batch_footer.php
	@author			Lmskaran <http://Lmskaran.com>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

?>
<!-- clear the batch values if cancel -->
<button class="btn" type="button"
onclick="" data-dismiss="modal">
	<?php echo JText::_('JCANCEL'); ?>
</button>
<!-- post the batch values if process -->
<button class="btn btn-success" type="submit"
onclick="Joomla.submitbutton('course_group_map.batch');">
	<?php echo JText::_('JGLOBAL_BATCH_PROCESS'); ?>
</button>course_group_maps/tmpl/default_body.php000064400000007475151160405170014443
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				Lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.77
	@build			6th April, 2022
	@created		22nd July, 2020
	@package		Moojla
	@subpackage		default_body.php
	@author			Lmskaran <http://Lmskaran.com>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

$edit =
"index.php?option=com_moojla&view=course_group_maps&task=course_group_map.edit";

?>
<?php foreach ($this->items as $i => $item): ?>
	<?php
		$canCheckin = $this->user->authorise('core.manage',
'com_checkin') || $item->checked_out == $this->user->id
|| $item->checked_out == 0;
		$userChkOut = JFactory::getUser($item->checked_out);
		$canDo =
MoojlaHelper::getActions('course_group_map',$item,'course_group_maps');
	?>
	<tr class="row<?php echo $i % 2; ?>">
		<td class="order nowrap center hidden-phone">
		<?php if ($canDo->get('core.edit.state')): ?>
			<?php
				$iconClass = '';
				if (!$this->saveOrder)
				{
					$iconClass = ' inactive tip-top" hasTooltip"
title="' . JHtml::tooltipText('JORDERINGDISABLED');
				}
			?>
			<span class="sortable-handler<?php echo $iconClass;
?>">
				<i class="icon-menu"></i>
			</span>
			<?php if ($this->saveOrder) : ?>
				<input type="text" style="display:none"
name="order[]" size="5"
				value="<?php echo $item->ordering; ?>"
class="width-20 text-area-order " />
			<?php endif; ?>
		<?php else: ?>
			&#8942;
		<?php endif; ?>
		</td>
		<td class="nowrap center">
		<?php if ($canDo->get('core.edit')): ?>
				<?php if ($item->checked_out) : ?>
					<?php if ($canCheckin) : ?>
						<?php echo JHtml::_('grid.id', $i, $item->id); ?>
					<?php else: ?>
						&#9633;
					<?php endif; ?>
				<?php else: ?>
					<?php echo JHtml::_('grid.id', $i, $item->id); ?>
				<?php endif; ?>
		<?php else: ?>
			&#9633;
		<?php endif; ?>
		</td>
		<td class="hidden-phone">
			<?php echo $this->escape($item->moojlacourse_fullname); ?>
		</td>
		<td class="hidden-phone">
			<div>
			<?php echo $this->escape($item->course_group_title);
?></br><?=
$this->getModel()->group_users($item->course_group)?>
</br><?=
$this->getModel()->group_courses($item->course_group,
$item->moojlacourse)?>
<!--  [1313]=> Custom Course Group -->
			</div>
		</td>
		<td class="hidden-phone">
			<?php echo JText::_($item->role); ?>
		</td>
		<td class="center">
		<?php if ($canDo->get('core.edit.state')) : ?>
				<?php if ($item->checked_out) : ?>
					<?php if ($canCheckin) : ?>
						<?php echo JHtml::_('jgrid.published',
$item->published, $i, 'course_group_maps.', true,
'cb'); ?>
					<?php else: ?>
						<?php echo JHtml::_('jgrid.published',
$item->published, $i, 'course_group_maps.', false,
'cb'); ?>
					<?php endif; ?>
				<?php else: ?>
					<?php echo JHtml::_('jgrid.published',
$item->published, $i, 'course_group_maps.', true,
'cb'); ?>
				<?php endif; ?>
		<?php else: ?>
			<?php echo JHtml::_('jgrid.published', $item->published,
$i, 'course_group_maps.', false, 'cb'); ?>
		<?php endif; ?>
		</td>
		<td class="nowrap center hidden-phone">
			<?php echo $item->id; ?>
		</td>
	</tr>
<?php endforeach;
?>course_group_maps/tmpl/default_foot.php000064400000002304151160405170014437
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				Lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.77
	@build			6th April, 2022
	@created		22nd July, 2020
	@package		Moojla
	@subpackage		default_foot.php
	@author			Lmskaran <http://Lmskaran.com>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

?>
<tr>
	<td colspan="7"><?php echo
$this->pagination->getListFooter(); ?></td>
</tr>course_group_maps/tmpl/default_head.php000064400000005313151160405170014374
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				Lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.77
	@build			6th April, 2022
	@created		22nd July, 2020
	@package		Moojla
	@subpackage		default_head.php
	@author			Lmskaran <http://Lmskaran.com>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

?>
<tr>
	<?php if ($this->canEdit&& $this->canState): ?>
		<th width="1%" class="nowrap center
hidden-phone">
			<?php echo JHtml::_('searchtools.sort', '',
'a.ordering', $this->listDirn, $this->listOrder, null,
'asc', 'JGRID_HEADING_ORDERING',
'icon-menu-2'); ?>
		</th>
		<th width="20" class="nowrap center">
			<?php echo JHtml::_('grid.checkall'); ?>
		</th>
	<?php else: ?>
		<th width="20" class="nowrap center
hidden-phone">
			&#9662;
		</th>
		<th width="20" class="nowrap center">
			&#9632;
		</th>
	<?php endif; ?>
	<th class="nowrap hidden-phone" >
			<?php echo JHtml::_('searchtools.sort',
'COM_MOOJLA_COURSE_GROUP_MAP_MOOJLACOURSE_LABEL',
'g.fullname', $this->listDirn, $this->listOrder); ?>
	</th>
	<th class="nowrap hidden-phone" >
			<?php echo JHtml::_('searchtools.sort',
'COM_MOOJLA_COURSE_GROUP_MAP_COURSE_GROUP_LABEL',
'h.title', $this->listDirn, $this->listOrder); ?>
	</th>
	<th class="nowrap hidden-phone" >
			<?php echo JHtml::_('searchtools.sort',
'COM_MOOJLA_COURSE_GROUP_MAP_ROLE_LABEL', 'a.role',
$this->listDirn, $this->listOrder); ?>
	</th>
	<?php if ($this->canState): ?>
		<th width="10" class="nowrap center" >
			<?php echo JHtml::_('searchtools.sort',
'COM_MOOJLA_COURSE_GROUP_MAP_STATUS', 'a.published',
$this->listDirn, $this->listOrder); ?>
		</th>
	<?php else: ?>
		<th width="10" class="nowrap center" >
			<?php echo JText::_('COM_MOOJLA_COURSE_GROUP_MAP_STATUS');
?>
		</th>
	<?php endif; ?>
	<th width="5" class="nowrap center hidden-phone"
>
			<?php echo JHtml::_('searchtools.sort',
'COM_MOOJLA_COURSE_GROUP_MAP_ID', 'a.id',
$this->listDirn, $this->listOrder); ?>
	</th>
</tr>course_group_maps/tmpl/default_toolbar.php000064400000007064151160405170015142
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				Lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.77
	@build			6th April, 2022
	@created		22nd July, 2020
	@package		Moojla
	@subpackage		default_toolbar.php
	@author			Lmskaran <http://Lmskaran.com>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

?>
<div id="filter-bar" class="btn-toolbar">
        <div class="filter-search btn-group pull-left">
            <label for="filter_search"
class="element-invisible"><?php echo
JText::_('Search');?></label>
            <input type="text" name="filter_search"
id="filter_search" placeholder="<?php echo
JText::_('JSEARCH_FILTER'); ?>" value="<?php echo
$this->escape($this->state->get('filter.search'));
?>" class="hasTooltip" title="<?php echo
JHtml::tooltipText('Search Course_group_maps'); ?>" />
        </div>
        <div class="btn-group pull-left">
            <button type="submit" class="btn
hasTooltip" title="<?php echo
JHtml::tooltipText('JSEARCH_FILTER_SUBMIT'); ?>"><i
class="icon-search"></i></button>
            <button type="button" class="btn
hasTooltip" title="<?php echo
JHtml::tooltipText('JSEARCH_FILTER_CLEAR'); ?>"
onclick="document.id('filter_search').value='';this.form.submit();"><i
class="icon-remove"></i></button>
        </div>
        <div class="btn-group pull-right hidden-phone">
            <label for="limit"
class="element-invisible"><?php echo
JText::_('JFIELD_PLG_SEARCH_SEARCHLIMIT_DESC');?></label>
            <?php echo $this->pagination->getLimitBox(); ?>
        </div>
        <div class="btn-group pull-right hidden-phone">
            <label for="directionTable"
class="element-invisible"><?php echo
JText::_('JFIELD_ORDERING_DESC');?></label>
            <select name="directionTable"
id="directionTable" class="input-medium"
onchange="Joomla.orderTable()">
                <option value=""><?php echo
JText::_('JFIELD_ORDERING_DESC');?></option>
                <option value="asc" <?php if
($this->listDirn == 'asc') echo
'selected="selected"'; ?>><?php echo
JText::_('JGLOBAL_ORDER_ASCENDING');?></option>
                <option value="desc" <?php if
($this->listDirn == 'desc') echo
'selected="selected"'; ?>><?php echo
JText::_('JGLOBAL_ORDER_DESCENDING');?></option>
            </select>
        </div>
        <div class="btn-group pull-right">
            <label for="sortTable"
class="element-invisible"><?php echo
JText::_('JGLOBAL_SORT_BY');?></label>
            <select name="sortTable" id="sortTable"
class="input-medium" onchange="Joomla.orderTable()">
                <option value=""><?php echo
JText::_('JGLOBAL_SORT_BY');?></option>
                <?php echo JHtml::_('select.options',
$this->getSortFields(), 'value', 'text',
$this->listOrder);?>
            </select>
        </div>
    </div>
<div class="clearfix">
</div>course_group_maps/tmpl/index.html000064400000000054151160405170013250
0ustar00<html><body
bgcolor="#FFFFFF"></body></html>course_group_maps/view.html.php000064400000020256151160405170012733
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				Lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.77
	@build			6th April, 2022
	@created		22nd July, 2020
	@package		Moojla
	@subpackage		view.html.php
	@author			Lmskaran <http://Lmskaran.com>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

/**
 * Moojla View class for the Course_group_maps
 */
class MoojlaViewCourse_group_maps extends JViewLegacy
{
	/**
	 * Course_group_maps view display method
	 * @return void
	 */
	function display($tpl = null)
	{
		if ($this->getLayout() !== 'modal')
		{
			// Include helper submenu
			MoojlaHelper::addSubmenu('course_group_maps');
		}

		// Assign data to the view
		$this->items = $this->get('Items');
		$this->pagination = $this->get('Pagination');
		$this->state = $this->get('State');
		$this->user = JFactory::getUser();
		// Load the filter form from xml.
		$this->filterForm = $this->get('FilterForm');
		// Load the active filters.
		$this->activeFilters = $this->get('ActiveFilters');
		// Add the list ordering clause.
		$this->listOrder =
$this->escape($this->state->get('list.ordering',
'a.id'));
		$this->listDirn =
$this->escape($this->state->get('list.direction',
'DESC'));
		$this->saveOrder = $this->listOrder == 'a.ordering';
		// set the return here value
		$this->return_here = urlencode(base64_encode((string)
JUri::getInstance()));
		// get global action permissions
		$this->canDo = MoojlaHelper::getActions('course_group_map');
		$this->canEdit = $this->canDo->get('core.edit');
		$this->canState =
$this->canDo->get('core.edit.state');
		$this->canCreate = $this->canDo->get('core.create');
		$this->canDelete = $this->canDo->get('core.delete');
		$this->canBatch = $this->canDo->get('core.batch');

		// We don't need toolbar in the modal window.
		if ($this->getLayout() !== 'modal')
		{
			$this->addToolbar();
			$this->sidebar = JHtmlSidebar::render();
			// load the batch html
			if ($this->canCreate && $this->canEdit &&
$this->canState)
			{
				$this->batchDisplay = JHtmlBatch_::render();
			}
		}
		
		// Check for errors.
		if (count($errors = $this->get('Errors')))
		{
			throw new Exception(implode("\n", $errors), 500);
		}

		// Display the template
		parent::display($tpl);

		// Set the document
		$this->setDocument();
	}

	/**
	 * Setting the toolbar
	 */
	protected function addToolBar()
	{
		JToolBarHelper::title(JText::_('COM_MOOJLA_COURSE_GROUP_MAPS'),
'grid-2');
		JHtmlSidebar::setAction('index.php?option=com_moojla&view=course_group_maps');
		JFormHelper::addFieldPath(JPATH_COMPONENT . '/models/fields');

		if ($this->canCreate)
		{
			JToolBarHelper::addNew('course_group_map.add');
		}

		// Only load if there are items
		if (MoojlaHelper::checkArray($this->items))
		{
			if ($this->canEdit)
			{
				JToolBarHelper::editList('course_group_map.edit');
			}

			if ($this->canState)
			{
				JToolBarHelper::publishList('course_group_maps.publish');
				JToolBarHelper::unpublishList('course_group_maps.unpublish');
				JToolBarHelper::archiveList('course_group_maps.archive');

				if ($this->canDo->get('core.admin'))
				{
					JToolBarHelper::checkin('course_group_maps.checkin');
				}
			}

			// Add a batch button
			if ($this->canBatch && $this->canCreate &&
$this->canEdit && $this->canState)
			{
				// Get the toolbar object instance
				$bar = JToolBar::getInstance('toolbar');
				// set the batch button name
				$title = JText::_('JTOOLBAR_BATCH');
				// Instantiate a new JLayoutFile instance and render the batch button
				$layout = new JLayoutFile('joomla.toolbar.batch');
				// add the button to the page
				$dhtml = $layout->render(array('title' => $title));
				$bar->appendButton('Custom', $dhtml, 'batch');
			}

			if ($this->state->get('filter.published') == -2
&& ($this->canState && $this->canDelete))
			{
				JToolbarHelper::deleteList('',
'course_group_maps.delete', 'JTOOLBAR_EMPTY_TRASH');
			}
			elseif ($this->canState && $this->canDelete)
			{
				JToolbarHelper::trash('course_group_maps.trash');
			}
		}
		if
($this->user->authorise('course_group_map.migrate_from_joomdle',
'com_moojla'))
		{
			// add Migrate from Joomdle button.
			JToolBarHelper::custom('course_group_maps.migrateFromJoomdle',
'database custom-button-migratefromjoomdle', '',
'COM_MOOJLA_MIGRATE_FROM_JOOMDLE', false);
		}
		if ($this->user->authorise('course_group_map.fetch',
'com_moojla'))
		{
			// add fetch button.
			JToolBarHelper::custom('course_group_maps.fetch', 'joomla
custom-button-fetch', '', 'COM_MOOJLA_FETCH',
false);
		}

		// set help url for this view if found
		$help_url = MoojlaHelper::getHelpUrl('course_group_maps');
		if (MoojlaHelper::checkString($help_url))
		{
				JToolbarHelper::help('COM_MOOJLA_HELP_MANAGER', false,
$help_url);
		}

		// add the options comp button
		if ($this->canDo->get('core.admin') ||
$this->canDo->get('core.options'))
		{
			JToolBarHelper::preferences('com_moojla');
		}

		// Only load published batch if state and batch is allowed
		if ($this->canState && $this->canBatch)
		{
			JHtmlBatch_::addListSelection(
				JText::_('COM_MOOJLA_KEEP_ORIGINAL_STATE'),
				'batch[published]',
				JHtml::_('select.options',
JHtml::_('jgrid.publishedOptions', array('all' =>
false)), 'value', 'text', '', true)
			);
		}

		// Only load Role batch if create, edit, and batch is allowed
		if ($this->canBatch && $this->canCreate &&
$this->canEdit)
		{
			// Set Role Selection
			$this->roleOptions =
JFormHelper::loadFieldType('coursegroupmapsfilterrole')->options;
			// We do some sanitation for Role filter
			if (MoojlaHelper::checkArray($this->roleOptions) &&
				isset($this->roleOptions[0]->value) &&
				!MoojlaHelper::checkString($this->roleOptions[0]->value))
			{
				unset($this->roleOptions[0]);
			}
			// Role Batch Selection
			JHtmlBatch_::addListSelection(
				'- Keep Original
'.JText::_('COM_MOOJLA_COURSE_GROUP_MAP_ROLE_LABEL').'
-',
				'batch[role]',
				JHtml::_('select.options', $this->roleOptions,
'value', 'text')
			);
		}
	}

	/**
	 * Method to set up the document properties
	 *
	 * @return void
	 */
	protected function setDocument()
	{
		if (!isset($this->document))
		{
			$this->document = JFactory::getDocument();
		}
		$this->document->setTitle(JText::_('COM_MOOJLA_COURSE_GROUP_MAPS'));
		$this->document->addStyleSheet(JURI::root() .
"administrator/components/com_moojla/assets/css/course_group_maps.css",
(MoojlaHelper::jVersion()->isCompatible('3.8.0')) ?
array('version' => 'auto') : 'text/css');
	}

	/**
	 * Escapes a value for output in a view script.
	 *
	 * @param   mixed  $var  The output to escape.
	 *
	 * @return  mixed  The escaped value.
	 */
	public function escape($var)
	{
		if(strlen($var) > 50)
		{
			// use the helper htmlEscape method instead and shorten the string
			return MoojlaHelper::htmlEscape($var, $this->_charset, true);
		}
		// use the helper htmlEscape method instead.
		return MoojlaHelper::htmlEscape($var, $this->_charset);
	}

	/**
	 * Returns an array of fields the table can be sorted by
	 *
	 * @return  array  Array containing the field name to sort by as the key
and display text as value
	 */
	protected function getSortFields()
	{
		return array(
			'a.ordering' =>
JText::_('JGRID_HEADING_ORDERING'),
			'a.published' => JText::_('JSTATUS'),
			'g.fullname' =>
JText::_('COM_MOOJLA_COURSE_GROUP_MAP_MOOJLACOURSE_LABEL'),
			'h.title' =>
JText::_('COM_MOOJLA_COURSE_GROUP_MAP_COURSE_GROUP_LABEL'),
			'a.role' =>
JText::_('COM_MOOJLA_COURSE_GROUP_MAP_ROLE_LABEL'),
			'a.id' => JText::_('JGRID_HEADING_ID')
		);
	}
}
enrolment/submitbutton.js000064400000002746151160405170011655
0ustar00/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				Lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.77
	@build			6th April, 2022
	@created		22nd July, 2020
	@package		Moojla
	@subpackage		submitbutton.js
	@author			Lmskaran <http://Lmskaran.com>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

Joomla.submitbutton = function(task)
{
	if (task == ''){
		return false;
	} else { 
		var action = task.split('.');
		if (action[1] == 'cancel' || action[1] == 'close' ||
document.formvalidator.isValid(document.getElementById("adminForm"))){
			Joomla.submitform(task, document.getElementById("adminForm"));
			return true;
		} else {
			alert(Joomla.JText._('enrolment, some values are not
acceptable.','Some values are unacceptable'));
			return false;
		}
	}
}enrolment/tmpl/edit.php000064400000011335151160405170011164
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				Lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.77
	@build			6th April, 2022
	@created		22nd July, 2020
	@package		Moojla
	@subpackage		edit.php
	@author			Lmskaran <http://Lmskaran.com>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html');
JHtml::_('behavior.tooltip');
JHtml::_('behavior.formvalidation');
JHtml::_('formbehavior.chosen', 'select');
JHtml::_('behavior.keepalive');
$componentParams = $this->params; // will be removed just use
$this->params instead
?>
<script type="text/javascript">
	// waiting spinner
	var outerDiv = jQuery('body');
	jQuery('<div id="loading"></div>')
		.css("background", "rgba(255, 255, 255, .8)
url('components/com_moojla/assets/images/import.gif') 50% 15%
no-repeat")
		.css("top", outerDiv.position().top -
jQuery(window).scrollTop())
		.css("left", outerDiv.position().left -
jQuery(window).scrollLeft())
		.css("width", outerDiv.width())
		.css("height", outerDiv.height())
		.css("position", "fixed")
		.css("opacity", "0.80")
		.css("-ms-filter",
"progid:DXImageTransform.Microsoft.Alpha(Opacity = 80)")
		.css("filter", "alpha(opacity = 80)")
		.css("display", "none")
		.appendTo(outerDiv);
	jQuery('#loading').show();
	// when page is ready remove and show
	jQuery(window).load(function() {
		jQuery('#moojla_loader').fadeIn('fast');
		jQuery('#loading').hide();
	});
</script>
<div id="moojla_loader" style="display: none;">
<form action="<?php echo
JRoute::_('index.php?option=com_moojla&layout=edit&id='.
(int) $this->item->id . $this->referral); ?>"
method="post" name="adminForm" id="adminForm"
class="form-validate" enctype="multipart/form-data">

<div class="form-horizontal">

	<?php echo JHtml::_('bootstrap.startTabSet',
'enrolmentTab', array('active' =>
'details')); ?>

	<?php echo JHtml::_('bootstrap.addTab',
'enrolmentTab', 'details',
JText::_('COM_MOOJLA_ENROLMENT_DETAILS', true)); ?>
		<div class="row-fluid form-horizontal-desktop">
			<div class="span6">
				<?php echo JLayoutHelper::render('enrolment.details_left',
$this); ?>
			</div>
			<div class="span6">
				<?php echo
JLayoutHelper::render('enrolment.details_right', $this); ?>
			</div>
		</div>
	<?php echo JHtml::_('bootstrap.endTab'); ?>

	<?php $this->ignore_fieldsets =
array('details','metadata','vdmmetadata','accesscontrol');
?>
	<?php $this->tab_name = 'enrolmentTab'; ?>
	<?php echo JLayoutHelper::render('joomla.edit.params',
$this); ?>

	<?php if ($this->canDo->get('core.edit.created_by') ||
$this->canDo->get('core.edit.created') ||
$this->canDo->get('core.edit.state') ||
($this->canDo->get('core.delete') &&
$this->canDo->get('core.edit.state'))) : ?>
	<?php echo JHtml::_('bootstrap.addTab',
'enrolmentTab', 'publishing',
JText::_('COM_MOOJLA_ENROLMENT_PUBLISHING', true)); ?>
		<div class="row-fluid form-horizontal-desktop">
			<div class="span6">
				<?php echo JLayoutHelper::render('enrolment.publishing',
$this); ?>
			</div>
			<div class="span6">
				<?php echo JLayoutHelper::render('enrolment.publlshing',
$this); ?>
			</div>
		</div>
	<?php echo JHtml::_('bootstrap.endTab'); ?>
	<?php endif; ?>

	<?php if ($this->canDo->get('core.admin')) : ?>
	<?php echo JHtml::_('bootstrap.addTab',
'enrolmentTab', 'permissions',
JText::_('COM_MOOJLA_ENROLMENT_PERMISSION', true)); ?>
		<div class="row-fluid form-horizontal-desktop">
			<div class="span12">
				<fieldset class="adminform">
					<div class="adminformlist">
					<?php foreach
($this->form->getFieldset('accesscontrol') as $field):
?>
						<div>
							<?php echo $field->label; echo $field->input;?>
						</div>
						<div class="clearfix"></div>
					<?php endforeach; ?>
					</div>
				</fieldset>
			</div>
		</div>
	<?php echo JHtml::_('bootstrap.endTab'); ?>
	<?php endif; ?>

	<?php echo JHtml::_('bootstrap.endTabSet'); ?>

	<div>
		<input type="hidden" name="task"
value="enrolment.edit" />
		<?php echo JHtml::_('form.token'); ?>
	</div>
</div>
</form>
</div>
enrolment/tmpl/index.html000064400000000054151160405170011517
0ustar00<html><body
bgcolor="#FFFFFF"></body></html>enrolment/view.html.php000064400000015275151160405170011207
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				Lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.77
	@build			6th April, 2022
	@created		22nd July, 2020
	@package		Moojla
	@subpackage		view.html.php
	@author			Lmskaran <http://Lmskaran.com>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

/**
 * Enrolment View class
 */
class MoojlaViewEnrolment extends JViewLegacy
{
	/**
	 * display method of View
	 * @return void
	 */
	public function display($tpl = null)
	{
		// set params
		$this->params = JComponentHelper::getParams('com_moojla');
		// Assign the variables
		$this->form = $this->get('Form');
		$this->item = $this->get('Item');
		$this->script = $this->get('Script');
		$this->state = $this->get('State');
		// get action permissions
		$this->canDo = MoojlaHelper::getActions('enrolment',
$this->item);
		// get input
		$jinput = JFactory::getApplication()->input;
		$this->ref = $jinput->get('ref', 0, 'word');
		$this->refid = $jinput->get('refid', 0, 'int');
		$return = $jinput->get('return', null, 'base64');
		// set the referral string
		$this->referral = '';
		if ($this->refid && $this->ref)
		{
			// return to the item that referred to this item
			$this->referral = '&ref=' . (string)$this->ref .
'&refid=' . (int)$this->refid;
		}
		elseif($this->ref)
		{
			// return to the list view that referred to this item
			$this->referral = '&ref=' . (string)$this->ref;
		}
		// check return value
		if (!is_null($return))
		{
			// add the return value
			$this->referral .= '&return=' . (string)$return;
		}

		// Set the toolbar
		$this->addToolBar();
		
		// Check for errors.
		if (count($errors = $this->get('Errors')))
		{
			throw new Exception(implode("\n", $errors), 500);
		}

		// Display the template
		parent::display($tpl);

		// Set the document
		$this->setDocument();
	}


	/**
	 * Setting the toolbar
	 */
	protected function addToolBar()
	{
		JFactory::getApplication()->input->set('hidemainmenu',
true);
		$user = JFactory::getUser();
		$userId	= $user->id;
		$isNew = $this->item->id == 0;

		JToolbarHelper::title( JText::_($isNew ?
'COM_MOOJLA_ENROLMENT_NEW' :
'COM_MOOJLA_ENROLMENT_EDIT'), 'pencil-2 article-add');
		// Built the actions for new and existing records.
		if (MoojlaHelper::checkString($this->referral))
		{
			if ($this->canDo->get('core.create') && $isNew)
			{
				// We can create the record.
				JToolBarHelper::save('enrolment.save',
'JTOOLBAR_SAVE');
			}
			elseif ($this->canDo->get('core.edit'))
			{
				// We can save the record.
				JToolBarHelper::save('enrolment.save',
'JTOOLBAR_SAVE');
			}
			if ($isNew)
			{
				// Do not creat but cancel.
				JToolBarHelper::cancel('enrolment.cancel',
'JTOOLBAR_CANCEL');
			}
			else
			{
				// We can close it.
				JToolBarHelper::cancel('enrolment.cancel',
'JTOOLBAR_CLOSE');
			}
		}
		else
		{
			if ($isNew)
			{
				// For new records, check the create permission.
				if ($this->canDo->get('core.create'))
				{
					JToolBarHelper::apply('enrolment.apply',
'JTOOLBAR_APPLY');
					JToolBarHelper::save('enrolment.save',
'JTOOLBAR_SAVE');
					JToolBarHelper::custom('enrolment.save2new',
'save-new.png', 'save-new_f2.png',
'JTOOLBAR_SAVE_AND_NEW', false);
				};
				JToolBarHelper::cancel('enrolment.cancel',
'JTOOLBAR_CANCEL');
			}
			else
			{
				if ($this->canDo->get('core.edit'))
				{
					// We can save the new record
					JToolBarHelper::apply('enrolment.apply',
'JTOOLBAR_APPLY');
					JToolBarHelper::save('enrolment.save',
'JTOOLBAR_SAVE');
					// We can save this record, but check the create permission to see
					// if we can return to make a new one.
					if ($this->canDo->get('core.create'))
					{
						JToolBarHelper::custom('enrolment.save2new',
'save-new.png', 'save-new_f2.png',
'JTOOLBAR_SAVE_AND_NEW', false);
					}
				}
				$canVersion = ($this->canDo->get('core.version')
&& $this->canDo->get('enrolment.version'));
				if ($this->state->params->get('save_history', 1)
&& $this->canDo->get('core.edit') &&
$canVersion)
				{
					JToolbarHelper::versions('com_moojla.enrolment',
$this->item->id);
				}
				if ($this->canDo->get('core.create'))
				{
					JToolBarHelper::custom('enrolment.save2copy',
'save-copy.png', 'save-copy_f2.png',
'JTOOLBAR_SAVE_AS_COPY', false);
				}
				JToolBarHelper::cancel('enrolment.cancel',
'JTOOLBAR_CLOSE');
			}
		}
		JToolbarHelper::divider();
		// set help url for this view if found
		$help_url = MoojlaHelper::getHelpUrl('enrolment');
		if (MoojlaHelper::checkString($help_url))
		{
			JToolbarHelper::help('COM_MOOJLA_HELP_MANAGER', false,
$help_url);
		}
	}

	/**
	 * Escapes a value for output in a view script.
	 *
	 * @param   mixed  $var  The output to escape.
	 *
	 * @return  mixed  The escaped value.
	 */
	public function escape($var)
	{
		if(strlen($var) > 30)
		{
    		// use the helper htmlEscape method instead and shorten the string
			return MoojlaHelper::htmlEscape($var, $this->_charset, true, 30);
		}
		// use the helper htmlEscape method instead.
		return MoojlaHelper::htmlEscape($var, $this->_charset);
	}

	/**
	 * Method to set up the document properties
	 *
	 * @return void
	 */
	protected function setDocument()
	{
		$isNew = ($this->item->id < 1);
		if (!isset($this->document))
		{
			$this->document = JFactory::getDocument();
		}
		$this->document->setTitle(JText::_($isNew ?
'COM_MOOJLA_ENROLMENT_NEW' :
'COM_MOOJLA_ENROLMENT_EDIT'));
		$this->document->addStyleSheet(JURI::root() .
"administrator/components/com_moojla/assets/css/enrolment.css",
(MoojlaHelper::jVersion()->isCompatible('3.8.0')) ?
array('version' => 'auto') : 'text/css');
		$this->document->addScript(JURI::root() . $this->script,
(MoojlaHelper::jVersion()->isCompatible('3.8.0')) ?
array('version' => 'auto') :
'text/javascript');
		$this->document->addScript(JURI::root() .
"administrator/components/com_moojla/views/enrolment/submitbutton.js",
(MoojlaHelper::jVersion()->isCompatible('3.8.0')) ?
array('version' => 'auto') :
'text/javascript'); 
		JText::script('view not acceptable. Error');
	}
}
enrolments/index.html000064400000000054151160405170010726
0ustar00<html><body
bgcolor="#FFFFFF"></body></html>enrolments/tmpl/default.php000064400000005534151160405170012052
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				Lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.77
	@build			6th April, 2022
	@created		22nd July, 2020
	@package		Moojla
	@subpackage		default.php
	@author			Lmskaran <http://Lmskaran.com>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

JHtml::_('behavior.tooltip');
JHtml::_('behavior.multiselect');
JHtml::_('dropdown.init');
JHtml::_('formbehavior.chosen', 'select');
if ($this->saveOrder)
{
	$saveOrderingUrl =
'index.php?option=com_moojla&task=enrolments.saveOrderAjax&tmpl=component';
	JHtml::_('sortablelist.sortable', 'enrolmentList',
'adminForm', strtolower($this->listDirn), $saveOrderingUrl);
}
?>
<form action="<?php echo
JRoute::_('index.php?option=com_moojla&view=enrolments');
?>" method="post" name="adminForm"
id="adminForm">
<?php if(!empty( $this->sidebar)): ?>
	<div id="j-sidebar-container" class="span2">
		<?php echo $this->sidebar; ?>
	</div>
	<div id="j-main-container" class="span10">
<?php else : ?>
	<div id="j-main-container">
<?php endif; ?>
<?php
	// Add the searchtools
	echo JLayoutHelper::render('joomla.searchtools.default',
array('view' => $this));
?>
<?php if (empty($this->items)): ?>
	<div class="alert alert-no-items">
		<?php echo JText::_('JGLOBAL_NO_MATCHING_RESULTS'); ?>
	</div>
<?php else : ?>
	<table class="table table-striped"
id="enrolmentList">
		<thead><?php echo
$this->loadTemplate('head');?></thead>
		<tfoot><?php echo
$this->loadTemplate('foot');?></tfoot>
		<tbody><?php echo
$this->loadTemplate('body');?></tbody>
	</table>
	<?php // Load the batch processing form. ?>
	<?php if ($this->canCreate && $this->canEdit) : ?>
		<?php echo JHtml::_(
			'bootstrap.renderModal',
			'collapseModal',
			array(
				'title' =>
JText::_('COM_MOOJLA_ENROLMENTS_BATCH_OPTIONS'),
				'footer' =>
$this->loadTemplate('batch_footer')
			),
			$this->loadTemplate('batch_body')
		); ?>
	<?php endif; ?>
	<input type="hidden" name="boxchecked"
value="0" />
	</div>
<?php endif; ?>
	<input type="hidden" name="task" value=""
/>
	<?php echo JHtml::_('form.token'); ?>
</form>
enrolments/tmpl/default_batch_body.php000064400000002335151160405170014224
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				Lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.77
	@build			6th April, 2022
	@created		22nd July, 2020
	@package		Moojla
	@subpackage		default_batch_body.php
	@author			Lmskaran <http://Lmskaran.com>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

?>

<p><?php echo
JText::_('COM_MOOJLA_ENROLMENTS_BATCH_TIP'); ?></p>
<?php echo $this->batchDisplay;
?>enrolments/tmpl/default_batch_footer.php000064400000002733151160405170014567
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				Lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.77
	@build			6th April, 2022
	@created		22nd July, 2020
	@package		Moojla
	@subpackage		default_batch_footer.php
	@author			Lmskaran <http://Lmskaran.com>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

?>
<!-- clear the batch values if cancel -->
<button class="btn" type="button"
onclick="" data-dismiss="modal">
	<?php echo JText::_('JCANCEL'); ?>
</button>
<!-- post the batch values if process -->
<button class="btn btn-success" type="submit"
onclick="Joomla.submitbutton('enrolment.batch');">
	<?php echo JText::_('JGLOBAL_BATCH_PROCESS'); ?>
</button>enrolments/tmpl/default_body.php000064400000010474151160405170013066
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				Lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.77
	@build			6th April, 2022
	@created		22nd July, 2020
	@package		Moojla
	@subpackage		default_body.php
	@author			Lmskaran <http://Lmskaran.com>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

$edit =
"index.php?option=com_moojla&view=enrolments&task=enrolment.edit";

?>
<?php foreach ($this->items as $i => $item): ?>
	<?php
		$canCheckin = $this->user->authorise('core.manage',
'com_checkin') || $item->checked_out == $this->user->id
|| $item->checked_out == 0;
		$userChkOut = JFactory::getUser($item->checked_out);
		$canDo =
MoojlaHelper::getActions('enrolment',$item,'enrolments');
	?>
	<tr class="row<?php echo $i % 2; ?>">
		<td class="order nowrap center hidden-phone">
		<?php if ($canDo->get('core.edit.state')): ?>
			<?php
				$iconClass = '';
				if (!$this->saveOrder)
				{
					$iconClass = ' inactive tip-top" hasTooltip"
title="' . JHtml::tooltipText('JORDERINGDISABLED');
				}
			?>
			<span class="sortable-handler<?php echo $iconClass;
?>">
				<i class="icon-menu"></i>
			</span>
			<?php if ($this->saveOrder) : ?>
				<input type="text" style="display:none"
name="order[]" size="5"
				value="<?php echo $item->ordering; ?>"
class="width-20 text-area-order " />
			<?php endif; ?>
		<?php else: ?>
			&#8942;
		<?php endif; ?>
		</td>
		<td class="nowrap center">
		<?php if ($canDo->get('core.edit')): ?>
				<?php if ($item->checked_out) : ?>
					<?php if ($canCheckin) : ?>
						<?php echo JHtml::_('grid.id', $i, $item->id); ?>
					<?php else: ?>
						&#9633;
					<?php endif; ?>
				<?php else: ?>
					<?php echo JHtml::_('grid.id', $i, $item->id); ?>
				<?php endif; ?>
		<?php else: ?>
			&#9633;
		<?php endif; ?>
		</td>
		<td class="nowrap">
			<div class="name">
				<?php if ($canDo->get('core.edit')): ?>
					<a href="<?php echo $edit; ?>&id=<?php echo
$item->id; ?>"><?php echo JText::_($item->role);
?></a>
					<?php if ($item->checked_out): ?>
						<?php echo JHtml::_('jgrid.checkedout', $i,
$userChkOut->name, $item->checked_out_time, 'enrolments.',
$canCheckin); ?>
					<?php endif; ?>
				<?php else: ?>
					<?php echo JText::_($item->role); ?>
				<?php endif; ?>
			</div>
		</td>
		<td class="hidden-phone">
			<?php echo $this->escape($item->moojlacourse_fullname); ?>
		</td>
		<td class="nowrap">
			<div class="name">
				<?php if ($this->user->authorise('core.edit',
'com_users')): ?>
					<a
href="index.php?option=com_users&task=user.edit&id=<?php
echo (int) $item->jid ?>"><?php echo
JFactory::getUser((int)$item->jid)->name; ?></a>
				<?php else: ?>
					<?php echo JFactory::getUser((int)$item->jid)->name; ?>
				<?php endif; ?>
			</div>
		</td>
		<td class="hidden-phone">
			<?php echo $this->escape($item->enrolldate); ?>
		</td>
		<td class="center">
		<?php if ($canDo->get('core.edit.state')) : ?>
				<?php if ($item->checked_out) : ?>
					<?php if ($canCheckin) : ?>
						<?php echo JHtml::_('jgrid.published',
$item->published, $i, 'enrolments.', true, 'cb');
?>
					<?php else: ?>
						<?php echo JHtml::_('jgrid.published',
$item->published, $i, 'enrolments.', false, 'cb');
?>
					<?php endif; ?>
				<?php else: ?>
					<?php echo JHtml::_('jgrid.published',
$item->published, $i, 'enrolments.', true, 'cb');
?>
				<?php endif; ?>
		<?php else: ?>
			<?php echo JHtml::_('jgrid.published', $item->published,
$i, 'enrolments.', false, 'cb'); ?>
		<?php endif; ?>
		</td>
		<td class="nowrap center hidden-phone">
			<?php echo $item->id; ?>
		</td>
	</tr>
<?php endforeach;
?>enrolments/tmpl/default_foot.php000064400000002304151160405170013071
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				Lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.77
	@build			6th April, 2022
	@created		22nd July, 2020
	@package		Moojla
	@subpackage		default_foot.php
	@author			Lmskaran <http://Lmskaran.com>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

?>
<tr>
	<td colspan="8"><?php echo
$this->pagination->getListFooter(); ?></td>
</tr>enrolments/tmpl/default_head.php000064400000005477151160405170013041
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				Lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.77
	@build			6th April, 2022
	@created		22nd July, 2020
	@package		Moojla
	@subpackage		default_head.php
	@author			Lmskaran <http://Lmskaran.com>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

?>
<tr>
	<?php if ($this->canEdit&& $this->canState): ?>
		<th width="1%" class="nowrap center
hidden-phone">
			<?php echo JHtml::_('searchtools.sort', '',
'a.ordering', $this->listDirn, $this->listOrder, null,
'asc', 'JGRID_HEADING_ORDERING',
'icon-menu-2'); ?>
		</th>
		<th width="20" class="nowrap center">
			<?php echo JHtml::_('grid.checkall'); ?>
		</th>
	<?php else: ?>
		<th width="20" class="nowrap center
hidden-phone">
			&#9662;
		</th>
		<th width="20" class="nowrap center">
			&#9632;
		</th>
	<?php endif; ?>
	<th class="nowrap" >
			<?php echo JHtml::_('searchtools.sort',
'COM_MOOJLA_ENROLMENT_ROLE_LABEL', 'a.role',
$this->listDirn, $this->listOrder); ?>
	</th>
	<th class="nowrap hidden-phone" >
			<?php echo JHtml::_('searchtools.sort',
'COM_MOOJLA_ENROLMENT_MOOJLACOURSE_LABEL',
'g.fullname', $this->listDirn, $this->listOrder); ?>
	</th>
	<th class="nowrap hidden-phone" >
			<?php echo JHtml::_('searchtools.sort',
'COM_MOOJLA_ENROLMENT_JID_LABEL', 'h.name',
$this->listDirn, $this->listOrder); ?>
	</th>
	<th class="nowrap hidden-phone" >
			<?php echo JHtml::_('searchtools.sort',
'COM_MOOJLA_ENROLMENT_ENROLLDATE_LABEL',
'a.enrolldate', $this->listDirn, $this->listOrder); ?>
	</th>
	<?php if ($this->canState): ?>
		<th width="10" class="nowrap center" >
			<?php echo JHtml::_('searchtools.sort',
'COM_MOOJLA_ENROLMENT_STATUS', 'a.published',
$this->listDirn, $this->listOrder); ?>
		</th>
	<?php else: ?>
		<th width="10" class="nowrap center" >
			<?php echo JText::_('COM_MOOJLA_ENROLMENT_STATUS'); ?>
		</th>
	<?php endif; ?>
	<th width="5" class="nowrap center hidden-phone"
>
			<?php echo JHtml::_('searchtools.sort',
'COM_MOOJLA_ENROLMENT_ID', 'a.id', $this->listDirn,
$this->listOrder); ?>
	</th>
</tr>enrolments/tmpl/default_toolbar.php000064400000007055151160405170013574
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				Lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.77
	@build			6th April, 2022
	@created		22nd July, 2020
	@package		Moojla
	@subpackage		default_toolbar.php
	@author			Lmskaran <http://Lmskaran.com>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

?>
<div id="filter-bar" class="btn-toolbar">
        <div class="filter-search btn-group pull-left">
            <label for="filter_search"
class="element-invisible"><?php echo
JText::_('Search');?></label>
            <input type="text" name="filter_search"
id="filter_search" placeholder="<?php echo
JText::_('JSEARCH_FILTER'); ?>" value="<?php echo
$this->escape($this->state->get('filter.search'));
?>" class="hasTooltip" title="<?php echo
JHtml::tooltipText('Search Enrolments'); ?>" />
        </div>
        <div class="btn-group pull-left">
            <button type="submit" class="btn
hasTooltip" title="<?php echo
JHtml::tooltipText('JSEARCH_FILTER_SUBMIT'); ?>"><i
class="icon-search"></i></button>
            <button type="button" class="btn
hasTooltip" title="<?php echo
JHtml::tooltipText('JSEARCH_FILTER_CLEAR'); ?>"
onclick="document.id('filter_search').value='';this.form.submit();"><i
class="icon-remove"></i></button>
        </div>
        <div class="btn-group pull-right hidden-phone">
            <label for="limit"
class="element-invisible"><?php echo
JText::_('JFIELD_PLG_SEARCH_SEARCHLIMIT_DESC');?></label>
            <?php echo $this->pagination->getLimitBox(); ?>
        </div>
        <div class="btn-group pull-right hidden-phone">
            <label for="directionTable"
class="element-invisible"><?php echo
JText::_('JFIELD_ORDERING_DESC');?></label>
            <select name="directionTable"
id="directionTable" class="input-medium"
onchange="Joomla.orderTable()">
                <option value=""><?php echo
JText::_('JFIELD_ORDERING_DESC');?></option>
                <option value="asc" <?php if
($this->listDirn == 'asc') echo
'selected="selected"'; ?>><?php echo
JText::_('JGLOBAL_ORDER_ASCENDING');?></option>
                <option value="desc" <?php if
($this->listDirn == 'desc') echo
'selected="selected"'; ?>><?php echo
JText::_('JGLOBAL_ORDER_DESCENDING');?></option>
            </select>
        </div>
        <div class="btn-group pull-right">
            <label for="sortTable"
class="element-invisible"><?php echo
JText::_('JGLOBAL_SORT_BY');?></label>
            <select name="sortTable" id="sortTable"
class="input-medium" onchange="Joomla.orderTable()">
                <option value=""><?php echo
JText::_('JGLOBAL_SORT_BY');?></option>
                <?php echo JHtml::_('select.options',
$this->getSortFields(), 'value', 'text',
$this->listOrder);?>
            </select>
        </div>
    </div>
<div class="clearfix">
</div>enrolments/tmpl/index.html000064400000000054151160405170011702
0ustar00<html><body
bgcolor="#FFFFFF"></body></html>enrolments/view.html.php000064400000017526151160405170011373
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				Lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.77
	@build			6th April, 2022
	@created		22nd July, 2020
	@package		Moojla
	@subpackage		view.html.php
	@author			Lmskaran <http://Lmskaran.com>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

/**
 * Moojla View class for the Enrolments
 */
class MoojlaViewEnrolments extends JViewLegacy
{
	/**
	 * Enrolments view display method
	 * @return void
	 */
	function display($tpl = null)
	{
		if ($this->getLayout() !== 'modal')
		{
			// Include helper submenu
			MoojlaHelper::addSubmenu('enrolments');
		}

		// Assign data to the view
		$this->items = $this->get('Items');
		$this->pagination = $this->get('Pagination');
		$this->state = $this->get('State');
		$this->user = JFactory::getUser();
		// Load the filter form from xml.
		$this->filterForm = $this->get('FilterForm');
		// Load the active filters.
		$this->activeFilters = $this->get('ActiveFilters');
		// Add the list ordering clause.
		$this->listOrder =
$this->escape($this->state->get('list.ordering',
'a.id'));
		$this->listDirn =
$this->escape($this->state->get('list.direction',
'DESC'));
		$this->saveOrder = $this->listOrder == 'a.ordering';
		// set the return here value
		$this->return_here = urlencode(base64_encode((string)
JUri::getInstance()));
		// get global action permissions
		$this->canDo = MoojlaHelper::getActions('enrolment');
		$this->canEdit = $this->canDo->get('core.edit');
		$this->canState =
$this->canDo->get('core.edit.state');
		$this->canCreate = $this->canDo->get('core.create');
		$this->canDelete = $this->canDo->get('core.delete');
		$this->canBatch = $this->canDo->get('core.batch');

		// We don't need toolbar in the modal window.
		if ($this->getLayout() !== 'modal')
		{
			$this->addToolbar();
			$this->sidebar = JHtmlSidebar::render();
			// load the batch html
			if ($this->canCreate && $this->canEdit &&
$this->canState)
			{
				$this->batchDisplay = JHtmlBatch_::render();
			}
		}
		
		// Check for errors.
		if (count($errors = $this->get('Errors')))
		{
			throw new Exception(implode("\n", $errors), 500);
		}

		// Display the template
		parent::display($tpl);

		// Set the document
		$this->setDocument();
	}

	/**
	 * Setting the toolbar
	 */
	protected function addToolBar()
	{
		JToolBarHelper::title(JText::_('COM_MOOJLA_ENROLMENTS'),
'checkbox');
		JHtmlSidebar::setAction('index.php?option=com_moojla&view=enrolments');
		JFormHelper::addFieldPath(JPATH_COMPONENT . '/models/fields');

		if ($this->canCreate)
		{
			JToolBarHelper::addNew('enrolment.add');
		}

		// Only load if there are items
		if (MoojlaHelper::checkArray($this->items))
		{
			if ($this->canEdit)
			{
				JToolBarHelper::editList('enrolment.edit');
			}

			if ($this->canState)
			{
				JToolBarHelper::publishList('enrolments.publish');
				JToolBarHelper::unpublishList('enrolments.unpublish');
				JToolBarHelper::archiveList('enrolments.archive');

				if ($this->canDo->get('core.admin'))
				{
					JToolBarHelper::checkin('enrolments.checkin');
				}
			}

			// Add a batch button
			if ($this->canBatch && $this->canCreate &&
$this->canEdit && $this->canState)
			{
				// Get the toolbar object instance
				$bar = JToolBar::getInstance('toolbar');
				// set the batch button name
				$title = JText::_('JTOOLBAR_BATCH');
				// Instantiate a new JLayoutFile instance and render the batch button
				$layout = new JLayoutFile('joomla.toolbar.batch');
				// add the button to the page
				$dhtml = $layout->render(array('title' => $title));
				$bar->appendButton('Custom', $dhtml, 'batch');
			}

			if ($this->state->get('filter.published') == -2
&& ($this->canState && $this->canDelete))
			{
				JToolbarHelper::deleteList('', 'enrolments.delete',
'JTOOLBAR_EMPTY_TRASH');
			}
			elseif ($this->canState && $this->canDelete)
			{
				JToolbarHelper::trash('enrolments.trash');
			}
		}
		if ($this->user->authorise('enrolment.fetch_enrolments',
'com_moojla'))
		{
			// add fetch enrolments button.
			JToolBarHelper::custom('enrolments.fetchEnrolments',
'contract custom-button-fetchenrolments', '',
'COM_MOOJLA_FETCH_ENROLMENTS', false);
		}

		// set help url for this view if found
		$help_url = MoojlaHelper::getHelpUrl('enrolments');
		if (MoojlaHelper::checkString($help_url))
		{
				JToolbarHelper::help('COM_MOOJLA_HELP_MANAGER', false,
$help_url);
		}

		// add the options comp button
		if ($this->canDo->get('core.admin') ||
$this->canDo->get('core.options'))
		{
			JToolBarHelper::preferences('com_moojla');
		}

		// Only load published batch if state and batch is allowed
		if ($this->canState && $this->canBatch)
		{
			JHtmlBatch_::addListSelection(
				JText::_('COM_MOOJLA_KEEP_ORIGINAL_STATE'),
				'batch[published]',
				JHtml::_('select.options',
JHtml::_('jgrid.publishedOptions', array('all' =>
false)), 'value', 'text', '', true)
			);
		}

		// Only load Role batch if create, edit, and batch is allowed
		if ($this->canBatch && $this->canCreate &&
$this->canEdit)
		{
			// Set Role Selection
			$this->roleOptions =
JFormHelper::loadFieldType('enrolmentsfilterrole')->options;
			// We do some sanitation for Role filter
			if (MoojlaHelper::checkArray($this->roleOptions) &&
				isset($this->roleOptions[0]->value) &&
				!MoojlaHelper::checkString($this->roleOptions[0]->value))
			{
				unset($this->roleOptions[0]);
			}
			// Role Batch Selection
			JHtmlBatch_::addListSelection(
				'- Keep Original
'.JText::_('COM_MOOJLA_ENROLMENT_ROLE_LABEL').'
-',
				'batch[role]',
				JHtml::_('select.options', $this->roleOptions,
'value', 'text')
			);
		}
	}

	/**
	 * Method to set up the document properties
	 *
	 * @return void
	 */
	protected function setDocument()
	{
		if (!isset($this->document))
		{
			$this->document = JFactory::getDocument();
		}
		$this->document->setTitle(JText::_('COM_MOOJLA_ENROLMENTS'));
		$this->document->addStyleSheet(JURI::root() .
"administrator/components/com_moojla/assets/css/enrolments.css",
(MoojlaHelper::jVersion()->isCompatible('3.8.0')) ?
array('version' => 'auto') : 'text/css');
	}

	/**
	 * Escapes a value for output in a view script.
	 *
	 * @param   mixed  $var  The output to escape.
	 *
	 * @return  mixed  The escaped value.
	 */
	public function escape($var)
	{
		if(strlen($var) > 50)
		{
			// use the helper htmlEscape method instead and shorten the string
			return MoojlaHelper::htmlEscape($var, $this->_charset, true);
		}
		// use the helper htmlEscape method instead.
		return MoojlaHelper::htmlEscape($var, $this->_charset);
	}

	/**
	 * Returns an array of fields the table can be sorted by
	 *
	 * @return  array  Array containing the field name to sort by as the key
and display text as value
	 */
	protected function getSortFields()
	{
		return array(
			'a.ordering' =>
JText::_('JGRID_HEADING_ORDERING'),
			'a.published' => JText::_('JSTATUS'),
			'a.role' =>
JText::_('COM_MOOJLA_ENROLMENT_ROLE_LABEL'),
			'g.fullname' =>
JText::_('COM_MOOJLA_ENROLMENT_MOOJLACOURSE_LABEL'),
			'h.name' =>
JText::_('COM_MOOJLA_ENROLMENT_JID_LABEL'),
			'a.enrolldate' =>
JText::_('COM_MOOJLA_ENROLMENT_ENROLLDATE_LABEL'),
			'a.id' => JText::_('JGRID_HEADING_ID')
		);
	}
}
healthcheck/index.html000064400000000054151160405170011003
0ustar00<html><body
bgcolor="#FFFFFF"></body></html>healthcheck/tmpl/default.php000064400000035145151160405170012130
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				Lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.77
	@build			6th April, 2022
	@created		22nd July, 2020
	@package		Moojla
	@subpackage		default.php
	@author			Lmskaran <http://Lmskaran.com>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html');
JHtml::_('behavior.tooltip');
JHtml::_('behavior.formvalidation');
JHtml::_('formbehavior.chosen', 'select');
JHtml::_('behavior.keepalive');
?>
<?php if ($this->canDo->get('healthcheck.access')):
?>
<script type="text/javascript">
	Joomla.submitbutton = function(task) {
		if (task === 'healthcheck.back') {
			parent.history.back();
			return false;
		} else {
			var form = document.getElementById('adminForm');
			form.task.value = task;
			form.submit();
		}
	}
</script>
<?php $urlId = (isset($this->item->id)) ? '&id='.
(int) $this->item->id : ''; ?>
<form action="<?php echo
JRoute::_('index.php?option=com_moojla&view=healthcheck' .
$urlId); ?>" method="post" name="adminForm"
id="adminForm" class="form-validate"
enctype="multipart/form-data">


<!--[JCBGUI.custom_admin_view.default.1.$$$$]-->
<h2>General</h2>


<?php
$cmp = $this->item['component'];
$moodleusersdiff = $this->item['moodleusersdiff'];
$joomlausersdiff = $this->item['joomlausersdiff'];
$coursedif = $this->item['coursedif'];
$catdif = $this->item['catdif'];
?>
<ul class="nav nav-tabs">
  <li class="active"><a data-toggle="tab"
href="#connectivity"><?=
JText::_('COM_MOOJLA_CONNECTIVITY') ?></a></li>
  <li><a data-toggle="tab"
href="#joomla-plugins"><?=
JText::_('COM_MOOJLA_JOOMLA_PLUGINS') ?></a></li>
  <li><a data-toggle="tab"
href="#thirdparty-plugin"><?=
JText::_('COM_MOOJLA_THIRDPARTY_PLUGINS')
?></a></li>
  <li><a data-toggle="tab"
href="#synchronization-report"><?=
JText::_('COM_MOOJLA_SYNCHRONIZATION_REPORT')
?></a></li>
</ul>

<div class="tab-content">
  <div id="connectivity" class="tab-pane fade in
active">
    <h3><?= JText::_('COM_MOOJLA_CONNECTIVITY')
?></h3>
    <table width="100%" class="table
table-striped">
      <thead>
        <tr>
          <th width="30%"><?=
JText::_('COM_MOOJLA_CHECK') ?></th>
          <th width="10%"><?=
JText::_('COM_MOOJLA_STATUS') ?></th>
          <th><?= JText::_('COM_MOOJLA_ERROR')
?></th>
        </tr>
      </thead>
      <tbody>

        <tr class="row0">
          <td><?= JText::_('COM_MOOJLA_MOODLE_URL')
?></td>
          <td align="center">
            <?php echo (count((array)$cmp) == 2) ? '<div
class="alert alert-danger"
role="alert">'.JText::_("COM_MOOJLA_FAILED").'</div>'
: '<div class="alert alert-success"
role="alert">'.JText::_("OK").'</div>';?>
          </td>
          <td align="center"><?php echo
(count((array)$cmp) == 2) ?
JText::_("COM_MOOJLA_ENTER_MOODLE_URL_CORRECTLY_BE_SURE_THAT_ENDING_SLASH_ENTERED")
: ""; ?></td>
        </tr>
        <?php if(count((array)$cmp) != 2):?>
          <tr class="row0">
            <td><?= JText::_('COM_MOOJLA_CURL')
?></td>
            <td align="center">
              <?php echo !$cmp->curlEnabled ? '<div
class="alert alert-danger"
role="alert">'.JText::_("COM_MOOJLA_FAILED").'</div>'
: '<div class="alert alert-success"
role="alert">'.JText::_("OK").'</div>';?>
            </td>
            <td align="center"><?php echo
!$cmp->curlEnabled ? $cmp->error->curlEnabled: "";
?></td>
          </tr>

          <?php if($cmp->curlEnabled):?>
            <tr class="row0">
              <td><?=
JText::_('COM_MOOJLA_WEBSERVICES_ENABLED') ?></td>
              <td align="center">
                <?php echo !$cmp->webservicesEnabled ? '<div
class="alert alert-danger"
role="alert">'.JText::_("COM_MOOJLA_FAILED").'</div>'
: '<div class="alert alert-success"
role="alert">'.JText::_("OK").'</div>';?>
              </td>
              <td align="center"><?php echo
!$cmp->webservicesEnabled ? $cmp->error->webservicesEnabled:
""; ?></td>
            </tr>

            <?php if($cmp->webservicesEnabled):?>
              <tr class="row0">
                <td><?= JText::_('COM_MOOJLA_REST')
?></td>
                <td align="center">
                  <?php echo !$cmp->restEnabled ? '<div
class="alert alert-danger"
role="alert">'.JText::_("COM_MOOJLA_FAILED").'</div>'
: '<div class="alert alert-success"
role="alert">'.JText::_("OK").'</div>';?>
                </td>
                <td align="center"><?php echo
!$cmp->restEnabled ? $cmp->error->restEnabled: "";
?></td>
              </tr>

              <?php if($cmp->restEnabled):?>
                <tr class="row0">
                  <td><?=
JText::_('COM_MOOJLA_MOOJLA_INSTALLED') ?></td>
                  <td align="center">
                    <?php echo !$cmp->moojlaInstalled ? '<div
class="alert alert-danger"
role="alert">'.JText::_("COM_MOOJLA_FAILED").'</div>'
: '<div class="alert alert-success"
role="alert">'.JText::_("OK").'</div>';?>
                  </td>
                  <td align="center"><?php echo
!$cmp->moojlaInstalled ? $cmp->error->moojlaInstalled:
""; ?></td>
                </tr>

                <?php if($cmp->moojlaInstalled):?>
                  <tr class="row0">
                    <td><?=
JText::_('COM_MOOJLA_MOOJLA_ENABLED') ?></td>
                    <td align="center">
                      <?php echo !$cmp->moojlaEnabled ? '<div
class="alert alert-danger"
role="alert">'.JText::_("COM_MOOJLA_FAILED").'</div>'
: '<div class="alert alert-success"
role="alert">'.JText::_("OK").'</div>';?>
                    </td>
                    <td align="center"><?php echo
!$cmp->moojlaEnabled ? $cmp->error->moojlaEnabled: "";
?></td>
                  </tr>

                  <?php if($cmp->moojlaEnabled):?>
                    <tr class="row0">
                      <td><?=
JText::_('COM_MOOJLA_JOOMLA_URL') ?></td>
                      <td align="center">
                        <?php echo !$cmp->joomlaUrlCorrect ?
'<div class="alert alert-danger"
role="alert">'.JText::_("COM_MOOJLA_FAILED").'</div>'
: '<div class="alert alert-success"
role="alert">'.JText::_("OK").'</div>';?>
                      </td>
                      <td align="center"><?php echo
!$cmp->joomlaUrlCorrect ? $cmp->error->joomlaUrlCorrect:
""; ?></td>
                    </tr>

                    <?php if($cmp->joomlaUrlCorrect):?>
                      <tr class="row0">
                        <td><?=
JText::_('COM_MOOJLA_JOOMLA_TOKEN') ?></td>
                        <td align="center">
                          <?php echo !$cmp->joomlaTokenCorrect ?
'<div class="alert alert-danger"
role="alert">'.JText::_("COM_MOOJLA_FAILED").'</div>'
: '<div class="alert alert-success"
role="alert">'.JText::_("OK").'</div>';?>
                        </td>
                        <td align="center"><?php echo
!$cmp->joomlaTokenCorrect ? $cmp->error->joomlaTokenCorrect:
""; ?></td>
                      </tr>

                      <?php if($cmp->joomlaUrlCorrect):?>
                      <tr class="row0">
                        <td><?=
JText::_('COM_MOOJLA_MOODLE_TOKEN') ?></td>
                        <td align="center">
                          <?php echo !$cmp->moodleToken ?
'<div class="alert alert-danger"
role="alert">'.JText::_("COM_MOOJLA_FAILED").'</div>'
: '<div class="alert alert-success"
role="alert">'.JText::_("OK").'</div>';?>
                        </td>
                        <td align="center"><?php echo
!$cmp->moodleToken ? $cmp->error->moodleToken: "";
?></td>
                      </tr>
                      <?php endif;?>
                    <?php endif;?>
                  <?php endif;?>
                <?php endif;?>
              <?php endif;?>
            <?php endif;?>
          <?php endif;?>
        <?php endif;?>
      </tbody>
    </table>
  </div>
  <div id="joomla-plugins" class="tab-pane
fade">
    <h3><?= JText::_('COM_MOOJLA_JOOMLA_PLUGINS')
?></h3>  
    <table width="100%" class="table
table-striped">
      <thead>
        <tr>
          <th width="30%"><?=
JText::_('COM_MOOJLA_PLUGINS_NAME') ?></th>
          <th width="10%"><?=
JText::_('COM_MOOJLA_STATUS') ?></th>
          <th><?= JText::_('COM_MOOJLA_IMPORTANCE')
?></th>
        </tr>
      </thead>
      <tbody>
      <?php foreach($this->item['plugins']->joomla as
$plg_name => $plugin): ?>
        <tr class="row0">
          <td><?php echo $plg_name; ?></td>
          <td align="center">
            <?php echo !$plugin->installed ? '<div
class="alert alert-danger"
role="alert">'.JText::_("COM_MOOJLA_NOT_INSTALLED").'</div>'
: ($plugin->enabled? '<a type="button"
href="javascript:void(0);" onclick="return
jpluginAction('."'".$plg_name."'".',
0)" class="btn
btn-success">'.JText::_("COM_MOOJLA_ENABLED").'</button>'
: '<a type="button" href="javascript:void(0);"
onclick="return
jpluginAction('."'".$plg_name."'".',
1)" class="btn
btn-danger">'.JText::_("COM_MOOJLA_DISABLED").'</a>')?>
            </td>
          <td align="center"><?php echo
$plugin->importancy; ?></td>
        </tr>
      <?php endforeach;?>
      </tbody>
    </table>
  </div>
  <div id="thirdparty-plugin" class="tab-pane
fade">
    
      <?php foreach($this->item['plugins']->thirdparties
as $tplg_name => $tplugin): ?>
        <?php if($tplugin):?>
          <?php
            echo '<h3>' . $tplg_name . "
Plugins<h3></h3>";
          ?>
          <table width="100%" class="table
table-striped">
            <thead>
              <tr>
                <th width="30%"><?=
JText::_('COM_MOOJLA_PLUGINS_NAME') ?></th>
                <th width="10%"><?=
JText::_('COM_MOOJLA_STATUS') ?></th>
                <th><?=
JText::_('COM_MOOJLA_IMPORTANCE') ?></th>
              </tr>
            </thead>
            <tbody>
            <?php foreach($tplugin as $plg_name => $plugin): ?>
              <tr class="row0">
                <td><?php echo $plg_name; ?></td>
                <td align="center">
                  <?php echo !$plugin->installed ? '<div
class="alert alert-danger"
role="alert">'.JText::_("COM_MOOJLA_NOT_INSTALLED").'</div>'
: ($plugin->enabled? '<a type="button"
href="javascript:void(0);" onclick="return
jpluginAction(this, 0)" class="btn
btn-success">'.JText::_("COM_MOOJLA_ENABLED").'</a>'
: '<a type="button" href="javascript:void(0);"
onclick="return jpluginAction(this, 1)" class="btn
btn-danger">'.JText::_("COM_MOOJLA_DISABLED").'</a>')?>
                  </td>
                <td align="center"><?php echo
$plugin->importancy; ?></td>
              </tr>
            <?php endforeach;?>
            </tbody>
          </table>
        <?php else:?>
          <strong><?php echo $tplg_name." "
.JText::_("COM_MOOJLA_NOT_INSTALLED"); ?></strong>
        <?php endif;?>
      <?php endforeach;?>
    </div>
  <div id="synchronization-report" class="tab-pane
fade">
    <ul class="nav nav-tabs">
      <li class="active"><a data-toggle="tab"
href="#users"><?= JText::_('COM_MOOJLA_USERS')
?></a></li>
      <li><a data-toggle="tab"
href="#courses"><?=
JText::_('COM_MOOJLA_COURSES') ?></a></li>
      <li><a data-toggle="tab"
href="#category"><?=
JText::_('COM_MOOJLA_CATEGORIES') ?></a></li>
    </ul>
    <div class="tab-content">
      <div id="users" class="tab-pane fade">
        <h3><?= JText::_('COM_MOOJLA_USERS')
?></h3>
        <?php $diffnum = count($moodleusersdiff);
		echo
JText::sprintf('COM_MOOJLA_S_MOODLE_USERS_NOT_MAPPED_IN_MOOJLA_JOOMLA_SIDE_MOODLE_IDS_LISTED_IN_BOTTOM',
$diffnum);?>
        <ul class='users' id='moodle-users'>
          <?php foreach($moodleusersdiff as $id):?>
          <li><?php echo $id;?></li>
          <?php endforeach;?>
        </ul>
        <?php if($diffnum > 5):?>
        <span onclick="showMore('moodle-users',
this)" class="showmore-btn"><?=
JText::_('COM_MOOJLA_SHOW_MORE') ?></span>
        <?php endif;?>

        

      <?php $jdiffnum = count($joomlausersdiff);
		echo
JText::sprintf('COM_MOOJLA_S_JOOMLA_USERS_NOT_MAPPED_IN_MOOJLA_MOODLE_SIDE_JOOMLA_IDS_LISTED_IN_BOTTOM',
$jdiffnum); ?>
      <ul class='users' id='joomla-users'>
        <?php foreach($joomlausersdiff as $id):?>
        <li><?php echo $id;?></li>
        <?php endforeach;?>
      </ul>
      <?php if($jdiffnum > 5):?>
      <span onclick="showMore('joomla-users', this)"
class="showmore-btn"><?=
JText::_('COM_MOOJLA_SHOW_MORE') ?></span>
      <?php endif;?>

      </div>
      <div id="courses" class="tab-pane fade">
        <h3><?= JText::_('COM_MOOJLA_COURSES')
?></h3>
        <?php $cdiffnum = count($coursedif);
			echo
JText::sprintf('COM_MOOJLA_S_MOODLE_COURSES_NOT_MAPPED_IN_MOOJLA_JOOMLA_SIDE_MOODLE_COURSE_IDS_LISTED_IN_BOTTOM',
$cdiffnum); ?>
        <ul class='users' id='moodle-courses'>
          <?php foreach($coursedif as $id):?>
          <li><?php echo $id;?></li>
          <?php endforeach;?>
        </ul>
        <?php if($cdiffnum > 5):?>
        <span onclick="showMore('moodle-courses',
this)" class="showmore-btn"><?=
JText::_('COM_MOOJLA_SHOW_MORE') ?></span>
        <?php endif;?>
      </div>
      <div id="category" class="tab-pane fade">
        <h3><?= JText::_('COM_MOOJLA_CATEGORIES')
?></h3>

        <?php $catdifnum = count($catdif);
			
			echo $catdifnum . ' moodle ' . ($catdifnum > 1 ?
'categories' : 'category') . ' not mapped in
moojla (joomla side), moodle category ids listed in bottom:' ?>
        <ul class='users'
id='moodle-categories'>
          <?php foreach($catdif as $id):?>
          <li><?php echo $id;?></li>
          <?php endforeach;?>
        </ul>
        <?php if($catdifnum > 5):?>
        <span onclick="showMore('moodle-categories',
this)" class="showmore-btn"><?=
JText::_('COM_MOOJLA_SHOW_MORE') ?></span>
        <?php endif;?>
      </div>
    </div>
  </div>
</div><!--[/JCBGUI$$$$]-->

<input type="hidden" name="task" value=""
/>
<?php echo JHtml::_('form.token'); ?>
</form>
<?php else: ?>
        <h1><?php echo
JText::_('COM_MOOJLA_NO_ACCESS_GRANTED'); ?></h1>
<?php endif; ?>

healthcheck/tmpl/index.html000064400000000054151160405170011757
0ustar00<html><body
bgcolor="#FFFFFF"></body></html>healthcheck/view.html.php000064400000010033151160405170011432
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				Lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.77
	@build			6th April, 2022
	@created		22nd July, 2020
	@package		Moojla
	@subpackage		view.html.php
	@author			Lmskaran <http://Lmskaran.com>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access'); 

/**
 * Moojla View class for the Healthcheck
 */
class MoojlaViewHealthcheck extends JViewLegacy
{
	// Overwriting JView display method
	function display($tpl = null)
	{
		// get component params
		$this->params = JComponentHelper::getParams('com_moojla');
		// get the application
		$this->app = JFactory::getApplication();
		// get the user object
		$this->user = JFactory::getUser();
		// get global action permissions
		$this->canDo = MoojlaHelper::getActions('healthcheck');
		// Initialise variables.
		$this->item = $this->get('Item');

		// We don't need toolbar in the modal window.
		if ($this->getLayout() !== 'modal')
		{
			// add the tool bar
			$this->addToolBar();
		}

		// set the document
		$this->setDocument();

		// Check for errors.
		if (count($errors = $this->get('Errors')))
		{
			throw new Exception(implode(PHP_EOL, $errors), 500);
		}

		parent::display($tpl);
	}

	/**
	 * Prepares the document
	 */
	protected function setDocument()
	{

		// always make sure jquery is loaded.
		JHtml::_('jquery.framework');
		// Load the header checker class.
		require_once(
JPATH_COMPONENT_ADMINISTRATOR.'/helpers/headercheck.php' );
		// Initialize the header checker.
		$HeaderCheck = new moojlaHeaderCheck;

		// Add View JavaScript File
		$this->document->addScript(JURI::root(true) .
"/administrator/components/com_moojla/assets/js/healthcheck.js",
(MoojlaHelper::jVersion()->isCompatible("3.8.0")) ?
array("version" => "auto") :
"text/javascript");
		// add the document default css file
		$this->document->addStyleSheet(JURI::root(true)
.'/administrator/components/com_moojla/assets/css/healthcheck.css',
(MoojlaHelper::jVersion()->isCompatible('3.8.0')) ?
array('version' => 'auto') : 'text/css');
	}

	/**
	 * Setting the toolbar
	 */
	protected function addToolBar()
	{
		// hide the main menu
		$this->app->input->set('hidemainmenu', true);
		// set the title
		if (isset($this->item->name) && $this->item->name)
		{
			$title = $this->item->name;
		}
		// Check for empty title and add view name if param is set
		if (empty($title))
		{
			$title = JText::_('COM_MOOJLA_HEALTHCHECK');
		}
		// add title to the page
		JToolbarHelper::title($title,'health');
		// add cpanel button
		JToolBarHelper::custom('healthcheck.dashboard',
'grid-2', '', 'COM_MOOJLA_DASH', false);

		// set help url for this view if found
		$help_url = MoojlaHelper::getHelpUrl('healthcheck');
		if (MoojlaHelper::checkString($help_url))
		{
			JToolbarHelper::help('COM_MOOJLA_HELP_MANAGER', false,
$help_url);
		}

		// add the options comp button
		if ($this->canDo->get('core.admin') ||
$this->canDo->get('core.options'))
		{
			JToolBarHelper::preferences('com_moojla');
		}
	}

	/**
	 * Escapes a value for output in a view script.
	 *
	 * @param   mixed  $var  The output to escape.
	 *
	 * @return  mixed  The escaped value.
	 */
	public function escape($var)
	{
		// use the helper htmlEscape method instead.
		return MoojlaHelper::htmlEscape($var, $this->_charset);
	}
}
?>
languagetranslation/index.html000064400000000054151160405200012574
0ustar00<html><body
bgcolor="#FFFFFF"></body></html>languagetranslation/tmpl/default.php000064400000007432151160405200013717
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				Lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.77
	@build			6th April, 2022
	@created		22nd July, 2020
	@package		Moojla
	@subpackage		default.php
	@author			Lmskaran <http://Lmskaran.com>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html');
JHtml::_('behavior.tooltip');
JHtml::_('behavior.formvalidation');
JHtml::_('formbehavior.chosen', 'select');
JHtml::_('behavior.keepalive');
?>
<?php if
($this->canDo->get('languagetranslation.access')): ?>
<script type="text/javascript">
	Joomla.submitbutton = function(task) {
		if (task === 'languagetranslation.back') {
			parent.history.back();
			return false;
		} else {
			var form = document.getElementById('adminForm');
			form.task.value = task;
			form.submit();
		}
	}
</script>
<?php $urlId = (isset($this->item->id)) ? '&id='.
(int) $this->item->id : ''; ?>
<form action="<?php echo
JRoute::_('index.php?option=com_moojla&view=languagetranslation'
. $urlId); ?>" method="post" name="adminForm"
id="adminForm" class="form-validate"
enctype="multipart/form-data">


<!--[JCBGUI.custom_admin_view.default.2.$$$$]-->
<?php 
JHtml::_('formbehavior.chosen', 'select');
JHtml::_('bootstrap.tooltip');
$form = JForm::getInstance("langform",
JPATH_ADMINISTRATOR.'/components/com_moojla/models/forms/' .
"languagetranslation.xml", array("control" =>
"myform"));

$prefillData = array();

if ($_SERVER['REQUEST_METHOD'] === 'POST') 
{
	$app   = JFactory::getApplication();
	// $data = $app->input->post->get('myform', array(),
"array");
	$data = $app->input->getArray();
	
	$myform = $data['myform'];
	if($myform['language'] != '')
	{
		$lang = $myform['language'];
		$isadmin = substr($lang, -1);
		$code = substr($lang, 0, -1);
		$fileurl = JURI::root();
		$filepath = JPATH_ROOT;
		if($isadmin)
		{
			$filepath .= '/administrator/language/overrides/' . $code .
'.override.ini';
			if($myform['override'] != '')
			{
				file_put_contents($filepath, $myform['override']);
			}
			else if(file_exists($filepath))
			{
				file_put_contents($filepath, $myform['override']);
			}
		}
		else
		{
			$filepath .= '/language/overrides/' . $code .
'.override.ini';
			if($myform['override'] != '')
			{
				file_put_contents($filepath, $myform['override']);
			}
			else if(file_exists($filepath))
			{
				file_put_contents($filepath, $myform['override']);
			}
		}
	}
	
}
$form->bind($prefillData);
?>

<?php //echo $this->loadTemplate('languagefilter'); ?>
<?php echo $form->renderField('language');  ?>
<?php echo $form->renderField('original_translation'); 
?>
<?php echo $form->renderField('override');  ?>

<input type="submit" name="submitbtn"
value="<?= JText::_('COM_MOOJLA_SAVE_CHANGES')
?>">
<!--[/JCBGUI$$$$]-->

<input type="hidden" name="task" value=""
/>
<?php echo JHtml::_('form.token'); ?>
</form>
<?php else: ?>
        <h1><?php echo
JText::_('COM_MOOJLA_NO_ACCESS_GRANTED'); ?></h1>
<?php endif; ?>

languagetranslation/tmpl/default_languagefilter.php000064400000002175151160405200016767
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				Lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.77
	@build			6th April, 2022
	@created		22nd July, 2020
	@package		Moojla
	@subpackage		default_languagefilter.php
	@author			Lmskaran <http://Lmskaran.com>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

?>

languagetranslation/tmpl/index.html000064400000000054151160405200013550
0ustar00<html><body
bgcolor="#FFFFFF"></body></html>languagetranslation/view.html.php000064400000007534151160405200013237
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				Lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.77
	@build			6th April, 2022
	@created		22nd July, 2020
	@package		Moojla
	@subpackage		view.html.php
	@author			Lmskaran <http://Lmskaran.com>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access'); 

/**
 * Moojla View class for the Languagetranslation
 */
class MoojlaViewLanguagetranslation extends JViewLegacy
{
	// Overwriting JView display method
	function display($tpl = null)
	{
		// get component params
		$this->params = JComponentHelper::getParams('com_moojla');
		// get the application
		$this->app = JFactory::getApplication();
		// get the user object
		$this->user = JFactory::getUser();
		// get global action permissions
		$this->canDo =
MoojlaHelper::getActions('languagetranslation');
		// Initialise variables.
		$this->item = $this->get('Item');

		// We don't need toolbar in the modal window.
		if ($this->getLayout() !== 'modal')
		{
			// add the tool bar
			$this->addToolBar();
		}

		// set the document
		$this->setDocument();

		// Check for errors.
		if (count($errors = $this->get('Errors')))
		{
			throw new Exception(implode(PHP_EOL, $errors), 500);
		}

		parent::display($tpl);
	}

	/**
	 * Prepares the document
	 */
	protected function setDocument()
	{

		// always make sure jquery is loaded.
		JHtml::_('jquery.framework');
		// Load the header checker class.
		require_once(
JPATH_COMPONENT_ADMINISTRATOR.'/helpers/headercheck.php' );
		// Initialize the header checker.
		$HeaderCheck = new moojlaHeaderCheck;
		// add the document default css file
		$this->document->addStyleSheet(JURI::root(true)
.'/administrator/components/com_moojla/assets/css/languagetranslation.css',
(MoojlaHelper::jVersion()->isCompatible('3.8.0')) ?
array('version' => 'auto') : 'text/css');
	}

	/**
	 * Setting the toolbar
	 */
	protected function addToolBar()
	{
		// hide the main menu
		$this->app->input->set('hidemainmenu', true);
		// set the title
		if (isset($this->item->name) && $this->item->name)
		{
			$title = $this->item->name;
		}
		// Check for empty title and add view name if param is set
		if (empty($title))
		{
			$title = JText::_('COM_MOOJLA_LANGUAGETRANSLATION');
		}
		// add title to the page
		JToolbarHelper::title($title,'list');
		// add cpanel button
		JToolBarHelper::custom('languagetranslation.dashboard',
'grid-2', '', 'COM_MOOJLA_DASH', false);

		// set help url for this view if found
		$help_url = MoojlaHelper::getHelpUrl('languagetranslation');
		if (MoojlaHelper::checkString($help_url))
		{
			JToolbarHelper::help('COM_MOOJLA_HELP_MANAGER', false,
$help_url);
		}

		// add the options comp button
		if ($this->canDo->get('core.admin') ||
$this->canDo->get('core.options'))
		{
			JToolBarHelper::preferences('com_moojla');
		}
	}

	/**
	 * Escapes a value for output in a view script.
	 *
	 * @param   mixed  $var  The output to escape.
	 *
	 * @return  mixed  The escaped value.
	 */
	public function escape($var)
	{
		// use the helper htmlEscape method instead.
		return MoojlaHelper::htmlEscape($var, $this->_charset);
	}
}
?>
module/submitbutton.js000064400000002743151160405200011126
0ustar00/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				Lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.77
	@build			6th April, 2022
	@created		22nd July, 2020
	@package		Moojla
	@subpackage		submitbutton.js
	@author			Lmskaran <http://Lmskaran.com>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

Joomla.submitbutton = function(task)
{
	if (task == ''){
		return false;
	} else { 
		var action = task.split('.');
		if (action[1] == 'cancel' || action[1] == 'close' ||
document.formvalidator.isValid(document.getElementById("adminForm"))){
			Joomla.submitform(task, document.getElementById("adminForm"));
			return true;
		} else {
			alert(Joomla.JText._('module, some values are not
acceptable.','Some values are unacceptable'));
			return false;
		}
	}
}module/tmpl/edit.php000064400000011116151160405200010435 0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				Lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.77
	@build			6th April, 2022
	@created		22nd July, 2020
	@package		Moojla
	@subpackage		edit.php
	@author			Lmskaran <http://Lmskaran.com>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html');
JHtml::_('behavior.tooltip');
JHtml::_('behavior.formvalidation');
JHtml::_('formbehavior.chosen', 'select');
JHtml::_('behavior.keepalive');
$componentParams = $this->params; // will be removed just use
$this->params instead
?>
<script type="text/javascript">
	// waiting spinner
	var outerDiv = jQuery('body');
	jQuery('<div id="loading"></div>')
		.css("background", "rgba(255, 255, 255, .8)
url('components/com_moojla/assets/images/import.gif') 50% 15%
no-repeat")
		.css("top", outerDiv.position().top -
jQuery(window).scrollTop())
		.css("left", outerDiv.position().left -
jQuery(window).scrollLeft())
		.css("width", outerDiv.width())
		.css("height", outerDiv.height())
		.css("position", "fixed")
		.css("opacity", "0.80")
		.css("-ms-filter",
"progid:DXImageTransform.Microsoft.Alpha(Opacity = 80)")
		.css("filter", "alpha(opacity = 80)")
		.css("display", "none")
		.appendTo(outerDiv);
	jQuery('#loading').show();
	// when page is ready remove and show
	jQuery(window).load(function() {
		jQuery('#moojla_loader').fadeIn('fast');
		jQuery('#loading').hide();
	});
</script>
<div id="moojla_loader" style="display: none;">
<form action="<?php echo
JRoute::_('index.php?option=com_moojla&layout=edit&id='.
(int) $this->item->id . $this->referral); ?>"
method="post" name="adminForm" id="adminForm"
class="form-validate" enctype="multipart/form-data">

<div class="form-horizontal">

	<?php echo JHtml::_('bootstrap.startTabSet',
'moduleTab', array('active' =>
'details')); ?>

	<?php echo JHtml::_('bootstrap.addTab',
'moduleTab', 'details',
JText::_('COM_MOOJLA_MODULE_DETAILS', true)); ?>
		<div class="row-fluid form-horizontal-desktop">
			<div class="span12">
				<?php echo JLayoutHelper::render('module.details_left',
$this); ?>
			</div>
		</div>
	<?php echo JHtml::_('bootstrap.endTab'); ?>

	<?php $this->ignore_fieldsets =
array('details','metadata','vdmmetadata','accesscontrol');
?>
	<?php $this->tab_name = 'moduleTab'; ?>
	<?php echo JLayoutHelper::render('joomla.edit.params',
$this); ?>

	<?php if ($this->canDo->get('core.edit.created_by') ||
$this->canDo->get('core.edit.created') ||
$this->canDo->get('core.edit.state') ||
($this->canDo->get('core.delete') &&
$this->canDo->get('core.edit.state'))) : ?>
	<?php echo JHtml::_('bootstrap.addTab',
'moduleTab', 'publishing',
JText::_('COM_MOOJLA_MODULE_PUBLISHING', true)); ?>
		<div class="row-fluid form-horizontal-desktop">
			<div class="span6">
				<?php echo JLayoutHelper::render('module.publishing',
$this); ?>
			</div>
			<div class="span6">
				<?php echo JLayoutHelper::render('module.publlshing',
$this); ?>
			</div>
		</div>
	<?php echo JHtml::_('bootstrap.endTab'); ?>
	<?php endif; ?>

	<?php if ($this->canDo->get('core.admin')) : ?>
	<?php echo JHtml::_('bootstrap.addTab',
'moduleTab', 'permissions',
JText::_('COM_MOOJLA_MODULE_PERMISSION', true)); ?>
		<div class="row-fluid form-horizontal-desktop">
			<div class="span12">
				<fieldset class="adminform">
					<div class="adminformlist">
					<?php foreach
($this->form->getFieldset('accesscontrol') as $field):
?>
						<div>
							<?php echo $field->label; echo $field->input;?>
						</div>
						<div class="clearfix"></div>
					<?php endforeach; ?>
					</div>
				</fieldset>
			</div>
		</div>
	<?php echo JHtml::_('bootstrap.endTab'); ?>
	<?php endif; ?>

	<?php echo JHtml::_('bootstrap.endTabSet'); ?>

	<div>
		<input type="hidden" name="task"
value="module.edit" />
		<?php echo JHtml::_('form.token'); ?>
	</div>
</div>
</form>
</div>
module/tmpl/index.html000064400000000054151160405200010773
0ustar00<html><body
bgcolor="#FFFFFF"></body></html>module/view.html.php000064400000015162151160405200010456
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				Lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.77
	@build			6th April, 2022
	@created		22nd July, 2020
	@package		Moojla
	@subpackage		view.html.php
	@author			Lmskaran <http://Lmskaran.com>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

/**
 * Module View class
 */
class MoojlaViewModule extends JViewLegacy
{
	/**
	 * display method of View
	 * @return void
	 */
	public function display($tpl = null)
	{
		// set params
		$this->params = JComponentHelper::getParams('com_moojla');
		// Assign the variables
		$this->form = $this->get('Form');
		$this->item = $this->get('Item');
		$this->script = $this->get('Script');
		$this->state = $this->get('State');
		// get action permissions
		$this->canDo = MoojlaHelper::getActions('module',
$this->item);
		// get input
		$jinput = JFactory::getApplication()->input;
		$this->ref = $jinput->get('ref', 0, 'word');
		$this->refid = $jinput->get('refid', 0, 'int');
		$return = $jinput->get('return', null, 'base64');
		// set the referral string
		$this->referral = '';
		if ($this->refid && $this->ref)
		{
			// return to the item that referred to this item
			$this->referral = '&ref=' . (string)$this->ref .
'&refid=' . (int)$this->refid;
		}
		elseif($this->ref)
		{
			// return to the list view that referred to this item
			$this->referral = '&ref=' . (string)$this->ref;
		}
		// check return value
		if (!is_null($return))
		{
			// add the return value
			$this->referral .= '&return=' . (string)$return;
		}

		// Set the toolbar
		$this->addToolBar();
		
		// Check for errors.
		if (count($errors = $this->get('Errors')))
		{
			throw new Exception(implode("\n", $errors), 500);
		}

		// Display the template
		parent::display($tpl);

		// Set the document
		$this->setDocument();
	}


	/**
	 * Setting the toolbar
	 */
	protected function addToolBar()
	{
		JFactory::getApplication()->input->set('hidemainmenu',
true);
		$user = JFactory::getUser();
		$userId	= $user->id;
		$isNew = $this->item->id == 0;

		JToolbarHelper::title( JText::_($isNew ?
'COM_MOOJLA_MODULE_NEW' : 'COM_MOOJLA_MODULE_EDIT'),
'pencil-2 article-add');
		// Built the actions for new and existing records.
		if (MoojlaHelper::checkString($this->referral))
		{
			if ($this->canDo->get('core.create') && $isNew)
			{
				// We can create the record.
				JToolBarHelper::save('module.save',
'JTOOLBAR_SAVE');
			}
			elseif ($this->canDo->get('core.edit'))
			{
				// We can save the record.
				JToolBarHelper::save('module.save',
'JTOOLBAR_SAVE');
			}
			if ($isNew)
			{
				// Do not creat but cancel.
				JToolBarHelper::cancel('module.cancel',
'JTOOLBAR_CANCEL');
			}
			else
			{
				// We can close it.
				JToolBarHelper::cancel('module.cancel',
'JTOOLBAR_CLOSE');
			}
		}
		else
		{
			if ($isNew)
			{
				// For new records, check the create permission.
				if ($this->canDo->get('core.create'))
				{
					JToolBarHelper::apply('module.apply',
'JTOOLBAR_APPLY');
					JToolBarHelper::save('module.save',
'JTOOLBAR_SAVE');
					JToolBarHelper::custom('module.save2new',
'save-new.png', 'save-new_f2.png',
'JTOOLBAR_SAVE_AND_NEW', false);
				};
				JToolBarHelper::cancel('module.cancel',
'JTOOLBAR_CANCEL');
			}
			else
			{
				if ($this->canDo->get('core.edit'))
				{
					// We can save the new record
					JToolBarHelper::apply('module.apply',
'JTOOLBAR_APPLY');
					JToolBarHelper::save('module.save',
'JTOOLBAR_SAVE');
					// We can save this record, but check the create permission to see
					// if we can return to make a new one.
					if ($this->canDo->get('core.create'))
					{
						JToolBarHelper::custom('module.save2new',
'save-new.png', 'save-new_f2.png',
'JTOOLBAR_SAVE_AND_NEW', false);
					}
				}
				$canVersion = ($this->canDo->get('core.version')
&& $this->canDo->get('module.version'));
				if ($this->state->params->get('save_history', 1)
&& $this->canDo->get('core.edit') &&
$canVersion)
				{
					JToolbarHelper::versions('com_moojla.module',
$this->item->id);
				}
				if ($this->canDo->get('core.create'))
				{
					JToolBarHelper::custom('module.save2copy',
'save-copy.png', 'save-copy_f2.png',
'JTOOLBAR_SAVE_AS_COPY', false);
				}
				JToolBarHelper::cancel('module.cancel',
'JTOOLBAR_CLOSE');
			}
		}
		JToolbarHelper::divider();
		// set help url for this view if found
		$help_url = MoojlaHelper::getHelpUrl('module');
		if (MoojlaHelper::checkString($help_url))
		{
			JToolbarHelper::help('COM_MOOJLA_HELP_MANAGER', false,
$help_url);
		}
	}

	/**
	 * Escapes a value for output in a view script.
	 *
	 * @param   mixed  $var  The output to escape.
	 *
	 * @return  mixed  The escaped value.
	 */
	public function escape($var)
	{
		if(strlen($var) > 30)
		{
    		// use the helper htmlEscape method instead and shorten the string
			return MoojlaHelper::htmlEscape($var, $this->_charset, true, 30);
		}
		// use the helper htmlEscape method instead.
		return MoojlaHelper::htmlEscape($var, $this->_charset);
	}

	/**
	 * Method to set up the document properties
	 *
	 * @return void
	 */
	protected function setDocument()
	{
		$isNew = ($this->item->id < 1);
		if (!isset($this->document))
		{
			$this->document = JFactory::getDocument();
		}
		$this->document->setTitle(JText::_($isNew ?
'COM_MOOJLA_MODULE_NEW' : 'COM_MOOJLA_MODULE_EDIT'));
		$this->document->addStyleSheet(JURI::root() .
"administrator/components/com_moojla/assets/css/module.css",
(MoojlaHelper::jVersion()->isCompatible('3.8.0')) ?
array('version' => 'auto') : 'text/css');
		$this->document->addScript(JURI::root() . $this->script,
(MoojlaHelper::jVersion()->isCompatible('3.8.0')) ?
array('version' => 'auto') :
'text/javascript');
		$this->document->addScript(JURI::root() .
"administrator/components/com_moojla/views/module/submitbutton.js",
(MoojlaHelper::jVersion()->isCompatible('3.8.0')) ?
array('version' => 'auto') :
'text/javascript'); 
		JText::script('view not acceptable. Error');
	}
}
modules/index.html000064400000000054151160405200010202
0ustar00<html><body
bgcolor="#FFFFFF"></body></html>modules/tmpl/default.php000064400000005515151160405200011325
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				Lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.77
	@build			6th April, 2022
	@created		22nd July, 2020
	@package		Moojla
	@subpackage		default.php
	@author			Lmskaran <http://Lmskaran.com>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

JHtml::_('behavior.tooltip');
JHtml::_('behavior.multiselect');
JHtml::_('dropdown.init');
JHtml::_('formbehavior.chosen', 'select');
if ($this->saveOrder)
{
	$saveOrderingUrl =
'index.php?option=com_moojla&task=modules.saveOrderAjax&tmpl=component';
	JHtml::_('sortablelist.sortable', 'moduleList',
'adminForm', strtolower($this->listDirn), $saveOrderingUrl);
}
?>
<form action="<?php echo
JRoute::_('index.php?option=com_moojla&view=modules');
?>" method="post" name="adminForm"
id="adminForm">
<?php if(!empty( $this->sidebar)): ?>
	<div id="j-sidebar-container" class="span2">
		<?php echo $this->sidebar; ?>
	</div>
	<div id="j-main-container" class="span10">
<?php else : ?>
	<div id="j-main-container">
<?php endif; ?>
<?php
	// Add the searchtools
	echo JLayoutHelper::render('joomla.searchtools.default',
array('view' => $this));
?>
<?php if (empty($this->items)): ?>
	<div class="alert alert-no-items">
		<?php echo JText::_('JGLOBAL_NO_MATCHING_RESULTS'); ?>
	</div>
<?php else : ?>
	<table class="table table-striped"
id="moduleList">
		<thead><?php echo
$this->loadTemplate('head');?></thead>
		<tfoot><?php echo
$this->loadTemplate('foot');?></tfoot>
		<tbody><?php echo
$this->loadTemplate('body');?></tbody>
	</table>
	<?php // Load the batch processing form. ?>
	<?php if ($this->canCreate && $this->canEdit) : ?>
		<?php echo JHtml::_(
			'bootstrap.renderModal',
			'collapseModal',
			array(
				'title' =>
JText::_('COM_MOOJLA_MODULES_BATCH_OPTIONS'),
				'footer' =>
$this->loadTemplate('batch_footer')
			),
			$this->loadTemplate('batch_body')
		); ?>
	<?php endif; ?>
	<input type="hidden" name="boxchecked"
value="0" />
	</div>
<?php endif; ?>
	<input type="hidden" name="task" value=""
/>
	<?php echo JHtml::_('form.token'); ?>
</form>
modules/tmpl/default_batch_body.php000064400000002332151160405200013475
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				Lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.77
	@build			6th April, 2022
	@created		22nd July, 2020
	@package		Moojla
	@subpackage		default_batch_body.php
	@author			Lmskaran <http://Lmskaran.com>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

?>

<p><?php echo JText::_('COM_MOOJLA_MODULES_BATCH_TIP');
?></p>
<?php echo $this->batchDisplay;
?>modules/tmpl/default_batch_footer.php000064400000002730151160405200014040
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				Lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.77
	@build			6th April, 2022
	@created		22nd July, 2020
	@package		Moojla
	@subpackage		default_batch_footer.php
	@author			Lmskaran <http://Lmskaran.com>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

?>
<!-- clear the batch values if cancel -->
<button class="btn" type="button"
onclick="" data-dismiss="modal">
	<?php echo JText::_('JCANCEL'); ?>
</button>
<!-- post the batch values if process -->
<button class="btn btn-success" type="submit"
onclick="Joomla.submitbutton('module.batch');">
	<?php echo JText::_('JGLOBAL_BATCH_PROCESS'); ?>
</button>modules/tmpl/default_body.php000064400000010256151160405200012340
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				Lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.77
	@build			6th April, 2022
	@created		22nd July, 2020
	@package		Moojla
	@subpackage		default_body.php
	@author			Lmskaran <http://Lmskaran.com>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

$edit =
"index.php?option=com_moojla&view=modules&task=module.edit";

?>
<?php foreach ($this->items as $i => $item): ?>
	<?php
		$canCheckin = $this->user->authorise('core.manage',
'com_checkin') || $item->checked_out == $this->user->id
|| $item->checked_out == 0;
		$userChkOut = JFactory::getUser($item->checked_out);
		$canDo =
MoojlaHelper::getActions('module',$item,'modules');
	?>
	<tr class="row<?php echo $i % 2; ?>">
		<td class="order nowrap center hidden-phone">
		<?php if ($canDo->get('core.edit.state')): ?>
			<?php
				$iconClass = '';
				if (!$this->saveOrder)
				{
					$iconClass = ' inactive tip-top" hasTooltip"
title="' . JHtml::tooltipText('JORDERINGDISABLED');
				}
			?>
			<span class="sortable-handler<?php echo $iconClass;
?>">
				<i class="icon-menu"></i>
			</span>
			<?php if ($this->saveOrder) : ?>
				<input type="text" style="display:none"
name="order[]" size="5"
				value="<?php echo $item->ordering; ?>"
class="width-20 text-area-order " />
			<?php endif; ?>
		<?php else: ?>
			&#8942;
		<?php endif; ?>
		</td>
		<td class="nowrap center">
		<?php if ($canDo->get('core.edit')): ?>
				<?php if ($item->checked_out) : ?>
					<?php if ($canCheckin) : ?>
						<?php echo JHtml::_('grid.id', $i, $item->id); ?>
					<?php else: ?>
						&#9633;
					<?php endif; ?>
				<?php else: ?>
					<?php echo JHtml::_('grid.id', $i, $item->id); ?>
				<?php endif; ?>
		<?php else: ?>
			&#9633;
		<?php endif; ?>
		</td>
		<td class="hidden-phone">
			<?php echo $this->escape($item->module_section_id); ?>
		</td>
		<td class="nowrap">
			<div class="name">
				<?php if ($canDo->get('core.edit')): ?>
					<a href="<?php echo $edit; ?>&id=<?php echo
$item->id; ?>"><?php echo
$this->escape($item->module_id); ?></a>
					<?php if ($item->checked_out): ?>
						<?php echo JHtml::_('jgrid.checkedout', $i,
$userChkOut->name, $item->checked_out_time, 'modules.',
$canCheckin); ?>
					<?php endif; ?>
				<?php else: ?>
					<?php echo $this->escape($item->module_id); ?>
				<?php endif; ?>
			</div>
		</td>
		<td class="hidden-phone">
			<?php echo $this->escape($item->name); ?>
		</td>
		<td class="hidden-phone">
			<?php echo $this->escape($item->modname); ?>
		</td>
		<td class="hidden-phone">
			<?php echo $this->escape($item->visible); ?>
		</td>
		<td class="hidden-phone">
			<?php echo $this->escape($item->uservisible); ?>
		</td>
		<td class="center">
		<?php if ($canDo->get('core.edit.state')) : ?>
				<?php if ($item->checked_out) : ?>
					<?php if ($canCheckin) : ?>
						<?php echo JHtml::_('jgrid.published',
$item->published, $i, 'modules.', true, 'cb'); ?>
					<?php else: ?>
						<?php echo JHtml::_('jgrid.published',
$item->published, $i, 'modules.', false, 'cb');
?>
					<?php endif; ?>
				<?php else: ?>
					<?php echo JHtml::_('jgrid.published',
$item->published, $i, 'modules.', true, 'cb'); ?>
				<?php endif; ?>
		<?php else: ?>
			<?php echo JHtml::_('jgrid.published', $item->published,
$i, 'modules.', false, 'cb'); ?>
		<?php endif; ?>
		</td>
		<td class="nowrap center hidden-phone">
			<?php echo $item->id; ?>
		</td>
	</tr>
<?php endforeach;
?>modules/tmpl/default_foot.php000064400000002305151160405200012346
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				Lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.77
	@build			6th April, 2022
	@created		22nd July, 2020
	@package		Moojla
	@subpackage		default_foot.php
	@author			Lmskaran <http://Lmskaran.com>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

?>
<tr>
	<td colspan="10"><?php echo
$this->pagination->getListFooter(); ?></td>
</tr>modules/tmpl/default_head.php000064400000005607151160405200012310
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				Lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.77
	@build			6th April, 2022
	@created		22nd July, 2020
	@package		Moojla
	@subpackage		default_head.php
	@author			Lmskaran <http://Lmskaran.com>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

?>
<tr>
	<?php if ($this->canEdit&& $this->canState): ?>
		<th width="1%" class="nowrap center
hidden-phone">
			<?php echo JHtml::_('searchtools.sort', '',
'a.ordering', $this->listDirn, $this->listOrder, null,
'asc', 'JGRID_HEADING_ORDERING',
'icon-menu-2'); ?>
		</th>
		<th width="20" class="nowrap center">
			<?php echo JHtml::_('grid.checkall'); ?>
		</th>
	<?php else: ?>
		<th width="20" class="nowrap center
hidden-phone">
			&#9662;
		</th>
		<th width="20" class="nowrap center">
			&#9632;
		</th>
	<?php endif; ?>
	<th class="nowrap hidden-phone" >
			<?php echo JHtml::_('searchtools.sort',
'COM_MOOJLA_MODULE_MODULE_SECTION_ID_LABEL',
'a.module_section_id', $this->listDirn, $this->listOrder);
?>
	</th>
	<th class="nowrap" >
			<?php echo JText::_('COM_MOOJLA_MODULE_MODULE_ID_LABEL');
?>
	</th>
	<th class="nowrap hidden-phone" >
			<?php echo JHtml::_('searchtools.sort',
'COM_MOOJLA_MODULE_NAME_LABEL', 'a.name',
$this->listDirn, $this->listOrder); ?>
	</th>
	<th class="nowrap hidden-phone" >
			<?php echo JText::_('COM_MOOJLA_MODULE_MODNAME_LABEL');
?>
	</th>
	<th class="nowrap hidden-phone" >
			<?php echo JText::_('COM_MOOJLA_MODULE_VISIBLE_LABEL');
?>
	</th>
	<th class="nowrap hidden-phone" >
			<?php echo JText::_('COM_MOOJLA_MODULE_USERVISIBLE_LABEL');
?>
	</th>
	<?php if ($this->canState): ?>
		<th width="10" class="nowrap center" >
			<?php echo JHtml::_('searchtools.sort',
'COM_MOOJLA_MODULE_STATUS', 'a.published',
$this->listDirn, $this->listOrder); ?>
		</th>
	<?php else: ?>
		<th width="10" class="nowrap center" >
			<?php echo JText::_('COM_MOOJLA_MODULE_STATUS'); ?>
		</th>
	<?php endif; ?>
	<th width="5" class="nowrap center hidden-phone"
>
			<?php echo JHtml::_('searchtools.sort',
'COM_MOOJLA_MODULE_ID', 'a.id', $this->listDirn,
$this->listOrder); ?>
	</th>
</tr>modules/tmpl/default_toolbar.php000064400000007052151160405200013045
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				Lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.77
	@build			6th April, 2022
	@created		22nd July, 2020
	@package		Moojla
	@subpackage		default_toolbar.php
	@author			Lmskaran <http://Lmskaran.com>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

?>
<div id="filter-bar" class="btn-toolbar">
        <div class="filter-search btn-group pull-left">
            <label for="filter_search"
class="element-invisible"><?php echo
JText::_('Search');?></label>
            <input type="text" name="filter_search"
id="filter_search" placeholder="<?php echo
JText::_('JSEARCH_FILTER'); ?>" value="<?php echo
$this->escape($this->state->get('filter.search'));
?>" class="hasTooltip" title="<?php echo
JHtml::tooltipText('Search Modules'); ?>" />
        </div>
        <div class="btn-group pull-left">
            <button type="submit" class="btn
hasTooltip" title="<?php echo
JHtml::tooltipText('JSEARCH_FILTER_SUBMIT'); ?>"><i
class="icon-search"></i></button>
            <button type="button" class="btn
hasTooltip" title="<?php echo
JHtml::tooltipText('JSEARCH_FILTER_CLEAR'); ?>"
onclick="document.id('filter_search').value='';this.form.submit();"><i
class="icon-remove"></i></button>
        </div>
        <div class="btn-group pull-right hidden-phone">
            <label for="limit"
class="element-invisible"><?php echo
JText::_('JFIELD_PLG_SEARCH_SEARCHLIMIT_DESC');?></label>
            <?php echo $this->pagination->getLimitBox(); ?>
        </div>
        <div class="btn-group pull-right hidden-phone">
            <label for="directionTable"
class="element-invisible"><?php echo
JText::_('JFIELD_ORDERING_DESC');?></label>
            <select name="directionTable"
id="directionTable" class="input-medium"
onchange="Joomla.orderTable()">
                <option value=""><?php echo
JText::_('JFIELD_ORDERING_DESC');?></option>
                <option value="asc" <?php if
($this->listDirn == 'asc') echo
'selected="selected"'; ?>><?php echo
JText::_('JGLOBAL_ORDER_ASCENDING');?></option>
                <option value="desc" <?php if
($this->listDirn == 'desc') echo
'selected="selected"'; ?>><?php echo
JText::_('JGLOBAL_ORDER_DESCENDING');?></option>
            </select>
        </div>
        <div class="btn-group pull-right">
            <label for="sortTable"
class="element-invisible"><?php echo
JText::_('JGLOBAL_SORT_BY');?></label>
            <select name="sortTable" id="sortTable"
class="input-medium" onchange="Joomla.orderTable()">
                <option value=""><?php echo
JText::_('JGLOBAL_SORT_BY');?></option>
                <?php echo JHtml::_('select.options',
$this->getSortFields(), 'value', 'text',
$this->listOrder);?>
            </select>
        </div>
    </div>
<div class="clearfix">
</div>modules/tmpl/index.html000064400000000054151160405200011156
0ustar00<html><body
bgcolor="#FFFFFF"></body></html>modules/view.html.php000064400000020461151160405210010640
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				Lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.77
	@build			6th April, 2022
	@created		22nd July, 2020
	@package		Moojla
	@subpackage		view.html.php
	@author			Lmskaran <http://Lmskaran.com>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

/**
 * Moojla View class for the Modules
 */
class MoojlaViewModules extends JViewLegacy
{
	/**
	 * Modules view display method
	 * @return void
	 */
	function display($tpl = null)
	{
		if ($this->getLayout() !== 'modal')
		{
			// Include helper submenu
			MoojlaHelper::addSubmenu('modules');
		}

		// Assign data to the view
		$this->items = $this->get('Items');
		$this->pagination = $this->get('Pagination');
		$this->state = $this->get('State');
		$this->user = JFactory::getUser();
		// Load the filter form from xml.
		$this->filterForm = $this->get('FilterForm');
		// Load the active filters.
		$this->activeFilters = $this->get('ActiveFilters');
		// Add the list ordering clause.
		$this->listOrder =
$this->escape($this->state->get('list.ordering',
'a.id'));
		$this->listDirn =
$this->escape($this->state->get('list.direction',
'DESC'));
		$this->saveOrder = $this->listOrder == 'a.ordering';
		// set the return here value
		$this->return_here = urlencode(base64_encode((string)
JUri::getInstance()));
		// get global action permissions
		$this->canDo = MoojlaHelper::getActions('module');
		$this->canEdit = $this->canDo->get('core.edit');
		$this->canState =
$this->canDo->get('core.edit.state');
		$this->canCreate = $this->canDo->get('core.create');
		$this->canDelete = $this->canDo->get('core.delete');
		$this->canBatch = $this->canDo->get('core.batch');

		// We don't need toolbar in the modal window.
		if ($this->getLayout() !== 'modal')
		{
			$this->addToolbar();
			$this->sidebar = JHtmlSidebar::render();
			// load the batch html
			if ($this->canCreate && $this->canEdit &&
$this->canState)
			{
				$this->batchDisplay = JHtmlBatch_::render();
			}
		}
		
		// Check for errors.
		if (count($errors = $this->get('Errors')))
		{
			throw new Exception(implode("\n", $errors), 500);
		}

		// Display the template
		parent::display($tpl);

		// Set the document
		$this->setDocument();
	}

	/**
	 * Setting the toolbar
	 */
	protected function addToolBar()
	{
		JToolBarHelper::title(JText::_('COM_MOOJLA_MODULES'),
'image');
		JHtmlSidebar::setAction('index.php?option=com_moojla&view=modules');
		JFormHelper::addFieldPath(JPATH_COMPONENT . '/models/fields');

		if ($this->canCreate)
		{
			JToolBarHelper::addNew('module.add');
		}

		// Only load if there are items
		if (MoojlaHelper::checkArray($this->items))
		{
			if ($this->canEdit)
			{
				JToolBarHelper::editList('module.edit');
			}

			if ($this->canState)
			{
				JToolBarHelper::publishList('modules.publish');
				JToolBarHelper::unpublishList('modules.unpublish');
				JToolBarHelper::archiveList('modules.archive');

				if ($this->canDo->get('core.admin'))
				{
					JToolBarHelper::checkin('modules.checkin');
				}
			}

			// Add a batch button
			if ($this->canBatch && $this->canCreate &&
$this->canEdit && $this->canState)
			{
				// Get the toolbar object instance
				$bar = JToolBar::getInstance('toolbar');
				// set the batch button name
				$title = JText::_('JTOOLBAR_BATCH');
				// Instantiate a new JLayoutFile instance and render the batch button
				$layout = new JLayoutFile('joomla.toolbar.batch');
				// add the button to the page
				$dhtml = $layout->render(array('title' => $title));
				$bar->appendButton('Custom', $dhtml, 'batch');
			}

			if ($this->state->get('filter.published') == -2
&& ($this->canState && $this->canDelete))
			{
				JToolbarHelper::deleteList('', 'modules.delete',
'JTOOLBAR_EMPTY_TRASH');
			}
			elseif ($this->canState && $this->canDelete)
			{
				JToolbarHelper::trash('modules.trash');
			}
		}

		// set help url for this view if found
		$help_url = MoojlaHelper::getHelpUrl('modules');
		if (MoojlaHelper::checkString($help_url))
		{
				JToolbarHelper::help('COM_MOOJLA_HELP_MANAGER', false,
$help_url);
		}

		// add the options comp button
		if ($this->canDo->get('core.admin') ||
$this->canDo->get('core.options'))
		{
			JToolBarHelper::preferences('com_moojla');
		}

		// Only load published batch if state and batch is allowed
		if ($this->canState && $this->canBatch)
		{
			JHtmlBatch_::addListSelection(
				JText::_('COM_MOOJLA_KEEP_ORIGINAL_STATE'),
				'batch[published]',
				JHtml::_('select.options',
JHtml::_('jgrid.publishedOptions', array('all' =>
false)), 'value', 'text', '', true)
			);
		}

		// Only load Module Section Id batch if create, edit, and batch is
allowed
		if ($this->canBatch && $this->canCreate &&
$this->canEdit)
		{
			// Set Module Section Id Selection
			$this->module_section_idOptions =
JFormHelper::loadFieldType('modulesfiltermodulesectionid')->options;
			// We do some sanitation for Module Section Id filter
			if (MoojlaHelper::checkArray($this->module_section_idOptions)
&&
				isset($this->module_section_idOptions[0]->value) &&
				!MoojlaHelper::checkString($this->module_section_idOptions[0]->value))
			{
				unset($this->module_section_idOptions[0]);
			}
			// Module Section Id Batch Selection
			JHtmlBatch_::addListSelection(
				'- Keep Original
'.JText::_('COM_MOOJLA_MODULE_MODULE_SECTION_ID_LABEL').'
-',
				'batch[module_section_id]',
				JHtml::_('select.options',
$this->module_section_idOptions, 'value', 'text')
			);
		}

		// Only load Modname batch if create, edit, and batch is allowed
		if ($this->canBatch && $this->canCreate &&
$this->canEdit)
		{
			// Set Modname Selection
			$this->modnameOptions =
JFormHelper::loadFieldType('modulesfiltermodname')->options;
			// We do some sanitation for Modname filter
			if (MoojlaHelper::checkArray($this->modnameOptions) &&
				isset($this->modnameOptions[0]->value) &&
				!MoojlaHelper::checkString($this->modnameOptions[0]->value))
			{
				unset($this->modnameOptions[0]);
			}
			// Modname Batch Selection
			JHtmlBatch_::addListSelection(
				'- Keep Original
'.JText::_('COM_MOOJLA_MODULE_MODNAME_LABEL').'
-',
				'batch[modname]',
				JHtml::_('select.options', $this->modnameOptions,
'value', 'text')
			);
		}
	}

	/**
	 * Method to set up the document properties
	 *
	 * @return void
	 */
	protected function setDocument()
	{
		if (!isset($this->document))
		{
			$this->document = JFactory::getDocument();
		}
		$this->document->setTitle(JText::_('COM_MOOJLA_MODULES'));
		$this->document->addStyleSheet(JURI::root() .
"administrator/components/com_moojla/assets/css/modules.css",
(MoojlaHelper::jVersion()->isCompatible('3.8.0')) ?
array('version' => 'auto') : 'text/css');
	}

	/**
	 * Escapes a value for output in a view script.
	 *
	 * @param   mixed  $var  The output to escape.
	 *
	 * @return  mixed  The escaped value.
	 */
	public function escape($var)
	{
		if(strlen($var) > 50)
		{
			// use the helper htmlEscape method instead and shorten the string
			return MoojlaHelper::htmlEscape($var, $this->_charset, true);
		}
		// use the helper htmlEscape method instead.
		return MoojlaHelper::htmlEscape($var, $this->_charset);
	}

	/**
	 * Returns an array of fields the table can be sorted by
	 *
	 * @return  array  Array containing the field name to sort by as the key
and display text as value
	 */
	protected function getSortFields()
	{
		return array(
			'a.ordering' =>
JText::_('JGRID_HEADING_ORDERING'),
			'a.published' => JText::_('JSTATUS'),
			'a.module_section_id' =>
JText::_('COM_MOOJLA_MODULE_MODULE_SECTION_ID_LABEL'),
			'a.name' =>
JText::_('COM_MOOJLA_MODULE_NAME_LABEL'),
			'a.id' => JText::_('JGRID_HEADING_ID')
		);
	}
}
moojla/index.html000064400000000054151160405210010014
0ustar00<html><body
bgcolor="#FFFFFF"></body></html>moojla/tmpl/default.php000064400000003577151160405210011145
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				Lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.77
	@build			6th April, 2022
	@created		22nd July, 2020
	@package		Moojla
	@subpackage		default.php
	@author			Lmskaran <http://Lmskaran.com>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

JHtml::_('behavior.tooltip');

?>
<div id="j-main-container">
	<div class="span9">
		<?php echo JHtml::_('bootstrap.startAccordion',
'dashboard_left', array('active' =>
'main')); ?>
			<?php echo JHtml::_('bootstrap.addSlide',
'dashboard_left', 'cPanel', 'main'); ?>
				<?php echo $this->loadTemplate('main');?>
			<?php echo JHtml::_('bootstrap.endSlide'); ?>
		<?php echo JHtml::_('bootstrap.endAccordion'); ?>
	</div>
	<div class="span3">
		<?php echo JHtml::_('bootstrap.startAccordion',
'dashboard_right', array('active' =>
'vdm')); ?>
			<?php echo JHtml::_('bootstrap.addSlide',
'dashboard_right', 'Lmskaran', 'vdm'); ?>
				<?php echo $this->loadTemplate('vdm');?>
			<?php echo JHtml::_('bootstrap.endSlide'); ?>
		<?php echo JHtml::_('bootstrap.endAccordion'); ?>
	</div>
</div>moojla/tmpl/default_main.php000064400000003645151160405210012145
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				Lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.77
	@build			6th April, 2022
	@created		22nd July, 2020
	@package		Moojla
	@subpackage		default_main.php
	@author			Lmskaran <http://Lmskaran.com>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

?>
<?php if(isset($this->icons['main']) &&
is_array($this->icons['main'])) :?>
	<?php foreach($this->icons['main'] as $icon): ?>
		<div class="dashboard-wraper">
			<div class="dashboard-content"> 
				<a class="icon" href="<?php echo $icon->url;
?>">
					<img alt="<?php echo $icon->alt; ?>"
src="components/com_moojla/assets/images/icons/<?php  echo
$icon->image; ?>">
					<span class="dashboard-title"><?php echo
JText::_($icon->name); ?></span>
				</a>
			 </div>
		</div>
	<?php endforeach; ?>
	<div class="clearfix"></div>
<?php else: ?>
	<div class="alert alert-error"><h4
class="alert-heading"><?php echo JText::_("Permission
denied, or not correctly set"); ?></h4><div
class="alert-message"><?php echo JText::_("Please
notify your System Administrator if result is unexpected.");
?></div></div>
<?php endif;
?>moojla/tmpl/default_vdm.php000064400000005032151160405210011777
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				Lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.77
	@build			6th April, 2022
	@created		22nd July, 2020
	@package		Moojla
	@subpackage		default_vdm.php
	@author			Lmskaran <http://Lmskaran.com>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

?>
<img alt="<?php echo JText::_('COM_MOOJLA');
?>"
src="components/com_moojla/assets/images/vdm-component.png">
<ul class="list-striped">
	<li><b><?php echo JText::_('COM_MOOJLA_VERSION');
?>:</b> <?php echo $this->manifest->version;
?>&nbsp;&nbsp;<span
class="update-notice"></span></li>
	<li><b><?php echo JText::_('COM_MOOJLA_DATE');
?>:</b> <?php echo $this->manifest->creationDate;
?></li>
	<li><b><?php echo JText::_('COM_MOOJLA_AUTHOR');
?>:</b> <a href="mailto:<?php echo
$this->manifest->authorEmail; ?>"><?php echo
$this->manifest->author; ?></a></li>
	<li><b><?php echo JText::_('COM_MOOJLA_WEBSITE');
?>:</b> <a href="<?php echo
$this->manifest->authorUrl; ?>"
target="_blank"><?php echo
$this->manifest->authorUrl; ?></a></li>
	<li><b><?php echo JText::_('COM_MOOJLA_LICENSE');
?>:</b> <?php echo $this->manifest->license;
?></li>
	<li><b><?php echo $this->manifest->copyright;
?></b></li>
</ul>
<div class="clearfix"></div>
<?php if(MoojlaHelper::checkArray($this->contributors)): ?>
	<?php if(count($this->contributors) > 1): ?>
		<h3><?php echo JText::_('COM_MOOJLA_CONTRIBUTORS');
?></h3>
	<?php else: ?>
		<h3><?php echo JText::_('COM_MOOJLA_CONTRIBUTOR');
?></h3>
	<?php endif; ?>
	<ul class="list-striped">
		<?php foreach($this->contributors as $contributor): ?>
		<li><b><?php echo $contributor['title'];
?>:</b> <?php echo $contributor['name'];
?></li>
		<?php endforeach; ?>
	</ul>
	<div class="clearfix"></div>
<?php endif;
?>moojla/tmpl/index.html000064400000000054151160405210010770
0ustar00<html><body
bgcolor="#FFFFFF"></body></html>moojla/view.html.php000064400000005464151160405210010457
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				Lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.77
	@build			6th April, 2022
	@created		22nd July, 2020
	@package		Moojla
	@subpackage		view.html.php
	@author			Lmskaran <http://Lmskaran.com>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

/**
 * Moojla View class
 */
class MoojlaViewMoojla extends JViewLegacy
{
	/**
	 * View display method
	 * @return void
	 */
	function display($tpl = null)
	{
		// Assign data to the view
		$this->icons			= $this->get('Icons');
		$this->contributors		= MoojlaHelper::getContributors();
		
		// get the manifest details of the component
		$this->manifest = MoojlaHelper::manifest();
		
		// Set the toolbar
		$this->addToolBar();
		
		// Check for errors.
		if (count($errors = $this->get('Errors')))
		{
			throw new Exception(implode("\n", $errors), 500);
		}

		// Display the template
		parent::display($tpl);

		// Set the document
		$this->setDocument();
	}

	/**
	 * Setting the toolbar
	 */
	protected function addToolBar()
	{
		$canDo = MoojlaHelper::getActions('moojla');
		JToolBarHelper::title(JText::_('COM_MOOJLA_DASHBOARD'),
'grid-2');

		// set help url for this view if found
		$help_url = MoojlaHelper::getHelpUrl('moojla');
		if (MoojlaHelper::checkString($help_url))
		{
			JToolbarHelper::help('COM_MOOJLA_HELP_MANAGER', false,
$help_url);
		}

		if ($canDo->get('core.admin') ||
$canDo->get('core.options'))
		{
			JToolBarHelper::preferences('com_moojla');
		}
	}

	/**
	 * Method to set up the document properties
	 *
	 * @return void
	 */
	protected function setDocument()
	{
		$document = JFactory::getDocument();
		
		// add dashboard style sheets
		$document->addStyleSheet(JURI::root() .
"administrator/components/com_moojla/assets/css/dashboard.css");
		
		// set page title
		$document->setTitle(JText::_('COM_MOOJLA_DASHBOARD'));
		
		// add manifest to page JavaScript
		$document->addScriptDeclaration("var manifest =
jQuery.parseJSON('" . json_encode($this->manifest) .
"');", "text/javascript");
	}
}
section/submitbutton.js000064400000002744151160405210011307
0ustar00/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				Lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.77
	@build			6th April, 2022
	@created		22nd July, 2020
	@package		Moojla
	@subpackage		submitbutton.js
	@author			Lmskaran <http://Lmskaran.com>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

Joomla.submitbutton = function(task)
{
	if (task == ''){
		return false;
	} else { 
		var action = task.split('.');
		if (action[1] == 'cancel' || action[1] == 'close' ||
document.formvalidator.isValid(document.getElementById("adminForm"))){
			Joomla.submitform(task, document.getElementById("adminForm"));
			return true;
		} else {
			alert(Joomla.JText._('section, some values are not
acceptable.','Some values are unacceptable'));
			return false;
		}
	}
}section/tmpl/edit.php000064400000011132151160405210010613 0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				Lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.77
	@build			6th April, 2022
	@created		22nd July, 2020
	@package		Moojla
	@subpackage		edit.php
	@author			Lmskaran <http://Lmskaran.com>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html');
JHtml::_('behavior.tooltip');
JHtml::_('behavior.formvalidation');
JHtml::_('formbehavior.chosen', 'select');
JHtml::_('behavior.keepalive');
$componentParams = $this->params; // will be removed just use
$this->params instead
?>
<script type="text/javascript">
	// waiting spinner
	var outerDiv = jQuery('body');
	jQuery('<div id="loading"></div>')
		.css("background", "rgba(255, 255, 255, .8)
url('components/com_moojla/assets/images/import.gif') 50% 15%
no-repeat")
		.css("top", outerDiv.position().top -
jQuery(window).scrollTop())
		.css("left", outerDiv.position().left -
jQuery(window).scrollLeft())
		.css("width", outerDiv.width())
		.css("height", outerDiv.height())
		.css("position", "fixed")
		.css("opacity", "0.80")
		.css("-ms-filter",
"progid:DXImageTransform.Microsoft.Alpha(Opacity = 80)")
		.css("filter", "alpha(opacity = 80)")
		.css("display", "none")
		.appendTo(outerDiv);
	jQuery('#loading').show();
	// when page is ready remove and show
	jQuery(window).load(function() {
		jQuery('#moojla_loader').fadeIn('fast');
		jQuery('#loading').hide();
	});
</script>
<div id="moojla_loader" style="display: none;">
<form action="<?php echo
JRoute::_('index.php?option=com_moojla&layout=edit&id='.
(int) $this->item->id . $this->referral); ?>"
method="post" name="adminForm" id="adminForm"
class="form-validate" enctype="multipart/form-data">

<div class="form-horizontal">

	<?php echo JHtml::_('bootstrap.startTabSet',
'sectionTab', array('active' =>
'details')); ?>

	<?php echo JHtml::_('bootstrap.addTab',
'sectionTab', 'details',
JText::_('COM_MOOJLA_SECTION_DETAILS', true)); ?>
		<div class="row-fluid form-horizontal-desktop">
			<div class="span12">
				<?php echo JLayoutHelper::render('section.details_left',
$this); ?>
			</div>
		</div>
	<?php echo JHtml::_('bootstrap.endTab'); ?>

	<?php $this->ignore_fieldsets =
array('details','metadata','vdmmetadata','accesscontrol');
?>
	<?php $this->tab_name = 'sectionTab'; ?>
	<?php echo JLayoutHelper::render('joomla.edit.params',
$this); ?>

	<?php if ($this->canDo->get('core.edit.created_by') ||
$this->canDo->get('core.edit.created') ||
$this->canDo->get('core.edit.state') ||
($this->canDo->get('core.delete') &&
$this->canDo->get('core.edit.state'))) : ?>
	<?php echo JHtml::_('bootstrap.addTab',
'sectionTab', 'publishing',
JText::_('COM_MOOJLA_SECTION_PUBLISHING', true)); ?>
		<div class="row-fluid form-horizontal-desktop">
			<div class="span6">
				<?php echo JLayoutHelper::render('section.publishing',
$this); ?>
			</div>
			<div class="span6">
				<?php echo JLayoutHelper::render('section.publlshing',
$this); ?>
			</div>
		</div>
	<?php echo JHtml::_('bootstrap.endTab'); ?>
	<?php endif; ?>

	<?php if ($this->canDo->get('core.admin')) : ?>
	<?php echo JHtml::_('bootstrap.addTab',
'sectionTab', 'permissions',
JText::_('COM_MOOJLA_SECTION_PERMISSION', true)); ?>
		<div class="row-fluid form-horizontal-desktop">
			<div class="span12">
				<fieldset class="adminform">
					<div class="adminformlist">
					<?php foreach
($this->form->getFieldset('accesscontrol') as $field):
?>
						<div>
							<?php echo $field->label; echo $field->input;?>
						</div>
						<div class="clearfix"></div>
					<?php endforeach; ?>
					</div>
				</fieldset>
			</div>
		</div>
	<?php echo JHtml::_('bootstrap.endTab'); ?>
	<?php endif; ?>

	<?php echo JHtml::_('bootstrap.endTabSet'); ?>

	<div>
		<input type="hidden" name="task"
value="section.edit" />
		<?php echo JHtml::_('form.token'); ?>
	</div>
</div>
</form>
</div>
section/tmpl/index.html000064400000000054151160405210011153
0ustar00<html><body
bgcolor="#FFFFFF"></body></html>section/view.html.php000064400000015213151160405210010633
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				Lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.77
	@build			6th April, 2022
	@created		22nd July, 2020
	@package		Moojla
	@subpackage		view.html.php
	@author			Lmskaran <http://Lmskaran.com>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

/**
 * Section View class
 */
class MoojlaViewSection extends JViewLegacy
{
	/**
	 * display method of View
	 * @return void
	 */
	public function display($tpl = null)
	{
		// set params
		$this->params = JComponentHelper::getParams('com_moojla');
		// Assign the variables
		$this->form = $this->get('Form');
		$this->item = $this->get('Item');
		$this->script = $this->get('Script');
		$this->state = $this->get('State');
		// get action permissions
		$this->canDo = MoojlaHelper::getActions('section',
$this->item);
		// get input
		$jinput = JFactory::getApplication()->input;
		$this->ref = $jinput->get('ref', 0, 'word');
		$this->refid = $jinput->get('refid', 0, 'int');
		$return = $jinput->get('return', null, 'base64');
		// set the referral string
		$this->referral = '';
		if ($this->refid && $this->ref)
		{
			// return to the item that referred to this item
			$this->referral = '&ref=' . (string)$this->ref .
'&refid=' . (int)$this->refid;
		}
		elseif($this->ref)
		{
			// return to the list view that referred to this item
			$this->referral = '&ref=' . (string)$this->ref;
		}
		// check return value
		if (!is_null($return))
		{
			// add the return value
			$this->referral .= '&return=' . (string)$return;
		}

		// Set the toolbar
		$this->addToolBar();
		
		// Check for errors.
		if (count($errors = $this->get('Errors')))
		{
			throw new Exception(implode("\n", $errors), 500);
		}

		// Display the template
		parent::display($tpl);

		// Set the document
		$this->setDocument();
	}


	/**
	 * Setting the toolbar
	 */
	protected function addToolBar()
	{
		JFactory::getApplication()->input->set('hidemainmenu',
true);
		$user = JFactory::getUser();
		$userId	= $user->id;
		$isNew = $this->item->id == 0;

		JToolbarHelper::title( JText::_($isNew ?
'COM_MOOJLA_SECTION_NEW' : 'COM_MOOJLA_SECTION_EDIT'),
'pencil-2 article-add');
		// Built the actions for new and existing records.
		if (MoojlaHelper::checkString($this->referral))
		{
			if ($this->canDo->get('core.create') && $isNew)
			{
				// We can create the record.
				JToolBarHelper::save('section.save',
'JTOOLBAR_SAVE');
			}
			elseif ($this->canDo->get('core.edit'))
			{
				// We can save the record.
				JToolBarHelper::save('section.save',
'JTOOLBAR_SAVE');
			}
			if ($isNew)
			{
				// Do not creat but cancel.
				JToolBarHelper::cancel('section.cancel',
'JTOOLBAR_CANCEL');
			}
			else
			{
				// We can close it.
				JToolBarHelper::cancel('section.cancel',
'JTOOLBAR_CLOSE');
			}
		}
		else
		{
			if ($isNew)
			{
				// For new records, check the create permission.
				if ($this->canDo->get('core.create'))
				{
					JToolBarHelper::apply('section.apply',
'JTOOLBAR_APPLY');
					JToolBarHelper::save('section.save',
'JTOOLBAR_SAVE');
					JToolBarHelper::custom('section.save2new',
'save-new.png', 'save-new_f2.png',
'JTOOLBAR_SAVE_AND_NEW', false);
				};
				JToolBarHelper::cancel('section.cancel',
'JTOOLBAR_CANCEL');
			}
			else
			{
				if ($this->canDo->get('core.edit'))
				{
					// We can save the new record
					JToolBarHelper::apply('section.apply',
'JTOOLBAR_APPLY');
					JToolBarHelper::save('section.save',
'JTOOLBAR_SAVE');
					// We can save this record, but check the create permission to see
					// if we can return to make a new one.
					if ($this->canDo->get('core.create'))
					{
						JToolBarHelper::custom('section.save2new',
'save-new.png', 'save-new_f2.png',
'JTOOLBAR_SAVE_AND_NEW', false);
					}
				}
				$canVersion = ($this->canDo->get('core.version')
&& $this->canDo->get('section.version'));
				if ($this->state->params->get('save_history', 1)
&& $this->canDo->get('core.edit') &&
$canVersion)
				{
					JToolbarHelper::versions('com_moojla.section',
$this->item->id);
				}
				if ($this->canDo->get('core.create'))
				{
					JToolBarHelper::custom('section.save2copy',
'save-copy.png', 'save-copy_f2.png',
'JTOOLBAR_SAVE_AS_COPY', false);
				}
				JToolBarHelper::cancel('section.cancel',
'JTOOLBAR_CLOSE');
			}
		}
		JToolbarHelper::divider();
		// set help url for this view if found
		$help_url = MoojlaHelper::getHelpUrl('section');
		if (MoojlaHelper::checkString($help_url))
		{
			JToolbarHelper::help('COM_MOOJLA_HELP_MANAGER', false,
$help_url);
		}
	}

	/**
	 * Escapes a value for output in a view script.
	 *
	 * @param   mixed  $var  The output to escape.
	 *
	 * @return  mixed  The escaped value.
	 */
	public function escape($var)
	{
		if(strlen($var) > 30)
		{
    		// use the helper htmlEscape method instead and shorten the string
			return MoojlaHelper::htmlEscape($var, $this->_charset, true, 30);
		}
		// use the helper htmlEscape method instead.
		return MoojlaHelper::htmlEscape($var, $this->_charset);
	}

	/**
	 * Method to set up the document properties
	 *
	 * @return void
	 */
	protected function setDocument()
	{
		$isNew = ($this->item->id < 1);
		if (!isset($this->document))
		{
			$this->document = JFactory::getDocument();
		}
		$this->document->setTitle(JText::_($isNew ?
'COM_MOOJLA_SECTION_NEW' : 'COM_MOOJLA_SECTION_EDIT'));
		$this->document->addStyleSheet(JURI::root() .
"administrator/components/com_moojla/assets/css/section.css",
(MoojlaHelper::jVersion()->isCompatible('3.8.0')) ?
array('version' => 'auto') : 'text/css');
		$this->document->addScript(JURI::root() . $this->script,
(MoojlaHelper::jVersion()->isCompatible('3.8.0')) ?
array('version' => 'auto') :
'text/javascript');
		$this->document->addScript(JURI::root() .
"administrator/components/com_moojla/views/section/submitbutton.js",
(MoojlaHelper::jVersion()->isCompatible('3.8.0')) ?
array('version' => 'auto') :
'text/javascript'); 
		JText::script('view not acceptable. Error');
	}
}
sections/index.html000064400000000054151160405210010362
0ustar00<html><body
bgcolor="#FFFFFF"></body></html>sections/tmpl/default.php000064400000005522151160405210011503
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				Lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.77
	@build			6th April, 2022
	@created		22nd July, 2020
	@package		Moojla
	@subpackage		default.php
	@author			Lmskaran <http://Lmskaran.com>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

JHtml::_('behavior.tooltip');
JHtml::_('behavior.multiselect');
JHtml::_('dropdown.init');
JHtml::_('formbehavior.chosen', 'select');
if ($this->saveOrder)
{
	$saveOrderingUrl =
'index.php?option=com_moojla&task=sections.saveOrderAjax&tmpl=component';
	JHtml::_('sortablelist.sortable', 'sectionList',
'adminForm', strtolower($this->listDirn), $saveOrderingUrl);
}
?>
<form action="<?php echo
JRoute::_('index.php?option=com_moojla&view=sections');
?>" method="post" name="adminForm"
id="adminForm">
<?php if(!empty( $this->sidebar)): ?>
	<div id="j-sidebar-container" class="span2">
		<?php echo $this->sidebar; ?>
	</div>
	<div id="j-main-container" class="span10">
<?php else : ?>
	<div id="j-main-container">
<?php endif; ?>
<?php
	// Add the searchtools
	echo JLayoutHelper::render('joomla.searchtools.default',
array('view' => $this));
?>
<?php if (empty($this->items)): ?>
	<div class="alert alert-no-items">
		<?php echo JText::_('JGLOBAL_NO_MATCHING_RESULTS'); ?>
	</div>
<?php else : ?>
	<table class="table table-striped"
id="sectionList">
		<thead><?php echo
$this->loadTemplate('head');?></thead>
		<tfoot><?php echo
$this->loadTemplate('foot');?></tfoot>
		<tbody><?php echo
$this->loadTemplate('body');?></tbody>
	</table>
	<?php // Load the batch processing form. ?>
	<?php if ($this->canCreate && $this->canEdit) : ?>
		<?php echo JHtml::_(
			'bootstrap.renderModal',
			'collapseModal',
			array(
				'title' =>
JText::_('COM_MOOJLA_SECTIONS_BATCH_OPTIONS'),
				'footer' =>
$this->loadTemplate('batch_footer')
			),
			$this->loadTemplate('batch_body')
		); ?>
	<?php endif; ?>
	<input type="hidden" name="boxchecked"
value="0" />
	</div>
<?php endif; ?>
	<input type="hidden" name="task" value=""
/>
	<?php echo JHtml::_('form.token'); ?>
</form>
sections/tmpl/default_batch_body.php000064400000002333151160405210013656
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				Lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.77
	@build			6th April, 2022
	@created		22nd July, 2020
	@package		Moojla
	@subpackage		default_batch_body.php
	@author			Lmskaran <http://Lmskaran.com>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

?>

<p><?php echo JText::_('COM_MOOJLA_SECTIONS_BATCH_TIP');
?></p>
<?php echo $this->batchDisplay;
?>sections/tmpl/default_batch_footer.php000064400000002731151160405210014221
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				Lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.77
	@build			6th April, 2022
	@created		22nd July, 2020
	@package		Moojla
	@subpackage		default_batch_footer.php
	@author			Lmskaran <http://Lmskaran.com>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

?>
<!-- clear the batch values if cancel -->
<button class="btn" type="button"
onclick="" data-dismiss="modal">
	<?php echo JText::_('JCANCEL'); ?>
</button>
<!-- post the batch values if process -->
<button class="btn btn-success" type="submit"
onclick="Joomla.submitbutton('section.batch');">
	<?php echo JText::_('JGLOBAL_BATCH_PROCESS'); ?>
</button>sections/tmpl/default_body.php000064400000010134151160405210012513
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				Lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.77
	@build			6th April, 2022
	@created		22nd July, 2020
	@package		Moojla
	@subpackage		default_body.php
	@author			Lmskaran <http://Lmskaran.com>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

$edit =
"index.php?option=com_moojla&view=sections&task=section.edit";

?>
<?php foreach ($this->items as $i => $item): ?>
	<?php
		$canCheckin = $this->user->authorise('core.manage',
'com_checkin') || $item->checked_out == $this->user->id
|| $item->checked_out == 0;
		$userChkOut = JFactory::getUser($item->checked_out);
		$canDo =
MoojlaHelper::getActions('section',$item,'sections');
	?>
	<tr class="row<?php echo $i % 2; ?>">
		<td class="order nowrap center hidden-phone">
		<?php if ($canDo->get('core.edit.state')): ?>
			<?php
				$iconClass = '';
				if (!$this->saveOrder)
				{
					$iconClass = ' inactive tip-top" hasTooltip"
title="' . JHtml::tooltipText('JORDERINGDISABLED');
				}
			?>
			<span class="sortable-handler<?php echo $iconClass;
?>">
				<i class="icon-menu"></i>
			</span>
			<?php if ($this->saveOrder) : ?>
				<input type="text" style="display:none"
name="order[]" size="5"
				value="<?php echo $item->ordering; ?>"
class="width-20 text-area-order " />
			<?php endif; ?>
		<?php else: ?>
			&#8942;
		<?php endif; ?>
		</td>
		<td class="nowrap center">
		<?php if ($canDo->get('core.edit')): ?>
				<?php if ($item->checked_out) : ?>
					<?php if ($canCheckin) : ?>
						<?php echo JHtml::_('grid.id', $i, $item->id); ?>
					<?php else: ?>
						&#9633;
					<?php endif; ?>
				<?php else: ?>
					<?php echo JHtml::_('grid.id', $i, $item->id); ?>
				<?php endif; ?>
		<?php else: ?>
			&#9633;
		<?php endif; ?>
		</td>
		<td class="hidden-phone">
			<?php echo $this->escape($item->courseid); ?>
		</td>
		<td class="nowrap">
			<div class="name">
				<?php if ($canDo->get('core.edit')): ?>
					<a href="<?php echo $edit; ?>&id=<?php echo
$item->id; ?>"><?php echo
$this->escape($item->section_id); ?></a>
					<?php if ($item->checked_out): ?>
						<?php echo JHtml::_('jgrid.checkedout', $i,
$userChkOut->name, $item->checked_out_time, 'sections.',
$canCheckin); ?>
					<?php endif; ?>
				<?php else: ?>
					<?php echo $this->escape($item->section_id); ?>
				<?php endif; ?>
			</div>
		</td>
		<td class="hidden-phone">
			<?php echo $this->escape($item->name); ?>
		</td>
		<td class="hidden-phone">
			<?php echo $this->escape($item->visible); ?>
		</td>
		<td class="hidden-phone">
			<?php echo $this->escape($item->uservisible); ?>
		</td>
		<td class="center">
		<?php if ($canDo->get('core.edit.state')) : ?>
				<?php if ($item->checked_out) : ?>
					<?php if ($canCheckin) : ?>
						<?php echo JHtml::_('jgrid.published',
$item->published, $i, 'sections.', true, 'cb');
?>
					<?php else: ?>
						<?php echo JHtml::_('jgrid.published',
$item->published, $i, 'sections.', false, 'cb');
?>
					<?php endif; ?>
				<?php else: ?>
					<?php echo JHtml::_('jgrid.published',
$item->published, $i, 'sections.', true, 'cb');
?>
				<?php endif; ?>
		<?php else: ?>
			<?php echo JHtml::_('jgrid.published', $item->published,
$i, 'sections.', false, 'cb'); ?>
		<?php endif; ?>
		</td>
		<td class="nowrap center hidden-phone">
			<?php echo $item->id; ?>
		</td>
	</tr>
<?php endforeach;
?>sections/tmpl/default_foot.php000064400000002304151160405210012525
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				Lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.77
	@build			6th April, 2022
	@created		22nd July, 2020
	@package		Moojla
	@subpackage		default_foot.php
	@author			Lmskaran <http://Lmskaran.com>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

?>
<tr>
	<td colspan="9"><?php echo
$this->pagination->getListFooter(); ?></td>
</tr>sections/tmpl/default_head.php000064400000005535151160405210012470
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				Lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.77
	@build			6th April, 2022
	@created		22nd July, 2020
	@package		Moojla
	@subpackage		default_head.php
	@author			Lmskaran <http://Lmskaran.com>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

?>
<tr>
	<?php if ($this->canEdit&& $this->canState): ?>
		<th width="1%" class="nowrap center
hidden-phone">
			<?php echo JHtml::_('searchtools.sort', '',
'a.ordering', $this->listDirn, $this->listOrder, null,
'asc', 'JGRID_HEADING_ORDERING',
'icon-menu-2'); ?>
		</th>
		<th width="20" class="nowrap center">
			<?php echo JHtml::_('grid.checkall'); ?>
		</th>
	<?php else: ?>
		<th width="20" class="nowrap center
hidden-phone">
			&#9662;
		</th>
		<th width="20" class="nowrap center">
			&#9632;
		</th>
	<?php endif; ?>
	<th class="nowrap hidden-phone" >
			<?php echo JHtml::_('searchtools.sort',
'COM_MOOJLA_SECTION_COURSEID_LABEL', 'a.courseid',
$this->listDirn, $this->listOrder); ?>
	</th>
	<th class="nowrap" >
			<?php echo JHtml::_('searchtools.sort',
'COM_MOOJLA_SECTION_SECTION_ID_LABEL', 'a.section_id',
$this->listDirn, $this->listOrder); ?>
	</th>
	<th class="nowrap hidden-phone" >
			<?php echo JHtml::_('searchtools.sort',
'COM_MOOJLA_SECTION_NAME_LABEL', 'a.name',
$this->listDirn, $this->listOrder); ?>
	</th>
	<th class="nowrap hidden-phone" >
			<?php echo JText::_('COM_MOOJLA_SECTION_VISIBLE_LABEL');
?>
	</th>
	<th class="nowrap hidden-phone" >
			<?php echo
JText::_('COM_MOOJLA_SECTION_USERVISIBLE_LABEL'); ?>
	</th>
	<?php if ($this->canState): ?>
		<th width="10" class="nowrap center" >
			<?php echo JHtml::_('searchtools.sort',
'COM_MOOJLA_SECTION_STATUS', 'a.published',
$this->listDirn, $this->listOrder); ?>
		</th>
	<?php else: ?>
		<th width="10" class="nowrap center" >
			<?php echo JText::_('COM_MOOJLA_SECTION_STATUS'); ?>
		</th>
	<?php endif; ?>
	<th width="5" class="nowrap center hidden-phone"
>
			<?php echo JHtml::_('searchtools.sort',
'COM_MOOJLA_SECTION_ID', 'a.id', $this->listDirn,
$this->listOrder); ?>
	</th>
</tr>sections/tmpl/default_toolbar.php000064400000007053151160405210013226
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				Lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.77
	@build			6th April, 2022
	@created		22nd July, 2020
	@package		Moojla
	@subpackage		default_toolbar.php
	@author			Lmskaran <http://Lmskaran.com>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

?>
<div id="filter-bar" class="btn-toolbar">
        <div class="filter-search btn-group pull-left">
            <label for="filter_search"
class="element-invisible"><?php echo
JText::_('Search');?></label>
            <input type="text" name="filter_search"
id="filter_search" placeholder="<?php echo
JText::_('JSEARCH_FILTER'); ?>" value="<?php echo
$this->escape($this->state->get('filter.search'));
?>" class="hasTooltip" title="<?php echo
JHtml::tooltipText('Search Sections'); ?>" />
        </div>
        <div class="btn-group pull-left">
            <button type="submit" class="btn
hasTooltip" title="<?php echo
JHtml::tooltipText('JSEARCH_FILTER_SUBMIT'); ?>"><i
class="icon-search"></i></button>
            <button type="button" class="btn
hasTooltip" title="<?php echo
JHtml::tooltipText('JSEARCH_FILTER_CLEAR'); ?>"
onclick="document.id('filter_search').value='';this.form.submit();"><i
class="icon-remove"></i></button>
        </div>
        <div class="btn-group pull-right hidden-phone">
            <label for="limit"
class="element-invisible"><?php echo
JText::_('JFIELD_PLG_SEARCH_SEARCHLIMIT_DESC');?></label>
            <?php echo $this->pagination->getLimitBox(); ?>
        </div>
        <div class="btn-group pull-right hidden-phone">
            <label for="directionTable"
class="element-invisible"><?php echo
JText::_('JFIELD_ORDERING_DESC');?></label>
            <select name="directionTable"
id="directionTable" class="input-medium"
onchange="Joomla.orderTable()">
                <option value=""><?php echo
JText::_('JFIELD_ORDERING_DESC');?></option>
                <option value="asc" <?php if
($this->listDirn == 'asc') echo
'selected="selected"'; ?>><?php echo
JText::_('JGLOBAL_ORDER_ASCENDING');?></option>
                <option value="desc" <?php if
($this->listDirn == 'desc') echo
'selected="selected"'; ?>><?php echo
JText::_('JGLOBAL_ORDER_DESCENDING');?></option>
            </select>
        </div>
        <div class="btn-group pull-right">
            <label for="sortTable"
class="element-invisible"><?php echo
JText::_('JGLOBAL_SORT_BY');?></label>
            <select name="sortTable" id="sortTable"
class="input-medium" onchange="Joomla.orderTable()">
                <option value=""><?php echo
JText::_('JGLOBAL_SORT_BY');?></option>
                <?php echo JHtml::_('select.options',
$this->getSortFields(), 'value', 'text',
$this->listOrder);?>
            </select>
        </div>
    </div>
<div class="clearfix">
</div>sections/tmpl/index.html000064400000000054151160405210011336
0ustar00<html><body
bgcolor="#FFFFFF"></body></html>sections/view.html.php000064400000017034151160405210011021
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				Lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.77
	@build			6th April, 2022
	@created		22nd July, 2020
	@package		Moojla
	@subpackage		view.html.php
	@author			Lmskaran <http://Lmskaran.com>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

/**
 * Moojla View class for the Sections
 */
class MoojlaViewSections extends JViewLegacy
{
	/**
	 * Sections view display method
	 * @return void
	 */
	function display($tpl = null)
	{
		if ($this->getLayout() !== 'modal')
		{
			// Include helper submenu
			MoojlaHelper::addSubmenu('sections');
		}

		// Assign data to the view
		$this->items = $this->get('Items');
		$this->pagination = $this->get('Pagination');
		$this->state = $this->get('State');
		$this->user = JFactory::getUser();
		// Load the filter form from xml.
		$this->filterForm = $this->get('FilterForm');
		// Load the active filters.
		$this->activeFilters = $this->get('ActiveFilters');
		// Add the list ordering clause.
		$this->listOrder =
$this->escape($this->state->get('list.ordering',
'a.id'));
		$this->listDirn =
$this->escape($this->state->get('list.direction',
'DESC'));
		$this->saveOrder = $this->listOrder == 'a.ordering';
		// set the return here value
		$this->return_here = urlencode(base64_encode((string)
JUri::getInstance()));
		// get global action permissions
		$this->canDo = MoojlaHelper::getActions('section');
		$this->canEdit = $this->canDo->get('core.edit');
		$this->canState =
$this->canDo->get('core.edit.state');
		$this->canCreate = $this->canDo->get('core.create');
		$this->canDelete = $this->canDo->get('core.delete');
		$this->canBatch = $this->canDo->get('core.batch');

		// We don't need toolbar in the modal window.
		if ($this->getLayout() !== 'modal')
		{
			$this->addToolbar();
			$this->sidebar = JHtmlSidebar::render();
			// load the batch html
			if ($this->canCreate && $this->canEdit &&
$this->canState)
			{
				$this->batchDisplay = JHtmlBatch_::render();
			}
		}
		
		// Check for errors.
		if (count($errors = $this->get('Errors')))
		{
			throw new Exception(implode("\n", $errors), 500);
		}

		// Display the template
		parent::display($tpl);

		// Set the document
		$this->setDocument();
	}

	/**
	 * Setting the toolbar
	 */
	protected function addToolBar()
	{
		JToolBarHelper::title(JText::_('COM_MOOJLA_SECTIONS'),
'briefcase');
		JHtmlSidebar::setAction('index.php?option=com_moojla&view=sections');
		JFormHelper::addFieldPath(JPATH_COMPONENT . '/models/fields');

		if ($this->canCreate)
		{
			JToolBarHelper::addNew('section.add');
		}

		// Only load if there are items
		if (MoojlaHelper::checkArray($this->items))
		{
			if ($this->canEdit)
			{
				JToolBarHelper::editList('section.edit');
			}

			if ($this->canState)
			{
				JToolBarHelper::publishList('sections.publish');
				JToolBarHelper::unpublishList('sections.unpublish');
				JToolBarHelper::archiveList('sections.archive');

				if ($this->canDo->get('core.admin'))
				{
					JToolBarHelper::checkin('sections.checkin');
				}
			}

			// Add a batch button
			if ($this->canBatch && $this->canCreate &&
$this->canEdit && $this->canState)
			{
				// Get the toolbar object instance
				$bar = JToolBar::getInstance('toolbar');
				// set the batch button name
				$title = JText::_('JTOOLBAR_BATCH');
				// Instantiate a new JLayoutFile instance and render the batch button
				$layout = new JLayoutFile('joomla.toolbar.batch');
				// add the button to the page
				$dhtml = $layout->render(array('title' => $title));
				$bar->appendButton('Custom', $dhtml, 'batch');
			}

			if ($this->state->get('filter.published') == -2
&& ($this->canState && $this->canDelete))
			{
				JToolbarHelper::deleteList('', 'sections.delete',
'JTOOLBAR_EMPTY_TRASH');
			}
			elseif ($this->canState && $this->canDelete)
			{
				JToolbarHelper::trash('sections.trash');
			}
		}

		// set help url for this view if found
		$help_url = MoojlaHelper::getHelpUrl('sections');
		if (MoojlaHelper::checkString($help_url))
		{
				JToolbarHelper::help('COM_MOOJLA_HELP_MANAGER', false,
$help_url);
		}

		// add the options comp button
		if ($this->canDo->get('core.admin') ||
$this->canDo->get('core.options'))
		{
			JToolBarHelper::preferences('com_moojla');
		}

		// Only load published batch if state and batch is allowed
		if ($this->canState && $this->canBatch)
		{
			JHtmlBatch_::addListSelection(
				JText::_('COM_MOOJLA_KEEP_ORIGINAL_STATE'),
				'batch[published]',
				JHtml::_('select.options',
JHtml::_('jgrid.publishedOptions', array('all' =>
false)), 'value', 'text', '', true)
			);
		}

		// Only load Courseid batch if create, edit, and batch is allowed
		if ($this->canBatch && $this->canCreate &&
$this->canEdit)
		{
			// Set Courseid Selection
			$this->courseidOptions =
JFormHelper::loadFieldType('sectionsfiltercourseid')->options;
			// We do some sanitation for Courseid filter
			if (MoojlaHelper::checkArray($this->courseidOptions) &&
				isset($this->courseidOptions[0]->value) &&
				!MoojlaHelper::checkString($this->courseidOptions[0]->value))
			{
				unset($this->courseidOptions[0]);
			}
			// Courseid Batch Selection
			JHtmlBatch_::addListSelection(
				'- Keep Original
'.JText::_('COM_MOOJLA_SECTION_COURSEID_LABEL').'
-',
				'batch[courseid]',
				JHtml::_('select.options', $this->courseidOptions,
'value', 'text')
			);
		}
	}

	/**
	 * Method to set up the document properties
	 *
	 * @return void
	 */
	protected function setDocument()
	{
		if (!isset($this->document))
		{
			$this->document = JFactory::getDocument();
		}
		$this->document->setTitle(JText::_('COM_MOOJLA_SECTIONS'));
		$this->document->addStyleSheet(JURI::root() .
"administrator/components/com_moojla/assets/css/sections.css",
(MoojlaHelper::jVersion()->isCompatible('3.8.0')) ?
array('version' => 'auto') : 'text/css');
	}

	/**
	 * Escapes a value for output in a view script.
	 *
	 * @param   mixed  $var  The output to escape.
	 *
	 * @return  mixed  The escaped value.
	 */
	public function escape($var)
	{
		if(strlen($var) > 50)
		{
			// use the helper htmlEscape method instead and shorten the string
			return MoojlaHelper::htmlEscape($var, $this->_charset, true);
		}
		// use the helper htmlEscape method instead.
		return MoojlaHelper::htmlEscape($var, $this->_charset);
	}

	/**
	 * Returns an array of fields the table can be sorted by
	 *
	 * @return  array  Array containing the field name to sort by as the key
and display text as value
	 */
	protected function getSortFields()
	{
		return array(
			'a.ordering' =>
JText::_('JGRID_HEADING_ORDERING'),
			'a.published' => JText::_('JSTATUS'),
			'a.courseid' =>
JText::_('COM_MOOJLA_SECTION_COURSEID_LABEL'),
			'a.section_id' =>
JText::_('COM_MOOJLA_SECTION_SECTION_ID_LABEL'),
			'a.name' =>
JText::_('COM_MOOJLA_SECTION_NAME_LABEL'),
			'a.id' => JText::_('JGRID_HEADING_ID')
		);
	}
}
tag/submitbutton.js000064400000002740151160405210010412
0ustar00/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				Lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.77
	@build			6th April, 2022
	@created		22nd July, 2020
	@package		Moojla
	@subpackage		submitbutton.js
	@author			Lmskaran <http://Lmskaran.com>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

Joomla.submitbutton = function(task)
{
	if (task == ''){
		return false;
	} else { 
		var action = task.split('.');
		if (action[1] == 'cancel' || action[1] == 'close' ||
document.formvalidator.isValid(document.getElementById("adminForm"))){
			Joomla.submitform(task, document.getElementById("adminForm"));
			return true;
		} else {
			alert(Joomla.JText._('tag, some values are not
acceptable.','Some values are unacceptable'));
			return false;
		}
	}
}tag/tmpl/edit.php000064400000011217151160405220007727 0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				Lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.77
	@build			6th April, 2022
	@created		22nd July, 2020
	@package		Moojla
	@subpackage		edit.php
	@author			Lmskaran <http://Lmskaran.com>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html');
JHtml::_('behavior.tooltip');
JHtml::_('behavior.formvalidation');
JHtml::_('formbehavior.chosen', 'select');
JHtml::_('behavior.keepalive');
$componentParams = $this->params; // will be removed just use
$this->params instead
?>
<script type="text/javascript">
	// waiting spinner
	var outerDiv = jQuery('body');
	jQuery('<div id="loading"></div>')
		.css("background", "rgba(255, 255, 255, .8)
url('components/com_moojla/assets/images/import.gif') 50% 15%
no-repeat")
		.css("top", outerDiv.position().top -
jQuery(window).scrollTop())
		.css("left", outerDiv.position().left -
jQuery(window).scrollLeft())
		.css("width", outerDiv.width())
		.css("height", outerDiv.height())
		.css("position", "fixed")
		.css("opacity", "0.80")
		.css("-ms-filter",
"progid:DXImageTransform.Microsoft.Alpha(Opacity = 80)")
		.css("filter", "alpha(opacity = 80)")
		.css("display", "none")
		.appendTo(outerDiv);
	jQuery('#loading').show();
	// when page is ready remove and show
	jQuery(window).load(function() {
		jQuery('#moojla_loader').fadeIn('fast');
		jQuery('#loading').hide();
	});
</script>
<div id="moojla_loader" style="display: none;">
<form action="<?php echo
JRoute::_('index.php?option=com_moojla&layout=edit&id='.
(int) $this->item->id . $this->referral); ?>"
method="post" name="adminForm" id="adminForm"
class="form-validate" enctype="multipart/form-data">

<div class="form-horizontal">

	<?php echo JHtml::_('bootstrap.startTabSet',
'tagTab', array('active' => 'details'));
?>

	<?php echo JHtml::_('bootstrap.addTab', 'tagTab',
'details', JText::_('COM_MOOJLA_TAG_DETAILS', true));
?>
		<div class="row-fluid form-horizontal-desktop">
			<div class="span6">
				<?php echo JLayoutHelper::render('tag.details_left',
$this); ?>
			</div>
			<div class="span6">
				<?php echo JLayoutHelper::render('tag.details_right',
$this); ?>
			</div>
		</div>
	<?php echo JHtml::_('bootstrap.endTab'); ?>

	<?php $this->ignore_fieldsets =
array('details','metadata','vdmmetadata','accesscontrol');
?>
	<?php $this->tab_name = 'tagTab'; ?>
	<?php echo JLayoutHelper::render('joomla.edit.params',
$this); ?>

	<?php if ($this->canDo->get('core.edit.created_by') ||
$this->canDo->get('core.edit.created') ||
$this->canDo->get('core.edit.state') ||
($this->canDo->get('core.delete') &&
$this->canDo->get('core.edit.state'))) : ?>
	<?php echo JHtml::_('bootstrap.addTab', 'tagTab',
'publishing', JText::_('COM_MOOJLA_TAG_PUBLISHING',
true)); ?>
		<div class="row-fluid form-horizontal-desktop">
			<div class="span6">
				<?php echo JLayoutHelper::render('tag.publishing', $this);
?>
			</div>
			<div class="span6">
				<?php echo JLayoutHelper::render('tag.publlshing', $this);
?>
			</div>
		</div>
	<?php echo JHtml::_('bootstrap.endTab'); ?>
	<?php endif; ?>

	<?php if ($this->canDo->get('core.admin')) : ?>
	<?php echo JHtml::_('bootstrap.addTab', 'tagTab',
'permissions', JText::_('COM_MOOJLA_TAG_PERMISSION',
true)); ?>
		<div class="row-fluid form-horizontal-desktop">
			<div class="span12">
				<fieldset class="adminform">
					<div class="adminformlist">
					<?php foreach
($this->form->getFieldset('accesscontrol') as $field):
?>
						<div>
							<?php echo $field->label; echo $field->input;?>
						</div>
						<div class="clearfix"></div>
					<?php endforeach; ?>
					</div>
				</fieldset>
			</div>
		</div>
	<?php echo JHtml::_('bootstrap.endTab'); ?>
	<?php endif; ?>

	<?php echo JHtml::_('bootstrap.endTabSet'); ?>

	<div>
		<input type="hidden" name="task"
value="tag.edit" />
		<?php echo JHtml::_('form.token'); ?>
	</div>
</div>
</form>
</div>
tag/tmpl/index.html000064400000000054151160405220010263
0ustar00<html><body
bgcolor="#FFFFFF"></body></html>tag/view.html.php000064400000015047151160405220007750
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				Lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.77
	@build			6th April, 2022
	@created		22nd July, 2020
	@package		Moojla
	@subpackage		view.html.php
	@author			Lmskaran <http://Lmskaran.com>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

/**
 * Tag View class
 */
class MoojlaViewTag extends JViewLegacy
{
	/**
	 * display method of View
	 * @return void
	 */
	public function display($tpl = null)
	{
		// set params
		$this->params = JComponentHelper::getParams('com_moojla');
		// Assign the variables
		$this->form = $this->get('Form');
		$this->item = $this->get('Item');
		$this->script = $this->get('Script');
		$this->state = $this->get('State');
		// get action permissions
		$this->canDo = MoojlaHelper::getActions('tag',
$this->item);
		// get input
		$jinput = JFactory::getApplication()->input;
		$this->ref = $jinput->get('ref', 0, 'word');
		$this->refid = $jinput->get('refid', 0, 'int');
		$return = $jinput->get('return', null, 'base64');
		// set the referral string
		$this->referral = '';
		if ($this->refid && $this->ref)
		{
			// return to the item that referred to this item
			$this->referral = '&ref=' . (string)$this->ref .
'&refid=' . (int)$this->refid;
		}
		elseif($this->ref)
		{
			// return to the list view that referred to this item
			$this->referral = '&ref=' . (string)$this->ref;
		}
		// check return value
		if (!is_null($return))
		{
			// add the return value
			$this->referral .= '&return=' . (string)$return;
		}

		// Set the toolbar
		$this->addToolBar();
		
		// Check for errors.
		if (count($errors = $this->get('Errors')))
		{
			throw new Exception(implode("\n", $errors), 500);
		}

		// Display the template
		parent::display($tpl);

		// Set the document
		$this->setDocument();
	}


	/**
	 * Setting the toolbar
	 */
	protected function addToolBar()
	{
		JFactory::getApplication()->input->set('hidemainmenu',
true);
		$user = JFactory::getUser();
		$userId	= $user->id;
		$isNew = $this->item->id == 0;

		JToolbarHelper::title( JText::_($isNew ? 'COM_MOOJLA_TAG_NEW' :
'COM_MOOJLA_TAG_EDIT'), 'pencil-2 article-add');
		// Built the actions for new and existing records.
		if (MoojlaHelper::checkString($this->referral))
		{
			if ($this->canDo->get('core.create') && $isNew)
			{
				// We can create the record.
				JToolBarHelper::save('tag.save', 'JTOOLBAR_SAVE');
			}
			elseif ($this->canDo->get('core.edit'))
			{
				// We can save the record.
				JToolBarHelper::save('tag.save', 'JTOOLBAR_SAVE');
			}
			if ($isNew)
			{
				// Do not creat but cancel.
				JToolBarHelper::cancel('tag.cancel',
'JTOOLBAR_CANCEL');
			}
			else
			{
				// We can close it.
				JToolBarHelper::cancel('tag.cancel',
'JTOOLBAR_CLOSE');
			}
		}
		else
		{
			if ($isNew)
			{
				// For new records, check the create permission.
				if ($this->canDo->get('core.create'))
				{
					JToolBarHelper::apply('tag.apply',
'JTOOLBAR_APPLY');
					JToolBarHelper::save('tag.save', 'JTOOLBAR_SAVE');
					JToolBarHelper::custom('tag.save2new',
'save-new.png', 'save-new_f2.png',
'JTOOLBAR_SAVE_AND_NEW', false);
				};
				JToolBarHelper::cancel('tag.cancel',
'JTOOLBAR_CANCEL');
			}
			else
			{
				if ($this->canDo->get('core.edit'))
				{
					// We can save the new record
					JToolBarHelper::apply('tag.apply',
'JTOOLBAR_APPLY');
					JToolBarHelper::save('tag.save', 'JTOOLBAR_SAVE');
					// We can save this record, but check the create permission to see
					// if we can return to make a new one.
					if ($this->canDo->get('core.create'))
					{
						JToolBarHelper::custom('tag.save2new',
'save-new.png', 'save-new_f2.png',
'JTOOLBAR_SAVE_AND_NEW', false);
					}
				}
				$canVersion = ($this->canDo->get('core.version')
&& $this->canDo->get('tag.version'));
				if ($this->state->params->get('save_history', 1)
&& $this->canDo->get('core.edit') &&
$canVersion)
				{
					JToolbarHelper::versions('com_moojla.tag',
$this->item->id);
				}
				if ($this->canDo->get('core.create'))
				{
					JToolBarHelper::custom('tag.save2copy',
'save-copy.png', 'save-copy_f2.png',
'JTOOLBAR_SAVE_AS_COPY', false);
				}
				JToolBarHelper::cancel('tag.cancel',
'JTOOLBAR_CLOSE');
			}
		}
		JToolbarHelper::divider();
		// set help url for this view if found
		$help_url = MoojlaHelper::getHelpUrl('tag');
		if (MoojlaHelper::checkString($help_url))
		{
			JToolbarHelper::help('COM_MOOJLA_HELP_MANAGER', false,
$help_url);
		}
	}

	/**
	 * Escapes a value for output in a view script.
	 *
	 * @param   mixed  $var  The output to escape.
	 *
	 * @return  mixed  The escaped value.
	 */
	public function escape($var)
	{
		if(strlen($var) > 30)
		{
    		// use the helper htmlEscape method instead and shorten the string
			return MoojlaHelper::htmlEscape($var, $this->_charset, true, 30);
		}
		// use the helper htmlEscape method instead.
		return MoojlaHelper::htmlEscape($var, $this->_charset);
	}

	/**
	 * Method to set up the document properties
	 *
	 * @return void
	 */
	protected function setDocument()
	{
		$isNew = ($this->item->id < 1);
		if (!isset($this->document))
		{
			$this->document = JFactory::getDocument();
		}
		$this->document->setTitle(JText::_($isNew ?
'COM_MOOJLA_TAG_NEW' : 'COM_MOOJLA_TAG_EDIT'));
		$this->document->addStyleSheet(JURI::root() .
"administrator/components/com_moojla/assets/css/tag.css",
(MoojlaHelper::jVersion()->isCompatible('3.8.0')) ?
array('version' => 'auto') : 'text/css');
		$this->document->addScript(JURI::root() . $this->script,
(MoojlaHelper::jVersion()->isCompatible('3.8.0')) ?
array('version' => 'auto') :
'text/javascript');
		$this->document->addScript(JURI::root() .
"administrator/components/com_moojla/views/tag/submitbutton.js",
(MoojlaHelper::jVersion()->isCompatible('3.8.0')) ?
array('version' => 'auto') :
'text/javascript'); 
		JText::script('view not acceptable. Error');
	}
}
tags/index.html000064400000000054151160405220007472
0ustar00<html><body
bgcolor="#FFFFFF"></body></html>tags/tmpl/default.php000064400000005737151160405220010623
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				Lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.77
	@build			6th April, 2022
	@created		22nd July, 2020
	@package		Moojla
	@subpackage		default.php
	@author			Lmskaran <http://Lmskaran.com>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

JHtml::_('behavior.tooltip');
JHtml::_('behavior.multiselect');
JHtml::_('dropdown.init');
JHtml::_('formbehavior.chosen',
'.multipleAccessLevels', null,
array('placeholder_text_multiple' => '- ' .
JText::_('COM_MOOJLA_FILTER_SELECT_ACCESS') . ' -'));
JHtml::_('formbehavior.chosen', 'select');
if ($this->saveOrder)
{
	$saveOrderingUrl =
'index.php?option=com_moojla&task=tags.saveOrderAjax&tmpl=component';
	JHtml::_('sortablelist.sortable', 'tagList',
'adminForm', strtolower($this->listDirn), $saveOrderingUrl);
}
?>
<form action="<?php echo
JRoute::_('index.php?option=com_moojla&view=tags');
?>" method="post" name="adminForm"
id="adminForm">
<?php if(!empty( $this->sidebar)): ?>
	<div id="j-sidebar-container" class="span2">
		<?php echo $this->sidebar; ?>
	</div>
	<div id="j-main-container" class="span10">
<?php else : ?>
	<div id="j-main-container">
<?php endif; ?>
<?php
	// Add the searchtools
	echo JLayoutHelper::render('joomla.searchtools.default',
array('view' => $this));
?>
<?php if (empty($this->items)): ?>
	<div class="alert alert-no-items">
		<?php echo JText::_('JGLOBAL_NO_MATCHING_RESULTS'); ?>
	</div>
<?php else : ?>
	<table class="table table-striped" id="tagList">
		<thead><?php echo
$this->loadTemplate('head');?></thead>
		<tfoot><?php echo
$this->loadTemplate('foot');?></tfoot>
		<tbody><?php echo
$this->loadTemplate('body');?></tbody>
	</table>
	<?php // Load the batch processing form. ?>
	<?php if ($this->canCreate && $this->canEdit) : ?>
		<?php echo JHtml::_(
			'bootstrap.renderModal',
			'collapseModal',
			array(
				'title' =>
JText::_('COM_MOOJLA_TAGS_BATCH_OPTIONS'),
				'footer' =>
$this->loadTemplate('batch_footer')
			),
			$this->loadTemplate('batch_body')
		); ?>
	<?php endif; ?>
	<input type="hidden" name="boxchecked"
value="0" />
	</div>
<?php endif; ?>
	<input type="hidden" name="task" value=""
/>
	<?php echo JHtml::_('form.token'); ?>
</form>
tags/tmpl/default_batch_body.php000064400000002327151160405220012771
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				Lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.77
	@build			6th April, 2022
	@created		22nd July, 2020
	@package		Moojla
	@subpackage		default_batch_body.php
	@author			Lmskaran <http://Lmskaran.com>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

?>

<p><?php echo JText::_('COM_MOOJLA_TAGS_BATCH_TIP');
?></p>
<?php echo $this->batchDisplay;
?>tags/tmpl/default_batch_footer.php000064400000002725151160405220013334
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				Lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.77
	@build			6th April, 2022
	@created		22nd July, 2020
	@package		Moojla
	@subpackage		default_batch_footer.php
	@author			Lmskaran <http://Lmskaran.com>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

?>
<!-- clear the batch values if cancel -->
<button class="btn" type="button"
onclick="" data-dismiss="modal">
	<?php echo JText::_('JCANCEL'); ?>
</button>
<!-- post the batch values if process -->
<button class="btn btn-success" type="submit"
onclick="Joomla.submitbutton('tag.batch');">
	<?php echo JText::_('JGLOBAL_BATCH_PROCESS'); ?>
</button>tags/tmpl/default_body.php000064400000007602151160405220011631
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				Lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.77
	@build			6th April, 2022
	@created		22nd July, 2020
	@package		Moojla
	@subpackage		default_body.php
	@author			Lmskaran <http://Lmskaran.com>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

$edit =
"index.php?option=com_moojla&view=tags&task=tag.edit";

?>
<?php foreach ($this->items as $i => $item): ?>
	<?php
		$canCheckin = $this->user->authorise('core.manage',
'com_checkin') || $item->checked_out == $this->user->id
|| $item->checked_out == 0;
		$userChkOut = JFactory::getUser($item->checked_out);
		$canDo =
MoojlaHelper::getActions('tag',$item,'tags');
	?>
	<tr class="row<?php echo $i % 2; ?>">
		<td class="order nowrap center hidden-phone">
		<?php if ($canDo->get('core.edit.state')): ?>
			<?php
				$iconClass = '';
				if (!$this->saveOrder)
				{
					$iconClass = ' inactive tip-top" hasTooltip"
title="' . JHtml::tooltipText('JORDERINGDISABLED');
				}
			?>
			<span class="sortable-handler<?php echo $iconClass;
?>">
				<i class="icon-menu"></i>
			</span>
			<?php if ($this->saveOrder) : ?>
				<input type="text" style="display:none"
name="order[]" size="5"
				value="<?php echo $item->ordering; ?>"
class="width-20 text-area-order " />
			<?php endif; ?>
		<?php else: ?>
			&#8942;
		<?php endif; ?>
		</td>
		<td class="nowrap center">
		<?php if ($canDo->get('core.edit')): ?>
				<?php if ($item->checked_out) : ?>
					<?php if ($canCheckin) : ?>
						<?php echo JHtml::_('grid.id', $i, $item->id); ?>
					<?php else: ?>
						&#9633;
					<?php endif; ?>
				<?php else: ?>
					<?php echo JHtml::_('grid.id', $i, $item->id); ?>
				<?php endif; ?>
		<?php else: ?>
			&#9633;
		<?php endif; ?>
		</td>
		<td class="nowrap">
			<div class="name">
				<?php if ($canDo->get('core.edit')): ?>
					<a href="<?php echo $edit; ?>&id=<?php echo
$item->id; ?>"><?php echo
$this->escape($item->tagid); ?></a>
					<?php if ($item->checked_out): ?>
						<?php echo JHtml::_('jgrid.checkedout', $i,
$userChkOut->name, $item->checked_out_time, 'tags.',
$canCheckin); ?>
					<?php endif; ?>
				<?php else: ?>
					<?php echo $this->escape($item->tagid); ?>
				<?php endif; ?>
			</div>
		</td>
		<td class="hidden-phone">
			<?php echo $this->escape($item->tagname); ?>
		</td>
		<td class="hidden-phone">
			<?php echo JText::_($item->isstandard); ?>
		</td>
		<td class="center">
		<?php if ($canDo->get('core.edit.state')) : ?>
				<?php if ($item->checked_out) : ?>
					<?php if ($canCheckin) : ?>
						<?php echo JHtml::_('jgrid.published',
$item->published, $i, 'tags.', true, 'cb'); ?>
					<?php else: ?>
						<?php echo JHtml::_('jgrid.published',
$item->published, $i, 'tags.', false, 'cb'); ?>
					<?php endif; ?>
				<?php else: ?>
					<?php echo JHtml::_('jgrid.published',
$item->published, $i, 'tags.', true, 'cb'); ?>
				<?php endif; ?>
		<?php else: ?>
			<?php echo JHtml::_('jgrid.published', $item->published,
$i, 'tags.', false, 'cb'); ?>
		<?php endif; ?>
		</td>
		<td class="nowrap center hidden-phone">
			<?php echo $item->id; ?>
		</td>
	</tr>
<?php endforeach;
?>tags/tmpl/default_foot.php000064400000002304151160405220011635
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				Lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.77
	@build			6th April, 2022
	@created		22nd July, 2020
	@package		Moojla
	@subpackage		default_foot.php
	@author			Lmskaran <http://Lmskaran.com>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

?>
<tr>
	<td colspan="7"><?php echo
$this->pagination->getListFooter(); ?></td>
</tr>tags/tmpl/default_head.php000064400000005050151160405220011570
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				Lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.77
	@build			6th April, 2022
	@created		22nd July, 2020
	@package		Moojla
	@subpackage		default_head.php
	@author			Lmskaran <http://Lmskaran.com>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

?>
<tr>
	<?php if ($this->canEdit&& $this->canState): ?>
		<th width="1%" class="nowrap center
hidden-phone">
			<?php echo JHtml::_('searchtools.sort', '',
'a.ordering', $this->listDirn, $this->listOrder, null,
'asc', 'JGRID_HEADING_ORDERING',
'icon-menu-2'); ?>
		</th>
		<th width="20" class="nowrap center">
			<?php echo JHtml::_('grid.checkall'); ?>
		</th>
	<?php else: ?>
		<th width="20" class="nowrap center
hidden-phone">
			&#9662;
		</th>
		<th width="20" class="nowrap center">
			&#9632;
		</th>
	<?php endif; ?>
	<th class="nowrap" >
			<?php echo JHtml::_('searchtools.sort',
'COM_MOOJLA_TAG_TAGID_LABEL', 'a.tagid',
$this->listDirn, $this->listOrder); ?>
	</th>
	<th class="nowrap hidden-phone" >
			<?php echo JHtml::_('searchtools.sort',
'COM_MOOJLA_TAG_TAGNAME_LABEL', 'a.tagname',
$this->listDirn, $this->listOrder); ?>
	</th>
	<th class="nowrap hidden-phone" >
			<?php echo JText::_('COM_MOOJLA_TAG_ISSTANDARD_LABEL');
?>
	</th>
	<?php if ($this->canState): ?>
		<th width="10" class="nowrap center" >
			<?php echo JHtml::_('searchtools.sort',
'COM_MOOJLA_TAG_STATUS', 'a.published',
$this->listDirn, $this->listOrder); ?>
		</th>
	<?php else: ?>
		<th width="10" class="nowrap center" >
			<?php echo JText::_('COM_MOOJLA_TAG_STATUS'); ?>
		</th>
	<?php endif; ?>
	<th width="5" class="nowrap center hidden-phone"
>
			<?php echo JHtml::_('searchtools.sort',
'COM_MOOJLA_TAG_ID', 'a.id', $this->listDirn,
$this->listOrder); ?>
	</th>
</tr>tags/tmpl/default_toolbar.php000064400000007047151160405230012342
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				Lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.77
	@build			6th April, 2022
	@created		22nd July, 2020
	@package		Moojla
	@subpackage		default_toolbar.php
	@author			Lmskaran <http://Lmskaran.com>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

?>
<div id="filter-bar" class="btn-toolbar">
        <div class="filter-search btn-group pull-left">
            <label for="filter_search"
class="element-invisible"><?php echo
JText::_('Search');?></label>
            <input type="text" name="filter_search"
id="filter_search" placeholder="<?php echo
JText::_('JSEARCH_FILTER'); ?>" value="<?php echo
$this->escape($this->state->get('filter.search'));
?>" class="hasTooltip" title="<?php echo
JHtml::tooltipText('Search Tags'); ?>" />
        </div>
        <div class="btn-group pull-left">
            <button type="submit" class="btn
hasTooltip" title="<?php echo
JHtml::tooltipText('JSEARCH_FILTER_SUBMIT'); ?>"><i
class="icon-search"></i></button>
            <button type="button" class="btn
hasTooltip" title="<?php echo
JHtml::tooltipText('JSEARCH_FILTER_CLEAR'); ?>"
onclick="document.id('filter_search').value='';this.form.submit();"><i
class="icon-remove"></i></button>
        </div>
        <div class="btn-group pull-right hidden-phone">
            <label for="limit"
class="element-invisible"><?php echo
JText::_('JFIELD_PLG_SEARCH_SEARCHLIMIT_DESC');?></label>
            <?php echo $this->pagination->getLimitBox(); ?>
        </div>
        <div class="btn-group pull-right hidden-phone">
            <label for="directionTable"
class="element-invisible"><?php echo
JText::_('JFIELD_ORDERING_DESC');?></label>
            <select name="directionTable"
id="directionTable" class="input-medium"
onchange="Joomla.orderTable()">
                <option value=""><?php echo
JText::_('JFIELD_ORDERING_DESC');?></option>
                <option value="asc" <?php if
($this->listDirn == 'asc') echo
'selected="selected"'; ?>><?php echo
JText::_('JGLOBAL_ORDER_ASCENDING');?></option>
                <option value="desc" <?php if
($this->listDirn == 'desc') echo
'selected="selected"'; ?>><?php echo
JText::_('JGLOBAL_ORDER_DESCENDING');?></option>
            </select>
        </div>
        <div class="btn-group pull-right">
            <label for="sortTable"
class="element-invisible"><?php echo
JText::_('JGLOBAL_SORT_BY');?></label>
            <select name="sortTable" id="sortTable"
class="input-medium" onchange="Joomla.orderTable()">
                <option value=""><?php echo
JText::_('JGLOBAL_SORT_BY');?></option>
                <?php echo JHtml::_('select.options',
$this->getSortFields(), 'value', 'text',
$this->listOrder);?>
            </select>
        </div>
    </div>
<div class="clearfix">
</div>tags/tmpl/index.html000064400000000054151160405230010447
0ustar00<html><body
bgcolor="#FFFFFF"></body></html>tags/view.html.php000064400000015706151160405230010136
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				Lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.77
	@build			6th April, 2022
	@created		22nd July, 2020
	@package		Moojla
	@subpackage		view.html.php
	@author			Lmskaran <http://Lmskaran.com>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

/**
 * Moojla View class for the Tags
 */
class MoojlaViewTags extends JViewLegacy
{
	/**
	 * Tags view display method
	 * @return void
	 */
	function display($tpl = null)
	{
		if ($this->getLayout() !== 'modal')
		{
			// Include helper submenu
			MoojlaHelper::addSubmenu('tags');
		}

		// Assign data to the view
		$this->items = $this->get('Items');
		$this->pagination = $this->get('Pagination');
		$this->state = $this->get('State');
		$this->user = JFactory::getUser();
		// Load the filter form from xml.
		$this->filterForm = $this->get('FilterForm');
		// Load the active filters.
		$this->activeFilters = $this->get('ActiveFilters');
		// Add the list ordering clause.
		$this->listOrder =
$this->escape($this->state->get('list.ordering',
'a.id'));
		$this->listDirn =
$this->escape($this->state->get('list.direction',
'DESC'));
		$this->saveOrder = $this->listOrder == 'a.ordering';
		// set the return here value
		$this->return_here = urlencode(base64_encode((string)
JUri::getInstance()));
		// get global action permissions
		$this->canDo = MoojlaHelper::getActions('tag');
		$this->canEdit = $this->canDo->get('core.edit');
		$this->canState =
$this->canDo->get('core.edit.state');
		$this->canCreate = $this->canDo->get('core.create');
		$this->canDelete = $this->canDo->get('core.delete');
		$this->canBatch = $this->canDo->get('core.batch');

		// We don't need toolbar in the modal window.
		if ($this->getLayout() !== 'modal')
		{
			$this->addToolbar();
			$this->sidebar = JHtmlSidebar::render();
			// load the batch html
			if ($this->canCreate && $this->canEdit &&
$this->canState)
			{
				$this->batchDisplay = JHtmlBatch_::render();
			}
		}
		
		// Check for errors.
		if (count($errors = $this->get('Errors')))
		{
			throw new Exception(implode("\n", $errors), 500);
		}

		// Display the template
		parent::display($tpl);

		// Set the document
		$this->setDocument();
	}

	/**
	 * Setting the toolbar
	 */
	protected function addToolBar()
	{
		JToolBarHelper::title(JText::_('COM_MOOJLA_TAGS'),
'tag');
		JHtmlSidebar::setAction('index.php?option=com_moojla&view=tags');
		JFormHelper::addFieldPath(JPATH_COMPONENT . '/models/fields');

		if ($this->canCreate)
		{
			JToolBarHelper::addNew('tag.add');
		}

		// Only load if there are items
		if (MoojlaHelper::checkArray($this->items))
		{
			if ($this->canEdit)
			{
				JToolBarHelper::editList('tag.edit');
			}

			if ($this->canState)
			{
				JToolBarHelper::publishList('tags.publish');
				JToolBarHelper::unpublishList('tags.unpublish');
				JToolBarHelper::archiveList('tags.archive');

				if ($this->canDo->get('core.admin'))
				{
					JToolBarHelper::checkin('tags.checkin');
				}
			}

			// Add a batch button
			if ($this->canBatch && $this->canCreate &&
$this->canEdit && $this->canState)
			{
				// Get the toolbar object instance
				$bar = JToolBar::getInstance('toolbar');
				// set the batch button name
				$title = JText::_('JTOOLBAR_BATCH');
				// Instantiate a new JLayoutFile instance and render the batch button
				$layout = new JLayoutFile('joomla.toolbar.batch');
				// add the button to the page
				$dhtml = $layout->render(array('title' => $title));
				$bar->appendButton('Custom', $dhtml, 'batch');
			}

			if ($this->state->get('filter.published') == -2
&& ($this->canState && $this->canDelete))
			{
				JToolbarHelper::deleteList('', 'tags.delete',
'JTOOLBAR_EMPTY_TRASH');
			}
			elseif ($this->canState && $this->canDelete)
			{
				JToolbarHelper::trash('tags.trash');
			}
		}

		// set help url for this view if found
		$help_url = MoojlaHelper::getHelpUrl('tags');
		if (MoojlaHelper::checkString($help_url))
		{
				JToolbarHelper::help('COM_MOOJLA_HELP_MANAGER', false,
$help_url);
		}

		// add the options comp button
		if ($this->canDo->get('core.admin') ||
$this->canDo->get('core.options'))
		{
			JToolBarHelper::preferences('com_moojla');
		}

		// Only load published batch if state and batch is allowed
		if ($this->canState && $this->canBatch)
		{
			JHtmlBatch_::addListSelection(
				JText::_('COM_MOOJLA_KEEP_ORIGINAL_STATE'),
				'batch[published]',
				JHtml::_('select.options',
JHtml::_('jgrid.publishedOptions', array('all' =>
false)), 'value', 'text', '', true)
			);
		}

		// Only load access batch if create, edit and batch is allowed
		if ($this->canBatch && $this->canCreate &&
$this->canEdit)
		{
			JHtmlBatch_::addListSelection(
				JText::_('COM_MOOJLA_KEEP_ORIGINAL_ACCESS'),
				'batch[access]',
				JHtml::_('select.options',
JHtml::_('access.assetgroups'), 'value',
'text')
			);
		}
	}

	/**
	 * Method to set up the document properties
	 *
	 * @return void
	 */
	protected function setDocument()
	{
		if (!isset($this->document))
		{
			$this->document = JFactory::getDocument();
		}
		$this->document->setTitle(JText::_('COM_MOOJLA_TAGS'));
		$this->document->addStyleSheet(JURI::root() .
"administrator/components/com_moojla/assets/css/tags.css",
(MoojlaHelper::jVersion()->isCompatible('3.8.0')) ?
array('version' => 'auto') : 'text/css');
	}

	/**
	 * Escapes a value for output in a view script.
	 *
	 * @param   mixed  $var  The output to escape.
	 *
	 * @return  mixed  The escaped value.
	 */
	public function escape($var)
	{
		if(strlen($var) > 50)
		{
			// use the helper htmlEscape method instead and shorten the string
			return MoojlaHelper::htmlEscape($var, $this->_charset, true);
		}
		// use the helper htmlEscape method instead.
		return MoojlaHelper::htmlEscape($var, $this->_charset);
	}

	/**
	 * Returns an array of fields the table can be sorted by
	 *
	 * @return  array  Array containing the field name to sort by as the key
and display text as value
	 */
	protected function getSortFields()
	{
		return array(
			'a.ordering' =>
JText::_('JGRID_HEADING_ORDERING'),
			'a.published' => JText::_('JSTATUS'),
			'a.tagid' =>
JText::_('COM_MOOJLA_TAG_TAGID_LABEL'),
			'a.tagname' =>
JText::_('COM_MOOJLA_TAG_TAGNAME_LABEL'),
			'a.id' => JText::_('JGRID_HEADING_ID')
		);
	}
}
tag_instance/submitbutton.js000064400000002751151160405230012302
0ustar00/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				Lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.77
	@build			6th April, 2022
	@created		22nd July, 2020
	@package		Moojla
	@subpackage		submitbutton.js
	@author			Lmskaran <http://Lmskaran.com>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

Joomla.submitbutton = function(task)
{
	if (task == ''){
		return false;
	} else { 
		var action = task.split('.');
		if (action[1] == 'cancel' || action[1] == 'close' ||
document.formvalidator.isValid(document.getElementById("adminForm"))){
			Joomla.submitform(task, document.getElementById("adminForm"));
			return true;
		} else {
			alert(Joomla.JText._('tag_instance, some values are not
acceptable.','Some values are unacceptable'));
			return false;
		}
	}
}tag_instance/tmpl/edit.php000064400000011404151160405230011612
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				Lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.77
	@build			6th April, 2022
	@created		22nd July, 2020
	@package		Moojla
	@subpackage		edit.php
	@author			Lmskaran <http://Lmskaran.com>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html');
JHtml::_('behavior.tooltip');
JHtml::_('behavior.formvalidation');
JHtml::_('formbehavior.chosen', 'select');
JHtml::_('behavior.keepalive');
$componentParams = $this->params; // will be removed just use
$this->params instead
?>
<script type="text/javascript">
	// waiting spinner
	var outerDiv = jQuery('body');
	jQuery('<div id="loading"></div>')
		.css("background", "rgba(255, 255, 255, .8)
url('components/com_moojla/assets/images/import.gif') 50% 15%
no-repeat")
		.css("top", outerDiv.position().top -
jQuery(window).scrollTop())
		.css("left", outerDiv.position().left -
jQuery(window).scrollLeft())
		.css("width", outerDiv.width())
		.css("height", outerDiv.height())
		.css("position", "fixed")
		.css("opacity", "0.80")
		.css("-ms-filter",
"progid:DXImageTransform.Microsoft.Alpha(Opacity = 80)")
		.css("filter", "alpha(opacity = 80)")
		.css("display", "none")
		.appendTo(outerDiv);
	jQuery('#loading').show();
	// when page is ready remove and show
	jQuery(window).load(function() {
		jQuery('#moojla_loader').fadeIn('fast');
		jQuery('#loading').hide();
	});
</script>
<div id="moojla_loader" style="display: none;">
<form action="<?php echo
JRoute::_('index.php?option=com_moojla&layout=edit&id='.
(int) $this->item->id . $this->referral); ?>"
method="post" name="adminForm" id="adminForm"
class="form-validate" enctype="multipart/form-data">

<div class="form-horizontal">

	<?php echo JHtml::_('bootstrap.startTabSet',
'tag_instanceTab', array('active' =>
'details')); ?>

	<?php echo JHtml::_('bootstrap.addTab',
'tag_instanceTab', 'details',
JText::_('COM_MOOJLA_TAG_INSTANCE_DETAILS', true)); ?>
		<div class="row-fluid form-horizontal-desktop">
			<div class="span6">
				<?php echo
JLayoutHelper::render('tag_instance.details_left', $this); ?>
			</div>
			<div class="span6">
				<?php echo
JLayoutHelper::render('tag_instance.details_right', $this); ?>
			</div>
		</div>
	<?php echo JHtml::_('bootstrap.endTab'); ?>

	<?php $this->ignore_fieldsets =
array('details','metadata','vdmmetadata','accesscontrol');
?>
	<?php $this->tab_name = 'tag_instanceTab'; ?>
	<?php echo JLayoutHelper::render('joomla.edit.params',
$this); ?>

	<?php if ($this->canDo->get('core.edit.created_by') ||
$this->canDo->get('core.edit.created') ||
$this->canDo->get('core.edit.state') ||
($this->canDo->get('core.delete') &&
$this->canDo->get('core.edit.state'))) : ?>
	<?php echo JHtml::_('bootstrap.addTab',
'tag_instanceTab', 'publishing',
JText::_('COM_MOOJLA_TAG_INSTANCE_PUBLISHING', true)); ?>
		<div class="row-fluid form-horizontal-desktop">
			<div class="span6">
				<?php echo
JLayoutHelper::render('tag_instance.publishing', $this); ?>
			</div>
			<div class="span6">
				<?php echo
JLayoutHelper::render('tag_instance.publlshing', $this); ?>
			</div>
		</div>
	<?php echo JHtml::_('bootstrap.endTab'); ?>
	<?php endif; ?>

	<?php if ($this->canDo->get('core.admin')) : ?>
	<?php echo JHtml::_('bootstrap.addTab',
'tag_instanceTab', 'permissions',
JText::_('COM_MOOJLA_TAG_INSTANCE_PERMISSION', true)); ?>
		<div class="row-fluid form-horizontal-desktop">
			<div class="span12">
				<fieldset class="adminform">
					<div class="adminformlist">
					<?php foreach
($this->form->getFieldset('accesscontrol') as $field):
?>
						<div>
							<?php echo $field->label; echo $field->input;?>
						</div>
						<div class="clearfix"></div>
					<?php endforeach; ?>
					</div>
				</fieldset>
			</div>
		</div>
	<?php echo JHtml::_('bootstrap.endTab'); ?>
	<?php endif; ?>

	<?php echo JHtml::_('bootstrap.endTabSet'); ?>

	<div>
		<input type="hidden" name="task"
value="tag_instance.edit" />
		<?php echo JHtml::_('form.token'); ?>
	</div>
</div>
</form>
</div>
tag_instance/tmpl/index.html000064400000000054151160405230012150
0ustar00<html><body
bgcolor="#FFFFFF"></body></html>tag_instance/view.html.php000064400000015410151160405230011627
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				Lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.77
	@build			6th April, 2022
	@created		22nd July, 2020
	@package		Moojla
	@subpackage		view.html.php
	@author			Lmskaran <http://Lmskaran.com>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

/**
 * Tag_instance View class
 */
class MoojlaViewTag_instance extends JViewLegacy
{
	/**
	 * display method of View
	 * @return void
	 */
	public function display($tpl = null)
	{
		// set params
		$this->params = JComponentHelper::getParams('com_moojla');
		// Assign the variables
		$this->form = $this->get('Form');
		$this->item = $this->get('Item');
		$this->script = $this->get('Script');
		$this->state = $this->get('State');
		// get action permissions
		$this->canDo = MoojlaHelper::getActions('tag_instance',
$this->item);
		// get input
		$jinput = JFactory::getApplication()->input;
		$this->ref = $jinput->get('ref', 0, 'word');
		$this->refid = $jinput->get('refid', 0, 'int');
		$return = $jinput->get('return', null, 'base64');
		// set the referral string
		$this->referral = '';
		if ($this->refid && $this->ref)
		{
			// return to the item that referred to this item
			$this->referral = '&ref=' . (string)$this->ref .
'&refid=' . (int)$this->refid;
		}
		elseif($this->ref)
		{
			// return to the list view that referred to this item
			$this->referral = '&ref=' . (string)$this->ref;
		}
		// check return value
		if (!is_null($return))
		{
			// add the return value
			$this->referral .= '&return=' . (string)$return;
		}

		// Set the toolbar
		$this->addToolBar();
		
		// Check for errors.
		if (count($errors = $this->get('Errors')))
		{
			throw new Exception(implode("\n", $errors), 500);
		}

		// Display the template
		parent::display($tpl);

		// Set the document
		$this->setDocument();
	}


	/**
	 * Setting the toolbar
	 */
	protected function addToolBar()
	{
		JFactory::getApplication()->input->set('hidemainmenu',
true);
		$user = JFactory::getUser();
		$userId	= $user->id;
		$isNew = $this->item->id == 0;

		JToolbarHelper::title( JText::_($isNew ?
'COM_MOOJLA_TAG_INSTANCE_NEW' :
'COM_MOOJLA_TAG_INSTANCE_EDIT'), 'pencil-2
article-add');
		// Built the actions for new and existing records.
		if (MoojlaHelper::checkString($this->referral))
		{
			if ($this->canDo->get('core.create') && $isNew)
			{
				// We can create the record.
				JToolBarHelper::save('tag_instance.save',
'JTOOLBAR_SAVE');
			}
			elseif ($this->canDo->get('core.edit'))
			{
				// We can save the record.
				JToolBarHelper::save('tag_instance.save',
'JTOOLBAR_SAVE');
			}
			if ($isNew)
			{
				// Do not creat but cancel.
				JToolBarHelper::cancel('tag_instance.cancel',
'JTOOLBAR_CANCEL');
			}
			else
			{
				// We can close it.
				JToolBarHelper::cancel('tag_instance.cancel',
'JTOOLBAR_CLOSE');
			}
		}
		else
		{
			if ($isNew)
			{
				// For new records, check the create permission.
				if ($this->canDo->get('core.create'))
				{
					JToolBarHelper::apply('tag_instance.apply',
'JTOOLBAR_APPLY');
					JToolBarHelper::save('tag_instance.save',
'JTOOLBAR_SAVE');
					JToolBarHelper::custom('tag_instance.save2new',
'save-new.png', 'save-new_f2.png',
'JTOOLBAR_SAVE_AND_NEW', false);
				};
				JToolBarHelper::cancel('tag_instance.cancel',
'JTOOLBAR_CANCEL');
			}
			else
			{
				if ($this->canDo->get('core.edit'))
				{
					// We can save the new record
					JToolBarHelper::apply('tag_instance.apply',
'JTOOLBAR_APPLY');
					JToolBarHelper::save('tag_instance.save',
'JTOOLBAR_SAVE');
					// We can save this record, but check the create permission to see
					// if we can return to make a new one.
					if ($this->canDo->get('core.create'))
					{
						JToolBarHelper::custom('tag_instance.save2new',
'save-new.png', 'save-new_f2.png',
'JTOOLBAR_SAVE_AND_NEW', false);
					}
				}
				$canVersion = ($this->canDo->get('core.version')
&& $this->canDo->get('tag_instance.version'));
				if ($this->state->params->get('save_history', 1)
&& $this->canDo->get('core.edit') &&
$canVersion)
				{
					JToolbarHelper::versions('com_moojla.tag_instance',
$this->item->id);
				}
				if ($this->canDo->get('core.create'))
				{
					JToolBarHelper::custom('tag_instance.save2copy',
'save-copy.png', 'save-copy_f2.png',
'JTOOLBAR_SAVE_AS_COPY', false);
				}
				JToolBarHelper::cancel('tag_instance.cancel',
'JTOOLBAR_CLOSE');
			}
		}
		JToolbarHelper::divider();
		// set help url for this view if found
		$help_url = MoojlaHelper::getHelpUrl('tag_instance');
		if (MoojlaHelper::checkString($help_url))
		{
			JToolbarHelper::help('COM_MOOJLA_HELP_MANAGER', false,
$help_url);
		}
	}

	/**
	 * Escapes a value for output in a view script.
	 *
	 * @param   mixed  $var  The output to escape.
	 *
	 * @return  mixed  The escaped value.
	 */
	public function escape($var)
	{
		if(strlen($var) > 30)
		{
    		// use the helper htmlEscape method instead and shorten the string
			return MoojlaHelper::htmlEscape($var, $this->_charset, true, 30);
		}
		// use the helper htmlEscape method instead.
		return MoojlaHelper::htmlEscape($var, $this->_charset);
	}

	/**
	 * Method to set up the document properties
	 *
	 * @return void
	 */
	protected function setDocument()
	{
		$isNew = ($this->item->id < 1);
		if (!isset($this->document))
		{
			$this->document = JFactory::getDocument();
		}
		$this->document->setTitle(JText::_($isNew ?
'COM_MOOJLA_TAG_INSTANCE_NEW' :
'COM_MOOJLA_TAG_INSTANCE_EDIT'));
		$this->document->addStyleSheet(JURI::root() .
"administrator/components/com_moojla/assets/css/tag_instance.css",
(MoojlaHelper::jVersion()->isCompatible('3.8.0')) ?
array('version' => 'auto') : 'text/css');
		$this->document->addScript(JURI::root() . $this->script,
(MoojlaHelper::jVersion()->isCompatible('3.8.0')) ?
array('version' => 'auto') :
'text/javascript');
		$this->document->addScript(JURI::root() .
"administrator/components/com_moojla/views/tag_instance/submitbutton.js",
(MoojlaHelper::jVersion()->isCompatible('3.8.0')) ?
array('version' => 'auto') :
'text/javascript'); 
		JText::script('view not acceptable. Error');
	}
}
tag_instances/index.html000064400000000054151160405230011357
0ustar00<html><body
bgcolor="#FFFFFF"></body></html>tag_instances/tmpl/default.php000064400000006014151160405230012475
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				Lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.77
	@build			6th April, 2022
	@created		22nd July, 2020
	@package		Moojla
	@subpackage		default.php
	@author			Lmskaran <http://Lmskaran.com>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

JHtml::_('behavior.tooltip');
JHtml::_('behavior.multiselect');
JHtml::_('dropdown.init');
JHtml::_('formbehavior.chosen',
'.multipleAccessLevels', null,
array('placeholder_text_multiple' => '- ' .
JText::_('COM_MOOJLA_FILTER_SELECT_ACCESS') . ' -'));
JHtml::_('formbehavior.chosen', 'select');
if ($this->saveOrder)
{
	$saveOrderingUrl =
'index.php?option=com_moojla&task=tag_instances.saveOrderAjax&tmpl=component';
	JHtml::_('sortablelist.sortable', 'tag_instanceList',
'adminForm', strtolower($this->listDirn), $saveOrderingUrl);
}
?>
<form action="<?php echo
JRoute::_('index.php?option=com_moojla&view=tag_instances');
?>" method="post" name="adminForm"
id="adminForm">
<?php if(!empty( $this->sidebar)): ?>
	<div id="j-sidebar-container" class="span2">
		<?php echo $this->sidebar; ?>
	</div>
	<div id="j-main-container" class="span10">
<?php else : ?>
	<div id="j-main-container">
<?php endif; ?>
<?php
	// Add the searchtools
	echo JLayoutHelper::render('joomla.searchtools.default',
array('view' => $this));
?>
<?php if (empty($this->items)): ?>
	<div class="alert alert-no-items">
		<?php echo JText::_('JGLOBAL_NO_MATCHING_RESULTS'); ?>
	</div>
<?php else : ?>
	<table class="table table-striped"
id="tag_instanceList">
		<thead><?php echo
$this->loadTemplate('head');?></thead>
		<tfoot><?php echo
$this->loadTemplate('foot');?></tfoot>
		<tbody><?php echo
$this->loadTemplate('body');?></tbody>
	</table>
	<?php // Load the batch processing form. ?>
	<?php if ($this->canCreate && $this->canEdit) : ?>
		<?php echo JHtml::_(
			'bootstrap.renderModal',
			'collapseModal',
			array(
				'title' =>
JText::_('COM_MOOJLA_TAG_INSTANCES_BATCH_OPTIONS'),
				'footer' =>
$this->loadTemplate('batch_footer')
			),
			$this->loadTemplate('batch_body')
		); ?>
	<?php endif; ?>
	<input type="hidden" name="boxchecked"
value="0" />
	</div>
<?php endif; ?>
	<input type="hidden" name="task" value=""
/>
	<?php echo JHtml::_('form.token'); ?>
</form>
tag_instances/tmpl/default_batch_body.php000064400000002340151160405230014651
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				Lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.77
	@build			6th April, 2022
	@created		22nd July, 2020
	@package		Moojla
	@subpackage		default_batch_body.php
	@author			Lmskaran <http://Lmskaran.com>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

?>

<p><?php echo
JText::_('COM_MOOJLA_TAG_INSTANCES_BATCH_TIP'); ?></p>
<?php echo $this->batchDisplay;
?>tag_instances/tmpl/default_batch_footer.php000064400000002736151160405230015223
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				Lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.77
	@build			6th April, 2022
	@created		22nd July, 2020
	@package		Moojla
	@subpackage		default_batch_footer.php
	@author			Lmskaran <http://Lmskaran.com>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

?>
<!-- clear the batch values if cancel -->
<button class="btn" type="button"
onclick="" data-dismiss="modal">
	<?php echo JText::_('JCANCEL'); ?>
</button>
<!-- post the batch values if process -->
<button class="btn btn-success" type="submit"
onclick="Joomla.submitbutton('tag_instance.batch');">
	<?php echo JText::_('JGLOBAL_BATCH_PROCESS'); ?>
</button>tag_instances/tmpl/default_body.php000064400000007653151160405230013524
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				Lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.77
	@build			6th April, 2022
	@created		22nd July, 2020
	@package		Moojla
	@subpackage		default_body.php
	@author			Lmskaran <http://Lmskaran.com>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

$edit =
"index.php?option=com_moojla&view=tag_instances&task=tag_instance.edit";

?>
<?php foreach ($this->items as $i => $item): ?>
	<?php
		$canCheckin = $this->user->authorise('core.manage',
'com_checkin') || $item->checked_out == $this->user->id
|| $item->checked_out == 0;
		$userChkOut = JFactory::getUser($item->checked_out);
		$canDo =
MoojlaHelper::getActions('tag_instance',$item,'tag_instances');
	?>
	<tr class="row<?php echo $i % 2; ?>">
		<td class="order nowrap center hidden-phone">
		<?php if ($canDo->get('core.edit.state')): ?>
			<?php
				$iconClass = '';
				if (!$this->saveOrder)
				{
					$iconClass = ' inactive tip-top" hasTooltip"
title="' . JHtml::tooltipText('JORDERINGDISABLED');
				}
			?>
			<span class="sortable-handler<?php echo $iconClass;
?>">
				<i class="icon-menu"></i>
			</span>
			<?php if ($this->saveOrder) : ?>
				<input type="text" style="display:none"
name="order[]" size="5"
				value="<?php echo $item->ordering; ?>"
class="width-20 text-area-order " />
			<?php endif; ?>
		<?php else: ?>
			&#8942;
		<?php endif; ?>
		</td>
		<td class="nowrap center">
		<?php if ($canDo->get('core.edit')): ?>
				<?php if ($item->checked_out) : ?>
					<?php if ($canCheckin) : ?>
						<?php echo JHtml::_('grid.id', $i, $item->id); ?>
					<?php else: ?>
						&#9633;
					<?php endif; ?>
				<?php else: ?>
					<?php echo JHtml::_('grid.id', $i, $item->id); ?>
				<?php endif; ?>
		<?php else: ?>
			&#9633;
		<?php endif; ?>
		</td>
		<td class="nowrap">
			<div class="name">
				<?php if ($canDo->get('core.edit')): ?>
					<a href="<?php echo $edit; ?>&id=<?php echo
$item->id; ?>"><?php echo
$this->escape($item->moojlacourse_fullname); ?></a>
					<?php if ($item->checked_out): ?>
						<?php echo JHtml::_('jgrid.checkedout', $i,
$userChkOut->name, $item->checked_out_time,
'tag_instances.', $canCheckin); ?>
					<?php endif; ?>
				<?php else: ?>
					<?php echo $this->escape($item->moojlacourse_fullname); ?>
				<?php endif; ?>
			</div>
		</td>
		<td class="hidden-phone">
			<?php echo $this->escape($item->moodletag_tagname); ?>
		</td>
		<td class="center">
		<?php if ($canDo->get('core.edit.state')) : ?>
				<?php if ($item->checked_out) : ?>
					<?php if ($canCheckin) : ?>
						<?php echo JHtml::_('jgrid.published',
$item->published, $i, 'tag_instances.', true, 'cb');
?>
					<?php else: ?>
						<?php echo JHtml::_('jgrid.published',
$item->published, $i, 'tag_instances.', false,
'cb'); ?>
					<?php endif; ?>
				<?php else: ?>
					<?php echo JHtml::_('jgrid.published',
$item->published, $i, 'tag_instances.', true, 'cb');
?>
				<?php endif; ?>
		<?php else: ?>
			<?php echo JHtml::_('jgrid.published', $item->published,
$i, 'tag_instances.', false, 'cb'); ?>
		<?php endif; ?>
		</td>
		<td class="nowrap center hidden-phone">
			<?php echo $item->id; ?>
		</td>
	</tr>
<?php endforeach;
?>tag_instances/tmpl/default_foot.php000064400000002304151160405230013522
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				Lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.77
	@build			6th April, 2022
	@created		22nd July, 2020
	@package		Moojla
	@subpackage		default_foot.php
	@author			Lmskaran <http://Lmskaran.com>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

?>
<tr>
	<td colspan="6"><?php echo
$this->pagination->getListFooter(); ?></td>
</tr>tag_instances/tmpl/default_head.php000064400000004771151160405230013466
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				Lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.77
	@build			6th April, 2022
	@created		22nd July, 2020
	@package		Moojla
	@subpackage		default_head.php
	@author			Lmskaran <http://Lmskaran.com>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

?>
<tr>
	<?php if ($this->canEdit&& $this->canState): ?>
		<th width="1%" class="nowrap center
hidden-phone">
			<?php echo JHtml::_('searchtools.sort', '',
'a.ordering', $this->listDirn, $this->listOrder, null,
'asc', 'JGRID_HEADING_ORDERING',
'icon-menu-2'); ?>
		</th>
		<th width="20" class="nowrap center">
			<?php echo JHtml::_('grid.checkall'); ?>
		</th>
	<?php else: ?>
		<th width="20" class="nowrap center
hidden-phone">
			&#9662;
		</th>
		<th width="20" class="nowrap center">
			&#9632;
		</th>
	<?php endif; ?>
	<th class="nowrap" >
			<?php echo JHtml::_('searchtools.sort',
'COM_MOOJLA_TAG_INSTANCE_MOOJLACOURSE_LABEL',
'g.fullname', $this->listDirn, $this->listOrder); ?>
	</th>
	<th class="nowrap hidden-phone" >
			<?php echo JHtml::_('searchtools.sort',
'COM_MOOJLA_TAG_INSTANCE_MOODLETAG_LABEL', 'h.tagname',
$this->listDirn, $this->listOrder); ?>
	</th>
	<?php if ($this->canState): ?>
		<th width="10" class="nowrap center" >
			<?php echo JHtml::_('searchtools.sort',
'COM_MOOJLA_TAG_INSTANCE_STATUS', 'a.published',
$this->listDirn, $this->listOrder); ?>
		</th>
	<?php else: ?>
		<th width="10" class="nowrap center" >
			<?php echo JText::_('COM_MOOJLA_TAG_INSTANCE_STATUS');
?>
		</th>
	<?php endif; ?>
	<th width="5" class="nowrap center hidden-phone"
>
			<?php echo JHtml::_('searchtools.sort',
'COM_MOOJLA_TAG_INSTANCE_ID', 'a.id',
$this->listDirn, $this->listOrder); ?>
	</th>
</tr>tag_instances/tmpl/default_toolbar.php000064400000007060151160405230014221
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				Lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.77
	@build			6th April, 2022
	@created		22nd July, 2020
	@package		Moojla
	@subpackage		default_toolbar.php
	@author			Lmskaran <http://Lmskaran.com>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

?>
<div id="filter-bar" class="btn-toolbar">
        <div class="filter-search btn-group pull-left">
            <label for="filter_search"
class="element-invisible"><?php echo
JText::_('Search');?></label>
            <input type="text" name="filter_search"
id="filter_search" placeholder="<?php echo
JText::_('JSEARCH_FILTER'); ?>" value="<?php echo
$this->escape($this->state->get('filter.search'));
?>" class="hasTooltip" title="<?php echo
JHtml::tooltipText('Search Tag_instances'); ?>" />
        </div>
        <div class="btn-group pull-left">
            <button type="submit" class="btn
hasTooltip" title="<?php echo
JHtml::tooltipText('JSEARCH_FILTER_SUBMIT'); ?>"><i
class="icon-search"></i></button>
            <button type="button" class="btn
hasTooltip" title="<?php echo
JHtml::tooltipText('JSEARCH_FILTER_CLEAR'); ?>"
onclick="document.id('filter_search').value='';this.form.submit();"><i
class="icon-remove"></i></button>
        </div>
        <div class="btn-group pull-right hidden-phone">
            <label for="limit"
class="element-invisible"><?php echo
JText::_('JFIELD_PLG_SEARCH_SEARCHLIMIT_DESC');?></label>
            <?php echo $this->pagination->getLimitBox(); ?>
        </div>
        <div class="btn-group pull-right hidden-phone">
            <label for="directionTable"
class="element-invisible"><?php echo
JText::_('JFIELD_ORDERING_DESC');?></label>
            <select name="directionTable"
id="directionTable" class="input-medium"
onchange="Joomla.orderTable()">
                <option value=""><?php echo
JText::_('JFIELD_ORDERING_DESC');?></option>
                <option value="asc" <?php if
($this->listDirn == 'asc') echo
'selected="selected"'; ?>><?php echo
JText::_('JGLOBAL_ORDER_ASCENDING');?></option>
                <option value="desc" <?php if
($this->listDirn == 'desc') echo
'selected="selected"'; ?>><?php echo
JText::_('JGLOBAL_ORDER_DESCENDING');?></option>
            </select>
        </div>
        <div class="btn-group pull-right">
            <label for="sortTable"
class="element-invisible"><?php echo
JText::_('JGLOBAL_SORT_BY');?></label>
            <select name="sortTable" id="sortTable"
class="input-medium" onchange="Joomla.orderTable()">
                <option value=""><?php echo
JText::_('JGLOBAL_SORT_BY');?></option>
                <?php echo JHtml::_('select.options',
$this->getSortFields(), 'value', 'text',
$this->listOrder);?>
            </select>
        </div>
    </div>
<div class="clearfix">
</div>tag_instances/tmpl/index.html000064400000000054151160405230012333
0ustar00<html><body
bgcolor="#FFFFFF"></body></html>tag_instances/view.html.php000064400000021522151160405230012013
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				Lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.77
	@build			6th April, 2022
	@created		22nd July, 2020
	@package		Moojla
	@subpackage		view.html.php
	@author			Lmskaran <http://Lmskaran.com>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

/**
 * Moojla View class for the Tag_instances
 */
class MoojlaViewTag_instances extends JViewLegacy
{
	/**
	 * Tag_instances view display method
	 * @return void
	 */
	function display($tpl = null)
	{
		if ($this->getLayout() !== 'modal')
		{
			// Include helper submenu
			MoojlaHelper::addSubmenu('tag_instances');
		}

		// Assign data to the view
		$this->items = $this->get('Items');
		$this->pagination = $this->get('Pagination');
		$this->state = $this->get('State');
		$this->user = JFactory::getUser();
		// Load the filter form from xml.
		$this->filterForm = $this->get('FilterForm');
		// Load the active filters.
		$this->activeFilters = $this->get('ActiveFilters');
		// Add the list ordering clause.
		$this->listOrder =
$this->escape($this->state->get('list.ordering',
'a.id'));
		$this->listDirn =
$this->escape($this->state->get('list.direction',
'DESC'));
		$this->saveOrder = $this->listOrder == 'a.ordering';
		// set the return here value
		$this->return_here = urlencode(base64_encode((string)
JUri::getInstance()));
		// get global action permissions
		$this->canDo = MoojlaHelper::getActions('tag_instance');
		$this->canEdit = $this->canDo->get('core.edit');
		$this->canState =
$this->canDo->get('core.edit.state');
		$this->canCreate = $this->canDo->get('core.create');
		$this->canDelete = $this->canDo->get('core.delete');
		$this->canBatch = $this->canDo->get('core.batch');

		// We don't need toolbar in the modal window.
		if ($this->getLayout() !== 'modal')
		{
			$this->addToolbar();
			$this->sidebar = JHtmlSidebar::render();
			// load the batch html
			if ($this->canCreate && $this->canEdit &&
$this->canState)
			{
				$this->batchDisplay = JHtmlBatch_::render();
			}
		}
		
		// Check for errors.
		if (count($errors = $this->get('Errors')))
		{
			throw new Exception(implode("\n", $errors), 500);
		}

		// Display the template
		parent::display($tpl);

		// Set the document
		$this->setDocument();
	}

	/**
	 * Setting the toolbar
	 */
	protected function addToolBar()
	{
		JToolBarHelper::title(JText::_('COM_MOOJLA_TAG_INSTANCES'),
'tags');
		JHtmlSidebar::setAction('index.php?option=com_moojla&view=tag_instances');
		JFormHelper::addFieldPath(JPATH_COMPONENT . '/models/fields');

		if ($this->canCreate)
		{
			JToolBarHelper::addNew('tag_instance.add');
		}

		// Only load if there are items
		if (MoojlaHelper::checkArray($this->items))
		{
			if ($this->canEdit)
			{
				JToolBarHelper::editList('tag_instance.edit');
			}

			if ($this->canState)
			{
				JToolBarHelper::publishList('tag_instances.publish');
				JToolBarHelper::unpublishList('tag_instances.unpublish');
				JToolBarHelper::archiveList('tag_instances.archive');

				if ($this->canDo->get('core.admin'))
				{
					JToolBarHelper::checkin('tag_instances.checkin');
				}
			}

			// Add a batch button
			if ($this->canBatch && $this->canCreate &&
$this->canEdit && $this->canState)
			{
				// Get the toolbar object instance
				$bar = JToolBar::getInstance('toolbar');
				// set the batch button name
				$title = JText::_('JTOOLBAR_BATCH');
				// Instantiate a new JLayoutFile instance and render the batch button
				$layout = new JLayoutFile('joomla.toolbar.batch');
				// add the button to the page
				$dhtml = $layout->render(array('title' => $title));
				$bar->appendButton('Custom', $dhtml, 'batch');
			}

			if ($this->state->get('filter.published') == -2
&& ($this->canState && $this->canDelete))
			{
				JToolbarHelper::deleteList('',
'tag_instances.delete', 'JTOOLBAR_EMPTY_TRASH');
			}
			elseif ($this->canState && $this->canDelete)
			{
				JToolbarHelper::trash('tag_instances.trash');
			}
		}

		// set help url for this view if found
		$help_url = MoojlaHelper::getHelpUrl('tag_instances');
		if (MoojlaHelper::checkString($help_url))
		{
				JToolbarHelper::help('COM_MOOJLA_HELP_MANAGER', false,
$help_url);
		}

		// add the options comp button
		if ($this->canDo->get('core.admin') ||
$this->canDo->get('core.options'))
		{
			JToolBarHelper::preferences('com_moojla');
		}

		// Only load published batch if state and batch is allowed
		if ($this->canState && $this->canBatch)
		{
			JHtmlBatch_::addListSelection(
				JText::_('COM_MOOJLA_KEEP_ORIGINAL_STATE'),
				'batch[published]',
				JHtml::_('select.options',
JHtml::_('jgrid.publishedOptions', array('all' =>
false)), 'value', 'text', '', true)
			);
		}

		// Only load access batch if create, edit and batch is allowed
		if ($this->canBatch && $this->canCreate &&
$this->canEdit)
		{
			JHtmlBatch_::addListSelection(
				JText::_('COM_MOOJLA_KEEP_ORIGINAL_ACCESS'),
				'batch[access]',
				JHtml::_('select.options',
JHtml::_('access.assetgroups'), 'value',
'text')
			);
		}

		// Only load Moojlacourse Fullname batch if create, edit, and batch is
allowed
		if ($this->canBatch && $this->canCreate &&
$this->canEdit)
		{
			// Set Moojlacourse Fullname Selection
			$this->moojlacourseFullnameOptions =
JFormHelper::loadFieldType('Moojlacourse')->options;
			// We do some sanitation for Moojlacourse Fullname filter
			if (MoojlaHelper::checkArray($this->moojlacourseFullnameOptions)
&&
				isset($this->moojlacourseFullnameOptions[0]->value) &&
				!MoojlaHelper::checkString($this->moojlacourseFullnameOptions[0]->value))
			{
				unset($this->moojlacourseFullnameOptions[0]);
			}
			// Moojlacourse Fullname Batch Selection
			JHtmlBatch_::addListSelection(
				'- Keep Original
'.JText::_('COM_MOOJLA_TAG_INSTANCE_MOOJLACOURSE_LABEL').'
-',
				'batch[moojlacourse]',
				JHtml::_('select.options',
$this->moojlacourseFullnameOptions, 'value', 'text')
			);
		}

		// Only load Moodletag Tagname batch if create, edit, and batch is
allowed
		if ($this->canBatch && $this->canCreate &&
$this->canEdit)
		{
			// Set Moodletag Tagname Selection
			$this->moodletagTagnameOptions =
JFormHelper::loadFieldType('Moodletag')->options;
			// We do some sanitation for Moodletag Tagname filter
			if (MoojlaHelper::checkArray($this->moodletagTagnameOptions)
&&
				isset($this->moodletagTagnameOptions[0]->value) &&
				!MoojlaHelper::checkString($this->moodletagTagnameOptions[0]->value))
			{
				unset($this->moodletagTagnameOptions[0]);
			}
			// Moodletag Tagname Batch Selection
			JHtmlBatch_::addListSelection(
				'- Keep Original
'.JText::_('COM_MOOJLA_TAG_INSTANCE_MOODLETAG_LABEL').'
-',
				'batch[moodletag]',
				JHtml::_('select.options', $this->moodletagTagnameOptions,
'value', 'text')
			);
		}
	}

	/**
	 * Method to set up the document properties
	 *
	 * @return void
	 */
	protected function setDocument()
	{
		if (!isset($this->document))
		{
			$this->document = JFactory::getDocument();
		}
		$this->document->setTitle(JText::_('COM_MOOJLA_TAG_INSTANCES'));
		$this->document->addStyleSheet(JURI::root() .
"administrator/components/com_moojla/assets/css/tag_instances.css",
(MoojlaHelper::jVersion()->isCompatible('3.8.0')) ?
array('version' => 'auto') : 'text/css');
	}

	/**
	 * Escapes a value for output in a view script.
	 *
	 * @param   mixed  $var  The output to escape.
	 *
	 * @return  mixed  The escaped value.
	 */
	public function escape($var)
	{
		if(strlen($var) > 50)
		{
			// use the helper htmlEscape method instead and shorten the string
			return MoojlaHelper::htmlEscape($var, $this->_charset, true);
		}
		// use the helper htmlEscape method instead.
		return MoojlaHelper::htmlEscape($var, $this->_charset);
	}

	/**
	 * Returns an array of fields the table can be sorted by
	 *
	 * @return  array  Array containing the field name to sort by as the key
and display text as value
	 */
	protected function getSortFields()
	{
		return array(
			'a.ordering' =>
JText::_('JGRID_HEADING_ORDERING'),
			'a.published' => JText::_('JSTATUS'),
			'g.fullname' =>
JText::_('COM_MOOJLA_TAG_INSTANCE_MOOJLACOURSE_LABEL'),
			'h.tagname' =>
JText::_('COM_MOOJLA_TAG_INSTANCE_MOODLETAG_LABEL'),
			'a.id' => JText::_('JGRID_HEADING_ID')
		);
	}
}
user_fields_map/index.html000064400000000054151160405230011676
0ustar00<html><body
bgcolor="#FFFFFF"></body></html>user_fields_map/tmpl/default.php000064400000005565151160405230013026
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				Lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.77
	@build			6th April, 2022
	@created		22nd July, 2020
	@package		Moojla
	@subpackage		default.php
	@author			Lmskaran <http://Lmskaran.com>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

JHtml::_('behavior.tooltip');
JHtml::_('behavior.multiselect');
JHtml::_('dropdown.init');
JHtml::_('formbehavior.chosen', 'select');
if ($this->saveOrder)
{
	$saveOrderingUrl =
'index.php?option=com_moojla&task=user_fields_map.saveOrderAjax&tmpl=component';
	JHtml::_('sortablelist.sortable',
'user_field_mapList', 'adminForm',
strtolower($this->listDirn), $saveOrderingUrl);
}
?>
<form action="<?php echo
JRoute::_('index.php?option=com_moojla&view=user_fields_map');
?>" method="post" name="adminForm"
id="adminForm">
<?php if(!empty( $this->sidebar)): ?>
	<div id="j-sidebar-container" class="span2">
		<?php echo $this->sidebar; ?>
	</div>
	<div id="j-main-container" class="span10">
<?php else : ?>
	<div id="j-main-container">
<?php endif; ?>
<?php
	// Add the searchtools
	echo JLayoutHelper::render('joomla.searchtools.default',
array('view' => $this));
?>
<?php if (empty($this->items)): ?>
	<div class="alert alert-no-items">
		<?php echo JText::_('JGLOBAL_NO_MATCHING_RESULTS'); ?>
	</div>
<?php else : ?>
	<table class="table table-striped"
id="user_field_mapList">
		<thead><?php echo
$this->loadTemplate('head');?></thead>
		<tfoot><?php echo
$this->loadTemplate('foot');?></tfoot>
		<tbody><?php echo
$this->loadTemplate('body');?></tbody>
	</table>
	<?php // Load the batch processing form. ?>
	<?php if ($this->canCreate && $this->canEdit) : ?>
		<?php echo JHtml::_(
			'bootstrap.renderModal',
			'collapseModal',
			array(
				'title' =>
JText::_('COM_MOOJLA_USER_FIELDS_MAP_BATCH_OPTIONS'),
				'footer' =>
$this->loadTemplate('batch_footer')
			),
			$this->loadTemplate('batch_body')
		); ?>
	<?php endif; ?>
	<input type="hidden" name="boxchecked"
value="0" />
	</div>
<?php endif; ?>
	<input type="hidden" name="task" value=""
/>
	<?php echo JHtml::_('form.token'); ?>
</form>
user_fields_map/tmpl/default_batch_body.php000064400000002342151160405230015172
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				Lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.77
	@build			6th April, 2022
	@created		22nd July, 2020
	@package		Moojla
	@subpackage		default_batch_body.php
	@author			Lmskaran <http://Lmskaran.com>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

?>

<p><?php echo
JText::_('COM_MOOJLA_USER_FIELDS_MAP_BATCH_TIP'); ?></p>
<?php echo $this->batchDisplay;
?>user_fields_map/tmpl/default_batch_footer.php000064400000002740151160405230015535
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				Lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.77
	@build			6th April, 2022
	@created		22nd July, 2020
	@package		Moojla
	@subpackage		default_batch_footer.php
	@author			Lmskaran <http://Lmskaran.com>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

?>
<!-- clear the batch values if cancel -->
<button class="btn" type="button"
onclick="" data-dismiss="modal">
	<?php echo JText::_('JCANCEL'); ?>
</button>
<!-- post the batch values if process -->
<button class="btn btn-success" type="submit"
onclick="Joomla.submitbutton('user_field_map.batch');">
	<?php echo JText::_('JGLOBAL_BATCH_PROCESS'); ?>
</button>user_fields_map/tmpl/default_body.php000064400000007774151160405230014047
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				Lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.77
	@build			6th April, 2022
	@created		22nd July, 2020
	@package		Moojla
	@subpackage		default_body.php
	@author			Lmskaran <http://Lmskaran.com>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

$edit =
"index.php?option=com_moojla&view=user_fields_map&task=user_field_map.edit";

?>
<?php foreach ($this->items as $i => $item): ?>
	<?php
		$canCheckin = $this->user->authorise('core.manage',
'com_checkin') || $item->checked_out == $this->user->id
|| $item->checked_out == 0;
		$userChkOut = JFactory::getUser($item->checked_out);
		$canDo =
MoojlaHelper::getActions('user_field_map',$item,'user_fields_map');
	?>
	<tr class="row<?php echo $i % 2; ?>">
		<td class="order nowrap center hidden-phone">
		<?php if ($canDo->get('core.edit.state')): ?>
			<?php
				$iconClass = '';
				if (!$this->saveOrder)
				{
					$iconClass = ' inactive tip-top" hasTooltip"
title="' . JHtml::tooltipText('JORDERINGDISABLED');
				}
			?>
			<span class="sortable-handler<?php echo $iconClass;
?>">
				<i class="icon-menu"></i>
			</span>
			<?php if ($this->saveOrder) : ?>
				<input type="text" style="display:none"
name="order[]" size="5"
				value="<?php echo $item->ordering; ?>"
class="width-20 text-area-order " />
			<?php endif; ?>
		<?php else: ?>
			&#8942;
		<?php endif; ?>
		</td>
		<td class="nowrap center">
		<?php if ($canDo->get('core.edit')): ?>
				<?php if ($item->checked_out) : ?>
					<?php if ($canCheckin) : ?>
						<?php echo JHtml::_('grid.id', $i, $item->id); ?>
					<?php else: ?>
						&#9633;
					<?php endif; ?>
				<?php else: ?>
					<?php echo JHtml::_('grid.id', $i, $item->id); ?>
				<?php endif; ?>
		<?php else: ?>
			&#9633;
		<?php endif; ?>
		</td>
		<td class="nowrap">
			<div class="name">
				<?php if ($canDo->get('core.edit')): ?>
					<a href="<?php echo $edit; ?>&id=<?php echo
$item->id; ?>"><?php echo
$this->escape($item->juserfields_name); ?></a>
					<?php if ($item->checked_out): ?>
						<?php echo JHtml::_('jgrid.checkedout', $i,
$userChkOut->name, $item->checked_out_time,
'user_fields_map.', $canCheckin); ?>
					<?php endif; ?>
				<?php else: ?>
					<?php echo $this->escape($item->juserfields_name); ?>
				<?php endif; ?>
			</div>
		</td>
		<td class="hidden-phone">
			<?php echo $this->escape($item->muserfields_id); ?>
		</td>
		<td class="hidden-phone">
			<?php echo JText::_($item->iscv); ?>
		</td>
		<td class="center">
		<?php if ($canDo->get('core.edit.state')) : ?>
				<?php if ($item->checked_out) : ?>
					<?php if ($canCheckin) : ?>
						<?php echo JHtml::_('jgrid.published',
$item->published, $i, 'user_fields_map.', true,
'cb'); ?>
					<?php else: ?>
						<?php echo JHtml::_('jgrid.published',
$item->published, $i, 'user_fields_map.', false,
'cb'); ?>
					<?php endif; ?>
				<?php else: ?>
					<?php echo JHtml::_('jgrid.published',
$item->published, $i, 'user_fields_map.', true,
'cb'); ?>
				<?php endif; ?>
		<?php else: ?>
			<?php echo JHtml::_('jgrid.published', $item->published,
$i, 'user_fields_map.', false, 'cb'); ?>
		<?php endif; ?>
		</td>
		<td class="nowrap center hidden-phone">
			<?php echo $item->id; ?>
		</td>
	</tr>
<?php endforeach;
?>user_fields_map/tmpl/default_foot.php000064400000002304151160405230014041
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				Lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.77
	@build			6th April, 2022
	@created		22nd July, 2020
	@package		Moojla
	@subpackage		default_foot.php
	@author			Lmskaran <http://Lmskaran.com>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

?>
<tr>
	<td colspan="7"><?php echo
$this->pagination->getListFooter(); ?></td>
</tr>user_fields_map/tmpl/default_head.php000064400000005251151160405230013777
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				Lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.77
	@build			6th April, 2022
	@created		22nd July, 2020
	@package		Moojla
	@subpackage		default_head.php
	@author			Lmskaran <http://Lmskaran.com>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

?>
<tr>
	<?php if ($this->canEdit&& $this->canState): ?>
		<th width="1%" class="nowrap center
hidden-phone">
			<?php echo JHtml::_('searchtools.sort', '',
'a.ordering', $this->listDirn, $this->listOrder, null,
'asc', 'JGRID_HEADING_ORDERING',
'icon-menu-2'); ?>
		</th>
		<th width="20" class="nowrap center">
			<?php echo JHtml::_('grid.checkall'); ?>
		</th>
	<?php else: ?>
		<th width="20" class="nowrap center
hidden-phone">
			&#9662;
		</th>
		<th width="20" class="nowrap center">
			&#9632;
		</th>
	<?php endif; ?>
	<th class="nowrap" >
			<?php echo JHtml::_('searchtools.sort',
'COM_MOOJLA_USER_FIELD_MAP_JUSERFIELDS_LABEL',
'g.name', $this->listDirn, $this->listOrder); ?>
	</th>
	<th class="nowrap hidden-phone" >
			<?php echo JHtml::_('searchtools.sort',
'COM_MOOJLA_USER_FIELD_MAP_MUSERFIELDS_LABEL', 'h.id',
$this->listDirn, $this->listOrder); ?>
	</th>
	<th class="nowrap hidden-phone" >
			<?php echo JHtml::_('searchtools.sort',
'COM_MOOJLA_USER_FIELD_MAP_ISCV_LABEL', 'a.iscv',
$this->listDirn, $this->listOrder); ?>
	</th>
	<?php if ($this->canState): ?>
		<th width="10" class="nowrap center" >
			<?php echo JHtml::_('searchtools.sort',
'COM_MOOJLA_USER_FIELD_MAP_STATUS', 'a.published',
$this->listDirn, $this->listOrder); ?>
		</th>
	<?php else: ?>
		<th width="10" class="nowrap center" >
			<?php echo JText::_('COM_MOOJLA_USER_FIELD_MAP_STATUS');
?>
		</th>
	<?php endif; ?>
	<th width="5" class="nowrap center hidden-phone"
>
			<?php echo JHtml::_('searchtools.sort',
'COM_MOOJLA_USER_FIELD_MAP_ID', 'a.id',
$this->listDirn, $this->listOrder); ?>
	</th>
</tr>user_fields_map/tmpl/default_toolbar.php000064400000007062151160405230014542
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				Lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.77
	@build			6th April, 2022
	@created		22nd July, 2020
	@package		Moojla
	@subpackage		default_toolbar.php
	@author			Lmskaran <http://Lmskaran.com>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

?>
<div id="filter-bar" class="btn-toolbar">
        <div class="filter-search btn-group pull-left">
            <label for="filter_search"
class="element-invisible"><?php echo
JText::_('Search');?></label>
            <input type="text" name="filter_search"
id="filter_search" placeholder="<?php echo
JText::_('JSEARCH_FILTER'); ?>" value="<?php echo
$this->escape($this->state->get('filter.search'));
?>" class="hasTooltip" title="<?php echo
JHtml::tooltipText('Search User_fields_map'); ?>" />
        </div>
        <div class="btn-group pull-left">
            <button type="submit" class="btn
hasTooltip" title="<?php echo
JHtml::tooltipText('JSEARCH_FILTER_SUBMIT'); ?>"><i
class="icon-search"></i></button>
            <button type="button" class="btn
hasTooltip" title="<?php echo
JHtml::tooltipText('JSEARCH_FILTER_CLEAR'); ?>"
onclick="document.id('filter_search').value='';this.form.submit();"><i
class="icon-remove"></i></button>
        </div>
        <div class="btn-group pull-right hidden-phone">
            <label for="limit"
class="element-invisible"><?php echo
JText::_('JFIELD_PLG_SEARCH_SEARCHLIMIT_DESC');?></label>
            <?php echo $this->pagination->getLimitBox(); ?>
        </div>
        <div class="btn-group pull-right hidden-phone">
            <label for="directionTable"
class="element-invisible"><?php echo
JText::_('JFIELD_ORDERING_DESC');?></label>
            <select name="directionTable"
id="directionTable" class="input-medium"
onchange="Joomla.orderTable()">
                <option value=""><?php echo
JText::_('JFIELD_ORDERING_DESC');?></option>
                <option value="asc" <?php if
($this->listDirn == 'asc') echo
'selected="selected"'; ?>><?php echo
JText::_('JGLOBAL_ORDER_ASCENDING');?></option>
                <option value="desc" <?php if
($this->listDirn == 'desc') echo
'selected="selected"'; ?>><?php echo
JText::_('JGLOBAL_ORDER_DESCENDING');?></option>
            </select>
        </div>
        <div class="btn-group pull-right">
            <label for="sortTable"
class="element-invisible"><?php echo
JText::_('JGLOBAL_SORT_BY');?></label>
            <select name="sortTable" id="sortTable"
class="input-medium" onchange="Joomla.orderTable()">
                <option value=""><?php echo
JText::_('JGLOBAL_SORT_BY');?></option>
                <?php echo JHtml::_('select.options',
$this->getSortFields(), 'value', 'text',
$this->listOrder);?>
            </select>
        </div>
    </div>
<div class="clearfix">
</div>user_fields_map/tmpl/index.html000064400000000054151160405230012652
0ustar00<html><body
bgcolor="#FFFFFF"></body></html>user_fields_map/view.html.php000064400000017174151160405230012342
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				Lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.77
	@build			6th April, 2022
	@created		22nd July, 2020
	@package		Moojla
	@subpackage		view.html.php
	@author			Lmskaran <http://Lmskaran.com>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

/**
 * Moojla View class for the User_fields_map
 */
class MoojlaViewUser_fields_map extends JViewLegacy
{
	/**
	 * User_fields_map view display method
	 * @return void
	 */
	function display($tpl = null)
	{
		if ($this->getLayout() !== 'modal')
		{
			// Include helper submenu
			MoojlaHelper::addSubmenu('user_fields_map');
		}

		// Assign data to the view
		$this->items = $this->get('Items');
		$this->pagination = $this->get('Pagination');
		$this->state = $this->get('State');
		$this->user = JFactory::getUser();
		// Load the filter form from xml.
		$this->filterForm = $this->get('FilterForm');
		// Load the active filters.
		$this->activeFilters = $this->get('ActiveFilters');
		// Add the list ordering clause.
		$this->listOrder =
$this->escape($this->state->get('list.ordering',
'a.id'));
		$this->listDirn =
$this->escape($this->state->get('list.direction',
'DESC'));
		$this->saveOrder = $this->listOrder == 'a.ordering';
		// set the return here value
		$this->return_here = urlencode(base64_encode((string)
JUri::getInstance()));
		// get global action permissions
		$this->canDo = MoojlaHelper::getActions('user_field_map');
		$this->canEdit = $this->canDo->get('core.edit');
		$this->canState =
$this->canDo->get('core.edit.state');
		$this->canCreate = $this->canDo->get('core.create');
		$this->canDelete = $this->canDo->get('core.delete');
		$this->canBatch = $this->canDo->get('core.batch');

		// We don't need toolbar in the modal window.
		if ($this->getLayout() !== 'modal')
		{
			$this->addToolbar();
			$this->sidebar = JHtmlSidebar::render();
			// load the batch html
			if ($this->canCreate && $this->canEdit &&
$this->canState)
			{
				$this->batchDisplay = JHtmlBatch_::render();
			}
		}
		
		// Check for errors.
		if (count($errors = $this->get('Errors')))
		{
			throw new Exception(implode("\n", $errors), 500);
		}

		// Display the template
		parent::display($tpl);

		// Set the document
		$this->setDocument();
	}

	/**
	 * Setting the toolbar
	 */
	protected function addToolBar()
	{
		JToolBarHelper::title(JText::_('COM_MOOJLA_USER_FIELDS_MAP'),
'pencil');
		JHtmlSidebar::setAction('index.php?option=com_moojla&view=user_fields_map');
		JFormHelper::addFieldPath(JPATH_COMPONENT . '/models/fields');

		if ($this->canCreate)
		{
			JToolBarHelper::addNew('user_field_map.add');
		}

		// Only load if there are items
		if (MoojlaHelper::checkArray($this->items))
		{
			if ($this->canEdit)
			{
				JToolBarHelper::editList('user_field_map.edit');
			}

			if ($this->canState)
			{
				JToolBarHelper::publishList('user_fields_map.publish');
				JToolBarHelper::unpublishList('user_fields_map.unpublish');
				JToolBarHelper::archiveList('user_fields_map.archive');

				if ($this->canDo->get('core.admin'))
				{
					JToolBarHelper::checkin('user_fields_map.checkin');
				}
			}

			// Add a batch button
			if ($this->canBatch && $this->canCreate &&
$this->canEdit && $this->canState)
			{
				// Get the toolbar object instance
				$bar = JToolBar::getInstance('toolbar');
				// set the batch button name
				$title = JText::_('JTOOLBAR_BATCH');
				// Instantiate a new JLayoutFile instance and render the batch button
				$layout = new JLayoutFile('joomla.toolbar.batch');
				// add the button to the page
				$dhtml = $layout->render(array('title' => $title));
				$bar->appendButton('Custom', $dhtml, 'batch');
			}

			if ($this->state->get('filter.published') == -2
&& ($this->canState && $this->canDelete))
			{
				JToolbarHelper::deleteList('',
'user_fields_map.delete', 'JTOOLBAR_EMPTY_TRASH');
			}
			elseif ($this->canState && $this->canDelete)
			{
				JToolbarHelper::trash('user_fields_map.trash');
			}
		}

		// set help url for this view if found
		$help_url = MoojlaHelper::getHelpUrl('user_fields_map');
		if (MoojlaHelper::checkString($help_url))
		{
				JToolbarHelper::help('COM_MOOJLA_HELP_MANAGER', false,
$help_url);
		}

		// add the options comp button
		if ($this->canDo->get('core.admin') ||
$this->canDo->get('core.options'))
		{
			JToolBarHelper::preferences('com_moojla');
		}

		// Only load published batch if state and batch is allowed
		if ($this->canState && $this->canBatch)
		{
			JHtmlBatch_::addListSelection(
				JText::_('COM_MOOJLA_KEEP_ORIGINAL_STATE'),
				'batch[published]',
				JHtml::_('select.options',
JHtml::_('jgrid.publishedOptions', array('all' =>
false)), 'value', 'text', '', true)
			);
		}

		// Only load Iscv batch if create, edit, and batch is allowed
		if ($this->canBatch && $this->canCreate &&
$this->canEdit)
		{
			// Set Iscv Selection
			$this->iscvOptions =
JFormHelper::loadFieldType('userfieldsmapfilteriscv')->options;
			// We do some sanitation for Iscv filter
			if (MoojlaHelper::checkArray($this->iscvOptions) &&
				isset($this->iscvOptions[0]->value) &&
				!MoojlaHelper::checkString($this->iscvOptions[0]->value))
			{
				unset($this->iscvOptions[0]);
			}
			// Iscv Batch Selection
			JHtmlBatch_::addListSelection(
				'- Keep Original
'.JText::_('COM_MOOJLA_USER_FIELD_MAP_ISCV_LABEL').'
-',
				'batch[iscv]',
				JHtml::_('select.options', $this->iscvOptions,
'value', 'text')
			);
		}
	}

	/**
	 * Method to set up the document properties
	 *
	 * @return void
	 */
	protected function setDocument()
	{
		if (!isset($this->document))
		{
			$this->document = JFactory::getDocument();
		}
		$this->document->setTitle(JText::_('COM_MOOJLA_USER_FIELDS_MAP'));
		$this->document->addStyleSheet(JURI::root() .
"administrator/components/com_moojla/assets/css/user_fields_map.css",
(MoojlaHelper::jVersion()->isCompatible('3.8.0')) ?
array('version' => 'auto') : 'text/css');
	}

	/**
	 * Escapes a value for output in a view script.
	 *
	 * @param   mixed  $var  The output to escape.
	 *
	 * @return  mixed  The escaped value.
	 */
	public function escape($var)
	{
		if(strlen($var) > 50)
		{
			// use the helper htmlEscape method instead and shorten the string
			return MoojlaHelper::htmlEscape($var, $this->_charset, true);
		}
		// use the helper htmlEscape method instead.
		return MoojlaHelper::htmlEscape($var, $this->_charset);
	}

	/**
	 * Returns an array of fields the table can be sorted by
	 *
	 * @return  array  Array containing the field name to sort by as the key
and display text as value
	 */
	protected function getSortFields()
	{
		return array(
			'a.ordering' =>
JText::_('JGRID_HEADING_ORDERING'),
			'a.published' => JText::_('JSTATUS'),
			'g.name' =>
JText::_('COM_MOOJLA_USER_FIELD_MAP_JUSERFIELDS_LABEL'),
			'h.id' =>
JText::_('COM_MOOJLA_USER_FIELD_MAP_MUSERFIELDS_LABEL'),
			'a.iscv' =>
JText::_('COM_MOOJLA_USER_FIELD_MAP_ISCV_LABEL'),
			'a.id' => JText::_('JGRID_HEADING_ID')
		);
	}
}
user_field_map/submitbutton.js000064400000002753151160405230012623
0ustar00/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				Lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.77
	@build			6th April, 2022
	@created		22nd July, 2020
	@package		Moojla
	@subpackage		submitbutton.js
	@author			Lmskaran <http://Lmskaran.com>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

Joomla.submitbutton = function(task)
{
	if (task == ''){
		return false;
	} else { 
		var action = task.split('.');
		if (action[1] == 'cancel' || action[1] == 'close' ||
document.formvalidator.isValid(document.getElementById("adminForm"))){
			Joomla.submitform(task, document.getElementById("adminForm"));
			return true;
		} else {
			alert(Joomla.JText._('user_field_map, some values are not
acceptable.','Some values are unacceptable'));
			return false;
		}
	}
}user_field_map/tmpl/edit.php000064400000011256151160405230012136
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				Lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.77
	@build			6th April, 2022
	@created		22nd July, 2020
	@package		Moojla
	@subpackage		edit.php
	@author			Lmskaran <http://Lmskaran.com>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html');
JHtml::_('behavior.tooltip');
JHtml::_('behavior.formvalidation');
JHtml::_('formbehavior.chosen', 'select');
JHtml::_('behavior.keepalive');
$componentParams = $this->params; // will be removed just use
$this->params instead
?>
<script type="text/javascript">
	// waiting spinner
	var outerDiv = jQuery('body');
	jQuery('<div id="loading"></div>')
		.css("background", "rgba(255, 255, 255, .8)
url('components/com_moojla/assets/images/import.gif') 50% 15%
no-repeat")
		.css("top", outerDiv.position().top -
jQuery(window).scrollTop())
		.css("left", outerDiv.position().left -
jQuery(window).scrollLeft())
		.css("width", outerDiv.width())
		.css("height", outerDiv.height())
		.css("position", "fixed")
		.css("opacity", "0.80")
		.css("-ms-filter",
"progid:DXImageTransform.Microsoft.Alpha(Opacity = 80)")
		.css("filter", "alpha(opacity = 80)")
		.css("display", "none")
		.appendTo(outerDiv);
	jQuery('#loading').show();
	// when page is ready remove and show
	jQuery(window).load(function() {
		jQuery('#moojla_loader').fadeIn('fast');
		jQuery('#loading').hide();
	});
</script>
<div id="moojla_loader" style="display: none;">
<form action="<?php echo
JRoute::_('index.php?option=com_moojla&layout=edit&id='.
(int) $this->item->id . $this->referral); ?>"
method="post" name="adminForm" id="adminForm"
class="form-validate" enctype="multipart/form-data">

<div class="form-horizontal">

	<?php echo JHtml::_('bootstrap.startTabSet',
'user_field_mapTab', array('active' =>
'details')); ?>

	<?php echo JHtml::_('bootstrap.addTab',
'user_field_mapTab', 'details',
JText::_('COM_MOOJLA_USER_FIELD_MAP_DETAILS', true)); ?>
		<div class="row-fluid form-horizontal-desktop">
			<div class="span12">
				<?php echo
JLayoutHelper::render('user_field_map.details_left', $this);
?>
			</div>
		</div>
	<?php echo JHtml::_('bootstrap.endTab'); ?>

	<?php $this->ignore_fieldsets =
array('details','metadata','vdmmetadata','accesscontrol');
?>
	<?php $this->tab_name = 'user_field_mapTab'; ?>
	<?php echo JLayoutHelper::render('joomla.edit.params',
$this); ?>

	<?php if ($this->canDo->get('core.edit.created_by') ||
$this->canDo->get('core.edit.created') ||
$this->canDo->get('core.edit.state') ||
($this->canDo->get('core.delete') &&
$this->canDo->get('core.edit.state'))) : ?>
	<?php echo JHtml::_('bootstrap.addTab',
'user_field_mapTab', 'publishing',
JText::_('COM_MOOJLA_USER_FIELD_MAP_PUBLISHING', true)); ?>
		<div class="row-fluid form-horizontal-desktop">
			<div class="span6">
				<?php echo
JLayoutHelper::render('user_field_map.publishing', $this); ?>
			</div>
			<div class="span6">
				<?php echo
JLayoutHelper::render('user_field_map.publlshing', $this); ?>
			</div>
		</div>
	<?php echo JHtml::_('bootstrap.endTab'); ?>
	<?php endif; ?>

	<?php if ($this->canDo->get('core.admin')) : ?>
	<?php echo JHtml::_('bootstrap.addTab',
'user_field_mapTab', 'permissions',
JText::_('COM_MOOJLA_USER_FIELD_MAP_PERMISSION', true)); ?>
		<div class="row-fluid form-horizontal-desktop">
			<div class="span12">
				<fieldset class="adminform">
					<div class="adminformlist">
					<?php foreach
($this->form->getFieldset('accesscontrol') as $field):
?>
						<div>
							<?php echo $field->label; echo $field->input;?>
						</div>
						<div class="clearfix"></div>
					<?php endforeach; ?>
					</div>
				</fieldset>
			</div>
		</div>
	<?php echo JHtml::_('bootstrap.endTab'); ?>
	<?php endif; ?>

	<?php echo JHtml::_('bootstrap.endTabSet'); ?>

	<div>
		<input type="hidden" name="task"
value="user_field_map.edit" />
		<?php echo JHtml::_('form.token'); ?>
	</div>
</div>
</form>
</div>
user_field_map/tmpl/index.html000064400000000054151160405230012467
0ustar00<html><body
bgcolor="#FFFFFF"></body></html>user_field_map/view.html.php000064400000016332151160405230012152
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				Lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.77
	@build			6th April, 2022
	@created		22nd July, 2020
	@package		Moojla
	@subpackage		view.html.php
	@author			Lmskaran <http://Lmskaran.com>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

/**
 * User_field_map View class
 */
class MoojlaViewUser_field_map extends JViewLegacy
{
	/**
	 * display method of View
	 * @return void
	 */
	public function display($tpl = null)
	{
		// set params
		$this->params = JComponentHelper::getParams('com_moojla');
		// Assign the variables
		$this->form = $this->get('Form');
		$this->item = $this->get('Item');
		$this->script = $this->get('Script');
		$this->state = $this->get('State');
		// get action permissions
		$this->canDo = MoojlaHelper::getActions('user_field_map',
$this->item);
		// get input
		$jinput = JFactory::getApplication()->input;
		$this->ref = $jinput->get('ref', 0, 'word');
		$this->refid = $jinput->get('refid', 0, 'int');
		$return = $jinput->get('return', null, 'base64');
		// set the referral string
		$this->referral = '';
		if ($this->refid && $this->ref)
		{
			// return to the item that referred to this item
			$this->referral = '&ref=' . (string)$this->ref .
'&refid=' . (int)$this->refid;
		}
		elseif($this->ref)
		{
			// return to the list view that referred to this item
			$this->referral = '&ref=' . (string)$this->ref;
		}
		// check return value
		if (!is_null($return))
		{
			// add the return value
			$this->referral .= '&return=' . (string)$return;
		}

		// Set the toolbar
		$this->addToolBar();
		
		// Check for errors.
		if (count($errors = $this->get('Errors')))
		{
			throw new Exception(implode("\n", $errors), 500);
		}

		// Display the template
		parent::display($tpl);

		// Set the document
		$this->setDocument();
	}


	/**
	 * Setting the toolbar
	 */
	protected function addToolBar()
	{
		JFactory::getApplication()->input->set('hidemainmenu',
true);
		$user = JFactory::getUser();
		$userId	= $user->id;
		$isNew = $this->item->id == 0;

		JToolbarHelper::title( JText::_($isNew ?
'COM_MOOJLA_USER_FIELD_MAP_NEW' :
'COM_MOOJLA_USER_FIELD_MAP_EDIT'), 'pencil-2
article-add');
		// Built the actions for new and existing records.
		if (MoojlaHelper::checkString($this->referral))
		{
			if ($this->canDo->get('core.create') && $isNew)
			{
				// We can create the record.
				JToolBarHelper::save('user_field_map.save',
'JTOOLBAR_SAVE');
			}
			elseif ($this->canDo->get('core.edit'))
			{
				// We can save the record.
				JToolBarHelper::save('user_field_map.save',
'JTOOLBAR_SAVE');
			}
			if ($isNew)
			{
				// Do not creat but cancel.
				JToolBarHelper::cancel('user_field_map.cancel',
'JTOOLBAR_CANCEL');
			}
			else
			{
				// We can close it.
				JToolBarHelper::cancel('user_field_map.cancel',
'JTOOLBAR_CLOSE');
			}
		}
		else
		{
			if ($isNew)
			{
				// For new records, check the create permission.
				if ($this->canDo->get('core.create'))
				{
					JToolBarHelper::apply('user_field_map.apply',
'JTOOLBAR_APPLY');
					JToolBarHelper::save('user_field_map.save',
'JTOOLBAR_SAVE');
					JToolBarHelper::custom('user_field_map.save2new',
'save-new.png', 'save-new_f2.png',
'JTOOLBAR_SAVE_AND_NEW', false);
				};
				JToolBarHelper::cancel('user_field_map.cancel',
'JTOOLBAR_CANCEL');
			}
			else
			{
				if ($this->canDo->get('core.edit'))
				{
					// We can save the new record
					JToolBarHelper::apply('user_field_map.apply',
'JTOOLBAR_APPLY');
					JToolBarHelper::save('user_field_map.save',
'JTOOLBAR_SAVE');
					// We can save this record, but check the create permission to see
					// if we can return to make a new one.
					if ($this->canDo->get('core.create'))
					{
						JToolBarHelper::custom('user_field_map.save2new',
'save-new.png', 'save-new_f2.png',
'JTOOLBAR_SAVE_AND_NEW', false);
					}
				}
				$canVersion = ($this->canDo->get('core.version')
&& $this->canDo->get('user_field_map.version'));
				if ($this->state->params->get('save_history', 1)
&& $this->canDo->get('core.edit') &&
$canVersion)
				{
					JToolbarHelper::versions('com_moojla.user_field_map',
$this->item->id);
				}
				if ($this->canDo->get('core.create'))
				{
					JToolBarHelper::custom('user_field_map.save2copy',
'save-copy.png', 'save-copy_f2.png',
'JTOOLBAR_SAVE_AS_COPY', false);
				}
				JToolBarHelper::cancel('user_field_map.cancel',
'JTOOLBAR_CLOSE');
			}
		}
		JToolbarHelper::divider();
		// set help url for this view if found
		$help_url = MoojlaHelper::getHelpUrl('user_field_map');
		if (MoojlaHelper::checkString($help_url))
		{
			JToolbarHelper::help('COM_MOOJLA_HELP_MANAGER', false,
$help_url);
		}
	}

	/**
	 * Escapes a value for output in a view script.
	 *
	 * @param   mixed  $var  The output to escape.
	 *
	 * @return  mixed  The escaped value.
	 */
	public function escape($var)
	{
		if(strlen($var) > 30)
		{
    		// use the helper htmlEscape method instead and shorten the string
			return MoojlaHelper::htmlEscape($var, $this->_charset, true, 30);
		}
		// use the helper htmlEscape method instead.
		return MoojlaHelper::htmlEscape($var, $this->_charset);
	}

	/**
	 * Method to set up the document properties
	 *
	 * @return void
	 */
	protected function setDocument()
	{
		$isNew = ($this->item->id < 1);
		if (!isset($this->document))
		{
			$this->document = JFactory::getDocument();
		}
		$this->document->setTitle(JText::_($isNew ?
'COM_MOOJLA_USER_FIELD_MAP_NEW' :
'COM_MOOJLA_USER_FIELD_MAP_EDIT'));
		$this->document->addStyleSheet(JURI::root() .
"administrator/components/com_moojla/assets/css/user_field_map.css",
(MoojlaHelper::jVersion()->isCompatible('3.8.0')) ?
array('version' => 'auto') : 'text/css');
		// Add Ajax Token
		$this->document->addScriptDeclaration("var token =
'".JSession::getFormToken()."';");
		$this->document->addScript(JURI::root() . $this->script,
(MoojlaHelper::jVersion()->isCompatible('3.8.0')) ?
array('version' => 'auto') :
'text/javascript');
		$this->document->addScript(JURI::root() .
"administrator/components/com_moojla/views/user_field_map/submitbutton.js",
(MoojlaHelper::jVersion()->isCompatible('3.8.0')) ?
array('version' => 'auto') :
'text/javascript'); 

/***[JCBGUI.admin_view.php_document.134.$$$$]***/
    $getMethodsAjaxRoute=
JRoute::_('index.php?option=com_moojla', false);
   
$this->document->addScriptOptions('route',$getMethodsAjaxRoute);
   
$this->document->addScriptOptions('token',JFactory::getSession()->getFormToken());
/***[/JCBGUI$$$$]***/

		JText::script('view not acceptable. Error');
	}
}
user_map/submitbutton.js000064400000002745151160405230011461
0ustar00/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				Lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.77
	@build			6th April, 2022
	@created		22nd July, 2020
	@package		Moojla
	@subpackage		submitbutton.js
	@author			Lmskaran <http://Lmskaran.com>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

Joomla.submitbutton = function(task)
{
	if (task == ''){
		return false;
	} else { 
		var action = task.split('.');
		if (action[1] == 'cancel' || action[1] == 'close' ||
document.formvalidator.isValid(document.getElementById("adminForm"))){
			Joomla.submitform(task, document.getElementById("adminForm"));
			return true;
		} else {
			alert(Joomla.JText._('user_map, some values are not
acceptable.','Some values are unacceptable'));
			return false;
		}
	}
}user_map/tmpl/edit.php000064400000011320151160405230010763
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				Lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.77
	@build			6th April, 2022
	@created		22nd July, 2020
	@package		Moojla
	@subpackage		edit.php
	@author			Lmskaran <http://Lmskaran.com>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html');
JHtml::_('behavior.tooltip');
JHtml::_('behavior.formvalidation');
JHtml::_('formbehavior.chosen', 'select');
JHtml::_('behavior.keepalive');
$componentParams = $this->params; // will be removed just use
$this->params instead
?>
<script type="text/javascript">
	// waiting spinner
	var outerDiv = jQuery('body');
	jQuery('<div id="loading"></div>')
		.css("background", "rgba(255, 255, 255, .8)
url('components/com_moojla/assets/images/import.gif') 50% 15%
no-repeat")
		.css("top", outerDiv.position().top -
jQuery(window).scrollTop())
		.css("left", outerDiv.position().left -
jQuery(window).scrollLeft())
		.css("width", outerDiv.width())
		.css("height", outerDiv.height())
		.css("position", "fixed")
		.css("opacity", "0.80")
		.css("-ms-filter",
"progid:DXImageTransform.Microsoft.Alpha(Opacity = 80)")
		.css("filter", "alpha(opacity = 80)")
		.css("display", "none")
		.appendTo(outerDiv);
	jQuery('#loading').show();
	// when page is ready remove and show
	jQuery(window).load(function() {
		jQuery('#moojla_loader').fadeIn('fast');
		jQuery('#loading').hide();
	});
</script>
<div id="moojla_loader" style="display: none;">
<form action="<?php echo
JRoute::_('index.php?option=com_moojla&layout=edit&id='.
(int) $this->item->id . $this->referral); ?>"
method="post" name="adminForm" id="adminForm"
class="form-validate" enctype="multipart/form-data">

<div class="form-horizontal">

	<?php echo JHtml::_('bootstrap.startTabSet',
'user_mapTab', array('active' =>
'details')); ?>

	<?php echo JHtml::_('bootstrap.addTab',
'user_mapTab', 'details',
JText::_('COM_MOOJLA_USER_MAP_DETAILS', true)); ?>
		<div class="row-fluid form-horizontal-desktop">
			<div class="span6">
				<?php echo JLayoutHelper::render('user_map.details_left',
$this); ?>
			</div>
			<div class="span6">
				<?php echo JLayoutHelper::render('user_map.details_right',
$this); ?>
			</div>
		</div>
	<?php echo JHtml::_('bootstrap.endTab'); ?>

	<?php $this->ignore_fieldsets =
array('details','metadata','vdmmetadata','accesscontrol');
?>
	<?php $this->tab_name = 'user_mapTab'; ?>
	<?php echo JLayoutHelper::render('joomla.edit.params',
$this); ?>

	<?php if ($this->canDo->get('core.edit.created_by') ||
$this->canDo->get('core.edit.created') ||
$this->canDo->get('core.edit.state') ||
($this->canDo->get('core.delete') &&
$this->canDo->get('core.edit.state'))) : ?>
	<?php echo JHtml::_('bootstrap.addTab',
'user_mapTab', 'publishing',
JText::_('COM_MOOJLA_USER_MAP_PUBLISHING', true)); ?>
		<div class="row-fluid form-horizontal-desktop">
			<div class="span6">
				<?php echo JLayoutHelper::render('user_map.publishing',
$this); ?>
			</div>
			<div class="span6">
				<?php echo JLayoutHelper::render('user_map.publlshing',
$this); ?>
			</div>
		</div>
	<?php echo JHtml::_('bootstrap.endTab'); ?>
	<?php endif; ?>

	<?php if ($this->canDo->get('core.admin')) : ?>
	<?php echo JHtml::_('bootstrap.addTab',
'user_mapTab', 'permissions',
JText::_('COM_MOOJLA_USER_MAP_PERMISSION', true)); ?>
		<div class="row-fluid form-horizontal-desktop">
			<div class="span12">
				<fieldset class="adminform">
					<div class="adminformlist">
					<?php foreach
($this->form->getFieldset('accesscontrol') as $field):
?>
						<div>
							<?php echo $field->label; echo $field->input;?>
						</div>
						<div class="clearfix"></div>
					<?php endforeach; ?>
					</div>
				</fieldset>
			</div>
		</div>
	<?php echo JHtml::_('bootstrap.endTab'); ?>
	<?php endif; ?>

	<?php echo JHtml::_('bootstrap.endTabSet'); ?>

	<div>
		<input type="hidden" name="task"
value="user_map.edit" />
		<?php echo JHtml::_('form.token'); ?>
	</div>
</div>
</form>
</div>
user_map/tmpl/index.html000064400000000054151160405230011324
0ustar00<html><body
bgcolor="#FFFFFF"></body></html>user_map/view.html.php000064400000015420151160405230011004
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				Lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.77
	@build			6th April, 2022
	@created		22nd July, 2020
	@package		Moojla
	@subpackage		view.html.php
	@author			Lmskaran <http://Lmskaran.com>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

/**
 * User_map View class
 */
class MoojlaViewUser_map extends JViewLegacy
{
	/**
	 * display method of View
	 * @return void
	 */
	public function display($tpl = null)
	{
		// set params
		$this->params = JComponentHelper::getParams('com_moojla');
		// Assign the variables
		$this->form = $this->get('Form');
		$this->item = $this->get('Item');
		$this->script = $this->get('Script');
		$this->state = $this->get('State');
		// get action permissions
		$this->canDo = MoojlaHelper::getActions('user_map',
$this->item);
		// get input
		$jinput = JFactory::getApplication()->input;
		$this->ref = $jinput->get('ref', 0, 'word');
		$this->refid = $jinput->get('refid', 0, 'int');
		$return = $jinput->get('return', null, 'base64');
		// set the referral string
		$this->referral = '';
		if ($this->refid && $this->ref)
		{
			// return to the item that referred to this item
			$this->referral = '&ref=' . (string)$this->ref .
'&refid=' . (int)$this->refid;
		}
		elseif($this->ref)
		{
			// return to the list view that referred to this item
			$this->referral = '&ref=' . (string)$this->ref;
		}
		// check return value
		if (!is_null($return))
		{
			// add the return value
			$this->referral .= '&return=' . (string)$return;
		}

		// Set the toolbar
		$this->addToolBar();
		
		// Check for errors.
		if (count($errors = $this->get('Errors')))
		{
			throw new Exception(implode("\n", $errors), 500);
		}

		// Display the template
		parent::display($tpl);

		// Set the document
		$this->setDocument();
	}


	/**
	 * Setting the toolbar
	 */
	protected function addToolBar()
	{
		JFactory::getApplication()->input->set('hidemainmenu',
true);
		$user = JFactory::getUser();
		$userId	= $user->id;
		$isNew = $this->item->id == 0;

		JToolbarHelper::title( JText::_($isNew ?
'COM_MOOJLA_USER_MAP_NEW' :
'COM_MOOJLA_USER_MAP_EDIT'), 'pencil-2 article-add');
		// Built the actions for new and existing records.
		if (MoojlaHelper::checkString($this->referral))
		{
			if ($this->canDo->get('core.create') && $isNew)
			{
				// We can create the record.
				JToolBarHelper::save('user_map.save',
'JTOOLBAR_SAVE');
			}
			elseif ($this->canDo->get('core.edit'))
			{
				// We can save the record.
				JToolBarHelper::save('user_map.save',
'JTOOLBAR_SAVE');
			}
			if ($isNew)
			{
				// Do not creat but cancel.
				JToolBarHelper::cancel('user_map.cancel',
'JTOOLBAR_CANCEL');
			}
			else
			{
				// We can close it.
				JToolBarHelper::cancel('user_map.cancel',
'JTOOLBAR_CLOSE');
			}
		}
		else
		{
			if ($isNew)
			{
				// For new records, check the create permission.
				if ($this->canDo->get('core.create'))
				{
					JToolBarHelper::apply('user_map.apply',
'JTOOLBAR_APPLY');
					JToolBarHelper::save('user_map.save',
'JTOOLBAR_SAVE');
					JToolBarHelper::custom('user_map.save2new',
'save-new.png', 'save-new_f2.png',
'JTOOLBAR_SAVE_AND_NEW', false);
				};
				JToolBarHelper::cancel('user_map.cancel',
'JTOOLBAR_CANCEL');
			}
			else
			{
				if ($this->canDo->get('core.edit'))
				{
					// We can save the new record
					JToolBarHelper::apply('user_map.apply',
'JTOOLBAR_APPLY');
					JToolBarHelper::save('user_map.save',
'JTOOLBAR_SAVE');
					// We can save this record, but check the create permission to see
					// if we can return to make a new one.
					if ($this->canDo->get('core.create'))
					{
						JToolBarHelper::custom('user_map.save2new',
'save-new.png', 'save-new_f2.png',
'JTOOLBAR_SAVE_AND_NEW', false);
					}
				}
				$canVersion = ($this->canDo->get('core.version')
&& $this->canDo->get('user_map.version'));
				if ($this->state->params->get('save_history', 1)
&& $this->canDo->get('core.edit') &&
$canVersion)
				{
					JToolbarHelper::versions('com_moojla.user_map',
$this->item->id);
				}
				if ($this->canDo->get('core.create'))
				{
					JToolBarHelper::custom('user_map.save2copy',
'save-copy.png', 'save-copy_f2.png',
'JTOOLBAR_SAVE_AS_COPY', false);
				}
				JToolBarHelper::cancel('user_map.cancel',
'JTOOLBAR_CLOSE');
			}
		}
		JToolbarHelper::divider();
		// set help url for this view if found
		$help_url = MoojlaHelper::getHelpUrl('user_map');
		if (MoojlaHelper::checkString($help_url))
		{
			JToolbarHelper::help('COM_MOOJLA_HELP_MANAGER', false,
$help_url);
		}
	}

	/**
	 * Escapes a value for output in a view script.
	 *
	 * @param   mixed  $var  The output to escape.
	 *
	 * @return  mixed  The escaped value.
	 */
	public function escape($var)
	{
		if(strlen($var) > 30)
		{
    		// use the helper htmlEscape method instead and shorten the string
			return MoojlaHelper::htmlEscape($var, $this->_charset, true, 30);
		}
		// use the helper htmlEscape method instead.
		return MoojlaHelper::htmlEscape($var, $this->_charset);
	}

	/**
	 * Method to set up the document properties
	 *
	 * @return void
	 */
	protected function setDocument()
	{
		$isNew = ($this->item->id < 1);
		if (!isset($this->document))
		{
			$this->document = JFactory::getDocument();
		}
		$this->document->setTitle(JText::_($isNew ?
'COM_MOOJLA_USER_MAP_NEW' :
'COM_MOOJLA_USER_MAP_EDIT'));
		$this->document->addStyleSheet(JURI::root() .
"administrator/components/com_moojla/assets/css/user_map.css",
(MoojlaHelper::jVersion()->isCompatible('3.8.0')) ?
array('version' => 'auto') : 'text/css');
		// Add Ajax Token
		$this->document->addScriptDeclaration("var token =
'".JSession::getFormToken()."';");
		$this->document->addScript(JURI::root() . $this->script,
(MoojlaHelper::jVersion()->isCompatible('3.8.0')) ?
array('version' => 'auto') :
'text/javascript');
		$this->document->addScript(JURI::root() .
"administrator/components/com_moojla/views/user_map/submitbutton.js",
(MoojlaHelper::jVersion()->isCompatible('3.8.0')) ?
array('version' => 'auto') :
'text/javascript'); 
		JText::script('view not acceptable. Error');
	}
}
user_maps/index.html000064400000000054151160405230010533
0ustar00<html><body
bgcolor="#FFFFFF"></body></html>user_maps/tmpl/default.php000064400000007422151160405240011656
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				Lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.77
	@build			6th April, 2022
	@created		22nd July, 2020
	@package		Moojla
	@subpackage		default.php
	@author			Lmskaran <http://Lmskaran.com>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

JHtml::_('behavior.tooltip');
JHtml::_('behavior.multiselect');
JHtml::_('dropdown.init');
JHtml::_('formbehavior.chosen', 'select');
if ($this->saveOrder)
{
	$saveOrderingUrl =
'index.php?option=com_moojla&task=user_maps.saveOrderAjax&tmpl=component';
	JHtml::_('sortablelist.sortable', 'user_mapList',
'adminForm', strtolower($this->listDirn), $saveOrderingUrl);
}
?>
<form action="<?php echo
JRoute::_('index.php?option=com_moojla&view=user_maps');
?>" method="post" name="adminForm"
id="adminForm">
<?php if(!empty( $this->sidebar)): ?>
	<div id="j-sidebar-container" class="span2">
		<?php echo $this->sidebar; ?>
	</div>
	<div id="j-main-container" class="span10">
<?php else : ?>
	<div id="j-main-container">
<?php endif; ?>
<?php
	// Add the searchtools
	echo JLayoutHelper::render('joomla.searchtools.default',
array('view' => $this));
?>
<?php if (empty($this->items)): ?>
	<div class="alert alert-no-items">
		<?php echo JText::_('JGLOBAL_NO_MATCHING_RESULTS'); ?>
	</div>
<?php else : ?>
	<table class="table table-striped"
id="user_mapList">
		<thead><?php echo
$this->loadTemplate('head');?></thead>
		<tfoot><?php echo
$this->loadTemplate('foot');?></tfoot>
		<tbody><?php echo
$this->loadTemplate('body');?></tbody>
	</table>
	<?php // Load the batch processing form. ?>
	<?php if ($this->canCreate && $this->canEdit) : ?>
		<?php echo JHtml::_(
			'bootstrap.renderModal',
			'collapseModal',
			array(
				'title' =>
JText::_('COM_MOOJLA_USER_MAPS_BATCH_OPTIONS'),
				'footer' =>
$this->loadTemplate('batch_footer')
			),
			$this->loadTemplate('batch_body')
		); ?>
	<?php endif; ?>
	<input type="hidden" name="boxchecked"
value="0" />
	</div>
<?php endif; ?>
	<input type="hidden" name="task" value=""
/>
	<?php echo JHtml::_('form.token'); ?>
</form>
<script type="text/javascript">
// user_maps footer script
/***[JCBGUI.admin_view.javascript_views_footer.130.$$$$]***/
jQuery(document).on("click", "a[id^=check_]",
function(e) {
  var obj;
  obj = e;
  console.log(e);
  e.preventDefault();
  jQuery.ajax({
    url:
"index.php?option=com_moojla&view=user_maps&task=user_maps.checkMoodleUser&cid="
+ e.target.get("data"),
    beforeSend: function( xhr ) {
      console.log('beforeSend');
      console.log(xhr);
    }
  }).done(function(e) {
    console.log('done');
    res = JSON.decode(e);
    if(res.warnings.length != 0) {
      console.log(res.warnings[0].message);
      obj.target.parentElement.innerHTML = '<div
style="color:red;">' + res.warnings[0].message +
"</div>";
      console.log(this)
    } else {
      obj.target.parentElement.innerHTML = '<div
style="color:yellow;">Moodle account status is
OK</div>';
    }
  });
  
  
});
/***[/JCBGUI$$$$]***/

</script>
user_maps/tmpl/default_batch_body.php000064400000002334151160405240014031
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				Lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.77
	@build			6th April, 2022
	@created		22nd July, 2020
	@package		Moojla
	@subpackage		default_batch_body.php
	@author			Lmskaran <http://Lmskaran.com>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

?>

<p><?php echo
JText::_('COM_MOOJLA_USER_MAPS_BATCH_TIP'); ?></p>
<?php echo $this->batchDisplay;
?>user_maps/tmpl/default_batch_footer.php000064400000002732151160405240014374
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				Lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.77
	@build			6th April, 2022
	@created		22nd July, 2020
	@package		Moojla
	@subpackage		default_batch_footer.php
	@author			Lmskaran <http://Lmskaran.com>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

?>
<!-- clear the batch values if cancel -->
<button class="btn" type="button"
onclick="" data-dismiss="modal">
	<?php echo JText::_('JCANCEL'); ?>
</button>
<!-- post the batch values if process -->
<button class="btn btn-success" type="submit"
onclick="Joomla.submitbutton('user_map.batch');">
	<?php echo JText::_('JGLOBAL_BATCH_PROCESS'); ?>
</button>user_maps/tmpl/default_body.php000064400000011040151160405240012662
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				Lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.77
	@build			6th April, 2022
	@created		22nd July, 2020
	@package		Moojla
	@subpackage		default_body.php
	@author			Lmskaran <http://Lmskaran.com>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

$edit =
"index.php?option=com_moojla&view=user_maps&task=user_map.edit";

?>
<?php foreach ($this->items as $i => $item): ?>
	<?php
		$canCheckin = $this->user->authorise('core.manage',
'com_checkin') || $item->checked_out == $this->user->id
|| $item->checked_out == 0;
		$userChkOut = JFactory::getUser($item->checked_out);
		$canDo =
MoojlaHelper::getActions('user_map',$item,'user_maps');
	?>
	<tr class="row<?php echo $i % 2; ?>">
		<td class="order nowrap center hidden-phone">
		<?php if ($canDo->get('core.edit.state')): ?>
			<?php
				$iconClass = '';
				if (!$this->saveOrder)
				{
					$iconClass = ' inactive tip-top" hasTooltip"
title="' . JHtml::tooltipText('JORDERINGDISABLED');
				}
			?>
			<span class="sortable-handler<?php echo $iconClass;
?>">
				<i class="icon-menu"></i>
			</span>
			<?php if ($this->saveOrder) : ?>
				<input type="text" style="display:none"
name="order[]" size="5"
				value="<?php echo $item->ordering; ?>"
class="width-20 text-area-order " />
			<?php endif; ?>
		<?php else: ?>
			&#8942;
		<?php endif; ?>
		</td>
		<td class="nowrap center">
		<?php if ($canDo->get('core.edit')): ?>
				<?php if ($item->checked_out) : ?>
					<?php if ($canCheckin) : ?>
						<?php echo JHtml::_('grid.id', $i, $item->id); ?>
					<?php else: ?>
						&#9633;
					<?php endif; ?>
				<?php else: ?>
					<?php echo JHtml::_('grid.id', $i, $item->id); ?>
				<?php endif; ?>
		<?php else: ?>
			&#9633;
		<?php endif; ?>
		</td>
		<td class="nowrap">
			<div class="name">
				<?php if ($canDo->get('core.edit')): ?>
					<a href="<?php echo $edit; ?>&id=<?php echo
$item->id; ?>"><?php echo
JFactory::getUser((int)$item->jid)->name; ?></a>
					<?php if ($item->checked_out): ?>
						<?php echo JHtml::_('jgrid.checkedout', $i,
$userChkOut->name, $item->checked_out_time, 'user_maps.',
$canCheckin); ?>
					<?php endif; ?>
				<?php else: ?>
					<?php echo JFactory::getUser((int)$item->jid)->name; ?>
				<?php endif; ?>
			</div>
		</td>
		<td class="hidden-phone">
			<?php echo $this->escape($item->mid); ?>
		</td>
		<td class="hidden-phone">
			<?php echo $item->userimage; ?>
		</td>
		<td class="hidden-phone">
			<div><?php
	if($item->mid != 0 && $item->jid != 0)
	{
		echo "<div style='color: green;'>completely
synced</div>";
	}
	else if($item->jid == 0)
	{
		echo "Joomla user not exist<br><div
id='div_{$item->id}'>please select this row and press
'Sync to Joomla'<br>If this not work click <a
id='check_{$item->id}' href='#'
data='$item->mid'>this</a> to identify what's
wrong</div>";
	}
	else
	{
		echo "Moodle user not exist<br>please select this row and
press 'Sync to Moodle'<br>If this not work click <a
href='#'>this</a> to identify what's wrong";
	}
?>
			</div>
		</td>
		<td class="center">
		<?php if ($canDo->get('core.edit.state')) : ?>
				<?php if ($item->checked_out) : ?>
					<?php if ($canCheckin) : ?>
						<?php echo JHtml::_('jgrid.published',
$item->published, $i, 'user_maps.', true, 'cb');
?>
					<?php else: ?>
						<?php echo JHtml::_('jgrid.published',
$item->published, $i, 'user_maps.', false, 'cb');
?>
					<?php endif; ?>
				<?php else: ?>
					<?php echo JHtml::_('jgrid.published',
$item->published, $i, 'user_maps.', true, 'cb');
?>
				<?php endif; ?>
		<?php else: ?>
			<?php echo JHtml::_('jgrid.published', $item->published,
$i, 'user_maps.', false, 'cb'); ?>
		<?php endif; ?>
		</td>
		<td class="nowrap center hidden-phone">
			<?php echo $item->id; ?>
		</td>
	</tr>
<?php endforeach;
?>user_maps/tmpl/default_foot.php000064400000002304151160405240012677
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				Lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.77
	@build			6th April, 2022
	@created		22nd July, 2020
	@package		Moojla
	@subpackage		default_foot.php
	@author			Lmskaran <http://Lmskaran.com>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

?>
<tr>
	<td colspan="8"><?php echo
$this->pagination->getListFooter(); ?></td>
</tr>user_maps/tmpl/default_head.php000064400000005233151160405240012635
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				Lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.77
	@build			6th April, 2022
	@created		22nd July, 2020
	@package		Moojla
	@subpackage		default_head.php
	@author			Lmskaran <http://Lmskaran.com>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

?>
<tr>
	<?php if ($this->canEdit&& $this->canState): ?>
		<th width="1%" class="nowrap center
hidden-phone">
			<?php echo JHtml::_('searchtools.sort', '',
'a.ordering', $this->listDirn, $this->listOrder, null,
'asc', 'JGRID_HEADING_ORDERING',
'icon-menu-2'); ?>
		</th>
		<th width="20" class="nowrap center">
			<?php echo JHtml::_('grid.checkall'); ?>
		</th>
	<?php else: ?>
		<th width="20" class="nowrap center
hidden-phone">
			&#9662;
		</th>
		<th width="20" class="nowrap center">
			&#9632;
		</th>
	<?php endif; ?>
	<th class="nowrap" >
			<?php echo JHtml::_('searchtools.sort',
'COM_MOOJLA_USER_MAP_JID_LABEL', 'a.jid',
$this->listDirn, $this->listOrder); ?>
	</th>
	<th class="nowrap hidden-phone" >
			<?php echo JHtml::_('searchtools.sort',
'COM_MOOJLA_USER_MAP_MID_LABEL', 'a.mid',
$this->listDirn, $this->listOrder); ?>
	</th>
	<th class="nowrap hidden-phone" >
			<?php echo JText::_('COM_MOOJLA_USER_MAP_USERIMAGE_LABEL');
?>
	</th>
	<th class="nowrap hidden-phone" >
			<?php echo JText::_('COM_MOOJLA_USER_MAP_DEBUG'); ?>
	</th>
	<?php if ($this->canState): ?>
		<th width="10" class="nowrap center" >
			<?php echo JHtml::_('searchtools.sort',
'COM_MOOJLA_USER_MAP_STATUS', 'a.published',
$this->listDirn, $this->listOrder); ?>
		</th>
	<?php else: ?>
		<th width="10" class="nowrap center" >
			<?php echo JText::_('COM_MOOJLA_USER_MAP_STATUS'); ?>
		</th>
	<?php endif; ?>
	<th width="5" class="nowrap center hidden-phone"
>
			<?php echo JHtml::_('searchtools.sort',
'COM_MOOJLA_USER_MAP_ID', 'a.id', $this->listDirn,
$this->listOrder); ?>
	</th>
</tr>user_maps/tmpl/default_toolbar.php000064400000007054151160405240013401
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				Lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.77
	@build			6th April, 2022
	@created		22nd July, 2020
	@package		Moojla
	@subpackage		default_toolbar.php
	@author			Lmskaran <http://Lmskaran.com>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

?>
<div id="filter-bar" class="btn-toolbar">
        <div class="filter-search btn-group pull-left">
            <label for="filter_search"
class="element-invisible"><?php echo
JText::_('Search');?></label>
            <input type="text" name="filter_search"
id="filter_search" placeholder="<?php echo
JText::_('JSEARCH_FILTER'); ?>" value="<?php echo
$this->escape($this->state->get('filter.search'));
?>" class="hasTooltip" title="<?php echo
JHtml::tooltipText('Search User_maps'); ?>" />
        </div>
        <div class="btn-group pull-left">
            <button type="submit" class="btn
hasTooltip" title="<?php echo
JHtml::tooltipText('JSEARCH_FILTER_SUBMIT'); ?>"><i
class="icon-search"></i></button>
            <button type="button" class="btn
hasTooltip" title="<?php echo
JHtml::tooltipText('JSEARCH_FILTER_CLEAR'); ?>"
onclick="document.id('filter_search').value='';this.form.submit();"><i
class="icon-remove"></i></button>
        </div>
        <div class="btn-group pull-right hidden-phone">
            <label for="limit"
class="element-invisible"><?php echo
JText::_('JFIELD_PLG_SEARCH_SEARCHLIMIT_DESC');?></label>
            <?php echo $this->pagination->getLimitBox(); ?>
        </div>
        <div class="btn-group pull-right hidden-phone">
            <label for="directionTable"
class="element-invisible"><?php echo
JText::_('JFIELD_ORDERING_DESC');?></label>
            <select name="directionTable"
id="directionTable" class="input-medium"
onchange="Joomla.orderTable()">
                <option value=""><?php echo
JText::_('JFIELD_ORDERING_DESC');?></option>
                <option value="asc" <?php if
($this->listDirn == 'asc') echo
'selected="selected"'; ?>><?php echo
JText::_('JGLOBAL_ORDER_ASCENDING');?></option>
                <option value="desc" <?php if
($this->listDirn == 'desc') echo
'selected="selected"'; ?>><?php echo
JText::_('JGLOBAL_ORDER_DESCENDING');?></option>
            </select>
        </div>
        <div class="btn-group pull-right">
            <label for="sortTable"
class="element-invisible"><?php echo
JText::_('JGLOBAL_SORT_BY');?></label>
            <select name="sortTable" id="sortTable"
class="input-medium" onchange="Joomla.orderTable()">
                <option value=""><?php echo
JText::_('JGLOBAL_SORT_BY');?></option>
                <?php echo JHtml::_('select.options',
$this->getSortFields(), 'value', 'text',
$this->listOrder);?>
            </select>
        </div>
    </div>
<div class="clearfix">
</div>user_maps/tmpl/index.html000064400000000054151160405240011510
0ustar00<html><body
bgcolor="#FFFFFF"></body></html>user_maps/view.html.php000064400000020134151160405240011166
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				Lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.77
	@build			6th April, 2022
	@created		22nd July, 2020
	@package		Moojla
	@subpackage		view.html.php
	@author			Lmskaran <http://Lmskaran.com>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

/**
 * Moojla View class for the User_maps
 */
class MoojlaViewUser_maps extends JViewLegacy
{
	/**
	 * User_maps view display method
	 * @return void
	 */
	function display($tpl = null)
	{
		if ($this->getLayout() !== 'modal')
		{
			// Include helper submenu
			MoojlaHelper::addSubmenu('user_maps');
		}

		// Assign data to the view
		$this->items = $this->get('Items');
		$this->pagination = $this->get('Pagination');
		$this->state = $this->get('State');
		$this->user = JFactory::getUser();
		// Load the filter form from xml.
		$this->filterForm = $this->get('FilterForm');
		// Load the active filters.
		$this->activeFilters = $this->get('ActiveFilters');
		// Add the list ordering clause.
		$this->listOrder =
$this->escape($this->state->get('list.ordering',
'a.id'));
		$this->listDirn =
$this->escape($this->state->get('list.direction',
'DESC'));
		$this->saveOrder = $this->listOrder == 'a.ordering';
		// set the return here value
		$this->return_here = urlencode(base64_encode((string)
JUri::getInstance()));
		// get global action permissions
		$this->canDo = MoojlaHelper::getActions('user_map');
		$this->canEdit = $this->canDo->get('core.edit');
		$this->canState =
$this->canDo->get('core.edit.state');
		$this->canCreate = $this->canDo->get('core.create');
		$this->canDelete = $this->canDo->get('core.delete');
		$this->canBatch = $this->canDo->get('core.batch');

		// We don't need toolbar in the modal window.
		if ($this->getLayout() !== 'modal')
		{
			$this->addToolbar();
			$this->sidebar = JHtmlSidebar::render();
			// load the batch html
			if ($this->canCreate && $this->canEdit &&
$this->canState)
			{
				$this->batchDisplay = JHtmlBatch_::render();
			}
		}
		
		// Check for errors.
		if (count($errors = $this->get('Errors')))
		{
			throw new Exception(implode("\n", $errors), 500);
		}

		// Display the template
		parent::display($tpl);

		// Set the document
		$this->setDocument();
	}

	/**
	 * Setting the toolbar
	 */
	protected function addToolBar()
	{
		JToolBarHelper::title(JText::_('COM_MOOJLA_USER_MAPS'),
'contract');
		JHtmlSidebar::setAction('index.php?option=com_moojla&view=user_maps');
		JFormHelper::addFieldPath(JPATH_COMPONENT . '/models/fields');

		if ($this->canCreate)
		{
			JToolBarHelper::addNew('user_map.add');
		}

		// Only load if there are items
		if (MoojlaHelper::checkArray($this->items))
		{
			if ($this->canEdit)
			{
				JToolBarHelper::editList('user_map.edit');
			}

			if ($this->canState)
			{
				JToolBarHelper::publishList('user_maps.publish');
				JToolBarHelper::unpublishList('user_maps.unpublish');
				JToolBarHelper::archiveList('user_maps.archive');

				if ($this->canDo->get('core.admin'))
				{
					JToolBarHelper::checkin('user_maps.checkin');
				}
			}

			// Add a batch button
			if ($this->canBatch && $this->canCreate &&
$this->canEdit && $this->canState)
			{
				// Get the toolbar object instance
				$bar = JToolBar::getInstance('toolbar');
				// set the batch button name
				$title = JText::_('JTOOLBAR_BATCH');
				// Instantiate a new JLayoutFile instance and render the batch button
				$layout = new JLayoutFile('joomla.toolbar.batch');
				// add the button to the page
				$dhtml = $layout->render(array('title' => $title));
				$bar->appendButton('Custom', $dhtml, 'batch');
			}
			if ($this->user->authorise('user_map.sync_to_moodle',
'com_moojla'))
			{
				// add Sync to Moodle button.
				JToolBarHelper::custom('user_maps.syncToMoodle', 'upload
custom-button-synctomoodle', '',
'COM_MOOJLA_SYNC_TO_MOODLE', 'true');
			}
			if ($this->user->authorise('user_map.sync_to_joomla',
'com_moojla'))
			{
				// add Sync to Joomla button.
				JToolBarHelper::custom('user_maps.syncToJoomla',
'download custom-button-synctojoomla', '',
'COM_MOOJLA_SYNC_TO_JOOMLA', 'true');
			}

			if ($this->state->get('filter.published') == -2
&& ($this->canState && $this->canDelete))
			{
				JToolbarHelper::deleteList('', 'user_maps.delete',
'JTOOLBAR_EMPTY_TRASH');
			}
			elseif ($this->canState && $this->canDelete)
			{
				JToolbarHelper::trash('user_maps.trash');
			}

			if ($this->canDo->get('core.export') &&
$this->canDo->get('user_map.export'))
			{
				JToolBarHelper::custom('user_maps.exportData',
'download', '', 'COM_MOOJLA_EXPORT_DATA',
true);
			}
		}
		if ($this->user->authorise('user_map.fetch_moodle_users',
'com_moojla'))
		{
			// add Fetch Moodle Users button.
			JToolBarHelper::custom('user_maps.fetchMoodleUsers',
'arrow-down-2 custom-button-fetchmoodleusers', '',
'COM_MOOJLA_FETCH_MOODLE_USERS', false);
		}
		if ($this->user->authorise('user_map.fetch_joomla_users',
'com_moojla'))
		{
			// add Fetch Joomla Users button.
			JToolBarHelper::custom('user_maps.fetchJoomlaUsers',
'users custom-button-fetchjoomlausers', '',
'COM_MOOJLA_FETCH_JOOMLA_USERS', false);
		}

		if ($this->canDo->get('core.import') &&
$this->canDo->get('user_map.import'))
		{
			JToolBarHelper::custom('user_maps.importData',
'upload', '', 'COM_MOOJLA_IMPORT_DATA',
false);
		}

		// set help url for this view if found
		$help_url = MoojlaHelper::getHelpUrl('user_maps');
		if (MoojlaHelper::checkString($help_url))
		{
				JToolbarHelper::help('COM_MOOJLA_HELP_MANAGER', false,
$help_url);
		}

		// add the options comp button
		if ($this->canDo->get('core.admin') ||
$this->canDo->get('core.options'))
		{
			JToolBarHelper::preferences('com_moojla');
		}

		// Only load published batch if state and batch is allowed
		if ($this->canState && $this->canBatch)
		{
			JHtmlBatch_::addListSelection(
				JText::_('COM_MOOJLA_KEEP_ORIGINAL_STATE'),
				'batch[published]',
				JHtml::_('select.options',
JHtml::_('jgrid.publishedOptions', array('all' =>
false)), 'value', 'text', '', true)
			);
		}
	}

	/**
	 * Method to set up the document properties
	 *
	 * @return void
	 */
	protected function setDocument()
	{
		if (!isset($this->document))
		{
			$this->document = JFactory::getDocument();
		}
		$this->document->setTitle(JText::_('COM_MOOJLA_USER_MAPS'));
		$this->document->addStyleSheet(JURI::root() .
"administrator/components/com_moojla/assets/css/user_maps.css",
(MoojlaHelper::jVersion()->isCompatible('3.8.0')) ?
array('version' => 'auto') : 'text/css');
	}

	/**
	 * Escapes a value for output in a view script.
	 *
	 * @param   mixed  $var  The output to escape.
	 *
	 * @return  mixed  The escaped value.
	 */
	public function escape($var)
	{
		if(strlen($var) > 50)
		{
			// use the helper htmlEscape method instead and shorten the string
			return MoojlaHelper::htmlEscape($var, $this->_charset, true);
		}
		// use the helper htmlEscape method instead.
		return MoojlaHelper::htmlEscape($var, $this->_charset);
	}

	/**
	 * Returns an array of fields the table can be sorted by
	 *
	 * @return  array  Array containing the field name to sort by as the key
and display text as value
	 */
	protected function getSortFields()
	{
		return array(
			'a.ordering' =>
JText::_('JGRID_HEADING_ORDERING'),
			'a.published' => JText::_('JSTATUS'),
			'a.jid' =>
JText::_('COM_MOOJLA_USER_MAP_JID_LABEL'),
			'a.mid' =>
JText::_('COM_MOOJLA_USER_MAP_MID_LABEL'),
			'a.id' => JText::_('JGRID_HEADING_ID')
		);
	}
}
style/tmpl/edit.php000064400000006604151160557050010331 0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_templates
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html');

JHtml::_('behavior.formvalidator');
JHtml::_('behavior.keepalive');
JHtml::_('formbehavior.chosen', 'select');
$user = JFactory::getUser();

JFactory::getDocument()->addScriptDeclaration("
	Joomla.submitbutton = function(task)
	{
		if (task == 'style.cancel' ||
document.formvalidator.isValid(document.getElementById('style-form')))
{
			Joomla.submitform(task,
document.getElementById('style-form'));
		}
	};
");
?>

<form action="<?php echo
JRoute::_('index.php?option=com_templates&layout=edit&id='
. (int) $this->item->id); ?>" method="post"
name="adminForm" id="style-form"
class="form-validate">

	<?php echo JLayoutHelper::render('joomla.edit.title_alias',
$this); ?>

	<div class="form-horizontal">
		<?php echo JHtml::_('bootstrap.startTabSet',
'myTab', array('active' => 'details'));
?>

		<?php echo JHtml::_('bootstrap.addTab', 'myTab',
'details', JText::_('JDETAILS')); ?>

		<div class="row-fluid">
			<div class="span9">
				<h2>
					<?php echo JText::_($this->item->template); ?>
				</h2>
				<div class="info-labels">
					<span class="label hasTooltip" title="<?php echo
JHtml::_('tooltipText',
'COM_TEMPLATES_FIELD_CLIENT_LABEL'); ?>">
						<?php echo $this->item->client_id == 0 ?
JText::_('JSITE') : JText::_('JADMINISTRATOR'); ?>
					</span>
				</div>
				<div>
					<p><?php echo
JText::_($this->item->xml->description); ?></p>
					<?php
					$this->fieldset = 'description';
					$description = JLayoutHelper::render('joomla.edit.fieldset',
$this);
					?>
					<?php if ($description) : ?>
						<p class="readmore">
							<a href="#" onclick="jQuery('.nav-tabs
a[href=\'#description\']').tab('show');">
								<?php echo JText::_('JGLOBAL_SHOW_FULL_DESCRIPTION');
?>
							</a>
						</p>
					<?php endif; ?>
				</div>
				<?php
				$this->fieldset = 'basic';
				$html = JLayoutHelper::render('joomla.edit.fieldset', $this);
				echo $html ? '<hr />' . $html : '';
				?>
			</div>
			<div class="span3">
				<?php
				// Set main fields.
				$this->fields = array(
					'home',
					'client_id',
					'template'
				);
				?>
				<?php echo JLayoutHelper::render('joomla.edit.global',
$this); ?>
			</div>
		</div>
		<?php echo JHtml::_('bootstrap.endTab'); ?>

		<?php if ($description) : ?>
			<?php echo JHtml::_('bootstrap.addTab', 'myTab',
'description',
JText::_('JGLOBAL_FIELDSET_DESCRIPTION')); ?>
			<?php echo $description; ?>
			<?php echo JHtml::_('bootstrap.endTab'); ?>
		<?php endif; ?>

		<?php
		$this->fieldsets = array();
		$this->ignore_fieldsets = array('basic',
'description');
		echo JLayoutHelper::render('joomla.edit.params', $this);
		?>

		<?php if ($user->authorise('core.edit',
'com_menus') && $this->item->client_id == 0
&& $this->canDo->get('core.edit.state')) : ?>
			<?php echo JHtml::_('bootstrap.addTab', 'myTab',
'assignment',
JText::_('COM_TEMPLATES_MENUS_ASSIGNMENT')); ?>
			<?php echo $this->loadTemplate('assignment'); ?>
			<?php echo JHtml::_('bootstrap.endTab'); ?>
		<?php endif; ?>

		<?php echo JHtml::_('bootstrap.endTabSet'); ?>

		<input type="hidden" name="task"
value="" />
		<?php echo JHtml::_('form.token'); ?>
	</div>
</form>
style/tmpl/edit_assignment.php000064400000004241151160557050012554
0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_templates
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

// Initialise related data.
JLoader::register('MenusHelper', JPATH_ADMINISTRATOR .
'/components/com_menus/helpers/menus.php');
$menuTypes = MenusHelper::getMenuLinks();
$user      = JFactory::getUser();
?>
<label id="jform_menuselect-lbl"
for="jform_menuselect"><?php echo
JText::_('JGLOBAL_MENU_SELECTION'); ?></label>
<div class="btn-toolbar">
	<button class="btn jform-rightbtn" type="button"
onclick="jQuery('.chk-menulink').attr('checked',
!jQuery('.chk-menulink').attr('checked'));">
		<span class="icon-checkbox-partial"
aria-hidden="true"></span> <?php echo
JText::_('JGLOBAL_SELECTION_INVERT_ALL'); ?>
	</button>
</div>
<div id="menu-assignment">
	<ul class="menu-links">

		<?php foreach ($menuTypes as &$type) : ?>
			<li>
				<div class="menu-links-block">
					<button class="btn jform-rightbtn"
type="button" onclick="jQuery('.menutype-<?php echo
$type->menutype; ?>').attr('checked',
!jQuery('.menutype-<?php echo $type->menutype;
?>').attr('checked'));">
						<span class="icon-checkbox-partial"
aria-hidden="true"></span> <?php echo
JText::_('JGLOBAL_SELECTION_INVERT'); ?>
					</button>
					<h5><?php echo $type->title ?: $type->menutype;
?></h5>
	
					<?php foreach ($type->links as $link) : ?>
						<label class="checkbox small" for="link<?php
echo (int) $link->value; ?>" >
						<input type="checkbox"
name="jform[assigned][]" value="<?php echo (int)
$link->value; ?>" id="link<?php echo (int)
$link->value; ?>"<?php if ($link->template_style_id ==
$this->item->id) : ?> checked="checked"<?php endif;
?><?php if ($link->checked_out && $link->checked_out !=
$user->id) : ?> disabled="disabled"<?php else : ?>
class="chk-menulink menutype-<?php echo $type->menutype;
?>"<?php endif; ?> />
						<?php echo
JLayoutHelper::render('joomla.html.treeprefix',
array('level' => $link->level)) . $link->text; ?>
						</label>
					<?php endforeach; ?>

				</div>
			</li>
		<?php endforeach; ?>

	</ul>
</div>
style/tmpl/edit_options.php000064400000002457151160557050012106
0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_templates
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

// Load chosen.css
JHtml::_('formbehavior.chosen', 'select');

?>
<?php
	echo JHtml::_('bootstrap.startAccordion',
'templatestyleOptions', array('active' =>
'collapse0'));
	$fieldSets = $this->form->getFieldsets('params');
	$i = 0;

	foreach ($fieldSets as $name => $fieldSet) :
		$label = !empty($fieldSet->label) ? $fieldSet->label :
'COM_TEMPLATES_' . $name . '_FIELDSET_LABEL';
		echo JHtml::_('bootstrap.addSlide',
'templatestyleOptions', JText::_($label), 'collapse' .
($i++));
			if (isset($fieldSet->description) &&
trim($fieldSet->description)) :
				echo '<p class="tip">' .
$this->escape(JText::_($fieldSet->description)) .
'</p>';
			endif;
			?>
				<?php foreach ($this->form->getFieldset($name) as $field) :
?>
					<div class="control-group">
						<div class="control-label">
							<?php echo $field->label; ?>
						</div>
						<div class="controls">
							<?php echo $field->input; ?>
						</div>
					</div>
				<?php endforeach;
		echo JHtml::_('bootstrap.endSlide');
	endforeach;
echo JHtml::_('bootstrap.endAccordion');
style/view.html.php000064400000004776151160557050010355 0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_templates
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

/**
 * View to edit a template style.
 *
 * @since  1.6
 */
class TemplatesViewStyle extends JViewLegacy
{
	/**
	 * The JObject (on success, false on failure)
	 *
	 * @var   JObject
	 */
	protected $item;

	/**
	 * The form object
	 *
	 * @var   JForm
	 */
	protected $form;

	/**
	 * The model state
	 *
	 * @var   JObject
	 */
	protected $state;

	/**
	 * Execute and display a template script.
	 *
	 * @param   string  $tpl  The name of the template file to parse;
automatically searches through the template paths.
	 *
	 * @return  mixed  A string if successful, otherwise an Error object.
	 *
	 * @since   1.6
	 */
	public function display($tpl = null)
	{
		$this->item  = $this->get('Item');
		$this->state = $this->get('State');
		$this->form  = $this->get('Form');
		$this->canDo = JHelperContent::getActions('com_templates');

		// Check for errors.
		if (count($errors = $this->get('Errors')))
		{
			throw new Exception(implode("\n", $errors), 500);
		}

		$this->addToolbar();

		return parent::display($tpl);
	}

	/**
	 * Add the page title and toolbar.
	 *
	 * @return  void
	 *
	 * @since   1.6
	 */
	protected function addToolbar()
	{
		JFactory::getApplication()->input->set('hidemainmenu',
true);

		$isNew = ($this->item->id == 0);
		$canDo = $this->canDo;

		JToolbarHelper::title(
			$isNew ? JText::_('COM_TEMPLATES_MANAGER_ADD_STYLE')
			: JText::_('COM_TEMPLATES_MANAGER_EDIT_STYLE'), 'eye
thememanager'
		);

		// If not checked out, can save the item.
		if ($canDo->get('core.edit'))
		{
			JToolbarHelper::apply('style.apply');
			JToolbarHelper::save('style.save');
		}

		// If an existing item, can save to a copy.
		if (!$isNew && $canDo->get('core.create'))
		{
			JToolbarHelper::save2copy('style.save2copy');
		}

		if (empty($this->item->id))
		{
			JToolbarHelper::cancel('style.cancel');
		}
		else
		{
			JToolbarHelper::cancel('style.cancel',
'JTOOLBAR_CLOSE');
		}

		JToolbarHelper::divider();

		// Get the help information for the template item.
		$lang = JFactory::getLanguage();
		$help = $this->get('Help');

		if ($lang->hasKey($help->url))
		{
			$debug = $lang->setDebug(false);
			$url = JText::_($help->url);
			$lang->setDebug($debug);
		}
		else
		{
			$url = null;
		}

		JToolbarHelper::help($help->key, false, $url);
	}
}
style/view.json.php000064400000002400151160557050010340 0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_templates
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

/**
 * View to edit a template style.
 *
 * @since  1.6
 */
class TemplatesViewStyle extends JViewLegacy
{
	/**
	 * The JObject (on success, false on failure)
	 *
	 * @var   JObject
	 */
	protected $item;

	/**
	 * The form object
	 *
	 * @var   JForm
	 */
	protected $form;

	/**
	 * The model state
	 *
	 * @var   JObject
	 */
	protected $state;

	/**
	 * Execute and display a template script.
	 *
	 * @param   string  $tpl  The name of the template file to parse;
automatically searches through the template paths.
	 *
	 * @return  mixed  A string if successful, otherwise an Error object.
	 *
	 * @since   1.6
	 */
	public function display($tpl = null)
	{
		try
		{
			$this->item = $this->get('Item');
		}
		catch (Exception $e)
		{
			$app = JFactory::getApplication();
			$app->enqueueMessage($e->getMessage(), 'error');

			return false;
		}

		$paramsList = $this->item->getProperties();

		unset($paramsList['xml']);

		$paramsList = json_encode($paramsList);

		return $paramsList;

	}
}
styles/tmpl/default.php000064400000015611151160557050011211
0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_templates
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

// Include the component HTML helpers.
JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html');

JHtml::_('bootstrap.tooltip');
JHtml::_('behavior.multiselect');
JHtml::_('formbehavior.chosen', 'select');

$user      = JFactory::getUser();
$clientId = (int) $this->state->get('client_id', 0);
$listOrder =
$this->escape($this->state->get('list.ordering'));
$listDirn  =
$this->escape($this->state->get('list.direction'));
$colSpan = $clientId === 1 ? 5 : 6;
?>
<form action="<?php echo
JRoute::_('index.php?option=com_templates&view=styles');
?>" method="post" name="adminForm"
id="adminForm">
<?php if (!empty($this->sidebar)) : ?>
	<div id="j-sidebar-container" class="span2">
		<?php echo $this->sidebar; ?>
	</div>
	<div id="j-main-container" class="span10">
<?php else : ?>
	<div id="j-main-container">
<?php endif; ?>
		<?php echo
JLayoutHelper::render('joomla.searchtools.default',
array('view' => $this, 'options' =>
array('selectorFieldName' => 'client_id'))); ?>
		<?php if ($this->total > 0) : ?>
			<table class="table table-striped"
id="styleList">
				<thead>
					<tr>
						<th width="1%" class="nowrap center">
							&#160;
						</th>
						<th class="nowrap">
							<?php echo JHtml::_('searchtools.sort',
'COM_TEMPLATES_HEADING_STYLE', 'a.title', $listDirn,
$listOrder); ?>
						</th>
						<th width="1%" class="nowrap center">
							<?php echo JHtml::_('searchtools.sort',
'COM_TEMPLATES_HEADING_DEFAULT', 'a.home', $listDirn,
$listOrder); ?>
						</th>
						<?php if ($clientId === 0) : ?>
						<th width="20%" class="nowrap
hidden-phone">
							<?php echo JText::_('COM_TEMPLATES_HEADING_PAGES');
?>
						</th>
						<?php endif; ?>
						<th width="30%" class="hidden-phone
hidden-tablet">
							<?php echo JHtml::_('searchtools.sort',
'COM_TEMPLATES_HEADING_TEMPLATE', 'a.template',
$listDirn, $listOrder); ?>
						</th>
						<th width="1%" class="nowrap hidden-phone
hidden-tablet">
							<?php echo JHtml::_('searchtools.sort',
'JGRID_HEADING_ID', 'a.id', $listDirn, $listOrder);
?>
						</th>
					</tr>
				</thead>
				<tfoot>
					<tr>
						<td colspan="<?php echo $colSpan; ?>">
							<?php echo $this->pagination->getListFooter(); ?>
						</td>
					</tr>
				</tfoot>
				<tbody>
					<?php foreach ($this->items as $i => $item) :
						$canCreate = $user->authorise('core.create',    
'com_templates');
						$canEdit   = $user->authorise('core.edit',      
'com_templates');
						$canChange = $user->authorise('core.edit.state',
'com_templates');
					?>
					<tr class="row<?php echo $i % 2; ?>">
						<td width="1%" class="center">
							<?php echo JHtml::_('grid.id', $i, $item->id); ?>
						</td>
						<td>
							<?php if ($this->preview && $item->client_id ==
'0') : ?>
								<a target="_blank" href="<?php echo
JUri::root() . 'index.php?tp=1&templateStyle=' . (int)
$item->id ?>" class="jgrid">
								<span class="icon-eye-open hasTooltip"
aria-hidden="true" title="<?php echo
JHtml::_('tooltipText',
JText::_('COM_TEMPLATES_TEMPLATE_PREVIEW'), $item->title, 0);
?>"></span>
								<span class="element-invisible"><?php echo
JText::_('COM_TEMPLATES_TEMPLATE_PREVIEW'); ?></span>
								</a>
							<?php elseif ($item->client_id == '1') : ?>
								<span class="icon-eye-close disabled hasTooltip"
aria-hidden="true" title="<?php echo
JHtml::_('tooltipText',
'COM_TEMPLATES_TEMPLATE_NO_PREVIEW_ADMIN');
?>"></span>
								<span class="element-invisible"><?php echo
JText::_('COM_TEMPLATES_TEMPLATE_NO_PREVIEW_ADMIN');
?></span>
							<?php else: ?>
								<span class="icon-eye-close disabled hasTooltip"
aria-hidden="true" title="<?php echo
JHtml::_('tooltipText',
'COM_TEMPLATES_TEMPLATE_NO_PREVIEW');
?>"></span>
								<span class="element-invisible"><?php echo
JText::_('COM_TEMPLATES_TEMPLATE_NO_PREVIEW'); ?></span>
							<?php endif; ?>
							<?php if ($canEdit) : ?>
							<a href="<?php echo
JRoute::_('index.php?option=com_templates&task=style.edit&id='
. (int) $item->id); ?>">
								<?php echo $this->escape($item->title); ?></a>
							<?php else : ?>
								<?php echo $this->escape($item->title); ?>
							<?php endif; ?>
						</td>
						<td class="center">
							<?php if ($item->home == '0' || $item->home ==
'1') : ?>
								<?php echo JHtml::_('jgrid.isdefault', $item->home
!= '0', $i, 'styles.', $canChange &&
$item->home != '1'); ?>
							<?php elseif ($canChange) : ?>
								<a href="<?php echo
JRoute::_('index.php?option=com_templates&task=styles.unsetDefault&cid[]='
. $item->id . '&' . JSession::getFormToken() .
'=1'); ?>">
									<?php if ($item->image) : ?>
										<?php echo JHtml::_('image',
'mod_languages/' . $item->image . '.gif',
$item->language_title, array('title' =>
JText::sprintf('COM_TEMPLATES_GRID_UNSET_LANGUAGE',
$item->language_title)), true); ?>
									<?php else : ?>
										<span class="label" title="<?php echo
JText::sprintf('COM_TEMPLATES_GRID_UNSET_LANGUAGE',
$item->language_title); ?>"><?php echo
$item->language_sef; ?></span>
									<?php endif; ?>
								</a>
							<?php else : ?>
								<?php if ($item->image) : ?>
									<?php echo JHtml::_('image',
'mod_languages/' . $item->image . '.gif',
$item->language_title, array('title' =>
$item->language_title), true); ?>
								<?php else : ?>
									<span class="label" title="<?php echo
$item->language_title; ?>"><?php echo
$item->language_sef; ?></span>
								<?php endif; ?>
							<?php endif; ?>
						</td>
						<?php if ($clientId === 0) : ?>
						<td class="small hidden-phone">
							<?php if ($item->home == '1') : ?>
								<?php echo JText::_('COM_TEMPLATES_STYLES_PAGES_ALL');
?>
							<?php elseif ($item->home != '0' &&
$item->home != '1') : ?>
								<?php echo
JText::sprintf('COM_TEMPLATES_STYLES_PAGES_ALL_LANGUAGE',
$this->escape($item->language_title)); ?>
							<?php elseif ($item->assigned > 0) : ?>
								<?php echo
JText::sprintf('COM_TEMPLATES_STYLES_PAGES_SELECTED',
$this->escape($item->assigned)); ?>
							<?php else : ?>
								<?php echo
JText::_('COM_TEMPLATES_STYLES_PAGES_NONE'); ?>
							<?php endif; ?>
						</td>
						<?php endif; ?>
						<td class="hidden-phone hidden-tablet">
							<label for="cb<?php echo $i; ?>"
class="small">
								<a href="<?php echo
JRoute::_('index.php?option=com_templates&view=template&id='
. (int) $item->e_id); ?>  ">
									<?php echo ucfirst($this->escape($item->template)); ?>
								</a>
							</label>
						</td>
						<td class="hidden-phone hidden-tablet">
							<?php echo (int) $item->id; ?>
						</td>
					</tr>
					<?php endforeach; ?>
				</tbody>
			</table>
		<?php endif; ?>

		<input type="hidden" name="task"
value="" />
		<input type="hidden" name="boxchecked"
value="0" />
		<?php echo JHtml::_('form.token'); ?>
	</div>
</form>
styles/tmpl/default.xml000064400000000320151160557050011211
0ustar00<?xml version="1.0" encoding="utf-8"?>
<metadata>
	<layout title="COM_TEMPLATES_STYLE_VIEW_DEFAULT_TITLE">
		<message>
			<![CDATA[COM_TEMPLATES_STYLE_VIEW_DEFAULT_DESC]]>
		</message>
	</layout>
</metadata>
styles/view.html.php000064400000005346151160557050010532 0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_templates
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

/**
 * View class for a list of template styles.
 *
 * @since  1.6
 */
class TemplatesViewStyles extends JViewLegacy
{
	protected $items;

	protected $pagination;

	protected $state;

	/**
	 * Execute and display a template script.
	 *
	 * @param   string  $tpl  The name of the template file to parse;
automatically searches through the template paths.
	 *
	 * @return  mixed  A string if successful, otherwise an Error object.
	 */
	public function display($tpl = null)
	{
		$this->items         = $this->get('Items');
		$this->pagination    = $this->get('Pagination');
		$this->state         = $this->get('State');
		$this->total         = $this->get('Total');
		$this->filterForm    = $this->get('FilterForm');
		$this->activeFilters = $this->get('ActiveFilters');
		$this->preview       =
JComponentHelper::getParams('com_templates')->get('template_positions_display');

		TemplatesHelper::addSubmenu('styles');

		// Check for errors.
		if (count($errors = $this->get('Errors')))
		{
			throw new Exception(implode("\n", $errors), 500);
		}

		$this->addToolbar();
		$this->sidebar = JHtmlSidebar::render();

		return parent::display($tpl);
	}

	/**
	 * Add the page title and toolbar.
	 *
	 * @return  void
	 *
	 * @since   1.6
	 */
	protected function addToolbar()
	{
		$canDo = JHelperContent::getActions('com_templates');

		// Set the title.
		if ((int) $this->get('State')->get('client_id')
=== 1)
		{
			JToolbarHelper::title(JText::_('COM_TEMPLATES_MANAGER_STYLES_ADMIN'),
'eye thememanager');
		}
		else
		{
			JToolbarHelper::title(JText::_('COM_TEMPLATES_MANAGER_STYLES_SITE'),
'eye thememanager');
		}

		if ($canDo->get('core.edit.state'))
		{
			JToolbarHelper::makeDefault('styles.setDefault',
'COM_TEMPLATES_TOOLBAR_SET_HOME');
			JToolbarHelper::divider();
		}

		if ($canDo->get('core.edit'))
		{
			JToolbarHelper::editList('style.edit');
		}

		if ($canDo->get('core.create'))
		{
			JToolbarHelper::custom('styles.duplicate',
'copy.png', 'copy_f2.png',
'JTOOLBAR_DUPLICATE', true);
			JToolbarHelper::divider();
		}

		if ($canDo->get('core.delete'))
		{
			JToolbarHelper::deleteList('JGLOBAL_CONFIRM_DELETE',
'styles.delete', 'JTOOLBAR_DELETE');
			JToolbarHelper::divider();
		}

		if ($canDo->get('core.admin') ||
$canDo->get('core.options'))
		{
			JToolbarHelper::preferences('com_templates');
			JToolbarHelper::divider();
		}

		JToolbarHelper::help('JHELP_EXTENSIONS_TEMPLATE_MANAGER_STYLES');

		JHtmlSidebar::setAction('index.php?option=com_templates&view=styles');

	}
}
template/tmpl/default.php000064400000044254151160557050011506
0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_templates
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

// Include the component HTML helpers.
JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html');

JHtml::_('bootstrap.tooltip');
JHtml::_('formbehavior.chosen', 'select');
JHtml::_('behavior.formvalidator');
JHtml::_('behavior.keepalive');
JHtml::_('behavior.tabstate');

$input = JFactory::getApplication()->input;

// No access if not global SuperUser
if (!JFactory::getUser()->authorise('core.admin'))
{
	JFactory::getApplication()->enqueueMessage(JText::_('JERROR_ALERTNOAUTHOR'),
'error');
}

if ($this->type == 'image')
{
	JHtml::_('script', 'system/jquery.Jcrop.min.js',
array('version' => 'auto', 'relative'
=> true));
	JHtml::_('stylesheet', 'system/jquery.Jcrop.min.css',
array('version' => 'auto', 'relative'
=> true));
}

JFactory::getDocument()->addScriptDeclaration("
jQuery(document).ready(function($){

	// Hide all the folder when the page loads
	$('.folder ul, .component-folder ul, .plugin-folder ul,
.layout-folder ul').hide();

	// Display the tree after loading
	$('.directory-tree').removeClass('directory-tree');

	// Show all the lists in the path of an open file
	$('.show > ul').show();

	// Stop the default action of anchor tag on a click event
	$('.folder-url, .component-folder-url, .plugin-folder-url,
.layout-folder-url').click(function(event){
		event.preventDefault();
	});

	// Prevent the click event from proliferating
	$('.file, .component-file-url,
.plugin-file-url').bind('click',function(e){
		e.stopPropagation();
	});

	// Toggle the child indented list on a click event
	$('.folder, .component-folder, .plugin-folder,
.layout-folder').bind('click',function(e){
		$(this).children('ul').toggle();
		e.stopPropagation();
	});

	// New file tree
	$('#fileModal .folder-url').bind('click',function(e){
		$('.folder-url').removeClass('selected');
		e.stopPropagation();
		$('#fileModal
input.address').val($(this).attr('data-id'));
		$(this).addClass('selected');
	});

	// Folder manager tree
	$('#folderModal
.folder-url').bind('click',function(e){
		$('.folder-url').removeClass('selected');
		e.stopPropagation();
		$('#folderModal
input.address').val($(this).attr('data-id'));
		$(this).addClass('selected');
	});

	var containerDiv = document.querySelector('.span3.tree-holder'),
		treeContainer = containerDiv.querySelector('.nav.nav-list'),
		liEls = treeContainer.querySelectorAll('.folder.show'),
		filePathEl = document.querySelector('p.lead.hidden.path');

	if(filePathEl)
		var filePathTmp =
document.querySelector('p.lead.hidden.path').innerText;

	 if(filePathTmp && filePathTmp.charAt( 0 ) === '/' ) {
			filePathTmp = filePathTmp.slice( 1 );
			filePathTmp = filePathTmp.split('/');
			filePathTmp = filePathTmp[filePathTmp.length - 1];

		for (var i = 0, l = liEls.length; i < l; i++) {
			liEls[i].querySelector('a').classList.add('active');
			if (i === liEls.length - 1) {
				var parentUl = liEls[i].querySelector('ul'),
					allLi = parentUl.querySelectorAll('li'); 
	
				for (var i = 0, l = allLi.length; i < l; i++) {
					aEl = allLi[i].querySelector('a'),
					spanEl = aEl.querySelector('span');
	
					if (spanEl && filePathTmp === $.trim(spanEl.innerText)) {
						aEl.classList.add('active');
					}
				}
			}
		}
	}
});");

if ($this->type == 'image')
{
	JFactory::getDocument()->addScriptDeclaration("
		jQuery(document).ready(function($) {
			var jcrop_api;

			// Configuration for image cropping
			$('#image-crop').Jcrop({
				onChange:   showCoords,
				onSelect:   showCoords,
				onRelease:  clearCoords,
				trueSize:   [" . $this->image['width'] .
',' . $this->image['height'] . "]
			},function(){
				jcrop_api = this;
			});

			// Function for calculating the crop coordinates
			function showCoords(c)
			{
				$('#x').val(c.x);
				$('#y').val(c.y);
				$('#w').val(c.w);
				$('#h').val(c.h);
			};

			// Function for clearing the coordinates
			function clearCoords()
			{
				$('#adminForm input').val('');
			};
		});");
}

JFactory::getDocument()->addStyleDeclaration('
	/* Styles for modals */
	.selected{
		background: #08c;
		color: #fff;
	}
	.selected:hover{
		background: #08c !important;
		color: #fff;
	}
	.modal-body .column-left {
		float: left; max-height: 70vh; overflow-y: auto;
	}
	.modal-body .column-right {
		float: right;
	}
	@media (max-width: 767px) {
		.modal-body .column-right {
			float: left;
		}
	}
	#deleteFolder{
		margin: 0;
	}

	#image-crop{
		max-width: 100% !important;
		width: auto;
		height: auto;
	}

	.directory-tree{
		display: none;
	}

	.tree-holder{
		overflow-x: auto;
	}
');

if ($this->type == 'font')
{
	JFactory::getDocument()->addStyleDeclaration(
			"/* Styles for font preview */
		@font-face
		{
			font-family: previewFont;
			src: url('" . $this->font['address'] .
"')
		}

		.font-preview{
			font-family: previewFont !important;
		}"
	);
}
?>
<?php echo JHtml::_('bootstrap.startTabSet',
'myTab', array('active' => 'editor'));
?>
<?php echo JHtml::_('bootstrap.addTab', 'myTab',
'editor', JText::_('COM_TEMPLATES_TAB_EDITOR')); ?>
<div class="row-fluid">
	<div class="span12">
		<?php if ($this->type == 'file') : ?>
			<p class="lead"><?php echo
JText::sprintf('COM_TEMPLATES_TEMPLATE_FILENAME',
$this->source->filename, $this->template->element);
?></p>
			<p class="lead path hidden"><?php echo
$this->source->filename; ?></p>
		<?php endif; ?>
		<?php if ($this->type == 'image') : ?>
			<p class="lead"><?php echo
JText::sprintf('COM_TEMPLATES_TEMPLATE_FILENAME',
$this->image['path'], $this->template->element);
?></p>
			<p class="lead path hidden"><?php echo
$this->image['path']; ?></p>

		<?php endif; ?>
		<?php if ($this->type == 'font') : ?>
			<p class="lead"><?php echo
JText::sprintf('COM_TEMPLATES_TEMPLATE_FILENAME',
$this->font['rel_path'], $this->template->element);
?></p>
			<p class="lead path hidden"><?php echo
$this->font['rel_path']; ?></p>

		<?php endif; ?>
	</div>
</div>
<div class="row-fluid">
	<div class="span3 tree-holder">
		<?php echo $this->loadTemplate('tree'); ?>
	</div>
	<div class="span9">
		<?php if ($this->type == 'home') : ?>
			<form action="<?php echo
JRoute::_('index.php?option=com_templates&view=template&id='
. $input->getInt('id') . '&file=' .
$this->file); ?>" method="post"
name="adminForm" id="adminForm"
class="form-horizontal">
				<input type="hidden" name="task"
value="" />
				<?php echo JHtml::_('form.token'); ?>
				<div class="hero-unit" style="text-align:
justify;">
					<h2><?php echo
JText::_('COM_TEMPLATES_HOME_HEADING'); ?></h2>
					<p><?php echo JText::_('COM_TEMPLATES_HOME_TEXT');
?></p>
					<p>
						<a
href="https://docs.joomla.org/Special:MyLanguage/J3.x:How_to_use_the_Template_Manager"
target="_blank" class="btn btn-primary btn-large">
							<?php echo JText::_('COM_TEMPLATES_HOME_BUTTON'); ?>
						</a>
					</p>
				</div>
			</form>
		<?php endif; ?>
		<?php if ($this->type == 'file') : ?>
			<form action="<?php echo
JRoute::_('index.php?option=com_templates&view=template&id='
. $input->getInt('id') . '&file=' .
$this->file); ?>" method="post"
name="adminForm" id="adminForm"
class="form-horizontal">

				<div class="editor-border">
					<?php echo $this->form->getInput('source'); ?>
				</div>
				<input type="hidden" name="task"
value="" />
				<?php echo JHtml::_('form.token'); ?>
				<?php echo $this->form->getInput('extension_id');
?>
				<?php echo $this->form->getInput('filename'); ?>

			</form>
		<?php endif; ?>
		<?php if ($this->type == 'archive') : ?>
			<legend><?php echo
JText::_('COM_TEMPLATES_FILE_CONTENT_PREVIEW');
?></legend>
			<form action="<?php echo
JRoute::_('index.php?option=com_templates&view=template&id='
. $input->getInt('id') . '&file=' .
$this->file); ?>" method="post"
name="adminForm" id="adminForm"
class="form-horizontal">
				<ul class="nav nav-stacked nav-list well">
					<?php foreach ($this->archive as $file) : ?>
						<li>
							<?php if (substr($file, -1) === DIRECTORY_SEPARATOR) : ?>
								<span class="icon-folder"
aria-hidden="true"></span>&nbsp;<?php echo $file;
?>
							<?php endif; ?>
							<?php if (substr($file, -1) != DIRECTORY_SEPARATOR) : ?>
								<span class="icon-file"
aria-hidden="true"></span>&nbsp;<?php echo $file;
?>
							<?php endif; ?>
						</li>
					<?php endforeach; ?>
				</ul>
				<input type="hidden" name="task"
value="" />
				<?php echo JHtml::_('form.token'); ?>

			</form>
		<?php endif; ?>
		<?php if ($this->type == 'image') : ?>
			<img id="image-crop" src="<?php echo
$this->image['address'] . '?' . time(); ?>"
/>
			<form action="<?php echo
JRoute::_('index.php?option=com_templates&view=template&id='
. $input->getInt('id') . '&file=' .
$this->file); ?>" method="post"
name="adminForm" id="adminForm"
class="form-horizontal">
				<fieldset class="adminform">
					<input type ="hidden" id="x" name="x"
/>
					<input type ="hidden" id="y" name="y"
/>
					<input type ="hidden" id="h" name="h"
/>
					<input type ="hidden" id="w" name="w"
/>
					<input type="hidden" name="task"
value="" />
					<?php echo JHtml::_('form.token'); ?>
				</fieldset>
			</form>
		<?php endif; ?>
		<?php if ($this->type == 'font') : ?>
			<div class="font-preview">
				<form action="<?php echo
JRoute::_('index.php?option=com_templates&view=template&id='
. $input->getInt('id') . '&file=' .
$this->file); ?>" method="post"
name="adminForm" id="adminForm"
class="form-horizontal">
					<fieldset class="adminform">
						<p class="lead">H1</p><h1>Quickly gaze at
Joomla! views from HTML, CSS, JavaScript and XML </h1>
						<p class="lead">H2</p><h2>Quickly gaze at
Joomla! views from HTML, CSS, JavaScript and XML </h2>
						<p class="lead">H3</p><h3>Quickly gaze at
Joomla! views from HTML, CSS, JavaScript and XML </h3>
						<p class="lead">H4</p><h4>Quickly gaze at
Joomla! views from HTML, CSS, JavaScript and XML </h4>
						<p class="lead">H5</p><h5>Quickly gaze at
Joomla! views from HTML, CSS, JavaScript and XML </h5>
						<p class="lead">H6</p> <h6>Quickly gaze
at Joomla! views from HTML, CSS, JavaScript and XML </h6>
						<p class="lead">Bold</p><b>Quickly gaze
at Joomla! views from HTML, CSS, JavaScript and XML </b>
						<p class="lead">Italics</p><i>Quickly
gaze at Joomla! views from HTML, CSS, JavaScript and XML </i>
						<p class="lead">Unordered List</p>
						<ul>
							<li>Item</li>
							<li>Item</li>
							<li>Item<br />
								<ul>
									<li>Item</li>
									<li>Item</li>
									<li>Item<br />
										<ul>
											<li>Item</li>
											<li>Item</li>
											<li>Item</li>
										</ul>
									</li>
								</ul>
							</li>
						</ul>
						<p class="lead">Ordered List</p>
						<ol>
							<li>Item</li>
							<li>Item</li>
							<li>Item<br />
								<ul>
									<li>Item</li>
									<li>Item</li>
									<li>Item<br />
										<ul>
											<li>Item</li>
											<li>Item</li>
											<li>Item</li>
										</ul>
									</li>
								</ul>
							</li>
						</ol>
						<input type="hidden" name="task"
value="" />
						<?php echo JHtml::_('form.token'); ?>
					</fieldset>
				</form>
			</div>
		<?php endif; ?>
	</div>
</div>
<?php echo JHtml::_('bootstrap.endTab'); ?>

<?php echo JHtml::_('bootstrap.addTab', 'myTab',
'overrides', JText::_('COM_TEMPLATES_TAB_OVERRIDES'));
?>
<div class="row-fluid">
	<div class="span3">
		<legend><?php echo
JText::_('COM_TEMPLATES_OVERRIDES_MODULES'); ?></legend>
		<ul class="nav nav-list">
			<?php $token = JSession::getFormToken() . '=' . 1; ?>
			<?php foreach ($this->overridesList['modules'] as
$module) : ?>
				<li>
					<?php
					$overrideLinkUrl =
'index.php?option=com_templates&view=template&task=template.overrides&folder='
. $module->path
							. '&id=' . $input->getInt('id') .
'&file=' . $this->file . '&' . $token;
					?>
					<a href="<?php echo JRoute::_($overrideLinkUrl);
?>">
						<span class="icon-copy"
aria-hidden="true"></span>&nbsp;<?php echo
$module->name; ?>
					</a>
				</li>
			<?php endforeach; ?>
		</ul>
	</div>
	<div class="span3">
		<legend><?php echo
JText::_('COM_TEMPLATES_OVERRIDES_COMPONENTS');
?></legend>
		<ul class="nav nav-list">
			<?php $token = JSession::getFormToken() . '=' . 1; ?>
			<?php foreach ($this->overridesList['components'] as
$key => $value) : ?>
				<li class="component-folder">
					<a href="#" class="component-folder-url">
						<span class="icon-folder"
aria-hidden="true"></span>&nbsp;<?php echo $key;
?>
					</a>
					<ul class="nav nav-list">
						<?php foreach ($value as $view) : ?>
							<li>
								<?php
								$overrideLinkUrl =
'index.php?option=com_templates&view=template&task=template.overrides&folder='
. $view->path
										. '&id=' . $input->getInt('id') .
'&file=' . $this->file . '&' . $token;
								?>
								<a class="component-file-url" href="<?php echo
JRoute::_($overrideLinkUrl); ?>">
									<span class="icon-copy"
aria-hidden="true"></span>&nbsp;<?php echo
$view->name; ?>
								</a>
							</li>
						<?php endforeach; ?>
					</ul>
				</li>
			<?php endforeach; ?>
		</ul>
	</div>
	<div class="span3">
		<legend><?php echo
JText::_('COM_TEMPLATES_OVERRIDES_PLUGINS'); ?></legend>
		<ul class="nav nav-list">
			<?php $token = JSession::getFormToken() . '=' . 1; ?>
			<?php foreach ($this->overridesList['plugins'] as $key
=> $group) : ?>
				<li class="plugin-folder">
					<a href="#" class="plugin-folder-url">
						<span class="icon-folder"
aria-hidden="true"></span>&nbsp;<?php echo $key;
?>
					</a>
					<ul class="nav nav-list">
						<?php foreach ($group as $plugin) : ?>
							<li>
								<?php
								$overrideLinkUrl =
'index.php?option=com_templates&view=template&task=template.overrides&folder='
. $plugin->path
										. '&id=' . $input->getInt('id') .
'&file=' . $this->file . '&' . $token;
								?>
								<a class="plugin-file-url" href="<?php echo
JRoute::_($overrideLinkUrl); ?>">
									<span class="icon-copy"
aria-hidden="true"></span>&nbsp;<?php echo
$plugin->name; ?>
								</a>
							</li>
						<?php endforeach; ?>
					</ul>
				</li>
			<?php endforeach; ?>
		</ul>
	</div>
	<div class="span3">
		<legend><?php echo
JText::_('COM_TEMPLATES_OVERRIDES_LAYOUTS'); ?></legend>
		<ul class="nav nav-list">
			<?php $token = JSession::getFormToken() . '=' . 1; ?>
			<?php foreach ($this->overridesList['layouts'] as $key
=> $value) : ?>
			<li class="layout-folder">
				<a href="#" class="layout-folder-url">
					<span class="icon-folder"
aria-hidden="true"></span>&nbsp;<?php echo $key;
?>
				</a>
				<ul class="nav nav-list">
					<?php foreach ($value as $layout) : ?>
						<li>
							<?php
							$overrideLinkUrl =
'index.php?option=com_templates&view=template&task=template.overrides&folder='
. $layout->path
									. '&id=' . $input->getInt('id') .
'&file=' . $this->file . '&' . $token;
							?>
							<a href="<?php echo JRoute::_($overrideLinkUrl);
?>">
								<span class="icon-copy"
aria-hidden="true"></span>&nbsp;<?php echo
$layout->name; ?>
							</a>
						</li>
					<?php endforeach; ?>
				</ul>
			</li>
			<?php endforeach; ?>
		</ul>
	</div>
</div>
<?php echo JHtml::_('bootstrap.endTab'); ?>

<?php echo JHtml::_('bootstrap.addTab', 'myTab',
'description',
JText::_('COM_TEMPLATES_TAB_DESCRIPTION')); ?>
<?php echo $this->loadTemplate('description'); ?>
<?php echo JHtml::_('bootstrap.endTab'); ?>
<?php echo JHtml::_('bootstrap.endTabSet'); ?>

<?php // Collapse Modal
$copyModalData = array(
	'selector' => 'copyModal',
	'params'   => array(
		'title'  =>
JText::_('COM_TEMPLATES_TEMPLATE_COPY'),
		'footer' =>
$this->loadTemplate('modal_copy_footer'),
	),
	'body'     =>
$this->loadTemplate('modal_copy_body'),
);
?>
<form action="<?php echo
JRoute::_('index.php?option=com_templates&task=template.copy&id='
. $input->getInt('id') . '&file=' .
$this->file); ?>" method="post"
name="adminForm" id="adminForm">
	<?php echo JLayoutHelper::render('joomla.modal.main',
$copyModalData); ?>
	<?php echo JHtml::_('form.token'); ?>
</form>
<?php if ($this->type != 'home') : ?>
	<?php // Rename Modal
	$renameModalData = array(
		'selector' => 'renameModal',
		'params'   => array(
			'title'  =>
JText::sprintf('COM_TEMPLATES_RENAME_FILE', $this->fileName),
			'footer' =>
$this->loadTemplate('modal_rename_footer'),
		),
		'body'     =>
$this->loadTemplate('modal_rename_body'),
	);
	?>
	<form action="<?php echo
JRoute::_('index.php?option=com_templates&task=template.renameFile&id='
. $input->getInt('id') . '&file=' .
$this->file); ?>" method="post">
		<?php echo JLayoutHelper::render('joomla.modal.main',
$renameModalData); ?>
		<?php echo JHtml::_('form.token'); ?>
	</form>
<?php endif; ?>
<?php if ($this->type != 'home') : ?>
	<?php // Delete Modal
	$deleteModalData = array(
		'selector' => 'deleteModal',
		'params'   => array(
			'title'  =>
JText::_('COM_TEMPLATES_ARE_YOU_SURE'),
			'footer' =>
$this->loadTemplate('modal_delete_footer'),
		),
		'body'     =>
$this->loadTemplate('modal_delete_body'),
	);
	?>
	<?php echo JLayoutHelper::render('joomla.modal.main',
$deleteModalData); ?>
<?php endif; ?>
<?php // File Modal
$fileModalData = array(
	'selector' => 'fileModal',
	'params'   => array(
		'title'  =>
JText::_('COM_TEMPLATES_NEW_FILE_HEADER'),
		'footer' =>
$this->loadTemplate('modal_file_footer'),
	),
	'body'     =>
$this->loadTemplate('modal_file_body'),
);
?>
<?php echo JLayoutHelper::render('joomla.modal.main',
$fileModalData); ?>
<?php // Folder Modal
$folderModalData = array(
	'selector' => 'folderModal',
	'params'   => array(
		'title'  =>
JText::_('COM_TEMPLATES_MANAGE_FOLDERS'),
		'footer' =>
$this->loadTemplate('modal_folder_footer'),
	),
	'body'     =>
$this->loadTemplate('modal_folder_body'),
);
?>
<?php echo JLayoutHelper::render('joomla.modal.main',
$folderModalData); ?>
<?php if ($this->type == 'image') : ?>
	<?php // Resize Modal
	$resizeModalData = array(
		'selector' => 'resizeModal',
		'params'   => array(
			'title'  =>
JText::_('COM_TEMPLATES_RESIZE_IMAGE'),
			'footer' =>
$this->loadTemplate('modal_resize_footer'),
		),
		'body'     =>
$this->loadTemplate('modal_resize_body'),
	);
	?>
	<form action="<?php echo
JRoute::_('index.php?option=com_templates&task=template.resizeImage&id='
. $input->getInt('id') . '&file=' .
$this->file); ?>" method="post">
		<?php echo JLayoutHelper::render('joomla.modal.main',
$resizeModalData); ?>
		<?php echo JHtml::_('form.token'); ?>
	</form>
<?php endif;
?>template/tmpl/default_description.php000064400000001517151160557050014104
0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_templates
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;
?>

<div class="pull-left">
	<?php echo JHtml::_('templates.thumb',
$this->template->element, $this->template->client_id); ?>
	<?php echo JHtml::_('templates.thumbModal',
$this->template->element, $this->template->client_id); ?>
</div>
<h2><?php echo ucfirst($this->template->element);
?></h2>
<?php $client =
JApplicationHelper::getClientInfo($this->template->client_id); ?>
<p><?php $this->template->xmldata =
TemplatesHelper::parseXMLTemplateFile($client->path,
$this->template->element); ?></p>
<p><?php echo
JText::_($this->template->xmldata->description);
?></p>template/tmpl/default_folders.php000064400000001441151160557050013213
0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_templates
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;
ksort($this->files, SORT_STRING);
?>

<ul class='nav nav-list directory-tree'>
	<?php foreach ($this->files as $key => $value) : ?>
		<?php if (is_array($value)) : ?>
			<li class="folder-select">
				<a class='folder-url nowrap' data-id='<?php echo
base64_encode($key); ?>' href=''>
					<span class='icon-folder'>&nbsp;<?php
$explodeArray = explode('/', $key); echo
$this->escape(end($explodeArray)); ?></span>
				</a>
				<?php echo $this->folderTree($value); ?>
			</li>
		<?php endif; ?>
	<?php endforeach; ?>
</ul>
template/tmpl/default_modal_copy_body.php000064400000001563151160557050014725
0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_templates
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;
?>
<div id="template-manager-copy"
class="container-fluid">
	<div class="row-fluid">
		<div class="form-horizontal">
			<div class="control-group">
				<div class="control-label">
					<label for="new_name" class="modalTooltip"
title="<?php echo JHtml::_('tooltipText',
'COM_TEMPLATES_TEMPLATE_NEW_NAME_LABEL',
'COM_TEMPLATES_TEMPLATE_NEW_NAME_DESC'); ?>">
						<?php echo
JText::_('COM_TEMPLATES_TEMPLATE_NEW_NAME_LABEL'); ?>
					</label>
				</div>
				<div class="controls">
					<input class="input-xlarge" type="text"
id="new_name" name="new_name"  />
				</div>
			</div>
		</div>
	</div>
</div>
template/tmpl/default_modal_copy_footer.php000064400000001000151160557050015250
0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_templates
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;
?>
<button type="button" class="btn"
data-dismiss="modal"><?php echo
JText::_('COM_TEMPLATES_TEMPLATE_CLOSE'); ?></button>
<button type="submit" class="btn
btn-primary"><?php echo
JText::_('COM_TEMPLATES_TEMPLATE_COPY'); ?></button>
template/tmpl/default_modal_delete_body.php000064400000000727151160557050015216
0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_templates
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;
?>
<div id="template-manager-delete"
class="container-fluid">
	<div class="row-fluid">
		<p><?php echo
JText::sprintf('COM_TEMPLATES_MODAL_FILE_DELETE',
$this->fileName); ?></p>
	</div>
</div>template/tmpl/default_modal_delete_footer.php000064400000001615151160557050015554
0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_templates
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

$input = JFactory::getApplication()->input;
?>
<form method="post" action="">
	<input type="hidden" name="option"
value="com_templates" />
	<input type="hidden" name="task"
value="template.delete" />
	<input type="hidden" name="id" value="<?php
echo $input->getInt('id'); ?>" />
	<input type="hidden" name="file"
value="<?php echo $this->file; ?>" />
	<?php echo JHtml::_('form.token'); ?>
	<button type="button" class="btn"
data-dismiss="modal"><?php echo
JText::_('COM_TEMPLATES_TEMPLATE_CLOSE'); ?></button>
	<button type="submit" class="btn
btn-danger"><?php echo
JText::_('COM_TEMPLATES_BUTTON_DELETE'); ?></button>
</form>
template/tmpl/default_modal_file_body.php000064400000006551151160557050014674
0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_templates
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

$input = JFactory::getApplication()->input;
?>
<div id="template-manager-file"
class="container-fluid">
	<div class="row-fluid">
		<div class="span12">
			<div class="span6 column-right">
				<form method="post" action="<?php echo
JRoute::_('index.php?option=com_templates&task=template.createFile&id='
. $input->getInt('id') . '&file=' .
$this->file); ?>" class="well">
					<fieldset class="form-inline">
						<label><?php echo
JText::_('COM_TEMPLATES_FILE_NAME'); ?></label>
						<input type="text" name="name" required />
						<select class="input-medium"
data-chosen="true" name="type" required >
							<option value="">- <?php echo
JText::_('COM_TEMPLATES_NEW_FILE_SELECT'); ?> -</option>
							<option value="css">css</option>
							<option value="php">php</option>
							<option value="js">js</option>
							<option value="xml">xml</option>
							<option value="ini">ini</option>
							<option value="less">less</option>
							<option value="sass">sass</option>
							<option value="scss">scss</option>
							<option value="txt">txt</option>
						</select>
						<input type="hidden" class="address"
name="address" />
						<?php echo JHtml::_('form.token'); ?>
						<input type="submit" value="<?php echo
JText::_('COM_TEMPLATES_BUTTON_CREATE'); ?>"
class="btn btn-primary" />
					</fieldset>
				</form>
				<form method="post" action="<?php echo
JRoute::_('index.php?option=com_templates&task=template.uploadFile&id='
. $input->getInt('id') . '&file=' .
$this->file); ?>" class="well"
enctype="multipart/form-data">
					<fieldset class="form-inline">
						<input type="hidden" class="address"
name="address" />
						<input type="file" name="files" required />
						<?php echo JHtml::_('form.token'); ?>
						<input type="submit" value="<?php echo
JText::_('COM_TEMPLATES_BUTTON_UPLOAD'); ?>"
class="btn btn-primary" /><br>
						<?php $cMax    =
$this->state->get('params')->get('upload_limit');
?>
						<?php $maxSize = JHtml::_('number.bytes',
JUtility::getMaxUploadSize($cMax . 'MB')); ?>
						<?php echo
JText::sprintf('JGLOBAL_MAXIMUM_UPLOAD_SIZE_LIMIT', $maxSize);
?>
					</fieldset>
				</form>
				<?php if ($this->type != 'home') : ?>
					<form method="post" action="<?php echo
JRoute::_('index.php?option=com_templates&task=template.copyFile&id='
. $input->getInt('id') . '&file=' .
$this->file); ?>" class="well"
enctype="multipart/form-data">
						<fieldset class="form-inline">
							<input type="hidden" class="address"
name="address" />
							<label for="new_name" class="modalTooltip"
title="<?php echo JHtml::_('tooltipText',
'COM_TEMPLATES_FILE_NEW_NAME_DESC'); ?>">
								<?php echo
JText::_('COM_TEMPLATES_FILE_NEW_NAME_LABEL')?>
							</label>
							<input type="text" id="new_name"
name="new_name" required />
							<?php echo JHtml::_('form.token'); ?>
							<input type="submit" value="<?php echo
JText::_('COM_TEMPLATES_BUTTON_COPY_FILE'); ?>"
class="btn btn-primary" />
						</fieldset>
					</form>
				<?php endif; ?>
			</div>
			<div class="span6 column-left">
				<?php echo $this->loadTemplate('folders'); ?>
				<hr class="hr-condensed" />
			</div>
		</div>
	</div>
</div>
template/tmpl/default_modal_file_footer.php000064400000000622151160557050015226
0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_templates
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;
?>
<button type="button" class="btn"
data-dismiss="modal"><?php echo
JText::_('COM_TEMPLATES_TEMPLATE_CLOSE'); ?></button>
template/tmpl/default_modal_folder_body.php000064400000002312151160557050015217
0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_templates
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

$input = JFactory::getApplication()->input;
?>
<div id="template-manager-folder"
class="container-fluid">
	<div class="row-fluid">
		<div class="span12">
			<div class="span6 column-right">
				<form method="post" action="<?php echo
JRoute::_('index.php?option=com_templates&task=template.createFolder&id='
. $input->getInt('id') . '&file=' .
$this->file); ?>" class="well">
					<fieldset class="form-inline">
						<label><?php echo
JText::_('COM_TEMPLATES_FOLDER_NAME'); ?></label>
						<input type="text" name="name" required />
						<input type="hidden" class="address"
name="address" />
						<?php echo JHtml::_('form.token'); ?>
						<input type="submit" value="<?php echo
JText::_('COM_TEMPLATES_BUTTON_CREATE'); ?>"
class="btn btn-primary" />
					</fieldset>
				</form>
			</div>
			<div class="span6 column-left">
				<?php echo $this->loadTemplate('folders'); ?>
				<hr class="hr-condensed" />
			</div>
		</div>
	</div>
</div>
template/tmpl/default_modal_folder_footer.php000064400000001555151160557050015570
0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_templates
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

$input = JFactory::getApplication()->input;
?>
<form id="deleteFolder" method="post"
action="<?php echo
JRoute::_('index.php?option=com_templates&task=template.deleteFolder&id='
. $input->getInt('id') . '&file=' .
$this->file); ?>">
	<fieldset>
		<button type="button" class="btn"
data-dismiss="modal"><?php echo
JText::_('COM_TEMPLATES_TEMPLATE_CLOSE'); ?></button>
		<input type="hidden" class="address"
name="address" />
		<?php echo JHtml::_('form.token'); ?>
		<input type="submit" value="<?php echo
JText::_('COM_TEMPLATES_BUTTON_DELETE'); ?>"
class="btn btn-danger" />
	</fieldset>
</form>
template/tmpl/default_modal_rename_body.php000064400000001672151160557050015223
0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_templates
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

?>
<div id="template-manager-rename"
class="container-fluid">
	<div class="row-fluid">
		<div class="form-horizontal">
			<div class="control-group">
				<div class="control-label">
					<label for="new_name" class="modalTooltip"
title="<?php echo JHtml::_('tooltipText',
JText::_('COM_TEMPLATES_NEW_FILE_NAME')); ?>">
						<?php echo JText::_('COM_TEMPLATES_NEW_FILE_NAME')?>
					</label>
				</div>
				<div class="controls">
					<div class="input-append">
						<input class="input-xlarge" type="text"
name="new_name" required />
						<span class="add-on">.<?php echo
JFile::getExt($this->fileName); ?></span>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>
template/tmpl/default_modal_rename_footer.php000064400000001000151160557050015545
0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_templates
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;
?>
<button type="button" class="btn"
data-dismiss="modal"><?php echo
JText::_('COM_TEMPLATES_TEMPLATE_CLOSE'); ?></button>
<button type="submit" class="btn
btn-primary"><?php echo
JText::_('COM_TEMPLATES_BUTTON_RENAME'); ?></button>
template/tmpl/default_modal_resize_body.php000064400000002340151160557050015246
0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_templates
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;
?>
<div id="template-manager-resize"
class="container-fluid">
	<div class="row-fluid">
		<div class="control-group">
			<div class="control-label">
				<label for="height" class="modalTooltip"
title="<?php echo JHtml::_('tooltipText',
'COM_TEMPLATES_IMAGE_HEIGHT'); ?>">
					<?php echo JText::_('COM_TEMPLATES_IMAGE_HEIGHT')?>
				</label>
			</div>
			<div class="controls">
				<input class="input-xlarge" type="number"
name="height" placeholder="<?php echo
$this->image['height']; ?> px" required />
			</div>
		</div>
		<div class="control-group">
			<div class="control-label">
				<label for="width" class="modalTooltip"
title="<?php echo JHtml::_('tooltipText',
'COM_TEMPLATES_IMAGE_WIDTH'); ?>">
					<?php echo JText::_('COM_TEMPLATES_IMAGE_WIDTH')?>
				</label>
			</div>
			<div class="controls">
				<input class="input-xlarge" type="number"
name="width" placeholder="<?php echo
$this->image['width']; ?> px" required />
			</div>
		</div>
	</div>
</div>
template/tmpl/default_modal_resize_footer.php000064400000001000151160557050015577
0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_templates
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;
?>
<button type="button" class="btn"
data-dismiss="modal"><?php echo
JText::_('COM_TEMPLATES_TEMPLATE_CLOSE'); ?></button>
<button type="submit" class="btn
btn-primary"><?php echo
JText::_('COM_TEMPLATES_BUTTON_RESIZE'); ?></button>
template/tmpl/default_tree.php000064400000003160151160557050012514
0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_templates
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

// use ksort() with SORT_NATURAL flag when minimum PHP is 5.4.
uksort($this->files, 'strnatcmp');

?>
<ul class='nav nav-list directory-tree'>
	<?php foreach ($this->files as $key => $value) : ?>
		<?php if (is_array($value)) : ?>
			<?php
			$keyArray  = explode('/', $key);
			$fileArray = explode('/', $this->fileName);
			$count     = 0;

			$keyArrayCount = count($keyArray);

			if (count($fileArray) >= $keyArrayCount)
			{
				for ($i = 0; $i < $keyArrayCount; $i++)
				{
					if ($keyArray[$i] === $fileArray[$i])
					{
						$count++;
					}
				}

				if ($count === $keyArrayCount)
				{
					$class = 'folder show';
				}
				else
				{
					$class = 'folder';
				}
			}
			else
			{
				$class = 'folder';
			}

			?>
			<li class="<?php echo $class; ?>">
				<a class='folder-url nowrap' href=''>
					<span class='icon-folder'>&nbsp;<?php
$explodeArray = explode('/', $key); echo
$this->escape(end($explodeArray)); ?></span>
				</a>
				<?php echo $this->directoryTree($value); ?>
			</li>
		<?php endif; ?>
		<?php if (is_object($value)) : ?>
			<li>
				<a class="file nowrap" href='<?php echo
JRoute::_('index.php?option=com_templates&view=template&id='
. $this->id . '&file=' . $value->id) ?>'>
					<span class='icon-file'>&nbsp;<?php echo
$this->escape($value->name); ?></span>
				</a>
			</li>
		<?php endif; ?>
	<?php endforeach; ?>
</ul>
template/tmpl/readonly.php000064400000002132151160557070011666
0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_templates
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

// Include the component HTML helpers.
JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html');

JHtml::_('bootstrap.tooltip');

$input = JFactory::getApplication()->input;
?>
<form action="<?php echo
JRoute::_('index.php?option=com_templates&view=template&id='
. $input->getInt('id') . '&file=' .
$this->file); ?>" method="post"
name="adminForm" id="adminForm"
class="form-horizontal">
	<?php echo JHtml::_('bootstrap.startTabSet',
'myTab', array('active' =>
'description')); ?>
		<?php echo JHtml::_('bootstrap.addTab', 'myTab',
'description',
JText::_('COM_TEMPLATES_TAB_DESCRIPTION')); ?>
			<?php echo $this->loadTemplate('description'); ?>
		<?php echo JHtml::_('bootstrap.endTab'); ?>
	<?php echo JHtml::_('bootstrap.endTabSet'); ?>
	<input type="hidden" name="task" value=""
/>
	<?php echo JHtml::_('form.token'); ?>
</form>
hilation/index.html000064400000000054151160557530010357
0ustar00<html><body
bgcolor="#FFFFFF"></body></html>hilation/tmpl/default.php000064400000003606151160557530011501
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.0
	@build			13th July, 2022
	@created		13th July, 2022
	@package		Hilation
	@subpackage		default.php
	@author			farhad shahbazi <http://lmskaran.ir>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

JHtml::_('behavior.tooltip');

?>
<div id="j-main-container">
	<div class="span9">
		<?php echo JHtml::_('bootstrap.startAccordion',
'dashboard_left', array('active' =>
'main')); ?>
			<?php echo JHtml::_('bootstrap.addSlide',
'dashboard_left', 'cPanel', 'main'); ?>
				<?php echo $this->loadTemplate('main');?>
			<?php echo JHtml::_('bootstrap.endSlide'); ?>
		<?php echo JHtml::_('bootstrap.endAccordion'); ?>
	</div>
	<div class="span3">
		<?php echo JHtml::_('bootstrap.startAccordion',
'dashboard_right', array('active' =>
'vdm')); ?>
			<?php echo JHtml::_('bootstrap.addSlide',
'dashboard_right', 'lmskaran', 'vdm'); ?>
				<?php echo $this->loadTemplate('vdm');?>
			<?php echo JHtml::_('bootstrap.endSlide'); ?>
		<?php echo JHtml::_('bootstrap.endAccordion'); ?>
	</div>
</div>hilation/tmpl/default_main.php000064400000003656151160557530012512
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.0
	@build			13th July, 2022
	@created		13th July, 2022
	@package		Hilation
	@subpackage		default_main.php
	@author			farhad shahbazi <http://lmskaran.ir>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

?>
<?php if(isset($this->icons['main']) &&
is_array($this->icons['main'])) :?>
	<?php foreach($this->icons['main'] as $icon): ?>
		<div class="dashboard-wraper">
			<div class="dashboard-content"> 
				<a class="icon" href="<?php echo $icon->url;
?>">
					<img alt="<?php echo $icon->alt; ?>"
src="components/com_hilation/assets/images/icons/<?php  echo
$icon->image; ?>">
					<span class="dashboard-title"><?php echo
JText::_($icon->name); ?></span>
				</a>
			 </div>
		</div>
	<?php endforeach; ?>
	<div class="clearfix"></div>
<?php else: ?>
	<div class="alert alert-error"><h4
class="alert-heading"><?php echo JText::_("Permission
denied, or not correctly set"); ?></h4><div
class="alert-message"><?php echo JText::_("Please
notify your System Administrator if result is unexpected.");
?></div></div>
<?php endif;
?>hilation/tmpl/default_vdm.php000064400000005065151160557530012350
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.0
	@build			13th July, 2022
	@created		13th July, 2022
	@package		Hilation
	@subpackage		default_vdm.php
	@author			farhad shahbazi <http://lmskaran.ir>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

?>
<img alt="<?php echo JText::_('COM_HILATION');
?>"
src="components/com_hilation/assets/images/vdm-component.jpg">
<ul class="list-striped">
	<li><b><?php echo
JText::_('COM_HILATION_VERSION'); ?>:</b> <?php echo
$this->manifest->version; ?>&nbsp;&nbsp;<span
class="update-notice"></span></li>
	<li><b><?php echo JText::_('COM_HILATION_DATE');
?>:</b> <?php echo $this->manifest->creationDate;
?></li>
	<li><b><?php echo
JText::_('COM_HILATION_AUTHOR'); ?>:</b> <a
href="mailto:<?php echo $this->manifest->authorEmail;
?>"><?php echo $this->manifest->author;
?></a></li>
	<li><b><?php echo
JText::_('COM_HILATION_WEBSITE'); ?>:</b> <a
href="<?php echo $this->manifest->authorUrl; ?>"
target="_blank"><?php echo
$this->manifest->authorUrl; ?></a></li>
	<li><b><?php echo
JText::_('COM_HILATION_LICENSE'); ?>:</b> <?php echo
$this->manifest->license; ?></li>
	<li><b><?php echo $this->manifest->copyright;
?></b></li>
</ul>
<div class="clearfix"></div>
<?php if(HilationHelper::checkArray($this->contributors)): ?>
	<?php if(count($this->contributors) > 1): ?>
		<h3><?php echo JText::_('COM_HILATION_CONTRIBUTORS');
?></h3>
	<?php else: ?>
		<h3><?php echo JText::_('COM_HILATION_CONTRIBUTOR');
?></h3>
	<?php endif; ?>
	<ul class="list-striped">
		<?php foreach($this->contributors as $contributor): ?>
		<li><b><?php echo $contributor['title'];
?>:</b> <?php echo $contributor['name'];
?></li>
		<?php endforeach; ?>
	</ul>
	<div class="clearfix"></div>
<?php endif;
?>hilation/tmpl/index.html000064400000000054151160557530011333
0ustar00<html><body
bgcolor="#FFFFFF"></body></html>hilation/view.html.php000064400000005531151160557530011015
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.0
	@build			13th July, 2022
	@created		13th July, 2022
	@package		Hilation
	@subpackage		view.html.php
	@author			farhad shahbazi <http://lmskaran.ir>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

/**
 * Hilation View class
 */
class HilationViewHilation extends JViewLegacy
{
	/**
	 * View display method
	 * @return void
	 */
	function display($tpl = null)
	{
		// Assign data to the view
		$this->icons			= $this->get('Icons');
		$this->contributors		= HilationHelper::getContributors();
		
		// get the manifest details of the component
		$this->manifest = HilationHelper::manifest();
		
		// Set the toolbar
		$this->addToolBar();
		
		// Check for errors.
		if (count($errors = $this->get('Errors')))
		{
			throw new Exception(implode("\n", $errors), 500);
		}

		// Display the template
		parent::display($tpl);

		// Set the document
		$this->setDocument();
	}

	/**
	 * Setting the toolbar
	 */
	protected function addToolBar()
	{
		$canDo = HilationHelper::getActions('hilation');
		JToolBarHelper::title(JText::_('COM_HILATION_DASHBOARD'),
'grid-2');

		// set help url for this view if found
		$help_url = HilationHelper::getHelpUrl('hilation');
		if (HilationHelper::checkString($help_url))
		{
			JToolbarHelper::help('COM_HILATION_HELP_MANAGER', false,
$help_url);
		}

		if ($canDo->get('core.admin') ||
$canDo->get('core.options'))
		{
			JToolBarHelper::preferences('com_hilation');
		}
	}

	/**
	 * Method to set up the document properties
	 *
	 * @return void
	 */
	protected function setDocument()
	{
		$document = JFactory::getDocument();
		
		// add dashboard style sheets
		$document->addStyleSheet(JURI::root() .
"administrator/components/com_hilation/assets/css/dashboard.css");
		
		// set page title
		$document->setTitle(JText::_('COM_HILATION_DASHBOARD'));
		
		// add manifest to page JavaScript
		$document->addScriptDeclaration("var manifest =
jQuery.parseJSON('" . json_encode($this->manifest) .
"');", "text/javascript");
	}
}
relation/submitbutton.js000064400000002754151160557550011500
0ustar00/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.0
	@build			13th July, 2022
	@created		13th July, 2022
	@package		Hilation
	@subpackage		submitbutton.js
	@author			farhad shahbazi <http://lmskaran.ir>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

Joomla.submitbutton = function(task)
{
	if (task == ''){
		return false;
	} else { 
		var action = task.split('.');
		if (action[1] == 'cancel' || action[1] == 'close' ||
document.formvalidator.isValid(document.getElementById("adminForm"))){
			Joomla.submitform(task, document.getElementById("adminForm"));
			return true;
		} else {
			alert(Joomla.JText._('relation, some values are not
acceptable.','Some values are unacceptable'));
			return false;
		}
	}
}relation/tmpl/edit.php000064400000011345151160557550011011
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.0
	@build			13th July, 2022
	@created		13th July, 2022
	@package		Hilation
	@subpackage		edit.php
	@author			farhad shahbazi <http://lmskaran.ir>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html');
JHtml::_('behavior.tooltip');
JHtml::_('behavior.formvalidation');
JHtml::_('formbehavior.chosen', 'select');
JHtml::_('behavior.keepalive');
$componentParams = $this->params; // will be removed just use
$this->params instead
?>
<script type="text/javascript">
	// waiting spinner
	var outerDiv = jQuery('body');
	jQuery('<div id="loading"></div>')
		.css("background", "rgba(255, 255, 255, .8)
url('components/com_hilation/assets/images/import.gif') 50% 15%
no-repeat")
		.css("top", outerDiv.position().top -
jQuery(window).scrollTop())
		.css("left", outerDiv.position().left -
jQuery(window).scrollLeft())
		.css("width", outerDiv.width())
		.css("height", outerDiv.height())
		.css("position", "fixed")
		.css("opacity", "0.80")
		.css("-ms-filter",
"progid:DXImageTransform.Microsoft.Alpha(Opacity = 80)")
		.css("filter", "alpha(opacity = 80)")
		.css("display", "none")
		.appendTo(outerDiv);
	jQuery('#loading').show();
	// when page is ready remove and show
	jQuery(window).load(function() {
		jQuery('#hilation_loader').fadeIn('fast');
		jQuery('#loading').hide();
	});
</script>
<div id="hilation_loader" style="display: none;">
<form action="<?php echo
JRoute::_('index.php?option=com_hilation&layout=edit&id='.
(int) $this->item->id . $this->referral); ?>"
method="post" name="adminForm" id="adminForm"
class="form-validate" enctype="multipart/form-data">

<div class="form-horizontal">

	<?php echo JHtml::_('bootstrap.startTabSet',
'relationTab', array('active' =>
'details')); ?>

	<?php echo JHtml::_('bootstrap.addTab',
'relationTab', 'details',
JText::_('COM_HILATION_RELATION_DETAILS', true)); ?>
		<div class="row-fluid form-horizontal-desktop">
			<div class="span6">
				<?php echo JLayoutHelper::render('relation.details_left',
$this); ?>
			</div>
			<div class="span6">
				<?php echo JLayoutHelper::render('relation.details_right',
$this); ?>
			</div>
		</div>
	<?php echo JHtml::_('bootstrap.endTab'); ?>

	<?php $this->ignore_fieldsets =
array('details','metadata','vdmmetadata','accesscontrol');
?>
	<?php $this->tab_name = 'relationTab'; ?>
	<?php echo JLayoutHelper::render('joomla.edit.params',
$this); ?>

	<?php if ($this->canDo->get('core.edit.created_by') ||
$this->canDo->get('core.edit.created') ||
$this->canDo->get('core.edit.state') ||
($this->canDo->get('core.delete') &&
$this->canDo->get('core.edit.state'))) : ?>
	<?php echo JHtml::_('bootstrap.addTab',
'relationTab', 'publishing',
JText::_('COM_HILATION_RELATION_PUBLISHING', true)); ?>
		<div class="row-fluid form-horizontal-desktop">
			<div class="span6">
				<?php echo JLayoutHelper::render('relation.publishing',
$this); ?>
			</div>
			<div class="span6">
				<?php echo JLayoutHelper::render('relation.publlshing',
$this); ?>
			</div>
		</div>
	<?php echo JHtml::_('bootstrap.endTab'); ?>
	<?php endif; ?>

	<?php if ($this->canDo->get('core.admin')) : ?>
	<?php echo JHtml::_('bootstrap.addTab',
'relationTab', 'permissions',
JText::_('COM_HILATION_RELATION_PERMISSION', true)); ?>
		<div class="row-fluid form-horizontal-desktop">
			<div class="span12">
				<fieldset class="adminform">
					<div class="adminformlist">
					<?php foreach
($this->form->getFieldset('accesscontrol') as $field):
?>
						<div>
							<?php echo $field->label; echo $field->input;?>
						</div>
						<div class="clearfix"></div>
					<?php endforeach; ?>
					</div>
				</fieldset>
			</div>
		</div>
	<?php echo JHtml::_('bootstrap.endTab'); ?>
	<?php endif; ?>

	<?php echo JHtml::_('bootstrap.endTabSet'); ?>

	<div>
		<input type="hidden" name="task"
value="relation.edit" />
		<?php echo JHtml::_('form.token'); ?>
	</div>
</div>
</form>
</div>
relation/tmpl/index.html000064400000000054151160557550011343
0ustar00<html><body
bgcolor="#FFFFFF"></body></html>relation/view.html.php000064400000015321151160557550011023
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.0
	@build			13th July, 2022
	@created		13th July, 2022
	@package		Hilation
	@subpackage		view.html.php
	@author			farhad shahbazi <http://lmskaran.ir>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

/**
 * Relation View class
 */
class HilationViewRelation extends JViewLegacy
{
	/**
	 * display method of View
	 * @return void
	 */
	public function display($tpl = null)
	{
		// set params
		$this->params = JComponentHelper::getParams('com_hilation');
		// Assign the variables
		$this->form = $this->get('Form');
		$this->item = $this->get('Item');
		$this->script = $this->get('Script');
		$this->state = $this->get('State');
		// get action permissions
		$this->canDo = HilationHelper::getActions('relation',
$this->item);
		// get input
		$jinput = JFactory::getApplication()->input;
		$this->ref = $jinput->get('ref', 0, 'word');
		$this->refid = $jinput->get('refid', 0, 'int');
		$return = $jinput->get('return', null, 'base64');
		// set the referral string
		$this->referral = '';
		if ($this->refid && $this->ref)
		{
			// return to the item that referred to this item
			$this->referral = '&ref=' . (string)$this->ref .
'&refid=' . (int)$this->refid;
		}
		elseif($this->ref)
		{
			// return to the list view that referred to this item
			$this->referral = '&ref=' . (string)$this->ref;
		}
		// check return value
		if (!is_null($return))
		{
			// add the return value
			$this->referral .= '&return=' . (string)$return;
		}

		// Set the toolbar
		$this->addToolBar();
		
		// Check for errors.
		if (count($errors = $this->get('Errors')))
		{
			throw new Exception(implode("\n", $errors), 500);
		}

		// Display the template
		parent::display($tpl);

		// Set the document
		$this->setDocument();
	}


	/**
	 * Setting the toolbar
	 */
	protected function addToolBar()
	{
		JFactory::getApplication()->input->set('hidemainmenu',
true);
		$user = JFactory::getUser();
		$userId	= $user->id;
		$isNew = $this->item->id == 0;

		JToolbarHelper::title( JText::_($isNew ?
'COM_HILATION_RELATION_NEW' :
'COM_HILATION_RELATION_EDIT'), 'pencil-2 article-add');
		// Built the actions for new and existing records.
		if (HilationHelper::checkString($this->referral))
		{
			if ($this->canDo->get('core.create') && $isNew)
			{
				// We can create the record.
				JToolBarHelper::save('relation.save',
'JTOOLBAR_SAVE');
			}
			elseif ($this->canDo->get('core.edit'))
			{
				// We can save the record.
				JToolBarHelper::save('relation.save',
'JTOOLBAR_SAVE');
			}
			if ($isNew)
			{
				// Do not creat but cancel.
				JToolBarHelper::cancel('relation.cancel',
'JTOOLBAR_CANCEL');
			}
			else
			{
				// We can close it.
				JToolBarHelper::cancel('relation.cancel',
'JTOOLBAR_CLOSE');
			}
		}
		else
		{
			if ($isNew)
			{
				// For new records, check the create permission.
				if ($this->canDo->get('core.create'))
				{
					JToolBarHelper::apply('relation.apply',
'JTOOLBAR_APPLY');
					JToolBarHelper::save('relation.save',
'JTOOLBAR_SAVE');
					JToolBarHelper::custom('relation.save2new',
'save-new.png', 'save-new_f2.png',
'JTOOLBAR_SAVE_AND_NEW', false);
				};
				JToolBarHelper::cancel('relation.cancel',
'JTOOLBAR_CANCEL');
			}
			else
			{
				if ($this->canDo->get('core.edit'))
				{
					// We can save the new record
					JToolBarHelper::apply('relation.apply',
'JTOOLBAR_APPLY');
					JToolBarHelper::save('relation.save',
'JTOOLBAR_SAVE');
					// We can save this record, but check the create permission to see
					// if we can return to make a new one.
					if ($this->canDo->get('core.create'))
					{
						JToolBarHelper::custom('relation.save2new',
'save-new.png', 'save-new_f2.png',
'JTOOLBAR_SAVE_AND_NEW', false);
					}
				}
				$canVersion = ($this->canDo->get('core.version')
&& $this->canDo->get('relation.version'));
				if ($this->state->params->get('save_history', 1)
&& $this->canDo->get('core.edit') &&
$canVersion)
				{
					JToolbarHelper::versions('com_hilation.relation',
$this->item->id);
				}
				if ($this->canDo->get('core.create'))
				{
					JToolBarHelper::custom('relation.save2copy',
'save-copy.png', 'save-copy_f2.png',
'JTOOLBAR_SAVE_AS_COPY', false);
				}
				JToolBarHelper::cancel('relation.cancel',
'JTOOLBAR_CLOSE');
			}
		}
		JToolbarHelper::divider();
		// set help url for this view if found
		$help_url = HilationHelper::getHelpUrl('relation');
		if (HilationHelper::checkString($help_url))
		{
			JToolbarHelper::help('COM_HILATION_HELP_MANAGER', false,
$help_url);
		}
	}

	/**
	 * Escapes a value for output in a view script.
	 *
	 * @param   mixed  $var  The output to escape.
	 *
	 * @return  mixed  The escaped value.
	 */
	public function escape($var)
	{
		if(strlen($var) > 30)
		{
    		// use the helper htmlEscape method instead and shorten the string
			return HilationHelper::htmlEscape($var, $this->_charset, true, 30);
		}
		// use the helper htmlEscape method instead.
		return HilationHelper::htmlEscape($var, $this->_charset);
	}

	/**
	 * Method to set up the document properties
	 *
	 * @return void
	 */
	protected function setDocument()
	{
		$isNew = ($this->item->id < 1);
		if (!isset($this->document))
		{
			$this->document = JFactory::getDocument();
		}
		$this->document->setTitle(JText::_($isNew ?
'COM_HILATION_RELATION_NEW' :
'COM_HILATION_RELATION_EDIT'));
		$this->document->addStyleSheet(JURI::root() .
"administrator/components/com_hilation/assets/css/relation.css",
(HilationHelper::jVersion()->isCompatible('3.8.0')) ?
array('version' => 'auto') : 'text/css');
		$this->document->addScript(JURI::root() . $this->script,
(HilationHelper::jVersion()->isCompatible('3.8.0')) ?
array('version' => 'auto') :
'text/javascript');
		$this->document->addScript(JURI::root() .
"administrator/components/com_hilation/views/relation/submitbutton.js",
(HilationHelper::jVersion()->isCompatible('3.8.0')) ?
array('version' => 'auto') :
'text/javascript'); 
		JText::script('view not acceptable. Error');
	}
}
relations/index.html000064400000000054151160557550010552
0ustar00<html><body
bgcolor="#FFFFFF"></body></html>relations/tmpl/default.php000064400000006007151160557550011672
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.0
	@build			13th July, 2022
	@created		13th July, 2022
	@package		Hilation
	@subpackage		default.php
	@author			farhad shahbazi <http://lmskaran.ir>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

JHtml::_('behavior.tooltip');
JHtml::_('behavior.multiselect');
JHtml::_('dropdown.init');
JHtml::_('formbehavior.chosen',
'.multipleAccessLevels', null,
array('placeholder_text_multiple' => '- ' .
JText::_('COM_HILATION_FILTER_SELECT_ACCESS') . ' -'));
JHtml::_('formbehavior.chosen', 'select');
if ($this->saveOrder)
{
	$saveOrderingUrl =
'index.php?option=com_hilation&task=relations.saveOrderAjax&tmpl=component';
	JHtml::_('sortablelist.sortable', 'relationList',
'adminForm', strtolower($this->listDirn), $saveOrderingUrl);
}
?>
<form action="<?php echo
JRoute::_('index.php?option=com_hilation&view=relations');
?>" method="post" name="adminForm"
id="adminForm">
<?php if(!empty( $this->sidebar)): ?>
	<div id="j-sidebar-container" class="span2">
		<?php echo $this->sidebar; ?>
	</div>
	<div id="j-main-container" class="span10">
<?php else : ?>
	<div id="j-main-container">
<?php endif; ?>
<?php
	// Add the searchtools
	echo JLayoutHelper::render('joomla.searchtools.default',
array('view' => $this));
?>
<?php if (empty($this->items)): ?>
	<div class="alert alert-no-items">
		<?php echo JText::_('JGLOBAL_NO_MATCHING_RESULTS'); ?>
	</div>
<?php else : ?>
	<table class="table table-striped"
id="relationList">
		<thead><?php echo
$this->loadTemplate('head');?></thead>
		<tfoot><?php echo
$this->loadTemplate('foot');?></tfoot>
		<tbody><?php echo
$this->loadTemplate('body');?></tbody>
	</table>
	<?php // Load the batch processing form. ?>
	<?php if ($this->canCreate && $this->canEdit) : ?>
		<?php echo JHtml::_(
			'bootstrap.renderModal',
			'collapseModal',
			array(
				'title' =>
JText::_('COM_HILATION_RELATIONS_BATCH_OPTIONS'),
				'footer' =>
$this->loadTemplate('batch_footer')
			),
			$this->loadTemplate('batch_body')
		); ?>
	<?php endif; ?>
	<input type="hidden" name="boxchecked"
value="0" />
	</div>
<?php endif; ?>
	<input type="hidden" name="task" value=""
/>
	<?php echo JHtml::_('form.token'); ?>
</form>
relations/tmpl/default_batch_body.php000064400000002345151160557550014051
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.0
	@build			13th July, 2022
	@created		13th July, 2022
	@package		Hilation
	@subpackage		default_batch_body.php
	@author			farhad shahbazi <http://lmskaran.ir>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

?>

<p><?php echo
JText::_('COM_HILATION_RELATIONS_BATCH_TIP'); ?></p>
<?php echo $this->batchDisplay;
?>relations/tmpl/default_batch_footer.php000064400000002741151160557550014412
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.0
	@build			13th July, 2022
	@created		13th July, 2022
	@package		Hilation
	@subpackage		default_batch_footer.php
	@author			farhad shahbazi <http://lmskaran.ir>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

?>
<!-- clear the batch values if cancel -->
<button class="btn" type="button"
onclick="" data-dismiss="modal">
	<?php echo JText::_('JCANCEL'); ?>
</button>
<!-- post the batch values if process -->
<button class="btn btn-success" type="submit"
onclick="Joomla.submitbutton('relation.batch');">
	<?php echo JText::_('JGLOBAL_BATCH_PROCESS'); ?>
</button>relations/tmpl/default_body.php000064400000007626151160557550012717
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.0
	@build			13th July, 2022
	@created		13th July, 2022
	@package		Hilation
	@subpackage		default_body.php
	@author			farhad shahbazi <http://lmskaran.ir>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

$edit =
"index.php?option=com_hilation&view=relations&task=relation.edit";

?>
<?php foreach ($this->items as $i => $item): ?>
	<?php
		$canCheckin = $this->user->authorise('core.manage',
'com_checkin') || $item->checked_out == $this->user->id
|| $item->checked_out == 0;
		$userChkOut = JFactory::getUser($item->checked_out);
		$canDo =
HilationHelper::getActions('relation',$item,'relations');
	?>
	<tr class="row<?php echo $i % 2; ?>">
		<td class="order nowrap center hidden-phone">
		<?php if ($canDo->get('core.edit.state')): ?>
			<?php
				$iconClass = '';
				if (!$this->saveOrder)
				{
					$iconClass = ' inactive tip-top" hasTooltip"
title="' . JHtml::tooltipText('JORDERINGDISABLED');
				}
			?>
			<span class="sortable-handler<?php echo $iconClass;
?>">
				<i class="icon-menu"></i>
			</span>
			<?php if ($this->saveOrder) : ?>
				<input type="text" style="display:none"
name="order[]" size="5"
				value="<?php echo $item->ordering; ?>"
class="width-20 text-area-order " />
			<?php endif; ?>
		<?php else: ?>
			&#8942;
		<?php endif; ?>
		</td>
		<td class="nowrap center">
		<?php if ($canDo->get('core.edit')): ?>
				<?php if ($item->checked_out) : ?>
					<?php if ($canCheckin) : ?>
						<?php echo JHtml::_('grid.id', $i, $item->id); ?>
					<?php else: ?>
						&#9633;
					<?php endif; ?>
				<?php else: ?>
					<?php echo JHtml::_('grid.id', $i, $item->id); ?>
				<?php endif; ?>
		<?php else: ?>
			&#9633;
		<?php endif; ?>
		</td>
		<td class="nowrap">
			<div class="name">
				<?php if ($canDo->get('core.edit')): ?>
					<a href="<?php echo $edit; ?>&id=<?php echo
$item->id; ?>"><?php echo
JFactory::getUser((int)$item->userid)->name; ?></a>
					<?php if ($item->checked_out): ?>
						<?php echo JHtml::_('jgrid.checkedout', $i,
$userChkOut->name, $item->checked_out_time, 'relations.',
$canCheckin); ?>
					<?php endif; ?>
				<?php else: ?>
					<?php echo JFactory::getUser((int)$item->userid)->name; ?>
				<?php endif; ?>
			</div>
		</td>
		<td class="hidden-phone">
			<?php echo JFactory::getUser((int)$item->parent)->name; ?>
		</td>
		<td class="center">
		<?php if ($canDo->get('core.edit.state')) : ?>
				<?php if ($item->checked_out) : ?>
					<?php if ($canCheckin) : ?>
						<?php echo JHtml::_('jgrid.published',
$item->published, $i, 'relations.', true, 'cb');
?>
					<?php else: ?>
						<?php echo JHtml::_('jgrid.published',
$item->published, $i, 'relations.', false, 'cb');
?>
					<?php endif; ?>
				<?php else: ?>
					<?php echo JHtml::_('jgrid.published',
$item->published, $i, 'relations.', true, 'cb');
?>
				<?php endif; ?>
		<?php else: ?>
			<?php echo JHtml::_('jgrid.published', $item->published,
$i, 'relations.', false, 'cb'); ?>
		<?php endif; ?>
		</td>
		<td class="nowrap center hidden-phone">
			<?php echo $item->id; ?>
		</td>
	</tr>
<?php endforeach;
?>relations/tmpl/default_foot.php000064400000002313151160557570012717
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.0
	@build			13th July, 2022
	@created		13th July, 2022
	@package		Hilation
	@subpackage		default_foot.php
	@author			farhad shahbazi <http://lmskaran.ir>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

?>
<tr>
	<td colspan="6"><?php echo
$this->pagination->getListFooter(); ?></td>
</tr>relations/tmpl/default_head.php000064400000004544151160557570012661
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.0
	@build			13th July, 2022
	@created		13th July, 2022
	@package		Hilation
	@subpackage		default_head.php
	@author			farhad shahbazi <http://lmskaran.ir>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

?>
<tr>
	<?php if ($this->canEdit&& $this->canState): ?>
		<th width="1%" class="nowrap center
hidden-phone">
			<?php echo JHtml::_('searchtools.sort', '',
'a.ordering', $this->listDirn, $this->listOrder, null,
'asc', 'JGRID_HEADING_ORDERING',
'icon-menu-2'); ?>
		</th>
		<th width="20" class="nowrap center">
			<?php echo JHtml::_('grid.checkall'); ?>
		</th>
	<?php else: ?>
		<th width="20" class="nowrap center
hidden-phone">
			&#9662;
		</th>
		<th width="20" class="nowrap center">
			&#9632;
		</th>
	<?php endif; ?>
	<th class="nowrap" >
			<?php echo JText::_('COM_HILATION_RELATION_USERID_LABEL');
?>
	</th>
	<th class="nowrap hidden-phone" >
			<?php echo JText::_('COM_HILATION_RELATION_PARENT_LABEL');
?>
	</th>
	<?php if ($this->canState): ?>
		<th width="10" class="nowrap center" >
			<?php echo JHtml::_('searchtools.sort',
'COM_HILATION_RELATION_STATUS', 'a.published',
$this->listDirn, $this->listOrder); ?>
		</th>
	<?php else: ?>
		<th width="10" class="nowrap center" >
			<?php echo JText::_('COM_HILATION_RELATION_STATUS'); ?>
		</th>
	<?php endif; ?>
	<th width="5" class="nowrap center hidden-phone"
>
			<?php echo JHtml::_('searchtools.sort',
'COM_HILATION_RELATION_ID', 'a.id', $this->listDirn,
$this->listOrder); ?>
	</th>
</tr>relations/tmpl/default_toolbar.php000064400000007063151160557570013421
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.0
	@build			13th July, 2022
	@created		13th July, 2022
	@package		Hilation
	@subpackage		default_toolbar.php
	@author			farhad shahbazi <http://lmskaran.ir>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

?>
<div id="filter-bar" class="btn-toolbar">
        <div class="filter-search btn-group pull-left">
            <label for="filter_search"
class="element-invisible"><?php echo
JText::_('Search');?></label>
            <input type="text" name="filter_search"
id="filter_search" placeholder="<?php echo
JText::_('JSEARCH_FILTER'); ?>" value="<?php echo
$this->escape($this->state->get('filter.search'));
?>" class="hasTooltip" title="<?php echo
JHtml::tooltipText('Search Relations'); ?>" />
        </div>
        <div class="btn-group pull-left">
            <button type="submit" class="btn
hasTooltip" title="<?php echo
JHtml::tooltipText('JSEARCH_FILTER_SUBMIT'); ?>"><i
class="icon-search"></i></button>
            <button type="button" class="btn
hasTooltip" title="<?php echo
JHtml::tooltipText('JSEARCH_FILTER_CLEAR'); ?>"
onclick="document.id('filter_search').value='';this.form.submit();"><i
class="icon-remove"></i></button>
        </div>
        <div class="btn-group pull-right hidden-phone">
            <label for="limit"
class="element-invisible"><?php echo
JText::_('JFIELD_PLG_SEARCH_SEARCHLIMIT_DESC');?></label>
            <?php echo $this->pagination->getLimitBox(); ?>
        </div>
        <div class="btn-group pull-right hidden-phone">
            <label for="directionTable"
class="element-invisible"><?php echo
JText::_('JFIELD_ORDERING_DESC');?></label>
            <select name="directionTable"
id="directionTable" class="input-medium"
onchange="Joomla.orderTable()">
                <option value=""><?php echo
JText::_('JFIELD_ORDERING_DESC');?></option>
                <option value="asc" <?php if
($this->listDirn == 'asc') echo
'selected="selected"'; ?>><?php echo
JText::_('JGLOBAL_ORDER_ASCENDING');?></option>
                <option value="desc" <?php if
($this->listDirn == 'desc') echo
'selected="selected"'; ?>><?php echo
JText::_('JGLOBAL_ORDER_DESCENDING');?></option>
            </select>
        </div>
        <div class="btn-group pull-right">
            <label for="sortTable"
class="element-invisible"><?php echo
JText::_('JGLOBAL_SORT_BY');?></label>
            <select name="sortTable" id="sortTable"
class="input-medium" onchange="Joomla.orderTable()">
                <option value=""><?php echo
JText::_('JGLOBAL_SORT_BY');?></option>
                <?php echo JHtml::_('select.options',
$this->getSortFields(), 'value', 'text',
$this->listOrder);?>
            </select>
        </div>
    </div>
<div class="clearfix">
</div>relations/tmpl/index.html000064400000000054151160557630011525
0ustar00<html><body
bgcolor="#FFFFFF"></body></html>relations/view.html.php000064400000016531151160557630011211
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.0
	@build			13th July, 2022
	@created		13th July, 2022
	@package		Hilation
	@subpackage		view.html.php
	@author			farhad shahbazi <http://lmskaran.ir>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

/**
 * Hilation View class for the Relations
 */
class HilationViewRelations extends JViewLegacy
{
	/**
	 * Relations view display method
	 * @return void
	 */
	function display($tpl = null)
	{
		if ($this->getLayout() !== 'modal')
		{
			// Include helper submenu
			HilationHelper::addSubmenu('relations');
		}

		// Assign data to the view
		$this->items = $this->get('Items');
		$this->pagination = $this->get('Pagination');
		$this->state = $this->get('State');
		$this->user = JFactory::getUser();
		// Load the filter form from xml.
		$this->filterForm = $this->get('FilterForm');
		// Load the active filters.
		$this->activeFilters = $this->get('ActiveFilters');
		// Add the list ordering clause.
		$this->listOrder =
$this->escape($this->state->get('list.ordering',
'a.id'));
		$this->listDirn =
$this->escape($this->state->get('list.direction',
'DESC'));
		$this->saveOrder = $this->listOrder == 'a.ordering';
		// set the return here value
		$this->return_here = urlencode(base64_encode((string)
JUri::getInstance()));
		// get global action permissions
		$this->canDo = HilationHelper::getActions('relation');
		$this->canEdit = $this->canDo->get('core.edit');
		$this->canState =
$this->canDo->get('core.edit.state');
		$this->canCreate = $this->canDo->get('core.create');
		$this->canDelete = $this->canDo->get('core.delete');
		$this->canBatch = $this->canDo->get('core.batch');

		// We don't need toolbar in the modal window.
		if ($this->getLayout() !== 'modal')
		{
			$this->addToolbar();
			$this->sidebar = JHtmlSidebar::render();
			// load the batch html
			if ($this->canCreate && $this->canEdit &&
$this->canState)
			{
				$this->batchDisplay = JHtmlBatch_::render();
			}
		}
		
		// Check for errors.
		if (count($errors = $this->get('Errors')))
		{
			throw new Exception(implode("\n", $errors), 500);
		}

		// Display the template
		parent::display($tpl);

		// Set the document
		$this->setDocument();
	}

	/**
	 * Setting the toolbar
	 */
	protected function addToolBar()
	{
		JToolBarHelper::title(JText::_('COM_HILATION_RELATIONS'),
'joomla');
		JHtmlSidebar::setAction('index.php?option=com_hilation&view=relations');
		JFormHelper::addFieldPath(JPATH_COMPONENT . '/models/fields');

		if ($this->canCreate)
		{
			JToolBarHelper::addNew('relation.add');
		}

		// Only load if there are items
		if (HilationHelper::checkArray($this->items))
		{
			if ($this->canEdit)
			{
				JToolBarHelper::editList('relation.edit');
			}

			if ($this->canState)
			{
				JToolBarHelper::publishList('relations.publish');
				JToolBarHelper::unpublishList('relations.unpublish');
				JToolBarHelper::archiveList('relations.archive');

				if ($this->canDo->get('core.admin'))
				{
					JToolBarHelper::checkin('relations.checkin');
				}
			}

			// Add a batch button
			if ($this->canBatch && $this->canCreate &&
$this->canEdit && $this->canState)
			{
				// Get the toolbar object instance
				$bar = JToolBar::getInstance('toolbar');
				// set the batch button name
				$title = JText::_('JTOOLBAR_BATCH');
				// Instantiate a new JLayoutFile instance and render the batch button
				$layout = new JLayoutFile('joomla.toolbar.batch');
				// add the button to the page
				$dhtml = $layout->render(array('title' => $title));
				$bar->appendButton('Custom', $dhtml, 'batch');
			}

			if ($this->state->get('filter.published') == -2
&& ($this->canState && $this->canDelete))
			{
				JToolbarHelper::deleteList('', 'relations.delete',
'JTOOLBAR_EMPTY_TRASH');
			}
			elseif ($this->canState && $this->canDelete)
			{
				JToolbarHelper::trash('relations.trash');
			}

			if ($this->canDo->get('core.export') &&
$this->canDo->get('relation.export'))
			{
				JToolBarHelper::custom('relations.exportData',
'download', '', 'COM_HILATION_EXPORT_DATA',
true);
			}
		}

		if ($this->canDo->get('core.import') &&
$this->canDo->get('relation.import'))
		{
			JToolBarHelper::custom('relations.importData',
'upload', '', 'COM_HILATION_IMPORT_DATA',
false);
		}

		// set help url for this view if found
		$help_url = HilationHelper::getHelpUrl('relations');
		if (HilationHelper::checkString($help_url))
		{
				JToolbarHelper::help('COM_HILATION_HELP_MANAGER', false,
$help_url);
		}

		// add the options comp button
		if ($this->canDo->get('core.admin') ||
$this->canDo->get('core.options'))
		{
			JToolBarHelper::preferences('com_hilation');
		}

		// Only load published batch if state and batch is allowed
		if ($this->canState && $this->canBatch)
		{
			JHtmlBatch_::addListSelection(
				JText::_('COM_HILATION_KEEP_ORIGINAL_STATE'),
				'batch[published]',
				JHtml::_('select.options',
JHtml::_('jgrid.publishedOptions', array('all' =>
false)), 'value', 'text', '', true)
			);
		}

		// Only load access batch if create, edit and batch is allowed
		if ($this->canBatch && $this->canCreate &&
$this->canEdit)
		{
			JHtmlBatch_::addListSelection(
				JText::_('COM_HILATION_KEEP_ORIGINAL_ACCESS'),
				'batch[access]',
				JHtml::_('select.options',
JHtml::_('access.assetgroups'), 'value',
'text')
			);
		}
	}

	/**
	 * Method to set up the document properties
	 *
	 * @return void
	 */
	protected function setDocument()
	{
		if (!isset($this->document))
		{
			$this->document = JFactory::getDocument();
		}
		$this->document->setTitle(JText::_('COM_HILATION_RELATIONS'));
		$this->document->addStyleSheet(JURI::root() .
"administrator/components/com_hilation/assets/css/relations.css",
(HilationHelper::jVersion()->isCompatible('3.8.0')) ?
array('version' => 'auto') : 'text/css');
	}

	/**
	 * Escapes a value for output in a view script.
	 *
	 * @param   mixed  $var  The output to escape.
	 *
	 * @return  mixed  The escaped value.
	 */
	public function escape($var)
	{
		if(strlen($var) > 50)
		{
			// use the helper htmlEscape method instead and shorten the string
			return HilationHelper::htmlEscape($var, $this->_charset, true);
		}
		// use the helper htmlEscape method instead.
		return HilationHelper::htmlEscape($var, $this->_charset);
	}

	/**
	 * Returns an array of fields the table can be sorted by
	 *
	 * @return  array  Array containing the field name to sort by as the key
and display text as value
	 */
	protected function getSortFields()
	{
		return array(
			'a.ordering' =>
JText::_('JGRID_HEADING_ORDERING'),
			'a.published' => JText::_('JSTATUS'),
			'a.id' => JText::_('JGRID_HEADING_ID')
		);
	}
}
module/tmpl/edit_assignment.php000064400000015332151160606320012677
0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_modules
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

// Initialise related data.
JLoader::register('MenusHelper', JPATH_ADMINISTRATOR .
'/components/com_menus/helpers/menus.php');
$menuTypes = MenusHelper::getMenuLinks();

JHtml::_('script', 'jui/treeselectmenu.jquery.min.js',
array('version' => 'auto', 'relative'
=> true));

$script = "
	jQuery(document).ready(function()
	{
		menuHide(jQuery('#jform_assignment').val());
		jQuery('#jform_assignment').change(function()
		{
			menuHide(jQuery(this).val());
		})
	});
	function menuHide(val)
	{
		if (val == 0 || val == '-')
		{
			jQuery('#menuselect-group').hide();
		}
		else
		{
			jQuery('#menuselect-group').show();
		}
	}
";

// Add the script to the document head
JFactory::getDocument()->addScriptDeclaration($script);
?>
<div class="control-group">
	<label id="jform_menus-lbl" class="control-label"
for="jform_menus"><?php echo
JText::_('COM_MODULES_MODULE_ASSIGN'); ?></label>

	<div id="jform_menus" class="controls">
		<select name="jform[assignment]"
id="jform_assignment">
			<?php echo JHtml::_('select.options',
ModulesHelper::getAssignmentOptions($this->item->client_id),
'value', 'text', $this->item->assignment, true);
?>
		</select>
	</div>
</div>
<div id="menuselect-group" class="control-group">
	<label id="jform_menuselect-lbl"
class="control-label"
for="jform_menuselect"><?php echo
JText::_('JGLOBAL_MENU_SELECTION'); ?></label>

	<div id="jform_menuselect" class="controls">
		<?php if (!empty($menuTypes)) : ?>
		<?php $id = 'jform_menuselect'; ?>

		<div class="well well-small">
			<div class="form-inline">
				<span class="small"><?php echo
JText::_('JSELECT'); ?>:
					<a id="treeCheckAll"
href="javascript://"><?php echo JText::_('JALL');
?></a>,
					<a id="treeUncheckAll"
href="javascript://"><?php echo
JText::_('JNONE'); ?></a>
				</span>
				<span class="width-20">|</span>
				<span class="small"><?php echo
JText::_('COM_MODULES_EXPAND'); ?>:
					<a id="treeExpandAll"
href="javascript://"><?php echo JText::_('JALL');
?></a>,
					<a id="treeCollapseAll"
href="javascript://"><?php echo
JText::_('JNONE'); ?></a>
				</span>
				<input type="text" id="treeselectfilter"
name="treeselectfilter" class="input-medium search-query
pull-right" size="16"
					autocomplete="off" placeholder="<?php echo
JText::_('JSEARCH_FILTER'); ?>"
aria-invalid="false" tabindex="-1">
			</div>

			<div class="clearfix"></div>

			<hr class="hr-condensed" />

			<ul class="treeselect">
				<?php foreach ($menuTypes as &$type) : ?>
				<?php if (count($type->links)) : ?>
					<?php $prevlevel = 0; ?>
					<li>
						<div class="treeselect-item pull-left">
							<label class="pull-left nav-header"><?php echo
$type->title; ?></label></div>
					<?php foreach ($type->links as $i => $link) : ?>
						<?php
						if ($prevlevel < $link->level)
						{
							echo '<ul class="treeselect-sub">';
						} elseif ($prevlevel > $link->level)
						{
							echo str_repeat('</li></ul>', $prevlevel -
$link->level);
						} else {
							echo '</li>';
						}
						$selected = 0;
						if ($this->item->assignment == 0)
						{
							$selected = 1;
						} elseif ($this->item->assignment < 0)
						{
							$selected = in_array(-$link->value, $this->item->assigned);
						} elseif ($this->item->assignment > 0)
						{
							$selected = in_array($link->value, $this->item->assigned);
						}
						?>
							<li>
								<div class="treeselect-item pull-left">
									<?php
									$uselessMenuItem = in_array($link->type,
array('separator', 'heading', 'alias',
'url'));
									?>
									<input type="checkbox" class="pull-left
novalidate" name="jform[assigned][]" id="<?php echo
$id . $link->value; ?>" value="<?php echo (int)
$link->value; ?>"<?php echo $selected ? '
checked="checked"' : ''; echo $uselessMenuItem ?
' disabled="disabled"' : ''; ?> />
									<label for="<?php echo $id . $link->value;
?>" class="pull-left">
										<?php echo $link->text; ?> <span
class="small"><?php echo
JText::sprintf('JGLOBAL_LIST_ALIAS',
$this->escape($link->alias)); ?></span>
										<?php if (JLanguageMultilang::isEnabled() &&
$link->language != '' && $link->language !=
'*') : ?>
											<?php if ($link->language_image) : ?>
												<?php echo JHtml::_('image',
'mod_languages/' . $link->language_image . '.gif',
$link->language_title, array('title' =>
$link->language_title), true); ?>
											<?php else : ?>
												<?php echo '<span class="label"
title="' . $link->language_title . '">' .
$link->language_sef . '</span>'; ?>
											<?php endif; ?>
										<?php endif; ?>
										<?php if ($link->published == 0) : ?>
											<?php echo ' <span class="label">'
. JText::_('JUNPUBLISHED') . '</span>'; ?>
										<?php endif; ?>
										<?php if ($uselessMenuItem) : ?>
											<?php echo ' <span class="label">'
. JText::_('COM_MODULES_MENU_ITEM_' . strtoupper($link->type))
. '</span>'; ?>
										<?php endif; ?>
									</label>
								</div>
						<?php

						if (!isset($type->links[$i + 1]))
						{
							echo str_repeat('</li></ul>',
$link->level);
						}
						$prevlevel = $link->level;
						?>
						<?php endforeach; ?>
					</li>
					<?php endif; ?>
				<?php endforeach; ?>
			</ul>
			<div id="noresultsfound" style="display:none;"
class="alert alert-no-items">
				<?php echo JText::_('JGLOBAL_NO_MATCHING_RESULTS'); ?>
			</div>
			<div style="display:none;"
id="treeselectmenu">
				<div class="pull-left nav-hover treeselect-menu">
					<div class="btn-group">
						<a href="#" data-toggle="dropdown"
class="dropdown-toggle btn btn-micro">
							<span class="caret"></span>
						</a>
						<ul class="dropdown-menu">
							<li class="nav-header"><?php echo
JText::_('COM_MODULES_SUBITEMS'); ?></li>
							<li class="divider"></li>
							<li class=""><a class="checkall"
href="javascript://"><span class="icon-checkbox"
aria-hidden="true"></span> <?php echo
JText::_('JSELECT'); ?></a>
							</li>
							<li><a class="uncheckall"
href="javascript://"><span
class="icon-checkbox-unchecked"
aria-hidden="true"></span> <?php echo
JText::_('COM_MODULES_DESELECT'); ?></a>
							</li>
							<div class="treeselect-menu-expand">
							<li class="divider"></li>
							<li><a class="expandall"
href="javascript://"><span class="icon-plus"
aria-hidden="true"></span> <?php echo
JText::_('COM_MODULES_EXPAND'); ?></a></li>
							<li><a class="collapseall"
href="javascript://"><span class="icon-minus"
aria-hidden="true"></span> <?php echo
JText::_('COM_MODULES_COLLAPSE'); ?></a></li>
							</div>
						</ul>
					</div>
				</div>
			</div>
		</div>
		<?php endif; ?>
	</div>
</div>
module/tmpl/edit_options.php000064400000002476151160606320012227
0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_modules
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;
?>
<?php
	echo JHtml::_('bootstrap.startAccordion',
'moduleOptions', array('active' =>
'collapse0'));
	$fieldSets = $this->form->getFieldsets('params');
	$i = 0;

	foreach ($fieldSets as $name => $fieldSet) :
		$label = !empty($fieldSet->label) ? $fieldSet->label :
'COM_MODULES_' . $name . '_FIELDSET_LABEL';
		$class = isset($fieldSet->class) &&
!empty($fieldSet->class) ? $fieldSet->class : '';

		echo JHtml::_('bootstrap.addSlide', 'moduleOptions',
JText::_($label), 'collapse' . ($i++), $class);
			if (isset($fieldSet->description) &&
trim($fieldSet->description)) :
				echo '<p class="tip">' .
$this->escape(JText::_($fieldSet->description)) .
'</p>';
			endif;
			?>
				<?php foreach ($this->form->getFieldset($name) as $field) :
?>
					<div class="control-group">
						<div class="control-label">
							<?php echo $field->label; ?>
						</div>
						<div class="controls">
							<?php echo $field->input; ?>
						</div>
					</div>
				<?php endforeach;
		echo JHtml::_('bootstrap.endSlide');
	endforeach;
echo JHtml::_('bootstrap.endAccordion');
module/tmpl/edit_positions.php000064400000002240151160606320012550
0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_modules
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

JLoader::register('TemplatesHelper', JPATH_ADMINISTRATOR .
'/components/com_templates/helpers/templates.php');

JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html');
$clientId       = $this->item->client_id;
$state          = 1;
$selectedPosition = $this->item->position;
$positions = JHtml::_('modules.positions', $clientId, $state,
$selectedPosition);


// Add custom position to options
$customGroupText = JText::_('COM_MODULES_CUSTOM_POSITION');

// Build field
$attr = array(
	'id'          => 'jform_position',
	'list.select' => $this->item->position,
	'list.attr'   => 'class="chzn-custom-value"
'
	. 'data-custom_group_text="' . $customGroupText .
'" '
	. 'data-no_results_text="' .
JText::_('COM_MODULES_ADD_CUSTOM_POSITION') . '" '
	. 'data-placeholder="' .
JText::_('COM_MODULES_TYPE_OR_SELECT_POSITION') . '"
'
);

echo JHtml::_('select.groupedlist', $positions,
'jform[position]', $attr);
module/tmpl/modal.php000064400000001432151160606320010612 0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_modules
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

JHtml::_('bootstrap.tooltip', '.hasTooltip',
array('placement' => 'bottom'));
?>
<button id="applyBtn" type="button"
class="hidden"
onclick="Joomla.submitbutton('module.apply');"></button>
<button id="saveBtn" type="button"
class="hidden"
onclick="Joomla.submitbutton('module.save');"></button>
<button id="closeBtn" type="button"
class="hidden"
onclick="Joomla.submitbutton('module.cancel');"></button>

<div class="container-popup">
	<?php $this->setLayout('edit'); ?>
	<?php echo $this->loadTemplate(); ?>
</div>
module/view.json.php000064400000002045151160606320010465 0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_modules
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

/**
 * View to edit a module.
 *
 * @package     Joomla.Administrator
 * @subpackage  com_templates
 * @since       3.2
 */
class ModulesViewModule extends JViewLegacy
{
	protected $item;

	protected $form;

	protected $state;

	/**
	 * Display the view
	 *
	 * @param   string  $tpl  The name of the template file to parse;
automatically searches through the template paths.
	 *
	 * @return  void
	 */
	public function display($tpl = null)
	{
		$app = JFactory::getApplication();

		try
		{
			$this->item = $this->get('Item');
		}
		catch (Exception $e)
		{
			$app->enqueueMessage($e->getMessage(), 'error');

			return false;
		}

		$paramsList = $this->item->getProperties();

		unset($paramsList['xml']);

		$paramsList = json_encode($paramsList);

		return $paramsList;

	}
}
modules/tmpl/default.xml000064400000000320151160606320011331
0ustar00<?xml version="1.0" encoding="utf-8"?>
<metadata>
	<layout title="COM_MODULES_MODULES_VIEW_DEFAULT_TITLE">
		<message>
			<![CDATA[COM_MODULES_MODULES_VIEW_DEFAULT_DESC]]>
		</message>
	</layout>
</metadata>
modules/tmpl/modal.php000064400000012317151160606320011001 0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_modules
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

if (JFactory::getApplication()->isClient('site'))
{
	JSession::checkToken('get') or
die(JText::_('JINVALID_TOKEN'));
}

// Load needed scripts
JHtml::_('behavior.core');
JHtml::_('bootstrap.tooltip', '.hasTooltip',
array('placement' => 'bottom'));
JHtml::_('bootstrap.popover', '.hasPopover',
array('placement' => 'bottom'));
JHtml::_('formbehavior.chosen', 'select');

// Scripts for the modules xtd-button
JHtml::_('behavior.polyfill', array('event'), 'lt
IE 9');
JHtml::_('script',
'com_modules/admin-modules-modal.min.js',
array('version' => 'auto', 'relative'
=> true));

// Special case for the search field tooltip.
$searchFilterDesc =
$this->filterForm->getFieldAttribute('search',
'description', null, 'filter');
JHtml::_('bootstrap.tooltip', '#filter_search',
array('title' => JText::_($searchFilterDesc),
'placement' => 'bottom'));

$listOrder =
$this->escape($this->state->get('list.ordering'));
$listDirn  =
$this->escape($this->state->get('list.direction'));
$editor    =
JFactory::getApplication()->input->get('editor',
'', 'cmd');
$link      =
'index.php?option=com_modules&view=modules&layout=modal&tmpl=component&'
. JSession::getFormToken() . '=1';

if (!empty($editor))
{
	$link =
'index.php?option=com_modules&view=modules&layout=modal&tmpl=component&editor='
. $editor . '&' . JSession::getFormToken() . '=1';
}
?>
<div class="container-popup">

	<form action="<?php echo JRoute::_($link); ?>"
method="post" name="adminForm"
id="adminForm">

		<?php echo
JLayoutHelper::render('joomla.searchtools.default',
array('view' => $this)); ?>
		<?php if ($this->total > 0) : ?>
		<table class="table table-striped"
id="moduleList">
			<thead>
				<tr>
					<th width="1%" class="nowrap center">
						<?php echo JHtml::_('searchtools.sort',
'JSTATUS', 'a.published', $listDirn, $listOrder); ?>
					</th>
					<th class="title">
						<?php echo JHtml::_('searchtools.sort',
'JGLOBAL_TITLE', 'a.title', $listDirn, $listOrder);
?>
					</th>
					<th width="15%" class="nowrap hidden-phone">
						<?php echo JHtml::_('searchtools.sort',
'COM_MODULES_HEADING_POSITION', 'a.position',
$listDirn, $listOrder); ?>
					</th>
					<th width="10%" class="nowrap hidden-phone">
						<?php echo JHtml::_('searchtools.sort',
'COM_MODULES_HEADING_MODULE', 'name', $listDirn,
$listOrder); ?>
					</th>
					<th width="10%" class="nowrap hidden-phone
hidden-tablet">
						<?php echo JHtml::_('searchtools.sort',
'COM_MODULES_HEADING_PAGES', 'pages', $listDirn,
$listOrder); ?>
					</th>
					<th width="10%" class="nowrap hidden-phone">
						<?php echo JHtml::_('searchtools.sort',
'JGRID_HEADING_ACCESS', 'ag.title', $listDirn,
$listOrder); ?>
					</th>
					<th width="10%" class="nowrap hidden-phone">
						<?php echo JHtml::_('searchtools.sort',
'JGRID_HEADING_LANGUAGE', 'l.title', $listDirn,
$listOrder); ?>
					</th>
					<th width="1%" class="nowrap hidden-phone">
						<?php echo JHtml::_('searchtools.sort',
'JGRID_HEADING_ID', 'a.id', $listDirn, $listOrder);
?>
					</th>
				</tr>
			</thead>
			<tfoot>
				<tr>
					<td colspan="8">
						<?php echo $this->pagination->getListFooter(); ?>
					</td>
				</tr>
			</tfoot>
			<tbody>
				<?php
				$iconStates = array(
					-2 => 'icon-trash',
					0  => 'icon-unpublish',
					1  => 'icon-publish',
					2  => 'icon-archive',
				);
				foreach ($this->items as $i => $item) :
				?>
				<tr class="row<?php echo $i % 2; ?>">
					<td class="center">
						<span class="<?php echo
$iconStates[$this->escape($item->published)]; ?>"
aria-hidden="true"></span>
					</td>
					<td class="has-context">
						<a class="js-module-insert btn btn-small btn-block
btn-success" href="#" data-module="<?php echo
$item->id; ?>" data-editor="<?php echo
$this->escape($editor); ?>">
							<?php echo $this->escape($item->title); ?>
						</a>
					</td>
					<td class="small hidden-phone">
						<?php if ($item->position) : ?>
						<a class="js-position-insert btn btn-small btn-block
btn-warning" href="#" data-position="<?php echo
$this->escape($item->position); ?>"
data-editor="<?php echo $this->escape($editor);
?>"><?php echo $this->escape($item->position);
?></a>
						<?php else : ?>
						<span class="label"><?php echo
JText::_('JNONE'); ?></span>
						<?php endif; ?>
					</td>
					<td class="small hidden-phone">
						<?php echo $item->name; ?>
					</td>
					<td class="small hidden-phone hidden-tablet">
						<?php echo $item->pages; ?>
					</td>
					<td class="small hidden-phone">
						<?php echo $this->escape($item->access_level); ?>
					</td>
					<td class="small hidden-phone">
						<?php echo
JLayoutHelper::render('joomla.content.language', $item); ?>
					</td>
					<td class="hidden-phone">
						<?php echo (int) $item->id; ?>
					</td>
				</tr>
			<?php endforeach; ?>
			</tbody>
		</table>
		<?php endif; ?>

		<input type="hidden" name="task"
value="" />
		<input type="hidden" name="boxchecked"
value="0" />
		<input type="hidden" name="editor"
value="<?php echo $editor; ?>" />
		<?php echo JHtml::_('form.token'); ?>

	</form>
</div>
positions/tmpl/modal.php000064400000010204151160606320011351
0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_modules
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

// @deprecated  4.0 without replacement only used in hathor

defined('_JEXEC') or die;

JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html');

JHtml::_('formbehavior.chosen', 'select');

$function  =
JFactory::getApplication()->input->getCmd('function',
'jSelectPosition');
$lang      = JFactory::getLanguage();
$ordering  =
$this->escape($this->state->get('list.ordering'));
$direction =
$this->escape($this->state->get('list.direction'));
$clientId  = $this->state->get('client_id');
$state     = $this->state->get('filter.state');
$template  = $this->state->get('filter.template');
$type      = $this->state->get('filter.type');
?>
<form action="<?php echo
JRoute::_('index.php?option=com_modules&view=positions&layout=modal&tmpl=component&function='
. $function . '&client_id=' . $clientId); ?>"
method="post" name="adminForm"
id="adminForm">
	<fieldset class="filter clearfix">
		<div class="left">
			<label for="filter_search">
				<?php echo JText::_('JSEARCH_FILTER_LABEL'); ?>
			</label>
			<input type="text" name="filter_search"
id="filter_search" value="<?php echo
$this->escape($this->state->get('filter.search'));
?>" size="30" title="<?php echo
JText::_('COM_MODULES_FILTER_SEARCH_DESC'); ?>" />

			<button type="submit">
				<?php echo JText::_('JSEARCH_FILTER_SUBMIT');
?></button>
			<button type="button"
onclick="document.getElementById('filter_search').value='';this.form.submit();">
				<?php echo JText::_('JSEARCH_FILTER_CLEAR');
?></button>
		</div>

		<div class="right">
			<select name="filter_state"
onchange="this.form.submit()">
				<option value=""><?php echo
JText::_('JOPTION_SELECT_PUBLISHED'); ?></option>
				<?php echo JHtml::_('select.options',
JHtml::_('modules.templateStates'), 'value',
'text', $state, true); ?>
			</select>

			<select name="filter_type"
onchange="this.form.submit()">
				<option value=""><?php echo
JText::_('COM_MODULES_OPTION_SELECT_TYPE'); ?></option>
				<?php echo JHtml::_('select.options',
JHtml::_('modules.types'), 'value', 'text',
$type, true); ?>
			</select>

			<select name="filter_template"
onchange="this.form.submit()">
				<option value=""><?php echo
JText::_('JOPTION_SELECT_TEMPLATE'); ?></option>
				<?php echo JHtml::_('select.options',
JHtml::_('modules.templates', $clientId), 'value',
'text', $template, true); ?>
			</select>
		</div>
	</fieldset>

	<table class="adminlist">
		<thead>
			<tr>
				<th class="title" width="20%">
					<?php echo JHtml::_('grid.sort',
'JGLOBAL_TITLE', 'value', $direction, $ordering); ?>
				</th>
				<th>
					<?php echo JHtml::_('grid.sort',
'COM_MODULES_HEADING_TEMPLATES', 'templates',
$direction, $ordering); ?>
				</th>
			</tr>
		</thead>
		<tfoot>
			<tr>
				<td colspan="15">
					<?php echo $this->pagination->getListFooter(); ?>
				</td>
			</tr>
		</tfoot>
		<tbody>
		<?php $i = 1; foreach ($this->items as $value => $templates) :
?>
			<tr class="row<?php echo $i = 1 - $i; ?>">
				<td>
					<a class="pointer" onclick="if (window.parent)
window.parent.<?php echo $function; ?>('<?php echo $value;
?>');"><?php echo $this->escape($value);
?></a>
				</td>
				<td>
					<?php if (!empty($templates)) : ?>
					<a class="pointer" onclick="if (window.parent)
window.parent.<?php echo $function; ?>('<?php echo $value;
?>');">
						<ul>
						<?php foreach ($templates as $template => $label) : ?>
							<li><?php echo $lang->hasKey($label) ?
JText::sprintf('COM_MODULES_MODULE_TEMPLATE_POSITION',
JText::_($template), JText::_($label)) : JText::_($template);
?></li>
						<?php endforeach; ?>
						</ul>
					</a>
					<?php endif; ?>
				</td>
			</tr>
			<?php endforeach; ?>
		</tbody>
	</table>

	<div>
		<input type="hidden" name="task"
value="" />
		<input type="hidden" name="boxchecked"
value="0" />
		<input type="hidden" name="filter_order"
value="<?php echo $ordering; ?>" />
		<input type="hidden" name="filter_order_Dir"
value="<?php echo $direction; ?>" />
		<?php echo JHtml::_('form.token'); ?>
	</div>
</form>
positions/view.html.php000064400000001776151160606320011234
0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_modules
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

// @deprecated  4.0 without replacement only used in hathor

defined('_JEXEC') or die;

/**
 * View Module positions class.
 *
 * @since  1.6
 */
class ModulesViewPositions extends JViewLegacy
{
	protected $items;

	protected $pagination;

	protected $state;

	/**
	 * Display the view
	 *
	 * @param   string  $tpl  The name of the template file to parse;
automatically searches through the template paths.
	 *
	 * @return  void
	 */
	public function display($tpl = null)
	{
		$this->items      = $this->get('Items');
		$this->pagination = $this->get('Pagination');
		$this->state      = $this->get('State');

		// Check for errors.
		if (count($errors = $this->get('Errors')))
		{
			throw new Exception(implode("\n", $errors), 500);
		}

		parent::display($tpl);
	}
}
preview/tmpl/default.php000064400000001551151160606320011340
0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_modules
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

// @deprecated  4.0 not used for a long time

defined('_JEXEC') or die;

JFactory::getDocument()->addScriptDeclaration(
	'
	var form = window.top.document.adminForm
	var title = form.title.value;
	var alltext = window.top.' .
$this->editor->getContent('text') . ';

	jQuery(document).ready(function() {
		document.getElementById("td-title").innerHTML = title;
		document.getElementById("td-text").innerHTML = alltext;
	});'
);
?>

<table class="center" width="90%">
	<tr>
		<td class="contentheading" colspan="2"
id="td-title"></td>
	</tr>
<tr>
	<td valign="top" height="90%" colspan="2"
id="td-text"></td>
</tr>
</table>
preview/view.html.php000064400000001425151160606320010655 0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_modules
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

// @deprecated  4.0 not used for a long time

defined('_JEXEC') or die;

/**
 * HTML View class for the Modules component
 *
 * @since  1.6
 */
class ModulesViewPreview extends JViewLegacy
{
	/**
	 * Display the view
	 *
	 * @param   string  $tpl  The name of the template file to parse;
automatically searches through the template paths.
	 *
	 * @return  void
	 */
	public function display($tpl = null)
	{
		$editor = JFactory::getConfig()->get('editor');

		$this->editor = JEditor::getInstance($editor);

		parent::display($tpl);
	}
}
select/tmpl/default.php000064400000002356151160606320011142
0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_modules
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html');

JHtml::_('bootstrap.popover');
$document = JFactory::getDocument();
?>

<h2><?php echo JText::_('COM_MODULES_TYPE_CHOOSE');
?></h2>
<ul id="new-modules-list" class="list
list-striped">
<?php foreach ($this->items as &$item) : ?>
	<?php // Prepare variables for the link. ?>
	<?php $link       =
'index.php?option=com_modules&task=module.add&eid=' .
$item->extension_id; ?>
	<?php $name       = $this->escape($item->name); ?>
	<?php $desc       = JHtml::_('string.truncate',
$this->escape(strip_tags($item->desc)), 200); ?>
	<?php $short_desc = JHtml::_('string.truncate',
$this->escape(strip_tags($item->desc)), 90); ?>
	<li>
		<a href="<?php echo JRoute::_($link); ?>">
			<strong><?php echo $name; ?></strong></a>
		<small class="hasPopover" data-placement="right"
title="<?php echo $name; ?>" data-content="<?php
echo $desc; ?>"><?php echo $short_desc; ?></small>
	</li>
<?php endforeach; ?>
</ul>
<div class="clr"></div>
select/view.html.php000064400000003144151160606320010453 0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_modules
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

/**
 * HTML View class for the Modules component
 *
 * @since  1.6
 */
class ModulesViewSelect extends JViewLegacy
{
	protected $state;

	protected $items;

	/**
	 * Display the view
	 *
	 * @param   string  $tpl  The name of the template file to parse;
automatically searches through the template paths.
	 *
	 * @return  void
	 */
	public function display($tpl = null)
	{
		$state = $this->get('State');
		$items = $this->get('Items');

		// Check for errors.
		if (count($errors = $this->get('Errors')))
		{
			throw new Exception(implode("\n", $errors), 500);
		}

		$this->state = &$state;
		$this->items = &$items;

		$this->addToolbar();
		parent::display($tpl);
	}

	/**
	 * Add the page title and toolbar.
	 *
	 * @return  void
	 *
	 * @since   1.6
	 */
	protected function addToolbar()
	{
		$state = $this->get('State');

		// Add page title
		if ($state->get('client_id') == 1)
		{
			JToolbarHelper::title(JText::_('COM_MODULES_MANAGER_MODULES_ADMIN'),
'cube module');
		}
		else
		{
			JToolbarHelper::title(JText::_('COM_MODULES_MANAGER_MODULES_SITE'),
'cube module');
		}

		// Get the toolbar object instance
		$bar = JToolbar::getInstance('toolbar');

		// Instantiate a new JLayoutFile instance and render the layout
		$layout = new JLayoutFile('toolbar.cancelselect');

		$bar->appendButton('Custom', $layout->render(array()),
'new');
	}
}
email_history/index.html000064400000000054151161116400011404
0ustar00<html><body
bgcolor="#FFFFFF"></body></html>email_history/tmpl/form.php000064400000015131151161116400012041
0ustar00<?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');
?><div class="iframedoc"
id="iframedoc"></div>
<form action="<?php echo
hikashop_completeLink('email_history'); ?>"
method="post" name="adminForm" id="adminForm"
>
<div id="page-email_log" class="hk-row-fluid
hikashop_backend_tile_edition">
	<div class="hkc-md-6">
				<div class="hikashop_tile_block">
					<div>
						<div class="hikashop_tile_title"><?php
							echo JText::_('MAIN_INFORMATION');
						?></div>
					<table class="admintable table">
						<tr>
							<td class="key">
								<?php echo JText::_( 'FROM_NAME' ); ?>
							</td>
							<td>
								<?php echo
$this->escape(@$this->element->email_log_sender_name); ?>
							</td>
						</tr>
						<tr>
							<td class="key">
								<?php echo JText::_( 'FROM_ADDRESS' ); ?>
							</td>
							<td>
								<?php echo
$this->escape(@$this->element->email_log_sender_email); ?>
							</td>
						</tr>
						<tr>
							<td class="key">
								<?php echo JText::_( 'TO_NAME' ); ?>
							</td>
							<td>
								<?php echo
$this->escape(@$this->element->email_log_recipient_name); ?>
							</td>
						</tr>
						<tr>
							<td class="key">
								<?php echo JText::_( 'TO_ADDRESS' ); ?>
							</td>
							<td>
								<?php echo
$this->escape(@$this->element->email_log_recipient_email); ?>
							</td>
						</tr>
						<tr>
							<td class="key">
								<?php echo JText::_( 'REPLYTO_NAME' ); ?>
							</td>
							<td>
								<?php echo
$this->escape(@$this->element->email_log_reply_name); ?>
							</td>
						</tr>
						<tr>
							<td class="key">
								<?php echo JText::_( 'REPLYTO_ADDRESS' ); ?>
							</td>
							<td>
								<?php echo
$this->escape(@$this->element->email_log_reply_email); ?>
							</td>
						</tr>
						<tr>
							<td class="key">
								<?php echo JText::_( 'BCC' ); ?>
							</td>
							<td>
								<?php echo
$this->escape(@$this->element->email_log_bcc_email); ?>
							</td>
						</tr>
						<tr>
							<td class="key">
								<?php echo JText::_( 'CC' ); ?>
							</td>
							<td>
								<?php echo
$this->escape(@$this->element->email_log_cc_email); ?>
							</td>
						</tr>
						<tr>
							<td class="key">
								<?php echo JText::_( 'EMAIL_SUBJECT' ); ?>
							</td>
							<td>
								<?php echo
$this->escape($this->element->email_log_subject); ?>
							</td>
						</tr>
						<tr>
							<td class="key">
								<?php echo JText::_( 'DATE' ); ?>
							</td>
							<td>
								<?php echo
hikashop_getDate($this->element->email_log_date);?>
							</td>
						</tr>
					</table>
				</div></div>
				<div class="hikashop_tile_block">
					<div>
						<div class="hikashop_tile_title"><?php
							echo JText::_('ORDER_ADD_INFO');
						?></div>
					<table class="admintable table">
						<tr>
							<td class="key">
								<?php echo JText::_( 'HIKA_EMAIL' ); ?>
							</td>
							<td>
								<?php echo JText::_(@$this->element->email_log_name);
?>
							</td>
						</tr>
<?php if(!empty($this->element->email_log_ref_id)){ ?>
						<tr>
							<td class="key">
							<?php
								if(in_array($this->element->email_log_name,$this->email_order_id)
)
									 echo JText::_( 'ORDER_NUMBER' );

								if(in_array($this->element->email_log_name,$this->email_product_id)
)
									 echo JText::_( 'PRODUCT_NAME' );

								if(in_array($this->element->email_log_name,$this->email_user_id)
)
									 echo JText::_( 'CLIENT' );
							?>
							</td>
							<td>
								<?php
if(in_array($this->element->email_log_name,$this->email_order_id)
){  ?>
									<a href="<?php echo
hikashop_completeLink('order&task=edit&cid[]='.$this->element->email_log_ref_id.'&cancel_redirect='.urlencode(base64_encode(hikashop_completeLink('email_log&task=edit&cid[]='.$this->element->email_log_id))));
?>"><?php echo @$this->email_order_number;
?></a>
								<?php } ?>
								<?php
if(in_array($this->element->email_log_name,$this->email_product_id)
){  ?>
									<a href="<?php echo
hikashop_completeLink('product&task=edit&cid[]='.$this->element->email_log_ref_id.'&cancel_redirect='.urlencode(base64_encode(hikashop_completeLink('email_log&task=edit&cid[]='.$this->element->email_log_id))));
?>"><?php echo @$this->email_product_name;
?></a>
								<?php } ?>
								<?php
if(in_array($this->element->email_log_name,$this->email_user_id)
){  ?>
									<a href="<?php echo
hikashop_completeLink('user&task=edit&cid[]='.$this->element->email_log_ref_id.'&cancel_redirect='.urlencode(hikashop_completeLink('email_log&task=edit&cid[]='.$this->element->email_log_id)));
?>"><?php echo $this->escape(@$this->email_user_name);
?></a>
								<?php } ?>
							</td>
						</tr>
<?php } ?>
					</table>
				</div></div>
<?php if(!empty($data->email_log_params['attachments'])) {
?>
				<div class="hikashop_tile_block">
					<div>
						<div class="hikashop_tile_title"><?php
							echo JText::_('ATTACHMENTS');
						?></div>
					<table class="adminlist table table-striped
table-hover">
						<thead>
							<tr>
								<th class="title titlenum">
									<?php echo JText::_( 'HIKA_NUM' );?>
								</th>
								<th class="title">
									<?php echo JText::_( 'HIKA_NAME' );?>
								</th>
								<th class="title">
									<?php echo JText::_( 'HIKA_PATH' );?>
								</th>
							</tr>
						</thead>
						<tbody>
<?php
							$i = 1;
							$k = 0;
							foreach($data->email_log_params['attachments'] as
$attach) {
?>
							<tr class="row<?php echo $k; ?>">
								<td class="hk_center">
									<?php echo $i; ?>
								</td>
								<td>
									<a href="<?php echo $attach->url;
?>"><?php echo $attach->name; ?></a>
								</td>
								<td>
									<?php echo $attach->filename; ?>
								</td>
							</tr>
<?php
								$k = 1-$k;
								$i++;
							}
?>
						</tbody>
					</table>
				</div></div>
<?php } ?>
	</div>
	<div class="hkc-md-6">
		<?php echo $this->loadTemplate('param'); ?>
	</div>
</div>

	<div style="clear:both"
class="clr"></div>
	<input type="hidden" name="option"
value="<?php echo HIKASHOP_COMPONENT; ?>" />
	<input type="hidden" name="cid"
value="<?php echo $this->element->email_log_id; ?>"
/>
	<input type="hidden" name="task" value=""
/>
	<input type="hidden" name="ctrl"
value="email_history" />
	<?php echo JHTML::_( 'form.token' ); ?>
</form>
email_history/tmpl/form_param.php000064400000002375151161116400013227
0ustar00<?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');
?><div id="hikashop_email_preview">
	<ul class="hika_tabs"
rel="tabs:hikashop_email_history_tab_">
		<li class="active"><a href="#html_version"
rel="tab:html_version" onclick="return
window.hikashop.switchTab(this);"><?php echo
JText::_('HTML_VERSION'); ?></a></li>
		<li><a href="#text_version"
rel="tab:text_version" onclick="return
window.hikashop.switchTab(this);"><?php echo
JText::_('TEXT_VERSION'); ?></a></li>
	</ul>
	<div id="hikashop_email_history_tab_html_version">
<?php
if (!empty($this->element->email_log_body)) {
	$pattern  = '/(src=")(?!https?:\/\/)/i';
	$replacement = '$1';
 	$this->element->email_log_body =
preg_replace($pattern,$replacement.HIKASHOP_LIVE,@$this->element->email_log_body);
 	echo @$this->element->email_log_body;
}
?>
	</div>
	<div id="hikashop_email_history_tab_text_version"
style="display:none;background-color:white;">
<?php
if (!empty($this->element->email_log_altbody))
	echo nl2br(@$this->element->email_log_altbody);
?>
	</div>
</div>
email_history/tmpl/index.html000064400000000054151161116400012360
0ustar00<html><body
bgcolor="#FFFFFF"></body></html>email_history/tmpl/listing.php000064400000010324151161116400012546
0ustar00<?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');
?><div class="iframedoc"
id="iframedoc"></div>
<form action="<?php echo
hikashop_completeLink('email_history'); ?>"
method="post" name="adminForm"
id="adminForm">
<div class="hk-row-fluid">
	<div class="hkc-md-5 hika_j4_search"><?php
		echo $this->loadHkLayout('search', array());
	?></div>
	<div id="hikashop_listing_filters_id" class="hkc-md-7
hikashop_listing_filters" style="text-align: right;">
		<?php echo
$this->filter_type->display('filter_type',$this->pageInfo->filter->filter_type)
?>
	</div>
</div>
	<table id="hikashop_email_history_listing"
class="adminlist table table-striped table-hover"
cellpadding="1">
		<thead>
			<tr>
				<th class="title titlenum">
					<?php echo JText::_( 'HIKA_NUM' );?>
				</th>
				<th class="title titlebox">
					<input type="checkbox" name="toggle"
value="" onclick="hikashop.checkAll(this);" />
				</th>
				<th class="title">
					<?php echo JHTML::_('grid.sort',
JText::_('TO_ADDRESS'), 'a.email_log_recipient_email',
$this->pageInfo->filter->order->dir,$this->pageInfo->filter->order->value
); ?>
				</th>
				<th class="title">
					<?php echo JHTML::_('grid.sort',
JText::_('REPLYTO_ADDRESS'), 'a.email_log_reply_email',
$this->pageInfo->filter->order->dir,$this->pageInfo->filter->order->value
); ?>
				</th>
				<th class="title">
					<?php echo JHTML::_('grid.sort',
JText::_('EMAIL_SUBJECT'), 'a.email_log_subject',
$this->pageInfo->filter->order->dir,$this->pageInfo->filter->order->value
); ?>
				</th>
				<th class="title">
					<?php echo JHTML::_('grid.sort',
JText::_('DATE'), 'a.email_log_date',
$this->pageInfo->filter->order->dir,$this->pageInfo->filter->order->value
); ?>
				</th>
				<th class="title">
					<?php echo JHTML::_('grid.sort',
JText::_('HIKA_EMAIL'), 'a.email_log_name',
$this->pageInfo->filter->order->dir,$this->pageInfo->filter->order->value
); ?>
				</th>
				<th class="title">
					<?php echo JHTML::_('grid.sort',
JText::_('ID'), 'a.email_log_id',
$this->pageInfo->filter->order->dir,
$this->pageInfo->filter->order->value ); ?>
				</th>
			</tr>
		</thead>
		<tfoot>
			<tr>
				<td colspan="8">
					<?php echo $this->pagination->getListFooter(); ?>
					<?php echo $this->pagination->getResultsCounter(); ?>
				</td>
			</tr>
		</tfoot>
		<tbody>
<?php
	$k = 0;
	$i = 0;
	foreach($this->rows as $row){
?>
			<tr class="row<?php echo $k; ?>">
				<td class="hk_center">
					<?php echo $this->pagination->getRowOffset($i); ?>
				</td>
				<td class="hk_center">
					<?php echo JHTML::_('grid.id', $i, $row->email_log_id
); ?>
				</td>
				<td>
					<?php echo $row->email_log_recipient_email; ?>
				</td>
				<td>
					<?php echo $row->email_log_reply_email; ?>
				</td>
				<td>
<?php if($this->manage){ ?>
					<a href="<?php echo
hikashop_completeLink('email_history&task=edit&cid[]='.(int)$row->email_log_id);
?>">
<?php } ?>
					<?php
						if(!empty($row->email_log_subject))
							echo $row->email_log_subject;
						else
							echo
'<em>'.JText::_('HIKA_NONE').'</em>';
					?>
<?php if($this->manage){ ?>
					</a>
<?php } ?>
				</td>
				<td>
					<?php echo hikashop_getDate($row->email_log_date); ?>
				</td>
				<td>
					<?php echo
str_replace('%s','',JText::_(strip_tags($row->email_log_name)));
?>
				</td>
				<td width="1%" class="hk_center">
					<?php echo (int)$row->email_log_id; ?>
				</td>
			</tr>
<?php
		$k = 1-$k;
		$i++;
	}
?>
		</tbody>
	</table>
	<input type="hidden" name="option"
value="<?php echo HIKASHOP_COMPONENT; ?>" />
	<input type="hidden" name="task" value=""
/>
	<input type="hidden" name="ctrl"
value="<?php echo hikaInput::get()->getCmd('ctrl');
?>" />
	<input type="hidden" name="boxchecked"
value="0" />
	<input type="hidden" name="filter_order"
value="<?php echo
$this->pageInfo->filter->order->value; ?>" />
	<input type="hidden" name="filter_order_Dir"
value="<?php echo $this->pageInfo->filter->order->dir;
?>" />
	<?php echo JHTML::_( 'form.token' ); ?>
</form>
email_history/view.html.php000064400000013477151161116400012052
0ustar00<?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 Email_historyViewEmail_history extends hikashopView {
	var $ctrl = 'email_history';
	var $nameListing = 'EMAIL_LOG';
	var $nameForm = 'EMAIL_LOG';
	var $icon = 'envelope';

	function display($tpl = null) {
		$this->paramBase =
HIKASHOP_COMPONENT.'.'.$this->getName();
		$function = $this->getLayout();
		if(method_exists($this,$function))
			$this->$function();
		parent::display($tpl);
	}

	function listing() {
		$app = JFactory::getApplication();
		$database = JFactory::getDBO();
		$config =& hikashop_config();

		include_once dirname(dirname(dirname(__FILE__))) . DS .
'email_history_class.php';
		$emailHistoryClass = new hikashopPlg_email_historyClass();
		$emailHistoryClass->initDB();

		$pageInfo = $this->getPageInfo('a.email_log_id',
'DESC');
		$pageInfo->filter->filter_type = $app->getUserStateFromRequest(
$this->paramBase.".filter_type",'filter_type','','string');

		$filters = array();
		$order = '';
		$searchMap =
array('a.email_log_recipient_email','a.email_log_id');
		if(!empty($pageInfo->filter->filter_type)){
			switch($pageInfo->filter->filter_type){
				case 'all':
					break;
				default:
					$filters[] = 'a.email_log_name =
'.$database->Quote($pageInfo->filter->filter_type);
					break;
			}
		}
		$filters[] = 'a.email_log_published = 1';
		$this->processFilters($filters, $order, $searchMap);
		$query = ' FROM '.hikashop_table('email_log').'
AS a'.$filters.$order;
		$this->getPageInfoTotal($query, '*');
		$database->setQuery('SELECT
a.*'.$query,$pageInfo->limit->start,$pageInfo->limit->value);
		$rows = $database->loadObjectList();

		$fields = array('email_log_recipient_email',
'email_log_reply_email', 'email_log_subject');
		foreach($rows as &$row) {
			foreach($fields as $field) {
				if(isset($row->$field))
					$row->$field = $this->escape($row->$field);
			}
		}
		unset($row);

		if(!empty($pageInfo->search)){
			$rows = hikashop_search($pageInfo->search, $rows,
'email_log_id');
		}


		$emailType = hikashop_get('type.email_log');
		$this->assignRef('filter_type',$emailType);
		$this->assignRef('rows',$rows);
		$this->assignRef('pageInfo',$pageInfo);
		$this->getPagination();
		$this->getOrdering('a.email_log_date', true);
		$this->assignRef('order',$order);
		hikashop_setTitle(JText::_($this->nameListing),$this->icon,$this->ctrl);

		$manage =
hikashop_isAllowed($config->get('acl_email_log_manage','all'));
		$this->assignRef('manage',$manage);

		$this->toolbar = array(
			array('name' =>
'editList','display'=>$manage),
			array('name' =>
'deleteList','display'=>hikashop_isAllowed($config->get('acl_email_log_delete','all'))),
			'|',
			array('name' => 'pophelp', 'target'
=> $this->ctrl.'-listing'),
			'dashboard'
		);
	}

	function form() {
		$tabs = hikashop_get('helper.tabs');
		$email_log_id = hikashop_getCID('email_log_id');
		$config =& hikashop_config();

		$email_logClass = hikashop_get('class.plg_email_history');
		if(!empty($email_log_id)) {
			$element = $email_logClass->get($email_log_id,true);
			$task='edit';
		}
		hikashop_setTitle(JText::_($this->nameForm),$this->icon,$this->ctrl.'&task='.$task.'&email_log_id='.$email_log_id);

		$manage =
hikashop_isAllowed($config->get('acl_email_log_manage','all'));
		$this->toolbar = array(
			array('name' => 'custom', 'icon' => 
'mail', 'alt' => JText::_('RESEND'),
'task' => 'resend', 'check' => false,
'display' => $manage),
			'cancel',
			'|',
			array('name' => 'pophelp', 'target'
=> $this->ctrl.'-listing')
		);
		$email_order_id = array(
			'order_admin_notification',
			'order_creation_notification',
			'order_status_notification',
			'order_notification',
			'payment_notification',
			'order_cancel'
		);
		$email_product_id = array(
			'contact_request',
			'new_comment',
		);
		$email_user_id = array(
			'user_account',
			'user_account_admin_notification',
		);

		if(in_array($element->email_log_name,$email_product_id)){
			$productClass = hikashop_get('class.product');
			$productClass->getProducts($element->email_log_ref_id);
			if(isset($productClass->products[$element->email_log_ref_id]))
				$fullProduct =
$productClass->products[$element->email_log_ref_id];
			elseif(isset($productClass->all_products[$element->email_log_ref_id])
&&
isset($productClass->all_products[$element->email_log_ref_id]->product_parent_id)){
				$productClass->getProducts($productClass->all_products[$element->email_log_ref_id]->product_parent_id);
				$fullProduct =
$productClass->products[$productClass->all_products[$element->email_log_ref_id]->product_parent_id];
			}
			if(isset($fullProduct->product_name) &&
!empty($fullProduct->product_name))
				$this->assignRef('email_product_name',$fullProduct->product_name);
		}

		if(in_array($element->email_log_name,$email_order_id)){
			$orderClass = hikashop_get('class.order');
			$fullOrder = $orderClass->get($element->email_log_ref_id);
			if(isset($fullOrder->order_number) &&
!empty($fullOrder->order_number))
				$this->assignRef('email_order_number',$fullOrder->order_number);
		}

		if(in_array($element->email_log_name,$email_user_id)){
			$userClass = hikashop_get('class.user');
			$fullUser = $userClass->get($element->email_log_ref_id);
			if(isset($fullUser->name) && !empty($fullUser->name))
				$this->assignRef('email_user_name',$fullUser->name);
		}

		$this->assignRef('email_order_id',$email_order_id);
		$this->assignRef('email_product_id',$email_product_id);
		$this->assignRef('email_user_id',$email_user_id);

		$this->assignRef('tabs',$tabs);
		$this->assignRef('element',$element);
	}
}
debuggroup/tmpl/default.php000064400000007744151161164400012033
0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_users
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

// Include the component HTML helpers.
JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html');

JHtml::_('bootstrap.tooltip');
JHtml::_('formbehavior.chosen', 'select');

$listOrder =
$this->escape($this->state->get('list.ordering'));
$listDirn  =
$this->escape($this->state->get('list.direction'));
$colSpan   = 4 + count($this->actions);
?>
<form action="<?php echo
JRoute::_('index.php?option=com_users&view=debuggroup&group_id='
. (int) $this->state->get('group_id')); ?>"
method="post" name="adminForm"
id="adminForm">
<?php if (!empty( $this->sidebar)) : ?>
	<div id="j-sidebar-container" class="span2">
		<?php echo $this->sidebar; ?>
	</div>
	<div id="j-main-container" class="span10">
<?php else : ?>
	<div id="j-main-container">
<?php endif; ?>
		<?php echo
JLayoutHelper::render('joomla.searchtools.default',
array('view' => $this)); ?>
		<div class="clearfix"> </div>
		<table class="table table-striped">
			<thead>
				<tr>
					<th class="nowrap">
						<?php echo JHtml::_('searchtools.sort',
'COM_USERS_HEADING_ASSET_TITLE', 'a.title', $listDirn,
$listOrder); ?>
					</th>
					<th class="nowrap">
						<?php echo JHtml::_('searchtools.sort',
'COM_USERS_HEADING_ASSET_NAME', 'a.name', $listDirn,
$listOrder); ?>
					</th>
					<?php foreach ($this->actions as $key => $action) : ?>
					<th width="5%" class="center">
						<span class="hasTooltip" title="<?php echo
JHtml::_('tooltipText', $key, $action[1]);
?>"><?php echo JText::_($key); ?></span>
					</th>
					<?php endforeach; ?>
					<th width="5%" class="nowrap center">
						<?php echo JHtml::_('searchtools.sort',
'COM_USERS_HEADING_LFT', 'a.lft', $listDirn,
$listOrder); ?>
					</th>
					<th width="1%" class="nowrap center">
						<?php echo JHtml::_('searchtools.sort',
'JGRID_HEADING_ID', 'a.id', $listDirn, $listOrder);
?>
					</th>
				</tr>
			</thead>
			<tfoot>
				<tr>
					<td colspan="<?php echo $colSpan; ?>">
						<?php echo $this->pagination->getListFooter(); ?>
					</td>
				</tr>
			</tfoot>
			<tbody>
				<?php foreach ($this->items as $i => $item) : ?>
					<tr class="row0">
						<td>
							<?php echo $this->escape($item->title); ?>
						</td>
						<td class="nowrap">
							<?php echo
JLayoutHelper::render('joomla.html.treeprefix',
array('level' => $item->level + 1)) .
$this->escape($item->name); ?>
						</td>
						<?php foreach ($this->actions as $action) : ?>
							<?php
							$name  = $action[0];
							$check = $item->checks[$name];
							if ($check === true) :
								$class  = 'icon-ok';
								$button = 'btn-success';
							elseif ($check === false) :
								$class  = 'icon-remove';
								$button = 'btn-danger';
							elseif ($check === null) :
								$class  = 'icon-ban-circle';
								$button = 'btn-warning';
							else :
								$class  = '';
								$button = '';
							endif;
							?>
						<td class="center">
							<span class="icon-white <?php echo $class;
?>"></span>
						</td>
						<?php endforeach; ?>
						<td class="center">
							<?php echo (int) $item->lft; ?>
							- <?php echo (int) $item->rgt; ?>
						</td>
						<td class="center">
							<?php echo (int) $item->id; ?>
						</td>
					</tr>
				<?php endforeach; ?>
			</tbody>
		</table>
		<input type="hidden" name="task"
value="" />
		<input type="hidden" name="boxchecked"
value="0" />
		<?php echo JHtml::_('form.token'); ?>
		<div>
			<?php echo JText::_('COM_USERS_DEBUG_LEGEND'); ?>
			<span class="icon-white
icon-ban-circle"></span><?php echo
JText::_('COM_USERS_DEBUG_IMPLICIT_DENY'); ?>&nbsp;
			<span class="icon-white icon-ok"></span><?php
echo JText::_('COM_USERS_DEBUG_EXPLICIT_ALLOW'); ?>&nbsp;
			<span class="icon-white
icon-remove"></span><?php echo
JText::_('COM_USERS_DEBUG_EXPLICIT_DENY'); ?>
			<br /><br />
		</div>
	</div>
</form>
debuggroup/view.html.php000064400000004567151161164400011350
0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_users
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

/**
 * View class for a list of User Group ACL permissions.
 *
 * @since  1.6
 */
class UsersViewDebuggroup extends JViewLegacy
{
	protected $actions;

	/**
	 * The item data.
	 *
	 * @var   object
	 * @since 1.6
	 */
	protected $items;

	/**
	 * The pagination object.
	 *
	 * @var   JPagination
	 * @since 1.6
	 */
	protected $pagination;

	/**
	 * The model state.
	 *
	 * @var   JObject
	 * @since 1.6
	 */
	protected $state;

	/**
	 * Display the view
	 *
	 * @param   string  $tpl  The name of the template file to parse;
automatically searches through the template paths.
	 *
	 * @return  void
	 */
	public function display($tpl = null)
	{
		// Access check.
		if (!JFactory::getUser()->authorise('core.manage',
'com_users'))
		{
			throw new
JAccessExceptionNotallowed(JText::_('JERROR_ALERTNOAUTHOR'),
403);
		}

		$this->actions       = $this->get('DebugActions');
		$this->items         = $this->get('Items');
		$this->pagination    = $this->get('Pagination');
		$this->state         = $this->get('State');
		$this->group         = $this->get('Group');
		$this->filterForm    = $this->get('FilterForm');
		$this->activeFilters = $this->get('ActiveFilters');

		// Vars only used in hathor.
		// @deprecated  4.0 To be removed with Hathor
		$this->levels        = UsersHelperDebug::getLevelsOptions();
		$this->components    = UsersHelperDebug::getComponents();

		// Check for errors.
		if (count($errors = $this->get('Errors')))
		{
			throw new Exception(implode("\n", $errors), 500);
		}

		$this->addToolbar();

		parent::display($tpl);
	}

	/**
	 * Add the page title and toolbar.
	 *
	 * @return  void
	 *
	 * @since   1.6
	 */
	protected function addToolbar()
	{
		$canDo = JHelperContent::getActions('com_users');

		JToolbarHelper::title(JText::sprintf('COM_USERS_VIEW_DEBUG_GROUP_TITLE',
$this->group->id, $this->escape($this->group->title)),
'users groups');
		JToolbarHelper::cancel('group.cancel',
'JTOOLBAR_CLOSE');

		if ($canDo->get('core.admin') ||
$canDo->get('core.options'))
		{
			JToolbarHelper::preferences('com_users');
			JToolbarHelper::divider();
		}

		JToolbarHelper::help('JHELP_USERS_DEBUG_GROUPS');
	}
}
debuguser/tmpl/default.php000064400000007741151161164400011652
0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_users
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

// Include the component HTML helpers.
JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html');

JHtml::_('bootstrap.tooltip');
JHtml::_('formbehavior.chosen', 'select');

$listOrder =
$this->escape($this->state->get('list.ordering'));
$listDirn  =
$this->escape($this->state->get('list.direction'));
$colSpan   = 4 + count($this->actions);
?>
<form action="<?php echo
JRoute::_('index.php?option=com_users&view=debuguser&user_id='
. (int) $this->state->get('user_id')); ?>"
method="post" name="adminForm"
id="adminForm">
<?php if (!empty( $this->sidebar)) : ?>
	<div id="j-sidebar-container" class="span2">
		<?php echo $this->sidebar; ?>
	</div>
	<div id="j-main-container" class="span10">
<?php else : ?>
	<div id="j-main-container">
<?php endif; ?>
		<?php echo
JLayoutHelper::render('joomla.searchtools.default',
array('view' => $this)); ?>
		<div class="clearfix"> </div>
		<table class="table table-striped">
			<thead>
				<tr>
					<th class="nowrap">
						<?php echo JHtml::_('searchtools.sort',
'COM_USERS_HEADING_ASSET_TITLE', 'a.title', $listDirn,
$listOrder); ?>
					</th>
					<th class="nowrap">
						<?php echo JHtml::_('searchtools.sort',
'COM_USERS_HEADING_ASSET_NAME', 'a.name', $listDirn,
$listOrder); ?>
					</th>
					<?php foreach ($this->actions as $key => $action) : ?>
					<th width="5%" class="center">
						<span class="hasTooltip" title="<?php echo
JHtml::_('tooltipText', $key, $action[1]);
?>"><?php echo JText::_($key); ?></span>
					</th>
					<?php endforeach; ?>
					<th width="5%" class="nowrap center">
						<?php echo JHtml::_('searchtools.sort',
'COM_USERS_HEADING_LFT', 'a.lft', $listDirn,
$listOrder); ?>
					</th>
					<th width="1%" class="nowrap center">
						<?php echo JHtml::_('searchtools.sort',
'JGRID_HEADING_ID', 'a.id', $listDirn, $listOrder);
?>
					</th>
				</tr>
			</thead>
			<tfoot>
				<tr>
					<td colspan="<?php echo $colSpan; ?>">
						<?php echo $this->pagination->getListFooter(); ?>
					</td>
				</tr>
			</tfoot>
			<tbody>
				<?php foreach ($this->items as $i => $item) : ?>
					<tr class="row0">
						<td>
							<?php echo $this->escape($item->title); ?>
						</td>
						<td class="nowrap">
							<?php echo
JLayoutHelper::render('joomla.html.treeprefix',
array('level' => $item->level + 1)) .
$this->escape($item->name); ?>
						</td>
						<?php foreach ($this->actions as $action) : ?>
							<?php
							$name  = $action[0];
							$check = $item->checks[$name];
							if ($check === true) :
								$class  = 'icon-ok';
								$button = 'btn-success';
							elseif ($check === false) :
								$class  = 'icon-remove';
								$button = 'btn-danger';
							elseif ($check === null) :
								$class  = 'icon-ban-circle';
								$button = 'btn-warning';
							else :
								$class  = '';
								$button = '';
							endif;
							?>
						<td class="center">
							<span class="icon-white <?php echo $class;
?>"></span>
						</td>
						<?php endforeach; ?>
						<td class="center">
							<?php echo (int) $item->lft; ?>
							- <?php echo (int) $item->rgt; ?>
						</td>
						<td class="center">
							<?php echo (int) $item->id; ?>
						</td>
					</tr>
				<?php endforeach; ?>
			</tbody>
		</table>
		<input type="hidden" name="task"
value="" />
		<input type="hidden" name="boxchecked"
value="0" />
		<?php echo JHtml::_('form.token'); ?>
		<div>
			<?php echo JText::_('COM_USERS_DEBUG_LEGEND'); ?>
			<span class="icon-white
icon-ban-circle"></span><?php echo
JText::_('COM_USERS_DEBUG_IMPLICIT_DENY'); ?>&nbsp;
			<span class="icon-white icon-ok"></span><?php
echo JText::_('COM_USERS_DEBUG_EXPLICIT_ALLOW'); ?>&nbsp;
			<span class="icon-white
icon-remove"></span><?php echo
JText::_('COM_USERS_DEBUG_EXPLICIT_DENY'); ?>
			<br /><br />
		</div>
	</div>
</form>
debuguser/view.html.php000064400000004547151161164400011170
0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_users
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

/**
 * View class for a list of User ACL permissions.
 *
 * @since  1.6
 */
class UsersViewDebuguser extends JViewLegacy
{
	protected $actions;

	/**
	 * The item data.
	 *
	 * @var   object
	 * @since 1.6
	 */
	protected $items;

	/**
	 * The pagination object.
	 *
	 * @var   JPagination
	 * @since 1.6
	 */
	protected $pagination;

	/**
	 * The model state.
	 *
	 * @var   JObject
	 * @since 1.6
	 */
	protected $state;

	/**
	 * Display the view
	 *
	 * @param   string  $tpl  The name of the template file to parse;
automatically searches through the template paths.
	 *
	 * @return  void
	 */
	public function display($tpl = null)
	{
		// Access check.
		if (!JFactory::getUser()->authorise('core.manage',
'com_users'))
		{
			throw new
JAccessExceptionNotallowed(JText::_('JERROR_ALERTNOAUTHOR'),
403);
		}

		$this->actions       = $this->get('DebugActions');
		$this->items         = $this->get('Items');
		$this->pagination    = $this->get('Pagination');
		$this->state         = $this->get('State');
		$this->user          = $this->get('User');
		$this->filterForm    = $this->get('FilterForm');
		$this->activeFilters = $this->get('ActiveFilters');

		// Vars only used in hathor.
		// @deprecated  4.0 To be removed with Hathor
		$this->levels        = UsersHelperDebug::getLevelsOptions();
		$this->components    = UsersHelperDebug::getComponents();

		// Check for errors.
		if (count($errors = $this->get('Errors')))
		{
			throw new Exception(implode("\n", $errors), 500);
		}

		$this->addToolbar();

		parent::display($tpl);
	}

	/**
	 * Add the page title and toolbar.
	 *
	 * @return  void
	 *
	 * @since   1.6
	 */
	protected function addToolbar()
	{
		$canDo = JHelperContent::getActions('com_users');

		JToolbarHelper::title(JText::sprintf('COM_USERS_VIEW_DEBUG_USER_TITLE',
$this->user->id, $this->escape($this->user->name)),
'users user');
		JToolbarHelper::cancel('user.cancel',
'JTOOLBAR_CLOSE');

		if ($canDo->get('core.admin') ||
$canDo->get('core.options'))
		{
			JToolbarHelper::preferences('com_users');
			JToolbarHelper::divider();
		}

		JToolbarHelper::help('JHELP_USERS_DEBUG_USERS');
	}
}
group/tmpl/edit.php000064400000005516151161164400010320 0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_fields
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */
defined('_JEXEC') or die;

// Include the component HTML helpers.
JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html');

JHtml::_('behavior.formvalidator');
JHtml::_('behavior.keepalive');
JHtml::_('behavior.tabstate');
JHtml::_('formbehavior.chosen', 'select');

$app = JFactory::getApplication();
$input = $app->input;

JFactory::getDocument()->addScriptDeclaration('
	Joomla.submitbutton = function(task)
	{
		if (task == "group.cancel" ||
document.formvalidator.isValid(document.getElementById("item-form")))
		{
			Joomla.submitform(task, document.getElementById("item-form"));
		}
	};
');
?>

<form action="<?php echo
JRoute::_('index.php?option=com_fields&layout=edit&id=' .
(int) $this->item->id); ?>" method="post"
name="adminForm" id="item-form"
class="form-validate">
	<?php echo JLayoutHelper::render('joomla.edit.title_alias',
$this); ?>
	<div class="form-horizontal">
		<?php echo JHtml::_('bootstrap.startTabSet',
'myTab', array('active' => 'general'));
?>
		<?php echo JHtml::_('bootstrap.addTab', 'myTab',
'general',
JText::_('COM_FIELDS_VIEW_FIELD_FIELDSET_GENERAL', true)); ?>
		<div class="row-fluid">
			<div class="span9">
				<?php echo $this->form->renderField('label'); ?>
				<?php echo $this->form->renderField('description');
?>
			</div>
			<div class="span3">
				<?php $this->set('fields',
						array(
							array(
								'published',
								'state',
								'enabled',
							),
							'access',
							'language',
							'note',
						)
				); ?>
				<?php echo JLayoutHelper::render('joomla.edit.global',
$this); ?>
				<?php $this->set('fields', null); ?>
			</div>
		</div>
		<?php echo JHtml::_('bootstrap.endTab'); ?>
		<?php echo JHtml::_('bootstrap.addTab', 'myTab',
'publishing', JText::_('JGLOBAL_FIELDSET_PUBLISHING',
true)); ?>
		<div class="row-fluid form-horizontal-desktop">
			<div class="span6">
				<?php echo
JLayoutHelper::render('joomla.edit.publishingdata', $this); ?>
			</div>
			<div class="span6">
			</div>
		</div>
		<?php echo JHtml::_('bootstrap.endTab'); ?>
		<?php $this->set('ignore_fieldsets',
array('fieldparams')); ?>
		<?php echo JLayoutHelper::render('joomla.edit.params',
$this); ?>
		<?php if ($this->canDo->get('core.admin')) : ?>
			<?php echo JHtml::_('bootstrap.addTab', 'myTab',
'rules', JText::_('JGLOBAL_ACTION_PERMISSIONS_LABEL',
true)); ?>
			<?php echo $this->form->getInput('rules'); ?>
			<?php echo JHtml::_('bootstrap.endTab'); ?>
		<?php endif; ?>
		<?php echo JHtml::_('bootstrap.endTabSet'); ?>
		<?php echo $this->form->getInput('context'); ?>
		<input type="hidden" name="task"
value="" />
		<?php echo JHtml::_('form.token'); ?>
	</div>
</form>
group/tmpl/edit.xml000064400000000302151161164400010315 0ustar00<?xml
version="1.0" encoding="utf-8"?>
<metadata>
	<layout title="COM_USERS_GROUP_VIEW_EDIT_TITLE">
		<message>
			<![CDATA[COM_USERS_GROUP_VIEW_EDIT_DESC]]>
		</message>
	</layout>
</metadata>
group/view.html.php000064400000007116151161164400010332 0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_fields
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */
defined('_JEXEC') or die;

/**
 * Group View
 *
 * @since  3.7.0
 */
class FieldsViewGroup extends JViewLegacy
{
	/**
	 * @var  JForm
	 *
	 * @since  3.7.0
	 */
	protected $form;

	/**
	 * @var  JObject
	 *
	 * @since  3.7.0
	 */
	protected $item;

	/**
	 * @var  JObject
	 *
	 * @since  3.7.0
	 */
	protected $state;

	/**
	 * The actions the user is authorised to perform
	 *
	 * @var  JObject
	 *
	 * @since  3.7.0
	 */
	protected $canDo;


	/**
	 * Execute and display a template script.
	 *
	 * @param   string  $tpl  The name of the template file to parse;
automatically searches through the template paths.
	 *
	 * @return  mixed  A string if successful, otherwise an Error object.
	 *
	 * @see     JViewLegacy::loadTemplate()
	 * @since   3.7.0
	 */
	public function display($tpl = null)
	{
		$this->form  = $this->get('Form');
		$this->item  = $this->get('Item');
		$this->state = $this->get('State');

		$component = '';
		$parts     =
FieldsHelper::extract($this->state->get('filter.context'));

		if ($parts)
		{
			$component = $parts[0];
		}

		$this->canDo = JHelperContent::getActions($component,
'fieldgroup', $this->item->id);

		// Check for errors.
		if (count($errors = $this->get('Errors')))
		{
			throw new Exception(implode("\n", $errors), 500);
		}

		JFactory::getApplication()->input->set('hidemainmenu',
true);

		$this->addToolbar();

		return parent::display($tpl);
	}

	/**
	 * Adds the toolbar.
	 *
	 * @return  void
	 *
	 * @since   3.7.0
	 */
	protected function addToolbar()
	{
		$component = '';
		$parts     =
FieldsHelper::extract($this->state->get('filter.context'));

		if ($parts)
		{
			$component = $parts[0];
		}

		$userId    = JFactory::getUser()->get('id');
		$canDo     = $this->canDo;

		$isNew      = ($this->item->id == 0);
		$checkedOut = !($this->item->checked_out == 0 ||
$this->item->checked_out == $userId);

		// Avoid nonsense situation.
		if ($component == 'com_fields')
		{
			return;
		}

		// Load component language file
		$lang = JFactory::getLanguage();
		$lang->load($component, JPATH_ADMINISTRATOR)
		|| $lang->load($component, JPath::clean(JPATH_ADMINISTRATOR .
'/components/' . $component));

		$title = JText::sprintf('COM_FIELDS_VIEW_GROUP_' . ($isNew ?
'ADD' : 'EDIT') . '_TITLE',
JText::_(strtoupper($component)));

		// Prepare the toolbar.
		JToolbarHelper::title(
			$title,
			'puzzle field-' . ($isNew ? 'add' :
'edit') . ' ' . substr($component, 4) .
'-group-' .
			($isNew ? 'add' : 'edit')
		);

		// For new records, check the create permission.
		if ($isNew)
		{
			JToolbarHelper::apply('group.apply');
			JToolbarHelper::save('group.save');
			JToolbarHelper::save2new('group.save2new');
		}

		// If not checked out, can save the item.
		elseif (!$checkedOut && ($canDo->get('core.edit') ||
($canDo->get('core.edit.own') &&
$this->item->created_by == $userId)))
		{
			JToolbarHelper::apply('group.apply');
			JToolbarHelper::save('group.save');

			if ($canDo->get('core.create'))
			{
				JToolbarHelper::save2new('group.save2new');
			}
		}

		// If an existing item, can save to a copy.
		if (!$isNew && $canDo->get('core.create'))
		{
			JToolbarHelper::save2copy('group.save2copy');
		}

		if (empty($this->item->id))
		{
			JToolbarHelper::cancel('group.cancel');
		}
		else
		{
			JToolbarHelper::cancel('group.cancel',
'JTOOLBAR_CLOSE');
		}

		JToolbarHelper::help('JHELP_COMPONENTS_FIELDS_FIELD_GROUPS_EDIT');
	}
}
groups/tmpl/default.php000064400000016216151161164400011201
0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_fields
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */
defined('_JEXEC') or die;

// Include the component HTML helpers.
JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html');

JHtml::_('bootstrap.tooltip');
JHtml::_('behavior.multiselect');
JHtml::_('formbehavior.chosen', 'select');

$app       = JFactory::getApplication();
$user      = JFactory::getUser();
$userId    = $user->get('id');

$component = '';
$parts     =
FieldsHelper::extract($this->state->get('filter.context'));

if ($parts)
{
	$component = $this->escape($parts[0]);
}

$listOrder =
$this->escape($this->state->get('list.ordering'));
$listDirn  =
$this->escape($this->state->get('list.direction'));
$ordering  = ($listOrder == 'a.ordering');
$saveOrder = ($listOrder == 'a.ordering' &&
strtolower($listDirn) == 'asc');

if ($saveOrder)
{
	$saveOrderingUrl =
'index.php?option=com_fields&task=groups.saveOrderAjax&tmpl=component';
	JHtml::_('sortablelist.sortable', 'groupList',
'adminForm', strtolower($listDirn), $saveOrderingUrl, false,
true);
}
?>

<form action="<?php echo
JRoute::_('index.php?option=com_fields&view=groups');
?>" method="post" name="adminForm"
id="adminForm">
	<div id="j-sidebar-container" class="span2">
		<?php echo $this->sidebar; ?>
	</div>
	<div id="j-main-container" class="span10">
		<div id="filter-bar" class="js-stools-container-bar
pull-left">
			<div class="btn-group pull-left">
				<?php echo
$this->filterForm->getField('context')->input; ?>
			</div>&nbsp;
		</div>
		<?php echo
JLayoutHelper::render('joomla.searchtools.default',
array('view' => $this)); ?>
		<?php if (empty($this->items)) : ?>
			<div class="alert alert-no-items">
				<?php echo JText::_('JGLOBAL_NO_MATCHING_RESULTS'); ?>
			</div>
		<?php else : ?>
			<table class="table table-striped"
id="groupList">
				<thead>
					<tr>
						<th width="1%" class="nowrap center
hidden-phone">
							<?php echo JHtml::_('searchtools.sort', '',
'a.ordering', $listDirn, $listOrder, null, 'asc',
'JGRID_HEADING_ORDERING', 'icon-menu-2'); ?>
						</th>
						<th width="1%" class="center">
							<?php echo JHtml::_('grid.checkall'); ?>
						</th>
						<th width="1%" class="nowrap center">
							<?php echo JHtml::_('searchtools.sort',
'JSTATUS', 'a.state', $listDirn, $listOrder); ?>
						</th>
						<th>
							<?php echo JHtml::_('searchtools.sort',
'JGLOBAL_TITLE', 'a.title', $listDirn, $listOrder);
?>
						</th>
						<th width="10%" class="nowrap
hidden-phone">
							<?php echo JHtml::_('searchtools.sort',
'JGRID_HEADING_ACCESS', 'a.access', $listDirn,
$listOrder); ?>
						</th>
						<th width="5%" class="nowrap hidden-phone">
							<?php echo JHtml::_('searchtools.sort',
'JGRID_HEADING_LANGUAGE', 'a.language', $listDirn,
$listOrder); ?>
						</th>
						<th width="1%" class="nowrap hidden-phone">
							<?php echo JHtml::_('searchtools.sort',
'JGRID_HEADING_ID', 'a.id', $listDirn, $listOrder);
?>
						</th>
					</tr>
				</thead>
				<tfoot>
					<tr>
						<td colspan="9">
							<?php echo $this->pagination->getListFooter(); ?>
						</td>
					</tr>
				</tfoot>
				<tbody>
					<?php foreach ($this->items as $i => $item) : ?>
						<?php $ordering   = ($listOrder == 'a.ordering'); ?>
						<?php $canEdit    = $user->authorise('core.edit',
$component . '.fieldgroup.' . $item->id); ?>
						<?php $canCheckin = $user->authorise('core.admin',
'com_checkin') || $item->checked_out == $userId ||
$item->checked_out == 0; ?>
						<?php $canEditOwn = $user->authorise('core.edit.own',
$component . '.fieldgroup.' . $item->id) &&
$item->created_by == $userId; ?>
						<?php $canChange  =
$user->authorise('core.edit.state', $component .
'.fieldgroup.' . $item->id) && $canCheckin; ?>
						<tr class="row<?php echo $i % 2; ?>"
item-id="<?php echo $item->id ?>">
							<td class="order nowrap center hidden-phone">
								<?php $iconClass = ''; ?>
								<?php if (!$canChange) : ?>
									<?php $iconClass = ' inactive'; ?>
								<?php elseif (!$saveOrder) : ?>
									<?php $iconClass = ' inactive tip-top hasTooltip"
title="' . JHtml::tooltipText('JORDERINGDISABLED');
?>
								<?php endif; ?>
								<span class="sortable-handler<?php echo $iconClass;
?>">
									<span class="icon-menu"
aria-hidden="true"></span>
								</span>
								<?php if ($canChange && $saveOrder) : ?>
									<input type="text" style="display:none"
name="order[]" size="5" value="<?php echo
$item->ordering; ?>" />
								<?php endif; ?>
							</td>
							<td class="center">
								<?php echo JHtml::_('grid.id', $i, $item->id);
?>
							</td>
							<td class="center">
								<div class="btn-group">
									<?php echo JHtml::_('jgrid.published',
$item->state, $i, 'groups.', $canChange, 'cb');
?>
									<?php // Create dropdown items and render the dropdown list.
?>
									<?php if ($canChange) : ?>
										<?php JHtml::_('actionsdropdown.' . ((int)
$item->state === 2 ? 'un' : '') .
'archive', 'cb' . $i, 'groups'); ?>
										<?php JHtml::_('actionsdropdown.' . ((int)
$item->state === -2 ? 'un' : '') .
'trash', 'cb' . $i, 'groups'); ?>
										<?php echo JHtml::_('actionsdropdown.render',
$this->escape($item->title)); ?>
									<?php endif; ?>
								</div>
							</td>
							<td>
								<div class="pull-left break-word">
									<?php if ($item->checked_out) : ?>
										<?php echo JHtml::_('jgrid.checkedout', $i,
$item->editor, $item->checked_out_time, 'groups.',
$canCheckin); ?>
									<?php endif; ?>
									<?php if ($canEdit || $canEditOwn) : ?>
										<a href="<?php echo
JRoute::_('index.php?option=com_fields&task=group.edit&id='
. $item->id); ?>">
											<?php echo $this->escape($item->title); ?></a>
									<?php else : ?>
										<?php echo $this->escape($item->title); ?>
									<?php endif; ?>
									<span class="small break-word">
										<?php if ($item->note) : ?>
											<?php echo JText::sprintf('JGLOBAL_LIST_NOTE',
$this->escape($item->note)); ?>
										<?php endif; ?>
									</span>
								</div>
							</td>
							<td class="small hidden-phone">
								<?php echo $this->escape($item->access_level); ?>
							</td>
							<td class="small nowrap hidden-phone">
								<?php echo
JLayoutHelper::render('joomla.content.language', $item); ?>
							</td>
							<td class="center hidden-phone">
								<span><?php echo (int) $item->id; ?></span>
							</td>
						</tr>
					<?php endforeach; ?>
				</tbody>
			</table>
			<?php //Load the batch processing form. ?>
			<?php if ($user->authorise('core.create', $component)
				&& $user->authorise('core.edit', $component)
				&& $user->authorise('core.edit.state',
$component)) : ?>
				<?php echo JHtml::_(
						'bootstrap.renderModal',
						'collapseModal',
						array(
							'title' =>
JText::_('COM_FIELDS_VIEW_GROUPS_BATCH_OPTIONS'),
							'footer' =>
$this->loadTemplate('batch_footer')
						),
						$this->loadTemplate('batch_body')
					); ?>
			<?php endif; ?>
		<?php endif; ?>
		<input type="hidden" name="task"
value="" />
		<input type="hidden" name="boxchecked"
value="0" />
		<?php echo JHtml::_('form.token'); ?>
	</div>
</form>
groups/tmpl/default.xml000064400000000312151161164400011200
0ustar00<?xml version="1.0" encoding="utf-8"?>
<metadata>
	<layout title="COM_USERS_GROUPS_VIEW_DEFAULT_TITLE">
		<message>
			<![CDATA[COM_USERS_GROUPS_VIEW_DEFAULT_DESC]]>
		</message>
	</layout>
</metadata>
groups/view.html.php000064400000011576151161164400010522 0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_fields
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */
defined('_JEXEC') or die;

/**
 * Groups View
 *
 * @since  3.7.0
 */
class FieldsViewGroups extends JViewLegacy
{
	/**
	 * @var  JForm
	 *
	 * @since  3.7.0
	 */
	public $filterForm;

	/**
	 * @var  array
	 *
	 * @since  3.7.0
	 */
	public $activeFilters;

	/**
	 * @var  array
	 *
	 * @since  3.7.0
	 */
	protected $items;

	/**
	 * @var  JPagination
	 *
	 * @since  3.7.0
	 */
	protected $pagination;

	/**
	 * @var  JObject
	 *
	 * @since  3.7.0
	 */
	protected $state;

	/**
	 * @var  string
	 *
	 * @since  3.7.0
	 */
	protected $sidebar;

	/**
	 * Execute and display a template script.
	 *
	 * @param   string  $tpl  The name of the template file to parse;
automatically searches through the template paths.
	 *
	 * @return  mixed  A string if successful, otherwise an Error object.
	 *
	 * @see     JViewLegacy::loadTemplate()
	 * @since   3.7.0
	 */
	public function display($tpl = null)
	{
		$this->state         = $this->get('State');
		$this->items         = $this->get('Items');
		$this->pagination    = $this->get('Pagination');
		$this->filterForm    = $this->get('FilterForm');
		$this->activeFilters = $this->get('ActiveFilters');

		// Check for errors.
		if (count($errors = $this->get('Errors')))
		{
			throw new Exception(implode("\n", $errors), 500);
		}

		// Display a warning if the fields system plugin is disabled
		if (!JPluginHelper::isEnabled('system', 'fields'))
		{
			$link =
JRoute::_('index.php?option=com_plugins&task=plugin.edit&extension_id='
. FieldsHelper::getFieldsPluginId());
			JFactory::getApplication()->enqueueMessage(JText::sprintf('COM_FIELDS_SYSTEM_PLUGIN_NOT_ENABLED',
$link), 'warning');
		}

		$this->addToolbar();

		FieldsHelper::addSubmenu($this->state->get('filter.context'),
'groups');
		$this->sidebar = JHtmlSidebar::render();

		return parent::display($tpl);
	}

	/**
	 * Adds the toolbar.
	 *
	 * @return  void
	 *
	 * @since   3.7.0
	 */
	protected function addToolbar()
	{
		$groupId   = $this->state->get('filter.group_id');
		$component = '';
		$parts     =
FieldsHelper::extract($this->state->get('filter.context'));

		if ($parts)
		{
			$component = $parts[0];
		}

		$canDo     = JHelperContent::getActions($component,
'fieldgroup', $groupId);

		// Get the toolbar object instance
		$bar = JToolbar::getInstance('toolbar');

		// Avoid nonsense situation.
		if ($component == 'com_fields')
		{
			return;
		}

		// Load component language file
		$lang = JFactory::getLanguage();
		$lang->load($component, JPATH_ADMINISTRATOR)
		|| $lang->load($component, JPath::clean(JPATH_ADMINISTRATOR .
'/components/' . $component));

		$title = JText::sprintf('COM_FIELDS_VIEW_GROUPS_TITLE',
JText::_(strtoupper($component)));

		// Prepare the toolbar.
		JToolbarHelper::title($title, 'puzzle fields ' .
substr($component, 4) . '-groups');

		if ($canDo->get('core.create'))
		{
			JToolbarHelper::addNew('group.add');
		}

		if ($canDo->get('core.edit') ||
$canDo->get('core.edit.own'))
		{
			JToolbarHelper::editList('group.edit');
		}

		if ($canDo->get('core.edit.state'))
		{
			JToolbarHelper::publish('groups.publish',
'JTOOLBAR_PUBLISH', true);
			JToolbarHelper::unpublish('groups.unpublish',
'JTOOLBAR_UNPUBLISH', true);
			JToolbarHelper::archiveList('groups.archive');
		}

		if (JFactory::getUser()->authorise('core.admin'))
		{
			JToolbarHelper::checkin('groups.checkin');
		}

		// Add a batch button
		if ($canDo->get('core.create') &&
$canDo->get('core.edit') &&
$canDo->get('core.edit.state'))
		{
			$title = JText::_('JTOOLBAR_BATCH');

			// Instantiate a new JLayoutFile instance and render the batch button
			$layout = new JLayoutFile('joomla.toolbar.batch');

			$dhtml = $layout->render(
				array(
					'title' => $title,
				)
			);

			$bar->appendButton('Custom', $dhtml, 'batch');
		}

		if ($canDo->get('core.admin') ||
$canDo->get('core.options'))
		{
			JToolbarHelper::preferences($component);
		}

		if ($this->state->get('filter.state') == -2 &&
$canDo->get('core.delete', $component))
		{
			JToolbarHelper::deleteList('', 'groups.delete',
'JTOOLBAR_EMPTY_TRASH');
		}
		elseif ($canDo->get('core.edit.state'))
		{
			JToolbarHelper::trash('groups.trash');
		}

		JToolbarHelper::help('JHELP_COMPONENTS_FIELDS_FIELD_GROUPS');
	}

	/**
	 * Returns the sort fields.
	 *
	 * @return  array
	 *
	 * @since   3.7.0
	 */
	protected function getSortFields()
	{
		return array(
			'a.ordering'  =>
JText::_('JGRID_HEADING_ORDERING'),
			'a.state'     => JText::_('JSTATUS'),
			'a.title'     => JText::_('JGLOBAL_TITLE'),
			'a.access'    =>
JText::_('JGRID_HEADING_ACCESS'),
			'language'    =>
JText::_('JGRID_HEADING_LANGUAGE'),
			'a.context'   =>
JText::_('JGRID_HEADING_CONTEXT'),
			'a.id'        => JText::_('JGRID_HEADING_ID'),
		);
	}
}
level/tmpl/edit.php000064400000002703151161164400010266 0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_users
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

// Include the component HTML helpers.
JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html');

JHtml::_('behavior.formvalidator');

JFactory::getDocument()->addScriptDeclaration("
	Joomla.submitbutton = function(task)
	{
		if (task == 'level.cancel' ||
document.formvalidator.isValid(document.getElementById('level-form')))
		{
			Joomla.submitform(task,
document.getElementById('level-form'));
		}
	};
");
?>

<form action="<?php echo
JRoute::_('index.php?option=com_users&id=' . (int)
$this->item->id); ?>" method="post"
name="adminForm" id="level-form"
class="form-validate form-horizontal">
	<fieldset>
		<legend><?php echo
JText::_('COM_USERS_LEVEL_DETAILS'); ?></legend>
		<div class="control-group">
			<div class="control-label">
				<?php echo $this->form->getLabel('title'); ?>
			</div>
			<div class="controls">
				<?php echo $this->form->getInput('title'); ?>
			</div>
		</div>
	</fieldset>

	<fieldset>
		<legend><?php echo
JText::_('COM_USERS_USER_GROUPS_HAVING_ACCESS');
?></legend>
		<?php echo JHtml::_('access.usergroups',
'jform[rules]', $this->item->rules, true); ?>
	</fieldset>
	<input type="hidden" name="task" value=""
/>
	<?php echo JHtml::_('form.token'); ?>
</form>
level/tmpl/edit.xml000064400000000302151161164400010270 0ustar00<?xml
version="1.0" encoding="utf-8"?>
<metadata>
	<layout title="COM_USERS_LEVEL_VIEW_EDIT_TITLE">
		<message>
			<![CDATA[COM_USERS_LEVEL_VIEW_EDIT_DESC]]>
		</message>
	</layout>
</metadata>
level/view.html.php000064400000004131151161164400010277 0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_users
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

/**
 * View to edit a user view level.
 *
 * @since  1.6
 */
class UsersViewLevel extends JViewLegacy
{
	protected $form;

	/**
	 * The item data.
	 *
	 * @var   object
	 * @since 1.6
	 */
	protected $item;

	/**
	 * The model state.
	 *
	 * @var   JObject
	 * @since 1.6
	 */
	protected $state;

	/**
	 * Display the view
	 *
	 * @param   string  $tpl  The name of the template file to parse;
automatically searches through the template paths.
	 *
	 * @return  void
	 */
	public function display($tpl = null)
	{
		$this->form  = $this->get('Form');
		$this->item  = $this->get('Item');
		$this->state = $this->get('State');

		// Check for errors.
		if (count($errors = $this->get('Errors')))
		{
			throw new Exception(implode("\n", $errors), 500);
		}

		$this->addToolbar();
		parent::display($tpl);
	}

	/**
	 * Add the page title and toolbar.
	 *
	 * @return  void
	 *
	 * @since   1.6
	 */
	protected function addToolbar()
	{
		JFactory::getApplication()->input->set('hidemainmenu',
true);

		$isNew = ($this->item->id == 0);
		$canDo = JHelperContent::getActions('com_users');

		JToolbarHelper::title(JText::_($isNew ?
'COM_USERS_VIEW_NEW_LEVEL_TITLE' :
'COM_USERS_VIEW_EDIT_LEVEL_TITLE'), 'users
levels-add');

		if ($canDo->get('core.edit') ||
$canDo->get('core.create'))
		{
			JToolbarHelper::apply('level.apply');
			JToolbarHelper::save('level.save');
		}

		if ($canDo->get('core.create'))
		{
			JToolbarHelper::save2new('level.save2new');
		}

		// If an existing item, can save to a copy.
		if (!$isNew && $canDo->get('core.create'))
		{
			JToolbarHelper::save2copy('level.save2copy');
		}

		if (empty($this->item->id))
		{
			JToolbarHelper::cancel('level.cancel');
		}
		else
		{
			JToolbarHelper::cancel('level.cancel',
'JTOOLBAR_CLOSE');
		}

		JToolbarHelper::divider();
		JToolbarHelper::help('JHELP_USERS_ACCESS_LEVELS_EDIT');
	}
}
levels/tmpl/default.php000064400000011435151161164400011152
0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_users
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

// Include the component HTML helpers.
JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html');

JHtml::_('bootstrap.tooltip');
JHtml::_('behavior.multiselect');
JHtml::_('formbehavior.chosen', 'select');

$user       = JFactory::getUser();
$listOrder  =
$this->escape($this->state->get('list.ordering'));
$listDirn   =
$this->escape($this->state->get('list.direction'));
$saveOrder  = $listOrder == 'a.ordering';

if ($saveOrder)
{
	$saveOrderingUrl =
'index.php?option=com_users&task=levels.saveOrderAjax&tmpl=component';
	JHtml::_('sortablelist.sortable', 'levelList',
'adminForm', strtolower($listDirn), $saveOrderingUrl);
}

?>
<form action="<?php echo
JRoute::_('index.php?option=com_users&view=levels');
?>" method="post" id="adminForm"
name="adminForm">
<?php if (!empty( $this->sidebar)) : ?>
	<div id="j-sidebar-container" class="span2">
		<?php echo $this->sidebar; ?>
	</div>
	<div id="j-main-container" class="span10">
<?php else : ?>
	<div id="j-main-container">
<?php endif; ?>
		<?php echo
JLayoutHelper::render('joomla.searchtools.default',
array('view' => $this, 'options' =>
array('filterButton' => false))); ?>
		<div class="clearfix"> </div>
		<?php if (empty($this->items)) : ?>
			<div class="alert alert-no-items">
				<?php echo JText::_('JGLOBAL_NO_MATCHING_RESULTS'); ?>
			</div>
		<?php else : ?>
			<table class="table table-striped"
id="levelList">
				<thead>
					<tr>
						<th width="1%" class="nowrap center
hidden-phone">
							<?php echo JHtml::_('searchtools.sort', '',
'a.ordering', $listDirn, $listOrder, null, 'asc',
'JGRID_HEADING_ORDERING', 'icon-menu-2'); ?>
						</th>
						<th width="1%">
							<?php echo JHtml::_('grid.checkall'); ?>
						</th>
						<th>
							<?php echo JHtml::_('searchtools.sort',
'COM_USERS_HEADING_LEVEL_NAME', 'a.title', $listDirn,
$listOrder); ?>
						</th>
						<th class="nowrap hidden-phone">
							<?php echo
JText::_('COM_USERS_USER_GROUPS_HAVING_ACCESS'); ?>
						</th>
						<th width="1%" class="nowrap hidden-phone">
							<?php echo JHtml::_('searchtools.sort',
'JGRID_HEADING_ID', 'a.id', $listDirn, $listOrder);
?>
						</th>
					</tr>
				</thead>
				<tfoot>
					<tr>
						<td colspan="5">
							<?php echo $this->pagination->getListFooter(); ?>
						</td>
					</tr>
				</tfoot>
				<tbody>
				<?php $count = count($this->items); ?>
				<?php foreach ($this->items as $i => $item) :
					$ordering  = ($listOrder == 'a.ordering');
					$canCreate = $user->authorise('core.create',    
'com_users');
					$canEdit   = $user->authorise('core.edit',      
'com_users');
					$canChange = $user->authorise('core.edit.state',
'com_users');

					// Decode level groups
					$groups = json_decode($item->rules);

					// If this group is super admin and this user is not super admin,
$canEdit is false
					if (!JFactory::getUser()->authorise('core.admin')
&& JAccess::checkGroup($groups[0], 'core.admin'))
					{
						$canEdit   = false;
						$canChange = false;
					}
					?>
					<tr class="row<?php echo $i % 2; ?>">
						<td class="order nowrap center hidden-phone">
							<?php
							$iconClass = '';
							if (!$canChange)
							{
								$iconClass = ' inactive';
							}
							elseif (!$saveOrder)
							{
								$iconClass = ' inactive tip-top hasTooltip"
title="' . JHtml::_('tooltipText',
'JORDERINGDISABLED');
							}
							?>
							<span class="sortable-handler<?php echo $iconClass
?>">
								<span class="icon-menu"
aria-hidden="true"></span>
							</span>
							<?php if ($canChange && $saveOrder) : ?>
								<input type="text" style="display:none"
name="order[]" size="5" value="<?php echo
$item->ordering; ?>" class="width-20 text-area-order"
/>
							<?php endif; ?>
						</td>
						<td class="center">
							<?php if ($canEdit) : ?>
								<?php echo JHtml::_('grid.id', $i, $item->id);
?>
							<?php endif; ?>
						</td>
						<td>
							<?php if ($canEdit) : ?>
							<a href="<?php echo
JRoute::_('index.php?option=com_users&task=level.edit&id='
. $item->id); ?>">
								<?php echo $this->escape($item->title); ?></a>
							<?php else : ?>
								<?php echo $this->escape($item->title); ?>
							<?php endif; ?>
						</td>
						<td class="hidden-phone">
							<?php echo UsersHelper::getVisibleByGroups($item->rules);
?>
						</td>
						<td class="hidden-phone">
							<?php echo (int) $item->id; ?>
						</td>
					</tr>
				<?php endforeach; ?>
				</tbody>
			</table>
		<?php endif; ?>
		<input type="hidden" name="task"
value="" />
		<input type="hidden" name="boxchecked"
value="0" />
		<?php echo JHtml::_('form.token'); ?>
	</div>
</form>
levels/tmpl/default.xml000064400000000312151161164400011153
0ustar00<?xml version="1.0" encoding="utf-8"?>
<metadata>
	<layout title="COM_USERS_LEVELS_VIEW_DEFAULT_TITLE">
		<message>
			<![CDATA[COM_USERS_LEVELS_VIEW_DEFAULT_DESC]]>
		</message>
	</layout>
</metadata>
levels/view.html.php000064400000005124151161164400010465 0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_users
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

/**
 * View class for a list of view levels.
 *
 * @since  1.6
 */
class UsersViewLevels extends JViewLegacy
{
	/**
	 * The item data.
	 *
	 * @var   object
	 * @since 1.6
	 */
	protected $items;

	/**
	 * The pagination object.
	 *
	 * @var   JPagination
	 * @since 1.6
	 */
	protected $pagination;

	/**
	 * The model state.
	 *
	 * @var   JObject
	 * @since 1.6
	 */
	protected $state;

	/**
	 * Display the view
	 *
	 * @param   string  $tpl  The name of the template file to parse;
automatically searches through the template paths.
	 *
	 * @return  void
	 */
	public function display($tpl = null)
	{
		$this->items         = $this->get('Items');
		$this->pagination    = $this->get('Pagination');
		$this->state         = $this->get('State');
		$this->filterForm    = $this->get('FilterForm');
		$this->activeFilters = $this->get('ActiveFilters');

		UsersHelper::addSubmenu('levels');

		// Check for errors.
		if (count($errors = $this->get('Errors')))
		{
			throw new Exception(implode("\n", $errors), 500);
		}

		$this->addToolbar();
		$this->sidebar = JHtmlSidebar::render();
		parent::display($tpl);
	}

	/**
	 * Add the page title and toolbar.
	 *
	 * @return void
	 *
	 * @since   1.6
	 */
	protected function addToolbar()
	{
		$canDo = JHelperContent::getActions('com_users');

		JToolbarHelper::title(JText::_('COM_USERS_VIEW_LEVELS_TITLE'),
'users levels');

		if ($canDo->get('core.create'))
		{
			JToolbarHelper::addNew('level.add');
		}

		if ($canDo->get('core.edit'))
		{
			JToolbarHelper::editList('level.edit');
			JToolbarHelper::divider();
		}

		if ($canDo->get('core.delete'))
		{
			JToolbarHelper::deleteList('JGLOBAL_CONFIRM_DELETE',
'level.delete', 'JTOOLBAR_DELETE');
			JToolbarHelper::divider();
		}

		if ($canDo->get('core.admin') ||
$canDo->get('core.options'))
		{
			JToolbarHelper::preferences('com_users');
			JToolbarHelper::divider();
		}

		JToolbarHelper::help('JHELP_USERS_ACCESS_LEVELS');
	}

	/**
	 * Returns an array of fields the table can be sorted by
	 *
	 * @return  array  Array containing the field name to sort by as the key
and display text as value
	 *
	 * @since   3.0
	 */
	protected function getSortFields()
	{
		return array(
			'a.ordering' =>
JText::_('JGRID_HEADING_ORDERING'),
			'a.title'    =>
JText::_('COM_USERS_HEADING_LEVEL_NAME'),
			'a.id'       => JText::_('JGRID_HEADING_ID'),
		);
	}
}
mail/tmpl/default.php000064400000006621151161164400010603 0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_users
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

$script = "\t" . 'Joomla.submitbutton =
function(pressbutton) {' . "\n";
$script .= "\t\t" . 'var form = document.adminForm;' .
"\n";
$script .= "\t\t" . 'if (pressbutton ==
\'mail.cancel\') {' . "\n";
$script .= "\t\t\t" . 'Joomla.submitform(pressbutton);'
. "\n";
$script .= "\t\t\t" . 'return;' . "\n";
$script .= "\t\t" . '}' . "\n";
$script .= "\t\t" . '// do field validation' .
"\n";
$script .= "\t\t" . 'if (form.jform_subject.value ==
""){' . "\n";
$script .= "\t\t\t" . 'alert("' .
JText::_('COM_USERS_MAIL_PLEASE_FILL_IN_THE_SUBJECT', true) .
'");' . "\n";
$script .= "\t\t" . '} else if
(getSelectedValue(\'adminForm\',\'jform[group]\') <
0){' . "\n";
$script .= "\t\t\t" . 'alert("' .
JText::_('COM_USERS_MAIL_PLEASE_SELECT_A_GROUP', true) .
'");' . "\n";
$script .= "\t\t" . '} else if (form.jform_message.value ==
""){' . "\n";
$script .= "\t\t\t" . 'alert("' .
JText::_('COM_USERS_MAIL_PLEASE_FILL_IN_THE_MESSAGE', true) .
'");' . "\n";
$script .= "\t\t" . '} else {' . "\n";
$script .= "\t\t\t" . 'Joomla.submitform(pressbutton);'
. "\n";
$script .= "\t\t" . '}' . "\n";
$script .= "\t\t" . '}' . "\n";

JHtml::_('behavior.core');
JHtml::_('formbehavior.chosen', 'select');

JFactory::getDocument()->addScriptDeclaration($script);
?>

<form action="<?php echo
JRoute::_('index.php?option=com_users&view=mail');
?>" name="adminForm" method="post"
id="adminForm">
	<div class="row-fluid">
		<div class="span9">
			<fieldset class="adminform">
				<div class="control-group">
					<div class="control-label"><?php echo
$this->form->getLabel('subject'); ?></div>
					<div class="controls"><?php echo
JComponentHelper::getParams('com_users')->get('mailSubjectPrefix');
?>
						<?php echo $this->form->getInput('subject');
?></div>
				</div>
				<div class="control-group">
					<div class="control-label"><?php echo
$this->form->getLabel('message'); ?></div>
					<div class="controls"><?php echo
$this->form->getInput('message'); ?><br>
						<?php echo
JComponentHelper::getParams('com_users')->get('mailBodySuffix');
?></div>
				</div>
			</fieldset>
			<input type="hidden" name="task"
value="" />
			<?php echo JHtml::_('form.token'); ?>
		</div>
		<div class="span3">
			<fieldset class="form-inline">
				<div class="control-group checkbox">
					<div class="controls"><?php echo
$this->form->getInput('recurse'); ?> <?php echo
$this->form->getLabel('recurse'); ?></div>
				</div>
				<div class="control-group checkbox">
					<div class="control-label"><?php echo
$this->form->getInput('mode'); ?> <?php echo
$this->form->getLabel('mode'); ?></div>
				</div>
				<div class="control-group checkbox">
					<div class="control-label"><?php echo
$this->form->getInput('disabled'); ?> <?php echo
$this->form->getLabel('disabled'); ?></div>
				</div>
				<div class="control-group checkbox">
					<div class="control-label"><?php echo
$this->form->getInput('bcc'); ?> <?php echo
$this->form->getLabel('bcc'); ?></div>
				</div>
				<div class="control-group">
					<div class="control-label"><?php echo
$this->form->getLabel('group'); ?></div>
					<div class="controls"><?php echo
$this->form->getInput('group'); ?></div>
				</div>
			</fieldset>
		</div>
	</div>
</form>
mail/tmpl/default.xml000064400000000306151161164400010606 0ustar00<?xml
version="1.0" encoding="utf-8"?>
<metadata>
	<layout title="COM_USERS_MAIL_VIEW_DEFAULT_TITLE">
		<message>
			<![CDATA[COM_USERS_MAIL_VIEW_DEFAULT_DESC]]>
		</message>
	</layout>
</metadata>
mail/view.html.php000064400000003005151161164400010111 0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_users
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

/**
 * Users mail view.
 *
 * @since  1.6
 */
class UsersViewMail extends JViewLegacy
{
	/**
	 * @var object form object
	 */
	protected $form;

	/**
	 * Display the view
	 *
	 * @param   string  $tpl  The name of the template file to parse;
automatically searches through the template paths.
	 *
	 * @return  void
	 */
	public function display($tpl = null)
	{
		// Redirect to admin index if mass mailer disabled in conf
		if (JFactory::getApplication()->get('massmailoff', 0) == 1)
		{
			JFactory::getApplication()->redirect(JRoute::_('index.php',
false));
		}

		// Get data from the model
		$this->form = $this->get('Form');

		$this->addToolbar();
		parent::display($tpl);
	}

	/**
	 * Add the page title and toolbar.
	 *
	 * @return  void
	 *
	 * @since   1.6
	 */
	protected function addToolbar()
	{
		JFactory::getApplication()->input->set('hidemainmenu',
true);

		JToolbarHelper::title(JText::_('COM_USERS_MASS_MAIL'),
'users massmail');
		JToolbarHelper::custom('mail.send', 'envelope.png',
'send_f2.png', 'COM_USERS_TOOLBAR_MAIL_SEND_MAIL',
false);
		JToolbarHelper::cancel('mail.cancel');
		JToolbarHelper::divider();
		JToolbarHelper::preferences('com_users');
		JToolbarHelper::divider();
		JToolbarHelper::help('JHELP_USERS_MASS_MAIL_USERS');
	}
}
note/tmpl/edit.php000064400000005137151161164400010130 0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_users
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

JHtml::_('behavior.formvalidator');
JHtml::_('formbehavior.chosen', 'select');

JFactory::getDocument()->addScriptDeclaration('
jQuery(document).ready(function() {
	Joomla.submitbutton = function(task)
	{
		if (task == "note.cancel" ||
document.formvalidator.isValid(document.getElementById("note-form")))
		{
			' . $this->form->getField('body')->save() .
'
			Joomla.submitform(task, document.getElementById("note-form"));
		}
	}
});');
?>
<form action="<?php echo
JRoute::_('index.php?option=com_users&view=note&id=' .
(int) $this->item->id); ?>" method="post"
name="adminForm" id="note-form"
class="form-validate form-horizontal">
		<fieldset class="adminform">
			<div class="control-group">
				<div class="control-label">
					<?php echo $this->form->getLabel('subject'); ?>
				</div>
				<div class="controls">
					<?php echo $this->form->getInput('subject'); ?>
				</div>
			</div>
			<div class="control-group">
				<div class="control-label">
					<?php echo $this->form->getLabel('user_id'); ?>
				</div>
				<div class="controls">
					<?php echo $this->form->getInput('user_id'); ?>
				</div>
			</div>
			<div class="control-group">
				<div class="control-label">
					<?php echo $this->form->getLabel('catid'); ?>
				</div>
				<div class="controls">
					<?php echo $this->form->getInput('catid'); ?>
				</div>
			</div>
			<div class="control-group">
				<div class="control-label">
					<?php echo $this->form->getLabel('state'); ?>
				</div>
				<div class="controls">
					<?php echo $this->form->getInput('state'); ?>
				</div>
			</div>
			<div class="control-group">
				<div class="control-label">
					<?php echo $this->form->getLabel('review_time');
?>
				</div>
				<div class="controls">
					<?php echo $this->form->getInput('review_time');
?>
				</div>
			</div>
			<div class="control-group">
				<div class="control-label">
					<?php echo $this->form->getLabel('version_note');
?>
				</div>
				<div class="controls">
					<?php echo $this->form->getInput('version_note');
?>
				</div>
			</div>

			<div class="control-group">
				<div class="control-label">
					<?php echo $this->form->getLabel('body'); ?>
				</div>
				<div class="controls">
					<?php echo $this->form->getInput('body'); ?>
				</div>
			</div>

			<input type="hidden" name="task"
value="" />
			<?php echo JHtml::_('form.token'); ?>
		</fieldset>
</form>
note/tmpl/edit.xml000064400000000300151161164400010124 0ustar00<?xml
version="1.0" encoding="utf-8"?>
<metadata>
	<layout title="COM_USERS_NOTE_VIEW_EDIT_TITLE">
		<message>
			<![CDATA[COM_USERS_NOTE_VIEW_EDIT_DESC]]>
		</message>
	</layout>
</metadata>
note/view.html.php000064400000005710151161164400010141 0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_users
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

/**
 * User note edit view
 *
 * @since  2.5
 */
class UsersViewNote extends JViewLegacy
{
	/**
	 * The edit form.
	 *
	 * @var    JForm
	 * @since  2.5
	 */
	protected $form;

	/**
	 * The item data.
	 *
	 * @var    object
	 * @since  2.5
	 */
	protected $item;

	/**
	 * The model state.
	 *
	 * @var    JObject
	 * @since  2.5
	 */
	protected $state;

	/**
	 * Override the display method for the view.
	 *
	 * @param   string  $tpl  The name of the template file to parse;
automatically searches through the template paths.
	 *
	 * @return  mixed  A string if successful, otherwise a JError object.
	 *
	 * @since   2.5
	 */
	public function display($tpl = null)
	{
		// Initialise view variables.
		$this->state = $this->get('State');
		$this->item  = $this->get('Item');
		$this->form  = $this->get('Form');

		// Check for errors.
		if (count($errors = $this->get('Errors')))
		{
			throw new Exception(implode("\n", $errors), 500);
		}

		// Get the component HTML helpers
		JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html');

		parent::display($tpl);
		$this->addToolbar();
	}

	/**
	 * Display the toolbar.
	 *
	 * @return  void
	 *
	 * @since   2.5
	 */
	protected function addToolbar()
	{
		$input = JFactory::getApplication()->input;
		$input->set('hidemainmenu', 1);

		$user       = JFactory::getUser();
		$isNew      = ($this->item->id == 0);
		$checkedOut = !($this->item->checked_out == 0 ||
$this->item->checked_out == $user->get('id'));

		// Since we don't track these assets at the item level, use the
category id.
		$canDo = JHelperContent::getActions('com_users',
'category', $this->item->catid);

		JToolbarHelper::title(JText::_('COM_USERS_NOTES'), 'users
user');

		// If not checked out, can save the item.
		if (!$checkedOut && ($canDo->get('core.edit') ||
count($user->getAuthorisedCategories('com_users',
'core.create'))))
		{
			JToolbarHelper::apply('note.apply');
			JToolbarHelper::save('note.save');
		}

		if (!$checkedOut &&
count($user->getAuthorisedCategories('com_users',
'core.create')))
		{
			JToolbarHelper::save2new('note.save2new');
		}

		// If an existing item, can save to a copy.
		if (!$isNew &&
(count($user->getAuthorisedCategories('com_users',
'core.create')) > 0))
		{
			JToolbarHelper::save2copy('note.save2copy');
		}

		if (empty($this->item->id))
		{
			JToolbarHelper::cancel('note.cancel');
		}
		else
		{
			if (JComponentHelper::isEnabled('com_contenthistory')
&& $this->state->params->get('save_history', 0)
&& $canDo->get('core.edit'))
			{
				JToolbarHelper::versions('com_users.note',
$this->item->id);
			}

			JToolbarHelper::cancel('note.cancel',
'JTOOLBAR_CLOSE');
		}

		JToolbarHelper::divider();
		JToolbarHelper::help('JHELP_USERS_USER_NOTES_EDIT');
	}
}
notes/tmpl/default.php000064400000011575151161164400011015 0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_users
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

JHtml::_('bootstrap.tooltip');
JHtml::_('behavior.multiselect');
JHtml::_('formbehavior.chosen', 'select');

$user       = JFactory::getUser();
$listOrder  =
$this->escape($this->state->get('list.ordering'));
$listDirn   =
$this->escape($this->state->get('list.direction'));
?>
<form action="<?php echo
JRoute::_('index.php?option=com_users&view=notes');
?>" method="post" name="adminForm"
id="adminForm">
<?php if (!empty( $this->sidebar)) : ?>
	<div id="j-sidebar-container" class="span2">
		<?php echo $this->sidebar; ?>
	</div>
	<div id="j-main-container" class="span10">
<?php else : ?>
	<div id="j-main-container">
<?php endif; ?>
		<?php echo
JLayoutHelper::render('joomla.searchtools.default',
array('view' => $this)); ?>

		<?php if (empty($this->items)) : ?>
			<div class="alert alert-no-items">
				<?php echo JText::_('JGLOBAL_NO_MATCHING_RESULTS'); ?>
			</div>
		<?php else : ?>
		<table class="table table-striped">
			<thead>
				<tr>
					<th width="1%" class="nowrap center">
						<?php echo JHtml::_('grid.checkall'); ?>
					</th>
					<th width="1%" class="nowrap center">
						<?php echo JHtml::_('searchtools.sort',
'JSTATUS', 'a.state', $listDirn, $listOrder); ?>
					</th>
					<th class="nowrap">
						<?php echo JHtml::_('searchtools.sort',
'COM_USERS_HEADING_SUBJECT', 'a.subject', $listDirn,
$listOrder); ?>
					</th>
					<th width="20%" class="nowrap hidden-phone">
						<?php echo JHtml::_('searchtools.sort',
'COM_USERS_HEADING_USER', 'u.name', $listDirn,
$listOrder); ?>
					</th>
					<th width="10%" class="nowrap hidden-phone
hidden-tablet">
						<?php echo JHtml::_('searchtools.sort',
'COM_USERS_HEADING_REVIEW', 'a.review_time', $listDirn,
$listOrder); ?>
					</th>
					<th width="1%" class="nowrap hidden-phone">
						<?php echo JHtml::_('searchtools.sort',
'JGRID_HEADING_ID', 'a.id', $listDirn, $listOrder);
?>
					</th>
				</tr>
			</thead>
			<tfoot>
				<tr>
					<td colspan="6">
						<?php echo $this->pagination->getListFooter(); ?>
					</td>
				</tr>
			</tfoot>
			<tbody>
			<?php foreach ($this->items as $i => $item) :
				$canEdit    = $user->authorise('core.edit',      
'com_users.category.' . $item->catid);
				$canCheckin = $user->authorise('core.admin',     
'com_checkin') || $item->checked_out ==
$user->get('id') || $item->checked_out == 0;
				$canChange  = $user->authorise('core.edit.state',
'com_users.category.' . $item->catid) && $canCheckin;
				$subject    = $item->subject ?:
JText::_('COM_USERS_EMPTY_SUBJECT');
				?>
				<tr class="row<?php echo $i % 2; ?>">
					<td class="center checklist">
						<?php echo JHtml::_('grid.id', $i, $item->id); ?>
					</td>
					<td class="center">
						<div class="btn-group">
							<?php echo JHtml::_('jgrid.published', $item->state,
$i, 'notes.', $canChange, 'cb', $item->publish_up,
$item->publish_down); ?>
							<?php // Create dropdown items and render the dropdown list.
							if ($canChange)
							{
								JHtml::_('actionsdropdown.' . ((int) $item->state ===
2 ? 'un' : '') . 'archive', 'cb' .
$i, 'notes');
								JHtml::_('actionsdropdown.' . ((int) $item->state ===
-2 ? 'un' : '') . 'trash', 'cb' .
$i, 'notes');
								echo JHtml::_('actionsdropdown.render',
$this->escape($subject));
							}
							?>
						</div>
					</td>
					<td>
						<?php if ($item->checked_out) : ?>
							<?php echo JHtml::_('jgrid.checkedout', $i,
$item->editor, $item->checked_out_time, 'notes.',
$canCheckin); ?>
						<?php endif; ?>
						<?php $subject = $item->subject ?:
JText::_('COM_USERS_EMPTY_SUBJECT'); ?>
						<?php if ($canEdit) : ?>
							<a href="<?php echo
JRoute::_('index.php?option=com_users&task=note.edit&id='
. $item->id); ?>"><?php echo $this->escape($subject);
?></a>
						<?php else : ?>
							<?php echo $this->escape($subject); ?>
						<?php endif; ?>
						<div class="small">
							<?php echo JText::_('JCATEGORY') . ': ' .
$this->escape($item->category_title); ?>
						</div>
					</td>
					<td class="hidden-phone">
						<?php echo $this->escape($item->user_name); ?>
					</td>
					<td class="hidden-phone hidden-tablet">
						<?php if ($item->review_time !==
JFactory::getDbo()->getNullDate()) : ?>
							<?php echo JHtml::_('date', $item->review_time,
JText::_('DATE_FORMAT_LC4')); ?>
						<?php else : ?>
							<?php echo JText::_('COM_USERS_EMPTY_REVIEW'); ?>
						<?php endif; ?>
					</td>
					<td class="hidden-phone">
						<?php echo (int) $item->id; ?>
					</td>
				</tr>
			<?php endforeach; ?>
			</tbody>
		</table>
		<?php endif; ?>

		<div>
			<input type="hidden" name="task"
value="" />
			<input type="hidden" name="boxchecked"
value="0" />
			<?php echo JHtml::_('form.token'); ?>
		</div>
	</div>
</form>
notes/tmpl/default.xml000064400000000310151161164400011007 0ustar00<?xml
version="1.0" encoding="utf-8"?>
<metadata>
	<layout title="COM_USERS_NOTES_VIEW_DEFAULT_TITLE">
		<message>
			<![CDATA[COM_USERS_NOTES_VIEW_DEFAULT_DESC]]>
		</message>
	</layout>
</metadata>
notes/tmpl/modal.php000064400000003224151161164400010455 0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_users
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html');
?>
<div class="unotes">
	<h1><?php echo
JText::sprintf('COM_USERS_NOTES_FOR_USER',
$this->user->name, $this->user->id); ?></h1>
<?php if (empty($this->items)) : ?>
	<?php echo JText::_('COM_USERS_NO_NOTES'); ?>
<?php else : ?>
	<ul class="alternating">
	<?php foreach ($this->items as $item) : ?>
		<li>
			<div class="fltlft utitle">
				<?php if ($item->subject) : ?>
					<h4><?php echo
JText::sprintf('COM_USERS_NOTE_N_SUBJECT', (int) $item->id,
$this->escape($item->subject)); ?></h4>
				<?php else : ?>
					<h4><?php echo
JText::sprintf('COM_USERS_NOTE_N_SUBJECT', (int) $item->id,
JText::_('COM_USERS_EMPTY_SUBJECT')); ?></h4>
				<?php endif; ?>
			</div>

			<div class="fltlft utitle">
				<?php echo JHtml::_('date', $item->created_time,
JText::_('DATE_FORMAT_LC2')); ?>
			</div>

			<?php $category_image = $item->cparams->get('image');
?>

			<?php if ($item->catid && isset($category_image)) : ?>
			<div class="fltlft utitle">
				<?php echo JHtml::_('users.image', $category_image); ?>
			</div>

			<div class="fltlft utitle">
				<em><?php echo $this->escape($item->category_title);
?></em>
			</div>
			<?php endif; ?>

			<div class="clr"></div>
			<div class="ubody">
				<?php echo (isset($item->body) ?
JHtml::_('content.prepare', $item->body) : '');
?>
			</div>
		</li>
	<?php endforeach; ?>
	</ul>
<?php endif; ?>
</div>
notes/view.html.php000064400000007553151161164400010333 0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_users
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

use Joomla\Registry\Registry;

/**
 * User notes list view
 *
 * @since  2.5
 */
class UsersViewNotes extends JViewLegacy
{
	/**
	 * A list of user note objects.
	 *
	 * @var    array
	 * @since  2.5
	 */
	protected $items;

	/**
	 * The pagination object.
	 *
	 * @var    JPagination
	 * @since  2.5
	 */
	protected $pagination;

	/**
	 * The model state.
	 *
	 * @var    JObject
	 * @since  2.5
	 */
	protected $state;

	/**
	 * The model state.
	 *
	 * @var    JUser
	 * @since  2.5
	 */
	protected $user;

	/**
	 * Override the display method for the view.
	 *
	 * @param   string  $tpl  The name of the template file to parse;
automatically searches through the template paths.
	 *
	 * @return  mixed  A string if successful, otherwise a JError object.
	 *
	 * @since   2.5
	 */
	public function display($tpl = null)
	{
		// Initialise view variables.
		$this->items         = $this->get('Items');
		$this->pagination    = $this->get('Pagination');
		$this->state         = $this->get('State');
		$this->user          = $this->get('User');
		$this->filterForm    = $this->get('FilterForm');
		$this->activeFilters = $this->get('ActiveFilters');

		UsersHelper::addSubmenu('notes');

		// Check for errors.
		if (count($errors = $this->get('Errors')))
		{
			throw new Exception(implode("\n", $errors), 500);
		}

		// Get the component HTML helpers
		JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html');

		// Turn parameters into registry objects
		foreach ($this->items as $item)
		{
			$item->cparams = new Registry($item->category_params);
		}

		$this->addToolbar();
		$this->sidebar = JHtmlSidebar::render();
		parent::display($tpl);
	}

	/**
	 * Display the toolbar.
	 *
	 * @return  void
	 *
	 * @since   2.5
	 */
	protected function addToolbar()
	{
		$canDo = JHelperContent::getActions('com_users',
'category',
$this->state->get('filter.category_id'));

		JToolbarHelper::title(JText::_('COM_USERS_VIEW_NOTES_TITLE'),
'users user');

		if ($canDo->get('core.create'))
		{
			JToolbarHelper::addNew('note.add');
		}

		if ($canDo->get('core.edit'))
		{
			JToolbarHelper::editList('note.edit');
		}

		if ($canDo->get('core.edit.state'))
		{
			JToolbarHelper::divider();
			JToolbarHelper::publish('notes.publish',
'JTOOLBAR_PUBLISH', true);
			JToolbarHelper::unpublish('notes.unpublish',
'JTOOLBAR_UNPUBLISH', true);

			JToolbarHelper::divider();
			JToolbarHelper::archiveList('notes.archive');
			JToolbarHelper::checkin('notes.checkin');
		}

		if ($this->state->get('filter.published') == -2
&& $canDo->get('core.delete'))
		{
			JToolbarHelper::deleteList('JGLOBAL_CONFIRM_DELETE',
'notes.delete', 'JTOOLBAR_EMPTY_TRASH');
			JToolbarHelper::divider();
		}
		elseif ($canDo->get('core.edit.state'))
		{
			JToolbarHelper::trash('notes.trash');
			JToolbarHelper::divider();
		}

		if ($canDo->get('core.admin') ||
$canDo->get('core.options'))
		{
			JToolbarHelper::preferences('com_users');
			JToolbarHelper::divider();
		}

		JToolbarHelper::help('JHELP_USERS_USER_NOTES');

		JHtmlSidebar::setAction('index.php?option=com_users&view=notes');
	}

	/**
	 * Returns an array of fields the table can be sorted by
	 *
	 * @return  array  Array containing the field name to sort by as the key
and display text as value
	 *
	 * @since   3.0
	 */
	protected function getSortFields()
	{
		return array(
			'u.name'        =>
JText::_('COM_USERS_USER_HEADING'),
			'a.subject'     =>
JText::_('COM_USERS_SUBJECT_HEADING'),
			'c.title'       =>
JText::_('COM_USERS_CATEGORY_HEADING'),
			'a.state'       => JText::_('JSTATUS'),
			'a.review_time' =>
JText::_('COM_USERS_REVIEW_HEADING'),
			'a.id'          => JText::_('JGRID_HEADING_ID')
		);
	}
}
user/tmpl/edit.php000064400000011173151161164400010136 0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_users
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

// Include the component HTML helpers.
JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html');

JHtml::_('behavior.formvalidator');
JHtml::_('formbehavior.chosen', 'select');

JFactory::getDocument()->addScriptDeclaration("
	Joomla.submitbutton = function(task)
	{
		if (task == 'user.cancel' ||
document.formvalidator.isValid(document.getElementById('user-form')))
		{
			Joomla.submitform(task, document.getElementById('user-form'));
		}
	};

	Joomla.twoFactorMethodChange = function(e)
	{
		var selectedPane = 'com_users_twofactor_' +
jQuery('#jform_twofactor_method').val();

		jQuery.each(jQuery('#com_users_twofactor_forms_container>div'),
function(i, el) {
			if (el.id != selectedPane)
			{
				jQuery('#' + el.id).hide(0);
			}
			else
			{
				jQuery('#' + el.id).show(0);
			}
		});
	};
");

// Get the form fieldsets.
$fieldsets = $this->form->getFieldsets();
?>

<form action="<?php echo
JRoute::_('index.php?option=com_users&layout=edit&id=' .
(int) $this->item->id); ?>" method="post"
name="adminForm" id="user-form"
class="form-validate form-horizontal"
enctype="multipart/form-data">

	<?php echo JLayoutHelper::render('joomla.edit.item_title',
$this); ?>

	<fieldset>
		<?php echo JHtml::_('bootstrap.startTabSet',
'myTab', array('active' => 'details'));
?>

			<?php echo JHtml::_('bootstrap.addTab', 'myTab',
'details', JText::_('COM_USERS_USER_ACCOUNT_DETAILS'));
?>
				<?php foreach
($this->form->getFieldset('user_details') as $field) :
?>
					<div class="control-group">
						<div class="control-label">
							<?php echo $field->label; ?>
						</div>
						<div class="controls">
							<?php if ($field->fieldname == 'password') : ?>
								<?php // Disables autocomplete ?> <input
type="password" style="display:none">
							<?php endif; ?>
							<?php echo $field->input; ?>
						</div>
					</div>
				<?php endforeach; ?>
			<?php echo JHtml::_('bootstrap.endTab'); ?>

			<?php if ($this->grouplist) : ?>
				<?php echo JHtml::_('bootstrap.addTab', 'myTab',
'groups', JText::_('COM_USERS_ASSIGNED_GROUPS')); ?>
					<?php echo $this->loadTemplate('groups'); ?>
				<?php echo JHtml::_('bootstrap.endTab'); ?>
			<?php endif; ?>

			<?php
			$this->ignore_fieldsets = array('user_details');
			echo JLayoutHelper::render('joomla.edit.params', $this);
			?>

		<?php if (!empty($this->tfaform) && $this->item->id)
: ?>
		<?php echo JHtml::_('bootstrap.addTab', 'myTab',
'twofactorauth',
JText::_('COM_USERS_USER_TWO_FACTOR_AUTH')); ?>
		<div class="control-group">
			<div class="control-label">
				<label id="jform_twofactor_method-lbl"
for="jform_twofactor_method" class="hasTooltip"
						title="<?php echo '<strong>' .
JText::_('COM_USERS_USER_FIELD_TWOFACTOR_LABEL') .
'</strong><br />' .
JText::_('COM_USERS_USER_FIELD_TWOFACTOR_DESC'); ?>">
					<?php echo
JText::_('COM_USERS_USER_FIELD_TWOFACTOR_LABEL'); ?>
				</label>
			</div>
			<div class="controls">
				<?php echo JHtml::_('select.genericlist',
Usershelper::getTwoFactorMethods(), 'jform[twofactor][method]',
array('onchange' =>
'Joomla.twoFactorMethodChange()'), 'value',
'text', $this->otpConfig->method,
'jform_twofactor_method', false); ?>
			</div>
		</div>
		<div id="com_users_twofactor_forms_container">
			<?php foreach ($this->tfaform as $form) : ?>
			<?php $style = $form['method'] ==
$this->otpConfig->method ? 'display: block' :
'display: none'; ?>
			<div id="com_users_twofactor_<?php echo
$form['method'] ?>" style="<?php echo $style;
?>">
				<?php echo $form['form'] ?>
			</div>
			<?php endforeach; ?>
		</div>

		<fieldset>
			<legend>
				<?php echo JText::_('COM_USERS_USER_OTEPS'); ?>
			</legend>
			<div class="alert alert-info">
				<?php echo JText::_('COM_USERS_USER_OTEPS_DESC'); ?>
			</div>
			<?php if (empty($this->otpConfig->otep)) : ?>
			<div class="alert alert-warning">
				<?php echo JText::_('COM_USERS_USER_OTEPS_WAIT_DESC');
?>
			</div>
			<?php else : ?>
			<?php foreach ($this->otpConfig->otep as $otep) : ?>
			<span class="span3">
				<?php echo substr($otep, 0, 4); ?>-<?php echo substr($otep, 4,
4); ?>-<?php echo substr($otep, 8, 4); ?>-<?php echo
substr($otep, 12, 4); ?>
			</span>
			<?php endforeach; ?>
			<div class="clearfix"></div>
			<?php endif; ?>
		</fieldset>

		<?php echo JHtml::_('bootstrap.endTab'); ?>
		<?php endif; ?>

		<?php echo JHtml::_('bootstrap.endTabSet'); ?>
	</fieldset>

	<input type="hidden" name="task" value=""
/>
	<?php echo JHtml::_('form.token'); ?>
</form>
user/tmpl/edit.xml000064400000000300151161164400010135 0ustar00<?xml
version="1.0" encoding="utf-8"?>
<metadata>
	<layout title="COM_USERS_USER_VIEW_EDIT_TITLE">
		<message>
			<![CDATA[COM_USERS_USER_VIEW_EDIT_DESC]]>
		</message>
	</layout>
</metadata>
user/tmpl/edit_groups.php000064400000000713151161164400011533
0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_users
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

// Include the component HTML helpers.
JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html');
?>
<?php echo JHtml::_('access.usergroups',
'jform[groups]', $this->groups, true); ?>
user/view.html.php000064400000055453151161164400010163 0ustar00<?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 UserViewUser extends hikashopView {
	var $ctrl = 'user';
	var $nameListing = 'USERS';
	var $nameForm = 'HIKA_USER';
	var $icon = 'user';

	function display($tpl = null) {
		$this->paramBase =
HIKASHOP_COMPONENT.'.'.$this->getName();
		$function = $this->getLayout();
		if(method_exists($this,$function))
			$this->$function();
		parent::display($tpl);
	}

	function listing() {
		$app = JFactory::getApplication();
		$db = JFactory::getDBO();

		$config =& hikashop_config();
		$this->assignRef('config', $config);

		$toggle = hikashop_get('helper.toggle');
		$this->assignRef('toggleClass',$toggle);

		$manage =
hikashop_isAllowed($config->get('acl_user_manage','all'));
		$this->assignRef('manage',$manage);

		hikashop_setTitle(JText::_($this->nameListing), $this->icon,
$this->ctrl);

		$cfg = array(
			'table' => 'user',
			'main_key' => 'user_id',
			'order_sql_value' => 'huser.user_id',
			'order_sql_accept' => array('huser.',
'juser.')
		);
		$searchMap = array(
			'huser.user_id',
			'huser.user_email',
			'juser.username',
			'juser.email',
			'juser.name'
		);

		$pageInfo = $this->getPageInfo($cfg['order_sql_value']);
		$pageInfo->filter->filter_partner =
$app->getUserStateFromRequest($this->paramBase.'.filter_partner',
'filter_partner', '', 'int');

		$filters = array();
		$order = '';

		if(!empty($pageInfo->filter->filter_partner)) {
			if($pageInfo->filter->filter_partner == 1) {
				$filters[] = 'huser.user_partner_activated = 1';

				$query = 'CREATE OR REPLACE VIEW
'.hikashop_table('click_view').' AS SELECT a.user_id,
SUM(b.click_partner_price) AS click_price FROM
'.hikashop_table('user').' AS a LEFT JOIN
'.hikashop_table('click').' AS b ON
a.user_id=b.click_partner_id AND (CASE WHEN a.user_currency_id=0 THEN
'.hikashop_getCurrency().' ELSE a.user_currency_id
END)=b.click_partner_currency_id WHERE a.user_partner_activated=1 AND
b.click_partner_paid=0 GROUP BY b.click_partner_id;';
				$db->setQuery($query);
				$db->query();

				$partner_valid_status_list = explode(',',
$config->get('partner_valid_status','confirmed,shipped'));
				foreach($partner_valid_status_list as $k => $partner_valid_status)
{
					$partner_valid_status_list[$k]= $db->Quote($partner_valid_status);
				}
				$query = 'CREATE OR REPLACE VIEW
'.hikashop_table('sale_view').' AS SELECT a.user_id,
SUM(b.order_partner_price) AS sale_price FROM
'.hikashop_table('user').' AS a LEFT JOIN
'.hikashop_table('order').' AS b ON
a.user_id=b.order_partner_id AND (CASE WHEN a.user_currency_id=0 THEN
'.hikashop_getCurrency().' ELSE a.user_currency_id
END)=b.order_partner_currency_id WHERE a.user_partner_activated=1 AND
b.order_partner_paid=0 AND b.order_type=\'sale\' AND
b.order_status IN
('.implode(',',$partner_valid_status_list).') GROUP BY
b.order_partner_id;';
				$db->setQuery($query);
				$db->query();

				$query = 'CREATE OR REPLACE VIEW
'.hikashop_table('lead_view').' AS SELECT a.user_id,
SUM(b.user_partner_price) AS lead_price FROM
'.hikashop_table('user').' AS a LEFT JOIN
'.hikashop_table('user').' AS b ON
a.user_id=b.user_partner_id AND (CASE WHEN a.user_currency_id=0 THEN
'.hikashop_getCurrency().' ELSE a.user_currency_id
END)=b.user_partner_currency_id WHERE a.user_partner_activated=1 AND
b.user_partner_paid=0 GROUP BY b.user_partner_id;';
				$db->setQuery($query);
				$db->query();

				$db->setQuery('UPDATE
'.hikashop_table('user').' SET
user_unpaid_amount=0');
				$db->query();

				$query = 'UPDATE '.hikashop_table('user').' AS
a JOIN '.hikashop_table('click_view').' AS b ON
a.user_id=b.user_id SET a.user_unpaid_amount=b.click_price WHERE
a.user_partner_activated=1';
				$db->setQuery($query);
				$db->query();

				$query = 'UPDATE '.hikashop_table('user').' AS
a JOIN '.hikashop_table('sale_view').' AS b ON
a.user_id=b.user_id SET
a.user_unpaid_amount=a.user_unpaid_amount+b.sale_price WHERE
a.user_partner_activated=1';
				$db->setQuery($query);
				$db->query();

				$query = 'UPDATE '.hikashop_table('user').' AS
a JOIN '.hikashop_table('lead_view').' AS b ON
a.user_id=b.user_id SET
a.user_unpaid_amount=a.user_unpaid_amount+b.lead_price WHERE
a.user_partner_activated=1';
				$db->setQuery($query);
				$db->query();

				$currencyClass = hikashop_get('class.currency');
				$this->assignRef('currencyHelper', $currencyClass);
			}else{
				$filters[] = 'huser.user_partner_activated=0';
			}
		}

		$fieldsClass = hikashop_get('class.field');
		$this->assignRef('fieldsClass',$fieldsClass);

		$fields = $fieldsClass->getData('backend_listing',
'user', false);
		$this->assignRef('fields',$fields);
		foreach($fields as $field) {
			$searchMap[] = 'huser.'.$field->field_namekey;
		}

		$this->processFilters($filters, $order, $searchMap,
$cfg['order_sql_accept']);

		$query = ' FROM
'.hikashop_table($cfg['table']).' AS huser LEFT JOIN
'.hikashop_table('users', false).' AS juser ON
huser.user_cms_id = juser.id '.$filters.$order;
		$db->setQuery('SELECT huser.*, juser.* '.$query,
(int)$pageInfo->limit->start, (int)$pageInfo->limit->value);
		$rows = $db->loadObjectList();

		$fieldsClass->handleZoneListing($fields, $rows);
		foreach($rows as $k => $row) {
			if(!empty($row->user_params))
				$rows[$k]->user_params = unserialize($row->user_params);
		}

		if(!empty($pageInfo->search)) {
			$rows = hikashop_search($pageInfo->search, $rows,
$cfg['main_key']);
		}
		$this->assignRef('rows', $rows);

		$db->setQuery('SELECT COUNT(*) '.$query);
		$pageInfo->elements = new stdClass();
		$pageInfo->elements->total = $db->loadResult();
		$pageInfo->elements->page = count($rows);

		$this->getPagination();
		$this->getOrdering('huser.user_id', true);

		$partner = hikashop_get('type.user_partner');
		$this->assignRef('partner', $partner);

		$affiliate_plugin = JPluginHelper::getPlugin('system',
'hikashopaffiliate');
		$affiliate_active = (!empty($affiliate_plugin));
		$this->assignRef('affiliate_active', $affiliate_active);

		$this->toolbar = array(
			array('name' => 'editList', 'display'
=> $manage),
			array('name' => 'deleteList', 'check'
=> JText::_('HIKA_VALIDDELETEITEMS'), 'display'
=>
hikashop_isAllowed($config->get('acl_user_delete','all'))),
			'|',
			array('name' => 'pophelp', 'target'
=> $this->ctrl.'-listing'),
			'dashboard'
		);
		return true;
	}

	public function selection() {
		$singleSelection = JRequest::getVar('single', 0);
		$confirm = JRequest::getVar('confirm', 1);
		$this->assignRef('singleSelection', $singleSelection);
		$this->assignRef('confirm', $confirm);

		$ctrl = JRequest::getCmd('ctrl');
		$this->assignRef('ctrl', $ctrl);

		$task = 'useselection';
		$this->assignRef('task', $task);

		$afterParams = array();
		$after = JRequest::getString('after', '');
		if(!empty($after)) {
			list($ctrl, $task) = explode('|', $after, 2);

			$afterParams = JRequest::getString('afterParams',
'');
			$afterParams = explode(',', $afterParams);
			foreach($afterParams as &$p) {
				$p = explode('|', $p, 2);
				unset($p);
			}
		}
		$this->assignRef('afterParams', $afterParams);

		$this->listing();
	}


	public function useselection() {
		$users = JRequest::getVar('cid', array(), '',
'array');
		$rows = array();
		$data = '';
		$confirm = JRequest::getVar('confirm', true);
		$singleSelection = JRequest::getVar('single', false);

		$elemStruct = array(
			'user_email',
			'user_cms_id',
			'name',
			'username',
			'email'
		);

		if(!empty($users)) {
			JArrayHelper::toInteger($users);
			$db = JFactory::getDBO();
			$query = 'SELECT a.*, b.* FROM
'.hikashop_table('user').' AS a LEFT JOIN
'.hikashop_table('users', false).' AS b ON
a.user_cms_id = b.id WHERE a.user_id IN
('.implode(',',$users).')';
			$db->setQuery($query);
			$rows = $db->loadObjectList();

			if(!empty($rows)) {
				$data = array();
				foreach($rows as $v) {
					$d = '{id:'.$v->user_id;
					foreach($elemStruct as $s) {
						if($s == 'id')
							continue;
						$d .= ','.$s.':\''.
str_replace('"','\'',$v->$s).'\'';
					}
					$data[] = $d.'}';
				}
				if(!$singleSelection)
					$data = '['.implode(',',$data).']';
				else {
					$data = $data[0];
					$rows = $rows[0];
				}
			}
		}
		$this->assignRef('rows', $rows);
		$this->assignRef('data', $data);
		$this->assignRef('confirm', $confirm);
		$this->assignRef('singleSelection', $singleSelection);

		if($confirm == true) {
			hikashop_loadJslib('mootools');
			$js = 'window.addEvent("domready",
function(){window.top.hikashop.submitBox('.$data.');});';
			$doc = JFactory::getDocument();
			$doc->addScriptDeclaration($js);
		}
	}

	function sales(){
		$this->paramBase.= '_sales';
		$app = JFactory::getApplication();
		$pageInfo = new stdClass();
		$pageInfo->filter = new stdClass();
		$pageInfo->filter->order = new stdClass();
		$pageInfo->limit = new stdClass();
		$pageInfo->search = $app->getUserStateFromRequest(
$this->paramBase.".search", 'search', '',
'string' );
		$pageInfo->filter->order->value =
$app->getUserStateFromRequest(
$this->paramBase.".filter_order",
'filter_order',	'b.order_id','cmd' );
		$pageInfo->filter->order->dir	=
$app->getUserStateFromRequest(
$this->paramBase.".filter_order_Dir",
'filter_order_Dir',	'desc',	'word' );
		$pageInfo->limit->value = $app->getUserStateFromRequest(
$this->paramBase.'.list_limit', 'limit',
$app->getCfg('list_limit'), 'int' );
		$pageInfo->limit->start = $app->getUserStateFromRequest(
$this->paramBase.'.limitstart', 'limitstart', 0,
'int' );
		$database = JFactory::getDBO();
		$config =& hikashop_config();
		$partner_valid_status_list=explode(',',$config->get('partner_valid_status','confirmed,shipped'));
		foreach($partner_valid_status_list as $k => $partner_valid_status){
			$partner_valid_status_list[$k]=
$database->Quote($partner_valid_status);
		}
		$filters =
array('b.order_partner_id='.hikashop_getCID('user_id'),'b.order_partner_paid=0','b.order_status
IN
('.implode(',',$partner_valid_status_list).')');

		$searchMap =
array('c.id','c.username','c.name','a.user_email','b.order_user_id','b.order_id','b.order_full_price','b.order_number');

		if(!empty($pageInfo->search)){
			$searchVal =
'\'%'.hikashop_getEscaped(JString::strtolower(
$pageInfo->search ),true).'%\'';
			$filter = implode(" LIKE $searchVal OR ",$searchMap)."
LIKE $searchVal";
			$filters[] =  $filter;
		}
		$order = '';
		if(!empty($pageInfo->filter->order->value)){
			$order = ' ORDER BY
'.$pageInfo->filter->order->value.'
'.$pageInfo->filter->order->dir;
		}
		if(!empty($filters)){
			$filters = ' WHERE ('. implode(') AND
(',$filters).')';
		}else{
			$filters = '';
		}

		$query = ' FROM '.hikashop_table('order').' AS b
LEFT JOIN '.hikashop_table('user').' AS a ON
b.order_user_id=a.user_id LEFT JOIN
'.hikashop_table('users',false).' AS c ON
a.user_cms_id=c.id '.$filters.$order;
		$database->setQuery('SELECT
a.*,b.*,c.*'.$query,(int)$pageInfo->limit->start,(int)$pageInfo->limit->value);
		$rows = $database->loadObjectList();
		if(!empty($pageInfo->search)){
			$rows =
hikashop_search($pageInfo->search,$rows,'order_id');
		}
		$database->setQuery('SELECT COUNT(*)'.$query);
		$pageInfo->elements = new stdClass();
		$pageInfo->elements->total = $database->loadResult();
		$pageInfo->elements->page = count($rows);

		$toggleClass = hikashop_get('helper.toggle');
		$this->assignRef('toggleClass',$toggleClass);
		$this->assignRef('rows',$rows);
		$this->assignRef('pageInfo',$pageInfo);
		$this->getPagination();
		$currencyClass = hikashop_get('class.currency');
		$this->assignRef('currencyHelper',$currencyClass);
	}

	function clicks(){

		$this->paramBase.='_clicks';
		$app = JFactory::getApplication();
		$pageInfo = new stdClass();
		$pageInfo->filter = new stdClass();
		$pageInfo->filter->order = new stdClass();
		$pageInfo->limit = new stdClass();
		$pageInfo->search = $app->getUserStateFromRequest(
$this->paramBase.".search", 'search', '',
'string' );
		$pageInfo->filter->order->value =
$app->getUserStateFromRequest(
$this->paramBase.".filter_order",
'filter_order',	'a.click_id','cmd' );
		$pageInfo->filter->order->dir	=
$app->getUserStateFromRequest(
$this->paramBase.".filter_order_Dir",
'filter_order_Dir',	'desc',	'word' );
		$pageInfo->limit->value = $app->getUserStateFromRequest(
$this->paramBase.'.list_limit', 'limit',
$app->getCfg('list_limit'), 'int' );
		$pageInfo->limit->start = $app->getUserStateFromRequest(
$this->paramBase.'.limitstart', 'limitstart', 0,
'int' );
		$database	= JFactory::getDBO();

		$filters = array('a.click_partner_paid=0');

		$user_id = hikashop_getCID('user_id');
		if(!empty($user_id)){
			$filters[] = 'a.click_partner_id='.$user_id;
		}
		$this->assignRef('user_id',$user_id);

		$searchMap =
array('a.click_ip','a.click_referer','a.click_partner_id','a.click_id','b.user_email');
		if(!empty($pageInfo->search)){
			$searchVal =
'\'%'.hikashop_getEscaped($pageInfo->search,true).'%\'';
			$filters[] = implode(" LIKE $searchVal OR ",$searchMap)."
LIKE $searchVal";
		}
		$order = '';
		if(!empty($pageInfo->filter->order->value)){
			$order = ' ORDER BY
'.$pageInfo->filter->order->value.'
'.$pageInfo->filter->order->dir;
		}

		$query = ' FROM '.hikashop_table('click').' AS
a';
		$query .= ' JOIN '.hikashop_table('user').' AS b
ON a.click_partner_id = b.user_id';
		if(!empty($filters)) $query .= ' WHERE '. implode(' AND
',$filters);


		$database->setQuery('SELECT a.*, b.user_email, b.user_currency_id
'.$query.$order,(int)$pageInfo->limit->start,(int)$pageInfo->limit->value);
		$rows = $database->loadObjectList();
		if(!empty($pageInfo->search)){
			$rows =
hikashop_search($pageInfo->search,$rows,'click_id');
		}
		$database->setQuery('SELECT COUNT(*)'.$query);
		$pageInfo->elements = new stdClass();
		$pageInfo->elements->total = $database->loadResult();
		$pageInfo->elements->page = count($rows);
		$this->assignRef('rows',$rows);
		$this->assignRef('pageInfo',$pageInfo);
		$this->getPagination();
		$currencyClass = hikashop_get('class.currency');
		$this->assignRef('currencyHelper',$currencyClass);

		hikashop_setTitle(JText::_('CLICKS'),'click',$this->ctrl.'&task=clicks&user_id='.$user_id);
	}

	function leads(){
		$this->paramBase='leads';
		$app = JFactory::getApplication();
		$pageInfo = new stdClass();
		$pageInfo->filter = new stdClass();
		$pageInfo->filter->order = new stdClass();
		$pageInfo->limit = new stdClass();
		$fieldsClass = hikashop_get('class.field');
		$fields =
$fieldsClass->getData('backend_listing','user',false);
		$this->assignRef('fields',$fields);
		$this->assignRef('fieldsClass',$fieldsClass);
		$pageInfo->search = $app->getUserStateFromRequest(
$this->paramBase.".search", 'search', '',
'string' );
		$pageInfo->filter->order->value =
$app->getUserStateFromRequest(
$this->paramBase.".filter_order",
'filter_order',	'a.user_id','cmd' );
		$pageInfo->filter->order->dir	=
$app->getUserStateFromRequest(
$this->paramBase.".filter_order_Dir",
'filter_order_Dir',	'desc',	'word' );
		$pageInfo->limit->value = $app->getUserStateFromRequest(
$this->paramBase.'.list_limit', 'limit',
$app->getCfg('list_limit'), 'int' );
		$pageInfo->limit->start = $app->getUserStateFromRequest(
$this->paramBase.'.limitstart', 'limitstart', 0,
'int' );
		$database	= JFactory::getDBO();
		$user_id = hikashop_getCID('user_id');
		$userClass = hikashop_get('class.user');
		$user = $userClass->get($user_id);
		$this->assignRef('user',$user);
		$filters =
array('a.user_partner_id='.$user_id,'a.user_partner_paid=0');

		$searchMap =
array('a.user_id','a.user_email','b.username','b.email','b.name');
		foreach($fields as $field){
			$searchMap[]='a.'.$field->field_namekey;
		}
		if(!empty($pageInfo->search)){
			$searchVal =
'\'%'.hikashop_getEscaped($pageInfo->search,true).'%\'';
			$filters[] = implode(" LIKE $searchVal OR ",$searchMap)."
LIKE $searchVal";
		}
		$order = '';
		if(!empty($pageInfo->filter->order->value)){
			$order = ' ORDER BY
'.$pageInfo->filter->order->value.'
'.$pageInfo->filter->order->dir;
		}
		if(!empty($filters)){
			$filters = ' WHERE ('. implode(') AND
(',$filters).')';
		}else{
			$filters = '';
		}

		$query = ' FROM '.hikashop_table('user').' AS a
LEFT JOIN '.hikashop_table('users',false).' AS b ON
a.user_cms_id=b.id '.$filters.$order;
		$database->setQuery('SELECT
a.*,b.*'.$query,(int)$pageInfo->limit->start,(int)$pageInfo->limit->value);
		$rows = $database->loadObjectList();
		$fieldsClass->handleZoneListing($fields,$rows);
		if(!empty($pageInfo->search)){
			$rows =
hikashop_search($pageInfo->search,$rows,'user_id');
		}
		$database->setQuery('SELECT COUNT(*)'.$query);
		$pageInfo->elements = new stdClass();
		$pageInfo->elements->total = $database->loadResult();
		$pageInfo->elements->page = count($rows);
		$this->assignRef('rows',$rows);
		$this->assignRef('pageInfo',$pageInfo);
		$this->getPagination();
		$currencyClass = hikashop_get('class.currency');
		$this->assignRef('currencyHelper',$currencyClass);
	}

	function pay(){
		$user=null;
		$user_id = hikashop_getCID('user_id');
		if(!empty($user_id)){
			$class = hikashop_get('class.user');
			$user = $class->get($user_id);
			if(!empty($user)) $class->loadPartnerData($user);
		}
		$currencyHelper = hikashop_get('class.currency');
		$this->assignRef('currencyHelper',$currencyHelper);
		$this->assignRef('user',$user);
		$method = 'paypal';
		$this->assignRef('method',$method);
	}

	function form(){
		$user_id = hikashop_getCID('user_id');
		$fieldsClass = hikashop_get('class.field');
		$addresses = array();
		$fields = null;
		$rows = array();
		$affiliates = array();
		if(!empty($user_id)){
			$class = hikashop_get('class.user');
			$user = $class->get($user_id,'hikashop',true);
			if(!empty($user)) $class->loadPartnerData($user);
			$fields['user'] =
$fieldsClass->getFields('backend',$user);

			$addressClass = hikashop_get('class.address');
			$addresses = $addressClass->getByUser($user_id);
			if(!empty($addresses)){
				$addressClass->loadZone($addresses,'name','backend');
				$fields['address'] =& $addressClass->fields;
			}

			$db = JFactory::getDBO();
			$filters = array(
				'order_user_id='.$user_id
			);
			$query = 'SELECT * FROM
'.hikashop_table('order').' WHERE
order_type='.$db->Quote('sale').' AND
('.implode(' OR ',$filters).') ORDER BY order_id
DESC';
			$db->setQuery($query);
			$orders = $db->loadObjectList();
			foreach($orders as $order){
				if($order->order_user_id==$user_id){
					$rows[]=$order;
				}
			}
			$task='edit';
		}else{
			$user = new stdClass();
			$task='add';
		}
		$this->assignRef('rows',$rows);
		$this->assignRef('affiliates',$affiliates);
		$this->assignRef('user',$user);
		$this->assignRef('fields',$fields);
		$this->assignRef('addresses',$addresses);
		$this->assignRef('fieldsClass',$fieldsClass);
		$currencyHelper = hikashop_get('class.currency');
		$this->assignRef('currencyHelper',$currencyHelper);
		$currencyType = hikashop_get('type.currency');
		$this->assignRef('currencyType',$currencyType);
		$pluginClass = hikashop_get('class.plugins');
		$plugin = JPluginHelper::getPlugin('system',
'hikashopaffiliate');
		if(empty($plugin)){
			$affiliate_active = false;
		}else{
			$affiliate_active = true;
		}
		$this->assignRef('affiliate_active',$affiliate_active);
		$popup = hikashop_get('helper.popup');
		$this->assignRef('popup', $popup);
		if(version_compare(JVERSION,'1.6','<')){
			$url_link =
JRoute::_('index.php?option=com_users&task=edit&cid[]='.$user->user_cms_id
);
			$email_link =
hikashop_completeLink('order&task=mail&user_id='.$user_id,true);
		}else{
			$url_link =
JRoute::_('index.php?option=com_users&task=user.edit&id='.$user->user_cms_id
);
			$email_link =
'index.php?option=com_hikashop&ctrl=order&task=mail&tmpl=component&user_id='.$user_id;
		}
		$this->toolbar = array(
			array('name' => 'link', 'icon' =>
'upload', 'alt' =>
JText::_('JOOMLA_USER_OPTIONS'), 'url' =>
$url_link,'display'=>!empty($user->user_cms_id)),
			array('name' => 'popup', 'icon' =>
'send', 'alt' => JText::_('HIKA_EMAIL'),
'url' =>
$email_link,'display'=>!empty($user_id)),
			'save',
			'apply',
			'cancel',
			'|',
			array('name' => 'pophelp', 'target'
=> $this->ctrl.'-form')
		);

		$js ='
		function updateCustomFeesPanel(active){
			if(active==1){
				var displayFee = \'\';
			}else{
				var displayFee = \'none\';
			}
			document.getElementById(\'custom_fees_panel\').style.display=displayFee;
		}';
		$doc = JFactory::getDocument();
		$doc->addScriptDeclaration($js);

		$order_info='';
		$order_id = JRequest::getInt('order_id',0);
		if(!empty($order_id)){
			$order_info='&order_id='.$order_id;
		}
		hikashop_setTitle(JText::_($this->nameForm),$this->icon,$this->ctrl.'&task='.$task.'&user_id='.$user_id.$order_info);
	}

	function editaddress(){
		$user_id = JRequest::getInt('user_id');
		$address_id = hikashop_getCID('address_id');
		$address = new stdClass();
		if(!empty($address_id)){
			$class=hikashop_get('class.address');
			$address = $class->get($address_id);
		}
		$extraFields=array();
		$fieldsClass = hikashop_get('class.field');
		$this->assignRef('fieldsClass',$fieldsClass);
		$fieldsClass->skipAddressName=true;
		$extraFields['address'] =
$fieldsClass->getFields('backend',$address,'address','user&task=state');
		$this->assignRef('extraFields',$extraFields);
		$this->assignRef('user_id',$user_id);
		$this->assignRef('address',$address);
		$null=array();
		$fieldsClass->addJS($null,$null,$null);
		$fieldsClass->jsToggle($this->extraFields['address'],$address,0);
		$requiredFields = array();
		$validMessages = array();
		$values = array('address'=>$address);
		$fieldsClass->checkFieldsForJS($extraFields,$requiredFields,$validMessages,$values);
		$fieldsClass->addJS($requiredFields,$validMessages,array('address'));
		$cart=hikashop_get('helper.cart');
		$this->assignRef('cart',$cart);
		jimport('joomla.html.parameter');
		$params = new HikaParameter('');
		$this->assignRef('params',$params);
	}


	function state(){
		$namekey = JRequest::getCmd('namekey','');
		if(!empty($namekey)){

			$field_namekey = JRequest::getString('field_namekey',
'');
			if(empty($field_namekey))
				$field_namekey = 'address_state';

			$field_id = JRequest::getString('field_id', '');
			if(empty($field_id))
				$field_id = 'address_state';

			$field_type = JRequest::getString('field_type',
'');
			if(empty($field_type))
				$field_type = 'address';

			$class = hikashop_get('type.country');
			echo $class->displayStateDropDown($namekey, $field_id,
$field_namekey, $field_type);
		} else {
			echo '<span
class="state_no_country">'.JText::_('PLEASE_SELECT_COUNTRY_FIRST').'</span>';
		}
		exit;
	}

}
users/tmpl/default.php000064400000016667151161164400011035 0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_users
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

JHtml::_('bootstrap.tooltip');
JHtml::_('behavior.multiselect');
JHtml::_('formbehavior.chosen', 'select');

$listOrder  =
$this->escape($this->state->get('list.ordering'));
$listDirn   =
$this->escape($this->state->get('list.direction'));
$loggeduser = JFactory::getUser();
$debugUsers =
$this->state->get('params')->get('debugUsers',
1);
?>
<form action="<?php echo
JRoute::_('index.php?option=com_users&view=users');
?>" method="post" name="adminForm"
id="adminForm">
	<?php if (!empty( $this->sidebar)) : ?>
		<div id="j-sidebar-container" class="span2">
		<?php echo $this->sidebar; ?>
		</div>
		<div id="j-main-container" class="span10">
	<?php else : ?>
		<div id="j-main-container">
	<?php endif; ?>
		<?php
		// Search tools bar
		echo JLayoutHelper::render('joomla.searchtools.default',
array('view' => $this));
		?>
		<?php if (empty($this->items)) : ?>
			<div class="alert alert-no-items">
				<?php echo JText::_('JGLOBAL_NO_MATCHING_RESULTS'); ?>
			</div>
		<?php else : ?>
			<table class="table table-striped"
id="userList">
				<thead>
					<tr>
						<th width="1%" class="nowrap center">
							<?php echo JHtml::_('grid.checkall'); ?>
						</th>
						<th class="nowrap">
							<?php echo JHtml::_('searchtools.sort',
'COM_USERS_HEADING_NAME', 'a.name', $listDirn,
$listOrder); ?>
						</th>
						<th width="10%" class="nowrap">
							<?php echo JHtml::_('searchtools.sort',
'JGLOBAL_USERNAME', 'a.username', $listDirn,
$listOrder); ?>
						</th>
						<th width="5%" class="nowrap center">
							<?php echo JHtml::_('searchtools.sort',
'COM_USERS_HEADING_ENABLED', 'a.block', $listDirn,
$listOrder); ?>
						</th>
						<th width="5%" class="nowrap center
hidden-phone">
							<?php echo JHtml::_('searchtools.sort',
'COM_USERS_HEADING_ACTIVATED', 'a.activation',
$listDirn, $listOrder); ?>
						</th>
						<th width="10%" class="nowrap">
							<?php echo JText::_('COM_USERS_HEADING_GROUPS'); ?>
						</th>
						<th width="15%" class="nowrap hidden-phone
hidden-tablet">
							<?php echo JHtml::_('searchtools.sort',
'JGLOBAL_EMAIL', 'a.email', $listDirn, $listOrder);
?>
						</th>
						<th width="10%" class="nowrap hidden-phone
hidden-tablet">
							<?php echo JHtml::_('searchtools.sort',
'COM_USERS_HEADING_LAST_VISIT_DATE', 'a.lastvisitDate',
$listDirn, $listOrder); ?>
						</th>
						<th width="10%" class="nowrap hidden-phone
hidden-tablet">
							<?php echo JHtml::_('searchtools.sort',
'COM_USERS_HEADING_REGISTRATION_DATE',
'a.registerDate', $listDirn, $listOrder); ?>
						</th>
						<th width="1%" class="nowrap hidden-phone">
							<?php echo JHtml::_('searchtools.sort',
'JGRID_HEADING_ID', 'a.id', $listDirn, $listOrder);
?>
						</th>
					</tr>
				</thead>
				<tfoot>
					<tr>
						<td colspan="10">
							<?php echo $this->pagination->getListFooter(); ?>
						</td>
					</tr>
				</tfoot>
				<tbody>
				<?php foreach ($this->items as $i => $item) :
					$canEdit   = $this->canDo->get('core.edit');
					$canChange =
$loggeduser->authorise('core.edit.state',	'com_users');

					// If this group is super admin and this user is not super admin,
$canEdit is false
					if ((!$loggeduser->authorise('core.admin')) &&
JAccess::check($item->id, 'core.admin'))
					{
						$canEdit   = false;
						$canChange = false;
					}
				?>
					<tr class="row<?php echo $i % 2; ?>">
						<td class="center">
							<?php if ($canEdit || $canChange) : ?>
								<?php echo JHtml::_('grid.id', $i, $item->id);
?>
							<?php endif; ?>
						</td>
						<td>
							<div class="name break-word">
							<?php if ($canEdit) : ?>
								<a href="<?php echo
JRoute::_('index.php?option=com_users&task=user.edit&id='
. (int) $item->id); ?>" title="<?php echo
JText::sprintf('COM_USERS_EDIT_USER',
$this->escape($item->name)); ?>">
									<?php echo $this->escape($item->name); ?></a>
							<?php else : ?>
								<?php echo $this->escape($item->name); ?>
							<?php endif; ?>
							</div>
							<div class="btn-group">
								<?php echo JHtml::_('users.filterNotes',
$item->note_count, $item->id); ?>
								<?php echo JHtml::_('users.notes',
$item->note_count, $item->id); ?>
								<?php echo JHtml::_('users.addNote', $item->id);
?>
							</div>
							<?php echo JHtml::_('users.notesModal',
$item->note_count, $item->id); ?>
							<?php if ($item->requireReset == '1') : ?>
								<span class="label label-warning"><?php echo
JText::_('COM_USERS_PASSWORD_RESET_REQUIRED'); ?></span>
							<?php endif; ?>
							<?php if ($debugUsers) : ?>
								<div class="small"><a href="<?php echo
JRoute::_('index.php?option=com_users&view=debuguser&user_id='
. (int) $item->id); ?>">
								<?php echo JText::_('COM_USERS_DEBUG_USER');
?></a></div>
							<?php endif; ?>
						</td>
						<td class="break-word">
							<?php echo $this->escape($item->username); ?>
						</td>
						<td class="center">
							<?php
							$self = $loggeduser->id == $item->id;

							if ($canChange) :
								echo JHtml::_('jgrid.state',
JHtml::_('users.blockStates', $self), $item->block, $i,
'users.', !$self);
							else :
								echo JHtml::_('jgrid.state',
JHtml::_('users.blockStates', $self), $item->block, $i,
'users.', false);
							endif; ?>
						</td>
						<td class="center hidden-phone">
							<?php
							$activated = empty( $item->activation) ? 0 : 1;
							echo JHtml::_('jgrid.state',
JHtml::_('users.activateStates'), $activated, $i,
'users.', (boolean) $activated);
							?>
						</td>
						<td>
							<?php if (substr_count($item->group_names, "\n")
> 1) : ?>
								<span class="hasTooltip" title="<?php echo
JHtml::_('tooltipText',
JText::_('COM_USERS_HEADING_GROUPS'),
nl2br($item->group_names), 0); ?>"><?php echo
JText::_('COM_USERS_USERS_MULTIPLE_GROUPS'); ?></span>
							<?php else : ?>
								<?php echo nl2br($item->group_names); ?>
							<?php endif; ?>
						</td>
						<td class="hidden-phone break-word hidden-tablet">
							<?php echo
JStringPunycode::emailToUTF8($this->escape($item->email)); ?>
						</td>
						<td class="hidden-phone hidden-tablet">
							<?php if ($item->lastvisitDate !=
$this->db->getNullDate()) : ?>
								<?php echo JHtml::_('date', $item->lastvisitDate,
JText::_('DATE_FORMAT_LC6')); ?>
							<?php else : ?>
								<?php echo JText::_('JNEVER'); ?>
							<?php endif; ?>
						</td>
						<td class="hidden-phone hidden-tablet">
							<?php echo JHtml::_('date', $item->registerDate,
JText::_('DATE_FORMAT_LC6')); ?>
						</td>
						<td class="hidden-phone">
							<?php echo (int) $item->id; ?>
						</td>
					</tr>
					<?php endforeach; ?>
				</tbody>
			</table>
			<?php // Load the batch processing form if user is allowed ?>
			<?php if ($loggeduser->authorise('core.create',
'com_users')
				&& $loggeduser->authorise('core.edit',
'com_users')
				&& $loggeduser->authorise('core.edit.state',
'com_users')) : ?>
				<?php echo JHtml::_(
					'bootstrap.renderModal',
					'collapseModal',
					array(
						'title'  =>
JText::_('COM_USERS_BATCH_OPTIONS'),
						'footer' =>
$this->loadTemplate('batch_footer'),
					),
					$this->loadTemplate('batch_body')
				); ?>
			<?php endif; ?>
		<?php endif; ?>

		<input type="hidden" name="task"
value="" />
		<input type="hidden" name="boxchecked"
value="0" />
		<?php echo JHtml::_('form.token'); ?>
	</div>
</form>
users/tmpl/default.xml000064400000000310151161164400011020 0ustar00<?xml
version="1.0" encoding="utf-8"?>
<metadata>
	<layout title="COM_USERS_USERS_VIEW_DEFAULT_TITLE">
		<message>
			<![CDATA[COM_USERS_USERS_VIEW_DEFAULT_DESC]]>
		</message>
	</layout>
</metadata>
users/tmpl/default_batch_body.php000064400000003351151161164400013175
0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_users
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */
defined('_JEXEC') or die;

// Create the copy/move options.
$options = array(
	JHtml::_('select.option', 'add',
JText::_('COM_USERS_BATCH_ADD')),
	JHtml::_('select.option', 'del',
JText::_('COM_USERS_BATCH_DELETE')),
	JHtml::_('select.option', 'set',
JText::_('COM_USERS_BATCH_SET'))
);

// Create the reset password options.
$resetOptions = array(
	JHtml::_('select.option', '',
JText::_('COM_USERS_NO_ACTION')),
	JHtml::_('select.option', 'yes',
JText::_('JYES')),
	JHtml::_('select.option', 'no',
JText::_('JNO'))
);
JHtml::_('formbehavior.chosen', 'select');
?>

<div class="container-fluid">
	<div class="row-fluid">
		<div class="controls">
			<label id="batch-choose-action-lbl"
class="control-label" for="batch-group-id">
				<?php echo JText::_('COM_USERS_BATCH_GROUP'); ?>
			</label>
			<div id="batch-choose-action" class="combo
controls">
				<div class="control-group">
					<select name="batch[group_id]"
id="batch-group-id">
						<option value=""><?php echo
JText::_('JSELECT'); ?></option>
						<?php echo JHtml::_('select.options',
JHtml::_('user.groups')); ?>
					</select>
				</div>
			</div>
			<div class="control-group radio">
				<?php echo JHtml::_('select.radiolist', $options,
'batch[group_action]', '', 'value',
'text', 'add'); ?>
			</div>
		</div>
	</div>
	<label><?php echo
JText::_('COM_USERS_REQUIRE_PASSWORD_RESET'); ?></label>
	<div class="control-group radio">
		<?php echo JHtml::_('select.radiolist', $resetOptions,
'batch[reset_id]', '', 'value',
'text', ''); ?>
	</div>
</div>
users/tmpl/default_batch_footer.php000064400000001136151161164400013535
0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_users
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */
defined('_JEXEC') or die;

?>
<button type="button" class="btn"
onclick="document.getElementById('batch-group-id').value=''"
data-dismiss="modal">
	<?php echo JText::_('JCANCEL'); ?>
</button>
<button type="submit" class="btn btn-success"
onclick="Joomla.submitbutton('user.batch');return
false;">
	<?php echo JText::_('JGLOBAL_BATCH_PROCESS'); ?>
</button>
users/tmpl/modal.php000064400000012230151161164400010463 0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_users
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html');

JHtml::_('bootstrap.tooltip', '.hasTooltip',
array('placement' => 'bottom'));
JHtml::_('bootstrap.popover', '.hasPopover',
array('placement' => 'bottom'));
JHtml::_('formbehavior.chosen', 'select');
JHtml::_('behavior.multiselect');

// Special case for the search field tooltip.
$searchFilterDesc =
$this->filterForm->getFieldAttribute('search',
'description', null, 'filter');
JHtml::_('bootstrap.tooltip', '#filter_search',
array('title' => JText::_($searchFilterDesc),
'placement' => 'bottom'));

$input           = JFactory::getApplication()->input;
$field           = $input->getCmd('field');
$listOrder       =
$this->escape($this->state->get('list.ordering'));
$listDirn        =
$this->escape($this->state->get('list.direction'));
$enabledStates   = array(0 => 'icon-publish', 1 =>
'icon-unpublish');
$activatedStates = array(0 => 'icon-publish', 1 =>
'icon-unpublish');
$userRequired    = (int) $input->get('required', 0,
'int');

/**
 * Mootools compatibility
 *
 * There is an extra option passed in the URL for the iframe &ismoo=0
for the bootstraped field.
 * By default the value will be 1 or defaults to mootools behaviour using
function jSelectUser()
 *
 * This should be removed when mootools won't be shipped by Joomla.
 */
$isMoo = $input->getInt('ismoo', 1);

if ($isMoo)
{
	$onClick =
"window.parent.jSelectUser(this);window.parent.jQuery('.modal.in').modal('hide');";
}

?>
<div class="container-popup">
	<form action="<?php echo
JRoute::_('index.php?option=com_users&view=users&layout=modal&tmpl=component&groups='
. $input->get('groups', '', 'BASE64') .
'&excluded=' . $input->get('excluded',
'', 'BASE64')); ?>" method="post"
name="adminForm" id="adminForm">
		<?php if (!$userRequired) : ?>
		<div class="pull-left">
			<button type="button" class="btn button-select"
data-user-value="0" data-user-name="<?php echo
$this->escape(JText::_('JLIB_FORM_SELECT_USER')); ?>"
				data-user-field="<?php echo $this->escape($field);
?>" <?php if ($isMoo) : ?>value=""
onclick="window.parent.jSelectUser(this)"<?php endif;
?>><?php echo JText::_('JOPTION_NO_USER');
?></button>&nbsp;
		</div>
		<?php endif; ?>
		<?php echo
JLayoutHelper::render('joomla.searchtools.default',
array('view' => $this)); ?>
		<?php if (empty($this->items)) : ?>
		<div class="alert alert-no-items">
			<?php echo JText::_('JGLOBAL_NO_MATCHING_RESULTS'); ?>
		</div>
		<?php else : ?>
		<table class="table table-striped table-condensed">
			<thead>
				<tr>
					<th class="nowrap">
						<?php echo JHtml::_('searchtools.sort',
'COM_USERS_HEADING_NAME', 'a.name', $listDirn,
$listOrder); ?>
					</th>
					<th width="25%" class="nowrap">
						<?php echo JHtml::_('searchtools.sort',
'JGLOBAL_USERNAME', 'a.username', $listDirn,
$listOrder); ?>
					</th>
					<th width="1%" class="nowrap center">
						<?php echo JHtml::_('searchtools.sort',
'COM_USERS_HEADING_ENABLED', 'a.block', $listDirn,
$listOrder); ?>
					</th>
					<th width="1%" class="nowrap center">
						<?php echo JHtml::_('searchtools.sort',
'COM_USERS_HEADING_ACTIVATED', 'a.activation',
$listDirn, $listOrder); ?>
					</th>
					<th width="25%" class="nowrap">
						<?php echo JText::_('COM_USERS_HEADING_GROUPS'); ?>
					</th>
					<th width="1%" class="nowrap">
						<?php echo JHtml::_('searchtools.sort',
'JGRID_HEADING_ID', 'a.id', $listDirn, $listOrder);
?>
					</th>
				</tr>
			</thead>
			<tfoot>
				<tr>
					<td colspan="6">
						<?php echo $this->pagination->getListFooter(); ?>
					</td>
				</tr>
			</tfoot>
			<tbody>
				<?php $i = 0; ?>
				<?php foreach ($this->items as $item) : ?>
					<tr class="row<?php echo $i % 2; ?>">
						<td>
							<a class="pointer button-select" href="#"
data-user-value="<?php echo $item->id; ?>"
data-user-name="<?php echo $this->escape($item->name);
?>"
								data-user-field="<?php echo $this->escape($field);
?>" <?php if ($isMoo) : ?>onclick="<?php echo
$onClick; ?>"<?php endif; ?>>
								<?php echo $this->escape($item->name); ?>
							</a>
						</td>
						<td>
							<?php echo $this->escape($item->username); ?>
						</td>
						<td class="center">
							<span class="<?php echo $enabledStates[(int)
$this->escape($item->block)]; ?>"></span>
						</td>
						<td class="center">
							<span class="<?php echo
$activatedStates[(empty($item->activation) ? 0 : 1)];
?>"></span>
						</td>
						<td>
							<?php echo nl2br($item->group_names); ?>
						</td>
						<td>
							<?php echo (int) $item->id; ?>
						</td>
					</tr>
				<?php endforeach; ?>
			</tbody>
		</table>
		<?php endif; ?>
		<input type="hidden" name="task"
value="" />
		<input type="hidden" name="field"
value="<?php echo $this->escape($field); ?>" />
		<input type="hidden" name="boxchecked"
value="0" />
		<input type="hidden" name="required"
value="<?php echo $userRequired; ?>" />
		<input type="hidden" name="ismoo"
value="<?php echo $isMoo; ?>" />
		<?php echo JHtml::_('form.token'); ?>
	</form>
</div>
users/view.html.php000064400000010645151161164400010340 0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_users
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

/**
 * View class for a list of users.
 *
 * @since  1.6
 */
class UsersViewUsers extends JViewLegacy
{
	/**
	 * The item data.
	 *
	 * @var   object
	 * @since 1.6
	 */
	protected $items;

	/**
	 * The pagination object.
	 *
	 * @var   JPagination
	 * @since 1.6
	 */
	protected $pagination;

	/**
	 * The model state.
	 *
	 * @var   JObject
	 * @since 1.6
	 */
	protected $state;

	/**
	 * A JForm instance with filter fields.
	 *
	 * @var    JForm
	 * @since  3.6.3
	 */
	public $filterForm;

	/**
	 * An array with active filters.
	 *
	 * @var    array
	 * @since  3.6.3
	 */
	public $activeFilters;

	/**
	 * An ACL object to verify user rights.
	 *
	 * @var    JObject
	 * @since  3.6.3
	 */
	protected $canDo;

	/**
	 * An instance of JDatabaseDriver.
	 *
	 * @var    JDatabaseDriver
	 * @since  3.6.3
	 */
	protected $db;

	/**
	 * Display the view
	 *
	 * @param   string  $tpl  The name of the template file to parse;
automatically searches through the template paths.
	 *
	 * @return  void
	 */
	public function display($tpl = null)
	{
		$this->items         = $this->get('Items');
		$this->pagination    = $this->get('Pagination');
		$this->state         = $this->get('State');
		$this->filterForm    = $this->get('FilterForm');
		$this->activeFilters = $this->get('ActiveFilters');
		$this->canDo         =
JHelperContent::getActions('com_users');
		$this->db            = JFactory::getDbo();

		UsersHelper::addSubmenu('users');

		// Check for errors.
		if (count($errors = $this->get('Errors')))
		{
			throw new Exception(implode("\n", $errors), 500);
		}

		// Include the component HTML helpers.
		JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html');

		$this->addToolbar();
		$this->sidebar = JHtmlSidebar::render();

		parent::display($tpl);
	}

	/**
	 * Add the page title and toolbar.
	 *
	 * @return  void
	 *
	 * @since   1.6
	 */
	protected function addToolbar()
	{
		$canDo = $this->canDo;
		$user  = JFactory::getUser();

		// Get the toolbar object instance
		$bar = JToolbar::getInstance('toolbar');

		JToolbarHelper::title(JText::_('COM_USERS_VIEW_USERS_TITLE'),
'users user');

		if ($canDo->get('core.create'))
		{
			JToolbarHelper::addNew('user.add');
		}

		if ($canDo->get('core.edit'))
		{
			JToolbarHelper::editList('user.edit');
		}

		if ($canDo->get('core.edit.state'))
		{
			JToolbarHelper::divider();
			JToolbarHelper::publish('users.activate',
'COM_USERS_TOOLBAR_ACTIVATE', true);
			JToolbarHelper::unpublish('users.block',
'COM_USERS_TOOLBAR_BLOCK', true);
			JToolbarHelper::custom('users.unblock',
'unblock.png', 'unblock_f2.png',
'COM_USERS_TOOLBAR_UNBLOCK', true);
			JToolbarHelper::divider();
		}

		if ($canDo->get('core.delete'))
		{
			JToolbarHelper::deleteList('JGLOBAL_CONFIRM_DELETE',
'users.delete', 'JTOOLBAR_DELETE');
			JToolbarHelper::divider();
		}

		// Add a batch button
		if ($user->authorise('core.create', 'com_users')
			&& $user->authorise('core.edit',
'com_users')
			&& $user->authorise('core.edit.state',
'com_users'))
		{
			$title = JText::_('JTOOLBAR_BATCH');

			// Instantiate a new JLayoutFile instance and render the batch button
			$layout = new JLayoutFile('joomla.toolbar.batch');

			$dhtml = $layout->render(array('title' => $title));
			$bar->appendButton('Custom', $dhtml, 'batch');
		}

		if ($canDo->get('core.admin') ||
$canDo->get('core.options'))
		{
			JToolbarHelper::preferences('com_users');
			JToolbarHelper::divider();
		}

		JToolbarHelper::help('JHELP_USERS_USER_MANAGER');
	}

	/**
	 * Returns an array of fields the table can be sorted by
	 *
	 * @return  array  Array containing the field name to sort by as the key
and display text as value
	 *
	 * @since   3.0
	 */
	protected function getSortFields()
	{
		return array(
			'a.name'          =>
JText::_('COM_USERS_HEADING_NAME'),
			'a.username'      =>
JText::_('JGLOBAL_USERNAME'),
			'a.block'         =>
JText::_('COM_USERS_HEADING_ENABLED'),
			'a.activation'    =>
JText::_('COM_USERS_HEADING_ACTIVATED'),
			'a.email'         => JText::_('JGLOBAL_EMAIL'),
			'a.lastvisitDate' =>
JText::_('COM_USERS_HEADING_LAST_VISIT_DATE'),
			'a.registerDate'  =>
JText::_('COM_USERS_HEADING_REGISTRATION_DATE'),
			'a.id'            =>
JText::_('JGRID_HEADING_ID'),
		);
	}
}
configmarket/index.html000064400000000032151161332360011206
0ustar00<html><body></body></html>configmarket/tmpl/acl.php000064400000001730151161332360011443
0ustar00<?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
if(!empty($this->acl_type)) {
	if($this->acl_type == 'vendor_options')
		echo $this->loadTemplate('options');
	else
		echo $this->loadTemplate('edit');
	return;
}
?>
<div class="iframedoc"
id="iframedoc"></div>
<div class="adminform">
	<div id="cpanel">
<?php foreach($this->buttons as $btn) { ?>
		<div class="icon-wrapper">
			<div class="icon">
				<a href="<?php echo $btn['url'];?>">
					<span class="<?php echo $btn['icon'];?>"
style="background-repeat:no-repeat;background-position:center;height:48px;padding:10px
0;"></span>
					<span><?php echo $btn['name'];?></span>
				</a>
			</div>
		</div>
<?php } ?>
	<div style="clear:both"></div>
	</div>
</div>
configmarket/tmpl/acl_edit.php000064400000025200151161332360012446
0ustar00<?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');
?><div class="iframedoc"
id="iframedoc"></div>
<form action="<?php echo
hikamarket::completeLink('config'); ?>"
method="post" name="adminForm"
id="adminForm">
	<table id="hikamarket_acl_list" class="adminlist pad0
table table-striped table-hover">
		<thead>
			<tr>
				<th class="hikamarket_acl_name_title title"
style="min-width:200px;"><?php echo
JText::_('HIKA_NAME'); ?></th>
<?php
	foreach($this->groups as $group) {
?>
				<th class="hikamarket_acl_group_<?php echo $group->id;
?>_title title titletoggle"><?php echo $group->title;
?></th>
<?php
	}
?>
			</tr>
		</thead>
		<tfoot>
			<tr>
				<td colspan="<?php echo count($this->groups) + 1;
?>">
				</td>
			</tr>
		</tfoot>
		<tbody>
<?php
$k = 0;
function hikamarket_draw_acl_line($acls, $full_key, $tree, &$t,
&$k, &$aclData, $depth = 0, $visible = true) {
	foreach($acls as $key => $value) {
		$name = (is_array($value)) ? $key : $value;
		$isParent = (is_array($value));
		$styles = '';
		$trJs = '';
		$my_key = trim($full_key . '/' . $name, '/');

		if(!$visible) $styles .= 'display:none;';
		if($isParent) {
			$styles .= 'cursor:pointer;';
			$trJs =
'window.localPage.expand(\''.$my_key.'\');';
		}

		$aclData[$my_key] = array();

?>
			<tr class="row<?php echo $k; ?>"
data-acl="<?php echo $name; ?>" data-parent="<?php
echo $full_key; ?>"<?php echo $isParent?'
data-folder="1"':''; ?> style="<?php
echo $styles;?>">
				<td onclick="<?php echo $trJs; ?>">
<?php
		echo str_repeat('<img
src="'.HIKAMARKET_IMAGES.'otree/line.gif"
style="vertical-align:middle;" alt="" />',
$depth);
		if($isParent) {
			echo '<img
src="'.HIKAMARKET_IMAGES.'otree/plus.gif"
style="vertical-align:middle;" alt="" />';
			echo '<img
src="'.HIKAMARKET_IMAGES.'otree/folder.gif"
style="vertical-align:middle;" alt="" />';
		} else {
			echo '<img
src="'.HIKAMARKET_IMAGES.'otree/join.gif"
style="vertical-align:middle;" alt="" />';
			echo '<img
src="'.HIKAMARKET_IMAGES.'otree/page.gif"
style="vertical-align:middle;" alt="" />';
		}
?>
					<?php echo $name; ?>
				</td>
<?php
		foreach($t->groups as $key => $group) {
			$v = 0;
			if(in_array($my_key, $t->aclConfig[$group->id]))
				$v = 12;
			else if(in_array('!'.$my_key,
$t->aclConfig[$group->id]))
				$v = 11;

			if($v == 0) {
				$parentKeys = explode('/', $full_key);
				while(!empty($parentKeys) && $v == 0) {
					$n = implode('/', $parentKeys);
					if(isset($aclData[$n]['g'.$group->id]) &&
$aclData[$n]['g'.$group->id] > 10)
						$v = $aclData[$n]['g'.$group->id] - 10;
					array_pop($parentKeys);
				}
			}
			if($v == 0) {
				for($l = $key - 1; $l >= 0 && $v == 0; $l--) {
					$g = $t->groups[$l];
					if((int)$g->lft < (int)$group->lft && (int)$g->rgt
> (int)$group->rgt &&
isset($aclData[$my_key]['g'.$g->id]) &&
$aclData[$my_key]['g'.$g->id] > 10)
						$v = $aclData[$my_key]['g'.$g->id] - 10;
				}
			}
			if($v == 0 && !empty($full_key)) {
				$v = $aclData[$full_key]['g'.$group->id];
			}

			$aclData[$my_key]['g'.$group->id] = $v;

			$class = array();
			if($v > 10)
				$class[] = ' set';
			if($v == 1 || $v == 11)
				$class[] = ' unpublished';
			if($v == 2 || $v == 12)
				$class[] = ' published';

			if(!empty($class))
				$class = ' class="'.implode(' ',
$class).'"';
			else
				$class = '';
?>
				<td data-group="<?php echo $group->id; ?>"
onclick="localPage.process(this);"<?php echo $class;
?>><span class="acl-icon"></span></td>
<?php
		}
?>
			</tr>
<?php
		$k = 1 - $k;

		if($isParent) {
			hikamarket_draw_acl_line($value, $my_key, $tree, $t, $k, $aclData,
$depth + 1, ($depth+1 < 2));
		}
	}
}
	$aclData = array();
	hikamarket_draw_acl_line($this->acls, '', null, $this, $k,
$aclData);
?>
		</tbody>
	</table>
<script type="text/javascript">
window.hikashop.ready(function(){
	window.hikashop.cleanTableRows('hikamarket_acl_list');
});
if(!window.localPage)
	window.localPage = {};
window.localPage.aclGroups = {
<?php
	foreach($this->groups as $k => $group) {
		$children = array();
		foreach($this->groups as $g) {
			if($g->lft > $group->lft && $g->rgt <
$group->rgt) {
				$children[] = $g->id;
			}
		}
		if($k > 0)
			echo ','."\r\n";
		echo "\t" . $group->id . ':[' .
implode(',', $children) . ']';
	}
	echo "\r\n";
?>
};
window.localPage.aclGroupsOrder = [<?php
	$g = array();
	foreach($this->groups as $group) {
		$g[] = $group->id;
	}
	echo implode(',', $g);
?>];
window.localPage.aclData = <?php echo json_encode($aclData); ?>;
window.localPage.expand = function(name) {
	var d = document,
		k = 0, c = '', line = null, attr = null,
		l = name.length,
		tbl = d.getElementById('hikamarket_acl_list'),
		lines = tbl.getElementsByTagName('tr');
	for(var i = 0; i < lines.length; i++) {
		line = lines[i];
		attr = line.getAttribute('data-parent');
		if(attr == name) {
			if( line.style.display == 'none')
				line.style.display = '';
			else
				line.style.display = 'none';
		} else if(attr && attr.substring(0, l) == name &&
line.style.display != 'none') {
			line.style.display = 'none';
		}
	}
	window.hikashop.cleanTableRows('hikamarket_acl_list');
}
window.localPage.process = function(el) {
	var d = document, o = window.Oby, t = this,
		parentGroup = [],
		status = 0,
		aclName = el.parentNode.getAttribute('data-acl'),
		aclParent = el.parentNode.getAttribute('data-parent'),
		group = parseInt(el.getAttribute('data-group'));

	if(aclParent && aclParent.length > 0)
		aclName = aclParent + '/' + aclName;
	status = t.getCell(aclName, group);

	if(status < 0)
		return;

	for(var i in t.aclGroups) {
		if(t.aclGroups[i].indexOf(group) >= 0) {
			parentGroup[parentGroup.length] = i;
		}
	}

	if(status < 10) {
		t.aclData[aclName]['g'+group] = 12;
		t.setAclValue(group, aclName, 1);
	} else if(status == 12) {
		t.aclData[aclName]['g'+group] = 11;
		t.setAclValue(group, aclName, 2);
	} else  {
		var s = 0, p = 0, n = null, parents = aclParent.split('/');

		while(parents.length > 0 && s == 0) {
			n = parents.join('/');
			p = t.getCell(n, group);
			if(p > 10) s = p - 10;
			parents.pop();
		}

		for(var i = parentGroup.length - 1; s == 0 && i >= 0; i--) {
			p = t.getCell(aclName, parentGroup[i]);
			if(p > 10) s = p - 10;
		}

		if(s === 0) {
			p = t.getCell(aclParent, group);
			if(p > 0) s = p;
		}

		t.aclData[aclName]['g'+group] = s;
		t.setAclValue(group, aclName, 3);
	}
	t.reprocess();
	t.display();
};
window.localPage.getCell = function(aclName, group) {
	var t = this, a = t.aclData[aclName];
	if(a) return a['g' + group];
	return -1;
};
window.localPage.setAclValue = function(group, aclName, mode) {
	var t = this, d = document,
		input = d.getElementById('aclinput_' + group),
		values = [], inv = '!' + aclName, f = 0;

	if(!input)
		return;
	if(input.value.length > 0)
		values = input.value.split(',');

	for(var i = 0; i < values.length; i++) {
		if(values[i] == aclName && mode == 1) return;
		if(values[i] == inv && mode == 2) return;

		if(values[i] == aclName && mode == 2)
			f++;
		if((values[i] == aclName || values[i] == inv) && mode == 3)
			f++;

		if(f > 0 && values[i+f] && values[i+f].length > 0)
			values[i] = values[i+f];
	}
	if(f) {
		for(var i = 0; i < f; i++)
			values.pop();
	}
	if(mode == 1) values[values.length] = aclName;
	if(mode == 2) values[values.length] = inv;
	input.value = values.join(',');
};
window.localPage.reprocess = function() {
	var t = this, data = t.aclData,
		l = null, p = null, v = null, g = 0, s = 0, w = 0;
	for(var n in data) {
		if(!data.hasOwnProperty(n))
			continue;
		l = data[n];
		for(var j = 0; j < t.aclGroupsOrder.length; j++) {
			g = t.aclGroupsOrder[j];
			v = l['g'+g] || 0;
			if(v > 10)
				continue;
			s = 0;
			p = n.split('/');
			while(p.length > 0 && s == 0) {
				w = data[p.join('/')]['g'+g];
				if(w > 10) s = w - 10;
				p.pop();
			}
			for(var i = (j-1); s === 0 && i >= 0; i--) {
				var k = t.aclGroupsOrder[i];
				if(t.aclGroups[k].indexOf(g) >= 0 && l['g'+k] >
0) { // was "> 10" before
					if(l['g'+k] > 10)
						s = l['g'+k] - 10;
					else
						s = l['g'+k];
				}
			}
			if(s === 0) {
				p = n.split('/');
				p.pop();
				if(p.length > 0)
					s = data[p.join('/')]['g'+g];
			}
			t.aclData[n]['g'+g] = s;
		}
	}
}
window.localPage.display = function() {
	var t = this, d = document, o = window.Oby,
		tbl = d.getElementById('hikamarket_acl_list'),
		lines = null, line = null, cells = null, aclName = '', g =
null, v = null,
		tmp = tbl.firstChild;

	while(tmp && tmp.nodeName.toLowerCase() != 'tbody') {
		tmp = tmp.nextSibling;
	}
	if(!tmp) return;

	lines = tmp.childNodes;
	for(var i = 0; i < lines.length; i++) {
		line = lines[i];
		if(line && line.nodeName.toLowerCase() != 'tr')
			continue;

		cells = line.childNodes;

		aclName = line.getAttribute('data-acl');
		if(line.getAttribute('data-parent') &&
line.getAttribute('data-parent').length > 0)
			aclName = line.getAttribute('data-parent') + '/' +
aclName;
		tmp = t.aclData[aclName];

		for(var k = 0, j = 0; k < cells.length; k++) {
			if(cells[k] && cells[k].nodeName.toLowerCase() !=
'td')
				continue;
			j++;
			if(j == 1)
				continue;

			g = t.aclGroupsOrder[ j-2 ];
			v = tmp['g' + g];
			if(v > 10)
				o.addClass(cells[k], 'set');
			else
				o.removeClass(cells[k], 'set');

			if(v == 1 || (v - 10) == 1) {
				o.addClass(cells[k], 'unpublished');
				o.removeClass(cells[k], 'published');
			} else if(v == 2 || (v - 10) == 2) {
				o.addClass(cells[k], 'published');
				o.removeClass(cells[k], 'unpublished');
			} else {
				o.removeClass(cells[k], 'published');
				o.removeClass(cells[k], 'unpublished');
			}
		}
	}
};
</script>
	<div style="clear:both"
class="clr"></div>
<?php
	foreach($this->groups as $group) {
		$config = '';
		if(!empty($this->aclConfig[$group->id]))
			$config = implode(',', $this->aclConfig[$group->id]);
		echo '<input type="hidden"
id="aclinput_'.$group->id.'"
name="data[acl][' . $group->id . ']"
value="' . $config . '"/>' . "\r\n";
		unset($config);
	}
?>
	<input type="hidden" name="acl_type"
value="<?php echo $this->acl_type; ?>" />
	<input type="hidden" name="option"
value="<?php echo HIKAMARKET_COMPONENT; ?>" />
	<input type="hidden" name="task" value=""
/>
	<input type="hidden" name="ctrl"
value="<?php echo hikaInput::get()->getCmd('ctrl');
?>" />
	<?php echo JHTML::_( 'form.token' ); ?>
</form>
configmarket/tmpl/acl_options.php000064400000021227151161332360013221
0ustar00<?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');
?><div class="iframedoc"
id="iframedoc"></div>
<form action="<?php echo
hikamarket::completeLink('config'); ?>"
method="post" name="adminForm"
id="adminForm">
	<table id="hikamarket_acl_list" class="adminlist pad0
table table-striped table-hover hikamarket_acl_opt_list">
		<thead>
			<tr>
				<th class="hikamarket_acl_name_title title"><?php
echo JText::_('HIKA_NAME'); ?></th>
<?php
	$width = floor(70 / count($this->groups));
	foreach($this->groups as $group) {
?>
				<th class="hikamarket_acl_group_<?php echo $group->id;
?>_title title" style="width:<?php echo $width;
?>%"><?php echo $group->title; ?></th>
<?php
	}
?>
			</tr>
		</thead>
		<tfoot>
			<tr>
				<td colspan="<?php echo count($this->groups) + 1;
?>">
				</td>
			</tr>
		</tfoot>
		<tbody>
<?php
	$options = array(
		'product_limitation' => array(
			'title' =>
JText::_('VENDOR_PRODUCT_LIMITATION'),
			'mode' => 'text'
		),
		'product_min_price' => array(
			'title' => JText::_('VENDOR_PRODUCT_MIN_PRICE'),
			'mode' => 'prices'
		),
		'product_max_price' => array(
			'title' => JText::_('VENDOR_PRODUCT_MAX_PRICE'),
			'mode' => 'prices'
		),
		'product_max_prices_per_product' => array(
			'title' =>
JText::_('VENDOR_PRODUCT_MAX_PRICES_PER_PRODUCT'),
			'mode' => 'text'
		),
		'product_max_categories_per_product' => array(
			'title' =>
JText::_('VENDOR_PRODUCT_MAX_CATEGORIES_PER_PRODUCT'),
			'mode' => 'text'
		),
		'product_max_options_per_product' => array(
			'title' =>
JText::_('VENDOR_PRODUCT_MAX_OPTIONS_PER_PRODUCT'),
			'mode' => 'text'
		),
		'product_max_related_per_product' => array(
			'title' =>
JText::_('VENDOR_PRODUCT_MAX_RELATED_PER_PRODUCT'),
			'mode' => 'text'
		),
		'product_max_images_per_product' => array(
			'title' =>
JText::_('VENDOR_PRODUCT_MAX_IMAGES_PER_PRODUCT'),
			'mode' => 'text'
		),
	);
	foreach($options as $key => $option) {
?>
			<tr>
				<td><label><?php echo $option['title'];
?></label></td>
<?php
	foreach($this->groups as $group) {
?>
				<td class="hikamarket_acl_opt hikamarket_acl_opt_<?php echo
$key; ?> hikamarket_acl_group_<?php echo $group->id; ?>"
style="text-align:center" data-acl-type="<?php echo
$option['mode']; ?>" data-acl-id="data_<?php echo
$group->id . '_' . $key; ?>" onclick="return
window.localPage.edit(this);"><?php
		$value = '';
		if(isset($this->aclConfig[$group->id][$key]))
			$value = $this->aclConfig[$group->id][$key];
		if(empty($option['mode']) || $option['mode'] ==
'text') {
			echo '<div
class="acl_value">'.$value.'</div>'.
				'<input type="hidden" autocomplete="off"
id="data_'.$group->id.'_'.$key.'"
name="data['.$group->id.']['.$key.']"
value="'.$value.'" />';
		} else if($option['mode'] == 'prices') {
			$data = json_decode($value, true);
			$formated_value = array();
			if(!empty($data)) {
				foreach($data as $k => $v) {
					$v = hikamarket::toFloat($v);
					if($v == 0.0)
						continue;
					$formated_value[] = $v . '&nbsp;' .
$this->currencies[$k]->currency_code;
				}
			}
			echo '<div
class="acl_value">'.implode('<br/>',
$formated_value).'</div>'.
				'<input type="hidden" autocomplete="off"
id="data_'.$group->id.'_'.$key.'"
name="data['.$group->id.']['.$key.']"
value="'.$this->escape($value).'" />';
		}
				?></td>
<?php
	}
?>
			</tr>
<?php
	}
?>
		</tbody>
	</table>
<script type="text/javascript">
if(!window.localPage)
	window.localPage = {};

window.localPage.currencies = <?php
	$currencies = array();
	foreach($this->currencies as $currency) {
		$currencies[$currency->currency_id] = $currency->currency_code;
	}
	echo json_encode($currencies);
?>;

window.localPage.edit = function(el) {
	var d = document,
		id = el.getAttribute('data-acl-id'),
		type = el.getAttribute('data-acl-type'),
		div = el.firstChild,
		field = null;
	if(id)
		field = d.getElementById(id);
	if(!field)
		return true;

	if(el.editing === true)
		return true;
	if(el.editing === false) {
		el.editing = null;
		return true;
	}

	switch(type) {
		case 'text':
			window.localPage.editText(div, field, id, el);
			el.editing = true;
			break;
		case 'prices':
			window.localPage.editPrices(div, field, id, el);
			el.editing = true;
			break;
	}
	return false;
};

window.localPage.editText = function(div, field, id, el) {
	div.innerHTML = '<input type="text" value="' +
field.value + '" id="field_' + id +
'"/>'+
			'<a href="#apply" onclick="return
window.localPage.apply(this);"
class="acl-apply"><span><?php echo
JText::_('APPLY'); ?></span></a>'+
			'<a href="#cancel" onclick="return
window.localPage.cancel(this);"
class="acl-cancel"><span><?php echo
JText::_('CANCEL'); ?></span></a>';
	el.editing = true;
	input = document.getElementById('field_' + id);
	if(input) input.focus();
};

window.localPage.editPrices = function(div, field, id, el) {
	var data = '', currencies = window.localPage.currencies, code =
null, value = '',
		prices = window.Oby.evalJSON(field.value);
	for(var i in currencies) {
		if(!currencies.hasOwnProperty(i))
			continue;
		value = prices ? (prices[i] || '') : '';
		data += '<input type="text" value="' + value
+ '" id="field_' + id + '_p' + i +
'"/>&nbsp;'+currencies[i]+'<br/>';
	}
	data += '<a href="#apply" onclick="return
window.localPage.apply(this);"
class="acl-apply"><span><?php echo
JText::_('APPLY'); ?></span></a>'+
			'<a href="#cancel" onclick="return
window.localPage.cancel(this);"
class="acl-cancel"><span><?php echo
JText::_('CANCEL'); ?></span></a>';

	div.innerHTML = data;
	el.editing = true;
};

window.localPage.getPricesText = function(data) {
	var ret = '', currencies = window.localPage.currencies, code =
null, value = '',
		prices = typeof(data) == 'string' ? window.Oby.evalJSON(data) :
data;
	for(var i in currencies) {
		if(!currencies.hasOwnProperty(i))
			continue;
		if(!prices || !prices[i])
			continue;
		value = parseFloat(prices[i]);
		if(!isNaN(value) && value > 0.0)
			ret += value + '&nbsp;' + currencies[i] +
'<br/>';
	}
	return ret;
};

window.localPage.getPricesData = function(id, json) {
	var d = document, ret = {}, input = null, currencies =
window.localPage.currencies, value = '';
	for(var i in currencies) {
		if(!currencies.hasOwnProperty(i))
			continue;
		input = d.getElementById('field_' + id + '_p' + i);
		if(!input) continue;
		value = parseFloat(input.value);
		if(!isNaN(value) && value > 0.0)
			ret[i] = value;
	}
	if(json === undefined || !json)
		return ret;
	if(JSON.stringify)
		return JSON.stringify(ret);
	var r = [];
	for(var i in ret) {
r.push('"'+i+'":'+ret[i]); }
	return '{' + r.join(',') + '}';
};

window.localPage.apply = function(el) {
	var d = document, w = window, o = w.Oby, p = el;
	while(p && !(p.nodeName.toLowerCase() == 'td' &&
o.hasClass(p, 'hikamarket_acl_opt'))) { p = p.parentNode; }
	if(!p) return false;

	var id = p.getAttribute('data-acl-id'),
		type = p.getAttribute('data-acl-type'),
		div = p.firstChild,
		field = null;
	if(id)
		field = d.getElementById(id);
	if(!field)
		return false;

	switch(type) {
		case 'text': {
			var input = d.getElementById('field_' + id);
			if(!input) return false;
			field.value = input.value;
			div.innerHTML = field.value;
			p.editing = false;
		}
		break;

		case 'prices': {
			field.value = w.localPage.getPricesData(id, true);
			div.innerHTML = w.localPage.getPricesText(field.value);
			p.editing = false;
		}
		break;
	}
	return false;
}

window.localPage.cancel = function(el) {
	var d = document, w = window, o = w.Oby, p = el;
	while(p && !(p.nodeName.toLowerCase() == 'td' &&
o.hasClass(p, 'hikamarket_acl_opt'))) { p = p.parentNode; }
	if(!p) return false;

	var id = p.getAttribute('data-acl-id'),
		type = p.getAttribute('data-acl-type'),
		div = p.firstChild,
		field = null;
	if(id)
		field = d.getElementById(id);
	if(!field)
		return false;

	switch(type) {
		case 'text':
			div.innerHTML = field.value;
			p.editing = false;
			break;
		case 'prices':
			div.innerHTML = w.localPage.getPricesText(field.value);
			p.editing = false;
			break;
	}
	return false;
};
</script>
	<input type="hidden" name="acl_type"
value="<?php echo $this->acl_type; ?>" />
	<input type="hidden" name="option"
value="<?php echo HIKAMARKET_COMPONENT; ?>" />
	<input type="hidden" name="task" value=""
/>
	<input type="hidden" name="ctrl"
value="<?php echo hikaInput::get()->getCmd('ctrl');
?>" />
	<?php echo JHTML::_( 'form.token' ); ?>
</form>
configmarket/tmpl/advanced.php000064400000000451151161332360012450
0ustar00<?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

configmarket/tmpl/config.php000064400000014030151161332360012146
0ustar00<?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');
?><div class="iframedoc"
id="iframedoc"></div>
<form action="<?php echo
hikamarket::completeLink('config'); ?>"
method="post" name="adminForm"
id="adminForm">
	<input type="hidden" name="option"
value="<?php echo HIKAMARKET_COMPONENT; ?>" />
	<input type="hidden" name="task"
id="config_form_task" value="" />
	<input type="hidden" name="ctrl"
value="config" />
	<?php echo JHTML::_('form.token'); ?>
<?php

	$options = array(
		'startOffset' => $this->default_tab,
		'useCookie' => true
	);

	if(!HIKASHOP_J30) {
		$options['onActive'] = '
function(title, description) {
	description.setStyle("display", "block");
	title.addClass("open").removeClass("closed");
	if(title.getAttribute("class").indexOf("config_")
>= 0)
		myHash =
title.getAttribute("class").replace("tabs","").replace("open","").replace("config_","").replace(/^\s*|\s*$/g,
"");
	else
		myHash =
title.getAttribute("id").replace("config_","").replace(/^\s*|\s*$/g,
"");
	if(window.location.hash.substr(1, myHash.length) != myHash)
		window.location.hash = myHash;
}';
	}
	echo $this->tabs->start('hikamarket_config_tab',
$options);

	echo $this->tabs->panel(JText::_('MAIN'),
'config_main');
	{
		$this->setLayout('main');
		echo $this->loadTemplate();
	}

	if(hikamarket::level(1)) {
		echo $this->tabs->panel(JText::_('MARKET_OPTIONS'),
'config_market');
		{
			$this->setLayout('market');
			echo $this->loadTemplate();
		}
	}

	echo $this->tabs->panel(JText::_('YOUR_VENDOR'),
'config_vendor');
	{
		$params = new hikaParameter('');
		$params->set('configPanelIntegration', true);
		$js = '';
		echo hikamarket::getLayout('vendormarket', 'form',
$params, $js);
		if(!empty($js)) {
			$doc = JFactory::getDocument();
			$doc->addScriptDeclaration($js);
		}
	}

	echo $this->tabs->panel(JText::_('ACCESS_LEVEL'),
'config_acl');
	{
		$this->setLayout('config_acl');
		echo $this->loadTemplate();
	}

	echo $this->tabs->panel(JText::_('LANGUAGES'),
'config_language');
	{
		$this->setLayout('languages');
		echo $this->loadTemplate();
	}

	echo $this->tabs->panel(JText::_('PRODUCT_TEMPLATES'),
'config_producttemplates');
	{
		$this->setLayout('product_template');
		echo $this->loadTemplate();
	}

	echo $this->tabs->end();

?>
	<div style="clear:both"
class="clr"></div>
</form>

<script>
var configWatcher = {
	currentHRef : '',
	init: function(){
		var t = this;
		setInterval( function(){ t.periodical(); }, 50 );
<?php
	if(HIKASHOP_BACK_RESPONSIVE) {
?>
		jQuery("ul.nav-remember").each(function(nav){
			var id = jQuery(this).attr("id");
			jQuery("#" + id + "
a[data-toggle=\"tab\"]").on("shown", function (e)
{
				var myHash =
jQuery(this).attr("id").replace("config_","").replace("_tablink","");
				if(window.location.hash.substr(1, myHash.length) != myHash)
					window.location.hash = myHash;
			});
		});
<?php
	} else {
		hikashop_loadJsLib('jquery');
?>
		t.win = jQuery(window);
		t.body = jQuery('body');
		t.navTop = jQuery('#adminForm').offset().top + 10;
		t.isFixed = 0;

		t.navIds = [
			jQuery('#menu_main'), jQuery('#menu_market')
		];
		t.saveIds = [
			jQuery('#menu-save-button-main'),
jQuery('#menu-save-button-market')
		];
		t.scrollIds = [
			jQuery('#menu-scrolltop-main'),
jQuery('#menu-scrolltop-market')
		];

		t.win.scroll(function(){t.processScroll(t);});
		t.processScroll();
<?php
	}
?>
	},
	periodical: function() {
		var href = window.location.hash.substring(1);
		if( href != this.currentHRef ) {
			this.currentHRef = href;
			this.switchAndScroll(href);
		}
	},
	switchAndScroll: function(hash) {
		if(hash.length == 0)
			return;
		if(hash.indexOf('_') < 0) {
			var tabName = hash;
			hash = '';
		} else {
			var tabName = hash.substr(0, hash.indexOf('_'));
		}
<?php
	if(HIKASHOP_BACK_RESPONSIVE) {
?>
		jQuery("#config_"+tabName+"_tablink").tab("show");
		this.scrollToCust( hash );
<?php
	} else {
?>
		var childrens =
$('hikamarket_config_tab').getChildren('dt'), elt = 0,
j = 0;
		for (var i = 0; i < childrens.length; i++){
			var children = childrens[i];
			if(children.hasClass('tabs') || children.id.substr(0,
children.id.indexOf('_'))){
				if(children.hasClass('config_'+tabName) || children.id ==
'config_'+tabName){
					children.addClass('open').removeClass('closed');
					elt = j;
				}else{
					children.addClass('closed').removeClass('open');
				}
				j++;
			}
		}

		var tabsContent =
$('hikamarket_config_tab').getNext('div');
		var tabChildrens = tabsContent.getChildren('dd');
		for (var i = 0; i < tabChildrens.length; i++){
			var childContent = tabChildrens[i];
			if(i == elt){
				childContent.style.display = 'block';
			}else{
				childContent.style.display = 'none';
			}
		}

		var d = document, elem = null;
		if(hash) elem = d.getElementById(hash);
		if(elem)
			window.scrollTo(0, elem.offsetTop);
		else
			window.scrollTo(0, 0);
	},
	processScroll: function() {
		var t = this, scrollTop = t.win.scrollTop();
		if(scrollTop >= t.navTop && !t.isFixed) {
			t.isFixed = 1;
			for(var i = 0; i < t.navIds.length; i++){
				t.navIds[i].addClass('navmenu-fixed');
				t.saveIds[i].removeClass('menu-save-button');
				t.scrollIds[i].removeClass('menu-scrolltop');
			}

		} else if(scrollTop <= t.navTop && t.isFixed) {
			t.isFixed = 0;
			for(var i = 0; i < t.navIds.length; i++){
				t.navIds[i].removeClass('navmenu-fixed');
				t.saveIds[i].addClass('menu-save-button');
				t.scrollIds[i].addClass('menu-scrolltop');
			}
		}
<?php
	}
?>
	},
	scrollToCust: function(name) {
		var d = document, elem = d.getElementById(name);
		if( !elem ) { window.scrollTo(0, 0); return; }
		var topPos = elem.offsetTop + 100;
		window.scrollTo(0, topPos);
	}
}
window.hikashop.ready( function(){ configWatcher.init(); });
</script>
configmarket/tmpl/config_acl.php000064400000003000151161332360012760
0ustar00<?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');
?><div id="hikashop_backend_tile_edition">
	<div class="hk-container-fluid">

	<div class="hkc-xl-4 hkc-lg-6
hikashop_tile_block"><div>
		<div class="hikashop_tile_title"><?php echo
JText::_('HIKAM_DEFAULT_STORE_ACCESS'); ?></div>
<?php
	echo
$this->marketaclType->display('config[store_default_access]',
$this->config->get('store_default_access',
'*'));
?>
	</div></div>

<?php if(hikamarket::level(1)) { ?>
	<div class="hkc-xl-4 hkc-lg-6
hikashop_tile_block"><div>
		<div class="hikashop_tile_title"><?php echo
JText::_('MAIN_VENDOR_ACL'); ?></div>
<?php
		$acl = '';
		if(!isset($this->vendor->vendor_acl))
			$acl = '';
		else
			$acl = $this->vendor->vendor_acl;
		echo $this->marketaclType->display('vendor_access', $acl,
'vendor_access_inherit');
?>
		</dl>
	</div></div>

	<div class="hkc-xl-4 hkc-lg-6
hikashop_tile_block"><div>
		<div class="hikashop_tile_title"><?php echo
JText::_('MAIN_VENDOR_GROUP'); ?></div>
<?php
		$vendor_group = '';
		if(isset($this->vendor->vendor_group))
			$vendor_group = $this->vendor->vendor_group;
		echo $this->joomlaaclType->display('vendor_group',
$vendor_group, false, false);
?>
	</div></div>
<?php } ?>

	</div>
	<div style="clear:both"
class="clr"></div>
</div>
configmarket/tmpl/css.php000064400000003247151161332360011501
0ustar00<?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');
?><form action="<?php echo
hikamarket::completeLink('config', true); ?>"
method="post"  name="adminForm"
id="adminForm">
	<div class="title" style="float: left;">
		<h1><?php
			if($this->new) {
				echo JText::_('HIKA_FILE').' :
'.$this->type.'_<input type="text"
name="filename"
value="'.$this->filename.'" />';
			} else {
				echo JText::_('HIKA_FILE').' :
'.$this->type.'_'.$this->filename.'.css';
			}
		?></h1>
	</div>
	<div class="toolbar" id="toolbar"
style="float:right; margin:6px;">
		<button class="hikabtn hikabtn-success"
type="button"
onclick="window.hikashop.submitform('savecss',
'adminForm'); return false;"><i class="fas
fa-save"></i> <?php echo JText::_('HIKA_SAVE');
?></button>
	</div>
	<div class="clearfix"></div>

<?php
	echo $this->editor->displayCode('csscontent',
$this->content);
?>
	<input type="hidden" name="option"
value="<?php echo HIKAMARKET_COMPONENT; ?>" />
	<input type="hidden" name="task"
value="savecss" />
	<input type="hidden" name="tmpl"
value="component" />
	<input type="hidden" name="ctrl"
value="config" />
<?php if($this->new) { ?>
	<input type="hidden" name="new" value="1"
/>
<?php } else { ?>
	<input type="hidden" name="file"
value="<?php echo $this->type.'_'.$this->filename;
?>" />
<?php } ?>
	<input type="hidden" name="var"
value="<?php echo hikaInput::get()->getCmd('var');
?>" />
	<?php echo JHTML::_('form.token'); ?>
</form>
configmarket/tmpl/index.html000064400000000032151161332360012162
0ustar00<html><body></body></html>configmarket/tmpl/language.php000064400000003626151161332360012475
0ustar00<?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');
?><form action="<?php echo
hikamarket::completeLink('config',true);?>"
method="post" name="adminForm"
id="adminForm">
	<div class="title" style="float: left;">
		<h1><?php echo JText::_('HIKA_FILE').' :
'.$this->file->name; ?></h1>
	</div>
	<div class="toolbar" id="toolbar"
style="float: right;">
		<button class="hikabtn hikabtn-success"
type="button"
onclick="window.hikashop.submitform('savelanguage',
'adminForm'); return false;"><i class="fas
fa-save"></i> <?php echo JText::_('HIKA_SAVE');
?></button>
		<button class="hikabtn hikabtn-primary"
type="button"
onclick="window.hikashop.submitform('share',
'adminForm'); return false;"><i class="fas
fa-share-alt"></i> <?php echo JText::_('SHARE');
?></button>
	</div>
	<div class="clearfix"></div>

	<div >
		<h2><?php echo JText::_('HIKA_FILE').' :
'.$this->file->name; ?></h2>
		<textarea style="width:100%;box-sizing: border-box;"
rows="18" name="content" id="translation"
><?php echo @$this->file->content;?></textarea>
	</div>

	<hr/>

	<div>
		<h2><?php echo JText::_('HIKAMARKET_OVERRIDE').'
: '; ?></h2>
		<?php echo JText::_('OVERRIDE_WITH_EXPLANATION'); ?>
		<textarea style="width:100%;box-sizing: border-box;"
rows="18" name="content_override"
id="translation_override" ><?php echo
$this->override_content;?></textarea>
	</div>

	<div class="clr"></div>
	<input type="hidden" name="code"
value="<?php echo $this->file->name; ?>" />
	<input type="hidden" name="option"
value="<?php echo HIKAMARKET_COMPONENT; ?>" />
	<input type="hidden" name="task" value=""
/>
	<input type="hidden" name="ctrl"
value="config" />
	<?php echo JHTML::_('form.token'); ?>
</form>
configmarket/tmpl/languages.php000064400000002634151161332360012656
0ustar00<?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');
?><div id="page-languages">

<div class="hikashop_backend_tile_edition">
	<div class="hikashop_tile_block"><div>
		<div class="hikashop_tile_title"><?php echo
JText::_('LANGUAGES'); ?></div>
<table class="adminlist table table-striped table-hover"
cellpadding="1">
	<thead>
		<tr>
			<th class="title titlenum"><?php
				echo JText::_( 'HIKA_NUM' );
			?></th>
			<th class="title titletoggle"><?php
				echo JText::_('HIKA_EDIT');
			?></th>
			<th class="title"><?php
				echo JText::_('HIKA_NAME');
			?></th>
			<th class="title titletoggle"><?php
				echo JText::_('ID');
			?></th>
		</tr>
	</thead>
	<tbody>
<?php
	$k = 0;
	foreach($this->languages as $i => &$language) {
?>
		<tr class="row<?php echo $k; ?>">
			<td align="center"><?php
				echo $i+1;
			?></td>
			<td align="center"><?php
				if($this->manage)
					echo $language->edit;
			?></td>
			<td align="center"><?php
				echo $language->name;
			?></td>
			<td align="center"><?php
				echo $language->language;
			?></td>
		</tr>
<?php
		$k = 1 - $k;
		unset($language);
	}
?>
	</tbody>
</table>
	</div></div>
</div>

</div>
configmarket/tmpl/leftmenu.php000064400000002644151161332360012530
0ustar00<?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');
?><div class="leftmenu-container <?php
if(HIKASHOP_BACK_RESPONSIVE) echo
'leftmenu-container-j30';?>">
	<div <?php if(!HIKASHOP_BACK_RESPONSIVE) echo
'class="config-menu"';?> id="menu_<?php echo
$this->menuname; ?>">
		<a id="menu-scrolltop-<?php echo $this->menuname;
?>" href="#" onclick="window.scrollTo(0, 0);"
class="menu-scrolltop" style="float: right; margin:12px 2px
0px 2px;">
			<span class="scrollTop_img" style="padding: 11px
18px;"></span>
		</a>
		<ul <?php if(HIKASHOP_BACK_RESPONSIVE) echo
'class="hika-navbar-ul" data-spy="affix"
data-offset-top="60"';?>>
<?php
	foreach($this->menudata as $href => $name) {
?>			<li><a href="<?php echo $href;
?>"><?php echo $name; ?><i
class="icon-chevron-right"></i></a></li>
<?php
	}
?>
		</ul>
<?php if(!HIKASHOP_BACK_RESPONSIVE) { ?>
		<a id="menu-save-button-<?php echo $this->menuname;
?>" class="menu-save-button"
onclick="window.hikashop.submitform('apply',
'adminForm'); return false;" href="#"
style="float: right; margin:0px 16px 6px 0px;">
			<span class="icon-32-apply" style="padding: 12px
16px;"> </span><?php echo JText::_('JAPPLY');
?>
		</a>
<?php } ?>
	</div>
</div>
configmarket/tmpl/main.php000064400000035034151161332360011634
0ustar00<?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
echo $this->leftmenu(
	'main',
	array(
		'#main_front' => JText::_('MAIN_OPTIONS'),
		'#main_css' => JText::_('CSS'),
		'#main_editor' => JText::_('HIKA_EDITOR'),
		'#main_email' => JText::_('HIKAM_OPTIONS_EMAIL'),
		'#main_statistics' =>
JText::_('HIKAM_OPTIONS_STATISTICS'),
	)
);
?>
<div id="page-main" class="rightconfig-container <?php
if(HIKASHOP_BACK_RESPONSIVE) echo
'rightconfig-container-j30';?>">

<div id="main_front"
class="hikashop_backend_tile_edition">
	<div class="hikashop_tile_block"><div>
		<div class="hikashop_tile_title"><?php
			echo JText::_('MAIN_OPTIONS');
		?></div>
<table class="hk_config_table table"
style="width:100%">

	<tr>
		<td class="hk_tbl_key"<?php echo
$this->docTip('version');?>><?php echo
JText::_('VERSION'); ?></td>
		<td>
			HikaMarket <?php echo $this->config->get('level') .
' ' . $this->config->get('version'); ?>
[2007200006]
		</td>
	</tr>
	<tr>
		<td class="hk_tbl_key"<?php echo
$this->docTip('frontend_edition');?>><?php echo
JText::_('HIKAM_FRONTEND_EDITION'); ?></td>
		<td><?php
			echo JHTML::_('hikaselect.booleanlist',
'config[frontend_edition]','',$this->config->get('frontend_edition',
1));
		?></td>
	</tr>
	<tr>
		<td class="hk_tbl_key"<?php echo
$this->docTip('show_edit_btn');?>><?php echo
JText::_('HIKAM_FRONT_SHOW_EDIT_BTN'); ?></td>
		<td><?php
			echo JHTML::_('hikaselect.booleanlist',
'config[show_edit_btn]','',$this->config->get('show_edit_btn',
0));
		?></td>
	</tr>

	<tr>
		<td class="hk_tbl_key"<?php echo
$this->docTip('product_edit_cancel_url');?>><?php
echo JText::_('HIKAM_FRONT_PRODUCT_EDIT_CANCEL_MODE');
?></td>
		<td><?php
			$values = array(
				JHTML::_('select.option', 'product',
JText::_('HIKAM_PRODUCT_EDIT_CANCEL_MODE_PRODUCT')),
				JHTML::_('select.option', 'current_url',
JText::_('HIKAM_PRODUCT_EDIT_CANCEL_MODE_CURRENT_URL')),
				JHTML::_('select.option', 'listing',
JText::_('HIKAM_PRODUCT_EDIT_CANCEL_MODE_LISTING')),
			);
			echo JHTML::_('select.genericlist', $values,
'config[product_edit_cancel_url]', '',
'value', 'text',
$this->config->get('product_edit_cancel_url',
'product'));
		?></td>
	</tr>
	<tr>
		<td class="hk_tbl_key"<?php echo
$this->docTip('show_category_explorer');?>><?php echo
JText::_('HIKAM_SHOW_CATEGORY_EXPLORER'); ?></td>
		<td><?php
			echo JHTML::_('hikaselect.booleanlist',
'config[show_category_explorer]','',$this->config->get('show_category_explorer',0));
		?></td>
	</tr>
	<tr>
		<td class="hk_tbl_key"<?php echo
$this->docTip('default_template_id');?>><?php echo
JText::_('HIKAM_DEFAULT_PRODUCT_TEMPLATE'); ?></td>
		<td><?php
			echo $this->nameboxType->display(
				'config[default_template_id]',
				$this->config->get('default_template_id', 0),
				hikamarketNameboxType::NAMEBOX_SINGLE,
				'product_template',
				array(
					'delete' => true,
					'default_text' =>
'<em>'.JText::_('HIKA_NONE').'</em>',
				)
			);
		?></td>
	</tr>
	<tr>
		<td class="hk_tbl_key"<?php echo
$this->docTip('avoid_duplicate_product_code');?>><?php
echo JText::_('AVOID_DUPLICATE_PRODUCT_CODE'); ?></td>
		<td><?php
			echo JHTML::_('hikaselect.booleanlist',
"config[avoid_duplicate_product_code]",'',$this->config->get('avoid_duplicate_product_code',
0));
		?></td>
	</tr>
	<tr>
		<td class="hk_tbl_key"<?php echo
$this->docTip('product_approval');?>><?php echo
JText::_('HIKAM_FRONT_PRODUCT_APPROVAL'); ?></td>
		<td><?php
			echo JHTML::_('hikaselect.booleanlist',
'config[product_approval]', '',
$this->config->get('product_approval',0));
		?></td>
	</tr>
	<tr>
		<td class="hk_tbl_key"<?php echo
$this->docTip('product_cart_link');?>><?php echo
JText::_('HIKAM_DISPLAY_CART_LINK'); ?></td>
		<td><?php
			echo JHTML::_('hikaselect.booleanlist',
'config[product_cart_link]','',$this->config->get('product_cart_link',0));
		?></td>
	</tr>

</table>
	</div></div>
</div>

<div id="main_css"
class="hikashop_backend_tile_edition">
	<div class="hikashop_tile_block"><div>
		<div class="hikashop_tile_title"><?php
			echo JText::_('CSS');
		?></div>
<table class="hk_config_table table"
style="width:100%">

	<tr>
		<td class="hk_tbl_key"<?php echo
$this->docTip('css_frontend');?>><?php echo
JText::_('CSS_FRONTEND'); ?></td>
		<td><?php echo
$this->cssType->display('config[css_frontend]',
'frontend',
$this->config->get('css_frontend','default'));?></td>
	</tr>
	<tr>
		<td class="hk_tbl_key"<?php echo
$this->docTip('css_style');?>><?php echo
JText::_('STYLES_FOR_FRONTEND'); ?></td>
		<td><?php echo
$this->cssType->display('config[css_style]',
'style',
$this->config->get('css_style',''));?></td>
	</tr>
	<tr>
		<td class="hk_tbl_key"<?php echo
$this->docTip('css_backend');?>><?php echo
JText::_('CSS_BACKEND'); ?></td>
		<td><?php echo
$this->cssType->display('config[css_backend]',
'backend',
$this->config->get('css_backend','default'));?></td>
	</tr>

</table>
	</div></div>
</div>

<div id="main_editor"
class="hikashop_backend_tile_edition">
	<div class="hikashop_tile_block"><div>
		<div class="hikashop_tile_title"><?php
			echo JText::_('HIKA_EDITOR');
		?></div>
<table class="hk_config_table table"
style="width:100%">

<tr>
	<td class="hk_tbl_key"<?php echo
$this->docTip('front_small_editor');?>><?php echo
JText::_('HIKAM_FRONT_SMALL_EDITOR'); ?></td>
	<td><?php
		echo JHTML::_('hikaselect.booleanlist',
'config[front_small_editor]','',$this->config->get('front_small_editor',0));
	?></td>
</tr>
<tr>
	<td class="hk_tbl_key"<?php echo
$this->docTip('edition_default_menu');?>><?php echo
JText::_('HIKAM_FRONT_EDITION_DEFAULT_MENU'); ?></td>
	<td><?php
		echo
$this->menusType->display('config[edition_default_menu]',
$this->config->get('edition_default_menu',0));
	?></td>
</tr>
<tr>
	<td class="hk_tbl_key"<?php echo
$this->docTip('editor');?>><?php echo
JText::_('HIKA_EDITOR'); ?></td>
	<td><?php
		echo $this->editorType->display('config[editor]',
$this->config->get('editor', ''));
	?></td>
</tr>
<tr>
	<td class="hk_tbl_key"<?php echo
$this->docTip('editor_disable_buttons');?>><?php echo
JText::_('HIKA_EDITOR_DISABLE_BUTTONS'); ?></td>
	<td><?php
		echo JHTML::_('hikaselect.booleanlist',
'config[editor_disable_buttons]','',$this->config->get('editor_disable_buttons',0));
	?></td>
</tr>
<tr>
	<td class="hk_tbl_key"<?php echo
$this->docTip('upload_file_free_download');?>><?php
echo JText::_('HIKA_UPLOADED_FILE_FREE_DOWNLOAD');
?></td>
	<td><?php
		echo JHTML::_('hikaselect.booleanlist',
'config[upload_file_free_download]','',$this->config->get('upload_file_free_download',0));
	?></td>
</tr>
<?php
?>
</table>
	</div></div>
</div>

<div id="main_email"
class="hikashop_backend_tile_edition">
	<div class="hikashop_tile_block"><div>
		<div class="hikashop_tile_title"><?php
			echo JText::_('HIKAM_OPTIONS_EMAIL');
		?></div>
<table class="hk_config_table table"
style="width:100%">

<tr>
	<td class="hk_tbl_key"<?php echo
$this->docTip('vendor_email_order_status_notif_statuses');?>><?php
echo JText::_('HIKAM_NOTIFICATION_STATUSES_FILTER');
?></td>
	<td><?php
		$order_statuses = explode(',',
$this->config->get('vendor_email_order_status_notif_statuses',
''));
		if(!empty($order_statuses)) {
			foreach($order_statuses as &$order_status) {
				$order_status = trim($order_status);
			}
			unset($order_status);
		}
		echo $this->nameboxType->display(
			'config[vendor_email_order_status_notif_statuses]',
			$order_statuses,
			hikamarketNameboxType::NAMEBOX_MULTIPLE,
			'order_status',
			array(
				'delete' => true,
				'sort' => false,
				'default_text' =>
'<em>'.JText::_('HIKA_NONE').'</em>',
				'force_data' => true
			)
		);
	?></td>
</tr>
</table>

<table style="margin-top:5px" class="adminlist table
table-striped table-hover">
	<thead>
		<tr>
			<th class="title titlenum"><?php echo JText::_(
'HIKA_NUM' );?></th>
			<th class="title"><?php echo
JText::_('HIKA_EMAIL'); ?></th>
			<th class="title titletoggle"><?php echo
JText::_('HIKA_PUBLISHED'); ?></th>
		</tr>
	</thead>
	<tbody>
<?php
if(!empty($this->emails)) {
	$k = 0;
	foreach($this->emails as $i => $email) {
?>
<tr class="row<?php echo $k ;?>">
	<td style="text-align:center"><?php echo $i+1;
?></td>
	<td><?php
		if($this->emailManage) {
			?><a href="<?php echo
hikamarket::completeLink('shop.email&task=edit&mail_name='.$email['file']);?>"><?php
		}
		$key = 'MARKET_' . strtoupper($email['name']);
		echo (JText::_($key) == $key) ? $email['name'] :
JText::_($key);
		if($this->emailManage) {
			?></a><?php
		}
	?></td>
	<td style="text-align:center"><?php
		$publishedid =
'config_value-shop.'.$email['file'].'.published';
		echo $this->toggleClass->toggle($publishedid,
(int)$email['published'], 'config');
	?></td>
</tr>
<?php
		$k = 1 - $k;
	}
}
?>
	</tbody>
</table>
	</div></div>
</div>

<div id="main_statistics"
class="hikashop_backend_tile_edition">
	<div class="hikashop_tile_block"><div>
		<div class="hikashop_tile_title"><?php
			echo JText::_('STATISTICS');
		?></div>
<table class="hk_config_table table"
style="width:100%">
<tr>
	<td class="hk_tbl_key"<?php echo
$this->docTip('stats_valid_order_statuses');?>><?php
echo JText::_('HIKAM_STATS_VALID_ORDER_STATUSES');
?></td>
	<td><?php
		$order_statuses = explode(',',
$this->config->get('stats_valid_order_statuses',
'confirmed,shipped'));
		if(!empty($order_statuses)) {
			foreach($order_statuses as &$order_status) {
				$order_status = trim($order_status);
			}
			unset($order_status);
		}
		echo $this->nameboxType->display(
			'config[stats_valid_order_statuses]',
			$order_statuses,
			hikamarketNameboxType::NAMEBOX_MULTIPLE,
			'order_status',
			array(
				'delete' => true,
				'sort' => false,
				'default_text' =>
'<em>'.JText::_('HIKA_NONE').'</em>',
				'force_data' => true
			)
		);
	?></td>
</tr>
<tr>
	<td class="hk_tbl_key"<?php echo
$this->docTip('display_order_statistics');?>><?php
echo JText::_('HIKAM_DISPLAY_ORDER_STATISTICS');
?></td>
	<td><?php
		echo JHTML::_('hikaselect.booleanlist',
'config[display_order_statistics]','',$this->config->get('display_order_statistics',0));
	?></td>
</tr>
</table>


<table style="margin-top:5px" class="adminlist table
table-striped table-hover admintable">
	<thead>
		<tr>
			<th class="title"><?php echo
JText::_('HIKA_NAME'); ?></th>
			<th class="title titletoggle"><?php echo
JText::_('HIKAM_STAT_CONTAINER'); ?></th>
			<th class="title titletoggle"><?php echo
JText::_('HIKAM_STAT_PERIOD'); ?></th>
			<th class="title titletoggle"><?php echo
JText::_('HIKA_ORDER'); ?></th>
			<th class="title titletoggle"><?php echo
JText::_('HIKA_PUBLISHED'); ?></th>
		</tr>
	</thead>
	<tbody>
<?php
if(!empty($this->statistics)) {
	$statisticsPeriods = $this->statisticsClass->getDateRangeList();
	foreach($statisticsPeriods as $key => &$period) {
		$txt = '' . $period;
		$period = JHTML::_('select.option', $key, JText::_($txt));
	}
	unset($period);

	$statisticsGroupPeriods =
$this->statisticsClass->getDateRangeList(true);
	foreach($statisticsGroupPeriods as $key => &$period) {
		if(strpos($key,'.day') !== false) {
			unset($statisticsGroupPeriods[$key]);
			continue;
		}
		$txt = '' . $period;
		$period = JHTML::_('select.option', $key, JText::_($txt));
	}
	unset($period);

	$statisticsContainers = array(
		12 => '100%',
		9 => '75%',
		8 => '66%',
		6 => '50%',
		4 => '33%',
		3 => '25%',
	);

	$k = 0;
	foreach($this->statistics as $key => $statistic) {
?>		<tr class="row<?php echo $k ;?>"
data-hkm-stat="<?php echo $key; ?>">
			<td><?php
				if(!empty($statistic['label']))
					echo $statistic['label'] . '
(<em>'.$key.'</em>)';
				else
					echo $key;
			?></td>
			<td><?php
				if(empty($statistic['container']))
					$statistic['container'] = 12;
				echo JHTML::_('select.genericlist', $statisticsContainers,
'config[vendor_statistics]['.$key.'][container]',
'', 'value', 'text',
$statistic['container']);
			?></td>
			<td><?php
				if(isset($statistic['vars']['DATE_RANGE'])
&& $statistic['type'] != 'graph') {
					echo JHTML::_('select.genericlist', $statisticsPeriods,
'config[vendor_statistics]['.$key.'][vars][DATE_RANGE]',
'', 'value', 'text',
$statistic['vars']['DATE_RANGE']);
				} else if(isset($statistic['vars']['DATE_RANGE']))
{
					echo JHTML::_('select.genericlist', $statisticsGroupPeriods,
'config[vendor_statistics]['.$key.'][vars][DATE_RANGE]',
'', 'value', 'text',
$statistic['vars']['DATE_RANGE']);
				}
			?></td>
			<td>
				<div class="hk-input-group">
					<div class="hk-input-group-prepend">
						<a class="hikabtn" href="#up"
data-ordering="-1" data-ordering-id="<?php echo $key;
?>" onclick="return
window.localPage.orderingStat(this);"><i class="fas
fa-arrow-up"></i></a>
					</div>
					<input type="text" class="hk-form-control
hkm_order_value" size="3" data-hkm-input-stat="<?php
echo $key; ?>" name="config[vendor_statistics][<?php echo
$key; ?>][order]" value="<?php echo
(int)$statistic['order']; ?>" />
					<div class="hk-input-group-append">
						<a class="hikabtn" href="#down"
data-ordering="1" data-ordering-id="<?php echo $key;
?>" onclick="return
window.localPage.orderingStat(this);"><i class="fas
fa-arrow-down"></i></a>
					</div>
				</div>
			</td>
			<td><?php
				echo
$this->radioType->booleanlist('config[vendor_statistics]['.$key.'][published]',
'', (int)$statistic['published']);
			?></td>
		</tr>
<?php
		$k = 1 - $k;
	}
}
?>
	</tbody>
</table>
<script type="text/javascript">
if(!window.localPage) window.localPage = {};
window.localPage.orderingStat = function(el) {
	var id = el.getAttribute('data-ordering-id'),
		direction = el.getAttribute('data-ordering') ==
'-1';
	if(!id) return false;
	var block =
document.querySelector('[data-hkm-stat="'+id+'"]');
	if(!block) return false;
	var input =
block.querySelector('input[data-hkm-input-stat="'+id+'"]');
	if(!input) return false;

	var switchBlock = (direction) ? block.previousElementSibling :
block.nextElementSibling;
	if(!switchBlock) return false;
	var switchId = switchBlock.getAttribute('data-hkm-stat'),
		switchInput =
switchBlock.querySelector('input[data-hkm-input-stat="'+switchId+'"]');
	if(direction)
		block.parentNode.insertBefore(block, switchBlock);
	else
		switchBlock.parentNode.insertBefore(switchBlock, block);
	var i = input.value;
	input.value = switchInput.value;
	switchInput.value = i;

	return false;
};
</script>

	</div></div>
</div>

</div>
configmarket/tmpl/market.php000064400000070564151161332360012202
0ustar00<?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
echo $this->leftmenu(
	'market',
	array(
		'#market_general' =>
JText::_('HIKAM_OPTIONS_GENERAL'),
		'#market_images' =>
JText::_('HIKAM_OPTIONS_IMAGES'),
		'#market_display' =>
JText::_('HIKAM_OPTIONS_SHOW'),
		'#market_email' =>
JText::_('HIKAM_OPTIONS_EMAIL'),
		'#market_registration' =>
JText::_('HIKAM_OPTIONS_REGISTRATION'),
		'#market_categories' =>
JText::_('HIKAM_OPTIONS_CATEGORIES'),
		'#market_limitations' =>
JText::_('HIKAM_OPTIONS_TITLE_VENDOR_LIMITATIONS'),
		'#market_tax' => JText::_('HIKAM_OPTIONS_TAX'),
	)
);
?>
<div id="page-market" class="rightconfig-container
<?php if(HIKASHOP_BACK_RESPONSIVE) echo
'rightconfig-container-j30';?>">

<div id="market_general"
class="hikashop_backend_tile_edition">
	<div class="hikashop_tile_block"><div>
		<div class="hikashop_tile_title"><?php echo
JText::_('HIKAM_OPTIONS_GENERAL'); ?></div>
<table class="hk_config_table table"
style="width:100%">

<tr>
	<td class="hk_tbl_key"<?php echo
$this->docTip('updatable_order_statuses');?>><?php
echo JText::_('HIKAM_UPDATABLE_ORDER_STATUSES');
?></td>
	<td><?php
		$order_statuses = explode(',',
$this->config->get('updatable_order_statuses',
'created'));
		if(!empty($order_statuses)) {
			foreach($order_statuses as &$order_status) {
				$order_status = trim($order_status);
			}
			unset($order_status);
		}
		echo $this->nameboxType->display(
			'config[updatable_order_statuses]',
			$order_statuses,
			hikamarketNameboxType::NAMEBOX_MULTIPLE,
			'order_status',
			array(
				'delete' => true,
				'sort' => false,
				'default_text' =>
'<em>'.JText::_('HIKA_NONE').'</em>',
				'force_data' => true
			)
		);
	?></td>
</tr>
<tr>
	<td class="hk_tbl_key"<?php echo
$this->docTip('valid_order_statuses');?>><?php echo
JText::_('HIKAM_VALID_ORDER_STATUSES'); ?></td>
	<td><?php
		$order_statuses = explode(',',
$this->config->get('valid_order_statuses',
'confirmed,shipped'));
		if(!empty($order_statuses)) {
			foreach($order_statuses as &$order_status) {
				$order_status = trim($order_status);
			}
			unset($order_status);
		}
		echo $this->nameboxType->display(
			'config[valid_order_statuses]',
			$order_statuses,
			hikamarketNameboxType::NAMEBOX_MULTIPLE,
			'order_status',
			array(
				'delete' => true,
				'sort' => false,
				'default_text' =>
'<em>'.JText::_('HIKA_NONE').'</em>',
				'force_data' => true
			)
		);
	?></td>
</tr>
<tr>
	<td class="hk_tbl_key"<?php echo
$this->docTip('use_same_order_number');?>><?php echo
JText::_('MARKET_USE_SAME_ORDER_NUMBER'); ?></td>
	<td><?php
		echo JHTML::_('hikaselect.booleanlist',
"config[use_same_order_number]",'',$this->config->get('use_same_order_number',0));
	?></td>
</tr>
<tr>
	<td class="hk_tbl_key"<?php echo
$this->docTip('prefix_product_code');?>><?php echo
JText::_('PREFIX_VENDOR_PRODUCT_CODE'); ?></td>
	<td>
		<input type="text"
name="config[prefix_product_code]" value="<?php echo
$this->escape(
@$this->config->get('prefix_product_code', '') );
?>" />
	</td>
</tr>
<tr class="option_title">
	<td colspan="2"><?php echo
JText::_('HIKAM_OPTIONS_TITLE_VENDOR_SELECTION');
?></td>
</tr>
<tr>
	<td class="hk_tbl_key"<?php echo
$this->docTip('allow_zone_vendor');?>><?php echo
JText::_('ALLOW_ZONE_VENDORS'); ?></td>
	<td><?php
		echo JHTML::_('hikaselect.booleanlist',
"config[allow_zone_vendor]",'',$this->config->get('allow_zone_vendor',
0));
	?></td>
</tr>
<tr>
	<td class="hk_tbl_key"<?php echo
$this->docTip('vendor_select_custom_field');?>><?php
echo JText::_('ALLOW_VENDOR_SELECTOR'); ?></td>
	<td><?php
		$options = array(
			JHTML::_('select.option', '',
JText::_('HIKA_NONE'))
		);
		if(!empty($this->vendorselect_customfields)) {
			foreach($this->vendorselect_customfields as $field) {
				if(in_array($field->field_table, array('order',
'item')))
					$options[] = JHTML::_('select.option',
$field->field_namekey, $field->field_table . ' - ' .
$field->field_realname);
			}
		}
		echo JHTML::_('select.genericlist', $options,
'config[vendor_select_custom_field]', '',
'value', 'text',
$this->config->get('vendor_select_custom_field',
''));
	?></td>
</tr>
<tr>
	<td class="hk_tbl_key"<?php echo
$this->docTip('preferred_vendor_select_custom_field');?>><?php
echo JText::_('PREFERRED_VENDOR_FOR_VENDOR_SELECTOR');
?></td>
	<td><?php
		$options = array(
			JHTML::_('select.option', '',
JText::_('HIKA_NONE'))
		);
		if(!empty($this->vendorselect_customfields)) {
			foreach($this->vendorselect_customfields as $field) {
				if($field->field_table == 'user')
					$options[] = JHTML::_('select.option',
$field->field_namekey, $field->field_table . ' - ' .
$field->field_realname);
			}
		}
		echo JHTML::_('select.genericlist', $options,
'config[preferred_vendor_select_custom_field]', '',
'value', 'text',
$this->config->get('preferred_vendor_select_custom_field',
''));
	?></td>
</tr>
<tr class="option_title">
	<td colspan="2"><?php echo
JText::_('HIKAM_OPTIONS_TITLE_VENDOR_PAYMENT_SHIPPING');
?></td>
</tr>
<tr>
	<td class="hk_tbl_key"<?php echo
$this->docTip('vendors_in_cart');?>><?php echo
JText::_('LIMIT_VENDORS_IN_CART'); ?></td>
	<td><?php
		$options = array(
			JHTML::_('select.option', 0,
JText::_('HIKAM_NO_LIMIT_VENDOR')),
			JHTML::_('select.option', 1,
JText::_('HIKAM_LIMIT_ONE_VENDOR')),
			JHTML::_('select.option', 2,
JText::_('HIKAM_LIMIT_ONE_EXTRA_VENDOR'))
		);
		echo JHTML::_('hikaselect.radiolist', $options,
'config[vendors_in_cart]', '', 'value',
'text', $this->config->get('vendors_in_cart',
0));
	?></td>
</tr>
<tr>
	<td class="hk_tbl_key"<?php echo
$this->docTip('only_vendor_payments');?>><?php echo
JText::_('SHOW_ONLY_VENDOR_PAYMENTS'); ?></td>
	<td><?php
		echo JHTML::_('hikaselect.booleanlist',
'config[only_vendor_payments]', '',
$this->config->get('only_vendor_payments',0));
	?></td>
</tr>
<tr>
	<td class="hk_tbl_key"<?php echo
$this->docTip('split_order_payment_fees');?>><?php
echo JText::_('SPLIT_PAYMENT_FEES_ON_VENDORS'); ?></td>
	<td><?php
		echo JHTML::_('hikaselect.booleanlist',
'config[split_order_payment_fees]', '',
$this->config->get('split_order_payment_fees',0));
	?></td>
</tr>
<tr>
	<td class="hk_tbl_key"<?php echo
$this->docTip('split_order_shipping_fees');?>><?php
echo JText::_('SPLIT_SHIPPING_FEES_ON_VENDORS');
?></td>
	<td><?php
		echo JHTML::_('hikaselect.booleanlist',
'config[split_order_shipping_fees]', '',
$this->config->get('split_order_shipping_fees',0));
	?></td>
</tr>
<tr>
	<td class="hk_tbl_key"<?php echo
$this->docTip('shipping_per_vendor');?>><?php echo
JText::_('SHIPPING_PER_VENDOR'); ?></td>
	<td><?php
		echo JHTML::_('hikaselect.booleanlist',
'config[shipping_per_vendor]', '',
$this->config->get('shipping_per_vendor', 1));
	?></td>
</tr>
<tr>
	<td class="hk_tbl_key"<?php echo
$this->docTip('plugin_vendor_config');?>><?php echo
JText::_('PLUGIN_VENDOR_CONFIG'); ?></td>
	<td><?php
		$options = array(
			JHTML::_('hikaselect.option', 0,
JText::_('HIKASHOP_NO')),
			JHTML::_('hikaselect.option', 1,
JText::_('HIKAM_OWN_PLUGIN')),
		);
		echo JHTML::_('hikaselect.radiolist', $options,
'config[plugin_vendor_config]', '', 'value',
'text',
$this->config->get('plugin_vendor_config', 0));
	?></td>
</tr>
<tr>
	<td class="hk_tbl_key"<?php echo
$this->docTip('user_multiple_vendor');?>><?php echo
JText::_('MARKET_ALLOW_MULTIPLE_VENDOR_FOR_USERS');
?></td>
	<td><?php
		echo JHTML::_('hikaselect.booleanlist',
'config[user_multiple_vendor]', '',
$this->config->get('user_multiple_vendor',0));
	?></td>
</tr>
<tr>
	<td class="hk_tbl_key"<?php echo
$this->docTip('filter_orderstatus_paid_order');?>><?php
echo JText::_('FILTER_ORDER_STATUS_WHEN_VENDOR_PAID');
?></td>
	<td><?php
		echo JHTML::_('hikaselect.booleanlist',
'config[filter_orderstatus_paid_order]', '',
$this->config->get('filter_orderstatus_paid_order', 1));
	?></td>
</tr>
<?php
?>
</table>
	</div></div>
</div>

<div id="market_images"
class="hikashop_backend_tile_edition">
	<div class="hikashop_tile_block"><div>
		<div class="hikashop_tile_title"><?php echo
JText::_('HIKAM_OPTIONS_IMAGES'); ?></div>
<table class="hk_config_table table"
style="width:100%">

<tr>
	<td class="hk_tbl_key"<?php echo
$this->docTip('default_vendor_image');?>><?php echo
JText::_('HIKAM_DEFAULT_VENDOR_IMAGE'); ?></td>
	<td><?php
		$options = array(
			'upload' => true,
			'gallery' => true,
			'text' =>
JText::_('HIKAM_VENDOR_IMAGE_EMPTY_UPLOAD'),
			'uploader' => array('config',
'default_vendor_image'),
		);
		$params = new stdClass();
		$params->file_path =
$this->config->get('default_vendor_image', '');
		$params->field_name = 'config[default_vendor_image]';
		$js = '';
		$content = hikamarket::getLayout('uploadmarket',
'image_entry', $params, $js);

		echo
$this->uploaderType->displayImageSingle('hikamarket_config_default_vendor_image',
$content, $options);
	?></td>
</tr>
<tr>
	<td class="hk_tbl_key"<?php echo
$this->docTip('vendor_image_x');?>><?php echo
JText::_('HIKAM_VENDOR_IMAGE_WIDTH'); ?></td>
	<td>
		<div class="hk-input-group">
			<input type="text" class="hk-form-control"
name="config[vendor_image_x]" value="<?php echo
$this->escape( @$this->config->get('vendor_image_x',
'') ); ?>" />
			<div class="hk-input-group-append">
				<span class="hk-input-group-text">px</span>
			</div>
		</div>
	</td>
</tr>
<tr>
	<td class="hk_tbl_key"<?php echo
$this->docTip('vendor_image_y');?>><?php echo
JText::_('HIKAM_VENDOR_IMAGE_HEIGHT'); ?></td>
	<td>
		<div class="hk-input-group">
			<input type="text" class="hk-form-control"
name="config[vendor_image_y]" value="<?php echo
$this->escape( @$this->config->get('vendor_image_y',
'') ); ?>" />
			<div class="hk-input-group-append">
				<span class="hk-input-group-text">px</span>
			</div>
		</div>
	</td>
</tr>
<tr>
	<td class="hk_tbl_key"<?php echo
$this->docTip('image_forcesize');?>><?php echo
JText::_('HIKAM_IMAGE_FORCESIZE');?></td>
	<td><?php
		echo JHTML::_('hikaselect.booleanlist',
"config[image_forcesize]",'',$this->config->get('image_forcesize',0));
	?></td>
</tr>
<tr>
	<td class="hk_tbl_key"<?php echo
$this->docTip('image_grayscale');?>><?php echo
JText::_('HIKAM_IMAGE_GRAYSCALE');?></td>
	<td><?php
		echo JHTML::_('hikaselect.booleanlist',
"config[image_grayscale]",'',$this->config->get('image_grayscale',0));
	?></td>
</tr>
<tr>
	<td class="hk_tbl_key"<?php echo
$this->docTip('image_scale');?>><?php echo
JText::_('HIKAM_IMAGE_SCALE');?></td>
	<td><?php
		$scale_arr = array(
			JHTML::_('select.option', 1,
JText::_('HIKAM_IMAGE_SCALE_INSIDE')),
			JHTML::_('select.option', 0,
JText::_('HIKAM_IMAGE_SCALE_OUTSIDE')),
		);
		echo JHTML::_('hikaselect.radiolist', $scale_arr,
"config[image_scale]" , '', 'value',
'text', $this->config->get('image_scale', 0));
	?></td>
</tr>
<tr>
	<td class="hk_tbl_key"<?php echo
$this->docTip('image_radius');?>><?php echo
JText::_('HIKAM_IMAGE_RADIUS');?></td>
	<td>
		<div class="hk-input-group">
			<input class="hk-form-control"
name="config[image_radius]" type="text"
value="<?php echo
(int)$this->config->get('image_radius', 0); ?>"
/>
			<div class="hk-input-group-append">
				<span class="hk-input-group-text">px</span>
			</div>
		</div>
	</td>
</tr>

</table>
	</div></div>
</div>

<div id="market_display"
class="hikashop_backend_tile_edition">
	<div class="hikashop_tile_block"><div>
		<div class="hikashop_tile_title"><?php echo
JText::_('HIKAM_OPTIONS_SHOW'); ?></div>
<table class="hk_config_table table"
style="width:100%">

<tr>
	<td class="hk_tbl_key"<?php echo
$this->docTip('display_vendor_vote');?>><?php echo
JText::_('HIKAM_DISPLAY_VENDOR_VOTE'); ?></td>
	<td><?php
		echo JHTML::_('hikaselect.booleanlist',
"config[display_vendor_vote]",'',$this->config->get('display_vendor_vote',0));
	?></td>
</tr>
<tr>
	<td class="hk_tbl_key"<?php echo
$this->docTip('display_vendor_contact');?>><?php echo
JText::_('HIKAM_DISPLAY_VENDOR_CONTACT_BTN'); ?></td>
	<td><?php
		echo JHTML::_('hikaselect.booleanlist',
"config[display_vendor_contact]",'',$this->config->get('display_vendor_contact',0));
	?></td>
</tr>
<tr>
	<td class="hk_tbl_key"<?php echo
$this->docTip('show_sold_by');?>><?php echo
JText::_('HIKAM_FRONT_SHOW_SOLD_BY'); ?></td>
	<td><?php
		echo JHTML::_('hikaselect.booleanlist',
"config[show_sold_by]",'',$this->config->get('show_sold_by',0));
	?></td>
</tr>
<tr>
	<td class="hk_tbl_key"<?php echo
$this->docTip('show_sold_by_me');?>><?php echo
JText::_('HIKAM_FRONT_SHOW_SOLD_BY_ME'); ?></td>
	<td><?php
		echo JHTML::_('hikaselect.booleanlist',
"config[show_sold_by_me]",'',$this->config->get('show_sold_by_me',0));
	?></td>
</tr>
<tr>
	<td class="hk_tbl_key"<?php echo
$this->docTip('listing_show_main_vendor');?>><?php
echo JText::_('HIKAM_FRONT_SHOW_MAIN_VENDOR_IN_LISTING');
?></td>
	<td><?php
		echo JHTML::_('hikaselect.booleanlist',
"config[listing_show_main_vendor]",'',$this->config->get('listing_show_main_vendor',0));
	?></td>
</tr>
<tr>
	<td class="hk_tbl_key"<?php echo
$this->docTip('vendor_default_menu');?>><?php echo
JText::_('HIKAM_FRONT_VENDOR_DEFAULT_MENU'); ?></td>
	<td><?php
		echo
$this->menusType->display('config[vendor_default_menu]',
$this->config->get('vendor_default_menu',0));
	?></td>
</tr>
<tr>
	<td class="hk_tbl_key"<?php echo
$this->docTip('override_vendor_category_link');?>><?php
echo JText::_('HIKAM_FRONT_VENDOR_CATEGORY_TO_VENDOR_PAGE');
?></td>
	<td><?php
		echo JHTML::_('hikaselect.booleanlist',
"config[override_vendor_category_link]",'',$this->config->get('override_vendor_category_link',0));
	?></td>
</tr>
<tr>
	<td class="hk_tbl_key"<?php echo
$this->docTip('vendor_show_modules');?>><?php echo
JText::_('VENDOR_SHOW_MODULES'); ?></td>
	<td><?php
		echo $this->nameboxType->display(
			'config[vendor_show_modules]',
			explode(',',
$this->config->get('vendor_show_modules')),
			hikamarketNameboxType::NAMEBOX_MULTIPLE,
			'modules',
			array(
				'delete' => true,
				'sort' => true,
				'default_text' =>
'<em>'.JText::_('HIKA_NONE').'</em>',
				'force_data' => true
			)
		);
	?></td>
</tr>

</table>
	</div></div>
</div>

<div id="market_email"
class="hikashop_backend_tile_edition">
	<div class="hikashop_tile_block"><div>
		<div class="hikashop_tile_title"><?php echo
JText::_('HIKAM_OPTIONS_EMAIL'); ?></div>
<table class="hk_config_table table"
style="width:100%">

<tr>
	<td class="hk_tbl_key"<?php echo
$this->docTip('contact_mail_to_vendor');?>><?php echo
JText::_('HIKAM_CONTACT_MAIL_TO_VENDORS'); ?></td>
	<td><?php
		echo JHTML::_('hikaselect.booleanlist',
"config[contact_mail_to_vendor]",'',$this->config->get('contact_mail_to_vendor',1));
	?></td>
</tr>
<tr>
	<td class="hk_tbl_key"<?php echo
$this->docTip('always_send_product_email');?>><?php
echo JText::_('HIKAM_ALWAYS_SEND_PRODUCT_EMAIL');
?></td>
	<td><?php
		echo JHTML::_('hikaselect.booleanlist',
'config[always_send_product_email]','',$this->config->get('always_send_product_email',0));
	?></td>
</tr>
<tr>
	<td class="hk_tbl_key"<?php echo
$this->docTip('mail_display_vendor');?>><?php echo
JText::_('HIKAM_DISPLAY_VENDOR_NAME_IN_EMAILS');
?></td>
	<td><?php
		echo JHTML::_('hikaselect.booleanlist',
'config[mail_display_vendor]','',$this->config->get('mail_display_vendor',0));
	?></td>
</tr>
<tr>
	<td class="hk_tbl_key"<?php echo
$this->docTip('admin_notify_subsale');?>><?php echo
JText::_('HIKAM_NOTIFY_ADMIN_FOR_VENDOR_MODIFICATION');
?></td>
	<td><?php
		$order_statuses = explode(',',
$this->config->get('admin_notify_subsale',
'cancelled,refunded'));
		if(!empty($order_statuses)) {
			foreach($order_statuses as &$order_status) {
				$order_status = trim($order_status);
			}
			unset($order_status);
		}
		echo $this->nameboxType->display(
			'config[admin_notify_subsale]',
			$order_statuses,
			hikamarketNameboxType::NAMEBOX_MULTIPLE,
			'order_status',
			array(
				'delete' => true,
				'sort' => false,
				'default_text' =>
'<em>'.JText::_('HIKA_NONE').'</em>',
				'force_data' => true
			)
		);
	?></td>
</tr>
<tr>
	<td class="hk_tbl_key"<?php echo
$this->docTip('send_mail_subsale_update_main');?>><?php
echo JText::_('HIKAM_SEND_MAIL_SUBSALE_UPDATE_MAIN');
?></td>
	<td><?php
		echo JHTML::_('hikaselect.booleanlist',
'config[send_mail_subsale_update_main]','',$this->config->get('send_mail_subsale_update_main',0));
	?></td>
</tr>

</table>
	</div></div>
</div>

<div id="market_registration"
class="hikashop_backend_tile_edition">
	<div class="hikashop_tile_block"><div>
		<div class="hikashop_tile_title"><?php echo
JText::_('HIKAM_OPTIONS_REGISTRATION'); ?></div>
<table class="hk_config_table table"
style="width:100%">

<tr>
	<td class="hk_tbl_key"<?php echo
$this->docTip('allow_registration');?>><?php echo
JText::_('HIKAM_ALLOW_VENDOR_REGISTRATION'); ?></td>
	<td><?php
		$options = array(
			JHTML::_('hikaselect.option', 0,
JText::_('HIKASHOP_NO')),
			JHTML::_('hikaselect.option', 1,
JText::_('HIKAM_REGISTER_MANUAL_VALIDATION')),
			JHTML::_('hikaselect.option', 2,
JText::_('HIKAM_REGISTER_AUTO_VALIDATION')),
			JHTML::_('hikaselect.option', 3,
JText::_('HIKAM_REGISTER_AUTO_CREATION'))
		);
		echo JHTML::_('select.genericlist', $options,
'config[allow_registration]',
'onchange="window.localPage.allowRegistrationChanged(this);"',
'value', 'text',
$this->config->get('allow_registration',0));
	?>
<script type="text/javascript">
if(!window.localPage) window.localPage = {};
window.localPage.allowRegistrationChanged = function(el) {
	if(!el) return;
	var els = ['hikamarket_config_auto_registration_group'];
	window.hikashop.setArrayDisplay(els, (el.value == 3));
};
window.hikashop.ready(function(){
window.localPage.allowRegistrationChanged(document.getElementById('configallow_registration'))
});
</script>
	</td>
</tr>
<tr id="hikamarket_config_auto_registration_group">
	<td class="hk_tbl_key"<?php echo
$this->docTip('auto_registration_group');?>><?php
echo JText::_('HIKAM_ALLOW_VENDOR_REGISTRATION');
?></td>
	<td><?php
		echo
$this->joomlaaclType->display('config[auto_registration_group]',
$this->config->get('auto_registration_group',
'all'), true, true);
	?></td>
</tr>
<tr>
	<td class="hk_tbl_key"<?php echo
$this->docTip('register_ask_currency');?>><?php echo
JText::_('HIKAM_REGISTRATION_ASK_CURRENCY'); ?></td>
	<td><?php
		echo JHTML::_('hikaselect.booleanlist',
"config[register_ask_currency]",'',$this->config->get('register_ask_currency',0));
	?></td>
</tr>
<tr>
	<td class="hk_tbl_key"<?php echo
$this->docTip('register_ask_description');?>><?php
echo JText::_('HIKAM_REGISTRATION_ASK_DESCRIPTION');
?></td>
	<td><?php
		echo JHTML::_('hikaselect.booleanlist',
"config[register_ask_description]",'',$this->config->get('register_ask_description',0));
	?></td>
</tr>
<tr>
	<td class="hk_tbl_key"<?php echo
$this->docTip('register_ask_terms');?>><?php echo
JText::_('HIKAM_REGISTRATION_ASK_TERMS'); ?></td>
	<td><?php
		echo JHTML::_('hikaselect.booleanlist',
"config[register_ask_terms]",'',$this->config->get('register_ask_terms',0));
	?></td>
</tr>
<tr>
	<td class="hk_tbl_key"<?php echo
$this->docTip('register_terms_required');?>><?php
echo JText::_('HIKAM_REGISTRATION_TERMS_REQUIRED');
?></td>
	<td><?php
		echo JHTML::_('hikaselect.booleanlist',
"config[register_terms_required]",'',$this->config->get('register_terms_required',0));
	?></td>
</tr>
<tr>
	<td class="hk_tbl_key"<?php echo
$this->docTip('register_ask_paypal');?>><?php echo
JText::_('HIKAM_REGISTRATION_ASK_PAYPAL'); ?></td>
	<td><?php
		echo JHTML::_('hikaselect.booleanlist',
"config[register_ask_paypal]",'',$this->config->get('register_ask_paypal',1));
	?></td>
</tr>
<tr>
	<td class="hk_tbl_key"<?php echo
$this->docTip('register_paypal_required');?>><?php
echo JText::_('HIKAM_REGISTRATION_PAYPAL_REQUIRED');
?></td>
	<td><?php
		echo JHTML::_('hikaselect.booleanlist',
"config[register_paypal_required]",'',$this->config->get('register_paypal_required',0));
	?></td>
</tr>
<tr>
	<td class="hk_tbl_key"<?php echo
$this->docTip('registration_ask_password');?>><?php
echo JText::_('HIKAM_REGISTRATION_ASK_PASSWORD');
?></td>
	<td><?php
		echo JHTML::_('hikaselect.booleanlist',
"config[registration_ask_password]",'',$this->config->get('registration_ask_password',1));
	?></td>
</tr>
<tr>
	<td class="hk_tbl_key"<?php echo
$this->docTip('registration_email_is_username');?>><?php
echo JText::_('HIKAM_REGISTRATION_EMAIL_IS_USERNAME');
?></td>
	<td><?php
		echo JHTML::_('hikaselect.booleanlist',
"config[registration_email_is_username]",'',$this->config->get('registration_email_is_username',0));
	?></td>
</tr>
<!--
<tr>
	<td class="hk_tbl_key"<?php echo
$this->docTip('register_ask_image');?>><?php echo
JText::_('HIKAM_REGISTRATION_ASK_IMAGE'); ?></td>
	<td><?php
		echo JHTML::_('hikaselect.booleanlist',
"config[register_ask_image]",'',$this->config->get('register_ask_image',0));
	?></td>
</tr>
-->
<tr>
	<td class="hk_tbl_key"<?php echo
$this->docTip('link_admin_groups');?>><?php echo
JText::_('HIKAM_LINK_VENDOR_GROUP_WITH_ADMIN'); ?></td>
	<td><?php
		echo JHTML::_('hikaselect.booleanlist',
"config[link_admin_groups]",'',$this->config->get('link_admin_groups',0));
	?></td>
</tr>
<tr>
	<td class="hk_tbl_key"<?php echo
$this->docTip('user_group_registration');?>><?php
echo JText::_('HIKAM_USERGROUP_ON_REGISTRATION');
?></td>
	<td><?php
		echo
$this->joomlaaclType->displayList('config[user_group_registration]',
$this->config->get('user_group_registration',
''), 'HIKA_INHERIT');
	?></td>
</tr>

</table>
	</div></div>
</div>

<div id="market_categories"
class="hikashop_backend_tile_edition">
	<div class="hikashop_tile_block"><div>
		<div class="hikashop_tile_title"><?php echo
JText::_('HIKAM_OPTIONS_CATEGORIES'); ?></div>
<table class="hk_config_table table"
style="width:100%">

<tr>
	<td class="hk_tbl_key"<?php echo
$this->docTip('vendor_create_category');?>><?php echo
JText::_('HIKAM_VENDOR_CREATE_CATEGORY'); ?></td>
	<td><?php
		echo JHTML::_('hikaselect.booleanlist',
"config[vendor_create_category]",'',$this->config->get('vendor_create_category',0));
	?></td>
</tr>
<tr>
	<td class="hk_tbl_key"<?php echo
$this->docTip('vendor_parent_category');?>><?php echo
JText::_('HIKAM_VENDOR_PARENT_CATEGORY'); ?></td>
	<td><?php
		echo
$this->categoryType->displaySingle('config[vendor_parent_category]',
$this->config->get('vendor_parent_category',''));
	?></td>
</tr>
<tr>
	<td class="hk_tbl_key"<?php echo
$this->docTip('vendor_chroot_category');?>><?php echo
JText::_('HIKAM_VENDOR_CHROOT_CATEGORY'); ?></td>
	<td><?php
		$options = array(
			JHTML::_('hikaselect.option', 0,
JText::_('HIKASHOP_NO')),
			JHTML::_('hikaselect.option', 1,
JText::_('HIKAM_VENDOR_HOME')),
			JHTML::_('hikaselect.option', 2,
JText::_('HIKASHOP_YES'))
		);
		echo JHTML::_('hikaselect.radiolist', $options,
'config[vendor_chroot_category]',
'onchange="window.hikamarket.switchBlock(this, 2,
\'config__vendor_root_category\')"', 'value',
'text',
$this->config->get('vendor_chroot_category',0));
	?></td>
</tr>
<tr id="config__vendor_root_category" <?php
if($this->config->get('vendor_chroot_category',0) != 2)
echo ' style="display:none;"'; ?>>
	<td class="hk_tbl_key"<?php echo
$this->docTip('vendor_root_category');?>><?php echo
JText::_('HIKAM_VENDORS_ROOT_CATEGORY'); ?></td>
	<td><?php
		echo
$this->categoryType->displaySingle('config[vendor_root_category]',
$this->config->get('vendor_root_category', 0));
	?></td>
</tr>
<tr>
	<td class="hk_tbl_key"<?php echo
$this->docTip('vendor_extra_categories');?>><?php
echo JText::_('HIKAM_VENDOR_EXTRA_CATEGORIES'); ?></td>
	<td><?php
		$vendor_categories =
trim($this->config->get('vendor_extra_categories',
''));
		$vendor_categories = !empty($vendor_categories) ? explode(',',
$vendor_categories) : array();
		echo $this->nameboxType->display(
			'config[vendor_extra_categories]',
			$vendor_categories,
			hikamarketNameboxType::NAMEBOX_MULTIPLE,
			'category',
			array(
				'delete' => true,
				'root' => 0,
				'sort' => true,
				'default_text' =>
'<em>'.JText::_('HIKA_NONE').'</em>',
				'force_data' => true
			)
		);
	?></td>
</tr>

</table>
	</div></div>
</div>

<div id="market_limitations"
class="hikashop_backend_tile_edition">
	<div class="hikashop_tile_block"><div>
		<div class="hikashop_tile_title"><?php echo
JText::_('HIKAM_OPTIONS_TITLE_VENDOR_LIMITATIONS');
?></div>
<table class="hk_config_table table"
style="width:100%">

<tr>
	<td class="hk_tbl_key"<?php echo
$this->docTip('vendor_product_limitation');?>><?php
echo JText::_('VENDOR_PRODUCT_LIMITATION'); ?></td>
	<td>
		<input type="text"
name="config[vendor_product_limitation]" value="<?php
echo (int)$this->config->get('vendor_product_limitation',
0); ?>" />
	</td>
</tr>
<tr>
	<td class="hk_tbl_key"<?php echo
$this->docTip('related_all_vendors');?>><?php echo
JText::_('HIKAM_OPTION_RELATED_ALL_VENDORS'); ?></td>
	<td><?php
		echo JHTML::_('hikaselect.booleanlist',
"config[related_all_vendors]",'',$this->config->get('related_all_vendors',1));
	?></td>
</tr>
<tr>
	<td class="hk_tbl_key"<?php echo
$this->docTip('options_all_vendors');?>><?php echo
JText::_('HIKAM_OPTION_OPTIONS_ALL_VENDORS'); ?></td>
	<td><?php
		echo JHTML::_('hikaselect.booleanlist',
"config[options_all_vendors]",'',$this->config->get('options_all_vendors',0));
	?></td>
</tr>
<tr>
	<td class="hk_tbl_key"<?php echo
$this->docTip('check_vendor_completion');?>><?php
echo JText::_('HIKAM_OPTION_CHECK_VENDOR_COMPLETION');
?></td>
	<td><?php
		echo JHTML::_('hikaselect.booleanlist',
"config[check_vendor_completion]",'',$this->config->get('check_vendor_completion',
0));
	?></td>
</tr>
<tr>
	<td class="hk_tbl_key"<?php echo
$this->docTip('days_payment_request');?>><?php echo
JText::_('DAYS_FOR_PAYMENT_REQUEST'); ?></td>
	<td>
		<input type="text"
name="config[days_payment_request]" value="<?php echo
(int)$this->config->get('days_payment_request', 0);
?>" />
	</td>
</tr>
<tr>
	<td class="hk_tbl_key"<?php echo
$this->docTip('min_value_payment_request');?>><?php
echo JText::_('MIN_VALUE_FOR_PAYMENT_REQUEST'); ?></td>
	<td>
		<input type="text"
name="config[min_value_payment_request]" value="<?php
echo
hikamarket::toFloat($this->config->get('min_value_payment_request',
0.0)); ?>" />
		<?php echo $this->main_currency->currency_symbol.'
'.$this->main_currency->currency_code; ?>
	</td>
</tr>

</table>
	</div></div>
</div>

<div id="market_tax"
class="hikashop_backend_tile_edition">
	<div class="hikashop_tile_block"><div>
		<div class="hikashop_tile_title"><?php echo
JText::_('HIKAM_OPTIONS_TAX'); ?></div>
<table class="hk_config_table table"
style="width:100%">

<tr>
	<td class="hk_tbl_key"<?php echo
$this->docTip('market_mode');?>><?php echo
JText::_('HIKAM_MARKET_MODE'); ?></td>
	<td><?php
		$options = array(
			JHTML::_('select.option', 'fee',
JText::_('MARKETMODE_FEE')),
			JHTML::_('select.option', 'commission',
JText::_('MARKETMODE_COMMISSION')),
		);
		echo JHTML::_('hikaselect.radiolist', $options,
'config[market_mode]', '', 'value',
'text', $this->config->get('market_mode',
'fee'));
	?></td>
</tr>
<tr>
	<td class="hk_tbl_key"<?php echo
$this->docTip('calculate_vendor_price_with_tax');?>><?php
echo JText::_('HIKAM_VENDOR_PRICE_WITH_TAX');?></td>
	<td><?php
		echo JHTML::_('hikaselect.booleanlist',
"config[calculate_vendor_price_with_tax]",'',$this->config->get('calculate_vendor_price_with_tax',0));
	?></td>
</tr>
<tr>
	<td class="hk_tbl_key"<?php echo
$this->docTip('fee_on_shipping');?>><?php echo
JText::_('HIKAM_APPLY_FEES_ON_SHIPPING');?></td>
	<td><?php
		echo JHTML::_('hikaselect.booleanlist',
"config[fee_on_shipping]",'',$this->config->get('fee_on_shipping',0));
	?></td>
</tr>
<tr>
	<td class="hk_tbl_key"<?php echo
$this->docTip('vendor_pay_content');?>><?php echo
JText::_('HIKAM_MARKET_PAYVENDORCONTENT_MODE'); ?></td>
	<td><?php
		$options = array(
			JHTML::_('select.option', 'orders',
JText::_('MARKETMODE_PAY_ORDERS')),
			JHTML::_('select.option', 'products',
JText::_('MARKETMODE_PAY_PRODUCTS')),
		);
		echo JHTML::_('hikaselect.radiolist', $options,
'config[vendor_pay_content]', '', 'value',
'text', $this->config->get('vendor_pay_content',
'orders'));
	?></td>
</tr>
<!--
vendor_limit_orders_display (integer)
vendor_limit_products_display (integer)
-->
</table>
<?php
	$params = new hikaParameter('');
	$params->set('configPanelIntegration', true);
	$js = '';
	echo hikamarket::getLayout('vendormarket', 'fees',
$params, $js);
?>
	</div></div>
</div>

</div>
configmarket/tmpl/product_template.php000064400000005674151161332360014272
0ustar00<?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');
?><div class="hikashop_backend_tile_edition">
	<div class="hikashop_tile_block"><div>
		<div class="hikashop_tile_title"><?php echo
JText::_('PRODUCT_TEMPLATES'); ?></div>

	<div style="float:right; margin:4px;">
		<a class="hikabtn hikabtn-primary" href="<?php echo
hikamarket::completeLink('product&task=new_template&'.hikamarket::getFormToken().'=1');?>">
			<i class="fas fa-plus"></i> <?php echo
JText::_('ADD');?>
		</a>
	</div>
	<table class="adminlist table table-striped table-hover"
style="cell-spacing:1px">
		<thead>
			<tr>
				<th class="title titlenum"><?php
					echo JText::_('HIKA_NUM');
				?></th>
				<th class="title titlenum"><?php
					echo JText::_('HIKA_EDIT');
				?></th>
				<th class="title"><?php
					echo JText::_('HIKA_NAME');
				?></th>
				<th class="title"
style="width:100px;"><?php
					echo JText::_('HIKAM_TEMPLATE_USED_BY');
				?></th>
				<th class="title titlenum"><?php
					echo JText::_('HIKA_DELETE');
				?></th>
			</tr>
		</thead>
		<tbody>
<?php
	$config_default_template =
(int)$this->config->get('default_template_id', 0);

	$k = 0;
	if(!empty($this->product_templates)) {
		foreach($this->product_templates as $i => $product_template) {
?>
			<tr class="row<?php echo $k; ?>">
				<td><?php
					echo $product_template->product_id;
				?></td>
				<td style="text-align:center">
					<a href="<?php echo
hikamarket::completeLink('shop.product&task=edit&cid='.$product_template->product_id);
?>"><i class="fas
fa-pencil-alt"></i></a>
				</td>
				<td>
					<a href="<?php echo
hikamarket::completeLink('shop.product&task=edit&cid='.$product_template->product_id);
?>"><?php
						if(!empty($product_template->product_name))
							echo $product_template->product_name;
						else
							echo '<em>' . JText::_('PRODUCT_NO_NAME')
. '</em>';
					?></a>
					[ <?php echo $product_template->product_code; ?> ]
				</td>
				<td style="text-align:center"><?php
					if((int)$product_template->vendor_count > 0)
						echo JText::sprintf('HIKAM_USED_BY_X_VENDORS',
$product_template->vendor_count);
					else if((int)$product_template->product_id ==
$config_default_template)
						echo JText::_('HIKAM_DEFAULT_TEMPLATE');
					else
						echo '-';
				?></td>
				<td style="text-align:center">
					<a onclick="if(!confirm('<?php echo
str_replace("'","\'",
JText::_('ASK_DELETE_PRODUCT_TEMPLATE')); ?>')) { return
false; }" href="<?php echo
hikamarket::completeLink('shop.product&task=remove&cid='.$product_template->product_id.'&'.hikamarket::getFormToken().'=1');
?>"><i class="far
fa-trash-alt"></i></a>
				</td>
			</tr>
<?php
			$k = 1-$k;
		}
	}
?>
		</tbody>
	</table>
</div></div>
configmarket/tmpl/share.php000064400000002770151161332360012013
0ustar00<?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');
?><form action="index.php?tmpl=component&amp;option=<?php
echo HIKAMARKET_COMPONENT ?>" method="post" 
name="adminForm" id="adminForm" >
	<fieldset>
		<div class="header" style="float:
left;"><?php echo JText::_('SHARE').' :
'.$this->file->name; ?></div>
		<div class="toolbar" id="toolbar"
style="float: right;">
			<button class="btn" type="button"
onclick="window.hikashop.submitform('send','adminForm')"><?php
echo JText::_('SHARE'); ?></button>
		</div>
	</fieldset>
	<fieldset class="adminform">
		<?php
echo hikamarket::display(
	JText::_('SHARE_HIKAMARKET_CONFIRMATION_1').'<br/>'.
	JText::_('SHARE_HIKAMARKET_CONFIRMATION_2').'<br/>'.
	JText::_('SHARE_CONFIRMATION_3'), 'info');
		?><br/>
		<textarea cols="100" rows="8"
name="mailbody">Hi Hikari Software team,
Here is a new version of the language file for HikaMarket, I translated few
more strings...</textarea>
	</fieldset>
	<div class="clr"></div>
	<input type="hidden" name="code"
value="<?php echo $this->file->name; ?>" />
	<input type="hidden" name="option"
value="<?php echo HIKAMARKET_COMPONENT; ?>" />
	<input type="hidden" name="task" value=""
/>
	<input type="hidden" name="ctrl"
value="config" />
	<?php echo JHTML::_('form.token'); ?>
</form>
configmarket/tmpl/sql.php000064400000003250151161332360011502
0ustar00<?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');
?><div class="iframedoc"
id="iframedoc"></div>
<form action="<?php echo
hikamarket::completeLink('config&task=sql'); ?>"
method="post" name="adminForm" id="adminForm"
enctype="multipart/form-data">
	<fieldset>
		<legend>SQL Request</legend>
		<textarea name="sql_data" rows="8"
style="width:100%"><?php echo @$this->sql_data;
?></textarea>
	</fieldset>
	<div style="overflow-x:auto;max-height:300px;">
<?php
		if(!empty($this->query_result)) {
			if(is_array($this->query_result)) {
				echo '<table class="adminlist table table-striped"
style="width:100%"><thead>';
				$head = array_keys(get_object_vars(reset($this->query_result)));
				foreach($head as $h) {
					echo '<th>'.$h.'</th>';
				}
				reset($this->query_result);

				echo '</thead><tbody>';
				foreach($this->query_result as $result) {
					echo '<tr>';
					foreach($head as $h) {
						echo
'<td>'.nl2br(htmlentities($result->$h)).'</td>';
					}
					echo '</tr>';
				}
				echo '</tbody></table>';
			} else {
				echo $this->query_result;
			}
		} else if(!empty($this->sql_data)) {
			echo JText::_('HIKA_NO_SQL');
		}
?>
	</div>

	<input type="hidden" name="option"
value="<?php echo HIKAMARKET_COMPONENT; ?>" />
	<input type="hidden" name="task" value=""
/>
	<input type="hidden" name="ctrl"
value="<?php echo hikaInput::get()->getCmd('ctrl');
?>" />
	<?php echo JHTML::_( 'form.token' ); ?>
</form>
configmarket/view.html.php000064400000042406151161332360011652
0ustar00<?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 configmarketViewconfigmarket extends hikamarketView {

	const ctrl = 'config';
	const name = 'HIKA_CONFIGURATION';
	const icon = 'wrench';

	public function display($tpl = null, $params = null) {
		$this->params =& $params;
		$this->paramBase =
HIKAMARKET_COMPONENT.'.'.$this->getName();
		$fct = $this->getLayout();
		if(method_exists($this, $fct))
			$this->$fct($params);
		parent::display($tpl);
	}

	public function config($tpl = null) {
		hikamarket::setTitle(JText::_(self::name), self::icon, self::ctrl);

		$app = JFactory::getApplication();
		$db = JFactory::getDBO();

		$config = hikamarket::config();
		$this->assignRef('config',$config);
		$shopConfig = hikamarket::config(false);
		$this->assignRef('shopConfig',$shopConfig);

		$manage =
hikamarket::isAllowed($config->get('acl_config_manage',
'all'));
		$this->assignRef('manage', $manage);

		$defaultPanel =
$app->getUserStateFromRequest($this->paramBase.'.default_panel',
'default_panel', 0, 'int');
		$this->assignRef('default_tab', $defaultPanel);

		hikashop_loadJsLib('tooltip');
		$jlanguage = JFactory::getLanguage();
		$jlanguage->load('com_hikamarket_config', JPATH_SITE);

		$this->loadRef(array(
			'popup' => 'shop.helper.popup',
			'tabs' => 'shop.helper.tabs',
			'marketaclType' => 'type.market_acl',
			'categoryType' => 'type.shop_category',
			'editorType' => 'shop.type.editor',
			'uploaderType' => 'type.uploader',
			'menusType' => 'type.menus',
			'radioType' => 'shop.type.radio',
			'cssType' => 'type.css',
			'toggleClass' => 'helper.toggle',
			'joomlaaclType' => 'type.joomla_acl',
			'nameboxType' => 'type.namebox',
			'vendorClass' => 'class.vendor'
		));

		$vendor = $this->vendorClass->get(1);
		$this->assignRef('vendor', $vendor);

		$vendorselect_tables = array('order', 'item',
'user');
		$query = 'SELECT field.field_namekey, field.field_realname,
field.field_table '.
			' FROM ' . hikamarket::table('shop.field') . '
AS field '.
			' WHERE field.field_table IN
(\''.implode('\',\'',
$vendorselect_tables).'\') AND field.field_type =
\'plg.market_vendorselectfield\' AND field_published = 1 AND
field_frontcomp = 1'.
			' ORDER BY field.field_table, field.field_realname';
		$db->setQuery($query);
		$vendorselect_customfields = $db->loadObjectList();
		$this->assignRef('vendorselect_customfields',
$vendorselect_customfields);

		$currencyClass = hikamarket::get('shop.class.currency');
		$curr = '';
		$main_currency_id = $shopConfig->get('main_currency', 1);
		$mainCurr = $currencyClass->getCurrencies($main_currency_id, $curr);
		$this->main_currency = $mainCurr[$main_currency_id];

		$languages = array();
		$lg = JFactory::getLanguage();
		$language = $lg->getTag();
		$styleRemind =
'float:right;margin-right:30px;position:relative;';
		$loadLink = $this->popup->display(
			JText::_('LOAD_LATEST_LANGUAGE'),
			'EDIT_LANGUAGE_FILE',
			hikamarket::completeLink('config&task=latest&code=' .
$language, true),
			'loadlatest_language_'.$language,
			800, 500,
'onclick="window.document.getElementById(\'hikashop_messages_warning\').style.display
= \'none\';"', '', 'link'
		);
		if(!file_exists(HIKASHOP_ROOT . 'language' . DS . $language .
DS . $language . '.' . HIKAMARKET_COMPONENT . '.ini'))
{
			if($config->get('errorlanguagemissing', 1)) {
				$noteremind = '<small style="' . $styleRemind .
'">' .
$this->toggleClass->delete('hikashop_messages_warning',
'errorlanguagemissing-0', 'config', false,
JText::_('DONT_REMIND')) . '</small>';
				hikamarket::display(JText::_('MISSING_LANGUAGE') . '
' . $loadLink . ' ' . $noteremind, 'warning');
			}
		}

		jimport('joomla.filesystem.folder');
		$path = hikashop_getLanguagePath(JPATH_ROOT);
		$dirs = JFolder::folders($path);
		foreach($dirs as $dir) {
			$xmlFiles = JFolder::files($path . DS . $dir,
'^([-_A-Za-z]*)\.xml$');
			$xmlFile = array_pop($xmlFiles);
			if($xmlFile == 'install.xml')
				$xmlFile = array_pop($xmlFiles);
			if(empty($xmlFile))
				continue;
			$data = JInstaller::parseXMLInstallFile($path . DS . $dir . DS .
$xmlFile);
			$oneLanguage = new stdClass();
			$oneLanguage->language 	= $dir;
			$oneLanguage->name = $data['name'];
			$languageFiles = JFolder::files($path . DS . $dir, '^(.*)\.' .
HIKAMARKET_COMPONENT . '\.ini$' );
			$languageFile = reset($languageFiles);

			$linkEdit =
hikamarket::completeLink('config&task=language&code='.$oneLanguage->language,
true, false, false);
			if(!empty($languageFile)){
				$oneLanguage->edit = $this->popup->display(
					'<span
id="image'.$oneLanguage->language.'"
alt="'.JText::_('EDIT_LANGUAGE_FILE',
true).'" style="font-size:1.2em;"><i
class="fas fa-pencil-alt"></i></span>',
					'EDIT_LANGUAGE_FILE',
					$linkEdit,
					'edit_language_'.$oneLanguage->language,
					800, 500, '', '', 'link'
				);
			} else {
				$oneLanguage->edit = $this->popup->display(
					'<span
id="image'.$oneLanguage->language.'"alt="'.JText::_('ADD_LANGUAGE_FILE',
true).'" style="font-size:1.2em;"><i
class="fas fa-plus"></i></span>',
					'ADD_LANGUAGE_FILE',
					$linkEdit,
					'edit_language_'.$oneLanguage->language,
					800, 500, '', '', 'link'
				);
			}
			$languages[] = $oneLanguage;
		}
		$this->assignRef('languages', $languages);

		$emails = array();
		$emailFiles = JFolder::files(HIKAMARKET_MEDIA.'mail'.DS,
'^([-_A-Za-z]*)(\.html)?\.php$');
		if(!empty($emailFiles)) {
			foreach($emailFiles as $emailFile) {
				$file = str_replace(array('.html.php', '.php'),
'', $emailFile);
				if(substr($file, -9) == '.modified')
					continue;
				$emails[] = array(
					'name' => $file,
					'file' => 'market.'.$file,
					'published' =>
$shopConfig->get('market.'.$file.'.published')
				);
			}
		}
		$this->assignRef('emails', $emails);
		$emailManage = hikashop_level(2) &&
hikashop_isAllowed($shopConfig->get('acl_email_manage','all'));
		$this->assignRef('emailManage', $emailManage);

		$statistics = array();
		$statisticsClass = hikamarket::get('class.statistics');
		$statistics = $statisticsClass->getVendor(0);

		JPluginHelper::importPlugin('hikamarket');
		JPluginHelper::importPlugin('hikashop');
		JPluginHelper::importPlugin('hikashoppayment');
		$app->triggerEvent('onVendorPanelDisplay',
array(&$buttons, &$statistics));

		$vendor_statistics = $config->get('vendor_statistics',
null);
		if(!empty($vendor_statistics)) {
			foreach($statistics as $key => &$stat) {
				$stat['published'] = false;
			}
			unset($stat);

			$vendor_statistics =
hikamarket::unserialize(base64_decode($vendor_statistics));
			foreach($vendor_statistics as $key => $stat_conf) {
				if(!isset($statistics[$key]))
					continue;

				if(isset($stat_conf['container']))
					$statistics[$key]['container'] =
(int)$stat_conf['container'];
				if(isset($stat_conf['slot']))
					$statistics[$key]['slot'] =
(int)$stat_conf['slot'];
				if(isset($stat_conf['order']))
					$statistics[$key]['order'] =
(int)$stat_conf['order'];
				if(isset($stat_conf['published']))
					$statistics[$key]['published'] =
$stat_conf['published'];
				if(!empty($stat_conf['vars'])) {
					if(!isset($statistics[$key]['vars']))
						$statistics[$key]['vars'] = array();

					foreach($stat_conf['vars'] as $k => $v) {
						if(isset($statistics[$key]['vars'][$k]))
							$statistics[$key]['vars'][$k] = $v;
					}
				}
			}

			uasort($statistics, array($this, 'sortStats'));
		}
		$this->assignRef('statistics', $statistics);
		$this->assignRef('statisticsClass', $statisticsClass);

		$query = 'SELECT product.product_id, product.product_name,
product.product_code, count(vendor.vendor_id) as `vendor_count`'.
			' FROM '.hikamarket::table('shop.product').' as
product '.
			' LEFT JOIN '.hikamarket::table('vendor').' as
vendor ON vendor.vendor_template_id = product.product_id '.
			' WHERE product_type = \'template\' '.
			' GROUP BY product.product_id, product.product_name,
product.product_code';
		$db->setQuery($query);
		$product_templates = $db->loadObjectList();
		$this->assignRef('product_templates', $product_templates);

		$product_template = null;
		if((int)$config->get('default_template_id', 0) > 0) {
			$query = 'SELECT * FROM
'.hikamarket::table('shop.product').' AS a WHERE
a.product_type = \'template\' AND a.product_id = ' .
(int)$config->get('default_template_id', 0);
			$db->setQuery($query);
			$product_template = $db->loadObject();
		}
		$this->assignRef('product_template', $product_template);

		$manager = true;
		$this->toolbar = array(
			'|',
			array('name' => 'save', 'display' =>
$manager),
			array('name' => 'apply', 'display'
=> $manager),
			'hikacancel',
			'|',
			array('name' => 'pophelp', 'target'
=> 'config'),
			'dashboard'
		);
	}

	protected function sortStats($a, $b) {
		if($a['order'] == $b['order'])
			return 0;
		return ($a['order'] < $b['order']) ? -1 : 1;
	}

	public function acl($tpl = null) {
		$app = JFactory::getApplication();
		$db = JFactory::getDBO();
		$config = hikamarket::config();
		$shopConfig = hikamarket::config(false);

		hikamarket::loadJslib('otree');

		$market_acl = hikamarket::get('type.market_acl');
		$this->assignRef('marketaclType', $market_acl);
		$acls = $market_acl->getList();
		$this->assignRef('acls', $acls);

		$joomla_acl = hikamarket::get('type.joomla_acl');
		$this->assignRef('joomlaAclType', $joomla_acl);
		$groups = $joomla_acl->getList();
		$this->assignRef('groups', $groups);

		$aclClass = hikamarket::get('class.acl');

		$title_parameters = '';
		$acl_type = 'user';
		$acl_type = hikaInput::get()->getCmd('acl_type',
'');

		if(!empty($acl_type)) {
			$aclConfig = array();
			foreach($groups as $group) {
				$localAclData = $config->get($acl_type . '_acl_' .
$group->id, '');
				if($acl_type == 'vendor_options')
					$aclConfig[$group->id] = hikamarket::unserialize($localAclData);
				else
					$aclConfig[$group->id] = explode(',', $localAclData);
			}
			$this->assignRef('aclConfig', $aclConfig);

			$title_parameters = '&acl_type='.$acl_type;

			if($acl_type == 'vendor_options') {
				$currencyClass = hikamarket::get('shop.class.currency');
				$mainCurrency = $shopConfig->get('main_currency', 1);
				$currencyIds = $currencyClass->publishedCurrencies();
				if(!in_array($mainCurrency, $currencyIds))
					$currencyIds = array_merge(array($mainCurrency), $currencyIds);
				$null = null;
				$currencies = $currencyClass->getCurrencies($currencyIds, $null);
				$this->assignRef('currencies', $currencies);
			}

		} else {
			$buttons = array(
				array(
					'name' => JText::_('HIKAM_VENDOR_ACL'),
					'url' =>
hikamarket::completeLink('config&task=acl&acl_type=vendor'),
					'icon' => 'icon-48-acl'
				),
				array(
					'name' => JText::_('HIKAM_VENDOR_OPTIONS'),
					'url' =>
hikamarket::completeLink('config&task=acl&acl_type=vendor_options'),
					'icon' => 'icon-48-acl'
				),
				array(
					'name' => JText::_('HIKAM_USER_ACL'),
					'url' =>
hikamarket::completeLink('config&task=acl&acl_type=user'),
					'icon' => 'icon-48-acl'
				),
			);
			$this->assignRef('buttons', $buttons);
		}
		$this->assignRef('acl_type', $acl_type);

		hikamarket::setTitle(JText::_('HIKAM_ACL'),
'unlock-alt',
self::ctrl.'&task=acl'.$title_parameters);

		$manager = true;
		if(!empty($acl_type)) {
			$this->toolbar = array(
				'|',
				array('name' => 'custom', 'icon' =>
'save', 'alt' =>
JText::_('JTOOLBAR_SAVE'), 'task' =>
'saveacl', 'check' => false, 'display'
=> $manager),
				array('name' => 'custom', 'icon' =>
'apply', 'alt' =>
JText::_('JTOOLBAR_APPLY'), 'task' =>
'applyacl', 'check' => false, 'display'
=> $manager),
				array('name' => 'hikacancel', 'url'
=> hikamarket::completeLink('config&task=acl')),
				'|',
				array('name' => 'pophelp', 'target'
=> 'config'),
				'dashboard'
			);
		} else {
			$this->toolbar = array(
				'|',
				array('name' => 'pophelp', 'target'
=> 'config'),
				'dashboard'
			);
		}
	}

	public function sql($tpl = null) {
		hikamarket::setTitle(JText::_('HIKA_CONFIGURATION_SQL'),
self::icon, self::ctrl);

		$config = hikamarket::config();
		$this->assignRef('config', $config);

		$toolbar = JToolBar::getInstance('toolbar');

		$sql_data = hikaInput::get()->getRaw('sql_data',
'');
		$this->assignRef('sql_data', $sql_data);

		$user = JFactory::getUser();
		$iAmSuperAdmin = $user->authorise('core.admin');

		$query_result = '';
		if(!empty($sql_data) && $iAmSuperAdmin) {
			$p = strpos(trim($sql_data), ' ');
			if($p !== false) {
				$db = JFactory::getDBO();
				$sql_data = str_replace('table::', '#__',
trim($sql_data));
				$word = strtolower(substr($sql_data, 0, $p));

				if(in_array($word, array('insert', 'update',
'delete'))) {
					$db->setQuery($sql_data);
					try {
						$db->execute();
						$query_result = JText::_('HIKA_X_ROWS_AFFECTED',
$db->getAffectedRows());
					} catch(Exception $e) {
						$query_result = JText::_('HIKA_QUERY_FAILURE');
					}
				} else if($word == 'select') {
					$db->setQuery($sql_data);
					try {
						$query_result = $db->loadObjectList();
					} catch(Exception $e) {
						$query_result = JText::_('HIKA_QUERY_FAILURE');
					}
				} else if(in_array($word, array('create', 'drop',
'alter'))) {
					$db->setQuery($sql_data);
					try {
						if( $db->execute() ) {
							$query_result = JText::_('HIKA_QUERY_SUCCESS');
						} else {
							$query_result = JText::_('HIKA_QUERY_FAILURE');
						}
					} catch(Exception $e) {
						$query_result = JText::_('HIKA_QUERY_FAILURE');
					}
				}
			}
		}
		$this->assignRef('query_result', $query_result);

		$this->toolbar = array(
			'|',
			array('name' => 'custom', 'icon' =>
'apply', 'alt' => JText::_('HIKAM_APPLY'),
'task' => 'sql', 'check' => false),
			'hikacancel',
			'|',
			array('name' => 'pophelp', 'target'
=> 'config'),
			'dashboard'
		);
	}

	public function language() {
		$code = hikaInput::get()->getString('code');
		if(empty($code)) {
			hikamarket::display('Code not specified','error');
			return;
		}

		jimport('joomla.filesystem.file');
		$path = hikashop_getLanguagePath(JPATH_ROOT) . DS . $code . DS . $code .
'.' . HIKAMARKET_COMPONENT . '.ini';
		$file = new stdClass();
		$file->name = $code;
		$file->path = $path;
		if(JFile::exists($path)) {
			$file->content = file_get_contents($path);
			if(empty($file->content)) {
				hikamarket::display('File not found :
'.$path,'error');
			}
		} else {
			hikamarket::display(JText::_('LOAD_ENGLISH_1') .
'<br/>' . JText::_('LOAD_ENGLISH_2') .
'<br/>' . JText::_('LOAD_ENGLISH_3'),
'info');
			$file->content =
file_get_contents(hikashop_getLanguagePath(JPATH_ROOT) . DS .
'en-GB' . DS . 'en-GB.' . HIKAMARKET_COMPONENT .
'.ini');
		}
		$override_content = '';
		$override_path = hikashop_getLanguagePath(JPATH_ROOT) . DS .
'overrides' . DS . $code . '.override.ini';
		if(JFile::exists($override_path)) {
			$override_content = file_get_contents($override_path);
		}
		$this->assignRef('override_content', $override_content);
		$this->assignRef('showLatest', $showLatest);
		$this->assignRef('file', $file);
	}

	public function share(){
		$file = new stdClass();
		$file->name = hikaInput::get()->getString('code');
		$this->assignRef('file', $file);
	}

	public function css(){
		$file = hikaInput::get()->getCmd('file');
		$new = false;
		if(empty($file)) {
			$type = hikaInput::get()->getCmd('var');
			$filename = '';
			$new = true;
		} else {
			if(!preg_match('#^([-_A-Za-z0-9]*)_([-_A-Za-z0-9]*)$#i',
$file, $result)) {
				hikamarket::display('Could not load the file '.$file.'
properly');
				exit;
			}
			$type = $result[1];
			$filename = $result[2];
		}

		$content = hikaInput::get()->getString('csscontent',
'');
		if(empty($content) && !$new) {
			$content = file_get_contents(HIKAMARKET_MEDIA . 'css' . DS .
$type . '_' . $filename . '.css');
		}
		if(empty($content) && $new &&
file_exists(HIKAMARKET_MEDIA . 'css' . DS . $type .
'_default.css')) {
			$content = file_get_contents(HIKAMARKET_MEDIA . 'css' . DS .
$type . '_default.css');
		}

		if($filename == 'default' || $new) {
			$filename = 'custom';
			$new = true;
			$i = 1;
			while(file_exists(HIKAMARKET_MEDIA.'css' . DS . $type .
'_' . $filename . '.css')) {
				$filename = 'custom' . $i;
				$i++;
			}
		}

		$this->assignRef('content', $content);
		$this->assignRef('filename', $filename);
		$this->assignRef('new', $new);
		$this->assignRef('type', $type);

		$editor = hikamarket::get('shop.helper.editor');
		$this->assignRef('editor', $editor);
	}

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

	public 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 leftmenu($name, $data) {
		$this->menuname = $name;
		$this->menudata = $data;
		$this->setLayout('leftmenu');
		return $this->loadTemplate();
	}
}
dashboardmarket/index.html000064400000000032151161332360011670
0ustar00<html><body></body></html>dashboardmarket/tmpl/index.html000064400000000032151161332360012644
0ustar00<html><body></body></html>dashboardmarket/tmpl/listing.php000064400000002554151161332360013044
0ustar00<?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');
?><div class="iframedoc"
id="iframedoc"></div>
<div class="hk-container-fluid">
<?php
if(!empty($this->statistics_slots)) {
	foreach($this->statistics_slots as $slot) {
?>
	<div class="hk-row">
<?php
		foreach($this->statistics as $key => $stat) {
			if($stat['slot'] != $slot)
				continue;
			if(isset($stat['published']) &&
empty($stat['published']))
				continue;
			$class = 'hkc-sm-12';
			if(isset($stat['class']))
				$class = $stat['class'];
?>
		<div id="hikashop_dashboard_stat_<?php echo $key; ?>"
class="<?php echo $class; ?>"><?php
			echo $this->statisticsClass->display($stat);
		?></div>
<?php
		}
?>
	</div>
<?php
	}
}
?>
</div>
<div id="cpanel">
<?php foreach($this->buttons as $btn) { ?>
	<div class="icon-wrapper">
		<div class="icon">
			<a href="<?php echo $btn['url'];?>">
				<span class="<?php echo $btn['icon'];?>"
style="background-repeat:no-repeat;background-position:center;height:48px;padding:10px
0;"></span>
				<span><?php echo $btn['name'];?></span>
			</a>
		</div>
	</div>
<?php } ?>
	<div style="clear:both"></div>
</div>
dashboardmarket/tmpl/listing.xml000064400000000320151161332360013042
0ustar00<?xml version="1.0" encoding="utf-8"?>
<metadata>
	<layout title="COM_HIKAMARKET_DASHBOARD_VIEW_TITLE">
		<message>
			<![CDATA[COM_HIKAMARKET_DASHBOARD_VIEW_DESC]]>
		</message>
	</layout>
</metadata>dashboardmarket/view.html.php000064400000005546151161332360012340
0ustar00<?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 dashboardmarketViewdashboardmarket extends hikamarketView {

	const ctrl = 'dashboard';
	const name = HIKAMARKET_NAME;
	const icon = 'store';

	public function display($tpl = null, $params = null) {
		$this->paramBase =
HIKAMARKET_COMPONENT.'.'.$this->getName();
		$fct = $this->getLayout();
		if(method_exists($this, $fct))
			$this->$fct($params);
		parent::display($tpl);
	}

	public function listing() {
		hikamarket::setTitle(JText::_(self::name), self::icon, self::ctrl);

		$statisticsClass = hikamarket::get('class.statistics');
		$statistics = $statisticsClass->getDashboard();

		$statistics_slots = array();
		foreach($statistics as $key => &$stat) {
			$slot = (int)@$stat['slot'];
			$stat['slot'] = $slot;
			$stat['key'] = $key;
			$statistics_slots[ $slot ] = $slot;
		}
		unset($stat);
		asort($statistics_slots);

		$this->assignRef('statisticsClass', $statisticsClass);
		$this->assignRef('statistics', $statistics);
		$this->assignRef('statistics_slots', $statistics_slots);

		$config = hikamarket::config();
		$use_approval = $config->get('product_approval', 0);

		$buttons = array(
			'vendors' => array(
				'name' => JText::_('HIKA_VENDORS'),
				'url' => hikamarket::completeLink('vendor'),
				'icon' => 'fas fa-user-tie'
			),
			'approval' => array(
				'name' => JText::_('WAITING_APPROVAL_LIST'),
				'url' =>
hikamarket::completeLink('product&task=waitingapproval'),
				'icon' => 'fas fa-thumbs-up'
			),
			'plugins' => array(
				'name' => JText::_('PLUGINS'),
				'url' => hikamarket::completeLink('plugins'),
				'icon' => 'fas fa-puzzle-piece'
			),
			'config' => array(
				'name' => JText::_('HIKA_CONFIGURATION'),
				'url' => hikamarket::completeLink('config'),
				'icon' => 'fas fa-wrench'
			),
			'acl' => array(
				'name' => JText::_('HIKAM_ACL'),
				'url' =>
hikamarket::completeLink('config&task=acl'),
				'icon' => 'fas fa-unlock-alt'
			),
			'update' => array(
				'name' => JText::_('UPDATE_ABOUT'),
				'url' => hikamarket::completeLink('update'),
				'icon' => 'fas fa-sync'
			),
			'help' => array(
				'name' => JText::_('HIKA_HELP'),
				'url' =>
hikamarket::completeLink('documentation'),
				'icon' => 'fas fa-life-ring'
			)
		);
		if(!$use_approval)
			unset($buttons['approval']);

		$this->assignRef('buttons', $buttons);

		if(JFactory::getUser()->authorise('core.admin',
'com_hikamarket')) {
			$this->toolbar[] = array('name' =>
'preferences', 'component' =>
'com_hikamarket');
		}
		$this->toolbar[] = array('name' => 'pophelp',
'target' => 'welcome');
	}
}
layouts/index.html000064400000000034151161332370010240
0ustar00<html><body></body></html>
layouts/tmpl/index.html000064400000000034151161332370011214
0ustar00<html><body></body></html>
layouts/tmpl/search.php000064400000005133151161332370011202
0ustar00<?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
$value = $this->params->get('value',
$this->pageInfo->search);
$map = $this->params->get('map', 'search');
$id = $this->params->get('id', $map);
$class = '';
if(HIKASHOP_J40){
	$class = 'form-control';
}
if(!empty($this->searchOptions)) {
	$this->searching = false;
	foreach($this->searchOptions as $option => $default) {
		if(isset($this->pageInfo->filter->$option) &&
$this->pageInfo->filter->$option != $default)
			$this->searching = true;
		$option = 'filter_'.$option;
		if(isset($this->pageInfo->filter->$option) &&
$this->pageInfo->filter->$option != $default)
			$this->searching = true;
	}
}
$icon = 'fa-chevron-down';
$clearClass = 'hikashop_not_searching';
$onclick = 'disabled onclick="return false;"';
$onclickSearch = '';
if(!empty($this->searching)) {
	$icon = 'fa-chevron-up';
	$clearClass = 'hikashop_searching';
	$this->openfeatures_class = 'show-features';
	$onclickSearch =
'window.hikashop.clearOptions([\''.@implode('\',\'',
@array_keys($this->searchOptions)).'\'], [\''.
@implode('\',\'',
@$this->searchOptions).'\']);';
	$onclick = 'onclick="return
'.$onclickSearch.'"';
}
if(!empty($value)) {
	$clearClass = 'hikashop_searching';
	$onclick =
'onclick="'.$onclickSearch.'document.getElementById(\''.$id.'\').value=\'\';
return true;"';
}
?>
<div class="input-group hikashop_search_listing">
	<input type="text" name="<?php echo $map; ?>"
id="<?php echo $id; ?>" value="<?php echo
$this->escape($value);?>" class="<?php echo $class;
?>" placeholder="<?php echo
JText::_('HIKA_SEARCH'); ?>"
onchange="this.form.submit();" />
	<span class="input-group-append hikashop_search_btn">
		<button class="btn btn-primary"
onclick="this.form.limitstart.value=0;this.form.submit();"><i
class="fa fa-search"></i></button>
	</span>
<?php
if(!empty($this->searchOptions)) {
?>
	<span class="hikashop_search_option">
		<button class="btn btn-primary" onclick="return
window.hikashop.toggleOptions();">
			<span><?php echo JText::_('HIKASHOP_FILTER_OPTIONS');
?></span>
			<span id="openSearch_btn">
				<i class="fas <?php echo $icon; ?>"></i>
			</span>
		</button>
	</span>
<?php
}
?>
	<span class="input-group-append hikashop_search_clear <?php
echo $clearClass; ?>">
		<button class="btn btn-primary" <?php echo $onclick;
?>><?php echo JText::_('HIKASHOP_FILTER_CLEAR');
?></button>
	</span>
</div>
menusmarket/index.html000064400000000032151161332370011071
0ustar00<html><body></body></html>menusmarket/tmpl/form.php000064400000033017151161332370011535
0ustar00<?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');
?><div class="iframedoc"
id="iframedoc"></div>
<?php
	$arr = array(
		JHTML::_('select.option', '-1',
JText::_('HIKA_INHERIT')),
		JHTML::_('select.option', '1',
JText::_('HIKASHOP_YES')),
		JHTML::_('select.option', '0',
JText::_('HIKASHOP_NO')),
	);
?>
<form action="<?php echo
hikamarket::completeLink('menus'); ?>"
method="POST" name="adminForm"
id="adminForm">
<?php if(!HIKASHOP_BACK_RESPONSIVE) { ?>
<div id="page-menus">
	<table style="width:100%">
		<tr>
			<td valign="top" width="50%">
<?php } else { ?>
<div id="page-menus" class="row-fluid">
	<div class="span6">
<?php } ?>
				<fieldset class="adminform">
					<legend><?php echo JText::_( 'HIKA_DETAILS' );
?></legend>

					<table class="admintable table"
cellspacing="1">
						<tr>
							<td class="key"><?php echo
JText::_('HIKA_TITLE'); ?></td>
							<td>
								<input class="text_area" type="text"
name="menu[title]" id="title" size="35"
value="<?php echo $this->escape(@$this->element->title);
?>" />
							</td>
						</tr>
						<tr>
							<td class="key"><?php echo
JText::_('HIKA_ALIAS'); ?></td>
							<td>
								<input class="text_area" type="text"
name="menu[alias]" id="title" size="35"
value="<?php echo $this->escape(@$this->element->alias);
?>" />
							</td>
						</tr>
<?php  ?>
						<tr>
							<td class="key"><?php echo
JText::_('HIKA_PUBLISHED'); ?></td>
							<td><?php
								echo JHTML::_('hikaselect.booleanlist',
'menu[published]', 'class="inputbox"',
@$this->element->published);
							?></td>
						</tr>
						<tr>
							<td class="key"><?php
								echo JText::_('TYPE_OF_CONTENT');
							?></td>
							<td><?php
								echo
$this->contentType->display('menu[content_type]',@$this->element->content_type,
$this->js, true, true);
							?></td>
						</tr>
						<tr>
							<td class="key"><?php echo
JText::_('TYPE_OF_LAYOUT'); ?></td>
							<td><?php
								if(!isset($this->element->hikamarket_params['layout_type']))
									$this->element->hikamarket_params['layout_type'] =
'inherit';
								echo
$this->layoutType->display($this->control.'[layout_type]',
@$this->element->hikamarket_params['layout_type'],
$this->js, true);
							?></td>
						</tr>
						<tr id="number_of_columns">
							<td class="key"><?php echo
JText::_('NUMBER_OF_COLUMNS');?></td>
							<td>
								<input name="<?php echo $this->control;
?>[columns]" type="text" value="<?php echo
@$this->element->hikamarket_params['columns'];?>"
/>
							</td>
						</tr>
						<tr>
							<td class="key"><?php echo
JText::_('NUMBER_OF_ITEMS'); ?></td>
							<td>
								<input name="<?php echo $this->control;
?>[limit]" type="text" value="<?php echo
@$this->element->hikamarket_params['limit'];?>"
/>
							</td>
						</tr>
						<tr>
							<td class="key"><?php echo
JText::_('RANDOM_ITEMS');?></td>
							<td><?php
								if(!isset($this->element->hikamarket_params['random']))
									$this->element->hikamarket_params['random'] =
'-1';
								echo JHTML::_('hikaselect.radiolist', $arr,
$this->control.'[random]' , '', 'value',
'text',
@$this->element->hikamarket_params['random']);
							?></td>
						</tr>
						<tr>
							<td class="key"><?php echo
JText::_('ORDERING_DIRECTION'); ?></td>
							<td><?php
								if(!isset($this->element->hikamarket_params['order_dir']))
									$this->element->hikamarket_params['order_dir'] =
'inherit';
								echo
$this->orderdirType->display($this->control.'[order_dir]',@$this->element->hikamarket_params['order_dir']);
							?></td>
						</tr>
<?php
?>
					</table>
				</fieldset>
				<fieldset data-block="options"
data-block-value="images" class="adminform">
					<legend><?php echo
JText::_('HIKAM_PARAMS_FOR_IMAGES'); ?></legend>
					<table class="admintable table" cellspacing="1"
width="100%">
						<tr>
							<td class="key"><?php echo
JText::_('IMAGE_X');?></td>
							<td>
								<input size="12" name="<?php echo
$this->control;?>[image_width]" type="text"
value="<?php echo
@$this->element->hikamarket_params['image_width'];?>"
/> px
							</td>
						</tr>
						<tr>
							<td class="key"><?php echo
JText::_('IMAGE_Y');?></td>
							<td>
								<input size="12" name="<?php echo
$this->control;?>[image_height]" type="text"
value="<?php echo
@$this->element->hikamarket_params['image_height'];?>"
/> px
							</td>
						</tr>
						<tr>
							<td class="key"><?php echo
JText::_('HIKAM_IMAGE_FORCESIZE');?></td>
							<td><?php
								if(!isset($this->element->hikamarket_params['image_forcesize']))
									$this->element->hikamarket_params['image_forcesize']
= '-1';
								echo JHTML::_('hikaselect.radiolist', $arr,
$this->control.'[image_forcesize]' , '',
'value', 'text',
@$this->element->hikamarket_params['image_forcesize']);
							?></td>
						</tr>
						<tr>
							<td class="key"><?php echo
JText::_('HIKAM_IMAGE_GRAYSCALE');?></td>
							<td><?php
								if(!isset($this->element->hikamarket_params['image_grayscale']))
									$this->element->hikamarket_params['image_grayscale']
= '-1';
								echo JHTML::_('hikaselect.radiolist', $arr,
$this->control.'[image_grayscale]' , '',
'value', 'text',
@$this->element->hikamarket_params['image_grayscale']);
							?></td>
						</tr>
						<tr>
							<td class="key"><?php echo
JText::_('HIKAM_IMAGE_SCALE');?></td>
							<td><?php
								if(!isset($this->element->hikamarket_params['image_scale']))
									$this->element->hikamarket_params['image_scale'] =
'-1';
									$scale_arr = array(
										JHTML::_('select.option', '-1',
JText::_('HIKA_INHERIT')),
										JHTML::_('select.option', '1',
JText::_('HIKAM_IMAGE_SCALE_INSIDE')),
										JHTML::_('select.option', '0',
JText::_('HIKAM_IMAGE_SCALE_OUTSIDE')),
									);
								echo JHTML::_('hikaselect.radiolist', $scale_arr,
$this->control.'[image_scale]' , '',
'value', 'text',
@$this->element->hikamarket_params['image_scale']);
							?></td>
						</tr>
						<tr>
							<td class="key"><?php echo
JText::_('HIKAM_IMAGE_RADIUS');?></td>
							<td>
								<input size="12" name="<?php echo
$this->control;?>[image_radius]" type="text"
value="<?php echo
@$this->element->hikamarket_params['image_radius'];?>"
/> px
							</td>
						</tr>
					</table>
				</fieldset>
<?php if(!HIKASHOP_BACK_RESPONSIVE) { ?>
			</td>
			<td valign="top" width="50%">
<?php } else { ?>
	</div>
	<div class="span6">
<?php } ?>
				<fieldset data-block="content"
data-block-value="vendor" class="adminform">
					<legend><?php echo JText::_('PARAMS_FOR_VENDORS');
?></legend>
					<table class="admintable table" cellspacing="1"
width="100%">
						<tr>
							<td class="key"><?php echo
JText::_('ORDERING_FIELD');?></td>
							<td><?php
								if(!isset($this->element->hikamarket_params['vendor_order']))
									$this->element->hikamarket_params['vendor_order']
= 'inherit';
								echo
$this->orderType->display($this->control.'[vendor_order]',
@$this->element->hikamarket_params['vendor_order'],
'#_hikamarket_vendor');
							?></td>
						</tr>
						<tr>
							<td class="key"><?php echo
JText::_('LINK_TO_VENDOR_PAGE');?></td>
							<td><?php
								if(!isset($this->element->hikamarket_params['link_to_vendor_page']))
									$this->element->hikamarket_params['link_to_vendor_page']
= '-1';
								echo JHTML::_('hikaselect.radiolist', $arr,
$this->control.'[link_to_vendor_page]' , '',
'value', 'text',
@$this->element->hikamarket_params['link_to_vendor_page']);
							?></td>
						</tr>
						<tr>
							<td class="key"><?php echo
JText::_('DISPLAY_VOTE'); ?></td>
							<td><?php
								if(!isset($this->element->hikamarket_params['show_vote']))
									$this->element->hikamarket_params['show_vote'] =
'-1';
								echo JHTML::_('hikaselect.radiolist',  $arr,
$this->control.'[show_vote]', '', 'value',
'text',
@$this->element->hikamarket_params['show_vote']);
							?></td>
						</tr>
<?php if(hikashop_level(2)) { ?>
							<tr>
								<td class="key"><?php echo
JText::_('DISPLAY_CUSTOM_FIELDS');?></td>
								<td><?php
									if(!isset($this->element->hikamarket_params['display_custom_fields']))
										$this->element->hikamarket_params['display_custom_fields']
= '-1';
									echo JHTML::_('hikaselect.radiolist', $arr,
$this->control.'[display_custom_fields]' , '',
'value', 'text',
@$this->element->hikamarket_params['display_custom_fields']);
								?></td>
							</tr>
<?php } ?>
					</table>
				</fieldset>
				<fieldset data-block="layout"
data-block-value="div" class="adminform">
					<legend><?php echo JText::_('PARAMS_FOR_DIV');
?></legend>
					<table class="admintable table" cellspacing="1"
width="100%">
						<tr>
							<td class="key"><?php echo
JText::_('TYPE_OF_ITEM_LAYOUT');?></td>
							<td><?php
								if(!isset($this->element->hikamarket_params['div_item_layout_type']))
									$this->element->hikamarket_params['div_item_layout_type']
= 'inherit';
								echo
$this->itemlayoutType->display($this->control.'[div_item_layout_type]',
@$this->element->hikamarket_params['div_item_layout_type'],
$this->js, '');
							?></td>
						</tr>
						<tr>
							<td class="key"><?php echo
JText::_('PANE_HEIGHT');?></td>
							<td>
								<input size="12" name="<?php echo
$this->control;?>[pane_height]" type="text"
value="<?php echo
@$this->element->hikamarket_params['pane_height'];?>"
/> px
							</td>
						</tr>
						<tr>
							<td class="key"><?php echo
JText::_('ITEM_BOX_COLOR');?></td>
							<td><?php
								echo
$this->colorType->displayAll('',$this->control.'[background_color]',@$this->element->hikamarket_params['background_color']);
							?></td>
						</tr>
						<tr>
							<td class="key"><?php echo
JText::_('ITEM_BOX_MARGIN');?></td>
							<td>
								<input name="<?php echo
$this->control;?>[margin]" type="text"
value="<?php echo
@$this->element->hikamarket_params['margin'];?>"
/> px
							</td>
						</tr>
						<tr>
							<td class="key"><?php echo
JText::_('ITEM_BOX_BORDER');?></td>
							<td><?php
								if(!isset($this->element->hikamarket_params['border_visible']))
									$this->element->hikamarket_params['border_visible']
= '-1';
								$arr2 = $arr;
								$arr2[] = JHTML::_('select.option', 2,
JText::_('THUMBNAIL'));
								echo JHTML::_('hikaselect.radiolist', $arr2,
$this->control.'[border_visible]' , '',
'value', 'text',
@$this->element->hikamarket_params['border_visible']);
							?></td>
						</tr>
						<tr>
							<td class="key"><?php echo
JText::_('ITEM_BOX_ROUND_CORNER');?></td>
							<td><?php
								if(!isset($this->element->hikamarket_params['rounded_corners']))
									$this->element->hikamarket_params['rounded_corners']
= '-1';
								echo JHTML::_('hikaselect.radiolist', $arr,
$this->control.'[rounded_corners]' , '',
'value', 'text',
@$this->element->hikamarket_params['rounded_corners']);
							?></td>
						</tr>
						<tr>
							<td class="key"><?php echo
JText::_('TEXT_CENTERED');?></td>
							<td><?php
								if(!isset($this->element->hikamarket_params['text_center']))
									$this->element->hikamarket_params['text_center'] =
'-1';
								echo JHTML::_('hikaselect.radiolist', $arr,
$this->control.'[text_center]' , '',
'value', 'text',
@$this->element->hikamarket_params['text_center']);
							?></td>
						</tr>
					</table>
				</fieldset>
				<fieldset data-block="layout"
data-block-value="list" class="adminform">
					<legend><?php echo JText::_('PARAMS_FOR_LIST');
?></legend>
					<table class="admintable table" cellspacing="1"
width="100%">
						<tr>
							<td class="key"><?php echo
JText::_('UL_CLASS_NAME');?></td>
							<td>
								<input name="<?php echo
$this->control;?>[ul_class_name]" type="text"
value="<?php echo
@$this->element->hikamarket_params['ul_class_name'];?>"
/>
							</td>
						</tr>
					</table>
				</fieldset>
<?php if(!HIKASHOP_BACK_RESPONSIVE) { ?>
			</td>
		</tr>
	</table>
</div>
<?php } else { ?>
	</div>
</div>
<?php } ?>
	<div class="clr"></div>

	<input type="hidden" name="option"
value="<?php echo HIKAMARKET_COMPONENT; ?>" />
	<input type="hidden" name="menu[id]"
value="<?php echo (int)@$this->element->id; ?>"
/>
	<input type="hidden" name="menu[component_id]"
value="<?php echo @$this->element->component_id; ?>"
/>
	<input type="hidden" name="menu[type]"
value="component" />
	<input type="hidden" name="task" value=""
/>
	<input type="hidden" name="ctrl"
value="<?php echo
hikaInput::get()->getCmd('ctrl');?>" />
	<input type="hidden" name="return"
value="<?php echo
hikaInput::get()->getString('return');?>" />
	<input type="hidden" name="client"
value="0" />
	<?php echo JHTML::_('form.token');?>
</form>

<script type="text/javascript">
if(!window.localPage)
	window.localPage = {};
window.localPage.switchPanel = function(id, name, type) {
	var d = document, el = null;
	if(type == 'layout') {
		el = d.getElementById('number_of_columns');
		if(el)
			el.style.display = (name == 'table') ? 'none' :
'';
	}
	var container = d.getElementById('adminForm');
	var elements = container.getElementsByTagName("fieldset");
	for(var j = elements.length - 1; j >= 0; j--) {
		e = elements[j];
		if(e.nodeType && e.getAttribute &&
e.getAttribute('data-block') == type)
			e.style.display = (e.getAttribute('data-block-value') == name)
? '' : 'none';
	}
};
<?php echo $this->js; ?>
</script>
menusmarket/tmpl/index.html000064400000000032151161332370012045
0ustar00<html><body></body></html>menusmarket/tmpl/listing.php000064400000007371151161332370012247
0ustar00<?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');
?><div class="iframedoc"
id="iframedoc"></div>
<form action="<?php echo
hikamarket::completeLink('menus'); ?>"
method="post" name="adminForm"
id="adminForm">
	<table>
		<tr>
			<td width="100%">
				<?php echo JText::_('FILTER'); ?>:
				<input type="text" name="search"
id="search" value="<?php echo
$this->escape($this->pageInfo->search);?>"
class="text_area"/>
				<button class="btn"
onclick="this.form.submit();"><?php echo
JText::_('GO'); ?></button>
				<button class="btn"
onclick="document.getElementById('search').value='';this.form.submit();"><?php
echo JText::_('RESET'); ?></button>
			</td>
		</tr>
	</table>
	<table class="adminlist table table-striped table-hover"
cellpadding="1">
		<thead>
			<tr>
				<th class="title titlenum"><?php
					echo JText::_('HIKA_NUM');
				?></th>
				<th class="title titlebox">
					<input type="checkbox" name="toggle"
value="" onclick="hikashop.checkAll(this);" />
				</th>
				<th class="title"><?php
					echo JHTML::_('grid.sort', JText::_('HIKA_TITLE'),
'title',
$this->pageInfo->filter->order->dir,$this->pageInfo->filter->order->value);
				?></th>
				<th class="title"><?php
					echo JHTML::_('grid.sort', JText::_('HIKA_ALIAS'),
'alias',
$this->pageInfo->filter->order->dir,$this->pageInfo->filter->order->value);
				?></th>
				<th class="title"><?php
					echo JText::_('HIKA_TYPE'); ?></th>
				<th class="title"><?php
					echo JHTML::_('grid.sort', JText::_('LINK'),
'link',
$this->pageInfo->filter->order->dir,$this->pageInfo->filter->order->value);
				?></th>
				<th class="title titletoggle"><?php
					echo JText::_('HIKA_ENABLED');
				?></th>
				<th class="title titleid"><?php
					echo JHTML::_('grid.sort', JText::_( 'ID' ),
'id',
$this->pageInfo->filter->order->dir,$this->pageInfo->filter->order->value);
				?></th>
			</tr>
		</thead>
		<tbody>
<?php
$k = 0;
foreach($this->rows as $i => $row) {
	$publishedid = 'published-' . $row->id;
?>
			<tr class="row<?php echo $k; ?>">
				<td align="center"><?php
					echo $i + 1;
				?></td>
				<td align="center"><?php
					echo JHTML::_('grid.id', $i, $row->id);
				?></td>
				<td><?php
					if($this->manage){
						?><a href="<?php echo
hikamarket::completeLink('menus&task=edit&cid[]=' .
$row->id);?>"><?php
					}
					echo $row->title;
					if($this->manage){
						?></a><?php
					}
				?></td>
				<td><?php
					echo $row->alias;
				?></td>
				<td><?php
					echo $row->content_type;
				?></td>
				<td><?php
					echo $row->link;
				?></td>
				<td align="center"><?php
					if($this->manage){
						?><span id="<?php echo $publishedid ?>"
class="loading"><?php echo
$this->toggleClass->toggle($publishedid, $row->published,
'menus'); ?></span><?php
					}else{
						echo $this->toggleClass->display('activate',
$row->published);
					}
				?></td>
				<td align="center"><?php
					echo $row->id;
				?></td>
			</tr>
<?php
	$k = 1-$k;
}
?>
		</tbody>
	</table>
	<input type="hidden" name="option"
value="<?php echo HIKAMARKET_COMPONENT; ?>" />
	<input type="hidden" name="task" value=""
/>
	<input type="hidden" name="ctrl"
value="<?php echo hikaInput::get()->getCmd('ctrl');
?>" />
	<input type="hidden" name="boxchecked"
value="0" />
	<input type="hidden" name="filter_order"
value="<?php echo
$this->pageInfo->filter->order->value; ?>" />
	<input type="hidden" name="filter_order_Dir"
value="<?php echo $this->pageInfo->filter->order->dir;
?>" />
	<?php echo JHTML::_( 'form.token' ); ?>
</form>
menusmarket/tmpl/options.php000064400000022064151161332370012265
0ustar00<?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
$arr = array(
	JHTML::_('select.option', '-1',
JText::_('HIKA_INHERIT')),
	JHTML::_('select.option', '1',
JText::_('HIKASHOP_YES')),
	JHTML::_('select.option', '0',
JText::_('HIKASHOP_NO')),
);
?>
<div id="<?php echo $this->id; ?>"
class="hikashop_backend_tile_edition hk-container-fluid">

<div class="hkc-xl-4 hkc-lg-6
hikashop_tile_block"><div>
<div class="hikashop_tile_title"><?php
	echo JText::_('HIKA_DETAILS');
?></div>
<dl class="hika_options large">
	<input type="hidden" value="vendor"
name="<?php echo $this->name; ?>[content_type]" />

	<dt><?php
		echo JText::_('TYPE_OF_LAYOUT');
	?></dt>
	<dd><?php
		if(!isset($this->element['layout_type']))
			$this->element['layout_type'] = 'inherit';
		echo
$this->layoutType->display($this->name.'[layout_type]',
@$this->element['layout_type'], $this->js, $this->id);
	?></dd>

	<dt id="<?php echo $this->id;
?>_columns"><?php
		echo JText::_('NUMBER_OF_COLUMNS');
	?></dt>
	<dd id="<?php echo $this->id; ?>_columns_0">
		<input name="<?php echo $this->name; ?>[columns]"
type="text" value="<?php echo
@$this->element['columns'];?>" />
	</dd>

	<dt><?php
		echo JText::_('NUMBER_OF_ITEMS');
	?></dt>
	<dd>
		<input name="<?php echo $this->name; ?>[limit]"
type="text" value="<?php echo
@$this->element['limit'];?>" />
	</dd>

	<dt><?php
		echo JText::_('RANDOM_ITEMS');
	?></dt>
	<dd><?php
		if(!isset($this->element['random']))
			$this->element['random'] = '-1';
		echo JHTML::_('hikaselect.radiolist', $arr,
$this->name.'[random]' , '', 'value',
'text', @$this->element['random']);
	?></dd>
</dl>
</div></div>

<div class="hkc-xl-4 hkc-lg-6
hikashop_tile_block"><div>
<div class="hikashop_tile_title"><?php
	echo JText::_('HIKAM_PARAMS_FOR_IMAGES');
?></div>
<dl class="hikam_options large">
	<dt><?php echo JText::_('IMAGE_X');?></dt>
	<dd>
		<input size="12" name="<?php echo $this->name;
?>[image_width]" type="text" value="<?php echo
@$this->element['image_width'];?>" /> px
	</dd>

	<dt><?php echo JText::_('IMAGE_Y');?></dt>
	<dd>
		<input size="12" name="<?php echo $this->name;
?>[image_height]" type="text" value="<?php echo
@$this->element['image_height'];?>" /> px
	</dd>

	<dt><?php echo
JText::_('HIKAM_IMAGE_FORCESIZE');?></dt>
	<dd><?php
		if(!isset($this->element['image_forcesize']))
			$this->element['image_forcesize'] = '-1';
		echo JHTML::_('hikaselect.radiolist', $arr,
$this->name.'[image_forcesize]' , '',
'value', 'text',
@$this->element['image_forcesize']);
	?></dd>

	<dt><?php echo
JText::_('HIKAM_IMAGE_GRAYSCALE');?></dt>
	<dd><?php
		if(!isset($this->element['image_grayscale']))
			$this->element['image_grayscale'] = '-1';
		echo JHTML::_('hikaselect.radiolist', $arr,
$this->name.'[image_grayscale]' , '',
'value', 'text',
@$this->element['image_grayscale']);
	?></dd>

	<dt><?php echo
JText::_('HIKAM_IMAGE_SCALE');?></dt>
	<dd><?php
		if(!isset($this->element['image_scale']))
			$this->element['image_scale'] = '-1';
			$scale_arr = array(
				JHTML::_('select.option', '-1',
JText::_('HIKA_INHERIT')),
				JHTML::_('select.option', '1',
JText::_('HIKAM_IMAGE_SCALE_INSIDE')),
				JHTML::_('select.option', '0',
JText::_('HIKAM_IMAGE_SCALE_OUTSIDE')),
			);
		echo JHTML::_('hikaselect.radiolist', $scale_arr,
$this->name.'[image_scale]' , '', 'value',
'text', @$this->element['image_scale']);
	?></dd>

	<dt><?php echo
JText::_('HIKAM_IMAGE_RADIUS');?></dt>
	<dd>
		<input size="12" name="<?php echo $this->name;
?>[image_radius]" type="text" value="<?php echo
@$this->element['image_radius'];?>" /> px
	</dd>
</dl>
</div></div>

<div class="hkc-lg-clear"></div>

<div class="hkc-xl-4 hkc-lg-6 hikashop_tile_block"
data-block="content"
data-block-value="vendor"><div>
<div class="hikashop_tile_title"><?php echo
JText::_('PARAMS_FOR_VENDORS'); ?></div>
<dl class="hikam_options large">
	<dt><?php echo
JText::_('ORDERING_FIELD');?></dt>
	<dd><?php
		if(!isset($this->element['vendor_order']))
			$this->element['vendor_order'] = 'inherit';
		echo
$this->orderType->display($this->name.'[vendor_order]',
@$this->element['vendor_order'],
'#_hikamarket_vendor');
	?></dd>
	<dt><?php
		echo JText::_('ORDERING_DIRECTION');
	?></dt>
	<dd><?php
		if(!isset($this->element['vendor_order_dir']))
			$this->element['vendor_order_dir'] = 'inherit';
		echo
$this->orderdirType->display($this->name.'[vendor_order_dir]',
@$this->element['vendor_order_dir']);
	?></dd>

	<dt><?php echo
JText::_('LINK_TO_VENDOR_PAGE');?></dt>
	<dd><?php
		if(!isset($this->element['link_to_vendor_page']))
			$this->element['link_to_vendor_page'] = '-1';
		echo JHTML::_('hikaselect.radiolist', $arr,
$this->name.'[link_to_vendor_page]' , '',
'value', 'text',
@$this->element['link_to_vendor_page']);
	?></dd>

	<dt><?php echo
JText::_('DISPLAY_VOTE');?></dt>
	<dd><?php
		if(!isset($this->element['show_vote']))
			$this->element['show_vote'] = '-1';
		echo JHTML::_('hikaselect.radiolist',  $arr,
$this->name.'[show_vote]', '', 'value',
'text', @$this->element['show_vote']);
	?></dd>

<?php if(hikashop_level(2)) { ?>
	<dt><?php echo
JText::_('DISPLAY_CUSTOM_FIELDS');?></dt>
	<dd><?php
		if(!isset($this->element['display_custom_fields']))
			$this->element['display_custom_fields'] = '-1';
		echo JHTML::_('hikaselect.radiolist', $arr,
$this->name.'[display_custom_fields]' , '',
'value', 'text',
@$this->element['display_custom_fields']);
	?></dd>
<?php } ?>
</dl>
</div></div>

<div class="hkc-xl-clear"></div>

<div class="hkc-xl-4 hkc-lg-6 hikashop_tile_block"
data-block="layout"
data-block-value="div"><div>
<div class="hikashop_tile_title"><?php echo
JText::_('PARAMS_FOR_DIV'); ?></div>
<dl class="hikam_options large">

	<dt><?php echo
JText::_('TYPE_OF_ITEM_LAYOUT');?></dt>
	<dd><?php
		if(!isset($this->element['div_item_layout_type']))
			$this->element['div_item_layout_type'] =
'inherit';
		echo
$this->itemlayoutType->display($this->name.'[div_item_layout_type]',
@$this->element['div_item_layout_type'], $this->js,
'');
	?></dd>

	<dt><?php echo
JText::_('PANE_HEIGHT');?></dt>
	<dd>
		<input size="12" name="<?php echo $this->name;
?>[pane_height]" type="text" value="<?php echo
@$this->element['pane_height'];?>" /> px
	</dd>

	<dt><?php echo
JText::_('ITEM_BOX_COLOR');?></dt>
	<dd><?php
		echo $this->colorType->displayAll('',
$this->name.'[background_color]',
@$this->element['background_color']);
	?></dd>

	<dt><?php echo
JText::_('ITEM_BOX_MARGIN');?></dt>
	<dd>
		<input name="<?php echo $this->name; ?>[margin]"
type="text" value="<?php echo
@$this->element['margin'];?>" /> px
	</dd>

	<dt><?php echo
JText::_('ITEM_BOX_BORDER');?></dt>
	<dd><?php
		if(!isset($this->element['border_visible']))
			$this->element['border_visible'] = '-1';
		$arr2 = $arr;
		$arr2[] = JHTML::_('select.option', 2,
JText::_('THUMBNAIL'));
		echo JHTML::_('hikaselect.radiolist', $arr2,
$this->name.'[border_visible]' , '',
'value', 'text',
@$this->element['border_visible']);
	?></dd>

	<dt><?php echo
JText::_('ITEM_BOX_ROUND_CORNER');?></dt>
	<dd><?php
		if(!isset($this->element['rounded_corners']))
			$this->element['rounded_corners'] = '-1';
		echo JHTML::_('hikaselect.radiolist', $arr,
$this->name.'[rounded_corners]' , '',
'value', 'text',
@$this->element['rounded_corners']);
	?></dd>

	<dt><?php echo
JText::_('TEXT_CENTERED');?></dt>
	<dd><?php
		if(!isset($this->element['text_center']))
			$this->element['text_center'] = '-1';
		echo JHTML::_('hikaselect.radiolist', $arr,
$this->name.'[text_center]' , '', 'value',
'text', @$this->element['text_center']);
	?></dd>

</dl>
</div></div>

<div class="hkc-lg-clear"></div>

<div class="hkc-xl-4 hkc-lg-6 hikashop_tile_block"
data-block="layout"
data-block-value="list"><div>
<div class="hikashop_tile_title"><?php echo
JText::_('PARAMS_FOR_LIST'); ?></div>
<dl class="hikam_options large">
	<dt><?php echo
JText::_('UL_CLASS_NAME');?></dt>
	<dd>
		<input name="<?php echo $this->name;
?>[ul_class_name]" type="text" value="<?php echo
@$this->element['ul_class_name'];?>" />
	</dd>
</dl>
</div></div>

<div style="clear:both"></div>
</div>

<script type="text/javascript">
if(!window.localPage)
	window.localPage = {};
window.localPage.switchPanel = function(id, name, type) {
	var d = document, el = null;
	if(type == 'layout') {
		el = d.getElementById(id + '_columns');
		if(el) {
			var v = (name == 'table') ? 'none' : '';
			el.style.display = v;
			el = d.getElementById(id + '_columns_0');
			if(el)
				el.style.display = v;
		}
	}
	var container = d.getElementById(id);
	if(!container)
		return;
	for(var j = container.childNodes.length - 1; j >= 0; j--) {
		e = container.childNodes[j];
		if(e.nodeType && e.getAttribute &&
e.getAttribute('data-block') == type)
			e.style.display = (e.getAttribute('data-block-value') == name)
? '' : 'none';
	}
};
<?php echo $this->js; ?>
</script>
menusmarket/view.html.php000064400000020143151161332370011527
0ustar00<?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 menusmarketViewmenusmarket extends hikamarketView {

	const ctrl = 'menus';
	const name = 'MENU';
	const icon = 'fa-ellipsis-v';

	public function display($tpl = null, $params = null) {
		$this->paramBase = HIKAMARKET_COMPONENT . '.' .
$this->getName();
		$fct = $this->getLayout();
		if(method_exists($this, $fct)) {
			if($this->$fct($params) === false)
				return false;
		}
		parent::display($tpl);
	}

	private function assignTypes() {
		JHTML::_('behavior.modal');

		$modules = array(
			'colorType' => 'type.color',
			'listType' => 'shop.type.list',
			'contentType' => 'type.menu_content',
			'layoutType' => 'type.menu_layout',
			'orderdirType' => 'shop.type.orderdir',
			'orderType' => 'shop.type.order',
			'itemlayoutType' => 'type.itemlayout',
			'popup' => 'shop.helper.popup',
		);
		foreach($modules as $k => $module) {
			$element = hikamarket::get($module);
			$this->assignRef($k, $element);
			unset($element);
		}

		$this->toolbar = array(
			'save',
			'apply',
			'cancel',
			'|',
			array('name' => 'pophelp', 'target'
=> self::ctrl.'-form')
		);
		if(!empty($this->toolbarJoomlaMenu)) {
			array_unshift($this->toolbar, '|');
			array_unshift($this->toolbar, $this->toolbarJoomlaMenu);
		}
	}

	protected function getMenuData($cid) {
		$config = hikamarket::config();
		$shopConfig = hikamarket::config(false);
		if(empty($cid)) {
			$element = new stdClass();
			$element->hikamarket_params =
$shopConfig->get('default_params');
			$default = array(
				'content_type' => 'vendor',
				'link_to_vendor_page' => '1',
				'border_visible' => true,

				'layout_type' => 'inherit',
				'columns' => '',
				'limit' => '',
				'random' => '-1',
				'order_dir' => 'inherit',
				'filter_type' => 2,

				'vendor_order' => 'inherit',
				'show_vote' => '-1',

				'div_item_layout_type' => 'inherit',
				'background_color' => '',
				'margin' => '',
				'border_visible' => '-1',
				'rounded_corners' => '-1',
				'text_center' => '-1',

				'ul_class_name' => '',
			);
			foreach($default as $k => $v) {
				$element->hikamarket_params[$k] = $v;
			}
		} else {
			$menusClass = hikamarket::get('class.menus');
			$element = $menusClass->get($cid);

			if(!empty($element->content_type) &&
!in_array($element->content_type, array('vendor'))) {
				$app = JFactory::getApplication();
				$app->enqueueMessage(JText::_('HIKAM_MENU_TYPE_NOT_SUPPORTED'),
'error');
				$url =
JRoute::_('index.php?option=com_menus&task=item.edit&id='.$cid,
false);

				$app->redirect($url);
			}

			if(!isset($element->hikamarket_params['link_to_vendor_page']))
				$element->hikamarket_params['link_to_vendor_page'] =
'1';
		}

		if(!isset($element->hikamarket_params['layout_type']))
			$element->hikamarket_params['layout_type'] =
'div';

		return $element;
	}

	public function form() {
		$cid = hikamarket::getCID('id');
		$element = $this->getMenuData($cid);

		if(!empty($cid)) {
			$task = 'edit';
			$control = 'config[menu_' . $cid . ']';

			$url =
JRoute::_('index.php?option=com_menus&task=item.edit&id='.$element->id);
			$this->toolbarJoomlaMenu = array(
				'name' => 'link',
				'icon' => 'upload',
				'alt' => JText::_('JOOMLA_MENU_OPTIONS'),
				'url' => $url
			);
		} else {
			$task = 'add';
			$control = 'config[menu_0]';
		}

		$this->assignRef('element', $element);
		$this->assignRef('control', $control);
		$this->assignTypes();

		hikamarket::setTitle(JText::_(self::name), self::icon, self::ctrl .
'&task=' . $task . '&cid[]=' . $cid);
	}

	public function options(&$params) {
		$modules = array(
			'colorType' => 'type.color',
			'listType' => 'shop.type.list',
			'contentType' => 'type.menu_content',
			'layoutType' => 'type.menu_layout',
			'orderdirType' => 'shop.type.orderdir',
			'orderType' => 'shop.type.order',
			'itemlayoutType' => 'type.itemlayout',
		);
		foreach($modules as $k => $module) {
			$element = hikamarket::get($module);
			$this->assignRef($k, $element);
			unset($element);
		}

		$this->name = str_replace('[]', '',
$params->get('name'));
		$this->id = str_replace(array('][', '[',
']'), array('_', '_', ''),
$this->name);

		$this->element = $params->get('value');
		$this->type = $params->get('type');
		$this->menu = $params->get('menu');

		$cid = $params->get('cid', 0);
		if(empty($cid) || empty($this->element)) {
			$menu = $this->getMenuData($cid);
			$this->element = $menu->hikamarket_params;
		}
	}

	public function listing() {
		$app = JFactory::getApplication();

		$pageInfo = new stdClass();
		$pageInfo->filter = new stdClass();
		$pageInfo->filter->order = new stdClass();
		$pageInfo->limit = new stdClass();
		$pageInfo->search =
$app->getUserStateFromRequest($this->paramBase.'.search',
'search', '', 'string');
		$pageInfo->filter->order->value =
$app->getUserStateFromRequest($this->paramBase.'.filter_order',
'filter_order', 'id', 'cmd');
		$pageInfo->filter->order->dir =
$app->getUserStateFromRequest($this->paramBase.'.filter_order_Dir',
'filter_order_Dir', 'desc', 'word');

		$db = JFactory::getDBO();
		$query = 'SELECT extension_id FROM ' .
hikamarket::table('extensions', false) . ' WHERE
type=\'component\' AND
element=\''.HIKAMARKET_COMPONENT.'\'';
		$db->setQuery($query, 0, 1);
		$filters = array(
			'(component_id = ' . $db->loadResult() . ' OR
(component_id = 0 AND link LIKE
\'%option='.HIKAMARKET_COMPONENT.'%\'))',
			'type = \'component\'',
			'client_id = 0',
			'published>-2'
		);

		$searchMap = array(
			'alias',
			'link',
			'name'
		);

		if(!empty($pageInfo->search)) {
			$searchVal = '\'%' .
$db->escape(HikaStringHelper::strtolower($pageInfo->search ), true) .
'%\'';
			$filters[] =  implode(' LIKE ' . $searchVal . ' OR
', $searchMap) . ' LIKE ' . $searchVal;
		}

		$order = '';
		if(!empty($pageInfo->filter->order->value))
			$order = ' ORDER BY
'.$pageInfo->filter->order->value.'
'.$pageInfo->filter->order->dir;

		if(!empty($filters)) {
			$filters = ' WHERE (' . implode(') AND (', $filters)
. ')';
		} else {
			$filters = '';
		}

		$query = ' FROM '.hikamarket::table('menu', false) .
' ' . $filters . $order;
		$db->setQuery('SELECT *' . $query);
		$rows = $db->loadObjectList();
		if(!empty($pageInfo->search))
			$rows = hikamarket::search($pageInfo->search, $rows,
'id');

		$db->setQuery('SELECT COUNT(*)' . $query);
		$pageInfo->elements = new stdClass();
		$pageInfo->elements->total = $db->loadResult();
		$pageInfo->elements->page = count($rows);

		$toggleClass = hikamarket::get('helper.toggle');
		$this->assignRef('toggleClass', $toggleClass);

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

		$unset = array();
		foreach($rows as $k => $row) {
			if(strpos($row->link, 'view=vendor') !== false &&
strpos($row->link, 'layout=listing') !== false) {
				$rows[$k]->hikamarket_params = $config->get('menu_' .
$row->id);
				$rows[$k]->hikamarket_params['content_type'] =
'vendor';
			} else {
				$unset[] = $k;
				continue;
			}
			if(empty($rows[$k]->hikamarket_params)) {
				$rows[$k]->hikamarket_params =
$shopConfig->get('default_params');
			}

			$rows[$k]->content_type =
$rows[$k]->hikamarket_params['content_type'];
		}

		foreach($unset as $u) {
			unset($rows[$u]);
		}

		$this->assignRef('rows', $rows);
		$this->assignRef('pageInfo', $pageInfo);

		hikamarket::setTitle(JText::_(self::name), self::icon, self::ctrl);

		$manage =
hikamarket::isAllowed($shopConfig->get('acl_menus_manage',
'all'));
		$this->assignRef('manage', $manage);

		$this->toolbar = array(
			array('name' => 'editList','display'
=> $manage),
			array('name' => 'deleteList', 'display'
=>
hikamarket::isAllowed($shopConfig->get('acl_menus_delete',
'all'))),
			'|',
			array('name' => 'pophelp', 'target'
=> self::ctrl.'-listing'),
			'dashboard'
		);
	}
}
modulesmarket/index.html000064400000000032151161332370011412
0ustar00<html><body></body></html>modulesmarket/tmpl/form.php000064400000033441151161332370012057
0ustar00<?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');
?><div class="iframedoc"
id="iframedoc"></div>
<?php
	$arr = array(
		JHTML::_('select.option', '-1',
JText::_('HIKA_INHERIT')),
		JHTML::_('select.option', '1',
JText::_('HIKASHOP_YES')),
		JHTML::_('select.option', '0',
JText::_('HIKASHOP_NO')),
	);
?>
<form action="<?php echo
hikamarket::completeLink('modules'); ?>"
method="POST" name="adminForm"
id="adminForm">
<?php if(!HIKASHOP_BACK_RESPONSIVE) { ?>
<div id="page-modules">
	<table style="width:100%">
		<tr>
			<td valign="top" width="50%">
<?php } else { ?>
<div id="page-modules" class="row-fluid">
	<div class="span6">
<?php } ?>
				<fieldset class="adminform">
					<legend><?php echo JText::_('HIKA_DETAILS');
?></legend>

					<table class="admintable table"
cellspacing="1">
						<tr>
							<td class="key"><?php
								echo JText::_('HIKA_TITLE');
							?></td>
							<td>
								<input class="text_area" type="text"
name="module<?php echo $this->control; ?>[title]"
id="title" size="35" value="<?php echo
$this->escape(@$this->element->title); ?>" />
							</td>
						</tr>
						<tr>
							<td class="key"><?php
								echo JText::_('SHOW_TITLE');
							?></td>
							<td><?php
								echo JHTML::_('hikaselect.booleanlist',
'module' . $this->control . '[showtitle]',
'class="inputbox"', @$this->element->showtitle);
							?></td>
						</tr>
						<tr>
							<td class="key"><?php
								echo JText::_('HIKA_PUBLISHED');
							?></td>
							<td><?php
								echo JHTML::_('hikaselect.booleanlist',
'module' . $this->control . '[published]',
'class="inputbox"', @$this->element->published);
							?></td>
						</tr>
						<tr>
							<td class="key"><?php
								echo JText::_('TYPE_OF_CONTENT');
							?></td>
							<td><?php
								if(empty($this->element->content_type) ||
$this->element->content_type != 'vendor')
									$this->element->content_type = 'vendor';
								echo
$this->contentType->display($this->control.'[content_type]',@$this->element->content_type,
$this->js, true, true);
							?></td>
						</tr>
						<tr>
							<td class="key"><?php echo
JText::_('TYPE_OF_LAYOUT'); ?></td>
							<td><?php
								if(!isset($this->element->hikamarket_params['layout_type']))
									$this->element->hikamarket_params['layout_type'] =
'inherit';
								echo
$this->layoutType->display($this->control.'[layout_type]',
@$this->element->hikamarket_params['layout_type'],
$this->js, true);
							?></td>
						</tr>
						<tr id="number_of_columns">
							<td class="key"><?php echo
JText::_('NUMBER_OF_COLUMNS');?></td>
							<td>
								<input name="<?php echo $this->control;
?>[columns]" type="text" value="<?php echo
@$this->element->hikamarket_params['columns'];?>"
/>
							</td>
						</tr>
						<tr>
							<td class="key"><?php echo
JText::_('NUMBER_OF_ITEMS'); ?></td>
							<td>
								<input name="<?php echo $this->control;
?>[limit]" type="text" value="<?php echo
@$this->element->hikamarket_params['limit'];?>"
/>
							</td>
						</tr>
						<tr>
							<td class="key"><?php echo
JText::_('RANDOM_ITEMS');?></td>
							<td><?php
								if(!isset($this->element->hikamarket_params['random']))
									$this->element->hikamarket_params['random'] =
'-1';
								echo JHTML::_('hikaselect.radiolist', $arr,
$this->control.'[random]' , '', 'value',
'text',
@$this->element->hikamarket_params['random']);
							?></td>
						</tr>
						<tr>
							<td class="key"><?php echo
JText::_('ORDERING_DIRECTION'); ?></td>
							<td><?php
								if(!isset($this->element->hikamarket_params['order_dir']))
									$this->element->hikamarket_params['order_dir'] =
'inherit';
								echo
$this->orderdirType->display($this->control.'[order_dir]',@$this->element->hikamarket_params['order_dir']);
							?></td>
						</tr>
<?php
?>
					</table>
				</fieldset>
				<fieldset data-block="options"
data-block-value="image" class="adminform">
					<legend><?php echo
JText::_('HIKAM_PARAMS_FOR_IMAGES'); ?></legend>
					<table class="admintable table" cellspacing="1"
width="100%">
						<tr>
							<td class="key"><?php echo
JText::_('IMAGE_X');?></td>
							<td>
								<input size="12" name="<?php echo
$this->control;?>[image_width]" type="text"
value="<?php echo
@$this->element->hikamarket_params['image_width'];?>"
/> px
							</td>
						</tr>
						<tr>
							<td class="key"><?php echo
JText::_('IMAGE_Y');?></td>
							<td>
								<input size="12" name="<?php echo
$this->control;?>[image_height]" type="text"
value="<?php echo
@$this->element->hikamarket_params['image_height'];?>"
/> px
							</td>
						</tr>
						<tr>
							<td class="key"><?php echo
JText::_('HIKAM_IMAGE_FORCESIZE');?></td>
							<td><?php
								if(!isset($this->element->hikamarket_params['image_forcesize']))
									$this->element->hikamarket_params['image_forcesize']
= '-1';
								echo JHTML::_('hikaselect.radiolist', $arr,
$this->control.'[image_forcesize]' , '',
'value', 'text',
@$this->element->hikamarket_params['image_forcesize']);
							?></td>
						</tr>
						<tr>
							<td class="key"><?php echo
JText::_('HIKAM_IMAGE_GRAYSCALE');?></td>
							<td><?php
								if(!isset($this->element->hikamarket_params['image_grayscale']))
									$this->element->hikamarket_params['image_grayscale']
= '-1';
								echo JHTML::_('hikaselect.radiolist', $arr,
$this->control.'[image_grayscale]' , '',
'value', 'text',
@$this->element->hikamarket_params['image_grayscale']);
							?></td>
						</tr>
						<tr>
							<td class="key"><?php echo
JText::_('HIKAM_IMAGE_SCALE');?></td>
							<td><?php
								if(!isset($this->element->hikamarket_params['image_scale']))
									$this->element->hikamarket_params['image_scale'] =
'-1';
									$scale_arr = array(
										JHTML::_('select.option', '-1',
JText::_('HIKA_INHERIT')),
										JHTML::_('select.option', '1',
JText::_('HIKAM_IMAGE_SCALE_INSIDE')),
										JHTML::_('select.option', '0',
JText::_('HIKAM_IMAGE_SCALE_OUTSIDE')),
									);
								echo JHTML::_('hikaselect.radiolist', $scale_arr,
$this->control.'[image_scale]' , '',
'value', 'text',
@$this->element->hikamarket_params['image_scale']);
							?></td>
						</tr>
						<tr>
							<td class="key"><?php echo
JText::_('HIKAM_IMAGE_RADIUS');?></td>
							<td>
								<input size="12" name="<?php echo
$this->control;?>[image_radius]" type="text"
value="<?php echo
@$this->element->hikamarket_params['image_radius'];?>"
/> px
							</td>
						</tr>
					</table>
				</fieldset>
<?php if(!HIKASHOP_BACK_RESPONSIVE) { ?>
			</td>
			<td valign="top" width="50%">
<?php } else { ?>
	</div>
	<div class="span6">
<?php } ?>
				<fieldset data-block="content"
data-block-value="vendor" class="adminform">
					<legend><?php echo JText::_('PARAMS_FOR_VENDORS');
?></legend>
					<table class="admintable table" cellspacing="1"
width="100%">
						<tr>
							<td class="key"><?php echo
JText::_('ORDERING_FIELD');?></td>
							<td><?php
								if(!isset($this->element->hikamarket_params['vendor_order']))
									$this->element->hikamarket_params['vendor_order']
= 'inherit';
								echo
$this->orderType->display($this->control.'[vendor_order]',
@$this->element->hikamarket_params['vendor_order'],
'#_hikamarket_vendor');
							?></td>
						</tr>
						<tr>
							<td class="key"><?php echo
JText::_('LINK_TO_VENDOR_PAGE');?></td>
							<td><?php
								if(!isset($this->element->hikamarket_params['link_to_vendor_page']))
									$this->element->hikamarket_params['link_to_vendor_page']
= '-1';
								echo JHTML::_('hikaselect.radiolist', $arr,
$this->control.'[link_to_vendor_page]' , '',
'value', 'text',
@$this->element->hikamarket_params['link_to_vendor_page']);
							?></td>
						</tr>
						<tr>
							<td class="key"><?php echo
JText::_('DISPLAY_VOTE'); ?></td>
							<td><?php
								if(!isset($this->element->hikamarket_params['show_vote']))
									$this->element->hikamarket_params['show_vote'] =
'-1';
								echo JHTML::_('hikaselect.radiolist',  $arr,
$this->control.'[show_vote]', '', 'value',
'text',
@$this->element->hikamarket_params['show_vote']);
							?></td>
						</tr>
<?php if(hikashop_level(2)) { ?>
							<tr>
								<td class="key"><?php echo
JText::_('DISPLAY_CUSTOM_FIELDS');?></td>
								<td><?php
									if(!isset($this->element->hikamarket_params['display_custom_fields']))
										$this->element->hikamarket_params['display_custom_fields']
= '-1';
									echo JHTML::_('hikaselect.radiolist', $arr,
$this->control.'[display_custom_fields]' , '',
'value', 'text',
@$this->element->hikamarket_params['display_custom_fields']);
								?></td>
							</tr>
<?php } ?>
					</table>
				</fieldset>
				<fieldset data-block="layout"
data-block-value="div" class="adminform">
					<legend><?php echo JText::_('PARAMS_FOR_DIV');
?></legend>
					<table class="admintable table" cellspacing="1"
width="100%">
						<tr>
							<td class="key"><?php echo
JText::_('TYPE_OF_ITEM_LAYOUT');?></td>
							<td><?php
								if(!isset($this->element->hikamarket_params['div_item_layout_type']))
									$this->element->hikamarket_params['div_item_layout_type']
= 'inherit';
								echo
$this->itemlayoutType->display($this->control.'[div_item_layout_type]',
@$this->element->hikamarket_params['div_item_layout_type'],
$this->js, 'adminForm');
							?></td>
						</tr>
						<tr>
							<td class="key"><?php echo
JText::_('PANE_HEIGHT');?></td>
							<td>
								<input size="12" name="<?php echo
$this->control;?>[pane_height]" type="text"
value="<?php echo
@$this->element->hikamarket_params['pane_height'];?>"
/> px
							</td>
						</tr>
						<tr>
							<td class="key"><?php echo
JText::_('ITEM_BOX_COLOR');?></td>
							<td><?php
								echo
$this->colorType->displayAll('',$this->control.'[background_color]',@$this->element->hikamarket_params['background_color']);
							?></td>
						</tr>
						<tr>
							<td class="key"><?php echo
JText::_('ITEM_BOX_MARGIN');?></td>
							<td>
								<input name="<?php echo
$this->control;?>[margin]" type="text"
value="<?php echo
@$this->element->hikamarket_params['margin'];?>"
/> px
							</td>
						</tr>
						<tr>
							<td class="key"><?php echo
JText::_('ITEM_BOX_BORDER');?></td>
							<td><?php
								if(!isset($this->element->hikamarket_params['border_visible']))
									$this->element->hikamarket_params['border_visible']
= '-1';
								$arr2 = $arr;
								$arr2[] = JHTML::_('select.option', 2,
JText::_('THUMBNAIL'));
								echo JHTML::_('hikaselect.radiolist', $arr2,
$this->control.'[border_visible]' , '',
'value', 'text',
@$this->element->hikamarket_params['border_visible']);
							?></td>
						</tr>
						<tr>
							<td class="key"><?php echo
JText::_('ITEM_BOX_ROUND_CORNER');?></td>
							<td><?php
								if(!isset($this->element->hikamarket_params['rounded_corners']))
									$this->element->hikamarket_params['rounded_corners']
= '-1';
								echo JHTML::_('hikaselect.radiolist', $arr,
$this->control.'[rounded_corners]' , '',
'value', 'text',
@$this->element->hikamarket_params['rounded_corners']);
							?></td>
						</tr>
						<tr>
							<td class="key"><?php echo
JText::_('TEXT_CENTERED');?></td>
							<td><?php
								if(!isset($this->element->hikamarket_params['text_center']))
									$this->element->hikamarket_params['text_center'] =
'-1';
								echo JHTML::_('hikaselect.radiolist', $arr,
$this->control.'[text_center]' , '',
'value', 'text',
@$this->element->hikamarket_params['text_center']);
							?></td>
						</tr>
					</table>
				</fieldset>
				<fieldset data-block="layout"
data-block-value="list" class="adminform">
					<legend><?php echo JText::_('PARAMS_FOR_LIST');
?></legend>
					<table class="admintable table" cellspacing="1"
width="100%">
						<tr>
							<td class="key"><?php echo
JText::_('UL_CLASS_NAME');?></td>
							<td>
								<input name="<?php echo
$this->control;?>[ul_class_name]" type="text"
value="<?php echo
@$this->element->hikamarket_params['ul_class_name'];?>"
/>
							</td>
						</tr>
					</table>
				</fieldset>
<?php if(!HIKASHOP_BACK_RESPONSIVE) { ?>
			</td>
		</tr>
	</table>
</div>
<?php } else { ?>
	</div>
</div>
<?php } ?>
	<div class="clr"></div>

	<input type="hidden" name="option"
value="<?php echo HIKAMARKET_COMPONENT; ?>" />
	<input type="hidden" name="cid"
value="<?php echo (int)@$this->element->id; ?>"
/>
	<input type="hidden" name="module[id]"
value="<?php echo (int)@$this->element->id; ?>"
/>
	<input type="hidden" name="module[module]"
value="<?php echo $this->element->module; ?>" />
	<input type="hidden" name="task" value=""
/>
	<input type="hidden" name="ctrl"
value="<?php echo
hikaInput::get()->getCmd('ctrl');?>" />
	<input type="hidden" name="return"
value="<?php echo
hikaInput::get()->getString('return');?>" />
	<input type="hidden" name="client"
value="0" />
	<?php echo JHTML::_('form.token');?>
</form>

<script type="text/javascript">
if(!window.localPage)
	window.localPage = {};
window.localPage.switchPanel = function(id, name, type) {
	var d = document, el = null;
	if(type == 'layout') {
		el = d.getElementById('number_of_columns');
		if(el)
			el.style.display = (name == 'table') ? 'none' :
'';
	}
	var container = d.getElementById('adminForm');
	var elements = container.getElementsByTagName("fieldset");
	for(var j = elements.length - 1; j >= 0; j--) {
		e = elements[j];
		if(e.nodeType && e.getAttribute &&
e.getAttribute('data-block') == type)
			e.style.display = (e.getAttribute('data-block-value') == name)
? '' : 'none';
	}
};
<?php echo $this->js; ?>
</script>
modulesmarket/tmpl/index.html000064400000000032151161332370012366
0ustar00<html><body></body></html>modulesmarket/tmpl/listing.php000064400000006552151161332370012570
0ustar00<?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');
?><div class="iframedoc"
id="iframedoc"></div>
<form action="<?php echo
hikamarket::completeLink('modules'); ?>"
method="post" name="adminForm"
id="adminForm">
	<table>
		<tr>
			<td width="100%">
				<?php echo JText::_('FILTER'); ?>:
				<input type="text" name="search"
id="search" value="<?php echo
$this->escape($this->pageInfo->search);?>"
class="text_area"/>
				<button class="btn"
onclick="this.form.submit();"><?php echo
JText::_('GO'); ?></button>
				<button class="btn"
onclick="document.getElementById('search').value='';this.form.submit();"><?php
echo JText::_('RESET'); ?></button>
			</td>
		</tr>
	</table>
	<table class="adminlist table table-striped table-hover"
cellpadding="1">
		<thead>
			<tr>
				<th class="title titlenum"><?php
					echo JText::_( 'HIKA_NUM' );
				?></th>
				<th class="title titlebox">
					<input type="checkbox" name="toggle"
value="" onclick="hikashop.checkAll(this);" />
				</th>
				<th class="title"><?php
					echo JHTML::_('grid.sort', JText::_('HIKA_NAME'),
'title',
$this->pageInfo->filter->order->dir,$this->pageInfo->filter->order->value
);
				?></th>
				<th class="title titletoggle"><?php
					echo JText::_('HIKA_ENABLED'); ?></th>
				<th class="title titleid"><?php
					echo JHTML::_('grid.sort', JText::_( 'ID' ),
'id',
$this->pageInfo->filter->order->dir,$this->pageInfo->filter->order->value
);
				?></th>
			</tr>
		</thead>
		<tfoot>
			<tr>
				<td colspan="5">
					<?php echo $this->pagination->getListFooter(); ?>
					<?php echo $this->pagination->getResultsCounter(); ?>
				</td>
			</tr>
		</tfoot>
		<tbody>
<?php
$k = 0;
foreach($this->rows as $i => $row) {
	$publishedid = 'published-' . $row->id;
?>
			<tr class="row<?php echo $k; ?>">
				<td align="center"><?php
					echo $i + 1;
				?></td>
				<td align="center"><?php
					echo JHTML::_('grid.id', $i, $row->id);
				?></td>
				<td><?php
					if($this->manage){
						?><a href="<?php echo
hikamarket::completeLink('modules&task=edit&cid[]=' .
$row->id);?>"><?php
					}
					echo $row->title;
					if($this->manage){
						?></a><?php
					}
				?></td>
				<td align="center"><?php
					if($this->manage){
						?><span id="<?php echo $publishedid ?>"
class="loading"><?php echo
$this->toggleClass->toggle($publishedid, $row->published,
'modules'); ?></span><?php
					}else{
						echo $this->toggleClass->display('activate',
$row->published);
					}
				?></td>
				<td align="center"><?php
					echo $row->id;
				?></td>
			</tr>
<?php
	$k = 1-$k;
}
?>
		</tbody>
	</table>
	<input type="hidden" name="option"
value="<?php echo HIKAMARKET_COMPONENT; ?>" />
	<input type="hidden" name="task" value=""
/>
	<input type="hidden" name="ctrl"
value="<?php echo hikaInput::get()->getCmd('ctrl');
?>" />
	<input type="hidden" name="boxchecked"
value="0" />
	<input type="hidden" name="filter_order"
value="<?php echo
$this->pageInfo->filter->order->value; ?>" />
	<input type="hidden" name="filter_order_Dir"
value="<?php echo $this->pageInfo->filter->order->dir;
?>" />
	<?php echo JHTML::_( 'form.token' ); ?>
</form>
modulesmarket/tmpl/options.php000064400000021475151161332370012613
0ustar00<?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
$arr = array(
	JHTML::_('select.option', '-1',
JText::_('HIKA_INHERIT')),
	JHTML::_('select.option', '1',
JText::_('HIKASHOP_YES')),
	JHTML::_('select.option', '0',
JText::_('HIKASHOP_NO')),
);
?>
<div id="<?php echo $this->id; ?>">
<div class="hkc-xl-4 hkc-lg-6">

<h3><?php echo JText::_('HIKA_DETAILS');
?></h3>
<dl class="hikam_options large">
	<dt><?php
		echo JText::_('TYPE_OF_CONTENT');
	?></dt>
	<dd><?php
		echo
$this->contentType->display($this->name.'[content_type]',
@$this->element['content_type'], $this->js, true,
$this->id);
	?></dd>

	<dt><?php
		echo JText::_('TYPE_OF_LAYOUT');
	?></dt>
	<dd><?php
		if(!isset($this->element['layout_type']))
			$this->element['layout_type'] = 'inherit';
		echo
$this->layoutType->display($this->name.'[layout_type]',
@$this->element['layout_type'], $this->js, $this->id);
	?></dd>

	<dt id="<?php echo $this->id;
?>_columns"><?php
		echo JText::_('NUMBER_OF_COLUMNS');
	?></dt>
	<dd id="<?php echo $this->id; ?>_columns_0">
		<input name="<?php echo $this->name; ?>[columns]"
type="text" value="<?php echo
@$this->element['columns'];?>" />
	</dd>

	<dt><?php
		echo JText::_('NUMBER_OF_ITEMS');
	?></dt>
	<dd>
		<input name="<?php echo $this->name; ?>[limit]"
type="text" value="<?php echo
@$this->element['limit'];?>" />
	</dd>

	<dt><?php
		echo JText::_('RANDOM_ITEMS');
	?></dt>
	<dd><?php
		if(!isset($this->element['random']))
			$this->element['random'] = '-1';
		echo JHTML::_('hikaselect.radiolist', $arr,
$this->name.'[random]' , '', 'value',
'text', @$this->element['random']);
	?></dd>
</dl>
</div>

<div class="hkc-xl-4 hkc-lg-6">
<h3><?php echo JText::_('HIKAM_PARAMS_FOR_IMAGES');
?></h3>
<dl class="hikam_options large">
	<dt><?php echo JText::_('IMAGE_X');?></dt>
	<dd>
		<input size="12" name="<?php echo $this->name;
?>[image_width]" type="text" value="<?php echo
@$this->element['image_width'];?>" /> px
	</dd>

	<dt><?php echo JText::_('IMAGE_Y');?></dt>
	<dd>
		<input size="12" name="<?php echo $this->name;
?>[image_height]" type="text" value="<?php echo
@$this->element['image_height'];?>" /> px
	</dd>

	<dt><?php echo
JText::_('HIKAM_IMAGE_FORCESIZE');?></dt>
	<dd><?php
		if(!isset($this->element['image_forcesize']))
			$this->element['image_forcesize'] = '-1';
		echo JHTML::_('hikaselect.radiolist', $arr,
$this->name.'[image_forcesize]' , '',
'value', 'text',
@$this->element['image_forcesize']);
	?></dd>

	<dt><?php echo
JText::_('HIKAM_IMAGE_GRAYSCALE');?></dt>
	<dd><?php
		if(!isset($this->element['image_grayscale']))
			$this->element['image_grayscale'] = '-1';
		echo JHTML::_('hikaselect.radiolist', $arr,
$this->name.'[image_grayscale]' , '',
'value', 'text',
@$this->element['image_grayscale']);
	?></dd>

	<dt><?php echo
JText::_('HIKAM_IMAGE_SCALE');?></dt>
	<dd><?php
		if(!isset($this->element['image_scale']))
			$this->element['image_scale'] = '-1';
			$scale_arr = array(
				JHTML::_('select.option', '-1',
JText::_('HIKA_INHERIT')),
				JHTML::_('select.option', '1',
JText::_('HIKAM_IMAGE_SCALE_INSIDE')),
				JHTML::_('select.option', '0',
JText::_('HIKAM_IMAGE_SCALE_OUTSIDE')),
			);
		echo JHTML::_('hikaselect.radiolist', $scale_arr,
$this->name.'[image_scale]' , '', 'value',
'text', @$this->element['image_scale']);
	?></dd>

	<dt><?php echo
JText::_('HIKAM_IMAGE_RADIUS');?></dt>
	<dd>
		<input size="12" name="<?php echo $this->name;
?>[image_radius]" type="text" value="<?php echo
@$this->element['image_radius'];?>" /> px
	</dd>
</dl>
</div>

<div class="hkc-lg-clear"></div>

<div class="hkc-xl-4 hkc-lg-6" data-block="content"
data-block-value="vendor">
<h3><?php echo JText::_('PARAMS_FOR_VENDORS');
?></h3>
<dl class="hikam_options large">
	<dt><?php echo
JText::_('ORDERING_FIELD');?></dt>
	<dd><?php
		if(!isset($this->element['vendor_order']))
			$this->element['vendor_order'] = 'inherit';
		echo
$this->orderType->display($this->name.'[vendor_order]',
@$this->element['vendor_order'],
'#_hikamarket_vendor');
	?></dd>
	<dt><?php
		echo JText::_('ORDERING_DIRECTION');
	?></dt>
	<dd><?php
		if(!isset($this->element['vendor_order_dir']))
			$this->element['vendor_order_dir'] = 'inherit';
		echo
$this->orderdirType->display($this->name.'[vendor_order_dir]',
@$this->element['vendor_order_dir']);
	?></dd>

	<dt><?php echo
JText::_('LINK_TO_VENDOR_PAGE');?></dt>
	<dd><?php
		if(!isset($this->element['link_to_vendor_page']))
			$this->element['link_to_vendor_page'] = '-1';
		echo JHTML::_('hikaselect.radiolist', $arr,
$this->name.'[link_to_vendor_page]' , '',
'value', 'text',
@$this->element['link_to_vendor_page']);
	?></dd>

	<dt><?php echo
JText::_('DISPLAY_VOTE');?></dt>
	<dd><?php
		if(!isset($this->element['show_vote']))
			$this->element['show_vote'] = '-1';
		echo JHTML::_('hikaselect.radiolist',  $arr,
$this->name.'[show_vote]', '', 'value',
'text', @$this->element['show_vote']);
	?></dd>

<?php if(hikashop_level(2)) { ?>
	<dt><?php echo
JText::_('DISPLAY_CUSTOM_FIELDS');?></dt>
	<dd><?php
		if(!isset($this->element['display_custom_fields']))
			$this->element['display_custom_fields'] = '-1';
		echo JHTML::_('hikaselect.radiolist', $arr,
$this->name.'[display_custom_fields]' , '',
'value', 'text',
@$this->element['display_custom_fields']);
	?></dd>
<?php } ?>
</dl>
</div>

<div class="hkc-xl-clear"></div>

<div class="hkc-xl-4 hkc-lg-6" data-block="layout"
data-block-value="div">
<h3><?php echo JText::_('PARAMS_FOR_DIV');
?></h3>
<dl class="hikam_options large">

	<dt><?php echo
JText::_('TYPE_OF_ITEM_LAYOUT');?></dt>
	<dd><?php
		if(!isset($this->element['div_item_layout_type']))
			$this->element['div_item_layout_type'] =
'inherit';
		echo
$this->itemlayoutType->display($this->name.'[div_item_layout_type]',
@$this->element['div_item_layout_type'], $this->js,
'');
	?></dd>

	<dt><?php echo
JText::_('PANE_HEIGHT');?></dt>
	<dd>
		<input size="12" name="<?php echo $this->name;
?>[pane_height]" type="text" value="<?php echo
@$this->element['pane_height'];?>" /> px
	</dd>

	<dt><?php echo
JText::_('ITEM_BOX_COLOR');?></dt>
	<dd><?php
		echo $this->colorType->displayAll('',
$this->name.'[background_color]',
@$this->element['background_color']);
	?></dd>

	<dt><?php echo
JText::_('ITEM_BOX_MARGIN');?></dt>
	<dd>
		<input name="<?php echo $this->name; ?>[margin]"
type="text" value="<?php echo
@$this->element['margin'];?>" /> px
	</dd>

	<dt><?php echo
JText::_('ITEM_BOX_BORDER');?></dt>
	<dd><?php
		if(!isset($this->element['border_visible']))
			$this->element['border_visible'] = '-1';
		$arr2 = $arr;
		$arr2[] = JHTML::_('select.option', 2,
JText::_('THUMBNAIL'));
		echo JHTML::_('hikaselect.radiolist', $arr2,
$this->name.'[border_visible]' , '',
'value', 'text',
@$this->element['border_visible']);
	?></dd>

	<dt><?php echo
JText::_('ITEM_BOX_ROUND_CORNER');?></dt>
	<dd><?php
		if(!isset($this->element['rounded_corners']))
			$this->element['rounded_corners'] = '-1';
		echo JHTML::_('hikaselect.radiolist', $arr,
$this->name.'[rounded_corners]' , '',
'value', 'text',
@$this->element['rounded_corners']);
	?></dd>

	<dt><?php echo
JText::_('TEXT_CENTERED');?></dt>
	<dd><?php
		if(!isset($this->element['text_center']))
			$this->element['text_center'] = '-1';
		echo JHTML::_('hikaselect.radiolist', $arr,
$this->name.'[text_center]' , '', 'value',
'text', @$this->element['text_center']);
	?></dd>

</dl>
</div>

<div class="hkc-lg-clear"></div>

<div class="hkc-xl-4 hkc-lg-6" data-block="layout"
data-block-value="list">
<h3><?php echo JText::_('PARAMS_FOR_LIST');
?></h3>
<dl class="hikam_options large">
	<dt><?php echo
JText::_('UL_CLASS_NAME');?></dt>
	<dd>
		<input name="<?php echo $this->name;
?>[ul_class_name]" type="text" value="<?php echo
@$this->element['ul_class_name'];?>" />
	</dd>
</dl>
</div>

<div style="clear:both"></div>
</div>

<script type="text/javascript">
if(!window.localPage)
	window.localPage = {};
window.localPage.switchPanel = function(id, name, type) {
	var d = document, el = null;
	if(type == 'layout') {
		el = d.getElementById(id + '_columns');
		if(el) {
			var v = (name == 'table') ? 'none' : '';
			el.style.display = v;
			el = d.getElementById(id + '_columns_0');
			if(el)
				el.style.display = v;
		}
	}
	var container = d.getElementById(id);
	if(!container)
		return;
	for(var j = container.childNodes.length - 1; j >= 0; j--) {
		e = container.childNodes[j];
		if(e.nodeType && e.getAttribute &&
e.getAttribute('data-block') == type)
			e.style.display = (e.getAttribute('data-block-value') == name)
? '' : 'none';
	}
};
<?php echo $this->js; ?>
</script>
modulesmarket/view.html.php000064400000015137151161332370012057
0ustar00<?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 modulesmarketViewmodulesmarket extends hikamarketView {

	const ctrl = 'modules';
	const name = 'MODULE';
	const icon = 'module';

	public function display($tpl = null, $params = null) {
		$this->paramBase = HIKAMARKET_COMPONENT . '.' .
$this->getName();
		$fct = $this->getLayout();
		if(method_exists($this, $fct)) {
			if($this->$fct($params) === false)
				return false;
		}
		parent::display($tpl);
	}

	private function assignTypes() {
		JHTML::_('behavior.modal');

		$modules = array(
			'colorType' => 'type.color',
			'listType' => 'shop.type.list',
			'contentType' => 'type.menu_content',
			'layoutType' => 'type.menu_layout',
			'orderdirType' => 'shop.type.orderdir',
			'orderType' => 'shop.type.order',
			'itemlayoutType' => 'type.itemlayout',
			'popup' => 'shop.helper.popup',
		);
		foreach($modules as $k => $module) {
			$element = hikamarket::get($module);
			$this->assignRef($k, $element);
			unset($element);
		}

		$this->toolbar = array(
			'save',
			'apply',
			'cancel',
			'|',
			array('name' => 'pophelp', 'target'
=> self::ctrl.'-form')
		);
		if(!empty($this->toolbarJoomlaMenu)) {
			array_unshift($this->toolbar, '|');
			array_unshift($this->toolbar, $this->toolbarJoomlaMenu);
		}
	}

	protected function getModuleData($cid) {
		$config = hikamarket::config();
		$shopConfig = hikamarket::config(false);

		if(empty($cid)) {
			$element = new stdClass();
			$element->id = 0;
			$element->module = 'mod_hikamarket';
			$element->hikamarket_params =
$shopConfig->get('default_params');
			$default = array(
				'content_type' => 'vendor',
				'link_to_vendor_page' => '1',
				'border_visible' => true,

				'layout_type' => 'inherit',
				'columns' => '',
				'limit' => '',
				'random' => '-1',
				'order_dir' => 'inherit',
				'filter_type' => 2,

				'vendor_order' => 'inherit',
				'show_vote' => '-1',

				'div_item_layout_type' => 'inherit',
				'background_color' => '',
				'margin' => '',
				'border_visible' => '-1',
				'rounded_corners' => '-1',
				'text_center' => '-1',

				'ul_class_name' => '',
			);
			foreach($default as $k => $v) {
				$element->hikamarket_params[$k] = $v;
			}
		} else {
			$modulesClass = hikamarket::get('class.modules');
			$element = $modulesClass->get($cid);

			if(!empty($element->content_type) &&
!in_array($element->content_type, array('vendor'))) {
				$app = JFactory::getApplication();
				$app->enqueueMessage(JText::_('HIKAM_MENU_TYPE_NOT_SUPPORTED'),
'error');
				$url =
JRoute::_('index.php?option=com_modules&task=module.edit&id='.$cid,
false);
				$app->redirect($url);
			}

			if(!isset($element->hikamarket_params['link_to_vendor_page']))
				$element->hikamarket_params['link_to_vendor_page'] =
'1';
		}

		if(!isset($element->hikamarket_params['layout_type']))
			$element->hikamarket_params['layout_type'] =
'div';

		$element->hikamarket_params['content_type'] =
'vendor';

		return $element;
	}

	public function form() {
		$cid = hikamarket::getCID('id');
		$element = $this->getModuleData($cid);

		if(!empty($cid)) {
			$task = 'edit';
			$control = 'config[params_' . $cid . ']';

			$url =
JRoute::_('index.php?option=com_modules&task=module.edit&id='.$element->id);
			$this->toolbarJoomlaMenu = array(
				'name' => 'link',
				'icon' => 'upload',
				'alt' => JText::_('JOOMLA_MODULE_OPTIONS'),
				'url' => $url
			);
		} else {
			$task = 'add';
			$control = 'config[params_0]';
		}

		$this->assignRef('element', $element);
		$this->assignRef('control', $control);
		$this->assignTypes();

		hikamarket::setTitle(JText::_(self::name), self::icon, self::ctrl .
'&task=' . $task . '&cid[]=' . $cid);
	}

	public function options(&$params) {
		$modules = array(
			'colorType' => 'type.color',
			'listType' => 'shop.type.list',
			'contentType' => 'type.menu_content',
			'layoutType' => 'type.menu_layout',
			'orderdirType' => 'shop.type.orderdir',
			'orderType' => 'shop.type.order',
			'itemlayoutType' => 'type.itemlayout',
		);
		foreach($modules as $k => $module) {
			$element = hikamarket::get($module);
			$this->assignRef($k, $element);
			unset($element);
		}

		$this->name = str_replace('[]', '',
$params->get('name'));
		$this->id = str_replace(array('][', '[',
']'), array('_', '_', ''),
$this->name);

		$this->element = $params->get('value');
		$this->type = $params->get('type');
		$this->menu = $params->get('menu');

		$cid = $params->get('cid', 0);
		if(empty($cid) || empty($this->element)) {
			$menu = $this->getModuleData($cid);
			$this->element = $menu->hikamarket_params;
		}
	}

	public function listing() {
		$app = JFactory::getApplication();
		$db = JFactory::getDBO();
		hikamarket::setTitle(JText::_(self::name), self::icon, self::ctrl);

		$cfg = array(
			'table' => 'joomla.modules',
			'main_key' => 'module_id',
			'order_sql_value' => 'a.id'
		);

		$pageInfo = $this->getPageInfo($cfg['order_sql_value']);

		$filters = array(
			'module = \'mod_hikamarket\'',
			'published >= 0'
		);
		$searchMap = array(
			'module',
			'title'
		);
		$order = '';

		$this->processFilters($filters, $order, $searchMap);

		$query = 'FROM
'.hikamarket::table($cfg['table']).' AS a
'.$filters.$order;
		$db->setQuery('SELECT * '.$query,
(int)$pageInfo->limit->start, (int)$pageInfo->limit->value);

		$rows = $db->loadObjectList();
		$this->assignRef('rows', $rows);

		$db->setQuery('SELECT COUNT(*) '.$query);
		$pageInfo->elements = new stdClass();
		$pageInfo->elements->total = $db->loadResult();
		$pageInfo->elements->page = count($rows);

		$toggleClass = hikamarket::get('helper.toggle');
		$this->assignRef('toggleClass', $toggleClass);

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

		$manage =
hikamarket::isAllowed($shopConfig->get('acl_modules_manage',
'all'));
		$this->assignRef('manage', $manage);

		$this->toolbar = array(
			array('name' => 'addNew', 'display'
=> !HIKASHOP_J30 && $manage),
			array('name' => 'editList','display'
=> $manage),
			array('name' => 'deleteList', 'display'
=>
hikamarket::isAllowed($shopConfig->get('acl_modules_delete',
'all'))),
			'|',
			array('name' => 'pophelp', 'target'
=> self::ctrl.'-listing'),
			'dashboard'
		);

		$this->getPagination();
		$this->getOrdering('a.ordering');
	}
}
ordermarket/index.html000064400000000032151161332370011055
0ustar00<html><body></body></html>ordermarket/tmpl/index.html000064400000000032151161332370012031
0ustar00<html><body></body></html>ordermarket/tmpl/show_order_back_show.php000064400000007561151161332370014756
0ustar00<?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
if(empty($this->ajax)) {
?>
<fieldset class="adminform"
id="hikashop_order_field_market" style="<?php
if(empty($this->data)) { echo 'display:none;'; }
?>">
<?php
}
if(!empty($this->data)) {
?>
	<legend><?php echo
JText::_('HIKAMARKET_ORDERS')?></legend>
	<table style="width:100%;cell-spacing:1px;"
class="adminlist table table-striped">
		<thead>
			<tr>
				<th><?php echo
JText::_('ORDER_NUMBER');?></th>
				<th><?php echo
JText::_('HIKA_VENDOR');?></th>
				<th><?php echo
JText::_('ORDER_STATUS');?></th>
				<th><?php echo
JText::_('HIKASHOP_TOTAL');?></th>
				<th><?php echo
JText::_('VENDOR_TOTAL');?></th>
				<th style="width:1%"><?php echo
JText::_('VENDOR_PAID');?></th>
			</tr>
		</thead>
		<tbody>
<?php
	foreach($this->data as $data) {
		$vendor_id = (int)$data->order_vendor_id;
		if(empty($vendor_id)) $vendor_id = 1;
		$paid = !empty($this->vendor_transactions[$vendor_id]) ? true :
(int)$data->order_vendor_paid;
		if(!empty($this->vendor_transactions[ $vendor_id ])) {
			foreach($this->vendor_transactions[ $vendor_id ] as $transaction) {
				if(isset($transaction->order_transaction_paid) &&
empty($transaction->order_transaction_paid))
					$paid = false;
			}
		}
?>
			<tr>
				<td>
					<a href="<?php echo
hikamarket::completeLink('shop.order&task=edit&cid='.(int)$data->order_id);?>"><?php
echo $data->order_number;?></a>
					/ <?php echo !empty($data->order_invoice_number) ?
$data->order_invoice_number : ' -'; ?>
				</td>
				<td><a href="<?php echo
hikamarket::completeLink('vendor&task=edit&cid='.(int)$data->order_vendor_id);?>"><?php
echo $this->escape($data->vendor_name); ?></a></td>
				<td><?php echo
hikamarket::orderStatus($data->order_status); ?></td>
				<td><?php echo
$this->currencyHelper->format($data->order_full_price,
$data->order_currency_id);?></td>
				<td><?php
					echo $this->currencyHelper->format($data->order_vendor_price,
$data->order_currency_id);
					if(isset($data->order_vendor_price_with_refunds) &&
$data->order_vendor_price_with_refunds !== null) {
						echo ' (' .
$this->currencyHelper->format($data->order_vendor_price_with_refunds,
$data->order_currency_id) . ')';
					}
				?></td>
				<td style="text-align:center"><?php
					if($paid)
						echo '<i class="fa fa-check"></i>';
				?></td>
			</tr>
<?php
		if(!empty($this->vendor_transactions[ $vendor_id ])) {
			foreach($this->vendor_transactions[ $vendor_id ] as $transaction) {
?>
			<tr>
				<td><em><?php echo
JText::_('VENDOR_TRANSACTION'); ?></em></td>
				<td><?php echo $this->escape($data->vendor_name);
?></td>
				<td><?php echo
hikamarket::orderStatus($transaction->order_transaction_status);
?></td>
				<td></td>
				<td><?php
					echo
$this->currencyHelper->format($transaction->order_transaction_price,
$transaction->order_transaction_currency_id);
				?></td>
				<td style="text-align:center"><?php
					if(!empty($transaction->order_transaction_paid))
						echo '<i class="fa fa-check"></i>';
				?></td>
			</tr>
<?php
			}
		}
	}
?>
		</tbody>
	</table>
<?php
	if(!empty($this->ajax)) {
?>
<script type="text/javascript">
var el = document.getElementById('hikashop_order_field_market');
if(el) el.style.display = '';
</script>
<?php
	}
}

if(empty($this->ajax)) {
?>
</fieldset>
<script type="text/javascript">
window.Oby.registerAjax('hikashop.order_update', function(params)
{
	if(params.el === undefined) return;
	window.Oby.xRequest("<?php echo
hikamarket::completeLink('order&task=show&cid='.$this->order_id,
true, false, true); ?>", {update:
'hikashop_order_field_market'});
});
</script>
<?php
}
ordermarket/view.html.php000064400000004601151161332370011514
0ustar00<?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 ordermarketViewOrdermarket extends hikamarketView {

	const ctrl = 'order';
	const name = 'HIKAMARKET_ORDERMARKET';
	const icon = 'generic';

	public function display($tpl = null, $params = null) {
		$this->paramBase =
HIKAMARKET_COMPONENT.'.'.$this->getName();
		$fct = $this->getLayout();
		if(method_exists($this, $fct))
			$this->$fct($params);
		parent::display($tpl);
	}

	public function show_order_back_show($params = null) {
		$app = JFactory::getApplication();
		$db = JFactory::getDBO();

		$config = hikamarket::config();
		$this->assignRef('config', $config);

		$currencyHelper = hikamarket::get('shop.class.currency');
		$this->assignRef('currencyHelper', $currencyHelper);

		$data = null;
		$vendor_transactions = array();
		$order_id = 0;

		if(!empty($params)) {
			$order_id = (int)$params->get('order_id');
		} else {
			$order_id = hikamarket::getCID('order_id');
		}

		$ajax = (hikaInput::get()->getCmd('tmpl', '') ==
'component');

		$this->assignRef('data', $data);
		$this->assignRef('vendor_transactions',
$vendor_transactions);
		$this->assignRef('order_id', $order_id);
		$this->assignRef('ajax', $ajax);

		if($order_id <= 0)
			return;

		$query = 'SELECT b.*, a.* '.
			' FROM ' . hikamarket::table('shop.order') . '
AS a '.
			' LEFT JOIN ' . hikamarket::table('vendor') . '
AS b ON a.order_vendor_id = b.vendor_id '.
			' WHERE a.order_parent_id = ' . $order_id . ' '.
			' ORDER BY b.vendor_id ASC, a.order_id ASC';
		$db->setQuery($query);
		$data = $db->loadObjectList();

		$query = 'SELECT t.* '.
			' FROM ' . hikamarket::table('order_transaction') .
' AS t '.
			' WHERE t.order_id = ' . $order_id . '';
		$db->setQuery($query);
		$transactions =
$db->loadObjectList('order_transaction_id');


		foreach($transactions as $k => $t) {
			$vendor_id = isset($t->vendor_id) ? (int)$t->vendor_id :
(int)@$t->order_vendor_id;
			if(empty($vendor_id))
				$vendor_id = 1;

			if(empty($vendor_transactions[$vendor_id]))
				$vendor_transactions[$vendor_id] = array();
			$vendor_transactions[ $vendor_id ][ $k ] = $t;
		}
	}
}
pluginsmarket/index.html000064400000000032151161332370011423
0ustar00<html><body></body></html>pluginsmarket/tmpl/form.php000064400000006674151161332370012100
0ustar00<?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');
?><div class="iframedoc"
id="iframedoc"></div>
<div>
	<form action="<?php echo
hikamarket::completeLink('plugins'); ?>"
method="post" name="adminForm" id="adminForm"
enctype="multipart/form-data">
<?php
	if(!empty($this->plugin->pluginView)) {
		$this->setLayout($this->plugin->pluginView);
		echo $this->loadTemplate();
	} else if(empty($this->plugin->noForm)) {
		$type = $this->plugin_type;
		$upType = strtoupper($type);
		$plugin_name = $type . '_name';
		$plugin_name_input = $plugin_name . '_input';
		$plugin_images = $type . '_images';
?>
<input type="hidden" name="subtask"
value="<?php echo
hikaInput::get()->getCmd('subtask','');?>"/>
<?php if(!HIKASHOP_BACK_RESPONSIVE) { ?>
<table class="admintable table"
style="width:100%">
	<tr>
		<td style="width:50%;vertical-align:top">
<?php } else { ?>
<div class="row-fluid">
	<div class="span6">
<?php } ?>
			<fieldset class="adminform">
				<legend><?php echo JText::_('MAIN_INFORMATION');
?></legend>
				<table class="admintable">
<?php if($this->multiple_plugin) { ?>
					<tr>
						<td class="key"><label for="data[<?php
echo $type;?>][<?php echo $type;?>_name]"><?php echo
JText::_('HIKA_NAME');?></label></td>
						<td>
							<input type="text" name="data[<?php echo
$type;?>][<?php echo $type;?>_name]" value="<?php $n
= $type.'_name'; echo @$this->element->$n;
?>"/>
						</td>
					</tr>
					<tr>
						<td class="key"><label for="data[<?php
echo $type;?>][<?php echo $type;?>_published]"><?php
echo JText::_('HIKA_PUBLISHED');?></label></td>
						<td>
							<?php $n = $type.'_published'; echo
JHTML::_('hikaselect.booleanlist',
'data['.$type.']['.$type.'_published]' ,
'', @$this->element->$n); ?>
						</td>
					</tr>
<?php } else { ?>
					<tr>
						<td class="key"><label for="data[<?php
echo $type;?>][<?php echo $type;?>_name]"><?php echo
JText::_('HIKA_NAME');?></label></td>
						<td><?php echo $this->plugin_name; ?><input
type="hidden" name="data[<?php echo $type;?>][<?php
echo $type; ?>_published]" value="1"/>
						</td>
					</tr>
<?php } ?>
				</table>
			</fieldset>
<?php if(!HIKASHOP_BACK_RESPONSIVE) { ?>
		</td>
		<td style="vertical-align:top">
<?php } else { ?>
	</div>
	<div class="span6">
<?php } ?>
			<fieldset>
				<legend><?php echo JText::_('PLUGIN_PARAMETERS');
?></legend>
<?php echo $this->content; ?>
			</fieldset>
<?php if(!HIKASHOP_BACK_RESPONSIVE) { ?>
		</td>
	</tr>
</table>
<?php } else { ?>
	</div>
</div>
<?php } ?>
		<input type="hidden" name="data[<?php echo
$type;?>][<?php echo $type;?>_id]" value="<?php $n =
$type.'_id'; echo @$this->element->$n;?>"/>
		<input type="hidden" name="data[<?php echo
$type;?>][<?php echo $type;?>_type]" value="<?php
echo $this->name;?>"/>
		<input type="hidden" name="task"
value="save"/>
<?php
	} else {
		echo $this->content;
	}
?>
		<input type="hidden" name="name"
value="<?php echo $this->name;?>"/>
		<input type="hidden" name="ctrl"
value="plugins" />
		<input type="hidden" name="plugin_type"
value="<?php echo $this->plugin_type;?>" />
		<input type="hidden" name="option"
value="<?php echo HIKAMARKET_COMPONENT; ?>" />
		<?php echo JHTML::_( 'form.token' ); ?>
	</form>
</div>
pluginsmarket/tmpl/index.html000064400000000032151161332370012377
0ustar00<html><body></body></html>pluginsmarket/tmpl/listing.php000064400000003064151161332370012574
0ustar00<?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');
?><div class="iframedoc"
id="iframedoc"></div>
<table class="adminlist table table-striped table-hover"
style="cellspacing:1px">
	<thead>
		<tr>
			<th class="title titlenum"><?php
				echo JText::_( 'HIKA_NUM' );
			?></th>
			<th class="title"><?php
				echo JText::_('HIKA_NAME');
			?></th>
			<th class="title titletoggle"><?php
				echo JText::_('HIKA_ENABLED');
			?></th>
			<th class="title titleid"><?php
				echo JText::_( 'ID' );
			?></th>
		</tr>
	</thead>
	<tbody>
<?php
$k = 0;
foreach($this->plugins as $i => &$row) {
	$publishedid = 'enabled-' . $row->id;
?>
		<tr class="row<?php echo $k;?>">
			<td align="center"><?php
				echo $i+1;
			?></td>
			<td><?php
				if($this->manage) {
					?><a href="<?php echo
hikamarket::completeLink('plugins&task=edit&name=' .
$row->element);?>"><?php
				}
				echo $row->name;
				if($this->manage) {
					?></a><?php
				}
			?></td>
			<td align="center">
				<?php
					if($this->manage) {
						echo $this->toggleClass->toggle($publishedid,
$row->published, 'plugins');
					} else {
						echo $this->toggleClass->display('activate',
$row->published);
					}
				?>
			</td>
			<td align="center"><?php
				echo $row->id;
			?></td>
		</tr>
<?php
	$k = 1-$k;
}
?>
	</tbody>
</table>
pluginsmarket/tmpl/sublisting.php000064400000006637151161332370013317
0ustar00<?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');
?><table class="adminlist table table-striped table-hover"
cellpadding="1">
	<thead>
		<tr>
			<th class="title titlenum"><?php echo
JText::_('HIKA_NUM');?></th>
			<th class="title titlebox">
				<input type="checkbox" name="toggle"
value="" onclick="hikashop.checkAll(this);" />
			</th>
			<th class="title"><?php echo
JText::_('HIKA_NAME');?></th>
			<th class="title titleorder"
style="width:10%;"><?php
				echo JText::_( 'HIKA_ORDER' );
				if(@$this->data['order']->ordering)
					echo JHTML::_('grid.order', 
$this->data['plugins'] );
			?></th>
			<th class="title" style="width:2%;"><?php
echo JText::_('HIKA_DELETE');?></th>
			<th class="title" style="width:2%;"><?php
echo JText::_('HIKA_PUBLISHED');?></th>
		</tr>
	</thead>
	<tbody>
<?php
$p_id = $this->plugin_type.'_id';
$p_name = $this->plugin_type.'_name';
$p_order = $this->plugin_type.'_ordering';
$p_published = $this->plugin_type.'_published';

$k = 0;
$i = 0;
$a = count($this->elements);
$plugins = array();
if(!empty($this->elements))
	$plugins = array_values($this->elements);
foreach($plugins as $plugin){
	$published_id = $this->plugin_type.'_published-' .
$plugin->$p_id;
	$id = $this->plugin_type.'_' . $plugin->$p_id;
?>
		<tr class="row<?php echo $k;?>" id="<?php echo
$id;?>">
			<td align="center"><?php
				echo $i+1;
			?></td>
			<td align="center"><?php
				echo JHTML::_('grid.id', $i, $plugin->$p_id );
			?></td>
			<td>
				<a href="<?php echo
hikamarket::completeLink('plugins&plugin_type='.$this->plugin_type.'&task=edit&name='.$this->data['pluginName'].'&subtask='.$this->plugin_type.'_edit&'.$p_id.'='.$plugin->$p_id);?>"><?php
echo $plugin->$p_name;?></a>
			</td>
			<td class="order">
				<span><?php
					echo $this->data['pagination']->orderUpIcon(
							$i,
							$this->data['order']->reverse XOR
($plugin->$p_order >= @$plugins[$i-1]->$p_order),
							$this->data['order']->orderUp,
							'Move Up',
							$this->data['order']->ordering
						);
				?></span>
				<span><?php
					echo $this->data['pagination']->orderDownIcon(
							$i,
							$a,
							$this->data['order']->reverse XOR
($plugin->$p_order <= @$plugins[$i+1]->$p_order),
							$this->data['order']->orderDown,
							'Move Down',
							$this->data['order']->ordering
						);
					?></span>
				<input type="text" name="order[]"
size="5" <?php
if(!$this->data['order']->ordering) echo
'disabled="disabled"'; ?> value="<?php echo
$plugin->$p_order; ?>" class="text_area"
style="text-align: center" />
			</td>
			<td align="center">
				<span class="spanloading"><?php
					echo $this->data['toggleClass']->delete($id,
$this->name.'-'.$plugin->$p_id, $this->plugin_type,
true);
				?></span>
			</td>
			<td align="center"><?php
				echo $this->data['toggleClass']->toggle($published_id,
(int)$plugin->$p_published, $this->plugin_type);
			?></td>
		</tr>
<?php
	$k = 1-$k;
	$i++;
}
?>
	</tbody>
</table>
<input type="hidden" name="boxchecked"
value="0" />
<input type="hidden" name="subtask"
value="copy"/>
<input type="hidden" name="option"
value="<?php echo HIKAMARKET_COMPONENT;?>" />
<input type="hidden" name="task"
value=""/>
pluginsmarket/view.html.php000064400000012763151161332370012072
0ustar00<?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 pluginsmarketViewpluginsmarket extends hikamarketView {

	const ctrl = 'plugins';
	const name = 'PLUGINS';
	const icon = 'puzzle-piece';

	public function display($tpl = null) {
		$this->paramBase =
HIKAMARKET_COMPONENT.'.'.$this->getName();
		$function = $this->getLayout();
		if(method_exists($this,$function)) {
			if($this->$function())
				return false;
		}
		parent::display($tpl);
	}

	public function listing() {
		$app = JFactory::getApplication();
		$db = JFactory::getDBO();
		hikamarket::setTitle(JText::_(self::name), self::icon, self::ctrl);

		$config = hikamarket::config();
		$this->assignRef('config',$config);

		$toggleClass = hikamarket::get('helper.toggle');
		$this->assignRef('toggleClass', $toggleClass);

		$manage =
hikamarket::isAllowed($config->get('acl_plugins_manage','all'));
		$this->assignRef('manage', $manage);

		$type =
$app->getUserStateFromRequest(HIKAMARKET_COMPONENT.'.plugin_type',
'plugin_type', 'generator');
		$group = 'hikamarket'; //.$type;
		$query = 'SELECT extension_id as id, enabled as published, name,
element FROM ' . hikamarket::table('extensions', false) .
' WHERE `folder` = ' . $db->Quote($group) . ' AND
type=\'plugin\' ORDER BY enabled DESC, ordering ASC';
		$db->setQuery($query);
		$plugins = $db->loadObjectList();


		$this->assignRef('plugins', $plugins);
		$this->assignRef('plugin_type', $type);

		$toolbar = JToolBar::getInstance('toolbar');
		JToolBarHelper::divider();
		$toolbar->appendButton('Pophelp', self::ctrl .
'-listing');
		$toolbar->appendButton('Link', HIKAMARKET_LNAME,
JText::_('HIKAMARKET_CPANEL'),
hikamarket::completeLink('dashboard'));
	}

	public function form() {
		$app = JFactory::getApplication();
		$db = JFactory::getDBO();
		$config = hikamarket::config();
		$task = hikaInput::get()->getString('task', '');

		$this->content = '';
		$this->plugin_name = hikaInput::get()->getCmd('name',
'');
		if(empty($this->plugin_name)) {
			return false;
		}

		$db = JFactory::getDBO();
		$plugin = hikamarket::import('hikamarket',
$this->plugin_name);
		if(!$plugin || !method_exists($plugin, 'type')) {
			$pluginClass = hikamarket::get('class.plugins');
			$plugin = $pluginClass->getByName('hikamarket',
$this->plugin_name);
			if(!empty($plugin) && (!empty($plugin->id) ||
!empty($plugin->extension_id))) {
				$url =
'index.php?option=com_plugins&task=plugin.edit&extension_id='
. $plugin->extension_id;
				$app->redirect($url);
			}
			return false;
		}
		$this->plugin_type = $plugin->type();

		$query = '';
		if(in_array($this->plugin_type,
array('generator','consumer'))){
			$query = 'SELECT * FROM ' .
hikamarket::table($this->plugin_type).' WHERE ' .
$this->plugin_type . '_type =
'.$db->Quote($this->plugin_name);
			$query .= ' ORDER BY ' . $this->plugin_type .
'_ordering ASC';
		}
		if(empty($query))
			return false;
		$db->setQuery($query);
		$elements =
$db->loadObjectList($this->plugin_type.'_id');

		if(!empty($elements)){
			$params_name = $this->plugin_type.'_params';
			foreach($elements as $k => $el){
				if(!empty($el->$params_name)){
					$elements[$k]->$params_name =
hikamarket::unserialize($el->$params_name);
				}
			}
		}

		$multiple_plugin = false;
		if(method_exists($plugin, 'isMultiple')) {
			$multiple_plugin = $plugin->isMultiple();
		}

		$function = 'onPluginConfiguration';
		$ctrl =
'&plugin_type='.$this->plugin_type.'&task='.$task.'&name='.$this->plugin_name;
		if($multiple_plugin === true) {
			$subtask =
hikaInput::get()->getCmd('subtask','');
			$ctrl .= '&subtask='.$subtask;
			if(empty($subtask)) {
				$function = 'onPluginMultipleConfiguration';
			}
			$cid = hikamarket::getCID($this->plugin_type.'_id');
			if(isset($elements[$cid])){
				$this->assignRef('element', $elements[$cid]);
				$ctrl .=
'&'.$this->plugin_type.'_id='.$cid;
			}
		} else {
			if(!empty($elements)) {
				$this->assignRef('element', reset($elements));
			}
		}
		$this->assignRef('elements', $elements);

		if(method_exists($plugin, $function)) {
			ob_start();
			$plugin->$function($elements);
			$this->content = ob_get_clean();
			$this->data = $plugin->getProperties();
		}

		$this->assignRef('name', $this->plugin_name);
		$this->assignRef('plugin', $plugin);
		$this->assignRef('multiple_plugin', $multiple_plugin);
		$this->assignRef('content', $this->content);
		$this->assignRef('plugin_type', $this->plugin_type);

		if(empty($plugin->pluginView)) {
			$this->content .= $this->loadPluginTemplate(@$plugin->view);
		}

		hikamarket::setTitle(JText::_('HIKAM_PLUGIN').'
'.$this->name, self::icon, self::ctrl.$ctrl);
		return true;
	}

	private function loadPluginTemplate($view = '') {
		static $previousType = '';

		$app = JFactory::getApplication();

		$this->subview = '';
		if(!empty($view)) {
			$this->subview = '_' . $view;
		}

		$name = $this->plugin_name . '_configuration' .
$this->subview . '.php';
		$path = JPATH_THEMES . DS . $app->getTemplate() . DS .
'hikamarket' . DS . $name;
		if(!file_exists($path)) {
			$path = JPATH_PLUGINS . DS . 'hikamarket' . DS .
$this->plugin_name . DS . $name;
			if(!file_exists($path))
				return '';
		}
		ob_start();
		require($path);
		return ob_get_clean();
	}

}
productmarket/index.html000064400000000032151161332400011414
0ustar00<html><body></body></html>productmarket/tmpl/confirm_action.php000064400000010405151161332400014103
0ustar00<?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');
?><form action="<?php echo
hikamarket::completeLink('product&task='.$this->action);
?>" method="post" name="adminForm"
id="adminForm">
<?php
switch($this->action) {
	case 'approve':
		hikamarket::display(JText::_('HIKAM_CONFIRM_APPROVE_PRODUCTS'),
'success', false, false);
		break;
	case 'decline':
		hikamarket::display(JText::_('HIKAM_CONFIRM_DECLINE_PRODUCTS'),
'error', false, false);
		break;
	case 'remove':
		hikamarket::display(JText::_('HIKAM_CONFIRM_DELETE_PRODUCTS'),
'error', false, false);
		break;
}
?>
<div class="hikashop_backend_tile_edition hk-row-fluid">
<?php
$image_options = array(
  'default' => true,
  'forcesize' =>
$this->config->get('image_force_size', true),
  'scale' =>
$this->config->get('image_scale_mode', 'inside')
);

foreach($this->products as $product) {
?>
	<div class="hkc-xl-4 hkc-md-6
hikashop_tile_block"><div>
		<div class="hikashop_tile_title"><?php echo
JText::_('PRODUCT'); ?> (<?php echo
(int)$product->product_id; ?>)</div>
		<div class="product_stat_img" style="float:left;
margin: 5px;"><?php
	$img = $this->imageHelper->getThumbnail(@$product->file_path,
array('width' => 50, 'height' => 50),
$image_options);
	if($img->success) {
		$attributes = '';
		if($img->external)
			$attributes = ' width="'.$img->req_width.'"
height="'.$img->req_height.'"';
		echo '<img class="hikashop_product_image"
title="'.$this->escape(@$product->file_description).'"
alt="'.$this->escape(@$product->file_name).'"
src="'.$img->url.'"'.$attributes.'/>';
	}
		?></div>

		<h4><?php echo $product->product_name; ?></h4>
		<label><input type="checkbox" name="cid[]"
value="<?php echo (int)$product->product_id; ?>"
checked="checked"/> <?php echo $product->product_code;
?></label>
		<div style="clear:both"></div>

		<dl class="hika_options">
			<dt><?php echo JText::_('HIKA_VENDOR');
?></dt>
			<dd><?php
				if(empty($product->product_vendor_id))
					echo
'<em>'.JText::_('NO_VENDOR').'</em>';
				else if(!empty($product->vendor_name))
					echo $this->escape($product->vendor_name);
				else
					echo '<em>'.JText::_('HIKA_VENDOR').'
'.(int)$product->product_vendor_id.'</em>';
			?></dd>
<?php
		if(!empty($this->extra_columns)) {
			foreach($this->extra_columns as $colName => $column) {
?>
			<dt><?php echo (is_array($column) &&
isset($column['key'])) ? $column['name'] : $column;
?></dt>
			<dd class="hikamarket_product_extra_<?php echo
$colName;?>_value"><?php
				if(is_array($column) && isset($column['key']))
					echo $product->{ $column['key'] };
				else
					echo $product->$colName;
			?></dd>
<?php
			}
		}
?>
		</dl>
	</div></div>
<?php
}
?>
</div>
<?php
	if(in_array($this->action, array('approve',
'decline'))) {
?>
<div class="hikashop_backend_tile_edition hk-row-fluid">
	<div class="hkc-md-12 hikashop_tile_block"><div>
		<div class="hikashop_tile_title"><?php echo
JText::_('HIKAM_EMAIL_NOTIFICATION'); ?></div>
		<dl class="hika_options">
			<dt><?php echo JText::_('HIKAM_SEND_NOTIFICATION');
?></dt>
			<dd>
				<label><input type="checkbox"
name="data[notify][send]" value="1"
checked="checked"/> <?php echo
JText::_('NOTIFY_VENDOR'); ?></label>
			</dd>

			<dt><?php echo JText::_('MESSAGE'); ?></dt>
			<dd>
				<textarea name="data[notify][msg]" cols="60"
rows="6" style="width:100%"></textarea>
			</dd>
		</dl>
	</div></div>
</div>
<?php
	}
?>
	<input type="hidden" name="option"
value="<?php echo HIKAMARKET_COMPONENT; ?>" />
	<input type="hidden" name="task"
value="<?php echo $this->action; ?>" />
	<input type="hidden" name="ctrl"
value="<?php echo hikaInput::get()->getCmd('ctrl');
?>" />
	<input type="hidden" name="Itemid"
value="<?php echo $this->Itemid; ?>" />
	<input type="hidden" name="boxchecked"
value="<?php echo count($this->products); ?>" />
	<input type="hidden" name="confirmation"
value="<?php echo $this->confirmation; ?>" />
	<input type="hidden" name="redirect"
value="<?php echo
hikaInput::get()->getCmd('redirect'); ?>" />
	<?php echo JHTML::_( 'form.token' ); ?>
</form>
productmarket/tmpl/index.html000064400000000032151161332400012370
0ustar00<html><body></body></html>productmarket/tmpl/shop_block.php000064400000012456151161332400013244
0ustar00<?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
if(hikamarket::level(1) && $this->product_type !=
'template') {
?>
<div class="hkc-xl-8 hkc-lg-12 hikashop_product_block
hikashop_product_edit_vendorfees"><div>
	<div class="hikashop_product_part_title
hikashop_product_edit_vendorfees_title"><?php echo
JText::_('VENDOR_FEES');?></div>
	<table class="adminlist table table-striped table-hover"
width="100%">
		<thead>
			<tr>
				<th class="title"><?php echo
JText::_('CURRENCY');?></th>
				<th class="title" style="width:10%"><?php
					echo hikamarket::tooltip(JText::_('MINIMUM_QUANTITY'),
'', '', JText::_('MIN_QTY'), '',
0);
				?></th>
				<th class="title" style="width:10%"><?php
echo JText::_('HIKAM_MINIMUM_PRICE');?></th>
				<th class="title"><?php echo
JText::_('FLAT_FEE');?></th>
				<th class="title"><?php echo
JText::_('FIXED_FEE');?></th>
				<th class="title"><?php echo
JText::_('PERCENT_FEE');?></th>
				<th class="title" style="width:8%">
					<button class="btn" style="margin:0px;"
type="button" onclick="return
marketAddVendorFee('<?php echo $this->product_type;
?>');">
						<img src="<?php echo HIKASHOP_IMAGES;?>add.png"
alt="" style="vertical-align:middle;"><?php echo
JText::_('ADD');?>
					</button>
				</th>
			</tr>
		</thead>
		<tbody id="hikamarket_vendor_fees_<?php echo
$this->product_type; ?>">
<?php
$k = 0;
$cpt = 0;
if(!empty($this->data)) {
	foreach($this->data as $i => $fee) {
?>
			<tr class="row<?php echo $k;?>">
				<td class="hika_currency"><?php
					echo
@$this->currencyType->display('market[product_fee]['.$this->product_type.']['.$i.'][currency]',
@$fee->fee_currency_id);
				?></td>
				<td class="hika_qty">
					<input size="3" type="text"
name="market[product_fee][<?php echo $this->product_type;
?>][<?php echo $i;?>][quantity]" value="<?php echo
@$fee->fee_min_quantity;?>" />
				</td>
				<td class="hika_price">
					<input size="5" type="text"
name="market[product_fee][<?php echo $this->product_type;
?>][<?php echo $i;?>][min_price]" value="<?php echo
@$fee->fee_min_price;?>" />
				</td>
				<td class="hika_price">
					<input type="hidden"
name="market[product_fee][<?php echo $this->product_type;
?>][<?php echo $i;?>][id]" value="<?php echo
$fee->fee_id;?>" />
					<input size="6" type="text"
name="market[product_fee][<?php echo $this->product_type;
?>][<?php echo $i;?>][value]" value="<?php echo
@$fee->fee_value;?>" />
				</td>
				<td class="hika_price">
					<input size="6" type="text"
name="market[product_fee][<?php echo $this->product_type;
?>][<?php echo $i;?>][fixed]" value="<?php echo
@$fee->fee_fixed;?>" />
				</td>
				<td class="hika_price">
					<input size="4" type="text"
name="market[product_fee][<?php echo $this->product_type;
?>][<?php echo $i;?>][percent]" value="<?php echo
number_format((float)@$fee->fee_percent, 2);?>" />%
				</td>
				<td align="center">
					<a href="#"
onclick="window.hikamarket.deleteRow(this); return
false;"><img src="<?php echo
HIKASHOP_IMAGES;?>delete.png" alt="-"/></a>
				</td>
			</tr>
<?php
		$k = 1 - $k;
		$cpt = $i;
	}
	$cpt++;
}
?>
			<tr class="row<?php echo $k;?>" 
style="display:none" id="hikamarket_tpl_product_fee_<?php
echo $this->product_type; ?>">
				<td class="hika_currency"><?php echo
@$this->currencyType->display('{input_fee_currency}',
0);?></td>
				<td class="hika_qty"><input size="3"
type="text" name="{input_fee_quantity}"
value="" /></td>
				<td class="hika_price"><input size="5"
type="text" name="{input_fee_min_price}"
value="" /></td>
				<td class="hika_price">
					<input type="hidden" name="{input_fee_id}"
value="" />
					<input size="6" type="text"
name="{input_fee_value}" value="" />
				</td>
				<td class="hika_price"><input size="6"
type="text" name="{input_fee_fixed}" value=""
/></td>
				<td class="hika_price"><input size="4"
type="text" name="{input_fee_percent}"
value="" />%</td>
				<td align="center"><a href="#"
onclick="window.hikamarket.deleteRow(this); return
false;"><img src="<?php echo
HIKASHOP_IMAGES;?>delete.png"
alt="-"/></a></td>
			</tr>
		</tbody>
	</table>
<script type="text/javascript">
var hikamarket_product_fee_cpt = <?php echo $cpt;?>;
function marketAddVendorFee(type){
	var d = document,
		tbody = d.getElementById('hikamarket_vendor_fees_' + type),
		cpt = hikamarket_product_fee_cpt,
		htmlblocks = {
			input_fee_id:
"market[product_fee]["+type+"]["+cpt+"][id]",
			input_fee_value:
"market[product_fee]["+type+"]["+cpt+"][value]",
			input_fee_currency:
"market[product_fee]["+type+"]["+cpt+"][currency]",
			input_fee_percent:
"market[product_fee]["+type+"]["+cpt+"][percent]",
			input_fee_quantity:
"market[product_fee]["+type+"]["+cpt+"][quantity]",
			input_fee_min_price:
"market[product_fee]["+type+"]["+cpt+"][min_price]",
			input_fee_fixed:
"market[product_fee]["+type+"]["+cpt+"][fixed]"
		};
	window.hikamarket.dupRow('hikamarket_tpl_product_fee_' + type,
htmlblocks, "market_product_fee_" + type + "_" + cpt);
	hikamarket_product_fee_cpt++;
	return false;
}
</script>
</div></div>
<input type="hidden" name="market[form]"
value="1"/>
<?php
}
productmarket/tmpl/shop_form.php000064400000001303151161332400013102
0ustar00<?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
if(!hikamarket::level(1) || $this->product_type ==
'template')
	return;

$type = 'product';
if($this->product_type == 'variant')
	$type = 'variant';
echo $this->nameboxType->display(
	'data['.$type.'][product_vendor_id]',
	(int)$this->product_vendor_id,
	hikamarketNameboxType::NAMEBOX_SINGLE,
	'vendor',
	array(
		'delete' => true,
		'default_text' =>
'<em>'.JText::_('HIKA_NONE').'</em>'
	)
);
productmarket/tmpl/waitingapproval.php000064400000024366151161332400014333
0ustar00<?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');
?><div class="iframedoc"
id="iframedoc"></div>
<div id="hikamarket_product_listing">
<form action="<?php echo
hikamarket::completeLink('product&task=waitingapproval');
?>" method="post" name="adminForm"
id="adminForm">
<?php if(!HIKASHOP_BACK_RESPONSIVE) { ?>
	<table class="hikam_filter">
		<tr>
			<td width="100%">
				<?php echo JText::_('FILTER'); ?>:
				<input type="text" name="search"
id="hikamarket_products_listing_search" value="<?php echo
$this->escape($this->pageInfo->search);?>"
class="inputbox"/>
				<button class="btn"
onclick="this.form.submit();"><?php echo
JText::_('GO'); ?></button>
				<button class="btn"
onclick="document.getElementById('hikamarket_products_listing_search').value='';this.form.submit();"><?php
echo JText::_('RESET'); ?></button>
			</td>
			<td nowrap="nowrap">
<?php } else { ?>
	<div class="row-fluid">
		<div class="span7">
			<div class="input-prepend input-append">
				<span class="add-on"><i
class="icon-filter"></i></span>
				<input type="text" name="search"
id="hikamarket_products_listing_search" value="<?php echo
$this->escape($this->pageInfo->search);?>"
class="inputbox"/>
				<button class="btn"
onclick="this.form.submit();"><i
class="icon-search"></i></button>
				<button class="btn"
onclick="document.getElementById('hikamarket_products_listing_search').value='';this.form.submit();"><i
class="icon-remove"></i></button>
			</div>
		</div>
		<div class="span5">
			<div class="expand-filters"
style="width:auto;float:right">
<?php }

	if(!empty($this->vendorType))
		echo $this->vendorType->display('filter_vendors',
@$this->pageInfo->filter->vendors);

	if(!isset($this->pageInfo->filter->published))
		$this->pageInfo->filter->published = -1;
	$values = array(
		-1 => JText::_('HIKA_ALL'),
		1 => JText::_('HIKA_PUBLISHED'),
		0 => JText::_('HIKA_UNPUBLISHED'),
	);
	echo JHTML::_('select.genericlist', $values,
'filter_published',
'onchange="this.form.submit();"', 'value',
'text', $this->pageInfo->filter->published);

if(!HIKASHOP_BACK_RESPONSIVE) { ?>
			</td>
		</tr>
	</table>
<?php } else {?>
			</div>
			<div style="clear:both"></div>
		</div>
	</div>
<?php } ?>
<?php
	$cols = 9;
?>
	<table class="adminlist pad5 table table-striped
table-hover">
		<thead>
			<tr>
				<th class="hikamarket_product_num_title title
titlenum"><?php
					echo JText::_('HIKA_NUM'); //
JHTML::_('grid.sort', JText::_('HIKA_NUM'),
'product.product_id',
$this->pageInfo->filter->order->dir,
$this->pageInfo->filter->order->value);
				?></th>
				<th class="hikamarket_vendor_select_title title
titlebox">
					<input type="checkbox" name="toggle"
value="" onclick="hikashop.checkAll(this);" />
				</th>
				<th class="hikamarket_product_image_title
title"><?php
					echo JText::_('HIKA_IMAGE');
				?></th>
				<th class="hikamarket_product_name_title
title"><?php
					echo JHTML::_('grid.sort', JText::_('HIKA_NAME'),
'product.product_name',
$this->pageInfo->filter->order->dir,
$this->pageInfo->filter->order->value);
					echo ' / ' . JHTML::_('grid.sort',
JText::_('PRODUCT_CODE'), 'product.product_code',
$this->pageInfo->filter->order->dir,
$this->pageInfo->filter->order->value);
				?></th>
<?php if(hikamarket::level(1)) { $cols++; ?>
				<th class="hikamarket_product_vendor"><?php
					echo JText::_('HIKA_VENDOR');
				?></th>
<?php } ?>
				<th class="hikamarket_product_quantity_title
title"><?php
					echo JHTML::_('grid.sort',
JText::_('PRODUCT_QUANTITY'),
'product.product_quantity',
$this->pageInfo->filter->order->dir,
$this->pageInfo->filter->order->value);
				?></th>
				<th class="hikamarket_product_price_title
title"><?php
					echo JText::_('PRODUCT_PRICE');
				?></th>
<?php
		if(!empty($this->fields)) {
			foreach($this->fields as $fieldName => $oneExtraField) {
				$cols++;
?>
				<th class="hikamarket_product_custom_<?php echo
$fieldName;?>_title title"><?php
					echo $this->fieldsClass->getFieldName($oneExtraField);
				?></th>
<?php
			}
		}
?>
<?php
		if(!empty($this->extra_columns)) {
			foreach($this->extra_columns as $colName => $column) {
				$cols++;
?>
				<th class="hikamarket_product_extra_<?php echo
$colName;?>_title title"><?php
					echo (is_array($column) && isset($column['key'])) ?
$column['name'] : $column;
				?></th>
<?php
			}
		}
?>
				<th class="hikamarket_product_actions_title
titlenum"><?php
					echo JText::_('HIKAM_APPROVE');
				?></th>
<?php if(hikamarket::level(1)) { ?>
				<th class="hikamarket_product_actions_title
titlenum"><?php
					echo JText::_('HIKAM_DECLINE');
				?></th>
<?php } else { ?>
				<th class="hikamarket_product_actions_title
titlenum"><?php
					echo JText::_('HIKA_DELETE');
				?></th>
<?php } ?>
				<th class="hikamarket_product_id_title title"><?php
					echo JHTML::_('grid.sort', JText::_('ID'),
'product.product_id',
$this->pageInfo->filter->order->dir,
$this->pageInfo->filter->order->value);
				?></th>
			</tr>
		</thead>
		<tfoot>
			<tr>
				<td colspan="<?php echo $cols ;?>">
					<?php echo $this->pagination->getListFooter(); ?>
					<?php echo $this->pagination->getResultsCounter(); ?>
				</td>
			</tr>
		</tfoot>
		<tbody>
<?php
$multivendor = hikamarket::level(1);
$k = 0;
$i = 0;
foreach($this->products as $product) {
	$publishedid =
'product_published-'.(int)$product->product_id;
	$rowId = 'market_product_'.(int)$product->product_id;

	$url =
hikamarket::completeLink('shop.product&task=edit&cid='.(int)$product->product_id.'&cancel_redirect='.$this->cancelUrl);
?>
		<tr class="row<?php echo $k; ?>" id="<?php
echo $rowId; ?>">
			<td class="hikamarket_product_num_value"
align="center">
			<?php
				if( !isset($this->embbed) )
					echo $this->pagination->getRowOffset($i);
				else
					echo ($i+1);
			?>
			</td>
			<td class="hikamarket_vendor_select_value"><?php
				echo JHTML::_('grid.id', $i, $product->product_id );
			?></td>
			<td class="hikamarket_product_name_value"><?php
				$thumb =
$this->imageHelper->getThumbnail(@$product->file_path,
array(50,50), array('default' => 1, 'forcesize'
=> 1));
				if(!empty($thumb->path) && empty($thumb->external))
					echo '<a href="'.$url.'"><img
src="'. $this->imageHelper->uploadFolder_url .
str_replace('\\', '/', $thumb->path).'"
alt=""/></a>';
				else if(!empty($thumb->path) && !empty($thumb->url))
					echo '<a href="'.$url.'"><img
src="'. $thumb->url.'" alt=""
width="50" height="50"/></a>';
			?></td>
			<td class="hikamarket_product_name_value">
				<a href="<?php echo $url; ?>"><?php
					if(empty($product->product_name) &&
!empty($product->parent_product_name))
						echo
'<em>'.$this->escape($product->parent_product_name,
true).'</em>';
					else if(empty($product->product_name))
						echo
'<em>'.JText::_('HIKAM_NO_NAME').'</em>';
					else
						echo $this->escape($product->product_name, true);
				?></a>
				<div class="hikamarket_product_code_value">
					<a href="<?php echo $url; ?>"><?php echo
$this->escape($product->product_code, true); ?></a>
					<?php echo
$this->toggleHelper->display('published',
$product->product_published); ?>
				</div>
			</td>
<?php if($multivendor) { ?>
			<td><?php
				if(!empty($product->product_vendor_id) &&
(int)$product->product_vendor_id > 1) {
					$vendor_id = (int)$product->product_vendor_id;
					?><a href="<?php echo
hikamarket::completeLink('vendor&task=edit&cid='.$vendor_id);
?>"><?php echo $this->vendors[$vendor_id]->vendor_name;
?></a><?php
				}
			?></td>
<?php } ?>
			<td class="hikamarket_product_quantity_value"><?php
				echo ($product->product_quantity >= 0) ?
$product->product_quantity : JText::_('UNLIMITED');
			?></td>
			<td class="hikamarket_product_price_value"><?php
				echo $this->currencyHelper->displayPrices($product->prices);
			?></td>
<?php
		if(!empty($this->fields)) {
			foreach($this->fields as $fieldName => $oneExtraField) {
?>
			<td class="hikamarket_product_custom_<?php echo
$fieldName;?>_value"><?php
				echo $this->fieldsClass->show($oneExtraField,
$product->$fieldName);
			?></td>
<?php
			}
		}
?>
<?php
		if(!empty($this->extra_columns)) {
			foreach($this->extra_columns as $colName => $column) {
?>
			<td class="hikamarket_product_extra_<?php echo
$colName;?>_value"><?php
				if(is_array($column) && isset($column['key']))
					echo $product->{ $column['key'] };
				else
					echo $product->$colName;
			?></td>
<?php
			}
		}
?>
			<td class="hikamarket_product_actions_value"
style="text-align:center">
				<a href="<?php echo
hikamarket::completeLink('product&task=approve&cid='.(int)$product->product_id.'&redirect=waitingapproval')
?>"><img src="<?php echo HIKAMARKET_IMAGES;
?>icon-16/save.png" alt="approve" /></a>
			</td>
<?php if($multivendor) { ?>
			<td class="hikamarket_product_actions_value"
style="text-align:center">
				<a href="<?php echo
hikamarket::completeLink('product&task=decline&cid='.(int)$product->product_id.'&redirect=waitingapproval')
?>"><img src="<?php echo HIKAMARKET_IMAGES;
?>icon-16/unpublish.png" alt="decline" /></a>
			</td>
<?php } else { ?>
			<td class="hikamarket_product_actions_value"
style="text-align:center"><?php
				echo $this->toggleHelper->delete($rowId,
(int)$product->product_id, 'productmarket', true);
			?></td>
<?php } ?>
			<td class="hikamarket_product_id_value"
align="center"><?php
				echo (int)$product->product_id;
			?></td>
		</tr>
<?php
	$i++;
	$k = 1 - $k;
}
?>
	</table>
	<input type="hidden" name="option"
value="<?php echo HIKAMARKET_COMPONENT; ?>" />
	<input type="hidden" name="task"
value="waitingapproval" />
	<input type="hidden" name="ctrl"
value="<?php echo hikaInput::get()->getCmd('ctrl');
?>" />
	<input type="hidden" name="Itemid"
value="<?php echo $this->Itemid; ?>" />
	<input type="hidden" name="boxchecked"
value="0" />
	<input type="hidden" name="filter_order"
value="<?php echo
$this->pageInfo->filter->order->value; ?>" />
	<input type="hidden" name="filter_order_Dir"
value="<?php echo $this->pageInfo->filter->order->dir;
?>" />
	<?php echo JHTML::_( 'form.token' ); ?>
</form>
</div>
productmarket/view.html.php000064400000030731151161332400012056
0ustar00<?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 productmarketViewProductmarket extends hikamarketView {

	const ctrl = 'product';
	const name = 'HIKAMARKET_PRODUCTMARKET';
	const icon = 'thumbs-up';

	protected $triggerView = true;

	public function display($tpl = null, $params = null) {
		$this->paramBase =
HIKAMARKET_COMPONENT.'.'.$this->getName();
		$fct = $this->getLayout();
		$ret = true;
		if(method_exists($this, $fct))
			$ret = $this->$fct($params);
		if($ret !== false)
			parent::display($tpl);
	}

	public function shop_block($params = null) {
		$app = JFactory::getApplication();
		$db = JFactory::getDBO();

		$config = hikamarket::config();
		$this->assignRef('config', $config);

		$this->loadRef(array(
			'currencyClass' => 'shop.class.currency',
			'currencyType' => 'shop.type.currency',
			'popup' => 'shop.helper.popup'
		));

		$data = null;
		$product_id = 0;
		$product_type = 'main';

		if(!empty($params)) {
			$product_id = (int)$params->get('product_id');
			$product_type = $params->get('product_type');
		}

		if(hikamarket::level(1) && $product_id > 0) {
			$feeClass = hikamarket::get('class.fee');
			$data = $feeClass->getProduct($product_id);
			foreach($data as $k => $v) {
				if($v->fee_target_id != $product_id)
					unset($data[$k]);
			}
		}

		$this->assignRef('data', $data);
		$this->assignRef('product_id', $product_id);
		$this->assignRef('product_type', $product_type);
	}

	public function shop_form($params = null) {
		$app = JFactory::getApplication();
		$db = JFactory::getDBO();

		$config = hikamarket::config();
		$this->assignRef('config', $config);

		$this->loadRef(array(
			'nameboxType' => 'type.namebox',
			'popup' => 'shop.helper.popup'
		));

		$product_type = 'main';
		$product_id = 0;
		$product_vendor_id = 0;

		if(!empty($params)) {
			$product_id = (int)$params->get('product_id');
			$product_vendor_id =
(int)$params->get('product_vendor_id');
			$product_type = $params->get('product_type');
		}

		$this->assignRef('product_id', $product_id);
		$this->assignRef('product_vendor_id', $product_vendor_id);
		$this->assignRef('product_type', $product_type);
	}

	public function waitingapproval() {
		$app = JFactory::getApplication();
		$db = JFactory::getDBO();
		$ctrl = '';
		$this->paramBase =
HIKAMARKET_COMPONENT.'.'.$this->getName().'.waitingapproval';
		hikamarket::setTitle(JText::_('WAITING_APPROVAL_LIST'),
self::icon, self::ctrl.'&task=waitingapproval');

		$config = hikamarket::config();
		$this->assignRef('config', $config);

		$this->loadRef(array(
			'toggleHelper' => 'helper.toggle',
			'imageHelper' => 'shop.helper.image',
			'currencyHelper' => 'shop.class.currency',
			'childdisplayType' => 'shop.type.childdisplay',
			'shopCategoryType' => 'type.shop_category',
		));

		$manage = hikamarket::acl('product/edit');
		$this->assignRef('manage', $manage);

		$product_action_delete = hikamarket::acl('product/delete');
		$this->assignRef('product_action_delete',
$product_action_delete);

		$cancelUrl =
urlencode(base64_encode(hikamarket::completeLink('product&task=waitingapproval')));
		$this->assignRef('cancelUrl', $cancelUrl);

		global $Itemid;
		$url_itemid = '';
		if(!empty($Itemid))
			$url_itemid = '&Itemid='.$Itemid;
		$this->assignRef('Itemid', $Itemid);

		$cfg = array(
			'table' => 'shop.product',
			'main_key' => 'product_id',
			'order_sql_value' => 'product.product_id'
		);

		$vendorType = hikamarket::get('type.filter_vendor');
		$this->assignRef('vendorType', $vendorType);

		$default_sort_value =
trim($config->get('product_listing_default_sort_value',
$cfg['order_sql_value']));
		if(empty($default_sort_value))
			$default_sort_value = $cfg['order_sql_value'];
		$default_sort_dir =
trim($config->get('product_listing_default_sort_dir',
'asc'));
		if(empty($default_sort_dir) || !in_array($default_sort_dir,
array('asc', 'desc')))
			$default_sort_dir = 'asc';

		$listing_filters = array(
			'vendors' => -1,
			'published' => -1,
		);

		$pageInfo = $this->getPageInfo($default_sort_value, $default_sort_dir,
$listing_filters);

		$filters = array(
			'main' => 'product.product_parent_id = 0',
			'product_type' => 'product.product_type =
\'waiting_approval\''
		);
		$searchMap = array(
			'product.product_name',
			'product.product_description',
			'product.product_id',
			'product.product_code'
		);
		$select = array();
		$join = '';

		if($pageInfo->filter->vendors >= 0) {
			$select['parent_product_name'] =
'parent_product.product_name as parent_product_name';
			$join = ' LEFT JOIN
'.hikamarket::table('shop.product').' AS parent_product
ON product.product_parent_id = parent_product.product_id AND
parent_product.product_vendor_id != product.product_vendor_id AND
product.product_vendor_id > 0 ';
		}
		if($pageInfo->filter->published >= 0) {
			$filters['published'] = 'product.product_published =
' . ($pageInfo->filter->published ? '1' :
'0');
		}

		$fieldsClass = hikamarket::get('shop.class.field');
		$categories = array();
		$fields = $fieldsClass->getData('backend_listing',
'product', false, $categories);
		$this->assignRef('fields', $fields);
		$this->assignRef('fieldsClass', $fieldsClass);

		foreach($fields as $fieldName => $oneExtraField) {
			$searchMap[] = 'product.' . $fieldName;
		}

		if($pageInfo->filter->vendors == 0) {
			$filters['main'] .= ' OR parent_product.product_id != 0 )
AND (product.product_vendor_id IN (0, 1)';
		} elseif( $pageInfo->filter->vendors > 1) {
			$filters['main'] .= ' OR parent_product.product_id != 0 )
AND (product.product_vendor_id =
'.(int)$pageInfo->filter->vendors;
		}

		$order = '';
		$this->processFilters($filters, $order, $searchMap,
array('product.'));

		$query = 'FROM
'.hikamarket::table($cfg['table']).' AS product
'.$join.$filters.$order;
		$db->setQuery('SELECT DISTINCT product.*' .
(empty($select)?'':',') . implode(',',
$select) . ' ' . $query, (int)$pageInfo->limit->start,
(int)$pageInfo->limit->value);

		$rows = $db->loadObjectList('product_id');

		$products = array();
		$vendor_ids = array();
		foreach($rows as &$product) {
			$product->prices = array();
			$product->file_name = $product->product_name;
			if(!isset($products[$product->product_id])) {
				$products[$product->product_id] =& $product;
			} else if(!is_array($products[$product->product_id])) {
				$old =& $products[$product->product_id];
				unset($products[$product->product_id]);
				$products[$product->product_id] = array(&$old, &$product);
			} else {
				$products[$product->product_id][] =& $product;
			}

			if((int)$product->product_vendor_id > 0)
				$vendor_ids[ (int)$product->product_vendor_id ] =
(int)$product->product_vendor_id;
		}
		unset($product);
		$this->assignRef('products', $rows);

		$this->loadPricesImages($products);

		$db->setQuery('SELECT COUNT(DISTINCT(product.product_id))
'.$query);
		$pageInfo->elements = new stdClass();
		$pageInfo->elements->total = $db->loadResult();
		$pageInfo->elements->page = count($rows);

		$vendors = array();
		if(!empty($vendor_ids)) {
			$query = 'SELECT vendor_id, vendor_name FROM ' .
hikamarket::table('vendor') . ' WHERE vendor_id IN
('.implode(',', $vendor_ids).')';
			$db->setQuery($query);
			$vendors = $db->loadObjectList('vendor_id');
		}
		$this->assignRef('vendors', $vendors);

		$this->toolbar = array(
			'approve' => array('name' =>
'custom', 'icon' => 'publish',
'alt' => JText::_('HIKAM_APPROVE'), 'task'
=> 'approve', 'display' => $manage),
			'decline' => array(
				'name' => 'custom', 'icon' =>
'unpublish', 'alt' =>
JText::_('HIKAM_DECLINE'), 'task' =>
'decline',
				'display' => $manage && hikamarket::level(1)
			),
			'delete' => array(
				'name' => 'deleteList',
				'display' => $manage
			),
			'|',
			array('name' => 'pophelp', 'target'
=> 'vendor'),
			'dashboard'
		);
		$this->getPagination();

		$this->getOrdering('a.ordering', true);
		if(!empty($this->ordering->ordering)) {
			$this->toolbar['ordering']['display'] = true;
		}

		return true;
	}

	private function loadPricesImages(&$products) {
		if(empty($products))
			return;

		$db = JFactory::getDBO();
		$db->setQuery('SELECT * FROM
'.hikamarket::table('shop.price').' WHERE
price_product_id IN ('.implode(',',
array_keys($products)).')');
		$prices = $db->loadObjectList();
		if(!empty($prices)) {
			foreach($prices as $price) {
				if(!isset($products[$price->price_product_id]) )
					continue;

				if(!is_array($products[$price->price_product_id])) {
					$products[$price->price_product_id]->prices[] = $price;
				} else {
					foreach($products[$price->price_product_id] as $p) {
						$p->prices[] = $price;
					}
				}
			}
		}
		unset($prices);

		$db->setQuery('SELECT * FROM
'.hikamarket::table('shop.file').' WHERE file_ref_id IN
('.implode(',', array_keys($products)).') AND
file_type=\'product\' ORDER BY file_ref_id ASC, file_ordering
ASC, file_id ASC');
		$images = $db->loadObjectList();
		if(!empty($images)) {
			foreach($images as $image) {
				if(!isset($products[(int)$image->file_ref_id]))
					continue;

				if(!is_array($products[(int)$image->file_ref_id])) {
					if(isset($products[(int)$image->file_ref_id]->file_ref_id))
						continue;

					foreach(get_object_vars($image) as $key => $name) {
						$products[(int)$image->file_ref_id]->$key = $name;
					}
				} else {
					$p = reset($products[(int)$image->file_ref_id]);
					if(isset($p->file_ref_id))
						continue;

					foreach($products[(int)$image->file_ref_id] as $p) {
						foreach(get_object_vars($image) as $key => $name) {
							$p->$key = $name;
						}
					}
				}
			}
		}
	}

	public function confirm_action() {
		$app = JFactory::getApplication();
		$db = JFactory::getDBO();

		$product_ids = hikaInput::get()->get('cid', array(),
'array');
		hikamarket::toInteger($product_ids);

		$url_params =
'&task='.hikaInput::get()->getCmd('task');
		foreach($product_ids as $pid) {
			$url_params .= '&cid[]=' . $pid;
		}
		$url_params .=
'&redirect='.hikaInput::get()->getCmd('redirect',
'');

		$this->paramBase =
HIKAMARKET_COMPONENT.'.'.$this->getName().'.waitingapproval';
		hikamarket::setTitle(JText::_('WAITING_APPROVAL_LIST'),
self::icon, self::ctrl.$url_params);

		$config = hikamarket::config();
		$this->assignRef('config', $config);

		$this->loadRef(array(
			'currencyClass' => 'shop.class.currency',
			'imageHelper' => 'shop.helper.image',
			'productClass' => 'shop.class.product',
		));

		$action = hikaInput::get()->getCmd('action_to_confirm',
null);
		if(empty($action) || !in_array($action, array('remove',
'approve', 'decline'))) {
			$app->enqueueMessage(JText::_('INVALID_DATA'),
'error');
			$app->redirect(hikamarket::completeLink('dashboard', false,
true));
		}

		global $Itemid;
		$url_itemid = '';
		if(!empty($Itemid))
			$url_itemid = '&Itemid='.$Itemid;
		$this->assignRef('Itemid', $Itemid);

		$query = 'SELECT p.*, v.vendor_name '.
				' FROM '.hikamarket::table('shop.product').'
as p '.
				' LEFT JOIN '.hikamarket::table('vendor').' AS
v ON p.product_vendor_id = v.vendor_id '.
				' WHERE p.product_id IN ('.implode(',',
$product_ids).') '.
					' AND p.product_type =
'.$db->Quote('waiting_approval');
		$db->setQuery($query);
		$products = $db->loadObjectList('product_id');

		$this->productClass->loadProductsListingData($products, array(
			'load_badges' => false,
			'load_custom_product_fields' => false,
			'load_custom_item_fields' => false,
			'price_display_type' => 'cheapest'
		));

		asort($product_ids);
		$confirmation =
md5($action.'{'.implode(':',$product_ids).'}');

		$this->assignRef('action', $action);
		$this->assignRef('ids', $product_ids);
		$this->assignRef('products', $products);
		$this->assignRef('confirmation', $confirmation);

		$toolbar_icon = 'publish';
		if($action == 'remove')
			$toolbar_icon = 'remove';
		else if($action == 'decline')
			$toolbar_icon = 'unpublish';

		$this->toolbar = array(
			array('name' => 'custom', 'icon' =>
$toolbar_icon, 'alt' => JText::_('HIKAM_CONFIRM'),
'task' => $action),
			array('name' => 'link', 'icon' =>
'back', 'url' =>
hikamarket::completeLink('product&task=waitingapproval'),
'alt' => JText::_('HIKA_CANCEL')),
			'|',
			'dashboard'
		);
	}
}
uploadmarket/index.html000064400000000032151161332400011220
0ustar00<html><body></body></html>uploadmarket/tmpl/galleryimage.php000064400000011045151161332400013360
0ustar00<?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');
?><fieldset>
	<div class="toolbar" id="toolbar"
style="float: right;">
		<button class="btn" type="button"
onclick="window.hikamarket.submitform('galleryselect','adminForm');"><img
style="vertical-align: middle" src="<?php echo
HIKASHOP_IMAGES; ?>save.png"/><?php echo
JText::_('OK'); ?></button>
	</div>
</fieldset>
<form action="<?php echo
hikamarket::completeLink('upload&task=galleryimage', true);
?>" method="post" name="adminForm"
id="adminForm">
	<table width="100%" height="100%"
class="adminlist" style="width:100%;height:100%;">
		<thead>
			<tr>
				<th></th>
				<th>
					<?php echo JText::_('FILTER');?>:
					<input type="text" name="search"
value="<?php echo
$this->escape($this->pageInfo->search);?>"
class="text_area"
onchange="document.adminForm.submit();" />
					<button class="btn"
onclick="document.adminForm.limitstart.value=0;this.form.submit();"><?php
echo JText::_( 'GO' ); ?></button>
					<button class="btn"
onclick="document.adminForm.limitstart.value=0;document.getElementById('search').value='';this.form.submit();"><?php
echo JText::_( 'RESET' ); ?></button>
				</th>
			</tr>
		</thead>
		<tfoot>
			<tr>
				<td></td>
				<td>
					<?php echo $this->pagination->getListFooter(); ?>
					<?php echo $this->pagination->getResultsCounter(); ?>
				</td>
			</tr>
		</tfoot>
		<tr>
			<td width="130px" height="100%"
style="width:130px;vertical-align:top;">
				<div style="width:130px;height:100%;overflow:auto;">
<?php
echo $this->treeContent;
?>
<script type="text/javascript">
hikashopGallery.callbackSelection = function(tree,id) {
	var d = document, node = tree.get(id);
	if( node.value && node.name ) {
		var url = "<?php
			$params = '';
			if(!empty($this->uploadConfig['extra'])) {
				foreach($this->uploadConfig['extra'] as $uploadField =>
$uploadFieldValue) {
					$params .= '&' . urlencode($uploadField) . '='
. urlencode($uploadFieldValue);
				}
			}
			echo
hikamarket::completeLink('upload&task=galleryimage&folder={FOLDER}&uploader='.$this->uploader.'&field='.$this->field.$params,
true, true) ;
		?>";
		document.location = url.replace('{FOLDER}',
node.value.replace('/', '|'));
	}
}
</script>
				</div>
			</td>
			<td>
				<ul id="hikaGallery">
<?php
if(!empty($this->dirContent)) {
	foreach($this->dirContent as $k => $content) {
		$chk_uid = 'hikaGalleryChk_' . $k . '_' . uniqid();
?>
	<li class="hikaGalleryItem">
		<a class="hikaGalleryPhoto" href="#"
onclick="return window.hikagallery.select(this, '<?php echo
$chk_uid; ?>');">
			<img src="<?php echo $content->thumbnail->url;
?>" alt="<?php echo $content->filename;
?>"/>
			<span style="display:none;"
class="hikaGalleryChk"><input type="checkbox"
id="<?php echo $chk_uid ;?>" name="files[]"
value="<?php echo $content->path; ?>"/></span>
			<div class="hikaGalleryCommand">
				<span class="photo_name"><?php echo
$content->filename; ?></span>
				<span><?php echo $content->width . 'x' .
$content->height; ?></span>
				<span style="float:right"><?php echo
$content->size; ?></span>
			</div>
		</a>
	</li>
<?php
	}
}
?>
				</ul>
			</td>
		</tr>
	</table>
<script type="text/javascript">
window.hikagallery = {};
window.hikagallery.select = function(el, id) {
	var d = document, w = window, o = w.Oby, chk = d.getElementById(id);
	if(chk) {
		if(chk.checked) {
			o.removeClass(el.parentNode, 'selected');
		} else {
			o.addClass(el.parentNode, 'selected');
		}
		chk.checked = !chk.checked;
	}
	return false;
}
</script>
	<div class="clr"></div>
	<input type="hidden" name="option"
value="<?php echo HIKAMARKET_COMPONENT; ?>" />
	<input type="hidden" name="tmpl"
value="component" />
	<input type="hidden" name="task"
value="galleryimage" />
	<input type="hidden" name="ctrl"
value="upload" />
	<input type="hidden" name="folder"
value="<?php echo $this->destFolder; ?>" />
	<input type="hidden" name="uploader"
value="<?php echo $this->uploader; ?>" />
	<input type="hidden" name="field"
value="<?php echo $this->field; ?>" />
<?php
	if(!empty($this->uploadConfig['extra'])) {
		foreach($this->uploadConfig['extra'] as $uploadField =>
$uploadFieldValue) {
?>
	<input type="hidden" name="<?php echo $uploadField;
?>" value="<?php echo $uploadFieldValue; ?>" />
<?php
		}
	}
?>
	<?php echo JHTML::_('form.token'); ?>
</form>
uploadmarket/tmpl/image_entry.php000064400000002064151161332400013222
0ustar00<?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');
?><div>
<?php if(!empty($this->params->delete) &&
!empty($this->params->uploader_id)) { ?>
	<a href="#delete" class="deleteImg"
onclick="return window.hkUploaderList['<?php echo
$this->params->uploader_id;
?>'].delImage(this);"><img src="<?php echo
HIKAMARKET_IMAGES; ?>icon-16/delete.png"
border="0"></a>
<?php } ?>
	<div class="hikamarket_image"><?php
	$img =
$this->imageHelper->getThumbnail(@$this->params->file_path,
array(100, 100), null);
	if($img->success) {
		$content = '<img src="'.$img->url.'"
alt="'.$img->filename.'" />';
		echo $this->popup->image($content, $img->origin_url);
	}

	if(!empty($this->params->field_name))
		echo '<input type="hidden"
name="'.$this->params->field_name.'"
value="'.$this->escape(@$this->params->file_path).'"/>';
	?></div>
</div>
uploadmarket/tmpl/index.html000064400000000032151161332400012174
0ustar00<html><body></body></html>uploadmarket/tmpl/sendfile.php000064400000004410151161332400012505
0ustar00<?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');
?><fieldset>
	<div class="toolbar" id="toolbar"
style="float: right;">
		<button class="btn" type="button"
onclick="hikamarket.submitform('addimage','hikamarket_form');"><img
style="vertical-align:middle" src="<?php echo
HIKASHOP_IMAGES; ?>save.png"/><?php echo
JText::_('OK'); ?></button>
	</div>
</fieldset>
<form action="<?php echo
hikamarket::completeLink('upload&task=image'); ?>"
method="post" name="hikamarket_form"
id="hikamarket_form" enctype="multipart/form-data">
	<table width="100%">
		<tr>
<?php
	if(empty($this->element->file_path)) {
?>
			<td class="key">
				<label for="files"><?php echo
JText::_('HIKA_IMAGE'); ?></label>
			</td>
			<td>
				<input type="file" name="files[]"
size="30" />
				<?php echo
JText::sprintf('MAX_UPLOAD',(hikashop_bytes(ini_get('upload_max_filesize'))
> hikashop_bytes(ini_get('post_max_size'))) ?
ini_get('post_max_size') :
ini_get('upload_max_filesize')); ?>
			</td>
<?php
	} else {
?>
			<td class="key">
				<label for="files"><?php echo JText::_(
'HIKA_IMAGE' ); ?></label>
			</td>
			<td><?php
				$image =
$this->imageHelper->getThumbnail($this->element->file_path,
array(100, 100), array('default' => true));
			?><img src="<?php echo $image->url; ?>"
alt=""/></td>
<?php
	}
?>
		</tr>
	</table>
	<div class="clr"></div>
	<input type="hidden" name="option"
value="<?php echo HIKAMARKET_COMPONENT; ?>" />
	<input type="hidden" name="tmpl"
value="component" />
	<input type="hidden" name="ctrl"
value="upload" />
	<input type="hidden" name="task"
value="addimage" />
	<input type="hidden" name="uploader"
value="<?php echo $this->uploader; ?>" />
	<input type="hidden" name="field"
value="<?php echo $this->field; ?>" />
<?php
	if(!empty($this->uploadConfig['extra'])) {
		foreach($this->uploadConfig['extra'] as $uploadField =>
$uploadFieldValue) {
?>
	<input type="hidden" name="<?php echo $uploadField;
?>" value="<?php echo $uploadFieldValue; ?>" />
<?php
		}
	}
?>
	<?php echo JHTML::_( 'form.token' ); ?>
</form>
uploadmarket/view.html.php000064400000007665151161332400011674
0ustar00<?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 uploadmarketViewuploadmarket extends hikamarketView {
	const ctrl = 'upload';
	const name = 'HIKA_UPLOAD';
	const icon = 'upload';

	public function display($tpl = null, $params = array()) {
		$this->params =& $params;
		$fct = $this->getLayout();
		if(method_exists($this, $fct)) {
			if($this->$fct() === false)
				return;
		}
		parent::display($tpl);
	}

	public function sendfile() {
		$uploadConfig = hikaInput::get()->getVar('uploadConfig',
null);
		if(empty($uploadConfig) || !is_array($uploadConfig))
			return false;

		$this->assignRef('uploadConfig', $uploadConfig);
		$uploader = hikaInput::get()->getCmd('uploader',
'');
		$this->assignRef('uploader', $uploader);
		$field = hikaInput::get()->getCmd('field', '');
		$this->assignRef('field', $field);
	}

	public function galleryimage() {
		hikamarket::loadJslib('otree');

		$app = JFactory::getApplication();
		$config = hikamarket::config();
		$this->assignRef('config', $config);
		$shopConfig = hikamarket::config(false);
		$this->assignRef('shopConfig', $shopConfig);

		$this->paramBase =
HIKAMARKET_COMPONENT.'.'.$this->getName().'.gallery';

		$uploadConfig = hikaInput::get()->getVar('uploadConfig',
null);
		if(empty($uploadConfig) || !is_array($uploadConfig))
			return false;
		$this->assignRef('uploadConfig', $uploadConfig);
		$uploader = hikaInput::get()->getCmd('uploader',
'');
		$this->assignRef('uploader', $uploader);
		$field = hikaInput::get()->getCmd('field', '');
		$this->assignRef('field', $field);

		$uploadFolder =
ltrim(JPath::clean(html_entity_decode($shopConfig->get('uploadfolder'))),DS);
		$uploadFolder = rtrim($uploadFolder,DS).DS;
		$basePath = JPATH_ROOT.DS.$uploadFolder.DS;

		$pageInfo = new stdClass();
		$pageInfo->limit = new stdClass();
		$pageInfo->limit->value = $app->getUserStateFromRequest(
$this->paramBase.'.list_limit', 'limit', 20,
'int' );
		$pageInfo->limit->start = $app->getUserStateFromRequest(
$this->paramBase.'.limitstart', 'limitstart', 0,
'int' );
		$pageInfo->search = $app->getUserStateFromRequest(
$this->paramBase.'.search', 'search', '',
'string');

		$this->assignRef('pageInfo', $pageInfo);

		jimport('joomla.filesystem.folder');
		if(!JFolder::exists($basePath))
			JFolder::create($basePath);

		$galleryHelper = hikamarket::get('shop.helper.gallery');
		$galleryHelper->setRoot($basePath);
		$this->assignRef('galleryHelper', $galleryHelper);

		$folder = str_replace('|', '/',
hikaInput::get()->getString('folder', ''));
		$destFolder = rtrim($folder, '/\\');
		if(!$galleryHelper->validatePath($destFolder))
			$destFolder = '';
		if(!empty($destFolder)) $destFolder .= '/';
		$this->assignRef('destFolder', $destFolder);

		$galleryOptions = array(
			'filter' => '.*' .
str_replace(array('.','?','*','$','^'),
array('\.','\?','\*','$','\^'),
$pageInfo->search) . '.*',
			'offset' => $pageInfo->limit->start,
			'length' => $pageInfo->limit->value
		);
		$this->assignRef('galleryOptions', $galleryOptions);

		$treeContent = $galleryHelper->getTreeList(null, $destFolder);
		$this->assignRef('treeContent', $treeContent);

		$dirContent = $galleryHelper->getDirContent($destFolder,
$galleryOptions);
		$this->assignRef('dirContent', $dirContent);

		jimport('joomla.html.pagination');
		$pagination = new JPagination( $galleryHelper->filecount,
$pageInfo->limit->start, $pageInfo->limit->value );
		$this->assignRef('pagination', $pagination);
	}

	public function image_entry() {
		$imageHelper = hikamarket::get('shop.helper.image');
		$this->assignRef('imageHelper', $imageHelper);
		$popup = hikamarket::get('shop.helper.popup');
		$this->assignRef('popup', $popup);
	}
}
vendormarket/index.html000064400000000032151161332400011231
0ustar00<html><body></body></html>vendormarket/tmpl/admin.php000064400000003016151161332400012016
0ustar00<?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');
?><fieldset>
	<div class="toolbar" id="toolbar"
style="float: right;">
		<button class="btn" type="button"
onclick="submitbutton('save_admin');"><img
src="<?php echo HIKASHOP_IMAGES; ?>save.png"/><?php
echo JText::_('OK'); ?></button>
	</div>
</fieldset>
<div class="iframedoc"
id="iframedoc"></div>
<form action="<?php echo
hikamarket::completeLink('vendor', true); ?>"
method="post" name="adminForm"
id="adminForm">
	<table class="admintable" style="width:100%;">
		<tr>
			<td class="key">
				<label for="data[vendor][vendor_admin_id]">
					<?php echo JText::_( 'HIKA_USER' ); ?>
				</label>
			</td>
			<td>
				<?php
				$type = hikamarket::get('shop.type.user');
				echo $type->display('data[vendor][vendor_admin_id]',
hikaInput::get()->getVar('vendor_admin_id', 0));
				?>
			</td>
		</tr>
	</table>
	<input type="hidden"
name="data[vendor][history][history_type]"
value="modification" />
	<input type="hidden" name="data[vendor][vendor_id]"
value="<?php echo @$this->element->vendor_id;?>"
/>
	<input type="hidden" name="option"
value="<?php echo HIKAMARKET_COMPONENT; ?>" />
	<input type="hidden" name="task" value=""
/>
	<input type="hidden" name="ctrl"
value="order" />
	<?php echo JHTML::_( 'form.token' ); ?>
</form>
vendormarket/tmpl/delete.php000064400000005034151161332400012172
0ustar00<?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');
?><h2><?php echo
JText::_('HIKAM_CONFIRM_VENDOR_DELETION'); ?></h2>
<form action="<?php echo
hikamarket::completeLink('vendor'); ?>"
method="post" name="adminForm"
id="adminForm">
<table class="adminlist pad5 table table-striped
table-hover">
	<thead>
		<tr>
			<th class="hikamarket_vendor_num_title title
titlenum"><?php echo
JText::_('HIKA_NUM');?></th>
			<th class="hikamarket_vendor_name_title title"><?php
echo JText::_('HIKA_NAME'); ?></th>
			<th class="hikamarket_vendor_published_title title
titletoggle"><?php echo JText::_('HIKA_PUBLISHED');
?></th>
			<th class="hikamarket_vendor_products_title title
titlenum"><?php echo JText::_('HIKAM_PRODUCTS');
?></th>
			<th class="hikamarket_vendor_orders_title title
titlenum"><?php echo JText::_('HIKAM_ORDERS');
?></th>
			<th class="hikamarket_vendor_userss_title title
titlenum"><?php echo JText::_('HIKAM_USERS');
?></th>
		</tr>
	</thead>
	<tbody>
<?php
$i = 0;
$k = 0;
foreach($this->vendors as $vendor) {
?>
		<tr>
			<td class="hikamarket_vendor_num_value"
align="center"><?php
				echo $i+1;
			?><input type="hidden" value="<?php echo
(int)$vendor->vendor_id; ?>"
name="cid[]"/></td>
			<td class="hikamarket_vendor_name_value"><?php
				echo $this->escape($vendor->vendor_name);
			?></td>
			<td class="hikamarket_vendor_publish_value"
align="center"><?php
				echo $this->toggleClass->display('activate',
$vendor->vendor_published);
			?></td>
			<td class="hikamarket_vendor_products_value"
align="center"><?php
				echo (int)@$vendor->products;
			?></td>
			<td class="hikamarket_vendor_orders_value"
align="center"><?php
				echo (int)@$vendor->orders;
			?></td>
			<td class="hikamarket_vendor_users_value"
align="center"><?php
				echo (int)@$vendor->users;
			?></td>
		</tr>
<?php
	$i++;
	$k = 1 - $k;
}
?>
	</tbody>
</table>
	<input type="hidden" name="confirm"
value="<?php echo $this->confirm_value; ?>" />
	<input type="hidden" name="option"
value="<?php echo HIKAMARKET_COMPONENT; ?>" />
	<input type="hidden" name="task" value=""
/>
	<input type="hidden" name="boxchecked"
value="<?php echo count($this->vendors); ?>" />
	<input type="hidden" name="ctrl"
value="<?php echo hikaInput::get()->getCmd('ctrl');
?>" />
	<?php echo JHTML::_( 'form.token' ); ?>
</form>
vendormarket/tmpl/fees.php000064400000013431151161332400011652
0ustar00<?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
if($this->config->get('market_mode', 'fee') ==
'commission') {
?>
<div style="float:left">
	<h3><?php echo
JText::_('HIKAM_MODE_COMMISSION');?></h3>
</div>
<?php
}
?>
<table class="adminlist table table-striped table-hover"
width="100%">
	<thead>
		<tr>
			<th class="title"><?php echo
JText::_('CURRENCY');?></th>
			<th class="title" style="width:10%"><?php
echo JText::_('MINIMUM_QUANTITY');?></th>
			<th class="title" style="width:10%"><?php
echo JText::_('HIKAM_MINIMUM_PRICE');?></th>
			<th class="title"><?php echo
JText::_('FLAT_FEE');?></th>
			<th class="title"><?php echo
JText::_('FIXED_FEE');?></th>
			<th class="title"><?php echo
JText::_('PERCENT_FEE');?></th>
			<th class="title" style="width:5%"><?php
echo JText::_('GLOBAL_FEE');?></th>
<?php if(!empty($this->fees_show_groups)) { ?>
			<th class="title"><?php echo
JText::_('GROUP_FEE');?></th>
<?php } ?>
			<th class="title" style="width:4%">
				<button class="hikabtn hikabtn-primary hikabtn-mini"
onclick="return marketAddVendorFee();" type="button"
style="margin:0px;"><i class="fas
fa-plus"></i> <?php echo JText::_('ADD');
?></button>
			</th>
		</tr>
	</thead>
	<tbody id="hikamarket_vendor_fees">
<?php
$k = 0;
$cpt = 0;
$formRoot = 'data';
if(!empty($this->formRoot))
	$formRoot = $this->formRoot;
if(!empty($this->fees)) {
	foreach($this->fees as $i => $fee) {
		$global = (substr($fee->fee_type, -7) == '_global');
?>
		<tr class="row<?php echo $k;?>">
			<td><?php
				echo
@$this->currencyType->display($formRoot.'[vendor_fee]['.$i.'][currency]',
@$fee->fee_currency_id);
			?></td>
			<td>
				<input style="width:auto;" size="3"
type="text" name="<?php echo $formRoot;
?>[vendor_fee][<?php echo $i;?>][quantity]"
value="<?php echo @$fee->fee_min_quantity;?>" />
			</td>
			<td>
				<input style="width:auto;" size="5"
type="text" name="<?php echo $formRoot;
?>[vendor_fee][<?php echo $i;?>][min_price]"
value="<?php echo @$fee->fee_min_price;?>" />
			</td>
			<td>
				<input type="hidden" name="<?php echo $formRoot;
?>[vendor_fee][<?php echo $i;?>][id]" value="<?php
echo $fee->fee_id;?>" />
				<input style="width:auto;" size="6"
type="text" name="<?php echo $formRoot;
?>[vendor_fee][<?php echo $i;?>][value]" value="<?php
echo @$fee->fee_value;?>" />
			</td>
			<td>
				<input style="width:auto;" size="6"
type="text" name="<?php echo $formRoot;
?>[vendor_fee][<?php echo $i;?>][fixed]" value="<?php
echo @$fee->fee_fixed;?>" />
			</td>
			<td>
				<input style="width:auto;" size="4"
type="text" name="<?php echo $formRoot;
?>[vendor_fee][<?php echo $i;?>][percent]"
value="<?php echo number_format((float)@$fee->fee_percent,
2);?>" />%
			</td>
			<td>
				<input type="checkbox" name="<?php echo $formRoot;
?>[vendor_fee][<?php echo $i;?>][global]" value="1"
<?php echo $global ? 'checked="checked"
':''; ?>/>
			</td>
<?php if(!empty($this->fees_show_groups) &&
!empty($this->joomlaAclType)) { ?>
			<td><?php
				echo
$this->joomlaAclType->displayList($formRoot.'[vendor_fee]['.$i.'][group]',
@$fee->fee_group);
			?></td>
<?php } ?>
			<td style="text-align:center">
				<a href="#" onclick="hikamarket.deleteRow(this);
return false;"><i class="far
fa-trash-alt"></i></a>
			</td>
		</tr>
<?php
		$k = 1 - $k;
		$cpt = $i;
	}
	$cpt++;
}
?>
		<tr class="row<?php echo $k;?>" 
style="display:none"
id="hikamarket_tpl_vendor_fee">
			<td><?php echo
@$this->currencyType->display('{input_fee_currency}',
0);?></td>
			<td><input style="width:auto;" size="3"
type="text" name="{input_fee_quantity}"
value="" /></td>
			<td><input style="width:auto;" size="5"
type="text" name="{input_fee_min_price}"
value="" /></td>
			<td>
				<input type="hidden" name="{input_fee_id}"
value="" />
				<input style="width:auto;" size="6"
type="text" name="{input_fee_value}" value=""
/>
			</td>
			<td><input style="width:auto;" size="6"
type="text" name="{input_fee_fixed}" value=""
/></td>
			<td><input style="width:auto;" size="4"
type="text" name="{input_fee_percent}"
value="" />%</td>
			<td><input type="checkbox"
name="{input_fee_global}" value="1" /></td>
<?php if(!empty($this->fees_show_groups) &&
!empty($this->joomlaAclType)) { ?>
			<td><?php
				echo
$this->joomlaAclType->displayList('{input_fee_group}', 0);
			?></td>
<?php } ?>
			<td style="text-align:center"><a href="#"
onclick="hikamarket.deleteRow(this); return false;"><i
class="far fa-trash-alt"></i></a></td>
		</tr>
	</tbody>
</table>
<script type="text/javascript">
var hikamarket_product_fee_cpt = <?php echo $cpt;?>;
function marketAddVendorFee(){
	var d = document,
		tbody = d.getElementById('hikamarket_vendor_fees'),
		cpt = hikamarket_product_fee_cpt,
		htmlblocks = {
			input_fee_id: "<?php echo $formRoot;
?>[vendor_fee]["+cpt+"][id]",
			input_fee_currency: "<?php echo $formRoot;
?>[vendor_fee]["+cpt+"][currency]",
			input_fee_quantity: "<?php echo $formRoot;
?>[vendor_fee]["+cpt+"][quantity]",
			input_fee_min_price: "<?php echo $formRoot;
?>[vendor_fee]["+cpt+"][min_price]",
			input_fee_value: "<?php echo $formRoot;
?>[vendor_fee]["+cpt+"][value]",
			input_fee_fixed: "<?php echo $formRoot;
?>[vendor_fee]["+cpt+"][fixed]",
			input_fee_percent: "<?php echo $formRoot;
?>[vendor_fee]["+cpt+"][percent]",
			input_fee_global: "<?php echo $formRoot;
?>[vendor_fee]["+cpt+"][global]",
			input_fee_group: "<?php echo $formRoot;
?>[vendor_fee]["+cpt+"][group]"
		};
	hikamarket.dupRow('hikamarket_tpl_vendor_fee', htmlblocks,
"market_vendor_fee_" + cpt);
	hikamarket_product_fee_cpt++;
	return false;
}
</script>
vendormarket/tmpl/form.php000064400000040422151161332400011673
0ustar00<?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 if(!isset($this->vendor->vendor_id) ||
$this->vendor->vendor_id > 1) { ?>
<div class="iframedoc"
id="iframedoc"></div>
<div id="hikashop_backend_tile_edition">
<?php if((isset($this->vendor->vendor_id) &&
$this->vendor->vendor_id > 1) ||
(!isset($this->vendor->vendor_id) && hikamarket::level(1))) {
?>
	<div id="hikamarket_vendor_edition_header">
		<ul class="hika_tabs"
rel="tabs:hikamarket_product_edition_tab_">
			<li class="active"><a href="#vendor"
rel="tab:1" onclick="return
window.hikashop.switchTab(this);"><?php echo
JText::_('HIKA_VENDOR'); ?></a></li>
<?php if(hikamarket::level(1)) { ?>
			<li><a href="#acl" rel="tab:2"
onclick="return window.hikashop.switchTab(this);"><?php
echo JText::_('ACL'); ?></a></li>
<?php } ?>
<?php if(isset($this->vendor->vendor_id) &&
$this->vendor->vendor_id > 1) { ?>
			<li><a href="#stats" rel="tab:3"
onclick="return window.hikashop.switchTab(this);"><?php
echo JText::_('STATISTICS'); ?></a></li>
<?php } ?>
		</ul>
		<div style="clear:both"></div>
<?php
	}
?>
	</div>
<form action="<?php echo
hikamarket::completeLink('vendor'); ?>"
method="post" name="adminForm" id="adminForm"
enctype="multipart/form-data">
<?php } else { ?>
<div id="hikashop_backend_tile_edition">
<?php } ?>

<script type="text/javascript">
	window.vendorMgr = { cpt:{} };
	window.hikashop.ready(function(){window.hikashop.dlTitle('adminForm');});
</script>

<?php if(isset($this->vendor->vendor_id) &&
$this->vendor->vendor_id > 1) { ?>
	<!-- Product edition : main tab -->
	<div id="hikamarket_product_edition_tab_1">
<?php } ?>
	<div class="hk-row-fluid">

	<div class="hkc-xl-4 hkc-lg-6
hikashop_tile_block"><div>
		<div class="hikashop_tile_title"><?php
			echo JText::_('MAIN_INFORMATION');
		?></div>
		<dl class="hika_options">

			<dt class="hikamarket_vendor_name"><label
for="data[vendor][vendor_name]"><?php echo
JText::_('HIKA_NAME'); ?></label></dt>
			<dd class="hikamarket_vendor_name input_large">
				<input type="text"
name="data[vendor][vendor_name]"
id="data[vendor][vendor_name]" value="<?php echo
$this->escape(@$this->vendor->vendor_name); ?>" />
			</dd>

			<dt class="hikamarket_vendor_email"><label
for="data[vendor][vendor_email]"><?php echo
JText::_('HIKA_EMAIL'); ?></label></dt>
			<dd class="hikamarket_vendor_email input_large">
				<input type="text"
name="data[vendor][vendor_email]"
id="data[vendor][vendor_email]" value="<?php echo
$this->escape(@$this->vendor->vendor_email); ?>" />
			</dd>

<?php
if(!isset($this->vendor->vendor_id) || $this->vendor->vendor_id
> 1) {
?>
			<dt class="hikamarket_vendor_admin"><label
for="data_vendor_vendor_admin_id_text"><?php echo
JText::_('HIKA_ADMINISTRATOR'); ?></label></dt>
			<dd class="hikamarket_vendor_admin"><?php
		echo $this->nameboxType->display(
			'data[vendor][vendor_admin_id]',
			@$this->vendor_admin->user_id,
			hikamarketNameboxType::NAMEBOX_SINGLE,
			'user',
			array(
				'delete' => true,
				'default_text' =>
'<em>'.JText::_('HIKA_NONE').'</em>',
			)
		);
			?></dd>

			<dt class="hikamarket_vendor_published"><label
for="data[vendor][vendor_published]"><?php echo
JText::_('HIKA_PUBLISHED'); ?></label></dt>
			<dd class="hikamarket_vendor_published"><?php
				echo JHTML::_('hikaselect.booleanlist',
'data[vendor][vendor_published]' , '',
@$this->vendor->vendor_published);
			?></dd>

			<dt class="hikamarket_vendor_currency"><label
for="datavendorvendor_currency_id"><?php echo
JText::_('CURRENCY'); ?></label></dt>
			<dd class="hikamarket_vendor_currency"><?php
				echo
$this->currencyType->display("data[vendor][vendor_currency_id]",
@$this->vendor->vendor_currency_id);
			?></dd>

<?php if($this->config->get('allow_zone_vendor', 0)) {
?>
			<dt class="hikamarket_vendor_zone"><label
for="data_vendor_vendor_zone_text"><?php echo
JText::_('ZONE'); ?></label></dt>
			<dd><?php
				echo $this->nameboxType->display(
					'data[vendor][vendor_zone_id]',
					@$this->vendor->vendor_zone_namekey,
					hikamarketNameboxType::NAMEBOX_SINGLE,
					'zone',
					array(
						'delete' => true,
						'default_text' =>
'<em>'.JText::_('HIKA_NONE').'</em>'
					)
				);
			?></dd>
<?php } ?>

<?php
	if(file_exists(JPATH_ADMINISTRATOR.DS.'components'.DS.'com_multisites'.DS.'helpers'.DS.'utils.php'))
{
		include_once(JPATH_ADMINISTRATOR.DS.'components'.DS.'com_multisites'.DS.'helpers'.DS.'utils.php');
		if(class_exists('MultisitesHelperUtils') &&
method_exists('MultisitesHelperUtils',
'getComboSiteIDs')) {
			$comboSiteIDs =
MultisitesHelperUtils::getComboSiteIDs(@$this->vendor->vendor_site_id,
'data[vendor][vendor_site_id]',
JText::_('SELECT_A_SITE'));
			if(!empty($comboSiteIDs)) {
?>
			<dt class="hikamarket_vendor_siteid"><?php echo
JText::_('SITE_ID'); ?></dt>
			<dd class="hikamarket_vendor_siteid"><?php echo
$comboSiteIDs; ?></dd>
<?php
			}
		}
	}
?>

<?php
} // Vendor_id > 1
?>

			<dt class="hikamarket_vendor_templateid"><label
for="data_vendor_vendor_template_id_text"><?php echo
JText::_('VENDOR_PRODUCT_TEMPLATE');
?></label></dt>
			<dd class="hikamarket_vendor_templateid"><?php
				echo $this->nameboxType->display(
					'data[vendor][vendor_template_id]',
					@$this->vendor->vendor_template_id,
					hikamarketNameboxType::NAMEBOX_SINGLE,
					'product_template',
					array(
						'delete' => true,
						'default_text' =>
'<em>'.JText::_('HIKA_NONE').'</em>',
					)
				);
			?></dd>

			<dt><label><?php echo
JText::_('HIKAM_VENDOR_IMAGE'); ?></label></dt>
			<dd>
<?php
	$options = array(
		'upload' => true,
		'gallery' => true,
		'upload_base_url' =>
'index.php?option=com_hikamarket&ctrl=upload',
		'text' =>
JText::_('HIKAM_VENDOR_IMAGE_EMPTY_UPLOAD'),
		'uploader' => array('vendor',
'vendor_image'),
		'vars' => array('vendor_id' =>
(int)@$this->vendor->vendor_id)
	);

	$content = '';
	if(!empty($this->vendor->vendor_image)) {
		$params = new stdClass();
		$params->file_path = @$this->vendor->vendor_image;
		$params->field_name = 'data[vendor][vendor_image]';
		$params->uploader_id = 'hikamarket_vendor_image';
		$params->delete = true;
		$js = '';
		$content = hikamarket::getLayout('uploadmarket',
'image_entry', $params, $js);
	}

echo
$this->uploaderType->displayImageSingle('hikamarket_vendor_image',
$content, $options);
?>
				<input type="hidden" value="1"
name="data_vendor_image"/>
			</dd>

			<dt class="hikamarket_vendor_alias"><label
for="data[vendor][vendor_alias]"><?php echo
JText::_('HIKA_ALIAS'); ?></label></dt>
			<dd class="hikamarket_vendor_alias input_large">
				<input type="text"
name="data[vendor][vendor_alias]"
id="data[vendor][vendor_alias]" value="<?php echo
$this->escape(@$this->vendor->vendor_alias); ?>" />
			</dd>

		</dl>
	</div></div>

<?php
	if(!empty($this->extraFields['vendor'])) {
?>
	<div class="hkc-xl-4 hkc-lg-6
hikashop_tile_block"><div>
		<div class="hikashop_tile_title"><?php
			echo JText::_('FIELDS');
		?></div>
		<dl id="hikamarket_vendor_fields"
class="hika_options">
<?php
		foreach($this->extraFields['vendor'] as $fieldName =>
$oneExtraField) {
?>
		<dl class="hika_options" id="hikamarket_vendor_<?php
echo $oneExtraField->field_namekey; ?>"
style="margin:0;padding:0;">
			<dt class="hikamarket_vendor_<?php echo $fieldName;
?>"><label for="<?php echo $fieldName;
?>"><?php
				echo $this->fieldsClass->getFieldName($oneExtraField);
				if(!empty($oneExtraField->field_required))
					echo ' *';
			?></label></dt>
			<dd class="hikamarket_vendor_<?php echo $fieldName;
?>"><?php
				$onWhat = 'onchange';
				if($oneExtraField->field_type == 'radio')
					$onWhat = 'onclick';
				$oneExtraField->field_required = false;
				echo $this->fieldsClass->display(
					$oneExtraField,
					@$this->vendor->$fieldName,
					'data[vendor]['.$fieldName.']',
					false,
					' ' . $onWhat .
'="hikashopToggleFields(this.value,\''.$fieldName.'\',\'vendor\',0,\'hikamarket_\');"',
					false,
					$this->extraFields['vendor'],
					$this->vendor
				);
			?></dd>
		</dl>
<?php
		}
?>
		</dl>
	</div></div>
<?php
	}
?>

	<div class="hkc-xl-4 hkc-lg-6
hikashop_tile_block"><div>
		<div class="hikashop_tile_title"><?php
			echo JText::_('HIKA_DESCRIPTION');
		?></div>
<?php
		$this->editor->content = @$this->vendor->vendor_description;
		$this->editor->name = 'vendor_description';
		$ret = $this->editor->display();
		if($this->editor->editor == 'codemirror')
			echo str_replace(array('(function()
{'."\n",'})()'."\n"),array('window.hikashop.ready(function(){',
'});'), $ret);
		else
			echo $ret;
?>
		<div style="clear:both"></div>
	</div></div>

	<div class="hkc-xl-clear"></div>

	<div class="hkc-xl-4 hkc-lg-6
hikashop_tile_block"><div>
		<div class="hikashop_tile_title"><?php
			echo JText::_('USERS');
		?></div>
<?php
	$this->setLayout('users');
	echo $this->loadTemplate();
?>
	</div></div>

<?php if(hikamarket::level(1) &&
(!isset($this->vendor->vendor_id) || $this->vendor->vendor_id
> 1)) { ?>
	<div class="hkc-xl-8 hkc-lg-6
hikashop_tile_block"><div>
		<div class="hikashop_tile_title"><?php
			echo JText::_('VENDOR_FEES');
		?></div>
<?php
	$this->setLayout('fees');
	echo $this->loadTemplate();
?>
	</div></div>
<?php } ?>

	<div class="hkc-xl-4 hkc-lg-6
hikashop_tile_block"><div>
		<div class="hikashop_tile_title"><?php
			echo JText::_('VENDOR_OPTIONS');
		?></div>
<?php
	$this->setLayout('options');
	echo $this->loadTemplate();
?>
	</div></div>

	<div class="hkc-xl-4 hkc-lg-6
hikashop_tile_block"><div>
		<div class="hikashop_tile_title"><?php
			echo JText::_('HIKAM_VENDOR_LOCATION');
		?></div>
<dl class="hika_options">
	<dt
class="hikamarket_vendor_location"><label><?php echo
JText::_('HIKAM_VENDOR_LOCATION_LAT');
?></label></dt>
	<dd class="hikamarket_vendor_location">
		<input type="text" id="vendor_location_lat"
name="data[vendor][vendor_location_lat]"
onchange="window.localPage.updateMapMarket();"
value="<?php echo
hikamarket::toFloat(@$this->vendor->vendor_location_lat); ?>"
/>
	</dd>
	<dt
class="hikamarket_vendor_location"><label><?php echo
JText::_('HIKAM_VENDOR_LOCATION_LONG');
?></label></dt>
	<dd class="hikamarket_vendor_location">
		<input type="text" id="vendor_location_lon"
name="data[vendor][vendor_location_long]"
onchange="window.localPage.updateMapMarket();"
value="<?php echo
hikamarket::toFloat(@$this->vendor->vendor_location_long);
?>" />
	</dd>
</dl>
<?php hikamarket::loadJslib('leaflet'); ?>
		<div id="vendor_map" class="map map-vendor"
style="height:200px;"></div>
		<div class="">
			<a href="#clear" class="hikabtn hikabtn-warning"
onclick="return window.localPage.clearLocation(this);"><i
class="fas fa-times-circle"></i> <?php echo
JText::_('HIKAM_MAP_CLEAR'); ?></a>
		</div>
<script type="text/javascript">
var osmUrl =
'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
	osmAttrib = '&copy; <a
href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>
contributors',
	osm = L.tileLayer(osmUrl, {maxZoom: 18, attribution: osmAttrib});
var map = L.map('vendor_map').setView([<?php echo
hikamarket::toFloat(@$this->vendor->vendor_location_lat); ?>,
<?php echo
hikamarket::toFloat(@$this->vendor->vendor_location_long); ?>],
15).addLayer(osm);
var marker = null;
<?php if(!empty($this->vendor->vendor_location_lat) ||
!empty($this->vendor->vendor_location_long)) { ?>
marker = L.marker([<?php echo
hikamarket::toFloat($this->vendor->vendor_location_lat); ?>,
<?php echo
hikamarket::toFloat($this->vendor->vendor_location_long); ?>])
	.addTo(map);
<?php } else { ?>
map.setView([0, 0], 0);
<?php } ?>
map.on('click',function(e){
	window.localPage.setMapMarket(e.latlng);
});
if(!window.localPage) window.localPage = {};
window.localPage.clearLocation = function(btn) {
	var d = document, input =
d.getElementById('vendor_location_lat');
	if(input) input.value = '';
	input = d.getElementById('vendor_location_lon');
	if(input) input.value = '';
	if(marker) marker.remove();
	marker = null;
	map.setView([0, 0], 0);
	btn.blur();
	return false;
};
window.localPage.setMapMarket = function(obj) {
	var d = document, lon = obj.lon ? obj.lon: obj.lng;
	if(!marker)
		marker = L.marker([obj.lat, lon]).addTo(map);
	else
		marker.setLatLng([obj.lat, lon]);
	var zoom = map.getZoom();
	if(zoom <= 1) zoom = 15;
	map.setView([obj.lat, lon], zoom);
	var input = d.getElementById('vendor_location_lat');
	if(input) input.value = obj.lat;
	input = d.getElementById('vendor_location_lon');
	if(input) input.value = lon;
};
window.localPage.updateMapMarket = function() {
	var d = document,
		obj = {lat: 0.0, lon: 0.0},
		input = d.getElementById('vendor_location_lat'),
		val = NaN;
	if(input) val = parseFloat(input.value);
	if(!isNaN(val)) obj.lat = val;
	input = d.getElementById('vendor_location_lon');
	val = NaN;
	if(input) val = parseFloat(input.value);
	if(!isNaN(val)) obj.lon = val;
	window.localPage.setMapMarket(obj);
};
</script>
	</div></div>

	<div class="hkc-xl-4 hkc-lg-6
hikashop_tile_block"><div>
		<div class="hikashop_tile_title"><?php
			echo JText::_('HIKASHOP_CHECKOUT_TERMS');
		?></div>
<?php
		$this->editor->content = @$this->vendor->vendor_terms;
		$this->editor->name = 'vendor_terms';
		$ret = $this->editor->display();
		if($this->editor->editor == 'codemirror')
			echo str_replace(array('(function()
{'."\n",'})()'."\n"),array('window.hikashop.ready(function(){',
'});'), $ret);
		else
			echo $ret;
?>
		<div style="clear:both"></div>
	</div></div>

	</div>
<?php if(isset($this->vendor->vendor_id) &&
$this->vendor->vendor_id > 1) { ?>
	</div>
<?php } ?>

<?php if(hikamarket::level(1) &&
(!isset($this->vendor->vendor_id) || $this->vendor->vendor_id
> 1)) { ?>
	<div id="hikamarket_product_edition_tab_2"
style="display:none;"><div
class="hk-container-fluid">

	<div class="hkc-xl-4 hkc-lg-6
hikashop_tile_block"><div>
		<div class="hikashop_tile_title"><?php echo
JText::_('GROUP'); ?></div>
<?php
		$vendor_group = '';
		if(isset($this->vendor->vendor_group))
			$vendor_group = $this->vendor->vendor_group;
		echo $this->joomlaAcl->display('vendor_group',
$vendor_group, false, false);
?>
	</div></div>

	<div class="hkc-xl-4 hkc-lg-6
hikashop_tile_block"><div>
		<div class="hikashop_tile_title"><?php echo
JText::_('ACL'); ?></div>
<?php
		$acl = '';
		if(!isset($this->vendor->vendor_acl))
			$acl = '';
		else
			$acl = $this->vendor->vendor_acl;
		echo $this->marketaclType->display('vendor_access', $acl,
'vendor_access_inherit');
?>
	</div></div>

	</div></div>
<?php } ?>

	<div style="clear:both"
class="clr"></div>
<?php if(!isset($this->vendor->vendor_id) ||
$this->vendor->vendor_id > 1) { ?>
	<input type="hidden" name="cid[]"
value="<?php echo @$this->vendor->vendor_id; ?>"
/>
	<input type="hidden" name="option"
value="<?php echo HIKAMARKET_COMPONENT; ?>" />
	<input type="hidden" name="task" value=""
/>
	<input type="hidden" name="ctrl"
value="<?php echo hikaInput::get()->getCmd('ctrl');
?>" />
	<?php echo JHTML::_( 'form.token' ); ?>
</form>
<?php } ?>

<?php if(isset($this->vendor->vendor_id) &&
$this->vendor->vendor_id > 1) { ?>
	<div id="hikamarket_product_edition_tab_3"
style="display:none;"><div
class="hk-container-fluid">

	<div class="hkc-xl-12 hkc-lg-12
hikashop_tile_block"><div>
		<div class="hikashop_tile_title"><?php echo
JText::_('ORDERS'); ?> - <span class="hk-label
hk-label-blue"><?php echo $this->orders_count;
?></span></div>
<?php
	$this->setLayout('orders');
	echo $this->loadTemplate();
?>
	</div></div>

	<div class="hkc-xl-6 hkc-lg-6
hikashop_tile_block"><div>
		<div class="hikashop_tile_title"><?php echo
JText::_('VENDOR_INVOICES'); ?> - <span
class="hk-label hk-label-blue"><?php echo
$this->invoices_count; ?></span></div>
<?php
	$this->setLayout('invoices');
	echo $this->loadTemplate();
?>
	</div></div>

	<div class="hkc-xl-6 hkc-lg-6
hikashop_tile_block"><div>
		<div class="hikashop_tile_title"><?php echo
JText::_('PRODUCTS'); ?> - <span class="hk-label
hk-label-blue"><?php echo $this->products_count;
?></span></div>
<?php
	$this->setLayout('products');
	echo $this->loadTemplate();
?>
	</div></div>

	</div></div>
<?php } ?>
</div>
vendormarket/tmpl/index.html000064400000000032151161332400012205
0ustar00<html><body></body></html>vendormarket/tmpl/invoices.php000064400000011202151161332400012541
0ustar00<?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 if( !isset($this->embbed) ) { ?>
<div class="iframedoc"
id="iframedoc"></div>
<div>
<form action="<?php echo
hikamarket::completeLink('vendor&task=invoices'); ?>"
method="post" name="adminForm" id="adminForm"
enctype="multipart/form-data">

<div class="hk-row-fluid">
	<div class="hkc-md-6">
<?php
	echo $this->loadHkLayout('search', array(
		'id' => 'adminForm'
	));
?>
	</div>
	<div class="hkc-md-6">
		<!-- Filters -->
	</div>
</div>
<?php } else { ?>
<div style="float:right;margin:3px;">
	<a class="hikabtn hikabtn-info" href="<?php echo
hikamarket::completeLink('shop.order&order_type=vendorpayment&filter_vendor='.$this->vendor_id.'&cancel_redirect='.$this->cancelUrl);
?>">
		<i class="fa fa-chevron-right"></i> <?php echo
JText::_('SEE_ALL');?>
	</a>
</div>
<?php } ?>
	<table class="adminlist pad5 table table-striped table-hover"
style="width:100%">
		<thead>
			<tr>
<?php if(!isset($this->embbed)) { ?>
				<th class="hikamarket_order_num_title title
titlenum"><?php
					echo JHTML::_('grid.sort', JText::_('HIKA_NUM'),
'a.order_id', $this->pageInfo->filter->order->dir,
$this->pageInfo->filter->order->value);
				?></th>
<?php } ?>
				<th class="hikamarket_order_id_title title"><?php
					if(isset($this->embbed))
						echo JText::_('ORDER_NUMBER');
					else
						echo JHTML::_('grid.sort',
JText::_('ORDER_NUMBER'), 'a.order_number',
$this->pageInfo->filter->order->dir,
$this->pageInfo->filter->order->value);
				?></th>
				<th class="hikamarket_order_status_title
title"><?php
					if(isset($this->embbed))
						echo JText::_('ORDER_STATUS');
					else
						echo JHTML::_('grid.sort',
JText::_('ORDER_STATUS'), 'a.order_status',
$this->pageInfo->filter->order->dir,
$this->pageInfo->filter->order->value);
				?></th>
				<th class="hikamarket_order_date_title title"><?php
					if(isset($this->embbed))
						echo JText::_('DATE');
					else
						echo JHTML::_('grid.sort', JText::_('DATE'),
'a.order_modified',
$this->pageInfo->filter->order->dir,
$this->pageInfo->filter->order->value);
				?></th>
				<th class="hikamarket_order_total_title
title"><?php
					if(isset($this->embbed))
						echo JText::_('HIKASHOP_TOTAL');
					else
						echo JHTML::_('grid.sort',
JText::_('HIKASHOP_TOTAL'), 'a.order_full_price',
$this->pageInfo->filter->order->dir,
$this->pageInfo->filter->order->value);
				?></th>
			</tr>
		</thead>
<?php if(!isset($this->embbed)) { ?>
		<tfoot>
			<tr>
				<td colspan="5">
					<?php echo $this->pagination->getListFooter(); ?>
					<?php echo $this->pagination->getResultsCounter(); ?>
				</td>
			</tr>
		</tfoot>
<?php } ?>
		<tbody>
<?php
$k = 0;
$i = 0;
foreach($this->invoices as $invoice) {
?>
			<tr class="row<?php echo $k; ?>">
<?php if(!isset($this->embbed)) { ?>
				<td class="hikamarket_order_num_value"><?php
					echo $this->pagination->getRowOffset($i);
				?></td>
<?php } ?>
				<td class="hikamarket_order_id_value"
align="center">
					<a href="<?php echo
hikamarket::completeLink('shop.order&task=edit&cid[]='.$invoice->order_id.'&cancel_redirect='.$this->cancelUrl);
?>"><?php echo $invoice->order_number; ?></a>
				</td>
				<td class="hikamarket_order_status_value"><span
class="order-label order-label-<?php echo
preg_replace('#[^a-z_0-9]#i', '_', str_replace('
','_',$invoice->order_status)); ?>"><?php
					echo hikamarket::orderStatus($invoice->order_status);
				?></span></td>
				<td class="hikamarket_order_date_value"><?php
					echo hikamarket::getDate($invoice->order_created,'%Y-%m-%d
%H:%M');
				?></td>
				<td class="hikamarket_order_total_value"><?php
					echo
$this->currencyHelper->format($invoice->order_full_price,
$invoice->order_currency_id);
				?></td>
			</tr>
<?php
	$i++;
	$k = 1 - $k;
}
?>
		</tbody>
	</table>
<?php if( !isset($this->embbed) ) { ?>
	<input type="hidden" name="option"
value="<?php echo HIKAMARKET_COMPONENT; ?>" />
	<input type="hidden" name="task"
value="invoices" />
	<input type="hidden" name="ctrl"
value="<?php echo hikaInput::get()->getCmd('ctrl');
?>" />
	<input type="hidden" name="boxchecked"
value="0" />
	<input type="hidden" name="filter_order"
value="<?php echo
$this->pageInfo->filter->order->value; ?>" />
	<input type="hidden" name="filter_order_dir"
value="<?php echo $this->pageInfo->filter->order->dir;
?>" />
	<?php echo JHTML::_( 'form.token' ); ?>
</form>
</div>
<?php } ?>
vendormarket/tmpl/listing.php000064400000011542151161332400012402
0ustar00<?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');
?><div class="iframedoc"
id="iframedoc"></div>
<form action="<?php echo
hikamarket::completeLink('vendor'); ?>"
method="post" name="adminForm"
id="adminForm">
<div class="hk-row-fluid">
	<div class="hkc-md-6">
<?php
	echo $this->loadHkLayout('search', array(
		'id' => 'adminForm'
	));
?>
	</div>
	<div class="hkc-md-6">
		<!-- Filters -->
<?php
	$values = array(
		JHTML::_('select.option', 0,
JText::_('ALL_VENDORS')),
		JHTML::_('select.option', 1,
JText::_('HIKAM_VENDORS_WITH_UNPAID_ORDERS')),
	);
	echo JHTML::_('select.genericlist', $values,
'filter_vendors_unpaid', '
onchange="this.form.submit();"', 'value',
'text', @$this->pageInfo->filter->vendors_unpaid);
?>
	</div>
</div>

	<table class="adminlist table table-striped table-hover">
		<thead>
			<tr>
				<th class="hikamarket_vendor_num_title title
titlenum"><?php echo JText::_( 'HIKA_NUM'
);?></th>
				<th class="hikamarket_vendor_select_title title
titlebox">
					<input type="checkbox" name="toggle"
value="" onclick="hikashop.checkAll(this);" />
				</th>
				<th class="hikamarket_vendor_name_title
title"><?php
					echo JHTML::_('grid.sort', JText::_('HIKA_NAME'),
'a.vendor_name', $this->pageInfo->filter->order->dir,
$this->pageInfo->filter->order->value);
				?></th>
				<th class="hikamarket_vendor_email_title
title"><?php
					echo JHTML::_('grid.sort', JText::_('HIKA_EMAIL'),
'a.vendor_email',
$this->pageInfo->filter->order->dir,
$this->pageInfo->filter->order->value);
				?></th>
				<th class="title titletoggle"><?php
					if($this->config->get('market_mode','fee')
== 'fee') {
						echo JText::_('ORDERS_UNPAID');
					} else {
						echo JText::_('ORDERS_UNINVOICED');
					}
				?></th>
				<th class="title titletoggle"><?php
					echo JHTML::_('grid.sort',
JText::_('HIKA_PUBLISHED'), 'a.vendor_published',
$this->pageInfo->filter->order->dir,
$this->pageInfo->filter->order->value);
				?></th>
				<th class="hikamarket_vendor_id_title title"><?php
					echo JHTML::_('grid.sort', JText::_('ID'),
'a.vendor_id', $this->pageInfo->filter->order->dir,
$this->pageInfo->filter->order->value);
				?></th>
			</tr>
		</thead>
		<tfoot>
			<tr>
				<td colspan="7">
					<?php echo $this->pagination->getListFooter(); ?>
					<?php echo $this->pagination->getResultsCounter(); ?>
				</td>
			</tr>
		</tfoot>
		<tbody>
<?php
$myUrl =
urlencode(base64_encode(hikamarket::completeLink('vendor', false,
true, true)));
$k = 0;
for($i = 0,$a = count($this->rows); $i < $a; $i++) {
	$row =& $this->rows[$i];
?>
		<tr class="row<?php echo $k; ?>">
			<td class="hikamarket_vendor_num_value"
align="center"><?php
				echo $this->pagination->getRowOffset($i);
			?></td>
			<td class="hikamarket_vendor_select_value"><?php
				echo JHTML::_('grid.id', $i, $row->vendor_id );
			?></td>
			<td class="hikamarket_vendor_name_value">
				<a href="<?php echo
hikamarket::completeLink('vendor&task=edit&cid[]='.$row->vendor_id.'&cancel_redirect='.$myUrl);
?>"><?php echo $this->escape($row->vendor_name);
?></a>
			</td>
			<td class="hikamarket_vendor_email_value"><?php
				echo $this->escape($row->vendor_email);
			?></td>
			<td class="hikamarket_vendor_unpaid_value"><?php
				if($this->config->get('market_mode','fee') ==
'fee') {
					echo $row->number_unpaid . ' - ' .
$this->currencyClass->format($row->price_unpaid,
$row->vendor_currency_id);
				} else {
					echo $row->number_unpaid . ' - ' .
$this->currencyClass->format($row->price_full -
$row->price_unpaid, $row->vendor_currency_id);
				}
			?></td>
			<td class="hikamarket_vendor_publish_value"
align="center"><?php
				$publishedid = 'vendor_published-'.$row->vendor_id;
				if($this->manage) {
					echo $this->toggleClass->toggle($publishedid,
(int)$row->vendor_published, 'vendor');
				} else {
					echo $this->toggleClass->display('activate',
$row->vendor_published);
				}
			?></td>
			<td class="hikamarket_vendor_id_value"
align="center"><?php
				echo (int)$row->vendor_id;
			?></td>
		</tr>
<?php
	$k = 1 - $k;
}
?>
		</tbody>
	</table>
	<input type="hidden" name="option"
value="<?php echo HIKAMARKET_COMPONENT; ?>" />
	<input type="hidden" name="task"
value="<?php echo @$this->task; ?>" />
	<input type="hidden" name="ctrl"
value="<?php echo hikaInput::get()->getCmd('ctrl');
?>" />
	<input type="hidden" name="boxchecked"
value="0" />
	<input type="hidden" name="filter_order"
value="<?php echo
$this->pageInfo->filter->order->value; ?>" />
	<input type="hidden" name="filter_order_Dir"
value="<?php echo $this->pageInfo->filter->order->dir;
?>" />
	<?php echo JHTML::_( 'form.token' ); ?>
</form>
vendormarket/tmpl/options.php000064400000010276151161332400012427
0ustar00<?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');
?><dl class="hika_options">
<?php
if((int)$this->config->get('vendor_chroot_category', 0) ==
2) { ?>
	<dt class="hikamarket_vendor_opt_root"><label
for="data[vendor][vendor_params][vendor_root_category]"><?php
echo JText::_('HIKAM_VENDOR_ROOT_CATEGORY');
?></label></dt>
	<dd class="hikamarket_vendor_opt_root"><?php
		echo $this->nameboxType->display(
			'data[vendor][vendor_params][vendor_root_category]',
			@$this->vendor->vendor_params->vendor_root_category,
			hikamarketNameboxType::NAMEBOX_SINGLE,
			'category',
			array(
				'delete' => true,
				'default_text' =>
'<em>'.JText::_('HIKA_NONE').'</em>'
			)
		);
	?></dd>
<?php } ?>
<?php if(empty($this->vendor->vendor_id) ||
$this->vendor->vendor_id > 1) { ?>
	<dt class="hikamarket_vendor_opt_invoice"><label
for="data_vendor_vendor_params_invoice_number_format"><?php
echo JText::_('INVOICE_NUMBER_FORMAT');
?></label></dt>
	<dd class="hikamarket_vendor_opt_invoice"><?php
		if(hikashop_level(1)) {
			$format =
@$this->vendor->vendor_params->invoice_number_format;
			?><input class="inputbox" type="text"
name="data[vendor][vendor_params][invoice_number_format]"
value="<?php echo $this->escape($format); ?>"
id="data_vendor_vendor_params_invoice_number_format"/><?php
		} else {
			echo '<small
style="color:red">'.JText::_('ONLY_HIKASHOP_COMMERCIAL').'</small>';
		}
	?></dd>
<?php } ?>

	<dt class="hikamarket_vendor_opt_paypal"><label
for="data_vendor_vendor_params_paypal_email"><?php echo
JText::_('PAYPAL_EMAIL'); ?></label></dt>
	<dd class="hikamarket_vendor_opt_paypal">
		<input type="text"
name="data[vendor][vendor_params][paypal_email]"
value="<?php echo
@$this->vendor->vendor_params->paypal_email; ?>"
id="data_vendor_vendor_params_paypal_email"/>
	</dd>

	<dt class="hikamarket_vendor_opt_productlimit"><label
for="data_vendor_vendor_params_product_limitation"><?php
echo JText::_('VENDOR_PRODUCT_LIMITATION');
?></label></dt>
	<dd class="hikamarket_vendor_opt_productlimit">
		<input type="text"
name="data[vendor][vendor_params][product_limitation]"
value="<?php echo $this->escape(
@$this->vendor->vendor_params->product_limitation ); ?>"
id="data_vendor_vendor_params_product_limitation"/>
	</dd>

	<dt class="hikamarket_vendor_opt_notif"><label
for="data_vendor_vendor_params_notif_order_statuses_text"><?php
echo JText::_('HIKAM_NOTIFICATION_STATUSES_FILTER');
?></label></dt>
	<dd class="hikamarket_vendor_opt_notif"><?php
		if(!empty($this->vendor->vendor_params->notif_order_statuses)
&&
is_string($this->vendor->vendor_params->notif_order_statuses)) {
			$this->vendor->vendor_params->notif_order_statuses =
explode(',',
$this->vendor->vendor_params->notif_order_statuses);
			foreach($this->vendor->vendor_params->notif_order_statuses as
&$status) {
				$status = trim($status);
			}
			unset($status);
		}
		echo $this->nameboxType->display(
			'data[vendor][vendor_params][notif_order_statuses]',
			@$this->vendor->vendor_params->notif_order_statuses,
			hikamarketNameboxType::NAMEBOX_MULTIPLE,
			'order_status',
			array(
				'delete' => true,
				'sort' => false,
				'default_text' =>
'<em>'.JText::_('HIKA_NONE').'</em>',
				'force_data' => true
			)
		);
	?></dd>

	<dt class="hikamarket_vendor_opt_extracat"><label
for="data_vendor_vendor_params_extra_categories_text"><?php
echo JText::_('HIKAM_VENDOR_EXTRA_CATEGORIES');
?></label></dt>
	<dd class="hikamarket_vendor_opt_extracat"><?php
		$extra_categories = array();
		if(!empty($this->vendor->vendor_params->extra_categories))
			$extra_categories = explode(',',
$this->vendor->vendor_params->extra_categories);
		echo $this->nameboxType->display(
			'data[vendor][vendor_params][extra_categories]',
			$extra_categories,
			hikamarketNameboxType::NAMEBOX_MULTIPLE,
			'category',
			array(
				'delete' => true,
				'root' => 0,
				'sort' => true,
				'default_text' =>
'<em>'.JText::_('HIKA_NONE').'</em>',
				'force_data' => true
			)
		);
	?></dd>
</dl>
vendormarket/tmpl/orders.php000064400000012707151161332400012233
0ustar00<?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 if( !isset($this->embbed) ) { ?>
<div class="iframedoc"
id="iframedoc"></div>
<div>
<form action="<?php echo
hikamarket::completeLink('vendor&task=orders'); ?>"
method="post" name="adminForm" id="adminForm"
enctype="multipart/form-data">

<div class="hk-row-fluid">
	<div class="hkc-md-12">
<?php
	echo $this->loadHkLayout('search', array(
		'id' => 'adminForm'
	));
?>
	</div>
	<div class="hkc-md-12">
		<!-- Filters -->
	</div>
</div>
<?php } else { ?>
<div style="float:right; margin:3px;">
	<a class="hikabtn hikabtn-info" href="<?php echo
hikamarket::completeLink("shop.order&order_type=sale&filter_vendor=".$this->vendor_id.'&cancel_redirect='.$this->cancelUrl);
?>">
		<i class="fa fa-chevron-right"></i> <?php echo
JText::_('SEE_ALL');?>
	</a>
</div>
<?php } ?>
	<table class="adminlist pad5 table table-striped table-hover"
style="width:100%">
		<thead>
			<tr>
<?php if(!isset($this->embbed)) { ?>
				<th class="hikamarket_order_num_title title
titlenum"><?php
					echo JHTML::_('grid.sort', JText::_('HIKA_NUM'),
'a.order_id', $this->pageInfo->filter->order->dir,
$this->pageInfo->filter->order->value);
				?></th>
<?php } ?>
				<th class="hikamarket_order_id_title title"><?php
					if(isset($this->embbed))
						echo JText::_('ORDER_NUMBER');
					else
						echo JHTML::_('grid.sort',
JText::_('ORDER_NUMBER'), 'a.order_number',
$this->pageInfo->filter->order->dir,
$this->pageInfo->filter->order->value);
				?></th>
				<th class="hikamarket_order_customer_title
title"><?php
					if(isset($this->embbed))
						echo JText::_('CUSTOMER');
					else
						echo JHTML::_('grid.sort', JText::_('CUSTOMER'),
'c.name', $this->pageInfo->filter->order->dir,
$this->pageInfo->filter->order->value);
				?></th>
				<th class="hikamarket_order_status_title
title"><?php
					if(isset($this->embbed))
						echo JText::_('ORDER_STATUS');
					else
						echo JHTML::_('grid.sort',
JText::_('ORDER_STATUS'), 'a.order_status',
$this->pageInfo->filter->order->dir,
$this->pageInfo->filter->order->value);
				?></th>
				<th class="hikamarket_order_date_title title"><?php
					if(isset($this->embbed))
						echo JText::_('DATE');
					else
						echo JHTML::_('grid.sort', JText::_('DATE'),
'a.order_modified',
$this->pageInfo->filter->order->dir,
$this->pageInfo->filter->order->value);
				?></th>
				<th class="hikamarket_order_vendor_total_title
title"><?php
					if(isset($this->embbed))
						echo JText::_('VENDOR_TOTAL');
					else
						echo JHTML::_('grid.sort',
JText::_('VENDOR_TOTAL'), 'a.order_vendor_price',
$this->pageInfo->filter->order->dir,
$this->pageInfo->filter->order->value);
				?></th>
				<th class="hikamarket_order_total_title
title"><?php
					if(isset($this->embbed))
						echo JText::_('HIKASHOP_TOTAL');
					else
						echo JHTML::_('grid.sort',
JText::_('HIKASHOP_TOTAL'), 'a.order_full_price',
$this->pageInfo->filter->order->dir,
$this->pageInfo->filter->order->value);
				?></th>
			</tr>
		</thead>
<?php if(!isset($this->embbed)) { ?>
		<tfoot>
			<tr>
				<td colspan="7">
					<?php echo $this->pagination->getListFooter(); ?>
					<?php echo $this->pagination->getResultsCounter(); ?>
				</td>
			</tr>
		</tfoot>
<?php } ?>
		<tbody>
<?php
$k = 0;
$i = 0;
foreach($this->orders as $order) {
?>
			<tr class="row<?php echo $k; ?>">
<?php if(!isset($this->embbed)) { ?>
				<td class="hikamarket_order_num_value"><?php
					echo $this->pagination->getRowOffset($i);
				?></td>
<?php } ?>
				<td class="hikamarket_order_id_value">
					<a href="<?php echo
hikamarket::completeLink('shop.order&task=edit&cid[]='.$order->order_id.'&cancel_redirect='.$this->cancelUrl);
?>"><?php echo $order->order_number; ?></a>
				</td>
				<td class="hikamarket_order_customer_value"><?php
					echo $order->user_email;
				?></td>
				<td class="hikamarket_order_status_value"><span
class="order-label order-label-<?php echo
preg_replace('#[^a-z_0-9]#i', '_', str_replace('
','_',$order->order_status)); ?>"><?php
					echo hikamarket::orderStatus($order->order_status);
				?></span></td>
				<td class="hikamarket_order_date_value"><?php
					echo hikamarket::getDate($order->order_created,'%Y-%m-%d
%H:%M');
				?></td>
				<td
class="hikamarket_order_vendor_total_value"><?php
					echo
$this->currencyHelper->format($order->order_vendor_price,
$order->order_currency_id);
				?></td>
				<td class="hikamarket_order_total_value"><?php
					echo $this->currencyHelper->format($order->order_full_price,
$order->order_currency_id);
				?></td>
			</tr>
<?php
	$i++;
	$k = 1 - $k;
}
?>
		</tbody>
	</table>
<?php if( !isset($this->embbed) ) { ?>
	<input type="hidden" name="option"
value="<?php echo HIKAMARKET_COMPONENT; ?>" />
	<input type="hidden" name="task"
value="orders" />
	<input type="hidden" name="ctrl"
value="<?php echo hikaInput::get()->getCmd('ctrl');
?>" />
	<input type="hidden" name="boxchecked"
value="0" />
	<input type="hidden" name="filter_order"
value="<?php echo
$this->pageInfo->filter->order->value; ?>" />
	<input type="hidden" name="filter_order_dir"
value="<?php echo $this->pageInfo->filter->order->dir;
?>" />
	<?php echo JHTML::_( 'form.token' ); ?>
</form>
</div>
<?php } ?>
vendormarket/tmpl/pay.php000064400000024553151161332400011530
0ustar00<?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');
?><div class="iframedoc"
id="iframedoc"></div>
<form action="<?php echo
hikamarket::completeLink('vendor'); ?>"
method="post" name="adminForm"
id="adminForm">
<?php
	if(!empty($this->orders)) {
?>
<div id="hikashop_backend_tile_edition">
<div class="hk-row-fluid">

	<div class="hkc-md-2 hikashop_tile_block hkc-md-last
"><div>
		<div class="hikashop_tile_title"><?php
			echo JText::_('PAY_RESULT');
		?></div>
		<dl class="hikamarket_pay_result">
			<dt><?php echo JText::_('HIKASHOP_TOTAL');
?></dt>
			<dd><span id="hikamarket_pay_total"><?php echo
$this->currencyHelper->format(0,
$this->vendor->vendor_currency_id); ?></span></dd>

			<dt><?php echo JText::_('HIKA_TYPE');
?></dt>
			<dd><span id="hikamarket_pay_type"><?php
				echo JText::_('HIKA_NONE');
			?></span></dd>
		</dl>
	</div></div>

	<div class="hkc-md-10 hikashop_tile_block"><div>
		<div class="hikashop_tile_title"><?php
			echo JText::_('ORDERS');
		?></div>
<table class="adminlist pad5 table table-striped table-hover"
style="width:100%">
	<thead>
		<tr>
			<th class="title titlebox"><input
type="checkbox" name="toggle" value=""
onclick="window.localPage.updateVendorTotal(this);"
/></th>
			<th class="hikamarket_order_id_title title"><?php
				echo JText::_('ORDER_NUMBER');
			?></th>
			<th class="hikamarket_order_customer_title
title"><?php
				echo JText::_('CUSTOMER');
			?></th>
			<th class="hikamarket_order_status_title
title"><?php
				echo JText::_('ORDER_STATUS');
			?></th>
			<th class="hikamarket_order_date_title title"><?php
				echo JText::_('DATE');
			?></th>
			<th class="hikamarket_order_total_title title"><?php
				echo JText::_('HIKASHOP_TOTAL');
			?></th>
			<th class="hikamarket_order_vendor_total_title
title"><?php
				echo JText::_('VENDOR_TOTAL');
			?></th>
		</tr>
	</thead>
	<tbody>
<?php
		$k = 0;
		$i = 0;
		foreach($this->orders as $order) {
?>
		<tr class="row<?php echo $k; ?>"
onclick="if(window.localPage.cancelRow) {window.localPage.cancelRow =
false; return false;} hikamarket.checkRow('cb<?php echo $i;
?>'); window.localPage.getVendorTotal();">
			<td align="center">
				<input type="checkbox"
onchange="if(window.hkmCA&&window.hkmCA===true){return true;}
window.localPage.getVendorTotal()"
onclick="if(window.hkmCA&&window.hkmCA===true){return true;}
this.clicked=true; this.checked=!this.checked" value="<?php
echo $order->order_transaction_id;?>" name="orders[]"
id="cb<?php echo $i;?>"/>
			</td>
			<td class="hikamarket_order_id_value"
align="center">
				<a onclick="return window.localPage.openInvoice(this, <?php
echo (int)$order->order_id; ?>);" href="<?php echo
hikamarket::completeLink('shop.order&task=edit&cid[]='.$order->order_id.'&cancel_redirect='.$this->cancelUrl);
?>"><?php
					if(!empty($order->order_number)) {
						echo $order->order_number;
					} else {
						echo '<em>' . JText::_('HIKA_NONE') .
'</em>';
					}
				?></a>
<?php
			if((int)$order->order_transaction_valid == 2)
				echo ' - ' . JText::_('HIKAM_ORDER_ADJUSTMENT');
?>
			</td>
			<td class="hikamarket_order_customer_value"><label
for"cb<?php echo $i; ?>"><?php
				echo $order->user_email;
			?></label></td>
			<td class="hikamarket_order_status_value"><?php
				echo $order->order_transaction_status;
			?></td>
			<td class="hikamarket_order_date_value"><?php
				echo hikamarket::getDate($order->order_transaction_created,
'%Y-%m-%d %H:%M');
			?></td>
			<td class="hikamarket_order_total_value"><?php
				if($order->order_full_price !== null)
					echo $this->currencyHelper->format($order->order_full_price,
$order->order_currency_id);
			?></td>
			<td
class="hikamarket_order_vendor_total_value"><?php
				if($this->feeMode || $order->order_transaction_price < 0 ||
$order->order_full_price === null)
					$convertedPrice =
$this->currencyHelper->convertUniquePrice($order->order_transaction_price,
$order->order_transaction_currency_id,
$this->vendor->vendor_currency_id);
				else
					$convertedPrice =
$this->currencyHelper->convertUniquePrice($order->order_full_price
- $order->order_transaction_price,
$order->order_transaction_currency_id,
$this->vendor->vendor_currency_id);

				echo $this->currencyHelper->format($convertedPrice,
$this->vendor->vendor_currency_id);
			?><div id="vendorTotalInCurrency<?php echo $i;?>"
style="display:none;"><?php
				echo $convertedPrice;
			?></div></td>
		</tr>
<?php
			$i++;
			$k = 1 - $k;
		}
?>
	</tbody>
</table>
	</div></div>
</div>

<script type="text/javascript">
if(!window.localPage)
	window.localPage = {};
window.localPage.triggerVendorTotal = null;
window.localPage.getVendorTotal = function(updateCheck) {
	if(window.localPage.triggerVendorTotal != null)
		clearTimeout(window.localPage.triggerVendorTotal);
	if(updateCheck === undefined)
		updateCheck = false;

	window.localPage.triggerVendorTotal = setTimeout(function() {
		var d = document, chk = null, cpt = 0, total = 0, url = "";
		for(var i = <?php echo count($this->orders) - 1; ?>; i >= 0;
i--) {
			chk = d.getElementById('cb'+i);
			if(chk && chk.checked) {
				cpt++;
				var div = d.getElementById("vendorTotalInCurrency" + i);
				if(div) {
					var v = parseFloat(div.innerHTML);
					if(!isNaN(v))
						total += v;
				}
			}
		}
		if(updateCheck) {
			if(document.adminForm.form)
				document.adminForm.form.boxchecked = cpt;
			else
				document.adminForm.boxchecked = cpt;
		}
		var urlTotal = total;
		if(urlTotal < 0)
			urlTotal = -urlTotal;
		url = "<?php echo
hikamarket::completeLink('vendor&task=getPrice&currency_id='.$this->vendor->vendor_currency_id,
true, false, true); ?>&value=" + urlTotal;
		window.Oby.xRequest(url, {update: "hikamarket_pay_total"},
function(xhr){
			var el = document.getElementById("hikamarket_pay_type");
			if(total == 0) {
				el.innerHTML = "<?php echo JText::_('HIKA_NONE',
true); ?>";
			} else if(total > 0) {
				el.innerHTML = "<?php echo JText::_('ORDER', true);
?>";
			} else {
				el.innerHTML = "<?php echo JText::_('INVOICE', true);
?>";
			}
		});
	}, 500 );
};
window.localPage.updateVendorTotal = function(el) {
	window.hkmCA=true;
	hikashop.checkAll(el);
	window.hkmCA=false;
	setTimeout(function(){ window.localPage.getVendorTotal(); }, 10);
	return true;
};
(function(){ window.localPage.getVendorTotal(true); })();
</script>

	<input type="hidden" name="boxchecked"
value="0" />
	<input type="hidden" name="cid"
value="<?php echo @$this->vendor->vendor_id; ?>"
/>
<?php
	} else {
?>
<!-- FILTERS -->
<div>
	<label for="period_start"><?php echo
JText::_('FROM'); ?></label>
	<?php echo JHTML::_('calendar',
hikamarket::getDate((@$this->pageInfo->filter->filter_start ?
@$this->pageInfo->filter->filter_start:''), '%d %B
%Y'), 'filter_start', 'period_start',
'%Y-%m-%d', array('size' => '10')); ?>
	<label for="period_end"><?php echo
JText::_('TO'); ?></label>
	<?php echo JHTML::_('calendar',
hikamarket::getDate((@$this->pageInfo->filter->filter_end ?
@$this->pageInfo->filter->filter_end:''), '%d %B
%Y'), 'filter_end', 'period_end',
'%Y-%m-%d', array('size' => '10')); ?>

	<button style="vertical-align:top" class="btn
btn-success" onclick="this.form.submit();"><?php
		if(HIKASHOP_BACK_RESPONSIVE)
			echo '<span
class="icon-filter"></span>';
		else
			echo JText::_('APPLY');
	?></button>
</div>

	<table class="adminlist pad5 table table-striped table-hover"
style="width:100%">
		<thead>
			<tr>
				<th class="title titlebox"></th>
				<th class="hikamarket_pay_vendor_title title"><?php
					echo JText::_('VENDOR_NAME');
				?></th>
				<th class="hikamarket_pay_orders_title title"><?php
					echo JText::_('ORDERS_UNPAID');
				?></th>
				<th class="hikamarket_order_vendor_total_title
title"><?php
					echo JText::_('VENDOR_TOTAL');
				?></th>
				<th class="title titlebox"></th>
			</tr>
		</thead>
		<tbody>
<?php
		$nb_valid_vendors = 0;
		$i = 0;
		$k = 0;
		foreach($this->vendors as $vendor) {
			if($vendor->nb_orders > 0)
				$nb_valid_vendors++;
?>
			<tr class="row<?php echo $k; ?>">
				<td><?php
					echo $this->toggleHelper->display('activate',
$vendor->vendor_published);
				?></td>
				<td><?php
					echo $vendor->vendor_name;
				?></td>
				<td><?php
					echo $vendor->nb_orders;
				?></td>
				<td><?php
					echo
$this->currencyHelper->format($vendor->total_vendor_price,
$vendor->vendor_currency_id);
				?></td>
				<td>
					<input type="hidden" name="cid[]"
value="<?php echo (int)$vendor->vendor_id; ?>" />
					<a href="#delete" onclick="return
window.localPage.deleteVendorRow(this);"><img src="<?php
echo HIKAMARKET_IMAGES; ?>icon-16/delete.png"
alt="X"/></a>
				</td>
			</tr>
<?php
			$k = 1 - $k;
		}
?>
		</tbody>
	</table>
<script type="text/javascript">
if(!window.localPage)
	window.localPage = {};
window.localPage.deleteVendorRow = function(el) {
	if(!confirm("<?php echo
JText::_('PLEASE_CONFIRM_DELETION'); ?>"))
		return false;
	window.hikashop.deleteRow(el);
	document.adminForm.submit();
	return false;
}
</script>
	<input type="hidden" name="boxchecked"
value="<?php echo $nb_valid_vendors; ?>" />
<?php
	}
?>
	<input type="hidden" name="option"
value="<?php echo HIKAMARKET_COMPONENT; ?>" />
	<input type="hidden" name="task"
value="<?php if(empty($this->orders)) echo 'pay';
?>" />
	<input type="hidden" name="ctrl"
value="<?php echo hikaInput::get()->getCmd('ctrl');
?>" />
	<?php echo JHTML::_( 'form.token' ); ?>
</form>
<?php
echo $this->popup->display(
	'',
	JText::_('HIKASHOP_ORDER'),
	hikamarket::completeLink('dashboard', true),
	'hikamarket_pay_shoporder_popup',
	750, 460, 'style="display:none;"', '',
'link'
);
?>
<script type="text/javascript">
if(!window.localPage)
	window.localPage = {};
window.localPage.cancelRow = false;
window.localPage.openInvoice = function(el, order_id) {
	window.localPage.cancelRow = true;
	window.hikamarket.submitFct = function(data) {
window.hikamarket.closeBox(); };
	window.hikamarket.openBox('hikamarket_pay_shoporder_popup',
'<?php echo
hikamarket::completelink('shop.order&task=invoice&type=full&order_id=ORDERID',
true, false, true); ?>'.replace('ORDERID', order_id));
	return false;
};
</script>
vendormarket/tmpl/paymanual.php000064400000006623151161332400012724
0ustar00<?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
if($this->payment_method == 'paypal') {
	hikaInput::get()->set('noform', 1);
?>
	<form id="hikashop_paypal_form"
name="hikashop_paypal_form" action="<?php echo
$this->return_url;?>" method="POST"
target="_blank"
onsubmit="window.localPage.afterSubmit();">
<?php
	foreach($this->vars as $name => $value ) {
		echo '<input type="hidden"
name="'.$name.'"
value="'.htmlspecialchars((string)$value).'"
/>';
	}
?>
		<div><?php
			echo JText::_('PAYPAL_PAYMENT_OPEN_NEW_WINDOW');
		?></div>
		<div id="hikashop_paypal_end_image"
class="hikashop_paypal_end_image">
			<input id="hikashop_paypal_button" type="submit"
class="hikabtn hikabtn-primary" value="<?php echo
JText::_('PAY_NOW');?>" name=""
alt="<?php echo JText::_('PAY_NOW');?>" />
		</div>
	</form>
	<script type="text/javascript">
	<!--
	if(!window.localPage)
		window.localPage = {};
	window.localPage.afterSubmit = function() {
		setTimeout(function() {
			window.parent.hikamarket.submitBox({result:"pending..."});
		}, 2000);
	}
	</script>
<?php
	return;
}

?>
<fieldset>
	<div class="toolbar" id="toolbar">
		<div style="float:right">
			<button class="hikabtn hikabtn-success"
style="margin:5px;" type="button"
onclick="submitbutton('paymanual');"><i
class="fa fa-save"></i> <?php echo
JText::_('OK'); ?></button>
		</div>
		<button class="hikabtn hikabtn-danger"
style="margin:5px;" type="button"
onclick="if(window.parent) { window.parent.hikamarket.closeBox(); }
return false;"><i class="fa fa-times"></i>
<?php echo JText::_('HIKA_CANCEL'); ?></button>
	</div>
</fieldset>
<form id="adminForm" name="adminForm"
action="<?php echo
hikamarket::completeLink('vendor&task=paymanual');
?>" method="POST">
	<dl class="hikam_options">
		<dt><?php
			echo JText::_('ORDER_NUMBER');
		?></dt>
		<dd><?php
			echo $this->escape($this->order->order_number);
		?></dd>
		<dt><?php
			echo JText::_('HIKASHOP_TOTAL');
		?></dt>
		<dd><?php
			echo
$this->currencyClass->format($this->order->order_full_price,
$this->order->order_currency_id);
		?></dd>
		<dt><?php
			echo JText::_('HIKA_VENDOR');
		?></dt>
		<dd><?php
			echo $this->escape($this->vendor->vendor_name);
		?></dd>
		<dt><?php
			echo JText::_('ORDER_STATUS');
		?></dt>
		<dd><?php
			echo $this->escape($this->order->order_status);
		?></dd>
		<dt><?php
			echo JText::_('NEW_ORDER_STATUS');
		?></dt>
		<dd><?php
			echo $this->escape($this->confirmed_status);
		?></dd>
		<dt><?php
			echo JText::_('NOTIFY_VENDOR');
		?></dt>
		<dd><?php
			echo JHTML::_('hikaselect.booleanlist',
'data[notify]', '', 0);
		?></dd>
	</dl>
	<input type="hidden" name="payment_method"
value="manual" />
	<input type="hidden" name="vendor_id"
value="<?php echo (int)$this->vendor->vendor_id; ?>"
/>
	<input type="hidden" name="order_id"
value="<?php echo (int)$this->order->order_id; ?>"
/>
	<input type="hidden" name="data[validation]"
value="1" />

	<input type="hidden" name="option"
value="<?php echo HIKAMARKET_COMPONENT; ?>" />
	<input type="hidden" name="task"
value="paymanual" />
	<input type="hidden" name="ctrl"
value="vendor" />
	<?php echo JHTML::_( 'form.token' ); ?>
</form>
vendormarket/tmpl/payreport.php000064400000013137151161332400012760
0ustar00<?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');
?><div class="iframedoc"
id="iframedoc"></div>
<table class="adminlist pad5 table table-striped table-hover
table-bordered" style="width:100%">
	<thead>
		<tr>
			<th><?php echo JText::_('ORDER_NUMBER');
?></th>
			<th><?php echo JText::_('VENDOR_PAY_TYPE');
?></th>
			<th><?php echo JText::_('VENDOR_NAME');
?></th>
			<th><?php echo JText::_('HIKASHOP_TOTAL');
?></th>
			<th><?php echo JText::_('ORDER_STATUS');
?></th>
			<th><?php echo JText::_('PAY_VENDOR');
?></th>
		</tr>
	</thead>
	<tbody>
<?php
	foreach($this->orders as $order) {
?>
		<tr>
			<td>
				<a onclick="return window.localPage.openInvoice(this, <?php
echo (int)$order->order_id; ?>);" href="<?php echo
hikamarket::completeLink('shop.order&task=edit&cid[]='.$order->order_id.'&cancel_redirect='.$this->cancelUrl);
?>"><i class="fas fa-receipt"></i>
<?php echo $order->order_number; ?></a>
				<a style="margin-left:1em;" href="<?php echo
hikamarket::completeLink('shop.order&task=edit&cid[]='.$order->order_id.'&cancel_redirect='.$this->cancelUrl);
?>" target="_blank"><i class="fa
fa-external-link-alt"></i></a>
			</td>
			<td><?php
				switch($order->order_type) {
					case 'vendorpayment':
						echo JText::_('VENDOR_PAY_PAYMENT');
						break;
					case 'sale':
						echo JText::_('VENDOR_PAY_INVOICE');
						break;
					default:
						echo $this->escape($order->order_type);
						break;
				}
			?></td>
			<td><?php
				echo $this->escape($order->vendor_name);
			?></td>
			<td><?php
				echo $this->currencyClass->format($order->order_full_price,
$order->order_currency_id);
			?></td>
			<td><span id="hikamarket_payvendor_order_<?php echo
$order->order_id; ?>"><?php
				echo hikamarket::orderStatus($order->order_status);
			?></span> <div class="toggle_loading"><a
class="refresh" href="#refresh" onclick="return
window.localPage.refreshOrder(this, <?php echo (int)$order->order_id;
?>);"></a></div></td>
			<td><?php
				if(hikamarket::toFloat($order->order_full_price) > 0.0 &&
$order->order_type == 'vendorpayment' &&
$order->order_status == $this->created_status) {
					$vendor_params = (!empty($order->vendor_params) &&
is_string($order->vendor_params) ) ?
hikamarket::unserialize($order->vendor_params) :
$order->vendor_params;
					if(!empty($vendor_params->paypal_email)) { ?>
				<span id="hikamarket_payvendor_paypal_<?php echo
$order->order_id; ?>">
					<a class="hikabtn hikabtn-info" onclick="return
window.localPage.payVendor(this, <?php echo (int)$order->order_id;
?>, <?php echo (int)$order->vendor_id; ?>,
'paypal');" href="#"><i class="fab
fa-paypal"></i> <?php
						echo JText::_('HIKAM_PAY_PAYPAL');
					?></a>
				</span>
				<?php
					}
					?><a class="hikabtn hikabtn-info" onclick="return
window.localPage.payVendor(this,<?php echo (int)$order->order_id;
?>,<?php echo (int)$order->vendor_id; ?>);"
href="#"><i class="fa
fa-money-bill"></i> <?php echo
JText::_('HIKAM_PAY_MANUAL'); ?></a><?php
				} else {
					echo '-';
				}
			?></td>
		</tr>
<?php
	}
?>
	</tbody>
</table>
<?php
echo $this->popup->display(
	'',
	JText::_('HIKASHOP_ORDER'),
	hikamarket::completeLink('dashboard', true),
	'hikamarket_pay_shoporder_popup',
	750, 460, 'style="display:none;"', '',
'link'
);
echo $this->popup->display(
	'',
	JText::_('PAY_VENDOR'),
	hikamarket::completeLink('dashboard', true),
	'hikamarket_pay_payment_popup',
	750, 460, 'style="display:none;"', '',
'link'
);
?>
<script type="text/javascript">
if(!window.localPage)
	window.localPage = {};
window.localPage.openInvoice = function(el, order_id) {
	window.hikamarket.submitFct = function(data) {
window.hikamarket.closeBox(); };
	window.hikamarket.openBox('hikamarket_pay_shoporder_popup',
'<?php echo
hikamarket::completelink('shop.order&task=invoice&type=full&order_id=ORDERID',
true, false, true); ?>'.replace('ORDERID', order_id));
	return false;
};
window.localPage.refreshOrder = function(el, order_id) {
	var span = document.getElementById('hikamarket_payvendor_order_'
+ order_id);
	if(!span)
		return false;
	el.parentNode.className = 'toggle_onload';
	window.Oby.xRequest('<?php echo
hikamarket::completeLink('order&task=checkstatus&order_id=ORDERID&tmpl=json',
false, false, true); ?>'.replace('ORDERID', order_id),
{}, function(xhr) {
		span.innerHTML = xhr.responseText;
		el.parentNode.className = 'toggle_loading';
	});
	return false;
};
window.localPage.payVendor = function(el, order_id, vendor_id, mode) {
	if(mode === undefined)
		mode = 'manual';
	if(mode != 'manual' && mode != 'paypal')
		mode = 'manual';

	window.hikamarket.submitFct = function(data) {
		var el = document.getElementById('hikamarket_payvendor_order_'
+ order_id);
		if(el && data.result)
			el.innerHTML = data.result;
		if(mode == 'paypal') {
			var link =
document.getElementById('hikamarket_payvendor_paypal_' +
order_id);
			if(link)
				link.innerHTML = '<?php echo
str_replace(array('\\','\''),
array('\\\\','\\\''),
JText::_('HIKAM_PAY_PAYPAL_PENDING')); ?>';
		}
		window.hikamarket.closeBox();
	};
	var url = '<?php echo
hikamarket::completelink('vendor&task=paymanual&order_id=ORDERID&vendor_id=VENDORID&payment_method=PAYMENTMETHOD',
true, false, true); ?>'.replace('ORDERID',
order_id).replace('VENDORID',
vendor_id).replace('PAYMENTMETHOD', mode);
	window.hikamarket.openBox('hikamarket_pay_payment_popup', url);
	return false;
};
</script>
vendormarket/tmpl/products.php000064400000007434151161332400012601
0ustar00<?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 if( !isset($this->embbed) ) { ?>
<div class="iframedoc"
id="iframedoc"></div>
<div>
<form action="<?php echo
hikamarket::completeLink('vendor&task=products'); ?>"
method="post" name="adminForm" id="adminForm"
enctype="multipart/form-data">
<div class="hk-row-fluid">
	<div class="hkc-md-6">
<?php
	echo $this->loadHkLayout('search', array(
		'id' => 'adminForm'
	));
?>
	</div>
	<div class="hkc-md-6">
		<!-- Filters -->
	</div>
</div>
<?php } else { ?>
<div style="float:right;margin:3px;">
	<a class="hikabtn hikabtn-info" href="<?php echo
hikamarket::completeLink("vendor&task=products&cid[]=".$this->vendor_id);
?>">
		<i class="fa fa-chevron-right"></i> <?php echo
JText::_('SEE_ALL');?>
	</a>
</div>
<?php } ?>
	<table class="adminlist pad5 table table-striped table-hover"
style="width:100%">
		<thead>
			<tr>
<?php if(!isset($this->embbed)) { ?>
				<th class="hikamarket_product_num_title title
titlenum">
					<?php echo JHTML::_('grid.sort',
JText::_('HIKA_NUM'), 'a.order_id',
$this->pageInfo->filter->order->dir,
$this->pageInfo->filter->order->value); ?>
				</th>
<?php } ?>
				<th class="hikamarket_product_name_title title">
					<?php
					if(isset($this->embbed))
						echo JText::_('HIKA_NAME');
					else
						echo JHTML::_('grid.sort', JText::_('HIKA_NAME'),
'a.product_name',
$this->pageInfo->filter->order->dir,
$this->pageInfo->filter->order->value);
					?>
				</th>
				<th class="hikamarket_product_id_title title">
					<?php
					if(isset($this->embbed))
						echo JText::_('ID');
					else
						echo JHTML::_('grid.sort', JText::_('ID'),
'a.product_id', $this->pageInfo->filter->order->dir,
$this->pageInfo->filter->order->value);
					?>
				</th>
			</tr>
		</thead>
<?php if( !isset($this->embbed) ) { ?>
		<tfoot>
			<tr>
				<td colspan="3">
					<?php echo $this->pagination->getListFooter(); ?>
					<?php echo $this->pagination->getResultsCounter(); ?>
				</td>
			</tr>
		</tfoot>
		<tbody>
<?php
}

$k = 0;
$i = 0;
foreach($this->products as $product) {
?>
		<tr class="row<?php echo $k; ?>">
<?php if(!isset($this->embbed)) { ?>
			<td class="hikamarket_product_num_value"
align="center">
			<?php
				if( !isset($this->embbed) )
					echo $this->pagination->getRowOffset($i);
				else
					echo ($i+1);
			?>
			</td>
<?php } ?>
			<td class="hikamarket_product_select_value">
				<a href="<?php echo
hikamarket::completeLink('shop.product&task=edit&cid[]='.$product->product_id.'&cancel_redirect='.$this->cancelUrl);
?>"><?php
					if(!empty($product->product_name))
						echo $product->product_name;
					else
						echo
'<em>'.JText::_('NO_NAME').'</em>';
				?></a>
			</td>
			<td class="hikamarket_product_id_value"
align="center">
				<?php echo $product->product_id; ?>
			</td>
		</tr>
<?php
	$i++;
	$k = 1 - $k;
}
?>
	</table>
<?php if( !isset($this->embbed) ) { ?>
	<input type="hidden" name="option"
value="<?php echo HIKAMARKET_COMPONENT; ?>" />
	<input type="hidden" name="task"
value="products" />
	<input type="hidden" name="ctrl"
value="<?php echo hikaInput::get()->getCmd('ctrl');
?>" />
	<input type="hidden" name="cid"
value="<?php echo $this->vendor_id ?>" />
	<input type="hidden" name="boxchecked"
value="0" />
	<input type="hidden" name="filter_order"
value="<?php echo
$this->pageInfo->filter->order->value; ?>" />
	<input type="hidden" name="filter_order_Dir"
value="<?php echo $this->pageInfo->filter->order->dir;
?>" />
	<?php echo JHTML::_( 'form.token' ); ?>
</form>
</div>
<?php } ?>
vendormarket/tmpl/reports.php000064400000002521151161332400012424
0ustar00<?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
if(!empty($this->statistics)) {
?>
<div class="hikamarket_cpanel_statistics_top
hk-row-fluid">
<?php
	$s = 0;
	foreach($this->statistics as $stat) {
		if(empty($stat['published']))
			continue;

		$key = $stat['key'];
		if(empty($stat['container']) ||
!in_array($stat['container'], array(3,4,6,8,9,12)))
			$stat['container'] = 12;

		if($s < 12 && ($s + (int)$stat['container']) >
12)
			echo '<div class="clearfix"></div>';
?>
		<div class="hkc-md-<?php echo $stat['container'];
?>">
			<div class="hikamarket_panel hikamarket_panel_stats">
				<div class="hikamarket_panel_heading"><?php echo
$stat['label']; ?></div>
				<div id="hikamarket_dashboard_stat_<?php echo $key;
?>" class="hikamarket_panel_body"><?php
					echo $this->statisticsClass->display($stat);
				?></div>
			</div>
		</div>
<?php
		if($stat['container'] == 12) {
			$s = 0;
			continue;
		}
		if(($s + (int)$stat['container']) == 12)
			echo '<div class="clearfix"></div>';
		$s += (int)$stat['container'];
		if($s >= 12) $s = 0;
	}

?>
</div>
<?php
}
vendormarket/tmpl/searchfields.php000064400000005100151161332400013356
0ustar00<?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');
?><script language="javascript"
type="text/javascript">
<!--
	var selectedContents = [], allElements = <?php echo
count($this->rows);?>;
<?php
	foreach($this->rows as $oneRow){
		if(!empty($oneRow->selected))
			echo
'	selectedContents["'.$oneRow->namekey.'"] =
"content";'."\r\n";
	}
?>
	function applyContent(contentid,rowClass) {
		var d = document;
		if(selectedContents[contentid]) {
			d.getElementById('content'+contentid).className = rowClass;
			delete selectedContents[contentid];
		}else{
			d.getElementById('content'+contentid).className =
'selectedrow';
			selectedContents[contentid] = 'content';
		}
	}
	function insertTag() {
		var tag = '', d = window.top.document;
		for(var i in selectedContents) {
			if(selectedContents[i] == 'content') {
				allElements--;
				if(tag != '')
					tag += ',';
				tag = tag + i;
			}
		}
		d.getElementById('<?php echo $this->controlName;
?>fields').value = tag;
		d.getElementById('link<?php echo $this->controlName;
?>fields').href = 'index.php?option=<?php echo
HIKAMARKET_COMPONENT
?>&tmpl=component&ctrl=vendor&task=searchfields&control=<?php
echo $this->controlName; ?>&values='+tag;
		window.top.hikashop.closeBox();
	}
//-->
</script>
<style type="text/css">
table.adminlist tr.selectedrow td {
	background-color:#FDE2BA;
}
</style>
<form action="index.php?option=<?php echo HIKAMARKET_COMPONENT
?>" method="post" name="adminForm"
id="adminForm">
	<div style="float:right;margin-bottom : 10px">
		<button class="btn" id="insertButton"
onclick="insertTag(); return false;"><?php echo
JText::_('HIKA_APPLY'); ?></button>
	</div>
	<div style="clear:both"></div>
	<table class="adminlist table table-striped"
cellpadding="1">
		<thead>
			<tr>
				<th class="title"><?php echo 'Field';
?></th>
				<th class="title titleid"><?php echo
JText::_('ID'); ?></th>
			</tr>
		</thead>
		<tbody>
<?php
	$k = 0;
	foreach($this->rows as $i => $row){
?>
			<tr class="<?php echo empty($row->selected) ?
('row'.$k) : 'selectedrow'; ?>"
id="content<?php echo $row->namekey; ?>"
onclick="applyContent('<?php echo
$row->namekey."','row".$k."'"?>);"
style="cursor:pointer;">
				<td><?php echo $row->namekey; ?></td>
				<td align="center"><?php echo $i; ?></td>
			</tr>
<?php
		$k = 1-$k;
	}
?>
		</tbody>
	</table>
</form>
vendormarket/tmpl/selection.php000064400000012540151161332400012715
0ustar00<?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 if( !$this->singleSelection ) { ?>
<fieldset>
	<div class="toolbar" id="toolbar"
style="float: right;">
		<button class="btn" type="button"
onclick="if(document.adminForm.boxchecked.value==0){alert('<?php
echo JText::_('PLEASE_SELECT_SOMETHING', true);
?>');}else{submitbutton('useselection');}"><img
src="<?php echo HIKASHOP_IMAGES; ?>add.png"/><?php
echo JText::_('OK'); ?></button>
	</div>
</fieldset>
<?php } ?>
<div class="iframedoc"
id="iframedoc"></div>
<form action="index.php?option=<?php echo HIKAMARKET_COMPONENT
?>&amp;ctrl=<?php echo
hikaInput::get()->getCmd('ctrl'); ?>"
method="post" name="adminForm"
id="adminForm">
<?php if(HIKASHOP_BACK_RESPONSIVE) { ?>
	<div class="row-fluid">
		<div class="span12">
			<div class="input-prepend input-append">
				<span class="add-on"><i
class="icon-filter"></i></span>
				<input type="text" name="search"
id="search" value="<?php echo
$this->escape($this->pageInfo->search);?>"
onchange="this.form.submit();" />
				<button class="btn"
onclick="this.form.limitstart.value=0;this.form.submit();"><i
class="icon-search"></i></button>
				<button class="btn"
onclick="this.form.limitstart.value=0;document.getElementById('search').value='';this.form.submit();"><i
class="icon-remove"></i></button>
			</div>
		</div>
	</div>
<?php } else { ?>
	<table>
		<tr>
			<td width="100%">
				<?php echo JText::_( 'FILTER' ); ?>:
				<input type="text" name="search"
id="search" value="<?php echo
$this->escape($this->pageInfo->search);?>"
class="text_area"
onchange="document.adminForm.submit();" />
				<button class="btn"
onclick="this.form.submit();"><?php echo JText::_(
'GO' ); ?></button>
				<button class="btn"
onclick="document.getElementById('search').value='';this.form.submit();"><?php
echo JText::_( 'RESET' ); ?></button>
			</td>
		</tr>
	</table>
<?php } ?>
	<table class="adminlist table table-striped table-hover"
style="cell-spacing:1px">
		<thead>
			<tr>
				<th class="title titlenum"><?php
				echo JText::_( 'HIKA_NUM' );
				?></th>
<?php if( !$this->singleSelection ) { ?>
				<th class="title titlebox"><input
type="checkbox" name="toggle" value=""
onclick="hikashop.checkAll(this);" /></th>
<?php } ?>
				<th class="title"><?php
				echo JHTML::_('grid.sort', JText::_('HIKA_NAME'),
'a.vendor_name',
$this->pageInfo->filter->order->dir,$this->pageInfo->filter->order->value
);
				?></th>
				<th class="title"><?php
				echo JHTML::_('grid.sort', JText::_('HIKA_EMAIL'),
'a.vendor_email',
$this->pageInfo->filter->order->dir,$this->pageInfo->filter->order->value
);
				?></th>
				<th class="title"><?php
				echo JHTML::_('grid.sort', JText::_( 'ID' ),
'a.vendor_id', $this->pageInfo->filter->order->dir,
$this->pageInfo->filter->order->value );
				?></th>
			</tr>
		</thead>
		<tfoot>
			<tr>
				<td colspan="10"><?php
					echo $this->pagination->getListFooter();
					echo $this->pagination->getResultsCounter();
				?></td>
			</tr>
		</tfoot>
		<tbody>
<?php
	$k = 0;
	for($i = 0, $a = count($this->rows); $i < $a; $i++) {
		$row =& $this->rows[$i];

		$lbl1 = ''; $lbl2 = '';
		$extraTr = '';
		if( $this->singleSelection ) {
			$data = '{id:'.$row->vendor_id;
			foreach($this->elemStruct as $s) {
				if($s == 'id')
					continue;
				$data .= ','.$s.':\''.
str_replace(array('\'','"'),array('\\\'','\\"'),$row->$s).'\'';
			}
			$data .= '}';
			$extraTr = ' style="cursor:pointer"
onclick="window.top.hikamarket.submitBox('.$data.');"';
		} else {
			$lbl1 = '<label for="cb'.$i.'">';
			$lbl2 = '</label>';
			$extraTr = '
onclick="hikamarket.checkRow(\'cb'.$i.'\');"';
		}

		if(!empty($this->pageInfo->search)) {
			$row = hikamarket::search($this->pageInfo->search, $row,
'vendor_id');
		}
?>
			<tr class="row<?php echo $k; ?>"<?php echo
$extraTr; ?>>
				<td align="center"><?php
					echo $this->pagination->getRowOffset($i);
				?></td>
<?php if( !$this->singleSelection ) { ?>
				<td align="center">
					<input type="checkbox" onclick="this.clicked=true;
this.checked=!this.checked" value="<?php echo
$row->vendor_id;?>" name="cid[]" id="cb<?php
echo $i;?>"/>
				</td>
<?php } ?>
				<td><?php
					echo $lbl1 . $row->vendor_name . $lbl2;
				?></td>
				<td><?php
					echo $lbl1 . $row->vendor_email . $lbl2;
				?></td>
				<td width="1%" align="center"><?php
					echo $row->vendor_id;
				?></td>
			</tr>
<?php
		$k = 1-$k;
	}
?>
		</tbody>
	</table>
	<input type="hidden" name="option"
value="<?php echo HIKAMARKET_COMPONENT; ?>" />
	<input type="hidden" name="task"
value="selection" />
	<input type="hidden" name="tmpl"
value="component" />
	<input type="hidden" name="single"
value="<?php echo $this->singleSelection ? '1' :
'0'; ?>" />
	<input type="hidden" name="ctrl"
value="<?php echo hikaInput::get()->getCmd('ctrl');
?>" />
	<input type="hidden" name="boxchecked"
value="0" />
	<input type="hidden" name="filter_order"
value="<?php echo
$this->pageInfo->filter->order->value; ?>" />
	<input type="hidden" name="filter_order_Dir"
value="<?php echo $this->pageInfo->filter->order->dir;
?>" />
	<?php echo JHTML::_('form.token'); ?>
</form>
vendormarket/tmpl/users.php000064400000011151151161332400012066
0ustar00<?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');
?><table id="hikamarket_vendor_users" class="adminlist
pad5 table table-striped table-hover"
style="width:100%">
	<thead>
		<tr>
			<th class="hikamarket_user_id_title title"><?php
				echo JText::_('ID');
			?></th>
			<th class="hikamarket_user_name_title title"><?php
				echo JText::_('HIKA_NAME');
			?></th>
			<th class="hikamarket_user_email_title title"><?php
				echo JText::_('HIKA_EMAIL');
			?></th>
			<th class="hikamarket_user_acl_title title"
style="width:3%"><?php
				echo JText::_('HIKAM_ACL');
			?></th>
			<th class="hikamarket_user_icon_title title"
style="width:2%"><?php
				echo hikamarket::tooltip(JText::_('ADD'), '',
'', '<button class="btn" onclick="return
window.vendorMgr.vendor_toggleUser(this);" type="button"
style="margin:0px;"><img style="margin:0px;"
src="'.HIKASHOP_IMAGES.'add.png"
style="vertical-align:middle"/></button>',
'', 0);
			?></th>
		</tr>
	</thead>
<?php
$k = 0;
if(!empty($this->users)) {
	foreach($this->users as $user) {
?>
	<tr class="row<?php echo $k; ?>"
id="vendor_users_<?php echo $user->id; ?>">
		<td align="center"><?php echo
$user->user_id;?></td>
		<td><?php echo $user->name;?></td>
		<td><?php echo $user->email;?></td>
		<td align="center"><?php echo
$this->marketaclType->displayButton('user['.$user->user_id.'][user_access]',
@$user->user_vendor_access); ?></td>
		<td align="center">
			<a href="#" onclick="hikamarket.deleteRow(this);
return false;"><img src="<?php echo
HIKASHOP_IMAGES;?>delete.png" alt="<?php echo
JText::_('DELETE'); ?>"/></a>
			<input type="hidden" name="data[users][]"
value="<?php echo $user->user_id;?>"/>
		</td>
	</tr>
<?php
		$k = 1 - $k;
	}
}
?>
	<!-- Template line -->
	<tr id="hikamarket_users_tpl" class="row<?php echo
$k; ?>" style="display:none;">
		<td align="center">{id}</td>
		<td>{name}</td>
		<td>{email}</td>
		<td align="center"><?php echo
$this->marketaclType->displayButton('user[{id}][user_access]',
'all'); ?></td>
		<td align="center">
			<a href="#" onclick="hikamarket.deleteRow(this);
return false;"><img src="<?php echo
HIKASHOP_IMAGES;?>delete.png" alt="<?php echo
JText::_('DELETE'); ?>"/></a>
			<input type="hidden" name="{input_name}"
value="{id}"/>
		</td>
	</tr>
</table>
	<div style="display:none;"
id="hikamarket_selector_vendor_user_line">
		<?php
			echo $this->nameboxType->display(
				'',
				'',
				hikamarketNameboxType::NAMEBOX_MULTIPLE,
				'user',
				array(
					'delete' => true,
					'default_text' =>
'<em>'.JText::_('HIKA_NONE').'</em>',
					'id' => 'hikamarket_add_users'
				)
			);
		?>
		<div style="clear:both;margin-top:4px;"></div>
		<div style="float:right">
			<button onclick="return
window.vendorMgr.vendor_addUser(this);" class="btn
btn-success"><img src="<?php echo HIKASHOP_IMAGES;
?>plus.png" alt=""
style="vertical-align:middle;"/> <?php echo
JText::_('HIKAM_ADD_VENDOR_USERS'); ;?></button>
		</div>
		<button onclick="return
window.vendorMgr.vendor_toggleUser(this);" class="btn
btn-danger"><img src="<?php echo HIKASHOP_IMAGES;
?>cancel.png" alt=""
style="vertical-align:middle;"/> <?php echo
JText::_('HIKA_CANCEL'); ;?></button>
		<div style="clear:both"></div>
	</div>
<script type="text/javascript">
if(!window.vendorMgr) window.vendorMgr = {};
window.vendorMgr.vendor_toggleUser = function(el) {
	var d = document, element =
d.getElementById('hikamarket_selector_vendor_user_line');
	if(element)
		element.style.display = (element.style.display == 'none' ?
'' : 'none');
	if(element && element.style.display == 'none') {
		var box = window.oNameboxes['hikamarket_add_users'];
		if(box)
			box.clear();
	}
	return false;
};
window.vendorMgr.vendor_addUser = function(el, id) {
	var box = window.oNameboxes['hikamarket_add_users'];
	if(!box)
		return window.vendorMgr.vendor_toggleUser(el);
	var values = box.get(), htmlData = null;
	box.clear();
	if(values && values.length > 0) {
		for(var i = 0; i < values.length; i++) {
			var email = '';
			if(box.data && box.data[ values[i].value ]) {
				try {
					email = box.data[ values[i].value ].user_email;
				} catch(e) {}
			}
			htmlData = {
				'input_name': 'data[users][]',
				'id': values[i].value,
				'name': values[i].name,
				'email': email,
			};
			window.hikamarket.dupRow('hikamarket_users_tpl', htmlData);
		}
	}
	return window.vendorMgr.vendor_toggleUser(el);
};
</script>
vendormarket/tmpl/useselection.php000064400000000440151161332400013426
0ustar00<?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');
?>vendormarket/view.html.php000064400000116447151161332400011704
0ustar00<?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 vendormarketViewVendormarket extends hikamarketView {

	const ctrl = 'vendor';
	const name = 'HIKA_VENDORS';
	const icon = 'user-tie';

	public function display($tpl = null, $params = null) {
		$this->params =& $params;
		$this->paramBase =
HIKAMARKET_COMPONENT.'.'.$this->getName();
		$fct = $this->getLayout();
		if(method_exists($this, $fct) && $this->$fct($params) ===
false)
			return false;
		parent::display($tpl);
	}

	public function listing($tpl = null, $mainVendor = false) {
		$app = JFactory::getApplication();
		$db = JFactory::getDBO();
		hikamarket::setTitle(JText::_(self::name), self::icon, self::ctrl);

		$config = hikamarket::config();
		$this->assignRef('config', $config);

		$shopConfig = hikamarket::config(false);
		$main_currency = (int)$shopConfig->get('main_currency', 1);

		$invoice_statuses = explode(',',
$config->get('valid_order_statuses',
'confirmed,shipped'));
		foreach($invoice_statuses as &$invoice_status) {
			$invoice_status = $db->Quote($invoice_status);
		}
		unset($invoice_status);

		$vendorOrderType = 'subsale';

		$this->loadRef(array(
			'toggleClass' => 'helper.toggle',
			'currencyClass' => 'shop.class.currency'
		));

		$cfg = array(
			'table' => 'vendor',
			'main_key' => 'vendor_id',
			'order_sql_value' => 'a.vendor_id'
		);

		$manage = true;
		$this->assignRef('manage', $manage);

		$page_filters = array(
			'type' => 0,
			'vendors_unpaid' => 0
		);

		$pageInfo = $this->getPageInfo($cfg['order_sql_value'],
'asc', $page_filters);

		$filters = array();
		$searchMap = array(
			'vendor_name'
		);
		$order = '';
		$join = '';
		$extra_select = '';
		$group = '';

		if(!$mainVendor)
			$filters[] = 'a.vendor_id > 1';

		if($this->pageInfo->filter->vendors_unpaid == 1) {
			$extra_select = ', COUNT(o.order_id) ';
			$join .= ' INNER JOIN
'.hikamarket::table('shop.order').' AS o ON
o.order_vendor_id = a.vendor_id ';
			$filters[] = 'o.order_vendor_paid = 0';
			$filters[] = 'NOT(o.order_vendor_price = 0)';
			$filters[] = '(o.order_type =
'.$db->Quote($vendorOrderType).' AND o.order_status IN
('.implode(',',$invoice_statuses).')) OR o.order_type =
'.$db->Quote('vendorrefund');
			$group = ' GROUP BY a.vendor_id ';
		}

		$orderingAccept = array(
			'a.vendor_id',
			'a.vendor_name',
			'a.vendor_published',
			'a.vendor_email',
		);
		$this->processFilters($filters, $order, $searchMap, $orderingAccept);

		$query = 'FROM
'.hikamarket::table($cfg['table']).' AS a
'.$join.$filters.$group.$order;
		$db->setQuery('SELECT a.* '.$extra_select.$query,
(int)$pageInfo->limit->start, (int)$pageInfo->limit->value);

		$rows = $db->loadObjectList();
		$this->assignRef('rows', $rows);

		$db->setQuery('SELECT COUNT(a.vendor_id) '.$query);
		if($this->pageInfo->filter->vendors_unpaid == 1) {
			$query = 'FROM
'.hikamarket::table($cfg['table']).' AS a
'.$join.$filters;
			$db->setQuery('SELECT COUNT(DISTINCT a.vendor_id)
'.$query);
		}
		$pageInfo->elements = new stdClass();
		$pageInfo->elements->total = $db->loadResult();
		$pageInfo->elements->page = count($rows);

		$ids = array();
		$vendorsFilter = '';
		if(!empty($rows)){
			foreach($rows as $row) {
				$ids[] = $row->vendor_id;
			}
			$vendorsFilter = 'AND t.vendor_id IN
('.implode(',',$ids).') ';
		}
		$query = 'SELECT t.vendor_id AS vendor_id,
COUNT(t.order_transaction_paid) AS `number_unpaid`,
t.order_transaction_currency_id AS `currency_id`,
SUM(t.order_transaction_price) AS `price_unpaid` '.
			' FROM
'.hikamarket::table('order_transaction').' AS t
'.
			' WHERE t.order_transaction_paid = 0 AND t.order_transaction_valid
> 0 AND t.order_transaction_price != 0.0 '.$vendorsFilter.
			' GROUP BY t.vendor_id, t.order_transaction_currency_id';
		$db->setQuery($query);
		$orders = $db->loadObjectList();
		foreach($rows as &$row) {
			$row->number_unpaid = 0;
			$row->price_unpaid = 0.0;
			if(empty($row->price_full))
				$row->price_full = 0.0;
			if(!empty($orders)) {
				foreach($orders as $order) {
					if((int)$order->vendor_id != (int)$row->vendor_id)
						continue;

					$row->number_unpaid += (int)$order->number_unpaid;

					if((int)$row->vendor_currency_id == 0)
						$row->vendor_currency_id = $main_currency;
					if((int)$order->currency_id == 0)
						$order->currency_id = $main_currency;

					if(!empty($order->price_unpaid)) {
						$row->price_unpaid +=
$this->currencyClass->convertUniquePrice((float)$order->price_unpaid,
(int)$order->currency_id, (int)$row->vendor_currency_id);
					}
					if(!empty($order->price_full)) {
						$row->price_full +=
$this->currencyClass->convertUniquePrice((float)$order->price_full,
(int)$order->currency_id, (int)$row->vendor_currency_id);
					}
				}
			}
			unset($row);
		}

		$this->toolbar = array(
			'pay' => array('name' => 'custom',
'icon' => 'pay', 'alt' =>
JText::_('PAY_VENDOR'), 'task' => 'pay',
'display' => $manage),
			'reports' => array('name' =>
'custom', 'icon' => 'reports',
'alt' => JText::_('HIKAM_REPORTS'), 'task'
=> 'reports', 'display' => $manage),
			'|',
			array('name' => 'publishList',
'display' => $manage),
			array('name' => 'unpublishList',
'display' => $manage),
			array('name' => 'addNew', 'display'
=> $manage),
			array('name' => 'editList', 'display'
=> $manage),
			array('name' => 'deleteList', 'display'
=> $manage),
			'|',
			array('name' => 'pophelp', 'target'
=> 'vendor'),
			'dashboard'
		);

		$this->getPagination();

		$this->getOrdering('a.ordering',
!$pageInfo->filter->type);
	}

	public function selection($tpl = null){
		$this->paramBase .= '.vendor_selection';
		$this->listing($tpl, true);

		$elemStruct = array(
			'vendor_name',
			'vendor_email'
		);
		$this->assignRef('elemStruct', $elemStruct);

		$singleSelection = hikaInput::get()->getVar('single',
false);
		$this->assignRef('singleSelection', $singleSelection);
	}

	public function useselection() {
		$selection = hikaInput::get()->get('cid', array(),
'array');
		$rows = array();
		$data = '';

		$elemStruct = array(
			'vendor_name',
			'vendor_email'
		);

		if(!empty($selection)) {
			hikamarket::toInteger($selection);
			$db = JFactory::getDBO();
			$query = 'SELECT a.* FROM
'.hikamarket::table('vendor').' AS a  WHERE a.vendor_id
IN ('.implode(',',$selection).')';
			$db->setQuery($query);
			$rows = $db->loadObjectList();

			if(!empty($rows)) {
				$data = array();
				foreach($rows as $v) {
					$d = '{id:'.$v->user_id;
					foreach($elemStruct as $s) {
						if($s == 'id')
							continue;
						$d .= ','.$s.':"'.
str_replace('"', '\"',
$v->$s).'"';
					}
					$data[] = $d.'}';
				}
				$data = '['.implode(',', $data).']';
			}
		}
		$this->assignRef('rows', $rows);
		$this->assignRef('data', $data);

		$confirm = hikaInput::get()->getBool('confirm', true);
		$this->assignRef('confirm', $confirm);
		if($confirm) {
			$js = 'window.addEvent("domready",
function(){window.top.hikamarket.submitBox('.$data.');});';
			$doc = JFactory::getDocument();
			$doc->addScriptDeclaration($js);
		}
	}

	public function form($params = null) {
		$app = JFactory::getApplication();
		$db = JFactory::getDBO();
		hikamarket::loadJslib('tooltip');

		$title = JText::_('HIKA_VENDOR');
		$ctrl = '';
		$cancelUrl =
urlencode(base64_encode(hikamarket::completeLink('vendor')));
		$config = hikamarket::config();
		$this->assignRef('config', $config);

		$formMode = true;
		$embbed = true;
		$vendor = null;
		$vendor_admin = null;
		$editor = null;
		$task = 'add';
		$users = array();
		$products = array();
		$products_count = 0;
		$orders = array();
		$orders_count = 0;
		$invoices = array();
		$invoices_count = 0;
		$fees = array();

		if($params != null &&
$params->get('configPanelIntegration', false))
			$formMode = false;

		$vendor_limit_vendors =
$config->get('vendor_limit_orders_display', 10);
		$vendor_limit_products =
$config->get('vendor_limit_products_display', 10);

		$vendor_id = 1;
		if($formMode) {
			$vendor_id = hikamarket::getCID();
			if($vendor_id <= 1)
				$vendor_id = 0;
		}

		$failVendor = hikaInput::get()->getVar('fail[vendor]',
null);
		if(!empty($failVendor)) {
			$vendor = $failVendor;
			$vendor_id = $failVendor->vendor_id;
			if(empty($vendor->vendor_id))
				unset($vendor->vendor_id);
		} else if(!empty($vendor_id) || !$formMode) {
			$vendorClass = hikamarket::get('class.vendor');
			$vendor = $vendorClass->get($vendor_id);
		}

		if(empty($vendor) && $vendor_id == 1) {
			$e = $db->Quote('');
			$query = 'INSERT IGNORE INTO
`'.hikamarket::table('vendor').'` '.
'(`vendor_id`,`vendor_admin_id`,`vendor_published`,`vendor_name`,`vendor_email`,`vendor_currency_id`,`vendor_description`,`vendor_access`,`vendor_shippings`,`vendor_params`)
VALUES '.
'(1,0,1,'.$e.','.$e.',0,'.$e.','.$db->Quote('*').','.$e.','.$e.')';
			$db->setQuery($query);
			$db->execute();

			$app->enqueueMessage(JText::_('MAIN_VENDOR_RESTORED'),
'error');

			$vendorClass->get(false);
			$vendor = $vendorClass->get($vendor_id);
		}

		if(!empty($vendor)) {
			$task = 'edit&cid[]='.$vendor_id;
			$title = JText::sprintf('VENDOR_EDIT',
$vendor->vendor_name);
			$cancelUrl =
urlencode(base64_encode(hikamarket::completeLink('vendor&task=edit&cid[]='.$vendor_id)));
		} else {
			$vendor = new stdClass();
		}

		$ctrl .= '&task='.$task;
		$this->assignRef('task', $task);

		hikamarket::loadJslib('otree');

		$this->loadRef(array(
			'imageHelper' => 'shop.helper.image',
			'uploaderType' => 'shop.type.uploader',
			'popup' => 'shop.helper.popup',
			'currencyHelper' => 'shop.class.currency',
			'currencyType' => 'shop.type.currency',
			'categoryType' => 'type.shop_category',
			'marketaclType' => 'type.market_acl',
			'fieldsClass' => 'shop.class.field',
			'joomlaAcl' => 'type.joomla_acl',
			'nameboxType' => 'type.namebox'
		));

		if(hikamarket::level(1)) {
			$feeClass = hikamarket::get('class.fee');
			$this->assignRef('feeClass', $feeClass);
		}

		$vendor_acl = array();
		$vendor_group = array();
		$accesses = explode(',', @$vendor->vendor_access);
		foreach($accesses as $access) {
			if(substr($access, 0, 1) == '@') {
				$vendor_group[] = substr($access, 1);
			} else {
				$vendor_acl[] = $access;
			}
		}
		$vendor->vendor_acl = implode(',', $vendor_acl);
		$vendor->vendor_group = implode(',', $vendor_group);

		if(!empty($vendor->vendor_zone_id)) {
			$query = 'SELECT zone_namekey FROM ' .
hikamarket::table('shop.zone') . ' WHERE zone_id = ' .
(int)$vendor->vendor_zone_id;
			$db->setQuery($query);
			$vendor->vendor_zone_namekey = $db->loadResult();
		}

		if( !empty($vendor->vendor_admin_id) &&
(int)$vendor->vendor_admin_id > 0) {
			$userClass = hikamarket::get('shop.class.user');
			$vendor_admin = $userClass->get($vendor->vendor_admin_id);
		}

		$editor = hikamarket::get('shop.helper.editor');
		$editor->name = 'vendor_description';
		$editor->content = @$vendor->vendor_description;
		$editor->height = 250;

		$product_template = null;
		if(!empty($vendor->vendor_template_id) &&
(int)$vendor->vendor_template_id > 0) {
			$query = 'SELECT * FROM
'.hikamarket::table('shop.product').' AS a WHERE
a.product_type = \'template\' AND a.product_id = ' .
(int)$vendor->vendor_template_id;
			$db->setQuery($query);
			$product_template = $db->loadObject();
		}
		$this->assignRef('product_template', $product_template);


		$extraFields = array(
			'vendor' =>
$this->fieldsClass->getFields('backend', $vendor,
'plg.hikamarket.vendor', 'user&task=state') // Call
control "user" in hikashop backend part.
		);
		$this->assignRef('extraFields', $extraFields);
		$this->assignRef('vendor', $vendor);

		$null = array();
		$this->fieldsClass->addJS($null, $null, $null);
		$this->fieldsClass->jsToggle($this->extraFields['vendor'],
$vendor, 0);

		if($vendor_id > 0) {
			$query = 'SELECT a.*,b.* FROM
'.hikamarket::table('user','shop').' AS a
LEFT JOIN '.hikamarket::table('users',false).' AS b ON
a.user_cms_id = b.id '.
					'WHERE a.user_vendor_id = ' . (int)$vendor_id . ' ORDER
BY a.user_id';
			$db->setQuery($query);
			$users = $db->loadObjectList('user_id');

			$query = 'SELECT hku.*, vu.user_access as `user_vendor_access`,
ju.* '.
					' FROM
'.hikamarket::table('user','shop').' AS hku
'.
					' INNER JOIN
'.hikamarket::table('vendor_user').' AS vu ON
hku.user_id = vu.user_id ' .
					' LEFT JOIN
'.hikamarket::table('users',false).' AS ju ON
hku.user_cms_id = ju.id '.
					' WHERE vu.vendor_id = ' .
(int)$this->vendor->vendor_id . ' ORDER BY hku.user_id';
			$db->setQuery($query);
			$o_users = $db->loadObjectList('user_id');

			$users = array_merge($users, $o_users);
			unset($o_users);
		}
		$this->assignRef('users', $users);

		if($vendor_id > 1) {
			$query = 'SELECT a.*, c.* FROM
'.hikamarket::table('shop.order').' AS a INNER JOIN
'.hikamarket::table('shop.user').' AS c ON
a.order_user_id = c.user_id '.
					'WHERE a.order_vendor_id = ' . $vendor_id . ' AND
a.order_type = \'subsale\' ORDER BY a.order_id DESC';
			$db->setQuery($query, 0, $vendor_limit_vendors);
			$orders = $db->loadObjectList();

			$query = 'SELECT COUNT(*) FROM
'.hikamarket::table('shop.order').' AS a WHERE
a.order_vendor_id = ' . $vendor_id . ' AND a.order_type =
\'subsale\'';
			$db->setQuery($query);
			$orders_count = $db->loadResult();
		}
		$this->assignRef('orders', $orders);
		$this->assignRef('orders_count', $orders_count);

		if($vendor_id > 1) {
			$query = 'SELECT a.* FROM
'.hikamarket::table('shop.order').' AS a '.
					'WHERE a.order_vendor_id = ' . $vendor_id . ' AND
(a.order_type = \'vendorpayment\' OR (a.order_type =
\'sale\' AND a.order_id = a.order_vendor_paid)) ORDER BY
a.order_id DESC';
			$db->setQuery($query, 0, $vendor_limit_vendors);
			$invoices = $db->loadObjectList();

			$query = 'SELECT COUNT(*) FROM
'.hikamarket::table('shop.order').' AS a '.
					'WHERE a.order_vendor_id = ' . $vendor_id . ' AND
(a.order_type = \'vendorpayment\' OR (a.order_type =
\'sale\' AND a.order_id = a.order_vendor_paid))';
			$db->setQuery($query);
			$invoices_count = $db->loadresult();
		}
		$this->assignRef('invoices', $invoices);
		$this->assignRef('invoices_count', $invoices_count);

		if($vendor_id > 1) {
			$query = 'SELECT * FROM
'.hikamarket::table('shop.product').' AS a WHERE
a.product_vendor_id = ' . $vendor_id . ' ORDER BY a.product_id
DESC';
			$db->setQuery($query, 0, $vendor_limit_products);
			$products = $db->loadObjectList();

			$query = 'SELECT COUNT(*) FROM
'.hikamarket::table('shop.product').' AS a WHERE
a.product_vendor_id = ' . $vendor_id . '';
			$db->setQuery($query);
			$products_count = $db->loadResult();
		}
		$this->assignRef('products', $products);
		$this->assignRef('products_count', $products_count);

		if($vendor_id > 1 && hikamarket::level(1)) {
			$fees = $feeClass->getVendor($vendor_id);
		}
		$this->assignRef('fees', $fees);

		if(!empty($vendor->vendor_zone_id)) {
			$query = 'SELECT * FROM
'.hikamarket::table('shop.zone').' WHERE zone_id =
' . (int)$vendor->vendor_zone_id;
			$db->setQuery($query);
			$vendor->zone = $db->loadObject();
		}

		$this->assignRef('embbed', $embbed);
		$this->assignRef('vendor', $vendor);
		$this->assignRef('vendor_id', $vendor_id);
		$this->assignRef('vendor_admin', $vendor_admin);
		$this->assignRef('editor', $editor);
		$this->assignRef('cancelUrl', $cancelUrl);

		if($formMode) {
			hikamarket::setTitle($title, self::icon, self::ctrl.$ctrl);
			$this->toolbar = array(
				'pay' => array('name' => 'Link',
'icon' => 'pay', 'alt' =>
JText::_('PAY_VENDOR'), 'url' =>
hikamarket::completeLink('vendor&task=pay&cid[]='.$vendor_id)),
				'reports' => array('name' =>
'Link', 'icon' => 'reports',
'alt' => JText::_('HIKAM_REPORTS'), 'url'
=>
hikamarket::completeLink('vendor&task=reports&cid[]='.$vendor_id)),
				'|',
				'save',
				'apply',
				array('name' => 'hikacancel', 'url'
=> hikamarket::completeLink('vendor')),
				'|',
				array('name' => 'pophelp', 'target'
=> self::ctrl.'-form')
			);

			if($config->get('market_mode', 'fee') ==
'commission') {
				$this->toolbar['pay'] = array(
					'name' => 'Link',
					'icon' => 'invoice',
					'alt' => JText::_('GENERATE_INVOICE'),
					'url' =>
hikamarket::completeLink('vendor&task=geninvoice&cid[]='.$vendor_id)
				);
			}
		}
	}

	public function fees($params = null) {
		if($params == null ||
!$params->get('configPanelIntegration', false))
			return false;

		$config = hikamarket::config();
		$this->assignRef('config', $config);

		$this->loadRef(array(
			'currencyHelper' => 'shop.class.currency',
			'currencyType' => 'shop.type.currency',
			'feeClass' => 'class.fee',
			'joomlaAclType' => 'type.joomla_acl'
		));

		$formRoot = 'config';
		$this->assignRef('formRoot', $formRoot);

		$fees = $this->feeClass->getConfig();
		$this->assignRef('fees', $fees);

		$fees_show_groups = true;
		$this->assignRef('fees_show_groups', $fees_show_groups);
	}

	public function products($tpl = null) {
		$app = JFactory::getApplication();
		$db = JFactory::getDBO();
		$ctrl = '';
		$cancelUrl =
urlencode(base64_encode(hikamarket::completeLink('vendor')));
		$this->paramBase .= '.products';

		$vendor_id = hikamarket::getCID();
		if( $vendor_id > 0 )
			$cancelUrl =
urlencode(base64_encode(hikamarket::completeLink('vendor&task=edit&cid[]='.$vendor_id)));

		$config = hikamarket::config();
		$this->assignRef('config', $config);

		$toggleClass = hikamarket::get('helper.toggle');
		$this->assignRef('toggleClass', $toggleClass);

		$filterType =
$app->getUserStateFromRequest($this->paramBase.'.filter_type',
'filter_type', 0, 'int');

		$cfg = array(
			'table' => 'shop.product',
			'main_key' => 'product_id',
			'order_sql_value' => 'a.product_id'
		);

		$pageInfo = new stdClass();
		$filters = array();

		$pageInfo->filter = new stdClass();
		$pageInfo->filter->order = new stdClass();
		$pageInfo->filter->order->value =
$app->getUserStateFromRequest($this->paramBase.".filter_order",
'filter_order', $cfg['order_sql_value'],
'cmd');
		$pageInfo->filter->order->dir =
$app->getUserStateFromRequest($this->paramBase.".filter_order_Dir",
'filter_order_Dir', 'asc', 'word');

		$pageInfo->limit = new stdClass();
		$pageInfo->limit->value =
$app->getUserStateFromRequest($this->paramBase.'.list_limit',
'limit', $app->getCfg('list_limit'), 'int'
);
		if(empty($pageInfo->limit->value))
			$pageInfo->limit->value = 500;
		if(hikaInput::get()->getVar('search') !=
$app->getUserState($this->paramBase.".search")) {
			$app->setUserState($this->paramBase.'.limitstart',0);
			$pageInfo->limit->start = 0;
		} else {
			$pageInfo->limit->start =
$app->getUserStateFromRequest($this->paramBase.'.limitstart',
'limitstart', 0, 'int' );
		}

		$pageInfo->search =
HikaStringHelper::strtolower($app->getUserStateFromRequest($this->paramBase.".search",
'search', '', 'string'));
		$this->assignRef('pageInfo', $pageInfo);

		$filters = array();
		$searchMap = array(
			'product_name',
			'product_code',
			'product_id'
		);

		if(!empty($pageInfo->search)) {
			$searchVal = '\'%' .
$db->escape(HikaStringHelper::strtolower($pageInfo->search), true) .
'%\'';
			$filters[] = '(' . implode(' LIKE
'.$searchVal.' OR ',$searchMap).' LIKE
'.$searchVal . ')';
		}
		if(!empty($filters)) {
			$filters = ' WHERE a.product_vendor_id = '.$vendor_id.'
AND ' . implode(' AND ', $filters);
		} else {
			$filters = ' WHERE a.product_vendor_id = '.$vendor_id;
		}

		$order = '';
		if(!empty($pageInfo->filter->order->value)) {
			$order = ' ORDER BY
'.$pageInfo->filter->order->value.'
'.$pageInfo->filter->order->dir;
		}

		$query = 'FROM
'.hikamarket::table($cfg['table']).' AS a
'.$filters.$order;
		$db->setQuery('SELECT * '.$query,
(int)$pageInfo->limit->start, (int)$pageInfo->limit->value);

		$rows = $db->loadObjectList();
		if(!empty($pageInfo->search)) {
			$rows = hikamarket::search($pageInfo->search, $rows,
$cfg['main_key']);
		}
		$this->assignRef('products', $rows);

		$db->setQuery('SELECT COUNT(*) '.$query);
		$pageInfo->elements = new stdClass();
		$pageInfo->elements->total = $db->loadResult();
		$pageInfo->elements->page = count($rows);

		$this->assignRef('vendor_id', $vendor_id);
		$this->assignRef('cancelUrl', $cancelUrl);

		$manager = true;

		hikamarket::setTitle(JText::_(self::name), self::icon,
self::ctrl.$ctrl);
		$this->toolbar = array(
			array('name' => 'hikacancel', 'url'
=>
hikamarket::completeLink('vendor&task=edit&cid[]='.$vendor_id)),
			'|',
			array('name' => 'pophelp', 'target'
=> self::ctrl.'-form')
		);

		jimport('joomla.html.pagination');
		if($pageInfo->limit->value == 500)
			$pageInfo->limit->value = 100;
		$pagination = new JPagination($pageInfo->elements->total,
$pageInfo->limit->start, $pageInfo->limit->value);
		$this->assignRef('pagination', $pagination);

		$doOrdering = !$filterType;
		$this->assignRef('doOrdering', $doOrdering);
		if($doOrdering) {
			$ordering = new stdClass();
			$ordering->ordering = false;
			$ordering->orderUp = 'orderup';
			$ordering->orderDown = 'orderdown';
			$ordering->reverse = false;
			if($pageInfo->filter->order->value == 'a.ordering')
{
				$ordering->ordering = true;
				if($pageInfo->filter->order->dir == 'desc') {
					$ordering->orderUp = 'orderdown';
					$ordering->orderDown = 'orderup';
					$ordering->reverse = true;
				}
			}
			$this->assignRef('ordering', $ordering);
		}
	}

	public function pay($tpl = null) {
		$app = JFactory::getApplication();
		$db = JFactory::getDBO();
		$ctrl = '';
		$cancelUrl =
urlencode(base64_encode(hikamarket::completeLink('vendor')));
		$this->paramBase .= '.pay';

		$vendor_id = hikamarket::getCID();
		$vendor_ids = hikaInput::get()->get('cid', array(),
'array');
		if(!empty($vendor_ids) && count($vendor_ids) > 1) {
			$vendor_id = $vendor_ids;
			hikamarket::toInteger($vendor_id);
		}

		if(empty($vendor_id)) {
			$app->redirect(hikamarket::completeLink('vendor'));
			return false;
		}
		$this->assignRef('vendor_id', $vendor_id);

		$config = hikamarket::config();
		$this->assignRef('config', $config);

		$feeMode = ($this->config->get('market_mode',
'fee') == 'fee');
		$this->assignRef('feeMode', $feeMode);

		$valid_statuses = explode(',',
$config->get('valid_order_statuses',
'confirmed,shipped'));
		foreach($valid_statuses as &$status) {
			$status = $db->Quote($status);
		}

		$this->loadRef(array(
			'vendorClass' => 'class.vendor',
			'toggleHelper' => 'helper.toggle',
			'currencyHelper' => 'shop.class.currency',
			'paymentMethods' => 'type.paymentmethods',
			'popup' => 'shop.helper.popup',
		));

		$pageInfo = new stdClass();
		$pageInfo->filter = new stdClass();
		$this->assignRef('pageInfo', $pageInfo);

		if(!is_array($vendor_id)) {
			$vendor = $this->vendorClass->get($vendor_id);
			$this->assignRef('vendor', $vendor);

			$title = JText::sprintf('VENDOR_PAY',
$vendor->vendor_name);
			$cancelUrl =
urlencode(base64_encode(hikamarket::completeLink('vendor&task=pay&cid[]='.$vendor_id)));
			$ctrl = '&task=pay&cid[]='.$vendor_id;

			$this->assignRef('cancelUrl', $cancelUrl);

			$query = 'SELECT t.*, o.*, u.* '.
				' FROM
'.hikamarket::table('order_transaction').' AS t
'.
				' LEFT JOIN
'.hikamarket::table('shop.order').' AS o ON
o.order_type = '.$db->Quote('subsale').' AND
o.order_parent_id = t.order_id AND o.order_vendor_id = '.$vendor_id .
' '.
				' LEFT JOIN '.hikamarket::table('shop.user').'
AS u ON o.order_user_id = u.user_id '.
				' WHERE t.order_transaction_paid = 0 AND t.order_transaction_valid
> 0 AND t.order_transaction_price != 0.0 AND t.vendor_id =
'.$vendor_id.''.
				' ORDER BY t.order_transaction_created DESC,
o.order_invoice_created DESC, o.order_created DESC, o.order_id DESC';
			$db->setQuery($query);
			$orders = $db->loadObjectList();
			$this->assignRef('orders', $orders);
		} else {
			$query = 'SELECT v.* FROM ' .
hikamarket::table('vendor') . ' AS v WHERE vendor_id IN
('.implode(',', $vendor_id).')';
			$db->setQuery($query);
			$vendors = $db->loadObjectList('vendor_id');
			$this->assignRef('vendors', $vendors);

			$vendor_names = array();
			foreach($vendors as &$v) {
				$vendor_names[] = $v->vendor_name;
				$v->nb_orders = 0;
				$v->total_vendor_price = 0.0;
				$v->total_full_price = 0.0;
			}
			unset($v);
			$vendor_names = implode(', ', array_slice($vendor_names, 0,
5));

			$title = JText::sprintf('VENDOR_PAY', $vendor_names);

			$pageInfo->filter->filter_start =
$app->getUserStateFromRequest($this->paramBase.'.filter_start',
'filter_start', '', 'string');
			$pageInfo->filter->filter_end =
$app->getUserStateFromRequest($this->paramBase.'.filter_end',
'filter_end', '', 'string');

			$filters = array(
				'vendor_id' => 't.vendor_id IN
('.implode(',', $vendor_id).')',
				'transaction_price' => 't.order_transaction_price !=
0',
				'transaction_paid' => 't.order_transaction_paid =
0',
				'transaction_valid' => 't.order_transaction_valid
> 0'
			);
			$date_filters = '';
			if(!empty($pageInfo->filter->filter_start)) {
				$parts = explode(' ',
$pageInfo->filter->filter_start);
				$parts = explode('-', $parts[0]);
				$start = hikamarket::getTime(mktime(0, 0, 0, $parts[1], $parts[2],
$parts[0]));

				$filters['date_start'] = 't.order_transaction_created
>= ' . (int)$start;
			}
			if(!empty($pageInfo->filter->filter_end)) {
				$parts = explode(' ', $pageInfo->filter->filter_end);
				$parts = explode('-', $parts[0]);
				$end = hikamarket::getTime(mktime(23, 59, 59, $parts[1], $parts[2],
$parts[0]));

				$filters['date_end'] = 't.order_transaction_created
<= ' . (int)$end;
			}

			$query = 'SELECT t.vendor_id, t.order_transaction_currency_id,
COUNT(t.order_transaction_id) AS `nb_orders`,
SUM(t.order_transaction_price) AS `total_vendor_price`,
SUM(o.order_full_price) AS `total_full_price` '.
					' FROM
'.hikamarket::table('order_transaction').' AS t
'.
					' LEFT JOIN
'.hikamarket::table('shop.order').' AS o ON t.order_id
= o.order_parent_id AND t.vendor_id = o.order_vendor_id '.
					' WHERE ('.implode(') AND (', $filters)
.')'.
					' GROUP BY t.vendor_id, t.order_transaction_currency_id';
			$db->setQuery($query);
			$transactions = $db->loadObjectList();
			foreach($transactions as $transaction) {
				if(empty($vendors[ (int)$transaction->vendor_id ]))
					continue;
				$vendors[ (int)$transaction->vendor_id ]->nb_orders +=
(int)$transaction->nb_orders;

				$vendor_currency_id = (int)$vendors[ (int)$transaction->vendor_id
]->vendor_currency_id;
				if($vendor_currency_id ==
(int)$transaction->order_transaction_currency_id) {
					$vendors[ (int)$transaction->vendor_id ]->total_vendor_price +=
(float)hikamarket::toFloat($transaction->total_vendor_price);
					$vendors[ (int)$transaction->vendor_id ]->total_full_price +=
(float)hikamarket::toFloat($transaction->total_full_price);
				} else {
					$order->total_vendor_price =
(float)hikamarket::toFloat($order->total_vendor_price);
					$order->total_full_price =
(float)hikamarket::toFloat($order->total_full_price);

					$vendors[ (int)$transaction->vendor_id ]->total_vendor_price +=
$this->currencyHelper->convertUniquePrice($transaction->total_vendor_price,
(int)$transaction->order_transaction_currency_id, $vendor_currency_id);
					$vendors[ (int)$transaction->vendor_id ]->total_full_price +=
$this->currencyHelper->convertUniquePrice($transaction->total_full_price,
(int)$transaction->order_transaction_currency_id, $vendor_currency_id);

					if(empty($vendors[ (int)$transaction->vendor_id ]->currencies))
						$vendors[ (int)$transaction->vendor_id ]->currencies =
array();
					$vendors[ (int)$transaction->vendor_id
]->currencies[(int)$transaction->order_transaction_currency_id] =
array(
						'vendor' => $transaction->total_vendor_price,
						'full' => $transaction->total_full_price
					);
				}
			}
		}

		hikamarket::setTitle($title, self::icon, self::ctrl.$ctrl);
		$this->toolbar = array(
			'pay' => array('name' => 'custom',
'icon' => 'pay', 'alt' =>
JText::_('PAY_VENDOR'), 'task' =>
'dopay'),
			array('name' => 'hikacancel', 'url'
=> (is_int($vendor_id) ?
hikamarket::completeLink('vendor&task=edit&cid[]='.$vendor_id)
: hikamarket::completeLink('vendor&task=listing')) ),
			'|',
			array('name' => 'pophelp', 'target'
=> self::ctrl.'-pay')
		);
		if(!$feeMode) {
			$this->toolbar['pay'] = array(
				'name' => 'custom',
				'icon' => 'invoice',
				'alt' => JText::_('GENERATE_INVOICE'),
				'task' => 'dogeninvoice'
			);
		}
	}

	public function payreport($tpl = null) {
		$app = JFactory::getApplication();
		$db = JFactory::getDBO();
		$ctrl = '';

		$order_ids = hikaInput::get()->get('cid', array(),
'array');
		hikamarket::toInteger($order_ids);

		$this->loadRef(array(
			'popup' => 'shop.helper.popup',
			'currencyClass' => 'shop.class.currency'
		));

		$shopConfig = hikamarket::config(false);
		$created_status = $shopConfig->get('order_created_status',
'created');
		$this->assignRef('created_status', $created_status);

		$order_types = array('vendorpayment', 'sale');
		foreach($order_types as &$order_type) {
			$order_type = $db->Quote($order_type);
		}
		unset($order_type);

		$query = 'SELECT v.*, o.* FROM ' .
hikamarket::table('shop.order') . ' AS o '.
				' INNER JOIN ' . hikamarket::table('vendor') .
' AS v ON o.order_vendor_id = v.vendor_id '.
				' WHERE o.order_type IN ('.implode(',',
$order_types).') AND o.order_id IN ('.implode(',',
$order_ids).')';
		$db->setQuery($query);
		$orders = $db->loadObjectList('order_id');
		$this->assignRef('orders', $orders);

		$cancelUrl =
urlencode(base64_encode(hikamarket::completeLink('vendor&task=pay&report=1&cid='.implode('&cid=',
$order_ids))));
		$this->assignRef('cancelUrl', $cancelUrl);

		hikamarket::setTitle(JText::_('VENDOR_PAY_REPORT'), self::icon,
self::ctrl.$ctrl.'&task=pay&report=1&cid[]=' .
implode('&cid[]=', $order_ids));
		$this->toolbar = array(
			array('name' => 'hikacancel', 'url'
=> hikamarket::completeLink('vendor&task=listing')),
			'|',
			array('name' => 'pophelp', 'target'
=> self::ctrl.'-pay')
		);
	}

	public function paymanual($tpl = null) {
		$app = JFactory::getApplication();
		$config = hikamarket::config();
		$shopConfig = hikamarket::config(false);

		$vendor_id = hikamarket::getCID('vendor_id');
		$order_id = hikaInput::get()->getInt('order_id', 0);


		$this->loadRef(array(
			'vendorClass' => 'class.vendor',
			'orderClass' => 'class.order',
			'currencyClass' => 'shop.class.currency',
		));

		$order = $this->orderClass->getRaw($order_id);
		$this->assignRef('order', $order);

		$payment_method =
hikaInput::get()->getString('payment_method',
'manual');
		$this->assignRef('payment_method', $payment_method);

		$vendor = $this->vendorClass->get($vendor_id);
		$this->assignRef('vendor', $vendor);

		if(($order->order_vendor_id != $vendor->vendor_id) ||
$order->order_type != 'vendorpayment') {
			$app->enqueueMessage(JText::_('INVALID_DATA'),
'error');
			return false;
		}

		$created_status = $shopConfig->get('order_created_status',
'created');
		$confirmed_status =
$shopConfig->get('order_confirmed_status',
'confirmed');
		if($order->order_status == $confirmed_status) {
			$app->enqueueMessage(JText::_('HIKAM_ORDER_ALREADY_PAID'));
			return false;
		}

		$this->assignRef('confirmed_status', $confirmed_status);

		if($payment_method == 'paypal') {
			$lang = JFactory::getLanguage();
			$locale = strtolower(substr($lang->get('tag'), 0, 2));

			$notify_url =
HIKASHOP_LIVE.'index.php?option=com_hikamarket&ctrl=vendor&task=vendorpaynotify&mode=paypal&order_id='.$order->order_id.'&tmpl=component&lang='.$locale;
			$return_url =
HIKASHOP_LIVE.'administrator/index.php?option=com_hikamarket&ctrl=vendor&task=paymanual&order_id='.$order->order_id.'&vendor_id='.$vendor->vendor_id.'&return=1&tmpl=component';
			$cancel_url =
HIKASHOP_LIVE.'administrator/index.php?option=com_hikamarket&ctrl=vendor&task=paymanual&order_id='.$order->order_id.'&vendor_id='.$vendor->vendor_id.'&return=1&error=1&tmpl=component';

			$this->return_url =
'https://www.paypal.com/cgi-bin/webscr';

			$currencies = null;
			$currencies =
$this->currencyClass->getCurrencies($order->order_currency_id,
$currencies);
			$currency = $currencies[$order->order_currency_id];

			if($currency->currency_locale['int_frac_digits'] > 2)
				$currency->currency_locale['int_frac_digits'] = 2;

			$this->vars = array(
				'cmd' => '_ext-enter',
				'redirect_cmd' => '_cart',
				'upload' => '1',
				'business' => $vendor->vendor_params->paypal_email,
				'receiver_email' =>
$vendor->vendor_params->paypal_email,
				'invoice' => $order->order_id,
				'currency_code' => $currency->currency_code,
				'return' => $return_url,
				'notify_url' => $notify_url,
				'cancel_return' => $cancel_url,
				'undefined_quantity' => '0',
				'test_ipn' => '0',
				'no_shipping' => '1',
				'no_note' => '1',
				'charset' => 'utf-8',
				'rm' => '0',
				'bn' => 'ObsidevHikaMarket_Cart_WPS',
				'amount_1' => round($order->order_full_price,
(int)$currency->currency_locale['int_frac_digits']),
				'item_name_1' =>
JText::sprintf('VENDOR_ORDER_PAYMENT', $vendor->vendor_name,
$order->order_number)
			);
		}
	}

	public function searchfields() {
		$db = JFactory::getDBO();
		if(!HIKASHOP_J30) {
			$columnTable =
$db->getTableFields(hikamarket::table('vendor'));
			$columns = reset($columnTable);
		} else {
			$columns =
$db->getTableColumns(hikamarket::table('vendor'));
		}

		$rows = array_keys($columns);
		$selected = hikaInput::get()->getString('values',
'');
		$selected_values = explode(',', $selected);
		$new_rows = array();

		foreach($rows as $id => $row) {
			$obj = new stdClass();
			$obj->namekey = $row;
			if(in_array($row, $selected_values))
				$obj->selected = true;
			$new_rows[] = $obj;
		}

		$this->assignRef('rows',$new_rows);
		$controlName = hikaInput::get()->getString('control',
'params');
		$this->assignRef('controlName', $controlName);
	}

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

		$config = hikamarket::config();
		$this->assignRef('config', $config);

		$toggleClass = hikamarket::get('helper.toggle');
		$this->assignRef('toggleClass', $toggleClass);

		$cid = hikaInput::get()->post->get('cid', array(),
'array');
		hikamarket::toInteger($cid);

		$query = 'SELECT v.* FROM ' .
hikamarket::table('vendor') . ' AS v '.
				' WHERE v.vendor_id IN ('.implode(',', $cid) .
') AND v.vendor_id > 1';
		$db->setQuery($query);
		$vendors = $db->loadObjectList('vendor_id');
		$this->assignRef('vendors', $vendors);

		$vendor_ids = array_keys($vendors);
		$this->assignRef('vendor_ids', $vendor_ids);

		$query = 'SELECT p.product_vendor_id, count(p.product_id) as value
FROM ' . hikamarket::table('shop.product') . ' AS p
WHERE p.product_vendor_id IN ('.implode(',', $vendor_ids) .
')';
		$db->setQuery($query);
		$data = $db->loadObjectList('product_vendor_id');
		foreach($data as $k => $d) {
			if((int)$k > 0)
				$vendors[(int)$k]->products = $d->value;
		}

		$query = 'SELECT o.order_vendor_id, count(o.order_id) as value FROM
' . hikamarket::table('shop.order') . ' AS o WHERE
o.order_vendor_id IN ('.implode(',', $vendor_ids) . ')
AND o.order_type = '.$db->Quote('subsale');
		$db->setQuery($query);
		$data = $db->loadObjectList('order_vendor_id');
		foreach($data as $k => $d) {
			if((int)$k > 0)
				$vendors[(int)$k]->orders = $d->value;
		}

		$query = 'SELECT u.user_vendor_id, count(u.user_id) as value FROM
' . hikamarket::table('shop.user') . ' AS u WHERE
u.user_vendor_id IN ('.implode(',', $vendor_ids) .
')';
		$db->setQuery($query);
		$data = $db->loadObjectList('user_vendor_id');
		foreach($data as $k => $d) {
			if((int)$k > 0)
				$vendors[(int)$k]->users = $d->value;
		}

		hikamarket::toInteger($vendor_ids);
		sort($vendor_ids);
		$confirm_value = md5(implode(';', $vendor_ids));
		$this->assignRef('confirm_value', $confirm_value);

		hikamarket::setTitle(JText::_('DELETE_VENDORS'), self::icon,
self::ctrl);
		$this->toolbar = array(
			'remove' => array('name' =>
'custom', 'icon' => 'delete',
'alt' => JText::_('HIKA_DELETE'), 'task'
=> 'remove'),
			'hikacancel',
			'|',
			array('name' => 'pophelp', 'target'
=> self::ctrl.'-form')
		);
	}

	public function reports() {
		$app = JFactory::getApplication();
		$config = hikamarket::config();

		$vendor_id = hikamarket::getCID();
		$vendorClass = hikamarket::get('class.vendor');

		$vendor = $vendorClass->get($vendor_id);
		if(empty($vendor)) {
			$app->enqueueMessage(JText::_('VENDOR_DOES_NOT_EXIST'),
'error');
			$app->redirect(
hikamarket::completeLink('vendor&task=listing', false, true)
);
		}

		$statisticsClass = hikamarket::get('class.statistics');
		$statistics = $statisticsClass->getVendor($vendor);

		$vendor_statistics = $config->get('vendor_statistics',
null);
		if(!empty($vendor_statistics)) {
			foreach($statistics as $key => &$stat) {
				$stat['published'] = false;
			}
			unset($stat);

			$vendor_statistics =
hikamarket::unserialize(base64_decode($vendor_statistics));
			foreach($vendor_statistics as $key => $stat_conf) {
				if(!isset($statistics[$key]))
					continue;

				if(isset($stat_conf['container']))
					$statistics[$key]['container'] =
(int)$stat_conf['container'];
				if(isset($stat_conf['slot']))
					$statistics[$key]['slot'] =
(int)$stat_conf['slot'];
				if(isset($stat_conf['order']))
					$statistics[$key]['order'] =
(int)$stat_conf['order'];
				if(isset($stat_conf['published']))
					$statistics[$key]['published'] =
$stat_conf['published'];
				if(!empty($stat_conf['vars'])) {
					foreach($stat_conf['vars'] as $k => $v)
						$statistics[$key]['vars'][$k] = $v;
				}
			}

			uasort($statistics, array($this, 'sortStats'));
		}

		$statistic_slots = array();
		if(!empty($statistics)) {
			foreach($statistics as $key => &$stat) {
				if(isset($stat['published']) &&
empty($stat['published']))
					continue;

				$stat['key'] = $key;
				if(empty($stat['slot']))
					$stat['slot'] = 0;
				if(!isset($statistic_slots[ (int)$stat['slot'] ]))
					$statistic_slots[ (int)$stat['slot'] ] = array();

				$order = @$stat['order'] * 100;
				if(isset($statistic_slots[ $stat['slot'] ][ $order ])) {
					for($i = 1; $i < 100; $i++) {
						if(!isset($statistic_slots[ (int)$stat['slot'] ][ $order +
$i ])) {
							$order += $i;
							break;
						}
					}
				}

				$statistic_slots[ (int)$stat['slot'] ][$order] =& $stat;
			}
			unset($stat);
		}

		$this->assignRef('statistics', $statistics);
		$this->assignRef('statisticsClass', $statisticsClass);
		$this->assignRef('statistic_slots', $statistic_slots);

		$toolbar_icon = 'chart-bar';

		hikamarket::setTitle(JText::sprintf('VENDOR_REPORTS',
$vendor->vendor_name), $toolbar_icon,
self::ctrl.'&task=reports&cid='.$vendor_id);
		$this->toolbar = array(
			array('name' => 'hikacancel', 'url'
=>
hikamarket::completeLink('vendor&task=edit&cid='.$vendor_id)),
			'|',
			array('name' => 'pophelp', 'target'
=> self::ctrl.'-form'),
			'dashboard'
		);
	}

	protected function sortStats($a, $b) {
		if($a['order'] == $b['order'])
			return 0;
		return ($a['order'] < $b['order']) ? -1 : 1;
	}
}
searches/tmpl/default.php000064400000006020151161425220011447
0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_search
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

// Include the component HTML helpers.
JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html');

JHtml::_('bootstrap.tooltip');
JHtml::_('behavior.multiselect');
JHtml::_('formbehavior.chosen', 'select');

$listOrder =
$this->escape($this->state->get('list.ordering'));
$listDirn =
$this->escape($this->state->get('list.direction'));
?>
<form action="<?php echo
JRoute::_('index.php?option=com_search&view=searches');
?>" method="post" name="adminForm"
id="adminForm">
	<?php if (!empty( $this->sidebar)) : ?>
	<div id="j-sidebar-container" class="span2">
		<?php echo $this->sidebar; ?>
	</div>
	<div id="j-main-container" class="span10">
	<?php else : ?>
	<div id="j-main-container">
	<?php endif; ?>
		<?php echo
JLayoutHelper::render('joomla.searchtools.default',
array('view' => $this, 'options' =>
array('filterButton' => false))); ?>
		<div class="clearfix"> </div>
		<?php if (empty($this->items)) : ?>
		<div class="alert alert-no-items">
			<?php echo JText::_('JGLOBAL_NO_MATCHING_RESULTS'); ?>
		</div>
		<?php else : ?>
		<table class="table table-striped">
			<thead>
				<tr>
					<th class="nowrap">
						<?php echo JHtml::_('searchtools.sort',
'COM_SEARCH_HEADING_PHRASE', 'a.search_term',
$listDirn, $listOrder); ?>
					</th>
					<th width="15%" class="nowrap">
						<?php echo JHtml::_('searchtools.sort',
'JGLOBAL_HITS', 'a.hits', $listDirn, $listOrder); ?>
					</th>
					<th width="1%" class="nowrap center">
						<?php echo JText::_('COM_SEARCH_HEADING_RESULTS'); ?>
					</th>
				</tr>
			</thead>
			<tfoot>
				<tr>
					<td colspan="3">
						<?php echo $this->pagination->getListFooter(); ?>
					</td>
				</tr>
			</tfoot>
			<tbody>
			<?php foreach ($this->items as $i => $item) : ?>
				<tr class="row<?php echo $i % 2; ?>">
					<td class="break-word">
						<?php echo $this->escape($item->search_term); ?>
					</td>
					<td>
						<?php echo (int) $item->hits; ?>
					</td>
					<?php if ($this->state->get('show_results')) :
?>

					<td class="center btns">
						<a class="badge <?php if ($item->returns > 0) echo
'badge-success'; ?>" target="_blank"
href="<?php echo JUri::root();
?>index.php?option=com_search&amp;view=search&amp;searchword=<?php
echo JFilterOutput::stringURLSafe($item->search_term); ?>">
							<?php echo $item->returns; ?><span
class="icon-out-2"
aria-hidden="true"></span><span
class="element-invisible"><?php echo
JText::_('JBROWSERTARGET_NEW'); ?></span></a>
					</td>
					<?php else : ?>
					<td class="center">
						<?php echo JText::_('COM_SEARCH_NO_RESULTS'); ?>
					</td>
					<?php endif; ?>
				</tr>
			<?php endforeach; ?>
			</tbody>
		</table>
		<?php endif; ?>
		<input type="hidden" name="task"
value="" />
		<input type="hidden" name="boxchecked"
value="0" />
		<?php echo JHtml::_('form.token'); ?>
	</div>
</form>
searches/tmpl/default.xml000064400000000313151161425220011457
0ustar00<?xml version="1.0" encoding="utf-8"?>
<metadata>
	<layout title="COM_SEARCH_SEARCH_VIEW_DEFAULT_TITLE">
		<message>
			<![CDATA[COM_SEARCH_SEARCH_VIEW_DEFAULT_DESC]]>
		</message>
	</layout>
</metadata>searches/view.html.php000064400000004764151161425220011001
0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_search
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

/**
 * View class for a list of search terms.
 *
 * @since  1.5
 */
class SearchViewSearches extends JViewLegacy
{
	protected $enabled;

	protected $items;

	protected $pagination;

	protected $state;

	/**
	 * Display the view.
	 *
	 * @param   string  $tpl  The name of the template file to parse;
automatically searches through the template paths.
	 *
	 * @return  mixed  A string if successful, otherwise an Error object.
	 */
	public function display($tpl = null)
	{
		$app                 = JFactory::getApplication();
		$this->items         = $this->get('Items');
		$this->pagination    = $this->get('Pagination');
		$this->state         = $this->get('State');
		$this->filterForm    = $this->get('FilterForm');
		$this->activeFilters = $this->get('ActiveFilters');
		$this->enabled       =
$this->state->params->get('enabled');
		$this->canDo         =
JHelperContent::getActions('com_search');

		// Check for errors.
		if (count($errors = $this->get('Errors')))
		{
			throw new Exception(implode("\n", $errors), 500);
		}

		// Check if plugin is enabled
		if ($this->enabled)
		{
			$app->enqueueMessage(JText::_('COM_SEARCH_LOGGING_ENABLED'),
'notice');
		}
		else
		{
			$app->enqueueMessage(JText::_('COM_SEARCH_LOGGING_DISABLED'),
'warning');
		}

		$this->addToolbar();
		parent::display($tpl);
	}

	/**
	 * Add the page title and toolbar.
	 *
	 * @return  void
	 *
	 * @since   1.6
	 */
	protected function addToolbar()
	{
		$canDo = $this->canDo;

		JToolbarHelper::title(JText::_('COM_SEARCH_MANAGER_SEARCHES'),
'search');

		$showResults = $this->state->get('show_results', 1,
'int');

		if ($showResults === 0)
		{
			JToolbarHelper::custom('searches.toggleresults',
'zoom-in.png', null, 'COM_SEARCH_SHOW_SEARCH_RESULTS',
false);
		}
		else
		{
			JToolbarHelper::custom('searches.toggleresults',
'zoom-out.png', null, 'COM_SEARCH_HIDE_SEARCH_RESULTS',
false);
		}

		if ($canDo->get('core.edit.state'))
		{
			JToolbarHelper::custom('searches.reset',
'refresh.png', 'refresh_f2.png',
'JSEARCH_RESET', false);
		}

		JToolbarHelper::divider();

		if ($canDo->get('core.admin') ||
$canDo->get('core.options'))
		{
			JToolbarHelper::preferences('com_search');
		}

		JToolbarHelper::divider();
		JToolbarHelper::help('JHELP_COMPONENTS_SEARCH');
	}
}
cache/tmpl/default.php000064400000005003151161625600010721 0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_cache
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

JHtml::_('formbehavior.chosen', 'select');
JHtml::_('bootstrap.tooltip');

$listOrder =
$this->escape($this->state->get('list.ordering'));
$listDirn  =
$this->escape($this->state->get('list.direction'));
?>
<form action="<?php echo
JRoute::_('index.php?option=com_cache'); ?>"
method="post" name="adminForm"
id="adminForm">
	<?php if (!empty($this->sidebar)) : ?>
	<div id="j-sidebar-container" class="span2">
		<?php echo $this->sidebar; ?>
	</div>
	<div id="j-main-container" class="span10">
	<?php else : ?>
	<div id="j-main-container">
	<?php endif; ?>
		<?php echo
JLayoutHelper::render('joomla.searchtools.default',
array('view' => $this)); ?>
		<?php if ($this->total > 0) : ?>
		<table class="table table-striped">
			<thead>
				<tr>
					<th width="1%" class="nowrap center">
						<?php echo JHtml::_('grid.checkall'); ?>
					</th>
					<th class="title nowrap">
						<?php echo JHtml::_('searchtools.sort',
'COM_CACHE_GROUP', 'group', $listDirn, $listOrder);
?>
					</th>
					<th width="5%" class="nowrap">
						<?php echo JHtml::_('searchtools.sort',
'COM_CACHE_NUMBER_OF_FILES', 'count', $listDirn,
$listOrder); ?>
					</th>
					<th width="10%" class="nowrap">
						<?php echo JHtml::_('searchtools.sort',
'COM_CACHE_SIZE', 'size', $listDirn, $listOrder); ?>
					</th>
				</tr>
			</thead>
			<tfoot>
				<tr>
					<td colspan="4">
					<?php echo $this->pagination->getListFooter(); ?>
					</td>
				</tr>
			</tfoot>
			<tbody>
				<?php
				$i = 0;
				foreach ($this->data as $folder => $item) : ?>
					<tr class="row<?php echo $i % 2; ?>">
						<td>
							<input type="checkbox" id="cb<?php echo $i;
?>" name="cid[]" value="<?php echo
$this->escape($item->group); ?>"
onclick="Joomla.isChecked(this.checked);" />
						</td>
						<td>
							<label for="cb<?php echo $i; ?>">
								<strong><?php echo $this->escape($item->group);
?></strong>
							</label>
						</td>
						<td>
							<?php echo $item->count; ?>
						</td>
						<td>
							<?php echo JHtml::_('number.bytes', $item->size);
?>
						</td>
					</tr>
				<?php $i++; endforeach; ?>
			</tbody>
		</table>
		<?php endif; ?>
		<input type="hidden" name="task"
value="" />
		<input type="hidden" name="boxchecked"
value="0" />
		<?php echo JHtml::_('form.token'); ?>
	</div>
</form>
cache/tmpl/default.xml000064400000000310151161625600010726 0ustar00<?xml
version="1.0" encoding="utf-8"?>
<metadata>
	<layout title="COM_CACHE_CACHE_VIEW_DEFAULT_TITLE">
		<message>
			<![CDATA[COM_CACHE_CACHE_VIEW_DEFAULT_DESC]]>
		</message>
	</layout>
</metadata>
cache/view.html.php000064400000004252151161625600010243 0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_cache
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

/**
 * HTML View class for the Cache component
 *
 * @since  1.6
 */
class CacheViewCache extends JViewLegacy
{
	/**
	 * @var object client object.
	 * @deprecated 4.0
	 */
	protected $client;

	protected $data;

	protected $pagination;

	protected $state;

	/**
	 * Display a view.
	 *
	 * @param   string  $tpl  The name of the template file to parse;
automatically searches through the template paths.
	 *
	 * @return  mixed  A string if successful, otherwise an Error object.
	 */
	public function display($tpl = null)
	{
		$this->data          = $this->get('Data');
		$this->pagination    = $this->get('Pagination');
		$this->total         = $this->get('Total');
		$this->state         = $this->get('State');
		$this->filterForm    = $this->get('FilterForm');
		$this->activeFilters = $this->get('ActiveFilters');

		// Check for errors.
		if (count($errors = $this->get('Errors')))
		{
			throw new Exception(implode("\n", $errors), 500);
		}

		$this->addToolbar();
		$this->sidebar = JHtmlSidebar::render();
		parent::display($tpl);
	}

	/**
	 * Add the page title and toolbar.
	 *
	 * @return  void
	 *
	 * @since   1.6
	 */
	protected function addToolbar()
	{
		$state = $this->get('State');

		if ($state->get('client_id') == 1)
		{
			JToolbarHelper::title(JText::_('COM_CACHE_CLEAR_CACHE_ADMIN_TITLE'),
'lightning clear');
		}
		else
		{
			JToolbarHelper::title(JText::_('COM_CACHE_CLEAR_CACHE_SITE_TITLE'),
'lightning clear');
		}

		JToolbarHelper::custom('delete', 'delete.png',
'delete_f2.png', 'JTOOLBAR_DELETE', true);
		JToolbarHelper::custom('deleteAll', 'remove.png',
'delete_f2.png', 'JTOOLBAR_DELETE_ALL', false);
		JToolbarHelper::divider();

		if (JFactory::getUser()->authorise('core.admin',
'com_cache'))
		{
			JToolbarHelper::preferences('com_cache');
		}

		JToolbarHelper::divider();
		JToolbarHelper::help('JHELP_SITE_MAINTENANCE_CLEAR_CACHE');

		JHtmlSidebar::setAction('index.php?option=com_cache');
	}
}
purge/tmpl/default.php000064400000001276151161625600011010 0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_cache
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;
?>

<form action="<?php echo
JRoute::_('index.php?option=com_cache&view=purge');
?>" method="post" name="adminForm"
id="adminForm">
	<div id="j-sidebar-container" class="span2">
		<?php echo $this->sidebar; ?>
	</div>
	<div id="j-main-container" class="span10">
	<p><?php echo JText::_('COM_CACHE_PURGE_INSTRUCTIONS');
?></p>
	<input type="hidden" name="task" value=""
/>
	<?php echo JHtml::_('form.token'); ?>
	</div>
</form>
purge/tmpl/default.xml000064400000000310151161625600011005 0ustar00<?xml
version="1.0" encoding="utf-8"?>
<metadata>
	<layout title="COM_CACHE_PURGE_VIEW_DEFAULT_TITLE">
		<message>
			<![CDATA[COM_CACHE_PURGE_VIEW_DEFAULT_DESC]]>
		</message>
	</layout>
</metadata>
purge/view.html.php000064400000002622151161625600010321 0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_cache
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

/**
 * HTML View class for the Cache component
 *
 * @since  1.6
 */
class CacheViewPurge extends JViewLegacy
{
	/**
	 * Display a view.
	 *
	 * @param   string  $tpl  The name of the template file to parse;
automatically searches through the template paths.
	 *
	 * @return  mixed  A string if successful, otherwise an Error object.
	 */
	public function display($tpl = null)
	{
		JFactory::getApplication()->enqueueMessage(JText::_('COM_CACHE_RESOURCE_INTENSIVE_WARNING'),
'warning');

		$this->addToolbar();
		$this->sidebar = JHtmlSidebar::render();

		parent::display($tpl);
	}

	/**
	 * Add the page title and toolbar.
	 *
	 * @return  void
	 *
	 * @since   1.6
	 */
	protected function addToolbar()
	{
		JToolbarHelper::title(JText::_('COM_CACHE_PURGE_EXPIRED_CACHE'),
'lightning purge');
		JToolbarHelper::custom('purge', 'delete.png',
'delete_f2.png', 'COM_CACHE_PURGE_EXPIRED', false);
		JToolbarHelper::divider();

		if (JFactory::getUser()->authorise('core.admin',
'com_cache'))
		{
			JToolbarHelper::preferences('com_cache');
			JToolbarHelper::divider();
		}

		JToolbarHelper::help('JHELP_SITE_MAINTENANCE_PURGE_EXPIRED_CACHE');
	}
}
database/tmpl/default.php000064400000006510151161713270011427
0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_installer
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

?>
<div id="installer-database" class="clearfix">
	<form action="<?php echo
JRoute::_('index.php?option=com_installer&view=database');
?>" method="post" name="adminForm"
id="adminForm">

	<?php if (!empty( $this->sidebar)) : ?>
		<div id="j-sidebar-container" class="span2">
			<?php echo $this->sidebar; ?>
		</div>
		<div id="j-main-container" class="span10">
	<?php else : ?>
		<div id="j-main-container">
	<?php endif; ?>
		<?php if ($this->errorCount === 0) : ?>
			<?php echo JHtml::_('bootstrap.startTabSet',
'myTab', array('active' => 'other'));
?>
		<?php else : ?>
			<?php echo JHtml::_('bootstrap.startTabSet',
'myTab', array('active' => 'problems'));
?>
			<?php echo JHtml::_('bootstrap.addTab', 'myTab',
'problems',
JText::plural('COM_INSTALLER_MSG_N_DATABASE_ERROR_PANEL',
$this->errorCount)); ?>
				<fieldset class="panelform">
					<ul>
						<?php if (!$this->filterParams) : ?>
							<li><?php echo
JText::_('COM_INSTALLER_MSG_DATABASE_FILTER_ERROR');
?></li>
						<?php endif; ?>

						<?php if ($this->schemaVersion !=
$this->changeSet->getSchema()) : ?>
							<li><?php echo
JText::sprintf('COM_INSTALLER_MSG_DATABASE_SCHEMA_ERROR',
$this->schemaVersion, $this->changeSet->getSchema());
?></li>
						<?php endif; ?>

						<?php if (version_compare($this->updateVersion, JVERSION) != 0)
: ?>
							<li><?php echo
JText::sprintf('COM_INSTALLER_MSG_DATABASE_UPDATEVERSION_ERROR',
$this->updateVersion, JVERSION); ?></li>
						<?php endif; ?>

						<?php foreach ($this->errors as $line => $error) : ?>
							<?php $key = 'COM_INSTALLER_MSG_DATABASE_' .
$error->queryType;
							$msgs = $error->msgElements;
							$file = basename($error->file);
							$msg0 = isset($msgs[0]) ? $msgs[0] : ' ';
							$msg1 = isset($msgs[1]) ? $msgs[1] : ' ';
							$msg2 = isset($msgs[2]) ? $msgs[2] : ' ';
							$message = JText::sprintf($key, $file, $msg0, $msg1, $msg2); ?>
							<li><?php echo $message; ?></li>
						<?php endforeach; ?>
					</ul>
				</fieldset>
			<?php echo JHtml::_('bootstrap.endTab'); ?>
		<?php endif; ?>
			<?php echo JHtml::_('bootstrap.addTab', 'myTab',
'other', JText::_('COM_INSTALLER_MSG_DATABASE_INFO'));
?>
				<div class="control-group" >
					<fieldset class="panelform">
						<ul>
							<li><?php echo
JText::sprintf('COM_INSTALLER_MSG_DATABASE_SCHEMA_VERSION',
$this->schemaVersion); ?></li>
							<li><?php echo
JText::sprintf('COM_INSTALLER_MSG_DATABASE_UPDATE_VERSION',
$this->updateVersion); ?></li>
							<li><?php echo
JText::sprintf('COM_INSTALLER_MSG_DATABASE_DRIVER',
JFactory::getDbo()->name); ?></li>
							<li><?php echo
JText::sprintf('COM_INSTALLER_MSG_DATABASE_CHECKED_OK',
count($this->results['ok'])); ?></li>
							<li><?php echo
JText::sprintf('COM_INSTALLER_MSG_DATABASE_SKIPPED',
count($this->results['skipped'])); ?></li>
						</ul>
					</fieldset>
				</div>
				<?php echo JHtml::_('bootstrap.endTab'); ?>
			<?php echo JHtml::_('bootstrap.endTabSet'); ?>

			<input type="hidden" name="task"
value="" />
			<input type="hidden" name="boxchecked"
value="0" />
			<?php echo JHtml::_('form.token'); ?>
		</div>
	</form>
</div>
database/tmpl/default.xml000064400000000326151161713270011437
0ustar00<?xml version="1.0" encoding="utf-8"?>
<metadata>
	<layout title="COM_INSTALLER_DATABASE_VIEW_DEFAULT_TITLE">
		<message>
			<![CDATA[COM_INSTALLER_DATABASE_VIEW_DEFAULT_DESC]]>
		</message>
	</layout>
</metadata>
database/view.html.php000064400000004232151161713270010743 0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_installer
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

JLoader::register('InstallerViewDefault', dirname(__DIR__) .
'/default/view.php');

/**
 * Extension Manager Database View
 *
 * @since  1.6
 */
class InstallerViewDatabase extends InstallerViewDefault
{
	/**
	 * Display the view.
	 *
	 * @param   string  $tpl  Template
	 *
	 * @return  void
	 *
	 * @since   1.6
	 */
	public function display($tpl = null)
	{
		// Set variables
		$app = JFactory::getApplication();

		// Get data from the model.
		$this->state = $this->get('State');
		$this->changeSet = $this->get('Items');
		$this->errors = $this->changeSet->check();
		$this->results = $this->changeSet->getStatus();
		$this->schemaVersion = $this->get('SchemaVersion');
		$this->updateVersion = $this->get('UpdateVersion');
		$this->filterParams  = $this->get('DefaultTextFilters');
		$this->schemaVersion = $this->schemaVersion ?:
JText::_('JNONE');
		$this->updateVersion = $this->updateVersion ?:
JText::_('JNONE');
		$this->pagination = $this->get('Pagination');
		$this->errorCount = count($this->errors);

		if ($this->schemaVersion != $this->changeSet->getSchema())
		{
			$this->errorCount++;
		}

		if (!$this->filterParams)
		{
			$this->errorCount++;
		}

		if (version_compare($this->updateVersion, JVERSION) != 0)
		{
			$this->errorCount++;
		}

		if ($this->errorCount === 0)
		{
			$app->enqueueMessage(JText::_('COM_INSTALLER_MSG_DATABASE_OK'),
'notice');
		}
		else
		{
			$app->enqueueMessage(JText::_('COM_INSTALLER_MSG_DATABASE_ERRORS'),
'warning');
		}

		parent::display($tpl);
	}

	/**
	 * Add the page title and toolbar.
	 *
	 * @return  void
	 *
	 * @since   1.6
	 */
	protected function addToolbar()
	{
		/*
		 * Set toolbar items for the page.
		 */
		JToolbarHelper::custom('database.fix', 'refresh',
'refresh', 'COM_INSTALLER_TOOLBAR_DATABASE_FIX',
false);
		JToolbarHelper::divider();
		parent::addToolbar();
		JToolbarHelper::help('JHELP_EXTENSIONS_EXTENSION_MANAGER_DATABASE');
	}
}
default/tmpl/default_ftp.php000064400000002224151161713270012156
0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_installer
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;
?>
<fieldset title="<?php echo
JText::_('COM_INSTALLER_MSG_DESCFTPTITLE'); ?>">
	<legend><?php echo
JText::_('COM_INSTALLER_MSG_DESCFTPTITLE'); ?></legend>

	<?php echo JText::_('COM_INSTALLER_MSG_DESCFTP'); ?>

	<?php if ($this->ftp instanceof Exception) : ?>
		<p><?php echo JText::_($this->ftp->getMessage());
?></p>
	<?php endif; ?>

	<table class="adminform">
		<tbody>
			<tr>
				<td width="120">
					<label for="username"><?php echo
JText::_('JGLOBAL_USERNAME'); ?></label>
				</td>
				<td>
					<input type="text" id="username"
name="username" class="input_box" size="70"
value="" />
				</td>
			</tr>
			<tr>
				<td width="120">
					<label for="password"><?php echo
JText::_('JGLOBAL_PASSWORD'); ?></label>
				</td>
				<td>
					<input type="password" id="password"
name="password" class="input_box" size="70"
value="" />
				</td>
			</tr>
		</tbody>
	</table>

</fieldset>
default/tmpl/default_message.php000064400000001265151161713270013015
0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_installer
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

$state    = $this->get('State');
$message1 = $state->get('message');
$message2 = $state->get('extension_message');
?>

<?php if ($message1) : ?>
	<div class="row-fluid"> 
		<div class="span12"> 
			<strong><?php echo $message1; ?></strong>
		</div>
	</div> 
<?php endif; ?> 
<?php if ($message2) : ?> 
	<div class="row-fluid">
		<div class="span12"> 
			<?php echo $message2; ?>
		</div> 
	</div>
<?php endif; ?>
default/view.php000064400000003510151161713270007656 0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_installer
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

/**
 * Extension Manager Default View
 *
 * @since  1.5
 */
class InstallerViewDefault extends JViewLegacy
{
	/**
	 * Constructor.
	 *
	 * @param   array  $config  Configuration array
	 *
	 * @since   1.5
	 */
	public function __construct($config = null)
	{
		$app = JFactory::getApplication();
		parent::__construct($config);
		$this->_addPath('template', $this->_basePath .
'/views/default/tmpl');
		$this->_addPath('template', JPATH_THEMES . '/' .
$app->getTemplate() . '/html/com_installer/default');
	}

	/**
	 * Display the view.
	 *
	 * @param   string  $tpl  Template
	 *
	 * @return  void
	 *
	 * @since   1.5
	 */
	public function display($tpl = null)
	{
		// Get data from the model.
		$state = $this->get('State');

		// Are there messages to display?
		$showMessage = false;

		if (is_object($state))
		{
			$message1    = $state->get('message');
			$message2    = $state->get('extension_message');
			$showMessage = ($message1 || $message2);
		}

		$this->showMessage = $showMessage;
		$this->state       = &$state;

		$this->addToolbar();
		parent::display($tpl);
	}

	/**
	 * Add the page title and toolbar.
	 *
	 * @return  void
	 *
	 * @since   1.6
	 */
	protected function addToolbar()
	{
		$canDo = JHelperContent::getActions('com_installer');
		JToolbarHelper::title(JText::_('COM_INSTALLER_HEADER_' .
$this->getName()), 'puzzle install');

		if ($canDo->get('core.admin') ||
$canDo->get('core.options'))
		{
			JToolbarHelper::preferences('com_installer');
			JToolbarHelper::divider();
		}

		// Render side bar.
		$this->sidebar = JHtmlSidebar::render();
	}
}
discover/tmpl/default.php000064400000010772151161713270011506
0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_installer
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

JHtml::_('behavior.multiselect');
JHtml::_('bootstrap.tooltip');
JHtml::_('formbehavior.chosen', 'select');

$listOrder =
$this->escape($this->state->get('list.ordering'));
$listDirn  =
$this->escape($this->state->get('list.direction'));
?>
<div id="installer-discover" class="clearfix">
	<form action="<?php echo
JRoute::_('index.php?option=com_installer&view=discover');
?>" method="post" name="adminForm"
id="adminForm">
		<?php if (!empty( $this->sidebar)) : ?>
		<div id="j-sidebar-container" class="span2">
			<?php echo $this->sidebar; ?>
		</div>
		<div id="j-main-container" class="span10">
		<?php else : ?>
		<div id="j-main-container">
		<?php endif; ?>
			<?php if ($this->showMessage) : ?>
				<?php echo $this->loadTemplate('message'); ?>
			<?php endif; ?>
			<?php if ($this->ftp) : ?>
				<?php echo $this->loadTemplate('ftp'); ?>
			<?php endif; ?>
			<?php echo
JLayoutHelper::render('joomla.searchtools.default',
array('view' => $this)); ?>
			<div class="clearfix"></div>
			<div class="alert alert-no-items alert-info">
				<?php echo
JText::_('COM_INSTALLER_MSG_DISCOVER_DESCRIPTION'); ?>
			</div>
			<?php if (empty($this->items)) : ?>
			<div class="alert alert-no-items">
				<?php echo JText::_('JGLOBAL_NO_MATCHING_RESULTS'); ?>
			</div>
			<?php else : ?>

			<table class="table table-striped">
				<thead>
					<tr>
						<th width="1%" class="nowrap center">
							<?php echo JHtml::_('grid.checkall'); ?>
						</th>
						<th class="nowrap">
							<?php echo JHtml::_('searchtools.sort',
'COM_INSTALLER_HEADING_NAME', 'name', $listDirn,
$listOrder); ?>
						</th>
						<th class="nowrap">
							<?php echo JHtml::_('searchtools.sort',
'COM_INSTALLER_HEADING_LOCATION', 'client_translated',
$listDirn, $listOrder); ?>
						</th>
						<th class="nowrap">
							<?php echo JHtml::_('searchtools.sort',
'COM_INSTALLER_HEADING_TYPE', 'type_translated',
$listDirn, $listOrder); ?>
						</th>
						<th width="10%" class="hidden-phone">
							<?php echo JText::_('JVERSION'); ?>
						</th>
						<th width="10%" class="hidden-phone
hidden-tablet">
							<?php echo JText::_('JDATE'); ?>
						</th>
						<th width="15%" class="hidden-phone
hidden-tablet">
							<?php echo JText::_('JAUTHOR'); ?>
						</th>
						<th class="nowrap hidden-phone">
							<?php echo JHtml::_('searchtools.sort',
'COM_INSTALLER_HEADING_FOLDER', 'folder_translated',
$listDirn, $listOrder); ?>
						</th>
						<th width="1%" class="nowrap hidden-phone">
							<?php echo JHtml::_('searchtools.sort',
'JGRID_HEADING_ID', 'extension_id', $listDirn,
$listOrder); ?>
						</th>
					</tr>
				</thead>
				<tfoot>
					<tr>
						<td colspan="9"><?php echo
$this->pagination->getListFooter(); ?></td>
					</tr>
				</tfoot>
				<tbody>
				<?php foreach ($this->items as $i => $item) : ?>
					<tr class="row<?php echo $i % 2; ?>">
						<td class="center">
							<?php echo JHtml::_('grid.id', $i,
$item->extension_id); ?>
						</td>
						<td>
							<label for="cb<?php echo $i;?>">
								<span class="bold hasTooltip" title="<?php
echo JHtml::_('tooltipText', $item->name,
$item->description, 0); ?>"><?php echo $item->name;
?></span>
							</label>
						</td>
						<td>
							<?php echo $item->client_translated; ?>
						</td>
						<td>
							<?php echo $item->type_translated; ?>
						</td>
						<td class="hidden-phone">
							<?php echo @$item->version != '' ? $item->version
: '&#160;'; ?>
						</td>
						<td class="hidden-phone hidden-tablet">
							<?php echo @$item->creationDate != '' ?
$item->creationDate : '&#160;'; ?>
						</td>
						<td class="hidden-phone hidden-tablet">
							<span class="editlinktip hasTooltip"
title="<?php echo JHtml::_('tooltipText',
JText::_('COM_INSTALLER_AUTHOR_INFORMATION'),
$item->author_info, 0); ?>">
								<?php echo @$item->author != '' ? $item->author
: '&#160;'; ?>
							</span>
						</td>
						<td class="hidden-phone">
							<?php echo $item->folder_translated; ?>
						</td>
						<td class="hidden-phone">
							<?php echo $item->extension_id; ?>
						</td>
					</tr>
				<?php endforeach; ?>
				</tbody>
			</table>
			<?php endif; ?>
			<input type="hidden" name="task"
value="" />
			<input type="hidden" name="boxchecked"
value="0" />
			<?php echo JHtml::_('form.token'); ?>
		</div>
	</form>
</div>
discover/tmpl/default.xml000064400000000326151161713270011511
0ustar00<?xml version="1.0" encoding="utf-8"?>
<metadata>
	<layout title="COM_INSTALLER_DISCOVER_VIEW_DEFAULT_TITLE">
		<message>
			<![CDATA[COM_INSTALLER_DISCOVER_VIEW_DEFAULT_DESC]]>
		</message>
	</layout>
</metadata>
discover/tmpl/default_item.php000064400000003532151161713270012520
0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_installer
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;
?>
<tr class="<?php echo 'row' . $this->item->index
% 2; ?>" <?php echo $this->item->style; ?>>
	<td>
			<input type="checkbox" id="cb<?php echo
$this->item->index; ?>" name="eid[]"
value="<?php echo $this->item->extension_id; ?>"
onclick="Joomla.isChecked(this.checked);" <?php echo
$this->item->cbd; ?> />
<!--		<input type="checkbox" id="cb<?php echo
$this->item->index; ?>" name="eid"
value="<?php echo $this->item->extension_id; ?>"
onclick="Joomla.isChecked(this.checked);" <?php echo
$this->item->cbd; ?> />-->
		<span class="bold"><?php echo $this->item->name;
?></span>
	</td>
	<td>
		<?php echo $this->item->type ?>
	</td>
	<td class="center">
		<?php if (!$this->item->element) : ?>
		<strong>X</strong>
		<?php else : ?>
		<a
href="index.php?option=com_installer&amp;type=manage&amp;task=<?php
echo $this->item->task; ?>&amp;eid[]=<?php echo
$this->item->extension_id; ?>&amp;limitstart=<?php echo
$this->pagination->limitstart; ?>&amp;<?php echo
JSession::getFormToken(); ?>=1"><?php echo
JHtml::_('image', 'images/' . $this->item->img,
$this->item->alt, array('title' =>
$this->item->action)); ?></a>
		<?php endif; ?>
	</td>
	<td class="center"><?php echo
@$this->item->folder != '' ? $this->item->folder :
'N/A'; ?></td>
	<td class="center"><?php echo
@$this->item->client != '' ? $this->item->client :
'N/A'; ?></td>
	<td>
		<span class="editlinktip hasTooltip" title="<?php
echo JHtml::_('tooltipText',
JText::_('COM_INSTALLER_AUTHOR_INFORMATION'),
$this->item->author_info, 0); ?>">
			<?php echo @$this->item->author != '' ?
$this->item->author : '&#160;'; ?>
		</span>
	</td>
</tr>
discover/view.html.php000064400000004416151161713270011021 0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_installer
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

JLoader::register('InstallerViewDefault', dirname(__DIR__) .
'/default/view.php');

/**
 * Extension Manager Discover View
 *
 * @since  1.6
 */
class InstallerViewDiscover extends InstallerViewDefault
{
	/**
	 * Display the view.
	 *
	 * @param   string  $tpl  Template
	 *
	 * @return  void
	 *
	 * @since   1.6
	 */
	public function display($tpl = null)
	{
		// Run discover from the model.
		if (!$this->checkExtensions())
		{
			$this->getModel('discover')->discover();
		}

		// Get data from the model.
		$this->state         = $this->get('State');
		$this->items         = $this->get('Items');
		$this->pagination    = $this->get('Pagination');
		$this->filterForm    = $this->get('FilterForm');
		$this->activeFilters = $this->get('ActiveFilters');

		// Check for errors.
		if (count($errors = $this->get('Errors')))
		{
			throw new Exception(implode("\n", $errors), 500);
		}

		parent::display($tpl);
	}

	/**
	 * Add the page title and toolbar.
	 *
	 * @return  void
	 *
	 * @since   3.1
	 */
	protected function addToolbar()
	{
		/*
		 * Set toolbar items for the page.
		 */
		JToolbarHelper::custom('discover.install', 'upload',
'upload', 'JTOOLBAR_INSTALL', true);
		JToolbarHelper::custom('discover.refresh', 'refresh',
'refresh', 'COM_INSTALLER_TOOLBAR_DISCOVER', false);
		JToolbarHelper::divider();

		JHtmlSidebar::setAction('index.php?option=com_installer&view=discover');

		parent::addToolbar();
		JToolbarHelper::help('JHELP_EXTENSIONS_EXTENSION_MANAGER_DISCOVER');
	}

	/**
	 * Check extensions.
	 *
	 * Checks uninstalled extensions in extensions table.
	 *
	 * @return  boolean  True if there are discovered extensions on the
database.
	 *
	 * @since   3.5
	 */
	public function checkExtensions()
	{
		$db = JFactory::getDbo();
		$query = $db->getQuery(true)
			->select('*')
			->from($db->quoteName('#__extensions'))
			->where($db->quoteName('state') . ' = -1');
		$db->setQuery($query);
		$discoveredExtensions = $db->loadObjectList();

		return (count($discoveredExtensions) === 0) ? false : true;
	}
}
install/tmpl/default.php000064400000013413151161713270011331
0ustar00install/tmpl/default.xml000064400000000324151161713270011337
0ustar00LastTab', array()); ?>
				<?php $tabs = array_merge($firstTab, $tabs, $lastTab); ?>
				<?php if (!$tabs) : ?>
					<?php
JFactory::getApplication()->enqueueMessage(JText::_('COM_INSTALLER_NO_INSTALLATION_PLUGINinstall/view.html.php000064400000002452151161713270010647
0ustar00install/tmpl/default.xml000064400000000324151161713270011337
0ustar00<?xml version="1.0" encoding="utf-8"?>
<metadata>
	<layout title="COM_INSTALLER_INSTALL_VIEW_DEFAULT_TITLE">
		<message>
			<![CDATA[COM_INSTALLER_INSTALL_VIEW_DEFAULT_DESC]]>
		</message>
	</layout>
</metadata>
install/view.html.php000064400000002452151161713270010647
0ustar00languages/tmpl/default.php000064400000015025151161713270011632
0ustar00	 * @param   string  $tpl  Template
	 *
	 * @return  void
	 *
	 * @since   1.5
	 */
	public function display($tpl = null)
	{
		$paths = new stdClass;
		$paths->first = '';
		$state = $this->get('state');

		$this->paths = &$paths;
		$this->state = &$state;

		$this->showJedAndWebInstaller =
JComponentHelper::getParams('com_installer')->get('show_jed_info',
1);

		JPluginHelper::importPlugin('installer');

		$dispatcher = JEventDispatcher::getInstance();
		$dispatcher->trigger('onInstallerBeforeDisplay',
array(&$this->showJedAndWebInstaller, $this));

		parent::display($tpl);
	}

	/**
	 * Add the page title and toolbar.
	 *
	 * @return  void
	 *
	 * @since   1.6
	 */
	protected function addToolbar()
	{
		parent::addToolbar();
		JToolbarHelper::help('JHELP_EXTENSIONS_EXTENSION_MANAGER_INSTALL');
	}
}
languages/tmpl/default.php000064400000015025151161713270011632
0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_languages
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html');

JHtml::_('behavior.multiselect');
JHtml::_('formbehavior.chosen', 'select');
JHtml::_('bootstrap.tooltip');

$user      = JFactory::getUser();
$listOrder =
$this->escape($this->state->get('list.ordering'));
$listDirn  =
$this->escape($this->state->get('list.direction'));
$saveOrder = $listOrder == 'a.ordering';

if ($saveOrder)
{
	$saveOrderingUrl =
'index.php?option=com_languages&task=languages.saveOrderAjax&tmpl=component';
	JHtml::_('sortablelist.sortable', 'contentList',
'adminForm', strtolower($listDirn), $saveOrderingUrl);
}
?>
<form action="<?php echo
JRoute::_('index.php?option=com_languages&view=languages');
?>" method="post" name="adminForm"
id="adminForm">
<?php if (!empty( $this->sidebar)) : ?>
	<div id="j-sidebar-container" class="span2">
		<?php echo $this->sidebar; ?>
	</div>
	<div id="j-main-container" class="span10">
<?php else : ?>
	<div id="j-main-container">
<?php endif; ?>
		<?php echo
JLayoutHelper::render('joomla.searchtools.default',
array('view' => $this)); ?>
		<div class="clearfix"></div>
		<?php if (empty($this->items)) : ?>
			<div class="alert alert-no-items">
				<?php echo JText::_('JGLOBAL_NO_MATCHING_RESULTS'); ?>
			</div>
		<?php else : ?>
			<table class="table table-striped"
id="contentList">
				<thead>
					<tr>
						<th width="1%" class="nowrap center
hidden-phone">
							<?php echo JHtml::_('searchtools.sort', '',
'a.ordering', $listDirn, $listOrder, null, 'asc',
'JGRID_HEADING_ORDERING', 'icon-menu-2'); ?>
						</th>
						<th width="1%"  class="nowrap center">
							<?php echo JHtml::_('grid.checkall'); ?>
						</th>
						<th width="1%" class="nowrap center">
							<?php echo JHtml::_('searchtools.sort',
'JSTATUS', 'a.published', $listDirn, $listOrder); ?>
						</th>
						<th class="title nowrap">
							<?php echo JHtml::_('searchtools.sort',
'JGLOBAL_TITLE', 'a.title', $listDirn, $listOrder);
?>
						</th>
						<th class="title nowrap hidden-phone hidden-tablet">
							<?php echo JHtml::_('searchtools.sort',
'COM_LANGUAGES_HEADING_TITLE_NATIVE', 'a.title_native',
$listDirn, $listOrder); ?>
						</th>
						<th width="1%" class="nowrap">
							<?php echo JHtml::_('searchtools.sort',
'COM_LANGUAGES_HEADING_LANG_TAG', 'a.lang_code',
$listDirn, $listOrder); ?>
						</th>
						<th width="1%" class="nowrap">
							<?php echo JHtml::_('searchtools.sort',
'COM_LANGUAGES_HEADING_LANG_CODE', 'a.sef', $listDirn,
$listOrder); ?>
						</th>
						<th width="8%" class="nowrap hidden-phone">
							<?php echo JHtml::_('searchtools.sort',
'COM_LANGUAGES_HEADING_LANG_IMAGE', 'a.image',
$listDirn, $listOrder); ?>
						</th>
						<th width="5%" class="nowrap hidden-phone">
							<?php echo JHtml::_('searchtools.sort',
'JGRID_HEADING_ACCESS', 'a.access', $listDirn,
$listOrder); ?>
						</th>
						<th width="5%" class="nowrap hidden-phone">
							<?php echo JHtml::_('searchtools.sort',
'COM_LANGUAGES_HEADING_HOMEPAGE', 'l.home', $listDirn,
$listOrder); ?>
						</th>
						<th width="1%" class="nowrap hidden-phone
hidden-tablet">
							<?php echo JHtml::_('searchtools.sort',
'JGRID_HEADING_ID', 'a.lang_id', $listDirn,
$listOrder); ?>
						</th>
					</tr>
				</thead>
				<tfoot>
					<tr>
						<td colspan="11">
							<?php echo $this->pagination->getListFooter(); ?>
						</td>
					</tr>
				</tfoot>
				<tbody>
				<?php
				foreach ($this->items as $i => $item) :
					$canCreate = $user->authorise('core.create',    
'com_languages');
					$canEdit   = $user->authorise('core.edit',      
'com_languages');
					$canChange = $user->authorise('core.edit.state',
'com_languages');
				?>
					<tr class="row<?php echo $i % 2; ?>">
						<td class="order nowrap center hidden-phone">
							<?php if ($canChange) :
								$disableClassName = '';
								$disabledLabel	  = '';

								if (!$saveOrder) :
									$disabledLabel    = JText::_('JORDERINGDISABLED');
									$disableClassName = 'inactive tip-top';
								endif; ?>
								<span class="sortable-handler hasTooltip <?php echo
$disableClassName; ?>" title="<?php echo $disabledLabel;
?>">
									<span class="icon-menu"
aria-hidden="true"></span>
								</span>
								<input type="text" style="display:none"
name="order[]" size="5" value="<?php echo
$item->ordering; ?>" class="width-20 text-area-order"
/>
							<?php else : ?>
								<span class="sortable-handler inactive">
									<span class="icon-menu"
aria-hidden="true"></span>
								</span>
							<?php endif; ?>
						</td>
						<td>
							<?php echo JHtml::_('grid.id', $i, $item->lang_id);
?>
						</td>
						<td class="center">
							<?php echo JHtml::_('jgrid.published',
$item->published, $i, 'languages.', $canChange); ?>
						</td>
						<td>
							<span class="editlinktip hasTooltip"
title="<?php echo JHtml::_('tooltipText',
JText::_languages/tmpl/default.xml000064400000000330151161713270011634
0ustar00<?php echo $this->escape($item->access_level); ?>
						</td>
						<td class="hidden-phone">
							<?php echo ($item->home == '1') ?
JText::_('JYES') : JText::_('JNO'); ?>
						</td>
						<td class="hidden-phone
languages/view.html.php000064400000006746151161713270011161
0ustar00languages/tmpl/default.xml000064400000000330151161713270011634
0ustar00<?xml version="1.0" encoding="utf-8"?>
<metadata>
	<layout
title="COM_LANGUAGES_LANGUAGES_VIEW_DEFAULT_TITLE">
		<message>
			<![CDATA[COM_LANGUAGES_LANGUAGES_VIEW_DEFAULT_DESC]]>
		</message>
	</layout>
</metadata>
languages/view.html.php000064400000006746151161713270011161
0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_languages
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

/**
 * HTML Languages View class for the Languages component.
 *
 * @since  1.6
 */
class LanguagesViewLanguages extends JViewLegacy
{
	protected $items;

	protected $pagination;

	protected $state;

	/**
	 * Display the view.
	 *
	 * @param   string  $tpl  The name of the template file to parse.
	 *
	 * @return  void
	 */
	public function display($tpl = null)
	{
		$this->items         = $this->get('Items');
		$this->pagination    = $this->get('Pagination');
		$this->state         = $this->get('State');
		$this->filterForm    = $this->get('FilterForm');
		$this->activeFilters = $this->get('ActiveFilters');

		LanguagesHelper::addSubmenu('languages');

		// Check for errors.
		if (count($errors = $this->get('Errors')))
		{
			throw new Exception(implode("\n", $errors), 500);
		}

		$this->addToolbar();
		$this->sidebar = JHtmlSidebar::render();

		return parent::display($tpl);
	}

	/**
	 * Add the page title and toolbar.
	 *
	 * @return  void
	 *
	 * @since   1.6
	 */
	protected function addToolbar()
	{
		$canDo = JHelperContent::getActions('com_languages');

		JToolbarHelper::title(JText::_('COM_LANGUAGES_VIEW_LANGUAGES_TITLE'),
'comments-2 langmanager');

		if ($canDo->get('core.create'))
		{
			JToolbarHelper::addNew('language.add');
		}

		if ($canDo->get('core.edit'))
		{
			JToolbarHelper::editList('language.edit');
			JToolbarHelper::divider();
		}

		if ($canDo->get('core.edit.state'))
		{
			if ($this->state->get('filter.published') != 2)
			{
				JToolbarHelper::publishList('languages.publish');
				JToolbarHelper::unpublishList('languages.unpublish');
			}
		}

		if ($this->state->get('filter.published') == -2
&& $canDo->get('core.delete'))
		{
			JToolbarHelper::deleteList('JGLOBAL_CONFIRM_DELETE',
'lamanage/tmpl/default.php000064400000012136151161713270011114
0ustar00es');
			JToolbarHelper::divider();
		}

		JToolbarHelper::help('JHELP_EXTENSIONS_LANGUAGE_MANAGER_CONTENT');

		JHtmlSidebar::setAction('index.php?option=com_languages&view=languages');

	}

	/**
	 * Returns an array of fields the table can be sorted by.
	 *
	 * @return  array  Array containing the field name to sort by as the key
and display text as value.
	 *
	 * @since   3.0
	 */
	protected function getSortFields()
	{
		return array(
			'a.ordering'     =>
JText::_('JGRID_HEADING_ORDERING'),
			'a.published'    => JText::_('JSTATUS'),
			'a.title'        => JText::_('JGLOBAL_TITLE'),
			'a.title_native' =>
JText::_('COM_LANGUAGES_HEADING_TITLE_NATIVE'),
			'a.lang_code'    =>
JText::_('COM_LANGUAGES_FIELD_LANG_TAG_LABEL'),
			'a.sef'          =>
JText::_('COM_LANGUAGES_FIELD_LANG_CODE_LABEL'),
			'a.image'        =>
JText::_('COM_LANGUAGES_HEADING_LANG_IMAGE'),
			'a.access'       =>
JText::_('JGRID_HEADING_ACCESS'),
			'a.lang_id'      => JText::_('JGRID_HEADING_ID'),
		);
	}
}
manage/tmpl/default.php000064400000012136151161713270011114
0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_installer
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

JHtml::_('behavior.multiselect');
JHtml::_('formbehavior.chosen', 'select');
JHtml::_('bootstrap.tooltip');

$listOrder =
$this->escape($this->state->get('list.ordering'));
$listDirn  =
$this->escape($this->state->get('list.direction'));
?>
<div id="installer-manage" class="clearfix">
	<form action="<?php echo
JRoute::_('index.php?option=com_installer&view=manage');
?>" method="post" name="adminForm"
id="adminForm">
		<?php if (!empty( $this->sidebar)) : ?>
		<div id="j-sidebar-container" class="span2">
			<?php echo $this->sidebar; ?>
		</div>
		<div id="j-main-container" class="span10">
		<?php else : ?>
		<div id="j-main-container">
		<?php endif; ?>
			<?php if ($this->showMessage) : ?>
				<?php echo $this->loadTemplate('message'); ?>
			<?php endif; ?>
			<?php if ($this->ftp) : ?>
				<?php echo $this->loadTemplate('ftp'); ?>
			<?php endif; ?>
			<?php echo
JLayoutHelper::render('joomla.searchtools.default',
array('view' => $this)); ?>
			<div class="clearfix"></div>
			<?php if (empty($this->items)) : ?>
			<div class="alert alert-no-items">
				<?php echo
JText::_('COM_INSTALLER_MSG_MANAGE_NOEXTENSION'); ?>
			</div>
			<?php else : ?>
			<table class="table table-striped"
id="manageList">
				<thead>
					<tr>
						<th width="1%" class="nowrap">
							<?php echo JHtml::_('grid.checkall'); ?>
						</th>
						<th width="1%" class="nowrap center">
							<?php echo JHtml::_('searchtools.sort',
'JSTATUS', 'status', $listDirn, $listOrder); ?>
						</th>
						<th class="nowrap">
							<?php echo JHtml::_('searchtools.sort',
'COM_INSTALLER_HEADING_NAME', 'name', $listDirn,
$listOrder); ?>
						</th>
						<th>
							<?php echo JHtml::_('searchtools.sort',
'COM_INSTALLER_HEADING_LOCATION', 'client_translated',
$listDirn, $listOrder); ?>
						</th>
						<th>
							<?php echo JHtml::_('searchtools.sort',
'COM_INSTALLER_HEADING_TYPE', 'type_translated',
$listDirn, $listOrder); ?>
						</th>
						<th width="10%" class="hidden-phone">
							<?php echo JText::_('JVERSION'); ?>
						</th>
						<th width="10%" class="hidden-phone
hidden-tablet">
							<?php echo JText::_('JDATE'); ?>
						</th>
						<th width="15%" class="hidden-phone
hidden-tablet">
							<?php echo JText::_('JAUTHOR'); ?>
						</th>
						<th class="hidden-phone">
							<?php echo JHtml::_('searchtools.sort',
'COM_INSTALLER_HEADING_FOLDER', 'folder_translated',
$listDirn, $listOrder); ?>
						</th>
						<th class="hidden-phone">
							<?php echo JHtml::_('searchtools.sort',
'COM_INSTALLER_HEADING_PACKAGE_ID', 'package_id',
$listDirn, $listOrder); ?>
						</th>
						<th width="1%" class="nowrap hidden-phone">
							<?php echo JHtml::_('searchtools.sort',
'COM_INSTALLER_HEADING_ID', 'extension_id', $listDirn,
$listOrder); ?>
						</th>
					</tr>
				</thead>
				<tfoot>
					<tr>
						<td colspan="11">
							<?php echo $this->pagination->getListFooter(); ?>
						</td>
					</tr>
				</tfoot>
				<tbody>
				<?php foreach ($this->items as $i => $item) : ?>
					<tr class="row<?php echo $i % 2; if ($item->status == 2)
echo ' protected'; ?>">
						<td>
							<?php echo JHtml::_('grid.id', $i,
$item->extension_id); ?>
						</td>
						<td class="center">
							<?php if (!$item->element) : ?>
							<strong>X</strong>
							<?php else : ?>
								<?php echo JHtml::_('InstallerHtml.Manage.state',
$item->status, $i, $item->status < 2, 'cb');
manage/tmpl/default.xml000064400000000322151161713270011117
0ustar00'' ? $item->author : '&#160;'; ?>
							</span>
						</td>
						<td class="hidden-phone">
							<?php echo $item->folder_translated; ?>
						</td>
						<td class="hidden-phone">
							<?php echo
$item->pmanage/view.html.php000064400000004175151161713270010435
0ustar00manage/tmpl/default.xml000064400000000322151161713270011117
0ustar00<?xml version="1.0" encoding="utf-8"?>
<metadata>
	<layout title="COM_INSTALLER_MANAGE_VIEW_DEFAULT_TITLE">
		<message>
			<![CDATA[COM_INSTALLER_MANAGE_VIEW_DEFAULT_DESC]]>
		</message>
	</layout>
</metadata>
manage/view.html.php000064400000004175151161713270010435 0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_installer
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

JLoader::register('InstallerViewDefault', dirname(__DIR__) .
'/default/view.php');

/**
 * Extension Manager Manage View
 *
 * @since  1.6
 */
class InstallerViewManage extends InstallerViewDefault
{
	protected $items;

	protected $pagination;

	protected $form;

	protected $state;

	/**
	 * Display the view.
	 *
	 * @param   string  $tpl  Template
	 *
	 update/tmpl/default.php000064400000012021151161713270011137
0ustar00ish('manage.publish', 'JTOOLBAR_ENABLE', true);
			JToolbarHelper::unpublish('manage.unpublish',
'JTOOLBAR_DISABLE', true);
			JToolbarHelper::divider();
		}

		JToolbarHelper::custom('manage.refresh', 'refresh',
'refresh', 'JTOOLBAR_REFRESH_CACHE', true);
		JToolbarHelper::divider();

		if ($canDo->get('core.delete'))
		{
			JToolbarHelper::deleteList('COM_INSTALLER_CONFIRM_UNINSTALL',
'manage.remove', 'JTOOLBAR_UNINSTALL');
			JToolbarHelper::divider();
		}

		JHtmlSidebar::setAction('index.php?option=com_installer&view=manage');

		parent::addToolbar();
		JToolbarHelper::help('JHELP_EXTENSIONS_EXTENSION_MANAGER_MANAGE');
	}
}
update/tmpl/default.php000064400000012021151161713270011137
0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_installer
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

JHtml::_('behavior.multiselect');
JHtml::_('formbehavior.chosen', 'select');
JHtml::_('bootstrap.tooltip');

$listOrder =
$this->escape($this->state->get('list.ordering'));
$listDirn  =
$this->escape($this->state->get('list.direction'));
?>
<div id="installer-update" class="clearfix">
	<form action="<?php echo
JRoute::_('index.php?option=com_installer&view=update');
?>" method="post" name="adminForm"
id="adminForm">
		<?php if (!empty( $this->sidebar)) : ?>
		<div id="j-sidebar-container" class="span2">
			<?php echo $this->sidebar; ?>
		</div>
		<div id="j-main-container" class="span10">
			<?php else : ?>
			<div id="j-main-container">
				<?php endif; ?>
				<?php if ($this->showMessage) : ?>
					<?php echo $this->loadTemplate('message'); ?>
				<?php endif; ?>

				<?php if ($this->ftp) : ?>
					<?php echo $this->loadTemplate('ftp'); ?>
				<?php endif; ?>

				<?php echo
JLayoutHelper::render('joomla.searchtools.default',
array('view' => $this)); ?>
				<div class="clearfix"></div>
				<?php if (empty($this->items)) : ?>
					<div class="alert alert-no-items alert-info">
						<?php echo
JText::_('COM_INSTALLER_MSG_UPDATE_NOUPDATES'); ?>
					</div>
				<?php else : ?>
					<table class="table table-striped">
						<thead>
						<tr>
							<th width="1%" class="nowrap">
								<?php echo JHtml::_('grid.checkall'); ?>
							</th>
							<th class="nowrap">
								<?php echo JHtml::_('searchtools.sort',
'COM_INSTALLER_HEADING_NAME', 'u.name', $listDirn,
$listOrder); ?>
							</th>
							<th class="nowrap center">
								<?php echo JHtml::_('searchtools.sort',
'COM_INSTALLER_HEADING_LOCATION', 'client_translated',
$listDirn, $listOrder); ?>
							</th>
							<th class="nowrap center">
								<?php echo JHtml::_('searchtools.sort',
'COM_INSTALLER_HEADING_TYPE', 'type_translated',
$listDirn, $listOrder); ?>
							</th>
							<th class="nowrap hidden-phone center">
								<?php echo JText::_('COM_INSTALLER_CURRENT_VERSION');
?>
							</th>
							<th class="nowrap center">
								<?php echo JText::_('COM_INSTALLER_NEW_VERSION');
?>
							</th>
							<th class="nowrap hidden-phone center">
								<?php echo JHtml::_('searchtools.sort',
'COM_INSTALLER_HEADING_FOLDER', 'folder_translated',
$listDirn, $listOrder); ?>
							</th>
							<th class="nowrap hidden-phone center">
								<?php echo
JText::_('COM_INSTALLER_HEADING_INSTALLTYPE'); ?>
							</th>
							<th width="40%" class="nowrap hidden-phone
hidden-tablet">
								<?php echo
JText::_('COM_INSTALLER_HEADING_DETAILSURL'); ?>
							</th>
						</tr>
						</thead>
						<tfoot>
						<tr>
							<td colspan="9">
								<?php echo $this->pagination->getListFooter(); ?>
							</td>
						</tr>
						</tfoot>
						<tbody>
						<?php foreach ($this->items as $i => $item) : ?>
							<?php
							$client          = $item->client_id ?
JText::_('JADMINISTRATOR') : JText::_('JSITE');
							$manifest        = json_decode($item->manifest_cache);
							$current_version = isset($manifest->version) ?
$manifest->version : JText::_('JLIB_UNKNOWN');
							?>
							<tr class="row<?php echo $i % 2; ?>">
								<td>
									<?php echo JHtml::_('grid.id', $i,
$item->update_id); ?>
								</td>
								<td>
									<label for="cb<?php echo $i; ?>">
								<span class="editlinktip
hasTooltip"update/tmpl/default.xml000064400000000322151161713270011151
0ustar00ailsurl; ?>
								<?php if (isset($item->infourl)) : ?>
									<br />
									<a href="<?php echo $item->infourl; ?>"
target="_blank" rel="noopener noreferrer"><?php
echo $this->escape($item->infourl);
?><update/view.html.php000064400000006446151161713270010472
0ustar00update/tmpl/default.xml000064400000000322151161713270011151
0ustar00<?xml version="1.0" encoding="utf-8"?>
<metadata>
	<layout title="COM_INSTALLER_UPDATE_VIEW_DEFAULT_TITLE">
		<message>
			<![CDATA[COM_INSTALLER_UPDATE_VIEW_DEFAULT_DESC]]>
		</message>
	</layout>
</metadata>
update/view.html.php000064400000006446151161713270010472 0ustar00<?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 UpdateViewUpdate extends hikashopView{
	var $ctrl= 'update';
	var $nameListing = 'UPDATE';
	var $nameForm = 'UPDATE';
	var $icon = 'update';

	function display($tpl = null){
		$this->paramBase =
HIKASHOP_COMPONENT.'.'.$this->getName();
		$function = $this->getLayout();
		if(method_exists($this,$function)) $this->$function();
		parent::display($tpl);
	}

	function wizard(){
		$db = JFactory::getDBO();

		hikashop_setTitle(JText::_('HIKA_WIZARD'),'config','update&task=wizard');

		if (!HIKASHOP_PHP5) {
			$bar =& JToolBar::getInstance('toolbar');
		}else{
			$bar = JToolBar::getInstance('toolbar');
		}
		$bar->appendButton( 'Link', 'hikashop',
JText::_('HIKA_SKIP'),
hikashop_completeLink('update&task=install&fromversion=&update=0')
);

		$languagesCodes = array();
		$languagesNames = array();
		if(HIKASHOP_J25){
			$db->setQuery('SELECT * FROM
'.hikashop_table('languages',false).' WHERE `published`
= 1');
			$languages = $db->loadObjectList();
			foreach($languages as $language){
				$path =
JLanguage::getLanguagePath(JPATH_ROOT).DS.$language->lang_code.DS.$language->lang_code.'.com_hikashop.ini';
				if(!JFile::exists($path)){
					$languagesCodes[] = $language->lang_code;
					$languagesNames[] = $language->title;
				}
			}
		}
		if(!empty($languagesCodes))
			$languageCodes = implode('|',$languagesCodes);
		if(!empty($languagesNames))
			$languagesNames = implode(', ',$languagesNames);
		$this->assignRef('languageCodes', $languageCodes);
		$this->assignRef('languageNameupdatesites/tmpl/default.php000064400000010602151161713270012212
0ustar00query');
		$app = JFactory::getApplication();
		$app->enqueueMessage(JText::_('WELCOME_WIZARD',
'success'));
	}
	function state(){
		$namekey = JRequest::getCmd('namekey','');
		if(!headers_sent()){
			header('Content-Type:text/html; charset=utf-8');
		}
		if(!empty($namekey)){
			$field_namekey = JRequest::getString('field_namekey',
'');
			if(empty($field_namekey))
				$field_namekey = 'address_state';

			$field_id = JRequest::getString('field_id', '');
			if(empty($field_id))
				$field_id = 'address_state';

			$field_type = JRequest::getString('field_type',
'');
			if(empty($field_type))
				$field_type = 'address';

			$class = hikashop_get('type.country');
			echo $class->displayStateDropDown($namekey, $field_id,
$field_namekey, $field_type);
		}
		exit;
	}
}
updatesites/tmpl/default.php000064400000010602151161713270012212
0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_installer
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

JHtml::_('behavior.multiselect');
JHtml::_('formbehavior.chosen', 'select');
JHtml::_('bootstrap.tooltip');

$listOrder =
$this->escape($this->state->get('list.ordering'));
$listDirn  =
$this->escape($this->state->get('list.direction'));
?>
<div id="installer-manage" class="clearfix">
	<form action="<?php echo
JRoute::_('index.php?option=com_installer&view=updatesites');
?>" method="post" name="adminForm"
id="adminForm">
		<?php if (!empty( $this->sidebar)) : ?>
		<div id="j-sidebar-container" class="span2">
			<?php echo $this->sidebar; ?>
		</div>
		<div id="j-main-container" class="span10">
		<?php else : ?>
		<div id="j-main-container">
		<?php endif; ?>
			<?php echo
JLayoutHelper::render('joomla.searchtools.default',
array('view' => $this)); ?>
			<div class="clearfix"></div>
			<?php if (empty($this->items)) : ?>
			<div class="alert alert-no-items">
				<?php echo JText::_('JGLOBAL_NO_MATCHING_RESULTS'); ?>
			</div>
			<?php else : ?>
			<table class="table table-striped">
				<thead>
					<tr>
						<th width="1%" class="center">
							<?php echo JHtml::_('grid.checkall'); ?>
						</th>
						<th width="1%" class="nowrap center">
							<?php echo JHtml::_('searchtools.sort',
'JSTATUS', 'enabled', $listDirn, $listOrder); ?>
						</th>
						<th class="nowrap">
							<?php echo JHtml::_('searchtools.sort',
'COM_INSTALLER_HEADING_UPDATESITE_NAME',
'update_site_name', $listDirn, $listOrder); ?>
						</th>
						<th class="nowrap hidden-phone">
							<?php echo JHtml::_('searchtools.sort',
'COM_INSTALLER_HEADING_NAME', 'name', $listDirn,
$listOrder); ?>
						</th>
						<th class="hidden-phone hidden-tablet">
							<?php echo JHtml::_('searchtools.sort',
'COM_INSTALLER_HEADING_LOCATION', 'client_translated',
$listDirn, $listOrder); ?>
						</th>
						<th class="hidden-phone">
							<?php echo JHtml::_('searchtools.sort',
'COM_INSTALLER_HEADING_TYPE', 'type_translated',
$listDirn, $listOrder); ?>
						</th>
						<th class="hidden-phone hidden-tablet">
							<?php echo JHtml::_('searchtools.sort',
'COM_INSTALLER_HEADING_FOLDER', 'folder_translated',
$listDirn, $listOrder); ?>
						</th>
						<th width="1%" class="nowrap hidden-phone">
							<?php echo JHtml::_('searchtools.sort',
'JGRID_HEADING_ID', 'update_site_id', $listDirn,
$listOrder); ?>
						</th>
					</tr>
				</thead>
				<tfoot>
					<tr>
						<td colspan="8">
							<?php echo $this->pagination->getListFooter(); ?>
						</td>
					</tr>
				</tfoot>
				<tbody>
				<?php foreach ($this->items as $i => $item) : ?>
					<tr class="row<?php echo $i % 2; if ($item->enabled ==
2) echo ' protected'; ?>">
						<td class="center">
							<?updatesites/tmpl/default.xml000064400000000334151161713270012224
0ustar00a>
								</span>
							</label>
						</td>
						<td class="hidden-phone">
							<span class="bold hasTooltip" title="<?php echo
JHtml::_('tooltipText', $item->name, $item->description,
0); ?>">
								<?php echo
$updatesites/view.html.php000064400000004466151161713270011542
0ustar00updatesites/tmpl/default.xml000064400000000334151161713270012224
0ustar00<?xml version="1.0" encoding="utf-8"?>
<metadata>
	<layout
title="COM_INSTALLER_UPDATESITES_VIEW_DEFAULT_TITLE">
		<message>
			<![CDATA[COM_INSTALLER_UPDATESITES_VIEW_DEFAULT_DESC]]>
		</message>
	</layout>
</metadata>
updatesites/view.html.php000064400000004466151161713270011542
0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_installer
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

JLoader::register('InstallerViewDefault', dirname(__DIR__) .
'/default/view.php');

/**
 * Extension Manager Update Sites View
 *
 * @package     Joomla.Administrator
 * @subpackage  com_installer
 * @since       3.4
 */
class InstallerViewUpdatesites extends InstallerViewDefault
{
	protected $items;

	protected $pagination;

	protected $form;

	protected $state;

	/**
	 * Display the view
	 *
	 * @param   string  $tpl  Template
	 *
	 * @return  mixed|void
	 *
	 * @since   3.4
	 *
	 * @throws  Exception on errors
	 */
	public function
dwarnings/tmpl/default.php000064400000003110151161713300011476 0ustar00nDo
= JHelperContent::getActions('com_installer');

		if ($canDo->get('core.edit.state'))
		{
			JToolbarHelper::publish('updatesites.publish',
'JTOOLBAR_ENABLE', true);
			JToolbarHelper::unpublish('updatesites.unpublish',
'JTOOLBAR_DISABLE', true);
			JToolbarHelper::divider();
		}

		if ($canDo->get('core.delete'))
		{
			JToolbarHelper::deleteList('JGLOBAL_CONFIRM_DELETE',
'updatesites.delete', 'JTOOLBAR_DELETE');
			JToolbarHelper::divider();
		}

		if ($canDo->get('core.admin') ||
$canDo->get('core.options'))
		{
			JToolbarHelper::custom('updatesites.rebuild',
'refresh.png', 'refresh_f2.png',
'JTOOLBAR_REBUILD', false);
		}

		JHtmlSidebar::setAction('index.php?option=com_installer&view=updatesites');

		parent::addToolbar();
		JToolbarHelper::help('JHELP_EXTENSIONS_EXTENSION_MANAGER_UPDATESITES');
	}
}
warnings/tmpl/default.php000064400000003110151161713300011476
0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage 
com_instawarnings/tmpl/default.xml000064400000000326151161713300011515
0ustar00			<?php echo $message['description']; ?>
					<?php echo JHtml::_('bootstrap.endSlide'); ?>
				<?php endforeach; ?>
					<?php echo JHtml::_('bootstrap.addSlide',
'warnings',
JText::_('COM_INSTALLER_MSG_WARNINGFUwarnings/view.html.php000064400000002271151161713300011022
0ustar00warnings/tmpl/default.xml000064400000000326151161713300011515
0ustar00<?xml version="1.0" encoding="utf-8"?>
<metadata>
	<layout title="COM_INSTALLER_WARNINGS_VIEW_DEFAULT_TITLE">
		<message>
			<![CDATA[COM_INSTALLER_WARNINGS_VIEW_DEFAULT_DESC]]>
		</message>
	</layout>
</metadata>
warnings/view.html.php000064400000002271151161713300011022
0badge/index.html000064400000000032151162050350007574 0ustar00
	 * @param   string 
$tplbadge/tmpl/form.php000064400000020011151162050350010226
0ustar00badge/index.html000064400000000032151162050350007574
0ustar00<html><body></body></html>badge/tmpl/form.php000064400000020011151162050350010226
0ustar00<?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');
?><div class="iframedoc"
id="iframedoc"></div>
<form action="index.php?option=<?php echo HIKASHOP_COMPONENT
?>&amp;ctrl=badge" method="post" 
name="adminForm" id="adminForm"
enctype="multipart/form-data">
	<?php
		$this->badge_name = "data[badge][badge_name]";
		$this->badge_position = "data[badge][badge_position]";

	?>
<?php if(!HIKASHOP_BACK_RESPONSIVE) { ?>
<div id="page-badge">
	<table style="width:100%;margin:auto;">
		<tr>
			<td valign="top">
<?php } else { ?>
<div id="page-badge" class="row-fluid">
	<div class="span6">
<?php } ?>
				<table class="admintable table"
style="margin:auto">
					<tr>
						<td class="key">
								<?php echo JText::_( 'HIKA_NAME' ); ?>
						</td>
						<td>
							<input type="text" size="40"
name="data[badge][badge_name]" value="<?php echo
$this->escape(@$this->element->badge_name); ?>" />
						</td>
					</tr>
					<tr>
							<td class="key">
									<?php echo JText::_( 'HIKA_PUBLISHED' ); ?>
							</td>
							<td>
									<?php echo JHTML::_('hikaselect.booleanlist',
"data[badge][badge_published]" ,
'',@$this->element->badge_published);?>
							</td>
					</tr>
					<tr>
						<td class="key">
							<?php echo JText::_( 'START_DATE' ); ?>
						</td>
						<td>
							<?php echo JHTML::_('calendar',
(@$this->element->badge_start?hikashop_getDate(@$this->element->badge_start,'%Y-%m-%d
%H:%M'):''),
'data[badge][badge_start]','badge_start','%Y-%m-%d
%H:%M',array('size'=>'20')); ?>
						</td>
					</tr>
					<tr>
						<td class="key">
								<?php echo JText::_( 'END_DATE' ); ?>
						</td>
						<td>
							<?php echo JHTML::_('calendar',
(@$this->element->badge_end?hikashop_getDate(@$this->element->badge_end,'%Y-%m-%d
%H:%M'):''),
'data[badge][badge_end]','badge_end','%Y-%m-%d
%H:%M',array('size'=>'20')); ?>
						</td>
					</tr>
					<tr>
						<td class="key">
							<?php echo JText::_( 'PRODUCT_QUANTITY' ); ?>
						</td>
						<td>
							<input type="text"
name="data[badge][badge_quantity]" value="<?php echo
@$this->element->badge_quantity; ?>" />
						</td>
					</tr>
					<tr>
						<td class="key">
								<?php echo JText::_( 'CATEGORY' ); ?>
						</td>
						<td>
							<span id="changeParent" >
								<?php echo (int)@$this->element->badge_category_id.'
'.@$this->element->category_name; ?>
							</span>
								<input type="hidden"
id="categoryselectparentlisting"
name="data[badge][badge_category_id]" value="<?php echo
@$this->element->badge_category_id; ?>" />
							<?php
								echo $this->popup->display(
									'<img src="'.
HIKASHOP_IMAGES.'edit.png"
alt="'.JText::_('CATEGORY').'"/>',
									'CATEGORY',
									hikashop_completeLink("category&task=selectparentlisting&control=category",true
),
									'category_link',
									760, 480, '', '', 'link'
								);
							?>
							<a href="#"
onclick="document.getElementById('changeParent').innerHTML='0
<?php echo
$this->escape(JText::_('CATEGORY_NOT_FOUND'));?>';
document.getElementById('categoryselectparentlisting').value='0';return
false;" >
								<img src="<?php echo HIKASHOP_IMAGES;
?>delete.png" alt="delete"/>
							</a>
						</td>
					</tr>
					<tr>
						<td class="key">
								<?php echo JText::_( 'INCLUDING_SUB_CATEGORIES' );
?>
						</td>
						<td>
							<?php echo JHTML::_('hikaselect.booleanlist',
"data[badge][badge_category_childs]" ,
'',@$this->element->badge_category_childs	); ?>
						</td>
					</tr>
					<tr>
						<td class="key">
								<?php echo JText::_( 'DISCOUNT' ); ?>
						</td>
						<td>
							<span id="changeDiscount" >
								<?php echo (int)@$this->element->badge_discount_id.'
'.@$this->element->discount_code; ?>
							</span>
								<input type="hidden"
id="discountselectparentlisting"
name="data[badge][badge_discount_id]" value="<?php echo
@$this->element->badge_discount_id; ?>" />
							<?php
								echo $this->popup->display(
									'<img src="'.
HIKASHOP_IMAGES.'edit.png"
alt="'.JText::_('DISCOUNT').'"/>',
									'DISCOUNT',
									
hikashop_completeLink("discount&task=select_coupon&badge=true",true
),
									'discount_link',
									760, 480, '', '', 'link'
								);
							?>
							<a href="#"
onclick="document.getElementById('changeDiscount').innerHTML='0
<?php echo
$this->escape(JText::_('DISCOUNT_NOT_FOUND'));?>';
document.getElementById('discountselectparentlisting').value='0';return
false;" >
								<img src="<?php echo HIKASHOP_IMAGES;
?>delete.png" alt="delete"/>
							</a>
						</td>
					</tr>
					<tr>
						<td class="key">
							<?php echo JText::_( 'URL' ); ?>
						</td>
						<td>
							<input type="text"
name="data[badge][badge_url]" value="<?php echo
@$this->element->badge_url; ?>" />
						</td>
					</tr>
				</table>
<?php if(!HIKASHOP_BACK_RESPONSIVE) { ?>
			</td>
			<td valign="top">
<?php } else { ?>
	</div>
	<div class="span6">
<?php } ?>
				<table class="admintable table"
margin="auto">
						<tr>
							<td class="key">
								<?php echo JText::_( 'HIKA_IMAGES' ); ?>
							</td>
							<td>
								<?php echo
$this->image->display(@$this->element->badge_image,true,$this->escape(@$this->element->badge_image),
'' , '' , 100, 100); ?>
								<input type="file" name="files"
size="30" />
								<?php echo
JText::sprintf('MAX_UPLOAD',(hikashop_bytes(ini_get('upload_max_filesize'))
> hikashop_bytes(ini_get('post_max_size'))) ?
ini_get('post_max_size') :
ini_get('upload_max_filesize')); ?>
							</td>
						</tr>
						<tr>
							<td class="key">
									<?php echo JText::_( 'KEEP_SIZE' ); ?>
							</td>
							<td>
									<?php echo JHTML::_('hikaselect.booleanlist',
"data[badge][badge_keep_size]" ,
'onchange="hikashopSizeUpdate(this.value);"',@$this->element->badge_keep_size);?>
							</td>
						</tr>
						<tr id="field_size">
							<td class="key">
									<?php echo JText::_( 'FIELD_SIZE' ); ?>
							</td>
							<td>
								<?php
if(!isset($this->element->badge_size))$this->element->badge_size=30;?>
								<input type="text" size="2"
name="data[badge][badge_size]" value="<?php echo
$this->escape($this->element->badge_size);?>" />
							<?php echo JText::_( '%' );?>

							</td>
						</tr>
						<tr>
						<td class="key">
								<?php echo JText::_( 'POSITION' );?>
				badge/tmpl/index.html000064400000000032151162050350010550 0ustar00hp
echo JText::_( 'px'
);?badge/tmpl/listing.php000064400000013646151162050350010754
0ustar00badge/tmpl/index.html000064400000000032151162050350010550
0ustar00<html><body></body></html>badge/tmpl/listing.php000064400000013646151162050350010754
0ustar00<?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');
?><div class="iframedoc"
id="iframedoc"></div>
<form action="index.php?option=<?php echo HIKASHOP_COMPONENT
?>&amp;ctrl=badge" method="post" 
name="adminForm" id="adminForm">
	<table>
		<tr>
			<td width="100%">
				<?php echo JText::_( 'FILTER' ); ?>:
				<input type="text" name="search"
id="search" value="<?php echo
$this->escape($this->pageInfo->search);?>"
class="text_area" />
				<button class="btn"
onclick="this.form.submit();"><?php echo JText::_(
'GO' ); ?></button>
				<button class="btn"
onclick="document.getElementById('search').value='';this.form.submit();"><?php
echo JText::_( 'RESET' ); ?></button>
			</td>
		</tr>
	</table>
	<table id="hikashop_badge_listing" class="adminlist
table table-striped table-hover" cellpadding="1">
		<thead>
			<tr>
				<th class="title titlenum">
					<?php echo JText::_( 'HIKA_NUM' );?>
				</th>
				<th class="title titlebox">
					<input type="checkbox" name="toggle"
value="" onclick="hikashop.checkAll(this);" />
				</th>
				<th class="title titlebox">
					<?php echo JText::_('HIKA_IMAGE'); ?>
				</th>
				<th class="title">
					<?php echo JHTML::_('grid.sort',
JText::_('HIKA_NAME'), 'a.badge_name',
$this->pageInfo->filter->order->dir,$this->pageInfo->filter->order->value
); ?>
				</th>
				<th class="title">
					<?php echo JHTML::_('grid.sort',
JText::_('POSITION'), 'a.badge_position',
$this->pageInfo->filter->order->dir,$this->pageInfo->filter->order->value
); ?>
				</th>
				<th class="title titleorder">
				<?php echo JHTML::_('grid.sort',    JText::_(
'HIKA_ORDER' ),
'a.badge_ordering',$this->pageInfo->filter->order->dir,
$this->pageInfo->filter->order->value ); ?>
					<?php if ($this->order->ordering) echo
JHTML::_('grid.order',  $this->rows ); ?>
				</th>
				<th class="title titletoggle">
					<?php echo JHTML::_('grid.sort',  
JText::_('HIKA_PUBLISHED'), 'a.badge_published',
$this->pageInfo->filter->order->dir,
$this->pageInfo->filter->order->value ); ?>
				</th>
				<th class="title">
					<?php echo JText::_('RESTRICTIONS'); ?>
				</th>
				<th class="title">
					<?php echo JHTML::_('grid.sort',   JText::_(
'ID' ), 'a.badge_id',
$this->pageInfo->filter->order->dir,
$this->pageInfo->filter->order->value ); ?>
				</th>
			</tr>
		</thead>
		<tfoot>
			<tr>
				<td colspan="9">
					<?php echo $this->pagination->getListFooter(); ?>
					<?php echo $this->pagination->getResultsCounter(); ?>
				</td>
			</tr>
		</tfoot>
		<tbody>
			<?php
				$k = 0;
				$a = count($this->rows);
				if($a){
					for($i = 0;$i<$a;$i++){
						$row =& $this->rows[$i];
						$publishedid = 'badge_published-'.$row->badge_id;
				?>
					<tr class="<?php echo "row$k"; ?>">
						<td align="center">
						<?php echo $this->pagination->getRowOffset($i); ?>
						</td>
						<td align="center">
							<?php echo JHTML::_('grid.id', $i, $row->badge_id );
?>
						</td>
						<td>
							<?php echo
$this->image->display(@$row->badge_image,true,"",'','',
100, 100); ?>
						</td>
						<td>
							<?php if($this->manage){ ?>
								<a href="<?php echo
hikashop_completeLink('badge&task=edit&cid[]='.$row->badge_id);
?>">
							<?php } ?>
									<?php echo $row->badge_name; ?>
							<?php if($this->manage){ ?>
								</a>
							<?php } ?>
						</td>
						<td>
									<?php echo $row->badge_position; ?>
						</td>
						<td class="order">
							<?php if($this->manage){ ?>
								<span><?php echo $this->pagination->orderUpIcon( $i,
$this->order->reverse XOR ( $row->badge_ordering >=
@$this->rows[$i-1]->badge_ordering ), $this->order->orderUp,
'Move Up',$this->order->ordering ); ?></span>
								<span><?php echo $this->pagination->orderDownIcon(
$i, $a, $this->order->reverse XOR ( $row->badge_ordering <=
@$this->rows[$i+1]->badge_ordering ), $this->order->orderDown,
'Move Down' ,$this->order->ordering); ?></span>
								<input type="text" name="order[]"
size="5" <?php if(!$this->order->ordering) echo
'disabled="disabled"'?> value="<?php echo
$row->badge_ordering; ?>" class="text_area"
style="text-align: center" />
							<?php }else{ echo $row->badge_ordering; } ?>
						</td>
						<td align="center">
							<?php
if($this->manbadge/view.html.php000064400000021470151162050350010236
0ustar00category_childs){
										$restriction.='</br>'.JText::_('INCLUDING_SUB_CATEGORIES');
									}
									$restrictions[]=$restriction;
								}
								echo implode('<br/>',$restrictions);
							?>
						</td>
						<td width="1%" align="center">
							<?php echo $row->badge_id; ?>
						</td>
					</tr>
				<?php
						$k = 1-$k;
					}
				}
			?>
		</tbody>
	</table>
	<input type="hidden" name="option"
value="<?php echo HIKASHOP_COMPONENT; ?>" />
	<input type="hidden" name="task" value=""
/>
	<input type="hidden" name="ctrl"
value="<?php echo JRequest::getCmd('ctrl'); ?>"
/>
	<input type="hidden" name="boxchecked"
value="0" />
	<input type="hidden" name="filter_order"
value="<?php echo
$this->pageInfo->filter->order->value; ?>" />
	<input type="hidden" name="filter_order_Dir"
value="<?php echo $this->pageInfo->filter->order->dir;
?>" />
	<?php echo JHTML::_( 'form.token' ); ?>
</form>
badge/view.html.php000064400000021470151162050350010236 0ustar00<?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 BadgeViewBadge extends hikashopView {
	var $ctrl= 'badge';
	var $nameListing = 'HIKA_BADGES';
	var $nameForm = 'HIKA_BADGES';
	var $icon = 'badge';
	function display($tpl = null){
		$this->paramBase =
HIKASHOP_COMPONENT.'.'.$this->getName();
		$function = $this->getLayout();
		if(method_exists($this,$function)) $this->$function();
		parent::display($tpl);
	}
	function listing(){
		$app = JFactory::getApplication();
		$pageInfo = new stdClass();
		$pageInfo->filter = new stdClass();
		$pageInfo->filter->order = new stdClass();
		$pageInfo->limit = new stdClass();
		$pageInfo->search = $app->getUserStateFromRequest(
$this->paramBase.".search", 'search', '',
'string' );
		$pageInfo->filter->order->value =
$app->getUserStateFromRequest(
$this->paramBase.".filter_order",
'filter_order',	'a.badge_id','cmd' );
		$pageInfo->filter->order->dir	=
$app->getUserStateFromRequest(
$this->paramBase.".filter_order_Dir",
'filter_order_Dir',	'desc',	'word' );
		$pageInfo->limit->value = $app->getUserStateFromRequest(
$this->paramBase.'.list_limit', 'limit',
$app->getCfg('list_limit'), 'int' );
		$pageInfo->limit->start = $app->getUserStateFromRequest(
$this->paramBase.'.limitstart', 'limitstart', 0,
'int' );
		if(JRequest::getVar('search')!=$app->getUserState($this->paramBase.".search")){
			$app->setUserState( $this->paramBase.'.limitstart',0);
			$pageInfo->limit->start = 0;
		}else{
			$pageInfo->limit->start = $app->getUserStateFromRequest(
$this->paramBase.'.limitstart', 'limitstart', 0,
'int' );
		}
		$database	= JFactory::getDBO();
		$filters = array();
		$searchMap =
array('a.badge_id','a.badge_name','a.badge_position');
		if(!empty($pageInfo->search)){
			$searchVal =
'\'%'.hikashop_getEscaped(JString::strtolower(
$pageInfo->search ),true).'%\'';
			$filters[] =  implode(" LIKE $searchVal OR
",$searchMap)." LIKE $searchVal";
		}
		$order = '';
		if(!empty($pageInfo->filter->order->value)){
			$order = ' ORDER BY
'.$pageInfo->filter->order->value.'
'.$pageInfo->filter->order->dir;
		}
		if(!empty($filters)){
			$filters = ' WHERE ('. implode(') AND
(',$filters).')';
		}else{
			$filters = '';
		}

		$query = ' FROM '.hikashop_table('badge').' AS
a'.$filters.$order;
		$database->setQuery('SELECT
a.*'.$query,$pageInfo->limit->start,$pageInfo->limit->value);
		$rows = $database->loadObjectList();
		if(!empty($pageInfo->search)){
			$rows =
hikashop_search($pageInfo->search,$rows,'badge_id');
		}
		$database->setQuery('SELECT count(*)'.$query );
		$pageInfo->elements = new stdClass();
		$pageInfo->elements->total = $database->loadResult();
		$pageInfo->elements->page = count($rows);
		if($pageInfo->elements->page){
			$discountIds = array();
			$categoryIds = array();

			foreach($rows as $row){
				if(!empty($row->badge_discount_id)) $discountIds[] =
$row->badge_discount_id;
				if(!empty($row->badge_category_id)) $categoryIds[] =
$row->badge_category_id;
			}
			if(!empty($discountIds)){
				$query = 'SELECT * FROM
'.hikashop_table('discount').' WHERE discount_id IN
('.implode(',',$discountIds).')';
				$database->setQuery($query);
				$discounts = $database->loadObjectList();

				foreach($rows as $k => $row){
					if(!empty($row->badge_discount_id)){
						$found = false;
						foreach($discounts as $discount){
							if($discount->discount_id==$row->badge_discount_id){
								foreach(get_object_vars($discount) as $field => $value){
									$rows[$k]->$field = $discount->$field;
								}
								$found = true;
							}
						}
						if(!$found){
							$rows[$k]->discount_code=JText::_('DISCOUNT_NOT_FOUND');
						}
					}
				}
			}
			if(!empty($categoryIds)){
				$query = 'SELECT * FROM
'.hikashop_table('category').' WHERE category_id IN
('.implode(',',$categoryIds).')';
				$database->setQuery($query);
				$categories = $database->loadObjectList();
				foreach($rows as $k => $row){
					if(!empty($row->badge_category_id)){
						$found = false;
						foreach($categories as $category){
							if($category->category_id==$row->badge_category_id){
								foreach(get_object_vars($category) as $field => $value){
									$rows[$k]->$field = $category->$field;
								}
								$found = true;
							}
						}
						if(!$found){
							$rows[$k]->category_name=JText::_('CATEGORY_NOT_FOUND');
						}
					}
				}
			}
		}

		$toggleClass = hikashop_get('helper.toggle');
		$this->assignRef('toggleClass',$toggleClass);
		$image=hikashop_get('helper.image');
		$this->assignRef('image',$image);
		$this->assignRef('rows',$rows);
		$this->assignRef('pageInfo',$pageInfo);
		$order = new stdClass();
		$order->ordering = true;
		$order->orderUp = 'orderup';
		$order->orderDown = 'orderdown';
		$order->reverse = false;
		if($pageInfo->filter->order->value ==
'a.badge_ordering'){
			if($pageInfo->filter->order->dir == 'desc'){
				$order->orderUp = 'orderdown';
				$order->orderDown = 'orderup';
				$order->reverse = true;
			}
		}
		$this->assignRef('order',$order);
		hikashop_setTitle(JText::_($this->nameListing),$this->icon,$this->ctrl);
		$this->getPagination();

		$config =& hikashop_config();
		$manage =
hikashop_isAllowed($config->get('acl_badge_manage','all'));
		$this->assignRef('manage',$manage);

		$this->toolbar = array(
			array('name' => 'addNew', 'display'
=> $manage),
			array('name' => 'editList', 'display'
=> $manage),
			array('name' => 'deleteList', 'check'
=> JText::_('HIKA_VALIDDELETEITEMS'), 'display'
=>
hikashop_isAllowed($config->get('acl_badge_delete','all'))),
			'|',
			array('name' => 'pophelp', 'target'
=> $this->ctrl.'-listing'),
			'dashboard'
		);
	}
	function form(){
		$badge_id = hikashop_getCID('badge_id');
		$class = hikashop_get('class.badge');
		if(!empty($badge_id)){
			$element = $class->get($badge_id,true);
			$task='edit';
		}else{
			$element = new stdClass();
			$element->banner_published = 1;
			$task='add';
		}
		$database = JFactory::getDBO();
		if(!empty($element->badge_discount_id)){
			$query = 'SELECT * FROM
'.hikashop_table('discount').' WHERE discount_id =
'.(int)$element->badge_discount_id;
			$database->setQuery($query);
			$discount = $database->loadObject();
			if(!empty($discount)){
				foreach(get_object_vars($discount) as $key => $val){
					$element->$key = $val;
				}
			}
		}
		if(empty($element->discount_code)){
			$element->discount_code = JText::_('DISCOUNT_NOT_FOUND');
		}
		if(!empty($element->badge_category_id)){
			$query = 'SELECT * FROM
'.hikashop_table('category').' WHERE category_id =
'.(int)$element->badge_category_id;
			$database->setQuery($query);
			$category = $database->loadObject();
			if(!empty($category)){
				foreach(get_object_vars($category) as $key => $val){
					$element->$key = $val;
				}
			}
		}
		if(empty($element->category_name)){
			$element->category_name = JText::_('CATEGORY_NOT_FOUND');
		}
		hikashop_setTitle(JText::_($this->nameForm),$this->icon,$this->ctrl.'&task='.$task.'&badge_id='.$badge_id);

		$this->toolbar = array(
			'save',
			array('name' => 'save2new', 'display'
=>
version_compare(JVbanner/index.html000064400000000032151162050350007777
0ustar00&
$transHelper->isMulti())banner/tmpl/form.php000064400000003053151162050350010440
0ustar00banner/index.html000064400000000032151162050350007777
0ustar00<html><body></body></html>banner/tmpl/form.php000064400000003053151162050350010440
0ustar00<?php
/**
 * @package	HikaShop for
Joomlabanner/tmpl/index.html000064400000000032151162050350010753 0ustar00hp
echo JText::_(
'HIKA_PUbanner/tmpl/listing.php000064400000013055151162050350011151
0ustar00banner/tmpl/index.html000064400000000032151162050350010753
0ustar00<html><body></body></html>banner/tmpl/listing.php000064400000013055151162050350011151
0ustar00<?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');
?><div class="iframedoc"
id="iframedoc"></div>
<form action="index.php?option=<?php echo HIKASHOP_COMPONENT
?>&amp;ctrl=banner" method="post" 
name="adminForm" id="adminForm">
	<table>
		<tr>
			<td width="100%">
				<?php echo JText::_( 'FILTER' ); ?>:
				<input type="text" name="search"
id="search" value="<?php echo
$this->escape($this->pageInfo->search);?>"
class="text_area" />
				<button class="btn"
onclick="this.form.submit();"><?php echo JText::_(
'GO' ); ?></button>
				<button class="btn"
onclick="document.getElementById('search').value='';this.form.submit();"><?php
echo JText::_( 'RESET' ); ?></button>
			</td>
		</tr>
	</table>
	<table id="hikashop_banner_listing" class="adminlist
table table-striped table-hover" cellpadding="1">
		<thead>
			<tr>
				<th class="title titlenum">
					<?php echo JText::_( 'HIKA_NUM' );?>
				</th>
				<th class="title titlebox">
					<input type="checkbox" name="toggle"
value="" onclick="hikashop.checkAll(this);" />
				</th>
				<th class="title">
					<?php echo JHTML::_('grid.sort',
JText::_('HIKA_TITLE'), 'a.banner_title',
$this->pageInfo->filter->order->dir,$this->pageInfo->filter->order->value
); ?>
				</th>
				<th class="title">
					<?php echo JHTML::_('grid.sort',
JText::_('HIKA_IMAGE'), 'a.banner_image_url',
$this->pageInfo->filter->order->dir,$this->pageInfo->filter->order->value
); ?>
				</th>
				<th class="title">
					<?php echo JHTML::_('grid.sort',
JText::_('URL'), 'a.banner_url',
$this->pageInfo->filter->order->dir,$this->pageInfo->filter->order->value
); ?>
				</th>
				<th class="title titleorder">
				<?php echo JHTML::_('grid.sort',    JText::_(
'HIKA_ORDER' ),
'a.banner_ordering',$this->pageInfo->filter->order->dir,
$this->pageInfo->filter->order->value ); ?>
					<?php if ($this->order->ordering) echo
JHTML::_('grid.order',  $this->rows ); ?>
				</th>
				<th class="title titletoggle">
					<?php echo JHTML::_('grid.sort',  
JText::_('HIKA_PUBLISHED'), 'a.banner_published',
$this->pageInfo->filter->order->dir,
$this->pageInfo->filter->order->value ); ?>
				</th>
				<th class="title">
					<?php echo JHTML::_('grid.sort',   JText::_(
'ID' ), 'a.banner_id',
$this->pageInfo->filter->order->dir,
$this->pageInfo->filter->order->value ); ?>
				</th>
			</tr>
		</thead>
		<tfoot>
			<tr>
				<td colspan="8">
					<?php echo $this->pagination->getListFooter(); ?>
					<?php echo $this->pagination->getResultsCounter(); ?>
				</td>
			</tr>
		</tfoot>
		<tbody>
			<?php
				$k = 0;
				$a = count($this->rows);
				if($a){
					for($i = 0;$i<$a;$i++){
						$row =& $this->rows[$i];
						$publishedid = 'banner_published-'.$row->banner_id;
				?>
					<tr class="<?php echo "row$k"; ?>">
						<td align="center">
						<?php echo $this->pagination->getRowOffset($i); ?>
						</td>
						<td align="center">
							<?php echo JHTML::_('grid.id', $i, $row->banner_id
); ?>
						</td>
						<td>
							<?php if($this->manage){ ?>
								<a href="<?php echo
hikashop_completeLink('banner&task=edit&cid[]='.$row->banner_id);
?>">
							<?php } ?>
									<?php echo $row->banner_title; ?>
							<?php if($this->manage){ ?>
								</a>
							<?php } ?>
						</td>
						<td>
							<a href="<?php echo $row->banner_image_url;
?>" target="_blank">
								<?php echo $row->banner_image_url; ?>
							</a>
						</td>
						<td>
							<a href="<?php echo $row->banner_url; ?>"
target="_blank">
								<?php echo $row->banner_url; ?>
							</a>
						</td>
						<td class="order">
							<?php if($this->manage){ ?>
								<span><?php echo $this->pagination->orderUpIcon( $i,
$this->order->reverse XOR ( $row->banner_ordering >=
@$this->rows[$i-1]->banner_ordering ), $this->order->orderUp,
'Move Up',$this->order->ordering ); ?></span>
								<span><?php
ecbanner/tmpl/normal.php000064400000006064151162050350010772
0ustar00</tbody>
	</table>
	<input type="hidden" name="option"
value="<?php echo HIKASHOP_COMPONENT; ?>" />
	<input type="hidden" name="task" value=""
/>
	<input type="hidden" name="ctrl"
value="<?php echo JRequest::getCmd('ctrl'); ?>"
/>
	<input type="hidden" name="boxchecked"
value="0" />
	<input type="hidden" name="filter_order"
value="<?php echo
$this->pageInfo->filter->order->value; ?>" />
	<input type="hidden" name="filter_order_Dir"
value="<?php echo $this->pageInfo->filter->order->dir;
?>" />
	<?php echo JHTML::_( 'form.token' ); ?>
</form>
banner/tmpl/normal.php000064400000006064151162050350010772
0ustar00<?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');
?>					<table class="admintable table" 
width="100%">
						<tr>
							<td class="key">
								<label for="data[banner][banner_title]">
									<?php echo JText::_( 'HIKA_TITLE' ); ?>
								</label>
							</td>
							<td>
								<input type="text" size="100"
name="<?php echo $this->banner_title_input; ?>"
value="<?php echo
$this->escape(@$this->element->banner_title); ?>" />
								<?php if(isset($this->banner_title_published)){
										$publishedid = 'published-'.$this->banner_title_id;
								?>
								<span id="<?php echo $publishedid; ?>"
class="spanloading"><?php echo
$this->toggle->toggle($publishedid,(int)
$this->banner_title_published,'translation')
?></span>
								<?php } ?>
							</td>
						</tr>
						<tr>
							<td class="key">
								<label for="data[banner][banner_url]">
									<?php echo JText::_( 'URL' ); ?>
								</label>
							</td>
							<td>
								<input type="text" size="100"
name="<?php echo $this->banner_url_input; ?>"
value="<?php echo
$this->escape(@$this->element->banner_url); ?>" />
								<?php if(isset($this->banner_url_published)){
										$publishedid = 'published-'.$this->banner_url_id;
								?>
								<span id="<?php echo $publishedid; ?>"
class="spanloading"><?php echo
$this->toggle->toggle($publishedbanner/tmpl/translation.php000064400000004476151162050350012045
0ustar00/label>
							</td>
							<td>
								<textarea cols="71" name="<?php echo
$this->banner_comment_input; ?>" ><?php echo
$this->escape(@$this->element->banner_comment);
?></textarea>
								<?php if(isset($this->banner_comment_published)){
										$publishedid =
'published-'.$this->banner_comment_id;
								?>
								<span id="<?php echo $publishedid; ?>"
class="spanloading"><?php echo
$this->toggle->toggle($publishedid,(int)
$this->banner_comment_published,'translation')
?></span>
								<?php } ?>
							</td>
						</tr>
					</table>
banner/tmpl/translation.php000064400000004476151162050350012045
0ustar00<?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 
	echo $this->tabs->startPane( 'translations');
		echo
$this->tabs->startPanel(JText::_('MAIN_INFORMATION'),
'main_translation');	
			$this->setLayout('normal');
			echo $this->loadTemplate();
		echo $this->tabs->endPanel();
		if(!empty($this->element->translations)){
			foreach($this->element->translations as $language_id =>
$translation){
				echo
$this->tabs->startPanel($this->transHelper->getFlag($language_id),
'translation_'.$language_id);	
					$this->banner_title_input =
"translation[banner_title][".$language_id."]";
					$thcart/index.html000064400000000032151162050350007463
0ustar00	$this->element->banner_imcart/tmpl/customer_set.php000064400000004175151162050350011703
0ustar00cart/index.html000064400000000032151162050350007463
0ustar00<html><body></body></html>cart/tmpl/customer_set.php000064400000004175151162050350011703
0ustar00<?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');
?><form action="<?php echo
hikashop_completeLink('cart&task=customer_save') ;?>"
method="post" name="hikashop_form"
id="hikashop_form">
<div class="hika_confirm">
	<?php echo JText::_('HIKA_CONFIRM_USER')?><br/>
	<table class="admintable table hika_options">
		<tbody>
			<tr>
				<td class="key"><label><?php echo
JText::_('HIKA_NAME'); ?></label></td>
		cart/tmpl/form.php000064400000030050151162050350010121
0ustar00value="1" />
	<input type="hidden" name="single"
value="1" />
	<input type="hidden" name="ctrl"
value="cart" />
	<input type="hidden" name="tmpl"
value="component" />
	<?php echo JHTML::_('form.token'); ?>
	<div class="hika_confirm_btn">
		<?php
		if($this->rows->user_cms_id == '0'){
			echo JText::_('HIKA_CANT_SELECT_USER_NO_JOOMLA_ACCOUNT');
		}else{
		?>
		<button onclick="hikashop.submitform('customer_save',
'hikashop_form');" class="btn"><img
src="<?php echo HIKASHOP_IMAGES ?>ok.png"
style="vertical-align:middle" alt=""/>
<span><?php echo Jtext::_('OK');
?></span></button>
		<?php } ?>
	</div>
</div>
</form>
cart/tmpl/form.php000064400000030050151162050350010121 0ustar00<?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');
?><div class="iframedoc"
id="iframedoc"></div>
<?php
	$config =& hikashop_config();
	if(empty($this->rows)){echo "<div style='color: red;
font-size: 14px; text-align: center; width:
100%;'>".JText::_('HIKA_NEW_WISHLIST_BACKEND')."</div>";}
?>
<form action="index.php?option=com_hikashop&amp;ctrl=cart"
method="post"  name="adminForm"
id="adminForm" >
<?php if(!HIKASHOP_BACK_RESPONSIVE) { ?>
<div id="page-cart">
	<table style="width:100%">
		<tr>
			<td valign="top" width="50%">
<?php } else { ?>
<div id="page-cart" class="row-fluid">
	<div class="span6">
<?php } ?>
				<fieldset class="adminform"
id="htmlfieldset_general">
					<legend><?php echo JText::_('MAIN_INFORMATION');
?></legend>
					<table class="admintable table">
						<tr>
							<td class="key">
									<?php echo JText::_( 'ID' ); ?>
							</td>
							<td>
								<?php echo $this->cart->cart_id; ?>
							</td>
						</tr>
						<tr>
							<td class="key">
									<?php echo JText::_( 'HIKA_NAME' ); ?>
							</td>
							<td>
								<input type="text"
name="data[cart][cart_name]" value="<?php echo
$this->cart->cart_name; ?>" />
							</td>
						</tr>
						<tr>
							<td class="key">
									<?php echo JText::_( 'HIKA_TYPE' ); ?>
							</td>
							<td>
								<select name="data[cart][cart_type]" >
								<?php
									if($this->cart->cart_type == 'cart'){
										echo "<option
value='wishlist'>".JText::_( 'WISHLIST'
)."</option>";
										echo "<option value='cart'
selected='selected'>".JText::_(
'HIKASHOP_CHECKOUT_CART' )."</option>";
									}else{
										echo "<option value='wishlist'
selected='selected'>".JText::_( 'WISHLIST'
)."</option>";
										echo "<option value='cart'>".JText::_(
'HIKASHOP_CHECKOUT_CART' )."</option>";
									}
								?>
								</select>
							</td>
						</tr>
						<?php if($this->cart->cart_type == 'cart'){?>
						<tr>
							<td class="key">
									<?php echo JText::_( 'HIKASHOP_COUPON' ); ?>
							</td>
							<td>
								<input type="text"
name="data[cart][cart_coupon]" value="<?php echo
$this->cart->cart_coupon; ?>" />
							</td>
						</tr>
						<?php } ?>
						<tr>
							<td class="key">
									<?php echo JText::_( 'DATE' ); ?>
							</td>
							<td>
								<?php
								echo
hikashop_getDate($this->cart->cart_modified,'%Y-%m-%d
%H:%M');?>
							</td>
						</tr>
					</table>
				</fieldset>
<?php if(!HIKASHOP_BACK_RESPONSIVE) { ?>
			</td>
			<td valign="top" width="50%">
<?php } else { ?>
	</div>
	<div class="span6">
<?php } ?>
				<fieldset class="adminform"
id="htmlfieldset_customer">
					<legend><?php echo JText::_('CUSTOMER');
?></legend>
					<div style="float:right;">
						<?php
							echo $this->popup->display(
								'<img style="vertical-align:middle;"
alt="'.JText::_('HIKA_EDIT').'"
src="'. HIKASHOP_IMAGES.'edit.png"/>',
								'HIKA_EDIT',
								hikashop_completeLink('order&task=user&cart_type='.$this->cart->cart_type.'&cart_id='.$this->cart->cart_id,true),
								'hikashop_edit_customer',
								760, 480, '', '', 'link'
							);
						?>
					</div>
					<table class="admintable table">
					<?php if(!empty($this->user->user_id)){?>
						<?php if(!empty($this->user->name)){?>
						<tr>
							<td class="key">
									<?php echo JText::_( 'HIKA_USER_NAME' ); ?>
							</td>
							<td>
								<?php echo $this->user->name.'
('.$this->user->username.')'; ?>
							</td>
						</tr>
						<?php }?>
						<tr>
							<td class="key">
									<?php echo JText::_( 'HIKA_EMAIL' ); ?>
							</td>
							<td>
								<?php echo $this->user->email; ?>
							</td>
						</tr>
						<tr>
							<td class="key">
									<?php echo JText::_( 'ID' ); ?>
							</td>
							<td>
								<?php echo $this->user->user_id; ?>
								<?php
if(hikashop_isAllowed($config->get('acl_user_manage','all'))){
?>
								<a href="<?php echo
hikashop_completeLink('user&task=edit&cid[]='.
$this->user->user_id.'&cart_id='.$this->cart->cart_id);
?>">
									<img src="<?php echo HIKASHOP_IMAGES; ?>go.png"
alt="go" />
								</a>
								<?php } ?>
								<input type="hidden" value="<?php echo
$this->user->user_id;?>"
name="data[user][user_id]"/>
							</td>
						</tr>
					<?php } ?>

						<tr>
							<td class="key">
									<?php echo JText::_( 'IP' ); ?>
							</td>
							<td>
								<?php
								if(!empty($this->user)) echo
$this->user->user_created_ip;
								?>
							</td>
						</tr>
					</table>
				</fieldset>
<?php if(!HIKASHOP_BACK_RESPONSIVE) { ?>
			</td>
		</tr>
		<tr>
			<td  colspan="2">
<?php } else { ?>
	</div>
	<div class="span12">
<?php } ?>
				<fieldset class="adminform"
id="htmlfieldset_products">
					<legend><?php echo JText::_('PRODUCT_LIST');
?></legend>
					<div style="float:right;">
						<?php
							echo $this->popup->display(
								'<img
src="'.HIKASHOP_IMAGES.'add.png"/>'.JText::_('ADD_EXISTING_PRODUCT'),
								'ADD_EXISTING_PRODUCT',
								hikashop_completeLink('order&type=cart&task=product_select&cart_type='.$this->cart->cart_type.'&cart_id='.$this->cart->cart_id,true),
								'product_add_button',
								1100, 480, '', '', 'button'
							);
						?>
					</div>

					<table class="adminlist table table-striped table-hover"
cellpadding="1">
						<thead>
							<tr>
								<th class="hikashop_order_item_name_title title">
									<?php echo JText::_('PRODUCT'); ?>
								</th>
								<th class="hikashop_order_item_files_title title">
									<?php echo JText::_('PRODUCT_QUANTITY'); ?>
								</th>
								<th class="hikashop_order_item_price_title title">
									<?php echo JText::_('PRICE'); ?>
								</th>
								<th class="hikashop_order_item_quantity_title title
titletoggle">
									<?php echo JText::_('HIKASHOP_CHECKOUT_STATUS');
?>
								</th>
								<th class="hikashop_order_item_action_title title
titletoggle">
									<?php echo JText::_('ACTIONS'); ?>
								</th>
							</tr>
						</thead>
						<tbody>
						<?php
							$app = JFactory::getApplication();
							$i = 1;
							$k = 1;
							$total_price = 0;
							$total_quantity = 0;
							$currency = 1;

							$currencyHelper = hikashop_get('class.currency');
							$productClass = hikashop_get('class.product');
							if(!empty($this->rows)){
								foreach($this->rows as $cart){
									if(!isset($cart->prices[0])){
										$cart->prices[0] = new stdClass();
										$cart->prices[0]->price_value = 0;
										$cart->prices[0]->price_currency_id = 1;
									}
									$total_price += $cart->prices[0]->price_value *
$cart->cart_product_quantity;
									$total_quantity += $cart->cart_product_quantity;
									$currency = $cart->prices[0]->price_currency_id;
									$productClass->addAlias($cart);
									$quantityLeft = $cart->product_quantity -
$cart->cart_product_quantity;
									$inStock = 1;
									if(($cart->product_quantity - $cart->cart_product_quantity)
>= 0 || $cart->product_quantity == -1){
										if($cart->product_quantity == -1)
											$stockText = "<span
class='hikashop_green_color'>".JText::sprintf('X_ITEMS_IN_STOCK',JText::_('HIKA_UNLIMITED'))."</span>";
										else
											$stockText = "<span
class='hikashop_green_color'>".JText::sprintf('X_ITEMS_IN_STOCK',$cart->product_quantity)."</span>";
									}else{
										if($cart->product_code != @$cart->cart_product_code){
											$stockText = "<span
class='hikashop_red_color'>".JText::_('HIKA_NOT_SALE_ANYMORE').
"</span>";
											$inStock = 0;
										}else{
											$stockText = "<span
class='hikashop_red_color'>".JText::_('NOT_ENOUGH_STOCK')."</span>";
											$inStock = 0;
										}
									}

								if($k ==1)$k = 0;else $k =1;

								if(($cart->product_type == 'main' &&
$cart->cart_product_quantity == 0)||$cart->cart_product_quantity ==
0)continue;
								?>
								<tr>
									<td class="hikashop_order_item_name_value">
										<span class="hikashop_order_item_name">
											<?php echo $this->popup->display(
												$cart->product_name.' '.$cart->product_code,
												$cart->product_name.' '.$cart->product_code,
												hikashop_frontendLink('index.php?option=com_hikashop&ctrl=product&task=show&cid='.$cart->product_id.'&tmpl=component'),
												'hikashop_see_product_'.$cart->product_id,
												760, 480, '', '', 'link'
											);
											$config =& hikashop_config();
											$manage =
hikashop_isAllowed($config->get('acl_product_manage','all'));
											if($manage){ ?>
												<a target="_blank" href="<?php echo
hikashop_completeLink('product&task=edit&cid[]='.
$cart->product_id); ?>">
													<img src="<?php echo HIKASHOP_IMAGES;
?>go.png" alt="<?php echo JText::_('HIKA_EDIT');
?>" />
												</a>
											<?php } ?>
										</span>
										<p
class="hikashop_cart_product_custom_item_fields">
										<?php
										if(hikashop_level(2) &&
!empty($this->fields['item'])){
											foreach($this->fields['item'] as $field){
												$namekey = $field->field_namekey;
												if(empty($product->$namekey)){
													continue;
												}
												echo '<p
class="hikashop_order_item_'.$namekey.'">'.$this->fieldsClass->getFieldName($field).':
'.$this->fieldsClass->show($field,$product->$namekey).'</p>';
											}
										}?>
										</p>
									</td>
									<td align="center"
class="hikashop_cart_item_quantity_value order">
										<input type="text" id="product_<?php echo
$cart->product_id; ?>" name="data[cart_product][<?php
echo $cart->product_id; ?>][cart_product_quantity]"
value="<?php echo $cart->cart_product_quantity;?>"/>
									</td>
									<td class="hikashop_cart_item_price_value">
										<?php
											echo
$currencyHelper->format($cart->prices[0]->price_value,$cart->prices[0]->price_currency_id);
										?>
									</td>
									<td width="20%"
class="hikashop_cart_item_status_value">
										<?php echo $stockText; ?>
									</td>
									<td align="center"
class="hikashop_cart_item_action_value">
										<a onclick="javascript:
document.getElementById('product_<?php echo $cart->product_id;
?>').value = 0; submitbutton('apply');"
href="#">
											<img src="<?php echo HIKASHOP_IMAGES;
?>delete.png"/>
										</a>
									cart/tmpl/form_block_product.php000064400000007131151162050350013037
0ustar00 if(!HIKASHOP_BACK_RESPONSIVE) { ?>
			</td>
		</tr>
	</table>
</div>
<?php } else { ?>
	</div>
</div>
<?php } ?>
	<div style="clear:both"
class="clr"></div>
	<input type="hidden" name="cid[]"
value="<?php echo @$this->cart->cart_id; ?>" />
	<input type="hidden" name="cart_type"
value="<?php echo @$this->cart->cart_type; ?>" />
	<input type="hidden" name="option"
value="com_hikashop" />
	<input type="hidden" name="task" value=""
/>
	<input type="hidden" name="ctrl"
value="cart" />
	<?php echo JHTML::_( 'form.token' ); ?>
</form>
cart/tmpl/form_block_product.php000064400000007131151162050350013037
0ustar00<?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');
?>			<td class="hikashop_cart_item_name_value">
				<span class="hikashop_cart_item_name"><?php
echo $this->popup->display(
	$this->product->product_name,
	strip_tags($this->product->product_name).'
'.strip_tags($this->product->product_code),
	hikashop_frontendLink('index.php?option=com_hikashop&ctrl=product&task=show&cid='.$this->product->product_id.'&tmpl=component'),
	'hikashop_see_product_'.$this->cart_product->cart_product_id,
	760, 480, '', '', 'link'
);
echo ' - ' . $this->product->product_code;
				?></span>
<?php
if(hikashop_level(2) && !empty($this->fields['item']))
{
?>
				<dl class="hika_options
hikashop_cart_product_custom_item_fields">
<?php
	foreach($this->fields['item'] as $fieldName => $field) {
		$namekey = $field->field_namekey;

		if(!$this->checkFieldForProduct($field, $this->product))
			continue;
?>
		<dt class="hikashop_cart_product_customfield
hikashop_cart_product_customfield_<?php echo $fieldName;
?>"><?php echo
$this->fieldClass->getFieldName($field);?></dt>
		<dd class="hikashop_cart_product_customfield
hikashop_cart_product_customfield_<?php echo $fieldName;
?>"><span><?php
			echo $this->fieldClass->display($field,
@$this->cart_product->$fieldName,
'data[products]['.$this->cart_product->cart_product_id.'][field]['.$fieldName.']',false,'',true);
		?></span></dd>
<?php
	}
?>
				</dl>
<?php
}
?>
			</td>
<?php
if(hikashop_level(2) &&
!empty($this->fields['product'])) {
	foreach($this->fields['product'] as $field) {
		$namekey = $field->field_namekey;
?>
			<td><?php
		if(!empty($this->cart_product->$namekey))
			echo '<p
class="hikashop_cart_product_'.$namekey.'">' .
$this->fieldClass->show($field, $this->cart_product->$namekey)
. '</p>';
			?></td>
<?php
	}
}
?>
			<td style="text-align: center"><?php

$tooltip_images = array(
	'ok' => '<i
class="icon-cart/tmpl/index.html000064400000000032151162050350010437
0ustar00y"}); });
</script>
<?phcart/tmpl/listing.php000064400000015527151162050350010643
0ustar00cart/tmpl/index.html000064400000000032151162050350010437
0ustar00<html><body></body></html>cart/tmpl/listing.php000064400000015527151162050350010643
0ustar00<?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');
?><div class="iframedoc"
id="iframedoc"></div>
<form action="index.php?option=<?php echo HIKASHOP_COMPONENT
?>&amp;ctrl=cart&amp;cart_type=<?php echo
JRequest::getString('cart_type','cart');?>"
method="post" name="adminForm"
id="adminForm">
	<table>
		<tr>
			<td width="100%">
				<?php echo JText::_( 'FILTER' ); ?>:
				<input type="hidden" id="backend_listing_vote"
value="both"/>
				<input type="text" name="search"
id="search" value="<?php echo
$this->escape($this->pageInfo->search);?>"
class="text_area"
onchange="document.adminForm.submit();" />
				<button class="btn"
onclick="this.form.submit();"><?php echo JText::_(
'GO' ); ?></button>
				<button class="btn"
onclick="document.getElementById('search').value='';this.form.submit();"><?php
echo JText::_( 'RESET' ); ?></button>
			</td>
		</tr>
	</table>
	<table id="hikashop_cart_listing" class="adminlist table
table-striped table-hover" cellpadding="1">
		<thead>
			<tr>
				<th class="title titlenum">
					<?php echo JText::_( 'HIKA_NUM' );?>
				</th>
				<th class="title titlebox">
					<input type="checkbox" name="toggle"
value="" onclick="hikashop.checkAll(this);" />
				</th>
				<th class="title title_product_id">
					<?php echo JHTML::_('grid.sort',
JText::_('HIKA_NAME'), 'a.cart_id',
$this->pageInfo->filter->order->dir,$this->pageInfo->filter->order->value
); ?>
				</th>
				<th class="title title_cart_user_id">
					<?php echo JHTML::_('grid.sort',
JText::_('HIKA_USERNAME'), 'a.cart_user_id',
$this->pageInfo->filter->order->dir,$this->pageInfo->filter->order->value
); ?>
				</th>
				<th class="title title_cart_current">
					<?php echo JHTML::_('grid.sort',
JText::_('SHOW_DEFAULT'), 'a.cart_current',
$this->pageInfo->filter->order->dir,$this->pageInfo->filter->order->value
); ?>
				</th>
				<th class="title title_cart_quantity">
					<?php  echo JText::_('PRODUCT_QUANTITY'); ?>
				</th>
				<th class="title title_cart_total">
					<?php echo JText::_('CART_PRODUCT_TOTAL_PRICE'); ?>
				</th>
				<th class="title title_cart_date">
					<?php echo JHTML::_('grid.sort',
JText::_('DATE'), 'a.cart_created',
$this->pageInfo->filter->order->dir,$this->pageInfo->filter->order->value
); ?>
				</th>
				<th class="title title_cart_action">
					<?php echo JText::_('HIKA_ACTION'); ?>
				</th>
				<th class="title title_cart_id">
					<?php echo JHTML::_('grid.sort',
JText::_('ID'), 'a.cart_id',
$this->pageInfo->filter->order->dir,$this->pageInfo->filter->order->value
); ?>
				</th>
			</tr>
		</thead>
		<tfoot>
			<tr>
				<td colspan="10">
					<?php echo $this->pagination->getListFooter(); ?>
					<?php echo $this->pagination->getResultsCounter(); ?>
				</td>
			</tr>
		</tfoot>
		<tbody>
			<?php
			$config =& hikashop_config();
			$cart_type =
JRequest::getString('cart_type','cart');
			$i = 0;
			$k = 1;
			foreach($this->carts as $cart){
				if($k ==1)$k = 0;else $k =1;
				if($cart->cart_id != null){
					?>
					<tr class="<?php echo "row$k"; ?>">
						<td align="center">
						<?php echo $this->pagination->getRowOffset($i); ?>
						</td>
						<td align="center">
							<?php echo JHTML::_('grid.id', $i, $cart->cart_id );
?>
						</td>
						<td align="center">
							<?php
								if(hikashop_isAllowed($config->get('acl_wishlist_manage','all'))){
									echo "<a
href=".hikashop_completeLink('cart&task=edit&cart_type='.$cart_type.'&cart_id='.$cart->cart_id.'&cid[]='.$cart->cart_id,false,true).">";echo
$cart->cart_name."</a>";
								}else{
									echo $cart->cart_name;
								}
							?>
						</td>
						<td align="center">
							<?php
							$user = null;
							if($cart->user_id != 0){
								$userClass = hikashop_get('class.user');
								$user_id = $userClass->getID($cart->user_id);
								if(!empty($user_id))
									$user = $userClass->get($user_id);
								else
									$user = $userClass->get($cart->user_id);
								if(empty($user)){
									$user_id = $userClass->getID($cart->user_id);
									$user = $userClass->get($user_id);
								}
								if(!empty($user->username)){
									echo $user->name.' ( '.$user->username.'
)</a><br/>';
								}
								$target = '';
								if($this->popup)
									$target = '" target="_top';
								$url =
hikashop_completeLink('user&task=edit&cid[]='.$cart->user_id);
								$config =& hikashop_config();
								if(hikashop_isAllowed($config->get('acl_user_manage','all')))
echo $user->user_email.'<a
href="'.$url.$target.'"><img
src="'.HIKASHOP_IMAGES.'edit2.png"
alt="edit"/></a>';
							}else{
								echo JText::_('NO_REGISTRATION');
							}
							?>
						</td>
						<td align="center">
						<?php if($cart->cart_current == 1){	?>
								<a class="modal" rel="{handler:
'iframe', size: {x: 760, y: 480}}" href="<?php echo
hikashop_completeLink('cart&task=edit&cart_type='.$cart_type.'&cid[]='.$cart->cart_id.'&user_id='.$cart->user_id);?>">
									<img
src="../media/com_hikashop/images/icon-16-default.png"
alt="current"/>
								</a>
						<?php } ?>
						</td>
						<td align="center">
							<?php
								echo $cart->quantity;
		cart/view.html.php000064400000033540151162050350010126
0ustar00					</a>

							<?php } ?>
						</td>
						<td width="1%" align="center">
							<?php echo $cart->cart_id; ?>
						</td>
					</tr>
				<?php
					$i++;
				}
			}
			?>
		</tbody>
	</table>
	<input type="hidden" name="cart_type"
value="<?php echo JRequest::getString('cart_type',
'cart'); ?>" />
	<input type="hidden" name="option"
value="<?php echo HIKASHOP_COMPONENT; ?>" />
	<input type="hidden" name="task" value=""
/>
	<input type="hidden" name="ctrl"
value="<?php echo JRequest::getCmd('ctrl'); ?>"
/>
	<input type="hidden" name="boxchecked"
value="0" />
	<input type="hidden" name="filter_order"
value="<?php echo
$this->pageInfo->filter->order->value; ?>" />
	<input type="hidden" name="filter_order_Dir"
value="<?php echo $this->pageInfo->filter->order->dir;
?>" />
	<?php echo JHTML::_( 'form.token' ); ?>
</form>
cart/view.html.php000064400000033540151162050350010126 0ustar00<?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 CartViewCart extends hikashopView {
	var $ctrl= 'cart';
	var $nameListing = 'HIKASHOP_CHECKOUT_CART';
	var $nameForm = 'HIKASHOP_CHECKOUT_CART';
	var $icon = 'cart';
	function display($tpl = null){
		$this->paramBase =
HIKASHOP_COMPONENT.'.'.$this->getName();
		$function = $this->getLayout();
		if(method_exists($this,$function)) $this->$function();
		parent::display($tpl);
	}

	function setName(){
		$cart_type =
JRequest::getString('cart_type','cart');
		if($cart_type!='cart'){
			$this->nameListing = 'WISHLIST';
			$this->nameForm = 'WISHLIST';
			$this->icon = 'wishlist';
		}
	}

	function listing(){
		$this->setName();
		$config = hikashop_config();
		$app = JFactory::getApplication();
		$pageInfo = new stdClass();
		$pageInfo->filter = new stdClass();
		$pageInfo->filter->order = new stdClass();
		$pageInfo->limit = new stdClass();
		$pageInfo->search = $app->getUserStateFromRequest(
$this->paramBase.".search", 'search', '',
'string' );
		$pageInfo->filter->order->value =
$app->getUserStateFromRequest(
$this->paramBase.".filter_order",
'filter_order',	'a.cart_modified','cmd' );
		$pageInfo->filter->order->dir	=
$app->getUserStateFromRequest(
$this->paramBase.".filter_order_Dir",
'filter_order_Dir',	'desc',	'word' );
		$pageInfo->limit->value = $app->getUserStateFromRequest(
$this->paramBase.'.list_limit', 'limit',
$app->getCfg('list_limit'), 'int' );
		$pageInfo->limit->start = $app->getUserStateFromRequest(
$this->paramBase.'.limitstart', 'limitstart', 0,
'int' );

		$pageInfo->manageUser =
hikashop_isAllowed($config->get('acl_user_manage','all'));
		$popup = (JRequest::getString('tmpl') ===
'component');
		$database	= JFactory::getDBO();
		if(JRequest::getString('cart_type', 'cart') ==
'cart')
			$filters = array('a.cart_type=\'cart\'');
		else
			$filters = array('a.cart_type=\'wishlist\'');
		$searchMap =
array('a.cart_id','a.user_id','a.cart_name','a.cart_coupon','a.cart_type');
		if(!empty($pageInfo->search)){
			$searchVal =
'\'%'.hikashop_getEscaped(JString::strtolower(
$pageInfo->search ),true).'%\'';
			$filters[] =  implode(" LIKE $searchVal OR
",$searchMap)." LIKE $searchVal";
		}
		$groupBy = 'GROUP BY a.cart_id';
		$order = '';
		if(!empty($pageInfo->filter->order->value)){
			$order = ' ORDER BY
'.$pageInfo->filter->order->value.'
'.$pageInfo->filter->order->dir;
		}
		if(!empty($filters)){
			$filters = ' WHERE '. implode(' AND ',$filters);
		}else{
			$filters = '';
		}
		$from = 'FROM '.hikashop_table('cart').' AS
a';
		$cartProduct = 'JOIN
'.hikashop_table('cart_product').' AS b ON
a.cart_id=b.cart_id';
		$query = $from.' '.$cartProduct.' '.$filters.'
'.$groupBy.' '.$order;
		$database->setQuery('SELECT a.*, b.*
'.$query,(int)$pageInfo->limit->start,(int)$pageInfo->limit->value);
		$rows = $database->loadObjectList();
		if(!empty($pageInfo->search)){
			$rows =
hikashop_search($pageInfo->search,$rows,'cart_id');
		}
		$database->setQuery('SELECT COUNT(*) '.$from.'
'.$cartProduct.' '.$filters.' '.$groupBy);
		$pageInfo->elements = new stdClass();
		$pageInfo->elements->total = $database->loadResult();
		$pageInfo->elements->page = count($rows);
		$currencyClass = hikashop_get('class.currency');
		$this->assignRef('currencyHelper',$currencyClass);



		$config =& hikashop_config();
		$currencyClass = hikashop_get('class.currency');
		$class = hikashop_get('class.cart');
		$productClass = hikashop_get('class.product');
		$main_currency = (int)$config->get('main_currency',1);
		$currency_id = hikashop_getCurrency();
		if($config->get('tax_zone_type','shipping')=='billing'){
			$zone_id = hikashop_getZone('billing');
		}else{
			$zone_id = hikashop_getZone('shipping');
		}
		$discount_before_tax =
(int)$config->get('discount_before_tax',0);

		$cids = array();
		foreach($rows as $row){
			if($row->cart_id != null)
				$cids[] = $row->cart_id;
		}
		if(!empty($cids))
		$filters = array('a.cart_id
IN('.implode(",",$cids).')');
		$order = '';
		if(!empty($pageInfo->filter->order->value)){
			$order = ' ORDER BY cart_id ASC';
		}
		$products = null;
		if(!empty($cids)){
			$product = ' LEFT JOIN
'.hikashop_table('product').' AS b ON
a.product_id=b.product_id';
			$query = 'FROM
'.hikashop_table('cart_product').' AS a
'.$product.' WHERE ('.implode(') AND
(',$filters).') '.$order;
			$database->setQuery('SELECT a.*,b.* '.$query);
			$products = $database->loadObjectList();
		}
		if(!empty($products)){
			$ids = array();
			foreach($products as $row){
				$ids[] = $row->product_id;
			}
			$row_1 = 0;
			$previous = 0;
			foreach($products as $k => $row){
				$currencyClass->getPrices($row,$ids,$currency_id,$main_currency,$zone_id,$discount_before_tax);
				if(!isset($row->prices[0]) && isset($row_1->prices[0])){
					$row->prices[0] = $row_1->prices[0];
				}
				$products[$k]->hide = 0;
				if($row->product_type == 'variant'){
					$products[$previous]->hide = 1;
				}
				$row_1 = $row;
				$previous = $k;
			}
			$currentId = 0;
			$values = array();
			$currency = hikashop_getCurrency();
			foreach($products as $product){
				if(isset($product->cart_id)){
					if($product->cart_id != $currentId){
						$price = 0;
						$quantity = 0;
						$currentId = $product->cart_id;
						if(isset($product->prices[0]))
							$currency = $product->prices[0]->price_currency_id;
					}
					if(isset($product->prices[0])){
						$price += $product->cart_product_quantity *
$product->prices[0]->price_value;
						$quantity += $product->cart_product_quantity;
					}
					if(!isset($values[$currentId])) $values[$currentId] = new stdClass();
					$values[$currentId]->price = $price;
					$values[$currentId]->quantity = $quantity;
					$values[$currentId]->currency = $currency;
				}
			}
		}
		foreach($rows as $k => $row){
			if($values[$row->cart_id] != null){
				$rows[$k]->price = $values[$row->cart_id]->price;
				$rows[$k]->quantity = $values[$row->cart_id]->quantity;
				$rows[$k]->currency = $values[$row->cart_id]->currency;
			}
		}
		$cart=hikashop_get('helper.cart');
		$this->assignRef('cart',$cart);
		$this->assignRef('carts',$rows);
		$this->assignRef('popup',$popup);
		$pageInfo->elements->total = count($rows);
		$this->assignRef('pageInfo',$pageInfo);
		hikashop_setTitle(JText::_($this->nameListing),$this->icon,$this->ctrl);
		$this->getPagination();

		$config =& hikashop_config();
		$manage =
hikashop_isAllowed($config->get('acl_wishlist_manage','all'));
		$this->assignRef('manage',$manage);
		$this->toolbar = array(
			array('name'=>'addNew','display'=>$manage),
			array('name'=>'editList','display'=>$manage),
			array('name'=>'deleteList','display'=>hikashop_isAllowed($config->get('acl_wishlist_delete','all'))),
			'|',
			array('name' => 'pophelp', 'target'
=> $this->ctrl.'-listing'),
			'dashboard'
		);
	}

	function form(){
		$this->setName();
		$cart_id =
hikashop_getCID('cart_id',false)?hikashop_getCID('cart_id',false):0;
		if($cart_id == 0)$cart_id = JRequest::getInt('cart_id',0);
		$database	= JFactory::getDBO();
		$searchMap = array('a.cart_id','a.product_id');
		$filters = array('a.cart_id ='.(int)$cart_id);
		$order = '';
		if(!empty($pageInfo->filter->order->value)){
			$order = ' ORDER BY cart_product_modified ASC';
		}
		if(!empty($pageInfo->search)){
			$searchVal =
'\'%'.hikashop_getEscaped(JString::strtolower(
$pageInfo->search ),true).'%\'';
			$filter = implode(" LIKE $searchVal OR ",$searchMap)."
LIKE $searchVal";
			$filters[] =  $filter;
		}

		$query = 'FROM
'.hikashop_table('cart_product').' AS a LEFT JOIN
'.hikashop_table('product').' AS b ON
a.product_id=b.product_id WHERE ('.implode(') AND
(',$filters).') '.$order;
		if((int)$cart_id != 0){

			$database->setQuery('SELECT a.*, b.* '.$query);
			$rows = $database->loadObjectList();
		}else{
			$rows = null;
		}
		if(!empty($rows[0]->cart_id)){
			$database->setQuery('SELECT a.* FROM
'.hikashop_table('cart').' AS a WHERE a.cart_id =
'.$rows[0]->cart_id);
			$cart = $database->loadObject();
		}else{
			$cart = new stdClass();
			$cart->cart_id = '0';
			$cart->cart_name = '';

			$cart->cart_type =
JRequest::getString('cart_type','cart');
			$cart->cart_modified = time();

			$cartClass = hikashop_get('class.cart');
			$cart->cart_id = $cartClass->save($cart);

			$cart->user_id = 0;
			$cart->cart_coupon = '';
			$rows = null;
		}

		$popup = hikashop_get('helper.popup');
		$this->assignRef('popup', $popup);

		$config =& hikashop_config();
		$currencyClass = hikashop_get('class.currency');
		$class = hikashop_get('class.cart');
		$productClass = hikashop_get('class.product');
		$main_currency = (int)$config->get('main_currency',1);
		$currency_id = hikashop_getCurrency();

		if($config->get('tax_zone_type','shipping')=='billing'){
			$zone_id = hikashop_getZone('billing');
		}else{
			$zone_id = hikashop_getZone('shipping');
		}
		$discount_before_tax =
(int)$config->get('discount_before_tax',0);

		if(!empty($rows)){
			$ids = array();
			foreach($rows as $row){
				$ids[] = $row->product_id;
			}
			$row_1 = 0;
			$previous = 0;
			foreach($rows as $k => $row){

				$currencyClass->getPrices($row,$ids,$currency_id,$main_currency,$zone_id,$discount_before_tax);

				if(!isset($row->prices[0]) && isset($row_1->prices[0])){
					$row->prices[0] = $row_1->prices[0];
					if($row->product_name == ''){
						$row->product_name = $row_1->product_name;
					}
				}
				$rows[$k]->hide = 0;
				if($row->product_type == 'variant'){
					$rows[$previous]->hide = 1;
				}
				$row_1 = $row;
				$previous = $k;
			}
		}
		$this->assignRef('rows',$rows);
		$class = hikashop_get('class.cart');
		if(!empty($cart_id)){
			$element = $class->get($cart_id,true,$cart->cart_type);
			$task='edit';
		}else{
			$element = new stdClass();
			$task='add';
		}
		$user = null;
		if($cart->user_id != 0){
			$userClass = hikashop_get('class.user');
			$user = $userClass->get($cart->user_id,'cms');
		}
		$this->assignRef('user',$user);
		$this->assignRef('cart',$cart);
		hikashop_setTitle(JText::_($this->nameForm),$this->icon,$this->ctrl.'&task='.$task.'&cart_id='.$cart_id);
		$this->toolbar = array(
			'save',
			'apply',
			'cancel',
			'|',
			array('name' => 'pophelp', 'target'
=> $this->ctrl.'-listing')
		);

		$this->assignRef('element',$element);
		$toggle=hikashop_get('helper.toggle');
		$this->assignRef('toggle',$toggle);
	}
	function
addCharacteristics(&$element,&$mainCharacteristics,&$characteristics){
		$element->characteristics =
$mainCharacteristics[$element->product_id][0];
		if(!empty($element->characteristics) &&
is_array($element->characteristics)){
			foreach($element->characteristics as $k => $characteristic){
				if(!empty($mainCharacteristics[$element->product_id][$k])){
					$element->characteristics[$k]->default=end($mainCharacteristics[$element->product_id][$k]);
				}else{
					$app =& JFactory::getApplication();
					$app->enqueueMessage('The default value of one of the
characteristics of that product isn\'t available as a variant. Please
check the characteristics and variants of that product');
				}
			}
		}

		if(!empty($element->variants)){
			foreach($characteristics as $characteristic){
				foreach($element->variants as $k => $variant){
					if($variant->product_id==$characteristic->variant_product_id){
						$element->variants[$k]->characteristics[$characteristic->characteristic_parent_id]=$characteristic;
						$element->characteristics[$characteristic->characteristic_parent_id]->values[$characteristic->characteristic_id]=$characteristic;
						if($this->selected_variant_id &&
$variant->product_id==$this->selected_variant_id){
							$element->characteristics[$characteristic->characteristic_parent_id]->default=$characteristic;
						}
					}
				}
			}
			if(isset($_REQUEST['hikashop_product_characteristic'])){
				if(is_array($_REQUEST['hikashop_product_characteristic'])){
					JArrayHelper::toInteger($_REQUEST['hikashop_product_characteristic']);
					$chars = $_REQUEST['hikashop_product_characteristic'];
				}else{
					$chars =
JRequest::getCmd('hikashop_product_characteristic','');
					$chars = ecartmodules/index.html000064400000000034151162050350011056
0ustar00chars as $k => $char){
				cartmodules/tmpl/index.html000064400000000034151162050350012032
0ustar00cartmodules/index.htmlcartmodules/tmpl/options.php000064400000004426151162050350012252
0ustar00cartmodules/tmpl/index.html000064400000000034151162050350012032
0ustar00<html><body></body></html>
cartmodules/tmpl/options.php000064400000004426151162050350012252
0ustar00<?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
if(!isset($this->element['layout_type']))
	$this->element['layout_type'] = 'inherit';
if (HIKASHOP_J40) {
?>
<style>
	legend,
	fieldset#fieldset-basic small.form-text.text-muted,
	section#attrib-products small.form-text.text-muted {
		display: none;
	}
	fieldset#fieldset-hk_options,
	section#attrib-hk_options {
		border: none;
		padding: 0px;
		margin: 0px;
	}
	section#attrib-basic,
	section#attrib-products {
		padding: 0px;
	}
	div#hikashop_main_content {
		border: 1px solid
#b2bfcartmodules/tmpl/options_display_restriction.php000064400000007171151162050350016424
0ustar00	<!-- module edition -->
	<div id="hikashop_module_backend_page_edition"
class="hk-row-fluid">
<?php
echo $this->loadTemplate('main');
echo $this->loadTemplate('price');
echo $this->loadTemplate('display_restriction');
?>
	</div>
</div>
<?php
$js = "
window.hikashop.ready(function() {
	window.hikashop.dlTitle('hikashop_main_content');
	hkjQuery('#options
#hikashop_main_content').prev('.control-group').hide();
});
";
if(HIKASHOP_J40) {
	$js .= "
window.hikashop.ready(function() {
	var mainDiv = document.getElementById('hikashop_main_content');
	if(mainDiv) {
		mainDiv.parentNode.classList.remove('column-count-md-2');
		mainDiv.parentNode.classList.remove('column-count-lg-3');
	}
});
";
}
$doc = JFactory::getDocument();
$doc->addScriptDeclaration($js);
cartmodules/tmpl/options_display_restriction.php000064400000007171151162050350016424
0ustar00<?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');
?><div class="hkc-xl-6 hkc-md-6 hikashop_module_subblock
hikashop_module_edit_general_part1">
<div class="hikashop_module_subblock_content">
	<div class="hikashop_module_subblock_title
hikashop_module_edit_display_settings_div_title"><?php echo
JText::_('DISPLAY'); ?></div>
	 <dl class="hika_options">
		<dt class="hikashop_option_name"><?php
			echo JText::_('PRODUCT_PAGE');
		?></dt>
		<dd class="hikashop_option_value"><?php
			if(!isset($this->element['display_on_product_page']))
				$this->element['display_on_product_page'] = 1;
			echo JHTML::_('hikaselect.booleanlist',
$this->name.'[display_on_product_page]', '',
$this->element['display_on_product_page']);
		?></dd>
	</dl>
	<dl class="hika_options">
		<dt class="hikashop_option_name"><?php
			echo JText::_('PRODUCT_LISTING_PAGE');
		?></dt>
		<dd class="hikashop_option_value"><?php
			if(!isset($this->element['display_on_product_listing_page']))
				$this->element['display_on_product_listing_page'] = 1;
			echo JHTML::_('hikaselect.booleanlist',
$this->name.'[display_on_product_listing_page]', '',
$this->element['display_on_product_listing_page']);
		?></dd>
	</dl>
	<dl class="hika_options">
		<dt class="hikashop_option_name"><?php
			echo JText::_('PRODUCT_COMPARE_PAGE');
		?></dt>
		<dd class="hikashop_option_value"><?php
			if(!isset($this->element['display_on_product_compare_page']))
				$this->element['display_on_product_compare_page'] = 1;
			echo JHTML::_('hikaselect.booleanlist',
$this->name.'[display_on_product_compare_page]', '',
$this->element['display_on_product_compare_page']);
		?></dd>
	</dl>
	<dl class="hika_options">
		<dt class="hikashop_option_name"><?php
			echo JText::_('CATEGORY_LISTING_PAGE');
		?></dt>
		<dd class="hikashop_option_value"><?php
			if(!isset($this->element['display_on_category_listing_page']))
				$this->element['display_on_categorcartmodules/tmpl/options_main.php000064400000022644151162050350013260
0ustar00age'] = 1;
			echo JHTML::_('hikaselect.booleanlist',
$this->name.'[display_on_contact_page]', '',
$this->element['display_on_contact_page']);
		?></dd>
	</dl>
	<dl class="hika_options">
		<dt class="hikashop_option_name"><?php
			echo JText::_('COM_HIKASHOP_WAITLIST_VIEW_DEFAULT_TITLE');
		?></dt>
		<dd class="hikashop_option_value"><?php
			if(!isset($this->element['display_on_waitlist_page']))
				$this->element['display_on_waitlist_page'] = 1;
			echo JHTML::_('hikaselect.booleanlist',
$this->name.'[display_on_waitlist_page]', '',
$this->element['display_on_waitlist_page']);
		?></dd>
	</dl>
</div>
</div>
cartmodules/tmpl/options_main.php000064400000022644151162050350013260
0ustar00<?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
$minicart_style = (!empty($this->element['small_cart'])
&& (int)$this->element['small_cart'] == 1) ?
'display: none;' : '';
$dropdown_style = (empty($this->element['small_cart']) ||
(int)$this->element['small_cart'] != 2) ? 'display:
none;' : '';
$name_style = (empty($this->element['show_cart_product_name'])
|| (int)$this->element['show_cart_product_name'] == 0) ?
'display: none;' : '';
?>
<div class="hkc-xl-6 hkc-md-6 hikashop_module_subblock
hikashop_module_edit_general_part1">
	<div class="hikashop_module_subblock_content">
		<div class="hikashop_menu_subblock_title
hikashop_module_edit_display_settings_div_title"><?php echo
JText::_('HIKA_DATA_DISPLAY'); ?></div>
		<dl class="hika_options hikashop_mini_cart">
			<dt class="hikashop_option_name"><?php
				echo
hikashop_hktooltip(JText::sprintf('HIKA_MINI_CART_DESC',$this->type),
'', JText::sprintf('MINI_CART', $this->type),
'', 0);
			?></dt>
			<dd class="hikashop_option_value"><?php
				$values = array(
					1 => JHTML::_('select.option', 1,
JText::_('JYES')),
					0 => JHTML::_('select.option', 0,
JText::_('JNO')),
					2 => JHTML::_('select.option', 2,
JText::_('HIKA_CART_DROPDOWN')),
					3 => JHTML::_('select.option', 3,
JText::_('HIKA_CART_DROPDOWN_HOVER')),
				);
				echo JHTML::_('hikaselect.radiolist', $values,
$this->name.'[small_cart]',
'data-control="mini_cart"', 'value',
'text', (int)@$this->element['small_cart']);
			?></dd>
		</dl>
		<dl class="hika_options" style="<?php echo
$minicart_style; ?>" data-part="mini_cart">
			<dt class="hikashop_option_name"><?php
				echo JText::_('HIKA_CART_IMAGE');
			?></dt>
			<dd class="hikashop_option_value"><?php
				echo JHTML::_('hikaselect.booleanlist',
$this->name.'[image_in_cart]', '',
@$this->element['image_in_cart']);
			?></dd>
		</dl>
<?php
	if(!preg_match('/wishlist/', $this->name)) {
?>
		<dl class="hika_options">
			<dt class="hikashop_option_name"><?php
				echo JText::_('HIKA_PROCEED_BUTTON');
			?></dt>
			<dd class="hikashop_option_value"><?php
				echo JHTML::_('hikaselect.booleanlist',
$this->name.'[show_cart_proceed]', '',
@$this->element['show_cart_proceed']);
			?></dd>
		</dl>
<?php
	}
?>
		<dl class="hika_options" style="<?php echo
$minicart_style; ?>" data-part="mini_cart">
			<dt class="hikashop_option_name"><?php
				echo JText::_('HIKA_PRODUCT_NAME');
			?></dt>
			<dd class="hikashop_option_value"><?php
				$values = array(
					1 => JHTML::_('select.option', 1,
JText::_('JYES')),
					0 => JHTML::_('select.option', 0,
JText::_('JNO')),
				);
				echo JHTML::_('hikaselect.radiolist', $values,
$this->name.'[show_cart_product_name]',
'data-control="name_cart"', 'value',
'text',
(int)@$this->element['show_cart_product_name']);
			?></dd>
		</dl>
		<dl class="hika_options" style="<?php echo
$name_style; ?>" data-part="name_cart">
			<dt class="hikashop_option_name"><?php
				echo JText::_('HIKA_LINK_TO_DETAIL_PAGE');
			?></dt>
			<dd class="hikashop_option_value"><?php
				if(!isset($this->element['link_to_product_page']))
					$this->element['link_to_product_page'] = 1;
				echo JHTML::_('hikaselect.booleanlist',
$this->name.'[link_to_product_page]', '',
$this->element['link_to_product_page']);
			?></dd>
		</dl>
		<dl class="hika_options">
			<dt class="hikashop_option_name"><?php
				echo JText::_('HIKA_PRODUCT_QUANTITIES');
			?></dt>
			<dd class="hikashop_option_value"><?php
				echo JHTML::_('hikaselect.booleanlist',
$this->name.'[show_cart_quantity]', '',
@$this->element['show_cart_quantity']);
			?></dd>
		</dl>
		<dl class="hika_options">
			<dt class="hikashop_option_name"><?php
				echo
hikashop_hktooltip(JText::sprintf('HIKA_DELETE_BUTTON_DESC',
$this->type), '', JText::_('HIKA_DELETE_BUTTON'),
'', 0);
			?></dt>
			<dd class="hikashop_option_value"><?php
				echo JHTML::_('hikaselect.booleanlist',
$this->name.'[show_cart_delete]', '',
@$this->element['show_cart_delete']);
			?></dd>
		</dl>
		<dl class="hika_options">
			<dt class="hikashop_option_name"><?php
				echo
hikashop_hktooltip(JText::sprintf('HIKA_CART_COUPON_DESC',
$this->type), '',
JText::_('HIKASHOP_CHECKOUT_COUPON'), '', 0);
			?></dt>
			<dd class="hikashop_option_value"><?php
				echo JHTML::_('hikaselect.booleanlist',
$this->name.'[show_coupon]', '',
@$this->element['show_coupon']);
			?></dd>
		</dl>
		<dl class="hika_options">
			<dt class="hikashop_option_name"><?php
				echo hikashop_hktooltip(JText::_('HIKA_CART_PAYMENT_DESC'),
'', JText::_('HIKASHOP_CHECKOUT_PAYMENT'),
'', 0);
			?></dt>
			<dd class="hikashop_option_value"><?php
				echo JHTML::_('hikaselect.booleanlist',
$this->name.'[show_payment]', '',
@$this->element['show_payment']);
			?></dd>
		</dl>
		<dl class="hika_options">
			<dt class="hikashop_option_name"><?php
				echo hikashop_hktooltip(JText::_('HIKA_CART_SHIPPING_DESC'),
'', JText::_('HIKASHOP_CHECKOUT_SHIPPING'),
'', 0);
			?></dt>
			<dd class="hikashop_option_value"><?php
				echo JHTML::_('hikaselect.booleanlist',
$this->name.'[show_shipping]', '',
@$this->element['show_shipping']);
			?></dd>
		</dl>
		<dl class="hika_options">
			<dt class="hikashop_option_name"><?php
				echo hikashop_hktooltip(JText::_('HIKA_CART_TAXES_DESC'),
'', JText::_('TAXES'), '', 0);
			?></dt>
			<dd class="hikashop_option_value"><?php
				echo JHTML::_('hikaselect.booleanlist',
$this->name.'[show_taxes]', '',
@$this->element['show_taxes']);
			?></dd>
		</dl>
		<dl class="hika_options">
			<dt class="hikashop_option_name"><?php
				echo
hikashop_hktooltip(JText::sprintf('HIKA_PRINT_BUTTON_DESC',
$this->type), '', JText::_('HIKA_PRINT_BUTTON'),
'', 0);
			?></dt>
			<dd class="hikashop_option_value"><?php
				echo JHTML::_('hikaselect.booleanlist',
$this->name.'[print_cart]', '',
@$this->element['print_cart']);
			?></dd>
		</dl>
		<dl class="hika_options">
			<dt class="hikashop_option_name"><?php
				echo JText::_('HIDE_CART');
			?></dt>
			<dd class="hikashop_option_value"><?php
				echo JHTML::_('hikaselect.radiolist', $this->arr1,
$this->name.'[hide_cart]',
'data-control="hideCart"', 'value',
'text', @$this->element['hide_cart']);
			?></dd>
		</dl>
		<dl class="hika_options" data-part="msg"
style="<?php echo ((@$this->element['hide_cart'] !=
"1") ? 'display: none;' : '');
?>">
			<dt class="hikashop_option_name"><?php
				echo
hikashop_hktooltip(JText::sprintf('HIKA_EMPTY_MESSAGE_DESC',
$this->type), '', JText::_('HIKA_EMPTY_MESSAGE'),
'', 0);
			?></dt>
			<dd class="hikashop_option_value">
				<input name="<?php echo $this->name; ?>[msg]"
id="custommsg" type="text" value="<?php echo
$this->escape(@$this->element['msg']); ?>"/>
			</dd>
		</dl>
<?php
	if(preg_match('/wishlist/', $this->name)) {
?>
		<dl class="hika_options">
			<dt class="hikashop_option_name"><?php
				echo
hikashop_hktooltip(JText::sprintf('CART_MODULE_ITEMID_DESC',
$this->type), '', JText::_('HIKA_ITEM_ID'),
'', 0);
			?></dt>
			<dd class="hikashop_option_value">
				<input name="<?php echo $this->name;
?>[cart_itemid]" type="text" value="<?php echo
$this->escape(@$this->element['cart_itemid']); ?>"
/>
			</dd>
		</dl>
<?php
	}
?>
	</div>
</div>
<div class="hkc-xl-6 hkc-md-6 hikashop_module_subblock
hikashop_module_edit_general_part1" style="<?php echo
$dropdown_style; ?>" data-part="dropdown_cart">
	<div class="hikashop_module_subblock_content">
		<div class="hikashop_menu_subblock_title
hikashop_module_edit_display_settings_div_title"><?php echo
JText::_('HIKA_CART_DROPDOWN'); ?></div>
		<dl class="hika_options">
			<dt class="hikashop_option_name"><?php
				echo
hikashop_hktooltip(JText::sprintf('CART_MODULE_DROPDOWN_LEFT_DESC',
$this->type), '',
JText::_('CART_MODULE_DROPDOWN_LEFT'), '', 0);
			?></dt>
			<ddcartmodules/tmpl/options_price.php000064400000005414151162050350013432
0ustar00
		</dl>
	</div>
</div>
<?php
$js = '
window.hikashop.ready(function(){
	hkjQuery("[data-control=\'name_cart\']").change(function(){
		if(hkjQuery(this).val() == "0")
			hkjQuery("[data-part=\'name_cart\']").hide();
		else
			hkjQuery("[data-part=\'name_cart\']").show();
	});

	hkjQuery("[data-control=\'mini_cart\']").change(function(){
		if(hkjQuery(this).val() == "1")
			hkjQuery("[data-part=\'mini_cart\']").hide();
		else
			hkjQuery("[data-part=\'mini_cart\']").show();

		if(hkjQuery(this).val() == "2")
			hkjQuery("[data-part=\'dropdown_cart\']").show();
		else
			hkjQuery("[data-part=\'dropdown_cart\']").hide();
	});

	hkjQuery("[data-control=\'hideCart\']").change(function(){
		if(hkjQuery(this).val() == "1")
			hkjQuery("[data-part=\'msg\']").show();
		else
			hkjQuery("[data-part=\'msg\']").hide();
	});
});
';
$doc = JFactory::getDocument();
$doc->addScriptDeclaration($js);
cartmodules/tmpl/options_price.php000064400000005414151162050350013432
0ustar00<?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
$style = empty($this->element['show_price']) ?
'display:none;' : '';
?>
<div class="hkc-xl-6 hkc-md-6 hikashop_module_subblock
hikashop_module_edit_product">
<div class="hikashop_module_subblock_content">
	<div class="hikashop_menu_subblock_title
hikashop_module_edit_display_settings_div_title"><?php echo
JText::_('HIKA_PRICE_DISPLAY'); ?></div>
	<dl class="hika_options">
		<dt class="hikashop_option_name"><?php
			echo JText::_('DISPLAY_PRICE');
		?></dt>
		<dd class="hikashop_option_value"><?php
			if(!isset($this->element['show_price']))
$this->element['show_price'] = '-1';
			foreach($this->arr as $v){
				if($v->value == $this->default_params['show_price'])
					$v->default = true;
			}
			echo JHTML::_('hikaselect.radiolist',  $this->arr,
$this->name.'[show_price]',
'data-control="price"', 'value',
'text', @$this->element['show_price']);
		?></dd>
	</dl>
	<dl class="hika_options" id="show_taxed_price_line"
style="<?php echo $style; ?>"
data-part="price">
		<dt
class="hicartmodules/view.html.php000064400000006677151162050350011532
0ustar00$this->element['show_discount'], true);
		?></dd>
	</dl>
	<input type="hidden" name="<?php echo
$this->name.'[show_original_price]'; ?>"
value="<?php echo
$this->element['show_original_price']; ?>"/>
</div>
</div>
<?php
$js = '
window.hikashop.ready(function(){
	hkjQuery("[data-control=\'price\']").change(function()
{ hkPriceToggle(hkjQuery(this).val()); });
	hkPriceToggle();
});
hkPriceToggle = function(val) {
	if(typeof val === \'undefined\')
		val = hkjQuery("[data-control=\'price\']").val();
	if( val == "1" || (val == "-1" &&
"'.(int)@$this->default_params['show_price'].'"
== "1"))
		hkjQuery("[data-part=\'price\']").show();
	else
		hkjQuery("[data-part=\'price\']").hide();
}
';
$doc = JFactory::getDocument();
$doc->addScriptDeclaration($js);
cartmodules/view.html.php000064400000006677151162050350011532
0ustar00<?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 CartmodulesViewCartmodules extends hikashopView{
	var $include_module = false;
	var $ctrl= 'modules';
	var $nameListing = 'MODULES';
	var $nameForm = 'MODULE';
	var $icon = 'module';

	function display($tpl = null,$params=null)
	{
		$this->paramBase =
HIKASHOP_COMPONENT.'.'.$this->getName();
		$function = $this->getLayout();
		if(method_exists($this,$function)) $this->$function($params);
		parent::display($tpl);
	}

	function options(&$params){
		$this->id = $params->get('id');
		$this->name = str_replace('[]', '',
$params->get('name'));
		$this->element = $params->get('value');
		$this->pricetaxType = hikashop_get('type.pricetax');
		$this->discountDisplayType =
hikashop_get('type.discount_display');
		$this->priceDisplayType =
hikashop_get('type.priceDisplay');
		if(!isset($this->element['show_original_price']))
			$this->element['show_original_price'] = 0;
		if(!isset($this->element['show_discount']))
			$this->element['show_discount'] = 0;
		$this->arr = array(
			JHTML::_('select.option', '-1',
JText::_('HIKA_INHERIT') ),
			JHTML::_('select.option', '1',
JText::_('HIKASHOP_YES') ),
			JHTML::_('select.option', '0',
JText::_('HIKASHOP_NO') ),
		);
		$this->arr[0]->class = 'btn-primary';
		$this->arr[1]->class = 'btn-success';
		$this->arr[2]->class = 'btn-danger';

		$this->arr1 = array(
			JHTML::_('select.option', '0',
JText::_('HIKA_DEFAULT') ),
			JHTML::_('select.option', '1',
JText::_('HIKA_CUSTOM') ),
			JHTML::_('select.option', '2',
JText::_('HIKA_HIDE') ),
		);
		$this->arr1[0]->class = 'btn-primary';
		$this->arr1[1]->class = 'btn-success';
		$this->arr1[2]->class = 'btn-danger';

		$this->type = 'cart';
	category/index.html000064400000000032151162050350010347 0ustar00ings_array
= array(
			'icategory/tmpl/edit_translation.php000064400000010374151162050350013414
0ustar00category/index.html000064400000000032151162050350010347
0ustar00<html><body></body></html>category/tmpl/edit_translation.php000064400000010374151162050350013414
0ustar00<?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');
?><fieldset>
	<div class="toolbar" id="toolbar"
style="float: right;">
		<button class="btn" type="button"
onclick="submitbutton('save_translation');"><img
src="<?php echo HIKASHOP_IMAGES; ?>save.png"/><?php
echo JText::_('OK'); ?></button>
	</div>
</fieldset>
<div class="iframedoc"
id="iframedoc"></div>
<form action="index.php?option=<?php echo HIKASHOP_COMPONENT
?>&amp;ctrl=category" method="post" 
name="adminForm" id="adminForm"
enctype="multipart/form-data">

<?php
	echo $this->tabs->startPane( 'translations');
		if(!empty($this->element->translations)){
			foreach($this->element->translations as $language_id =>
$translation){
				$this->category_name_input =
"translation[category_name][".$language_id."]";
				$this->element->category_name =
@$translation->category_name->value;
				$this->editor->name =
'translation_category_description_'.$language_id;
				$this->element->category_description =
@$translation->category_description->value;
				if(isset($translation->category_name->published)){
					$this->category_name_published =
$translation->category_name->published;
					$this->category_name_id = $translation->category_name->id;
				}
				if(isset($translation->category_description->published)){
					$this->category_description_published =
$translation->category_description->published;
					$this->category_description_id =
$translation->category_description->id;
				}
				$this->category_meta_description_input =
"translation[category_meta_description][".$language_id."]";
				$this->element->category_meta_description =
@$translation->category_meta_description->value;
				if(isset($translation->category_meta_description->published)){
					$this->category_meta_description_published =
$translation->category_meta_description->published;
					$this->category_meta_description_id =
$translation->category_meta_description->id;
				}

				$this->category_keywords_input =
"translation[category_keywords][".$language_id."]";
				$this->element->category_keywords =
@$translation->category_keywords->value;
				if(isset($translation->category_keywords->published)){
					$this->category_keywords_published =
$translation->category_keywords->published;
					$this->category_keywords_id =
$translation->category_keywords->id;
				}

				$this->category_page_title_input =
"translation[category_page_title][".$language_id."]";
				$this->element->category_page_title =
@$translation->category_page_title->value;
				if(isset($translation->category_page_title->published)){
	category/tmpl/form.php000064400000016736151162050350011024
0ustar00lished)){
					$this->category_canonical_published =
$translation->category_canonical->published;
					$this->category_canonical_id =
$translation->category_canonical->id;
				}
				echo
$this->tabs->startPanel($this->transHelper->getFlag($language_id),
'translation_'.$language_id);
					$this->setLayout('normal');
					echo $this->loadTemplate();
				echo $this->tabs->endPanel();
			}
		}
	echo $this->tabs->endPane();
?>
	<input type="hidden" name="cid[]"
value="<?php echo @$this->element->category_id; ?>"
/>
	<input type="hidden" name="option"
value="<?php echo HIKASHOP_COMPONENT; ?>" />
	<input type="hidden" name="task" value=""
/>
	<input type="hidden" name="ctrl"
value="category" />
	<?php echo JHTML::_( 'form.token' ); ?>
</form>
category/tmpl/form.php000064400000016736151162050350011024
0ustar00<?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');
?><div class="iframedoc"
id="iframedoc"></div>
<form action="index.php?option=<?php echo HIKASHOP_COMPONENT
?>&amp;ctrl=category" method="post" 
name="adminForm" id="adminForm"
enctype="multipart/form-data">
<?php if(!HIKASHOP_BACK_RESPONSIVE) { ?>
<div id="page-category">
	<table style="width:100%">
		<tr>
			<td valign="top" width="70%">
<?php } else { ?>
<div id="page-category" class="row-fluid">
	<div class="span6">
<?php } ?>
				<fieldset class="adminform"
id="htmlfieldset_info">
					<legend><?php echo JText::_( 'MAIN_INFORMATION' );
?></legend>
					<?php
						$this->category_name_input =
"data[category][category_name]";
						$this->category_meta_description_input =
"data[category][category_meta_description]";
						$this->category_keywords_input =
"data[category][category_keywords]";
						$this->category_page_title_input =
"data[category][category_page_title]";
						$this->category_alias_input =
"data[category][category_alias]";
						$this->category_canonical_input =
"data[category][category_canonical]";
						if($this->translation){
							$this->setLayout('translation');
						}else{
							$this->setLayout('normal');
						}
						echo $this->loadTemplate();
					?>
				</fieldset>
<?php if(!HIKASHOP_BACK_RESPONSIVE) { ?>
			</td>
			<td valign="top">
<?php } else { ?>
	</div>
	<div class="span6">
<?php } ?>
				<fieldset class="adminform"
id="htmlfieldset_additional">
					<legend><?php echo JText::_(
'CATEGORY_ADDITIONAL_INFORMATION' ); ?></legend>
					<table class="admintable table" style="">
						<tr>
							<td class="key">
									<?php echo JText::_( 'HIKA_PUBLISHED' ); ?>
							</td>
							<td>
								<?php echo JHTML::_('hikaselect.booleanlist',
"data[category][category_published]" ,
'',@$this->element->category_published	); ?>
							</td>
						</tr>
						<?php if(empty($this->element->category_type) ||
$this->element->category_type=='product'){ ?>
						<tr>
							<td class="key">
									<?php echo JText::_( 'LAYOUT_ON_PRODUCT_PAGE' );
?>
							</td>
							<td>
								<?php echo
$this->productDisplayType->display('data[category][category_layout]'
, @$this->element->category_layout); ?>
							</td>
						</tr>
						<?php
						}
						if(file_exists(JPATH_ADMINISTRATOR.DS.'components'.DS.'com_multisites'.DS.'helpers'.DS.'utils.php')){
							include_once(
JPATH_ADMINISTRATOR.DS.'components'.DS.'com_multisites'.DS.'helpers'.DS.'utils.php');
							if ( class_exists( 'MultisitesHelperUtils') &&
method_exists( 'MultisitesHelperUtils',
'getComboSiteIDs')) {
								$comboSiteIDs = MultisitesHelperUtils::getComboSiteIDs(
@$this->element->category_site_id,
'data[category][category_site_id]', JText::_(
'SELECT_A_SITE'));
								if( !empty( $comboSiteIDs) &&
(empty($this->element->category_parent_id) ||
$this->element->category_parent_id!=1) &&
(empty($this->element->category_type) ||
in_array($this->element->category_type,array('product','brand','manufacturer')))){
?>
								<tr>
									<td class="key">
											<?php echo JText::_( 'SITE_ID' ); ?>
									</td>
									<td>
										<?php echo $comboSiteIDs; ?>
									</td>
								</tr>
								<?php
								}
							}
						}
						if(!empty($this->fields)){?>
							<?php foreach($this->fields as $fieldName =>
$oneExtraField){
								if(!$oneExtraField->field_backend){ ?>
								<tr><td><input type="hidden"
name="data[category][<?php echo $fieldName; ?>]"
value="<?php echo $this->element->$fieldName; ?>"
/></td></tr>
								<?php }else{ ?>
								<tr id='hikashop_category_<?php echo $fieldName;
?>'>
									<td class="key">
										<?php echo
$this->fieldsClass->getFieldName($oneExtraField);?>
									</td>
									<td>
										<?php $onWhat='onchange';
if($oneExtraField->field_type=='radio')
$onWhat='onclick'; ?>
										<?php echo
$this->fieldsClass->display($oneExtraField,$this->element->$fieldName,'data[category]['.$fieldName.']',false,'
'.$onWhat.'="hikashopToggleFields(this.value,\''.$fieldName.'\',\'category\',0);"');
?>
									</td>
								</tr>
								<?php }
							} ?>
						<?php }
						?>
					</table>
					<?php if(isset($this->element->category_namekey) &&
in_array($this->element->category_namekey,array('root','product','tax','status','created','confirmed','cancelled','refunded','shipped','manufacturer'))){?>
						<input type="hidden"
name="data[category][category_parent_id]" value="<?php
echo @$this->element->category_parent_id; ?>" />
					<?php }else{?>
						<table class="admintable table"
id="category_parent">
							<tr>
								<td class="key">
									<?php echo JText::_( 'CATEGORY_PARENT' ); ?>
								</td>
								<td>
									<span id="changeParent">
										<?php echo @$this->element->category_parent_id.'
'.@$this->element->category_parent_name; ?>
										<input type="hidden"
name="data[category][category_parent_id]" value="<?php
echo @$this->element->category_parent_id; ?>" />
									</span>
									<?php
									echo $this->popup->display(
											'<img src="'.
HIKASHOP_IMAGES.'edit.png"
alt="'.JText::_('CATEGORY_PARENT').'"/>',
											'CATEGORY_PARENT',
											hikashop_completeLink('category&task=selectparentlisting&filter_id='.@$this->element->category_parent_id,true),
											'parent_category_link',
											860, 480, '', '', 'link'
										);
									?>
								</td>
							</tr>
						</table>
					<?php }
					?>
				</fieldset>
				<?php if($this->category_image){ ?>
				<fieldset class="adminform"
id="htmlfieldset">
					<legend><?php echo JText::_( 'HIKA_IMAGE' );
?></legend>
					<span id="category_image-<?php echo
@$this->element->file_id;?>">
						<?php echo
$this->image->display(@$this->element->file_path,true,""category/tmpl/form.xml000064400000000316151162050350011020
0ustar00class="adminform">
				<legend><?php echo JText::_('ACCESS_LEVEL');
?></legend>
				<?php
				if(hikashop_level(2)){
					$acltype = hikashop_get('type.acl');
					echo
$acltype->display('category_accecategory/tmpl/form_image.php000064400000003515151162050350012155
0ustar00category/tmpl/form.xml000064400000000316151162050350011020
0ustar00<?xml version="1.0" encoding="utf-8"?>
<metadata>
	<layout title="COM_HIKASHOP_CATEGORY_CREATE_TITLE">
		<message>
			<![CDATA[COM_HIKASHOP_CATEGORY_CREATE_DESC]]>
		</message>
	</layout>
</metadata>category/tmpl/form_image.php000064400000003515151162050350012155
0ustar00<?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
$ajax = false;
if(!empty($this->upload_ajax))
	$category/tmpl/form_image_entry.php000064400000002163151162050350013374
0ustar00 = new stdClass();
	$this->params->file_id = $this->element->file_id;
	$this->params->file_path = $this->element->file_path;
	$this->params->file_ref_id = $this->element->file_ref_id;
	$this->params->category_id = $this->element->file_ref_id;
	$content = $this->loadTemplate('image_entry');
}

echo
$this->uploaderType->displayImageSingle('hikashop_category_image',
$content, $options);

?>
<script type="text/javascript">
if(!window.categoryMgr)
	window.categoryMgr = {};
window.categoryMgr.editImage = function(el, id, type) {
	var w = window, t = w.hikashop, href = null, n = el;
	if(type === undefined || type == '') type =
'category';
	t.submitFct = function(data) {};
	if(el.getAttribute('rel') == null) {
		href = el.href;
		n = 'hikashop_category_image_edit';
	}
	t.openBox(n,href);
	return false;
};
</script>
category/tmpl/form_image_entry.php0000644category/tmpl/index.html000064400000000032151162050350011323
0ustar00mage(this);"><img
src="<?pcategory/tmpl/listing.php000064400000020236151162050350011520
0ustar00category/tmpl/index.html000064400000000032151162050350011323
0ustar00<html><body></body></html>category/tmpl/listing.php000064400000020236151162050350011520
0ustar00<?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');
?><div class="iframedoc"
id="iframedoc"></div>

<?php if($this->config->get('category_explorer')){?>
<?php if(!HIKASHOP_BACK_RESPONSIVE) { ?>
<div id="page-category">
	<table style="width:100%">
		<tr>
			<td style="vertical-align:top;border:1px solid
#CCC;background-color: #F3F3F3" width="200px">
				<?php echo
hikashop_setExplorer('category&task=listing',$this->pageInfo->filter->filter_id,false,$this->type);
?>
			</td>
			<td style="vertical-align:top;">
<?php } else { ?>
<div id="page-category" class="row-fluid">
	<div class="span2">
		<?php echo
hikashop_setExplorer('category&task=listing',$this->pageInfo->filter->filter_id,false,$this->type);
?>
	</div>
	<div class="span10">
<?php } ?>
<?php } ?>
		<?php $count = 6; ?>
			<form action="index.php?option=<?php echo HIKASHOP_COMPONENT
?>&amp;ctrl=category" method="post" 
name="adminForm" id="adminForm">
<?php if(!HIKASHOP_BACK_RESPONSIVE) { ?>
				<table style="width:100%">
					<tr>
						<td>
<?php } else {?>
				<div class="row-fluid">
					<div class="span6">
<?php } ?>
							<a href="<?php echo
hikashop_completeLink('category&task=listing&filter_id=0');
?>"><?php echo JText::_( 'ROOT' );
?>/</a>
							<?php echo $this->breadCrumb.'<br/>'.JText::_(
'FILTER' ); ?>:
							<input type="text" name="search"
id="search" value="<?php echo
$this->escape($this->pageInfo->search);?>"
class="text_area" />
							<button class="btn"
onclick="this.form.submit();"><?php echo JText::_(
'GO' ); ?></button>
							<button class="btn"
onclick="document.getElementById('search').value='';this.form.submit();"><?php
echo JText::_( 'RESET' ); ?></button>
<?php if(!HIKASHOP_BACK_RESPONSIVE) { ?>
						</td>
						<td>
<?php } else {?>
					</div>
					<div class="span6">
						<div class="expand-filters"
style="width:auto;float:right">
<?php } ?>
							<?php echo $this->childDisplay; ?>
<?php if(!HIKASHOP_BACK_RESPONSIVE) { ?>
						</td>
					</tr>
				</table>
<?php } else {?>
						</div>
						<div style="clear:both"></div>
					</div>
				</div>
<?php } ?>
				<table id="hikashop_category_listing"
class="adminlist table table-striped table-hover"
cellpadding="1">
					<thead>
						<tr>
							<th class="title titlenum">
								<?php echo JText::_( 'HIKA_NUM' );?>
							</th>
							<th class="title titlebox">
								<input type="checkbox" name="toggle"
value="" onclick="hikashop.checkAll(this);" />
							</th>
							<th class="title titlebox">
								<?php echo JText::_('HIKA_EDIT'); ?>
							</th>
							<?php if($this->category_image){ $count++; ?>
							<th class="title titlebox">
								<?php echo JText::_('HIKA_IMAGE'); ?>
							</th>
							<?php }?>
							<th class="title">
								<?php echo JHTML::_('grid.sort',
JText::_('HIKA_NAME'), 'a.category_name',
$this->pageInfo->filter->order->dir,$this->pageInfo->filter->order->value
); ?>
							</th>
							<?php
							if(!empty($this->fields)){
								foreach($this->fields as $field){ $count++;
									echo '<th
class="title">'.JHTML::_('grid.sort',
$this->fieldsClass->trans($field->field_realname),
'a.'.$field->field_namekey,
$this->pageInfo->filter->order->dir,$this->pageInfo->filter->order->value
).'</th>';
								}
							}
							if(!$this->pageInfo->selectedType){ $count++; ?>
								<th class="title titleorder">
								<?php echo JHTML::_('grid.sort',    JText::_(
'HIKA_ORDER' ),
'a.category_ordering',$this->pageInfo->filter->order->dir,
$this->pageInfo->filter->order->value ); ?>
									<?php if ($this->order->ordering) echo
JHTML::_('grid.order',  $this->rows ); ?>
								</th>
							<?php } ?>
							<th class="title titletoggle">
								<?php echo JHTML::_('grid.sort',  
JText::_('HIKA_PUBLISHED'), 'a.category_published',
$this->pageInfo->filter->order->dir,
$this->pageInfo->filter->order->value ); ?>
							</th>
							<th class="title">
								<?php echo JHTML::_('grid.sort',   JText::_(
'ID' ), 'a.category_id',
$this->pageInfo->filter->order->dir,
$this->pageInfo->filter->order->value ); ?>
							</th>
						</tr>
					</thead>
					<tfoot>
						<tr>
							<td colspan="<?php echo $count; ?>">
								<?php echo $this->pagination->getListFooter(); ?>
								<?php echo $this->pagination->getResultsCounter(); ?>
							</td>
						</tr>
					</tfoot>
					<tbody>
						<?php
							$k = 0;
							for($i = 0,$a = count($this->rows);$i<$a;$i++){
								$row =& $this->rows[$i];
								$publishedid =
'category_published-'.$row->category_id;
						?>
							<tr class="<?php echo "row$k"; ?>">
								<td align="center">
								<?php echo $this->pagination->getRowOffset($i); ?>
								</td>
								<td align="center">
									<?php echo JHTML::_('grid.id', $i,
$row->category_id ); ?>
								</td>
								<td width="1%" align="center">
									<?php if($this->manage){ ?>
										<a href="<?php echo
hikashop_completeLink('category&task=edit&cid[]='.$row->category_id);
?>">
											<img src="<?php echo HIKASHOP_IMAGES;
?>edit.png" alt="edit"/>
										</a>
									<?php } ?>
								</td>
								<?php if($this->category_image){ ?>
								<td>
									<?php echo
$this->image->display(@$row->file_path,true,"",'','',
100, 100); ?>
								</td>
								<?php } ?>
								<td>
									<a href="<?php echo
hikashop_completeLink('category&filter_id='.$row->category_id);
?>">
										<?php echo $row->translation; ?>
									</a>
								</td>
								<?php
								if(!empty($this->fields)){
									foreach($this->fields as $field){
										$namekey = $field->field_namekey;

										echo
'<td>'.$this->fieldsClass->show($field,$row->$namekey).'</td>';
									}
								}
								if(!$this->pageInfo->selectedType){?>
									<td class="order">
										<?php if($this->manage){ ?>
											<span><?php echo $this->pagination->orderUpIcon(
$i, $this->order->reverse XOR ( $row->category_ordering >=
@$this->rows[$i-1]->category_ordering ), $this->order->orderUp,
'Move Up',$this->order->ordering ); ?></span>
											<span><?php echo
$this->pagination->orderDownIcon( $i, $a, $this->order->reverse
XOR ( $row->category_ordering <=
@$this->rows[$i+1]->category_ordering ),
$this->order->orderDown, 'Move Down'
,$this->order->ordering); ?></span>
											<input type="text" name="order[]"
size="5" <?php if(!$this->order->ordering) echo
'disabled="disabled"'?> value="<?php echo
$row->category_ordering; ?>" class="text_area"
style="text-category/tmpl/listing.xml000064400000000316151162050350011526
0ustar00Cmd('ctrl'); ?>" />
				<input type="hidden" name="boxchecked"
value="0" />
				<input type="hidden" id="filter_id"
name="filter_id" value="<?php echo
$this->pageInfo->filter->filter_id; ?>" />
				<inpucategory/tmpl/normal.php000064400000013601151162050350011335
0ustar00category/tmpl/listing.xml000064400000000316151162050350011526
0ustar00<?xml version="1.0" encoding="utf-8"?>
<metadata>
	<layout title="COM_HIKASHOP_CATEGORIES_VIEW_TITLE">
		<message>
			<![CDATA[COM_HIKASHOP_CATEGORIES_VIEW_DESC]]>
		</message>
	</layout>
</metadata>category/tmpl/normal.php000064400000013601151162050350011335
0ustar00<?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');
?>					<table class="admintable" 
width="100%">
						<tr>
							<td class="key">
									<?php echo JText::_( 'HIKA_NAME' ); ?>
							</td>
							<td>
								<?php
								$systemOrderStatuses = array('created',
'confirmed', 'cancelled', 'refunded',
'shipped');
								if(!empty($this->element->category_id) &&
in_array($this->element->category_name, $systemOrderStatuses)
&& !@$this->translation &&
@$this->element->category_type=='status'){ ?>
									<input id="category_name" type="hidden"
size="80" name="<?php echo $this->category_name_input;
?>" value="<?php echo
$this->escape(@$this->element->category_name); ?>"
/><?php echo $this->escape(@$this->element->category_name);
?>
								<?php }else{ ?>
									<input id="category_name" type="text"
size="80" name="<?php echo $this->category_name_input;
?>" value="<?php echo
$this->escape(@$this->element->category_name); ?>" />
								<?php }
									if(isset($this->category_name_published)){
										$publishedid =
'published-'.$this->category_name_id;
								?>
								<span id="<?php echo $publishedid; ?>"
class="spanloading"><?php echo
$this->toggle->toggle($publishedid,(int)
$this->category_name_published,'translation')
?></span>
								<?php } ?>
							</td>
						</tr>
						<tr>
							<td class="key">
								<?php echo JText::_( 'CATEGORY_DESCRIPTION' ); ?>
							</td>
							<td width="100%"></td>
						</tr>
						<tr>
							<td colspan="2" width="100%">
								<?php if(isset($this->category_description_published)){
										$publishedid =
'published-'.$this->category_description_id;
								?>
								<span id="<?php echo $publishedid; ?>"
class="spanloading"><?php echo
$this->toggle->toggle($publishedid,(int)
$this->category_description_published,'translation')
?></span>
								<br/>
								<?php }
									$this->editor->content =
@$this->element->category_description;
									echo $this->editor->display();
								?>
							</td>
						</tr>
						<?php if(empty($this->element->category_type) ||
in_array($this->element->category_type,array('product','manufacturer'))){
?>
						<tr>
							<td class="key">
									<?php echo JText::_( 'CATEGORY_META_DESCRIPTION' );
?>
							</td>
							<td>
								<textarea id="category_meta_description"
cols="46" rows="2" name="<?php echo
$this->category_meta_description_input; ?>"><?php echo
$this->escape(@$this->element->category_meta_description);
?></textarea>
								<?php if(isset($this->category_meta_description_published)){
										$publishedid =
'published-'.$this->category_meta_description_id;
								?>
								<span id="<?php echo $publishedid; ?>"
class="spanloading"><?php echo
$this->toggle->toggle($publishedid,(int)
$this->category_meta_description_published,'translation')
?></span>
								<?php } ?>
							</td>
						</tr>
						<tr>
							<td class="key">
									<?php echo JText::_( 'CATEGORY_KEYWORDS' ); ?>
							</td>
							<td>
								<textarea id="category_keywords" cols="46"
rows="1" name="<?php echo
$this->category_keywords_input; ?>"><?php echo
$this->escape(@$this->element->category_keywords);
?></textarea>
								<?php if(isset($this->category_keywords_published)){
										$publishedid =
'published-'.$this->category_keywords_id;
								?>
								<span id="<?php echo $publishedid; ?>"
class="spanloading"><?php echo
$this->toggle->toggle($publishedid,(int)
$this->category_keywords_published,'translation')
?></span>
								<?php } ?>
							</td>
						</tr>
						<tr>
							<td class="key">
									<?php echo JText::_( 'PAGE_TITLE' ); ?>
							</td>
							<td>
								<textarea id="category_page_title" cols="46"
rows="2" name="<?php echo
$this->category_page_title_input; ?>"><?php
if(!isset($this->element->category_page_title))
$this->element->category_page_title=''; echo
$this->escape(@$this->element->category_page_title);
?></textarea>
								<?php if(isset($this->category_page_title_published)){
										$publishedid =
'published-'.$this->category_page_title_id;
								?>
								<span id="<?php echo $publishedid; ?>"
class="spanloading"><?php echo
$this->toggle->toggle($publishedid,(intcategory/tmpl/selectimage.php000064400000012116151162050350012327
0ustar00?php echo $publishedid; ?>"
class="spanloading"><?php echo
$this->toggle->toggle($publishedid,(int)
$this->category_alias_published,'translation')
?></span>
								<?php } ?>
							</td>
						</tr>
						<tr>
							<td class="key">
								<?php echo JText::_( 'CATEGORY_CANONICAL' ); ?>
							</td>
							<td>
								<input type="text" id="category_canonical"
name="<?php echo $this->category_canonical_input; ?>"
value="<?php echo @$this->element->category_canonical;
?>"/>
								<?php if(isset($this->category_canonical_published)){
										$publishedid =
'published-'.$this->category_canonical_id;
								?>
								<span id="<?php echo $publishedid; ?>"
class="spanloading"><?php echo
$this->toggle->toggle($publishedid,(int)
$this->category_canonical_published,'translation')
?></span>
								<?php } ?>
							</td>
						</tr>
					<?php } ?>
					</table>
category/tmpl/selectimage.php000064400000012116151162050350012327
0ustar00<?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');
?><div class="title" style="float:
left;"><h1><?php echo empty($this->element->file_id)
? JText::_('NEW_IMAGE') : JText::_('EDIT_IMAGE');
?></h1></div>
<div class="toolbar" id="toolbar" style="float:
right;">
	<button class="btn btn-success" type="button"
onclick="submitbutton('addimage');"><i
class="fa fa-save"></i> <?php echo
JText::_('OK'); ?></button>
</div>
<div class="iframedoc"
id="iframedoc"></div>
<form action="index.php?option=<?php echo HIKASHOP_COMPONENT;
?>&amp;ctrl=category" method="post" 
name="adminForm" id="adminForm"
enctype="multipart/form-data">
	<table width="100%">
		<tr>
			<td class="key">
				<label for="file_name">
					<?php echo JText::_( 'HIKA_NAME' ); ?> (ALT)
				</label>
			</td>
			<td>
				<input type="text" name="data[file][file_name]"
value="<?php echo
$this->escape(@$this->element->file_name); ?>"/>
			</td>
		</tr>
		<tr>
			<td class="key">
				<label for="file_description">
					<?php echo JText::_( 'HIKA_TITLE' ); ?>
				</label>
			</td>
			<td>
				<input type="text"
name="data[file][file_description]" value="<?php echo
$this->escape(@$this->element->file_description);
?>"/>
			</td>
		</tr>
<?php
	if(empty($this->element->file_path)){
		$style = '';
		if(empty($_REQUEST['pathonly'])){
?>
		<tr>
			<td class="key">
				<label for="files"><?php
					echo JText::_('HIKA_FILE_MODE');
				?></label>
			</td>

			<td><?php
				$values = array(
					JHTML::_('select.option', 'upload',
JText::_('HIKA_FILE_MODE_UPLOAD')),
					JHTML::_('select.option', 'path',
JText::_('HIKA_FILE_MODE_PATH'))
				);
				echo JHTML::_('hikaselect.genericlist', $values,
"data[filemode]", 'class="custom-select"
size="1" onchange="hikashop_switchmode(this);"',
'value', 'text', 'upload');
			?>
			<script type="text/javascript">
			function hikashop_switchmode(el) {
				var d = document, v = el.value, modes =
['upload','path'], e = null;
				for(var i = 0; i < modes.length; i++) {
					mode = modes[i];
					e =
d.getElementById('hikashop_'+mode+'_section');
					if(!e) continue;
					if(v == mode) {
						e.style.display = '';
					} else {
						e.style.display = 'none';
					}
				}
			}
			</script>
			</td>
		</tr>
		<tr id="hikashop_upload_section">
			<td class="key">
				<label for="files"><?php
					echo JText::_( 'HIKA_IMAGE' );
				?></label>
			</td>
			<td>
				<input type="file" name="files[]"
size="30" />
				<?php echo
JText::sprintf('MAX_UPLOAD',(hikashop_bytes(ini_get('upload_max_filesize'))
> hikashop_bytes(ini_get('post_max_size'))) ?
ini_get('post_max_size') :
ini_get('upload_max_filesize')); ?>
			</td>
		</tr>
<?php
			$style = 'style="display:none;"';
		}else{
?>
		<tr id="hikashop_path_download">
			<td class="key">
				<label for="files"><?php
					echo JText::_('STORE_LOCALLY');
				?></label>
			</td>
			<td>
				<?php echo JHTML::_('hikaselect.booleanlist',
"data[download]" , '',1 ); ?>
				<input type="hidden" name="data[filemode]"
value="path"/>
			</td>
		</tr>
<?php
		}
?>
		<tr id="hikashop_path_section" <?php echo $style;
?>>
			<td class="key">
				<label for="files"><?php
					echo JText::_('HIKA_PATH');
				?></label>
			</td>
			<td>
				<input type="text" name="data[filepath]"
size="60" value=""/>
			</td>
		</tr>
<?php
	}else{
?>
		<tr>
			<td class="key">
				<label
focategory/tmpl/selectparentlisting.php000064400000012633151162050350014134
0ustar00name="id" value="<?php echo
hikaInput::get()->getInt('id');?>" />
	<input type="hidden" name="option"
value="<?php echo HIKASHOP_COMPONENT; ?>" />
	<input type="hidden" name="tmpl"
value="component" />
	<input type="hidden" name="task"
value="selectimage" />
	<input type="hidden" name="ctrl"
value="category" />
	<input type="hidden" name="pathonly"
value="<?php echo hikaInput::get()->getInt('pathonly',
0); ?>" />
<?php if(hikaInput::get()->getInt('legacy', 0)) { ?>
	<input type="hidden" name="legacy"
value="1" />
<?php } ?>
	<?php echo JHTML::_( 'form.token' ); ?>
</form>
category/tmpl/selectparentlisting.php000064400000012633151162050350014134
0ustar00<?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');
?><div class="iframedoc"
id="iframedoc"></div>
<?php if($this->config->get('category_explorer')){?>
<?php if(!HIKASHOP_BACK_RESPONSIVE) { ?>
<div id="page-product">
	<table style="width:100%">
		<tr>
			<td style="vertical-align:top;border:1px solid
#CCC;background-color: #F3F3F3" width="150px">
				<?php echo
hikashop_setExplorer('category&task=selectparentlisting&control='.$this->control,$this->pageInfo->filter->filter_id,true,$this->type);
?>
			</td>
			<td style="vertical-align:top;">
<?php } else { ?>
<div id="page-product" class="row-fluid">
	<div class="span4">
		<?php echo
hikashop_setExplorer('category&task=selectparentlisting&control='.$this->control,$this->pageInfo->filter->filter_id,true,$this->type);
?>
	</div>
	<div class="span8">
<?php } ?>
<?php } ?>
			<form action="index.php?option=<?php echo HIKASHOP_COMPONENT
?>&amp;ctrl=category" method="post" 
name="adminForm" id="adminForm">
				<table>
					<tr>
						<td width="100%">
							<a href="<?php echo
hikashop_completeLink('category&task=selectparentlisting&filter_id=0&control='.$this->control,true);
?>"><?php echo JText::_( 'ROOT' );
?>/</a>
							<?php echo $this->breadCrumb.'<br/>'.JText::_(
'FILTER' ); ?>:
							<input type="text" name="search"
id="search" value="<?php echo
$this->escape($this->pageInfo->search);?>"
class="text_area"
onchange="document.adminForm.submit();" />
							<button class="btn"
onclick="this.form.submit();"><?php echo JText::_(
'GO' ); ?></button>
							<button class="btn"
onclick="document.getElementById('search').value='';this.form.submit();"><?php
echo JText::_( 'RESET' ); ?></button>
						</td>
						<td nowrap="nowrap">
							<?php echo $this->childDisplay; ?>
						</td>
					</tr>
				</table>
				<table class="adminlist table table-striped table-hover"
cellpadding="1">
					<thead>
						<tr>
							<th class="title titlenum">
								<?php echo JText::_( 'HIKA_NUM' );?>
							</th>
							<th class="title titlebox">
								<?php echo JText::_('USE'); ?>
							</th>
							<th class="title">
								<?php echo JHTML::_('grid.sort',
JText::_('HIKA_NAME'), 'a.category_name',
$this->pageInfo->filter->order->dir,$this->pageInfo->filter->order->value,'selectparentlisting'
); ?>
							</th>
							<th class="title">
								<?php echo JText::_('SHOW_SUB_CATEGORIES'); ?>
							</th>
							<th class="title">
								<?php echo JHTML::_('grid.sort',   JText::_(
'ID' ), 'a.category_id',
$this->pageInfo->filter->order->dir,
$this->pageInfo->filter->order->value,'selectparentlisting'
); ?>
							</th>
						</tr>
					</thead>
					<tfoot>
						<tr>
							<td colspan="5">
								<?php echo $this->pagination->getListFooter(); ?>
								<?php echo $this->pagination->getResultsCounter(); ?>
							</td>
						</tr>
					</tfoot>
					<tbody>
						<?php
							$k = 0;
							for($i = 0,$a = count($this->rows);$i<$a;$i++){
								$row =& $this->rows[$i];
						?>
							<tr class="<?php echo "row$k"; ?>">
								<td align="center">
								<?php echo $this->pagination->getRowOffset($i); ?>
								</td>
								<td width="1%" align="center">
									<a href="#" onclick="changeParent(<?php echo
$row->category_id;?>,'<?php echo
str_replace("'","\'",$this->escape($row->category_name));?>');window.top.hikashop.closeBox();">
										<img src="<?php echo HIKASHOP_IMAGES;
?>add.png" alt="edit"/>
									</a>
								</td>
								<td>
									<a href="#" onclick="changeParent(<?php echo
$row->category_id;?>,'<?php echo
str_replace("'","\'",$this->escape($row->category_name));?>');window.top.hikashop.closeBox();">
										<?php echo $row->category_name; ?>
									</a>category/tmpl/selectstatus.php000064400000005334151162050350012574
0ustar00php echo HIKASHOP_COMPONENT; ?>" />
				<input type="hidden" name="task"
value="<?php echo JRequest::getCmd('task'); ?>"
/>
				<input type="hidden" name="ctrl"
value="<?php echo JRequest::getCmd('ctrl'); ?>"
/>
				<input type="hidden" name="boxchecked"
value="0" />
				<input type="hidden" name="tmpl"
value="component" />
				<input type="hidden" id="filter_id"
name="filter_id" value="<?php echo
$this->pageInfo->filter->filter_id; ?>" />
				<input type="hidden" name="filter_order"
value="<?php echo
$this->pageInfo->filter->order->value; ?>" />
				<input type="hidden" name="filter_order_Dir"
value="<?php echo $this->pageInfo->filter->order->dir;
?>" />
				<?php echo JHTML::_( 'form.token' ); ?>
			</form>
<?php if($this->config->get('category_explorer')){?>
<?php if(!HIKASHOP_BACK_RESPONSIVE) { ?>
			</td>
		</tr>
	</table>
</div>
<?php } else { ?>
	</div>
</div>
<?php } ?>
<?php } ?>
category/tmpl/selectstatus.php000064400000005334151162050350012574
0ustar00<?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');
?><script language="javascript"
type="text/javascript">
<!--
	var selectedContents = new Array();
	var allElements = <?php echo count($this->rows);?>;
	<?php
		foreach($this->rows as $oneRow){
			if(!empty($oneRow->selected)){
				echo
"selectedContents['".$oneRow->category_name."']
= 'content';";
			}
		}
	?>
	function applyContent(contentid,rowClass){
		if(selectedContents[contentid]){
			window.document.getElementById('content'+contentid).className
= rowClass;
			delete selectedContents[contentid];
		}else{
			window.document.getElementById('content'+contentid).className
= 'selectedrow';
			selectedContents[contentid] = 'content';
		}
	}
	function insertTag(){
		var tag = '';
		for(var i in selectedContents){
			if(selectedContents[i] == 'content'){
				allElements--;
				if(tag != '') tag += ',';
				tag = tag + i;
			}
		}
		window.parent.document.getElementById('<?php echo
$this->controlName; ?>').value = tag;
		window.pcategory/tmpl/translation.php000064400000007722151162050350012412
0ustar00ass="title titleid">
					<?php echo JText::_('ID'); ?>
				</th>
			</tr>
		</thead>
		<tbody>
			<?php
				$k = 0;
				foreach($this->rows as $row){
			?>
				<tr class="<?php echo empty($row->selected) ?
"row$k" : 'selectedrow'; ?>"
id="content<?php echo $row->category_name; ?>"
onclick="applyContent('<?php echo
$row->category_name."','row$k'"?>);"
style="cursor:pointer;">
					<td>
					<?php echo $row->category_name; ?>
					</td>
					<?php if($this->translated){?>
					<td>
					<?php echo @$row->translation; ?>
					</td>
					<?php }?>
					<td align="center">
						<?php echo $row->category_id; ?>
					</td>
				</tr>
			<?php
					$k = 1-$k;
				}
			?>
		</tbody>
	</table>
</form>
category/tmpl/translation.php000064400000007722151162050350012412
0ustar00<?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
if($this->config->get('multilang_display')=='popups'&&!empty($this->element->category_id)){
	echo '<div class="hikashop_multilang_buttons"
id="hikashop_multilang_buttons">';
	foreach($this->element->translations as $language_id =>
$translation){
		echo '<a class="modal" rel="{handler:
\'iframe\', size: {x: 760, y: 480}}"
href="'.hikashop_completeLink("category&task=edit_translation&category_id=".@$this->element->category_id.'&language_id='.$language_id,true
).'"><div
class="hikashop_multilang_button">'.$this->transHelper->getFlag($language_id).'</div></a>';
	}
	echo '</div>';
}
	echo $this->tabs->startPane('translations');
		echo
$this->tabs->startPanel(JText::_('MAIN_INFORMATION'),
'main_translation');
			$this->translation = false;
			$this->setLayout('normal');
			echo $this->loadTemplate();
			$this->translation = true;
		echo $this->tabs->endPanel();
		if($this->config->get('multilang_display')!='popups'
&& !empty($this->element->translations)){
			foreach($this->element->translations as $language_id =>
$translation){
				echo
$this->tabs->startPanel($this->transHelper->getFlag($language_id),
'translation_'.$language_id);
					$this->category_name_input =
"translation[category_name][".$language_id."]";
					$this->element->category_name =
@$translation->category_name->value;
					$this->editor->name =
'translation_category_description_'.$language_id;
					$this->element->category_description =
@$translation->category_description->value;
					if(isset($translation->category_name->published)){
						$this->category_name_published =
$translation->category_name->published;
						$this->category_name_id = $translation->category_name->id;
					}
					if(isset($translation->category_description->published)){
						$this->category_description_published =
$translation->category_description->published;
						$this->category_description_id =
$translation->category_description->id;
					}

					$this->category_meta_description_input =
"translation[category_meta_description][".$language_id."]";
					$this->element->category_meta_description =
@$translation->category_meta_description->value;
					if(isset($translation->category_meta_description->published)){
						$thicategory/view.html.php000064400000030755151162050350011017
0ustar00slation->category_keywords->id;
					}
					$this->category_alias_input =
"translation[category_alias][".$language_id."]";
					$this->element->category_alias =
@$translation->category_alias->value;
					if(isset($translation->category_alias->published)){
						$this->category_alias_published =
$translation->category_alias->published;
						$this->category_alias_id =
$translation->category_alias->id;
					}
					$this->category_canonical_input =
"translation[category_canonical][".$language_id."]";
					$this->element->category_canonical =
@$translation->category_canonical->value;
					if(isset($translation->category_canonical->published)){
						$this->category_canonical_published =
$translation->category_canonical->published;
						$this->category_canonical_id =
$translation->category_canonical->id;
					}
					$this->setLayout('normal');
					echo $this->loadTemplate();
				echo $this->tabs->endPanel();
			}
		}
	echo $this->tabs->endPane();
category/view.html.php000064400000030755151162050350011017
0ustar00<?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 CategoryViewCategory extends hikashopView
{
	var $type = '';
	var $ctrl= 'category';
	var $nameListing = 'HIKA_CATEGORIES';
	var $nameForm = 'HIKA_CATEGORIES';
	var $icon = 'categories';
	function display($tpl = null)
	{
		$this->paramBase =
HIKASHOP_COMPONENT.'.'.$this->getName();
		$function = $this->getLayout();
		if(method_exists($this,$function)) $this->$function();
		parent::display($tpl);
	}

	function listing(){
		$app = JFactory::getApplication();
		$pageInfo = new stdClass();
		$pageInfo->filter = new stdClass();
		$pageInfo->filter->order = new stdClass();
		$pageInfo->limit = new stdClass();

		$pageInfo->filter->order->value =
$app->getUserStateFromRequest(
$this->paramBase.".filter_order",
'filter_order',	'a.category_ordering','cmd'
);
		$pageInfo->filter->order->dir	=
$app->getUserStateFromRequest(
$this->paramBase.".filter_order_Dir",
'filter_order_Dir',	'asc',	'word' );
		if(JRequest::getVar('search')!=$app->getUserState($this->paramBase.".search")){
			$app->setUserState( $this->paramBase.'.limitstart',0);
			$pageInfo->limit->start = 0;
		}else{
			$pageInfo->limit->start = $app->getUserStateFromRequest(
$this->paramBase.'.limitstart', 'limitstart', 0,
'int' );
		}
		$pageInfo->search = $app->getUserStateFromRequest(
$this->paramBase.".search", 'search', '',
'string' );
		$pageInfo->search = JString::strtolower( $pageInfo->search );
		$pageInfo->limit->value = $app->getUserStateFromRequest(
$this->paramBase.'.list_limit', 'limit',
$app->getCfg('list_limit'), 'int' );

		$pageInfo->selectedType = $app->getUserStateFromRequest(
$this->paramBase.".filter_type",'filter_type',0,'int');
		$pageInfo->filter->filter_id = $app->getUserStateFromRequest(
$this->paramBase.".filter_id",'filter_id',0,'string');

		$database = JFactory::getDBO();

		$order = '';
		if(!empty($pageInfo->filter->order->value)){
			$order = ' ORDER BY
'.$pageInfo->filter->order->value.'
'.$pageInfo->filter->order->dir;
		}

		$config =& hikashop_config();
		$this->assignRef('config',$config);
		$category_image = $config->get('category_image',1);

		$class = hikashop_get('class.category');
		$type='';
		$categories = false;
		$category_id = $pageInfo->filter->filter_id;
		if(is_numeric($pageInfo->filter->filter_id)){
			$cat=$class->get($pageInfo->filter->filter_id);
			if(@$cat->category_type!='root'){
				$type = @$cat->category_type;
			}
		}else{
			$type = $pageInfo->filter->filter_id;
			$class->getMainElement($category_id);
		}
		if($pageInfo->selectedType){
			$childs =
$class->getChilds((int)$category_id,true,array(),'',0,0);
			$cat_ids = array();
			foreach($childs as $child){
				$cat_ids[$child->category_id]=$child->category_id;
			}
		}else{
			$cat_ids = array((int)$category_id);
		}
		$parent_cat_ids = array();
		if(!empty($cat_ids)){
			$parents =
$class->getParents($cat_ids,true,array(),'',0,0);
			if(!empty($parents)){
				foreach($parents as $parent){
					$parent_cat_ids[]=$parent->category_id;
				}
			}
		}
		$categories=array('originals'=>$cat_ids,'parents'=>$parent_cat_ids);
		$searchMap =
array('a.category_name','a.category_description','a.category_id');
		$fieldsClass = hikashop_get('class.field');
		$fields =
$fieldsClass->getData('backend_listing','category',false,$categories);
		$this->assignRef('fields',$fields);
		$this->assignRef('fieldsClass',$fieldsClass);
		foreach($fields as $field){
			$searchMap[]='a.'.$field->field_namekey;
		}
		$filters = array();
		if(!empty($pageInfo->search)){
			$searchVal =
'\'%'.hikashop_getEscaped($pageInfo->search,true).'%\'';
			$filters[] = implode(" LIKE $searchVal OR ",$searchMap)."
LIKE $searchVal";
		}
		if($type=='tax'||$type=='status'){
			$category_image = false;
		}
		$this->assignRef('type',$type);

		$rows =
$class->loadAllWithTrans($pageInfo->filter->filter_id,$pageInfo->selectedType,$filters,$order,$pageInfo->limit->start,$pageInfo->limit->value,$category_image);
		if(!empty($pageInfo->search)){
			$rows =
hikashop_search($pageInfo->search,$rows,'category_id');
		}
		$database->setQuery('SELECT COUNT(*)'.$class->query);
		$pageInfo->elements = new stdClass();
		$pageInfo->elements->total = $database->loadResult();
		$pageInfo->elements->page = count($rows);

		if($category_image){
			$image=hikashop_get('helper.image');
			$this->assignRef('image',$image);
		}

		$this->addHeader();
		$toggleClass = hikashop_get('helper.toggle');
		$this->assignRef('toggleClass',$toggleClass);
		$childClass = hikashop_get('type.childdisplay');
		$childDisplay = $childClass->display('filter_type',
$pageInfo->selectedType, false);
		$this->assignRef('childDisplay', $childDisplay);
		$breadcrumbClass = hikashop_get('type.breadcrumb');
		$breadCrumb =
$breadcrumbClass->display('filter_id',$pageInfo->filter->filter_id,$type);
		$this->assignRef('breadCrumb', $breadCrumb);
		$this->assignRef('rows',$rows);
		$this->assignRef('pageInfo',$pageInfo);
		$order = new stdClass();
		$order->ordering = false;
		$order->orderUp = 'orderup';
		$order->orderDown = 'orderdown';
		$order->reverse = false;
		if($pageInfo->filter->order->value ==
'a.category_ordering'){
			$order->ordering = true;
			if($pageInfo->filter->order->dir == 'desc'){
				$order->orderUp = 'orderdown';
				$order->orderDown = 'orderup';
				$order->reverse = true;
			}
		}
		$this->assignRef('order',$order);

		$this->assignRef('category_image',$category_image);
		$this->getPagination();
	}

	function addHeader(){
		hikashop_setTitle(JText::_($this->nameListing),$this->icon,$this->ctrl);
		$config =& hikashop_config();
		$manage =
hikashop_isAllowed($config->get('acl_category_manage','all'));
		$this->assignRef('manage',$manage);
		$importIcon = 'upload';
		if(HIKASHOP_J30) {
			$importIcon = 'import';
		}
		$this->toolbar = array(
			array('name' => 'custom', 'icon' =>
$importIcon, 'alt' => JText::_('REBUILD'),
'task' => 'rebuild', 'check' => false,
'display'=>$manage),
			array('name' => 'addNew', 'display'
=> $manage),
			array('name' => 'editList', 'display'
=> $manage),
			array('name' => 'deleteList', 'display'
=>
hikashop_isAllowed($config->get('acl_category_delete','all'))),
			'|',
			array('name' => 'pophelp', 'target'
=> $this->ctrl.'-listing'),
			'dashboard'
		);
	}

	function selectstatus(){
		$class = hikashop_get('class.category');
		$rows = $class->loadAllWithTrans('status');
		$selected =
JRequest::getVar('values','','','string');
		$selectedvalues = explode(',',$selected);
		$translated=false;
		if(!empty($rows)){
			foreach($rows as $id => $oneRow){
				if(in_array($oneRow->category_name,$selectedvalues)){
					$rows[$id]->selected = true;
				}
				if(isset($oneRow->translation)){
					$translated = true;
				}
			}
		}
		$this->assignRef('translated',$translated);
		$this->assignRef('rows',$rows);
		$controlName = JRequest::getString('control','');
		$this->assignRef('controlName',$controlName);
	}

	function selectparentlisting(){
		$this->paramBase .='_parent';
		$control = JRequest::getCmd('control');
		$id = JRequest::getCmd('id');
		$name = JRequest::getCmd('name');
		if(empty($id)){ $id='changeParent'; }
		if(!empty($control)){
			$js ='
			function changeParent(id,name){
				parent.document.getElementById("'.$id.'").innerHTML=
id+" "+name;
				parent.document.getElementById("'.$control.'selectparentlisting").value=id;
			}';
		}else{
			$js ='
			function changeParent(id,name){
				parent.document.getElementById("'.$id.'").innerHTML=
id+" "+name;
				var el = document.createElement("input");
				el.type = "hidden";
				el.name = "data[category][category_parent_id]";
				el.value = id;
				parent.document.getElementById("'.$id.'").appendChild(el);
			}';
		}
		$this->assignRef('control',$control);
		if (!HIKASHOP_PHP5) {
			$doc =& JFactory::getDocument();
		}else{
			$doc = JFactory::getDocument();
		}
		$doc->addScriptDeclaration( $js );
		$this->listing();
	}

	function form(){
		$popup = hikashop_get('helper.popup');
		$this->assignRef('popup', $popup);

		$category_id = hikashop_getCID('category_id');
		$class = hikashop_get('class.category');
		if(!empty($category_id)){
			$element = $class->get($category_id,true);
			$task='edit';
		}else{
			$element = JRequest::getVar('fail');
			if(empty($element)){
				$element = new stdClass();
				$element->category_published=1;
				$app = JFactory::getApplication();
				$filter_id = $app->getUserStateFromRequest(
$this->paramBase.".filter_id",'filter_id','','string');
				if(!is_numeric($filter_id)){
					$class->getMainElement($filter_id);
				}
				$element->category_parent_id=(int)$filter_id;
			}
			$task='add';
		}
		if(!empty($element->category_parent_id)){
			$parentData = $class->get($element->category_parent_id);
			$element->category_parent_name = $parentData->category_name;
			if(empty($element->category_type)&&$parentData->category_type!='root'){
				$element->category_type=$parentData->category_type;
			}
		}
		hikashop_setTitle(JText::_($this->nameForm),$this->icon,$this->ctrl.'&task='.$task.'&category_id='.$category_id);

		$this->toolbar = array(
			'save',
			array('name' => 'save2new', 'display'
=> version_compare(JVERSION,'1.7','>=')),
			'apply',
			'cancel',
			'|',
			array('name' => 'pophelp', 'target'
=> $this->ctrl.'-form')
		);

		$this->_addCustom($element);
		$this->assignRef('element',$element);

		$categoryType = hikashop_get('type.category');
		$this->assignRef('categoryType',$categoryType);
		$mainCategory = !empty($element->category_parent_id)?0:1;
		$this->assignRef('mainCategory',$mainCategory);
		JHTML::_('behavior.modal');
		$config =& hikashop_config();
		$translation = false;
		$transHelper = hikashop_get('helper.translation');
		if($transHelper && $transHelper->isMulti()){
			$translation = true;
			$transHelper->load('hikashop_category',@$element->category_id,$element);
			$this->assignRef('transHelper',$transHelper);
		}
		$multilang_display =
$config->get('multilang_display','tabs');
		if($multilang_display=='popups') $multilang_display =
'tabs';
		$tabs = hikashop_get('helper.tabs');
		$this->assignRef('tabs',$tabs);
		$this->assignRef('config',$config);
		$toggle=hikashop_get('helper.toggle');
		$this->assignRef('toggle',$toggle);
		$this->assignRef('translation',$translation);
		$editor = hikashop_get('helper.editor');
		$editor->name = 'category_description';
		$editor->content = @$element->category_description;
		$this->assignRef('editor',$editor);
		$productDisplayType = hikashop_get('type.productdisplay');
		$this->assignRef('productDisplayType',$productDisplayType);

		$category_image = $config->get('category_image',1);
		if($category_image){
			$image=hikashop_get('helper.image');
			$this->assignRef('image',$image);
		}
		if(!emptcharacteristic/index.html000064400000000032151162050350011522
0ustar00Multi()){
			$translationcharacteristic/tmpl/addcharacteristic.php000064400000003407151162050350014664
0ustar00characteristic/index.html000064400000000032151162050350011522
0ustar00<html><body></body></html>characteristic/tmpl/addcharacteristic.php000064400000003407151162050350014664
0ustar00<?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
characteristic/tmpl/editpopup.php000064400000002676151162050350013243
0ustar00/td>
			<td align="center">
				<a href="#" onclick="return
deleteRow('characteristic_div_<?php echo
$row->characteristic_id.'_'.$id;?>','characteristic[<?php
echo $row->characteristic_id;?>][<?php echo
$id;?>]','characteristic_<?php echo
$row->characteristic_id.'_'.$id;?>');"><img
src="<?php echo HIKASHOP_IMAGES;
?>delete.png"/></a>
			</td>
			<td width="1%" align="center">
				<?php echo $row->characteristic_id; ?>
				<div id="characteristic_div_<?php echo
$row->characteristic_id.'_'.$id;?>">
					<input type="hidden" name="characteristic[<?php
echo $row->characteristic_id;?>]"
id="characteristic[<?php echo
$row->characteristic_id;?>][<?php echo $id;?>]"
value="<?php echo $row->characteristic_id;?>"/>
				</div>
			</td>
		</tr>
	</tbody>
</table>
characteristic/tmpl/editpopup.php000064400000002676151162050350013243
0ustar00characteristic/tmpl/form.php000064400000004022151162050350012160
0ustar00ton>
	</div>
</fieldset>
<div class="iframedoc"
id="iframedoc"></div>
<form action="index.php?option=<?php echo HIKASHOP_COMPONENT
?>&amp;ctrl=characteristic" method="post" 
name="adminForm" id="adminForm">
	<?php
		$this->setLayout('form_item');
		echo $this->loadTemplate();
	?>
	<input type="hidden"
name="data[characteristic][characteristic_parent_id]"
value="<?php echo
JRequest::getInt('characteristic_parent_id',-1); ?>"
/>
	<input type="hidden" name="id" value="<?php
echo JRequest::getInt('id'); ?>" />
	<input type="hidden" name="cid[]"
value="<?php echo @$this->cid; ?>" />
	<input type="hidden" name="option"
value="<?php echo HIKASHOP_COMPONENT; ?>" />
	<input type="hidden" name="task"
value="<?php echo JRequest::getCmd('task'); ?>"
/>
	<input type="hidden" name="ctrl"
value="<?php echo JRequest::getCmd('ctrl'); ?>"
/>
	<input type="hidden" name="tmpl"
value="component" />
	<?php echo JHTML::_( 'form.token' ); ?>
</form>
characteristic/tmpl/form.php000064400000004022151162050350012160
0ustar00<?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');
?><div class="iframedoc"
id="iframedoc"></div>
<form action="index.php?option=<?php echo HIKASHOP_COMPONENT
?>&amp;ctrl=characteristic" method="post" 
name="adminForm" id="adminForm"
enctype="multipart/form-data">
<?php if(!HIKASHOP_BACK_RESPONSIVE) {
?>characteristic/tmpl/form_item.php000064400000001051151162050350013175
0ustar00emplate();
					?>
				</fieldset>
<?php if(!HIKASHOP_BACK_RESPONSIVE) { ?>
			</td>
		</tr>
	</table>
</div>
<?php } else { ?>
	</div>
</div>
<?php } ?>
	<div class="clr"></div>
	<input type="hidden" name="cid[]"
value="<?php echo @$this->element->characteristic_id;
?>" />
	<input type="hidden" name="option"
value="<?php echo HIKASHOP_COMPONENT; ?>" />
	<input type="hidden" name="task" value=""
/>
	<input type="hidden" name="ctrl"
value="characteristic" />
	<?php echo JHTML::_( 'form.token' ); ?>
</form>
characteristic/tmpl/form_value.php000064400000006162151162050350013363
0ustar00<?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 
						$this->characteristic_value_input =
"data[characteristic][characteristic_value]";
						if($this->translation){
							$this->setLayout('translation');
						}else{
							$this->setLayout('normal');
						}
						echo $this->loadTemplate();
					?>
characteristic/tmpl/form_value.php000064400000006162151162050350013363
0ustar00<?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');
?><div style="float:right">
	<?php
		echo $this->popup->display(
			'<img
src="'.HIKASHOP_IMAGES.'add.png"/>'.JText::_('ADD'),
			'ADD',
			
hikashop_completeLink("characteristic&task=editpopup&characteristic_parent_id=".@$this->element->characteristic_id,true
),
			'value_add_button',
			860, 480, '', '', 'button'
		);
	?>
</div>
<br/>
<table id="hikashop_characteristic_values_listing"
class="adminlist table table-striped table-hover"
cellpadding="1" width="100%">
	<thead>
		<tr>
			<th class="title titletoggle">
				<?php echo JText::_('HIKA_EDIT'); ?>
			</th>
			<th class="title">
				<?php echo JText::_('VALUE'); ?>
			</th>
			<th class="title titletoggle">
				<?php echo JText::_('ORDERING'); ?>
			</th>
			<th class="title titletoggle">
				<?php echo JText::_('HIKA_DELETE'); ?>
			</th>
			<th class="title">
				<?php echo JText::_('ID'); ?>
			</th>
		</tr>
	</thead>
	<tbody id="characteristic_listing">
		<?php
			if(!empty($this->element->values)){
				$k = 0;
				for($i = 0,$a = count($this->element->values);$i<$a;$i++){
					$row =& $this->element->values[$i];
					$id=rand();
					?>
					<tr id="characteristic_<?php echo
$row->characteristic_id.'_'.$id;?>">
						<td>
							<?php
								echo $this->popup->display(
									'<img src="'.
HIKASHOP_IMAGES.'edit.png"
alt="'.JText::_('HIKA_EDIT').'"characteristic/tmpl/index.html000064400000000032151162050350012476
0ustar00teristic_<?php echo
$row->characteristic/tmpl/listing.php000064400000007006151162050350012673
0ustar00characteristic/tmpl/index.html000064400000000032151162050350012476
0ustar00<html><body></body></html>characteristic/tmpl/listing.php000064400000007006151162050350012673
0ustar00<?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');
?><div class="iframedoc"
id="iframedoc"></div>
<form action="index.php?option=<?php echo HIKASHOP_COMPONENT
?>&amp;ctrl=characteristic" method="post" 
name="adminForm" id="adminForm">
	<table>
		<tr>
			<td width="100%">
				<?php echo JText::_( 'FILTER' ); ?>:
				<input type="text" name="search"
id="search" value="<?php echo
$this->escape($this->pageInfo->search);?>"
class="text_area" />
				<button class="btn"
onclick="this.form.submit();"><?php echo JText::_(
'GO' ); ?></button>
				<button class="btn"
onclick="document.getElementById('search').value='';this.form.submit();"><?php
echo JText::_( 'RESET' ); ?></button>
			</td>
		</tr>
	</table>
	<table id="hikashop_characteristic_listing"
class="adminlist table table-striped table-hover"
cellpadding="1">
		<thead>
			<tr>
				<th class="title titlenum">
					<?php echo JText::_( 'HIKA_NUM' );?>
				</th>
				<th class="title titlebox">
					<input type="checkbox" name="toggle"
value="" onclick="hikashop.checkAll(this);" />
				</th>
				<th class="title">
					<?php echo JHTML::_('grid.sort',
JText::_('HIKA_NAME'), 'a.characteristic_value',
$this->pageInfo->filter->order->dir,$this->pageInfo->filter->order->value
); ?>
				</th>
				<th class="title">
					<?php echo JHTML::_('grid.sort',
JText::_('HIKA_ALIAS'), 'a.characteristic_alias',
$this->pageInfo->filter->order->dir,$this->pageInfo->filter->order->value
); ?>
				</th>
				<th class="title">
					<?php echo JHTML::_('grid.sort',   JText::_(
'ID' ), 'a.characteristic_id',
$this->pageInfo->filter->order->dir,
$this->pageInfo->filter->order->value ); ?>
				</th>
			</tr>
		</thead>
		<tfoot>
			<tr>
				<td colspan="10">
					<?php echo $this->pagination->getListFooter(); ?>
					<?php echo
$this->paginatiocharacteristic/tmpl/normal.php000064400000002011151162050350012501
0ustar00en" name="option" value="<?php echo
HIKASHOP_COMPONENT; ?>" />
	<input type="hidden" name="task" value=""
/>
	<input type="hidden" name="ctrl"
value="<?php echo JRequest::getCmd('ctrl'); ?>"
/>
	<input type="hidden" name="boxchecked"
value="0" />
	<input type="hidden" name="filter_order"
value="<?php echo
$this->pageInfo->filter->order->value; ?>" />
	<input type="hidden" name="filter_order_Dir"
value="<?php echo $this->pageInfo->filter->order->dir;
?>" />
	<?php echo JHTML::_( 'form.token' ); ?>
</form>
charactercharacteristic/tmpl/selectcharacteristic.php000064400000007552151162050350015420
0ustar00="<?php echo
$this->characteristic_value_input;?>" value="<?php echo
$this->escape(@$this->element->characteristic_value); ?>"
/>
							<?php if(isset($this->characteristic_value_published)){
										$publishedid =
'published-'.$this->characteristic_value_id;
								?>
								<span id="<?php echo $publishedid; ?>"
class="spanloading"><?php echo
$this->toggle->toggle($publishedid,(int)
$this->characteristic_value_published,'translation')
?></span>
							<?php } ?>
						</td>
					</tr>

				</table>
characteristic/tmpl/selectcharacteristic.php000064400000007552151162050350015420
0ustar00<?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');
?><fieldset>
	<div class="toolbar" id="toolbar"
style="float: right;">
		<button class="btn" type="button"
onclick="if(document.adminForm.boxchecked.value==0){alert('<?php
echo JText::_( 'PLEASE_SELECT_SOMETHING',true );
?>');}else{submitbutton('usecharacteristic');}"><img
src="<?php echo HIKASHOP_IMAGES; ?>add.png"/><?php
echo JText::_('OK'); ?></button>
	</div>
</fieldset>
<div class="iframedoc"
id="iframedoc"></div>
<form action="index.php?option=<?php echo HIKASHOP_COMPONENT
?>&amp;ctrl=characteristic" method="post" 
name="adminForm" id="adminForm">
	<table>
		<tr>
			<td width="100%">
				<?php echo JText::_( 'FILTER' ); ?>:
				<input type="text" name="search"
id="search" value="<?php echo
$this->escape($this->pageInfo->search);?>"
class="text_area"
onchange="document.adminForm.submit();" />
				<button class="btn"
onclick="this.form.submit();"><?php echo JText::_(
'GO' ); ?></button>
				<button class="btn"
onclick="document.getElementById('search').value='';this.form.submit();"><?php
echo JText::_( 'RESET' ); ?></button>
			</td>
		</tr>
	</table>
	<table class="adminlist table table-striped table-hover"
cellpadding="1">
		<thead>
			<tr>
				<th class="title titlenum">
					<?php echo JText::_( 'HIKA_NUM' );?>
				</th>
				<th class="title titlebox">
					<input type="checkbox" name="toggle"
value="" onclick="hikashop.checkAll(this);" />
				</th>
				<th class="title">
					<?php echo JHTML::_('grid.sort',
JText::_('HIKA_NAME'), 'a.characteristic_value',
$this->pageInfo->filter->order->dir,$this->pageInfo->filter->order->value
,'selectcharacteristic'); ?>
				</th>
				<th class="title">
					<?php echo JHTML::_('grid.sort',
JText::_('HIKA_ALIAS'), 'a.characteristic_alias',
$this->pageInfo->filter->order->dir,$this->pageInfo->filter->order->value
,'selectcharacteristic'); ?>
				</th>
				<th class="title">
					<?php echo JHTML::_('grid.sort',   JText::_(
'ID' ), 'a.characteristic_id',
$this->pageInfo->filter->order->dir,
$this->pageInfo->filter->order->value
,'selectcharacteristic'); ?>
				</th>
			</tr>
		</thead>
		<tfoot>
			<tr>
				<td
colspacharacteristic/tmpl/translation.php000064400000002446151162050350013563
0ustar00bel for="cb<?php echo $i;?>"><?php echo
$row->characteristic_alias; ?></label>
					</td>
					<td width="1%" align="center">
						<?php echo $row->characteristic_id; ?>
					</td>
				</tr>
			<?php
					$k = 1-$k;
				}
			?>
		</tbody>
	</table>
	<input type="hidden" name="option"
value="<?php echo HIKASHOP_COMPONENT; ?>" />
	<input type="hidden" name="task"
value="selectcharacteristic" />
	<input type="hidden" name="tmpl"
value="component" />
	<input type="hidden" name="ctrl"
value="<?php echo JRequest::getCmd('ctrl'); ?>"
/>
	<input type="hidden" name="boxchecked"
value="0" />
	<input type="hidden" name="filter_order"
value="<?php echo
$this->pageInfo->filter->order->value; ?>" />
	<input type="hidden" name="filter_order_Dir"
value="<?php echo $this->pageInfo->filter->order->dir;
?>" />
	<?php echo JHTML::_( 'form.token' ); ?>
</form>
characteristic/tmpl/translation.php000064400000002446151162050350013563
0ustar00characteristic/tmpl/usecharacteristic.php000064400000005044151162050350014727
0ustar00
		if(!empty($this->element->translations)){
			foreach($this->element->translations as $language_id =>
$translation){
				echo
$this->tabs->startPanel($this->transHelper->getFlag($language_id),
'translation_'.$language_id);	
					$this->characteristic_value_input =
"translation[characteristic_value][".$language_id."]";
					$this->element->characteristic_value =
@$translation->characteristic_value->value;
					if(isset($translation->characteristic_value->published)){
						$this->characteristic_value_published =
$translation->characteristic_value->published;
						$this->characteristic_value_id =
$translation->characteristic_value->id;
					}
					$this->setLayout('normal');
					echo $this->loadTemplate();
				echo $this->tabs->endPanel();
			}
		}
	echo $this->tabs->endPane();
characteristic/tmpl/usecharacteristic.php000064400000005044151162050350014727
0ustar00<?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');
?><table class="adminlist table table-striped table-hover"
cellpadding="1" width="100%">
	<tbody id="result">
		<?php
			if(!empty($this->rows)){
				$k = 0;
				for($i = 0,$a = count($this->rows);$i<$a;$i++){
					$row =& $this->rows[$i];
					$id = rand();
					?>
					<tr id="characteristic_<?php echo
$row->characteristic_id.'_'.$id;?>">
						<td>
							<?php echo $row->characteristic_value; ?>
						</td>
						<td>
							<div id="characteristic_default_div_<?php echo
$row->characteristic_id.'_'.$id;?>">
							<?php echo
$this->characteristicHelper->display('characteristic_default['.$row->characteristic_id.']',@$row->default_id,@$row->values,'characteristic_default_'.$row->characteristic_id.'_'.$id);
?>
							</div>
						</td>
						<td
class="ordecharacteristic/view.html.php000064400000023656151162050350012174
0ustar00OP_IMAGES; ?>delete.png"/>
							</a>
						</td>
						<td width="1%" align="center">
							<?php echo $row->characteristic_id; ?>
							<div id="characteristic_div_<?php echo
$row->characteristic_id.'_'.$id;?>">
								<input type="hidden"
name="characteristic[<?php echo
$row->characteristic_id;?>]" id="characteristic[<?php
echo $row->characteristic_id;?>][<?php echo $id?>]"
value="<?php echo $row->characteristic_id;?>"/>
							</div>
						</td>
					</tr>
					<?php
					$k = 1-$k;
				}
			}
		?>
	</tbody>
</table>
characteristic/view.html.php000064400000023656151162050350012174
0ustar00<?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 CharacteristicViewCharacteristic extends hikashopView{
	var $ctrl= 'characteristic';
	var $nameListing = 'CHARACTERISTICS';
	var $nameForm = 'CHARACTERISTICS';
	var $icon = 'characteristic';
	function display($tpl = null)
	{
		$this->paramBase =
HIKASHOP_COMPONENT.'.'.$this->getName();
		$function = $this->getLayout();
		if(method_exists($this,$function)) $this->$function();
		parent::display($tpl);
	}

	function listing(){
		$app = JFactory::getApplication();
		$pageInfo = new stdClass();
		$pageInfo->filter = new stdClass();
		$pageInfo->filter->order = new stdClass();
		$pageInfo->limit = new stdClass();
		$pageInfo->filter->order->value =
$app->getUserStateFromRequest(
$this->paramBase.".filter_order",
'filter_order',	'a.characteristic_id','cmd'
);
		$pageInfo->filter->order->dir	=
$app->getUserStateFromRequest(
$this->paramBase.".filter_order_Dir",
'filter_order_Dir',	'asc',	'word' );
		$pageInfo->search = $app->getUserStateFromRequest(
$this->paramBase.".search", 'search', '',
'string' );
		$pageInfo->search = JString::strtolower( $pageInfo->search );
		$pageInfo->limit->value = $app->getUserStateFromRequest(
$this->paramBase.'.list_limit', 'limit',
$app->getCfg('list_limit'), 'int' );
		$pageInfo->limit->start = $app->getUserStateFromRequest(
$this->paramBase.'.limitstart', 'limitstart', 0,
'int' );
		$database	= JFactory::getDBO();
		$searchMap =
array('a.characteristic_value','a.characteristic_alias','a.characteristic_id');
		$filters = array('a.characteristic_parent_id=0');
		if(!empty($pageInfo->search)){
			$searchVal =
'\'%'.hikashop_getEscaped($pageInfo->search,true).'%\'';
			$filters[] = implode(" LIKE $searchVal OR ",$searchMap)."
LIKE $searchVal";
		}

		$query = ' FROM
'.hikashop_table('characteristic').' AS a';
		if(!empty($filters)){
			$query.= ' WHERE ('.implode(') AND
(',$filters).')';
		}
		if(!empty($pageInfo->filter->order->value)){
			$query .= ' ORDER BY
'.$pageInfo->filter->order->value.'
'.$pageInfo->filter->order->dir;
		}
		$database->setQuery('SELECT
a.*'.$query,$pageInfo->limit->start,$pageInfo->limit->value);
		$rows = $database->loadObjectList();
		if(!empty($pageInfo->search)){
			$rows =
hikashop_search($pageInfo->search,$rows,'characteristic_id');
		}
		$database->setQuery('SELECT count(*)'.$query);
		$pageInfo->elements = new stdClass();
		$pageInfo->elements->total = $database->loadResult();
		$pageInfo->elements->page = count($rows);

		hikashop_setTitle(JText::_($this->nameListing),$this->icon,$this->ctrl);

		$config =& hikashop_config();
		$manage =
hikashop_isAllowed($config->get('acl_characteristic_manage','all'));
		$this->assignRef('manage',$manage);

		$this->toolbar = array(
			array('name' => 'addNew', 'display'
=> $manage),
			array('name' => 'editList', 'display'
=> $manage),
			array('name' => 'deleteList', 'display'
=>
hikashop_isAllowed($config->get('acl_characteristic_view','all'))),
			'|',
			array('name' => 'pophelp', 'target'
=> $this->ctrl.'-listing'),
			'dashboard'
		);

		$this->assignRef('rows',$rows);
		$this->assignRef('pageInfo',$pageInfo);
		$this->getPagination();
	}

	function form(){
		$characteristic_id = $this->editpopup();
		if(!empty($characteristic_id)){
			$task='edit';
		}else{
			$task='add';
		}
		hikashop_setTitle(JText::_($this->nameForm),$this->icon,$this->ctrl.'&task='.$task.'&characteristic_id='.$characteristic_id);

		$this->toolbar = array(
			'save',
			array('name' => 'save2new', 'display'
=> version_compare(JVERSION,'1.7','>=')),
			'apply',
			'cancel',
			'|',
			array('name' => 'pophelp', 'target'
=> $this->ctrl.'-form')
		);

		$popup = hikashop_get('helper.popup');
		$this->assignRef('popup', $popup);

	}

	function editpopup(){
		$characteristic_id = hikashop_getCID('characteristic_id');
		$class = hikashop_get('class.characteristic');
		if(!empty($characteristic_id)){
			$element = $class->get($characteristic_id,true);
			if($element && empty($element->characteristic_parent_id)){
				$database	= JFactory::getDBO();
				$config =& hikashop_config();
				$sort = $config->get('characteristics_values_sorting');
				if($sort=='old'){
					$order = 'characteristic_id ASC';
				}elseif($sort=='alias'){
					$order = 'characteristic_alias ASC';
				}elseif($sort=='ordering'){
					$order = 'characteristic_ordering ASC';
				}else{
					$order = 'characteristic_value ASC';
				}
				$query = 'SELECT * FROM
'.hikashop_table('characteristic').' WHERE
characteristic_parent_id = '.$characteristic_id.' ORDER BY
'.$order;
				$database->setQuery($query);
				$element->values = $database->loadObjectList();
			}
		}else{
			$element = JRequest::getVar('fail');
			if(empty($element)){
				$element = new stdClass();
			}
		}

		$this->assignRef('element',$element);
		jimport('joomla.html.pane');
		$config =& hikashop_config();
		$multilang_display=$config->get('multilang_display','tabs');
		if($multilang_display=='popups') $multilang_display =
'tabs';
		$tabs = hikashop_get('helper.tabs');
		$this->assignRef('tabs',$tabs);
		$translation = false;
		$transHelper = hikashop_get('helper.translation');
		if($transHelper && $transHelper->isMulti()){
			$translation = true;
			$transHelper->load('hikashop_characteristic',@$element->characteristic_id,$element);
			$this->assignRef('transHelper',$transHelper);
		}
		$js = '
		function deleteRow(divName,inputName,rowName){
			var d = document.getElementById(divName);
			var olddiv = document.getElementById(inputName);
			if(d && olddiv){
				d.removeChild(olddiv);
				document.getElementById(rowName).style.display=\'none\';
			}
			return false;
		}
		';
		$doc = JFactory::getDocument();
		$doc->addScriptDeclaration( $js );
		$this->assignRef('cid',$characteristic_id);
		$this->assignRef('translation',$translation);
		$toggle=hikashop_get('helper.toggle');
		$this->assignRef('toggle',$toggle);
		return $characteristic_id;
	}

	function addcharacteristic(){
		$element = JRequest::getInt( 'cid');
		$rows = array();
		if(!empty($element)){
			$database	= JFactory::getDBO();
			$query = 'SELECT * FROM
'.hikashop_table('characteristic').' WHERE
characteristic_id ='.$element;
			$database->setQuery($query);
			$rows = $database->loadObjectList();
			$document=& JFactory::getDocument();
			$id = JRequest::getInt('id');
			$js = "window.addEvent('domready', function() {
					window.top.deleteRow('characteristic_div_".$rows[0]->characteristic_id.'_'.$id."','characteristic[".$rows[0]->characteristic_id."][".$id."]','characteristic_".$rows[0]->characteristic_id.'_'.$id."');
					var dstTable =
window.top.document.getElementById('characteristic_listing');
					var srcTable = document.getElementById('result');
					for (var c = 0,m=srcTable.rows.length;c<m;c++){
						var rowData = srcTable.rows[c].cloneNode(true);
						dstTable.appendChild(rowData);
					}
					window.parent.hikashop.closeBox();
			});";
			$document->addScriptDeclaration($js);
		}
		$this->assignRef('rows',$rows);
		$image=hikashop_get('helper.image');
		$this->assignRef('image',$image);
		$popup = hikashop_get('helper.popup');
		$this->assignRef('popup', $popup);
	}

	function selectcharacteristic(){
		$this->listing();
	}

	function usecharacteristic(){
		$characteristics = JRequest::getVar( 'cid', array(),
'', 'array' );
		$rows = array();
		$js="window.top.hikashop.closeBox();";
		if(!empty($characteristics)){
			JArrayHelper::toInteger($characteristics);
			$database	= JFactory::getDBO();
			$query = 'SELECT * FROM
'.hikashop_table('characteristic').' WHERE
characteristic_id IN
('.implode(',',$characteristics).') OR
characteristic_parent_id IN
('.implode(',',$characteristics).') ORDER BY
characteristic_ordering ASC, characteristic_value ASC';
			$database->setQuery($query);
			$rows = $database->loadObjectList();
			if(!empty($rows)){
				$unsetList = array();
				foreach($rows as $key => $characteristic){
					if(!empty($characteristic->characteristic_parent_id)){
						$unsetList[]=$key;
						foreach($rows as $key2 => $characteristic2){
							if($characteristic->characteristic_parent_id==$characteristic2->characteristic_id){
								$rows[$key2]->values[$characteristic->characteristic_choose/index.html000064400000000032151162050350010012
0ustar00ikashop-field-form.html';
choose/tmpl/filters.php000064400000005214151162050350011161
0ustar00choose/index.html000064400000000032151162050350010012
0ustar00<html><body></body></html>choose/tmpl/filters.php000064400000005214151162050350011161
0ustar00<?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');
?><script language="javascript"
type="text/javascript">
<!--
	var selectedContents = new Array();
	var allElements = <?php echo count($this->rows);?>;
	<?php
		foreach($this->rows as $oneRow){
			if(!empty($oneRow->selected)){
				echo
"selectedContents['".$oneRow->filter_namekey."']
= 'content';";
			}
		}
	?>
	function applyContent(contentid,rowClass){
		if(selectedContents[contentid]){
			window.document.getElementById('content'+contentid).className
= rowClass;
			delete selectedContents[contentid];
		}else{
			window.document.getElementById('content'+contentid).className
= 'selectedrow';
			selectedContents[contentid] = 'content';
		}
	}
	function insertTag(){
		var tag = '';
		for(var i in selectedContents){
			if(selectedContents[i] == 'content'){
				allElements--;
				if(tag != '') tag += ',';
				tag = tag + i;
			}
		}
		window.top.documenchoose/tmpl/index.html000064400000000032151162050350010766
0ustar00p echo 'Filter'; ?>
				<choose/tmpl/searchfields.php000064400000005162151162050350012147
0ustar00choose/tmpl/index.html000064400000000032151162050350010766
0ustar00<html><body></body></html>choose/tmpl/searchfields.php000064400000005162151162050350012147
0ustar00<?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');
?><script language="javascript"
type="text/javascript">
<!--
	var selectedContents = new Array();
	var allElements = <?php echo count($this->rows);?>;
	<?php
		foreach($this->rows as $oneRow){
			if(!empty($oneRow->selected)){
				echo
"selectedContents['".$oneRow->namekey."'] =
'content';";
			}
		}
	?>
	function applyContent(contentid,rowClass){
		if(selectedContents[contentid]){
			window.document.getElementById('content'+contentid).className
= rowClass;
			delete selectedContents[contentid];
		}else{
			window.document.getElementById('content'+contentid).className
= 'selectedrow';
			selectedContents[contentid] = 'content';
		}
	}
	function insertTag(){
		var tag = '';
		for(var i in selectedContents){
			if(selectedContents[i] == 'content'){
				allElements--;
				if(tag != '') tag += ',';
				tag = tag + i;
			}
		}
	choose/view.html.php000064400000003505151162050350010453 0ustar00ho
'Field'; ?>
				</th>
				<th class="title titleid">
					<?php echo JText::_('ID'); ?>
				</th>
			</tr>
		</thead>
		<tbody>
			<?php
				$k = 0;
				foreach($this->rows as $i => $row){
			?>
				<tr class="<?php echo empty($row->selected) ?
"row$k" : 'selectedrow'; ?>"
id="content<?php echo $row->namekey; ?>"
onclick="applyContent('<?php echo
$row->namekey."','row$k'"?>);"
style="cursor:pointer;">
					<td>
					<?php echo $row->namekey; ?>
					</td>
					<td align="center">
						<?php echo $i; ?>
					</td>
				</tr>
			<?php
					$k = 1-$k;
				}
			?>
		</tbody>
	</table>
</form>
choose/view.html.php000064400000003505151162050350010453 0ustar00<?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 chooseViewchoose extends
hikashopVieconfig/index.html000064400000000032151162050350007777
0ustar00($oneRow,$selectedvalues))config/tmpl/acl.php000064400000007062151162050350010240
0ustar00config/index.html000064400000000032151162050350007777
0ustar00<html><body></body></html>config/tmpl/acl.php000064400000007062151162050350010240
0ustar00<?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');
?><div id="page-acl">
<table class="admintable" cellspacing="1">
	<tr>
		<td class="key" >
			<?php echo JText::_('INHERIT_PARENT_GROUP_ACCESS'); ?>
		</td>
		<td>
			<?php echo JHTML::_('hikaselect.booleanlist',
"config[inherit_parent_group_access]" , '',
$this->config->get('inherit_parent_group_access')); ?>
		</td>
	</tr>
</table>
<br style="font-size:1px;" />
	<table class="admintable table"
cellspacing="1">
		<?php
		$acltable = hikashop_get('type.acltable');
		$aclcats = array();
		$acltrans = array();
		$aclcats['badge'] =
array('view','manage','delete');
		$aclcats['banner'] =
array('view','manage','delete');
		$aclcats['category'] =
array('view','manage','delete');
		$aclcats['characteristic'] =
array('view','manage','delete');
		$acltrans['characteristic'] = 'characteristics';
		$aclcats['config'] =
array('view','manage');
		$acltrans['config'] = 'hika_configuration';
		$aclcats['currency'] =
array('view','manage','delete');
		$aclcats['dashboard'] =
array('view','manage','delete');
		$acltrans['dashboard'] = 'hikashop_cpanel';
		$aclcats['discount'] =
array('view','manage','delete');
		$aclcats['email'] =
array('view','manage','delete');
		$aclcats['entry'] =
array('view','manage','delete');
		$acltrans['entry'] = 'hikashop_entry';
		$aclcats['field'] =
array('view','manage','delete');
		$aclcats['filter'] =
array('view','manage','delete');
		$aclcats['forum'] = array('view');
		$aclcats['documentation'] = array('view');
		$acltrans['documentation'] = 'help';
		$aclcats['import'] = array('view');
		$aclcats['limit'] =
array('view','manage','delete');
		$aclcats['massaction'] =
array('view','manage','delete');
		$aclcats['menus'] =
array('view','manage','delete');
		$aclcats['modules'] =
array('view','manage','delete');
		$aclcats['order'] =
aconfig/tmpl/advanced.php000064400000022736151162050350011253
0ustar00	if(!empty($acltrans[$category])){
					 $trans = JText::_(strtoupper($acltrans[$category]));
					 if($trans == strtoupper($acltrans[$category])){
					 	$trans = '';
					 }
				}
				if(empty($trans)) $trans =
JText::_('HIKA_'.strtoupper($category));
				if($trans == 'HIKA_'.strtoupper($category)) $trans =
JText::_(strtoupper($category));

				echo $trans;
				?>
<?php if(!HIKASHOP_BACK_RESPONSIVE) { ?>
			</td>
			<td>
<?php } ?>
				<?php echo $acltable->display($category,$actions)?>
			</td>
		</tr>
		<?php } ?>
	</table>
</div>
config/tmpl/advanced.php000064400000022736151162050350011253
0ustar00<?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
echo $this->leftmenu(
	'advanced',
	array(
		'#advanced_advanced' =>
JText::_('HIKA_ADVANCED_SETTINGS'),
		'#advanced_legacy' =>
JText::_('HIKASHOP_LEGACY_SETTINGS')
	)
);
?>
<div id="page-advanced" class="rightconfig-container
<?php if(HIKASHOP_BACK_RESPONSIVE) echo
'rightconfig-container-j30';?>">

<!-- Advanced -->
<div id="advanced_advanced"
class="hikashop_backend_tile_edition">
	<div class="hikashop_tile_block"><div>
		<div class="hikashop_tile_title"><?php echo
JText::_('HIKA_ADVANCED_SETTINGS'); ?></div>
<table class="hk_config_table table"
style="width:100%">

	<tr>
		<td class="hk_tbl_key"<?php echo
$this->docTip('display_view_files');?>><?php echo
JText::_('DISPLAY_VIEW_FILES'); ?></td>
		<td><?php
		$arr = array(
			JHTML::_('select.option', '0',
JText::_('HIKASHOP_NO') ),
			JHTML::_('select.option', '1', 
JText::_('DISPLAY_FRONTCOMP') ),
			JHTML::_('select.option', '2', 
JText::_('HIKA_ALL') ),
		);
		echo JHTML::_('hikaselect.genericlist', $arr,
"config[display_view_files]" ,
'class="custom-select"', 'value',
'text',$this->config->get('display_view_files',
0) );?></td>
	</tr>
	<tr>
		<td class="hk_tbl_key"<?php echo
$this->docTip('cart_retaining_period');?>><?php echo
JText::_('CART_RETAINING_PERIOD'); ?></td>
		<td><?php
			echo
$this->delayTypeRetaining->display('config[cart_retaining_period]',
$this->config->get('cart_retaining_period', 2592000));
		?></td>
	</tr>
	<tr>
		<td class="hk_tbl_key"<?php echo
$this->docTip('cart_retaining_period_check_frequency');?>><?php
echo JText::_('CART_RETAINING_PERIOD_CHECK_FREQUENCY');
?></td>
		<td><?php
			echo
$this->delayTypeCarts->display('config[cart_retaining_period_check_frequency]',
$this->config->get('cart_retaining_period_check_frequency',
86400));
			?><br/><?php
			echo JText::sprintf('LAST_CHECK',
hikashop_getDate($this->config->get('cart_retaining_period_checked')));
		?></td>
	</tr>
	<tr>
		<td class="hk_tbl_key"<?php echo
$this->docTip('use_trash');?>><?php echo
JText::_('HIKA_USE_TRASH'); ?></td>
		<td><?php
			echo JHTML::_('hikaselect.booleanlist',
'config[use_trash]', '',
$this->config->get('use_trash', 0));
		?></td>
	</tr>
	<tr>
		<td class="hk_tbl_key"<?php echo
$this->docTip('volume_symbols');?>><?php echo
JText::_('DIMENSION_SYMBOLS'); ?></td>
		<td>
			<input class="inputbox" type="text"
name="config[volume_symbols]" value="<?php echo
$this->config->get('volume_symbols'); ?>">
		</td>
	</tr>
	<tr>
		<td class="hk_tbl_key"<?php echo
$this->docTip('weight_symbols');?>><?php echo
JText::_('WEIGHT_SYMBOLS'); ?></td>
		<td>
			<input class="inputbox" type="text"
name="config[weight_symbols]" value="<?php echo
$this->config->get('weight_symbols'); ?>">
		</td>
	</tr>
	<tr>
		<td class="hk_tbl_key"<?php echo
$this->docTip('editor');?>><?php echo
JText::_('HIKA_EDITOR'); ?></td>
		<td><?php
			echo $this->editorType->display('config[editor]',
$this->config->get('editor'));
		?></td>
	</tr>
	<tr>
		<td class="hk_tbl_key"<?php echo
$this->docTip('description_format');?>><?php echo
JText::_('DESCRIPTION_DEFAULT_FORMAT'); ?></td>
		<td><?php
			echo
$this->contentparserType->display('config[default_description_type]',
$this->config->get('default_description_type'));
		?></td>
	</tr>
	<tr>
		<td class="hk_tbl_key"<?php echo
$this->docTip('readmore');?>><?php echo
JText::_('READ_MORE'); ?></td>
		<td><?php
			echo JHTML::_('hikaselect.booleanlist',
"config[readmore]",'',$this->config->get('readmore'));
		?></td>
	</tr>
	<tr>
		<td class="hk_tbl_key"<?php echo
$this->docTip('deactivate_buffering_and_compression');?>><?php
echo JText::_('DEACTIVATE_BUFFERING_AND_COMPRESSION');
?></td>
		<td><?php
			echo JHTML::_('hikaselect.booleanlist',
'config[deactivate_buffering_and_compression]','',$this->config->get('deactivate_buffering_and_compression',0));
		?></td>
	</tr>
	<tr>
		<td class="hk_tbl_key"<?php echo
$this->docTip('redirect_post');?>><?php echo
JText::_('REDIRECT_POST_MODE'); ?></td>
		<td><?php
			echo JHTML::_('hikaselect.booleanlist',
'config[redirect_post]','',$this->config->get('redirect_post',0));
		?></td>
	</tr>
	<tr>
		<td class="hk_tbl_key"<?php echo
$this->docTip('partner_id');?>><?php echo
JText::_('AFFILIATE');?></td>
		<td>
			<input name="config[partner_id]" type="text"
value="<?php echo
$this->config->get('partner_id')?>" />
		</td>
	</tr>
<?php
?>

</table>
	</div></div>
</div>

<!-- MAIN - LEGACY -->
<div id="advanced_legacy"
class="hikashop_backend_tile_edition">
	<div class="hikashop_tile_block"><div>
		<div class="hikashop_tile_title"><?php echo
JText::_('HIKASHOP_LEGACY_SETTINGS'); ?></div>
<table class="hk_config_table table"
style="width:100%">

	<tr>
		<td class="hk_tbl_key"<?php echo
$this->docTip('bootstrap_design');?>><?php echo
JText::_('USE_BOOTSTRAP_ON_FRONT'); ?></td>
		<td><?php
			echo JHtml::_('hikaselect.booleanlist',
'config[bootstrap_design]', '',
$this->config->get('bootstrap_design', HIKASHOP_J30));
		?></td>
	</tr>
	<tr>
		<td class="hk_tbl_key"<?php echo
$this->docTip('variant_default_publish');?>><?php
echo JText::_('DEFAULT_VARIANT_PUBLISH'); ?></td>
		<td><?php
			echo JHTML::_('hikaselect.booleanlist',
"config[variant_default_publish]" , '',
$this->config->get('variant_default_publish', 1));
		?></td>
	</tr>
	<tr>
		<td class="hk_tbl_key"<?php echo
$this->docTip('dashboard_legacy_mode');?>><?php echo
JText::_('DASHBOARD_LEGACY'); ?></td>
		<td><?php
			echo JHTML::_('hikaselect.booleanlist',
'config[legacy_widgets]', '',
$this->config->get('legacy_widgets', 1));
		?></td>
	</tr>
	<tr>
		<td class="hk_tbl_key"<?php echo
$this->docTip('carousel_legacy_mode');?>><?php echo
JText::_('CAROUSEL_LEGACY'); ?></td>
		<td><?php
			echo JHTML::_('hikaselect.booleanlist',
'config[carousel_legacy]', '',
$this->config->get('carousel_legacy', 1));
		?></td>
	</tr>
<?php if($this->config->get('server_current_url_mode',
'0') != '0'){ ?>
	<tr>
		<td class="hk_tbl_key"<?php echo
$this->docTip('server_current_url_mode');?>><?php
echo JText::_('SERVER_CURRENT_URL_MODE'); ?></td>
		<td><?php
		$arr = array(
			JHTML::_('select.option', '0',
JText::_('HIKA_AUTOMATIC') ),
			JHTML::_('select.option', 'REDIRECT_URL', 
JText::_('REDIRECT_URL') ),
			JHTML::_('select.option', 'REQUEST_URI', 
JText::_('REQUEST_URI') ),
		);
		echo JHTML::_('hikaselect.genericlist', $arr,
"config[server_current_url_mode]" ,
'class="custom-select"', 'value',
'text',$this->config->get('server_current_url_mode','0')
);?></td>
	</tr>
<?php } ?>
<?php if($this->config->get('checkout_legacy', 0)){
?>
	<tr>
		<td colspan="2"><h4><?php echo
JText::_('CHECKOUT_LEGACY_MODE'); ?></h4></td>
	</tr>
	<tr>
		<td class="hk_tbl_key"<?php echo
$this->docTip('auto_select_default');?>><?php echo
JText::_('AUTO_SELECT_DEFAULT_SHIPPING_AND_PAYMENT');
?></td>
		<td><?php
			echo
$this->auto_select->display('config[auto_select_default]',
$this->config->get('auto_select_default',2));
		?></td>
	</tr>
	<tr>
		<td class="hk_tbl_key"<?php echo
$this->docTip('auto_submit_methods');?>><?php echo
JText::_('AUTO_SUBMIT_SHIPPING_AND_PAYMENT_SELECTION');
?></td>
		<td><?php
			echo JHTML::_('hikaselect.booleanlist',
'config[auto_submit_methods]', '',
$this->config->get('auto_submit_methods', 1));
		?></td>
	</tr>
	<tr>
		<td class="hk_tbl_key"<?php echo
$this->docTip('store_open_hour');?>><?php echo
JText::_('BUSINESS_HOURS'); ?></td>
		<td><?php
	if(hikashop_level(1)) {
		$hours = array();
		for($i = 0; $i < 24; $i++) $hours[] =
JHTML::_('select.option', $i, $i);
		$minutes = array();
		for($i = 0; $i < 60; $i++) $minutes[] =
JHTML::_('select.option', $i,$i);
		echo JText::_('OPENS_AT');
		echo JHTML::_('select.genericlist', $hours,
'config[store_open_hour]', 'class="custom-select"
size="1"', 'value', 'text',
$this->conficonfig/tmpl/affiliate.php000064400000014426151162050350011427
0ustar00[store_close_minute]', 'class="custom-select"
size="1"', 'value', 'text',
$this->config->get('store_close_minute', 0)).
			JText::_('HIKA_MINUTES');
	}else{
		echo '<small
style="color:red">'.JText::_('ONLY_COMMERCIAL').'</small>';
	}
		?></td>
	</tr>
    <tr>
        <td class="hk_tbl_key"<?php echo
$this->docTip('shipping_address_same_checkbox');?>><?php
echo JText::_('SHOW_SHIPPING_SAME_ADDRESS_CHECKBOX');
?></td>
        <td><?php
            echo JHTML::_('hikaselect.booleanlist',
'config[shipping_address_same_checkbox]', '',
$this->config->get('shipping_address_same_checkbox', 1));
        ?></td>
    </tr>
	<tr>
		<td class="hk_tbl_key"<?php echo
$this->docTip('checkout_convert_cart');?>><?php echo
JText::_('CHECKOUT_CONVERT_CART'); ?></td>
		<td><?php
			echo JHTML::_('hikaselect.booleanlist',
'config[checkout_convert_cart]', '',
$this->config->get('checkout_convert_cart', 1));
		?></td>
	</tr>
<?php } ?>
</table>
	</div></div>
</div>

</div>
config/tmpl/affiliate.php000064400000014426151162050350011427
0ustar00<?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');
?><div id="features_affiliate">
<fieldset class="adminform">
	<legend><?php echo JText::_( 'AFFILIATE' );
?></legend>
	<table class="admintable" cellspacing="1">
		<tr>
			<td class="key" >
				<?php echo JText::_('PARTNER_KEY'); ?>
			</td>
			<td>
				<input class="inputbox" type="text"
name="params[system][hikashopaffiliate][partner_key_name]"
value="<?php echo
@$this->escape($this->affiliate_params['partner_key_name']);
?>" />
			</td>
		</tr>
		<tr>
			<td class="key" >
				<?php echo JText::_('PARTNER_CLICK_FEE'); ?>
			</td>
			<td>
				<input class="inputbox" size="5"
type="text" name="config[partner_click_fee]"
value="<?php echo
$this->config->get('partner_click_fee'); ?>" />
			</td>
		</tr>
		<tr>
			<td class="key" >
				<?php echo JText::_('PARTNER_LEAD_FEE'); ?>
			</td>
			<td>
				<input class="inputbox" size="5"
type="text" name="config[partner_lead_fee]"
value="<?php echo
$this->config->get('partner_lead_fee'); ?>" />
			</td>
		</tr>
		<tr>
			<td class="key" >
				<?php echo JText::_('PARTNER_ORDER_PERCENT_FEE'); ?>
			</td>
			<td>
				<input class="inputbox" size="5"
type="text" name="config[partner_percent_fee]"
value="<?php echo
$this->config->get('partner_percent_fee'); ?>"
/>%
			</td>
		</tr>
		<tr>
			<td class="key" >
				<?php echo JText::_('PARTNER_ORDER_FLAT_FEE'); ?>
			</td>
			<td>
				<input class="inputbox" size="5"
type="text" name="config[partner_flat_fee]"
value="<?php echo
$this->config->get('partner_flat_fee'); ?>" />
			</td>
		</tr>
		<tr>
			<td class="key" >
				<?php echo JText::_('PERCENTAGE_FEE_EXCLUDING_SHIPPING');
?>
			</td>
			<td>
				<?php echo JHTML::_('hikaselect.booleanlist',
"config[affiliate_fee_exclude_shipping]" , '',
$this->config->get('affiliate_fee_exclude_shipping',0));
?>
			</td>
		</tr>
		<tr>
			<td class="key">
				<?php echo JText::_('VALID_ORDER_STATUS'); ?>
			</td>
			<td>
				<input class="inputbox" type="text"
id="partner_valid_status"
name="config[partner_valid_status]" value="<?php echo
@$this->config->get('partner_valid_status'); ?>"
/>
				<?php
					echo $this->popup->display(
						'<img src="'. HIKASHOP_IMAGES.'edit.png"
alt="'.JText::_('HIKA_EDIT').'"/>',
						'VALID_ORDER_STATUS',
						'\''.hikashop_completeLink("category&task=selectstatus&control=partner_valid_status",true).'&values=\'+document.getElementById(\'partner_valid_status\').value',
						'link_partner_valid_status',
						760, 480, '', '', 'link',true
					);
					?>
			</td>
		</tr>
		<tr>
			<td class="key" >
				<?php echo JText::_('VALIDITY_PERIOD'); ?>
			</td>
			<td>
				<?php echo
$this->delayTypeAffiliate->display('config[click_validity_period]',
$this->config->get('click_validity_period',2592000),3);
?>
			</td>
		</tr>
		<tr>
			<td class="key" >
				<?php echo JText::_('CLICK_MINIMUM_DELAY'); ?>
			</td>
			<td>
				<?php echo
$this->delayTypeClick->display('config[click_min_delay]',
$this->config->get('click_min_delay',86400)); ?>
			</td>
		</tr>
		<tr>
			<td class="key" >
				<?php echo JText::_('NO_AFFILIATION_IF_CART_PRESENT');
?>
			</td>
			<td>
				<?php echo JHTML::_('hikaselect.booleanlist',
"config[no_affiliation_if_cart_present]" , '',
$this->config->get('no_affiliation_if_cart_present',0));
?>
			</td>
		</tr>
		<tr>
			<td class="key" >
				<?php echo JText::_('AFFILIATE_PAYMENT_DELAY'); ?>
			</td>
			<td>
				<?php echo
$this->delayTypeOrder->display('config[affiliate_payment_delay]',
$this->config->get('affiliate_payment_delay',0),3); ?>
			</td>
		</tr>
		<tr>
			<td class="key" >
				<?php echo JText::_('AFFILIATE_TERMS'); ?>
			</td>
			<td>
				<input class="inputbox" id="affiliate_terms"
name="config[affiliate_terms]" type="text"
size="20" value="<?php echo
$this->config->get('affiliate_terms'); ?>">
				<?php
				if(!HIKASHOP_J16){
					$link =
'index.php?option=com_content&amp;task=element&amp;tmpl=component&amp;object=affiliate';
				}else{
					$link =
'index.php?option=com_content&amp;view=articles&amp;layout=modal&amp;tmpl=component&amp;object=content&amp;function=jSelectArticle_terms';
					$js = "
					function jSelectArticle_terms(id, title, catid, object) {
						document.getElementById('affiliate_terms').value = id;
						hikashop.closeBox();
					}";
					if (!HIKASHOP_PHP5) {
						$doc =& JFactory::getDocument();
					}else{
						$doc = JFactory::getDocument();
					}
					$doc->addScriptDeclaration($js);
				}
				echo $this->popup->display(
					JText::_('Select'),
					'Select one article which will be
config/tmpl/checkdb.php000064400000003114151162050350011056 0ustar00	<td
class="key" >
				<?php echo JText::_('PARTNER_CURRENCY'); ?>
			</td>
			<td>
				<?php echo
$this->currency->display('config[partner_currency]',
$this->config->get('partner_currency')); ?>
			</td>
		</tr>
		<tr>
			<td class="key" >
				<?php echo JText::_('ALLOW_CURRENCY_SELECTION'); ?>
			</td>
			<td>
				<?php echo JHTML::_('hikaselect.booleanlist',
"config[allow_currency_selection]" , '',
$this->config->get('allow_currency_selection')); ?>
			</td>
		</tr>
		<tr>
			<td class="key" >
				<?php echo JText::_('AFFILIATE_ADVANCED_STATS'); ?>
			</td>
			<td>
				<?php echo JHTML::_('hikaselect.booleanlist',
"config[affiliate_advanced_stats]" , '',
$this->config->get('affiliate_advanced_stats')); ?>
			</td>
		</tr>
	</table>
</fieldset>
</div>
config/tmpl/checkdb.php000064400000003114151162050350011056
0ustar00<?php
/**
 * @package	HikaShop for Joomla!
 * @version	4.4.1
 * @author	config/tmpl/checkout.php000064400000037674151162050350011322
0ustar00ont-weight: bold;">Error</span> ';
			break;
		case 'success':
			if(HIKASHOP_BACK_RESPONSIVE)
				echo '<span class="label
label-success">OK</span> ';
			else
				echo '<span style="background-color:#468847;padding:2px
4px;color:white;font-weight: bold;">OK</span> ';
			break;
		case 'info':
		default:
			if(HIKASHOP_BACK_RESPONSIVE)
				echo '<span class="label
label-info">Info</span> ';
			else
				echo '<span style="background-color:#3a87ad;padding:2px
4px;color:white;font-weight: bold;">Info</span> ';
			break;
	}

	echo $msg;

	echo '</p>';
}
?>
</div>
config/tmpl/checkout.php000064400000037674151162050350011322
0ustar00<?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
echo $this->leftmenu(
	'checkout',
	array(
		'#checkout_checkout' => JText::_('CHECKOUT'),
		'#checkout_shipping' =>
JText::_('SHIPPING_PAYMENT'),
		'#checkout_login' =>
JText::_('LOGIN_REGISTRATION')
	)
);
?>
<div id="page-checkout" class="rightconfig-container
<?php if(HIKASHOP_BACK_RESPONSIVE) echo
'rightconfig-container-j30';?>">
<table style="width:100%;">
	<tr>
		<td valign="top" width="50%">
			<div id="checkout_checkout">
				<fieldset class="adminform">
					<legend><?php echo JText::_( 'CHECKOUT' );
?></legend>
					<table class="admintable table" cellspacing="1"
style="width:100%;">
						<tr>
							<td class="key"><?php echo
JText::_('CHECKOUT_FLOW'); ?></td>
							<td>
								<textarea class="inputbox"
name="config[checkout]" id="TextCheckoutWorkFlow"
cols="30" rows="5"><?php echo
$this->config->get('checkout'); ?></textarea>
<?php
	if($this->config->get('checkout_workflow_edition',1)) {
		hikashop_loadJsLib('jquery');
?>
	<div class="checkout_workflow_zone"
style="width:100%">
		<ul id="checkout_delete"
class="checkout_trash">
		</ul>
		<ul class="checkout_items">
<?php
	foreach($this->checkoutlist as $k => $v) {
		echo '<li class="checkoutElem"
rel="'.$k.'">'.$v.'</li>';
	}
?>
		</ul>
		<div style="clear:both">
<?php
	$workflow = explode(',',
$this->config->get('checkout'));
	$checkoutRel = 0;
	if(!empty($workflow)) {
		foreach($workflow as $flow) {
			if( $flow == 'end')
				continue;

			echo '<ul class="checkout_step"
rel="'.$checkoutRel.'"
id="hikashop_checkout_workflow_step_'.$checkoutRel.'">';
			$checkoutRel++;
			$flow = explode('_', $flow);
			foreach($flow as $f) {
				if(isset($this->checkoutlist[$f])) {
					echo '<li class="checkoutElem"
rel="'.$f.'">'. $this->checkoutlist[$f]
.'</li>';
				}
			}
			echo '</ul>';
		}
	}
	echo '<ul class="checkout_step"
rel="'.$checkoutRel.'"
id="hikashop_checkout_workflow_step_'.$checkoutRel.'"></ul>';
?>
		</div>
	<div style="clear:both"></div>
</div>
<script type="text/javascript">
var checkoutWorkflowHelper = {
	maxRel: <?php echo $checkoutRel; ?>,
	init: function() {
		var t = this;
		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('#TextCheckoutWorkFlow').hide();
		jQuery('#CheckoutWorkflow').show();
	},
	serialize: function() {
		var 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('#TextCheckoutWorkFlow').val(data);

		if(max == this.maxRel) {
			this.maxRel++;
			var t = this;
			jQuery('<ul class="checkout_step" rel="' +
this.maxRel + '" id="hikashop_checkout_workflow_step_'
+ this.maxRel +
'"></ul>').insertAfter('#hikashop_checkout_workflow_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('#hikashop_checkout_workflow_step_' +
i).sortable("destroy").remove();
				jQuery("ul.checkout_step").sortable('refresh');
			}
			this.maxRel = max + 1;
		}
	}
};
jQuery(document).ready(function($) { checkoutWorkflowHelper.init(); });
</script>
<?php } ?>
							</td>
						</tr>
						<tr>
							<td class="key">
								<?php echo JText::_('CHECKOUT_WORKFLOW_EDITION');
?>
							</td>
							<td>
								<?php echo JHTML::_('hikaselect.booleanlist',
"config[checkout_workflow_edition]",'onchange="task =
document.getElementById(\'config_form_task\');if(task)
task.value=\'apply\';
this.form.submit();"',$this->config->get('checkout_workflow_edition',1));
?>
							</td>
						</tr>
						<tr>
							<td class="key">
								<?php echo JText::_('CHECKOUT_FORCE_SSL'); ?>
							</td>
							<td>
								<?php
								$values = array();
								$values[] = JHTML::_('select.option',
'url',JText::_('SHARED_SSL'));
								$values[] = JHTML::_('select.option',
1,JText::_('HIKASHOP_YES'));
								$values[] = JHTML::_('select.option',
0,JText::_('HIKASHOP_NO'));
								echo JHTML::_('hikaselect.radiolist',  $values,
'config[force_ssl]',
'onchange="displaySslField()"', 'value',
'text', $this->config->get('force_ssl',0) );
								if($this->config->get('force_ssl',0)=='url'){
$hidden=''; }
								else{ $hidden="display:none"; }?>
								<input class="inputbox" id="force_ssl_url"
name="config[force_ssl_url]" type="text"
size="20" value="<?php echo
$this->config->get('force_ssl_url'); ?>"
style="<?php echo $hidden; ?>">
							</td>
						</tr>
						<tr>
							<td class="key">
								<?php echo JText::_('DISPLAY_CHECKOUT_BAR'); ?>
							</td>
							<td>
								<?php echo
$this->checkout->display('config[display_checkout_bar]',$this->config->get('display_checkout_bar'));
?>
							</td>
						</tr>
						<tr>
							<td class="key">
								<?php echo JText::_('CHECKOUT_SHOW_CART_DELETE');
?>
							</td>
							<td>
								<?php echo JHTML::_('hikaselect.booleanlist',
'config[checkout_cart_delete]','',$this->config->get('checkout_cart_delete'));?>
							</td>
						</tr>
						<tr>
							<td class="key">
								<?php echo JText::_('FORCE_MENU_ON_CHECKOUT'); ?>
							</td>
							<td>
								<?php echo $this->elements->hikashop_menu;?>
							</td>
						</tr>
						<tr>
							<td class="key" >
								<?php echo JText::_('HIKASHOP_CHECKOUT_TERMS'); ?>
							</td>
							<td>
								<input type="hidden"
id="terms_and_conditions_width"
name="config[terms_and_conditions_width]" value="<?php
echo $this->config->get('terms_and_conditions_width',450);
?>" />
								<input type="hidden"
id="terms_and_conditions_height"
name="config[terms_and_conditions_height]" value="<?php
echo $this->config->get('terms_and_conditions_height',480);
?>" />
								<input class="inputbox" id="checkout_terms"
name="config[checkout_terms]" type="text"
size="20" value="<?php echo
$this->config->get('checkout_terms'); ?>">
								<?php
								if(!HIKASHOP_J16){
									$link =
'index.php?option=com_content&amp;task=element&amp;tmpl=component&amp;object=checkout';
									$js = "
									function jSelectArticle(id, title, object) {
										document.getElementById(object+'_terms').value = id;
										window.top.hikashop.closeBox();
									}";
									if (!HIKASHOP_PHP5) {
										$doc =& JFactory::getDocument();
									}else{
										$doc = JFactory::getDocument();
									}
									$doc->addScriptDeclaration($js);
								}else{
									$link =
'index.php?option=com_content&amp;view=articles&amp;layout=modal&amp;tmpl=component&amp;object=content&amp;function=jSelectArticle_checkout';
									$js = "
									function jSelectArticle_checkout(id, title, catid, object) {
										document.getElementById('checkout_terms').value = id;
										document.getElementById('terms_and_conditions_width').value
= document.getElementById('terms_popup_width').value;
										document.getElementById('terms_and_conditions_height').value
= document.getElementById('terms_popup_height').value;
										hikashop.closeBox();
									}";
									if (!HIKASHOP_PHP5) {
										$doc =& JFactory::getDocument();
									}else{
										$doc = JFactory::getDocument();
									}
									$doc->addScriptDeclaration($js);
								}
								$customContent =
'<br/><br/>'.JText::_('TERMS_AND_CONDITIONS_POPUP_SIZE').':
';
								$customContent .= '<input type="text"
style="width:50px;" id="terms_popup_width"
value="'.$this->config->get('terms_and_conditions_width',450).'"/>
x ';
								$customContent .= '<input type="text"
style="width:50px;" id="terms_popup_height"
value="'.$this->config->get('terms_and_conditions_height',450).'"/>
px';
								echo $this->popup->display(
									JText::_('Select'),
									'Select one article which will be displayed for the Terms
& Conditions'.$customContent,
									$link,
									'checkout_terms_link',
									760, 480, '', '', 'button'
								);
								?>
							</td>
						</tr>
						<tr>
							<td class="key">
								<?php echo
JText::_('CONTINUE_SHOPPING_BUTTON_URL');?>
							</td>
							<td>
								<input name="config[continue_shopping]"
type="text" value="<?php echo
$this->config->get('continue_shopping');?>" />
							</td>
						</tr>
						<tr>
							<td class="key">
								<?php echo JText::_('SHOW_IMAGE'); ?>
							</td>
							<td>
								<?php 	echo JHTML::_('hikaselect.booleanlist',
'config[show_cart_image]','',$this->config->get('show_cart_image'));
?>
							</td>
						</tr>
						<tr>
							<td class="key"><?php echo
JText::_('BUSINESS_HOURS'); ?></td>
							<td><?php
								if(hikashop_level(1)){
									$hours = array();
									for($i=0;$i<24;$i++)
$hours[]=JHTML::_('select.option', $i,$i);
									$minutes = array();
									for($i=0;$i<60;$i++)
$minutes[]=JHTML::_('select.option', $i,$i);
									echo '<fieldset
class="adminform"><legend>'.JText::_('OPENS_AT').'</legend>'.JHTML::_('select.genericlist',
  $hours, "config[store_open_hour]",
'class="inputbox" size="1"',
'value', 'text',
$this->config->get('store_open_hour',0) ); ?><?php
echo JText::_('HOURS');
									echo JHTML::_('select.genericlist',   $minutes,
"config[store_open_minute]", 'class="inputbox"
size="1"', 'value', 'text',
$this->config->get('store_open_minute',0) ); ?><?php
echo JText::_('HIKA_MINUTES').'</fieldset>';
									echo '<fieldset
class="adminform"><legend>'.JText::_('CLOSES_AT').'</legend>'.JHTML::_('select.genericlist',
  $hours, "config[store_close_hour]",
'class="inputbox" size="1"',
'value', 'text',
$this->config->get('store_close_hour',0) ); ?><?php
echo JText::_('HOURS');
									echo JHTML::_('select.genericlist',   $minutes,
"config[store_close_minute]", 'class="inputbox"
size="1"', 'value', 'text',
$this->config->get('store_close_minute',0) ); ?><?php
echo JText::_('HIKA_MINUTES').'</fieldset>';
								}else{
									echo '<small
style="color:red">'.JText::_('ONLY_COMMERCIAL').'</small>';
								}
							?></td>
						</tr>
					</table>
				</fieldset>
				</div>
																			<!-- SHIPPING & PAYMENT -->
				<div id="checkout_shipping">
				<fieldset class="adminform">
					<legend><?php echo JText::_( 'SHIPPING_PAYMENT' );
?></legend>
					<table class="admintable table"
cellspacing="1">
						<tr>
							<td class="key">
								<?php echo
JText::_('AUTO_SELECT_DEFAULT_SHIPPING_AND_PAYMENT'); ?>
							</td>
							<td>
								<?php echo
$this->auto_select->display('config[auto_select_default]',$this->config->get('auto_select_default',2));
?>
							</td>
						</tr>
						<tr>
							<td class="key">
								<?php echo
JText::_('AUTO_SUBMIT_SHIPPING_AND_PAYMENT_SELECTION'); ?>
							</td>
							<td>
								<?php 	echo JHTML::_('hikaselect.booleanlist',
'config[auto_submit_methods]','',$this->config->get('auto_submit_methods',1));
?>
							</td>
						</tr>
						<tr>
							<td class="key">
								<?php echo
JText::_('FORCE_SHIPPING_REGARDLESS_OF_WEIGHT'); ?>
							</td>
							<td>
								<?php 	echo JHTML::_('hikaselect.booleanlist',
'config[force_shipping]','',$this->config->get('force_shipping',0));
?>
							</td>
						</tr>
						<tr>
							<td class="key"><?php
								echo JText::_('SHOW_SHIPPING_SAME_ADDRESS_CHECKBOX');
							?></td>
							<td><?php
								echo JHTML::_('hikaselect.booleanlist',
'config[shipping_address_same_checkbox]','',$this->config->get('shipping_address_same_checkbox',
1));
							?></td>
						</tr>

					</table>
				</fieldset>
				</div>
																			<!-- LOGIN & REGISTRATION -->
				<div id="checkout_login">
				<fieldset class="adminform">
					<legend><?php echo JText::_( 'LOGIN_REGISTRATION'
); ?></legend>
					<table class="admintable table"
cellspacing="1">
						<tr>
							<td class="key">
								<?php echo JText::_('HIKA_LOGIN'); ?>
							</td>
							<td>
								<?php 	echo JHTML::_('hikaselect.booleanlist',
'config[display_login]','',$this->config->get('display_login',1));
?>
							</td>
						</tr>
						<tr>
							<td class="key">
								<?php echo JText::_('REGISTRATION_DISPLAY_METHOD');
?>
							</td>
							<td>
								<?php if(hikashop_level(1)){
									echo
$this->display_method->display('config[display_method]',$this->config->get('display_method',0));
								}else{
									echo '<small
style="color:red">'.JText::_('ONLY_COMMERCIAL').'</small>';
								} ?>
							</td>
						</tr>
						<tr>
							<td class="key">
								<?php echo JText::_('HIKA_REGISTRATION'); ?>
							</td>
							<td>
								<?php
								if(hikashop_level(1)){
									$display =
$this->config->get('display_method',0);
									$type="radio";
									if($display==1){ $type="checkbox"; }
									$registration =
$this->config->get('simplified_registration');
									$registration=explode(',',$registration);
									?>
									<label><input <?php
if(in_array('0',$registration)) echo
'checked="checked"'; ?>
onchange="registrationAvailable(this.value, this.checked)"
style="margin-right: 5px;" type="<?php echo
$type;?>" value="0"
name="config[simplified_registration][]"
id="config[simplified_registration][normal]"/><?php echo
JText::_('HIKA_REGISTRATION'); ?></label><br/>
									<label><input <?php
if(in_array('1',$registration)) echo
'checked="checked"'; ?>
onchange="registrationAvailable(this.value, this.checked)"
style="margin-right: 5px;" type="<?php echo
$type;?>" value="1"
name="config[simplified_registration][]"
id="config[simplified_rconfig/tmpl/config.php000064400000013325151162050350010745
0ustar00ionAvailable(this.value, this.checked)"
style="margin-right: 5px;" type="<?php echo
$type;?>" value="2"
name="config[simplified_registration][]"
id="config[simplified_registration][guest]"/><?php echo
JText::_('GUEST'); ?></label><br/>
									<?php
								}else{
									echo '<small
style="color:red">'.JText::_('ONLY_COMMERCIAL').'</small>';
								}
								?>
							</td>
						</tr>
						<tr>
							<td class="key">
								<?php echo
JText::_('DISPLAY_EMAIL_CONFIRMATION_FIELD'); ?>
							</td>
							<td>
								<?php 	echo JHTML::_('hikaselect.booleanlist',
'config[show_email_confirmation_field]','',$this->config->get('show_email_confirmation_field',0));
?>
							</td>
						</tr>
					</table>
				</fieldset>
				</div>
			</td>
		</tr>
	</table>
</div>
<script type="text/javascript">
<?php
	foreach($registration as $key){
		if($key!=2)	echo 'registrationAvailable('.$key.',
true);';
	} ?>
</script>
config/tmpl/config.php000064400000013325151162050350010745
0ustar00<?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');
?><div class="iframedoc"
id="iframedoc"></div>
<form action="index.php?option=<?php echo HIKASHOP_COMPONENT
?>&amp;ctrl=config" method="post" 
name="adminForm" id="adminForm">
	<input type="hidden" name="option"
value="<?php echo HIKASHOP_COMPONENT; ?>" />
	<input type="hidden" name="task"
id="config_form_task" value="" />
	<input type="hidden" name="ctrl"
value="config" />
	<?php echo JHTML::_('form.token');

	$configTabs = array(
		'config_main' => array('MAIN', 'main'),
		'config_checkout' => array('CHECKOUT',
'checkout'),
		'config_display' => array('DISPLAY',
'display'),
		'config_features' => array('HIKA_FEATURES',
'features'),
		'config_plugins' => array('PLUGINS',
'plugins'),
		'config_languages' => array('LANGUAGES',
'languages')
	);

	if(hikashop_level(2)){
		$configTabs['config_acl'] = array('ACCESS_LEVEL',
'acl');
	}

	if(hikashop_level(1)){
		$configTabs['config_cron'] = array('CRON',
'cron');
	}

	$options = array(
		'startOffset' => $this->default_tab,
		'useCookie' => true
	);
	if(!HIKASHOP_J30) {
		$options['onActive'] = 'function(title, description) {
			description.setStyle("display", "block");
			title.addClass("open").removeClass("closed");
			if(title.getAttribute("class").indexOf("config_")
>= 0)
				myHash =
title.getAttribute("class").replace("tabs","").replace("open","").replace("config_","").replace(/^\s*|\s*$/g,
"");
			else
				myHash =
title.getAttribute("id").replace("config_","").replace(/^\s*|\s*$/g,
"");
			if(window.location.hash.substr(1, myHash.length) != myHash)
				window.location.hash = myHash;
		}';
	}
	echo $this->tabs->start('config_tab', $options);
	foreach($configTabs as $pane => $paneOpt) {
		echo $this->tabs->panel(JText::_($paneOpt[0]), $pane);
		$this->setLayout($paneOpt[1]);
		echo $this->loadTemplate();
	}
	echo $this->tabs->end();
?>
	<div style="clear:both;"
class="clr"></div>
</form>
<script>
var configWatcher = {
	currentHRef : '',
	init: function(){
		var t = this;
		setInterval( function(){ t.periodical(); }, 50 );
<?php
	if(HIKASHOP_BACK_RESPONSIVE) {
?>
		jQuery("ul.nav-remember").each(function(nav){
			var id = jQuery(this).attr("id");
			jQuery("#" + id + "
a[data-toggle=\"tab\"]").on("shown", function (e)
{
				var myHash =
jQuery(this).attr("id").replace("config_","").replace("_tablink","");
				if(window.location.hash.substr(1, myHash.length) != myHash)
					window.location.hash = myHash;
			});
		});
<?php
	}
?>
	},
	periodical: function() {
		var href = window.location.hash.substring(1);
		if( href != this.currentHRef ) {
			this.currentHRef = href;
			this.switchAndScroll(href);
		}
	},
	switchAndScroll: function(hash) {
		if(hash.length == 0)
			return;
		if(hash.indexOf('_') < 0) {
			var tabName = hash;
			hash = '';
		} else {
			var tabName = hash.substr(0, hash.indexOf('_'));
		}
<?php
	if(HIKASHOP_BACK_RESPONSIVE) {
?>
		jQuery("#config_"+tabName+"_tablink").tab("show");
		this.scrollToCust( hash );
<?php
	} else {
?>
		var childrens = $('config_tab').getChildren('dt'),
elt = 0, j = 0;
		for (var i = 0; i < childrens.length; i++){
			var children = childrens[i];
			if(children.hasClass('tabs') || children.id.substr(0,
children.id.indexOf('_'))){
				if(children.hasClass('config_'+tabName) || children.id ==
'config_'+tabName){
					children.addClass('open').removeClass('closed');
					elt = j;
				}else{
					children.addClass('closed').removeClass('open');
				}
				j++;
			}
		}

		var tabsContent = $('config_tab').getNext('div');
		var tabChildrens = tabsContent.getChildren('dd');
		for (var i = 0; i < tabChildrens.length; i++){
			var childContent = tabChildrens[i];
			if(i == elt){
				childContent.style.display = 'block';
			}else{
				childContent.style.display = 'none';
			}
		}

		var d = document, elem = d.getElementById(hash);
		if(elem)
			window.scrollTo(0, elem.offsetTop +230);
		else
			window.scrollTo(0, 0);
<?php
	}
?>
	},
	scrollToCust:
functionconfig/tmpl/config.xml000064400000000324151162050350010751
0ustar00.offset().top + 10, isFixed = 0;

	$win.scroll(processScroll);
	processScroll();

	function processScroll() {
		var scrollTop = $win.scrollTop();
		if(scrollTop >= navTop && !isFixed) {
			isFixed = 1;
	config/tmpl/cron.php000064400000010762151162050350010443
0ustar00config/tmpl/config.xml000064400000000324151162050350010751
0ustar00<?xml version="1.0" encoding="utf-8"?>
<metadata>
	<layout title="COM_HIKASHOP_CONFIGURATION_VIEW_TITLE">
		<message>
			<![CDATA[COM_HIKASHOP_CONFIGURATION_VIEW_DESC]]>
		</message>
	</layout>
</metadata>config/tmpl/cron.php000064400000010762151162050350010443
0ustar00<?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 if(!HIKASHOP_BACK_RESPONSIVE) { ?>
<div id="page-cron">
<?php } else { ?>
<div id="page-cron" class="row-fluid">
	<div class="span12">
<?php } ?>
	<fieldset class="adminform">
		<legend><?php echo JText::_( 'CRON' );
?></legend>
		<table class="admintable table"
cellspacing="1">
			<tr>
				<td colspan="2">
				<?php echo $this->elements->cron_edit; ?>
				</td>
			</tr>
			<tr>
				<td class="key" >
					<?php echo JText::_('MIN_DELAY'); ?>
				</td>
				<td>
					<?php echo $this->elements->cron_frequency; ?>
				</td>
			</tr>
			<tr>
				<td class="key">
					<?php echo JText::_('NEXT_RUN'); ?>
				</td>
				<td>
					<?php echo
hikashop_getDate($this->config->get('cron_next')); ?>
				</td>
			</tr>
			<tr>
				<td class="key">
					<?php echo JText::_('CRON_URL'); ?>
				</td>
				<td>
					<a href="<?php echo $this->elements->cron_url;
?>" target="_blank"><?php echo
$this->elements->cron_url; ?></a>
				</td>
			</tr>
		</table>
	</fieldset>
<?php if(HIKASHOP_BACK_RESPONSIVE) { ?>
	</div>
	<div class="span12">
<?php } ?>
	<fieldset class="adminform">
		<legend><?php echo JText::_( 'REPORT' );
?></legend>
<?php if(!HIKASHOP_BACK_RESPONSIVE) { ?>
<div id="page-cron-report">
	<table style="width:100%">
		<tr>
			<td valign="top" width="50%">
				<fieldset class="adminform">
<?php } else { ?>
<div id="page-cron-report" class="row-fluid">
	<div class="span6">
<?php } ?>
						<table class="admintable table"
cellspacing="1">
							<tr>
								<td class="key">
									<?php echo JText::_('REPORT_SEND'); ?>
								</td>
								<td>
									<?php echo $this->elements->cron_sendreport;?>
								</td>
							</tr>
						</table>
						<table class="admintable table"
cellspacing="1" id="cronreportdetail">
							<tr>
								<td class="key" >
								<?php echo JText::_('REPORT_SEND_TO'); ?>
								</td>
								<td>
									<input class="inputbox" type="text"
name="config[cron_sendto]" size="50"
value="<?php echo
$this->config->get('cron_sendto'); ?>">
								</td>
							</tr>
							<tr>
								<td colspan="2">
									<?php echo $this->elements->editReportEmail;?>
								</td>
							</tr>
						</table>

<?php if(!HIKASHOP_BACK_RESPONSIVE) { ?>
				</fieldset>
			</td>
			<td valign="top" width="50%">
				<fieldset class="adminform">
<?php } else { ?>
	</div>
	<div class="span6">
<?php } ?>

						<table class="admintable table"
cellspacing="1">
							<tr>
								<td class="key" >
									<?php echo JText::_('REPORT_SAVE'); ?>
								</td>
								<td>
									<?php echo $this->elements->cron_savereport;?>
								</td>
							</tr>
						</table>
						<table class="admintable table"
cellspacing="1"
id="cronconfig/tmpl/css.php000064400000002470151162050350010267
0ustar00f(!HIKASHOP_BACK_RESPONSIVE) { ?>
				</fieldset>
			</td>
		</tr>
	</table>
</div>
<?php } else { ?>
	</div>
</div>
<?php } ?>
	</fieldset>
<?php if(HIKASHOP_BACK_RESPONSIVE) { ?>
	</div>
	<div class="span12">
<?php } ?>
	<fieldset class="adminform">
		<legend><?php echo JText::_( 'LAST_CRON' );
?></legend>
		<table class="admintable table"
cellspacing="1">
			<tr>
				<td class="key" >
					<?php echo JText::_('LAST_RUN'); ?>
				</td>
				<td>
					<?php echo
hikashop_getDate($this->config->get('cron_last')); ?>
				</td>
			</tr>
			<tr>
				<td class="key" >
					<?php echo JText::_('CRON_TRIGGERED_IP'); ?>
				</td>
				<td>
					<?php echo $this->config->get('cron_fromip');
?>
				</td>
			</tr>
			<tr>
				<td class="key" >
				<?php echo JText::_('REPORT'); ?>
				</td>
				<td>
					<?php echo $this->config->get('cron_report');
?>
				</td>
			</tr>
		</table>
	</fieldset>
<?php if(HIKASHOP_BACK_RESPONSIVE) { ?>
	</div>
<?php } ?>
</div>
config/tmpl/css.php000064400000002470151162050350010267
0ustar00config/tmpl/display.php000064400000047432151162050350011153
0ustar00$this->type.'_'.$this->fileName.'.css';
?></div>
		<div class="toolbar" id="toolbar"
style="float: right;">
			<button class="btn" type="button"
onclick="javascript:submitbutton('savecss'); return
false;"><?php echo JText::_('HIKA_SAVE');
?></button>
		</div>
	</fieldset>
	<?php echo
$this->editor->displayCode('csscontent',$this->content);
?>
	<input type="hidden" name="option"
value="<?php echo HIKASHOP_COMPONENT; ?>" />
	<input type="hidden" name="task"
value="savecss" />
	<input type="hidden" name="tmpl"
value="component" />
	<input type="hidden" name="ctrl"
value="config" />
	<input type="hidden" name="file"
value="<?php echo $this->type.'_'.$this->fileName;
?>" />
	<input type="hidden" name="var"
value="<?php echo JRequest::getCmd('var'); ?>"
/>
	<?php echo JHTML::_( 'form.token' ); ?>
</form>
config/tmpl/display.php000064400000047432151162050350011153
0ustar00<?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
echo $this->leftmenu(
	'display',
	array(
		'#display_general' =>
JText::_('GENERAL_DISPLAY_OPTIONS'),
		'#display_css' => JText::_('CSS'),
		'#display_modules' =>
JText::_('MODULES_MAIN_DEFAULT_OPTIONS'),
		'#display_products' =>
JText::_('DEFAULT_PARAMS_FOR_PRODUCTS'),
		'#display_categories' =>
JText::_('DEFAULT_PARAMS_FOR_CATEGORIES'),
		'#display_divs' =>
JText::_('DEFAULT_PARAMS_FOR_DIV')
	)
);
?>
<div id="page-display" class="rightconfig-container
<?php if(HIKASHOP_BACK_RESPONSIVE) echo
'rightconfig-container-j30';?>">
	<table style="width:100%;">
		<tr>
			<td valign="top" width="50%">
	<!-- GENERAL -->
		<div id="display_general"></div>
		<fieldset class="adminform">
			<legend><?php echo JText::_(
'GENERAL_DISPLAY_OPTIONS' ); ?></legend>
			<table class="admintable table"
cellspacing="1">
				<tr>
					<td class="key"><?php echo
JText::_('BUTTON_STYLE'); ?></td>
					<td><?php
						echo
$this->button->display('config[button_style]',$this->config->get('button_style'));
					?></td>
				</tr>
				<tr>
					<td class="key"><?php echo
JText::_('MENU_STYLE'); ?></td>
					<td><?php
						echo
$this->menu_style->display('config[menu_style]',$this->config->get('menu_style'));
					?></td>
				</tr>
				<tr>
					<td class="key"><?php echo
JText::_('USE_BOOTSTRAP_ON_FRONT'); ?></td>
					<td><?php
						echo JHtml::_('hikaselect.booleanlist',
'config[bootstrap_design]', '',
$this->config->get('bootstrap_design', HIKASHOP_J30));
					?></td>
				</tr>
<?php if(HIKASHOP_J30) { ?>
				<tr>
					<td class="key"><?php echo
JText::_('POPUP_MODE'); ?></td>
					<td><?php
						$options = array(
							JHTML::_('hikaselect.option', 'inherit',
JText::_('HIKA_INHERIT')),
							JHTML::_('hikaselect.option', 'mootools',
JText::_('mootools')),
							JHTML::_('hikaselect.option', 'bootstrap',
JText::_('bootstrap'))
						);
						echo JHTML::_('select.genericlist', $options,
'config[popup_mode]', '', 'value',
'text', $this->config->get('popup_mode',
'inherit'));
					?></td>
				</tr>
				<tr>
					<td class="key"><?php echo
JText::_('USE_CHOSEN'); ?></td>
					<td><?php
						echo JHTML::_('hikaselect.booleanlist', 
'config[bootstrap_forcechosen]','',$this->config->get('bootstrap_forcechosen',
0));
					?></td>
				</tr>
<?php } ?>
				<tr>
					<td class="key"><?php echo
JText::_('IMAGE_POPUP_MODE'); ?></td>
					<td><?php
						$options = array(
							JHTML::_('hikaselect.option', 'mootools',
JText::_('mootools')),
							JHTML::_('hikaselect.option', 'shadowbox',
JText::_('shadowbox (external)')),
							JHTML::_('hikaselect.option',
'shadowbox-embbeded', JText::_('shadowbox
(embedded)'))
						);
						echo JHTML::_('select.genericlist', $options,
'config[image_popup_mode]', 'onchange="return
window.localPage.imagepopupmode(this);"', 'value',
'text', $this->config->get('image_popup_mode',
'mootools'));
					?>
<script type="text/javascript">
if(!window.localPage)
	window.localPage = {};
window.localPage.imagepopupmode = function(el) {
	if(el.value == 'shadowbox-embbeded') {
		var ret = confirm('Be careful: You want to use ShadowBox in embbeded
mode, the library should be installed in your website to work
correctly');
		if(!ret) {
			el.value = 'shadowbox';
		}
	}
}
</script>
					</td>
				</tr>
				<tr>
					<td class="key"><?php echo
JText::_('HIKA_PAGINATION'); ?></td>
					<td><?php
						echo
$this->paginationType->display('config[pagination]',$this->config->get('pagination','bottom'));
					?></td>
				</tr>
<?php
	$values = array();
	if(file_exists(HIKASHOP_ROOT.'components'.DS.'com_jcomments'.DS.'jcomments.php')){
		$values[] = JHTML::_('select.option',
'jcomments','jComments');
	}
	if(file_exists(HIKASHOP_ROOT.'plugins'.DS.'content'.DS.'jom_comment_bot.php')){
		$values[] = JHTML::_('select.option',
'jomcomment','jomComment');
	}
	if(count($values)){
		$values[] = JHTML::_('select.option',
0,JText::_('HIKASHOP_NO'));
?>
				<tr>
					<td class="key" ><?php echo
JText::_('COMMENTS_ENABLED_ON_PRODUCTS'); ?></td>
					<td>
						<?php echo JHTML::_('hikaselect.radiolist',  $values,
'config[comments_feature]', '', 'value',
'text', $this->config->get('comments_feature') );
?>
					</td>
				</tr>
<?php } ?>
				<tr>
					<td class="key"><?php echo
JText::_('PRINT_INVOICE_FRONTEND'); ?></td>
					<td>
						<?php if(hikashop_level(1)){
							echo JHTML::_('hikaselect.booleanlist',
'config[print_invoice_frontend]','',$this->config->get('print_invoice_frontend'));
						}else{
							echo hikashop_getUpgradeLink('essential');;
						} ?>
					</td>
				</tr>
				<tr>
					<td class="key"><?php echo
JText::_('CATEGORY_EXPLORER'); ?></td>
					<td>
						<?php echo JHTML::_('hikaselect.booleanlist',
'config[category_explorer]','',$this->config->get('category_explorer'));?>
					</td>
				</tr>
				<tr>
					<td class="key" >
					<?php echo JText::_('SHOW_FOOTER'); ?>
					</td>
					<td>
						<?php echo $this->elements->show_footer; ?>
					</td>
				</tr>
			</table>
		</fieldset>
	<!-- CSS -->
		<div id="display_css"></div>
		<fieldset class="adminform">
			<legend><?php echo 'CSS' ?></legend>
			<table class="admintable table"
cellspacing="1">
				<tr>
					<td class="key"><?php echo
JText::_('CSS_FRONTEND'); ?></td>
					<td>
						<?php echo $this->elements->css_frontend;?>
					</td>
				</tr>
				<tr>
					<td class="key"><?php echo
JText::_('STYLES_FOR_FRONTEND'); ?></td>
					<td>
						<?php echo $this->elements->css_style;?>
					</td>
				</tr>
				<tr>
					<td class="key"><?php echo
JText::_('CSS_BACKEND'); ?></td>
					<td>
						<?php echo $this->elements->css_backend;?>
					</td>
				</tr>
			</table>
		</fieldset>
	<!-- MODULES -->
		<div id="display_modules"></div>
		<fieldset class="adminform">
			<legend><?php echo JText::_(
'MODULES_MAIN_DEFAULT_OPTIONS' ); ?></legend>
			<table class="admintable table"
cellspacing="1">
				<tr>
					<td class="key"><?php echo
JText::_('TYPE_OF_CONTENT');?></td>
					<td>
						<?php echo
$this->contentType->display('config[default_params][content_type]',$this->default_params['content_type'],$this->js,false);
?>
					</td>
				</tr>
				<tr>
					<td class="key"><?php echo
JText::_('TYPE_OF_LAYOUT');?></td>
					<td>
						<?php echo
$this->layoutType->display('config[default_params][layout_type]',$this->default_params['layout_type'],$this->js,false);?>
					</td>
				</tr>
				<tr>
					<td class="key"><?php echo
JText::_('NUMBER_OF_COLUMNS');?></td>
					<td>
						<input name="config[default_params][columns]"
type="text" value="<?php echo
$this->default_params['columns'];?>" />
					</td>
				</tr>
				<tr>
					<td class="key"><?php echo
JText::_('NUMBER_OF_ITEMS');?></td>
					<td>
						<input name="config[default_params][limit]"
type="text" value="<?php echo
$this->default_params['limit'];?>" />
					</td>
				</tr>
				<tr>
					<td class="key"><?php echo
JText::_('RANDOM_ITEMS');?></td>
					<td>
						<?php echo JHTML::_('hikaselect.booleanlist',
'config[default_params][random]' ,
'',$this->default_params['random']); ?>
					</td>
				</tr>
				<tr>
					<td class="key"><?php echo
JText::_('ORDERING_DIRECTION');?></td>
					<td>
						<?php echo
$this->orderdirType->display('config[default_params][order_dir]',$this->default_params['order_dir']);?>
					</td>
				</tr>
				<tr>
					<td class="key"><?php echo
JText::_('SUB_ELEMENTS_FILTER');?></td>
					<td>
						<?php echo
$this->childdisplayType->display('config[default_params][filter_type]',@$this->default_params['filter_type']);?>
					</td>
				</tr>
				<tr>
					<td class="key"><?php echo
JText::_('ASSOCIATED_CATEGORY');?></td>
					<td>
						<span id="changeParent"><?php
							echo @$this->element->category_id.'
'.htmlspecialchars(@$this->element->category_name, ENT_COMPAT,
'UTF-8');
						?></span>
						<input class="inputbox"
id="config_default_params_selectparentlisting"
name="config[default_params][selectparentlisting]"
type="hidden" size="20" value="<?php echo
$this->default_params['selectparentlisting'];?>">
						<?php
						echo $this->popup->display(
							JText::_('SELECT'),
							'SELECT_A_CATEGORY',
							'\''.hikashop_completeLink('category&task=selectparentlisting&filter_id=product&control=config_default_params_',true).'&values=\'+document.getElementById(\'config_default_params_selectparentlisting\').value',
							'linkconfig_default_params_selectparentlisting',
							760, 480, '', '', 'button',true
						);
						?>
					</td>
				</tr>
				<tr>
					<td class="key"><?php echo
JText::_('MODULE_CLASS_SUFFIX');?></td>
					<td>
						<input name="config[default_params][moduleclass_sfx]"
type="text" value="<?php echo
@$this->default_params['moduleclass_sfx'];?>" />
					</td>
				</tr>
				<tr>
					<td class="key"><?php echo
JText::_('MODULES_TO_DISPLAY_UNDER_MAIN_ZONE');?></td>
					<td>
						<input type="hidden"
name="config[default_params][modules]"
id="modules_display"  value="<?php echo
@$this->default_params['modules']; ?>" />
						<?php
							echo $this->popup->display(
								JText::_('SELECT'),
								'SELECT_MODULES',
								'\''.hikashop_completeLink('modules&task=selectmodules',true).'\'+\'&modules=\'+document.getElementById(\'modules_display\').value',
								'linkmodules_display',
								750, 375, '', '', 'button',true
							);
						?>
					</td>
				</tr>
				<tr>
					<td class="key"><?php echo
JText::_('SYNCHRO_WITH_ITEM');?></td>
					<td><?php
						echo JHTML::_('hikaselect.booleanlist',
'config[default_params][content_synchronize]' ,
'',$this->default_params['content_synchronize']);
					?></td>
				</tr>
				<tr>
					<td class="key"><?php echo
JText::_('USE_NAME_INSTEAD_TITLE');?></td>
					<td><?php
						echo JHTML::_('hikaselect.booleanlist',
'config[default_params][use_module_name]' ,
'',@$this->default_params['use_module_name']);
					?></td>
				</tr>
			</table>
		</fieldset>
	<!-- PRODUCTS -->
		<div id="display_products"></div>
		<fieldset class="adminform">
			<legend><?php echo JText::_(
'DEFAULT_PARAMS_FOR_PRODUCTS' ); ?></legend>
			<table class="admintable table"
cellspacing="1">
				<tr>
					<td class="key"><?php echo
JText::_('ORDERING_FIELD');?></td>
					<td>
						<?php echo
$this->orderType->display('config[default_params][product_order]',$this->default_params['product_order'],'product');?>
					</td>
				</tr>
				<tr>
					<td class="key"><?php echo
JText::_('RECENTLY_VIEWED');?></td>
					<td>
						<?php echo JHTML::_('hikaselect.booleanlist',
'config[default_params][recently_viewed]' ,
'',@$this->default_params['recently_viewed']);
?>
					</td>
				</tr>
				<tr>
					<td class="key"><?php echo
JText::_('ADD_TO_CART_BUTTON');?></td>
					<td><?php
						if(!isset($this->default_params['add_to_cart']))
							$this->default_params['add_to_cart']=1;
						echo JHTML::_('hikaselect.booleanlist',
'config[default_params][add_to_cart]' ,
'',$this->default_params['add_to_cart']);
					?></td>
				</tr>
				<tr>
					<td class="key"><?php echo
JText::_('ADD_TO_WISHLIST_BUTTON');?></td>
					<td>
						<?php if(hikashop_level(1)){
							echo JHTML::_('hikaselect.booleanlist',
'config[default_params][add_to_wishlist]' ,
'',@$this->default_params['add_to_wishlist']);
						}else{
							echo hikashop_getUpgradeLink('essential');
						} ?>
					</td>
				</tr>
				<tr>
					<td class="key"><?php echo
JText::_('LINK_TO_PRODUCT_PAGE');?></td>
					<td>
						<?php echo JHTML::_('hikaselect.booleanlist',
'config[default_params][link_to_product_page]' ,
'',@$this->default_params['link_to_product_page']);
?>
					</td>
				</tr>
				<tr>
					<td class="key"><?php echo
JText::_('CONTENT_ON_PRODUCT_PAGE');?></td>
					<td>
						<?php echo
$this->productSyncType->display('config[default_params][product_synchronize]'
, $this->default_params['product_synchronize']); ?>
					</td>
				</tr>
				<tr>
					<td class="key"><?php echo
JText::_('DISPLAY_PRICE');?></td>
					<td>
						<?php echo JHTML::_('hikaselect.booleanlist',
'config[default_params][show_price]' ,
'',$this->default_params['show_price']); ?>
					</td>
				</tr>
				<tr>
					<td class="key"><?php echo
JText::_('DISPLAY_CODE');?></td>
					<td>
						<?php echo JHTML::_('hikaselect.booleanlist',
"config[show_code]" , '',
$this->config->get('show_code',0));?>
					</td>
				</tr>
				<tr>
					<td class="key"><?php echo
JText::_('LAYOUT_ON_PRODUCT_PAGE');?></td>
					<td>
						<?php echo
$this->productDisplayType->display('config[product_display]'
, $this->config->get('product_display')); ?>
					</td>
				</tr>
				<tr>
					<td class="key"><?php echo
JText::_('DISPLAY_MANUFACTURER');?></td>
					<td>
						<?php echo JHTML::_('hikaselect.booleanlist',
'config[manufacturer_display]' ,
'',@$this->config->get('manufacturer_display'));
?>
					</td>
				</tr>
				<tr id="show_original_price_line">
					<td class="key"><?php echo
JText::_('ORIGINAL_CURRENCY_PRICE');?></td>
					<td>
						<?php echo JHTML::_('hikaselect.booleanlist',
'config[default_params][show_original_price]' ,
'',@$this->default_params['show_original_price']);
?>
					</td>
				</tr>
				<tr id="show_discount_line">
					<td class="key"><?php echo
JText::_('SHOW_DISCOUNTED_PRICE');?></td>
					<td>
						<?php echo
$this->discountDisplayType->display('config[default_params][show_discount]'
,@$this->default_params['show_discount']); ?>
					</td>
				</tr>
				<tr id="price_display_type_line">
					<td class="key"><?php echo
JText::_('PRICE_DISPLAY_METHOD');?></td>
					<td>
						<?php echo $this->priceDisplayType->display(
'config[default_params][price_display_type]',@$this->default_params['price_display_type']);
?>
					</td>
				</tr>
<?php if(hikashop_level(2)){ ?>
				<tr>
					<td class="key"><?php echo
JText::_('DISPLAY_CUSTOM_ITEM_FIELDS');?></td>
					<td>
						<?php echo JHTML::_('hikaselect.booleanlist',
'config[default_params][display_custom_item_fields]' ,
'',@$this->default_params['display_custom_item_fields']);
?>
					</td>
				</tr>
<?php } ?>
				<tr id="show_price_weight_line">
					<td class="key"><?php echo
JText::_('WEIGHT_UNIT_PRICE');?></td>
					<td>
						<?php echo JHTML::_('hikaselect.booleanlist',
'config[show_price_weight]' ,
'',@$this->config->get('show_price_weight'));
?>
					</td>
				</tr>
				<tr id="price_stock_display_line">
					<td class="key"><?php echo
JText::_('DISPLAY_OUT_OF_STOCK_PRODUCTS');?></td>
					<td>
						<?php echo JHTML::_('hikaselect.booleanlist',
'config[show_out_of_stock]',
'',$this->config->get('show_out_of_stock',1));
?>
					</td>
				</tr>
				<tr id="prev_next_display_line">
					<td class="key"><?php echo
JText::_('DISPLAY_OTHER_PRODUCT_SHORTCUT');?></td>
					<td>
						<?php echo JHTML::_('hikaselect.booleanlist',
'config[show_other_product_shortcut]' ,
'',$this->config->get('show_other_product_shortcut',0));
?>
					</td>
				</tr>
<?php if(hikashop_level(2)){ ?>
				<tr id="prev_next_display_line">
					<td class="key"><?php echo
JText::_('DISPLAY_FILTERS_ON_PRODUCT_LISTING');?></td>
					<td>
						<?php echo JHTML::_('hikaselect.booleanlist',
'config[show_filters]' ,
'',$this->config->get('show_filters',1)); ?>
					</td>
				</tr>
<?php } ?>
				<tr>
					<td class="key"><?php echo
JText::_('DISPLAY_BADGE');?></td>
					<td>
						<?php echo JHTML::_('hikaselect.booleanlist',
'config[default_params][display_badges]' ,
'',@$this->default_params['display_badges']); ?>
					</td>
				</tr>
			</table>
		</fieldset>
	<!-- CATEGORIES -->
		<div id="display_categories"></div>
		<fieldset class="adminform">
			<legend><?php echo JText::_(
'DEFAULT_PARAMS_FOR_CATEGORIES' ); ?></legend>
			<table class="admintable table"
cellspacing="1">
				<tr>
					<td class="key"><?php echo
JText::_('ORDERING_FIELD');?></td>
					<td>
						<?php echo
$this->orderType->display('config[default_params][category_order]',$this->default_params['category_order'],'category');?>
					</td>
				</tr>
				<tr>
					<td class="key"><?php echo
JText::_('SHOW_SUB_CATEGORIES');?></td>
					<td>
						<?php echo
$this->listType->display('config[default_params][child_display_type]',$this->default_params['child_display_type']);?>
					</td>
				</tr>
				<tr>
					<td class="key"><?php echo
JText::_('NUMBER_OF_SUB_CATEGORIES');?></td>
					<td>
						<input name="config[default_params][child_limit]"
type="text" value="<?php echo
@$this->default_params['child_limit'];?>" />
					</td>
				</tr>
				<tr>
					<td class="key"><?php echo
JText::_('DISPLAY_VOTE_IN_CATEGORIES');?></td>
					<td>
						<?php echo JHTML::_('hikaselect.booleanlist',
'config[default_params][show_vote]' ,
'',@$this->default_params['show_vote']); ?>
					</td>
				</tr>
				<tr>
					<td class="key"><?php echo
JText::_('SHOW_NUMBER_OF_PRODUCTS');?></td>
					<td>
						<?php echo JHTML::_('hikaselect.booleanlist',
'config[default_params][number_of_products]' ,
'',@$this->default_params['number_of_products']);
?>
					</td>
				</tr>
				<tr>
					<td class="key"><?php echo
JText::_('LINK_ON_MAIN_CATEGORIES');?></td>
					<td>
						<?php echo JHTML::_('hikaselect.booleanlist',
'config[default_params][links_on_main_categories]' ,
'',@$this->default_params['links_on_main_categories']);
?>
					</td>
				</tr>
				<tr>
					<td class="key"><?php echo
JText::_('ONLY_DISPLAY_CATEGORIES_WITH_PRODUCTS');?></td>
					<td>
						<?php echo JHTML::_('hikaselect.booleanlist',
'config[default_params][only_if_products]' ,
'',@$this->default_params['only_if_products']);
?>
					</td>
				</tr>
			</table>
		</fieldset>
	<!-- DIVS -->
		<div id="display_divs"></div>
		<fieldset class="adminform">
			<legend><?php echo JText::_( 'DEFAULT_PARAMS_FOR_DIV'
); ?></legend>
			<table class="admintable table"
cellspacing="1">
				<tr>
					<td class="key"><?php echo
JText::_('TYPE_OF_ITEM_LAYOUT');?></td>
					<td>
						<?php echo
$this->itemType->display('config[default_params][div_item_layout_type]',$this->default_params['div_item_layout_type'],$this->js);?>
					</td>
				</tr>
				<tr>
					<td class="key"><?php echo
JText::_('ITEMconfig/tmpl/features.php000064400000050106151162050350011314
0ustar00))
						);
						echo JHTML::_('hikaselect.radiolist', $values,
'config[default_params][border_visible]' , '',
'value', 'text',
@$this->default_params['border_visible']);
					?></td>
				</tr>
				<tr>
					<td class="key"><?php echo
JText::_('ITEM_BOX_ROUND_CORNER');?></td>
					<td>
						<?php echo JHTML::_('hikaselect.booleanlist',
'config[default_params][rounded_corners]' ,
'',@$this->default_params['rounded_corners']);
?>
					</td>
				</tr>
				<tr>
					<td class="key"><?php echo
JText::_('TEXT_CENTERED');?></td>
					<td>
						<?php echo JHTML::_('hikaselect.booleanlist',
'config[default_params][text_center]' ,
'',@$this->default_params['text_center']); ?>
					</td>
				</tr>
			</table>
		</fieldset>
				</div>
			</td>
		</tr>
	</table>
</div>
config/tmpl/features.php000064400000050106151162050350011314
0ustar00<?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
echo $this->leftmenu(
	'features',
	array(
		'#features_main' => JText::_('MAIN'),
		'#features_vote' => JText::_('VOTE_AND_COMMENT'),
		'#features_affiliate' => JText::_('AFFILIATE'),
		'#features_wishlist' => JText::_('WISHLIST'),
		'#features_waitlist' =>
JText::_('HIKA_WAITLIST'),
		'#features_compare' => JText::_('COMPARE'),
		'#features_sef' => JText::_('SEF_URL_OPTIONS'),
		'#features_filter' => JText::_('FILTER'),
		'#features_atom' => JText::_('ALL_FEED')
	)
);
?>
<div id="page-features" class="rightconfig-container
<?php if(HIKASHOP_BACK_RESPONSIVE) echo
'rightconfig-container-j30';?>">
	<table style="width:100%;">
		<tr>
			<td valign="top" width="50%">
	<!-- MAIN -->
				<div id="features_main">
				<fieldset class="adminform">
					<legend><?php echo JText::_( 'MAIN' );
?></legend>
					<table class="admintable table"
cellspacing="1">
						<tr>
							<td class="key">
								<?php echo JText::_('CATALOGUE_MODE'); ?>
							</td>
							<td>
								<?php echo JHTML::_('hikaselect.booleanlist',
'config[catalogue]','onchange="if(this.value==1)
alert(\''.JText::_('CATALOGUE_MODE_WARNING',true).'\');"',$this->config->get('catalogue'));?>
							</td>
						</tr>
						<tr>
							<td class="key">
								<?php echo JText::_('ENABLE_MULTI_CART'); ?>
							</td>
							<td>
								<?php echo JHTML::_('hikaselect.booleanlist',
'config[enable_multicart]','',$this->config->get('enable_multicart',1));?>
							</td>
						</tr>
					</table>
				</fieldset>
				</div>
	<!-- VOTE -->
				<div id="features_vote">
				<fieldset class="adminform">
					<legend><?php echo JText::_( 'VOTE_AND_COMMENT' );
?></legend>
					<table class="admintable table"
cellspacing="1">
						<tr id="vote_display_line">
							<td class="key">
								<?php echo JText::_('DISPLAY_VOTE_OF_PRODUCTS');?>
							</td>
							<td>
								<?php echo JHTML::_('hikaselect.booleanlist',
'config[default_params][show_vote_product]' ,
'',@$this->default_params['show_vote_product']);
?>
							</td>
						</tr>
						<tr id="hika_hide_vote">
							<td class="key">
									<?php echo JText::_('ENABLE_STATUS'); ?>
							</td>
							<td>
								<?php
									$arr = array(
										JHTML::_('select.option', 'nothing',
JText::_('Nothing') ),
										JHTML::_('select.option', 'vote',
JText::_('Vote only') ),
										JHTML::_('select.option', 'comment',
JText::_('Comment only') ),
										JHTML::_('select.option', 'two',
JText::_('Vote & Comment') ),
										JHTML::_('select.option', 'both',
JText::_('Vote & Comment connected') )
									);
									echo JHTML::_('hikaselect.genericlist', $arr,
"config[enable_status_vote]", 'class="inputbox"
size="1"', 'value', 'text',
$this->config->get('enable_status_vote',0));
								?>
							</td>
						</tr>
						<tr>
							<td class="key">
								<?php echo JText::_('ACCESS_VOTE'); ?>
							</td>
							<td>
								<?php
									$arr = array(
										JHTML::_('select.option', 'public',
JText::_('Public') ),
										JHTML::_('select.option', 'registered',
JText::_('Registered') ),
										JHTML::_('select.option', 'buyed',
JText::_('Bought') )
									);
									echo JHTML::_('hikaselect.genericlist', $arr,
"config[access_vote]", 'class="inputbox"
size="1"', 'value', 'text',
$this->config->get('access_vote',0));
								?>
							</td>
						</tr>
						<tr><td style="padding: 4px 0 4px
0;"></td></tr>
						<tr>
							<td class="key" >
								<?php echo JText::_('STAR_NUMBER'); ?>
							</td>
							<td>
								<input class="inputbox" type="text"
name="config[vote_star_number]" value="<?php echo
$this->config->get('vote_star_number',5);?>" />
							</td>
						</tr>
						<tr><td style="padding: 4px 0 4px
0;"></td></tr>
						<tr>
							<td class="key" >
								<?php echo JText::_('EMAIL_COMMENT'); ?>
							</td>
							<td>
								<?php echo JHTML::_('hikaselect.booleanlist',
"config[email_comment]" , '',
$this->config->get('email_comment',0)); ?>
							</td>
						</tr>
						<tr>
							<td class="key" >
								<?php echo JText::_('PUBLISHED_COMMENT'); ?>
							</td>
							<td>
								<?php echo JHTML::_('hikaselect.booleanlist',
"config[published_comment]" , '',
$this->config->get('published_comment',1)); ?>
							</td>
						</tr>
						<tr>
							<td class="key" >
								<?php echo JText::_('EMAIL_NEW_COMMENT'); ?>
							</td>
							<td>
								<input class="inputbox" type="text"
name="config[email_each_comment]" value="<?php echo
$this->config->get('email_each_comment');?>" />
							</td>
						</tr>
						<tr>
							<td class="key" >
								<?php echo JText::_('COMMENT_BY_PERSON_BY_PRODUCT');
?>
							</td>
							<td>
								<input class="inputbox" type="text"
name="config[comment_by_person_by_product]" value="<?php
echo
$this->config->get('comment_by_person_by_product',5);?>"
/>
							</td>
						</tr>
						<tr><td style="padding: 4px 0 4px
0;"></td></tr>
						<tr>
							<td class="key" >
								<?php echo JText::_('NUMBER_COMMENT_BY_PRODUCT');
?>
							</td>
							<td>
								<input class="inputbox" type="text"
name="config[number_comment_product]" value="<?php echo
$this->config->get('number_comment_product',30);
?>" />
							</td>
						</tr>
						<tr>
							<td class="key">
									<?php echo JText::_('VOTE_COMMENT_SORT'); ?>
							</td>
							<td>
								<?php
									$arr = array(
										JHTML::_('select.option', 'date',
JText::_('DATE') ),
										JHTML::_('select.option', 'helpful',
JText::_('HELPFUL') ),
									);
									echo JHTML::_('hikaselect.genericlist', $arr,
"config[vote_comment_sort]", 'class="inputbox"
size="1"', 'value', 'text',
$this->config->get('vote_comment_sort',0));
								?>
							</td>
						</tr>
						<tr>
							<td class="key" >
								<?php echo JText::_('VOTE_COMMENT_SORT_FRONTEND');
?>
							</td>
							<td>
								<?php echo JHTML::_('hikaselect.booleanlist',
"config[vote_comment_sort_frontend]" , '',
$this->config->get('vote_comment_sort_frontend',0)); ?>
							</td>
						</tr>
						<tr>
							<td class="key" >
								<?php echo JText::_('SHOW_LISTING_COMMENT'); ?>
							</td>
							<td>
								<?php echo JHTML::_('hikaselect.booleanlist',
"config[show_listing_comment]" , '',
$this->config->get('show_listing_comment',0)); ?>
							</td>
						</tr>
						<tr>
							<td class="key" >
								<?php echo JText::_('SHOW_COMMENT_DATE'); ?>
							</td>
							<td>
								<?php echo JHTML::_('hikaselect.booleanlist',
"config[show_comment_date]" , '',
$this->config->get('show_comment_date',0)); ?>
							</td>
						</tr>
						<tr>
							<td class="key" >
								<?php echo JText::_('USEFUL_RATING'); ?>
							</td>
							<td>
								<?php echo JHTML::_('hikaselect.booleanlist',
"config[useful_rating]" , '',
$this->config->get('useful_rating',1)); ?>
							</td>
						</tr>
						<tr>
							<td class="key" >
								<?php echo JText::_('REGISTER_NOTE_COMMENT'); ?>
							</td>
							<td>
								<?php echo JHTML::_('hikaselect.booleanlist',
"config[register_note_comment]" , '',
$this->config->get('register_note_comment',0)); ?>
							</td>
						</tr>
						<tr>
							<td class="key">
									<?php echo JText::_('VOTE_USEFUL_STYLE'); ?>
							</td>
							<td>
								<?php
									$arr = array(
										JHTML::_('select.option', 'helpful',
JText::_('3 of 5 find it helpful') ),
										JHTML::_('select.option', 'thumbs',
JText::_('3 up 2 down') ),
									);
									echo JHTML::_('hikaselect.genericlist', $arr,
"config[vote_useful_style]", 'class="inputbox"
size="1"', 'value', 'text',
$this->config->get('vote_useful_style',0));
								?>
							</td>
						</tr>
					</table>
				</fieldset>
				</div>
	<!-- AFFILIATE -->
<?php
$pluginClass = hikashop_get('class.plugins');
$plugin = JPluginHelper::getPlugin('system',
'hikashopaffiliate');
if(empty($plugin)){
	$affiliate_active = false;
}else{
	$affiliate_active = true;
}
if(hikashop_level(2)&&$affiliate_active) {
	$this->setLayout('affiliate');
	echo $this->loadTemplate();
}
?>
	<!-- WISHLIST -->
				<div id="features_wishlist">
				<fieldset class="adminform">
				<legend><?php echo JText::_( 'WISHLIST' );
?></legend>
				<?php if(hikashop_level(1)){ ?>
						<table class="admintable table"
cellspacing="1">
							<tr>
								<td class="key">
									<?php echo JText::_('ENABLE_WISHLIST'); ?>
								</td>
								<td>
									<?php echo JHTML::_('hikaselect.booleanlist',
'config[enable_wishlist]','',$this->config->get('enable_wishlist',1));
?>
								</td>
							</tr>
							<tr>
								<td class="key">
									<?php echo JText::_('HIDE_WISHLIST_GUEST'); ?>
								</td>
								<td>
									<?php echo JHTML::_('hikaselect.booleanlist',
'config[hide_wishlist_guest]','',$this->config->get('hide_wishlist_guest',1));?>
								</td>
							</tr>
							<tr>
								<td class="key">
									<?php echo
JText::_('DISPLAY_ADD_TO_WISHLIST_BUTTON_FOR_FREE_PRODUCT');
?>
								</td>
								<td>
									<?php echo JHTML::_('hikaselect.booleanlist',
'config[display_add_to_wishlist_for_free_products]','',$this->config->get('display_add_to_wishlist_for_free_products',1));?>
								</td>
							</tr>
							<tr>
								<td class="key">
									<?php echo JText::_('CHECKOUT_CONVERT_CART'); ?>
								</td>
								<td>
									<?php echo JHTML::_('hikaselect.booleanlist',
'config[checkout_convert_cart]','',$this->config->get('checkout_convert_cart',1));?>
								</td>
							</tr>
							<tr>
								<td class="key">
									<?php echo JText::_('WISHLIST_TO_COMPARE'); ?>
								</td>
								<td>
									<?php echo JHTML::_('hikaselect.booleanlist',
'config[wishlist_to_compare]','',$this->config->get('wishlist_to_compare',1));?>
								</td>
							</tr>
						</table>
						<?php }else{
							echo hikashop_getUpgradeLink('essential');
						} ?>
				</fieldset>
				</div>
	<!-- WAITLIST -->
				<div id="features_waitlist">
				<fieldset class="adminform">
				<legend><?php echo JText::_( 'HIKA_WAITLIST' );
?></legend>
						<table class="admintable table"
cellspacing="1">
							<tr>
								<td class="key">
									<?php echo JText::_('ACTIVATE_WAITLIST'); ?>
								</td>
								<td>
									<?php if(hikashop_level(1)){
										echo
$this->waitlist->display('config[product_waitlist]',$this->config->get('product_waitlist',0));
									}else{
										echo '<small
style="color:red">'.JText::_('ONLY_COMMERCIAL').'</small>';
									} ?>
								</td>
							</tr>
							<tr>
								<td class="key">
									<?php echo JText::_('WAITLIST_SUBSCRIBE_LIMIT');
?>
								</td>
								<td>
									<?php if(hikashop_level(1)){
										?><input class="inputbox" type="text"
name="config[product_waitlist_sub_limit]" value="<?php
echo
$this->config->get('product_waitlist_sub_limit','20');
?>"/><?php
									}else{
										echo '<small
style="color:red">'.JText::_('ONLY_COMMERCIAL').'</small>';
									} ?>
								</td>
							</tr>
							<tr>
								<td class="key">
									<?php echo JText::_('WAITLIST_SEND_LIMIT'); ?>
								</td>
								<td>
									<?php if(hikashop_level(1)){
										?><input class="inputbox" type="text"
name="config[product_waitlist_send_limit]" value="<?php
echo
$this->config->get('product_waitlist_send_limit','5');
?>"/><?php
									}else{
										echo '<small
style="color:red">'.JText::_('ONLY_COMMERCIAL').'</small>';
									} ?>
								</td>
							</tr>
						</table>
				</fieldset>
				</div>
	<!-- COMPARE -->
				<div id="features_compare">
				<fieldset class="adminform">
				<legend><?php echo JText::_( 'COMPARE' );
?></legend>
						<table class="admintable table"
cellspacing="1">
							<tr>
								<td class="key">
									<?php echo JText::_('COMPARE_MODE'); ?>
								</td>
								<td>
									<?php if(hikashop_level(2)){
										echo
$this->compare->display('config[show_compare]',$this->config->get('show_compare'));
									}else{
										echo '<small
style="color:red">'.JText::_('ONLY_FROM_BUSINESS').'</small>';
									} ?>
								</td>
							</tr>
							<?php if(hikashop_level(2)){ ?>
							<tr>
								<td class="key">
									<?php echo JText::_('COMPARE_LIMIT'); ?>
								</td>
								<td>
									<input class="inputbox" type="text"
name="config[compare_limit]" value="<?php echo
$this->config->get('compare_limit','5');
?>"/>
								</td>
							</tr>
							<?php } ?>
							<tr>
								<td class="key">
									<?php echo JText::_('COMPARE_TO_WISHLIST'); ?>
								</td>
								<td>
									<?php echo JHTML::_('hikaselect.booleanlist',
'config[compare_to_wishlist]','',$this->config->get('compare_to_wishlist',1));?>
								</td>
							</tr>
						</table>
				</fieldset>
				</div>
	<!-- SEF -->
				<div id="features_sef">
				<fieldset class="adminform"
style="width:95%">
					<legend><?php echo JText::_( 'SEF_URL_OPTIONS' );
?></legend>
						<table class="table">
							<tr>
								<td>
										<?php
											$sefOptions='';
											if($this->config->get('activate_sef',1)==0){
												$sefOptions='style="display:none"';
											}
										?>
										<table class="admintable" cellspacing="1"
width="100%">
											<tr>
												<td class="key">
													<?php echo JText::_('SIMPLIFIED_BREADCRUMBS');
?>
												</td>
												<td>
													<?php echo JHTML::_('hikaselect.booleanlist',
"config[simplified_breadcrumbs]",'',$this->config->get('simplified_breadcrumbs',1));
?>
												</td>
											</tr>
											<tr>
												<td class="key">
													<?php echo JText::_('ACTIVATE_SMALLER_URL');
?>
												</td>
												<td>
													<?php echo JHTML::_('hikaselect.booleanlist',
"config[activate_sef]",'onclick="setVisible(this.value);"',$this->config->get('activate_sef',1));
?>
												</td>
											</tr>
											<tr id="sef_cat_name" <?php echo $sefOptions;
?>>
												<td class="key">
													<?php echo JText::_('CATEGORY_LISTING_SEF_NAME');
?>
												</td>
												<td>
													<input class="inputbox" type="text"
id="cat_sef" name="config[category_sef_name]"
value="<?php echo
$this->config->get('category_sef_name',
'category'); ?>"
onchange="checkSEF(this,document.getElementById('prod_sef').value,'<?php
echo $this->config->get('category_sef_name',
'category'); ?>');">
												</td>
											</tr>
											<tr id="sef_prod_name" <?php echo $sefOptions;
?>>
												<td class="key">
													<?php echo JText::_('PRODUCT_SHOW_SEF_NAME');
?>
												</td>
												<td>
													<input class="inputbox" type="text"
id="prod_sef" name="config[product_sef_name]"
value="<?php echo
$this->config->get('product_sef_name',
'product'); ?>"
onchange="checkSEF(this,document.getElementById('cat_sef').value,'<?php
echo $this->config->get('product_sef_name',
'category'); ?>');">
												</td>
											</tr>
											<tr id="sef_checkout_name" <?php echo
$sefOptions; ?>>
												<td class="key">
													<?php echo JText::_('CHECKOUT_SEF_NAME'); ?>
												</td>
												<td>
													<input class="inputbox" type="text"
id="prod_sef" name="config[checkout_sef_name]"
value="<?php echo
$this->config->get('checkout_sef_name',
'checkout'); ?>">
												</td>
											</tr>
										</table>
								</td>
							</tr>
						</table>
				</fieldset>
				</div>
	<!-- FILTER -->
				<div id="features_filter">
				<fieldset class="adminform">
				<legend><?php echo JText::_( 'FILTER' );
?></legend>
								<?php if(hikashop_level(2)){ ?>
								<table class="admintable table"
cellspacing="1">
									<tr>
										<td class="key">
											<?php echo JText::_('NUMBER_OF_COLUMNS');?>
										</td>
										<td>
											<input name="config[filter_column_number]"
type="text" value="<?php echo
$this->config->get('filter_column_number',2)?>"
/>
										</td>
									</tr>
									<tr>
										<td class="key">
											<?php echo JText::_('LIMIT');?>
										</td>
										<td>
											<input name="config[filter_limit]"
type="text" value="<?php echo
$this->config->get('filter_limit')?>" />
										</td>
									</tr>
									<tr>
										<td class="key">
											<?php echo JText::_('HEIGHT');?>
										</td>
										<td>
											<input name="config[filter_height]"
type="text" value="<?php echo
$this->config->get('filter_height',100)?>" />
										</td>
									</tr>
									<tr>
										<td class="key" >
											<?php echo JText::_('SHOW_RESET_BUTTON'); ?>
										</td>
										<td>
											<?php echo JHTML::_('hikaselect.booleanlist',
'config[show_reset_button]' ,
'',@$this->config->get('show_reset_button',0));
?>
										</td>
									</tr>
									<tr>
										<td class="key" >
											<?php echo JText::_('SHOW_FILTER_BUTTON'); ?>
										</td>
										<td>
											<?php echo JHTML::_('hikaselect.booleanlist',
'config[show_filter_button]' ,
'',@$this->config->get('show_filter_button',1));
?>
										</td>
									</tr>
									<tr>
										<td class="key" >
											<?php echo JText::_('DISPLAY_FIELDSET'); ?>
										</td>
										<td>
											<?php echo JHTML::_('hikaselect.booleanlist',
'config[display_fieldset]' ,
'',@$this->config->get('display_fieldset',1));
?>
										</td>
									</tr>
									<tr>
										<td class="key" >
											<?php echo JText::_('FILTER_BUTTON_POSITION');
?>
										</td>
										<td>
											<?php echo
$this->filterButtonType->display('config[filter_button_position]',$this->config->get('filter_button_position'));?>
										</td>
									</tr>
								</table>
								<?php }else{
									echo '<small
style="color:red">'.JText::_('ONLY_FROM_BUSINESS').'</small>';
								} ?>
				</fieldset>
				</div>
																			<!-- ATOM & RSS -->
				<div id="features_atom">
				<fieldset class="adminform">
					<legend><?php echo JText::_( 'ALL_FEED' );
?></legend>
					<table class="admintable table"
cellspacing="1">
						<tr>
							<td class="key">
								<?php echo JText::_('HIKA_TYPE'); ?>
							</td>
							<td>
								<?php echo $this->elements->hikarss_format; ?>
							</td>
						</tr>
						<tr>
							<td config/tmpl/index.html000064400000000032151162050350010753
0ustar00lements->hikarss_order;
?>config/tmpl/language.php000064400000003752151162050350011266
0ustar00config/tmpl/index.html000064400000000032151162050350010753
0ustar00<html><body></body></html>config/tmpl/language.php000064400000003752151162050350011266
0ustar00<?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');
?><form action="index.php?tmpl=component&amp;option=<?php
echo HIKASHOP_COMPONENT ?>" method="post" 
name="adminForm" id="adminForm" >
	<fieldset>
		<div class="hikashop_header" style="float:
left;"><?php echo
JTexconfig/tmpl/languages.php000064400000006047151162050350011451 0ustar00p
if(!empty($this->showLatest)){ ?><button class="btn"
style="text-align:right" type="button"
onclick="javascript:submitbutton('latest')"><?php
echo JText::_('LOAD_LATEST_LANGUAGE');
?></button><?php } ?>
		</legend>
		<textarea style="width:100%;" rows="18"
name="content" id="translation" ><?php echo
@$this->file->content;?></textarea>
	</fieldset>
	<fieldset class="adminform">
		<legend><?php echo JText::_( 'OVERRIDE').' :
'; ?></legend>
		<?php echo JText::_( 'OVERRIDE_WITH_EXPLANATION'); ?>
		<textarea style="width:100%;" rows="18"
name="content_override" id="translation_override"
><?php echo $this->override_content;?></textarea>
	</fieldset>
	<div class="clr"></div>
	<input type="hidden" name="code"
value="<?php echo $this->file->name; ?>" />
	<input type="hidden" name="option"
value="<?php echo HIKASHOP_COMPONENT; ?>" />
	<input type="hidden" name="task" value=""
/>
	<input type="hidden" name="ctrl"
value="config" />
	<?php echo JHTML::_( 'form.token' ); ?>
</form>
config/tmpl/languages.php000064400000006047151162050350011451
0ustar00<?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 if(!HIKASHOP_BACK_RESPONSIVE) { ?>
<div id="page-languages">
<?php } else { ?>
<div id="page-languages" class="row-fluid">
	<div class="span12">
<?php } ?>
		<table class="admintable table"
cellspacing="1">
			<tr>
				<td class="key" >
					<?php echo JText::_('MULTI_LANGUAGE_EDIT'); ?>
				</td>
				<td>
					<?php
					if(hikashop_level(1)){
						$translationHelper = hikashop_get('helper.translation');
						if($translationHelper->isMulti(true)){
							$update = hikashop_get('helper.update');
							$update->addJoomfishElements(false);
							echo JHTML::_('hikaselect.booleanlist',
"config[multi_language_edit]" , '',
$this->config->get('multi_language_edit'));
						}else{
							echo JText::_('INSTALL_JOOMFISH');
						}
					}else{
						echo JHTML::_('hikaselect.booleanlist',
"config[multi_language_edit]" , ' DISABLED', 0).'
<small
style="color:red">'.JText::_('ONLY_COMMERCIAL').'</small>';
					}
					?>
				</td>
			</tr>
			<?php if(hikashop_level(1)){ ?>
			<tr>
				<td class="key" >
				<?php echo JText::_('DEFAULT_TRANSLATION_PUBLISH'); ?>
				</td>
				<td>
					<?php echo JHTML::_('hikaselect.booleanlist',
"config[default_translation_publish]" ,
'',$this->config->get('default_translation_publish',0)
);?>
				</td>
			</trconfig/tmpl/leftmenu.php000064400000003356151162050350011322
0ustar00 0;
					for($i = 0,$a = count($this->languages);$i<$a;$i++){
						$row =& $this->languages[$i];
				?>
					<tr class="row<?php echo $k; ?>">
						<td align="center">
						<?php echo $i+1; ?>
						</td>
						<td  align="center">
							<?php if($this->manage) echo $row->edit; ?>
						</td>
						<td align="center">
							<?php echo $row->name; ?>
						</td>
						<td align="center">
							<?php echo $row->language; ?>
						</td>
					</tr>
				<?php
						$k = 1-$k;
					}
				?>
			</tbody>
		</table>
</div>
config/tmpl/leftmenu.php000064400000003356151162050350011322
0ustar00<?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('_JEconfig/tmpl/main.php000064400000102607151162050350010426
0ustar00eft;"></div></li>
<?php
	}
	if(HIKASHOP_BACK_RESPONSIVE){
		?>
		<li id="responsive_menu_scrolltop_li_<?php echo
$this->menuname; ?>">
			<a style="text-align:center;" href="#"
onclick="window.scrollTo(0, 0);">
				<span class="responsive_menu_scrolltop"
style="padding: 6px 12px 18px 12px; "></span>
			</a>
			<div style="clear:left;"></div>
		</li>
		<?php
	}
?>
		</ul>
<?php if(!HIKASHOP_BACK_RESPONSIVE) { ?>
		<a id="menu-save-button-<?php echo $this->menuname;
?>" class="menu-save-button"
onclick="window.hikashop.submitform('apply',
'adminForm'); return false;" href="#"
style="float: right; margin:0px 4px 2px 0px;">
			<span class="menuSave_img" style="padding: 12px
16px;"> </span>
		</a>
<?php } ?>
	</div>
</div>
config/tmpl/main.php000064400000102607151162050350010426 0ustar00<?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
echo $this->leftmenu(
	'main',
	array(
		'#main_global' => JText::_('MAIN'),
		'#main_address' => JText::_('ADDRESS'),
		'#main_currency' => JText::_('CURRENCY'),
		'#main_tax' => JText::_('TAXES'),
		'#main_product' => JText::_('PRODUCT'),
		'#main_cart' =>
JText::_('HIKASHOP_CHECKOUT_CART'),
		'#main_order' => JText::_('HIKASHOP_ORDER'),
		'#main_files' => JText::_('FILES'),
		'#main_images' => JText::_('HIKA_IMAGES'),
		'#main_emails' => JText::_('EMAILS'),
		'#main_advanced' =>
JText::_('HIKA_ADVANCED_SETTINGS')
	)
);
?>
<div id="page-main" class="rightconfig-container <?php
if(HIKASHOP_BACK_RESPONSIVE) echo
'rightconfig-container-j30';?>">
<table style="width:100%;">
<tr>
	<td valign="top" width="50%">
	<!-- MAIN - GLOBAL -->
		<div id="main_global">
			<fieldset class="adminform">
				<legend><?php echo JText::_( 'MAIN' );
?></legend>
				<table class="admintable table"
style="width:100%" cellspacing="1">
					<tr>
						<td class="key"><?php echo
JText::_('PUT_STORE_OFFLINE'); ?></td>
						<td><?php
							echo JHTML::_('hikaselect.booleanlist',
"config[store_offline]",'onchange="if(this.checked
&& this.value==1)
alert(\''.JText::_('STORE_OFFLINE_WARNING',true).'\');"',$this->config->get('store_offline',0));
						?></td>
					</tr>
					<tr>
						<td class="key" ><?php echo
JText::_('HIKA_EDITOR'); ?></td>
						<td><?php
							echo $this->elements->editor;
						?></td>
					</tr>
					<tr>
						<td class="key" ><?php echo
JText::_('READ_MORE'); ?></td>
						<td><?php
							echo JHTML::_('hikaselect.booleanlist',
"config[readmore]",'',$this->config->get('readmore'));
						?></td>
					</tr>
				</table>
			</fieldset>
		</div>
	<!-- ADDRESS -->
		<div id="main_address">
			<fieldset class="adminform">
				<legend><?php echo JText::_( 'ADDRESS' );
?></legend>
				<table class="admintable table"
style="width:100%" cellspacing="1">
					<tr>
						<td class="key"><?php echo
JText::_('STORE_ADDRESS'); ?></td>
						<td>
							<textarea class="inputbox"
name="config_store_address" cols="30"
rows="5"><?php echo
$this->config->get('store_address');
?></textarea>
						</td>
					</tr>
					<tr>
						<td class="key"><?php echo
JText::_('DEFAULT_ADDRESS_TYPE'); ?></td>
						<td><?php
							echo
$this->tax->display('config[default_type]',$this->config->get('default_type'));
						?></td>
					</tr>
				</table>
			</fieldset>
		</div>
	<!-- CURRENCY -->
		<div id="main_currency">
			<fieldset class="adminform">
				<legend><?php echo JText::_( 'CURRENCY' );
?></legend>
				<table class="admintable table"
style="width:100%" cellspacing="1">
					<tr>
						<td class="key"><?php echo
JText::_('MAIN_CURRENCY'); ?></td>
						<td>
							<?php echo
$this->currency->display('config[main_currency]',$this->config->get('main_currency'));
?>
							<a href="<?php echo
hikashop_completeLink('currency');?>">
								<img src="<?php echo
HIKASHOP_IMAGES.'go.png';?>" title="Go to the
currencies management" alt="Go to the currencies
management"/>
							</a>
						</td>
					</tr>
<?php if($this->rates_active){ ?>
					<tr>
						<td class="key"><?php echo
JText::_('RATES_REFRESH_FREQUENCY'); ?></td>
						<td><?php
							echo
$this->delayTypeRates->display('params[hikashop][rates][frequency]',@$this->rates_params['frequency'],3);
						?></td>
					</tr>
<?php } ?>
				</table>
			</fieldset>
		</div>
	<!-- TAX -->
		<div id="main_tax">
			<fieldset class="adminform">
				<legend><?php echo JText::_( 'TAXES' );
?></legend>
				<table class="admintable table"
style="width:100%" cellspacing="1">
					<tr>
						<td class="key"><?php echo
JText::_('DETAILED_TAX_DISPLAY');?></td>
						<td>
							<?php echo JHTML::_('hikaselect.booleanlist',
'config[detailed_tax_display]' ,
'',@$this->config->get('detailed_tax_display'));
?>
						</td>
					</tr>
					<tr>
						<td class="key"><?php echo
JText::_('ZONE_TAX_ADDRESS_TYPE'); ?></td>
						<td><?php
							echo
$this->tax_zone->display('config[tax_zone_type]',$this->config->get('tax_zone_type'));
						?></td>
					</tr>
					<tr>
						<td class="key"><?php echo
JText::_('MAIN_TAX_ZONE'); ?></td>
						<td>
							<span id="zone_id" >
								<?php echo (int)@$this->zone->zone_id.'
'.@$this->zone->zone_name_english; ?>
								<input type="hidden"
name="config[main_tax_zone]" value="<?php echo
@$this->zone->zone_id; ?>" />
							</span>
							<?php
								echo $this->popup->display(
									'<img
src="'.HIKASHOP_IMAGES.'edit.png"
alt="edit"/>',
									'MAIN_TAX_ZONE',
									hikashop_completeLink('zone&task=selectchildlisting&type=config',true),
									'main_tax_zone_select',
									760, 480, '', '', 'link'
								);
							?>
							<a href="#"
onclick="document.getElementById('zone_id').innerHTML='0
<?php echo
$this->escape(JText::_('ZONE_NOT_FOUND'));?>';return
false;" >
								<img src="<?php echo HIKASHOP_IMAGES;
?>delete.png" alt="delete"/>
							</a>
						</td>
					</tr>
					<tr>
						<td class="key"><?php echo
JText::_('VAT_CHECK'); ?></td>
						<td><?php
							echo
$this->vat->display('config[vat_check]',$this->config->get('vat_check'));
						?></td>
					</tr>
					<tr>
						<td class="key"><?php echo
JText::_('SHOW_TAXED_PRICES'); ?></td>
						<td><?php
							echo
$this->pricetaxType->display('config[price_with_tax]' ,
$this->config->get('price_with_tax',@$this->default_params['price_with_tax']));
						?></td>
					</tr>
					<tr>
						<td class="key"><?php echo
JText::_('ROUND_PRICES_DURING_CALCULATIONS'); ?></td>
						<td><?php
							echo
JHTML::_('hikaselect.booleanlist','config[round_calculations]'
, '',
$this->config->get('round_calculations',0));
						?></td>
					</tr>
					<tr>
						<td class="key"><?php echo
JText::_('APPLY_DISCOUNTS'); ?></td>
						<td><?php
							echo JHTML::_('hikaselect.booleanlist',
"config[discount_before_tax]",'',$this->config->get('discount_before_tax'),JTEXT::_('BEFORE_TAXES'),JTEXT::_('AFTER_TAXES'));
						?></td>
					</tr>
				</table>
			</fieldset>
		</div>
	<!-- PRODUCT -->
		<div id="main_product">
			<fieldset class="adminform">
				<legend><?php echo JText::_( 'PRODUCT' );
?></legend>
				<table class="admintable table"
style="width:100%" cellspacing="1">
					<tr>
						<td class="key"><?php echo
JText::_('DEFAULT_VARIANT_PUBLISH'); ?></td>
						<td><?php
							echo JHTML::_('hikaselect.booleanlist',
"config[variant_default_publish]" ,
'',$this->config->get('variant_default_publish',1)
);
						?></td>
					</tr>
					<tr>
						<td class="key"><?php echo
JText::_('PRODUCT_SHOW_MODULES'); ?></td>
						<td>
							<input type="hidden"
name="config[product_show_modules]'; ?>"
id="menumodules"  value="<?php echo
$this->config->get('product_show_modules'); ?>"
/>
							<?php
								echo $this->popup->display(
									JText::_('SELECT'),
									'SELECT_MODULES',
									'\''.hikashop_completeLink('modules&task=selectmodules&control=menu&name=modules',true).'\'+\'&modules=\'+document.getElementById(\'menumodules\').value',
									'linkmenumodules',
									750, 375, '', '', 'button',true
								);
							?>
							<br/>
							<?php
								$modules =
explode(',',$this->config->get('product_show_modules'));
								$modulesClass = hikashop_get('class.modules');
								foreach($modules as $module){
									$element = $modulesClass->get($module);
									if(!empty($element->title)){
										echo '<a
href="'.hikashop_completeLink('modules&task=edit&cid[]='.@$element->id).'">'.JText::sprintf('OPTIONS_FOR_X',@$element->title).'</a><br/>';
									}
								}
							?>
						</td>
					</tr>
					<tr>
						<td class="key"><?php echo
JText::_('CHARACTERISTICS_DISPLAY'); ?></td>
						<td>
							<?php echo
$this->characteristicdisplayType->display('config[characteristic_display]',$this->config->get('characteristic_display'));?>
						</td>
					</tr>
					<tr>
						<td class="key"><?php echo
JText::_('CHARACTERISTICS_VALUES_ORDER'); ?></td>
						<td>
							<?php echo
$this->characteristicorderType->display('config[characteristics_values_sorting]',$this->config->get('characteristics_values_sorting'));?>
						</td>
					</tr>
					<tr>
						<td class="key"><?php echo
JText::_('APPEND_CHARACTERISTICS_VALUE_TO_PRODUCT_NAME');
?></td>
						<td>
							<?php echo JHTML::_('hikaselect.booleanlist',
'config[append_characteristic_values_to_product_name]','',$this->config->get('append_characteristic_values_to_product_name',1));?>
						</td>
					</tr>
					<tr>
						<td class="key"><?php echo
JText::_('CHARACTERISTICS_DISPLAY_TEXT'); ?></td>
						<td>
							<?php echo JHTML::_('hikaselect.booleanlist',
'config[characteristic_display_text]','',$this->config->get('characteristic_display_text'));?>
						</td>
					</tr>
					<tr>
						<td class="key">
							<?php echo JText::_('UPDATE_AFTER_ORDER_CONFIRM');
?>
						</td>
						<td>
							<?php echo JHTML::_('hikaselect.booleanlist',
"config[update_stock_after_confirm]",'',$this->config->get('update_stock_after_confirm'));
?>
						</td>
					</tr>
				<tr>
					<td class="key"><?php echo
JText::_('DIMENSIONS_DISPLAY'); ?></td>
					<td>
						<?php echo JHTML::_('hikaselect.booleanlist',
'config[dimensions_display]','',$this->config->get('dimensions_display',0));?>
					</td>
				</tr>
				<tr>
					<td class="key"><?php echo
JText::_('WEIGHT_DISPLAY'); ?></td>
					<td>
						<?php echo JHTML::_('hikaselect.booleanlist',
'config[weight_display]','',$this->config->get('weight_display',0));?>
					</td>
				</tr>
				<tr>
					<td class="key"><?php echo
JText::_('DISPLAY_ADD_TO_CART_BUTTON_FOR_FREE_PRODUCT');
?></td>
					<td>
						<?php echo JHTML::_('hikaselect.booleanlist',
'config[display_add_to_cart_for_free_products]','',$this->config->get('display_add_to_cart_for_free_products'));?>
					</td>
				</tr>
				<tr>
					<td class="key"><?php echo
JText::_('QUANTITY_FIELD'); ?></td>
					<td>
						<?php echo
$this->quantity->display('config[show_quantity_field]',$this->config->get('show_quantity_field'));?>
					</td>
				</tr>
				<tr>
					<td class="key"><?php echo
JText::_('DISPLAY_CONTACT_BUTTON'); ?></td>
					<td>
						<?php if(hikashop_level(1)){
							echo
$this->contact->display('config[product_contact]',$this->config->get('product_contact',0));
						}else{
							echo hikashop_getUpgradeLink('essential');;
						} ?>
					</td>
				</tr>
				</table>
			</fieldset>
		</div>
	<!-- CART -->
		<div id="main_cart">
			<fieldset class="adminform">
				<legend><?php echo JText::_(
'HIKASHOP_CHECKOUT_CART' ); ?></legend>
				<table class="admintable table"
style="width:100%" cellspacing="1">
					<tr>
						<td class="key"><?php echo
JText::_('CART_RETAINING_PERIOD'); ?></td>
						<td>
							<?php echo
$this->delayTypeRetaining->display('config[cart_retaining_period]',$this->config->get('cart_retaining_period',2592000));
?>
						</td>
					</tr>
					<tr>
						<td class="key"><?php echo
JText::_('CART_RETAINING_PERIOD_CHECK_FREQUENCY');
?></td>
						<td>
							<?php echo
$this->delayTypeCarts->display('config[cart_retaining_period_check_frequency]',$this->config->get('cart_retaining_period_check_frequency',86400));?><br/>
							<?php echo
JText::sprintf('LAST_CHECK',hikashop_getDate($this->config->get('cart_retaining_period_checked')));?>
						</td>
					</tr>
					<tr>
						<td class="key"><?php echo
JText::_('CLEAN_CART_WHEN_ORDER_IS'); ?></td>
						<td><?php
							$values = array(
								JHTML::_('select.option',
'order_created',JText::_('CREATED')),
								JHTML::_('select.option',
'order_confirmed',JText::_('CONFIRMED'))
							);
							echo JHTML::_('select.genericlist', $values,
'config[clean_cart]', 'class="inputbox"
size="1"', 'value', 'text',
$this->config->get('clean_cart','order_created'));
						?></td>
					</tr>
					<tr>
						<td class="key"><?php echo
JText::_('AFTER_ADD_TO_CART'); ?></td>
						<td>
							<?php echo
$this->cart_redirect->display('config[redirect_url_after_add_cart]',$this->config->get('redirect_url_after_add_cart'));?>
						</td>
					</tr>
						<tr>
							<td class="key">
								<?php echo JText::_('LIMIT_NUMBER_OF_ITEMS_IN_CART');
?>
							</td>
							<td>
								<?php
								if(hikashop_level(1)){
									$item_limit =
$this->config->get('cart_item_limit',0);
									if(empty($item_limit)){
										$item_limit = JText::_('UNLIMITED');
									}
									?>
									<input name="config[cart_item_limit]"
type="text" value="<?php echo $item_limit;?>"
onfocus="if(this.value=='<?php echo
JText::_('UNLIMITED',true); ?>')
this.value='';" />
								<?php }else{
									echo hikashop_getUpgradeLink('essential');;
								} ?>
							</td>
						</tr>
					<tr>
						<td class="key"><?php echo
JText::_('NOTICE_POPUP_DISPLAY_TIME'); ?></td>
						<td>
							<input type="text" class="inputbox"
size="10" name="config[popup_display_time]"
value="<?php echo
(int)$this->config->get('popup_display_time',2000);?>"/>ms
						</td>
					</tr>
					<tr>
						<td class="key"><?php echo
JText::_('WHEN_CART_IS_EMPTY'); ?></td>
						<td>
							<input type="text" class="inputbox"
name="config[redirect_url_when_cart_is_empty]"
value="<?php echo
$this->escape($this->config->get('redirect_url_when_cart_is_empty'));?>"/>
						</td>
					</tr>
					<tr>
						<td class="key"><?php echo
JText::_('ALLOW_USERS_TO_PRINT_CART'); ?></td>
						<td>
							<?php 	echo JHTML::_('hikaselect.booleanlist',
'config[print_cart]','',$this->config->get('print_cart',0));
?>
						</td>
					</tr>
					<tr>
						<td class="key"><?php echo
JText::_('GROUP_OPTIONS_WITH_PRODUCT'); ?></td>
						<td>
							<?php 	echo JHTML::_('hikaselect.booleanlist',
'config[group_options]','',$this->config->get('group_options',0));
?>
						</td>
					</tr>
					<tr>
						<td class="key"><?php echo
JText::_('ADD_TO_CART_POPUP_SIZE'); ?></td>
						<td>
							<input type="text" style="width:50px;"
class="inputbox" name="config[add_to_cart_popup_width]"
value="<?php echo
$this->escape($this->config->get('add_to_cart_popup_width','480'));?>"/>
							x
							<input type="text" style="width:50px;"
class="inputbox"
name="config[add_to_cart_popup_height]" value="<?php echo
$this->escape($this->config->get('add_to_cart_popup_height','140'));?>"/>
						</td>
					</tr>
				</table>
			</fieldset>
		</div>
	<!-- ORDER -->
		<div id="main_order">
			<fieldset class="adminform">
			<legend><?php echo JText::_( 'HIKASHOP_ORDER' );
?></legend>
				<table class="admintable table"
style="width:100%" cellspacing="1">
					<tr>
						<td class="key"><?php echo
JText::_('ORDER_NUMBER_FORMAT'); ?></td>
						<td>
							<?php
							if(hikashop_level(1)){ ?>
								<input class="inputbox" type="text"
name="config[order_number_format]" value="<?php echo
$this->escape($this->config->get('order_number_format','{automatic_code}'));
?>">
							<?php }else{
								echo hikashop_getUpgradeLink('essential');;
							}?>
						</td>
					</tr>
					<tr>
						<td class="key"><?php echo
JText::_('INVOICE_NUMBER_FORMAT'); ?></td>
						<td><?php if(hikashop_level(1)){ ?>
							<input class="inputbox" type="text"
name="config[invoice_number_format]" value="<?php echo
$this->escape($this->config->get('invoice_number_format','{automatic_code}'));
?>">
						<?php
							}else{
								echo hikashop_getUpgradeLink('essential');;
							}
						?></td>
					</tr>
					<tr>
						<td class="key"><?php echo
JText::_('INVOICE_RESET_FREQUENCY'); ?></td>
						<td><?php
							if(hikashop_level(1)){
								$values = array(
									JHTML::_('select.option', '',
JText::_('HIKA_NONE')),
									JHTML::_('select.option', 'year',
JText::_('EVERY_YEARS')),
									JHTML::_('select.option', 'month',
JText::_('EVERY_MONTHS')),
								);
								$value =
$this->config->get('invoice_reset_frequency',
'');
								if(strpos($value, '/') !== false) {
									$values[] = JHTML::_('select.option', $value, $value);
								}
								echo JHTML::_('select.genericlist', $values,
'config[invoice_reset_frequency]',
'class="inputbox" size="1"',
'value', 'text', $value);
							}else{
								echo hikashop_getUpgradeLink('essential');;
							}
						?></td>
					</tr>
					<tr>
						<td class="key"><?php echo
JText::_('DEFAULT_ORDER_STATUS'); ?></td>
						<td>
							<?php echo
$this->order_status->display('config[order_created_status]',$this->config->get('order_created_status'));
?>
						</td>
					</tr>
					<tr>
						<td class="key"><?php echo
JText::_('CONFIRMED_ORDER_STATUS'); ?></td>
						<td>
							<?php echo
$this->order_status->display('config[order_confirmed_status]',$this->config->get('order_confirmed_status'));
?>
						</td>
					</tr>
					<tr>
						<td class="key"><?php echo
JText::_('INVOICE_ORDER_STATUSES'); ?></td>
						<td>
							<input type="text" class="inputbox"
id="invoice_order_statuses"
name="config[invoice_order_statuses]" value="<?php echo
$this->config->get('invoice_order_statuses','confirmed,shipped');
?>" />
							<?php
								echo $this->popup->display(
									'<img src="'.
HIKASHOP_IMAGES.'edit.png"
alt="'.JText::_('HIKA_EDIT').'"/>',
									'INVOICE_ORDER_STATUSES',
									'\''.hikashop_completeLink("category&task=selectstatus&control=invoice_order_statuses",true).'&values=\'+document.getElementById(\'invoice_order_statuses\').value',
									'link_invoice_order_statuses',
									760, 480, '', '', 'link',true
								);
								?>
						</td>
					</tr>
					<tr>
						<td class="key"><?php echo
JText::_('CANCELLED_ORDER_STATUS'); ?></td>
						<td>
							<input type="text" class="inputbox"
id="cancelled_order_status"
name="config[cancelled_order_status]" value="<?php echo
@$this->config->get('cancelled_order_status'); ?>"
/>
							<?php
								echo $this->popup->display(
									'<img src="'.
HIKASHOP_IMAGES.'edit.png"
alt="'.JText::_('HIKA_EDIT').'"/>',
									'CANCELLED_ORDER_STATUS',
									'\''.hikashop_completeLink("category&task=selectstatus&control=cancelled_order_status",true).'&values=\'+document.getElementById(\'cancelled_order_status\').value',
									'link_cancelled_order_status',
									760, 480, '', '', 'link',true
								);
								?>
						</td>
					</tr>
					<tr>
						<td class="key"><?php echo
JText::_('CANCELLABLE_ORDER_STATUS'); ?></td>
						<td>
							<input type="text" class="inputbox"
id="cancellable_order_status"
name="config[cancellable_order_status]" value="<?php echo
@$this->config->get('cancellable_order_status');
?>" />
							<?php
								echo $this->popup->display(
									'<img src="'.
HIKASHOP_IMAGES.'edit.png"
alt="'.JText::_('HIKA_EDIT').'"/>',
									'CANCELLABLE_ORDER_STATUS',
									'\''.hikashop_completeLink("category&task=selectstatus&control=cancellable_order_status",true).'&values=\'+document.getElementById(\'cancellable_order_status\').value',
									'link_cancellable_order_status',
									760, 480, '', '', 'link',true
								);
								?>
						</td>
					</tr>
					<tr>
						<td class="key"><?php echo
JText::_('ALLOW_CUSTOMERS_TO_PAY_ORDERS_AFTERWARD');
?></td>
						<td>
							<?php if(hikashop_level(1)){
								echo JHTML::_('hikaselect.booleanlist',
'config[allow_payment_button]','onchange="displayPaymentChange(this.value)"',$this->config->get('allow_payment_button'));
							}else{
								echo hikashop_getUpgradeLink('essential');;
							} ?>
						</td>
					</tr>
					<?php $payment_change='';
					if(!$this->config->get('allow_payment_button')){
						$payment_change='style="display:none;"';
					} ?>
					<tr id="hikashop_payment_change_row" <?php echo
$payment_change; ?>>
						<td class="key"><?php echo
JText::_('ALLOW_CUSTOMERS_TO_CHANGE_THEIR_PAYMENT_METHOD_AFTER_CHECKOUT');
?></td>
						<td>
							<?php if(hikashop_level(1)){
								echo JHTML::_('hikaselect.booleanlist',
'config[allow_payment_change]','',$this->config->get('allow_payment_change',1));
							}else{
								echo hikashop_getUpgradeLink('essential');;
							} ?>
						</td>
					</tr>
				</table>
			</fieldset>
		</div>
	<!-- FILES -->
		<div id="main_files">
			<fieldset class="adminform">
				<legend><?php echo JText::_( 'FILES' );
?></legend>
				<table class="admintable table"
style="width:100%" cellspacing="1">
					<tr>
						<td class="key"><?php echo
JText::_('ALLOWED_FILES'); ?></td>
						<td>
							<input class="inputbox" type="text"
name="config[allowedfiles]" size="50"
value="<?php echo strtolower(str_replace('
','',$this->config->get('allowedfiles')));
?>" />
						</td>
					</tr>

					<tr>
						<td class="key"><?php echo
JText::_('UPLOAD_SECURE_FOLDER'); ?></td>
						<td>
							<input class="inputbox" type="text"
name="config[uploadsecurefolder]" size="50"
value="<?php echo
$this->config->get('uploadsecurefolder'); ?>"
/>
						</td>
					</tr>
					<tr>
						<td class="key"><?php echo
JText::_('UPLOAD_FOLDER'); ?></td>
						<td>
							<input class="inputbox" type="text"
name="config[uploadfolder]" size="50"
value="<?php echo
$this->config->get('uploadfolder'); ?>" />
						</td>
					</tr>
					<tr>
						<td class="key"><?php echo
JText::_('PAYMENT_LOG_FILE'); ?></td>
						<td>
							<input class="inputbox" type="text"
name="config[payment_log_file]" size="50"
value="<?php echo
$this->config->get('payment_log_file'); ?>" />
							<?php
							echo $this->popup->display(
								'<button class="btn" onclick="return
false">'.JText::_('REPORT_SEE').'</button>',
								'PAYMENT_LOG_FILE',
								hikashop_completeLink('config&task=seepaymentreport',true),
								'hikashop_log_file',
								760, 480, '', '', 'link'
							);
							?>
						</td>
					</tr>
					<tr>
						<td class="key"><?php echo
JText::_('ORDER_STATUS_FOR_DOWNLOAD'); ?></td>
						<td>
							<input id="order_status_for_download"
class="inputbox" type="text"
name="config[order_status_for_download]" value="<?php
echo @$this->config->get('order_status_for_download');
?>" />
							<?php
							echo $this->popup->display(
								'<img src="'.
HIKASHOP_IMAGES.'edit.png"
alt="'.JText::_('HIKA_EDIT').'"/>',
								'ORDER_STATUS_FOR_DOWNLOAD',
								'\''.hikashop_completeLink("category&task=selectstatus&control=order_status_for_download",true).'&values=\'+document.getElementById(\'order_status_for_download\').value',
								'link_order_status_for_download',
								760, 480, '', '', 'link',true
							);
						?></td>
					</tr>
					<tr>
						<td class="key"><?php echo
JText::_('DOWNLOAD_TIME_LIMIT'); ?></td>
						<td><?php
							echo
$this->delayTypeDownloads->display('config[download_time_limit]',$this->config->get('download_time_limit',0),3);
						?></td>
					</tr>
					<tr>
						<td class="key"><?php echo
JText::_('DOWNLOAD_NUMBER_LIMIT'); ?></td>
						<td>
							<input class="inputbox" type="text"
name="config[download_number_limit]" value="<?php echo
$this->config->get('download_number_limit'); ?>"
/>
						</td>
					</tr>
					<tr>
						<td class="key"><?php echo
JText::_('CSV_SEPARATOR'); ?></td>
						<td><?php
							echo
$this->csvType->display('config[csv_separator]',$this->config->get('csv_separator',';'));
						?></td>
					</tr>
					<tr>
						<td class="key"><?php echo
JText::_('ENABLE_CUSTOMER_DOWNLOADLIST'); ?></td>
						<td>
							<?php if(hikashop_level(1)){
								echo JHTML::_('hikaselect.booleanlist',
'config[enable_customer_downloadlist]','',$this->config->get('enable_customer_downloadlist'));
							}else{
								echo '<small
style="color:red">'.JText::_('ONLY_COMMERCIAL').'</small>';
							} ?>
						</td>
					</tr>
				</table>
			</fieldset>
		</div>
	<!-- IMAGES -->
		<div id="main_images">
			<fieldset class="adminform">
				<legend><?php echo JText::_( 'HIKA_IMAGES' );
?></legend>
				<table class="admintable table"
style="width:100%" cellspacing="1">
					<tr>
						<td class="key"><?php echo
JText::_('ALLOWED_IMAGES'); ?></td>
						<td>
							<input class="inputbox" type="text"
name="config[allowedimages]" size="50"
value="<?php echo strtolower(str_replace('
','',$this->config->get('allowedimages')));
?>" />
						</td>
					</tr>
					<tr>
						<td class="key"><?php echo
JText::_('DEFAULT_IMAGE'); ?></td>
						<td>
<?php
	$options = array(
		'upload' => true,
		'gallery' => true,
		'text' =>
JText::_('HIKA_DEFAULT_IMAGE_EMPTY_UPLOAD'),
		'uploader' => array('config',
'default_image'),
	);
	$params = new stdClass();
	$params->file_path =
$this->config->get('default_image', '');
	$params->field_name = 'config[default_image]';
	$img = $this->imageHelper->getThumbnail($params->file_path,
array(100, 100), array('default' => true));
	if($img->success) {
		$params->thumbnail_url = $img->url;
		$params->origin_url = $img->origin_url;
	}
	$js = '';
	$content = hikashop_getLayout('upload', 'image_entry',
$params, $js);
	echo
$this->uploaderType->displayImageSingle('hikashop_config_default_image',
$content, $options);
?>
						</td>
					</tr>
					<tr>
						<td class="key" ><?php echo
JText::_('THUMBNAIL'); ?></td>
						<td>
							<?php echo JHTML::_('hikaselect.booleanlist',
"config[thumbnail]" ,
'',$this->config->get('thumbnail') );?>
						</td>
					</tr>
					<tr>
						<td class="key"><?php echo
JText::_('THUMBNAIL_X'); ?></td>
						<td>
							<input class="inputbox" type="text"
name="config[thumbnail_x]" value="<?php echo
$this->config->get('thumbnail_x'); ?>" />
						</td>
					</tr>
					<tr>
						<td class="key"><?php echo
JText::_('THUMBNAIL_Y'); ?></td>
						<td>
							<input class="inputbox" type="text"
name="config[thumbnail_y]" value="<?php echo
$this->config->get('thumbnail_y'); ?>" />
						</td>
					</tr>
					<tr>
						<td class="key"><?php echo
JText::_('PRODUCT_PAGE_IMAGE_X'); ?></td>
						<td>
							<input class="inputbox" type="text"
name="config[product_image_x]" value="<?php echo
$this->config->get('product_image_x'); ?>" />
						</td>
					</tr>
					<tr>
						<td class="key"><?php echo
JText::_('PRODUCT_PAGE_IMAGE_Y'); ?></td>
						<td>
							<input class="inputbox" type="text"
name="config[product_image_y]" value="<?php echo
$this->config->get('product_image_y'); ?>" />
						</td>
					</tr>
					<tr>
						<td class="key"><?php echo
JText::_('IMAGE_X'); ?></td>
						<td>
							<input class="inputbox" type="text"
name="config[image_x]" value="<?php echo
$this->config->get('image_x'); ?>" />
						</td>
					</tr>
					<tr>
						<td class="key"><?php echo
JText::_('IMAGE_Y'); ?></td>
						<td>
							<input class="inputbox" type="text"
name="config[image_y]" value="<?php echo
$this->config->get('image_y'); ?>" />
						</td>
					</tr>
					<tr>
						<td class="key"><?php echo
JText::_('WATERMARK_ON_IMAGES'); ?></td>
						<td><?php if(hikashop_level(2)){ ?>
<?php
	$options = array(
		'upload' => true,
		'gallery' => true,
		'text' =>
JText::_('HIKA_DEFAULT_IMAGE_EMPTY_UPLOAD'),
		'uploader' => array('config',
'watermark'),
	);
	$params = new stdClass();
	$params->file_path = $this->config->get('watermark',
'');
	$params->delete = true;
	$params->uploader_id = 'hikashop_config_watermark_image';
	$params->field_name = 'config[watermark]';
	$js = '';
	$content = hikashop_getLayout('upload', 'image_entry',
$params, $js);
	if(!empty($params->empty)) $options['empty'] = true;
	echo
$this->uploaderType->displayImageSingle('hikashop_config_watermark_image',
$content, $options);
							}else{
								echo hikashop_getUpgradeLink('business');;
							}
						?></td>
					</tr>
					<tr>
						<td class="key"><?php echo
JText::_('WATERMARK_OPACITY'); ?></td>
						<td>
							<?php if(hikashop_level(2)){ ?>
								<input class="inputbox" type="text"
name="config[opacity]" value="<?php echo
$this->config->get('opacity',0); ?>"
size="3" />%
							<?php  }else{
								echo hikashop_getUpgradeLink('business');;
							}?>
						</td>
					</tr>
				</table>
			</fieldset>
		</div>
	<!-- EMAILS -->
		<div id="main_emails">
			<fieldset class="adminform">
				<legend><?php echo JText::_( 'EMAILS' );
?></legend>
				<table class="admintable table"
style="width:100%" cellspacing="1">
					<tr>
						<td width="185" class="key"><?php echo
JText::_('FROM_NAME'); ?></td>
						<td>
							<input class="inputbox" type="text"
name="config[from_name]" size="40" value="<?php
echo $this->escape($this->config->get('from_name'));
?>">
						</td>
					</tr>
					<tr>
						<td class="key"><?php echo
JText::_('FROM_ADDRESS'); ?></td>
						<td>
							<input class="inputbox" type="text"
name="config[from_email]" size="40"
value="<?php echo
$this->escape($this->config->get('from_email'));
?>">
						</td>
					</tr>
					<tr>
						<td class="key"><?php echo
JText::_('REPLYTO_NAME'); ?></td>
						<td>
							<input class="inputbox" type="text"
name="config[reply_name]" size="40"
value="<?php echo
$this->escape($this->config->get('reply_name'));
?>">
						</td>
					</tr>
					<tr>
						<td class="key"><?php echo
JText::_('REPLYTO_ADDRESS'); ?></td>
						<td>
							<input class="inputbox" type="text"
name="config[reply_email]" size="40"
value="<?php echo
$this->escape($this->config->get('reply_email'));
?>">
						</td>
					</tr>
					<tr>
						<td class="key"><?php echo
JText::_('BOUNCE_ADDRESS'); ?></td>
						<td>
							<input class="inputbox" type="text"
name="config[bounce_email]" size="40"
value="<?php echo
$this->escape($this->config->get('bounce_email'));
?>">
						</td>
					</tr>
					<tr>
						<td class="key"><?php echo
JText::_('PAYMENTS_NOTIFICATIONS_EMAIL_ADDRESS');
?></td>
						<td>
							<input class="inputbox" type="text"
name="config[payment_notification_email]" size="40"
value="<?php echo
$this->escape($this->config->get('payment_notification_email'));
?>">
						</td>
					</tr>
					<tr>
						<td class="key"><?php echo
JText::_('ORDER_CREATION_NOTIFICATION_EMAIL_ADDRESS');
?></td>
						<td>
							<input class="inputbox" type="text"
name="config[order_creation_notification_email]"
size="40" value="<?php echo
$this->escape($this->config->get('order_creation_notification_email'));
?>">
						</td>
					</tr>
					<tr><td></td><td style="padding: 4px 0 4px
0;"></td></tr>
					<tr>
						<td class="key"><?php echo
JText::_('ADD_NAMES'); ?></td>
						<td><?php
							echo $this->elements->add_names;
						?></td>
					</tr>
					<tr>
						<td class="key"><?php echo
JText::_('ENCODING_FORMAT'); ?></td>
						<td><?php
							echo $this->elements->encoding_format;
						?></td>
					</tr>
					<tr>
						<td class="key"><?php echo
JText::_('CHARSET'); ?></td>
						<td><?php
							echo $this->elements->charset;
						?></td>
					</tr>
					<tr>
						<td class="key"><?php echo
JText::_('WORD_WRAPPING'); ?></td>
						<td>
							<input class="inputbox" type="text"
name="config[word_wrapping]" size="10"
value="<?php echo
$this->config->get('word_wrapping',0) ?>">
						</td>
					</tr>
					<tr>
						<td class="key"><?php echo
JText::_('EMBED_IMAGES'); ?></td>
						<td><?php
							echo $this->elements->embed_images;
						?></td>
					</tr>
					<tr>
						<td class="key"><?php echo
JText::_('EMBED_ATTACHMENTS'); ?></td>
						<td><?php
							echo $this->elements->embed_files;
						?></td>
					</tr>
					<tr>
						<td class="key"><?php echo
JText::_('MULTIPLE_PART'); ?></td>
						<td><?php
							echo $this->elements->multiple_part;
						?></td>
					</tr>
				</table>
			</fieldset>
		</div>
	<!-- Advanced -->
		<div id="main_advanced">
				<fieldset class="adminform">
					<legend><?php echo JText::_(
'HIKA_ADVANCED_SETTINGS' ); ?></legend>
					<table class="admintable table"
style="width:100%" cellspacing="1">
						<tr>
							<td class="key"><?php echo
JText::_('DIMENSION_SYMBOLS');
?><config/tmpl/plugins.php000064400000003623151162050350011161
0ustar00_cart]','',$this->config->get('ajax_add_to_cart',0));
							?></td>
						</tr>
						<tr>
							<td class="key"><?php echo
JText::_('GENERATE_VARIANT_AUTO'); ?></td>
							<td><?php
								echo JHTML::_('hikaselect.booleanlist',
'config[auto_variants]','',$this->config->get('auto_variants',1));
							?></td>
						</tr>
						<tr>
							<td class="key">
								<?php echo JText::_('AFFILIATE');?>
							</td>
							<td>
								<input name="config[partner_id]" type="text"
value="<?php echo
$this->config->get('partner_id')?>" />
							</td>
						</tr>
						<tr>
							<td class="key">
								<?php echo JText::_('VERSION');?>
							</td>
							<td>
								HikaShop <?php
$this->config->get('level').'
'.$this->config->get('version'); ?> [1312231536]
							</td>
						</tr>
					</table>
				</fieldset>
				</div>
			</td>
		</tr>
	</table>
</div>
config/tmpl/plugins.php000064400000003623151162050350011161
0ustar00<?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');
?><div id="config_plugins">
	<fieldset class="adminform">
		<legend><?php echo JText::_('PLUGINS')
?></legend>
		<table class=config/tmpl/share.php000064400000002651151162050350010602
0ustar00id[]=';
	}else{
		$publishedid = 'enabled-';
		$url =
'index.php?option=com_plugins&amp;task=plugin.edit&amp;extension_id=';
	}
	foreach($this->plugins as $i => &$row) {
?>
				<tr class="row<?php echo $k; ?>">
					<td align="center"><?php
						echo $i + 1
					?></td>
					<td>
						<a target="_blank" href="<?php echo
$url.$row->id; ?>"><?php echo $row->name;
?></a>
					</td>
					<td align="center"><?php
						if($this->manage){
?>
						<span id="<?php echo $publishedid.$row->id; ?>"
class="loading"><?php echo
$this->toggleClass->toggle($publishedid.$row->id,
$row->published, 'plugins') ?></span>
<?php
						} else {
							echo $this->toggleClass->display('activate',
$row->published);
						}
					?></td>
					<td align="center"><?php
						echo $row->id;
					?></td>
				</tr>
<?php
		$k = 1-$k;
	}
	unset($row);
?>
			</tbody>
		</table>
	</fieldset>
</div>
config/tmpl/share.php000064400000002651151162050350010602
0ustar00config/view.html.php000064400000064471151162050350010451
0ustar00his->file->name; ?></div>
		<div class="toolbar" id="toolbar"
style="float: right;">
			<button class="btn" type="button"
onclick="javascript:submitbutton('send')"><?php
echo JText::_('SHARE'); ?></button>
		</div>
	</fieldset>
	<fieldset class="adminform">
		<?php
hikashop_display(JText::_('SHARE_CONFIRMATION_1').'<br/>'.JText::_('SHARE_CONFIRMATION_2').'<br/>'.JText::_('SHARE_CONFIRMATION_3'),'info');
?><br/>
		<textarea cols="100" rows="8"
name="mailbody">Hi Hikari Software team,
Here is a new version of the language file, I translated few more
strings...</textarea>
	</fieldset>
	<div class="clr"></div>
	<input type="hidden" name="code"
value="<?php echo $this->file->name; ?>" />
	<input type="hidden" name="option"
value="<?php echo HIKASHOP_COMPONENT; ?>" />
	<input type="hidden" name="task" value=""
/>
	<input type="hidden" name="ctrl"
value="config" />
	<?php echo JHTML::_( 'form.token' ); ?>
</form>
config/view.html.php000064400000064471151162050350010451 0ustar00<?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 configViewConfig extends hikashopView
{
	var $triggerView = true;

	function display($tpl = null)
	{
		$this->paramBase =
HIKASHOP_COMPONENT.'.'.$this->getName();
		$function = $this->getLayout();
		if(method_exists($this,$function)) $this->$function();
		parent::display($tpl);
	}

	function config($tpl = null)
	{
		JHTML::_('behavior.modal');
		$config =& hikashop_config();
		JRequest::setVar('inherit',false);
		if($config->get('website') != HIKASHOP_LIVE){
			$updateHelper = hikashop_get('helper.update');
			$updateHelper->addUpdateSite();
		}
		$toggleClass = hikashop_get('helper.toggle');
		hikashop_setTitle(JText::_('HIKA_CONFIGURATION'),'config','config');
		$manage =
hikashop_isAllowed($config->get('acl_config_manage','all'));
		$this->assignRef('manage',$manage);

		$this->toolbar = array(
			'|',
			array('name' => 'save', 'display' =>
$manage),
			array('name' => 'apply', 'display'
=> $manage),
			'close',
			'|',
			array('name' => 'pophelp', 'target'
=> 'config'),
			'dashboard'
		);

		$elements = new stdClass();
		if (!HIKASHOP_PHP5) {
			$lg =& JFactory::getLanguage();
		}else{
			$lg = JFactory::getLanguage();
		}
		$language = $lg->getTag();
		$styleRemind=
'float:right;margin-right:30px;position:relative;';
		$loadLink = '<a
onclick="window.document.getElementById(\'hikashop_messages_warning\').style.display
= \'none\';return true;" class="modal"
rel="{handler: \'iframe\', size: {x: 800, y: 500}}"
href="index.php?option=com_hikashop&amp;tmpl=component&amp;ctrl=config&amp;task=latest&amp;code='.$language.'">'.JText::_('LOAD_LATEST_LANGUAGE').'</a>';
		if(!file_exists(HIKASHOP_ROOT.'language'.DS.$language.DS.$language.'.com_hikashop.ini')){
			if($config->get('errorlanguagemissing',1)){
				$notremind = '<small
style="'.$styleRemind.'">'.$toggleClass->delete('hikashop_messages_warning','errorlanguagemissing-0','config',false,JText::_('DONT_REMIND')).'</small>';
				hikashop_display(JText::_('MISSING_LANGUAGE').'
'.$loadLink.' '.$notremind,'warning');
			}
		}elseif(version_compare(JText::_('HIKA_LANG_VERSION'),$config->get('version'),'<')){
			if($config->get('errorlanguageupdate',1)){
				$notremind = '<small
style="'.$styleRemind.'">'.$toggleClass->delete('hikashop_messages_warning','errorlanguageupdate-0','config',false,JText::_('DONT_REMIND')).'</small>';
				hikashop_display(JText::_('UPDATE_LANGUAGE').'
'.$loadLink.' '.$notremind,'warning');
			}
		}

		$elements->add_names = JHTML::_('hikaselect.booleanlist',
"config[add_names]" ,
'',$config->get('add_names',true) );
		$elements->embed_images = JHTML::_('hikaselect.booleanlist',
"config[embed_images]" ,
'',$config->get('embed_images',0) );
		$elements->embed_files = JHTML::_('hikaselect.booleanlist',
"config[embed_files]" ,
'',$config->get('embed_files',1) );
		$elements->multiple_part =
JHTML::_('hikaselect.booleanlist',
"config[multiple_part]" ,
'',$config->get('multiple_part',0) );
		$encoding = hikashop_get('type.encoding');
		$elements->encoding_format =
$encoding->display("config[encoding_format]",$config->get('encoding_format','base64'));
		$charset = hikashop_get('type.charset');
		$elements->charset =
$charset->display("config[charset]",$config->get('charset','UTF-8'));
		$editorType = hikashop_get('type.editor');
		$elements->editor =
$editorType->display('config[editor]',$config->get('editor'));
		$elements->show_footer = JHTML::_('hikaselect.booleanlist',
"config[show_footer]" ,
'',$config->get('show_footer',1) );

		$cssFiles = hikashop_get('type.css');
		$cssFiles->type = 'frontend';
		$elements->css_frontend =
$cssFiles->display('config[css_frontend]',$config->get('css_frontend','default'));
		$cssFiles->type = 'backend';
		$elements->css_backend =
$cssFiles->display('config[css_backend]',$config->get('css_backend','default'));
		$cssFiles->type = 'style';
		$elements->css_style =
$cssFiles->display('config[css_style]',$config->get('css_style',''));
		$menuType = hikashop_get('type.menus');
		$elements->hikashop_menu =
$menuType->display('config[checkout_itemid]',$config->get('checkout_itemid','0'));
		$popup = hikashop_get('helper.popup');
		$this->assignRef('popup', $popup);

		if(hikashop_level(1)){
			$cronTypeReport = hikashop_get('type.cronreport');
			$elements->cron_sendreport =
$cronTypeReport->display('config[cron_sendreport]',$config->get('cron_sendreport',2));
			$cronTypeReportSave = hikashop_get('type.cronreportsave');
			$elements->cron_savereport =
$cronTypeReportSave->display('config[cron_savereport]',$config->get('cron_savereport',0));
			$elements->deleteReport = $popup->display(
				JText::_('REPORT_DELETE'),
				'REPORT_DELETE',
				hikashop_completeLink('config&task=cleanreport',true),
				'deleteReport',
				760, 480, '', '', 'button'
			);
			$elements->seeReport = $popup->display(
				JText::_('REPORT_SEE'),
				'REPORT_SEE',
				hikashop_completeLink('config&task=seereport',true),
				'seeReport',
				760, 480, '', '', 'button'
			);
			$elements->editReportEmail = $popup->display(
				JText::_('REPORT_EDIT'),
				'REPORT_EDIT',
				hikashop_completeLink('email&task=edit&mail_name=cron_report',true),
				'editReportEmail',
				760, 480, '', '', 'button'
			);
			$delayType = hikashop_get('type.delay');
			$elements->cron_frequency =
$delayType->display('config[cron_frequency]',$config->get('cron_frequency',0),0);
			$elements->cron_url =
HIKASHOP_LIVE.'index.php?option=com_hikashop&ctrl=cron';
			$item = $config->get('itemid');
			if(!empty($item)) $elements->cron_url.=
'&Itemid='.$item;
			$elements->cron_edit = $popup->display(
				JText::_('CREATE_CRON'),
				'CREATE_CRON',
				'http://www.hikashop.com/index.php?option=com_updateme&ctrl=launcher&task=edit&cronurl='.urlencode($elements->cron_url),
				'cron_edit',
				760, 480, '', '', 'button'
			);
		}

		jimport('joomla.filesystem.folder');
		$path = JLanguage::getLanguagePath(JPATH_ROOT);
		$dirs = JFolder::folders( $path );
		$edit_image = HIKASHOP_IMAGES.'icons/icon-16-edit.png';
		$new_image = HIKASHOP_IMAGES.'icons/icon-16-new.png';

		foreach ($dirs as $dir){
			$xmlFiles = JFolder::files( $path.DS.$dir,
'^([-_A-Za-z]*)\.xml$' );
			$xmlFile = array_pop($xmlFiles);
			if($xmlFile=='install.xml') $xmlFile = array_pop($xmlFiles);
			if(empty($xmlFile)) continue;
			$data =
JApplicationHelper::parseXMLLangMetaFile($path.DS.$dir.DS.$xmlFile);
			$oneLanguage = new stdClass();
			$oneLanguage->language 	= $dir;
			$oneLanguage->name = $data['name'];
			$languageFiles = JFolder::files( $path.DS.$dir,
'^(.*)\.com_hikashop\.ini$' );
			$languageFile = reset($languageFiles);

			if(!empty($languageFile)){
				$oneLanguage->edit = $popup->display(
					'<img
id="image'.$oneLanguage->language.'"
src="'. $edit_image.'"
alt="'.JText::_('EDIT_LANGUAGE_FILE').'"/>',
					'EDIT_LANGUAGE_FILE',
					'index.php?option=com_hikashop&amp;tmpl=component&amp;ctrl=config&amp;task=language&amp;code='.$oneLanguage->language,
					'edit_language_'.$oneLanguage->language,
					760, 480, '', '', 'link'
				);
			}else{
				$oneLanguage->edit = $popup->display(
					'<img
id="image'.$oneLanguage->language.'"
src="'. $new_image.'"
alt="'.JText::_('ADD_LANGUAGE_FILE').'"/>',
					'ADD_LANGUAGE_FILE',
					'index.php?option=com_hikashop&amp;tmpl=component&amp;ctrl=config&amp;task=language&amp;code='.$oneLanguage->language,
					'edit_language_'.$oneLanguage->language,
					760, 480, '', '', 'link'
				);
			}

			$languages[] = $oneLanguage;
		}

		$db = JFactory::getDBO();
		if(!HIKASHOP_J16){
			$db->setQuery("SELECT name,published,id FROM `#__plugins` WHERE
`folder` = 'hikashop' || ".
				"(`folder` != 'hikashoppayment' AND `folder` !=
'hikashopshipping' AND `element` LIKE '%hikashop%')
ORDER BY published DESC, ordering ASC");
		}else{
			$db->setQuery("SELECT name,enabled as published,extension_id as
id FROM `#__extensions` WHERE (`folder` = 'hikashop' || ".
				"(`folder` != 'hikashoppayment' AND `folder` !=
'hikashopshipping' AND `element` LIKE '%hikashop%'))
AND type='plugin' ORDER BY enabled DESC, ordering ASC");
		}
		$plugins = $db->loadObjectList();
		$this->assignRef('config',$config);
		$this->assignRef('languages',$languages);
		$this->assignRef('elements',$elements);
		$this->assignRef('plugins',$plugins);

		$app = JFactory::getApplication();
		$defaultPanel = $app->getUserStateFromRequest(
$this->paramBase.'.default_panel', 'default_panel',
0, 'int' );
		$this->assignRef('default_tab', $defaultPanel);

		$tabs = hikashop_get('helper.tabs');
		$this->assignRef('tabs', $tabs);

		$uploaderType = hikashop_get('type.uploader');
		$this->assignRef('uploaderType', $uploaderType);

		$imageHelper = hikashop_get('helper.image');
		$this->assignRef('imageHelper', $imageHelper);

		$this->assignRef('toggleClass', $toggleClass);

		$pluginClass = hikashop_get('class.plugins');
		$plugin = JPluginHelper::getPlugin('system',
'hikashopaffiliate');
		if(empty($plugin)){
			$affiliate_active = false;
			$plugin= new stdClass();
			$plugin->params=array();
		}else{
			$affiliate_active = true;
			$plugin =
$pluginClass->getByName($plugin->type,$plugin->name);
		}
		if(empty($plugin->params['partner_key_name'])){
			$plugin->params['partner_key_name']='partner_id';
		}
		if(HIKASHOP_J30){
			$id = 'config_force_sslurl';
		}else{
			$id = 'config[force_ssl]url';
		}

		$js = "
	function jSelectArticle(id, title, object) {
		document.getElementById('affiliate_terms').value = id;
		hikashop.closeBox();
	}
	function setVisible(value){
		value=parseInt(value);
		if(value==1){
			document.getElementById('sef_cat_name').style.display =
'';
			document.getElementById('sef_prod_name').style.display =
'';
			document.getElementById('sef_checkout_name').style.display =
'';
		}else{
			document.getElementById('sef_cat_name').style.display =
'none';
			document.getElementById('sef_prod_name').style.display =
'none';
			document.getElementById('sef_checkout_name').style.display =
'none';
		}
	}
	function displaySslField(){
		if(document.getElementById('".$id."').checked==true){
			document.getElementById('force_ssl_url').style.display='';
		}else{
			document.getElementById('force_ssl_url').style.display='none';
		}
	}
	function displayPaymentChange(value){
		if(value=='1'){
			document.getElementById('hikashop_payment_change_row').style.display='';
		}else{
			document.getElementById('hikashop_payment_change_row').style.display='none';
		}
	}

	function registrationAvailable(value,checked){
		var displayMethod =
document.getElementById('config[display_method]1').checked,
		normal=
document.getElementById('config[simplified_registration][normal]'),
		simple =
document.getElementById('config[simplified_registration][simple]'),
		simple_pwd =
document.getElementById('config[simplified_registration][simple_pwd]'),
		nbChecked = 0;

		if(value==2 && checked==false) return false;
		if(value==2 && (normal.checked==true || simple.checked==true ||
simple_pwd.checked==true)) return false;

		normal.disabled=false;
		normal.parentNode.className='';
		simple_pwd.disabled=false;
		simple_pwd.parentNode.className='';
		simple.disabled=false;
		simple.parentNode.className='';

		if(normal.checked){nbChecked++;}
		if(simple.checked){nbChecked++;}
		if(simple_pwd.checked){nbChecked++;}

		if(value==2 && checked==true && nbChecked>1){
			document.getElementById('config[simplified_registration][simple]').checked=false;
			document.getElementById('config[simplified_registration][simple_pwd]').checked=false;
			document.getElementById('config[simplified_registration][normal]').checked=false;
		}

		if(displayMethod==1){
			if(value==0 && checked==true){
				simple.disabled=true;  simple.parentNode.className =
'labelDisabled'; simple.checked= false;
				simple_pwd.disabled=true;  simple_pwd.parentNode.className =
'labelDisabled'; simple_pwd.checked= false;
			}else if(value==1 && checked==true){
				normal.disabled=true; normal.parentNode.className =
'labelDisabled'; normal.checked= false;
				simple_pwd.disabled=true; simple_pwd.parentNode.className =
'labelDisabled'; simple_pwd.checked= false;
			}else if(value==3 && checked==true){
				simple.disabled=true; simple.parentNode.className =
'labelDisabled'; simple.checked= false;
				normal.disabled=true; normal.parentNode.className =
'labelDisabled'; normal.checked= false;
			}
		}

	}


";
		if (!HIKASHOP_PHP5) {
			$doc =& JFactory::getDocument();
		}else{
			$doc = JFactory::getDocument();
		}
		$doc->addScriptDeclaration($js);
		$this->assignRef('affiliate_params',$plugin->params);
		$this->assignRef('affiliate_active',$affiliate_active);
		$rates_active = false;
		if(hikashop_level(1)){
			$plugin =
$pluginClass->getByName('hikashop','rates');
			if(!empty($plugin)){
				$rates_active = true;
				$this->assignRef('rates_params',$plugin->params);
			}
		}
		$this->assignRef('rates_active',$rates_active);
		$selectType = hikashop_get('type.select');
		$this->assignRef('auto_select',$selectType);
		$contactType = hikashop_get('type.contact');
		$this->assignRef('contact',$contactType);
		$waitlistType = hikashop_get('type.waitlist');
		$this->assignRef('waitlist',$waitlistType);
		$compareType = hikashop_get('type.compare');
		$this->assignRef('compare',$compareType);
		$delayTypeRates = hikashop_get('type.delay');
		$this->assignRef('delayTypeRates',$delayTypeRates);
		$delayTypeCarts = hikashop_get('type.delay');
		$this->assignRef('delayTypeCarts',$delayTypeCarts);
		$delayTypeRetaining = hikashop_get('type.delay');
		$this->assignRef('delayTypeRetaining',$delayTypeRetaining);
		$delayTypeDownloads = hikashop_get('type.delay');
		$this->assignRef('delayTypeDownloads',$delayTypeDownloads);
		$delayTypeAffiliate = hikashop_get('type.delay');
		$this->assignRef('delayTypeAffiliate',$delayTypeAffiliate);
		$delayTypeOrder = hikashop_get('type.delay');
		$this->assignRef('delayTypeOrder',$delayTypeOrder);
		$delayTypeClick = hikashop_get('type.delay');
		$this->assignRef('delayTypeClick',$delayTypeClick);
		$csvType = hikashop_get('type.csv');
		$this->assignRef('csvType',$csvType);
		if(hikashop_level(1)){
			$display_method = hikashop_get('type.display_method');
			$this->assignRef('display_method',$display_method);
			$registration = hikashop_get('type.registration');
			$this->assignRef('registration',$registration);
		}
		$discountDisplayType = hikashop_get('type.discount_display');
		$this->assignRef('discountDisplayType',$discountDisplayType);

		$currencyType = hikashop_get('type.currency');
		$this->assignRef('currency',$currencyType);
		$tax = hikashop_get('type.tax');
		$this->assignRef('tax',$tax);
		$tax_zone = hikashop_get('type.tax_zone');
		$this->assignRef('tax_zone',$tax_zone);
		$zoneClass = hikashop_get('class.zone');
		$zone = $zoneClass->get($config->get('main_tax_zone'));
		$this->assignRef('zone',$zone);
		$currency = hikashop_get('type.currency');
		$this->assignRef('currency',$currency);
		$order_status = hikashop_get('type.order_status');
		$this->assignRef('order_status',$order_status);
		$button = hikashop_get('type.button');
		$this->assignRef('button',$button);
		$pagination = hikashop_get('type.pagination');
		$this->assignRef('paginationType',$pagination);
		$menu_style = hikashop_get('type.menu_style');
		$this->assignRef('menu_style',$menu_style);
		$vat = hikashop_get('type.vat');
		$this->assignRef('vat',$vat);
		$checkout = hikashop_get('type.checkout');
		$this->assignRef('checkout',$checkout);
		$cart_redirect = hikashop_get('type.cart_redirect');
		$this->assignRef('cart_redirect',$cart_redirect);
		$multilang = hikashop_get('type.multilang');
		$this->assignRef('multilang',$multilang);

		$js = null;
		$this->assignRef('js',$js);
		$contentType = hikashop_get('type.content');
		$this->assignRef('contentType',$contentType);
		$layoutType = hikashop_get('type.layout');
		$this->assignRef('layoutType',$layoutType);
		$default_params=$config->get('default_params',null);
		$orderdirType = hikashop_get('type.orderdir');
		$this->assignRef('orderdirType',$orderdirType);
		$childdisplayType = hikashop_get('type.childdisplay');
		$this->assignRef('childdisplayType',$childdisplayType);
		if(empty($default_params['selectparentlisting'])){
			$query = 'SELECT category_id FROM
'.hikashop_table('category').' WHERE
category_type=\'root\' AND category_parent_id=0 LIMIT 1';
			$db->setQuery($query);
			$root = $db->loadResult();
			$query = 'SELECT category_id FROM
'.hikashop_table('category').' WHERE
category_type=\'product\' AND
category_parent_id='.$root.' LIMIT 1';
			$db->setQuery($query);
			$default_params['selectparentlisting'] =
$db->loadResult();
		}
		$this->assignRef('default_params',$default_params);
		$class=hikashop_get('class.category');
		$element =
$class->get($default_params['selectparentlisting']);
		$this->assignRef('element',$element);
		$orderType = hikashop_get('type.order');
		$this->assignRef('orderType',$orderType);
		$pricetaxType = hikashop_get('type.pricetax');
		$this->assignRef('pricetaxType',$pricetaxType);
		$colorType = hikashop_get('type.color');
		$this->assignRef('colorType',$colorType);
		$listType = hikashop_get('type.list');
		$this->assignRef('listType',$listType);
		$itemType = hikashop_get('type.item');
		$this->assignRef('itemType',$itemType);
		if(hikashop_level(2)){
			$filterButtonType =
hikashop_get('type.filter_button_position');
			$this->assignRef('filterButtonType',$filterButtonType);
		}
		$priceDisplayType = hikashop_get('type.pricedisplay');
		$this->assignRef('priceDisplayType',$priceDisplayType);
		$image = hikashop_get('helper.image');
		$this->assignRef('image',$image);
		$toggle = hikashop_get('helper.toggle');
		$this->assignRef('toggle',$toggle);
		$characteristicdisplayType =
hikashop_get('type.characteristicdisplay');
		$this->assignRef('characteristicdisplayType',$characteristicdisplayType);
		$characteristicorderType =
hikashop_get('type.characteristicorder');
		$this->assignRef('characteristicorderType',$characteristicorderType);
		$quantity = hikashop_get('type.quantity');
		$this->assignRef('quantity',$quantity);
		$productSyncType = hikashop_get('type.productsync');
		$this->assignRef('productSyncType',$productSyncType);

		$productDisplayType = hikashop_get('type.productdisplay');
		$this->assignRef('productDisplayType',$productDisplayType);

		$images =
array('icon-48-user.png'=>'header','icon-48-category.png'=>'header','icon-32-save.png'=>'toolbar','icon-32-new.png'=>'toolbar','icon-32-apply.png'=>'toolbar','icon-32-print.png'=>'toolbar','icon-32-edit.png'=>'toolbar','icon-32-help.png'=>'toolbar','icon-32-cancel.png'=>'toolbar','icon-32-back.png'=>'toolbar');
		jimport('joomla.filesystem.file');

		$checkoutlist = array(
			'login' => JText::_('HIKASHOP_CHECKOUT_LOGIN'),
			'address' =>
JText::_('HIKASHOP_CHECKOUT_ADDRESS'),
			'shipping' =>
JText::_('HIKASHOP_CHECKOUT_SHIPPING'),
			'payment' =>
JText::_('HIKASHOP_CHECKOUT_PAYMENT'),
			'coupon' =>
JText::_('HIKASHOP_CHECKOUT_COUPON'),
			'cart' => JText::_('HIKASHOP_CHECKOUT_CART'),
			'cartstatus' =>
JText::_('HIKASHOP_CHECKOUT_CART_STATUS'),
			'status' =>
JText::_('HIKASHOP_CHECKOUT_STATUS'),
			'fields' =>
JText::_('HIKASHOP_CHECKOUT_FIELDS'),
			'terms' => JText::_('HIKASHOP_CHECKOUT_TERMS')
		);
		JPluginHelper::importPlugin('hikashop');
		$dispatcher = JDispatcher::getInstance();
		$list = array();
		$dispatcher->trigger('onCheckoutStepList',
array(&$list));
		if(!empty($list)) {
			foreach($list as $k => $v) {
				if(!isset($checkoutlist[$k]))
					$checkoutlist[$k] = $v;
			}
		}
		$this->assignRef('checkoutlist', $checkoutlist);

		$hikarss_format = array(
			JHTML::_('select.option', 'none',
JText::_('NO_FEED') ),
			JHTML::_('select.option', 'rss',
JText::_('RSS_ONLY') ),
			JHTML::_('select.option', 'atom',
JText::_('ATOM_ONLY')),
			JHTML::_('select.option', 'both',
JText::_('ALL_FEED') )
		);
		$elements->hikarss_format = 
JHTML::_('hikaselect.genericlist', $hikarss_format,
"config[hikarss_format]" , 'size="1"',
'value', 'text',
$config->get('hikarss_format','both'));

		$hikarss_order = array(
			JHTML::_('select.option', 'product_sale_start', 
JText::_('PRODUCT_SALE_START' )),
			JHTML::_('select.option', 'product_id',
'ID' ),
			JHTML::_('select.option', 'product_created',
JText::_('ORDER_CREATED') ),
			JHTML::_('select.option', 'product_modified',
JText::_('HIKA_LAST_MODIFIED') )
		);
		$elements->hikarss_order = 
JHTML::_('hikaselect.genericlist', $hikarss_order,
"config[hikarss_order]" , 'size="1"',
'value', 'text',
$config->get('hikarss_order','product_id'));
		$elements->hikarss_child = 
JHTML::_('hikaselect.booleanlist',
"config[hikarss_child]" , 'size="1"',
$config->get('hikarss_child','yes'));

		if(version_compare(JVERSION,'1.6','<')){
			$from =
HIKASHOP_ROOT.DS.'images'.DS.'M_images'.DS.'edit.png';
			$to =
HIKASHOP_MEDIA.'images'.DS.'icons'.DS.'icon-16-edit.png';
			if(!file_exists($to) AND file_exists($from)){
				if(!JFile::copy($from,$to)){
					hikashop_display('Could not copy the file '.$from.' to
'.$to.'. Please check the persmissions of the folder
'.dirname($to));
				}
			}
			$from =
HIKASHOP_ROOT.DS.'images'.DS.'M_images'.DS.'new.png';
			$to =
HIKASHOP_MEDIA.'images'.DS.'icons'.DS.'icon-16-new.png';
			if(!file_exists($to) AND file_exists($from)){
				if(!JFile::copy($from,$to)){
					hikashop_display('Could not copy the file '.$from.' to
'.$to.'. Please check the persmissions of the folder
'.dirname($to));
				}
			}
			$from =
HIKASHOP_ROOT.DS.'images'.DS.'M_images'.DS.'con_info.png';
			$to =
HIKASHOP_MEDIA.'images'.DS.'icons'.DS.'icon-16-info.png';
			if(!file_exists($to) AND file_exists($from)){
				if(!JFile::copy($from,$to)){
					hikashop_display('Could not copy the file '.$from.' to
'.$to.'. Please check the persmissions of the folder
'.dirname($to));
				}
			}
			$from =
rtrim(JPATH_ADMINISTRATOR,DS).DS.'templates'.DS.'khepri'.DS.'images'.DS.'menu'.DS.'icon-16-user.png';
			$to =
HIKASHOP_MEDIA.'images'.DS.'icons'.DS.'icon-16-levels.png';
			if(!file_exists($to) AND file_exists($from)){
				if(!JFile::copy($from,$to)){
					hikashop_display('Could not copy the file '.$from.' to
'.$to.'. Please check the persmissions of the folder
'.dirname($to));
				}
			}
		}else{
			$images['icon-16-edit.png']='menu';
			$images['icon-16-new.png']='menu';
			$images['icon-16-levels.png']='menu';
			$images['icon-16-info.png']='menu';
		}

		foreach($images as $oneImage=>$folder){
			$to =
HIKASHOP_MEDIA.'images'.DS.'icons'.DS.$oneImage;
			if(!HIKASHOP_J16){
				$from =
rtrim(JPATH_ADMINISTRATOR,DS).DS.'templates'.DS.'khepri'.DS.'images'.DS.$folder.DS.$oneImage;
			}else{
				$from =
rtrim(JPATH_ADMINISTRATOR,DS).DS.'templates'.DS.'bluestork'.DS.'images'.DS.$folder.DS.$oneImage;
			}
			if(!file_exists($to) AND file_exists($from)){
				if(!JFile::copy($from,$to)){
					hikashop_display('Could not copy the file '.$from.' to
'.$to.'. Please check the persmissions of the folder
'.dirname($to));
				}
			}
		}
		if(!HIKASHOP_J16){
			$path =
rtrim(JPATH_SITE,DS).DS.'plugins'.DS.'hikashop'.DS.'history.php';
		}else{
			$path =
rtrim(JPATH_SITE,DS).DS.'plugins'.DS.'hikashop'.DS.'history'.DS.'history.php';
		}
		if(!file_exists($path)){
	 		$folders = array('* Joomla / Plugins','* Joomla /
Plugins / User','* Joomla / Plugins / System','* Joomla
/ Plugins / Search');
			hikashop_display(JText::_('ERROR_PLUGINS_1').'<br/>'.JText::_('ERROR_PLUGINS_2').'<br/>'.implode('<br/>',$folders).'<br/><a
href="index.php?option=com_hikashop&amp;ctrl=update&amp;task=install">'.JText::_('ERROR_PLUGINS_3').'</a>','warning');
		}
	}

	function language(){
		$code = JRequest::getString('code');
		if(empty($code)){
			hikashop_display('Code not specified','error');
			return;
		}
		$file = new stdClass();
		$file->name = $code;
		$path =
JLanguage::getLanguagePath(JPATH_ROOT).DS.$code.DS.$code.'.com_hikashop.ini';
		$file->path = $path;
		jimport('joomla.filesystem.file');
		$showLatest = true;
		$loadLatest = false;
		if(JFile::exists($path)){
			$file->content = JFile::read($path);
			if(empty($file->content)){
				hikashop_display('File not found :
'.$path,'error');
			}
		}else{
			$loadLatest = true;
			hikashop_display(JText::_('LOAD_ENGLISH_1').'<br/>'.JText::_('LOAD_ENGLISH_2').'<br/>'.JText::_('LOAD_ENGLISH_3'),'info');
			$file->content =
JFile::read(JLanguage::getLanguagePath(JPATH_ROOT).DS.'en-GB'.DS.'en-GB.com_hikashop.ini');
		}
		if($loadLatest OR JRequest::getString('task') ==
'latest'){
			$doc = JFactory::getDocument();
			$doc->addScript(HIKASHOP_UPDATEURL.'languageload&code='.JRequest::getString('code'));
			$showLatest = false;
		}elseif(JRequest::getcurrency/index.html000064400000000032151162050350010364
0ustar00g('csscontent');
		if(empcurrency/tmpl/form.php000064400000020413151162050350011024
0ustar00currency/index.html000064400000000032151162050350010364
0ustar00<html><body></body></html>currency/tmpl/form.php000064400000020413151162050350011024
0ustar00<?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');
?><div class="iframedoc"
id="iframedoc"></div>
<form action="index.php?option=<?php echo HIKASHOP_COMPONENT
?>&amp;ctrl=currency" method="post" 
name="adminForm" id="adminForm"
enctype="multipart/form-data">
<?php if(!HIKASHOP_BACK_RESPONSIVE) { ?>
<div id="page-currency">
	<table style="width:100%">
		<tr>
			<td valign="top" width="50%">
<?php } else { ?>
<div id="page-currency" class="row-fluid">
	<div class="span6">
<?php } ?>
				<fieldset class="adminform"
id="htmlfieldset">
					<legend><?php echo JText::_( 'CURRENCY_INFORMATION'
); ?></legend>
					<table class="admintable table" width="280px"
style="margin:auto">
						<tr>
							<td class="key">
									<?php echo JText::_( 'HIKA_NAME' ); ?>
							</td>
							<td>
								<input type="text"
name="data[currency][currency_name]" value="<?php echo
$this->escape(@$this->element->currency_name); ?>" />
							</td>
						</tr>
						<tr>
							<td class="key">
									<?php echo JText::_( 'CURRENCY_CODE' ); ?>
							</td>
							<td>
								<input type="text"
name="data[currency][currency_code]" value="<?php echo
@$this->element->currency_code; ?>" />
							</td>
						</tr>
						<tr>
							<td class="key">
									<?php echo JText::_( 'CURRENCY_SYMBOL' ); ?>
							</td>
							<td>
								<input type="text"
name="data[currency][currency_symbol]" value="<?php echo
$this->escape(@$this->element->currency_symbol); ?>"
/>
							</td>
						</tr>
						<tr>
							<td class="key">
									<?php echo JText::_( 'RATE' ); ?>
							</td>
							<td>
								<input type="text"
name="data[currency][currency_rate]" value="<?php echo
@$this->element->currency_rate; ?>" />
							</td>
						</tr>
						<tr>
							<td class="key">
								<?php echo JText::_( 'HIKA_LAST_MODIFIED' ); ?>
							</td>
							<td>
								<?php echo
hikashop_getDate(@$this->element->currency_modified); ?>
							</td>
						</tr>
						<tr>
							<td class="key">
									<?php echo JText::_( 'CURRENCY_PERCENT_FEE' ); ?>
							</td>
							<td>
								<input type="text"
name="data[currency][currency_percent_fee]" value="<?php
echo @$this->element->currency_percent_fee; ?>" />
							</td>
						</tr>
						<tr>
							<td class="key">
									<?php echo JText::_( 'HIKA_PUBLISHED' ); ?>
							</td>
							<td>
								<?php echo JHTML::_('hikaselect.booleanlist',
"data[currency][currency_published]" ,
'',@$this->element->currency_published	); ?>
							</td>
						</tr>
						<tr>
							<td class="key">
									<?php echo JText::_( 'CURRENCY_DISPLAYED' ); ?>
							</td>
							<td>
								<?php echo JHTML::_('hikaselect.booleanlist',
"data[currency][currency_displayed]" ,
'',@$this->element->currency_displayed	); ?>
							</td>
						</tr>
					</table>
				</fieldset>
<?php if(!HIKASHOP_BACK_RESPONSIVE) { ?>
			</td>
			<td valign="top" width="50%">
<?php } else { ?>
	</div>
	<div class="span6">
<?php } ?>
				<fieldset class="adminform"
id="htmlfieldset">
					<legend><?php echo JText::_( 'LOCALE_INFORMATION'
); ?></legend>
					<table class="admintable table" width="280px"
style="margin:auto">
						<tr>
							<td class="key">
									<?php echo JText::_( 'CURRENCY_FORMAT' ); ?>
							</td>
							<td>
								<input type="text"
name="data[currency][currency_format]" value="<?php echo
$this->escape(@$this->element->currency_format); ?>"
/>
							</td>
						</tr>
						<tr>
							<td class="key">
									<?php echo JText::_( 'MON_DECIMAL_POINT' ); ?>
							</td>
							<td>
								<input type="text"
name="data[currency][currency_locale][mon_decimal_point]"
value="<?php echo
@$this->element->currency_locale['mon_decimal_point'];
?>" />
							</td>
						</tr>
						<tr>
							<td class="key">
									<?php echo JText::_( 'MON_THOUSANDS_SEP' ); ?>
							</td>
							<td>
								<input type="text"
name="data[currency][currency_locale][mon_thousands_sep]"
value="<?php echo
@$this->element->currency_locale['mon_thousands_sep'];
?>" />
							</td>
						</tr>
						<tr>
							<td class="key">
									<?php echo JText::_( 'MON_GROUPING' ); ?>
							</td>
							<td>
								<?php
if(isset($this->element->currency_locale['mon_grouping'])
&&
is_array($this->element->currency_locale['mon_grouping']))
$this->element->currency_locale['mon_grouping'] =
implode(',',$this->element->currency_locale['mon_grouping']);
?>
								<input type="text"
name="data[currency][currency_locale][mon_grouping]"
value="<?php echo
@$this->element->currency_locale['mon_grouping'];
?>" />
							</td>
						</tr>
						<tr>
							<td class="key">
									<?php echo JText::_( 'POSITIVE_SIGN' ); ?>
							</td>
							<td>
								<input type="text"
name="data[currency][currency_locale][positive_sign]"
value="<?php echo
@$this->element->currency_locale['positive_sign'];
?>" />
							</td>
						</tr>
						<tr>
							<td class="key">
									<?php echo JText::_( 'NEGATIVE_SIGN' ); ?>
							</td>
							<td>
								<input type="text"
name="data[currency][currency_locale][negative_sign]"
value="<?php echo
@$this->element->currency_locale['negative_sign'];
?>" />
							</td>
						</tr>
						<tr>
							<td class="key">
									<?php echo JText::_( 'INT_FRAC_DIGITS' ); ?>
							</td>
							<td>
								<input type="text"
name="data[currency][currency_locale][int_frac_digits]"
value="<?php echo
@$this->element->currency_locale['int_frac_digits'];
?>" />
							</td>
						</tr>
						<tr>
							<td class="key">
									<?php echo JText::_( 'FRAC_DIGITS' ); ?>
							</td>
							<td>
								<input type="text"
name="data[currency][currency_locale][frac_digits]"
value="<?php echo
@$this->element->currency_locale['frac_digits'];
?>" />
							</td>
						</tr>
						<tr>
							<td class="key">
									<?php echo JText::_( 'P_CS_PRECEDES' ); ?>
							</td>
							<td>
								<?php echo JHTML::_('hikaselect.booleanlist',
"data[currency][currency_locale][p_cs_precedes]" ,
'',@$this->element->currency_locale['p_cs_precedes']);
?>
							</td>
						</tr>
						<tr>
							<td class="key">
									<?php echo JText::_( 'P_SEP_BY_SPACE' ); ?>
							</td>
							<td>
								<?php echo JHTML::_('hikaselect.booleanlist',
"data[currency][currency_locale][p_sep_by_space]" ,
'',@$this->element->currency_locale['p_sep_by_space']);
?>
							</td>
						</tr>
						<tr>
							<td class="key">
									<?php echo JText::_( 'N_CS_PRECEDES' ); ?>
							</td>
							<td>
								<?php echo
JHTML::_('hikaselect.booleanliscurrency/tmpl/index.html000064400000000032151162050350011340
0ustar00<td class="key">
								currency/tmpl/listing.php000064400000013361151162050350011536
0ustar00currency/tmpl/index.html000064400000000032151162050350011340
0ustar00<html><body></body></html>currency/tmpl/listing.php000064400000013361151162050350011536
0ustar00<?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');
?><div class="iframedoc"
id="iframedoc"></div>
<form action="index.php?option=<?php echo HIKASHOP_COMPONENT
?>&amp;ctrl=currency" method="post" 
name="adminForm" id="adminForm">
	<table>
		<tr>
			<td width="100%">
				<?php echo JText::_( 'FILTER' ); ?>:
				<input type="text" name="search"
id="search" value="<?php echo
$this->escape($this->pageInfo->search);?>"
class="text_area" />
				<button class="btn"
onclick="document.adminForm.limitstart.value=0;this.form.submit();"><?php
echo JText::_( 'GO' ); ?></button>
				<button class="btn"
onclick="document.adminForm.limitstart.value=0;document.getElementById('search').value='';this.form.submit();"><?php
echo JText::_( 'RESET' ); ?></button>
			</td>
		</tr>
	</table>
	<table id="hikashop_currency_listing" class="adminlist
table table-striped table-hover" cellpadding="1">
		<thead>
			<tr>
				<th class="title titlenum">
					<?php echo JText::_( 'HIKA_NUM' );?>
				</th>
				<th class="title titlebox">
					<input type="checkbox" name="toggle"
value="" onclick="hikashop.checkAll(this);" />
				</th>
				<th class="title">
					<?php echo JHTML::_('grid.sort',
JText::_('HIKA_NAME'), 'a.currency_name',
$this->pageInfo->filter->order->dir,$this->pageInfo->filter->order->value
); ?>
				</th>
				<th class="title titletoggle">
					<?php echo JHTML::_('grid.sort',
JText::_('CURRENCY_CODE'), 'a.currency_code',
$this->pageInfo->filter->order->dir,$this->pageInfo->filter->order->value
); ?>
				</th>
				<th class="title titletoggle">
					<?php echo JHTML::_('grid.sort',
JText::_('CURRENCY_SYMBOL'), 'a.currency_symbol',
$this->pageInfo->filter->order->dir,$this->pageInfo->filter->order->value
); ?>
				</th>
				<th class="title">
					<?php echo JHTML::_('grid.sort',
JText::_('RATE'), 'a.currency_rate',
$this->pageInfo->filter->order->dir,$this->pageInfo->filter->order->value
); ?>
				</th>
				<th class="title">
					<?php echo JText::_('CURRENCY_DISPLAY_EXAMPLE'); ?>
				</th>
				<th class="title titletoggle">
					<?php echo JHTML::_('grid.sort',
JText::_('CURRENCY_DISPLAYED'), 'a.currency_displayed',
$this->pageInfo->filter->order->dir,$this->pageInfo->filter->order->value
); ?>
				</th>
				<th class="title titletoggle">
					<?php echo JHTML::_('grid.sort',  
JText::_('HIKA_PUBLISHED'), 'a.currency_published',
$this->pageInfo->filter->order->dir,
$this->pageInfo->filter->order->value ); ?>
				</th>
				<th class="title">
					<?php echo JHTML::_('grid.sort',   JText::_(
'ID' ), 'a.currency_id',
$this->pageInfo->filter->order->dir,
$this->pageInfo->filter->order->value ); ?>
				</th>
			</tr>
		</thead>
		<tfoot>
			<tr>
				<td colspan="10">
					<?php echo $this->pagination->getListFooter(); ?>
					<?php echo $this->pagination->getResultsCounter(); ?>
				</td>
			</tr>
		</tfoot>
		<tbody>
			<?php
				$k = 0;
				$i = 0;
				foreach($this->rows as $row){
					$publishedid = 'currency_published-'.$row->currency_id;
					$displayedid = 'currency_displayed-'.$row->currency_id;
			?>
				<tr class="<?php echo "row$k"; ?>">
					<td align="center">
					<?php echo $this->pagination->getRowOffset($i); ?>
					</td>
					<td align="center">
						<?php echo JHTML::_('grid.id', $i, $row->currency_id
); ?>
					</td>
					<td>
						<?php if($this->manage){ ?>
							<a href="<?php echo
hikashop_completeLink('currency&task=edit&cid[]='.$row->currency_id);
?>">
						<?php } ?>
								<?php echo $row->currency_name; ?>
						<?php if($this->manage){ ?>
							</a>
						<?php } ?>
					</td>
					<td>
						<?php if($this->manage){ ?>
							<a href="<?php echo
hikashop_completeLink('currency&task=edit&cid[]='.$row->currency_id);
?>">
						<?php } ?>
								<?php echo $row->currency_code; ?>
						<?php if($this->manage){ ?>
							</a>
						<?php } ?>
					</td>
					<td align="center">
						<?php echo $row->currency_symbol; ?>
					</td>
					<td align="center">
						<?php echo $row->currency_rate; ?>
					</td>
					<td align="center">
	currency/view.html.php000064400000011571151162050350011027
0ustar00->currency_published); } ?>
					</td>
					<td width="1%" align="center">
						<?php echo $row->currency_id; ?>
					</td>
				</tr>
			<?php
					$i++;
					$k = 1-$k;
				}
			?>
		</tbody>
	</table>
	<input type="hidden" name="option"
value="<?php echo HIKASHOP_COMPONENT; ?>" />
	<input type="hidden" name="task" value=""
/>
	<input type="hidden" name="ctrl"
value="<?php echo JRequest::getCmd('ctrl'); ?>"
/>
	<input type="hidden" name="boxchecked"
value="0" />
	<input type="hidden" name="filter_order"
value="<?php echo
$this->pageInfo->filter->order->value; ?>" />
	<input type="hidden" name="filter_order_Dir"
value="<?php echo $this->pageInfo->filter->order->dir;
?>" />
	<?php echo JHTML::_( 'form.token' ); ?>
</form>
currency/view.html.php000064400000011571151162050350011027
0ustar00<?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 CurrencyViewCurrency extends hikashopView
{
	var $type = '';
	var $ctrl= 'currency';
	var $nameListing = 'CURRENCIES';
	var $nameForm = 'CURRENCIES';
	var $icon = 'currency';
	function display($tpl = null)
	{
		$this->paramBase =
HIKASHOP_COMPONENT.'.'.$this->getName();
		$function = $this->getLayout();
		if(method_exists($this,$function)) $this->$function();
		parent::display($tpl);
	}

	function listing(){
		$app = JFactory::getApplication();
		$pageInfo = new stdClass();
		$pageInfo->filter = new stdClass();
		$pageInfo->filter->order = new stdClass();
		$pageInfo->limit = new stdClass();
		$pageInfo->filter->order->value =
$app->getUserStateFromRequest(
$this->paramBase.".filter_order",
'filter_order',	'a.currency_id','cmd' );
		$pageInfo->filter->order->dir	=
$app->getUserStateFromRequest(
$this->paramBase.".filter_order_Dir",
'filter_order_Dir',	'asc',	'word' );

		$pageInfo->limit->value = $app->getUserStateFromRequest(
$this->paramBase.'.list_limit', 'limit',
$app->getCfg('list_limit'), 'int' );
		if(JRequest::getVar('search')!=$app->getUserState($this->paramBase.".search")){
			$app->setUserState( $this->paramBase.'.limitstart',0);
			$pageInfo->limit->start = 0;
		}else{
			$pageInfo->limit->start = $app->getUserStateFromRequest(
$this->paramBase.'.limitstart', 'limitstart', 0,
'int' );
		}
		$pageInfo->search = $app->getUserStateFromRequest(
$this->paramBase.".search", 'search', '',
'string' );
		$pageInfo->search = JString::strtolower( $pageInfo->search );
		$database	= JFactory::getDBO();
		$searchMap =
array('a.currency_symbol','a.currency_code','a.currency_name','a.currency_id');
		$filters = array();
		if(!empty($pageInfo->search)){
			$searchVal =
'\'%'.hikashop_getEscaped($pageInfo->search,true).'%\'';
			$filters[] = implode(" LIKE $searchVal OR ",$searchMap)."
LIKE $searchVal";
		}

		$query = 'FROM '.hikashop_table('currency').' AS
a';
		if(!empty($filters)){
			$query.= ' WHERE ('.implode(') AND
(',$filters).')';
		}
		if(!empty($pageInfo->filter->order->value)){
			$query .= ' ORDER BY
'.$pageInfo->filter->order->value.'
'.$pageInfo->filter->order->dir;
		}
		$database->setQuery('SELECT a.*
'.$query,$pageInfo->limit->start,$pageInfo->limit->value);
		$rows = $database->loadObjectList('currency_id');
		$currencyClass = hikashop_get('class.currency');
		$currencyClass->getCurrencies(null,$rows);
		if(!empty($pageInfo->search)){
			$rows =
hikashop_search($pageInfo->search,$rows,'currency_id');
		}
		$database->setQuery('SELECT count(*) '.$query);
		$pageInfo->elements = new stdClass();
		$pageInfo->elements->total = $database->loadResult();
		$pageInfo->elements->page = count($rows);

		hikashop_setTitle(JText::_($this->nameListing),$this->icon,$this->ctrl);

		$config =& hikashop_config();
		$manage =
hikashop_isAllowed($config->get('acl_currency_manage','all'));
		$this->assignRef('manage',$manage);
		$this->toolbar = array(
			array('name' =>
'confirm','check'=>false, 'msg'=>
JText::_('UPDATE_RATES_WARNING'),'icon'=>'upload','alt'=>JText::_('UPDATE_RATES'),
'task' => 'update','display'=>$manage
&&
hikashop_level(2)dashboard/index.html000064400000000032151162050350010461
0ustar00ss =
hikashop_get('class.cdashboard/tmpl/chart.php000064400000006024151162050350011261
0ustar00dashboard/index.html000064400000000032151162050350010461
0ustar00<html><body></body></html>dashboard/tmpl/chart.php000064400000006024151162050350011261
0ustar00<?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

$opt='';
$dateFormat='';
if(!isset($this->widget->widget_id)){
	$id='preview';
}else{
	$id=$this->widget->widget_id;
}


$chartType='';
switch($this->widget->widget_params->display){
	case 'line':
		$chartType='LineChart';
		break;
	case 'column':
		$chartType='ColumnChart';
		break;
	case 'area':
		$chartType='AreaChart';
		break;
}


if(isset($this->widget->widget_params->period_compare)){
	switch($this->widget->widget_params->period_compare){
		case 'last_period':
			$opt="hAxis: { format: 'MMM, dd' }";
			break;
		case 'last_year':
			$opt="hAxis: { format: 'MMM, dd' }";
			$dateFormat="var date_formatter = new
google.visualization.DateFormat({pattern: 'MMM, d'});
				date_formatter.format(dataTable, 0); ";
			break;
		case 'every_year':
			$date=' - ';
			break;
	}
}

if($this->widget->widget_params->date_group == '%H %j
%Y'){
		$opt="hAxis: { format: 'yyyy, MMM d - H:00' }";
		$dateFormat="var date_formatter = new
google.visualization.DateFormat({pattern: 'yyyy, MMM d -
H:00'});
		date_formatter.format(dataTable, 0); ";
}

$name=$this->widget->widget_params->content;
?>
<script language="JavaScript"
type="text/javascript">
	function drawChart(){
	var dataTable = new
google.visualization.DataTable(dashboard/tmpl/cpanel.php000064400000002314151162050350011420
0ustar00 = {
			legend:'right',
			title: 'Orders',
			legendTextStyle: {color:'#333333'},
			<?php echo $opt; ?>
		};
		vis.draw(dataTable, options);

	}

	google.load("visualization", "1",
{packages:["corechart"]});
	google.setOnLoadCallback(drawChart);


	</script>
<?php


if(isset($this->edit) && $this->edit){
	$size='width:80%; height:500px;';
}else{
	$size='width: 400px; height: 210px;';
}
?>
<div id="chart_<?php echo $id; ?>"
class="chart" style="<?php echo $size; ?>
margin:auto;" align="center"></div>
dashboard/tmpl/cpanel.php000064400000002314151162050350011420
0dashboard/tmpl/discount.php000064400000003242151162050350012007
0ustar00['url']))
			$btn['url'] = hikashop_completeLink($btn['link']);
		if(empty($btn['icon']))
			$btn['icon'] = 'icon-48-' .
$btn['image'];

		if(false) {
			echo '<li><a
href="'.$btn['url'].'"><i
class="icon-'.$btn['image'].'"></i>
'.$btn['text'].'</a></li>';
		} else {
?>
		<div class="icon-wrapper">
			<div class="icon">
				<a href="<?php echo $btn['url'];?>">
					<span class="<?php echo $btn['icon'];?>"
style="background-repeat:no-repeat;background-position:center;height:48px;padding:10px
0;"></span>
					<span><?php echo $btn['text'];?></span>
				</a>
			</div>
		</div>
<?php
		}
	}

if(false) { ?>
</ul>
</div>
<?php } else { ?>
	<div style="clear:both"></div>
</div>
<?php }
dashboard/tmpl/discount.php000064400000003242151162050350012007
0ustar00<?php
/**
 * @package	HikaShop for Joomla!
 * @version	2.2.3
 * @author	hikashop.com
 * @copyright	(C) 2010-2013 HIKARI SOFTWARE. All rights reserved.
 * @ldashboard/tmpl/form.php000064400000011076151162050350011126
0ustar00cho @$row->order_discount_code;
							?>
						</a>
					</td>
					<td>
						<?php echo @$row->Total; ?>
					</td>
					<td>
						<?php
							if(isset($row->discount_flat_amount) &&
$row->discount_flat_amount > 0){
								echo
$currencyHelper->displayPrices(array($row),'discount_flat_amount','discount_currency_id');
							}
							elseif(isset($row->discount_percent_amount) &&
$row->discount_percent_amount > 0){
								echo $row->discount_percent_amount. '%';
							}
						?>
					</td>
					<td>
						<?php echo @$row->discount_id; ?>
					</td>

				</tr>
			<?php
				$k = 1-$k;
			 	}
			}
			?>
		</tbody>
	</table>
</div>
dashboard/tmpl/form.php000064400000011076151162050350011126
0ustar00<?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');
?><fieldset>
	<div class="toolbar" id="toolbar"
style="float: right;">
		<button class="btn" type="button"
onclick="submitbutton('save');"><img
src="<?php echo HIKASHOP_IMAGES; ?>save.png"/><?php
echo JText::_('OK'); ?></button>
	</div>
</fieldset>
<div class="iframedoc"
id="iframedoc"></div>
<form action="index.php" method="post"
name="adminForm" id="adminForm">
	<table class="admintable" cellspacing="1">
		<tr>
			<td class="key">
				<?php echo JText::_( 'HIKA_NAME' ); ?>
			</td>
			<td>
				<input name="data[widget][widget_name]"
value="<?php echo
$this->escape(@$this->element->widget_name); ?>" />
			</td>
		</tr>
		<tr>
			<td class="key">
				<?php echo JText::_( 'CONTENT' ); ?>
			</td>
			<td>
				<?php echo
$this->widgetContent->display('data[widget][widget_params][content]',@$this->element->widget_params->content);
?>
			</td>
		</tr>
		<tr>
			<td class="key">
				<?php echo JText::_( 'DISPLAY' ); ?>
			</td>
			<td>
				<?php echo
$this->widgetDisplay->display('data[widget][widget_params][display]',@$this->element->widget_params->display);
?>
			</td>
		</tr>
		<tr id="widget_date">
			<td class="key" >
				<?php echo JText::_( 'DATE_TYPE' );// only for orders
?>
			</td>
			<td>
				<?php echo
$this->dateType->display('data[widget][widget_params][date_type]',@$this->element->widget_params->date_type);
?>
			</td>
		</tr>
		<tr id="widget_group">
			<td class="key" >
				<?php echo JText::_( 'DATE_GROUP' );//only for graph and
gauge ?>
			</td>
			<td>
				<?php echo
$this->dateGroup->display('data[widget][widget_params][date_group]',@$this->element->widget_params->date_group);
?>
			</td>
		</tr>
		<tr>
			<td class="key" >
				<?php echo JText::_( 'START_DATE' ); ?>
			</td>
			<td>
				<?php echo JHTML::_('calendar',
hikashop_getDate((@$this->element->widget_params->start?@$this->element->widget_params->start:''),'%Y-%m-%d
%H:%M'),
'data[widget][widget_params][start]','period_start','%Y-%m-%d
%H:%M',array('size'=>'20')); ?>
			</td>
		</tr>
		<tr>
			<td class="key" >
				<?php echo JText::_( 'END_DATE' ); ?>
			</td>
			<td>
				<?php echo JHTML::_('calendar',
hikashop_getDate((@$this->element->widget_params->end?@$this->element->widget_params->end:''),'%Y-%m-%d
%H:%M'),
'data[widget][widget_params][end]','period_end','%Y-%m-%d
%H:%M',array('size'=>'20')); ?>
			</td>
		</tr>
		<tr>
			<td class="key" >
				<?php echo JText::_( 'PERIOD' ); ?>
			</td>
			<td>
				<?php echo
$this->delay->display('data[widget][widget_params][period]',(int)@$this->element->widget_params->period,3);
?>
			</td>
		</tr>
		<tr id="widget_status">
			<td class="key" >
				<?php echo JText::_( 'ORDER_STATUS' );// only for orders
?>
			</td>
			<td>
				<?php echo
$this->status->display('data[widget][widget_params][status][]',@$this->elemendashboard/tmpl/gauge.php000064400000002702151162050350011247
0ustar00ing->display("data[widget][widget_params][format]",@$this->element->widget_params->format);
?>
				</td>
			</tr>
		<?php } ?>
	</table>
	<input type="hidden" name="option"
value="<?php echo HIKASHOP_COMPONENT; ?>" />
	<input type="hidden" name="data[widget][widget_id]"
value="<?php echo (int)@$this->element->widget_id;
?>" />
	<input type="hidden" name="task" value=""
/>
	<input type="hidden" name="tmpl"
value="component" />
	<input type="hidden" name="ctrl"
value="<?php echo JRequest::getVar('ctrl');?>"
/>
	<?php echo JHTML::_( 'form.token' );?>
</form>
dashboard/tmpl/gauge.php000064400000002702151162050350011247
0ustar00dashboard/tmpl/graph.php000064400000004046151162050350011263
0ustar00n.DataTable();
				data.addColumn('string', 'Label');
				data.addColumn('number', 'Value');
				data.addRows(1);
				data.setValue(0, 0, '');
				data.setValue(0, 1, ".(int)$this->widget->main.");

				var chart = new
google.visualization.Gauge(document.getElementById('graph_".$this->widget->widget_id."'));
				var options = {width: 190, height: 190, redFrom: 0, redTo:
".(int)($this->widget->average/2).",
						yellowFrom:".(int)($this->widget->average/2).",
yellowTo: ".(int)$this->widget->average.",
						greenFrom:".(int)$this->widget->average.", greenTo:
".(int)($this->widget->average*2).", minorTicks: 5, min: 0,
max: ".(int)($this->widget->average*2)."};
				chart.draw(data, options);
			}";
if (!HIKASHOP_PHP5) {
	$doc =& JFactory::getDocument();
}else{
	$doc = JFactory::getDocument();
}
$doc->addScriptDeclaration($js);
?>
<div id="graph_<?php echo $this->widget->widget_id;
?>" style="height: 210px;"
align="center"></div>
dashboard/tmpl/graph.php000064400000004046151162050350011263
0ustar00<?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
$data = array();
$types=array();
$values='';
foreach($this->widget->elements as $element){
	if(isset($element->type) &&
!isset($types[$element->type])){
		$types[$element->type]="data.addColumn('number',
'".$element->type."')";
	}
}
if(empty($types)){
	$typedashboard/tmpl/index.html000064400000000032151162050350011435
0ustar00document.getElementById('gdashboard/tmpl/listing.php000064400000005054151162050350011633
0ustar00dashboard/tmpl/index.html000064400000000032151162050350011435
0ustar00<html><body></body></html>dashboard/tmpl/listing.php000064400000005054151162050350011633
0ustar00<?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');
?><div class="iframedoc"
id="iframedoc"></div>
<?php
$itemOnARow = 0;
if(!HIKASHOP_BACK_RESPONSIVE) { ?>
<table class="adminform"
style="width:100%;border-collapse:separate;border-spacing:5px">
<?php }

foreach($this->widgets as $widget){
	if(empty($widget->widget_params->display)) continue;
	if(!hikashop_level(2)){
		if(isset($widget->widget_params->content) &&
$widget->widget_params->content=='partners' ||
$widget->widget_params->display=='map') continue;
		if(!hikashop_level(1) &&
in_array($widget->widget_params->display,array('gauge','pie')))
continue;
	}
	if($itemOnARow==0){
		if(!HIKASHOP_BACK_RESPONSIVE) {
			echo '<tr>';
		}else{
			echo '<div class="row-fluid">';
		}
	}
	$val =
preg_replace('#[^a-z0-9]#i','_',strtoupper($widget->widget_name));
	$trans = dashboard/tmpl/listing.xml000064400000000314151162050350011636
0ustar00splay=='line' ||
$widget->widget_params->display=='area'){
		$this->setLayout('chart');
	}else{
		$this->setLayout($widget->widget_params->display);
	}
	echo $this->loadTemplate();
	if(!HIKASHOP_BACdashboard/tmpl/map.php000064400000004126151162050350010736
0ustar00dashboard/tmpl/listing.xml000064400000000314151162050350011636
0ustar00<?xml version="1.0" encoding="utf-8"?>
<metadata>
	<layout title="COM_HIKASHOP_DASHBOARD_VIEW_TITLE">
		<message>
			<![CDATA[COM_HIKASHOP_DASHBOARD_VIEW_DESC]]>
		</message>
	</layout>
</metadata>dashboard/tmpl/map.php000064400000004126151162050350010736
0ustar00<?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
$data = array();
$i=0;
if(isset($this->edit)){
	$showLegend='true';
}else{
	$showLegend='false';
}
if(empty($this->widget->elements)){
	$data[] = 'data.setValue(0, 0, null);
			data.setValue(0, 1, 0);
			data.setValue(0, 2, null);';
}else{
	foreach($this->widget->elements as $element){
		$data[] =
'dadashboard/tmpl/order.php000064400000004134151162050350011273
0ustar00ze."
				options['colors'] = [ 0xFFB581, 0xc06000]; //orange colors
				options['showLegend'] = ".$showLegend.";
				options['region']='".$this->widget->widget_params->region."';
				var chart = new
google.visualization.GeoMap(document.getElementById('graph_".$this->widget->widget_id."'));
				chart.draw(data, options);
			}";
if (!HIKASHOP_PHP5) {
	$doc =& JFactory::getDocument();
}else{
	$doc = JFactory::getDocument();
}
$doc->addScriptDeclaration($js);
?>
<div id="graph_<?php echo $this->widget->widget_id;
?>" style="height: <?php echo $height; ?>px;"
align="center"></div>
dashboard/tmpl/order.php000064400000004134151162050350011273
0ustar00<?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');
?><div>
	<table class="adminlist table table-striped table-hover"
cellpadding="1">
		<thead>
			<tr>
				<th class="title">
				</th>
				<th class="title">
					<?php echo JText::_('CUSTOMER'); ?>
				</th>
				<th class="title">
					<?php echo JText::_('ORDER_STATUS'); ?>
				</th>
				<th class="title">
					<?pdashboard/tmpl/pie.php000064400000002752151162050350010741
0ustar00center">
						<?php echo $row->order_status; ?>
					</td>
					<td align="center">
						<?php
							if(isset($this->widget->widget_params->orders_total_calculation)
&&
$this->widget->widget_params->orders_total_calculation=='exclude_fees'){
								echo
$this->currencyHelper->format(($row->order_full_price-$row->order_shipping_price),$row->order_currency_id);
							}else{
								echo
$this->currencyHelper->format($row->order_full_price,$row->order_currency_id);
							}
						?>
					</td>
				</tr>
			<?php
					$k = 1-$k;
				}
			}

			?>
		</tbody>
	</table>
</div>
dashboard/tmpl/pie.php000064400000002752151162050350010741
0ustar00dashboard/tmpl/product.php000064400000004337151162050350011645
0ustar00&& $this->edit){
	$height='600';
	$width='600';
	$legend='';
}else{
	$height='210';
	$width='300';
	$legend=", legend: 'none'";
}

$js="
google.load('visualization', '1',
{'packages':['corechart']});
			google.setOnLoadCallback(drawChart_".$this->widget->widget_id.");
			function drawChart_".$this->widget->widget_id."() {
				var data = new google.visualization.DataTable();
				data.addColumn('string', 'name');
				data.addColumn('number', 'total');
				data.addRows(".count($data).");
				".implode("\n",$data)."

				var chart = new
google.visualization.PieChart(document.getElementById('graph_".$this->widget->widget_id."'));
				chart.draw(data, {width: ".$width.", height:
".$height." ".$legend."});
			}";
if (!HIKASHOP_PHP5) {
	$doc =& JFactory::getDocument();
}else{
	$doc = JFactory::getDocument();
}
$doc->addScriptDeclaration($js);

?>
<div id="graph_<?php echo $this->widget->widget_id;
?>" style="height:<?php echo $height; ?>px;"
align="center"></div>
dashboard/tmpl/product.php000064400000004337151162050350011645
0ustar00<?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');
?><div>
	<table class="adminlist table table-striped table-hover"
cellpadding="1">
		<thead>
			<tr>
				<th class="title">
					<?php echo JText::_('PRODUCT_NAME'); ?>
				</th>
				<?php
if($this->widget->widget_params->product_data=='orders'){
?>
				<th class="title">
					<?php echo JText::_('ORDERS'); ?>
				</th>
				<?php }
				if($this->widget->widget_params->product_data=='orders'
&&
$this->widget->widget_params->content=='categories')dashboard/tmpl/table.php000064400000004155151162050350011252
0ustar00->widget->widget_params->product_data=='orders'){
?>
					<td>
						<?php echo @$row->quantity; ?>
					</td>
					<?php }
					if($this->widget->widget_params->product_data=='orders'
&&
$this->widget->widget_params->content=='categories'){}else{
						if($this->widget->widget_params->product_data=='clicks'){
							$value= $row->Total;
						}else{
							$currencyClass = hikashop_get('class.currency');
							$value=$currencyClass->format($row->Total,
$row->order_currency_id);
						}?>
					<td>
						<?php echo $value; ?>
					</td>
					<?php } ?>
					<td>
						<?php echo @$row->order_product_id; ?>
					</td>

				</tr>
			<?php
				$k = 1-$k;
				}
			}
			?>
		</tbody>
	</table>
</div>
dashboard/tmpl/table.php000064400000004155151162050350011252
0ustar00<?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
	$id=$this->widget->widget_id;
	$row_id=0;
?>
<div id="table_<?php echo $id; ?>"
style="margin:auto; margin-b" align="center">
	<?php

	echo '<table class="widget_table"
style="margin-bottom:10px;">';
	foreach($this->widget->widget_params->table as $key => $row){
		$name = str_replace('
','_',strtoupper($row->row_name));?>
			<dashboard/tmpl/user.php000064400000005551151162050350011142
0ustar00edit.png'; ?>" alt="edit"/>
							</a>
						</td>
					<?php } ?>
				</td>
			</tr>
	<?php }
	echo '</table>';
	foreach($this->widget->widget_params->table as $key => $row){
		$row_id=$key+1;
	}

	if(isset($this->edit)){?>
	<a class="modal" href=" <?php echo
hikashop_completeLink('report&task=tableform&widget_id='.$id.'&row_id='.$row_id,true,
true ); ?>" rel="{handler: 'iframe', size: {x: 900,
y: 480}}">
		<button class="btn" type="button"
onclick="return false">
						<img src="<?php echo HIKASHOP_IMAGES;
?>add.png"/><?php echo JText::_('ADD');?>
		</button>
	</a>
	<?php } ?>
</div>
<br/>
dashboard/tmpl/user.php000064400000005551151162050350011142
0ustar00<?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');
?><div>
	<table class="adminlist table table-striped table-hover"
cellpadding="1">
		<thead>
			<tr>
				<th class="title">
					<?php echo JText::_('HIKA_USER_NAME'); ?>
				</th>
				<th class="title">
					<?php echo JText::_('HIKA_USERNAME'); ?>
				</th>
				<th class="title">
					<?php echo JText::_('HIKA_EMAIL'); ?>
				</th>
				<?php
				$best_customers=false;
				if(isset($this->widget->widget_params->customers)){
if($this->widget->widget_params->customers=='best_customers'){
$best_customers=true; } }
				if(($this->widget->widget_params->content=='customers'
&& $best_customers) ||
($this->widget->widget_params->content=='partners'
&&
$this->widget->widget_params->partners=='best_customers')){
?>
				<th>
					<?php echo JText::_('TOTAL'); ?>
				</th>
				<th>
					<?php echo JText::_('ORDERS'); ?>
				</th>
				<?php }

				if($this->widget->filter_partner==1){?>
				<th class="title">
					<?php echo JText::_('UNPAID_TOTAL_AMOUNT'); ?>
				</th>
				<?php }?>
			</tr>
		</thead>
		<tbody>
			<?php
				$k = 0;
				if(!empty($this->widget->elementsdiscount/index.html000064400000000032151162050350010362
0ustar00best_customers'){
$best_cudiscount/tmpl/add_coupon.php000064400000003536151162050350012201
0ustar00discount/index.html000064400000000032151162050350010362
0ustar00<html><body></body></html>discount/tmpl/add_coupon.php000064400000003536151162050350012201
0ustar00<?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 if($this->badge!='false'){ ?>
	<div id="result">
		<?php echo
$thidiscount/tmpl/export.php000064400000002143151162050350011400 0ustar00hp
echo
hikashop_completeLink('discount&task=edit&cid='.$row->discount_id);
?>"><?php echo $row->discount_code; ?></a>
				</td>
				<td align="center">
					<a href="#" onclick="return
deleteRow('coupon_div_<?php echo
$row->discount_id;?>','coupon[<?php echo
$row->discount_id;?>]','coupon_<?php echo
$row->discount_id; ?>');">
						<img src="../media/com_hikashop/images/delete.png"/>
					</a>
				</td>
				<td width="1%" align="center">
					<?php echo $row->discount_id; ?>
					<div id="coupon_div_<?php echo
$row->discount_id;?>">
						<input style="width: 50px; background-color:#e8f9db;"
type	="hidden" name="coupon[<?php echo
$row->discount_id;?>]" id="coupon[<?php echo
$row->discount_id;?>]" value="<?php echo
$row->discount_id;?>"/>
					</div>
				</td>
			</tr>
			<?php
			$k = 1-$k;
		}
	?>
	</tbody>
</table>
<?php } ?>
discount/tmpl/export.phpdiscount/tmpl/form.php000064400000011517151162050350011027
0ustar00config->get('csv_decimal_separator','.');

$export = hikashop_get('helper.spreadsheet');
$export->init($format, 'hikashop_export', $separator,
$force_quote);

if(!empty($this->rows)){

	$first = array_keys(get_object_vars(reset($this->rows)));
	$export->writeLine($first);

	foreach($this->rows as $row){
		if(!empty($row->discount_start)) $row->discount_start =
hikashop_getDate($row->discount_start,'%Y-%m-%d %H:%M:%S');
		if(!empty($row->discount_end)) $row->discount_end =
hikashop_getDate($row->discount_end,'%Y-%m-%d %H:%M:%S');
		$export->writeLine($row);
	}
}

$export->send();
exit;
discount/tmpl/form.php000064400000011517151162050350011027
0ustar00<?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');
?><div class="iframedoc"
id="iframedoc"></div>
<div>
	<form action="index.php?option=<?php echo HIKASHOP_COMPONENT
?>&amp;ctrl=discount" method="post" 
name="adminForm" id="adminForm"
enctype="multipart/form-data">
<?php if(!HIKASHOP_BACK_RESPONSIVE) { ?>
<div id="page-discount">
	<table style="width:100%">
		<tr>
			<td valign="top" width="50%">
<?php } else { ?>
<div id="page-discount" class="row-fluid">
	<div class="span6">
<?php } ?>
					<table class="admintable table"
style="margin:auto">
						<tr>
							<td class="key">
									<?php echo JText::_( 'DISCOUNT_CODE' ); ?>
							</td>
							<td>
								<input type="text"
name="data[discount][discount_code]" value="<?php echo
$this->escape(@$this->element->discount_code); ?>" />*
							</td>
						</tr>
						<tr>
							<td class="key">
									<?php echo JText::_( 'DISCOUNT_TYPE' ); ?>
							</td>
							<td>
								<?php echo
$this->type->display('data[discount][discount_type]',@$this->element->discount_type,true);
?>
							</td>
						</tr>
						<tr>
							<td class="key">
									<?php echo JText::_( 'DISCOUNT_FLAT_AMOUNT' ); ?>
							</td>
							<td>
								<input type="text"
name="data[discount][discount_flat_amount]" value="<?php
echo @$this->element->discount_flat_amount; ?>" /><?php
echo
$this->currency->display('data[discount][discount_currency_id]',@$this->element->discount_currency_id);
?>
							</td>
						</tr>
						<tr>
							<td class="key">
									<?php echo JText::_( 'DISCOUNT_PERCENT_AMOUNT' );
?>
							</td>
							<td>
								<input type="text"
name="data[discount][discount_percent_amount]"
value="<?php echo @$this->element->discount_percent_amount;
?>" />
							</td>
						</tr>
						<tr id="hikashop_tax">
							<td class="key">
									<?php echo JText::_( 'TAXATION_CATEGORY' ); ?>
							</td>
							<td>
								<?php echo
$this->categoryType->display('data[discount][discount_tax_id]',@$this->element->discount_tax_id);?>
							</td>
						</tr>
						<tr>
							<td class="key">
									<?php echo JText::_( 'DISCOUNT_USED_TIMES' ); ?>
							</td>
							<td>
								<input type="text"
name="data[discount][discount_used_times]" value="<?php
echo @$this->element->discount_used_times; ?>" />
							</td>
						</tr>
						<tr>
							<td class="key">
									<?php echo JText::_( 'HIKA_PUBLISHED' ); ?>
							</td>
							<td>
								<?php echo JHTML::_('hikaselect.booleanlist',
"data[discount][discount_published]" ,
'',@$this->element->discount_published	); ?>
							</td>
						</tr>
					</table>
<?php if(!HIKASHOP_BACK_RESPONSIVE) { ?>
			</td>
			<td valign="top" width="50%">
<?php } else { ?>
	</div>
	<div class="span6">
<?php } ?>
					<table class="admintable table"
style="margin:auto">
						<tr>
							<td class="key">
									<?php echo JText::_( 'DISCOUNT_START_DATE' ); ?>
							</td>
							<td>
								<?php echo JHTML::_('calendar',
(@$this->element->discount_start?hikashop_getDate(@$this->element->discount_start,'%Y-%m-%d
%H:%M'):''),
'data[discount][discount_start]','didiscount/tmpl/form.xml000064400000000316151162050350011033
0ustar00kashop_getUpgradeLink('essential');; ?>
							</td>
						</tr>
<?php
		JPluginHelper::importPlugin('hikashop');
		$dispatcher = JDispatcher::getInstance();
		$html = array();
		$dispatcher->triggerdiscount/tmpl/form_restrictions.php000064400000015772151162050350013646
0ustar00discount/tmpl/form.xml000064400000000316151162050350011033
0ustar00<?xml version="1.0" encoding="utf-8"?>
<metadata>
	<layout title="COM_HIKASHOP_DISCOUNT_CREATE_TITLE">
		<message>
			<![CDATA[COM_HIKASHOP_DISCOUNT_CREATE_DESC]]>
		</message>
	</layout>
</metadata>discount/tmpl/form_restrictions.php000064400000015772151162050350013646
0ustar00<?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');
?>						<tr id="hikashop_min_order">
							<td class="key">
									<?php echo JText::_( 'MINIMUM_ORDER_VALUE' ); ?>
							</td>
							<td>
								<input type="text"
name="data[discount][discount_minimum_order]"
value="<?php echo @$this->element->discount_minimum_order;
?>" />
							</td>
						</tr>
						<tr id="hikashop_min_products">
							<td class="key">
									<?php echo JText::_( 'MINIMUM_NUMBER_OF_PRODUCTS' );
?>
							</td>
							<td>
								<input type="text"
name="data[discount][discount_minimum_products]"
value="<?php echo
(int)@$this->element->discount_minimum_products; ?>" />
							</td>
						</tr>
						<tr>
							<td class="key">
									<?php echo JText::_( 'DISCOUNT_QUOTA' ); ?>
							</td>
							<td>
								<input type="text"
name="data[discount][discount_quota]" value="<?php echo
@$this->element->discount_quota; ?>" />
							</td>
						</tr>
						<tr id="hikashop_quota_per_user">
							<td class="key">
									<?php echo JText::_( 'DISCOUNT_QUOTA_PER_USER' );
?>
							</td>
							<td>
								<input type="text"
name="data[discount][discount_quota_per_user]"
value="<?php echo @$this->element->discount_quota_per_user;
?>" />
							</td>
						</tr>
						<tr>
							<td class="key">
									<?php echo JText::_( 'PRODUCT' ); ?>
							</td>
							<td>
								<span id="product_id" >
									<?php echo
(int)@$this->element->discount_product_id.'
'.@$this->element->product_name; ?>
									<input type="hidden"
name="data[discount][discount_product_id]" value="<?php
echo @$this->element->discount_product_id; ?>" />
								</span>
								<?php
									echo $this->popup->display(
											'<img src="'.
HIKASHOP_IMAGES.'edit.png"
alt="'.JText::_('PRODUCT').'"/>',
											'PRODUCT',
											
hikashop_completeLink("product&task=selectrelated&select_type=discount",true
),
											'product_link',
											760, 480, '', '', 'link'
										);
									?>
								<a href="#"
onclick="document.getElementById('product_id').innerHTML='<input
type=\'hidden\'
name=\'data[discount][discount_product_id]\'
value=\'0\' />';return false;" >
									<img src="<?php echo HIKASHOP_IMAGES;
?>delete.png" alt="delete"/>
								</a>
							</td>
						</tr>
						<tr>
							<td class="key">
									<?php echo JText::_( 'CATEGORY' ); ?>
							</td>
							<td>
								<span id="changeParent" >
									<?php echo
(int)@$this->element->discount_category_id.'
'.@$this->element->category_name; ?>
								</span>
									<input type="hidden"
id="categoryselectparentlisting"
name="data[discount][discount_category_id]" value="<?php
echo @$this->element->discount_category_id; ?>" />
								<?php
									echo $this->popup->display(
											'<img src="'.
HIKASHOP_IMAGES.'edit.png"
alt="'.JText::_('CATEGORY').'"/>',
											'CATEGORY',
											hikashop_completeLink("category&task=selectparentlisting&control=category",true
),
											'category_link',
											760, 480, '', '', 'link'
										);
									?>
								<a href="#"
onclick="document.getElementById('changeParent').innerHTML='0
<?php echo
$this->escape(JText::_('CATEGORY_NOT_FOUND'));?>';
document.getElementById('categoryselectparentlisting').value='0';return
false;" >
									<img src="<?php echo HIKASHOP_IMAGES;
?>delete.png" alt="delete"/>
								</a>
							</td>
						</tr>
						<tr>
							<td class="key">
									<?php echo JText::_( 'INCLUDING_SUB_CATEGORIES' );
?>
							</td>
							<td>
								<?php echo JHTML::_('hikaselect.booleanlist',
"data[discount][discount_category_childs]" ,
'',@$this->element->discount_category_childs	); ?>
							</td>
						</tr>
						<tr>
							<td class="key">
									<?php echo JText::_( 'ZONE' ); ?>
							</td>
							<td>
								<span id="zone_id" >
									<?php echo (int)@$this->element->discount_zone_id.'
'.@$this->element->zone_name_english; ?>
									<input type="hidden"
name="data[discount][discount_zone_id]" value="<?php echo
@$this->element->discount_zone_id; ?>" />
								</span>
								<?php
									echo $this->popup->display(
										'<img src="'.
HIKASHOP_IMAGES.'edit.png"
alt="'.JText::_('ZONE').'"/>',
										'ZONE',
										
hikashop_completeLink("zone&task=selectchildlisting&type=discount",true
),
										'zone_id_link',
										760, 480, '', '', 'link'
									);
								?>
								<a href="#"
onclick="document.getElementById('zone_id').innerHTML='<input
type=\'hidden\'
name=\'data[discount][discount_zone_id]\' value=\'0\'
/>';return false;" >
									<img src="<?php echo HIKASHOP_IMAGES;
?>delete.png" alt="delete"/>
								</a>
							</td>
						</tr>
						<tr id="hikashop_auto_load">
							<td class="key">
									<?php echo JText::_( 'COUPON_AUTO_LOAD' ); ?>
							</td>
							<td>
								<?php echo JHTML::_('hikaselect.booleanlist',
"data[discount][discount_auto_load]" ,
'',@$this->element->discount_auto_load	); ?>
							</td>
						</tr>
<?php



?>
						<tr id="hikashop_discount_coupon_product_only">
							<td class="key">
									<?php echo
JText::_('COUPON_APPLIES_TO_PRODUCT_ONLY'); ?>
							</td>
							<td>
								<?php echo JHTML::_('hikaselect.booleanlist',
"data[discount][discount_coupon_product_only]" ,
'',discount/tmpl/index.html000064400000000032151162050350011336
0ustar00options[] =
JHTML::_('selediscount/tmpl/listing.php000064400000016730151162050350011537
0ustar00discount/tmpl/index.html000064400000000032151162050350011336
0ustar00<html><body></body></html>discount/tmpl/listing.php000064400000016730151162050350011537
0ustar00<?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');
?><div class="iframedoc"
id="iframedoc"></div>
<form action="index.php?option=<?php echo HIKASHOP_COMPONENT
?>&amp;ctrl=discount" method="post"
name="adminForm" id="adminForm">
	<table>
		<tr>
			<td width="100%">
				<?php echo JText::_( 'FILTER' ); ?>:
				<input type="text" name="search"
id="search" value="<?php echo
$this->escape($this->pageInfo->search);?>"
class="text_area" />
				<button class="btn"
onclick="document.adminForm.limitstart.value=0;this.form.submit();"><?php
echo JText::_( 'GO' ); ?></button>
				<button class="btn"
onclick="document.adminForm.limitstart.value=0;document.getElementById('search').value='';this.form.submit();"><?php
echo JText::_( 'RESET' ); ?></button>
			</td>
			<td nowrap="nowrap">
				<?php echo
$this->filter_type->display('filter_type',$this->pageInfo->filter->filter_type);
?>
			</td>
		</tr>
	</table>
	<table id="hikashop_discount_listing" class="adminlist
table table-striped table-hover" cellpadding="1">
		<thead>
			<tr>
				<th class="title titlenum">
					<?php echo JText::_( 'HIKA_NUM' );?>
				</th>
				<th class="title titlebox">
					<input type="checkbox" name="toggle"
value="" onclick="hikashop.checkAll(this);" />
				</th>
				<th class="title">
					<?php echo JHTML::_('grid.sort',
JText::_('DISCOUNT_CODE'), 'a.discount_code',
$this->pageInfo->filter->order->dir,$this->pageInfo->filter->order->value
); ?>
				</th>
				<th class="title">
					<?php echo JHTML::_('grid.sort',
JText::_('DISCOUNT_TYPE'), 'a.discount_type',
$this->pageInfo->filter->order->dir,$this->pageInfo->filter->order->value
); ?>
				</th>
				<th class="title">
					<?php echo JHTML::_('grid.sort',
JText::_('DISCOUNT_START_DATE'), 'a.discount_start',
$this->pageInfo->filter->order->dir,$this->pageInfo->filter->order->value
); ?>
				</th>
				<th class="title">
					<?php echo JHTML::_('grid.sort',
JText::_('DISCOUNT_END_DATE'), 'a.discount_end',
$this->pageInfo->filter->order->dir,$this->pageInfo->filter->order->value
); ?>
				</th>
				<th class="title">
					<?php echo JText::_('DISCOUNT_VALUE'); ?>
				</th>
				<?php if(hikashop_level(1)){ ?>
					<th class="title">
						<?php echo JText::_('DISCOUNT_QUOTA'); ?>
					</th>
					<th class="title">
						<?php echo JText::_('RESTRICTIONS'); ?>
					</th>
				<?php } ?>
				<th class="title titletoggle">
					<?php echo JHTML::_('grid.sort',  
JText::_('HIKA_PUBLISHED'), 'a.discount_published',
$this->pageInfo->filter->order->dir,
$this->pageInfo->filter->order->value ); ?>
				</th>
				<th class="title">
					<?php echo JHTML::_('grid.sort',   JText::_(
'ID' ), 'a.discount_id',
$this->pageInfo->filter->order->dir,
$this->pageInfo->filter->order->value ); ?>
				</th>
			</tr>
		</thead>
		<tfoot>
			<tr>
				<td colspan="11">
					<?php echo $this->pagination->getListFooter(); ?>
					<?php echo $this->pagination->getResultsCounter(); ?>
				</td>
			</tr>
		</tfoot>
		<tbody>
			<?php
				$k = 0;
				for($i = 0,$a = count($this->rows);$i<$a;$i++){
					$row =& $this->rows[$i];
					$publishedid = 'discount_published-'.$row->discount_id;
			?>
				<tr class="<?php echo "row$k"; ?>">
					<td align="center">
					<?php echo $this->pagination->getRowOffset($i); ?>
					</td>
					<td align="center">
						<?php echo JHTML::_('grid.id', $i, $row->discount_id
); ?>
					</td>
					<td>
						<?php if($this->manage){ ?>
							<a href="<?php echo
hikashop_completeLink('discount&task=edit&cid[]='.$row->discount_id);
?>">
						<?php } ?>
								<?php echo $row->discount_code; ?>
						<?php if($this->manage){ ?>
							</a>
						<?php } ?>
					</td>
					<td>
						<?php echo $row->discount_type; ?>
					</td>
					<td align="center">
						<?php echo hikashop_getDate($row->discount_start); ?>
					</td>
					<td align="center">
						<?php echo hikashop_getDate($row->discount_end); ?>
					</td>
					<td align="center">
						<?php
							if(isset($row->discount_flat_amount) &&
$row->discount_flat_amount > 0){
								echo
$this->currencyHelper->displayPrices(array($row),'discount_flat_amount','discount_currency_id');
							}
							elseif(isset($row->discount_percent_amount) &&
$row->discount_percent_amount > 0){
								echo $row->discount_percent_amount. '%';
							}
						?>
					</td>
					<?php if(hikashop_level(1)){ ?>
						<td align="center">
							<?php
								if(empty($row->discount_quota)){
									echo JText::_('UNLIMITED');
								}else{
									echo $row->discount_quota. '
('.JText::sprintf('X_LEFT',$row->discount_quota-$row->discount_used_times).')';
								}
							?>
						</td>
						<td>
							<?php
								$restrictions=array();
								if(!empty($row->discount_minimum_order) &&
(float)$row->discount_minimum_order != 0){
									$restrictions[]=JText::_('MINIMUM_ORDER_VALUE').':'.$this->currencyHelper->displayPrices(array($row),'discount_minimum_order','discount_currency_id');
								}
								if(!empty($row->product_name)){
									$restrictions[]=JText::_('PRODUCT').':'.$row->product_name;
								}
								if(!empty($row->category_name)){
									$restriction=JText::_('CATEGORY').':'.$row->category_name;
									if($row->discount_category_childs){
										$restriction.='
'.JText::_('INCLUDING_SUB_CATEGORIES');
									}
									$restrictions[]=$restriction;
								}
								if(!empty($row->zone_name_english)){
									$restrictions[]=JText::_('ZONE').':'.$row->zone_name_english;
								}
								if(!empty($row->username)){
									$restrictions[]=JText::_('HIKA_USER').':'.$row->username;
								}



								if ($row->discount_type == 'coupon') {
									if (!empty($row->discount_coupon_product_only)) {
										 $restrictions[]='Percentage for product
onldiscount/tmpl/listing.xml000064400000000314151162050350011537 0ustar00{
?>
							<span id="<?php echo $publishedid ?>"
class="spanloading"><?php echo
$this->toggleClass->toggle($publishedid,(int)
$row->discount_published,'discount') ?></span>
						<?php }else{ echo
$thidiscount/tmpl/selection.php000064400000021224151162050350012045
0ustar00discount/tmpl/listing.xml000064400000000314151162050350011537
0ustar00<?xml version="1.0" encoding="utf-8"?>
<metadata>
	<layout title="COM_HIKASHOP_DISCOUNTS_VIEW_TITLE">
		<message>
			<![CDATA[COM_HIKASHOP_DISCOUNTS_VIEW_DESC]]>
		</message>
	</layout>
</metadata>discount/tmpl/selection.php000064400000021224151162050350012045
0ustar00<?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 if( !$this->singleSelection ) { ?>
<fieldset>
	<div class="toolbar" id="toolbar"
style="float: right;">
		<button class="btn" type="button"
onclick="if(document.adminForm.boxchecked.value==0){alert('<?php
echo JText::_('PLEASE_SELECT_SOMETHING', true);
?>');}else{submitbutton('useselection');}"><img
src="<?php echo HIKASHOP_IMAGES; ?>add.png"/><?php
echo JText::_('OK'); ?></button>
	</div>
</fieldset>
<?php } ?>
<div class="iframedoc"
id="iframedoc"></div>
<form action="index.php?option=<?php echo HIKASHOP_COMPONENT
?>&amp;ctrl=<?php echo JRequest::getCmd('ctrl');
?>" method="post" name="adminForm"
id="adminForm">
<?php if(HIKASHOP_BACK_RESPONSIVE) { ?>
	<div class="row-fluid">
		<div class="span12">
			<div class="input-prepend input-append">
				<span class="add-on"><i
class="icon-filter"></i></span>
				<input type="text" name="search"
id="search" value="<?php echo
$this->escape($this->pageInfo->search);?>"
onchange="this.form.submit();" />
				<button class="btn"
onclick="this.form.limitstart.value=0;this.form.submit();"><i
class="icon-search"></i></button>
				<button class="btn"
onclick="this.form.limitstart.value=0;document.getElementById('search').value='';this.form.submit();"><i
class="icon-remove"></i></button>
			</div>
		</div>
	</div>
<?php } else { ?>
	<table>
		<tr>
			<td width="100%">
				<?php echo JText::_( 'FILTER' ); ?>:
				<input type="text" name="search"
id="search" value="<?php echo
$this->escape($this->pageInfo->search);?>"
class="text_area"
onchange="document.adminForm.submit();" />
				<button class="btn"
onclick="this.form.submit();"><?php echo JText::_(
'GO' ); ?></button>
				<button class="btn"
onclick="document.getElementById('search').value='';this.form.submit();"><?php
echo JText::_( 'RESET' ); ?></button>
			</td>
		</tr>
	</table>
<?php } ?>
	<table class="adminlist table table-striped table-hover"
style="cell-spacing:1px">
		<thead>
			<tr>
				<th class="title titlenum"><?php
				echo JText::_( 'HIKA_NUM' );
				?></th>
<?php if( !$this->singleSelection ) { ?>
				<th class="title titlebox"><input
type="checkbox" name="toggle" value=""
onclick="hikashop.checkAll(this);" /></th>
<?php } ?>
				<th class="title"><?php
				echo JHTML::_('grid.sort',
JText::_('DISCOUNT_CODE'), 'a.discount_code',
$this->pageInfo->filter->order->dir,$this->pageInfo->filter->order->value
);
				?></th>
				<th class="title"><?php
				echo JHTML::_('grid.sort',
JText::_('DISCOUNT_TYPE'), 'a.discount_type',
$this->pageInfo->filter->order->dir,$this->pageInfo->filter->order->value
);
				?></th>
				<th class="title"><?php
				echo JHTML::_('grid.sort',
JText::_('DISCOUNT_START_DATE'), 'a.discount_start',
$this->pageInfo->filter->order->dir,$this->pageInfo->filter->order->value
);
				?></th>
				<th class="title"><?php
				echo JHTML::_('grid.sort',
JText::_('DISCOUNT_END_DATE'), 'a.discount_end',
$this->pageInfo->filter->order->dir,$this->pageInfo->filter->order->value
);
				?></th>
				<th class="title"><?php
				echo JText::_('DISCOUNT_VALUE');
				?></th>
<?php if(hikashop_level(1)){ ?>
				<th class="title"><?php
				echo JText::_('DISCOUNT_QUOTA');
				?></th>
				<th class="title"><?php
				echo JText::_('RESTRICTIONS');
				?></th>
<?php } ?>
				<th class="title titletoggle"><?php
				echo JHTML::_('grid.sort',  
JText::_('HIKA_PUBLISHED'), 'a.discount_published',
$this->pageInfo->filter->order->dir,
$this->pageInfo->filter->order->value );
				?></th>
				<th class="title"><?php
				echo JHTML::_('grid.sort',   JText::_( 'ID' ),
'a.user_id', $this->pageInfo->filter->order->dir,
$this->pageInfo->filter->order->value );
				?></th>
			</tr>
		</thead>
		<tfoot>
			<tr>
				<td colspan="11"><?php
					echo $this->pagination->getListFooter();
					echo $this->pagination->getResultsCounter();
				?></td>
			</tr>
		</tfoot>
		<tbody>
<?php
	$k = 0;
	for($i = 0, $a = count($this->rows); $i < $a; $i++) {
		$row =& $this->rows[$i];

		$lbl1 = ''; $lbl2 = '';
		$extraTr = '';
		if( $this->singleSelection ) {
			$data = '{id:'.$row->discount_id;
			foreach($this->elemStruct as $s) {
				if($s == 'id')
					continue;
				$data .= ','.$s.':\''.
str_replace(array('\'','"'),array('\\\'','\\"'),$row->$s).'\'';
			}
			$data .= '}';
			$extraTr = ' style="cursor:pointer"
onclick="window.top.hikashop.submitBox('.$data.');"';
		} else {
			$lbl1 = '<label for="cb'.$i.'">';
			$lbl2 = '</label>';
			$extraTr = '
onclick="window.hikashop.checkRow(\'cb'.$i.'\');"';
		}
?>
			<tr class="row<?php echo $k; ?>"<?php echo
$extraTr; ?>>
				<td align="center"><?php
					echo $this->pagination->getRowOffset($i);
				?></td>
<?php if( !$this->singleSelection ) { ?>
				<td align="center">
					<input type="checkbox" onclick="this.clicked=true;
this.checked=!this.checked" value="<?php echo
$row->vendor_id;?>" name="cid[]" id="cb<?php
echo $i;?>"/>
				</td>
<?php } ?>
				<td><?php
					echo $lbl1 . $row->discount_code . $lbl2;
				?></td>
				<td><?php
					echo $lbl1 . $row->discount_type . $lbl2;
				?></td>
				<td align="center"><?php
					echo $lbl1 . hikashop_getDate($row->discount_start) . $lbl2;
				?></td>
				<td align="center"><?php
					echo $lbl1 . hikashop_getDate($row->discount_end) . $lbl2;
				?></td>
				<td align="center"><?php
					echo $lbl1;
					if(isset($row->discount_flat_amount) &&
$row->discount_flat_amount > 0){
						echo
$this->currencyHelper->displayPrices(array($row),'discount_flat_amount','discount_currency_id');
					} elseif(isset($row->discount_percent_amount) &&
$row->discount_percent_amount > 0){
						echo $row->discount_percent_amount. '%';
					}
					echo $lbl2;
				?></td>
<?php if(hikashop_level(1)){ ?>
				<td align="center"><?php
					echo $lbl1;
					if(empty($row->discount_quota)){
						echo JText::_('UNLIMITED');
					}else{
						echo $row->discount_quota. '
('.JText::sprintf('X_LEFT',$row->discount_quota-$row->discount_used_times).')';
					}
					echo $lbl2;
				?></td>
				<td><?php
					$restrictions=array();
					if(!empty($row->discount_minimum_order) &&
(float)$row->discount_minimum_order != 0){
						$restrictions[]=JText::_('MINIMUM_ORDER_VALUE').':'.$this->currencyHelper->displayPrices(array($row),'discount_minimum_order','discount_currency_id');
					}
					if(!empty($row->product_name)){
						$restrictions[]=JText::_('PRODUCT').':'.$row->product_name;
					}
					if(!empty($row->category_name)){
						$restriction=JText::_('CATEGORY').':'.$row->category_name;
						if($row->discount_category_childs){
							$restriction.='
'.JText::_('INCLUDING_SUB_CATEGORIES');
						}
						$restrictions[]=$restriction;
					}
					if(!empty($row->zone_name_english)){
						$restrictions[]=JText::_('ZONE').':'.$row->zone_name_english;
					}
					if(!empty($row->username)){
						$restrictions[]=JText::_('HIKA_USER').':'.$row->username;
					}



					if ($row->discount_type == 'coupon') {
			discount/tmpl/select_coupon.php000064400000016531151162050350012727
0ustar00alue="<?php echo HIKASHOP_COMPONENT; ?>" />
	<input type="hidden" name="task"
value="selection" />
	<input type="hidden" name="tmpl"
value="component" />
	<input type="hidden" name="single"
value="<?php echo $this->singleSelection ? '1' :
'0'; ?>" />
	<input type="hidden" name="ctrl"
value="<?php echo JRequest::getCmd('ctrl'); ?>"
/>
	<input type="hidden" name="boxchecked"
value="0" />
	<input type="hidden" name="filter_order"
value="<?php echo
$this->pageInfo->filter->order->value; ?>" />
	<input type="hidden" name="filter_order_Dir"
value="<?php echo $this->pageInfo->filter->order->dir;
?>" />
	<?php echo JHTML::_('form.token'); ?>
</form>
discount/tmpl/select_coupon.php000064400000016531151162050350012727
0ustar00<?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
$onclick='';
if($this->badge=='false'){ ?>
<fieldset>
	<div class="toolbar" id="toolbar"
style="float: right;">
		<button class="btn" type="button"
onclick="if(document.adminForm.boxchecked.value==0){alert('<?php
echo JText::_( 'PLEASE_SELECT_SOMETHING',true );
?>');}else{submitbutton('add_coupon');}"><img
src="<?php echo HIKASHOP_IMAGES; ?>add.png"/><?php
echo JText::_('OK'); ?></button>
	</div>
</fieldset>
<?php }else{
	$onclick="window.parent.document.getElementById('discountselectparentlisting').name='none';";
} ?>
<div class="iframedoc"
id="iframedoc"></div>
<table width="100%">
	<tr>
		<td style="vertical-align:top;">
			<form action="index.php?option=<?php echo HIKASHOP_COMPONENT
?>&amp;ctrl=discount" method="post" 
name="adminForm" id="adminForm">
				<table>
					<tr>
						<td width="100%">
							<?php echo JText::_( 'FILTER' ); ?>:
							<input type="text" name="search"
id="search" value="<?php echo
$this->escape($this->pageInfo->search);?>"
class="text_area" />
							<button class="btn"
onclick="document.adminForm.limitstart.value=0;this.form.submit();"><?php
echo JText::_( 'GO' ); ?></button>
							<button class="btn"
onclick="document.adminForm.limitstart.value=0;document.getElementById('search').value='';this.form.submit();"><?php
echo JText::_( 'RESET' ); ?></button>
						</td>
						<td nowrap="nowrap">
							<?php if($this->badge=='false'){
								echo
$this->filter_type->display('filter_type',$this->pageInfo->filter->filter_type);
							} ?>
						</td>
					</tr>
				</table>
				<table class="adminlist table table-striped table-hover"
cellpadding="1">
					<thead>
						<tr>
							<th class="title titlenum">
								<?php echo JText::_( 'HIKA_NUM' );?>
							</th>
							<?php if($this->badge=='false'){ ?>
							<th class="title titlebox">
								<input type="checkbox" name="toggle"
value="" onclick="hikashop.checkAll(this);" />
							</th>
							<?php } ?>
							<th class="title">
								<?php echo JHTML::_('grid.sort',
JText::_('DISCOUNT_CODE'), 'a.discount_code',
$this->pageInfo->filter->order->dir,$this->pageInfo->filter->order->value,'select_coupon'
 ); ?>
							</th>
							<th class="title">
								<?php echo JText::_('DISCOUNT_VALUE'); ?>
							</th>
							<?php if(hikashop_level(1)){ ?>
								<th class="title">
									<?php echo JText::_('RESTRICTIONS'); ?>
								</th>
							<?php } ?>
							<th class="title">
								<?php echo JHTML::_('grid.sort',   JText::_(
'ID' ), 'a.discount_id',
$this->pageInfo->filter->order->dir,
$this->pageInfo->filter->order->value,'select_coupon'
); ?>
							</th>
						</tr>
					</thead>
					<tfoot>
						<tr>
							<td colspan="5">
								<?php echo $this->pagination->getListFooter(); ?>
								<?php echo $this->pagination->getResultsCounter(); ?>
							</td>
						</tr>
					</tfoot>
					<tbody>
						<?php
							$k = 0;
							for($i = 0,$a = count($this->rows);$i<$a;$i++){
								$row =& $this->rows[$i];
								$publishedid =
'discount_published-'.$row->discount_id;
						?>
							<tr class="<?php echo "row$k"; ?>">
								<td align="center">
								<?php echo $this->pagination->getRowOffset($i); ?>
								</td>
								<?php if($this->badge=='false'){ ?>
								<td align="center">
									<?php echo JHTML::_('grid.id', $i,
$row->discount_id ); ?>
								</td>
								<?php } ?>
								<td>
									<?php if($this->badge!='false'){
									 	echo '<span
style="visibility:hidden">'.JHTML::_('grid.id',
$i, $row->discount_id ).'</span>';
									} ?>
									<a href="#" onclick="<?php echo $onclick;
?>; document.getElementById('cb<?php echo $i;
?>').checked=true;submitbutton('add_coupon');return
false;">
										<?php echo $row->discount_code; ?>
									</a>
								</td>
								<td align="center">
									<?php
										if(isset($row->discount_flat_amount) &&
$row->discount_flat_amount > 0){
											echo
$this->currencyHelper->displayPrices(array($row),'discount_flat_amount','discount_currency_id');
										}
										elseif(isset($row->discount_percent_amount) &&
$row->discount_percent_amount > 0){
											echo $row->discount_percent_amount. '%';
										}
									?>
								</td>
								<?php if(hikashop_level(1)){ ?>
									<td>
										<?php
											$restrictions=array();
											if(!empty($row->discount_minimum_order)){
												$restrictions[]=JText::_('MINIMUM_ORDER_VALUE').':'.$this->currencyHelper->displayPrices(array($row),'discount_minimum_order','discount_currency_id');
											}
											if(!empty($row->product_name)){
												$restrictions[]=JText::_('PRODUCT').':'.$row->product_name;
											}
											if(!empty($row->category_name)){
												$restriction=JText::_('CATEGORY').':'.$row->category_name;
												if($row->discount_category_childs){
													$restriction.='
'.JText::_('INCLUDING_SUB_CATEGORIES');
												}
												$restrictions[]=$restriction;
											}
											if(!empty($row->zone_name_english)){
												$restrictions[]=JText::_('ZONE').':'.$row->zone_name_english;
											}
											if(!empty($row->username)){
												$restrictions[]=JText::_('HIKA_USER').':'.$row->username;
											}



											if ($row->discount_type == 'coupon') {
												if (!empty($row->discount_coupon_product_only)) {
													 $restrictions[]='Percentage for product only';
												}
												if(!empty($row->discount_coupon_nodoubling)){
													switch($row->discount_coupon_nodoubling) {
														case 1:
															$restrictionsdiscount/tmpl/useselection.php000064400000000424151162050350012561
0ustar00k" value="<?php echo
JRequest::getCmd('task'); ?>" />
				<input type="hidden" name="ctrl"
value="<?php echo JRequest::getCmd('ctrl'); ?>"
/>
				<input type="hidden" name="control"
value="<?php echo JRequest::getCmd('control');
?>" />
				<input type="hidden"
name="boxchediscount/view.html.php000064400000037707151162050350011036
0ustar00discount/tmpl/useselection.php000064400000000424151162050350012561
0ustar00<?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');
?>discount/view.html.php000064400000037707151162050350011036
0ustar00<?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 DiscountViewDiscount extends hikashopView{
	var $type = '';
	var $ctrl= 'discount';
	var $nameListing = 'DISCOUNTS';
	var $nameForm = 'DISCOUNTS';
	var $icon = 'discount';
	function display($tpl = null){
		$this->paramBase =
HIKASHOP_COMPONENT.'.'.$this->getName();
		$function = $this->getLayout();
		if(method_exists($this,$function)) $this->$function();
		parent::display($tpl);
	}

	function listing(){
		$app = JFactory::getApplication();
		$pageInfo = new stdClass();
		$pageInfo->filter = new stdClass();
		$pageInfo->filter->order = new stdClass();
		$pageInfo->limit = new stdClass();
		$pageInfo->filter->order->value =
$app->getUserStateFromRequest(
$this->paramBase.".filter_order",
'filter_order',	'a.discount_id','cmd' );
		$pageInfo->filter->order->dir	=
$app->getUserStateFromRequest(
$this->paramBase.".filter_order_Dir",
'filter_order_Dir',	'desc',	'word' );
		$pageInfo->search = $app->getUserStateFromRequest(
$this->paramBase.".search", 'search', '',
'string' );
		$pageInfo->search = JString::strtolower( $pageInfo->search );
		$pageInfo->filter->filter_type = $app->getUserStateFromRequest(
$this->paramBase.".filter_type",'filter_type','','string');
		$pageInfo->limit->value = $app->getUserStateFromRequest(
$this->paramBase.'.list_limit', 'limit',
$app->getCfg('list_limit'), 'int' );
		if(empty($pageInfo->limit->value)) $pageInfo->limit->value =
500;
		$pageInfo->limit->start = $app->getUserStateFromRequest(
$this->paramBase.'.limitstart', 'limitstart', 0,
'int' );
		$database	= JFactory::getDBO();
		$searchMap =
array('a.discount_code','a.discount_id');
		$filters = array();
		if(!empty($pageInfo->search)){
			$searchVal =
'\'%'.hikashop_getEscaped($pageInfo->search,true).'%\'';
			$filters[] = implode(" LIKE $searchVal OR ",$searchMap)."
LIKE $searchVal";
		}

		$query = ' FROM '.hikashop_table('discount').'
AS a';
		if(!empty($pageInfo->filter->filter_type)){
			switch($pageInfo->filter->filter_type){
				case 'all':
					break;
				default:
					$filters[] = 'a.discount_type =
'.$database->Quote($pageInfo->filter->filter_type);
					break;
			}
		}
		if(!empty($filters)){
			$query.= ' WHERE ('.implode(') AND
(',$filters).')';
		}
		if(!empty($pageInfo->filter->order->value)){
			$query .= ' ORDER BY
'.$pageInfo->filter->order->value.'
'.$pageInfo->filter->order->dir;
		}
		$database->setQuery('SELECT
a.*'.$query,$pageInfo->limit->start,$pageInfo->limit->value);
		$rows = $database->loadObjectList();
		if(!empty($pageInfo->search)){
			$rows =
hikashop_search($pageInfo->search,$rows,'discount_id');
		}
		$database->setQuery('SELECT count(*)'.$query );
		$pageInfo->elements = new stdClass();
		$pageInfo->elements->total = $database->loadResult();
		$pageInfo->elements->page = count($rows);

		if($pageInfo->elements->page){
			$productIds = array();
			$categoryIds = array();
			$zoneIds = array();
			foreach($rows as $row){
				if(!empty($row->discount_product_id)) $productIds[] =
$row->discount_product_id;
				if(!empty($row->discount_category_id)) $categoryIds[] =
$row->discount_category_id;
				if(!empty($row->discount_zone_id)) $zoneIds[] =
$row->discount_zone_id;
			}
			if(!empty($productIds)){
				$query = 'SELECT * FROM
'.hikashop_table('product').' WHERE product_id IN
('.implode(',',$productIds).')';
				$database->setQuery($query);
				$products = $database->loadObjectList();
				foreach($rows as $k => $row){
					if(!empty($row->discount_product_id)){
						$found = false;
						foreach($products as $product){
							if($product->product_id==$row->discount_product_id){
								foreach(get_object_vars($product) as $field => $value){
									$rows[$k]->$field = $product->$field;
								}
								$found = true;
							}
						}
						if(!$found){
							$rows[$k]->product_name=JText::_('PRODUCT_NOT_FOUND');
						}
					}
				}
			}
			if(!empty($categoryIds)){
				$query = 'SELECT * FROM
'.hikashop_table('category').' WHERE category_id IN
('.implode(',',$categoryIds).')';
				$database->setQuery($query);
				$categories = $database->loadObjectList();
				foreach($rows as $k => $row){
					if(!empty($row->discount_category_id)){
						$found = false;
						foreach($categories as $category){
							if($category->category_id==$row->discount_category_id){
								foreach(get_object_vars($category) as $field => $value){
									$rows[$k]->$field = $category->$field;
								}
								$found = true;
							}
						}
						if(!$found){
							$rows[$k]->category_name=JText::_('CATEGORY_NOT_FOUND');
						}
					}
				}
			}
			if(!empty($zoneIds)){
				$query = 'SELECT * FROM
'.hikashop_table('zone').' WHERE zone_id IN
('.implode(',',$zoneIds).')';
				$database->setQuery($query);
				$zones = $database->loadObjectList();
				foreach($rows as $k => $row){
					if(!empty($row->discount_zone_id)){
						$found = false;
						foreach($zones as $zone){
							if($zone->zone_id==$row->discount_zone_id){
								foreach(get_object_vars($zone) as $field => $value){
									$rows[$k]->$field = $zone->$field;
								}
								$found = true;
							}
						}
						if(!$found){
							$rows[$k]->zone_name_english=JText::_('ZONE_NOT_FOUND');
						}
					}
				}
			}
		}

		if($pageInfo->limit->value == 500) $pageInfo->limit->value =
100;

		hikashop_setTitle(JText::_($this->nameListing),$this->icon,$this->ctrl);

		$config =& hikashop_config();
		$manage =
hikashop_isAllowed($config->get('acl_discount_manage','all'));
		$this->assignRef('manage',$manage);

		$this->toolbar = array(
			array('name' =>
'copy','display'=>$manage),
			array('name' =>
'addNew','display'=>$manage),
			array('name' =>
'editList','display'=>$manage),
			array('name' =>
'deleteList','display'=>hikashop_isAllowed($config->get('acl_discount_delete','all'))),
			'|',
			array('name' => 'pophelp', 'target'
=> $this->ctrl.'-listing'),
			'dashboard'
		);

		$discountType = hikashop_get('type.discount');
		$this->assignRef('filter_type',$discountType);
		$toggleClass = hikashop_get('helper.toggle');
		$this->assignRef('toggleClass',$toggleClass);
		$this->assignRef('rows',$rows);
		$this->assignRef('pageInfo',$pageInfo);
		$this->getPagination();

		$currencyHelper = hikashop_get('class.currency');
		$this->assignRef('currencyHelper',$currencyHelper);
	}

	public function selection($tpl = null){
		$this->listing($tpl, true);

		$elemStruct = array(
			'discount_id',
			'discount_code'
		);
		$this->assignRef('elemStruct', $elemStruct);

		$singleSelection = JRequest::getVar('single', false);
		$this->assignRef('singleSelection', $singleSelection);
	}

	public function useselection() {
		$selection = JRequest::getVar('cid', array(), '',
'array');
		$rows = array();
		$data = '';

		$elemStruct = array(
			'discount_id',
			'discount_code'
		);

		if(!empty($selection)) {
			JArrayHelper::toInteger($selection);
			$db = JFactory::getDBO();
			$query = 'SELECT a.* FROM
'.hikashop_table('discount').' AS a  WHERE
a.discount_id IN ('.implode(',',$selection).')';
			$db->setQuery($query);
			$rows = $db->loadObjectList();

			if(!empty($rows)) {
				$data = array();
				foreach($rows as $v) {
					$d = '{id:'.$v->user_id;
					foreach($elemStruct as $s) {
						if($s == 'id')
							continue;
						$d .= ','.$s.':"'.
str_replace('"', '\"',
$v->$s).'"';
					}
					$data[] = $d.'}';
				}
				$data = '['.implode(',', $data).']';
			}
		}
		$this->assignRef('rows', $rows);
		$this->assignRef('data', $data);

		$confirm = JRequest::getVar('confirm', true, '',
'boolean');
		$this->assignRef('confirm', $confirm);
		if($confirm) {
			$js = 'window.addEvent("domready",
function(){window.top.hikashop.submitBox('.$data.');});';
			$doc = JFactory::getDocument();
			$doc->addScriptDeclaration($js);
		}
	}

	function form(){
		$discount_id = hikashop_getCID('discount_id',false);
		if(!empty($discount_id)){
			$class = hikashop_get('class.discount');
			$element = $class->get($discount_id);
			$task='edit';
		}else{
			$element = JRequest::getVar('fail');
			if(empty($element)){
				$element = new stdClass();
				$app = JFactory::getApplication();
				$type = $app->getUserState(
$this->paramBase.".filter_type");
				if(!in_array($type,array('all','nochilds'))){
					$element->discount_type = $type;
				}else{
					$element->discount_type = 'discount';
				}
				$element->discount_published=1;
			}
			$task='add';
		}
		$database = JFactory::getDBO();
		if(!empty($element->discount_product_id)){
			$query = 'SELECT * FROM
'.hikashop_table('product').' WHERE product_id =
'.(int)$element->discount_product_id;
			$database->setQuery($query);
			$product = $database->loadObject();
			if(!empty($product)){
				foreach(get_object_vars($product) as $key => $val){
					$element->$key = $val;
				}
			}
		}
		if(empty($element->product_name)){
			$element->product_name = JText::_('PRODUCT_NOT_FOUND');
		}
		if(!empty($element->discount_category_id)){
			$query = 'SELECT * FROM
'.hikashop_table('category').' WHERE category_id =
'.(int)$element->discount_category_id;
			$database->setQuery($query);
			$category = $database->loadObject();
			if(!empty($category)){
				foreach(get_object_vars($category) as $key => $val){
					$element->$key = $val;
				}
			}
		}
		if(empty($element->category_name)){
			$element->category_name = JText::_('CATEGORY_NOT_FOUND');
		}
		if(!empty($element->discount_zone_id)){
			$query = 'SELECT * FROM
'.hikashop_table('zone').' WHERE zone_id =
'.(int)$element->discount_zone_id;
			$database->setQuery($query);
			$zone = $database->loadObject();
			if(!empty($zone)){
				foreach(get_object_vars($zone) as $key => $val){
					$element->$key = $val;
				}
			}
		}
		if(empty($element->zone_name_english)){
			$element->zone_name_english = JText::_('ZONE_NOT_FOUND');
		}
		hikashop_setTitle(JText::_($this->nameForm),$this->icon,$this->ctrl.'&task='.$task.'&discount_id='.$discount_id);

		$this->toolbar = array(
			'save',
			array('name' => 'save2new', 'display'
=> version_compare(JVERSION,'1.7','>=')),
			'apply',
			'cancel',
			'|',
			array('name' => 'pophelp', 'target'
=> $this->ctrl.'-form')
		);

		$discountType = hikashop_get('type.discount');
		$this->assignRef('element',$element);
		$this->assignRef('type',$discountType);
		$currencyType = hikashop_get('type.currency');
		$this->assignRef('currency',$currencyType);
		$categoryType = hikashop_get('type.categorysub');
		$categoryType->type='tax';
		$categoryType->field='category_id';
		$this->assignRef('categoryType',$categoryType);
		$popup = hikashop_get('helper.popup');
		$this->assignRef('popup',$popup);
	}

	function select_coupon(){
		$badge = JRequest::getVar('badge','false');
		$this->assignRef('badge',$badge);
		$app = JFactory::getApplication();
		$pageInfo = new stdClass();
		$pageInfo->filter = new stdClass();
		$pageInfo->filter->order = new stdClass();
		$pageInfo->limit = new stdClass();
		$pageInfo->filter->order->value =
$app->getUserStateFromRequest(
$this->paramBase.".filter_order",
'filter_order',	'a.discount_id','cmd' );
		$pageInfo->filter->order->dir	=
$app->getUserStateFromRequest(
$this->paramBase.".filter_order_Dir",
'filter_order_Dir',	'desc',	'word' );
		$pageInfo->search = $app->getUserStateFromRequest(
$this->paramBase.".search", 'search', '',
'string' );
		$pageInfo->search = JString::strtolower( $pageInfo->search );
		$pageInfo->filter->filter_type = $app->getUserStateFromRequest(
$this->paramBase.".filter_type",'filter_type','','string');
		$pageInfo->limit->value = $app->getUserStateFromRequest(
$this->paramBase.'.list_limit', 'limit',
$app->getCfg('list_limit'), 'int' );
		if(empty($pageInfo->limit->value)) $pageInfo->limit->value =
500;
		$pageInfo->limit->start = $app->getUserStateFromRequest(
$this->paramBase.'.limitstart', 'limitstart', 0,
'int' );
		$database	= JFactory::getDBO();
		$searchMap =
array('a.discount_code','a.discount_id');
		$filters = array();
		if($badge!='false'){
$filters[]='a.discount_type="discount"'; }
		if(!empty($pageInfo->search)){
			$searchVal =
'\'%'.hikashop_getEscaped($pageInfo->search,true).'%\'';
			$filters[] = implode(" LIKE $searchVal OR ",$searchMap)."
LIKE $searchVal";
		}
		$query = ' FROM '.hikashop_table('discount').'
AS a';
		if($badge=='false' &&
!empty($pageInfo->filter->filter_type)){
			switch($pageInfo->filter->filter_type){
				case 'all':
					break;
				default:
					$filters[] = 'a.discount_type =
'.$database->Quote($pageInfo->filter->filter_type);
					break;
			}
		}
		if(!empty($filters)){
			$query.= ' WHERE ('.implode(') AND
(',$filters).')';
		}
		if(!empty($pageInfo->filter->order->value)){
			$query .= ' ORDER BY
'.$pageInfo->filter->order->value.'
'.$pageInfo->filter->order->dir;
		}
		$database->setQuery('SELECT
a.*'.$query,$pageInfo->limit->start,$pageInfo->limit->value);
		$rows = $database->loadObjectList();
		if(!empty($pageInfo->search)){
			$rows =
hikashop_search($pageInfo->search,$rows,'discount_id');
		}
		$database->setQuery('SELECT count(*)'.$query );
		$pageInfo->elements=new stdClass();
		$pageInfo->elements->total = $database->loadResult();
		$pageInfo->elements->page = count($rows);

		if($pageInfo->limit->value == 500) $pageInfo->limit->value =
100;

		hikashop_setTitle(JText::_($this->nameListing),$this->icon,$this->ctrl);

		$config =& hikashop_config();
		$manage =
hikashop_isAllowed($config->get('acl_discount_manage','all'));
		$this->assignRef('manage',$manage);
		$this->toolbar = array(
			array('name' => 'custom', 'icon' =>
'copy', 'task' => 'copy', 'alt'
=> JText::_('HIKA_COPY'),'display'=>$manage),
			array('name' =>
'addNew','display'=>$manage),
			array('name' =>
'editList','display'=>$manage),
			array('name' =>
'deleteList','display'=>hikashop_isAllowed($config->get('acl_discount_delete','all'))),
			'|',
			array('name' => 'pophelp', 'target'
=> $this->ctrl.'-listing'),
			'dashboard'
		);
		$discountType = hikashop_get('type.discount');
		$this->assignRef('filter_type',$discountType);
		$toggleClass = hikashop_get('helper.toggle');
		$this->assignRef('toggleClass',$toggleClass);
		$this->assignRef('rows',$rows);
		$this->assignRef('pageInfo',$pageInfo);
		$this->getPagination();
		$currencyHelper =
hdocumentation/index.html000064400000000034151162050350011405
0ustar00iscount_id IN
('.implode(','documentation/tmpl/index.html000064400000000034151162050350012361
0ustar00documentation/index.htmldocumentation/tmpl/listing.xml000064400000000302151162050350012555
0ustar00documentation/tmpl/index.html000064400000000034151162050350012361
0email/index.html000064400000000032151162050350007621
0ustar00documentation/tmpl/listingemail/tmpl/emailtemplate.php000064400000002443151162050350012144
0ustar00email/index.html000064400000000032151162050350007621
0ustar00<html><body></body></html>email/tmpl/emailtemplate.php000064400000002443151162050350012144
0ustar00email/tmpl/form.php000064400000003722151162050350010265
0ustar00="text" name="file" value="<?php echo
$this->fileName; ?>" />
		<div class="toolbar" id="toolbar"
style="float: right;">
			<button class="btn btn-success" type="button"
onclick="javascript:submitbutton('saveemailtemplate');
return false;"><i class="fa fa-save"></i>
<?php echo JText::_('HIKA_SAVE'); ?></button>
		</div>
	</div>
	<?php echo
$this->editor->displayCode('templatecontent',$this->content);
?>
	<input type="hidden" name="option"
value="<?php echo HIKASHOP_COMPONENT; ?>" />
	<input type="hidden" name="task"
value="saveemailtemplate" />
	<input type="hidden" name="tmpl"
value="component" />
	<input type="hidden" name="ctrl"
value="email" />
	<input type="hidden" name="email_name"
value="<?php echo $this->email_name; ?>" />
	<?php echo JHTML::_( 'form.token' ); ?>
</form>
email/tmpl/form.php000064400000003722151162050350010265 0ustar00<?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');
?><div class="iframedoc"
id="iframedoc"></div>
<form action="index.php?option=<?php echo HIKASHOP_COMPONENT
?>" method="post"  name="adminForm"
id="adminForm" enctype="multipart/form-data">
email/tmpl/form_param.php000064400000007125151162050350011446
0ustar00->displayCode('data[mail][body]',@$this->mail->body);
?>
		</fieldset>
		<fieldset class="adminform" >
			<legend><?php echo JText::_( 'TEXT_VERSION' );
?></legend>
			<textarea style="width:100%" rows="20"
name="data[mail][altbody]" id="altbody" ><?php
echo @$this->mail->altbody; ?></textarea>
		</fieldset>
		<fieldset class="adminform"
id="preloadfieldset">
			<legend><?php echo JText::_( 'PRELOAD_VERSION' );
?></legend>
			<?php echo
$this->editor->displayCode('data[mail][preload]',@$this->mail->preload);
?>
		</fieldset>
	<div class="clr"></div>
	<input type="hidden" name="mail_name"
value="<?php echo @$this->mail_name; ?>" />
	<input type="hidden" name="option"
value="<?php echo HIKASHOP_COMPONENT; ?>" />
	<input type="hidden" name="tmpl"
value="<?php echo JRequest::getCmd('tmpl',
'index'); ?>" />
	<input type="hidden" name="task" value=""
/>
	<input type="hidden" name="ctrl"
value="email" />
	<?php echo JHTML::_( 'form.token' ); ?>
</form>
email/tmpl/form_param.php000064400000007125151162050350011446
0ustar00<?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');
?><div>
	<?php echo $this->tabs->startPane( 'mail_tab');?>
		<?php echo
$this->tabs->startPanel(JText::_('MAIN_INFORMATION'),'mail_infos');?>
			<table class="paramlist admintable table"
width="100%">
		<tr>
			<td class="paramlist_key">
					<?php echo JText::_( 'EMAIL_SUBJECT' ); ?>
			</td>
			<td>
				<input type="text" name="data[mail][subject]"
id="subject" class="inputbox"
style="width:80%" value="<?php echo
$this->escape(@$this->mail->subject); ?>" />
			</td>
		</tr>
		<tr>
			<td class="paramlist_key">
				<?php echo JText::_( 'SEND_HTML' ); ?>
			</td>
			<td>
				<?php echo JHTML::_('hikaselect.booleanlist',
"data[mail][html]" ,
'onchange="updateEditor(this.value)"',$this->mail->html);
?>
			</td>
		</tr>
		<tr>
			<td class="paramlist_key">
				<?php echo JText::_( 'HIKA_PUBLISHED' ); ?>
			</td>
			<td>
				<?php echo JHTML::_('hikaselect.booleanlist',
"data[mail][published]" ,
'',$this->mail->published); ?>
			</td>
		</tr>
	</table>
		<?php echo $this->tabs->endPanel(); ?>
 	<?php echo $this->tabs->startPanel(JText::_(
'ATTACHMENTS' ), 'mail_attachments');?>
		<?php if(!empty($this->mail->attach)){?>
		<fieldset class="adminform">
		<legend><?php echo JText::_( 'ATTACHED_FILES' );
?></legend>
			<?php
					foreach($this->mail->attach as $idAttach => $oneAttach){
						$idDiv = 'attach_'.$idAttach;
						echo '<div
id="'.$idDiv.'">'.$oneAttach->filename.'
('.(round($oneAttach->size/1000,1)).' Ko)';
						echo
$this->toggleClass->delete($idDiv,$this->mail->mail.'_'.$idAttach,'mail');
				echo '</div>';
					}
		?>
		</fieldset>
		<?php } ?>
		<div id="loadfile">
			<input type="file" size="30"
name="attachments[]" />
		</div>
		<a href="javascript:void(0);"
onclick='addFileLoader()'><?php echo
JText::_('ADD_ATTACHMENT'); ?></a>
			<?php echo
JText::sprintf('MAX_UPLOAemail/tmpl/index.html000064400000000032151162050350010575
0ustar00ass="paramlist_value">
		email/tmpl/listing.php000064400000013120151162050350010764
0ustar00email/tmpl/index.html000064400000000032151162050350010575
0ustar00<html><body></body></html>email/tmpl/listing.php000064400000013120151162050350010764
0ustar00<?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 $js ='
function hikashopRemoveCustom(type, id){
	if(confirm(\''.JText::_('HIKA_VALIDDELETEITEMS',true).'\')){
		document.getElementById(\'email_id\').value = id;
		document.getElementById(\'email_type\').value = type;
		submitform(\'remove\');
	}
	return false;
}';
$doc = JFactory::getDocument();
$doc->addScriptDeclaration($js);
?>
<div class="iframedoc"
id="iframedoc"></div>
<form action="<?php echo
hikashop_completeLink('email'); ?>"
method="post"  name="adminForm"
id="adminForm">
	<?php if($this->ftp){ ?>
	<fieldset title="<?php echo JText::_('DESCFTPTITLE');
?>">
		<legend><?php echo JText::_('DESCFTPTITLE');
?></legend>

		<?php echo JText::_('DESCFTP'); ?>

		<?php if(JError::isError($this->ftp)){ ?>
			<p><?php echo JText::_($this->ftp->message);
?></p>
		<?php } ?>

		<table class="adminform nospace">
		<tbody>
		<tr>
			<td width="120">
				<label for="username"><?php echo
JText::_('HIKA_USERNAME'); ?>:</label>
			</td>
			<td>
				<input type="text" id="username"
name="username" class="input_box" size="70"
value="" />
			</td>
		</tr>
		<tr>
			<td width="120">
				<label for="password"><?php echo
JText::_('HIKA_PASSWORD'); ?>:</label>
			</td>
			<td>
				<input type="password" id="password"
name="password" class="input_box" size="70"
value="" />
			</td>
		</tr>
		</tbody>
		</table>
	</fieldset>
	<?php } ?>
	<table id="hikashop_email_listing" class="adminlist
table table-striped table-hover" cellpadding="1">
		<thead>
			<tr>
				<th class="title titlenum">
					<?php echo JText::_( 'HIKA_NUM' );?>
				</th>
				<th class="title">
					<?php echo JText::_('HIKA_EMAIL'); ?>
				</th>
				<th class="title titletoggle">
					<?php echo JText::_('REMOVE_CUSTOMIZATION_HTML'); ?>
				</th>
				<th class="title titletoggle">
					<?php echo JText::_('REMOVE_CUSTOMIZATION_TEXT'); ?>
				</th>
				<th class="title titletoggle">
					<?php echo JText::_('REMOVE_CUSTOMIZATION_PRELOAD');
?>
				</th>
				<th class="title titletoggle">
					<?php echo JText::_('HIKA_PUBLISHED'); ?>
				</th>
			</tr>
		</thead>
		<tfoot>
			<tr>
				<td colspan="7">
					<?php echo $this->pagination->getListFooter(); ?>
					<?php echo $this->pagination->getResultsCounter(); ?>
				</td>
			</tr>
		</tfoot>
		<tbody>
			<?php
				$k = 0;
				for($i = 0,$a = count($this->rows);$i<$a;$i++){
					$row =& $this->rows[$i];
			?>
				<tr class="row<?php echo $k; ?>">
					<td align="center">
					<?php echo $this->pagination->getRowOffset($i);
					?>
					</td>
					<td>
						<?php if($this->manage){ ?>
							<a href="<?php echo
hikashop_completeLink('email&task=edit&mail_name='.$row->file);?>">
						<?php }
							if(!empty($row->name))
								echo $row->name;
							else
								echo JText::_(strtoupper($row->file));
						if($this->manage){ ?>
							</a>
						<?php } ?>
					</td>
					<td align="center">
					<?php if($row->overriden_html){ ?>
						<?php if($this->delete){ ?>
							<a href="<?php echo
hikashop_completeLink('email&task=remove&type=html&mail_name='.$row->file);
?>" onclick="return
hikashopRemoveCustom('html','<?php echo
$row->file?>');">
						<?php } ?>
								<img src="<?php echo HIKASHOP_IMAGES;
?>delete.png" />
						<?php if($this->delete){ ?>
							</a>
						<?php } ?>
					<?php } ?>
					</td>
					<td align="center">
					<?php if($row->overriden_text){ ?>
						<?php if($this->delete){ ?>
							<a href="<?php echo
hikashop_completeLink('email&task=remove&type=text&mail_name='.$row->file);
?>" onclick="return
hikashopRemoveCustom('text','<?php echo
$row->file?>');">
						<?php } ?>
								<img src="<?php echo HIKASHOP_IMAGES;
?>delete.png" />
						<?php if($this->delete){ ?>
							</a>
						<?php } ?>
					<?php } ?>
					</td>
					<td align="center">
					<?php
if($row->overridemail/tmpl/orderstatus.php000064400000003027151162050350011677
0ustar00 type="hidden" id="email_type"
name="type" value="" />
	<input type="hidden" name="option"
value="<?php echo HIKASHOP_COMPONENT; ?>" />
	<input type="hidden" name="task" value=""
/>
	<input type="hidden" name="ctrl"
value="<?php echo JRequest::getCmd('ctrl'); ?>"
/>
	<input type="hidden" name="boxchecked"
value="0" />
	<input type="hidden" name="filter_order"
value="<?php echo
$this->pageInfo->filter->order->value; ?>" />
	<input type="hidden" name="filter_order_Dir"
value="<?php echo $this->pageInfo->filter->order->dir;
?>" />
	<?php echo JHTML::_( 'form.token' ); ?>
</form>
email/tmpl/orderstatus.php000064400000003027151162050350011677
0ustar00<?php
/**
 * @packageemail/tmpl/preview.php000064400000002747151162050350011011
0ustar00 echo
$this->editor->displayCode('emailcontent',$this->content);
?>
	</div>
	<input type="hidden" name="option"
value="<?php echo HIKASHOP_COMPONENT; ?>" />
	<input type="hidden" name="task"
value="orderstatus" />
	<input type="hidden" name="tmpl"
value="component" />
	<input type="hidden" name="ctrl"
value="email" />
	<input type="hidden" name="email_name"
value="<?php echo $this->email_name; ?>" />
	<input type="hidden" name="type"
value="<?php echo $this->type; ?>" />
	<?php echo JHTML::_( 'form.token' ); ?>
</form>
email/tmpl/preview.php000064400000002747151162050350011011
0ustar00email/view.html.php000064400000014604151162050350010264
0ustar00e="adminForm" id="adminForm"
enctype="multipart/form-data">
<?php
if(method_exists($this->previewMaker, 'getSelector'))
	echo $this->previewMaker->getSelector($this->formData);
if(!empty($this->previewMaker->displaySubmitButton)) { ?>
	<div class="toolbar" id="toolbar"
style="float: right;">
		<button class="btn" type="button"
onclick="javascript:submitbutton('preview'); return
false;"><?php echo JText::_('HIKA_SUBMIT');
?></button>
	</div>
<?php
}
?>
	<input type="hidden" name="mail_name"
value="<?php echo $this->mail_name; ?>" />
	<input type="hidden" name="option"
value="<?php echo HIKASHOP_COMPONENT; ?>" />
	<input type="hidden" name="task" value=""
/>
	<input type="hidden" name="tmpl"
value="component" />
	<input type="hidden" name="ctrl"
value="email" />
	<?php echo JHTML::_('form.token'); ?>
</form>
<?php
if(!empty($this->mailClass->mailer->Body)) {
?>
<div class="hikashop_email_preview">
<?php
	echo $this->mailClass->mailer->Body;
?>
</div>
<?php
}
email/view.html.php000064400000014604151162050350010264 0ustar00<?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 EmailViewEmail extends hikashopView
{
	var $type = '';
	var $ctrl= 'email';
	var $nameListing = 'EMAILS';
	var $nameForm = 'EMAILS';
	var $icon = 'inbox';

	function display($tpl = null) {
		$this->paramBase =
HIKASHOP_COMPONENT.'.'.$this->getName();
		$function = $this->getLayout();
		if(method_exists($this,$function)) $this->$function();
		return parent::display($tpl);
	}

	function form(){
		$mail_name = JRequest::getString('mail_name');
		$mailClass = hikashop_get('class.mail');
		$data = true;
		$mail = $mailClass->get($mail_name,$data);
		if(empty($mail)){
			$config =& hikashop_config();
			$mail->from_name = $config->get('from_name');
			$mail->from_email = $config->get('from_email');
			$mail->reply_name = $config->get('reply_name');
			$mail->reply_email = $config->get('reply_email');
			$mail->subject = '';
			$mail->html = 1;
			$mail->published = 1;
			$mail->body = '';
			$mail->altbody = '';
			$mail->preload = '';
			$mail->mail = $mail_name;
		};
		$tabs = hikashop_get('helper.tabs');
		$values = new stdClass();
		$values->maxupload =
(hikashop_bytes(ini_get('upload_max_filesize')) >
hikashop_bytes(ini_get('post_max_size'))) ?
ini_get('post_max_size') :
ini_get('upload_max_filesize');
		$toggleClass = hikashop_get('helper.toggle');
		$js = '
function updateEditor(htmlvalue){
	if(htmlvalue ==
"0"){window.document.getElementById("htmlfieldset").style.display
=
"none"}else{window.document.getElementById("htmlfieldset").style.display
= "block"; }
}
window.addEvent("load", function(){
updateEditor('.$mail->html.'); });';
		$script = '
function addFileLoader(){
	var divfile=window.document.getElementById("loadfile");
	var input = document.createElement("input");
	input.type = "file";
	input.size = "30";
	input.name = "attachments[]";
	divfile.appendChild(document.createElement("br"));
	divfile.appendChild(input);
}
function submitbutton(pressbutton){
	if (pressbutton == "cancel") {
		submitform( pressbutton );
		return;
	}
	if(window.document.getElementById("subject").value.length <
2){alert("'.JText::_('ENTER_SUBJECT',true).'");
return false;}
	submitform(pressbutton);
}
';
		if (!HIKASHOP_PHP5) {
			$doc =& JFactory::getDocument();
		}else{
			$doc = JFactory::getDocument();
		}
		$doc->addScriptDeclaration( $js.$script );
		if(JRequest::getString('tmpl')!='component'){
			$this->toolbar = array(
				'save',
				'apply',
				'cancel',
				'|',
				array('name' => 'pophelp', 'target'
=> $this->ctrl.'-form')
			);

			hikashop_setTitle(JText::_($this->nameForm),$this->icon,$this->ctrl.'&task=edit&mail_name='.$mail_name);
		}
		$this->assignRef('toggleClass',$toggleClass);
		$this->assignRef('values',$values);
		$this->assignRef('mail_name',$mail_name);
		$this->assignRef('mail',$mail);
		$this->assignRef('tabs',$tabs);
		$editor = hikashop_get('helper.editor');
		$this->assignRef('editor',$editor);
	}

	function listing(){
		$app = JFactory::getApplication();
		$pageInfo = new stdClass();
		$pageInfo->filter = new stdClass();
		$pageInfo->filter->order = new stdClass();
		$pageInfo->limit = new stdClass();
		$config =& hikashop_config();

		$pageInfo->search = $app->getUserStateFromRequest(
$this->paramBase.".search", 'search', '',
'string' );

		$pageInfo->limit->value =
$app->getUserStateFromRequest($this->paramBase.'.limit',
'limit', $app->getCfg('list_limit'),
'int');
		$pageInfo->limit->start =
$app->getUserStateFromRequest($this->paramBase.'.limitstart',
'limitstart', 0, 'int');
		$pageInfo->filter->order->value =
$app->getUserStateFromRequest(
$this->paramBase.".filter_order",
'filter_order',	'a.user_id','cmd' );
		$pageInfo->filter->order->dir	=
$app->getUserStateFromRequest(
$this->paramBase.".filter_order_Dir",
'filter_order_Dir',	'desc',	'word' );

		jimport('joomla.filesystem.file');
		$mail_folder = HIKASHOP_MEDIA.'mail'.DS;

		$files = array(
			'cron_report',
			'order_admin_notification',
			'order_creation_notification',
			'order_status_notification',
			'order_notification',
			'user_account',
			'user_account_admin_notification',
			'out_of_stock',
			'order_cancel',
			'waitlist_notification',
			'new_comment',
			'contact_request',
			'subscription_eot'
		);

		$plugin_files = array();
		JPluginHelper::importPlugin('hikashop');
		$dispatcher = JDispatcher::getInstance();
		$dispatcher->trigger('onMailListing',
array(&$plugin_files));
		if(!empty($plugin_files)) {
			$files = array_merge($files, $plugin_files);
		}

		$emails = array();
		foreach($files as $file){
			$folder = $mail_folder;
			$filename = $file;

			$email = new stdClass();

			if(is_arrentry/index.html000064400000000032151162050350007673
0ustar00$emails);

		$emails = aentry/tmpl/export.php000064400000002142151162050350010710
0ustar00entry/index.html000064400000000032151162050350007673
0ustar00<html><body></body></html>entry/tmpl/export.phpentry/tmpl/form.php000064400000004021151162050350010330
0ustar00 as $row){
	foreach(get_object_vars($row) as $k => $v){
		$row->$k =
'"'.str_replace('"','\"',$v).'"';
	}
	echo "\n".implode($separator,get_object_vars($row));
}
$data = ob_get_clean();
header("Expires: 0");
header("Last-Modified: " . gmdate("D, d M Y H:i:s") .
" GMT");
header("Content-type: application/octet-stream");
header("Content-Transfer-Encoding: binary");
$len = strlen($data);
header("Content-Length: $len");
header("Cache-Control: maxage=1");
header("Pragma: public");
header("Content-Disposition: attachment;
filename=\"entries_".date('Y-m-d_H:i:s').".csv\"");
echo $data;
exit;
entry/tmpl/form.php000064400000004021151162050350010330 0ustar00<?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
if(JRequest::getVar('tmpl','')=='component'){
?>
<h1><?php echo
JText::_('HIKASHOP_ENTRY');?></h1>
<?php } ?>
<div id="hikashop_entry_form_span_iframe">
	<form action="<?php echo
hikashop_completeLink('entry'); ?>"
method="post" 
name="adminFoentry/tmpl/index.html000064400000000032151162050350010647
0ustar00" value="<?php echo
(int)@entry/tmpl/listing.php000064400000010362151162050350011043
0ustar00entry/tmpl/index.html000064400000000032151162050350010647
0ustar00<html><body></body></html>entry/tmpl/listing.php000064400000010362151162050350011043
0ustar00<?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');
?><div class="iframedoc"
id="iframedoc"></div>
<form action="<?php echo
hikashop_completeLink('entry'); ?>"
method="post"  name="adminForm"
id="adminForm">
	<table>
		<tr>
			<td width="100%">
				<?php echo JText::_( 'FILTER' ); ?>:
				<input type="text" name="search"
id="search" value="<?php echo
$this->escape($this->pageInfo->search);?>"
class="text_area" />
				<button class="btn"
onclick="this.form.submit();"><?php echo JText::_(
'GO' ); ?></button>
				<button class="btn"
onclick="document.getElementById('search').value='';this.form.submit();"><?php
echo JText::_( 'RESET' ); ?></button>
			</td>
			<td nowrap="nowrap">
				<?php echo
$this->category->display("filter_status",$this->pageInfo->filter->filter_status,false);
?>
			</td>
		</tr>
	</table>
	<table class="adminlist table table-striped table-hover"
cellpadding="1">
		<thead>
			<tr>
				<th class="title titlenum">
					<?php echo JText::_( 'HIKA_NUM' );?>
				</th>
				<th class="title titlebox">
					<input type="checkbox" name="toggle"
value="" onclick="hikashop.checkAll(this);" />
				</th>
				<th class="title">
					<?php echo JText::_('HIKASHOP_ORDER'); ?>
				</th>
				<?php
				$count_fields=0;
				if(!empty($this->fields)){
					foreach($this->fields as $field){
						$count_fields++;
						echo '<th
class="title">'.JHTML::_('grid.sort',
$this->fieldsClass->trans($field->field_realname),
'b.'.$field->field_namekey,
$this->pageInfo->filter->order->dir,$this->pageInfo->filter->order->value
).'</th>';
					}
				}
				?>
				<th class="title">
					<?php echo JHTML::_('grid.sort',   JText::_(
'ID' ), 'b.entry_id',
$this->pageInfo->filter->order->dir,
$this->pageInfo->filter->order->value ); ?>
				</th>
			</tr>
		</thead>
		<tfoot>
			<tr>
				<td colspan="<?php echo 4+$count_fields;?>">
					<?php echo $this->pagination->getListFooter(); ?>
					<?php echo $this->pagination->getResultsCounter(); ?>
				</td>
			</tr>
		</tfoot>
		<tbody>
			<?php
				$k = 0;
				for($i = 0,$a = count($this->rows);$i<$a;$i++){
					$row =& $this->rows[$i];
			?>
				<tr class="<?php echo "row$k"; ?>">
					<td align="center">
					<?php echo $this->pagination->getRowOffset($i);
					?>
					</td>
					<td align="center">
						<?php echo JHTML::_('grid.id', $i, $row->entry_id );
?>
					</td>
					<td align="center">
						<?php if(!empty($row->order_id)){
								if($this->manage){ ?>
									<a href="<?php echo
hikashop_completeLink('order&task=edit&cid[]='.$roentry/view.html.php000064400000013714151162050350010337
0ustar00quest::getCmd('ctrl'); ?>" />
	<input type="hidden" name="boxchecked"
value="0" />
	<input type="hidden" name="filter_order"
value="<?php echo
$this->pageInfo->filter->order->value; ?>" />
	<input type="hidden" name="filter_order_Dir"
value="<?php echo $this->pageInfo->filter->order->dir;
?>" />
	<?php echo JHTML::_( 'form.token' ); ?>
</form>
<?php
if(hikashop_level(2) && !empty($this->fields) &&
!empty($this->rows) && empty($this->pageInfo->search)
&& empty($this->pageInfo->limit->start) ){
	foreach($this->fields as $field){
		if(
in_array($field->field_type,array('radio','singledropdown','zone'))){
			$this->fieldsClass->chart('entry',$field,$this->pageInfo->filter->filter_status,450,240);
		}
	}
}
?><br style="clear:both" />
entry/view.html.php000064400000013714151162050350010337 0ustar00<?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 EntryViewEntry extends hikashopView{
	var $ctrl= 'entry';
	var $nameListing = 'HIKASHOP_ENTRIES';
	var $nameForm = 'HIKASHOP_ENTRY';
	var $icon = 'article';
	function display($tpl = null){
		$this->paramBase =
HIKASHOP_COMPONENT.'.'.$this->getName();
		$function = $this->getLayout();
		if(method_exists($this,$function)) $this->$function();
		parent::display($tpl);
	}

	function listing($doexport=false,$export=''){
		$fieldsClass = hikashop_get('class.field');
		$data=new stdClass;
		$fields =
$fieldsClass->getFields('backend_listing',$data,'entry');
		$app = JFactory::getApplication();
		$pageInfo = new stdClass();
		$pageInfo->filter = new stdClass();
		$pageInfo->filter->order = new stdClass();
		$pageInfo->limit = new stdClass();
		$pageInfo->search = $app->getUserStateFromRequest(
$this->paramBase.".search", 'search', '',
'string' );
		$pageInfo->filter->order->value =
$app->getUserStateFromRequest(
$this->paramBase.".filter_order",
'filter_order',	'b.entry_id','cmd' );
		$pageInfo->filter->order->dir	=
$app->getUserStateFromRequest(
$this->paramBase.".filter_order_Dir",
'filter_order_Dir',	'desc',	'word' );
		$pageInfo->limit->value = $app->getUserStateFromRequest(
$this->paramBase.'.list_limit', 'limit',
$app->getCfg('list_limit'), 'int' );
		if(empty($pageInfo->limit->value)) $pageInfo->limit->value =
500;
		$pageInfo->limit->start = $app->getUserStateFromRequest(
$this->paramBase.'.limitstart', 'limitstart', 0,
'int' );
		$pageInfo->filter->filter_status =
$app->getUserStateFromRequest(
$this->paramBase.'.filter_status', 'filter_status',
'', 'string' );
		$database	= JFactory::getDBO();
		$filters = array();
		if(!empty($export)){
			JArrayHelper::toInteger($export);
			$filters[]='b.entry_id IN
('.implode(',',$export).')';
		}
		switch($pageInfo->filter->filter_status){
			case '':
				break;
			default:
				$filters[]='a.order_status =
'.$database->Quote($pageInfo->filter->filter_status);
				break;
		}
		$searchMap = array('a.order_id','b.entry_id');
		foreach($fields as $field){
			$searchMap[]='b.'.$field->field_namekey;
		}
		if(!empty($pageInfo->search)){
			$searchVal =
'\'%'.hikashop_getEscaped(JString::strtolower(
$pageInfo->search ),true).'%\'';
			$id = hikashop_decode($pageInfo->search);
			$filter = implode(" LIKE $searchVal OR ",$searchMap)."
LIKE $searchVal";
			if(!empty($id)){
				$filter .= " OR a.order_id LIKE
'%".hikashop_getEscaped($id,true).'%\'';
			}
			$filters[] =  $filter;
		}
		$order = '';
		if(!empty($pageInfo->filter->order->value)){
			$order = ' ORDER BY
'.$pageInfo->filter->order->value.'
'.$pageInfo->filter->order->dir;
		}
		if(!empty($filters)){
			$filters = ' WHERE ('. implode(') AND
(',$filters).')';
		}else{
			$filters = '';
		}

		$query = ' FROM '.hikashop_table('entry').' AS b
LEFT JOIN '.hikashop_table('order').' AS a ON
b.order_id=a.order_id '.$filters.$order;
		if($doexport){
			$database->setQuery('SELECT b.*'.$query);
		}else{
			$database->setQuery('SELECT
a.*,b.*'.$query,(int)$pageInfo->limit->start,(int)$pageInfo->limit->value);
		}

		$rows = $database->loadObjectList();
		if(!$doexport){
			if(!empty($pageInfo->search)){
				$rows =
hikashop_search($pageInfo->search,$rows,'entry_id');
			}
			$database->setQuery('SELECT COUNT(*)'.$query);
			$pageInfo->elements = new stdClass();
			$pageInfo->elements->total = $database->loadResult();
			$pageInfo->elements->page = count($rows);

			hikashop_setTitle(JText::_($this->nameListing),$this->icon,$this->ctrl);

			$config =& hikashop_config();
			$this->toolbar = array(
				array('name' =>
'custom','task'=>'export','icon'=>'upload','alt'=>JText::_('HIKA_EXPORT')),
				array('name'=>'addNew','display'=>hikashop_isAllowed($config->get('acl_entry_manage','all'))),
				array('name'=>'editList','display'=>hikashop_isAllowed($config->get('acl_entry_manage','all'))),
				array('name'=>'deleteList','display'=>hikashop_isAllowed($config->get('acl_entry_delete','all'))),
				'|',
				array('name' => 'pophelp', 'target'
=> $this->ctrl.'-listing'),
				'dashboard'
			);

			$manage =
hikashop_isAllowed($config->get('acl_order_manage','all'));
			$this->assignRef('manage',$manage);

			$this->assiexplorer/index.html000064400000000032151162050350010372
0ustar00_id)){
			$class=hikashopexplorer/tmpl/default.php000064400000004361151162050350011517
0ustar00explorer/index.html000064400000000032151162050350010372
0ustar00<html><body></body></html>explorer/tmpl/default.php000064400000004361151162050350011517
0ustar00<?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');
?><div style="border-top: 1px solid rgb(204, 204, 204);
border-bottom: 1px solid rgb(204, 204, 204); background: rgb(221, 225, 230)
none repeat scroll 0% 0%; -moz-background-clip: border;
-moz-background-origin: padding; -moz-background-inline-policy: continuous;
font-weight: bold;margin-bottom:1px"><?php echo JText::_(
'EXPLORER' ); ?></div>

<script type="text/javascript">
	fpath = '<?php echo HIKASHOP_IMAGES; ?>folder.gif';
	d = new dTree('d');
	d.config.closeSameLevexplorer/tmpl/index.html000064400000000032151162050350011346
0ustar00,
	d.icon.nlPlus =
'<?phpexplorer/view.html.php000064400000005651151162050350011037
0ustar00explorer/tmpl/index.html000064400000000032151162050350011346
0ustar00<html><body></body></html>explorer/view.html.php000064400000005651151162050350011037
0ustar00<?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 ExplorerViewExplorer extends hikashopView{
	function display($tpl =
null,$task='',$defaultId='',$popup='',$type=''){
		if (!HIKASHOP_PHP5) {
			$doc =& JFactory::getDocument();
			$user =& JFactory::getUser();
			$config =& JFactory::getConfig();
		}else{
			$doc = JFactory::getDocument();
			$user = JFactory::getUser();
			$config = JFactory::getConfig();
		}
		$doc->addScript(HIKASHOP_JS.'dtree.js');
		$doc->addStyleSheet(HIKASHOP_CSS.'dtree.css');
		$database	= JFactory::getDBO();
		$translationHelper = hikashop_get('helper.translation');
		$select = 'SELECT a.*';
		$table=' FROM '.hikashop_table('category').' AS
a';
		$app = JFactory::getApplication();
		if($app->isAdmin() && $translationHelper->isMulti()){
			$locale = $user->getParam('language');
			if(empty($locale)){
				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
JOfield/index.html000064400000000032151162050350007615
0ustar00('elements', $elements);
field/tmpl/form.php000064400000043752151162050350010270
0ustar00field/index.html000064400000000032151162050350007615
0ustar00<html><body></body></html>field/tmpl/form.php000064400000043752151162050350010270
0ustar00<?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');
?><div class="iframedoc"
id="iframedoc"></div>
<form
action="index.php?option=com_hikashop&amp;ctrl=field"
method="post"  name="adminForm"
id="adminForm" >
<?php if(!HIKASHOP_BACK_RESPONSIVE) { ?>
<div id="page-field">
	<table style="width:100%">
		<tr>
			<td valign="top" width="50%">
<?php } else { ?>
<div id="page-field" class="row-fluid">
	<div class="span6">
<?php } ?>
	<table class="paramlist admintable table">
		<tr>
			<td class="key"><?php
				echo JText::_( 'FIELD_LABEL' );
			?></td>
			<td>
				<input type="text"
name="data[field][field_realname]" id="name"
class="inputbox" size="40" value="<?php echo
$this->escape(@$this->field->field_realname); ?>" />
			</td>
		</tr>
		<tr>
			<td class="key"><?php
				echo JText::_( 'FIELD_TABLE' );
			?></td>
			<td><?php
				if(hikashop_level(1) && empty($this->field->field_id)){
					echo
$this->tabletype->display('data[field][field_table]',$this->field->field_table,true,
'onchange="setVisible(this.value);"');
				}else{
					echo $this->field->field_table.'<input
type="hidden" name="data[field][field_table]"
value="'.$this->field->field_table.'"
/>';
				}
			?></td>
		</tr>
		<tr class="columnname">
			<td class="key"><?php
				echo JText::_( 'FIELD_COLUMN' );
			?></td>
			<td>
			<?php if(empty($this->field->field_id)){?>
				<input type="text"
name="data[field][field_namekey]" id="namekey"
class="inputbox" size="40" value="" />
			<?php }else { echo $this->field->field_namekey; } ?>
			</td>
		</tr>
		<tr>
			<td class="key"><?php
				echo JText::_( 'FIELD_TYPE' );
			?></td>
			<td><?php
				if(!empty($this->field->field_type) &&
$this->field->field_type=='customtext'){
					$this->fieldtype->addJS();
					echo $this->field->field_type.'<input
type="hidden" id="fieldtype"
name="data[field][field_type]"
value="'.$this->field->field_type.'"
/>';
				}else{
					echo
$this->fieldtype->display('data[field][field_type]',@$this->field->field_type,@$this->field->field_table);
				}
			?></td>
		</tr>
		<tr id="fieldopt_required_0">
			<td class="key"><?php
				echo JText::_( 'REQUIRED' );
			?></td>
			<td>
				<?php echo JHTML::_('hikaselect.booleanlist',
"data[field][field_required]" ,
'',@$this->field->field_required); ?>
			</td>
		</tr>
		<tr id="fieldopt_required_1">
			<td class="key">
				<?php echo JText::_( 'FIELD_ERROR' ); ?>
			</td>
			<td>
				<input type="text" id="errormessage"
size="80" name="field_options[errormessage]"
value="<?php echo
$this->escape(@$this->field->field_options['errormessage']);
?>"/>
			</td>
		</tr>
		<tr id="fieldopt_default">
			<td class="key">
				<?php echo JText::_( 'FIELD_DEFAULT' ); ?>
			</td>
			<td><?php
				echo
$this->fieldsClass->display($this->field,@$this->field->field_default,'data[field][field_default]',false,'',true,$this->allFields);
			?></td>
		</tr>
		<tr id="fieldopt_multivalues">
			<td class="key" valign="top">
				<?php echo JText::_( 'FIELD_VALUES' ); ?>
			</td>
			<td>
				<table id="hikashop_field_values_table"
class="hikaspanleft table table-striped table-hover"><tbody
id="tablevalues">
				<tr>
					<td><?php echo
JText::_('FIELD_VALUE')?></td>
					<td><?php echo JText::_('FIELD_TITLE');
?></td>
					<td><?php echo JText::_('FIELD_DISABLED');
?></td>
				</tr>
<?php
	if(!empty($this->field->field_value) &&
is_array($this->field->field_value) &&
$this->field->field_type!='zone'){
		foreach($this->field->field_value as $title => $value){
			$no_selected = 'selected="selected"';
			$yes_selected = '';
			if((int)$value->disabled){
				$no_selected = '';
				$yes_selected = 'selected="selected"';
			}
?>
				<tr>
					<td><input type="text"
name="field_values[title][]" value="<?php echo
$this->escape($title); ?>" /></td>
					<td><input type="text"
name="field_values[value][]" value="<?php echo
$this->escape($value->value); ?>" /></td>
					<td><select name="field_values[disabled][]"
class="inputbox">
						<option <?php echo $no_selected; ?>
value="0"><?php echo JText::_('HIKASHOP_NO');
?></option>
						<option <?php echo $yes_selected; ?>
value="1"><?php echo JText::_('HIKASHOP_YES');
?></option>
					</select></td>
				</tr>
<?php } }?>
				<tr>
					<td><input type="text"
name="field_values[title][]" value="" /></td>
					<td><input type="text"
name="field_values[value][]" value="" /></td>
					<td>
						<select name="field_values[disabled][]"
class="inputbox">
							<option selected="selected"
value="0"><?php echo JText::_('HIKASHOP_NO');
?></option>
							<option value="1"><?php echo
JText::_('HIKASHOP_YES'); ?></option>
						</select>
					</td>
				</tr>
				</tbody></table>
				<a onclick="addLine();return false;" href='#'
title="<?php echo
$this->escape(JText::_('FIELD_ADDVALUE'));
?>"><?php echo JText::_('FIELD_ADDVALUE');
?></a>
			</td>
		</tr>
		<tr id="fieldopt_cols">
			<td class="key">
				<?php echo JText::_( 'FIELD_COLUMNS' ); ?>
			</td>
			<td>
				<input type="text"  size="10"
name="field_options[cols]" id="cols"
class="inputbox" value="<?php echo
$this->escape(@$this->field->field_options['cols']);
?>"/>
			</td>
		</tr>
		<tr id="fieldopt_filtering">
			<td class="key">
				<?php echo JText::_( 'INPUT_FILTERING' ); ?>
			</td>
			<td>
				<?php
				if(!isset($this->field->field_options['filtering']))
$this->field->field_options['filtering'] = 1;
				echo JHTML::_('hikaselect.booleanlist',
"field_options[filtering]" ,
'',$this->field->field_options['filtering']);
?>
			</td>
		</tr>
		<tr id="fieldopt_maxlength">
			<td class="key">
				<?php echo JText::_( 'MAXLENGTH' ); ?>
			</td>
			<td>
				<input type="text"  size="10"
name="field_options[maxlength]" id="cols"
class="inputbox" value="<?php echo
(int)@$this->field->field_options['maxlength'];
?>"/>
			</td>
		</tr>
		<tr id="fieldopt_rows">
			<td class="key">
				<?php echo JText::_( 'FIELD_ROWS' ); ?>
			</td>
			<td>
				<input type="text"  size="10"
name="field_options[rows]" id="rows"
class="inputbox" value="<?php echo
$this->escape(@$this->field->field_options['rows']);
?>"/>
			</td>
		</tr>
		<tr id="fieldopt_zone">
			<td class="key">
				<?php echo JText::_( 'FIELD_ZONE' ); ?>
			</td>
			<td>
				<?php echo
$this->zoneType->display("field_options[zone_type]",@$this->field->field_options['zone_type'],true);?>
			</td>
		</tr>
		<tr id="fieldopt_pleaseselect">
			<td class="key"><?php
				echo JText::_( 'ADD_SELECT_VALUE' );
			?></td>
			<td><?php
				echo JHTML::_('hikaselect.booleanlist',
"field_options[pleaseselect]" , '',
@$this->field->field_options['pleaseselect']);
			?></td>
		</tr>
		<tr id="fieldopt_size">
			<td class="key">
				<?php echo JText::_( 'FIELD_SIZE' ); ?>
			</td>
			<td>
				<input type="text" id="size" size="10"
name="field_options[size]" value="<?php echo
$this->escape(@$this->field->field_options['size']);
?>"/>
			</td>
		</tr>
		<tr id="fieldopt_format">
			<td class="key">
				<?php echo JText::_( 'FORMAT' ); ?>
			</td>
			<td>
				<input type="text" id="format"
name="field_options[format]" value="<?php echo
$this->escape(@$this->field->field_options['format']);
?>"/>
			</td>
		</tr>
		<tr id="fieldopt_customtext">
			<td class="key">
				<?php echo JText::_( 'CUSTOM_TEXT' ); ?>
			</td>
			<td>
				<textarea cols="50" rows="10"
name="fieldcustomtext"><?php echo
@$this->field->field_options['customtext'];
?></textarea>
			</td>
		</tr>
		<tr id="fieldopt_allow">
			<td class="key">
				<?php echo JText::_( 'ALLOW' ); ?>
			</td>
			<td>
				<?php echo
$this->allowType->display("field_options[allow]",@$this->field->field_options['allow']);?>
			</td>
		</tr>
		<tr id="fieldopt_readonly">
			<td class="key">
				<?php echo JText::_( 'READONLY' ); ?>
			</td>
			<td>
				<?php echo JHTML::_('hikaselect.booleanlist',
"field_options[readonly]" ,
'',@$this->field->field_options['readonly']);
?>
			</td>
		</tr>
<?php
	if(!empty($this->fieldtype->externalOptions)) {
		foreach($this->fieldtype->externalOptions as $key =>
$extraOption) {
			if(is_numeric($key)) {
				if(is_array($extraOption) &&
isset($extraOption['name']))
					$key = $extraOption['name'];
				else
					$key = @$extraOption->name;
			}
			if(empty($key) || is_numeric($key))
				continue;

?>		<tr id="fieldopt_<?php echo $key ;?>">
			<td class="key"><?php
				if(is_array($extraOption) &&
isset($extraOption['text']))
					echo $extraOption['text'];
				else
					echo @$extraOption->text;
			?></td>
			<td><?php
				if((is_array($extraOption) &&
isset($extraOption['content'])) ||
isset($extraOption->content)) {
					if(is_array($extraOption))
						echo $extraOption['content'];
					else
						echo $extraOption->content;
				}
				if((is_array($extraOption) &&
isset($extraOption['obj'])) || isset($extraOption->obj)) {
					$o = is_array($extraOption) ? $extraOption['obj'] :
$extraOption->obj;
					if(is_string($o))
						$o = new $o();

					echo $o->show( @$this->field->field_options[$key] );
				}
			?></td>
		</tr>
<?php
		}
	}
?>
	</table>
<?php if(!HIKASHOP_BACK_RESPONSIVE) { ?>
			</td>
			<td valign="top" width="50%">
<?php } else { ?>
	</div>
	<div class="span6">
<?php } ?>
	<table class="paramlist admintable table">
		<tr>
			<td class="key"><?php echo JText::_(
'HIKA_PUBLISHED' ); ?></td>
			<td><?php echo JHTML::_('hikaselect.booleanlist',
"data[field][field_published]" ,
'',@$this->field->field_published); ?></td>
		</tr>
		<tr class="limit_to">
			<td class="key">
					<?php echo JText::_( 'DISPLAY_LIMITED_TO' ); ?>
			</td>
			<td>
				<?php
				if(hikashop_level(2)){
					if(empty($this->field->field_table)){
						echo JText::_( 'SAVE_THE_FIELD_FIRST_BEFORE' );
					}else{
						echo
$this->limitParent->display("field_options[limit_to_parent]",@$this->field->field_options['limit_to_parent'],$this->field->field_table,@$this->field->field_options['parent_value'],$this->field);
					}
				}else{
					echo hikashop_getUpgradeLink('business');;
				}
				?>
				<span id="parent_value"></span>
			</td>
		</tr>
<?php if(hikashop_level(2) &&
$this->field->field_table=='entry'){ ?>
		<tr class="product_link">
			<td class="key">
					<?php echo JText::_( 'CORRESPOND_TO_PRODUCT' ); ?>
			</td>
			<td>
				<span id="product_id" >
					<?php echo
(int)@$this->field->field_options['product_id'].'
'.@$this->element->product_name; ?>
					<input type="hidden"
name="field_options[product_id]" value="<?php echo
@$this->field->field_options['product_id']; ?>"
/>
				</span>
				<a class="modal" rel="{handler: 'iframe',
size: {x: 760, y: 480}}" href="<?php echo
hikashop_completeLink("product&task=selectrelated&select_type=field",true
); ?>">
					<img src="<?php echo HIKASHOP_IMAGES; ?>edit.png"
alt="edit"/>
				</a>
				<a href="#"
onclick="document.getElementById('product_id').innerHTML='<input
type=\'hidden\' name=\'field_options[product_id]\'
value=\'0\' />';return false;" >
					<img src="<?php echo HIKASHOP_IMAGES; ?>delete.png"
alt="delete"/>
				</a>
				<br/>
				<?php echo JText::_( 'FOR_THE_VALUE' ).' ';
$this->fieldsClass->suffix='_corresponding'; ?>
				<?php echo
$this->fieldsClass->display($this->field,@$this->field->field_options['product_value'],'field_options[product_value]',false,'',true);
?>
			</td>
		</tr>
<?php }?>
	</table>
	<fieldset class="adminform">
		<legend><?php echo JText::_('DISPLAY');
?></legend>
		<table class="paramlist admintable table">
			<tr>
				<td class="key"><?php echo JText::_(
'DISPLAY_FRONTCOMP' ); ?></td>
				<td><?php echo JHTML::_('hikaselect.booleanlist',
"data[field][field_frontcomp]" ,
'',@$this->field->field_frontcomp); ?></td>
			</tr>
			<tr>
				<td class="key"><?php echo JText::_(
'DISPLAY_BACKEND_FORM' ); ?></td>
				<td><?php echo JHTML::_('hikaselect.booleanlist',
"data[field][field_backend]" ,
'',@$this->field->field_backend); ?></td>
			</tr>
			<tr>
				<td class="key"><?php echo JText::_(
'DISPLAY_BACKEND_LISTING' ); ?></td>
				<td><?php echo JHTML::_('hikaselect.booleanlist',
"data[field][field_backend_listing]" ,
'',@$this->field->field_backend_listing); ?></td>
			</tr>
			<?php
			if(!empty($this->displayOptions)) {
				if(is_string($this->field->field_display)) {
					$fields_display = explode(';',
trim($this->field->field_display, ';'));
					$this->field->field_display = new stdClass();
					foreach($fields_display as $f) {
						if(empty($f) || strpos($f, '=') === false)
							continue;
						list($k,$v) = explode('=', $f, 2);
						$this->field->field_display->$k = $v;
					}
				}
				foreach($this->displayOptions as $displayOption) {
					$displayOptionName = '';
					if(is_string($displayOption)) {
						$displayOptionName = $displayOption;
					} else if(!empty($displayOption->name)) {
						$displayOptionName = $displayOption->name;
						$displayOptionTitle = @$displayOption->title;
					} else if(!empty($displayOption['name'])) {
						$displayOptionName = $displayOption['name'];
						$displayOptionTitle = @$displayOption['title'];
					}

					if(empty($displayOptionName))
						continue;

					if(empty($displayOptionTitle))
						$displayOptionTitle = JText::_($displayOptionName);
			?>
			<tr>
				<td class="key"><?php echo $displayOptionTitle;
?></td>
				<td><?php echo JHTML::_('hikaselect.booleanlist',
'field_display['.$displayOptionName.']' , '',
@$this->field->field_display->$displayOptionName);
?></td>
			</tr>
			<?php
				}
			}
			?>
		</table>
	</fieldset>
	<?php
		$fieldsetDisplay = 'style="display:none"';
		if($this->field->field_table == "product" ||
$this->field->field_table == "item" ||
$this->field->field_table == "category") {
			$fieldsetDisplay = '';
		}
	?>
	<fieldset <?php echo $fieldsetDisplay; ?>
style="width:50%;" id="category_field"
class="adminform">
		<legend><?php echo JText::_( 'HIKA_CATEGORIES' );
?></legend>
		<div style="text-align:right;">
			<?php
				echo $this->popup->display(
					'<img
src="'.HIKASHOP_IMAGES.'add.png"/>'.JText::_('ADD'),
					'ADD',
					hikashop_completeLink("product&task=selectcategory",true
),
					'category_add_button',
					860, 480, '', '', 'button'
				);
			?>
		</div>
		<br/>
		<table class="adminlist table table-striped table-hover"
cellpadding="1" width="100%">
			<thead>
				<tr>
					<th class="title"><?php echo
JText::_('HIKA_NAME'); ?></th>
					<th class="title"><?php echo
JText::_('HIKA_DELETE'); ?></th>
					<th class="title"><?php echo
JText::_('ID'); ?></th>
				</tr>
			</thead>
			<tbody id="category_listing"><?php
			if(!empty($this->categories)) {
				$k = 0;
				for($i = 1, $a = count($this->categories) + 1; $i < $a; $i++) {
					$row =& $this->categories[$i];
					if(!empty($row->category_id)) {
			?>
				<tr id="category_<?php echo
$row->category_id;?>">
					<td>
						<div id="category_<?php echo $row->category_id;
?>_id">
						<a href="<?php echo
hikashop_completeLink('category&task=edit&cid='.$row->category_id);
?>"><?php echo $row->category_name; ?></a>
					</td>
					<td align="center">
						<a href="#" onclick="return
deleteRow('category_div_<?php echo
$row->category_id;?>','category[<?php echo
$row->category_id;?>]','category_<?php echo
$row->category_id; ?>');">
							<img
src="../media/com_hikashop/images/delete.png"/>
						</a>
					</td>
					<td width="1%" align="center">
						<?php echo $row->category_id; ?>
						<div id="category_div_<?php echo
$row->category_id;?>">
							<input style="width: 50px; background-color:#e8f9db;"
type	="hidden" name="category[<?php echo
$row->category_id;?>]" id="category[<?php echo
$row->category_id;?>]" value="<?php echo
$row->category_id;?>"/>
						</div>
					</td>
				</tr>
			<?php
					}
					$k = 1-$k;
				}
			}
			?></tbody>
		</table>
		<br/>
		<table class="paramlist admintable table">
			<tr>
				<td class="key">
					<label
for="data[field][field_with_sub_categories]"><?php echo
JText::_( 'INCLUDING_SUB_CATEGORIES' ); ?></label>
				</td>
				<td><?php echo JHTML::_('hikaselect.booleanlist',
"data[field][field_with_sub_categories]" ,
'',@$this->field->field_with_sub_categories);
?></td>
			</tr>
		</table>
	</fieldset>
	<fieldset class="adminform">
		<legend><?php echo JText::_('ACCESS_LEVEL');
?></legend>
		<?php
		if(hikashop_level(2)){
			$acltype = hikashop_get('type.acl');
			echo
$acltype->display('field_access',@$thfield/tmpl/index.html000064400000000032151162050350010571
0ustar00>field->field_table.']['.$field/tmpl/listing.php000064400000014374151162050350010774
0ustar00field/tmpl/index.html000064400000000032151162050350010571
0ustar00<html><body></body></html>field/tmpl/listing.php000064400000014374151162050350010774
0ustar00<?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');
?><div class="iframedoc"
id="iframedoc"></div>
<form action="index.php?option=<?php echo HIKASHOP_COMPONENT
?>&amp;ctrl=field" method="post" 
name="adminForm" id="adminForm">
	<?php if(hikashop_level(1)){ ?>
		<table>
			<tr>
				<td width="100%">
				</td>
				<td nowrap="nowrap">
					<?php echo
$this->tabletype->display('filter_table',$this->selectedType);
?>
				</td>
			</tr>
		</table>
	<?php } ?>
	<table id="hikashop_field_listing" class="adminlist
table table-striped" cellpadding="1">
		<thead>
			<tr>
				<th class="title titlenum">
					<?php echo JText::_( 'HIKA_NUM' );?>
				</th>
				<th class="title titlebox">
					<input type="checkbox" name="toggle"
value="" onclick="hikashop.checkAll(this);" />
				</th>
				<?php if(hikashop_level(1)){ ?>
					<th id="hikashop_field_table_title"
class="title">
						<?php echo JText::_('FIELD_TABLE'); ?>
					</th>
				<?php } ?>
				<th class="title">
					<?php echo JText::_('FIELD_COLUMN'); ?>
				</th>
				<th class="title">
					<?php echo JText::_('FIELD_LABEL'); ?>
				</th>
				<th class="title">
					<?php echo JText::_('FIELD_TYPE'); ?>
				</th>
				<th class="title titletoggle">
					<?php echo JText::_('REQUIRED'); ?>
				</th>
				<th class="title titleorder">
					<?php echo JText::_('HIKA_ORDER'); echo
JHTML::_('grid.order',  $this->rows );?>
				</th>
				<th class="title titletoggle">
					<?php echo JText::_('DISPLAY_FRONTCOMP'); ?>
				</th>
				<th class="title titletoggle">
					<?php echo JText::_('DISPLAY_BACKEND_FORM'); ?>
				</th>
				<th class="title titletoggle">
					<?php echo JText::_('DISPLAY_BACKEND_LISTING'); ?>
				</th>
				<th class="title titletoggle">
					<?php echo JText::_('HIKA_PUBLISHED'); ?>
				</th>
				<th class="title titletoggle">
					<?php echo JText::_('CORE'); ?>
				</th>
				<th class="title titleid">
					<?php echo JText::_( 'ID' ); ?>
				</th>
			</tr>
		</thead>
		<tbody>
			<?php
				$k = 0;

				for($i = 0,$a = count($this->rows);$i<$a;$i++){
					$row =& $this->rows[$i];

					$publishedid = 'field_published-'.$row->field_id;
					$requiredid = 'field_required-'.$row->field_id;
					$backendid = 'field_backend-'.$row->field_id;
					$backendlistingid =
'field_backend_listing-'.$row->field_id;
					$frontcompid = 'field_frontcomp-'.$row->field_id;
			?>
				<tr class="<?php echo "row$k"; ?>">
					<td align="center">
					<?php echo $i+1; ?>
					</td>
					<td align="center">
						<?php echo JHTML::_('grid.id', $i, $row->field_id );
?>
					</td>
					<?php if(hikashop_level(1)){ ?>
						<td class="hikashop_field_table_value">
							<?php echo $row->field_table; ?>
						</td>
					<?php } ?>
					<td>
						<?php if($this->manage){ ?>
							<a href="<?php echo
hikashop_completeLink('field&task=edit&cid[]='.$row->field_id);
?>">
						<?php } ?>
								<?php echo $row->field_namekey; ?>
						<?php if($this->manage){ ?>
							</a>
						<?php } ?>
					</td>
					<td>
						<?php echo
$this->fieldsClass->trans($row->field_realname); ?>
					</td>
					<td>
						<?php echo
$this->fieldtype->allValues[$row->field_type]['name'];
?>
					</td>
					<td align="center">
						<?php if($this->manage){ ?>
							<span id="<?php echo $requiredid ?>"
class="loading"><?php echo
$this->toggleClass->toggle($requiredid,(int)
$row->field_required,'field') ?></span>
						<?php }else{ echo
$this->toggleClass->display('activate',$row->field_required);
} ?>
					</td>
					<td class="order">
						<?php if($this->manage){ ?>
							<span><?php echo $this->pagination->orderUpIcon( $i,
$row->field_ordering >= @$this->rows[$i-1]->field_ordering
,'orderup', 'Move Up',true ); ?></span>
							<span><?php echo $this->pagination->orderDownIcon(
$i, $a, $row->field_ordering <=
@$this->rows[$i+1]->field_ordering , 'orderdown',
'Move Down' ,true); ?></span>
							<input type="text" name="order[]"
size="5" value="<?php echo $row->field_ordering;
?>" class="text_area" style="text-align:
center" />
						<?php }else{ $row->field_ordering; } ?>
					</td>
					<td align="center">
						<?php if($this->manage){ ?>
							<span id="<?php echo $frontcompid ?>"
class="loading"><?php echo
$this->toggleClass->toggle($frontcompid,(int)
$row->field_frontcomp,'field') ?></span>
						<?php }else{ echo
$this->toggleClass->display('activate',$row->field_frontcomp);
} ?>
					</td>
					<td align="center">
						<?php if($this->manage){ ?>
							<span id="<?php echo $backendid ?>"
class="loading"><?phpfield/view.html.php000064400000006516151162050350010263
0ustar00echo $this->toggleClass->toggle($publishedid,(int)
$row->field_published,'field') ?></span>
						<?php }else{ echo
$this->toggleClass->display('activate',$row->field_published);
} ?>
					</td>
					<td align="center">
						<?php echo
$this->toggleClass->display('activate',$row->field_core);
?>
					</td>
					<td width="1%" align="center">
						<?php echo $row->field_id; ?>
					</td>
				</tr>
			<?php
					$k = 1-$k;
				}
			?>
		</tbody>
	</table>

	<input type="hidden" name="option"
value="<?php echo HIKASHOP_COMPONENT; ?>" />
	<input type="hidden" name="task" value=""
/>
	<input type="hidden" name="ctrl"
value="field" />
	<input type="hidden" name="boxchecked"
value="0" />
	<?php echo JHTML::_( 'form.token' ); ?>
</form>
field/view.html.php000064400000006516151162050350010263 0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_fields
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */
defined('_JEXEC') or die;

/**
 * Field View
 *
 * @since  3.7.0
 */
class FieldsViewField extends JViewLegacy
{
	/**
	 * @var  JForm
	 *
	 * @since   3.7.0
	 */
	protected $form;

	/**
	 * @var  JObject
	 *
	 * @since   3.7.0
	 */
	protected $item;

	/**
	 * @var  JObject
	 *
	 * @since   3.7.0
	 */
	protected $state;

	/**
	 * Execute and display a template script.
	 *
	 * @param   string  $tpl  The name of the template file to parse;
automatically searches through the template paths.
	 *
	 * @return  mixed  A string if successful, otherwise an Error object.
	 *
	 * @see     JViewLegacy::loadTemplate()
	 * @since   3.7.0
	 */
	public function display($tpl = null)
	{
		$this->form  = $this->get('Form');
		$this->item  = $this->get('Item');
		$this->state = $this->get('State');

		$this->canDo =
JHelperContent::getActions($this->state->get('field.component'),
'field', $this->item->id);

		// Check for errors.
		if (count($errors = $this->get('Errors')))
		{
			throw new Exception(implode("\n", $errors), 500);
		}

		JFactory::getApplication()->input->set('hidemainmenu',
true);

		$this->addToolbar();

		return parent::display($tpl);
	}

	/**
	 * Adds the toolbar.
	 *
	 * @return  void
	 *
	 * @since   3.7.0
	 */
	protected function addToolbar()
	{
		$component = $this->state->get('field.component');
		$section   = $this->state->get('field.section');
		$userId    = JFactory::getUser()->get('id');
		$canDo     = $this->canDo;

		$isNew      = ($this->item->id == 0);
		$checkedOut = !($this->item->checked_out == 0 ||
$this->item->checked_out == $userId);

		// Avoid nonsense situation.
		if ($compfilter/index.html000064400000000032151162050350010017
0ustar00apply('field.apply');
			Jfilter/tmpl/form.php000064400000012704151162050350010463
0ustar00filter/index.html000064400000000032151162050350010017
0ustar00<html><body></body></html>filter/tmpl/form.php000064400000012704151162050350010463
0ustar00<?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');
?><div class="iframedoc"
id="iframedoc"></div>
<form
action="index.php?option=com_hikashop&amp;ctrl=filter"
method="post"  name="adminForm"
id="adminForm" >
<?php if(!HIKASHOP_BACK_RESPONSIVE) { ?>
<div id="page-filter">
	<table style="width:100%">
		<tr>
			<td valign="top" width="50%">
<?php } else { ?>
<div id="page-filter" class="row-fluid">
	<div class="span6">
<?php } ?>
			<fieldset class="adminform">
				<legend><?php echo JText::_( 'MAIN_INFORMATION' );
?></legend>
				<table class="paramlist admintable table">
					<tr>
						<td class="key">
								<?php echo JText::_( 'HIKA_NAME' ); ?>
						</td>
						<td>
							<input type="text"
name="data[filter][filter_name]" id="name"
class="inputbox" size="40" value="<?php echo
$this->escape(@$this->element->filter_name); ?>" />
						</td>
					</tr>
					<tr>
						<td class="key">
							<?php echo JText::_( 'HIKA_TYPE' ); ?>
						</td>
						<td>
							<?php
								echo
$this->filterType->display('data[filter][filter_type]',@$this->element->filter_type);
							?>
						</td>
					</tr>
					<tr>
						<td class="key">
								<?php echo JText::_( 'CATEGORY' ); ?>
						</td>
						<td>
							<span id="changeParent" >
								<?php echo (int)@$this->element->filter_category_id.'
'.@$this->element->filter_category_name; ?>

							</span>
								<input type="hidden"
id="categoryselectparentlisting"
name="data[filter][filter_category_id]" value="<?php echo
@$this->element->filter_category_id; ?>" />
							<?php
							echo $this->popup->display(
									'<img src="'.
HIKASHOP_IMAGES.'edit.png"
alt="'.JText::_('CATEGORY').'"/>',
									'CATEGORY',
									hikashop_completeLink("category&task=selectparentlisting&control=category",true
),
									'category_link',
									860, 480, '', '', 'link'
								);
							?>
							<a href="#"
onclick="document.getElementById('changeParent').innerHTML='0
<?php echo
$this->escape(JText::_('CATEGORY_NOT_FOUND'));?>';
document.getElementById('categoryselectparentlisting').value='0';return
false;" >
								<img src="<?php echo HIKASHOP_IMAGES;
?>delete.png" alt="delete"/>
							</a>
						</td>
					</tr>
					<tr>
						<td class="key">
								<?php echo JText::_( 'INCLUDING_SUB_CATEGORIES' );
?>
						</td>
						<td>
							<?php echo JHTML::_('hikaselect.booleanlist',
"data[filter][filter_category_childs]" ,
'',@$this->element->filter_category_childs	); ?>
						</td>
					</tr>
				</table>
			</fieldset>
			<fieldset class="adminform">
				<legend><?php echo JText::_( 'EXTRA_INFORMATION' );
?></legend>
				<table class="paramlist admintable table">
					<tr>
						<td class="key">
								<?php echo JText::_( 'HIKA_PUBLISHED' ); ?>
						</td>
						<td>
							<?php echo JHTML::_('hikaselect.booleanlist',
"data[filter][filter_published]" ,
'',@$this->element->filter_published); ?>
						</td>
					</tr>
					<tr id="applyOnClick">
						<td class="key">
								<?php echo JText::_( 'SUBMIT_ON_CLICK' ); ?>
						</td>
						<td>
							<?php echo JHTML::_('hikaselect.booleanlist',
"data[filter][filter_direct_application]" ,
'',@$this->element->filter_direct_application); ?>
						</td>
					</tr>
					<tr id="filterHeight">
						<td class="key">
								<?php echo JText::_( 'PRODUCT_HEIGHT' ); ?>
						</td>
						<td>
							<input size="10" type="text"
name="data[filter][filter_height]" id="name"
class="inputbox" size="40" value="<?php echo
$this->escape(@$this->element->filter_height); ?>" />
px
						</td>
					</tr>
					<tr>
						<td class="key">
								<?php echo JText::_( 'DELETABLE_FILTER' ); ?>
						</td>
						<td>
							<?php echo JHTML::_('hikaselect.booleanlist',
"dafilter/tmpl/form_options.php000064400000034325151162050350012241
0ustar00;
					echo
$acltype->display('filter_access',@$this->element->filter_access,'filter');
				}else{
					echo hikashop_getUpgradeLink('business');;
				} ?>
			</fieldset>
<?php if(!HIKASHOP_BACK_RESPONSIVE) { ?>
			</td>
			<td valign="top" width="50%">
<?php } else { ?>
	</div>
	<div class="span6">
<?php } ?>
			<fieldset class="adminform">
				<legend><?php echo JText::_( 'OPTIONS' );
?></legend>
					<?php if(1){
							echo $this->loadTemplate('options');
					}?>
			</fieldset>
<?php if(!HIKASHOP_BACK_RESPONSIVE) { ?>
			</td>
		</tr>
	</table>
</div>
<?php } else { ?>
	</div>
</div>
<?php } ?>
	<div class="clr"></div>

	<input type="hidden" name="cid[]"
value="<?php echo @$this->element->filter_id; ?>"
/>
	<input type="hidden" name="option"
value="com_hikashop" />
	<input type="hidden" name="task" value=""
/>
	<input type="hidden" name="ctrl"
value="filter" />
	<?php echo JHTML::_( 'form.token' ); ?>
</form>
filter/tmpl/form_options.php000064400000034325151162050350012241
0ustar00<?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
					$displayCursors='style="display:none"';
					$displayPrice='style="display:none"';
					$displayValues='style="display:none"';
					$fieldsetDisplay='style="display:none"';
					$fieldsetFields='style="display:none"';
					$weightUnitDisplay='style="display:none"';
					$checkboxDisplay='style="display:none"';
					$sortDisplay='style="display:none"';
					$sizeUnitDisplay='style="display:none"';
					$textSizeDisplay='style="display:none"';
					$dipslayApplyCursor='style="display:none"';
					$dipslayApply='style="display:none"';
					$dipslayApplyText='style="display:none"';
					$searchProcessing='style="display:none"';
					if(@$this->element->filter_type=='text'){
						$dipslayApplyText='';
						$textSizeDisplay='';
						$searchProcessing='';
					}else if(@$this->element->filter_type=='cursor'){
						$dipslayApplyCursor='';
					}else{
						$dipslayApply='';
					}
					if($this->element->filter_type!="text"){
						if(@$this->element->filter_data=='cursor'){
							$displayCursors='';
						}
						if(@$this->element->filter_data=='price'){
							$displayPrice='';
							$displayValues='';
						}
						if(@$this->element->filter_data=='custom_fields'){
							$fieldsetFields='';
						}
						if(@$this->element->filter_type=="checkbox" ||
@$this->element->filter_type=="radio"){
							$checkboxDisplay="";
						}
						if(@$this->element->filter_data=='sort'){
							$sortDisplay='';
						}
						if(@$this->element->filter_options['product_information']=='weight'
||
@$this->element->filter_options['sort_by']=='weight'){
							$weightUnitDisplay='';
						}else{
							$sizeUnitDisplay='';
						}
					}
					if(@$this->element->filter_data=="category"){
						$fieldsetDisplay="";
					}
				?>
				<table class="paramlist admintable table">
					<tr id="applyOntext" <?php echo $dipslayApplyText;
?>>
						<td class="key">
								<?php echo JText::_( 'APPLY_ON' ); ?>
						</td>
						<td >
							<?php echo
$this->orderType->display('data[filter][filter_data_text][]',@$this->element->filter_data,
'product_filter', 'class="inputbox"
size="8" multiple="multiple"', false); ?>
						</td>
					</tr>
					<tr id="applyOn" <?php echo $dipslayApply; ?>>
						<td class="key">
								<?php echo JText::_( 'APPLY_ON' ); ?>
						</td>
						<td>
							<?php echo
$this->data_filterType->display('data[filter][filter_data]',@$this->element->filter_data);
?>
						</td>
					</tr>
					<tr id="applyOnCursor" <?php echo $dipslayApplyCursor;
?>>
						<td class="key">
								<?php echo JText::_( 'APPLY_ON' ); ?>
						</td>
						<td>
							<?php echo
$this->product_informationType->display("data[filter][filter_data_cursor]",
@$this->element->filter_data, $this->fields ,
'onchange="setVisibleUnit(this.value);"',
'datafilterfilter_data_cursor'); ?>
						</td>
					</tr>
					<tr id="filterSize">
						<td class="key">
								<?php echo JText::_( 'FIELD_SIZE' ); ?>
						</td>
						<td>
							<input size="10" type="text"
name="data[filter][filter_size]" id="name"
class="inputbox" size="40" value="<?php echo
$this->escape(@$this->element->filter_options['filter_size']);
?>" />
						</td>
					</tr>
					<tr id="titlePosition" class="required">
						<td class="key">
								<?php echo JText::_( 'TITLE_POSITION' ); ?>
						</td>
						<td>
							<?php echo
$this->positionType->display('data[filter][title_position]',@$this->element->filter_options['title_position'],
true, true);?>
						</td>
					</tr>
					<tr id="titlePositionCursor"
class="required">
						<td class="key">
								<?php echo JText::_( 'TITLE_POSITION' ); ?>
						</td>
						<td>
							<?php echo
$this->div_positionType->display('data[filter][title_position_cursor]',@$this->element->filter_options['title_position']);?>
						</td>
					</tr>
					<tr>
						<td class="key">
								<?php echo JText::_( 'NUMBER_OF_COLUMNS' ); ?>
						</td>
							<td>
							<select name="data[filter][column_width]">
								<?php
								$config =& hikashop_config();
								$maxColumn=$config->get('filter_column_number');
								if(!isset($maxColumn) || empty($maxColumn) ||
!is_numeric($maxColumn)){
									$maxColumn=2;
								}
								for($i=1;$i<=$maxColumn;$i++){  ?>
									<option <?php
if(@$this->element->filter_options['column_width'] == $i)
echo "selected=\"selected\""; ?>
value='<?php echo $i; ?>' ><?php echo $i;
?></option>
								<?php } ?>
							</select>
						</td>
					</tr>
					<tr id="button_align" <?php echo $checkboxDisplay;
?>>
						<td class="key">
								<?php echo JText::_( 'INLINE_BUTTON' ); ?>
						</td>
						<td>
							<?php echo JHTML::_('hikaselect.booleanlist',
"data[filter][button_align]" ,
'',@$this->element->filter_options['button_align']);
?>
						</td>
					</tr>
					<tr id="textBoxSize" <?php echo $textSizeDisplay;
?>>
						<td class="key">
								<?php echo JText::_( 'MAXIMIZE_TEXT_SIZE' ); ?>
						</td>
						<td>
							<?php echo JHTML::_('hikaselect.booleanlist',
"data[filter][textBoxSize]" ,
'',@$this->element->filter_options['textBoxSize']);
?>
						</td>
					</tr>
					<tr id="searchProcessing" <?php echo
$searchProcessing; ?>>
						<td class="key">
								<?php echo JText::_( 'SEARCH_PROCESSING' ); ?>
						</td>
						<td>
							<?php
								$arr = array(
									JHTML::_('select.option', 'every',
JText::_('Every words') ),
									JHTML::_('select.option', 'complete',
JText::_('Complete expression') ),
									JHTML::_('select.option', 'any',
JText::_('Any word') ),
									JHTML::_('select.option', 'operators',
JText::_('Search operators') ),
								);
								echo JHTML::_('hikaselect.genericlist', $arr,
"data[filter][searchProcessing]",
'class="inputbox" size="1"',
'value', 'text',
@$this->element->filter_options['searchProcessing']);
							 ?>
						</td>
					</tr>
					<tr id="max_char">
						<td class="key">
								<?php echo JText::_( 'MAXLENGTH' ); ?>
						</td>
						<td>
							<input type="text"
name="data[filter][max_char]" id="name"
class="inputbox" size="10" value="<?php echo
$this->escape(@$this->element->filter_options['max_char']);
?>" />
						</td>
					</tr>
					<tr id="currencies" <?php echo $displayPrice;
?>>
						<td class="key">
								<?php echo JText::_( 'CURRENCIES' ); ?>
						</td>
						<td>
							<?php 	$currency=hikashop_get('type.currency');
								
	$currencyList=$currency->display("data[filter][filter_currencies][]",
@$this->element->filter_options['currencies'],
'multiple="multiple" size="4"');
									echo $currencyList;
							?>
						</td>
					<tr/>
					<tr id="characteristic">
						<td class="key">
								<?php echo JText::_( 'CHARACTERISTICS' ); ?>
						</td>
						<td>
							<?php
								echo
$this->characteristiclistType->display("data[filter][filter_charac]",
@$this->element->filter_options['filter_charac']);
							?>
						</td>
					<tr/>
					<tr id="sort_by" <?php echo $sortDisplay; ?>>
						<td class="key">
								<?php echo JText::_( 'SORT' ); ?>
						</td>
						<td>
							<?php
								echo
$this->product_informationType->display("data[filter][sort_by][]",
@$this->element->filter_options['sort_by'],
$this->fields, 'multiple="multiple"
size="8"', null, true);
							?>
						</td>
					<tr/>
					<tr id="product_information">
						<td class="key">
								<?php echo JText::_( 'INFORMATION' ); ?>
						</td>
						<td>
							<?php
								echo
$this->product_informationType->display("data[filter][product_information]",
@$this->element->filter_options['product_information'],'',
'onchange="setVisibleUnit(this.value);"',
'product_information_value');
							?>
						</td>
					<tr/>
					<tr id="dimension_unit" <?php echo $sizeUnitDisplay;
?>>
						<td class="key">
								<?php echo JText::_( 'UNITS' ); ?>
						</td>
						<td>
							<?php
								echo
$this->volume->display('data[filter][dimension_unit]',@$this->element->filter_options['information_unit']);
							?>
						</td>
					<tr/>
					<tr id="weight_unit" <?php echo $weightUnitDisplay;
?>>
						<td class="key">
								<?php echo JText::_( 'UNITS' ); ?>
						</td>
						<td>
							<?php
								echo
$this->weight->display('data[filter][weight_unit]',@$this->element->filter_options['information_unit']);
							?>
						</td>
					<tr/>
					<tr id="custom_field" <?php echo $fieldsetFields;
?> >
						<td class="key">
								<?php echo JText::_( 'FIELDS' ); ?>
						</td>
						<td>
							<select name="data[filter][custom_field]">
							<?php
								if(!empty($this->fields)){
									foreach($this->fields as $key => $field){
									?>
									<option <?php
if(@$this->element->filter_options['custom_field'] ==
$field->field_namekey) echo "selected=\"selected\"";
?> value='<?php echo $field->field_namekey; ?>'
><?php echo $key; ?></option>
								<?php }
								} ?>
							</select>
						</td>
					<tr/>
					<tr id="filterValues" class="multivalues"
<?php echo $displayValues; ?>>
						<td class="key" valign="top">
								<?php echo JText::_( 'FIELD_VALUES' ); ?>
						</td>
						<td>
							<table class="table table-striped table-hover">
							<tbody  id="tablevalues">
								<?php
								if(!empty($this->element->filter_value) AND
is_array($this->element->filter_value)){
								foreach($this->element->filter_value as $key => $value){
								?>
								<tr>
									<td><input type="text"
name="filter_values[value][]" value="<?php echo $value;
?>" /></td>
								</tr>
								<?php } ?>
								<tr>
									<td><input type="text"
name="filter_values[value][]" value=""
/></td>
								</tr>
								 <?php }else{ ?>
								<tr>
									<td><input type="text"
name="filter_values[value][]" value=""
/></td>
								</tr>
								<tr>
									<td><input type="text"
name="filter_values[value][]" value=""
/></td>
								</tr>
								<tr>
									<td><input type="text"
name="filter_values[value][]" value=""
/></td>
								</tr>
								<?php } ?>
							</tbody>
							</table>
							<a onclick="addLine();return false;" href='#'
title="<?php echo
$this->escape(JText::_('FIELD_ADDVALUE'));
?>"><?php echo JText::_('FIELD_ADDVALUE');
?></a>
							<br/><br/><?php echo JText::_(
'DEFINED_LIMITS' ).' '.
JHTML::_('hikaselect.booleanlist',
"data[filter][defined_limits]" ,
'',@$this->element->filter_options['defined_limits']);
?>
						</td>
					</tr>
					<tr id="cursorNumber" <?php echo $displayCursors;
?>>
						<td class="key">
								<?php echo JText::_( 'CURSOR_NUMBER' ); ?>
						</td>
						<td>
							<select name="data[filter][cursor_number]">
								<?php
								$maxColumn=5;
								for($i=1;$i<$maxColumn;$i++){  ?>
									<option <?php
if(@$this->element->filter_options['cursor_number'] == $i)
echo "selected=\"selected\""; ?>
value='<?php echo $i; ?>' ><?php echo $i;
?></option>
								<?php } ?>
							</select>
						</td>
					</tr>
					<tr id="cursorMax" <?php echo $displayCursors;
?>>
						<td class="key">
								<?php echo JText::_( 'CURSOR_MAX' ); ?>
						</td>
						<td>
							<input size="10" type="text"
name="data[filter][cursor_max]" id="name"
class="inputbox" size="40" value="<?php echo
$this->escape(@$this->element->filter_options['cursor_max']);
?>" />
						</td>
					</tr>
					<tr id="cursorMin" <?php echo $displayCursors;
?>>
						<td class="key">
								<?php echo JText::_( 'CURSOR_MIN' ); ?>
						</td>
						<td>
							<input size="10" type="text"
name="data[filter][cursor_min]" id="name"
class="inputbox" size="40" value="<?php echo
$this->escape(@$this->element->filter_options['cursor_min']);
?>" />
						</td>
					</tr>
					<tr id="cursorStep" <?php echo $displayCursors;
?>>
						<td class="key">
								<?php echo JText::_( 'CURSOR_STEP' ); ?>
						</td>
						<td>
							<input size="10" type="text"
name="data[filter][cursor_step]" id="name"
class="inputbox" size="40" value="<?php echo
$this->escape(@$this->element->filter_options['cursor_step']);
?>" />
						</td>
					</tr>
					<tr id="cursorEffet" <?php echo $displayCursors;
?>>
						<td class="key">
								<?php echo JText::_( 'CURSOR_EFFECT' ); ?>
						</td>
						<td>
							<?php echo JHTML::_('hikaselect.booleanlist',
"data[filter][cursor_effect]" ,
'',@$this->element->filter_options['cursor_effect']);
?>
						</td>
					</tr>
					<tr id="cursorWidth" <?php echo $displayCursors;
?>>
						<td class="key">
								<?php echo JText::_( 'CURSOR_WIDTH' ); ?>
			filter/tmpl/index.html000064400000000032151162050350010773
0ustar00		echo
$this->popup->displfilter/tmpl/listing.php000064400000013104151162050350011164
0ustar00filter/tmpl/index.html000064400000000032151162050350010773
0ustar00<html><body></body></html>filter/tmpl/listing.php000064400000013104151162050350011164
0ustar00<?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');
?><div class="iframedoc"
id="iframedoc"></div>
<form action="index.php?option=<?php echo HIKASHOP_COMPONENT
?>&amp;ctrl=filter" method="post" 
name="adminForm" id="adminForm">
	<table>
		<tr>
			<td width="100%">
				<?php echo JText::_( 'FILTER' ); ?>:
				<input type="text" name="search"
id="search" value="<?php echo
$this->escape($this->pageInfo->search);?>"
class="text_area" />
				<button class="btn"
onclick="this.form.submit();"><?php echo JText::_(
'GO' ); ?></button>
				<button class="btn"
onclick="document.getElementById('search').value='';this.form.submit();"><?php
echo JText::_( 'RESET' ); ?></button>
			</td>
			<td nowrap="nowrap">
			</td>
		</tr>
	</table>
	<table id="hikashop_filter_listing" class="adminlist
table table-striped table-hover" cellpadding="1">
		<thead>
			<tr>
				<th class="title titlenum">
					<?php echo JText::_( 'HIKA_NUM' );?>
				</th>
				<th class="title titlebox">
					<input type="checkbox" name="toggle"
value="" onclick="hikashop.checkAll(this);" />
				</th>
				<th class="title">
					<?php echo JHTML::_('grid.sort',
JText::_('HIKA_NAME'), 'a.filter_name',
$this->pageInfo->filter->order->dir,$this->pageInfo->filter->order->value
); ?>
				</th>
				<th class="title titledata">
					<?php echo JHTML::_('grid.sort',
JText::_('APPLY_ON'), 'a.filter_data',
$this->pageInfo->filter->order->dir,$this->pageInfo->filter->order->value
); ?>
				</th>
				<th class="title">
					<?php echo JHTML::_('grid.sort',
JText::_('HIKA_TYPE'), 'a.filter_type',
$this->pageInfo->filter->order->dir,$this->pageInfo->filter->order->value
); ?>
				</th>
				<th class="title titleorder">
				<?php echo JHTML::_('grid.sort',  JText::_(
'HIKA_ORDER' ),
'a.filter_ordering',$this->pageInfo->filter->order->dir,
$this->pageInfo->filter->order->value ); ?>
					<?php if ($this->order->ordering) echo
JHTML::_('grid.order',  $this->rows ); ?>
				</th>
				<th class="title titlepublished">
					<?php echo JHTML::_('grid.sort',  
JText::_('HIKA_PUBLISHED'), 'a.filter_published',
$this->pageInfo->filter->order->dir,
$this->pageInfo->filter->order->value ); ?>
				</th>
				<th class="title titleid">
					<?php echo JHTML::_('grid.sort',   JText::_(
'ID' ), 'a.filter_id',
$this->pageInfo->filter->order->dir,
$this->pageInfo->filter->order->value ); ?>
				</th>
			</tr>
		</thead>
		<tfoot>
			<tr>
				<td colspan="11">
					<?php echo $this->pagination->getListFooter(); ?>
					<?php echo $this->pagination->getResultsCounter(); ?>
				</td>
			</tr>
		</tfoot>
		<tbody>
			<?php
				$k = 0;
				for($i = 0,$a = count($this->rows);$i<$a;$i++){
					$row =& $this->rows[$i];
					$publishedid = 'filter_published-'.$row->filter_id;

					$row->filter_data=unserialize($row->filter_data);
			?>
				<tr class="<?php echo "row$k"; ?>">
					<td align="center">
					<?php echo $this->pagination->getRowOffset($i); ?>
					</td>
					<td align="center">
						<?php echo JHTML::_('grid.id', $i, $row->filter_id );
?>
					</td>
					<td align="center">
						<?php if($this->manage){ ?>
							<a href="<?php echo
hikashop_completeLink('filter&task=edit&cid[]='.$row->filter_id);
?>">
						<?php }
							echo $row->filter_name;
						if($this->manage){ ?>
							</a>
						<?php } ?>
					</td>
					<td>
						<?php
							if(is_array($row->filter_data)){
								echo implode(',', $row->filter_data);
							}else{
								echo $row->filter_data;
							}
						?>
					</td>
					<td align="center">
						<?php
							echo $row->filter_type;
						?>
					</td>
					<td class="order">
						<?php if($this->manage){  ?>
							<span><?php echo $this->pagination->orderUpIcon( $i,
$this->order->reverse XOR ( $row->filter_ordering >=
@$this->rows[$i-1]->filter_ordering ), $this->order->orderUp,
'Move Up',$this->order->ordering );
?></span>
import/tmpl/file.php000064400000003701151162050350010461
0ustar001-$k;
				}
			?>
		</tbody>
	</table>
	<input type="hidden" name="option"
value="<?php echo HIKASHOP_COMPONENT; ?>" />
	<input type="hidden" name="task" value=""
/>
	<input type="hidden" name="ctrl"
value="<?php echo JRequest::getCmd('ctrl'); ?>"
/>
	<input type="hidden" name="boxchecked"
value="0" />
	<input type="hidden" name="filter_order"
value="<?php echo
$this->pageInfo->filter->order->value; ?>" />
	<input type="hidden" name="filter_order_Dir"
value="<?php echo $this->pageInfo->filter->order->dir;
?>" />
	<?php echo JHTML::_( 'form.token' ); ?>
</form>
import/tmpl/file.php000064400000003701151162050350010461 0ustar00<?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');
?>
<table class="admintable table" cellspacing="1">
	<tr>
		<td class="key" >
			<?php echo JText::_('UPLOAD_FILE'); ?>
		</td>
		<td>
			<input type="file" size="50"
nimport/tmpl/folder.php000064400000003167151162050350011023 0ustar00
	<tr>
		<td class="key" >
			<?php echo JText::_('UPDATE_PRODUCTS'); ?>
		</td>
		<td>
			<?php echo JHTML::_('hikaselect.booleanlist',
'file_update_products','',JRequest::getInt('file_update_products','1'));?>
		</td>
	</tr>
	<tr>
		<td class="key" >
			<?php echo JText::_('CREATE_CATEGORIES'); ?>
		</td>
		<td>
			<?php echo JHTML::_('hikaselect.booleanlist',
'file_create_categories','',JRequest::getInt('file_create_categories','1'));?>
		</td>
	</tr>
	<tr>
		<td class="key" >
			<?php echo JText::_('FORCE_PUBLISH'); ?>
		</td>
		<td>
			<?php echo JHTML::_('hikaselect.booleanlist',
'file_force_publish','',JRequest::getInt('file_force_publish','1'));?>
		</td>
	</tr>
	<tr>
		<td class="key" >
			<?php echo JText::_('UPDATE_PRODUCT_QUANTITY'); ?>
		</td>
		<td>
			<?php echo JHTML::_('hikaselect.booleanlist',
'update_product_quantity','',JRequest::getInt('update_product_quantity','0'));?>
		</td>
	</tr>
</table>
import/tmpl/folder.php000064400000003167151162050350011023
0ustar00<?php
/**
 * @package	HikaShop for Joomla!
 * @version	2.2.3
 * @author	hikashop.com
 * @copyright	(C) 2010-2013
Himport/tmpl/mijo.php000064400000001552151162050350010502 0ustar00"
size="50" name="images_folder" />
			</td>
		</tr>
	</table>
</div>
<div id="files" style="display:none">
	<table class="admintable table"
cellspacing="1">
		<tr>
			<td class="key" >
				<?php echo JText::_('FOLDER_PATH'); ?>
			</td>
			<td>
				<input type="text" size="50"
name="files_folder" />
			</td>
		</tr>
	</table>
</div>
<div id="both" style="display:none">
	<table class="admintable table"
cellspacing="1">
		<tr>
			<td class="key" >
				<?php echo JText::_('FOLDER_PATH'); ?>
			</td>
			<td>
				<input type="text" size="50"
name="both_folder" />
			</td>
		</tr>
	</table>
</div>

import/tmpl/openc.php000064400000002515151162050350010650 0ustar00<?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

echo
JText::sprintf('X_IMPORT_DESC','Mijoshop','Mijoshop').'
:<br/>';
$functions =
array('TAXATIONS','HIKA_CATEGORIES','PRODUCTS','PRICES','USERS','ORDERS','DOWNLOADS','FILES','HIKA_IMAGES','DISCOUNTS','COUPONS');
foreach($functions as $k => $v){
	echo '<br/>  - '.JText::_($v);
}
?>
<table class="admintable table" cellspacing="1">
<tr>
	<td class="key" >
		<?php echo JText::_('MIJO_IMPORT_CURRENCIES'); ?>
	</td>
	<td>
		<?php echo JHTML::_('hikaselect.booleanlist',
'import_currencies','',JRequest::getInt('import_currencies','0'));
?>
	</td>
</tr>
</table>

<?php

import/tmpl/openc.php000064400000002515151162050350010650
0ustar00import/tmpl/redshop.php000064400000001073151162050350011206
0ustar00nctions as $k => $v){
	echo '<br/>  - '.JText::_($v);
	if ($v == 'HIKA_IMAGES')
		echo ' ( '.JText::_('OPENC_WARNING_IMAGES').'
)';
}
echo '<p
style="color:red"><br/>'.JText::_('OPENC_WARNING').'</p>';
?>
<table class="admintable table" cellspacing="1">
<tr>
	<td class="key" >
		<?php echo JText::_('OPENC_DATABASE_NAME'); ?>
	</td>
	<td>
		<input type="text" name="opencDbName"
class="inputbox" />
	</td>
</tr>
<tr>
	<td class="key" >
		<?php echo JText::_('OPENC_WEBSITE_PATH'); ?>
	</td>
	<td>
		<input type="text" name="opencRootPath"
class="inpimport/tmpl/show.php000064400000004417151162050350010527
0ustar00<?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

echo
JText::sprintf('X_IMPORT_DESC','Redshop','Redshop').'
:<br/>';
$functions =
array('TAXATIONS','HIKA_CATEGORIES','PRODUCTS','PRICES','USERS','ORDERS','DOWNLOADS','FILES','HIKA_IMAGES','DISCOUNTS','COUPONS');
foreach($functions as $k => $v){
	echo '<br/>  - '.JText::_($v);
}

import/tmpl/show.php000064400000004417151162050350010527 0ustar00<?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');
?><div class="iframedoc"
id="iframedoc"></div>
<form action="index.php?option=<?php echo HIKASHOP_COMPONENT
?>" method="post"  name="adminForm"
id="adminForm" enctype="multipart/form-data">
	<fieldset class="adminform">
	<legend><?php echo JText::_( 'IMPORT' );
?></legend>
		<?php
		if(HIKASHOP_J30){
			echo JHTML::_('hikaselect.radiolist', $this->importValues,
'importfrom', 'class="inputbox" size="1"
onclick="updateImport(this.value);"', 'value',
'text','file',false,false,true);
		}else{
			echoimport/tmpl/textarea.php000064400000002444151162050350011362
0ustar00p has not been found in the database</small>';
		}elseif($data->key=='redshop' && !$this->reds){
			echo '<small style="color:red">Redshop has not been
found in the database</small>';
		}else{
			if(in_array($data->key,array('file','textarea','folder','vm','mijo','redshop','openc')))
include(dirname(__FILE__).DS.$data->key.'.php');
			else echo $data->data;
		}
		echo '</fieldset>';
		echo '</div>';
		}?>
	</div>
	<?php if(hikashop_level(2)){
			include(dirname(__FILE__).DS.'template.php');
		} ?>
	<input type="hidden" name="option"
value="<?php echo HIKASHOP_COMPONENT; ?>" />
	<input type="hidden" name="task" value=""
/>
	<input type="hidden" name="ctrl"
value="<?php echo JRequest::getCmd('ctrl'); ?>"
/>
	<?php echo JHTML::_( 'form.token' ); ?>
</form>
import/tmpl/textarea.php000064400000002444151162050350011362
0ustar00import/tmpl/vm.php000064400000001075151162050350010166
0ustar00t?>
</textarea>
<table class="admintable table" cellspacing="1">
	<tr>
		<td class="key" >
			<?php echo JText::_('UPDATE_PRODUCTS'); ?>
		</td>
		<td>
			<?php echo JHTML::_('hikaselect.booleanlist',
'textarea_update_products','',JRequest::getInt('textarea_update_products','1'));?>
		</td>
	</tr>
	<tr>
		<td class="key" >
			<?php echo JText::_('CREATE_CATEGORIES'); ?>
		</td>
		<td>
			<?php echo JHTML::_('hikaselect.booleanlist',
'textarea_create_categories','',JRequest::getInt('textarea_create_categories','1'));?>
		</td>
	</tr>
	<tr>
		<td climport/tmpl/template.php000064400000001651151162050350011357
0ustar00<?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
echo
JText::sprintf('X_IMPORT_DESC','Virtuemart','Virtuemart').'
:<br/>';
$functions =
array('TAXATIONS','HIKA_CATEGORIES','PRODUCTS','PRICES','USERS','ORDERS','DOWNLOADS','FILES','HIKA_IMAGES','DISCOUNTS','COUPONS');
foreach($functions as $k => $v){
	echo '<br/>  - '.JText::_($v);
}
limit/index.html000064400000000032151162050350007650 0ustar00<?php
/**
 * @package	Hilimit/tmpl/form.php000064400000016044151162050350010315
0ustar00limit/index.html000064400000000032151162050350007650
0ustar00<html><body></body></html>limit/tmpl/form.php000064400000016044151162050350010315
0ustar00<?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');
?><div class="iframedoc"
id="iframedoc"></div>
<div>
	<form action="index.php?option=<?php echo HIKASHOP_COMPONENT
?>&amp;ctrl=limit" method="post"
name="adminForm" id="adminForm"
enctype="multipart/form-data">
	<?php if(!HIKASHOP_BACK_RESPONSIVE) { ?>
	<div id="hikashop_limit_form">
		<table width="700px" class="table"
style="margin:auto">
			<tr>
				<td valign="top">
	<?php } else { ?>
	<div id="hikashop_limit_form"
class="row-fluid">
		<div class="span6">
	<?php } ?>
					<table class="admintable table">
						<tr>
							<td class="key">
									<?php echo JText::_( 'PERIOD' ); ?>
							</td>
							<td>
								<?php
								$values = array();
								$values[] = JHTML::_('select.option', 'cart',
JText::_('Cart'));
								$values[] = JHTML::_('select.option', 'daily',
JText::_('Daily'));
								$values[] = JHTML::_('select.option', 'weekly',
JText::_('Weekly'));
								$values[] = JHTML::_('select.option',
'monthly', JText::_('Monthly'));
								$values[] = JHTML::_('select.option',
'quarterly', JText::_('Quarterly'));
								$values[] = JHTML::_('select.option', 'yearly',
JText::_('Yearly'));
								$values[] = JHTML::_('select.option',
'forever', JText::_('Forever'));
								echo JHTML::_('select.genericlist', $values,
"data[limit][limit_periodicity]" ,
'class="inputbox" size="1"',
'value', 'text',
@$this->element->limit_periodicity );
								?>
							</td>
						</tr>
						<tr>
							<td class="key">
									<?php echo JText::_( 'HIKA_TYPE' ); ?>
							</td>
							<td>
								<?php echo
$this->type->display('data[limit][limit_type]',@$this->element->limit_type,true);
?>
							</td>
						</tr>
						<tr>
							<td class="key">
									<?php echo JText::_( 'VALUE' ); ?>
							</td>
							<td>
								<input type="text"
name="data[limit][limit_value]" value="<?php echo
$this->escape(@$this->element->limit_value); ?>" />
							</td>
						</tr>
						<tr>
							<td class="key">
									<?php echo JText::_( 'WEIGHT_SYMBOLS' ); ?>
							</td>
							<td>
								<?php echo
$this->unit->display('data[limit][limit_unit]',@$this->element->limit_unit,true);
?>
							</td>
						</tr>
						<tr>
							<td class="key">
									<?php echo JText::_( 'CURRENCY' ); ?>
							</td>
							<td>
								<?php echo
@$this->currency->display('data[limit][limit_currency_id]',@$this->element->limit_currency_id);
?>
							</td>
						</tr>
						<tr>
							<td class="key">
									<?php echo JText::_( 'HIKA_PUBLISHED' ); ?>
							</td>
							<td>
								<?php echo JHTML::_('hikaselect.booleanlist',
"data[limit][limit_published]" ,
'',@$this->element->limit_published	); ?>
							</td>
						</tr>
					</table>
	<?php if(!HIKASHOP_BACK_RESPONSIVE) { ?>
				</td>
				<td valign="top">
	<?php } else { ?>
		</div>
		<div class="span6">
	<?php } ?>
					<table class="admintable table">
						<tr>
							<td class="key">
									<?php echo JText::_( 'START_DATE' ); ?>
							</td>
							<td>
								<?php echo JHTML::_('calendar',
(@$this->element->limit_start?hikashop_getDate(@$this->element->limit_start,'%Y-%m-%d
%H:%M'):''),
'data[limit][limit_start]','limit_start','%Y-%m-%d
%H:%M',array('size'=>'20')); ?>
							</td>
						</tr>
						<tr>
							<td class="key">
									<?php echo JText::_( 'END_DATE' ); ?>
							</td>
							<td>
								<?php echo JHTML::_('calendar',
(@$this->element->limit_end?hikashop_getDate(@$this->element->limit_end,'%Y-%m-%d
%H:%M'):''),
'data[limit][limit_end]','limit_end','%Y-%m-%d
%H:%M',array('size'=>'20')); ?>
							</td>
						</tr>
						<tr>
							<td class="key">
									<?php echo JText::_( 'PRODUCT' ); ?>
							</td>
							<td>
								<span id="product_id" >
									<?php echo (int)@$this->element->limit_product_id.'
'.@$this->element->product_name; ?>
									<input type="hidden"
name="data[limit][limit_product_id]" value="<?php echo
@$this->element->limit_product_id; ?>" />
								</span>
								<a class="modal" rel="{handler:
'iframe', size: {x: 760, y: 480}}" href="<?php echo
hikashop_completeLink("product&task=selectrelated&select_type=limit",true
); ?>">
									<img src="<?php echo HIKASHOP_IMAGES;
?>edit.png" alt="edit"/>
								</a>
								<a href="#"
onclick="document.getElementById('product_id').innerHTML='<input
type=\'hidden\' name=\'data[limit][limit_product_id]\'
value=\'0\' />';return false;" >
									<img src="<?php echo HIKASHOP_IMAGES;
?>delete.png" alt="delete"/>
								</a>
							</td>
						</tr>
						<tr>
							<td class="key">
									<?php echo JText::_( 'CATEGORY' ); ?>
							</td>
							<td>
								<span id="changeParent" >
									<?php echo (int)@$this->element->limit_category_id.'
'.@$this->element->category_name; ?>
								</span>
								<input type="hidden"
id="categoryselectparentlisting"
name="data[limit][limit_category_id]" value="<?php echo
@$this->element->limit_category_id; ?>" />
								<a class="modal" rel="{handler:
'iframe', size: {x: 760, y: 480}}" href="<?php echo
hikashop_completeLink("category&task=selectparentlisting&control=category",true
); ?>">
									<img src="<?php echo HIKASHOP_IMAGES;
?>edit.png" alt="edit"/>
								</a>
								<a href="#"
onclick="document.getElementById('changeParent').innerHTML='0
<?php echo
$this->escape(Jlimit/tmpl/index.html000064400000000032151162050350010624
0ustar00ldset>
							</td>
				limit/tmpl/listing.php000064400000013344151162050350011023
0ustar00limit/tmpl/index.html000064400000000032151162050350010624
0ustar00<html><body></body></html>limit/tmpl/listing.php000064400000013344151162050350011023
0ustar00<?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');
?><div class="iframedoc"
id="iframedoc"></div>
<form action="index.php?option=<?php echo HIKASHOP_COMPONENT
?>&amp;ctrl=limit" method="post" 
name="adminForm" id="adminForm">
	<table>
		<tr>
			<td width="100%">
				<?php echo JText::_( 'FILTER' ); ?>:
				<input type="text" name="search"
id="search" value="<?php echo
$this->escape($this->pageInfo->search);?>"
class="text_area" />
				<button class="btn"
onclick="this.form.submit();"><?php echo JText::_(
'GO' ); ?></button>
				<button class="btn"
onclick="document.getElementById('search').value='';this.form.submit();"><?php
echo JText::_( 'RESET' ); ?></button>
			</td>
			<td nowrap="nowrap">
				<?php echo
$this->limit_type->display('limit_type',$this->pageInfo->filter->limit_type);
?>
			</td>
		</tr>
	</table>
	<table id="hikashop_limit_listing" class="adminlist
table table-striped" cellpadding="1">
		<thead>
			<tr>
				<th class="title titlenum">
					<?php echo JText::_( 'HIKA_NUM' );?>
				</th>
				<th class="title titlebox">
					<input type="checkbox" name="toggle"
value="" onclick="hikashop.checkAll(this);" />
				</th>
				<th class="title">
					<?php echo JHTML::_('grid.sort',
JText::_('HIKA_TYPE'), 'a.limit_type',
$this->pageInfo->filter->order->dir,$this->pageInfo->filter->order->value
); ?>
				</th>
				<th class="title">
					<?php echo JHTML::_('grid.sort',
JText::_('PRODUCT'), 'a.limit_product_id',
$this->pageInfo->filter->order->dir,$this->pageInfo->filter->order->value
); ?>
				</th>
				<th class="title">
					<?php echo JHTML::_('grid.sort',
JText::_('CATEGORY'), 'a.limit_category_id',
$this->pageInfo->filter->order->dir,$this->pageInfo->filter->order->value
); ?>
				</th>
				<th class="title">
					<?php echo JText::_('VALUE'); ?>
				</th>
				<th class="title">
					<?php echo JText::_('PERIOD'); ?>
				</th>
				<th class="title">
					<?php echo JHTML::_('grid.sort',
JText::_('START_DATE'), 'a.limit_start',
$this->pageInfo->filter->order->dir,$this->pageInfo->filter->order->value
); ?>
				</th>
				<th class="title">
					<?php echo JHTML::_('grid.sort',
JText::_('END_DATE'), 'a.limit_end',
$this->pageInfo->filter->order->dir,$this->pageInfo->filter->order->value
); ?>
				</th>
				<th class="title titletoggle">
					<?php echo JHTML::_('grid.sort',  
JText::_('HIKA_PUBLISHED'), 'a.limit_published',
$this->pageInfo->filter->order->dir,
$this->pageInfo->filter->order->value ); ?>
				</th>
				<th class="title">
					<?php echo JHTML::_('grid.sort',   JText::_(
'ID' ), 'a.limit_id',
$this->pageInfo->filter->order->dir,
$this->pageInfo->filter->order->value ); ?>
				</th>
			</tr>
		</thead>
		<tfoot>
			<tr>
				<td colspan="11">
					<?php echo $this->pagination->getListFooter(); ?>
					<?php echo $this->pagination->getResultsCounter(); ?>
				</td>
			</tr>
		</tfoot>
		<tbody>
			<?php
				$k = 0;
				for($i = 0,$a = count($this->rows);$i<$a;$i++){
					$row =& $this->rows[$i];
					$publishedid = 'limit_published-'.$row->limit_id;
			?>
				<tr class="<?php echo "row$k"; ?>">
					<td align="center">
					<?php echo $this->pagination->getRowOffset($i); ?>
					</td>
					<td align="center">
						<?php echo JHTML::_('grid.id', $i, $row->limit_id );
?>
					</td>
					<td>
						<?php if($this->manage){ ?>
							<a href="<?php echo
hikashop_completeLink('limit&task=edit&cid[]='.$row->limit_id);
?>">
						<?php }
						echo $row->limit_type;
						if($this->manage){ ?>
							</a>
						<?php } ?>
					</td>
					<td align="center">
						<?php
							if(empty($row->product_name)) {
								echo '';
							} else {
								echo $row->product_name;
							}
						?>
					</td>
					<td align="center">
						<?php
							if(empty($row->category_name)) {
								echo '';
							} else {
								echo $row->category_name;
							}
						?>
					</td>
					<td align="center">
						<?php
							if( $row->limit_type == 'price' ) {
								echo
$this->currencyHelper->displayPrices(array($rlimit/view.html.php000064400000020404151162050350010306
0ustar00,$row->limit_published); } ?>
					</td>
					<td width="1%" align="center">
						<?php echo $row->limit_id; ?>
					</td>
				</tr>
			<?php
					$k = 1-$k;
				}
			?>
		</tbody>
	</table>
	<input type="hidden" name="option"
value="<?php echo HIKASHOP_COMPONENT; ?>" />
	<input type="hidden" name="task" value=""
/>
	<input type="hidden" name="ctrl"
value="<?php echo JRequest::getCmd('ctrl'); ?>"
/>
	<input type="hidden" name="boxchecked"
value="0" />
	<input type="hidden" name="filter_order"
value="<?php echo
$this->pageInfo->filter->order->value; ?>" />
	<input type="hidden" name="filter_order_Dir"
value="<?php echo $this->pageInfo->filter->order->dir;
?>" />
	<?php echo JHTML::_( 'form.token' ); ?>
</form>
limit/view.html.php000064400000020404151162050350010306 0ustar00<?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 LimitViewLimit extends hikashopView{
	var $type = '';
	var $ctrl= 'limit';
	var $nameListing = 'LIMIT';
	var $nameForm = 'LIMIT';
	var $icon = 'limit';

	function display($tpl = null){
		$this->paramBase =
HIKASHOP_COMPONENT.'.'.$this->getName();
		$function = $this->getLayout();
		if(method_exists($this,$function)) $this->$function();
		parent::display($tpl);
	}

	function listing(){
		$app = JFactory::getApplication();
		$pageInfo = new stdClass();
		$pageInfo->filter = new stdClass();
		$pageInfo->filter->order = new stdClass();
		$pageInfo->limit = new stdClass();
		$pageInfo->filter->order->value =
$app->getUserStateFromRequest(
$this->paramBase.".filter_order",
'filter_order',	'a.limit_id','cmd' );
		$pageInfo->filter->order->dir	=
$app->getUserStateFromRequest(
$this->paramBase.".filter_order_Dir",
'filter_order_Dir',	'desc',	'word' );
		$pageInfo->search = $app->getUserStateFromRequest(
$this->paramBase.".search", 'search', '',
'string' );
		$pageInfo->search = JString::strtolower( $pageInfo->search );
		$pageInfo->filter->limit_type = $app->getUserStateFromRequest(
$this->paramBase.".limit_type",'limit_type','','string');
		$pageInfo->limit->value = $app->getUserStateFromRequest(
$this->paramBase.'.list_limit', 'limit',
$app->getCfg('list_limit'), 'int' );
		if(empty($pageInfo->limit->value)) $pageInfo->limit->value =
500;
		$pageInfo->limit->start = $app->getUserStateFromRequest(
$this->paramBase.'.limitstart', 'limitstart', 0,
'int' );
		$database	= JFactory::getDBO();
		$searchMap = array('a.limit_id');
		$filters = array();
		if(!empty($pageInfo->search)){
			$searchVal =
'\'%'.hikashop_getEscaped($pageInfo->search,true).'%\'';
			$filters[] = implode(" LIKE $searchVal OR ",$searchMap)."
LIKE $searchVal";
		}

		$query = ' FROM '.hikashop_table('limit').' AS
a';
		if(!empty($pageInfo->filter->limit_type)){
			switch($pageInfo->filter->limit_type){
				case 'all':
					break;
				default:
					$filters[] = 'a.limit_type =
'.$database->Quote($pageInfo->filter->limit_type);
					break;
			}
		}
		if(!empty($filters)){
			$query.= ' WHERE ('.implode(') AND
(',$filters).')';
		}
		if(!empty($pageInfo->filter->order->value)){
			$query .= ' ORDER BY
'.$pageInfo->filter->order->value.'
'.$pageInfo->filter->order->dir;
		}
		$database->setQuery('SELECT
a.*'.$query,$pageInfo->limit->start,$pageInfo->limit->value);
		$rows = $database->loadObjectList();
		if(!empty($pageInfo->search)){
			$rows =
hikashop_search($pageInfo->search,$rows,'limit_id');
		}
		$database->setQuery('SELECT count(*)'.$query );
		$pageInfo->elements = new stdClass();
		$pageInfo->elements->total = $database->loadResult();
		$pageInfo->elements->page = count($rows);

		if($pageInfo->elements->page){
			$productIds = array();
			$categoryIds = array();
			$zoneIds = array();
			foreach($rows as $row){
				if(!empty($row->limit_product_id)) $productIds[] =
$row->limit_product_id;
				if(!empty($row->limit_category_id)) $categoryIds[] =
$row->limit_category_id;
			}
			if(!empty($productIds)){
				$query = 'SELECT * FROM
'.hikashop_table('product').' WHERE product_id IN
('.implode(',',$productIds).')';
				$database->setQuery($query);
				$products = $database->loadObjectList();
				foreach($rows as $k => $row){
					if(!empty($row->limit_product_id)){
						$found = false;
						foreach($products as $product){
							if($product->product_id==$row->limit_product_id){
								foreach(get_object_vars($product) as $field => $value){
									$rows[$k]->$field = $product->$field;
								}
								$found = true;
							}
						}
						if(!$found){
							$rows[$k]->product_name=JText::_('PRODUCT_NOT_FOUND');
						}
					}
				}
			}
			if(!empty($categoryIds)){
				$query = 'SELECT * FROM
'.hikashop_table('category').' WHERE category_id IN
('.implode(',',$categoryIds).')';
				$database->setQuery($query);
				$categories = $database->loadObjectList();
				foreach($rows as $k => $row){
					if(!empty($row->limit_category_id)){
						$found = false;
						foreach($categories as $category){
							if($category->category_id==$row->limit_category_id){
								foreach(get_object_vars($category) as $field => $value){
									$rows[$k]->$field = $category->$field;
								}
								$found = true;
							}
						}
						if(!$found){
							$rows[$k]->category_name=JText::_('CATEGORY_NOT_FOUND');
						}
					}
				}
			}
		}

		if($pageInfo->limit->value == 500) $pageInfo->limit->value =
0;

		hikashop_setTitle(JText::_($this->nameListing),$this->icon,$this->ctrl);

		$config =& hikashop_config();
		$manage =
hikashop_isAllowed($config->get('acl_limit_manage','all'));
		$this->assignRef('manage',$manage);
		$this->toolbar = array(
			array('name'=>'addNew','display'=>$manage),
			array('name'=>'editList','display'=>$manage),
			array('name'=>'deleteList','display'=>hikashop_isAllowed($config->get('acl_limit_delete','all'))),
			'|',
			array('name' => 'pophelp', 'target'
=> $this->ctrl.'-listing'),
			'dashboard'
		);

		$limitType = hikashop_get('type.limit');
		$this->assignRef('limit_type',$limitType);

		$weightType = hikashop_get('type.weight');
		$this->assignRef('limit_unit',$weightType);

		$toggleClass = hikashop_get('helper.toggle');
		$this->assignRef('toggleClass',$toggleClass);
		$this->assignRef('rows',$rows);
		$this->assignRef('pageInfo',$pageInfo);
		$this->getPagination();

		$currencyHelper = hikashop_get('class.currency');
		$this->assignRef('currencyHelper',$currencyHelper);
	}

	function form(){
		$limit_id = hikashop_getCID('limit_id',false);
		if(!empty($limit_id)){
			$class = hikashop_get('class.limit');
			$element = $class->get($limit_id);
			$task='edit';
		}else{
			$element = JRequest::getVar('fail');
			if(empty($element)){
				$element = new stdClass();
				$app = JFactory::getApplication();
				$type = $app->getUserState(
$this->paramBase.".filter_type");
				if(!in_array($type,array('all','nochilds'))){
					$element->limit_type = $type;
				}else{
					$element->limit_type = 'limit';
				}
				$element->limit_published=1;
				$element->limit_status =
array('created','confirmed','shipped');
			}
			$task='add';
		}
		$database = JFactory::getDBO();
		if(!empty($element->limit_product_id)){
			$query = 'SELECT * FROM
'.hikashop_table('product').' WHERE product_id =
'.(int)$element->limit_product_id;
			$database->setQuery($query);
			$product = $database->loadObject();
			if(!empty($product)){
				foreach(get_object_vars($product) as
$kmassaction/index.html000064400000000032151162050350010673 0ustar00 =
array(
			'save',
			massaction/tmpl/cell.php000064400000002422151162050350011307
0ustar00massaction/index.html000064400000000032151162050350010673
0ustar00<html><body></body></html>massaction/tmpl/cell.php000064400000002422151162050350011307
0ustar00massaction/tmpl/editcell.php000064400000033572151162050350012167
0ustar00 as $id){
			foreach($this->params->elements as $element){
				if(isset($element->$table_id) && $element->$table_id ==
$id){
					echo
$massaction->displayByType($this->params->types,$element,$this->params->column).'<br/>';
				}elseif(!empty($element)){
					foreach($element as $elem){
						if(!is_array($elem)){continue;}
						foreach($elem as $data){
							if(count($this->params->ids) < 2 ||
(isset($data->$table_id) && $data->$table_id == $id)){
								echo
$massaction->displayByType($this->params->types,$data,$this->params->column).'<br/>';
							}
						}
					}
				}
			}
		}
	}else if(!isset($this->params->data_id)){
		echo $this->params->column;
	}else{
		echo JText::_( 'LOADING' );
	}
?>
<?php echo JHTML::_( 'form.token' ); ?>
<?php exit;
massaction/tmpl/editcell.php000064400000033572151162050350012167
0ustar00<?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
$id_td = '';
if(isset($this->ids)){
	$id_td =
$this->tab_id.'_'.$this->data_id.'_'.$this->table.'_'.$this->column;
	echo '<div class="massaction-edition">
			<a onclick="var target =
document.getElementById(\''.$id_td.'\'); if(target.rel
==
\'edit\'){onEditSquare(\'save\',target,\''.$this->table.'_'.$this->column.'\',\''.$this->data_id.'\',\''.$this->table.'\',\''.$this->tab_id.'\');}">
				<img src="../media/com_hikashop/images/ok.png" alt>
				<span>Save</span>
			</a>
			<a onclick="var target =
document.getElementById(\''.$id_td.'\'); if(target.rel
==
\'edit\'){onEditSquare(\'cancel\',target,\''.$this->table.'_'.$this->column.'\',\''.$this->data_id.'\',\''.$this->table.'\',\''.$this->tab_id.'\');}">
				<img src="../media/com_hikashop/images/cancel.png"
alt>
				<span>Cancel</span>
			</a>
		</div>';
}else if(!isset($this->ids)){
	$id_td =
$this->tab_id.'_'.$this->table.'_'.$this->column;
	echo '<div>
			<a onclick="var target =
document.getElementById(\''.$id_td.'\'); if(target.rel
==
\'edit\'){onEditColumn(\'save\',target,\''.$this->table.'\',\''.$this->column.'\',\''.$this->tab_id.'\');}">
				<img src="../media/com_hikashop/images/ok.png" alt>
				<span>Save</span>
			</a>
			<a ="var target =
document.getElementById(\''.$id_td.'\'); if(target.rel
==
\'edit\'){onEditColumn(\'cancel\',target,\''.$this->table.'\',\''.$this->column.'\',\''.$this->tab_id.'\');}">
				<img src="../media/com_hikashop/images/cancel.png"
alt>
				<span>Cancel</span>
			</a>
		</div>';
}

switch($this->type){
	case 'text':
		if(isset($this->ids)){
			$column = $this->column;
			$column_id = $this->table.'_id';
			foreach($this->rows as $row){
				$name =
'hikashop[values]['.$row->$column_id.']';
				$params =
array('name'=>$name,'value'=>$row->$column);
				echo $this->displayField('textarea',$params);
			}

		}else if(!isset($this->ids)){
			$name = 'hikashop[values][column]';
			$params =
array('name'=>$name,'value'=>'');
			echo $this->displayField('textarea',$params);
		}

		break;

	case 'custom_text' :
	case 'custom_singledropdown':
	case 'custom_textarea':
	case 'custom_radio':
	case 'custom_checkbox':
	case 'custom_multipledropdown':
	case 'custom_file':
	case 'custom_image':
		$column = $this->column;
		$column_id = $this->table.'_id';
		$cpt = 0;
		if(isset($this->ids)){
			foreach($this->rows as $row){
				$cpt++;
				foreach($this->elements as $element){
					if($element->$column_id == $row->$column_id){
						foreach($this->allFields as $allfields){
							if($allfields['id'] == $element->$column_id){
								$name =
'hikashop[values]['.$row->$column_id.']';
								$params = array(&$allfields[$column],$row->$column,$name);
								$this->fields->prefix = $cpt;
								$this->fields->suffix = $id_td;
								$params =
array('class'=>$this->fields,'params'=>$params);
								echo $this->displayField('custom',$params);
							}
						}
					}
				}
			}
		}else if(!isset($this->ids)){
		}
		break;
	case 'custom_zone':
		$column = $this->column;
		$column_id = $this->table.'_id';
		$cpt = 0;
		if(isset($this->ids)){
			foreach($this->rows as $row){
				$cpt++;
				foreach($this->elements as $element){
					if($element->$column_id == $row->$column_id){
						foreach($this->allFields as $allfields){
							if($allfields['id'] == $element->$column_id){
								$name =
'hikashop[values]['.$row->$column_id.']';
								$params =
array(&$allfields[$column],$row->$column,$name,false,'',false,$allfields,$element);
								$this->fields->prefix = $cpt;
								$this->fields->suffix = $id_td;
								$params =
array('class'=>$this->fields,'params'=>$params);
								echo
str_replace(array('field_namekey=address_state','field_type=address'),array('field_namekey='.$row->$column_id,'field_type=values'),$this->displayField('custom',$params));
							}
						}
					}
				}
			}
		}else if(!isset($this->ids)){
		}
		break;


	case 'joomla_users':
		if(isset($this->ids)){
			$column = $this->column;
			$column_id = $this->table.'_id';
			foreach($this->rows as $row){
				$name =
'hikashop[values]['.$row->$column_id.']';
				$params =
array('name'=>$name,'value'=>$row->$column);
				echo $this->displayField('textarea',$params);
			}
		}else if(!isset($this->ids)){
			$name = 'hikashop[values][column]';
			$params =
array('name'=>$name,'value'=>'');
			echo $this->displayField('textarea',$params);
		}
		break;

	case 'weight':
	case 'dimension':
	case 'price':
		if(isset($this->ids)){
			$column = $this->column;
			$column_id = $this->table.'_id';
			foreach($this->rows as $row){
				$name =
'hikashop[values]['.$row->$column_id.']';
				$params =
array('name'=>$name,'value'=>$row->$column);
				echo $this->displayField('input',$params);
			}
		}else if(!isset($this->ids)){
			$name = 'hikashop[values][column]';
			$params =
array('name'=>$name,'value'=>'');
			echo $this->displayField('input',$params);
		}
		break;

	case 'dimension_unit':
		if(isset($this->ids)){
			$column = $this->column;
			$column_id = $this->table.'_id';
			$cpt = 0;
			foreach($this->rows as $row){
				$cpt++;
				$name =
'hikashop[values]['.$row->$column_id.']';
				$params =
array($name,$row->product_dimension_unit,'dimension',$cpt.$id_td);
				$params =
array('class'=>$this->volume,'params'=>$params);
				echo $this->displayField('custom',$params);
			}
		}else if(!isset($this->ids)){
			$name = 'hikashop[values][column]';
			$params = array($name,0,'dimension',$id_td);
			$params =
array('class'=>$this->volume,'params'=>$params);
			echo $this->displayField('custom',$params);
		}
		break;

	case 'weight_unit':
		if(isset($this->ids)){
			$column = $this->column;
			$column_id = $this->table.'_id';
			$cpt = 0;
			foreach($this->rows as $row){
				$cpt++;
				$name =
'hikashop[values]['.$row->$column_id.']';
				$params = array($name,$row->product_weight_unit,$cpt.$id_td);
				$params =
array('class'=>$this->weight,'params'=>$params);
				echo $this->displayField('custom',$params);
			}
		}else if(!isset($this->ids)){
			$name = 'hikashop[values][column]';
			$params = array($name,0,$id_td);
			$params =
array('class'=>$this->weight,'params'=>$params);
			echo $this->displayField('custom',$params);
		}
		break;

	case 'currency':
		$column = $this->column;
		$column_id = $this->table.'_id';
		$cpt = 0;
		if(isset($this->ids)){
			foreach($this->rows as $row){
				$cpt++;
				$name =
'hikashop[values]['.$row->$column_id.']';
				$params =
array($name,$row->$column,'size="1"',$cpt.$id_td);
				$params =
array('class'=>$this->types,'params'=>$params);
				echo $this->displayField('custom',$params);
			}
		}else if(!isset($this->ids)){
			$name = 'hikashop[values][column]';
			$params = array($name,0,'size="1"',$id_td);
			$params =
array('class'=>$this->types,'params'=>$params);
			echo $this->displayField('custom',$params);
		}
		break;

	case 'layout':
		if(isset($this->ids)){
			$column = $this->column;
			$column_id = $this->table.'_id';
			$cpt=0;
			foreach($this->rows as $row){
				$cpt++;
				$js = '';
				if(empty($row->$column)){
					$row->$column = 'inherit';
				}
				$name =
'hikashop[values]['.$row->$column_id.']';
				$params = array($name,$row->$column,&$js,false,$cpt.$id_td);
				$params =
array('class'=>$this->layout,'params'=>$params);
				echo $this->displayField('custom',$params);
			}
		}else if(!isset($this->ids)){
		}
		break;

	case 'status':
		if(isset($this->ids)){
			$column = $this->column;
			$column_id = $this->table.'_id';
			$cpt=0;
			foreach($this->rows as $row){
				$cpt++;
				$name =
'hikashop[values]['.$row->$column_id.']';
				$params = array($name,$row->$column,true,true,$cpt.$id_td);
				$params =
array('class'=>$this->status,'params'=>$params);
				echo $this->displayField('custom',$params);
				echo '<INPUT type="checkbox"
name="checkbox"
value="notification">'.JText::_( 'NOTIFICATION'
);
				echo '<br/>';
			}
		}else if(!isset($this->ids)){
			$name = 'hikashop[values][column]';
			$params = array($name,0,true,true,$id_td);
			$params =
array('class'=>$this->status,'params'=>$params);
			echo $this->displayField('custom',$params);
		}
		break;

	case 'yesno':
		if(isset($this->ids)){
			$column = $this->column;
			$column_id = $this->table.'_id';
			$cpt=0;
			foreach($this->rows as $row){
				$cpt++;
				echo JHTML::_('hikaselect.booleanlist',
'hikashop[values]['.$row->$column_id.']',
'',@$row->$column);
				if(HIKASHOP_J30){
					echo '<script type="text/javascript">
(function($){
	$(".radio.btn-group label").addClass("btn");
	$(".btn-group label:not(.active)").click(function() {
			var label = $(this);
			var input = $("#" + label.attr(\'for\'));

			if (!input.prop(\'checked\')) {
				label.closest(\'.btn-group\').find("label").removeClass(\'active
btn-success btn-danger btn-primary\');
				if (input.val() == "") {
					label.addClass("active btn-primary");
				} else if (input.val() == 0) {
					label.addClass("active btn-danger");
				} else {
					label.addClass("active btn-success");
				}
				input.prop("checked", true);
			}
		});
		$(".btn-group input[checked=checked]").each(function() {
			if ($(this).val() == "") {
				$("label[for=" + $(this).attr(\'id\') +
"]").addClass(\'active btn-primary\');
			} else if ($(this).val() == 0) {
				$("label[for=" + $(this).attr(\'id\') +
"]").addClass(\'active btn-danger\');
			} else {
				$("label[for=" + $(this).attr(\'id\') +
"]").addClass(\'active btn-success\');
			}
		});
})(jQuery);
</script>';
				}
				echo '<br/>';
			}
		}else if(!isset($this->ids)){
		}

		break;

	case 'date':
		if(isset($this->ids)){
			$column = $this->column;
			$column_id = $this->table.'_id';

			foreach($this->rows as $row){
				$name =
'hikashop[values]['.$row->$column_id.']';
				$params =
array('name'=>$name,'id'=>$row->$column_id,'value'=>$row->$column);
				echo $this->displayField('date',$params);
			}
		}else if(!isset($this->ids)){
			$name = 'hikashop[values][column]';
			$params =
array('name'=>$name,'id'=>0,'value'=>'');
			echo $this->displayField('date',$params);
		}

		break;

	case 'parent':
		if(isset($this->ids)){
			$column_id = $this->table.'_id';
			$column_name = $this->table.'_name';

			foreach($this->ids as $id){
				$name = 'hikashop[values]['.$id.']';
				$params =
array('name'=>$name,'type'=>$this->type,'rows'=>$this->rows,'id'=>$id,'column_id'=>$column_id,'columns'=>array($column_id,$column_name));
				echo $this->displayField('dropdawn',$params);
			}
		}else if(!isset($this->ids)){
		}

		break;

	case 'usergroups':
		if(isset($this->ids)){
			$column_id = $this->table.'_id';
			$column_name = 'title';

			foreach($this->ids as $id){
				$name = 'hikashop[values]['.$id.']';
				$params =
array('name'=>$name,'type'=>$this->type,'rows'=>$this->rows,'id'=>$id,'column_id'=>$column_id,'columns'=>array($column_id,$column_name));
				echo $this->displayField('dropdawn',$params);
			}
		}else if(!isset($this->ids)){
		}
		break;

	case 'related':
		if(isset($this->ids)){
			$column_id = 'related_id';
			$column_name = 'product_name';

			foreach($this->ids as $id){
				$name = 'hikashop[values]['.$id.']';
				$params =
array('name'=>$name,'type'=>$this->type,'rows'=>$this->rows,'id'=>$id,'column_id'=>$column_id,'columns'=>array($column_id,$column_name));
				echo $this->displayField('dropdawn',$params);
			}
		}else if(!isset($this->ids)){
		}
		break;

	case 'options':
		if(isset($this->ids)){
			$column_id = 'options_id';
			$column_name = 'product_name';

			foreach($this->ids as $id){
				$name = 'hikashop[values]['.$id.']';
				$params =
array('name'=>$name,'type'=>$this->type,'rows'=>$this->rows,'id'=>$id,'column_id'=>$column_id,'columns'=>array($column_id,$column_name));
				echo $this->displayField('dropdawn',$params);
			}
		}else if(!isset($this->ids)){
		}
		break;

	case 'method_name':
		if(isset($this->ids)){
			$column_id = $this->table.'_id';
			$column_name = $this->table.'_name';
			$column_type = $this->table.'_type';

			foreach($this->ids as $id){
				$name = 'hikashop[values]['.$id.']';
				$params =
array('namassaction/tmpl/form.php000064400000037405151162050350011344
0ustar00me'=>$name);
						echo $this->displayField('dropdawn',$params);
					}
				}
			}
		}else if(!isset($this->ids)){
		}
		break;

	case 'sub_id':
	case 'id':
		if(isset($this->ids)){
			$column = $this->column;
			$column_name = $this->table.'_name';
			foreach($this->ids as $id){
				$name = 'hikashop[values]['.$id.']';
				$params =
array('type'=>$this->type,'rows'=>$this->rows,'id'=>$id,'name'=>$name,'column_id'=>$column,'columns'=>array($column,$column_name));
				echo $this->displayField('dropdawn',$params);
			}
		}else if(!isset($this->ids)){
		}
		break;

	default:
		if(!isset($this->dispatcher)){
			JPluginHelper::importPlugin('hikashop');
			$this->dispatcher = JDispatcher::getInstance();
		}
		$this->dispatcher->trigger('onDisplayEditionSquaredMassAction'.$this->type,array(&$this));
		break;
}
?>

<?php echo JHTML::_( 'form.token' );
massaction/tmpl/form.php000064400000037405151162050350011344
0ustar00<?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');
?><div class="iframedoc"
id="iframedoc"></div>
<?php echo $this->html_results; ?>
<?php foreach($this->tables as $table){ ?>
<div id="hikabase_<?php echo $table->table;
?>_massactions" style="display:none">
	<div id="<?php echo $table->table;
?>_triggers_original">
		<?php echo JHTML::_('select.genericlist',
$table->typevaluesTriggers,
"trigger[".$table->table."][type][__num__]",
'class="inputbox chzn-done not-processed" size="1"
onchange="updateMassAction(\'trigger\',\''.$table->table.'\',__num__);
refreshSelect(\''.$table->table.'\',\'trigger\',
__num__) "', 'value',
'text','trigger'.$table->table.'__num__');
				echo '<span><a style="cursor:  pointer;"
onClick="selectTrigger=document.getElementById(\'trigger'.$table->table.'type__num__\')
;selectTrigger.options[0].selected=\'selected\';
document.getElementById(\''.$table->table.'trigger__num__\').style.display=\'none\';
numTriggers[\''.$table->table.'\']--;"
><img src="'.HIKASHOP_IMAGES.'delete2.png"
style="margin:0px 0px 0px
3px;"/></a></span>';?>
		<div class="hikamassactionarea" id="<?php echo
$table->table; ?>triggerarea___num__"></div>
	</div>
	<?php echo implode('',$table->triggers_html); ?>
	<div id="<?php echo $table->table;
?>_filters_original">
		<?php echo JHTML::_('select.genericlist',
$table->typevaluesFilters,
"filter[".$table->table."][type][__num__]",
'class="inputbox chzn-done not-processed" size="1"
onchange="updateMassAction(\'filter\',\''.$table->table.'\',__num__);countresults(\''.$table->table.'\',__num__);
refreshSelect(\''.$table->table.'\',\'filter\',
__num__) "', 'value',
'text','filter'.$table->table.'__num__');
				echo '<span><a style="cursor:  pointer;"
onClick="selectFilter=document.getElementById(\'filter'.$table->table.'type__num__\')
;selectFilter.options[0].selected=\'selected\';updateMassAction(\'filter\',\''.$table->table.'\',__num__);
document.getElementById(\''.$table->table.'filter__num__\').style.display=\'none\';
numFilters[\''.$table->table.'\']--;"
><img src="'.HIKASHOP_IMAGES.'delete2.png"
style="margin:0px 0px 0px
3px;"/></a></span>'; ?>
		<span id="<?php echo $table->table;
?>countresult___num__"></span>
		<div class="hikamassactionarea" id="<?php echo
$table->table; ?>filterarea___num__"></div>
	</div>
	<?php echo implode('',$table->filters_html); ?>
	<div id="<?php echo $table->table;
?>_actions_original">
		<?php echo JHTML::_('select.genericlist',
$table->typevaluesActions,
"action[".$table->table."][type][__num__]",
'class="inputbox chzn-done not-processed not-processed"
size="1"
onchange="updateMassAction(\'action\',\''.$table->table.'\',__num__);
refreshSelect(\''.$table->table.'\',\'action\',
__num__) "', 'value',
'text','action'.$table->table.'__num__');
				echo '<span><a style="cursor:  pointer;"
onClick="selectAction=document.getElementById(\'action'.$table->table.'type__num__\')
;selectAction.options[0].selected=\'selected\';updateMassAction(\'action\',\''.$table->table.'\',__num__);
document.getElementById(\''.$table->table.'action__num__\').style.display=\'none\';
numActions[\''.$table->table.'\']--;"
><img src="'.HIKASHOP_IMAGES.'delete2.png"
style="margin:0px 0px 0px
3px;"/></a></span>';?>
		<div class="hikamassactionarea" id="<?php echo
$table->table; ?>actionarea___num__"></div>
	</div>
	<?php echo implode('',$table->actions_html); ?>
</div>
<?php } ?>
<form action="index.php?option=<?php echo HIKASHOP_COMPONENT
?>&ctrl=massaction" method="post"
autocomplete="off" enctype="multipart/form-data"
name="adminForm" id="adminForm">
<?php
	if(JRequest::getCmd('tmpl') == 'component'){
		if(empty($this->data_id)){
			hikashop_display(JText::_('PLEASE_SELECT_'.strtoupper($this->data_table)),'warning');
			return;
		}
?>
	<input type="hidden" name="data_id"
value="<?php echo $this->data_id; ?>" />
	<input type="hidden" name="tmpl"
value="component" />
	<fieldset>
		<div class="hikaheader icon-48-hikaaction"
style="float: left;"><?php echo
JText::_('ACTIONS'); ?></div>
		<div class="toolbar" id="toolbar"
style="float: right;">
			<table><tr>
			<td><a onclick="javascript:if(confirm('<?php echo
JText::_('PROCESS_CONFIRMATION',true);?>')){submitbutton('process');}
return false;" href="#" ><span
class="icon-32-process" title="<?php echo
JText::_('PROCESS',true); ?>"></span><?php
echo JText::_('PROCESS'); ?></a></td>
			</tr></table>
		</div>
	</fieldset>
<?php
	}else{

		$this->massaction_name_input =
"data[massaction][massaction_name]";
		$this->massaction_description_input =
"data[massaction][massaction_description]";
		if($this->translation){
			$this->setLayout('translation');
		}else{
			$this->setLayout('normal');
		}
		echo $this->loadTemplate();
	?>
	<table class="admintable table" width="100%">
		<tr>
			<td class="key">
				<label for="data[banner][massaction_published]">
					<?php echo JText::_( 'HIKA_PUBLISHED' ); ?>
				</label>
			</td>
			<td>
				<?php echo JHTML::_('hikaselect.booleanlist',
"data[massaction][massaction_published]" ,
'',@$this->element->massaction_published); ?>
			</td>
		</tr>
	</table>
	<?php } ?>
	<fieldset class="adminform">
		<legend><?php echo JText::_( 'DATA' );
?></legend>
<?php
		if(!empty($this->tables)) {
			if(HIKASHOP_J30){
				echo JHTML::_('hikaselect.radiolist', $this->tables,
'data[massaction][massaction_table]',
'class="inputbox" size="1"
onclick="updateData(this.value);"', 'value',
'text',$this->element->massaction_table,false,false);
			}else{
				echo JHTML::_('hikaselect.radiolist', $this->tables,
'data[massaction][massaction_table]',
'class="inputbox" size="1"
onclick="updateData(this.value);"', 'value',
'text',$this->element->massaction_table);
			}
		} else {
			echo JText::_('ERR_NO_MASSACTION_TABLES');
		}
?>
	</fieldset>
	<div>
	<?php foreach($this->tables as $table){ ?>
		<div id="<?php echo $table->table; ?>"<?php
if($table->table != $this->element->massaction_table) echo '
style="display:none"'; ?>>
			<fieldset class="adminform">
				<legend><?php echo $table->text; ?></legend>
				<fieldset class="adminform" >
					<legend><?php echo JText::_('TRIGGERS');
?></legend>
					<div id="all<?php echo $table->table;
?>triggers">
<?php
				$count = 0;
				if(!empty($this->loadedData->massaction_triggers) &&
count($this->loadedData->massaction_triggers) != 0 &&
$table->table == $this->loadedData->massaction_table){
					$count = count($this->loadedData->massaction_triggers);
					foreach($this->loadedData->massaction_triggers as $k =>
$triggers){
						if(!empty($triggers->name) &&
$this->loadedData->massaction_table == $table->table){
							echo '<div
id="'.$table->table.'trigger'.$k.'"
class="plugarea">';
							$min = array_keys($this->loadedData->massaction_triggers);
							if($k > $min[0]) echo JText::_('HIKA_AND').'
';
							echo JHTML::_('select.genericlist',
$table->typevaluesTriggers,
'trigger['.$table->table.'][type]['.$k.']',
'class="inputbox chzn-done not-processed" size="1"
onchange="updateMassAction(\'trigger\',\''.$table->table.'\','.$k.');"',
'value', 'text',$triggers->name);
							echo '<span><a style="cursor:pointer;"
onClick="selectTrigger=document.getElementById(\'trigger'.$table->table.'type'.$k.'\')
;selectTrigger.options[0].selected=\'selected\';
document.getElementById(\''.$table->table.'trigger'.$k.'\').style.display=\'none\';numTriggers[\''.$table->table.'\']--;"
><img src="'.HIKASHOP_IMAGES.'delete2.png"
style="margin:0px 0px 0px
3px;"/></a></span>';
							echo '</div>';
						}
					}
				}else{
					echo '<div
id="'.$table->table.'trigger0"
class="plugarea">';
					echo JHTML::_('select.genericlist',
$table->typevaluesTriggers,
"trigger[".$table->table."][type][0]",
'class="inputbox chzn-done not-processed" size="1"
onchange="updateMassAction(\'trigger\',\''.$table->table.'\',0);"',
'value', 'text');
					echo '<span><a style="cursor:pointer;"
onClick="selectTrigger=document.getElementById(\'trigger'.$table->table.'type0\')
;selectTrigger.options[0].selected=\'selected\';
document.getElementById(\''.$table->table.'trigger0\').style.display=\'none\';numTriggers[\''.$table->table.'\']--;"
><img src="'.HIKASHOP_IMAGES.'delete2.png"
style="margin:0px 0px 0px
3px;"/></a></span>';
					echo '</div>';
				}
				if(HIKASHOP_J30){
					for($i=0;$i<=$count;$i++){
						?> <script
type="text/javascript">jQuery("#<?php echo
$table->table; ?>trigger<?php echo $i; ?>
.not-processed").removeClass("not-processed").removeClass("chzn-done").chosen();
</script><?php
					}
				}
				echo '</div><button class="btn"
onclick="addHikaMassAction(\''.$table->table.'\',\'trigger\');
refreshSelect(\''.$table->table.'\',\'trigger\'
,-1) ;return
false;">'.JText::_('ADD_TRIGGER').'</button>
				</fieldset>
				<fieldset class="adminform" >
					<legend>'.JText::_( 'FILTERS'
).'</legend>
					<div
id="all'.$table->table.'filters">';
				$count = 0;
				$key = 0;
				if(!empty($this->loadedData->massaction_filters) &&
count($this->loadedData->massaction_filters) != 1 &&
$table->table == $this->loadedData->massaction_table){
					$count = count($this->loadedData->massaction_filters);

					$exist = 0;
					foreach($this->loadedData->massaction_filters as $k =>
$filter){
						if(!empty($filter->name) &&
$this->loadedData->massaction_table == $table->table){
							if($filter->name == 'limit')
								$exist = 1;
						}
					}

					if(!$exist){
						if(!isset($this->loadedData->massaction_filters[0])) $key = 0;
						else $key = ++$count;
						$count += 1;

						$value = new stdClass();
						$value->name = 'limit';
						$value->type = $table->table;
						if(!isset($value->data['start']))
$value->data['start'] = 0;
						if(!isset($value->data['value']))
$value->data['value'] = 500;
						echo '<input type="hidden"
name="filter['.$table->table.'][type]['.$key.']"
value="limit"/>';
						echo '<div
id="'.$table->table.'filter'.$key.'"
class="plugarea">';
						echo '<div
id="'.$table->table.'filter'.$key.'limit">'.JText::_('HIKA_START').'
: <input type="text"
name="filter['.$table->table.']['.$key.'][limit][start]"
value="'.$value->data['start'].'" />
'.JText::_('VALUE').' : <input type="text"
name="filter['.$table->table.']['.$key.'][limit][value]"
value="'.$value->data['value'].'"/>'.'</div>';
						echo '</div>';
					}

					foreach($this->loadedData->massaction_filters as $k =>
$filter){
						if(!empty($filter->name) &&
$this->loadedData->massaction_table == $table->table){
							echo '<div
id="'.$table->table.'filter'.$k.'"
class="plugarea">';
							$min = array_keys($this->loadedData->massaction_filters);
							if($k > $min[0]) echo JText::_('HIKA_AND').'
';
							if($filter->name == 'limit'){
								echo '<input type="hidden"
name="filter['.$table->table.'][type]['.$k.']"
value="limit"/>';
							}else{
								echo JHTML::_('select.genericlist',
$table->typevaluesFilters,
"filter[".$table->table."][type][$k]",
'class="inputbox chzn-done not-processed" size="1"
onchange="updateMassAction(\'filter\',\''.$table->table.'\','.$k.');countresults(\''.$table->table.'\','.$k.');"',
'value', 'text',$filter->name);
								echo '<span
id="'.$table->table.'countresult_'.$k.'"></span>';
								echo '<span><a style="cursor:  pointer;"
onClick="selectFilter=document.getElementById(\'filter'.$table->table.'type'.$k.'\')
;selectFilter.options[0].selected=\'selected\';updateMassAction(\'filter\',\''.$table->table.'\','.$k.');
document.getElementById(\''.$table->table.'filter'.$k.'\').style.display=\'none\';
numFilters[\''.$table->table.'\']--;"
><img src="'.HIKASHOP_IMAGES.'delete2.png"
style="margin:0px 0px 0px
3px;"/></a></span>';
							}
							echo $filter->html.'</div>';
						}
					}
				}else{
					$value = new stdClass();
					$value->name = 'limit';
					$value->type = $table->table;
					if(!isset($value->data['start']))
$value->data['start'] = 0;
					if(!isset($value->data['value']))
$value->data['value'] = 500;
					echo '<input type="hidden"
name="filter['.$table->table.'][type][0]"
value="limit"/>';
					echo '<div
id="'.$table->table.'filter0"
class="plugarea">';
					echo '<div
id="'.$table->table.'filter0limit">'.JText::_('HIKA_START').'
: <input type="text"
name="filter['.$table->table.'][0][limit][start]"
value="'.$value->data['start'].'" />
'.JText::_('VALUE').' : <input type="text"
name="filter['.$table->table.'][0][limit][value]"
value="'.$value->data['value'].'"/>'.'</div>';
					echo '</div>';
					?><script
type="text/javascript">addHikaMassAction('<?php echo
$table->table; ?>','filter')</script><?php
					if(HIKASHOP_J30){
						?><script
type="text/javascript">jQuery('#<?php echo
$table->table; ?>filter1
.not-processed').removeClass('not-processed').removeClass('chzn-done').chosen();</script><?php
					}
				}

				if(HIKASHOP_J30){
					for($i=0;$i<=$count;$i++){
						?> <script
type="text/javascript">jQuery("#<?php echo
$table->table; ?>filter<?php echo $i; ?>
.not-processed").removeClass("not-processed").removeClass("chzn-done").chosen();
</script><?php
					}
				}

		echo		'</div><button class="btn"
onclick="addHikaMassAction(\''.$table->table.'\',\'filter\');
refreshSelect(\''.$table->table.'\',\'filter\',-1)
;return
false;">'.JText::_('ADD_FILTER').'</button>
				</fieldset>
				<fieldset class="adminform">
					<legend>'. JText::_( 'ACTIONS'
).'</legend>
					<div
id="all'.$table->table.'actions">';
				$count = 0;
				if(!empty($this->loadedData->massaction_actions) &&
count($this->loadedData->massaction_actions) != 1 &&
$table->table == $this->loadedData->massaction_table){
					$count = count($this->loadedData->massaction_actions);
					foreach($this->loadedData->massaction_actions as $k =>
$action){
						if(!empty($action->name) &&
$this->loadedData->massaction_table == $table->table){
							echo '<div
id="'.$table->table.'action'.$k.'"
class="plugarea">';
							$min = array_keys($this->loadedData->massaction_actions);
							if($k > $min[0]) echo JText::_('HIKA_AND').'
';
							echo JHTML::_('select.genericlist',
$table->typevaluesActions,
"action[".$table->table."][type][$k]",
'class="inputbox chzn-done not-processed" size="1"
onchange="updateMassAction(\'action\',\''.$table->table.'\','.$k.');""',
'value', 'text',$action->name);
							emassaction/tmpl/index.html000064400000000032151162050350011647
0ustar00action<?php echo $i; ?>
.nmassaction/tmpl/listing.php000064400000010360151162050350012041
0ustar00massaction/tmpl/index.html000064400000000032151162050350011647
0ustar00<html><body></body></html>massaction/tmpl/listing.php000064400000010360151162050350012041
0ustar00<?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');
?><div class="iframedoc"
id="iframedoc"></div>
<form action="index.php?option=<?php echo HIKASHOP_COMPONENT
?>&amp;ctrl=massaction" method="post" 
name="adminForm" id="adminForm">
	<table>
		<tr>
			<td width="100%">
				<?php echo JText::_( 'FILTER' ); ?>:
				<input type="text" name="search"
id="search" value="<?php echo
$this->escape($this->pageInfo->search);?>"
class="text_area" />
				<button class="btn"
onclick="this.form.submit();"><?php echo JText::_(
'GO' ); ?></button>
				<button class="btn"
onclick="document.getElementById('search').value='';this.form.submit();"><?php
echo JText::_( 'RESET' ); ?></button>
			</td>
			<td nowrap="nowrap">
				<?php echo
$this->tabletype->display('massaction_table',$this->selectedType);
?>
			</td>
		</tr>
	</table>
	<table id="hikashop_massaction_listing" class="adminlist
table table-striped table-hover" cellpadding="1">
		<thead>
			<tr>
				<th class="title titlenum">
					<?php echo JText::_( 'HIKA_NUM' );?>
				</th>
				<th class="title titlebox">
					<input type="checkbox" name="toggle"
value="" onclick="hikashop.checkAll(this);" />
				</th>
				<th class="title">
					<?php echo JHTML::_('grid.sort',
JText::_('HIKA_NAME'), 'a.massaction_name',
$this->pageInfo->filter->order->dir,$this->pageInfo->filter->order->value
); ?>
				</th>
				<th class="title">
					<?php echo JHTML::_('grid.sort',
JText::_('TABLE'), 'a.massaction_table',
$this->pageInfo->filter->order->dir,$this->pageInfo->filter->order->value
); ?>
				</th>
				<th class="title titletoggle">
					<?php echo JHTML::_('grid.sort',  
JText::_('HIKA_PUBLISHED'), 'a.massaction_published',
$this->pageInfo->filter->order->dir,
$this->pageInfo->filter->order->value ); ?>
				</th>
				<th class="title">
					<?php echo JHTML::_('grid.sort',   JText::_(
'ID' ), 'a.massaction_id',
$this->pageInfo->filter->order->dir,
$this->pageInfo->filter->order->value ); ?>
				</th>
			</tr>
		</thead>
		<tfoot>
			<tr>
				<td colspan="6">
					<?php echo $this->pagination->getListFooter(); ?>
					<?php echo $this->pagination->getResultsCounter(); ?>
				</td>
			</tr>
		</tfoot>
		<tbody>
			<?php
				$k = 0;
				$a = count($this->rows);
				if($a){
					for($i = 0;$i<$a;$i++){
						$row =& $this->rows[$i];
						$publishedid =
'massaction_published-'.$row->massaction_id;
				?>
					<tr class="<?php echo "row$k"; ?>">
						<td align="center">
						<?php echo $this->pagination->getRowOffset($i); ?>
						</td>
						<td
aligmassaction/tmpl/normal.php000064400000003426151162050350011665
0ustar00tion_published); } ?>
						</td>
						<td width="1%" align="center">
							<?php echo $row->massaction_id; ?>
						</td>
					</tr>
				<?php
						$k = 1-$k;
					}
				}
			?>
		</tbody>
	</table>
	<input type="hidden" name="option"
value="<?php echo HIKASHOP_COMPONENT; ?>" />
	<input type="hidden" name="task" value=""
/>
	<input type="hidden" name="ctrl"
value="<?php echo JRequest::getCmd('ctrl'); ?>"
/>
	<input type="hidden" name="boxchecked"
value="0" />
	<input type="hidden" name="filter_order"
value="<?php echo
$this->pageInfo->filter->order->value; ?>" />
	<input type="hidden" name="filter_order_Dir"
value="<?php echo $this->pageInfo->filter->order->dir;
?>" />
	<?php echo JHTML::_( 'form.token' ); ?>
</form>
massaction/tmpl/normal.php000064400000003426151162050350011665
0ustar00<?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');
?>		massaction/tmpl/results.php000064400000031525151162050350012077
0ustar00</td>
						</tr>
						<tr>
							<td class="key">
								<label
for="data[massaction][massaction_description]">
									<?php echo JText::_( 'HIKA_DESCRIPTION' ); ?>
								</label>
							</td>
							<td>
								<textarea cols="71" name="<?php echo
$this->massaction_description_input; ?>" ><?php echo
$this->escape(@$this->element->massaction_description);
?></textarea>
								<?php if(isset($this->massaction_description_published)){
										$publishedid =
'published-'.$this->massaction_description_id;
								?>
								<span id="<?php echo $publishedid; ?>"
class="spanloading"><?php echo
$this->toggle->toggle($publishedid,(int)
$this->massaction_description_published,'translation')
?></span>
								<?php } ?>
							</td>
						</tr>
					</table>
massaction/tmpl/results.php000064400000031525151162050350012077
0ustar00<?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
	$edit_url = 'massaction&task=editcell';
	$save_url = 'massaction&task=savecell';
	$cancel_url = 'massaction&task=cancel_edit';

	$columnsData = array();
	$linesData = array();

	$massaction = hikashop_get('class.massaction');

	foreach($this->params->action as $keyTable => $table){
		foreach($table as $action){
			$url =
'"'.$keyTable.'_'.$action.'":"';
			$url .=
urlencode('hikashop[data]').'='.urlencode($this->params->table);
			$url .=
'&'.urlencode('hikashop[column]').'='.urlencode($action);
			$url .=
'&'.urlencode('hikashop[table]').'='.urlencode($keyTable);
			foreach($this->params->types[$action] as $keyObject=>$object){
				$url .=
'&'.urlencode('hikashop['.$keyObject.']').'='.urlencode($object);
			}
			$url .= '"';
			$columnsData[]= $url;
		}
	}

	foreach($this->params->elements as $element){
		$table_id = $this->params->table.'_id';
		$line = $element->$table_id.':{';
		$association = array();
		foreach($this->params->action as $keyTable => $table){
			$table_id = $keyTable.'_id';
			if(isset($element->$table_id)){
				if(!isset($association[$keyTable]))
					$association[$keyTable] = $element->$table_id;
				else {
					if(!is_array($association[$keyTable]))
						$association[$keyTable] = array($association[$keyTable]);
					$association[$keyTable][] = $element->$table_id;
				}
			}else{
				foreach($element as $elem){
					if(empty($elem) || !is_array($elem))
						continue;
					foreach($elem as $data){
						if(isset($data->$table_id)){
							if(!isset($association[$keyTable])){
								$association[$keyTable] = $data->$table_id;
							} else {
								if(!is_array($association[$keyTable])){
									$association[$keyTable] = array($association[$keyTable]);
								}
								$association[$keyTable][] = $data->$table_id;
							}
						}
					}
				}
			}
		}
		$ret = array();
		foreach($association as $key => $value) {
			if(is_array($value)){
				$value = '['.implode(',',$value).']';
			}
			$ret[] = '"'.$key.'":'.$value;
		}
		$line .= implode(',',$ret).'}';
		$linesData[] = $line;
	}


	echo
	'<script type="text/javascript">
		function modifyLinesData(id_replaced,dataid,table,id,tab_id){
			var t = typeOf(linesData[tab_id][dataid][table]);
			if(t == "array"){
				for(var i in linesData[tab_id][dataid][table]){
					if(inArray(id_replaced,linesData[tab_id][dataid][table]) &&
linesData[tab_id][dataid][table][i] == id_replaced){
						linesData[tab_id][dataid][table][i]=id;
						break;
					}
				}
			}else{
				linesData[tab_id][dataid][table] = id;
			}
		}
	</script>';

	echo
	'<script type="text/javascript">
		if(!this.columnsData){
			columnsData = new Array();
			columnsData['.$this->params->action_id.'] = {
				'.implode(",\r\n",$columnsData).'
			};
		}else{
			columnsData['.$this->params->action_id.'] = {
				'.implode(",\r\n",$columnsData).'
			};
		}
		if(!this.linesData){
			linesData = new Array();
			linesData['.$this->params->action_id.'] = {
				'.implode(",\r\n",$linesData).'
			};
		}else{
			linesData['.$this->params->action_id.'] = {
				'.implode(",\r\n",$linesData).'
			};
		}

		function sendForm(target,columnname,dataid,tablename,tab_id){
			var url = \''.hikashop_completeLink($edit_url, true,
true).'\';
			var data = window.Oby.getFormData(target);
			if(data != "") data += "&";
			data += columnsData[tab_id][columnname];
			if(dataid != ""){
				var t = typeOf(linesData[tab_id][dataid][tablename]);
				if(t == "Array" || t == "array"){
					for(var i = 0; i < linesData[tab_id][dataid][tablename].length;
i++){
						data += "&" + encodeURI("hikashop[ids][]") +
"=" +
encodeURIComponent(linesData[tab_id][dataid][tablename][i]);
					}
				}else{
					data += "&" + encodeURI("hikashop[ids]") +
"=" + encodeURIComponent(linesData[tab_id][dataid][tablename]);
				}
				data += "&" + encodeURI("hikashop[dataid]") +
"=" + encodeURIComponent(dataid);
				data += "&" + encodeURI("hikashop[tabid]") +
"=" + encodeURIComponent(tab_id);
			}
			window.Oby.xRequest(url, {update: target, mode: \'POST\',
data: data});
		}
		function onClick(target,columnname,dataid,tablename,tab_id){
			if(target.rel == \'no edit\'){
				target.rel = \'\';
			}else if(target.rel != \'edit\'){
				target.rel = \'edit\';
				sendForm(target,columnname,dataid,tablename,tab_id);
			}
		}


		function onMouseOver(table,column,over,tab_id){
			for(var i in linesData[tab_id]){
				var id = i + \'_\' + table + \'_\' + column;
				var target = document.getElementById(id);
				if(over){
					window.Oby.addClass(target, "hover");
				}else{
					window.Oby.removeClass(target, "hover");
				}
			}
		}

		function onEditSquare(task,target,columnname,dataid,tablename,tab_id){
			if(target.rel ==\'edit\'){
				var url = "";
				if(task=="cancel"){
					url = \''.hikashop_completeLink($cancel_url, true,
true).'\';
				}else if(task=="save"){
					url = \''.hikashop_completeLink($save_url, true,
true).'\';
				}
				target.rel = \'no edit\';
				var data = window.Oby.getFormData(target);
				if(data != "") data += "&";
				data += columnsData[tab_id][columnname];
				if(dataid != ""){
					var t = typeOf(linesData[tab_id][dataid][tablename]);
					if(t == "Array" || t == "array"){
						for(var i = 0; i < linesData[tab_id][dataid][tablename].length;
i++){
							data += "&" + encodeURI("hikashop[ids][]") +
"=" +
encodeURIComponent(linesData[tab_id][dataid][tablename][i]);
						}
					}else{
						data += "&" + encodeURI("hikashop[ids]") +
"=" + encodeURIComponent(linesData[tab_id][dataid][tablename]);
					}
					data += "&" + encodeURI("hikashop[dataid]") +
"=" + encodeURIComponent(dataid);
					data += "&" + encodeURI("hikashop[tabid]") +
"=" + encodeURIComponent(tab_id);
				}
				window.Oby.xRequest(url, {update: target, mode: \'POST\',
data: data});
			}
		}
		function inArray(needle, haystack) {
			var length = haystack.length;
			for(var i = 0; i < length; i++) {
					if(haystack[i] == needle) return true;
			}
			return false;
		}



		function onEditColumn(task,target,table,column,tab_id){
			var ids = new Array();
			for(var i in linesData[tab_id]){
				ids[i] = new Array();
				var t = typeOf(linesData[tab_id][i][table]);
				if(t == "Array" || t == "array"){
					for(var j = 0; j < linesData[tab_id][i][table].length; j++){
						if(typeof linesData[tab_id][i][table][j] !== "undefined"){
							ids[i].push(linesData[tab_id][i][table][j]);
						}
					}
				}else{
					if(typeof linesData[tab_id][i][table] !== "undefined"){
						ids[i].push(linesData[tab_id][i][table]);
					}
				}
			}
			recursive(task,target,table,column,ids);
		}
		function recursive(task,target,table,column,ids){
			var cpt = 0;
			var tab = new Array();
			for(var i in ids){
				if(cpt<5){
					tab.push(ids[i]);
					cpt++;
				}else{
					break;
				}
			}
			var url = "";
			if(task=="cancel"){
				url = \''.hikashop_completeLink($cancel_url, true,
true).'\';
			}else if(task=="save"){
				url = \''.hikashop_completeLink($save_url, true,
true).'\';
			}
			target.rel = \'no edit\';
			var data = window.Oby.getFormData(target);
			if(data != "") data += "&";
			data += columnsData[tab_id][table+"_"+column];
			for(var i = 0; i < ids.length; i++){
				if(typeof ids[i] !== "undefined"){
					for(var j = 0; j < ids[i].length ; j++){
						data += "&" +
encodeURI("hikashop[ids]["+i+"][]") + "=" +
encodeURIComponent(ids[i][j]);
					}
				}
			}
			window.Oby.xRequest(url, {update: target, mode: \'POST\',
data: data});
		}
	</script>';
?>
<div style="overflow:auto">
	<table id="hikashop_massaction_results" class="adminlist
table-hover table table-bordered" cellpadding="1">
		<thead>
			<?php

				if(!empty($this->params->action)){
					$cpt = 0;
					echo '<tr class="title">';
					foreach($this->params->action as $keyTable=>$table){
						foreach($table as $column){
							echo '<td class="massaction-td-column-no-editable"
id="'.$this->params->action_id.'_'.$keyTable.'_'.$column.'">';
							echo $column;
							echo '</td>';
						}
					}
					echo '</tr>';
				}
			?>
		</thead>
		<tfoot>
		</tfoot>
		<tbody>
			<?php
				if(!empty($this->params->action)){
					foreach($this->params->elements as $k1=>$element){
						echo '<tr>';
						foreach($this->params->action as $key=>$table){
							foreach($table as $column){
								$column_id = $key.'_id';
								$data_id = $this->params->table.'_id';
								$type = $this->params->types[$column]->type;
								$sub_type = @$this->params->types[$column]->sub_type;
								$id_td =
$this->params->action_id.'_'.$element->$data_id.'_'.$key.'_'.$column;
								$columnName = $key.'_'.$column;
								if(isset($element->$column) && ($key===$k1 ||
$key===$this->params->table)){
									if(!isset($this->params->lock[$key][$column])){
										echo '<td class="massaction-td-square-editable"
id="'.$id_td.'" onclick =
"onClick(this,\''.$columnName.'\',\''.$element->$data_id.'\',\''.$key.'\',\''.$this->params->action_id.'\')">';
									}else{
										if(isset($this->params->lock[$key][$column]) &&
$this->params->lock[$key][$column]->square === true){
											$td = '';
											if(is_array($this->params->lock[$key][$column]->ids)){
												foreach($this->params->lock[$key][$column]->ids as
$id){
													if($element->$data_id !== $id){continue;}
													$td = '<td
class="massaction-td-square-no-editable"
id="'.$id_td.'">';
												}
											}else{
												if($this->params->lock[$key][$column]->ids !==
'all'){continue;}
												$td = '<td
class="massaction-td-square-no-editable"
id="'.$id_td.'">';
											}
											if(empty($td)){
												$id =
$element->$data_id.'_'.$this->params->table.'_'.$column;
												echo '<td
class="massaction-td-square-editable"
id="'.$id_td.'" onclick =
"onClick(this,\''.$columnName.'\',\''.$element->$data_id.'\',\''.$key.'\',\''.$this->params->action_id.'\')">';
											}else{
												echo $td;
											}
										}else{
											echo '<td
class="massaction-td-square-editable"
id="'.$id_td.'" onclick =
"onClick(this,\''.$columnName.'\',\''.$element->$data_id.'\',\''.$key.'\',\''.$this->params->action_id.'\')">';
										}
									}
									$square = '';
									$square =
$massaction->displayByType($this->params->types,$element,$column);
								}else{
									$square = '';
									$columns_ids = '';
									echo '<td id="'.$id_td.'"';
									foreach($element as $k=>$elem){
										if(!is_array($elem)){continue;}
										foreach($elem as $data){
											if(!isset($data->$column)){continue;}
											if($k != $key){continue;}
											if(isset($data->$column_id)){
												$columns_ids .= $data->$column_id.'_';
											}
											$square .=
$massaction->displayByType($this->params->types,$data,$column);
											$square .= '<br/>';
										}
									}
									$columns_ids = substr($columns_ids, 0, -1);
									if(!isset($this->params->lock[$key][$column]) &&
!empty($columns_ids)){
										echo '" onclick =
"onClick(this,\''.$columnName.'\',\''.$elementmassaction/tmpl/translation.php000064400000003274151162050350012734
0ustar001"
class="massaction-td-square-no-editable">';
												}
											}
											if(empty($td) && !empty($columns_ids)){
												echo '" onclick =
"onClick(this,\''.$columnName.'\',\''.$element->$data_id.'\',\''.$key.'\',\''.$this->params->action_id.'\')"
class="massaction-td-square-editable">';
											}else{
												echo $td;
											}
										}else if(!empty($columns_ids)){
											echo '" onclick =
"onClick(this,\''.$columnName.'\',\''.$element->$data_id.'\',\''.$key.'\',\''.$this->params->action_id.'\')"
class="massaction-td-square-editable">';
										}else{
											echo '"rel="2"
class="massaction-td-square-no-editable">';
										}
									}
								}
								echo $square;
								echo '</td>';
							}
						}
						echo '</tr>';
					}
				}
			?>
		</tbody>
	</table>
</div>
massaction/tmpl/translation.php000064400000003274151162050350012734
0ustar00<?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://wwmassaction/view.html.php000064400000057304151162050350011342
0ustar00tion_name->published;
						$this->massaction_name_id =
$translation->massaction_name->id;
					}
					$this->massaction_description_input =
"translation[massaction_description][".$language_id."]";
					$this->element->massaction_description =
@$translation->massaction_description->value;
					if(isset($translation->massaction_description->published)){
						$this->massaction_description_published =
$translation->massaction_description->published;
						$this->massaction_description_id =
$translation->massaction_description->id;
					}


					$this->setLayout('normal');
					echo $this->loadTemplate();
				echo $this->tabs->endPanel();
			}
		}
	echo $this->tabs->endPane();
massaction/view.html.php000064400000057304151162050350011342
0ustar00<?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 MassactionViewMassaction extends hikashopView{
	var $ctrl= 'massaction';
	var $nameListing = 'HIKA_MASSACTION';
	var $nameForm = 'HIKA_MASSACTION';
	var $icon = 'massaction';

	function display($tpl=null,$params=null){
		$this->params = $params;
		$this->paramBase =
HIKASHOP_COMPONENT.'.'.$this->getName();
		$function = $this->getLayout();
		if(method_exists($this,$function)) $this->$function();
		parent::display($tpl);
	}

	function listing(){
		$app = JFactory::getApplication();
		$pageInfo = new stdClass();
		$pageInfo->filter = new stdClass();
		$pageInfo->filter->order = new stdClass();
		$pageInfo->limit = new stdClass();
		$pageInfo->search = $app->getUserStateFromRequest(
$this->paramBase.".search", 'search', '',
'string' );
		$pageInfo->filter->order->value =
$app->getUserStateFromRequest(
$this->paramBase.".filter_order",
'filter_order',	'a.massaction_id','cmd' );
		$pageInfo->filter->order->dir	=
$app->getUserStateFromRequest(
$this->paramBase.".filter_order_Dir",
'filter_order_Dir',	'desc',	'word' );
		$pageInfo->limit->value = $app->getUserStateFromRequest(
$this->paramBase.'.list_limit', 'limit',
$app->getCfg('list_limit'), 'int' );
		$pageInfo->limit->start = $app->getUserStateFromRequest(
$this->paramBase.'.limitstart', 'limitstart', 0,
'int' );
		$selectedType = $app->getUserStateFromRequest(
$this->paramBase.".massaction_table",'massaction_table','','string');
		$database	= JFactory::getDBO();

		$filters = array();
		if(!empty($selectedType)){
			$filters[] =
'a.massaction_table='.$database->Quote($selectedType);
		}
		$searchMap =
array('a.massaction_id','a.massaction_name','a.massaction_description','a.massaction_table');

		if(!empty($pageInfo->search)){
			$searchVal =
'\'%'.hikashop_getEscaped(JString::strtolower(
$pageInfo->search ),true).'%\'';
			$filters[] =  implode(" LIKE $searchVal OR
",$searchMap)." LIKE $searchVal";
		}
		$order = '';
		if(!empty($pageInfo->filter->order->value)){
			$order = ' ORDER BY
'.$pageInfo->filter->order->value.'
'.$pageInfo->filter->order->dir;
		}
		if(!empty($filters)){
			$filters = ' WHERE ('. implode(') AND
(',$filters).')';
		}else{
			$filters = '';
		}
		$query = ' FROM '.hikashop_table('massaction').'
AS a '.$filters.$order;
		$database->setQuery('SELECT
a.*'.$query,(int)$pageInfo->limit->start,(int)$pageInfo->limit->value);
		$rows = $database->loadObjectList();
		if(!empty($pageInfo->search)){
			$rows =
hikashop_search($pageInfo->search,$rows,'massaction_id');
		}
		$database->setQuery('SELECT COUNT(*)'.$query);
		$pageInfo->elements = new stdClass();
		$pageInfo->elements->total = $database->loadResult();
		$pageInfo->elements->page = count($rows);

		$toggleClass = hikashop_get('helper.toggle');
		$this->assignRef('toggleClass',$toggleClass);
		$this->assignRef('rows',$rows);
		$this->assignRef('pageInfo',$pageInfo);
		$table = hikashop_get('type.masstable');
		$this->assignRef('tabletype',$table);
		$this->assignRef('selectedType',$selectedType);

		hikashop_setTitle(JText::_($this->nameListing),$this->icon,$this->ctrl);
		$this->getPagination();

		$config =& hikashop_config();
		$manage =
hikashop_isAllowed($config->get('acl_massaction_manage','all'));
		$this->assignRef('manage',$manage);
		$this->toolbar = array(
			array('name' => 'custom',
'icon'=>'copy','alt'=>JText::_('HIKA_COPY'),
'task' => 'copy','display'=>$manage),
			array('name'=>'addNew','display'=>$manage),
			array('name'=>'editList','display'=>$manage),
			array('name'=>'deleteList','display'=>hikashop_isAllowed($config->get('acl_massaction_delete','all'))),
			'|',
			array('name' => 'pophelp', 'target'
=> $this->ctrl.'-listing'),
			'dashboard'
		);


	}
	function form(){
		$massaction_id = hikashop_getCID('massaction_id');
		$class = hikashop_get('class.massaction');
		if(!empty($massaction_id)){
			$element = $class->get($massaction_id,true);
			$task='edit';
		}else{
			$element = new stdClass();
			$element->massaction_published = 1;
			$element->massaction_table = 'product';
			$task='add';
		}

		hikashop_setTitle(JText::_($this->nameForm),$this->icon,$this->ctrl.'&task='.$task.'&massaction_id='.$massaction_id);

		$this->toolbar = array(
			array('name' =>
'confirm','check'=>false, 'msg'=>
JText::_('PROCESS_WARNING'),'icon'=>'upload','alt'=>JText::_('PROCESS'),
'task' => 'process'),
			'|',
			'save',
			array('name' => 'save2new', 'display'
=> version_compare(JVERSION,'1.7','>=')),
			'apply',
			'cancel',
			'|',
			array('name' => 'pophelp', 'target'
=> $this->ctrl.'-form')
		);

		$this->assignRef('element',$element);
		$translation = false;
		$transHelper = hikashop_get('helper.translation');
		if($transHelper && $transHelper->isMulti()){
			$translation = true;
			$transHelper->load('hikashop_massaction',@$element->massaction_id,$element);
			jimport('joomla.html.pane');
			$config =& hikashop_config();
			$multilang_display=$config->get('multilang_display','tabs');
			if($multilang_display=='popups') $multilang_display =
'tabs';
			$tabs = hikashop_get('helper.tabs');
			$this->assignRef('tabs',$tabs);
			$this->assignRef('transHelper',$transHelper);

		}
		$toggle=hikashop_get('helper.toggle');
		$this->assignRef('toggle',$toggle);
		$this->assignRef('translation',$translation);

		$tables = array();
		JPluginHelper::importPlugin('hikashop');
		$dispatcher = JDispatcher::getInstance();
		$dispatcher->trigger('onMassactionTableLoad', array(
&$tables ) );
		$loadedData = $element;
		foreach($tables as $k => $table){
			$tables[$k]->triggers = array();
			$tables[$k]->triggers_html = array();
			$dispatcher->trigger('onMassactionTableTriggersLoad',
array( &$tables[$k],
&$tables[$k]->triggers,&$tables[$k]->triggers_html,
&$loadedData) );
			$tables[$k]->filters = array();
			$tables[$k]->filters_html = array();
			$dispatcher->trigger('onMassactionTableFiltersLoad', array(
&$tables[$k],
&$tables[$k]->filters,&$tables[$k]->filters_html,
&$loadedData) );
			$tables[$k]->actions = array();
			$tables[$k]->actions_html = array();
			$dispatcher->trigger('onMassactionTableActionsLoad', array(
&$tables[$k],
&$tables[$k]->actions,&$tables[$k]->actions_html,
&$loadedData) );
			$table->typevaluesTriggers = array();
			$table->typevaluesFilters = array();
			$table->typevaluesActions = array();
			$table->typevaluesTriggers[] = JHTML::_('select.option',
'',JText::_('TRIGGER_SELECT'));
			$table->typevaluesFilters[] = JHTML::_('select.option',
'',JText::_('FILTER_SELECT'));
			$table->typevaluesActions[] = JHTML::_('select.option',
'',JText::_('ACTION_SELECT'));

			foreach($tables[$k]->triggers as $oneType => $oneName){
				$table->typevaluesTriggers[] = JHTML::_('select.option',
$oneType,$oneName);
			}
			foreach($tables[$k]->filters as $oneType => $oneName){
				$table->typevaluesFilters[] = JHTML::_('select.option',
$oneType,$oneName);
			}
			foreach($tables[$k]->actions as $oneType => $oneName){
				$table->typevaluesActions[] = JHTML::_('select.option',
$oneType,$oneName);
			}
		}
		$this->assignRef('tables',$tables);
		$this->assignRef('loadedData',$loadedData);


		$js = "

			function updateMassAction(type,table,filterNum){
				var w = window, d = w.document, currentFilterType =
d.getElementById(type+table+'type'+filterNum).value;
				if(!currentFilterType){
					d.getElementById(table+type+'area_'+filterNum).innerHTML =
'';
					if(type=='filter')
d.getElementById(table+'countresult_'+filterNum).innerHTML =
'';
					return;
				}
				var filterArea = table+type+'__num__'+currentFilterType;
				if(d.getElementById(filterArea))
						w.Oby.updateElem(
d.getElementById(table+type+'area_'+filterNum),
d.getElementById(filterArea).innerHTML.replace(/__num__/g,filterNum));
				else d.getElementById(table+type+'area_'+filterNum).innerHTML
= '';
			}

			";
		 $js .="
			var numTriggers = {};
			var numFilters = {};
			var numActions = {};
			var triggerId = {};
			var filterId = {};
			var actionId = {};
		";

		foreach($tables as $k => $table){
			if(empty($loadedData->massaction_triggers) || $table->table !=
$loadedData->massaction_table){
				$js .="numTriggers['".$table->table."'] =
1;";
				$js .="triggerId['".$table->table."'] =
1;";
			}else{
				$triggerId = max(array_keys($loadedData->massaction_triggers));
				if(!is_int($triggerId)) $triggerId = 1;
				else $triggerId++;

				$countTrigger=1;
				foreach($loadedData->massaction_triggers as $trigger){
					if(is_int($k)){
						$countTrigger++;
					}
				}

				$js .="numTriggers['".$table->table."'] =
".$countTrigger.";";
				$js .="triggerId['".$table->table."'] =
".$triggerId.";";
			}
			if(empty($loadedData->massaction_filters) || $table->table !=
$loadedData->massaction_table){
				$js .="numFilters['".$table->table."'] =
1;";
				$js .="filterId['".$table->table."'] =
1;";
			}else{
				$filterId = max(array_keys($loadedData->massaction_filters));
				if(!is_int($filterId)) $filterId = 1;
				else $filterId++;

				$countFilter = 1;
				foreach($loadedData->massaction_filters as $k => $filter){
					if(is_int($k)){
						$countFilter++;
					}
				}

				$js .="numFilters['".$table->table."'] =
".$countFilter.";";
				$js .="filterId['".$table->table."'] =
".$filterId.";";
			}
			if(empty($loadedData->massaction_actions) || $table->table !=
$loadedData->massaction_table){
				$js .="numActions['".$table->table."'] =
0;";
				$js .="actionId['".$table->table."'] =
0;";
			}else{
				$actionId = max(array_keys($loadedData->massaction_actions));
				if(!is_int($actionId)) $actionId = 0;
				else $actionId++;

				$countAction = 0;
				foreach($loadedData->massaction_actions as $k => $action){
					if(is_int($k)){
						$countAction++;
					}
				}

				$js .="numActions['".$table->table."'] =
".$countAction.";";
				$js .="actionId['".$table->table."'] =
".$actionId.";";
			}
		}

		$js .= "
				function addHikaMassAction(table,type){
					var newdiv = document.createElement('div');
					if(type=='filter'){
						var count=numFilters[table];
						var theId=filterId[table];
					}else if(type=='trigger'){
						var count=numTriggers[table];
						var theId=triggerId[table];
					}else if(type=='action'){
						var count=numActions[table];
						var theId=actionId[table];
					}
					newdiv.id = table+type+theId;
					newdiv.className = 'plugarea';
					newdiv.innerHTML = '';
					if(count > 0) newdiv.innerHTML +=
'".JText::_('HIKA_AND')."';
					newdiv.innerHTML +=
document.getElementById(table+'_'+type+'s_original').innerHTML.replace(/__num__/g,
theId);
					if(document.getElementById('all'+table+type+'s')){
						document.getElementById('all'+table+type+'s').appendChild(newdiv);
						updateMassAction(type,table,theId);
						if(type=='filter'){
							numFilters[table]++;
							filterId[table]++;
						}else if(type=='trigger'){
							numTriggers[table]++;
							triggerId[table]++;
						}else if(type=='action'){
							numActions[table]++;
							actionId[table]++;
						}
					}
				}
		";

		if(HIKASHOP_J30){
			$js .= '
				function refreshSelect(table,type, id){
					if(type=="filter"){
						var count=filterId[table];
					}else if(type=="trigger"){
						var count=triggerId[table];
					}else if(type=="action"){
						var count=actionId[table];
					}
					if(id!=-1){
						var count = id;
					}else{
						count=count-1;
					}
					jQuery("#"+table+type+count+"
.not-processed").removeClass("not-processed").removeClass("chzn-done").chosen();
				}
			';
		}else{
			$js .= 'function refreshSelect(table,type, id){}';
		}



		if(!HIKASHOP_J16){
			$js .= 	'function submitbutton(pressbutton){
						if (pressbutton != \'save\') {
							submitform( pressbutton );
							return;
						}';
		}else{
			$js .= 	'Joomla.submitbutton = function(pressbutton) {
						if (pressbutton != \'save\') {
							Joomla.submitform(pressbutton,document.adminForm);
							return;
						}';
		}
		if(!HIKASHOP_J16){
			$js .= 	"submitform( pressbutton );";
		}else{
			$js .= 	"Joomla.submitform(pressbutton,document.adminForm);";
		}
		$js .="}";

		$js .= "
				function countresults(table,num){
					document.getElementById(table+'countresult_'+num).innerHTML
= '<span class=\"onload\"></span>';
					var form = document.id('adminForm');
					var data = form.toQueryString();
					data += '&task=countresults&ctrl=massaction';
					try{
						new
Ajax('index.php?option=com_hikashop&tmpl=component&ctrl=massaction&task=countresults&table='+table+'&num='+num,{
							method: 'post',
							data: data,
							update: document.getElementById(table+'countresult_'+num)
						}).request();
					}catch(err){
						new Request({
							method: 'post',
							data: data,
							url:
'index.php?option=com_hikashop&tmpl=component&ctrl=massaction&task=countresults&table='+table+'&num='+num,
							onSuccess: function(responseText, responseXML) {
								document.getElementById(table+'countresult_'+num).innerHTML
= responseText;
							}
						}).send();
					}
				}";
		if(!isset($loadedData->massaction_table)) $currentTable =
'product'; else $currentTable =
$loadedData->massaction_table;
		$js .= '
		var currentoption = \''.$currentTable.'\';
		function updateData(newoption){
			document.getElementById(currentoption).style.display =
"none";
			document.getElementById(newoption).style.display = \'block\';
			currentoption = newoption;
		}';

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



		if(!empty($_POST['html_results'])){
			$html_results = $_POST['html_results'];
		}
		$this->assignRef('html_results',$html_results);
		$doc->addScriptDeclaration( $js );
		hikashop_loadJslib('mootools');

	}

	function export(){
		$massaction = hikashop_get('class.massaction');
		$this->params =
$massaction->sortResult($this->params->table,$this->params);
		$this->loadFields($this->params);
		$currency = hikashop_get('class.currency');
		$this->assignRef('currency',$currency);
		$weight = hikashop_get('type.weight');
		$this->assignRef('weight',$weight);
	}

	function cell(){
		$url = 'massaction&task=process';
		$url .= '&'.hikashop_getFormToken().'=1';

		if(isset($_POST['hikashop'])){

			$hikashop = JRequest::getVar('hikashop','');
			$this->params = new stdClass();
			$this->params->data = $hikashop['data'];
			$this->params->table = $hikashop['table'];
			$this->params->tab_id = $hikashop['tabid'];
			$this->params->column = $hikashop['column'];
			if(isset($hikashop['values']) &&
isset($_POST['data']['values'])){
				foreach($hikashop['values'] as $key=>$value){
					$values[$key]=$value;
				}
				foreach($_POST['data']['values'] as
$key=>$value){
					$values[$key]=$value;
				}
			}else if(isset($hikashop['values'])){
				$values = $hikashop['values'];
			}else if(isset($_POST['data']['values'])){
				$values = $_POST['data']['values'];
			}
			$this->params->values = $values;
			$this->params->action[$this->params->table][$this->params->column]
= new stdClass();
			$this->params->action[$this->params->table][$this->params->column]
= $this->params->column;
			$this->params->types[$this->params->column] = new
stdClass();
			$this->params->types[$this->params->column]->type =
$hikashop['type'];

			if(isset($hikashop['dataid'])){


				if(!isset($this->dispatcher)){
					JPluginHelper::importPlugin('hikashop');
					$this->dispatcher = JDispatcher::getInstance();
				}
				$reload = array();
				$this->dispatcher->trigger('onReloadPageMassActionAfterEdition',array(&$reload));
				$this->assignRef('reload',$reload);

				$this->params->data_id = $hikashop['dataid'];

				if(is_array($hikashop['ids'])){
					$this->params->ids = $hikashop['ids'];
				}else{
					$this->params->ids[] = $hikashop['ids'];
				}
				$rows = array();

				if(isset($reload[$this->params->table][$this->params->column])){
					echo
						'<script type="text/javascript">
							url = \''.hikashop_completeLink($url, false,
true).'\';
							url += \'&cid=\' +
document.getElementById(\'cidformmassaction\').value;
							window.location = url;
						</script>';
					return;
				}

				foreach($this->params->ids as $id){
					if(isset($this->params->values[$id])){
						$row =
$this->_loadResults($this->params->data,$this->params->data_id,$this->params->table,$this->params->column,$hikashop['type'],$id,$this->params->values[$id]);
						if(is_array($row)){
							$rows = $row;
							break;
						}else{
							$rows[] = $row;
						}
					}
				}

				$table_id = $this->params->table.'_id';
				$this->params->ids = array();
				echo '<script type="text/javascript">';
				foreach($rows as $row){
					foreach($this->params->values as $id_replaced=>$id){
						if($id == $row->$table_id){
							echo
'modifyLinesData(\''.$id_replaced.'\',\''.$this->params->data_id.'\',\''.$this->params->table.'\',\''.$row->$table_id.'\',\''.$this->params->tab_id.'\');';

						}
					}

					$this->params->ids[] = $row->$table_id;
				}
				echo '</script>';
				$currency = hikashop_get('class.currency');
				$this->assignRef('currency',$currency);

				$table = $this->params->table;
				$this->params->elements = array();
				if($table == $this->params->data){
					foreach($rows as $row){
						$this->params->elements[] = $row;
					}
				}else{
					$this->params->elements[0] = new stdClass();
					$this->params->elements[0]->$table = $rows;
				}
				$massaction = hikashop_get('class.massaction');
				$this->params =
$massaction->sortResult($this->params->table,$this->params);
				$this->loadFields($this->params);
			}else{

			}
		}
	}


	function _loadResults($data,$data_id,$table,$column,$type,$id,$value){
		$database	= JFactory::getDBO();
		$query = '';
		hikashop_securefield($column);
		hikashop_securefield($table);
		hikashop_securefield($data);

		if(!isset($this->dispatcher)){
			JPluginHelper::importPlugin('hikashop');
			$this->dispatcher = JDispatcher::getInstance();
		}
		$this->dispatcher->trigger('onLoadResultMassActionAfterEdition',array($data,$data_id,$table,$column,$type,$id,$value,&$query));

		if(!empty($query) && !is_array($query)){
			$database->setQuery($query);
			$row = $database->loadObject();
			return $row;
		}else if(!empty($query) && is_array($query)){
			return $query;
		}
		return false;
	}

	function results(){
		$massaction = hikashop_get('class.massaction');
		$this->params =
$massaction->sortResult($this->params->table,$this->params);
		$this->loadFields($this->params);
		$currency = hikashop_get('class.currency');
		$this->assignRef('currency',$currency);
		$weight = hikashop_get('type.weight');
		$this->assignRef('weight',$weight);
	}

	function editcell(){
		$database = JFactory::getDBO();
		if(isset($_POST['hikashop'])){
			$query = '';
			$hikashop = JRequest::getVar('hikashop','');
			$this->assignRef('type', $hikashop['type']);
			$this->assignRef('column', $hikashop['column']);
			$this->assignRef('table', $hikashop['table']);
			$this->assignRef('data', $hikashop['data']);
			$this->assignRef('data_id',
$hikashop['dataid']);
			$this->assignRef('tab_id', $hikashop['tabid']);

			$types = hikashop_get('type.currency');
			$this->assignRef('types',$types);
			$volume = hikashop_get('type.volume');
			$this->assignRef('volume',$volume);
			$status = hikashop_get('type.categorysub');
			$status->type = 'status';
			$this->assignRef('status',$status);

			if(isset($hikashop['sub_type'])){
				$this->assignRef('sub_type',
$hikashop['sub_type']);
			}
			if(isset($hikashop['ids'])){
				if(is_array($hikashop['ids'])){
					$ids = $hikashop['ids'];
				}else{
					$ids[] = $hikashop['ids'];
				}

				$this->assignRef('ids', $ids);
				$data = $this->data;
				$data_id = $this->data_id;
				$table = $this->table;
				$column = $this->column;
				$type = $this->type;

				hikashop_securefield($table);
				hikashop_securefield($column);
				JArrayHelper::toInteger($ids);
				$this->assignRef('ids', $ids);
				if(!empty($ids)){
					if(!isset($this->dispatcher)){
						JPluginHelper::importPlugin('hikashop');
						$this->dispatcher = JDispatcher::getInstance();
					}
					$this->dispatcher->trigger('onLoadDatatMassActionBeforeEdition',array($data,$data_id,$table,$column,$type,$ids,&$query,&$this));
					if(!empty($query)){
						$database->setQuery($query);
						$rows = $database->loadObjectList();
						$this->assignRef('rows',$rows);
					}
				}
				if(isset($hikashop['sub_type'])){
					$this->type = $hikashop['sub_type'];
				}
			}
		}
	}

	function sortIds($array){
		if(is_array($array)){
			$tmp = array();
			for($i = 0;$i<count($array);$i++){
				$tmp[$i] = $array[$i];
				for($j = $i+1;$j<count($array);$j++){
					if((int)$array[$i] > (int)$array[$j]){
						$tmp[$i] = $array[$j];
						$array[$j] = $array[$i];
						$array[$i] = $tmp[$i];

					}
				}
			}
			return $tmp;
		}
		return false;
	}

	function loadFields(&$params){
		$database = JFactory::getDBO();
		$columns = array();
		$tables = array();
		foreach($params->action as $key=>$table){
			foreach($table as $action){
				if(!in_array($action,$columns)){
					$columns[] = $action;
				}
				if(!in_array($key,$table)){
					$tables[] = $key;
				}
			}
		}
		if(!empty($columns)){
			$query = 'SELECT field_table,field_type,field_namekey';
			$query .= ' FROM '.hikashop_table('field');
			$query .= ' WHERE field_namekey =
'.$database->Quote($columns[0]);
			foreach($columns as $column){
				$query .= ' OR field_namekey =
'.$database->Quote($column);
			}
			$database->setQuery($query);
			$rows = $database->loadObjectList();
			foreach($rows as $row){
				foreach($params->action as $table){
					if(!isset($table[$row->field_namekey])){continue;}
					$params->types[$row->field_namekey]->type =
'custom_'.$row->field_type;
				}
			}
		}
	}

	function displayField($field,$params){
		$html = '';
		switch($field){
			case 'dropdawn':
				$html.= '<select
name="'.$params['name'].'menu/index.html000064400000000032151162050350007476
0ustar00;
			case 'custom':
				menu/tmpl/default.php000064400000007374151162050350010632
0ustar00menu/index.html000064400000000032151162050350007476
0ustar00<html><body></body></html>menu/tmpl/default.php000064400000007374151162050350010632
0ustar00<?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
if(!HIKASHOP_BACK_RESPONSIVE) {
?><div style="line-height:normal">
<span id="hikashop_menu_title"><?php echo
$this->title;?></span>
<div id="hikashop_menu"<?php if($this->menu_style ==
'content_top'){ echo
'class="hikashop_menu_top"';} ?>>
	<ul class="menu">
<?php
} else { // the display:block CSS is a "fix" against JSN
poweradmin which hides the menu bar of HikaShop since Joomla 3.0 if we
don't do that
?><div class="navbar">
	<div class="navbar-inner" style="display:block
!important;">
		<div class="container">
			<div class="nav">
				<ul id="hikashop_menu_j3" class="nav">
<?php
}
$config = hikashop_config();
foreach($this->menus as $menu) {
	$html = '';
	if(!empty($menu['children'])) {
		$i = 1;
		$last = count($menu['children']);
		foreach($menu['children'] as $child) {
			$task = 'view';
			if(!empty($child['task']))
				$task = $child['task'];
			if(empty($child['acl']) ||
hikashop_isAllowed($config->get('acl_'.$child['acl'].'_'.$task,
'all'))) {
				$liclasses = '';
				$classes = '';
				if(isset($child['active']) &&
$child['active']) {
					$classes .= ' sel';
					$liclasses .= ' sel';
					$menu['active'] = true;
				}

				$icon = '';
				if(!empty($child['icon'])) {
					if(!HIKASHOP_BACK_RESPONSIVE) {
						$classes .= ' '.$child['icon'];
					} else {
						$icon = '<i
class="'.$child['icon'].'"></i>
';
					}
				}
				if($i == $last)
					$classes .= ' last';
				if(!isset($child['options']))
					$child['options'] = '';
				if(!empty($child['url'])) {
					$html .= '<li
class="l2'.$liclasses.'"><a
class="'.$classes.'"
href="'.$child['url'].'"
'.$child['options'].'>'.$icon.$child['name'].'</a></li>'."\r\n";
				} else {
					$html .= '<li class="l2 divider
sep'.$liclasses.'"
'.$child['options'].'>'.$icon.$child['name'].'</li>'."\r\n";
				}
				$i++;
			}
		}
		if(!empty($html)) {
			if(!HIKASHOP_BACK_RESPONSIVE) {
				$html =
'<ul>'."\r\n".$html.'</ul>';
			} else {
				$html = '<ul
class="dropdown-menu">'."\menu/tmpl/index.html000064400000000032151162050350010452
0ustar00menu['url'] = '#';
		}
	menus/index.html000064400000000032151162050350007661
0ustar00menu/tmpl/index.htmlmenus/tmpl/form.php000064400000065550151162050350010334
0ustar00menus/index.html000064400000000032151162050350007661
0ustar00<html><body></body></html>menus/tmpl/form.php000064400000065550151162050350010334
0ustar00<?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');
?><div class="iframedoc"
id="iframedoc"></div>
<?php
	$arr = array(
		JHTML::_('select.option',  '-1', JText::_(
'HIKA_INHERIT' ) ),
		JHTML::_('select.option',  '1', JText::_(
'HIKASHOP_YES' ) ),
		JHTML::_('select.option',  '0', JText::_(
'HIKASHOP_NO' ) ),
	);
?>
<form action="index.php" method="post" 
name="adminForm" id="adminForm">
<?php if(!HIKASHOP_BACK_RESPONSIVE) { ?>
<div id="page-mail">
	<table style="width:100%">
		<tr>
			<td valign="top" width="50%">
<?php } else { ?>
<div id="page-menus" class="row-fluid">
	<div class="span6">
<?php } ?>
				<fieldset class="adminform">
					<legend><?php echo JText::_( 'HIKA_DETAILS' );
?></legend>

					<table class="admintable table"
cellspacing="1">
						<?php
if(version_compare(JVERSION,'1.6','<')){ ?>
						<tr>
							<td class="key">
								<?php echo JText::_( 'HIKA_NAME' ); ?>
							</td>
							<td>
								<input class="text_area" type="text"
name="menu[name]" id="title" size="35"
value="<?php echo $this->escape(@$this->element->name);
?>" />
							</td>
						</tr>
						<?php }else{ ?>
						<tr>
							<td class="key">
								<?php echo JText::_( 'HIKA_TITLE' ); ?>
							</td>
							<td>
								<input class="text_area" type="text"
name="menu[title]" id="title" size="35"
value="<?php echo $this->escape(@$this->element->title);
?>" />
							</td>
						</tr>
						<?php } ?>
						<tr>
							<td class="key">
								<?php echo JText::_( 'HIKA_ALIAS' ); ?>
							</td>
							<td>
								<input class="text_area" type="text"
name="menu[alias]" id="title" size="35"
value="<?php echo $this->escape(@$this->element->alias);
?>" />
							</td>
						</tr>
						<tr>
							<td valign="top" class="key">
								<?php echo JText::_( 'SHOW_IMAGE' ); ?>
							</td>
							<td>
								<?php echo JHTML::_('hikaselect.booleanlist', 
$this->control.'[show_image]',
'class="inputbox"',
@$this->element->hikashop_params['show_image'] ); ?>
							</td>
						</tr>
						<tr>
							<td valign="top" class="key">
								<?php echo JText::_( 'SHOW_DESCRIPTION' ); ?>
							</td>
							<td>
								<?php
								if(!isset($this->element->hikashop_params['show_description']))$this->element->hikashop_params['show_description']=1;
								echo JHTML::_('hikaselect.booleanlist', 
$this->control.'[show_description]',
'class="inputbox"',
$this->element->hikashop_params['show_description'] );
?>
							</td>
						</tr>
						<tr>
							<td valign="top" class="key">
								<?php echo JText::_( 'HIKA_PUBLISHED' ); ?>
							</td>
							<td>
								<?php echo JHTML::_('hikaselect.booleanlist', 
'menu[published]', 'class="inputbox"',
@$this->element->published ); ?>
							</td>
						</tr>
						<tr>
							<td class="key" valign="top">
								<?php echo JText::_('TYPE_OF_CONTENT');?>
							</td>
							<td>
								<?php echo
$this->contentType->display('menu[content_type]',@$this->element->content_type,$this->js);
?>
							</td>
						</tr>
						<tr>
							<td class="key" valign="top">
								<?php echo JText::_('TYPE_OF_LAYOUT');?>
							</td>
							<td>
								<?php
if(!isset($this->element->hikashop_params['layout_type']))
$this->element->hikashop_params['layout_type'] =
'inherit';
								echo
$this->layoutType->display($this->control.'[layout_type]',@$this->element->hikashop_params['layout_type'],$this->js);?>
							</td>
						</tr>
						<tr id="number_of_columns">
							<td class="key" valign="top">
								<?php echo JText::_('NUMBER_OF_COLUMNS');?>
							</td>
							<td>
								<input name="<?php echo $this->control;
?>[columns]" type="text" value="<?php echo
$this->element->hikashop_params['columns'];?>"
/>
							</td>
						</tr>
						<tr>
							<td class="key" valign="top">
								<?php echo JText::_('NUMBER_OF_ITEMS');?>
							</td>
							<td>
								<input name="<?php echo $this->control;
?>[limit]" type="text" value="<?php echo
$this->element->hikashop_params['limit'];?>" />
							</td>
						</tr>
						<tr>
							<td class="key" valign="top">
								<?php echo JText::_('RANDOM_ITEMS');?>
							</td>
							<td>
								<?php
								if(!isset($this->element->hikashop_params['random']))
$this->element->hikashop_params['random'] =
'-1';
								echo JHTML::_('hikaselect.radiolist', $arr,
$this->control.'[random]' , '', 'value',
'text',
@$this->element->hikashop_params['random']);
								?>
							</td>
						</tr>
						<tr>
							<td class="key" valign="top">
								<?php echo JText::_('ORDERING_DIRECTION');?>
							</td>
							<td>
								<?php
								if(!isset($this->element->hikashop_params['order_dir']))
$this->element->hikashop_params['order_dir'] =
'inherit';
								echo
$this->orderdirType->display($this->control.'[order_dir]',@$this->element->hikashop_params['order_dir']);?>
							</td>
						</tr>
						<tr>
							<td class="key" valign="top">
								<?php echo JText::_('SUB_ELEMENTS_FILTER');?>
							</td>
							<td><?php
								if(!isset($this->element->hikashop_params['filter_type']))
$this->element->hikashop_params['filter_type'] = 2;
								echo
$this->childdisplayType->display($this->control.'[filter_type]',@$this->element->hikashop_params['filter_type'],
true, true, true);
							?></td>
						</tr>
						<tr>
							<td class="key" valign="top">
								<?php echo JText::_('ASSOCIATED_CATEGORY');?>
							</td>
							<td>
								<?php $link =
hikashop_completeLink('category&task=selectparentlisting&values='.$this->element->hikashop_params['selectparentlisting'].'&control=params',true);
?>
								<span id="changeParent">
									<?php echo
@$this->element->category->category_id.'
'.htmlspecialchars(@$this->element->category->category_name,
ENT_COMPAT, 'UTF-8');?>
								</span>
								<input class="inputbox"
id="paramsselectparentlisting" name="<?php echo
$this->control;?>[selectparentlisting]" type="hidden"
size="20" value="<?php echo
$this->element->hikashop_params['selectparentlisting'];?>">
								<?php
								echo $this->popup->display(
										JText::_('SELECT'),
										'SELECT_A_CATEGORY',
										'\''.hikashop_completeLink('category&task=selectparentlisting&filter_id=product&control=params',true).'&values=\'+document.getElementById(\'paramsselectparentlisting\').value',
										'linkparamsselectparentlisting',
										860, 480, '', '', 'button',true
									);
								?>
								<a href="#"
onclick="document.getElementById('changeParent').innerHTML='';document.getElementById('paramsselectparentlisting').value=0;return
false;">
									<img src="<?php echo
HIKASHOP_IMAGES?>delete.png"/>
								</a>
							</td>
						</tr>
						<tr>
							<td class="key" valign="top">
								<?php echo JText::_('ASSOCIATED_MODULES');?>
							</td>
							<td>
								<input type="hidden" name="<?php echo
$this->control; ?>[modules]" id="menumodules" 
value="<?php echo
@$this->element->hikashop_params['modules']; ?>"
/>
								<?php
									echo $this->popup->display(
										JText::_('SELECT'),
										'SELECT_MODULES',
										'\''.hikashop_completeLink('modules&task=selectmodules&control=menu&name=modules',true).'\'+\'&modules=\'+document.getElementById(\'menumodules\').value',
										'linkmenumodules',
										750, 375, '', '', 'button',true
									);
								?>
								<br/>
								<?php
									if(!empty($this->element->id) &&
!empty($this->element->hikashop_params['modules']))
									{
										$modules =
explode(',',$this->element->hikashop_params['modules']);
										$modulesClass = hikashop_get('class.modules');
										$ok = false;
										$cid = array();
										foreach($modules as $module)
										{
											$element = $modulesClass->get($module);
											if(!empty($element->title))
											{
												array_push($cid,$element);
												$ok = true;
												echo '<a
href="#module_content_'.$element->id.'">'.JText::sprintf('OPTIONS_FOR_X',@$element->title).'</a><br/>';
											}
										}
										if(!$ok)
										{
											$menuClass = hikashop_get('class.menus');
											$menuClass->displayErrors((int)$this->element->id);
										}
									}
									elseif(!empty($this->element->content_type) &&
$this->element->content_type=='category')
									{
										$menuClass = hikashop_get('class.menus');
										$menuClass->displayErrors((int)$this->element->id);
									}
								?>
							</td>
						</tr>
						<tr>
							<td class="key" valign="top">
								<?php echo JText::_('USE_NAME_INSTEAD_TITLE');?>
							</td>
							<td>
								<?php
									echo JHTML::_('hikaselect.booleanlist',
$this->control.'[use_module_name]' ,
'',@$this->element->hikashop_params['use_module_name']);
								?>
							</td>
						</tr>
					</table>
				</fieldset>
<?php if(!HIKASHOP_BACK_RESPONSIVE) { ?>
			</td>
			<td valign="top" width="50%">
<?php } else { ?>
	</div>
	<div class="span6">
<?php } ?>
				<fieldset id="content_product"
class="adminform">
					<legend><?php echo JText::_('PARAMS_FOR_PRODUCTS');
?></legend>
					<table class="admintable table" cellspacing="1"
width="100%">
						<tr>
							<td class="key" valign="top">
								<?php echo JText::_('ORDERING_FIELD');?>
							</td>
							<td>
								<?php
								if(!isset($this->element->hikashop_params['product_order']))
$this->element->hikashop_params['product_order'] =
'inherit';
								echo
$this->orderType->display($this->control.'[product_order]',@$this->element->hikashop_params['product_order'],'product');?>
							</td>
						</tr>
						<tr>
							<td class="key" valign="top">
								<?php echo JText::_('RECENTLY_VIEWED');?>
							</td>
							<td>
								<?php
								if(!isset($this->element->hikashop_params['recently_viewed']))
$this->element->hikashop_params['recently_viewed'] =
'-1';
								echo JHTML::_('hikaselect.radiolist', $arr,
$this->control.'[recently_viewed]' , '',
'value', 'text',
@$this->element->hikashop_params['recently_viewed']);
?>
							</td>
						</tr>
						<tr>
							<td class="key" valign="top">
								<?php echo JText::_('ADD_TO_CART_BUTTON');?>
							</td>
							<td>
								<?php
								if(!isset($this->element->hikashop_params['add_to_cart']))
$this->element->hikashop_params['add_to_cart'] =
'-1';
								echo JHTML::_('hikaselect.radiolist', $arr,
$this->control.'[add_to_cart]' , '',
'value', 'text',
@$this->element->hikashop_params['add_to_cart']); ?>
							</td>
						</tr>
						<tr>
							<td class="key" valign="top">
								<?php echo JText::_('ADD_TO_WISHLIST_BUTTON');?>
							</td>
							<td>
								<?php if(hikashop_level(1)){
								if(!isset($this->element->hikashop_params['add_to_wishlist']))
$this->element->hikashop_params['add_to_wishlist'] =
'-1';
									echo JHTML::_('hikaselect.radiolist', $arr,
$this->control.'[add_to_wishlist]' , '',
'value', 'text',
@$this->element->hikashop_params['add_to_wishlist']);
								}else{
									$this->element->hikashop_params['add_to_wishlist']
= 0;
									echo hikashop_getUpgradeLink('essential');;
								} ?>							</td>
						</tr>
						<tr>
							<td class="key" valign="top">
								<?php echo JText::_('LINK_TO_PRODUCT_PAGE');?>
							</td>
							<td>
								<?php
								if(!isset($this->element->hikashop_params['link_to_product_page']))
$this->element->hikashop_params['link_to_product_page'] =
'-1';
								echo JHTML::_('hikaselect.radiolist', $arr,
$this->control.'[link_to_product_page]' , '',
'value', 'text',
@$this->element->hikashop_params['link_to_product_page']);
?>
							</td>
						</tr>
						<tr>
							<td class="key" valign="top">
								<?php echo JText::_('DISPLAY_VOTE');?>
							</td>
							<td>
								<?php
									if(!isset($this->element->hikashop_params['show_vote_product']))
$this->element->hikashop_params['show_vote_product'] =
'-1';
									echo JHTML::_('hikaselect.radiolist',  $arr,
$this->control.'[show_vote_product]', '',
'value', 'text',
@$this->element->hikashop_params['show_vote_product']);
								?>
							</td>
						</tr>
						<tr>
							<td class="key" valign="top">
								<?php echo JText::_('DISPLAY_PRICE');?>
							</td>
							<td>
								<?php
									if(!isset($this->element->hikashop_params['show_price']))
$this->element->hikashop_params['show_price'] =
'-1';
									echo JHTML::_('hikaselect.radiolist',  $arr,
$this->control.'[show_price]',
'onchange="switchDisplay(this.value,\'show_taxed_price_line\',\'1\');switchDisplay(this.value,\'show_original_price_line\',\'1\');switchDisplay(this.value,\'show_discount_line\',\'1\');switchDisplay(this.value,\'price_display_type_line\',\'1\');"',
'value', 'text',
@$this->element->hikashop_params['show_price']);
									if(!@$this->element->hikashop_params['show_price'])
$this->js
.='switchDisplay(0,\'show_taxed_price_line\',\'1\');switchDisplay(\'0\',\'price_display_type_line\',\'1\');switchDisplay(\'0\',\'show_original_price_line\',\'1\');switchDisplay(\'0\',\'show_discount_line\',\'1\');';
								?>
							</td>
						</tr>
						<tr>
							<td class="key" valign="top">
								<?php echo
JText::_('DISPLAY_OUT_OF_STOCK_PRODUCTS');?>
							</td>
							<td>
								<?php
									if(!isset($this->element->hikashop_params['show_out_of_stock']))
$this->element->hikashop_params['show_out_of_stock'] =
'-1';
									echo JHTML::_('hikaselect.radiolist',  $arr,
$this->control.'[show_out_of_stock]', '',
'value', 'text',
@$this->element->hikashop_params['show_out_of_stock']);
								?>
							</td>
						</tr>
						<tr id="show_taxed_price_line">
							<td class="key">
								<?php echo JText::_('SHOW_TAXED_PRICES');?>
							</td>
							<td>
								<?php
								if(!isset($this->element->hikashop_params['price_with_tax']))
$this->element->hikashop_params['price_with_tax'] = 3;
								echo
$this->pricetaxType->display($this->control.'[price_with_tax]'
, $this->element->hikashop_params['price_with_tax'],true);
?>
							</td>
						</tr>
						<tr id="show_original_price_line">
							<td class="key" valign="top">
								<?php echo JText::_('ORIGINAL_CURRENCY_PRICE');?>
							</td>
							<td>
								<?php
								if(!isset($this->element->hikashop_params['show_original_price']))
$this->element->hikashop_params['show_original_price'] =
'-1';
								echo JHTML::_('hikaselect.radiolist', $arr,
$this->control.'[show_original_price]' , '',
'value', 'text',
@$this->element->hikashop_params['show_original_price']);
?>
							</td>
						</tr>
						<tr id="show_discount_line">
							<td class="key" valign="top">
								<?php echo JText::_('SHOW_DISCOUNTED_PRICE');?>
							</td>
							<td>
								<?php
								if(!isset($this->element->hikashop_params['show_discount']))
$this->element->hikashop_params['show_discount'] = 3;
								echo $this->discountDisplayType->display(
$this->control.'[show_discount]'
,@$this->element->hikashop_params['show_discount']); ?>
							</td>
						</tr>
						<tr id="price_display_type_line">
							<td class="key">
								<?php echo JText::_('PRICE_DISPLAY_METHOD');?>
							</td>
							<td>
								<?php
								if(!isset($this->element->hikashop_params['price_display_type']))
$this->element->hikashop_params['price_display_type'] =
'inherit';
								echo $this->priceDisplayType->display(
$this->control.'[price_display_type]',@$this->element->hikashop_params['price_display_type']);
?>
							</td>
						</tr>
						<?php
						if(hikashop_level(2)){ ?>
							<tr>
								<td class="key">
									<?php echo
JText::_('DISPLAY_CUSTOM_ITEM_FIELDS');?>
								</td>
								<td>
									<?php
									if(!isset($this->element->hikashop_params['display_custom_item_fields']))
$this->element->hikashop_params['display_custom_item_fields']
= '-1';
									echo JHTML::_('hikaselect.radiolist', $arr,
$this->control.'[display_custom_item_fields]' , '',
'value', 'text',
@$this->element->hikashop_params['display_custom_item_fields']);
									?>
								</td>
							</tr>
							<tr>
								<td class="key">
									<?php echo JText::_('DISPLAY_FILTERS');?>
								</td>
								<td>
									<?php
									if(!isset($this->element->hikashop_params['display_filters']))
$this->element->hikashop_params['display_filters'] =
'-1';
									echo JHTML::_('hikaselect.radiolist', $arr,
$this->control.'[display_filters]' , '',
'value', 'text',
@$this->element->hikashop_params['display_filters']);
									?>
								</td>
							</tr>
						<?php } ?>
						<tr>
							<td class="key" valign="top">
								<?php echo JText::_('DISPLAY_BADGE');?>
							</td>
							<td>
								<?php
								if(!isset($this->element->hikashop_params['display_badges']))
$this->element->hikashop_params['display_badges'] =
'-1';
								echo JHTML::_('hikaselect.radiolist', $arr,
$this->control.'[display_badges]' , '',
'value', 'text',
@$this->element->hikashop_params['display_badges']); ?>
							</td>
						</tr>
					</table>
				</fieldset>
				<fieldset id="content_category"
class="adminform">
					<legend><?php echo
JText::_('PARAMS_FOR_CATEGORIES'); ?></legend>
					<table class="admintable table" cellspacing="1"
width="100%">
						<tr>
							<td class="key" valign="top">
								<?php echo JText::_('ORDERING_FIELD');?>
							</td>
							<td>
								<?php
								if(!isset($this->element->hikashop_params['category_order']))
$this->element->hikashop_params['category_order'] =
'inherit';
								echo
$this->orderType->display($this->control.'[category_order]',@$this->element->hikashop_params['category_order'],'category');?>
							</td>
						</tr>
						<tr>
							<td class="key" valign="top">
								<?php echo JText::_('SHOW_SUB_CATEGORIES');?>
							</td>
							<td>
								<?php
								if(!isset($this->element->hikashop_params['child_display_type']))
$this->element->hikashop_params['child_display_type'] =
'inherit';
								echo
$this->listType->display($this->control.'[child_display_type]',@$this->element->hikashop_params['child_display_type']);?>
							</td>
						</tr>
						<tr>
							<td class="key" valign="top">
								<?php echo JText::_('NUMBER_OF_SUB_CATEGORIES');?>
							</td>
							<td>
								<input name="<?php echo $this->control;
?>[child_limit]" type="text" value="<?php echo
@$this->element->hikashop_params['child_limit'];?>"
/>
							</td>
						</tr>
						<tr>
							<td class="key" valign="top">
								<?php echo JText::_('SHOW_NUMBER_OF_PRODUCTS');?>
							</td>
							<td>
								<?php
								if(!isset($this->element->hikashop_params['number_of_products']))
$this->element->hikashop_params['number_of_products'] =
'-1';
								echo JHTML::_('hikaselect.radiolist', $arr,
$this->control.'[number_of_products]' , '',
'value', 'text',
@$this->element->hikashop_params['number_of_products']);
								?>
							</td>
						</tr>
						<tr>
							<td class="key" valign="top">
								<?php echo
JText::_('ONLY_DISPLAY_CATEGORIES_WITH_PRODUCTS');?>
							</td>
							<td>
								<?php
								if(!isset($this->element->hikashop_params['only_if_products']))
$this->element->hikashop_params['only_if_products'] =
'-1';
								echo JHTML::_('hikaselect.radiolist', $arr,
$this->control.'[only_if_products]' , '',
'value', 'text',
@$this->element->hikashop_params['only_if_products']);
								?>
							</td>
						</tr>
					</table>
				</fieldset>
				<fieldset id="layout_div" class="adminform">
					<legend><?php echo JText::_('PARAMS_FOR_DIV');
?></legend>
					<?php
						if(hikashop_level(2)){
							$productEffect="";
							$productEffectDuration="";
							$paneHeight="";
							if($this->element->hikashop_params['div_item_layout_type']=='fade'){
								$productEffect='style="display:none"';
							}else
if($this->element->hikashop_params['div_item_layout_type']=='img_pane'){
								$productEffect='style="display:none"';
								$productEffectDuration='style="display:none"';
							}else
if($this->element->hikashop_params['div_item_layout_type']!='slider_horizontal'
&&
$this->element->hikashop_params['div_item_layout_type']!='slider_vertical'){
								$productEffect='style="display:none"';
								$productEffectDuration='style="display:none"';
							}
						}
					?>
					<table class="admintable table" cellspacing="1"
width="100%">
						<tr>
							<td class="key">
								<?php echo JText::_('IMAGE_X');?>
							</td>
							<td>
								<input size=12 name="<?php echo
$this->control;?>[image_width]" type="text"
value="<?php echo
@$this->element->hikashop_params['image_width'];?>"
/> px
							</td>
						</tr>
						<tr>
							<td class="key">
								<?php echo JText::_('IMAGE_Y');?>
							</td>
							<td>
								<input size=12 name="<?php echo
$this->control;?>[image_height]" type="text"
value="<?php echo
@$this->element->hikashop_params['image_height'];?>"
/> px
							</td>
						</tr>
						<tr>
							<td class="key" valign="top">
								<?php echo JText::_('TYPE_OF_ITEM_LAYOUT');?>
							</td>
							<td>
								<?php
								if(!isset($this->element->hikashop_params['div_item_layout_type']))
$this->element->hikashop_params['div_item_layout_type'] =
'inherit';
								echo
$this->itemType->display($this->control.'[div_item_layout_type]',@$this->element->hikashop_params['div_item_layout_type'],$this->js,
'onchange="setVisibleLayoutEffect(this.value);"');?>
							</td>
						</tr>
						<?php if(hikashop_level(2)){ ?>
							<tr id="product_effect" <?php echo $productEffect;
?>>
								<td class="key">
									<?php echo
JText::_('PRODUCT_TRANSITION_EFFECT');?>
								</td>
								<td>
									<?php echo
$this->transition_effectType->display($this->control.'[product_transition_effect]',@$this->element->hikashop_params['product_transition_effect']);?>
								</td>
							</tr>
							<tr id="product_effect_duration" <?php echo
$productEffectDuration; ?>>
								<td class="key">
									<?php echo JText::_('PRODUCT_EFFECT_DURATION');?>
								</td>
								<td>
									<input size=12 name="<?php echo
$this->control;?>[product_effect_duration]"
type="text" value="<?php echo
@$this->element->hikashop_params['product_effect_duration'];?>"
/> ms
								</td>
							</tr>
						<?php } ?>
						<tr>
							<td class="key">
								<?php echo JText::_('PANE_HEIGHT');?>
							</td>
							<td>
								<input size=12 name="<?php echo
$this->control;?>[pane_height]" type="text"
value="<?php echo
@$this->element->hikashop_params['pane_height'];?>"
/> px
							</td>
						</tr>
						<tr>
							<td class="key" valign="top">
								<?php echo JText::_('ITEM_BOX_COLOR');?>
							</td>
							<td>
								<?php echo
$this->colorType->displayAll('',$this->control.'[background_color]',@$this->element->hikashop_params['background_color']);
?>
							</td>
						</tr>
						<tr>
							<td class="key">
								<?php echo JText::_('ITEM_BOX_MARGIN');?>
							</td>
							<td>
								<input name="<?php echo
$this->control;?>[margin]" type="text"
value="<?php echo
@$this->element->hikashop_params['margin'];?>"
/> px
							</td>
						</tr>
						<tr>
							<td class="key" valign="top">
								<?php echo JText::_('ITEM_BOX_BORDER');?>
							</td>
							<td>
								<?php
								if(!isset($this->element->hikashop_params['border_visible']))
$this->element->hikashop_params['border_visible'] =
'-1';
								$arr2 = $arr;
								$arr2[] = JHTML::_('select.option', 2,
JText::_('THUMBNAIL'));
								echo JHTML::_('hikaselect.radiolist', $arr2,
$this->control.'[border_visible]' , '',
'value', 'text',
@$this->element->hikashop_params['border_visible']);
								?>
							</td>
						</tr>
						<tr>
							<td class="key" valign="top">
								<?php echo JText::_('ITEM_BOX_ROUND_CORNER');?>
							</td>
							<td>
								<?php
								if(!isset($this->element->hikashop_params['rounded_corners']))
$this->element->hikashop_params['rounded_corners'] =
'-1';
								echo JHTML::_('hikaselect.radiolist', $arr,
$this->control.'[rounded_corners]' , '',
'value', 'text',
@$this->element->hikashop_params['rounded_corners']);
								?>
							</td>
						</tr>
						<tr>
							<td class="key" valign="top">
								<?php echo JText::_('TEXT_CENTERED');?>
							</td>
							<td>
								<?php
								if(!isset($this->element->hikashop_params['text_center']))
$this->element->hikashop_params['text_center'] =
'-1';
								echo JHTML::_('hikaselect.radiolist', $arr,
$this->control.'[text_center]' , '',
'value', 'text',
@$this->element->hikashop_params['text_center']);
								?>
							</td>
						</tr>
					</table>
				</fieldset>
				<fieldset id="layout_list"
class="adminform">
					<legend><?php echo JText::_('PARAMS_FOR_LIST');
?></legend>
					<table class="admintable table" cellspacing="1"
width="100%">
						<tr>
							<td class="key">
								<?php echo JText::_('UL_CLASS_NAME');?>
							</td>
							<td>
								<input name="<?php echo
$this->control;?>[ul_class_name]" type="text"
value="<?php echo
@$this->element->hikashop_params['ul_class_name'];?>"
/>
							</td>
						</tr>
					</table>
				</fieldset>

			<?php

if(!HIKASHOP_BACK_RESPONSIVE) { ?>
			</td>
		</tr>
	</table>
</div>
<?php } else { ?>
	</div>
</div>
<?php }

	if (!empty($cid))
{menus/tmpl/index.html000064400000000032151162050350010635
0ustar00nt)@$this->element->id;
?>menus/tmpl/listing.php000064400000010425151162050350011031
0ustar00menus/tmpl/index.html000064400000000032151162050350010635
0ustar00<html><body></body></html>menus/tmpl/listing.php000064400000010425151162050350011031
0ustar00<?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');
?>	<div class="iframedoc"
id="iframedoc"></div>
	<form action="index.php?option=<?php echo HIKASHOP_COMPONENT
?>&amp;ctrl=menus" method="post" 
name="adminForm" id="adminForm">
		<table>
			<tr>
				<td width="100%">
					<?php echo JText::_( 'FILTER' ); ?>:
					<input type="text" name="search"
id="search" value="<?php echo
$this->escape($this->pageInfo->search);?>"
class="text_area" />
					<button class="btn"
onclick="this.form.submit();"><?php echo JText::_(
'GO' ); ?></button>
					<button class="btn"
onclick="document.getElementById('search').value='';this.form.submit();"><?php
echo JText::_( 'RESET' ); ?></button>
				</td>
			</tr>
		</table>
		<table class="adminlist table table-striped table-hover"
cellpadding="1">
			<thead>
				<tr>
					<th class="title titlenum">
						<?php echo JText::_( 'HIKA_NUM' );?>
					</th>
					<th class="title titlebox">
						<input type="checkbox" name="toggle"
value="" onclick="hikashop.checkAll(this);" />
					</th>
					<th class="title">
						<?php
if(version_compare(JVERSION,'1.6','<')){
							echo JHTML::_('grid.sort',
JText::_('HIKA_NAME'), 'name',
$this->pageInfo->filter->order->dir,$this->pageInfo->filter->order->value
);
						}else{
							echo JHTML::_('grid.sort',
JText::_('HIKA_TITLE'), 'title',
$this->pageInfo->filter->order->dir,$this->pageInfo->filter->order->value
);
						}?>
					</th>
					<th class="title">
						<?php echo JHTML::_('grid.sort',
JText::_('HIKA_ALIAS'), 'alias',
$this->pageInfo->filter->order->dir,$this->pageInfo->filter->order->value
); ?>
					</th>
					<th class="title">
						<?php echo JText::_('HIKA_TYPE'); ?>
					</th>
					<th class="title">
						<?php echo JHTML::_('grid.sort',
JText::_('LINK'), 'link',
$this->pageInfo->filter->order->dir,$this->pageInfo->filter->order->value
); ?>
					</th>
					<th class="title titletoggle">
						<?php echo JText::_('HIKA_ENABLED'); ?>
					</th>
					<th class="title titleid">
						<?php echo JHTML::_('grid.sort', JText::_(
'ID' ), 'id',
$this->pageInfo->filter->order->dir,$this->pageInfo->filter->order->value
); ?>
					</th>
				</tr>
			</thead>
			<tbody>
				<?php
					$k = 0;

					$i = 0;
					foreach($this->rows as $row){

						$publishedid = 'published-'.$row->id;
				?>
					<tr class="<?php echo "row$k"; ?>">
						<td align="center">
						<?php echo $i+1 ?>
						</td>
						<td align="center">
							<?php echo JHTML::_('grid.id', $i, $row->id );
?>
						</td>
						<td>
							<?php if($this->manage){ ?>
	menus/tmpl/options.php000064400000037666151162050350011073 0ustar00o
$this->toggleClass->display('activate',$row->published);
} ?>
						</td>
						<td align="center">
							<?php echo $row->id; ?>
						</td>
					</tr>
				<?php
						$k = 1-$k;
						$i++;
					}
				?>
			</tbody>
		</table>
		<input type="hidden" name="option"
value="<?php echo HIKASHOP_COMPONENT; ?>" />
		<input type="hidden" name="task"
value="" />
		<input type="hidden" name="ctrl"
value="<?php echo JRequest::getCmd('ctrl'); ?>"
/>
		<input type="hidden" name="boxchecked"
value="0" />
		<input type="hidden" name="filter_order"
value="<?php echo
$this->pageInfo->filter->order->value; ?>" />
		<input type="hidden" name="filter_order_Dir"
value="<?php echo $this->pageInfo->filter->order->dir;
?>" />
		<?php echo JHTML::_( 'form.token' ); ?>
	</form>
menus/tmpl/options.php000064400000037666151162050350011073
0ustar00<?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
if(!isset($this->element['layout_type']))
	$this->element['layout_type'] = 'inherit';
if (HIKASHOP_J40) {
?>
<style>
	legend,
	fieldset#fieldset-basic small.form-text.text-muted,
	section#attrib-products small.form-text.text-muted {
		display: none;
	}
	fieldset#fieldset-basic,
	fieldset#fieldset-products {
		border: none;
		padding: 0px;
		margin: 0px;
	}
	section#attrib-basic,
	section#attrib-products {
		padding: 0px;
	}
	main form div.row.title-alias.form-vertical.mb-3 {
		margin: 0px !important;
	}
</style>
<?php
}

?>
<div id="hikashop_main_content_<?php echo $this->type;
?>" class="hikashop_main_content hk-container-fluid
item-menu-interface hika_j<?php echo (int)HIKASHOP_JVERSION;
?>">
	<div id="hikashop_menu_backend_page_edition">
		<div class="hk-row-fluid hikashop_edit_display_type">
<?php
	$this->layoutType->load();
	$grid_class = ($this->type == 'category') ?
'hkc-xl-4' : 'hkc-xl-3';
	foreach($this->layoutType->values as $value) {
		$src = strtolower($value->value);
		if($this->type == 'category' && $value->value ==
'table')
			continue;
		if($value->value == 'inherit' && $this->type ==
'product')
			$value->text = $value->text.'
('.$this->default_params['layout_type'].')';
		if($value->value == 'inherit' && $this->type ==
'category')
			$value->text = $value->text.' (div)';
?>
			<div class="<?php echo $grid_class; ?>
hikashop_menu_block_content_type hikashop_menu_edit_display_type_<?php
echo $value->value; ?>"
onclick="window.optionMgr.tabChange(this);"
data-type="<?php echo $this->type; ?>_layout_choice"
data-layout="<?php echo
$this->type.'_'.$value->value; ?>">
				<img class="hikashop_menu_block_img_unselected"
src="<?php echo HIKASHOP_IMAGES; ?>icons/icon-24-<?php echo
$src; ?>.png">
				<img class="hikashop_menu_block_img_selected"
src="<?php echo HIKASHOP_IMAGES; ?>icons/icon-24-<?php echo
$src; ?>-selected.png">
				<?php echo $value->text; ?>
			</div>
<?php
	}
?>
			<input type="hidden" id="data_menu__<?php echo
$this->type; ?>_layout_type" name="<?php echo
$this->name; ?>[layout_type]" value="<?php echo
$this->element['layout_type']; ?>">
		</div>

		<div class="hikashop_menu_block
hikashop_menu_edit_display">
			<div class="hk-container-fluid
hikashop_menu_edit_display_settings">
<?php
	foreach($this->layoutType->values as $value) {
		if($this->type == 'category' && $value->value ==
'table')
			continue;
		if($value->value == 'inherit')
			continue;

		$this->setLayout('options_display_'.$value->value);
		echo $this->loadTemplate();
	}
?>
			</div>
		</div>

		<div class="hk-row-fluid hikashop_menu_block
hikashop_menu_edit_general">
<?php
		$this->setLayout('options_main');
		echo $this->loadTemplate();

		if($this->type == 'category') {
			$this->setLayout('options_category');
			echo $this->loadTemplate();
		} elseif($this->type == 'product') {
			$this->setLayout('options_product');
			echo $this->loadTemplate();
		}
?>
		</div>

		<div class="hk-row-fluid hikashop_menu_block
hikashop_menu_edit_extra" data-type="<?php echo
$this->type; ?>" data-display-tab="div">
<?php
		if(@$this->element['enable_carousel']){
			$this->setLayout('options_product_extra');
			echo $this->loadTemplate();
		}
?>
		</div>
<?php
if(!empty($this->extra_blocks['layouts'])) {
?>
	<div class="hk-row-fluid hikashop_menu_block
hikashop_menu_edit_extrablocks">
<?php
	foreach($this->extra_blocks['layouts'] as $key => $r) {
		if(is_string($r)) {
			echo $r;
			continue;
		}
		if(!is_array($r))
			continue;

		if(!isset($r['name']) && isset($r[0]))
			$r['name'] = $r[0];
		if(!isset($r['value']) && isset($r[1]))
			$r['value'] = $r[1];
?>
<div class="hkc-xl-4 hikashop_menu_subblock
hikashop_menu_edit_extrablock_<?php echo $key; ?>">
	<div class="hikashop_menu_subblock_content">
		<div class="hikashop_menu_subblock_title
hikashop_menu_edit_<?php echo $key; ?>_title"><?php echo
JText::_(@$r['name']); ?></div>
<?php
		if(is_array($r['value'])) {
?>
		<dl class="hika_options">
<?php
				foreach($r['value'] as $k => $v) {
?>
			<dt class="hikashop_option_name"><?php echo
JText::_($k); ?></dt>
			<dd class="hikashop_option_value"><?php echo $v;
?></dd>
<?php
				}
?>
		</dl>
<?php
		} else {
			echo $r['value'];
		}
?>
	</div>
</div>
<?php
	}
?>
	</div>
<?php
}
?>
	</div>
</div>
<?php
$js = "
window.hikashop.ready(function(){
	if(hkjQuery('#attrib-products')){
		hkjQuery('#attrib-products .control-group').hide();
		hkjQuery('#attrib-basic .control-group').hide();
	}
";
$js .= "
	hkjQuery('div[data-type=\'".$this->type."_layout\']').hide();
	window.optionMgr.tabChange('div[data-layout=\'".$this->type."_".$this->element['layout_type']."\']');
";
$js .= "
	hkjQuery('#hikashop_menu_backend_page_edition
.hikashop_menu_edit_display
.hikashop_option_value').find('input').change(function(){
		var name = hkjQuery(this).attr('name');
		var val = hkjQuery(this).val();
		hkjQuery('[name=\''+name+'\']').val(val);
	});
	hkjQuery('#hikashop_menu_backend_page_edition
.hikashop_menu_edit_display
.hikashop_option_value').find('select').change(function(){
		var name = hkjQuery(this).attr('name');
		var val = hkjQuery(this).val();
		hkjQuery('[name=\''+name+'\']').val(val);
	});
";
$js .= "
	window.optionMgr.showCarouselOptions('carousel','".@$this->element['enable_carousel']."','".$this->name."');
	hkjQuery('.hikashop_menu_edit_extra
.hikashop_option_value').find('input').change(function(){
		window.optionMgr.showCarouselOptions(''+hkjQuery(this).parent().parent().attr('data-control')+'',''+hkjQuery(this).val()+'',''+hkjQuery(this).attr('name')+'');
	});
	hkjQuery('.hikashop_menu_edit_extra
.hikashop_option_value').find('select').change(function(){
		window.optionMgr.showCarouselOptions(''+hkjQuery(this).parent().attr('data-control')+'',''+hkjQuery(this).val()+'',''+hkjQuery(this).attr('name')+'');
	});
";
$js .= "
	window.optionMgr.hideDisplayOptions();
	hkjQuery('.hikashop_option_value').find('input').change(function(){
		window.optionMgr.hideDisplayOptions(''+hkjQuery(this).attr('name')+'',''+hkjQuery(this).val()+'');
	});
	hkjQuery('.hikashop_option_value').find('select').change(function(){
		window.optionMgr.hideDisplayOptions(''+hkjQuery(this).attr('name')+'',''+hkjQuery(this).val()+'');
	});
";
$js .="
	hkjQuery('.listing_item_quantity_fields
input').change(function(){
		var name =
hkjQuery(this).attr('name').replace('[columns]','').replace('[rows]','');
		var listType = hkjQuery(this).parent().attr('data-list-type');
		var cCol = 1;
		if(listType != 'table')
			cCol =
hkjQuery('input[name=\''+name+'[columns]\']').val();
		var cRow =
hkjQuery('input[name=\''+name+'[rows]\']').val();
		hkjQuery('input[name=\''+name+'[limit]\']').val(parseInt(cRow)
* parseInt(cCol));
		window.optionMgr.fillSelector(cCol,cRow,name);
	});
	hkjQuery('.listing_item_quantity_fields
.hikashop_product_listing_input_button').click(function(){
		var ref = hkjQuery(this).attr('data-ref'),
		inc = hkjQuery(this).attr('data-inc');
		if(inc == 'plus'){
			hkjQuery('input[name=\''+ref+'\']').val(parseInt(hkjQuery('input[name=\''+ref+'\']').val())
+ 1).trigger('change');
		}else
if(parseInt(hkjQuery('input[name=\''+ref+'\']').val())
> 1){
			hkjQuery('input[name=\''+ref+'\']').val(parseInt(hkjQuery('input[name=\''+ref+'\']').val())
- 1).trigger('change');
		}
	});
	hkjQuery('.listing_item_quantity_selector
div').mouseover(function(){
		var classes = hkjQuery(this).attr('class').split('
');
		window.optionMgr.fillSelector(parseInt(classes[0].replace('col',''))+1,parseInt(classes[1].replace('row',''))+1,hkjQuery(this).parent().attr('data-name'));
	});
	hkjQuery('.listing_item_quantity_selector
div').click(function(){
		var name = hkjQuery(this).parent().attr('data-name');
		var classes = hkjQuery(this).attr('class').split('
');
		hkjQuery('input[name=\''+name+'[columns]\']').val(parseInt(classes[0].replace('col',''))+1);
		hkjQuery('input[name=\''+name+'[rows]\']').val(parseInt(classes[1].replace('row',''))+1);
		hkjQuery('input[name=\''+name+'[limit]\']').val((parseInt(classes[0].replace('col',''))+1)
* (parseInt(classes[1].replace('row',''))+1));
	});
	hkjQuery('.listing_item_quantity_selector').mouseleave(function(){
		var name = hkjQuery(this).attr('data-name');
		var cCol =
hkjQuery('input[name=\''+name+'[columns]\']').val();
		var limit =
hkjQuery('input[name=\''+name+'[limit]\']').val();
		var cRow = 0;
		if(limit != 0)
			cRow = limit / cCol;
		Math.ceil(cRow);
		window.optionMgr.fillSelector(cCol,cRow,name);
	});
});
";
$js .= "var defaultParams = [];";
foreach($this->default_params as $k => $v){
	$js .= "defaultParams['".$k."'] =
'".str_replace(array("\\", "'"),
array("\\\\", "\'"), $v)."';";
}
$js .= "
window.optionMgr = {
	cpt:{
	},
	fillSelector : function(cCol,cRow,name) {
		hkjQuery('.listing_item_quantity_selector[data-name=\''+name+'\']
div').each(function(){
			var classes = hkjQuery(this).attr('class').split('
');
			var col = parseInt(classes[0].replace('col',''));
			var row = parseInt(classes[1].replace('row',''));
			hkjQuery(this).removeClass('selected');
			if(col < cCol && row < cRow)
				hkjQuery(this).addClass('selected');
		});
	},
	tabChange : function(el) {
		var val = hkjQuery(el).attr('data-layout');
		if(val == 'category_table')
			val = 'category_inherit';
		var info = val.split('_');
		if(info[1] == 'inherit'){
			if(info[0] == 'category' &&
'".$this->default_params['layout_type']."'
== 'table'){
				val = info[0]+'_div';
			}else{
				val =
info[0]+'_".$this->default_params['layout_type']."';
			}
		}
		hkjQuery('div[data-type=\''+info[0]+'_layout\']').css('display','none');
		hkjQuery('div[data-layout=\''+val+'\']').css('display','');
		hkjQuery('#data_menu__'+info[0]+'_layout_type').val(info[1]);
		hkjQuery('div[data-type=\''+info[0]+'_layout_choice\']').removeClass('selected');
		hkjQuery(el).addClass('selected');
		if(info[1] == 'div')
			hkjQuery('div[data-display-tab=\'div\']').show();
		else
			hkjQuery('div[data-display-tab=\'div\']').hide();
	},
	hideDisplayOptions : function(optionName,newValue) {
		var dynamicHide = {
			'child_display_type': {
				'hideValues': ['nochild','inherit'],
				'hideOptions': ['child_limit']
			},
			'div_item_layout_type': {
				'hideValues': ['title','inherit'],
				'hideOptions':
['image_width','image_height']
			},
			'show_price': {
				'hideValues': ['0','-1'],
				'hideOptions':
['price_display_type','price_with_tax','show_original_price','show_discount']
			}
		};
		if(optionName === undefined || newValue === undefined){
			var optPrefix =
['".$this->name."','".$this->name."'],
done = false;
			optPrefix[0] =
optPrefix[0].replace('hk_category','hk_product').replace('hk_product','hk_category');
			optPrefix[1] =
optPrefix[1].replace('hk_product','hk_category').replace('hk_category','hk_product');
			for(var x = 0; x <= 1; x++){
				hkjQuery.each(dynamicHide, function(mainOption,values){
					var currentValue =
hkjQuery('[name=\''+optPrefix[x]+'['+mainOption+']\'][checked=\'checked\']').val();
					if(currentValue === undefined)
						currentValue =
hkjQuery('[name=\''+optPrefix[x]+'['+mainOption+']\']').val();
					if((currentValue == 'inherit' || currentValue ==
'-1'))
						currentValue = defaultParams[mainOption];
					if(hkjQuery.inArray(currentValue,dynamicHide[mainOption]['hideValues'])
!= '-1'){
						hkjQuery.each(values['hideOptions'],function(index,
optionList){
							option = optionList.split(',');
							for(var i = option.length - 1; i >= 0; i--){
								hkjQuery('[name=\''+optPrefix[x]+'['+option+']\']').parent().parent('.hika_options').hide();
								hkjQuery('[name=\''+optPrefix[x]+'['+option+']\']').parent().parent().parent('.hika_options').hide();
							}
						});
					}
				});
			}
		}else{
			if(optionName.match(/hk_category/g)){
				optionName =
optionName.replace('jform[params][hk_category][','').replace(']','');
				var optPrefix = 'jform[params][hk_category]';
			}else{
				optionName =
optionName.replace('jform[params][hk_product][','').replace(']','');
				var optPrefix = 'jform[params][hk_product]';
			}
			if(dynamicHide[optionName] === undefined)
				return;
			if((newValue == 'inherit' || newValue == '-1'))
				newValue = defaultParams[optionName];
			if(hkjQuery.inArray(newValue,dynamicHide[optionName]['hideValues'])
!= '-1'){
				hkjQuery.each(dynamicHide[optionName]['hideOptions'],function(j,
option){
					hkjQuery('[name=\''+optPrefix+'['+option+']\']').parent().parent('.hika_options').hide();
					hkjQuery('[name=\''+optPrefix+'['+option+']\']').parent().parent().parent('.hika_options').hide();
				});
			}else{
				hkjQuery.each(dynamicHide[optionName]['hideOptions'],function(j,
option){
					hkjQuery('[name=\''+optPrefix+'['+option+']\']').parent().parent('.hika_options').show();
					hkjQuery('[name=\''+optPrefix+'['+option+']\']').parent().parent().parent('.hika_options').show();
				});
			}
		}
	},
	showCarouselOptions : function(dataControl,value,name){
		var type = 'product';
		var optPrefix = 'jform[params][hk_product]';
		if(name !== undefined && name.match(/category/g)){
			type = 'category';
			optPrefix = 'jform[params][hk_category]';
		}
		var mainValue = value;
		var dataParts = [dataControl];
		if(dataControl == 'carousel'){
			if(value == 1){
				hkjQuery('[data-type=\''+type+'\'] 
.hikashop_menu_edit_product_extra_part2').show();
				dataParts =
['effect','paginationthumbnail','pagination','autoslide','carousel'];
			}else{
				hkjQuery('[data-type=\''+type+'\'] 
.hikashop_menu_edit_product_extra_part2').hide();
				dataParts =
['carousel','effect','autoslide','pagination','paginationthumbnail'];
			}
		}else if(dataControl == 'pagination'){
			dataParts = ['paginationthumbnail','pagination'];
		}
		for(var i = dataParts.length - 1; i >= 0; i--){
			if(dataParts[i] != dataControl && (dataControl !=
'carousel' || mainValue != 0)){
				if(dataParts[i] == 'carousel')
					value =
hkjQuery('[name=\''+optPrefix+'[enable_carousel]\'][checked=\'checked\']').val();
				if(dataParts[i] == 'effect')
					value =
hkjQuery('[name=\''+optPrefix+'[carousel_effect]\']').val();
				if(dataParts[i] == 'pagination')
					value =
hkjQuery('[name=\''+optPrefix+'[pagination_type]\']').val();
				imenus/tmpl/options_category.php000064400000005131151162050350012746
0ustar00enusJs = $js;
else
	$hkMenusJs = "
window.hikashop.ready(function(){
	hkjQuery('div[data-type=\'".$this->type."_layout\']').hide();
	window.optionMgr.tabChange('div[data-layout=\'".$this->type."_".$this->element['layout_type']."\']');
});
	";
$hkMenusJs .= "
window.hikashop.ready(function(){
	window.hikashop.dlTitle('hikashop_main_content_" .
$this->type . "');
});
";
if(HIKASHOP_J40) {
	$hkMenusJs .= "
window.hikashop.ready(function(){
	var mainDiv =
document.getElementById('hikashop_main_content_category');
	if(mainDiv) {
		mainDiv.parentNode.classList.remove('column-count-md-2');
		mainDiv.parentNode.classList.remove('column-count-lg-3');
	}
	mainDiv =
document.getElementById('hikashop_main_content_product');
	mainDiv.parentNode.classList.remove('column-count-md-2');
	mainDiv.parentNode.classList.remove('column-count-lg-3');
});
";
}
$doc = JFactory::getDocument();
$doc->addScriptDeclaration($hkMenusJs);
menus/tmpl/options_category.php000064400000005131151162050350012746
0ustar00<?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');
?><div class="hkc-xl-4 hkc-md-6 hikashop_menu_subblock
hikashop_menu_edit_category">
	<div class="hikashop_menu_subblock_content">
		<div class="hikashop_menu_subblock_title
hikashop_menu_edit_display_settings_div_title"><?php echo
JText::_('HIKA_CATEGORY_SETTINGS'); ?></div>
		<dl class="hika_options">
			<dt class="hikashop_option_name">
				<label for="data_menu__<?php echo $this->type;
?>_child_display_type"><?php echo JText::_(
'HIKA_SUB_CATEGORIES' ); ?></label>
			</dt>
			<dd class="hikashop_option_value">
				<?php
				if(!isset($this->element['child_display_type']))
$this->element['child_display_type'] = 'inherit';
				echo
$this->listType->display($this->name.'[child_display_type]',$this->element['child_display_type']);
				?>
			</dd>
		</dl>
		<dl class="hika_options">
			<dt
class="hikashop_option_nmenus/tmpl/options_display_div.php000064400000030307151162050350013443
0ustar00"hika_options">
			<dt class="hikashop_option_name">
				<label for="data_menu__<?php echo $this->type;
?>_only_if_products">
					<?php echo
hikashop_hktooltip(JText::_('ONLY_DISPLAY_CATEGORIES_WITH_PRODUCTS'),
'', JText::_('HIKA_ONLY_WITH_PRODUCTS'), '',
0);?>
				</label>
			</dt>
			<dd class="hikashop_option_value">
				<?php
				if(!isset($this->element['only_if_products']))
$this->element['only_if_products'] = '-1';
				echo JHTML::_('hikaselect.inheritRadiolist',
$this->name.'[only_if_products]',
$this->element['only_if_products']);
				?>
			</dd>
		</dl>
	</div>
</div>
menus/tmpl/options_display_div.php000064400000030307151162050350013443
0ustar00<?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
$showDescription =
!in_array(@$this->element['div_item_layout_type'],
array('fade','slider_horizontal','slider_vertical'))
? 'style="display:none"' : '';

if(hikashop_level(2)){
	$productEffect="";
	$productEffectDuration="";
	$paneHeight="";
	if(!isset($this->element['div_item_layout_type'])){
		$this->element['div_item_layout_type']='inherit';
	}
	if($this->element['div_item_layout_type']=='fade'){
		$productEffect='style="display:none"';
	}else
if($this->element['div_item_layout_type']=='img_pane'){
		$productEffect='style="display:none"';
		$productEffectDuration='style="display:none"';
	}else
if($this->element['div_item_layout_type']!='slider_horizontal'
&&
$this->element['div_item_layout_type']!='slider_vertical'){
		$productEffect='style="display:none"';
		$productEffectDuration='style="display:none"';
	}
}
?>
<div class="hk-row-fluid
hikashop_menu_edit_display_settings_div" data-type="<?php echo
$this->type; ?>_layout" data-layout="<?php echo
$this->type; ?>_div">
	<div class="hkc-xl-4 hkc-md-6 hikashop_menu_subblock
hikashop_menu_edit_display_settings_subdiv">
		<div class="hikashop_menu_subblock_content">
			<div class="hikashop_menu_subblock_title
hikashop_menu_edit_display_settings_div_title"><?php echo
JText::_('HIKA_ITEMS'); ?></div>
			<dl class="hika_options">
				<dt class="hikashop_option_name">
					<label class="field_rows"><?php echo JText::_(
'FIELD_ROWS' ); ?></label>
				</dt>
				<dd class="hikashop_option_value">
					<p class="field_columns"><?php echo JText::_(
'FIELD_COLUMNS' ); ?></p>
					<div class="listing_item_quantity_selector"
data-name="<?php echo $this->name; ?>">
<?php
		if(!isset($this->element['limit']))
			$this->element['limit'] = '20';
		$colsNb = @$this->element['columns'];
		$rowsNb = 0;
		if(@$this->element['columns'] != 0)
			$rowsNb = round($this->element['limit'] /
$this->element['columns']);
		for($j = 0; $j < 12; $j++){
			for($i = 0; $i < 6; $i++){
				$class = ($i < $colsNb && $j < $rowsNb) ? '
selected' : '';
				echo '<div class="col'.$i.' row'.$j.'
listing_div'.$class.'"></div>';
			}
			echo '<br/>';
		}
?>
					</div>
					<div class="listing_item_quantity_fields"
data-list-type="div">
						<div class="input-append">
							<input type="text"
class="hikashop_product_listing_input" name="<?php echo
$this->name; ?>[columns]" value="<?php echo $colsNb;
?>">
							<div class="add-on
hikashop_product_listing_input_buttons">
								<div class="hikashop_product_listing_input_button
hikashop_product_listing_input_plus" data-ref="<?php echo
$this->name; ?>[columns]"
data-inc="plus">+</div>
								<div class="hikashop_product_listing_input_button
hikashop_product_listing_input_minus" data-ref="<?php echo
$this->name; ?>[columns]"
data-inc="minus">&ndash;</div>
							</div>
						</div>
						x
						<div class="input-append">
							<input type="text"
class="hikashop_product_listing_input" name="<?php echo
$this->name; ?>[rows]" value="<?php echo $rowsNb;
?>">
							<div class="add-on
hikashop_product_listing_input_buttons">
								<div class="hikashop_product_listing_input_button
hikashop_product_listing_input_plus" data-ref="<?php echo
$this->name; ?>[rows]"
data-inc="plus">+</div>
								<div class="hikashop_product_listing_input_button
hikashop_product_listing_input_minus" data-ref="<?php echo
$this->name; ?>[rows]"
data-inc="minus">&ndash;</div>
							</div>
						</div>
					</div>
				</dd>
			</dl>
			<dl style="display: none;"
class="hika_options">
				<dt class="hikashop_option_name">
					<label for="data_menu__<?php echo $this->type;
?>_columns"><?php echo JText::_(
'NUMBER_OF_COLUMNS' ); ?></label>
				</dt>
				<dd class="hikashop_option_value">
					<?php if(!isset($this->element['columns']))
$this->element['columns'] = '3'; ?>
					<input type="text" id="data_menu__<?php echo
$this->type; ?>_columns" name="<?php echo
$this->name; ?>[columns]" value="<?php echo
$this->element['columns']; ?>">
				</dd>
			</dl>
			<dl style="display: none;"
class="hika_options">
				<dt class="hikashop_option_name">
					<label for="data_menu__<?php echo $this->type;
?>_limit"><?php echo JText::_( 'NUMBER_OF_ITEMS' );
?></label>
				</dt>
				<dd class="hikashop_option_value">
					<?php if(!isset($this->element['limit']))
$this->element['limit'] = '20'; ?>
					<input type="text" id="data_menu__<?php echo
$this->type; ?>_limit" name="<?php echo $this->name;
?>[limit]" value="<?php echo
$this->element['limit']; ?>">
				</dd>
			</dl>
			<?php if((($this->menu == 'product') || ($this->menu
== 'category')) && ($this->type ==
'product')){ ?>
			<dl class="hika_options"><?php
				if(!isset($this->element['enable_switcher']))
$this->element['enable_switcher'] = 0; ?>
				<dt class="hikashop_option_name"><?php
					echo JText::_('HIKA_SWITCHER_MODE');
				?></dt>
				<dd class="hikashop_option_value">
					<?php
					if(!isset($this->element['enable_switcher']))
$this->element['enable_switcher'] = '-1';
					echo JHTML::_('hikaselect.inheritRadiolist',
$this->name.'[enable_switcher]',
@$this->element['enable_switcher']);
					?>
				</dd>
			</dl>
			</dl>
			<?php } ?>
		</div>
	</div>
	<div class="hkc-xl-4 hkc-md-6 hikashop_menu_subblock
hikashop_menu_edit_display_settings_subdiv">
		<div class="hikashop_menu_subblock_content">
			<div class="hikashop_menu_subblock_title
hikashop_menu_edit_display_settings_div_title"><?php echo
JText::_('HIKA_ITEM_LAYOUT'); ?></div>
			<dl class="hika_options">
				<dt class="hikashop_option_name"><?php
					echo JText::_('HIKA_LAYOUT_TYPE');
				?></dt>
				<dd class="hikashop_option_value"><?php
					if(!isset($this->element['div_item_layout_type']))
$this->element['div_item_layout_type'] = 'inherit';
					echo
$this->itemType->display($this->name.'[div_item_layout_type]',@$this->element['div_item_layout_type'],$this->js,
'');
				?></dd>
			</dl>
			<dl class="hika_options">
				<dt class="hikashop_option_name"><?php
					echo JText::_('IMAGE_X');
				?></dt>
				<dd class="hikashop_option_value">
					<input size=12 name="<?php echo $this->name;
?>[image_width]" type="text" value="<?php echo
@$this->element['image_width'];?>" /> px
				</dd>
			</dl>
			<dl class="hika_options">
				<dt class="hikashop_option_name"><?php
					echo JText::_('IMAGE_Y');
				?></dt>
				<dd class="hikashop_option_value">
					<input size=12 name="<?php echo $this->name;
?>[image_height]" type="text" value="<?php echo
@$this->element['image_height'];?>" /> px
				</dd>
			</dl>
<?php if(hikashop_level(2)){ ?>
			<dl class="hika_options layouteffect_hide layoutfade_hide"
id="product_effect" <?php echo $productEffect; ?>>
				<dt class="hikashop_option_name"><?php
					echo JText::_('HIKA_TRANSITION_EFFECT');
				?></dt>
				<dd class="hikashop_option_value"><?php
					echo
$this->transition_effectType->display($this->name.'[product_transition_effect]',@$this->element['product_transition_effect']);
				?></dd>
			</dl>
			<dl class="hika_options layouteffect_hide"
id="product_effect_duration" <?php echo
$productEffectDuration; ?>>
				<dt class="hikashop_option_name"><?php
					echo JText::_('HIKA_EFFECT_DURATION');
				?></dt>
				<dd class="hikashop_option_value">
					<input size=12 name="<?php echo $this->name;
?>[product_effect_duration]" type="text"
value="<?php echo
@$this->element['product_effect_duration'];?>" />
ms
				</dd>
			</dl>
<?php } ?>
			<dl class="hika_options">
				<dt class="hikashop_option_name"><?php
					echo JText::_('PANE_HEIGHT');
				?></dt>
				<dd class="hikashop_option_value">
					<input size=12 name="<?php echo $this->name;
?>[pane_height]" type="text" value="<?php echo
@$this->element['pane_height'];?>" /> px
				</dd>
			</dl>
			<dl class="hika_options">
				<dt class="hikashop_option_name"><?php
					echo JText::_('TEXT_CENTERED');
				?></dt>
				<dd class="hikashop_option_value"><?php
					if(!isset($this->element['text_center']))
$this->element['text_center'] = -1;
					echo JHTML::_('hikaselect.inheritRadiolist',
$this->name.'[text_center]',
@$this->element['text_center']);
				?></dd>
			</dl>
			<dl class="hika_options showdescription_hide" <?php echo
$showDescription; ?>>
				<dt class="hikashop_option_name"><?php
					echo JText::_('ELEMENT_DESCRIPTION');
				?></dt>
				<dd class="hikashop_option_value"><?php
					if(!isset($this->element['show_description_listing']))
$this->element['show_description_listing'] = 0;
					echo JHTML::_('hikaselect.booleanlist',
$this->name.'[show_description_listing]', '',
@$this->element['show_description_listing']);
				?></dd>
			</dl>
			<dl class="hika_options">
				<dt class="hikashop_option_name"><?php
					echo JText::_('HIKA_HEIGHT_CONSISTENCY');
				?></dt>
				<dd class="hikashop_option_value"><?php
					if(!isset($this->element['consistencyheight']))
$this->element['consistencyheight'] = 1;
					echo JHTML::_('hikaselect.booleanlist',
$this->name.'[consistencyheight]', '',
@$this->element['consistencyheight']);
				?></dd>
			</dl>
			<?php if($this->menu == 'product' || ($this->menu ==
'category' && $this->type == 'product')){
?>
			<dl class="hika_options">
				<dt class="hikashop_option_name"><?php
					echo JText::_('HIKA_INFINITE_SCROLL');
				?></dt>
				<dd class="hikashop_option_value"><?php
					if(!isset($this->element['infinite_scroll']))
$this->element['infinite_scroll'] = 0;
					echo JHTML::_('hikaselect.booleanlist',
$this->name.'[infinite_scroll]', '',
@$this->element['infinite_scroll']);
				?></dd>
			</dl>
			<?php } ?>
		</div>
	</div>
	<div class="hkc-xl-4 hkc-md-6 hikashop_menu_subblock
hikashop_menu_edit_display_settings_subdiv">
		<div class="hikashop_menu_subblock_content">
			<div class="hikashop_menu_subblock_title
hikashop_menu_edit_display_settings_div_title"><?php echo
JText::_('HIKA_ITEM_BOX_SETTINGS'); ?></div>
			<dl class="hika_options">
				<dt class="hikashop_option_name">
					<?php echo JText::_('BOX_COLOR');?>
				</dt>
				<dd class="hikashop_option_value">
					<?php echo
$this->colorType->displayAll('',$this->name.'[background_color]',@$this->element['background_color']);
?>
				</dd>
			</dl>
			<dl class="hika_options">
				<dt class="hikashop_option_name">
					<?php echo JText::_('BOX_MARGIN');?>
				</dt>
				<dd class="hikashop_option_value">
					<input name="<?php echo $this->name; ?>[margin]"
type="text" value="<?php echo
@$this->element['margin'];?>" /> px
				</dd>
			</dl>
			<dl class="hika_options">
				<dt class="hikashop_option_name">
			menus/tmpl/options_display_list.php000064400000011752151162050350013637
0ustar00</div>
	</div>
</div>
<?php
$js = "
window.hikashop.ready(function(){
	hkjQuery('select[name=\'".$this->name."[div_item_layout_type]\']').change(function(){
		if(hkjQuery(this).val()==\"slider_vertical\" ||
hkjQuery(this).val()==\"slider_horizontal\"){
			hkjQuery('.layouteffect_hide').show();
			hkjQuery('.showdescription_hide').show();
		}else if(hkjQuery(this).val()==\"fade\"){
			hkjQuery('.layouteffect_hide').show();
			hkjQuery('.showdescription_hide').show();
			hkjQuery('.layoutfade_hide').hide();
		}else{
			hkjQuery('.layouteffect_hide').hide();
			hkjQuery('.showdescription_hide').hide();
		}
	});
});
";
$doc = JFactory::getDocument();
$doc->addScriptDeclaration($js);
menus/tmpl/options_display_list.php000064400000011752151162050350013637
0ustar00<?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');
?><div class="hk-row-fluid
hikashop_menu_edit_display_settings_list" data-type="<?php
echo $this->type; ?>_layout" data-layout="<?php echo
$this->type; ?>_list">
	<div class="hkc-xl-4 hkc-md-6 hikashop_menu_subblock
hikashop_menu_edit_display_settings_subdiv">
		<div class="hikashop_menu_subblock_content">
			<div class="hikashop_menu_subblock_title
hikashop_menu_edit_display_settings_div_title"><?php echo
JText::_('HIKA_ITEMS'); ?></div>
			<dl class="hika_options">
				<dt class="hikashop_option_name greytint">
					<label class="field_rows" for="data_menu__<?php
echo $this->type; ?>_limit"><?php echo JText::_(
'FIELD_ROWS' ); ?></label>
				</dt>
				<dd class="hikashop_option_value">
					<p class="field_columns"><?php echo JText::_(
'FIELD_COLUMNS' ); ?></p>
					<div class="listing_item_quantity_selector"
data-name="<?php echo $this->name; ?>">
<?php
					$colsNb = @$this->element['columns'];
					$rowsNb = 0;
					if(@$this->element['columns'] != 0)
						$rowsNb = round($this->element['limit'] /
$this->element['columns']);
					for($j = 0; $j < 20; $j++){
						for($i = 0; $i < 6; $i++){
							$class = ' listing_list';
							if($i < $colsNb && $j < $rowsNb)
								$class .= ' selected';
							echo '<div class="col'.$i.'
row'.$j.$class.'"></div>';
						}
						echo '<br/>';
					}
?>
					</div>
					<div class="listing_item_quantity_fields"
data-list-type="list">
						<div class="input-append">
							<input type="text"
class="hikashop_product_listing_input" name="<?php echo
$this->name; ?>[columns]" value="<?php echo $colsNb;
?>">
							<div class="add-on
hikashop_product_listing_input_buttons">
								<div class="hikashop_product_listing_input_button
hikashop_product_listing_input_plus" data-ref="<?php echo
$this->name; ?>[columns]"
data-inc="plus">+</div>
								<div class="hikashop_product_listing_input_button
hikashop_product_listing_input_minus" data-ref="<?php echo
$this->name; ?>[columns]"
data-inc="minus">&ndash;</div>
							</div>
						</div>
						x
						<div class="input-append">
							<input type="text"
class="hikashop_product_listing_input" name="<?php echo
$this->name; ?>[rows]" value="<?php echo $rowsNb;
?>">
							<div class="add-on
hikashop_product_listing_input_buttons">
								<div class="hikashop_product_listing_input_button
hikashop_product_listing_input_plus" data-ref="<?php echo
$this->name; ?>[rows]"
data-inc="plus">+</div>
								<div class="hikashop_product_listing_input_button
hikashop_product_listing_input_minus" data-ref="<?php echo
$this->name; ?>[rows]"
data-inc="minus">&ndash;</div>
							</div>
						</div>
					</div>
				</dd>
			</dl>
			<dl style="display: none;"
class="hika_options">
				<dt class="hikashop_option_name">
					<label for="data_menu__<?php echo $this->type;
?>_columns"><?php echo JText::_(
'NUMBER_OF_COLUMNS' ); ?></label>
				</dt>
				<dd class="hikashop_option_value">
					<?php if(!isset($this->element['columns']))
$this->element['columns'] = '3'; ?>
					<input type="text" id="data_menu__<?php echo
$this->type; ?>_columns" name="<?php echo
$this->name; ?>[columns]" value="<?php echo
$this->element['columns']; ?>">
				</dd>
			</dl>
			<dl style="display: none;"
class="hika_options">
				<dtmenus/tmpl/options_display_table.php000064400000005326151162050350013753
0ustar00lock hikashop_menu_edit_display_settings_subdiv">
		<div class="hikashop_menu_subblock_content">
			<div class="hikashop_menu_subblock_title
hikashop_menu_edit_display_settings_div_title"><?php echo
JText::_('HIKA_UL_SETTINGS'); ?></div>
			<dl class="hika_options">
				<dt class="hikashop_option_name">
					<?php echo JText::_('UL_CLASS_NAME');?>
				</dt>
				<dd class="hikashop_option_value">
					<input name="<?php echo $this->name;
?>[ul_class_name]" type="text" value="<?php echo
@$this->element['ul_class_name'];?>" />
				</dd>
<?php if($this->type == 'category') { ?>
				<dt class="hikashop_option_name">
					<?php echo
hikashop_hktooltip(JText::_('UL_DISPLAY_SIMPLELIST'),
'', JText::_('UL_DISPLAY_SIMPLELIST'), '',
0);?>
				</dt>
				<dd class="hikashop_option_value"><?php
					echo JHTML::_('hikaselect.booleanlist',
$this->name.'[ul_display_simplelist]' , '',
@$this->element['ul_display_simplelist']);
				?></dd>
<?php } ?>
			</dl>
		</div>
	</div>
</div>
menus/tmpl/options_display_table.php000064400000005326151162050350013753
0ustar00<?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');
?><div class="hk-row-fluid
hikashop_menu_edit_display_settings_table" data-type="<?php
echo $this->type; ?>_layout" data-layout="<?php echo
$this->type; ?>_table">
	<div class="hkc-xl-4 hkc-md-6 hikashop_menu_subblock
hikashop_menu_edit_display_settings_subdiv">
		<div class="hikashop_menu_subblock_content">
			<div class="hikashop_menu_subblock_title
hikashop_menu_edit_display_settings_div_title"><?php echo
JText::_('HIKA_ITEMS'); ?></div>
			<dl class="hika_options">
				<dt class="hikashop_option_name">
					<label class="field_rows" for="data___<?php echo
$this->type; ?>_limit"><?php echo JText::_(
'FIELD_ROWS' ); ?></label>
				</dt>
				<dd class="hikashop_option_value">
					<div class="listing_item_quantity_selector"
data-name="<?php echo $this->name; ?>">
<?php
					$colsNb = @$this->element['columns'];
					$rowsNb = 0;
					if(@$this->element['columns'] != 0)
						$rowsNb = round($this->element['limit'] /
$this->element['colmenus/tmpl/options_main.php000064400000013146151162050350012062
0ustar00shop_product_listing_input_minus" data-ref="<?php echo
$this->name; ?>[rows]"
data-inc="minus">&ndash;</div>
							</div>
						</div>
					</div>
				</dd>
			</dl>
			<dl class="hika_options" style="display:
none;">
				<dt class="hikashop_option_name">
					<label for="data_menu__<?php echo $this->type;
?>_limit"><?php echo JText::_( 'NUMBER_OF_ITEMS' );
?></label>
				</dt>
				<dd class="hikashop_option_value">
					<?php if(!isset($this->element['limit']))
$this->element['limit'] = '20'; ?>
					<input type="text" id="data_menu__<?php echo
$this->type; ?>_limit" name="<?php echo $this->name;
?>[limit]" value="<?php echo
$this->element['limit']; ?>">
				</dd>
			</dl>
		</div>
	</div>
</div>
menus/tmpl/options_main.php000064400000013146151162050350012062
0ustar00<?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');
?><div class="hkc-xl-4 hkc-md-6 hikashop_menu_subblock
hikashop_menu_edit_general_part1">
	<div class="hikashop_menu_subblock_content">
		<div class="hikashop_menu_subblock_title
hikashop_menu_edit_display_settings_div_title"><?php echo
JText::_('HIKA_DATA_DISPLAY'); ?></div>
		<?php if($this->menu == 'product' || ($this->menu ==
'category' && $this->type == 'category')){
?>
		<dl class="hika_options">
			<dt class="hikashop_option_name">
				<label for="data_menu__<?php echo $this->type;
?>_show_image"><?php echo JText::_( 'SHOW_IMAGE' );
?></label>
			</dt>
			<dd class="hikashop_option_value">
				<?php echo JHTML::_('hikaselect.booleanlist',
$this->name.'[show_image]',
'class="custom-select"',
@$this->element['show_image'] ); ?>
			</dd>
		</dl>
		<dl class="hika_options">
			<dt class="hikashop_option_name">
				<label for="data_menu__<?php echo $this->type;
?>_show_description"><?php echo JText::_(
'SHOW_DESCRIPTION' ); ?></label>
			</dt>
			<dd class="hikashop_option_value">
				<?php echo JHTML::_('hikaselect.booleanlist',
$this->name.'[show_description]',
'class="custom-select"',
@$this->element['show_description'] ); ?>
			</dd>
		</dl>
		<dl class="hika_options">
			<dt class="hikashop_option_name">
				<label for="data_menu__<?php echo $this->type;
?>_category"><?php echo JText::_(
'HIKA_MAIN_CATEGORY' ); ?></label>
			</dt>
			<dd class="hikashop_option_value">
				<?php
				if(!isset($this->element['category']) ||
$this->element['category'] == '')
					$this->element['category'] =
$this->mainProductCategory;

				echo $this->nameboxType->display(
					$this->name.'[category]',
					$this->element['category'],
					hikashopNameboxType::NAMEBOX_SINGLE,
					'category',
					array(
						'delete' => true,
						'default_text' =>
'<em>'.JText::_('HIKA_NONE').'</em>',
					)
				);
				?>
			</dd>
		</dl>
		<?php } ?>
		<dl class="hika_options">
			<dt class="hikashop_option_name">
				<label for="data_menu__<?php echo $this->type;
?>_product_order"><?php echo JText::_(
'ORDERING_FIELD' ); ?></label>
			</dt>
			<dd class="hikashop_option_value">
				<?php
				if(!isset($this->element[$this->type.'_order']))
$this->element[$this->type.'_order'] =
'inherit';
				echo
$this->orderType->display($this->name.'['.$this->type.'_order]',$this->element[$this->type.'_order'],$this->type);
				?>
			</dd>
		</dl>
		<dl class="hika_options">
			<dt class="hikashop_option_name">
				<label for="data_menu__<?php echo $this->type;
?>_order_dir"><?php echo JText::_(
'ORDERING_DIRECTION' ); ?></label>
			</dt>
			<dd class="hikashop_option_value">
				<?php
				if(!isset($this->element['order_dir']))
$this->element['order_dir'] = 'inherit';
				echo
$this->orderdirType->display($this->name.'[order_dir]',$this->element['order_dir']);
				?>
			</dd>
		</dl>
		<dl class="hika_options">
			<dt class="hikashop_option_name">
				<label for="data_menu__<?php echo $this->type;
?>_random"><?php echo JText::_( 'RANDOM_ITEMS' );
?></label>
			</dt>
			<dd class="hikashop_option_value">
				<?php
				if(!isset($this->element['random']))
$this->element['random'] = '-1';
				echo JHTML::_('hikaselect.inheritRadiolist',
$this->name.'[random]',
$this->element['random']);
				?>
			</dd>
		</dl>
		<dl class="hika_options">
			<dt class="hikashop_option_name">
				<label for="data_menu__<?php echo $this->type;
?>_filter_type"><?php echo JText::_(
'SUB_ELEMENTS_FILTER' ); ?></label>
			</dt>
			<dd class="hikashop_option_value">
				<?php
				if(!isset($this->element['filter_type']))
$this->element['filter_type'] = '0';
				echo
$this->childdisplayType->display($this->name.'[filter_type]',$this->element['filter_type'],
true, true, true);
				?>
			</dd>
		</dl>
		<dl class="hika_options">
			<dt class="hikashop_option_name">
				<label for="data_menu__<?php echo $this->type;
?>_use_module_menus/tmpl/options_product.php000064400000022340151162050350012612
0ustar00
				?>
			</dd>
		</dl>
		<dl class="hika_options">
			<dt class="hikashop_option_name">
				<label for="data_menu__<?php echo $this->type;
?>_related_products_from_cart"><?php echo JText::_(
'RELATED_PRODUCTS_FROM_CART' ); ?></label>
			</dt>
			<dd class="hikashop_option_value">
				<?php
				if(!isset($this->element['related_products_from_cart']))
$this->element['related_products_from_cart'] = '0';
				echo JHTML::_('hikaselect.booleanlist',
$this->name.'[related_products_from_cart]' ,
'',$this->element['related_products_from_cart']);
				?>
			</dd>
		</dl>
		<?php } ?>
	</div>
</div>
menus/tmpl/options_product.php000064400000022340151162050350012612
0ustar00<?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');
?><div class="hkc-xl-4 hkc-md-6 hikashop_menu_subblock
hikashop_menu_edit_product">
	<div class="hikashop_menu_subblock_content">
		<div class="hikashop_menu_subblock_title
hikashop_menu_edit_display_settings_div_title"><?php echo
JText::_('HIKA_PRODUCT_DATA_DISPLAY'); ?></div>
		<dl class="hika_options">
			<dt class="hikashop_option_name"><?php
				echo JText::_('HIKA_OUT_OF_STOCK');
			?></dt>
			<dd class="hikashop_option_value"><?php
				if(!isset($this->element['show_out_of_stock']))
$this->element['show_out_of_stock'] = '-1';
				echo JHTML::_('hikaselect.inheritRadiolist',
$this->name.'[show_out_of_stock]',
$this->element['show_out_of_stock']);
			?></dd>
		</dl>
<?php if($this->menu == 'product'){ ?>
		<dl class="hika_options">
			<dt class="hikashop_option_name">
				<label for="data_menu__<?php echo $this->type;
?>_recently_viewed"><?php echo JText::_(
'RECENTLY_VIEWED' ); ?></label>
			</dt>
			<dd class="hikashop_option_value"><?php
				if(!isset($this->element['recently_viewed']))
$this->element['recently_viewed'] = '-1';
				echo JHTML::_('hikaselect.inheritRadiolist',
$this->name.'[recently_viewed]',
$this->element['recently_viewed']);
			?></dd>
		</dl>
<?php } ?>
		<dl class="hika_options">
			<dt class="hikashop_option_name">
				<?php echo JText::_('HIKA_LINK_TO_DETAIL_PAGE');?>
			</dt>
			<dd class="hikashop_option_value"><?php
				if(!isset($this->element['link_to_product_page']))
$this->element['link_to_product_page'] = '-1';
				echo JHTML::_('hikaselect.inheritRadiolist',
$this->name.'[link_to_product_page]',
$this->element['link_to_product_page']);
			?></dd>
		</dl>
		<dl class="hika_options">
			<dt class="hikashop_option_name"><?php
				echo JText::_('DISPLAY_PRICE');
			?></dt>
			<dd class="hikashop_option_value"><?php
				if(!isset($this->element['show_price']))
$this->element['show_price'] = '-1';
				echo JHTML::_('hikaselect.inheritRadiolist',
$this->name.'[show_price]',
$this->element['show_price']);
			?></dd>
		</dl>
		<dl class="hika_options"
id="price_display_type_line">
			<dt class="hikashop_option_name"><?php
				echo JText::_('HIKA_PRICE_TYPE');
			?></dt>
			<dd class="hikashop_option_value"><?php
				if(!isset($this->element['price_display_type']))
$this->element['price_display_type'] = 'inherit';
				echo $this->priceDisplayType->display(
$this->name.'[price_display_type]',
$this->element['price_display_type']);
			?></dd>
		</dl>
		<dl class="hika_options"
id="show_taxed_price_line">
			<dt class="hikashop_option_name"><?php
				echo JText::_('SHOW_TAXED_PRICES');
			?></dt>
			<dd class="hikashop_option_value"><?php
				if(!isset($this->element['price_with_tax']))
$this->element['price_with_tax'] = 3;
				echo
$this->pricetaxType->display($this->name.'[price_with_tax]'
, $this->element['price_with_tax'],true);
			?></dd>
		</dl>
		<dl class="hika_options"
id="show_original_price_line">
			<dt class="hikashop_option_name"><?php
				echo JText::_('HIKA_ORIGINAL_CURRENCY');
			?></dt>
			<dd class="hikashop_option_value"><?php
				if(!isset($this->element['show_original_price']))
$this->element['show_original_price'] = '-1';
				echo JHTML::_('hikaselect.inheritRadiolist',
$this->name.'[show_original_price]',
$this->element['show_original_price']);
			?></dd>
		</dl>
		<dl class="hika_options"
id="show_discount_line">
			<dt class="hikashop_option_name"><?php
				echo JText::_('HIKA_DISCOUNT_DISPLAY');
			?></dt>
			<dd class="hikashop_option_value"><?php
				if(!isset($this->element['show_discount']))
$this->element['show_discount'] = 3;
				echo $this->discountDisplayType->display(
$this->name.'[show_discount]',
$this->element['show_discount']);
			?></dd>
		</dl>
	</div>
</div>
<div class="hkc-xl-4 hkc-md-6 hikashop_menu_subblock
hikashop_menu_edit_product">
	<div class="hikashop_menu_subblock_content">
		<div class="hikashop_menu_subblock_title
hikashop_menu_edit_display_settings_div_title"><?php echo
JText::_('HIKA_PRODUCT_FEATURES_DISPLAY'); ?></div>
		<dl class="hika_options">
			<dt class="hikashop_option_name">
				<label for="data_menu__<?php echo $this->type;
?>_add_to_cart"><?php echo JText::_( 'ADD_TO_CART'
); ?></label>
			</dt>
			<dd class="hikashop_option_value"><?php
				if(!isset($this->element['add_to_cart']))
$this->element['add_to_cart'] = '-1';
				echo JHTML::_('hikaselect.inheritRadiolist',
$this->name.'[add_to_cart]',
$this->element['add_to_cart']);
			?></dd>
		</dl>
		<dl class="hika_options">
			<dt class="hikashop_option_name"><?php
				echo JText::_('ADD_TO_WISHLIST');
			?></dt>
			<dd class="hikashop_option_value"><?php
				if(hikashop_level(1)) {
					if(!isset($this->element['add_to_wishlist']))
$this->element['add_to_wishlist'] = '-1';
					echo JHTML::_('hikaselect.inheritRadiolist',
$this->name.'[add_to_wishlist]',
$this->element['add_to_wishlist']);
				} else {
					$this->element['add_to_wishlist'] = 0;
					echo hikashop_getUpgradeLink('essential');
				}
			?></dd>
		</dl>
		<dl class="hika_options">
			<dt class="hikashop_option_name">
				<label for="data_menu__<?php echo $this->type;
?>_show_quantity_field"><?php echo JText::_(
'HIKA_QUANTITY_FIELD' ); ?></label>
			</dt>
			<dd class="hikashop_option_value"><?php
				if(!isset($this->element['show_quantity_field']))
$this->element['show_quantity_field'] = '-1';
				echo JHTML::_('hikaselect.inheritRadiolist',
$this->name.'[show_quantity_field]',
$this->element['show_quantity_field'] );
			?></dd>
		</dl>
		<dl class="hika_options">
			<dt class="hikashop_option_name"><?php
				echo JText::_('DISPLAY_WAITLIST_BUTTON');
			?></dt>
			<dd class="hikashop_option_value"><?php
				echo JHTML::_('hikaselect.booleanlist',
$this->name.'[product_waitlist]', '',
@$this->element['product_waitlist']);
			?></dd>
		</dl>
		<dl class="hika_options">
			<dt class="hikashop_option_name"><?php
				echo JText::_('CONTACT_US_BUTTON');
			?></dt>
			<dd class="hikashop_option_value"><?php
				if(hikashop_level(1)) {
					if(!isset($this->element['product_contact_button']))
$this->element['product_contact_button'] = '-1';
					echo JHTML::_('hikaselect.inheritRadiolist',
$this->name.'[product_contact_button]',
@$this->element['product_contact_button']);
				} else {
					echo hikashop_getUpgradeLink('essential');
				}
			?></dd>
		</dl>
		<dl class="hika_options">
			<dt class="hikashop_option_name"><?php
				echo JText::_('PRODUCT_DETAILS_BUTTON');
			?></dt>
			<dd class="hikashop_option_value"><?php
				if(!isset($this->element['details_button']))
$this->element['details_button'] = '-1';
				echo JHTML::_('hikaselect.inheritRadiolist',
$this->name.'[details_button]',
@$this->element['details_button']);
			?></dd>
		</dl>
		<dl class="hika_options">
			<dt class="hikashop_option_name"><?php
				echo JText::_('VOTE');
			?></dt>
			<dd class="hikashop_option_value"><?php
				if((!isset($this->element['show_vote'])) &&
(isset($this->element['show_vote_product'])))
					$this->element['show_vote'] =
$this->element['show_vote_product'];
				elseif(!isset($this->element['show_vote']))
					$this->element['show_vote'] = '-1';
				echo JHTML::_('hikaselect.inheritRadiolist',
$this->name.'[show_vote]',
$this->element['show_vote']);
			?></dd>
		</dl>
<?php if(hikashop_level(2)) { ?>
		<dl class="hika_options">
			<dt class="hikashop_option_name"><?php
				echo JText::_('CUSTOM_ITEM_FIELDS');
			?></dt>
			<dd class="hikashop_option_value"><?php
				if(!isset($this->element['display_custom_item_fields']))
$this-menus/tmpl/options_product_extra.php000064400000015661151162050350014025
0ustar00ment['display_badges']))
$this->element['display_badges'] = '-1';
				echo JHTML::_('hikaselect.inheritRadiolist',
$this->name.'[display_badges]',
$this->element['display_badges']);
			?></dd>
		</dl>
<?php
if(!empty($this->extra_blocks['products'])) {
	foreach($this->extra_blocks['products'] as $r) {
		if(is_string($r))
			echo $r;
		if(is_array($r)) {
			if(!isset($r['name']) && isset($r[0]))
				$r['name'] = $r[0];
			if(!isset($r['value']) && isset($r[1]))
				$r['value'] = $r[1];
?>
		<dl class="hika_options">
			<dt class="hikashop_option_name"><?php echo
JText::_(@$r['name']); ?></dt>
			<dd class="hikashop_option_value"><?php echo
@$r['value']; ?></dd>
		</dl>
<?php
		}
	}
}
?>
	</div>
</div>
menus/tmpl/options_product_extra.php000064400000015661151162050350014025
0ustar00<?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
if(hikashop_level(2)){
?>
<div class="hkc-xl-4 hkc-md-6 hikashop_menu_subblock
hikashop_menu_edit_product_extra_part1">
	<div class="hikashop_menu_subblock_content">
		<div class="hikashop_menu_subblock_title
hikashop_menu_edit_display_settings_div_title"><?php echo
JText::_('HIKA_CAROUSEL_SETTINGS'); ?></div>
		<dl class="hika_options">
			<dt class="hikashop_option_name">
				<?php echo JText::_('ENABLE_CAROUSEL');?>
			</dt>
			<dd class="hikashop_option_value"
data-control="carousel">
				<?php echo JHTML::_('hikaselect.booleanlist',
$this->name.'[enable_carousel]' ,
'',@$this->element['enable_carousel']); ?>
			</dd>
		</dl>
		<dl class="hika_options" data-part="carousel"
id="<?php echo
'carousel_type_'.$this->type.'"'; ?>>
			<dt class="hikashop_option_name">
				<?php echo JText::_('HIKA_CAROUSEL_EFFECT');?>
			</dt>
			<dd class="hikashop_option_value"
data-control="effect">
				<?php echo
$this->effectType->display($this->name.'[carousel_effect]',@$this->element['carousel_effect']
, '');?>
			</dd>
		</dl>
		<dl class="hika_options" data-part="effect"
id="<?php echo
'slide_direction_'.$this->type.'"'; ?>>
			<dt class="hikashop_option_name">
				<?php echo JText::_('SLIDE_DIRECTION');?>
			</dt>
			<dd class="hikashop_option_value">
				<?php echo
$this->directionType->display($this->name.'[slide_direction]',@$this->element['slide_direction']);?>
			</dd>
		</dl>
		<dl class="hika_options" data-part="effect"
id="<?php echo
'transition_effect_'.$this->type.'"';
?>>
			<dt class="hikashop_option_name">
				<?php echo JText::_('TRANSITION_EFFECT');?>
			</dt>
			<dd class="hikashop_option_value">
				<?php echo
$this->transition_effectType->display($this->name.'[transition_effect]',@$this->element['transition_effect']);?>
			</dd>
		</dl>
		<dl class="hika_options" data-part="carousel"
id="<?php echo
'carousel_effect_duration_'.$this->type.'"';
?>>
			<dt class="hikashop_option_name">
				<?php echo JText::_('HIKA_EFFECT_DURATION');?>
			</dt>
			<dd class="hikashop_option_value">
				<input size=12 name="<?php echo $this->name;
?>[carousel_effect_duration]" type="text"
value="<?php echo
@$this->element['carousel_effect_duration'];?>" />
ms
			</dd>
		</dl>
		<dl class="hika_options" data-part="effect"
id="<?php echo
'product_by_slide_'.$this->type.'"'; ?>>
			<dt class="hikashop_option_name">
				<?php echo JText::_('PRODUCTS_BY_SLIDE');?>
			</dt>
			<dd class="hikashop_option_value">
				<input size=9 name="<?php echo $this->name;
?>[item_by_slide]" type="text" value="<?php echo
@$this->element['item_by_slide'];?>" />
			</dd>
		</dl>
		<dl class="hika_options" data-part="effect"
id="<?php echo
'slide_one_by_one_'.$this->type.'"'; ?>>
			<dt class="hikashop_option_name">
				<?php echo JText::_('SLIDE_ONE_BY_ONE');?>
			</dt>
			<dd class="hikashop_option_value">
				<?php echo JHTML::_('hikaselect.booleanlist',
$this->name.'[one_by_one]' ,
'',@$this->element['one_by_one']); ?>
			</dd>
		</dl>
	</div>
</div>
<div class="hkc-xl-4 hkc-md-6 hikashop_menu_subblock
hikashop_menu_edit_product_extra_part2">
	<div class="hikashop_menu_subblock_content">
		<div class="hikashop_menu_subblock_title
hikashop_menu_edit_display_settings_div_title"><?php echo
JText::_('HIKA_CAROUSEL_ADDITIONAL_SETTINGS'); ?></div>
		<dl class="hika_options" data-part="carousel"
id="<?php echo
'auto_slide_'.$this->type.'"'; ?>>
			<dt class="hikashop_option_name">
				<?php echo JText::_('AUTO_SLIDE');?>
			</dt>
			<dd class="hikashop_option_value"
data-control="autoslide">
				<?php echo JHTML::_('hikaselect.booleanlist',
$this->name.'[auto_slide]' ,
'',@$this->element['auto_slide']); ?>
			</dd>
		</dl>
		<dl class="hika_options" data-part="autoslide"
id="<?php echo
'auto_slide_duration_'.$this->type.'"';
?>>
			<dt class="hikashop_option_name">
				<?php echo JText::_('HIKA_TRANSITION_DELAY');?>
			</dt>
			<dd class="hikashop_option_value">
				<input size=12 name="<?php echo $this->name;
?>[auto_slide_duration]" type="text" value="<?php
echo @$this->element['auto_slide_duration'];?>" />
ms
			</dd>
		</dl>
		<dl class="hika_options" data-part="carousel"
id="<?php echo
'slide_pagination_'.$this->type.'"'; ?>>
			<dt class="hikashop_option_name">
				<?php echo JText::_('SLIDE_PAGINATION_TYPE');?>
			</dt>
			<dd class="hikashop_option_value"
data-control="pagination">
				<?php echo
$this->slide_paginationType->display($this->name.'[pagination_type]',@$this->element['pagination_type'],
'');?>
			</dd>
		</dl>
		<dl class="hika_options"
data-part="paginationthumbnail" id="<?php echo
'pagination_width_'.$this->type.'"'; ?>>
			<dt class="hikashop_option_name">
				<?php echo JText::_('PAGINATION_IMAGE_WIDTH');?>
			</dt>
			<dd class="hikashop_option_value">
				<input size=12 name="<?php echo $this->name;
?>[pagination_image_width]" type="text"
value="<?php echo
@$this->element['pagination_image_width'];?>" />
px
			</dd>
		</dl>
		<dl class="hika_options"
data-part="paginationthumbnail" id="<?php echo
'pagination_height_'.$this->type.'"';
?>>
			<dt class="hikashop_option_name">
				<?php echo JText::_('PAGINATION_IMAGE_HEIGHT');?>
			</dt>
			<dd class="hikashop_option_value">
				<inputmodules/tmpl/form.php000064400000107537151162050350010657
0ustar00art="carousel" id="<?php echo
'display_button_'.$this->type.'"'; ?>>
			<dt class="hikashop_option_name">
				<?php echo JText::_('HIKA_SWITCH_BUTTONS');?>
			</dt>
			<dd class="hikashop_option_value">
				<?php echo JHTML::_('hikaselect.booleanlist',
$this->name.'[display_button]' ,
'',@$this->element['display_button']); ?>
			</dd>
		</dl>
	</div>
</div>
<?php
	}else{ ?>
<div class="hkc-xl-4 hkc-md-6 hikashop_menu_subblock
hikashop_menu_edit_product_extra_part1">
	<div class="hikashop_menu_subblock_content">
		<div class="hikashop_menu_subblock_title
hikashop_menu_edit_display_settings_div_title"><?php echo
JText::_('HIKA_CAROUSEL_SETTINGS'); ?></div>
		<dl class="hika_options">
			<dt class="hikashop_option_name">
				<?php echo JText::_('ENABLE_CAROUSEL');?>
			</dt>
			<dd class="hikashop_option_value">
				<?php echo hikashop_getUpgradeLink('business'); ?>
			</dd>
		</dl>
	</div>
</div>
<?php } ?>
modules/tmpl/form.php000064400000107537151162050350010657 0ustar00<?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');
?><div class="iframedoc"
id="iframedoc"></div>
<?php
	$arr = array(
		JHTML::_('select.option',  '-1', JText::_(
'HIKA_INHERIT' ) ),
		JHTML::_('select.option',  '1', JText::_(
'HIKASHOP_YES' ) ),
		JHTML::_('select.option',  '0', JText::_(
'HIKASHOP_NO' ) ),
	);
	$noForm = $this->element->hikashop_params['no_form'];
	$this->controlid = str_replace( array('[',']') ,
array('','') , $this->control );
if (!$noForm) {
?>
<form action="index.php" method="post" 
name="adminForm" id="adminForm">
<?php }
$cid = $this->element->hikashop_params['cid'];
if(!HIKASHOP_BACK_RESPONSIVE) { ?>
<div id="page-modules">
	<table style="width:100%">
		<tr>
			<td valign="top" width="50%">
<?php } else { ?>
<div id="page-modules" class="row-fluid">
	<div class="span6">
<?php } ?>
				<fieldset class="adminform">
					<legend><?php echo JText::_( 'HIKA_DETAILS' );
?></legend>

					<table class="admintable table"
cellspacing="1">
						<tr>
							<td class="key" valign="top">
									<?php echo JText::_( 'HIKA_TITLE' ); ?>
							</td>
							<td>
								<input class="text_area" type="text"
name="module<?php echo $this->control; ?>[title]"
id="title" size="35" value="<?php echo
$this->escape(@$this->element->title); ?>" />
							</td>
						</tr>
						<tr>
							<td width="100" class="key">
								<?php echo JText::_( 'SHOW_TITLE' ); ?>
							</td>
							<td>
								<?php echo JHTML::_('hikaselect.booleanlist', 
'module'.$this->control.'[showtitle]',
'class="inputbox"', @$this->element->showtitle );
?>
							</td>
						</tr>
						<tr>
							<td valign="top" class="key">
								<?php echo JText::_( 'HIKA_PUBLISHED' ); ?>
							</td>
							<td>
								<?php echo JHTML::_('hikaselect.booleanlist', 
'module'.$this->control.'[published]',
'class="inputbox"', @$this->element->published );
?>
							</td>
						</tr>
						<?php if($this->element->module=='mod_hikashop'){
?>
						<tr>
							<td class="key" valign="top">
								<?php echo JText::_('TYPE_OF_CONTENT');?>
							</td>
							<td>
								<?php
									$html =
$this->contentType->display($this->control.'[content_type]',@$this->element->hikashop_params['content_type'],$this->js,true,'_'.$this->controlid,true);
									if($this->include_module){ //Never done
										echo
@$this->element->hikashop_params['content_type'];
										?><input name="<?php echo $this->control;
?>[content_type]" type="hidden" value="<?php echo
@$this->element->hikashop_params['content_type'];?>"
/><?php
									}else{
										echo $html;
									}
								?>
							</td>
						</tr>
						<tr>
							<td class="key" valign="top">
								<?php echo JText::_('TYPE_OF_LAYOUT');?>
							</td>
							<td>
								<?php
								if(!isset($this->element->hikashop_params['layout_type']))
$this->element->hikashop_params['layout_type'] =
'inherit';
								echo
$this->layoutType->display($this->control.'[layout_type]',@$this->element->hikashop_params['layout_type'],$this->js,true,'','_'.$this->controlid,true);?>
							</td>
						</tr>
						<tr id="<?php echo
'number_of_columns_'.$this->controlid ?>">
							<td class="key" valign="top">
								<?php echo JText::_('NUMBER_OF_COLUMNS');?>
							</td>
							<td>
								<input name="<?php echo $this->control;
?>[columns]" type="text" value="<?php echo
@$this->element->hikashop_params['columns'];?>"
/>
							</td>
						</tr>
						<tr>
							<td class="key" valign="top">
								<?php echo JText::_('NUMBER_OF_ITEMS');?>
							</td>
							<td>
								<input name="<?php echo $this->control;
?>[limit]" type="text" value="<?php echo
@$this->element->hikashop_params['limit'];?>"
/>
							</td>
						</tr>
						<tr>
							<td class="key" valign="top">
								<?php echo JText::_('RANDOM_ITEMS');?>
							</td>
							<td>
								<?php
								if(!isset($this->element->hikashop_params['random']))
$this->element->hikashop_params['random'] =
'-1';
								echo JHTML::_('hikaselect.radiolist', $arr,
$this->control.'[random]' , '', 'value',
'text',
@$this->element->hikashop_params['random']);

								?>
							</td>
						</tr>
						<tr>
							<td class="key" valign="top">
								<?php echo JText::_('ORDERING_DIRECTION');?>
							</td>
							<td>
								<?php
								if(!isset($this->element->hikashop_params['order_dir']))
$this->element->hikashop_params['order_dir'] =
'inherit';
								echo
$this->orderdirType->display($this->control.'[order_dir]',@$this->element->hikashop_params['order_dir']);?>
							</td>
						</tr>
						<tr>
							<td class="key" valign="top">
								<?php echo JText::_('SUB_ELEMENTS_FILTER');?>
							</td>
							<td><?php
								if(!isset($this->element->hikashop_params['filter_type']))
$this->element->hikashop_params['filter_type'] = 2;
								echo
$this->childdisplayType->display($this->control.'[filter_type]',
@$this->element->hikashop_params['filter_type'], true,
true, true);
							?></td>
						</tr>
						<tr>
							<td class="key" valign="top">
								<?php echo JText::_('ASSOCIATED_CATEGORY');?>
							</td>
							<td>
								<span id="changeParent">
									<?php echo
@$this->element->category->category_id.'
'.htmlspecialchars(@$this->element->category->category_name,
ENT_COMPAT, 'UTF-8');?>
								</span>
								<input class="inputbox"
id="paramsselectparentlisting" name="<?php echo
$this->control;?>[selectparentlisting]" type="hidden"
size="20" value="<?php echo
@$this->element->hikashop_params['selectparentlisting'];?>">
								<?php
								echo $this->popup->display(
										JText::_('SELECT'),
										'SELECT_A_CATEGORY',
										'\''.hikashop_completeLink('category&task=selectparentlisting&filter_id=product&control=params',true).'&values=\'+document.getElementById(\'paramsselectparentlisting\').value',
										'linkparamsselectparentlisting',
										860, 480, '', '', 'button',true
									);
								?>
								<a href="#"
onclick="document.getElementById('changeParent').innerHTML='';document.getElementById('paramsselectparentlisting').value=0;return
false;">
									<img src="<?php echo
HIKASHOP_IMAGES?>delete.png"/>
								</a>
							</td>
						</tr>
						<?php }else{
						$document= JFactory::getDocument();
						$js = "window.addEvent('domready', function() {
hikashopToggleCart(".(int)@$this->element->hikashop_params['small_cart'].");});";
						$document->addScriptDeclaration($js);
							?>
						<tr>
							<td class="key">
								<?php echo JText::_('MINI_CART'); ?>
							</td>
							<td>
								<?php echo JHTML::_('hikaselect.booleanlist',
$this->control.'[small_cart]','',@$this->element->hikashop_params['small_cart']);?>
							</td>
						</tr>
						<tr>
							<td class="key">
								<?php echo JText::_('IMAGE_IN_CART'); ?>
							</td>
							<td>
								<?php echo JHTML::_('hikaselect.booleanlist',
$this->control.'[image_in_cart]','',@$this->element->hikashop_params['image_in_cart']);?>
							</td>
						</tr>
						<tr id="cart_proceed">
							<td class="key">
								<?php echo JText::_('SHOW_CART_PROCEED'); ?>
							</td>
							<td>
								<?php echo JHTML::_('hikaselect.booleanlist',
$this->control.'[show_cart_proceed]','',@$this->element->hikashop_params['show_cart_proceed']);?>
							</td>
						</tr>
						<tr>
							<td class="key">
								<?php echo JText::_('SHOW_CART_QUANTITY'); ?>
							</td>
							<td>
								<?php echo JHTML::_('hikaselect.booleanlist',
$this->control.'[show_cart_quantity]','',@$this->element->hikashop_params['show_cart_quantity']);?>
							</td>
						</tr>
						<tr>
							<td class="key">
								<?php echo JText::_('SHOW_CART_DELETE'); ?>
							</td>
							<td>
								<?php echo JHTML::_('hikaselect.booleanlist',
$this->control.'[show_cart_delete]','',@$this->element->hikashop_params['show_cart_delete']);?>
							</td>
						</tr>

						<tr>
							<td class="key">
								<?php echo JText::_('EMPTY_CART_MESSAGE_OVERRIDE');
?>
							</td>
							<td>
								<input name="<?php echo
$this->control;?>[msg]" type="text"
value="<?php echo
@$this->element->hikashop_params['msg'];?>" />
							</td>
						</tr>

						<?php }
								if($this->element->module=='mod_hikashop'){ ?>
						 <tr>
							<td class="key" valign="top">
								<?php echo JText::_('SYNCHRO_WITH_ITEM');?>
							</td>
							<td>
								<?php
									echo JHTML::_('hikaselect.booleanlist',
$this->control.'[content_synchronize]' ,
'',@$this->element->hikashop_params['content_synchronize']);
								?>
							</td>
						</tr>
						<tr>
							<td class="key" >
							<?php echo JText::_('MENU'); ?>
							</td>
							<td>
								<?php echo JHTML::_('hikaselect.genericlist',
$this->hikashop_menu, $this->control.'[itemid]' ,
'size="1"', 'value', 'text',
@$this->element->hikashop_params['itemid']); ?>
							</td>
						</tr>

						<?php } ?>
					</table>
				</fieldset>
<?php if(!HIKASHOP_BACK_RESPONSIVE) { ?>
			</td>
			<td valign="top" width="50%">
<?php } else { ?>
	</div>
	<div class="span6">
<?php } ?>
				<fieldset id="<?php echo
'content_product_'.$this->controlid ?>"
class="adminform">
					<legend><?php echo JText::_('PARAMS_FOR_PRODUCTS');
?></legend>
					<table class="admintable table" cellspacing="1"
width="100%">
						<?php if($this->element->module=='mod_hikashop'){
?>
						<tr>
							<td class="key" valign="top">
								<?php echo JText::_('ORDERING_FIELD');?>
							</td>
							<td>
								<?php
								if(!isset($this->element->hikashop_params['product_order']))
$this->element->hikashop_params['product_order'] =
'inherit';
								echo
$this->orderType->display($this->control.'[product_order]',@$this->element->hikashop_params['product_order'],'product');?>
							</td>
						</tr>
						<tr>
							<td class="key" valign="top">
								<?php echo JText::_('CONTENT_ON_PRODUCT_PAGE');?>
							</td>
							<td>
								<?php
								if(!isset($this->element->hikashop_params['product_synchronize']))
$this->element->hikashop_params['product_synchronize'] =
4;
								echo
$this->productSyncType->display($this->control.'[product_synchronize]'
, @$this->element->hikashop_params['product_synchronize']);
?>
							</td>
						</tr>
						<tr>
							<td class="key" valign="top">
								<?php echo JText::_('RECENTLY_VIEWED');?>
							</td>
							<td>
								<?php
								if(!isset($this->element->hikashop_params['recently_viewed']))
$this->element->hikashop_params['recently_viewed'] =
'-1';
								echo JHTML::_('hikaselect.radiolist', $arr,
$this->control.'[recently_viewed]' , '',
'value', 'text',
@$this->element->hikashop_params['recently_viewed']);
?>
							</td>
						</tr>
						<tr>
							<td class="key" valign="top">
								<?php echo JText::_('ADD_TO_CART_BUTTON');?>
							</td>
							<td>
								<?php
								if(!isset($this->element->hikashop_params['add_to_cart']))
$this->element->hikashop_params['add_to_cart'] =
'-1';
								echo JHTML::_('hikaselect.radiolist', $arr,
$this->control.'[add_to_cart]' , '',
'value', 'text',
@$this->element->hikashop_params['add_to_cart']); ?>
							</td>
						</tr>
						<tr>
							<td class="key" valign="top">
								<?php echo JText::_('ADD_TO_WISHLIST_BUTTON');?>
							</td>
							<td>
								<?php if(hikashop_level(1)){
								if(!isset($this->element->hikashop_params['add_to_wishlist']))
$this->element->hikashop_params['add_to_wishlist'] =
'-1';
									echo JHTML::_('hikaselect.radiolist', $arr,
$this->control.'[add_to_wishlist]' , '',
'value', 'text',
@$this->element->hikashop_params['add_to_wishlist']);
								}else{
									$this->element->hikashop_params['add_to_wishlist']
= 0;
									echo hikashop_getUpgradeLink('essential');;
								} ?>							</td>
						</tr>
						<tr>
							<td class="key" valign="top">
								<?php echo JText::_('LINK_TO_PRODUCT_PAGE');?>
							</td>
							<td>
								<?php
								if(!isset($this->element->hikashop_params['link_to_product_page']))
$this->element->hikashop_params['link_to_product_page'] =
'-1';
								echo JHTML::_('hikaselect.radiolist', $arr,
$this->control.'[link_to_product_page]' , '',
'value', 'text',
@$this->element->hikashop_params['link_to_product_page']);
?>
							</td>
						</tr>
						<?php } ?>
						<tr>
							<td class="key" valign="top">
								<?php echo JText::_('DISPLAY_VOTE');?>
							</td>
							<td>
								<?php
									if(!isset($this->element->hikashop_params['show_vote_product']))
$this->element->hikashop_params['show_vote_product'] =
'-1';
									echo JHTML::_('hikaselect.radiolist',  $arr,
$this->control.'[show_vote_product]', '',
'value', 'text',
@$this->element->hikashop_params['show_vote_product']);
								?>
							</td>
						</tr>
						<tr <?php
if($this->element->module!='mod_hikashop'){ ?>
id="cart_price"<?php } ?>>
							<td class="key" valign="top">
								<?php echo JText::_('DISPLAY_PRICE');?>
							</td>
							<td>
								<?php
									if(!isset($this->element->hikashop_params['show_price']))
$this->element->hikashop_params['show_price'] =
'-1';
									echo JHTML::_('hikaselect.radiolist',  $arr,
$this->control.'[show_price]',
'onchange="switchDisplay(this.value,\'show_taxed_price_line\',\'1\',\'_'.$this->controlid.'\');switchDisplay(this.value,\'show_original_price_line\',\'1\',\'_'.$this->controlid.'\');switchDisplay(this.value,\'show_discount_line\',\'1\',\'_'.$this->controlid.'\');switchDisplay(this.value,\'price_display_type_line\',\'1\',\'_'.$this->controlid.'\');"',
'value', 'text',
@$this->element->hikashop_params['show_price']);
									if(!@$this->element->hikashop_params['show_price'])
$this->js
.='switchDisplay(0,\'show_taxed_price_line\',\'1\',\'_'.$this->controlid.'\');switchDisplay(\'0\',\'price_display_type_line\',\'1\',\'_'.$this->controlid.'\');switchDisplay(\'0\',\'show_original_price_line\',\'1\',\'_'.$this->controlid.'\');switchDisplay(\'0\',\'show_discount_line\',\'1\',\'_'.$this->controlid.'\');';
								?>
							</td>
						</tr>
						<tr>
							<td class="key" valign="top">
								<?php echo
JText::_('DISPLAY_OUT_OF_STOCK_PRODUCTS');?>
							</td>
							<td>
								<?php
									if(!isset($this->element->hikashop_params['show_out_of_stock']))
$this->element->hikashop_params['show_out_of_stock'] =
'-1';
									echo JHTML::_('hikaselect.radiolist',  $arr,
$this->control.'[show_out_of_stock]', '',
'value', 'text',
@$this->element->hikashop_params['show_out_of_stock']);
								?>
							</td>
						</tr>
						<tr id="<?php echo
'show_taxed_price_line_'.$this->controlid ?>">
							<td class="key">
								<?php echo JText::_('SHOW_TAXED_PRICES');?>
							</td>
							<td>
								<?php
								if(!isset($this->element->hikashop_params['price_with_tax']))
$this->element->hikashop_params['price_with_tax'] = 3;
								echo
$this->pricetaxType->display($this->control.'[price_with_tax]'
, $this->element->hikashop_params['price_with_tax'],true);
?>
							</td>
						</tr>
						<tr id="<?php echo
'show_original_price_line_'.$this->controlid ?>">
							<td class="key" valign="top">
								<?php echo JText::_('ORIGINAL_CURRENCY_PRICE');?>
							</td>
							<td>
								<?php
								if(!isset($this->element->hikashop_params['show_original_price']))
$this->element->hikashop_params['show_original_price'] =
'-1';
								echo JHTML::_('hikaselect.radiolist', $arr,
$this->control.'[show_original_price]' , '',
'value', 'text',
@$this->element->hikashop_params['show_original_price']);
?>
							</td>
						</tr>
						<tr id="<?php echo
'show_discount_line_'.$this->controlid ?>">
							<td class="key" valign="top">
								<?php echo JText::_('SHOW_DISCOUNTED_PRICE');?>
							</td>
							<td>
								<?php
								if(!isset($this->element->hikashop_params['show_discount']))
$this->element->hikashop_params['show_discount'] = 3;
								echo $this->discountDisplayType->display(
$this->control.'[show_discount]'
,@$this->element->hikashop_params['show_discount']); ?>
							</td>
						</tr>
						<tr id="<?php echo
'price_display_type_line_'.$this->controlid ?>">
							<td class="key">
								<?php echo JText::_('PRICE_DISPLAY_METHOD');?>
							</td>
							<td>
								<?php
								if(!isset($this->element->hikashop_params['price_display_type']))
$this->element->hikashop_params['price_display_type'] =
'inherit';
								echo $this->priceDisplayType->display(
$this->control.'[price_display_type]',@$this->element->hikashop_params['price_display_type']);
?>
							</td>
						</tr>
						<?php
						if(hikashop_level(2) &&
$this->element->module=='mod_hikashop'){ ?>
							<tr>
								<td class="key">
									<?php echo
JText::_('DISPLAY_CUSTOM_ITEM_FIELDS');?>
								</td>
								<td>
									<?php
									if(!isset($this->element->hikashop_params['display_custom_item_fields']))
$this->element->hikashop_params['display_custom_item_fields']
= '-1';
									echo JHTML::_('hikaselect.radiolist', $arr,
$this->control.'[display_custom_item_fields]' , '',
'value', 'text',
@$this->element->hikashop_params['display_custom_item_fields']);
									?>
								</td>
							</tr>
						<?php } ?>
						<?php if(hikashop_level(2)){ ?>
							<tr>
								<td class="key">
									<?php echo JText::_('DISPLAY_FILTERS');?>
								</td>
								<td>
									<?php
									if(!isset($this->element->hikashop_params['display_filters']))
$this->element->hikashop_params['display_filters'] =
'-1';
									echo JHTML::_('hikaselect.radiolist', $arr,
$this->control.'[display_filters]' , '',
'value', 'text',
@$this->element->hikashop_params['display_filters']);
									?>
								</td>
							</tr>
						<?php } ?>
						<tr>
							<td class="key" valign="top">
								<?php echo JText::_('DISPLAY_BADGE');?>
							</td>
							<td>
								<?php
								if(!isset($this->element->hikashop_params['display_badges']))
$this->element->hikashop_params['display_badges'] =
'-1';
								echo JHTML::_('hikaselect.radiolist', $arr,
$this->control.'[display_badges]' , '',
'value', 'text',
@$this->element->hikashop_params['display_badges']); ?>
							</td>
						</tr>
						<?php if($this->element->module=='mod_hikashop'){
?>
					</table>
				</fieldset>
				<fieldset id="<?php echo
'content_category_'.$this->controlid ?>"
class="adminform">
					<legend><?php echo
JText::_('PARAMS_FOR_CATEGORIES'); ?></legend>
					<table class="admintable table" cellspacing="1"
width="100%">
						<tr>
							<td class="key" valign="top">
								<?php echo JText::_('ORDERING_FIELD');?>
							</td>
							<td>
								<?php
								if(!isset($this->element->hikashop_params['category_order']))
$this->element->hikashop_params['category_order'] =
'inherit';
								echo
$this->orderType->display($this->control.'[category_order]',@$this->element->hikashop_params['category_order'],'category');?>
							</td>
						</tr>
						<tr>
							<td class="key" valign="top">
								<?php echo JText::_('SHOW_SUB_CATEGORIES');?>
							</td>
							<td>
								<?php
								if(!isset($this->element->hikashop_params['child_display_type']))
$this->element->hikashop_params['child_display_type'] =
'inherit';
								echo
$this->listType->display($this->control.'[child_display_type]',@$this->element->hikashop_params['child_display_type']);?>
							</td>
						</tr>
						<tr>
							<td class="key" valign="top">
								<?php echo JText::_('NUMBER_OF_SUB_CATEGORIES');?>
							</td>
							<td>
								<input name="<?php echo $this->control;
?>[child_limit]" type="text" value="<?php echo
@$this->element->hikashop_params['child_limit'];?>"
/>
							</td>
						</tr>
						<tr>
							<td class="key" valign="top">
								<?php echo JText::_('LINK_ON_MAIN_CATEGORIES');?>
							</td>
							<td>
								<?php
								if(!isset($this->element->hikashop_params['links_on_main_categories']))
$this->element->hikashop_params['links_on_main_categories']
= '-1';
								echo JHTML::_('hikaselect.radiolist', $arr,
$this->control.'[links_on_main_categories]' , '',
'value', 'text',
@$this->element->hikashop_params['links_on_main_categories']);
								?>
							</td>
						</tr>
						<tr>
							<td class="key" valign="top">
								<?php echo JText::_('SHOW_NUMBER_OF_PRODUCTS');?>
							</td>
							<td>
								<?php
								if(!isset($this->element->hikashop_params['number_of_products']))
$this->element->hikashop_params['number_of_products'] =
'-1';
								echo JHTML::_('hikaselect.radiolist', $arr,
$this->control.'[number_of_products]' , '',
'value', 'text',
@$this->element->hikashop_params['number_of_products']);
								?>
							</td>
						</tr>
						<tr>
							<td class="key" valign="top">
								<?php echo
JText::_('ONLY_DISPLAY_CATEGORIES_WITH_PRODUCTS');?>
							</td>
							<td>
								<?php
								if(!isset($this->element->hikashop_params['only_if_products']))
$this->element->hikashop_params['only_if_products'] =
'-1';
								echo JHTML::_('hikaselect.radiolist', $arr,
$this->control.'[only_if_products]' , '',
'value', 'text',
@$this->element->hikashop_params['only_if_products']);
								?>
							</td>
						</tr>
					</table>
				</fieldset>
				<fieldset id="<?php echo
'layout_div_'.$this->controlid ?>"
class="adminform">
					<legend><?php echo JText::_('PARAMS_FOR_DIV');
?></legend>
					<?php
						$displayCarouselType="";
						$slideDirection="";
						$transitionEffect="";
						$carouselEffectDuration="";
						$productBySlide="";
						$slideOneByOne="";
						$autoSlide="";
						$autoSlideDuration="";
						$slidePagination="";
						$paginationWidth="";
						$paginationHeight="";
						$paginationPosition="";
						$displayButton="";
						$productEffect="";
						$productEffectDuration="";
						$paneHeight="";
						if(@!$this->element->hikashop_params['enable_carousel']){
							$displayCarouselType='style="display:none"';
							$slideDirection='style="display:none"';
							$transitionEffect='style="display:none"';
							$carouselEffectDuration='style="display:none"';
							$productBySlide='style="display:none"';
							$slideOneByOne='style="display:none"';
							$autoSlide='style="display:none"';
							$autoSlideDuration='style="display:none"';
							$slidePagination='style="display:none"';
							$paginationWidth='style="display:none"';
							$paginationHeight='style="display:none"';
							$paginationPosition='style="display:none"';
							$displayButton='style="display:none"';
						}
						if(@$this->element->hikashop_params['carousel_effect']=="fade"){
							$transitionEffect='style="display:none"';
							$slideOneByOne='style="display:none"';
						}
						if(@$this->element->hikashop_params['div_item_layout_type']=='fade'){
							$productEffect='style="display:none"';
						}else
if(@$this->element->hikashop_params['div_item_layout_type']=='img_pane'){
							$productEffect='style="display:none"';
							$productEffectDuration='style="display:none"';
						}else
if(@$this->element->hikashop_params['div_item_layout_type']!='slider_horizontal'
&&
@$this->element->hikashop_params['div_item_layout_type']!='slider_vertical'){
							$productEffect='style="display:none"';
							$productEffectDuration='style="display:none"';
						}
						if(!@$this->element->hikashop_params['auto_slide']){
							$autoSlideDuration='style="display:none"';
						}
						if(@$this->element->hikashop_params['pagination_type']=="no_pagination"){
							$paginationWidth='style="display:none"';
							$paginationHeight='style="display:none"';
							$paginationPosition='style="display:none"';
						}else{
							if(@$this->element->hikashop_params['pagination_type']!="thumbnails"
){
								$paginationHeight='style="display:none"';
								$paginationWidth='style="display:none"';
							}
						}
					?>
					<table class="admintable table" cellspacing="1"
width="100%">
						<?php if(hikashop_level(2)){ ?>
							<tr>
								<td class="key" valign="top">
									<?php echo JText::_('ENABLE_CAROUSEL');?>
								</td>
								<td>
									<?php echo JHTML::_('hikaselect.booleanlist',
$this->control.'[enable_carousel]' ,
'onclick="setVisible(this.value,\''.$this->controlid.'\');"',@$this->element->hikashop_params['enable_carousel']);
?>
								</td>
							</tr>
							<tr id="<?php echo
'carousel_type_'.$this->controlid.'"
'.$displayCarouselType; ?>>
								<td class="key" valign="top">
									<?php echo JText::_('TYPE_OF_CAROUSEL_EFFECT');?>
								</td>
								<td>
									<?php echo
$this->effectType->display($this->control.'[carousel_effect]',@$this->element->hikashop_params['carousel_effect']
,
'onchange="setVisibleEffect(this.value,\''.$this->controlid.'\');"');?>
								</td>
							</tr>
							<tr id="<?php echo
'slide_direction_'.$this->controlid.'"
'.$slideDirection; ?>>
								<td class="key" valign="top">
									<?php echo JText::_('SLIDE_DIRECTION');?>
								</td>
								<td>
									<?php echo
$this->directionType->display($this->control.'[slide_direction]',@$this->element->hikashop_params['slide_direction']);?>
								</td>
							</tr>
							<tr id="<?php echo
'transition_effect_'.$this->controlid.'"
'.$transitionEffect; ?>>
								<td class="key" valign="top">
									<?php echo JText::_('TRANSITION_EFFECT');?>
								</td>
								<td>
									<?php echo
$this->transition_effectType->display($this->control.'[transition_effect]',@$this->element->hikashop_params['transition_effect']);?>
								</td>
							</tr>
							<tr id="<?php echo
'carousel_effect_duration_'.$this->controlid.'"
'.$carouselEffectDuration; ?>>
								<td class="key">
									<?php echo
JText::_('CAROUSEL_EFFECT_DURATION');?>
								</td>
								<td>
									<input size=12 name="<?php echo
$this->control;?>[carousel_effect_duration]"
type="text" value="<?php echo
@$this->element->hikashop_params['carousel_effect_duration'];?>"
/> ms
								</td>
							</tr>
							<tr id="<?php echo
'product_by_slide_'.$this->controlid.'"
'.$productBySlide; ?>>
								<td class="key">
									<?php echo JText::_('PRODUCTS_BY_SLIDE');?>
								</td>
								<td>
									<input size=9 name="<?php echo
$this->control;?>[item_by_slide]" type="text"
value="<?php echo
@$this->element->hikashop_params['item_by_slide'];?>"
/>
								</td>
							</tr>
							<tr id="<?php echo
'slide_one_by_one_'.$this->controlid.'"
'.$slideOneByOne; ?>>
								<td class="key" valign="top">
									<?php echo JText::_('SLIDE_ONE_BY_ONE');?>
								</td>
								<td>
									<?php echo JHTML::_('hikaselect.booleanlist',
$this->control.'[one_by_one]' ,
'',@$this->element->hikashop_params['one_by_one']);
?>
								</td>
							</tr>
							<tr id="<?php echo
'auto_slide_'.$this->controlid.'" '.$autoSlide;
?>>
								<td class="key" valign="top">
									<?php echo JText::_('AUTO_SLIDE');?>
								</td>
								<td>
									<?php echo JHTML::_('hikaselect.booleanlist',
$this->control.'[auto_slide]' ,
'onclick="setVisibleAutoSlide(this.value,\''.$this->controlid.'\');"',@$this->element->hikashop_params['auto_slide']);
?>
								</td>
							</tr>
							<tr id="<?php echo
'auto_slide_duration_'.$this->controlid.'"
'.$autoSlideDuration; ?>>
								<td class="key">
									<?php echo JText::_('AUTO_SLIDE_DURATION');?>
								</td>
								<td>
									<input size=12 name="<?php echo
$this->control;?>[auto_slide_duration]" type="text"
value="<?php echo
@$this->element->hikashop_params['auto_slide_duration'];?>"
/> ms
								</td>
							</tr>
							<tr id="<?php echo
'slide_pagination_'.$this->controlid.'"
'.$slidePagination; ?>>
								<td class="key">
									<?php echo JText::_('SLIDE_PAGINATION_TYPE');?>
								</td>
								<td>
									<?php echo
$this->slide_paginationType->display($this->control.'[pagination_type]',@$this->element->hikashop_params['pagination_type'],
'onchange="setVisiblePagination(this.value,\''.$this->controlid.'\');"');?>
								</td>
							</tr>
							<tr id="<?php echo
'pagination_width_'.$this->controlid.'"
'.$paginationWidth; ?>>
								<td class="key">
									<?php echo JText::_('PAGINATION_IMAGE_WIDTH');?>
								</td>
								<td>
									<input size=12 name="<?php echo
$this->control;?>[pagination_image_width]" type="text"
value="<?php echo
@$this->element->hikashop_params['pagination_image_width'];?>"
/> px
								</td>
							</tr>
							<tr id="<?php echo
'pagination_height_'.$this->controlid.'"
'.$paginationHeight; ?>>
								<td class="key">
									<?php echo JText::_('PAGINATION_IMAGE_HEIGHT');?>
								</td>
								<td>
									<input size=12 name="<?php echo
$this->control;?>[pagination_image_height]"
type="text" value="<?php echo
@$this->element->hikashop_params['pagination_image_height'];?>"
/> px
								</td>
							</tr>
							<tr id="<?php echo
'pagination_position_'.$this->controlid.'"
'.$paginationPosition; ?>>
								<td class="key">
									<?php echo JText::_('HIKA_PAGINATION');?>
								</td>
								<td>
									<?php echo
$this->positionType->display($this->control.'[pagination_position]',@$this->element->hikashop_params['pagination_position']);?>
								</td>
							</tr>
							<tr id="<?php echo
'display_button_'.$this->controlid.'"
'.$displayButton; ?>>
								<td class="key" valign="top">
									<?php echo JText::_('DISPLAY_BUTTONS');?>
								</td>
								<td>
									<?php echo JHTML::_('hikaselect.booleanlist',
$this->control.'[display_button]' ,
'',@$this->element->hikashop_params['display_button']);
?>
								</td>
							</tr>
						<?php }else{ ?>
							<tr>
								<td class="key" valign="top">
									<?php echo JText::_('ENABLE_CAROUSEL');?>
								</td>
								<td>
									<?php echo hikashop_getUpgradeLink('business');;
?>
								</td>
							</tr>
						<?php } ?>
						<tr>
							<td class="key">
								<?php echo JText::_('IMAGE_X');?>
							</td>
							<td>
								<input size=12 name="<?php echo
$this->control;?>[image_width]" type="text"
value="<?php echo
@$this->element->hikashop_params['image_width'];?>"
/> px
							</td>
						</tr>
						<tr>
							<td class="key">
								<?php echo JText::_('IMAGE_Y');?>
							</td>
							<td>
								<input size=12 name="<?php echo
$this->control;?>[image_height]" type="text"
value="<?php echo
@$this->element->hikashop_params['image_height'];?>"
/> px
							</td>
						</tr>
						<tr>
							<td class="key" valign="top">
								<?php echo JText::_('TYPE_OF_ITEM_LAYOUT');?>
							</td>
							<td>
								<?php
								if(!isset($this->element->hikashop_params['div_item_layout_type']))
$this->element->hikashop_params['div_item_layout_type'] =
'inherit';
								echo
$this->itemType->display($this->control.'[div_item_layout_type]',@$this->element->hikashop_params['div_item_layout_type'],$this->js,
'onchange="setVisibleLayoutEffect(this.value,\''.$this->controlid.'\');"');?>
							</td>
						</tr>
						<?php if(hikashop_level(2)){ ?>
							<tr id="<?php echo
'product_effect_'.$this->controlid.'"
'.$productEffect; ?>>
								<td class="key" valign="top">
									<?php echo
JText::_('PRODUCT_TRANSITION_EFFECT');?>
								</td>
								<td>
									<?php echo
$this->transition_effectType->display($this->control.'[product_transition_effect]',@$this->element->hikashop_params['product_transition_effect']);?>
								</td>
							</tr>
							<tr id="<?php echo
'product_effect_duration_'.$this->controlid.'"
'.$productEffectDuration; ?>>
								<td class="key">
									<?php echo JText::_('PRODUCT_EFFECT_DURATION');?>
								</td>
								<td>
									<input size=12 name="<?php echo
$this->control;?>[product_effect_duration]"
type="text" value="<?php echo
@$this->element->hikashop_params['product_effect_duration'];?>"
/> ms
								</td>
							</tr>
						<?php } ?>
						<tr id="<?php echo
'pane_height_'.$this->controlid.'"
'.$paneHeight; ?>>
							<td class="key">
								<?php echo JText::_('PANE_HEIGHT');?>
							</td>
							<td>
								<input size=12 name="<?php echo
$this->control;?>[pane_height]" type="text"
value="<?php echo
@$this->element->hikashop_params['pane_height'];?>"
/>px
							</td>
						</tr>
					<?php } ?>
						<tr>
							<td class="key" valign="top">
								<?php echo JText::_('ITEM_BOX_COLOR');?>
							</td>
							<td>
								<?php echo
$this->colorType->displayAll('',$this->control.'[background_color]',@$this->element->hikashop_params['background_color']);
?>
							</td>
						</tr>
						<tr>
							<td class="key">
								<?php echo JText::_('ITEM_BOX_MARGIN');?>
							</td>
							<td>
								<input name="<?php echo
$this->control;?>[margin]" type="text"
value="<?php echo
@$this->element->hikashop_params['margin'];?>"
/>px
							</td>
						</tr>
						<tr>
							<td class="key" valign="top">
								<?php echo JText::_('ITEM_BOX_BORDER');?>
							</td>
							<td>
								<?php
								if(!isset($this->element->hikashop_params['border_visible']))
$this->element->hikashop_params['border_visible'] =
'-1';
								$arr2 = $arr;
								$arr2[] = JHTML::_('select.option', 2,
JText::_('THUMBNAIL'));
								echo JHTML::_('hikaselect.radiolist', $arr2,
$this->control.'[border_visible]' , '',
'value', 'text',
@$this->element->hikashop_params['border_visible']);
								?>
							</td>
						</tr>
						<tr>
							<td class="key" valign="top">
								<?php echo JText::_('ITEM_BOX_ROUND_CORNER');?>
							</td>
							<td>
								<?php
								if(!isset($this->element->hikashop_params['rounded_corners']))
$this->element->hikashop_params['rounded_corners'] =
'-1';
								echo JHTML::_('hikaselect.radiolist', $arr,
$this->control.'[rounded_corners]' , '',
'value', 'text',
@$this->element->hikashop_params['rounded_corners']);
								?>
							</td>
						</tr>
						<tr>
							<td class="key" valign="top">
								<?php echo JText::_('TEXT_CENTERED');?>
							</td>
							<td>
								<?php
								if(!isset($this->element->hikashop_params['text_center']))
$this->element->hikashop_params['text_center'] =
'-1';
								echo JHTML::_('hikaselect.radiolist', $arr,
$this->control.'[text_center]' , '',
'value', 'text',
@$this->element->hikashop_params['text_center']);
								?>
							</td>
						</tr>
					</table>
				</fieldset>
				<?php
if($this->elemmodules/tmpl/listing.php000064400000007150151162050350011353
0ustar00
<?php } else { ?>
	</div>
</div>
<?php } ?>
	<div class="clr"></div>
<?php if (!$noForm) { ?>
	<input type="hidden" name="option"
value="<?php echo HIKASHOP_COMPONENT; ?>" />
	<input type="hidden" name="module[id]"
value="<?php echo (int)@$this->element->id; ?>"
/>
	<input type="hidden" name="module[module]"
value="<?php echo $this->element->module; ?>" />
	<input type="hidden" name="task" value=""
/>
	<input type="hidden" name="ctrl"
value="<?php echo JRequest::getVar('ctrl');?>"
/>
	<input type="hidden" name="return"
value="<?php echo
JRequest::getString('return');?>" />
	<input type="hidden" name="client"
value="0" />
	<?php echo JHTML::_( 'form.token' );

		?>
</form>
<?php }
$this->js = "window.addEvent('domready', function() {
		".$this->js."
});";
$doc = JFactory::getDocument();
$doc->addScriptDeclaration($this->js);?>
modules/tmpl/listing.php000064400000007150151162050350011353
0ustar00<?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');
?>	<div class="iframedoc"
id="iframedoc"></div>
	<form action="index.php?option=<?php echo HIKASHOP_COMPONENT
?>&amp;ctrl=modules" method="post" 
name="adminForm" id="adminForm">
		<table>
			<tr>
				<td width="100%">
					<?php echo JText::_( 'FILTER' ); ?>:
					<input type="text" name="search"
id="search" value="<?php echo
$this->escape($this->pageInfo->search);?>"
class="text_area"
onchange="document.adminForm.submit();" />
					<button class="btn"
onclick="this.form.submit();"><?php echo JText::_(
'GO' ); ?></button>
					<button class="btn"
onclick="document.getElementById('search').value='';this.form.submit();"><?php
echo JText::_( 'RESET' ); ?></button>
				</td>
			</tr>
		</table>
		<table class="adminlist table table-striped table-hover"
cellpadding="1">
			<thead>
				<tr>
					<th class="title titlenum">
						<?php echo JText::_( 'HIKA_NUM' );?>
					</th>
					<th class="title titlebox">
						<input type="checkbox" name="toggle"
value="" onclick="hikashop.checkAll(this);" />
					</th>
					<th class="title">
						<?php echo JHTML::_('grid.sort',
JText::_('HIKA_NAME'), 'title',
$this->pageInfo->filter->order->dir,$this->pageInfo->filter->order->value
); ?>
					</th>
					<th class="title titletoggle">
						<?php echo JText::_('HIKA_ENABLED'); ?>
					</th>
					<th class="title titleid">
						<?php echo JHTML::_('grid.sort', JText::_(
'ID' ), 'id',
$this->pageInfo->filter->order->dir,$this->pageInfo->filter->order->value
); ?>
					</th>
				</tr>
			</thead>
			<tfoot>
				<tr>
					<td colspan="5">
						<?php echo $this->pagination->getListFooter(); ?>
						<?php echo $this->pagination->getResultsCounter(); ?>
					</td>
				</tr>
			</tfoot>
			<tbody>
				<?php
					$k = 0;

					for($i = 0,$a = count($this->rows);$i<$a;$i++){
						$row =& $this->rows[$i];

						$publishemodules/tmpl/options.php000064400000041532151162050350011377
0ustar00
				<?php
						$k = 1-$k;
					}
				?>
			</tbody>
		</table>
		<input type="hidden" name="option"
value="<?php echo HIKASHOP_COMPONENT; ?>" />
		<input type="hidden" name="task"
value="" />
		<input type="hidden" name="ctrl"
value="<?php echo JRequest::getCmd('ctrl'); ?>"
/>
		<input type="hidden" name="boxchecked"
value="0" />
		<input type="hidden" name="filter_order"
value="<?php echo
$this->pageInfo->filter->order->value; ?>" />
		<input type="hidden" name="filter_order_Dir"
value="<?php echo $this->pageInfo->filter->order->dir;
?>" />
		<?php echo JHTML::_( 'form.token' ); ?>
	</form>
modules/tmpl/options.php000064400000041532151162050350011377
0ustar00<?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
if(!isset($this->element['layout_type']))
	$this->element['layout_type'] = 'inherit';
if (HIKASHOP_J40) {
?>
<style>
	legend,
	fieldset#fieldset-basic small.form-text.text-muted,
	section#attrib-products small.form-text.text-muted {
		display: none;
	}
	fieldset#fieldset-hk_options,
	section#attrib-hk_options {
		border: none;
		padding: 0px;
		margin: 0px;
	}
	section#attrib-basic,
	section#attrib-products {
		padding: 0px;
	}
	div#hikashop_main_content {
		border: 1px solid #b2bfcd;
		border-width: 1px 0px 0px 0px;
	}
	small.form-text.text-muted {
		display: none;
	}
	div#hikashop_main_content select.custom-select {
		width: 260px;
	}
</style>
<?php
}

?>
<div id="hikashop_main_content"
class="hikashop_main_content hk-container-fluid item-module-interface
hika_j<?php echo (int)HIKASHOP_JVERSION; ?>">
	<!-- module edition -->
	<div id="hikashop_module_backend_page_edition">
		<!-- Top part (Layout selection) -->
		<?php
		if($this->type == 'category'){
			$class = 'hkc-xl-4';
		}else{
			$class = 'hkc-xl-3';
		}
		$this->layoutType->load();
		?>
		<div class="hk-row-fluid hikashop_edit_display_type">
		<?php
		foreach($this->layoutType->values as $value){
			$dataDisplay = '';
			if($value->value == 'table')
				$dataDisplay = 'data-display-type="product"';
			if($value->value == 'inherit'){
				if($this->type == 'category' &&
$this->default_params['layout_type'] == 'table')
					$value->text = $value->text.' (div)';
				else
					$value->text = $value->text.'
('.$this->default_params['layout_type'].')';
			}
			$src = strtolower($value->value);
		?>
			<div class="<?php echo $class; ?>
hikashop_module_block_content_type
hikashop_module_edit_display_type_<?php echo $value->value;
?>" <?php echo $dataDisplay; ?>
onclick="window.optionMgr.tabChange(this);"
data-type="product_layout_choice" data-layout="<?php echo
'product_'.$value->value; ?>">
				<img class="hikashop_menu_block_img_unselected"
src="<?php echo HIKASHOP_IMAGES; ?>icons/icon-24-<?php echo
$src; ?>.png">
				<img class="hikashop_menu_block_img_selected"
src="<?php echo HIKASHOP_IMAGES; ?>icons/icon-24-<?php echo
$src; ?>-selected.png">
				<?php echo $value->text; ?>
			</div>
		<?php
		}
		?>
			<input type="hidden"
id="data_module__product_layout_type" name="<?php echo
$this->name; ?>[layout_type]" value="<?php echo
$this->element['layout_type']; ?>">
			<input type="hidden"
id="data_module__product_layout_type_default" name=""
value="<?php echo
$this->default_params['layout_type']; ?>">
		</div>

		<!-- Middle part (Display options) -->
		<div class="hikashop_menu_block
hikashop_module_edit_display">
<!--			<div class="hkc-xl-4 hikashop_module_block
hikashop_module_edit_display_preview">
			<?php
				$this->setLayout('options_display_preview');
				echo $this->loadTemplate();
			?>
			</div>
-->
			<div class="hikashop_module_edit_display_settings">
			<?php
			foreach($this->layoutType->values as $value){
				if($value->value == 'inherit') continue;
				$this->setLayout('options_display_'.$value->value);
				echo $this->loadTemplate();
			}
			?>
			</div>
		</div>

		<!-- Bottom part (Generic options) -->
		<div class="hk-row-fluid hikashop_module_block
hikashop_module_edit_general">
		<?php
		$this->setLayout('options_main');
		echo $this->loadTemplate();

		$this->setLayout('options_category');
		echo $this->loadTemplate();

		$this->setLayout('options_product');
		echo $this->loadTemplate();

		$this->setLayout('options_display_restriction');
			echo $this->loadTemplate();

		?>
		</div>

		<!-- Extra part (Carousel options & ...) -->
		<div class="hk-row-fluid hikashop_module_block
hikashop_module_edit_extra" data-display-tab="div">
		<?php
			$this->setLayout('options_product_extra');
			echo $this->loadTemplate();
		?>
		</div>
<?php
if(!empty($this->extra_blocks['layouts'])) {
	foreach($this->extra_blocks['layouts'] as $key => $r) {
		if(is_string($r))
			echo $r;
		if(is_array($r)) {
			if(!isset($r['name']) && isset($r[0]))
				$r['name'] = $r[0];
			if(!isset($r['value']) && isset($r[1]))
				$r['value'] = $r[1];
?>
		<div class="hk-row-fluid hikashop_module_block
hikashop_module_edit_<?php echo $key; ?>">
<div class="hkc-xl-4 hikashop_module_subblock
hikashop_module_edit_product">
	<div class="hikashop_module_subblock_content">
		<div class="hikashop_module_subblock_title
hikashop_module_edit_<?php echo $key; ?>_title"><?php echo
JText::_(@$r['name']); ?></div>
<?php
			if(is_array($r['value'])) {
?>
		<dl class="hika_options">
<?php
				foreach($r['value'] as $k => $v) {
?>
			<dt class="hikashop_option_name"><?php echo
JText::_($k); ?></dt>
			<dd class="hikashop_option_value"><?php echo $v;
?></dd>
<?php
				}
?>
		</dl>
<?php
			} else {
				echo $r['value'];
			}
?>
	</div>
</div>
		</div>
<?php
		}
	}
}
?>
	</div>
</div>
<?php
$js = "
window.hikashop.ready(function(){
	window.hikashop.dlTitle('hikashop_main_content');
";
$js .= "
	hkjQuery('div[data-type=\'product_layout\']').hide();
	window.optionMgr.tabChange('div[data-layout=\'product_".$this->element['layout_type']."\']');
";
$js .= "
	hkjQuery('div.accordion-group
#hikashop_main_content').prev().hide();
";
$js .= "
	var ctype =
hkjQuery('[name=\'".$this->name."[content_type]\']').val(),
ltype =
hkjQuery('[name=\'".$this->name."[layout_type]\']').val();
	if(ctype == 'product')
		hkjQuery('div[data-display-type=\'category\']').hide();
	else
		hkjQuery('div[data-display-type=\'product\'],
dl[data-display-type=\'product\']').hide();
	if(ltype != 'div') {
		var defaultLayout =
document.getElementById('data_module__product_layout_type_default').value;
		if(ltype != 'inherit' || defaultLayout != 'div')
			hkjQuery('div[data-display-tab=\'div\']').hide();
	}
	hkjQuery('#content_select_jform_params_hikashopmodule').change(function(){
		if(hkjQuery(this).val() == 'product'){
			hkjQuery('div[data-layout=\'product_inherit\']').html('".JText::_('HIKA_INHERIT')."
('+defaultParams['layout_type']+')');
			hkjQuery('div[data-display-type=\'product\'],
dl[data-display-type=\'product\']').show();
			hkjQuery('div[data-display-type=\'category\']').hide();
			hkjQuery('.hikashop_edit_display_type').children('div').removeClass('hkc-xl-4').addClass('hkc-xl-3');
		}else{
			if(defaultParams['layout_type'] == 'table')
				hkjQuery('div[data-layout=\'product_inherit\']').html('".JText::_('HIKA_INHERIT')."
(div)');
			hkjQuery('div[data-display-type=\'product\'],
dl[data-display-type=\'product\']').hide();
			hkjQuery('div[data-display-type=\'category\']').show();
			hkjQuery('.hikashop_edit_display_type').children('div').removeClass('hkc-xl-3').addClass('hkc-xl-4');
		}
		window.optionMgr.tabChange('div[data-layout=\'product_inherit\']');
	});
";
$js .="
	window.optionMgr.hideDisplayOptions();
	hkjQuery('#hikashop_main_content').find('input').change(function(){
		window.optionMgr.hideDisplayOptions(''+hkjQuery(this).attr('name')+'',''+hkjQuery(this).val()+'');
	});
	hkjQuery('#hikashop_main_content').find('select').change(function(){
		window.optionMgr.hideDisplayOptions(''+hkjQuery(this).attr('name')+'',''+hkjQuery(this).val()+'');
	});
";
$js .="
	hkjQuery('#hikashop_module_backend_page_edition
.hikashop_module_edit_display
.hikashop_option_value').find('input').change(function(){
		var name = hkjQuery(this).attr('name');
		var val = hkjQuery(this).val();
		hkjQuery('[name=\''+name+'\']').val(val);
	});
	hkjQuery('#hikashop_module_backend_page_edition
.hikashop_module_edit_display
.hikashop_option_value').find('select').change(function(){
		var name = hkjQuery(this).attr('name');
		var val = hkjQuery(this).val();
		hkjQuery('[name=\''+name+'\']').val(val);
	});
";
$js .="
	window.optionMgr.showCarouselOptions('carousel','".@$this->element['enable_carousel']."','".$this->name."');
	hkjQuery('.hikashop_module_edit_extra
.hikashop_option_value').find('input').change(function(){
		window.optionMgr.showCarouselOptions(''+hkjQuery(this).parent().parent().attr('data-control')+'',''+hkjQuery(this).val()+'','".$this->name."');
	});
	hkjQuery('.hikashop_module_edit_extra
.hikashop_option_value').find('select').change(function(){
		window.optionMgr.showCarouselOptions(''+hkjQuery(this).parent().attr('data-control')+'',''+hkjQuery(this).val()+'','".$this->name."');
	});
";
$js .="
	hkjQuery('.listing_item_quantity_fields
input').change(function(){
		var name =
hkjQuery(this).attr('name').replace('[columns]','').replace('[rows]','');
		var listType =
hkjQuery(this).closest('.listing_item_quantity_fields').attr('data-list-type');
		var cCol = 1;
		if(listType != 'table')
			cCol =
hkjQuery('input[name=\''+name+'[columns]\']').val();
		var cRow =
hkjQuery('input[name=\''+name+'[rows]\']').val();
		hkjQuery('input[name=\''+name+'[limit]\']').val(parseInt(cRow)
* parseInt(cCol));
		window.optionMgr.fillSelector(cCol,cRow, name);
	});
	hkjQuery('.listing_item_quantity_fields
.hikashop_product_listing_input_button').click(function(){
		var ref = hkjQuery(this).attr('data-ref'),
		inc = hkjQuery(this).attr('data-inc');
		if(inc == 'plus'){
			hkjQuery('input[name=\''+ref+'\']').val(parseInt(hkjQuery('input[name=\''+ref+'\']').val())
+ 1).trigger('change');
		}else
if(parseInt(hkjQuery('input[name=\''+ref+'\']').val())
> 1){
			hkjQuery('input[name=\''+ref+'\']').val(parseInt(hkjQuery('input[name=\''+ref+'\']').val())
- 1).trigger('change');
		}
	});
	hkjQuery('.listing_item_quantity_selector
div').mouseover(function(){
		var classes = hkjQuery(this).attr('class').split('
');
		window.optionMgr.fillSelector(parseInt(classes[0].replace('col',''))+1,parseInt(classes[1].replace('row',''))+1,
hkjQuery(this).parent().attr('data-name'));
	});
	hkjQuery('.listing_item_quantity_selector
div').click(function(){
		var name = hkjQuery(this).parent().attr('data-name');
		var classes = hkjQuery(this).attr('class').split('
');
		hkjQuery('input[name=\''+name+'[columns]\']').val(parseInt(classes[0].replace('col',''))+1);
		hkjQuery('input[name=\''+name+'[rows]\']').val(parseInt(classes[1].replace('row',''))+1);
		hkjQuery('input[name=\''+name+'[limit]\']').val((parseInt(classes[0].replace('col',''))+1)
* (parseInt(classes[1].replace('row',''))+1));
	});
	hkjQuery('.listing_item_quantity_selector').mouseleave(function(){
		var name = hkjQuery(this).attr('data-name');
		var cCol =
hkjQuery('input[name=\''+name+'[columns]\']').val();
		var limit =
hkjQuery('input[name=\''+name+'[limit]\']').val();
		var cRow = 0;
		if(limit != 0)
			cRow = limit / cCol;
		Math.ceil(cRow);
		window.optionMgr.fillSelector(cCol,cRow,name);
	});
});
";
$js .= "var defaultParams = [];";
foreach($this->default_params as $k => $v){
	$js .= "defaultParams['".$k."'] =
'".str_replace(array("\\", "'"),
array("\\\\", "\'"), $v)."';";
}
$js .= "
window.optionMgr = {
	cpt:{
	},
	fillSelector : function(cCol,cRow,name) {
		hkjQuery('.listing_item_quantity_selector[data-name=\''+name+'\']
div').each(function(){
			var classes = hkjQuery(this).attr('class').split('
');
			var col = parseInt(classes[0].replace('col',''));
			var row = parseInt(classes[1].replace('row',''));
			hkjQuery(this).removeClass('selected');
			if(col < cCol && row < cRow)
				hkjQuery(this).addClass('selected');
		});
	},
	tabChange : function(el) {
		var val = hkjQuery(el).attr('data-layout'), ctype =
hkjQuery('[name=\'".$this->name."[content_type]\']').val();
		if(ctype == 'manufacturer')
			ctype = 'category';
		if(val === undefined || (ctype == 'category' && val ==
'product_table'))
			val = 'product_inherit';
		var info = val.split('_');
		if(info[1] == 'inherit'){
			if(ctype == 'category' &&
'".$this->default_params['layout_type']."'
== 'table')
				val = info[0]+'_div';
			else
				val =
info[0]+'_".$this->default_params['layout_type']."';
		}
		hkjQuery('div[data-type=\''+info[0]+'_layout\']').css('display','none');
		hkjQuery('div[data-layout=\''+val+'\']').css('display','');
		hkjQuery('#data_module__'+info[0]+'_layout_type').val(info[1]);
		hkjQuery('div[data-type=\''+info[0]+'_layout_choice\']').removeClass('selected');
		hkjQuery(el).addClass('selected');
		if(info[1] == 'div') {
			hkjQuery('div[data-display-tab=\'div\']').show();
		} else {
			var defaultLayout =
document.getElementById('data_module__product_layout_type_default').value;
			if(info[1] == 'inherit' && defaultLayout ==
'div')
				hkjQuery('div[data-display-tab=\'div\']').show();
			else
				hkjQuery('div[data-display-tab=\'div\']').hide();
		}
	},
	hideDisplayOptions : function(optionName,newValue) {
		var dynamicHide = {
			'child_display_type': {
				'hideValues': ['nochild','inherit'],
				'hideOptions': ['child_limit']
			},
			'div_item_layout_type': {
				'hideValues': ['title','inherit'],
				'hideOptions':
['image_width','image_height']
			},
			'show_price': {
				'hideValues': ['0','-1'],
				'hideOptions':
['price_display_type','price_with_tax','show_original_price','show_discount']
			}
		};
		if(optionName === undefined || newValue === undefined){
			hkjQuery.each(dynamicHide, function(mainOption,values){
				var currentValue =
hkjQuery('[name=\'".$this->name."['+mainOption+']\'][checked=\'checked\']').val();
				if(currentValue === undefined)
					currentValue =
hkjQuery('[name=\'".$this->name."['+mainOption+']\']').val();
				if((currentValue == 'inherit' || currentValue ==
'-1'))
					currentValue = defaultParams[mainOption];
				if(hkjQuery.inArray(currentValue,dynamicHide[mainOption]['hideValues'])
!= '-1'){
					hkjQuery.each(values['hideOptions'],function(index,
optionList){
						option = optionList.split(',');
						for(var i = option.length - 1; i >= 0; i--){
							hkjQuery('[name=\'".$this->name."['+option+']\']').parent().parent('.hika_options').hide();
							hkjQuery('[name=\'".$this->name."['+option+']\']').parent().parent().parent('.hika_options').hide();
						}
					});
				}
			});
		}else{
			optionName =
optionName.replace('".$this->name."[','').replace(']','');
			if(dynamicHide[optionName] === undefined)
				return;
			if((newValue == 'inherit' || newValue == '-1'))
				newValue = defaultParams[optionName];
			if(hkjQuery.inArray(newValue,dynamicHide[optionName]['hideValues'])
!= '-1'){
				hkjQuery.each(dynamicHide[optionName]['hideOptions'],function(j,
option){
					hkjQuery('[name=\'".$this->name."['+option+']\']').parent().parent('.hika_options').hide();
					hkjQuery('[name=\'".$this->name."['+option+']\']').parent().parent().parent('.hika_options').hide();
				});
			}else{
				hkjQuery.each(dynamicHide[optionName]['hideOptions'],function(j,
option){
					hkjQuery('[name=\'".$this->name."['+option+']\']').parent().parent('.hika_options').show();
					hkjQuery('[name=\'".$this->name."['+option+']\']').parent().parent().parent('.hika_options').show();
				});
			}
		}
	},
	showCarouselOptions : function(dataControl,value,name){
		var mainValue = value;
		var dataParts = [dataControl];
		if(dataControl == 'carousel'){
			if(value == 1){
				hkjQuery('.hikashop_module_edit_product_extra_part2').show();
				dataParts =
['effect','paginationthumbnail','pagination','autoslide','carousel'];
			}else{
				hkjQuery('.hikashmodules/tmpl/options_category.php000064400000006230151162050350013270
0ustar00+name+'[pagination_type]\']').val();
				if(dataParts[i] == 'autoslide')
					value =
hkjQuery('[name=\''+name+'[auto_slide]\'][checked=\'checked\']').val();
			}else{
				value = mainValue;
			}
			if(value == '' || value == '0' || value ==
'no' || value == 'fade' || value ==
'no_pagination' || (dataParts[i] ==
'paginationthumbnail' && value !=
'thumbnails')){
				hkjQuery('dl[data-part=\''+dataParts[i]+'\']').hide();
			}else{
				hkjQuery('dl[data-part=\''+dataParts[i]+'\']').show();
			}
		}
	}
};
";

if(HIKASHOP_J40) {
	$js .= "
window.hikashop.ready(function(){
	var mainDiv = document.getElementById('hikashop_main_content');
	mainDiv.parentNode.classList.remove('column-count-md-2');
	mainDiv.parentNode.classList.remove('column-count-lg-3');
});
";
}
$doc = JFactory::getDocument();
$doc->addScriptDeclaration($js);
modules/tmpl/options_category.php000064400000006230151162050350013270
0ustar00<?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');
?><div class="hkc-xl-4 hkc-md-6 hikashop_module_subblock
hikashop_module_edit_category"
data-display-type="category">
	<div class="hikashop_module_subblock_content">
		<div class="hikashop_module_subblock_title
hikashop_module_edit_display_settings_div_title"><?php echo
JText::_('HIKA_CATEGORY_SETTINGS'); ?></div>
		<dl class="hika_options">
			<dt class="hikashop_option_name">
				<label for="data_module__<?php echo $this->type;
?>_child_display_type"><?php echo JText::_(
'HIKA_SUB_CATEGORIES' ); ?></label>
			</dt>
			<dd class="hikashop_option_value">
				<?php
				if(!isset($this->element['child_display_type']))
$this->element['child_display_type'] = 'inherit';
				echo
$this->listType->display($this->name.'[child_display_type]',$this->element['child_display_type']);
				?>
			</dd>
		</dl>
		<dl class="hika_options">
			<dt class="hikashop_option_name">
				<label for="data_module__<?php echo $this->type;
?>_child_limit"><?php echo JText::_(
'HIKA_SUB_CATEGORIES_NUMBER' ); ?></label>
			</dt>
			<dd class="hikashop_option_value">
				<input name="<?php echo $this->name;
?>[child_limit]" type="text" value="<?php echo
@$this->element['child_limit'];?>" />
			</dd>
		</dl>
		<dl class="hika_options">
			<dt class="hikashop_option_name">
				<?php echo
hikashop_hktooltip(JText::_('LINK_ON_MAIN_CATEGORIES'),
'', JText::_('HIKA_LINK_MAIN_CATEGORIES'),
'', 0);?>
			</dmodules/tmpl/options_display_div.php000064400000026434151162050350013772
0ustar00mber_of_products']);
				?>
			</dd>
		</dl>
		<dl class="hika_options">
			<dt class="hikashop_option_name">
				<label for="data_module__<?php echo $this->type;
?>_only_if_products">
					<?php echo
hikashop_hktooltip(JText::_('ONLY_DISPLAY_CATEGORIES_WITH_PRODUCTS'),
'', JText::_('HIKA_ONLY_WITH_PRODUCTS'), '',
0);?>
				</label>
			</dt>
			<dd class="hikashop_option_value">
				<?php
				if(!isset($this->element['only_if_products']))
$this->element['only_if_products'] = '-1';
				echo JHTML::_('hikaselect.inheritRadiolist',
$this->name.'[only_if_products]',
$this->element['only_if_products']);
				?>
			</dd>
		</dl>
	</div>
</div>
modules/tmpl/options_display_div.php000064400000026434151162050350013772
0ustar00<?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
$showDescription="";
$productEffect="";
$productEffectDuration="";
$paneHeight="";
if(hikashop_level(2)){
	if(!isset($this->element['div_item_layout_type'])){
		$this->element['div_item_layout_type']='inherit';
	}
	if($this->element['div_item_layout_type']=='fade'){
		$productEffect='style="display:none"';
	}else
if($this->element['div_item_layout_type']=='img_pane'){
		$productEffect='style="display:none"';
		$productEffectDuration='style="display:none"';
	}else
if($this->element['div_item_layout_type']!='slider_horizontal'
&&
$this->element['div_item_layout_type']!='slider_vertical'){
		$productEffect='style="display:none"';
		$productEffectDuration='style="display:none"';
	}
	if($this->element['div_item_layout_type']!='fade'
&&
$this->element['div_item_layout_type']!='slider_horizontal'
&&
$this->element['div_item_layout_type']!='slider_vertical'){
		$showDescription='style="display:none"';
	}
}


?>
<div class="hk-row-fluid
hikashop_module_edit_display_settings_div"
data-type="product_layout"
data-layout="product_div">
	<div class="hkc-xl-4 hkc-md-6 hikashop_module_subblock
hikashop_module_edit_display_settings_subdiv">
		<div class="hikashop_module_subblock_content">
			<div class="hikashop_module_subblock_title
hikashop_module_edit_display_settings_div_title"><?php echo
JText::_('HIKA_ITEMS'); ?></div>
			<?php if(empty($_GET['id'])) echo
hikashop_display(JText::_('WARNING_NUMBER_OF_ELEMENTS'),'info');
?>
			<dl class="hika_options">
				<dt class="hikashop_option_name">
					<label class="field_rows" for="data_module__<?php
echo $this->type; ?>_limit"><?php echo JText::_(
'FIELD_ROWS' ); ?></label>
				</dt>
				<dd class="hikashop_option_value">
					<p class="field_columns"><?php echo JText::_(
'FIELD_COLUMNS' ); ?></p>
					<div class="listing_item_quantity_selector"
data-name="<?php echo $this->name; ?>">
<?php
		$colsNb = @$this->element['columns'];
		$rowsNb = 0;
		if(@$this->element['columns'] != 0)
			$rowsNb = round($this->element['limit'] /
$this->element['columns']);
		for($j = 0; $j < 12; $j++){
			for($i = 0; $i < 6; $i++){
				$class = ($i < $colsNb && $j < $rowsNb) ? '
selected' : '';
				echo '<div class="col'.$i.' row'.$j.'
listing_div'.$class.'"></div>';
			}
			echo '<br/>';
		}
?>
					</div>
					<div class="listing_item_quantity_fields"
data-list-type="div">
						<div class="input-append">
							<input type="text"
class="hikashop_product_listing_input" name="<?php echo
$this->name; ?>[columns]" value="<?php echo $colsNb;
?>">
							<div class="add-on
hikashop_product_listing_input_buttons">
								<div class="hikashop_product_listing_input_button
hikashop_product_listing_input_plus" data-ref="<?php echo
$this->name; ?>[columns]"
data-inc="plus">+</div>
								<div class="hikashop_product_listing_input_button
hikashop_product_listing_input_minus" data-ref="<?php echo
$this->name; ?>[columns]"
data-inc="minus">&ndash;</div>
							</div>
						</div>
						x
						<div class="input-append">
							<input type="text"
class="hikashop_product_listing_input" name="<?php echo
$this->name; ?>[rows]" value="<?php echo $rowsNb;
?>">
							<div class="add-on
hikashop_product_listing_input_buttons">
								<div class="hikashop_product_listing_input_button
hikashop_product_listing_input_plus" data-ref="<?php echo
$this->name; ?>[rows]"
data-inc="plus">+</div>
								<div class="hikashop_product_listing_input_button
hikashop_product_listing_input_minus" data-ref="<?php echo
$this->name; ?>[rows]"
data-inc="minus">&ndash;</div>
							</div>
						</div>
					</div>
				</dd>
			</dl>
			<dl style="display: none;"
class="hika_options">
				<dt class="hikashop_option_name">
					<label for="data_module__<?php echo $this->type;
?>_columns"><?php echo JText::_(
'NUMBER_OF_COLUMNS' ); ?></label>
				</dt>
				<dd class="hikashop_option_value">
					<?php if(!isset($this->element['columns']))
$this->element['columns'] = '3'; ?>
					<input type="text" id="data_module__<?php echo
$this->type; ?>_columns" name="<?php echo
$this->name; ?>[columns]" value="<?php echo
$this->element['columns']; ?>">
				</dd>
			</dl>
			<dl style="display: none;"
class="hika_options">
				<dt class="hikashop_option_name">
					<label for="data_module__<?php echo $this->type;
?>_limit"><?php echo JText::_( 'NUMBER_OF_ITEMS' );
?></label>
				</dt>
				<dd class="hikashop_option_value">
					<?php if(!isset($this->element['limit']))
$this->element['limit'] = '20'; ?>
					<input type="text" id="data_module__<?php echo
$this->type; ?>_limit" name="<?php echo $this->name;
?>[limit]" value="<?php echo
$this->element['limit']; ?>">
				</dd>
			</dl>
		</div>
	</div>
	<div class="hkc-xl-4 hkc-md-6 hikashop_module_subblock
hikashop_module_edit_display_settings_subdiv">
		<div class="hikashop_module_subblock_content">
			<div class="hikashop_module_subblock_title
hikashop_module_edit_display_settings_div_title"><?php echo
JText::_('HIKA_ITEM_LAYOUT'); ?></div>
			<dl class="hika_options">
				<dt class="hikashop_option_name">
					<?php echo JText::_('HIKA_LAYOUT_TYPE');?>
				</dt>
				<dd class="hikashop_option_value">
					<?php
					if(!isset($this->element['div_item_layout_type']))
$this->element['div_item_layout_type'] = 'inherit';
					echo
$this->itemType->display($this->name.'[div_item_layout_type]',@$this->element['div_item_layout_type'],$this->js,
'');?>
				</dd>
			</dl>
			<dl class="hika_options">
				<dt class="hikashop_option_name">
					<?php echo JText::_('IMAGE_X');?>
				</dt>
				<dd class="hikashop_option_value">
					<input size=12 name="<?php echo $this->name;
?>[image_width]" type="text" value="<?php echo
@$this->element['image_width'];?>" /> px
				</dd>
			</dl>
			<dl class="hika_options">
				<dt class="hikashop_option_name">
					<?php echo JText::_('IMAGE_Y');?>
				</dt>
				<dd class="hikashop_option_value">
					<input size=12 name="<?php echo $this->name;
?>[image_height]" type="text" value="<?php echo
@$this->element['image_height'];?>" /> px
				</dd>
			</dl>
			<?php if(hikashop_level(2)){ ?>
				<dl class="hika_options layouteffect_hide layoutfade_hide"
id="product_effect" <?php echo $productEffect; ?>>
					<dt class="hikashop_option_name">
						<?php echo JText::_('HIKA_TRANSITION_EFFECT');?>
					</dt>
					<dd class="hikashop_option_value">
						<?php echo
$this->transition_effectType->display($this->name.'[product_transition_effect]',@$this->element['product_transition_effect']);?>
					</dd>
				</dl>
				<dl class="hika_options layouteffect_hide"
id="product_effect_duration" <?php echo
$productEffectDuration; ?>>
					<dt class="hikashop_option_name">
						<?php echo JText::_('HIKA_EFFECT_DURATION');?>
					</dt>
					<dd class="hikashop_option_value">
						<input size=12 name="<?php echo $this->name;
?>[product_effect_duration]" type="text"
value="<?php echo
@$this->element['product_effect_duration'];?>" />
ms
					</dd>
				</dl>
			<?php } ?>
			<dl class="hika_options">
				<dt class="hikashop_option_name">
					<?php echo JText::_('PANE_HEIGHT');?>
				</dt>
				<dd class="hikashop_option_value">
					<input size=12 name="<?php echo $this->name;
?>[pane_height]" type="text" value="<?php echo
@$this->element['pane_height'];?>" /> px
				</dd>
			</dl>
			<dl class="hika_options">
				<dt class="hikashop_option_name">
					<?php echo JText::_('TEXT_CENTERED');?>
				</dt>
				<dd class="hikashop_option_value">
					<?php
					if(!isset($this->element['text_center']))
$this->element['text_center'] = '-1';
					echo JHTML::_('hikaselect.inheritRadiolist',
$this->name.'[text_center]',
@$this->element['text_center']);
					?>
				</dd>
			</dl>
			<dl class="hika_options showdescription_hide" <?php echo
$showDescription; ?>>
				<dt class="hikashop_option_name">
					<?php echo JText::_('ELEMENT_DESCRIPTION');?>
				</dt>
				<dd class="hikashop_option_value">
					<?php
					if(!isset($this->element['show_description_listing']))
$this->element['show_description_listing'] = '0';
					echo JHTML::_('hikaselect.booleanlist',
$this->name.'[show_description_listing]', '',
@$this->element['show_description_listing']);
					?>
				</dd>
			</dl>
			<dl class="hika_options">
				<dt class="hikashop_option_name"><?php
					echo JText::_('HIKA_HEIGHT_CONSISTENCY');
				?></dt>
				<dd class="hikashop_option_value"><?php
					if(!isset($this->element['consistencyheight']))
$this->element['consistencyheight'] = 1;
					echo JHTML::_('hikaselect.booleanlist',
$this->name.'[consistencyheight]', '',
@$this->element['consistencyheight']);
				?></dd>
			</dl>
		</div>
	</div>
	<div class="hkc-xl-4 hkc-md-6 hikashop_module_subblock
hikashop_module_edit_display_settings_subdiv">
		<div class="hikashop_module_subblock_content">
			<div class="hikashop_module_subblock_title
hikashop_module_edit_display_settings_div_title"><?php echo
JText::_('HIKA_ITEM_BOX_SETTINGS'); ?></div>
			<dl class="hika_options">
				<dt class="hikashop_option_name">
					<?php echo JText::_('BOX_COLOR');?>
				</dt>
				<dd class="hikashop_option_value">
					<?php echo
$this->colorType->displayAll('',$this->name.'[background_color]',@$this->element['background_color']);
?>
				</dd>
			</dl>
			<dl class="hika_options">
				<dt class="hikashop_option_name">
					<?php echo JText::_('BOX_MARGIN');?>
				</dt>
				<dd class="hikashop_option_value">
					<input name="<?php echo $this->name; ?>[margin]"
type="text" value="<?php echo
@$this->element['margin'];?>" /> px
				</dd>
			</dl>
			<dl class="hika_options">
				<dt class="hikashop_option_name">
			modules/tmpl/options_display_list.php000064400000011744151162050350014161
0ustar00ed_corners]' ,
@$this->element['rounded_corners']);
					?>
				</dd>
			</dl>
		</div>
	</div>
</div>
<?php
$js = "
window.hikashop.ready(function(){
	hkjQuery('select[name=\'".$this->name."[div_item_layout_type]\']').change(function(){
		if(hkjQuery(this).val()==\"slider_vertical\" ||
hkjQuery(this).val()==\"slider_horizontal\"){
			hkjQuery('.layouteffect_hide').show();
			hkjQuery('.showdescription_hide').show();
		}else if(hkjQuery(this).val()==\"fade\"){
			hkjQuery('.layouteffect_hide').show();
			hkjQuery('.layoutfade_hide').hide();
			hkjQuery('.showdescription_hide').show();
		}else{
			hkjQuery('.layouteffect_hide').hide();
			hkjQuery('.showdescription_hide').hide();
		}
	});
});
";
$doc = JFactory::getDocument();
$doc->addScriptDeclaration($js);
modules/tmpl/options_display_list.php000064400000011744151162050350014161
0ustar00<?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');
?><div class="hk-row-fluid
hikashop_module_edit_display_settings_list"
data-type="product_layout"
data-layout="product_list">
	<div class="hkc-xl-4 hkc-md-6 hikashop_module_subblock
hikashop_module_edit_display_settings_subdiv">
		<div class="hikashop_module_subblock_content">
			<div class="hikashop_module_subblock_title
hikashop_module_edit_display_settings_div_title"><?php echo
JText::_('HIKA_ITEMS'); ?></div>
			<dl class="hika_options">
				<dt class="hikashop_option_name greytint">
					<label class="field_rows" for="data_module__<?php
echo $this->type; ?>_limit"><?php echo JText::_(
'FIELD_ROWS' ); ?></label>
				</dt>
				<dd class="hikashop_option_value">
					<p class="field_columns"><?php echo JText::_(
'FIELD_COLUMNS' ); ?></p>
					<div class="listing_item_quantity_selector"
data-name="<?php echo $this->name; ?>">
<?php
					$colsNb = @$this->element['columns'];
					$rowsNb = 0;
					if(@$this->element['columns'] != 0)
						$rowsNb = round($this->element['limit'] /
$this->element['columns']);
					for($j = 0; $j < 20; $j++){
						for($i = 0; $i < 6; $i++){
							$class = ' listing_list';
							if($i < $colsNb && $j < $rowsNb)
								$class .= ' selected';
							echo '<div class="col'.$i.'
row'.$j.$class.'"></div>';
						}
						echo '<br/>';
					}
?>
					</div>
					<div class="listing_item_quantity_fields"
data-list-type="list">
						<div class="input-append">
							<input type="text"
class="hikashop_product_listing_input" name="<?php echo
$this->name; ?>[columns]" value="<?php echo $colsNb;
?>">
							<div class="add-on
hikashop_product_listing_input_buttons">
								<div class="hikashop_product_listing_input_button
hikashop_product_listing_input_plus" data-ref="<?php echo
$this->name; ?>[columns]"
data-inc="plus">+</div>
								<div class="hikashop_product_listing_input_button
hikashop_product_listing_input_minus" data-ref="<?php echo
$this->name; ?>[columns]"
data-inc="minus">&ndash;</div>
							</div>
						</div>
						x
						<div class="input-append">
							<input type="text"
class="hikashop_product_listing_input" name="<?php echo
$this->name; ?>[rows]" value="<?php echo $rowsNb;
?>">
							<div class="add-on
hikashop_product_listing_input_buttons">
								<div class="hikashop_product_listing_input_button
hikashop_product_listing_input_plus" data-ref="<?php echo
$this->name; ?>[rows]"
data-inc="plus">+</div>
								<div class="hikashop_product_listing_input_button
hikashop_product_listing_input_minus" data-ref="<?php echo
$this->name; ?>[rows]"
data-inc="minus">&ndash;</div>
							</div>
						</div>
					</div>
				</dd>
			</dl>
			<dl style="display: none;"
class="hika_options">
				<dt class="hikashop_option_name">
					<label for="data_module__<?php echo $this->type;
?>_columns"><?php echo JText::_(
'NUMBER_OF_COLUMNS' ); ?></label>
				</dt>
				<dd class="hikashop_option_value">
					<?php if(!isset($this->element['columns']))
$this->element['columns'] = '3'; ?>
					<input type="text" id="data_module__<?php echo
$this->type; ?>_columns" name="<?php echo
$this->name; ?>[columns]" value="<?php echo
$this->element['columns']; ?>">
				</dd>
			</dl>
			<dl style="display: none;"
class="hika_options">
				<dt
class="hikashmodules/tmpl/options_display_preview.php000064400000000526151162050350014663
0ustar00module_edit_display_settings_subdiv">
		<div class="hikashop_module_subblock_content">
			<div class="hikashop_module_subblock_title
hikashop_module_edit_display_settings_div_title"><?php echo
JText::_('HIKA_UL_SETTINGS'); ?></div>
			<dl class="hika_options">
				<dt class="hikashop_option_name">
					<?php echo
JText::_('UL_CLASS_NAMmodules/tmpl/options_display_restriction.php000064400000007331151162050350015550
0ustar00modules/tmpl/options_display_preview.php000064400000000526151162050350014663
0ustar00<?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');
?><div style="width: 100%; text-align: center;">Preview
part</div>
modules/tmpl/options_display_restriction.php000064400000007331151162050350015550
0ustar00<?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');
?><div class="hkc-xl-4 hkc-md-6 hikashop_module_subblock
hikashop_module_edit_general_part1">
	<div class="hikashop_module_subblock_content">
		<div class="hikashop_module_subblock_title
hikashop_module_edit_display_settings_div_title"><?php echo
JText::_('DISPLAY'); ?></div>
		 <dl class="hika_options">
			<dt class="hikashop_option_name">
				<?php echo JText::_('PRODUCT_PAGE');?>
			</dt>
			<dd class="hikashop_option_value"><?php
				if(!isset($this->element['display_on_product_page']))
					$this->element['display_on_product_page'] = 1;
				echo JHTML::_('hikaselect.booleanlist',
$this->name.'[display_on_product_page]', '',
$this->element['display_on_product_page']);
			?></dd>
		</dl>
		<dl class="hika_options">
			<dt class="hikashop_option_name">
				<?php echo JText::_('PRODUCT_LISTING_PAGE');?>
			</dt>
			<dd class="hikashop_option_value"><?php
				if(!isset($this->element['display_on_product_listing_page']))
					$this->element['display_on_product_listing_page'] = 1;
				echo JHTML::_('hikaselect.booleanlist',
$this->name.'[display_on_product_listing_page]', '',
$this->element['display_on_product_listing_page']);
			?></dd>
		</dl>
		<dl class="hika_options">
			<dt class="hikashop_option_name">
				<?php echo JText::_('PRODUCT_COMPARE_PAGE');?>
			</dt>
			<dd class="hikashop_option_value">
				<?php
				if(!isset($this->element['display_on_product_compare_page']))
					$this->element['display_on_product_compare_page'] = 1;
				echo JHTML::_('hikaselect.booleanlist',
$this->name.'[display_on_product_compare_page]', '',
$this->element['display_on_product_compare_page']);
			?></dd>
		</dl>
		<dl class="hika_options">
			<dt class="hikashop_option_name">
				<?php echo JText::_('CATEGORY_LISTING_PAGE');?>
			</dt>
			<dd class="hikashop_option_value">
				<?php
				if(!isset($this->element['display_on_category_listing_page']))
					$this->element['display_on_category_listing_page'] = 1;
				echo
JHTML::_(modules/tmpl/options_display_table.php000064400000005310151162050350014265
0ustar00s->element['display_on_contact_page']))
					$this->element['display_on_contact_page'] = 1;
				echo JHTML::_('hikaselect.booleanlist',
$this->name.'[display_on_contact_page]', '',
$this->element['display_on_contact_page']);
			?></dd>
		</dl>
		<dl class="hika_options">
			<dt class="hikashop_option_name"><?php
				echo JText::_('COM_HIKASHOP_WAITLIST_VIEW_DEFAULT_TITLE');
			?></dt>
			<dd class="hikashop_option_value"><?php
				if(!isset($this->element['display_on_waitlist_page']))
					$this->element['display_on_waitlist_page'] = 1;
				echo JHTML::_('hikaselect.booleanlist',
$this->name.'[display_on_waitlist_page]', '',
$this->element['display_on_waitlist_page']);
			?></dd>
		</dl>
	</div>
</div>
modules/tmpl/options_display_table.php000064400000005310151162050350014265
0ustar00<?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');
?><div class="hk-row-fluid
hikashop_module_edit_display_settings_table"
data-type="product_layout"
data-layout="product_table">
	<div class="hkc-xl-4 hkc-md-6 hikashop_module_subblock
hikashop_module_edit_display_settings_subdiv">
		<div class="hikashop_module_subblock_content">
			<div class="hikashop_module_subblock_title
hikashop_module_edit_display_settings_div_title"><?php echo
JText::_('HIKA_ITEMS'); ?></div>
			<dl class="hika_options">
				<dt class="hikashop_option_name">
					<label class="field_rows" for="data_module__<?php
echo $this->type; ?>_limit"><?php echo JText::_(
'FIELD_ROWS' ); ?></label>
				</dt>
				<dd class="hikashop_option_value">
					<div class="listing_item_quantity_selector"
data-name="<?php echo $this->name; ?>">
	<?php
					$colsNb = @$this->element['columns'];
					$rowsNb = 0;
					if(@$this->element['columns'] != 0)
						$rowsNb = round($this->element['limit'] /
$this->element['columns'modules/tmpl/options_main.php000064400000012277151162050350012407
0ustar00ng_input_minus" data-ref="<?php echo $this->name;
?>[rows]" data-inc="minus">&ndash;</div>
							</div>
						</div>
					</div>
				</dd>
			</dl>
			<dl class="hika_options" style="display:
none;">
				<dt class="hikashop_option_name">
					<label for="data_module__<?php echo $this->type;
?>_limit"><?php echo JText::_( 'NUMBER_OF_ITEMS' );
?></label>
				</dt>
				<dd class="hikashop_option_value">
					<?php if(!isset($this->element['limit']))
$this->element['limit'] = '20'; ?>
					<input id="data_module__<?php echo $this->type;
?>_limit" type="text" name="<?php echo
$this->name; ?>[limit]" value="<?php echo
$this->element['limit']; ?>">
				</dd>
			</dl>
		</div>
	</div>
</div>
modules/tmpl/options_main.php000064400000012277151162050350012407
0ustar00<?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');
?><div class="hkc-xl-4 hkc-md-6 hikashop_module_subblock
hikashop_module_edit_general_part1">
	<div class="hikashop_module_subblock_content">
		<div class="hikashop_module_subblock_title
hikashop_module_edit_display_settings_div_title"><?php echo
JText::_('HIKA_DATA_DISPLAY'); ?></div>
		<dl class="hika_options">
			<dt class="hikashop_option_name">
				<?php echo JText::_('TYPE_OF_CONTENT');?>
			</dt>
			<dd class="hikashop_option_value">
				<?php echo
$this->contentType->display($this->name.'[content_type]',@$this->element['content_type'],$this->js,true,'_'.$this->id,true);
?>
			</dd>
		</dl>
		<dl class="hika_options">
			<dt class="hikashop_option_name">
				<label for="data_module__<?php echo $this->type;
?>_use_module_name"><?php echo JText::_(
'HIKA_MAIN_CATEGORY' ); ?></label>
			</dt>
			<dd class="hikashop_option_value">
				<?php
				if(@$this->element['selectparentlisting'] == '')
$this->element['selectparentlisting'] = '2';
				echo $this->nameboxType->display(
					$this->name.'[selectparentlisting]',
					@$this->element['selectparentlisting'],
					hikashopNameboxType::NAMEBOX_SINGLE,
					'category',
					array(
						'delete' => true,
						'default_text' =>
'<em>'.JText::_('HIKA_NONE').'</em>',
					)
				);
				?>
			</dd>
		</dl>
		<dl class="hika_options">
			<dt class="hikashop_option_name">
				<label for="data_module__<?php echo $this->type;
?>_product_order"><?php echo JText::_(
'ORDERING_FIELD' ); ?></label>
			</dt>
			<dd class="hikashop_option_value">
				<?php
				if(!isset($this->element[$this->type.'_order']))
$this->element[$this->type.'_order'] =
'inherit';
				echo
$this->orderType->display($this->name.'['.$this->type.'_order]',$this->element[$this->type.'_order'],$this->type);
				?>
			</dd>
		</dl>
		<dl class="hika_options">
			<dt class="hikashop_option_name">
				<label for="data_module__<?php echo $this->type;
?>_order_dir"><?php echo JText::_(
'ORDERING_DIRECTION' ); ?></label>
			</dt>
			<dd class="hikashop_option_value">
				<?php
				if(!isset($this->element['order_dir']))
$this->element['order_dir'] = 'inherit';
				echo
$this->orderdirType->display($this->name.'[order_dir]',$this->element['order_dir']);
				?>
			</dd>
		</dl>
		<dl class="hika_options">
			<dt class="hikashop_option_name">
				<label for="data_module__<?php echo $this->type;
?>_random"><?php echo JText::_( 'RANDOM_ITEMS' );
?></label>
			</dt>
			<dd class="hikashop_option_value">
				<?php
				if(!isset($this->element['random']))
$this->element['random'] = '-1';
				echo JHTML::_('hikaselect.inheritRadiolist',
$this->name.'[random]',
$this->element['random']);
				?>
			</dd>
		</dl>
		<dl class="hika_options">
			<dt class="hikashop_option_name">
				<label for="data_module__<?php echo $this->type;
?>_filter_type"><?php echo JText::_(
'SUB_ELEMENTS_FILTER' ); ?></label>
			</dt>
			<dd class="hikashop_option_value">
				<?php
				if(!isset($this->element['filter_type']))
$this->element['filter_type'] = '0';
				echo
$this->childdisplayType->display($this->name.'[filter_type]',$this->element['filter_type'],
true, true, true);
				?>
			</dd>
		</dl>
		 <dl class="hika_options">
			<dt class="hikashop_option_name">
				<?php echo
hikashop_hktooltip(JText::_('SYNCHRO_WITH_ITEM'), '',
JText::_('HIKA_SYNCHRONIZE'), '', 0);?>
			</dt>
			<dd class="hikashop_option_value">
				<?php echo JHTML::_('hikaselect.inheritRadiolist',
$this->name.'[conmodules/tmpl/options_product.php000064400000022623151162050350013137
0ustar00$this->name.'[discounted_only]' ,
'',$this->element['discounted_only']);
				?>
			</dd>
		</dl>
		<dl class="hika_options"
data-display-type="product">
			<dt class="hikashop_option_name">
				<label for="data_menu__<?php echo $this->type;
?>_related_products_from_cart"><?php echo JText::_(
'RELATED_PRODUCTS_FROM_CART' ); ?></label>
			</dt>
			<dd class="hikashop_option_value">
				<?php
				if(!isset($this->element['related_products_from_cart']))
$this->element['related_products_from_cart'] = '0';
				echo JHTML::_('hikaselect.booleanlist',
$this->name.'[related_products_from_cart]' ,
'',$this->element['related_products_from_cart']);
				?>
			</dd>
		</dl>

	</div>
</div>
modules/tmpl/options_product.php000064400000022623151162050350013137
0ustar00<?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');
?><div class="hkc-xl-4 hkc-md-6 hikashop_module_subblock
hikashop_module_edit_product"
data-display-type="product">
	<div class="hikashop_module_subblock_content">
		<div class="hikashop_module_subblock_title
hikashop_module_edit_display_settings_div_title"><?php echo
JText::_('HIKA_PRODUCT_DATA_DISPLAY'); ?></div>
		<dl class="hika_options">
			<dt class="hikashop_option_name"><?php
				echo JText::_('HIKA_OUT_OF_STOCK');
			?></dt>
			<dd class="hikashop_option_value"><?php
				if(!isset($this->element['show_out_of_stock']))
					$this->element['show_out_of_stock'] = -1;
				echo JHTML::_('hikaselect.inheritRadiolist',
$this->name.'[show_out_of_stock]',
$this->element['show_out_of_stock']);
			?></dd>
		</dl>
		<dl class="hika_options">
			<dt class="hikashop_option_name"><?php
				echo hikashop_hktooltip(JText::_('HIKA_PRODUCT_RELATION'),
'', JText::_('HIKA_RELATION'), '');
			?></dt>
			<dd><?php
				if(!isset($this->element['product_synchronize']))
					$this->element['product_synchronize'] = 4;
				echo
$this->productSyncType->display($this->name.'[product_synchronize]',
$this->element['product_synchronize']);
			?></dd>
		</dl>
		<dl class="hika_options">
			<dt class="hikashop_option_name"><?php
				echo JText::_('RECENTLY_VIEWED');
			?></dt>
			<dd class="hikashop_option_value"><?php
				if(!isset($this->element['recently_viewed']) ||
(int)$this->element['recently_viewed'] == -1)
					$this->element['recently_viewed'] = 0;
				echo JHTML::_('hikaselect.booleanlist',
$this->name.'[recently_viewed]', '',
$this->element['recently_viewed']);
			?></dd>
		</dl>
		<dl class="hika_options">
			<dt class="hikashop_option_name"><?php
				echo JText::_('HIKA_LINK_TO_DETAIL_PAGE');
			?></dt>
			<dd class="hikashop_option_value"><?php
				if(!isset($this->element['link_to_product_page']))
					$this->element['link_to_product_page'] = -1;
				echo JHTML::_('hikaselect.inheritRadiolist',
$this->name.'[link_to_product_page]',
$this->element['link_to_product_page']);
			?></dd>
		</dl>
		<dl class="hika_options">
			<dt class="hikashop_option_name"><?php
				echo JText::_('DISPLAY_PRICE');
			?></dt>
			<dd class="hikashop_option_value"><?php
				if(!isset($this->element['show_price']))
					$this->element['show_price'] = -1;
				echo JHTML::_('hikaselect.inheritRadiolist',
$this->name.'[show_price]',
$this->element['show_price']);
			?></dd>
		</dl>
		<dl class="hika_options"
id="price_display_type_line">
			<dt class="hikashop_option_name">
				<?php echo JText::_('HIKA_PRICE_TYPE');?>
			</dt>
			<dd class="hikashop_option_value">
				<?php
				if(!isset($this->element['price_display_type']))
$this->element['price_display_type'] = 'inherit';
				echo $this->priceDisplayType->display(
$this->name.'[price_display_type]',@$this->element['price_display_type']);
?>
			</dd>
		</dl>
		<dl class="hika_options"
id="show_taxed_price_line">
			<dt class="hikashop_option_name">
				<?php echo JText::_('SHOW_TAXED_PRICES');?>
			</dt>
			<dd class="hikashop_option_value">
				<?php
				if(!isset($this->element['price_with_tax']))
$this->element['price_with_tax'] = 3;
				echo
$this->pricetaxType->display($this->name.'[price_with_tax]'
, $this->element['price_with_tax'],true); ?>
			</dd>
		</dl>
		<dl class="hika_options"
id="show_original_price_line">
			<dt class="hikashop_option_name">
				<?php echo JText::_('HIKA_ORIGINAL_CURRENCY');?>
			</dt>
			<dd class="hikashop_option_value">
				<?php
				if(!isset($this->element['show_original_price']))
$this->element['show_original_price'] = '-1';
				echo JHTML::_('hikaselect.inheritRadiolist',
$this->name.'[show_original_price]',
@$this->element['show_original_price']); ?>
			</dd>
		</dl>
		<dl class="hika_options"
id="show_discount_line">
			<dt class="hikashop_option_name">
				<?php echo JText::_('HIKA_DISCOUNT_DISPLAY');?>
			</dt>
			<dd class="hikashop_option_value">
				<?php
				if(!isset($this->element['show_discount']))
$this->element['show_discount'] = 3;
				echo $this->discountDisplayType->display(
$this->name.'[show_discount]'
,@$this->element['show_discount']); ?>
			</dd>
		</dl>
	</div>
</div>
<div class="hkc-xl-4 hkc-md-6 hikashop_module_subblock
hikashop_module_edit_product"
data-display-type="product">
	<div class="hikashop_module_subblock_content">
		<div class="hikashop_module_subblock_title
hikashop_module_edit_display_settings_div_title"><?php echo
JText::_('HIKA_PRODUCT_FEATURES_DISPLAY'); ?></div>
		<dl class="hika_options">
			<dt class="hikashop_option_name">
				<label for="data_module__<?php echo $this->type;
?>_add_to_cart"><?php echo JText::_( 'ADD_TO_CART'
); ?></label>
			</dt>
			<dd class="hikashop_option_value">
				<?php
				if(!isset($this->element['add_to_cart']))
$this->element['add_to_cart'] = '-1';
				echo JHTML::_('hikaselect.inheritRadiolist',
$this->name.'[add_to_cart]',
$this->element['add_to_cart']);
				?>
			</dd>
		</dl>
		<dl class="hika_options">
			<dt class="hikashop_option_name">
				<?php echo JText::_('ADD_TO_WISHLIST');?>
			</dt>
			<dd class="hikashop_option_value">
				<?php if(hikashop_level(1)){
				if(!isset($this->element['add_to_wishlist']))
$this->element['add_to_wishlist'] = '-1';
					echo JHTML::_('hikaselect.inheritRadiolist',
$this->name.'[add_to_wishlist]',
@$this->element['add_to_wishlist']);
				}else{
					$this->element['add_to_wishlist'] = 0;
					echo hikashop_getUpgradeLink('essential');
				} ?>
			</dd>
		</dl>
		<dl class="hika_options">
			<dt class="hikashop_option_name">
				<label for="data_module__<?php echo $this->type;
?>_show_quantity_field"><?php echo JText::_(
'HIKA_QUANTITY_FIELD' ); ?></label>
			</dt>
			<dd class="hikashop_option_value">
				<?php
				if(!isset($this->element['show_quantity_field']))
$this->element['show_quantity_field'] = '-1';
				echo JHTML::_('hikaselect.inheritRadiolist',
$this->name.'[show_quantity_field]',
$this->element['show_quantity_field'] );
				?>
			</dd>
		</dl>
		<dl class="hika_options">
			<dt class="hikashop_option_name"><?php
				echo JText::_('DISPLAY_WAITLIST_BUTTON');
			?></dt>
			<dd class="hikashop_option_value"><?php
				echo JHTML::_('hikaselect.booleanlist',
$this->name.'[product_waitlist]', '',
@$this->element['product_waitlist']);
			?></dd>
		</dl>
		<dl class="hika_options">
			<dt class="hikashop_option_name"><?php
				echo JText::_('CONTACT_US_BUTTON');
			?></dt>
			<dd class="hikashop_option_value"><?php
				if(hikashop_level(1)) {
					if(!isset($this->element['product_contact_button']))
$this->element['product_contact_button'] = '-1';
					echo JHTML::_('hikaselect.inheritRadiolist',
$this->name.'[product_contact_button]',
@$this->element['product_contact_button']);
				} else {
					echo hikashop_getUpgradeLink('essential');
				}
			?></dd>
		</dl>
		<dl class="hika_options">
			<dt class="hikashop_option_name"><?php
				echo JText::_('PRODUCT_DETAILS_BUTTON');
			?></dt>
			<dd class="hikashop_option_value"><?php
				if(!isset($this->element['details_button']))
$this->element['details_button'] = '-1';
				echo JHTML::_('hikaselect.inheritRadiolist',
$this->name.'[details_button]',
@$this->element['details_button']);
			?></dd>
		</dl>
		<dl class="hika_options">
			<dt class="hikashop_option_name">
				<?php echo JText::_('VOTE');?>
			</dt>
			<dd class="hikashop_option_value">
				<?php
					if((!isset($this->element['show_vote'])) &&
(isset($this->element['show_vote_product'])))
					$this->element['show_vote'] =
$this->element['show_vote_product'];
					elseif(!isset($this->element['show_vote']))
						$this->element['show_vote'] = '-1';
					echo JHTML::_('hikaselect.inheritRadiolist',
$this->nmodules/tmpl/options_product_extra.php000064400000015717151162050350014350
0ustar00tions">
			<dt class="hikashop_option_name">
				<?php echo JText::_('HIKA_BADGE');?>
			</dt>
			<dd class="hikashop_option_value">
				<?php
				if(!isset($this->element['display_badges']))
$this->element['display_badges'] = '-1';
				echo JHTML::_('hikaselect.inheritRadiolist',
$this->name.'[display_badges]',
@$this->element['display_badges']); ?>
			</dd>
		</dl>
<?php
if(!empty($this->extra_blocks['products'])) {
	foreach($this->extra_blocks['products'] as $r) {
		if(is_string($r))
			echo $r;
		if(is_array($r)) {
			if(!isset($r['name']) && isset($r[0]))
				$r['name'] = $r[0];
			if(!isset($r['value']) && isset($r[1]))
				$r['value'] = $r[1];
?>
			<dl class="hika_options">
				<dt class="hikashop_option_name"><?php echo
JText::_(@$r['name']); ?></dt>
				<dd class="hikashop_option_value"><?php echo
@$r['value']; ?></dd>
			</dl>
<?php
		}
	}
}
?>
	</div>
</div>
modules/tmpl/options_product_extra.php000064400000015717151162050350014350
0ustar00<?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
if(hikashop_level(2)){
?>
<div class="hkc-xl-4 hkc-md-6 hikashop_module_subblock
hikashop_module_edit_product_extra_part1">
	<div class="hikashop_module_subblock_content">
		<div class="hikashop_module_subblock_title
hikashop_module_edit_display_settings_div_title"><?php echo
JText::_('HIKA_CAROUSEL_SETTINGS'); ?></div>
		<dl class="hika_options">
			<dt class="hikashop_option_name">
				<?php echo JText::_('ENABLE_CAROUSEL');?>
			</dt>
			<dd class="hikashop_option_value"
data-control="carousel">
				<?php echo JHTML::_('hikaselect.booleanlist',
$this->name.'[enable_carousel]' ,
'',@$this->element['enable_carousel']); ?>
			</dd>
		</dl>
		<dl class="hika_options" data-part="carousel"
id="<?php echo
'carousel_type_'.$this->type.'"'; ?>>
			<dt class="hikashop_option_name">
				<?php echo JText::_('HIKA_CAROUSEL_EFFECT');?>
			</dt>
			<dd class="hikashop_option_value"
data-control="effect">
				<?php echo
$this->effectType->display($this->name.'[carousel_effect]',@$this->element['carousel_effect']
, '');?>
			</dd>
		</dl>
		<dl class="hika_options" data-part="effect"
id="<?php echo
'slide_direction_'.$this->type.'"'; ?>>
			<dt class="hikashop_option_name">
				<?php echo JText::_('SLIDE_DIRECTION');?>
			</dt>
			<dd class="hikashop_option_value">
				<?php echo
$this->directionType->display($this->name.'[slide_direction]',@$this->element['slide_direction']);?>
			</dd>
		</dl>
		<dl class="hika_options" data-part="effect"
id="<?php echo
'transition_effect_'.$this->type.'"';
?>>
			<dt class="hikashop_option_name">
				<?php echo JText::_('TRANSITION_EFFECT');?>
			</dt>
			<dd class="hikashop_option_value">
				<?php echo
$this->transition_effectType->display($this->name.'[transition_effect]',@$this->element['transition_effect']);?>
			</dd>
		</dl>
		<dl class="hika_options" data-part="carousel"
id="<?php echo
'carousel_effect_duration_'.$this->type.'"';
?>>
			<dt class="hikashop_option_name">
				<?php echo JText::_('HIKA_EFFECT_DURATION');?>
			</dt>
			<dd class="hikashop_option_value">
				<input size=12 name="<?php echo $this->name;
?>[carousel_effect_duration]" type="text"
value="<?php echo
@$this->element['carousel_effect_duration'];?>" />
ms
			</dd>
		</dl>
		<dl class="hika_options" data-part="effect"
id="<?php echo
'product_by_slide_'.$this->type.'"'; ?>>
			<dt class="hikashop_option_name">
				<?php echo JText::_('PRODUCTS_BY_SLIDE');?>
			</dt>
			<dd class="hikashop_option_value">
				<input size=9 name="<?php echo $this->name;
?>[item_by_slide]" type="text" value="<?php echo
@$this->element['item_by_slide'];?>" />
			</dd>
		</dl>
		<dl class="hika_options" data-part="effect"
id="<?php echo
'slide_one_by_one_'.$this->type.'"'; ?>>
			<dt class="hikashop_option_name">
				<?php echo JText::_('SLIDE_ONE_BY_ONE');?>
			</dt>
			<dd class="hikashop_option_value">
				<?php echo JHTML::_('hikaselect.booleanlist',
$this->name.'[one_by_one]' ,
'',@$this->element['one_by_one']); ?>
			</dd>
		</dl>
	</div>
</div>
<div class="hkc-xl-4 hkc-md-6 hikashop_module_subblock
hikashop_module_edit_product_extra_part2">
	<div class="hikashop_module_subblock_content">
		<div class="hikashop_module_subblock_title
hikashop_module_edit_display_settings_div_title"><?php echo
JText::_('HIKA_CAROUSEL_ADDITIONAL_SETTINGS'); ?></div>
		<dl class="hika_options" data-part="carousel"
id="<?php echo
'auto_slide_'.$this->type.'"'; ?>>
			<dt class="hikashop_option_name">
				<?php echo JText::_('AUTO_SLIDE');?>
			</dt>
			<dd class="hikashop_option_value"
data-control="autoslide">
				<?php echo JHTML::_('hikaselect.booleanlist',
$this->name.'[auto_slide]' ,
'',@$this->element['auto_slide']); ?>
			</dd>
		</dl>
		<dl class="hika_options" data-part="autoslide"
id="<?php echo
'auto_slide_duration_'.$this->type.'"';
?>>
			<dt class="hikashop_option_name">
				<?php echo JText::_('HIKA_TRANSITION_DELAY');?>
			</dt>
			<dd class="hikashop_option_value">
				<input size=12 name="<?php echo $this->name;
?>[auto_slide_duration]" type="text" value="<?php
echo @$this->element['auto_slide_duration'];?>" />
ms
			</dd>
		</dl>
		<dl class="hika_options" data-part="carousel"
id="<?php echo
'slide_pagination_'.$this->type.'"'; ?>>
			<dt class="hikashop_option_name">
				<?php echo JText::_('SLIDE_PAGINATION_TYPE');?>
			</dt>
			<dd class="hikashop_option_value"
data-control="pagination">
				<?php echo
$this->slide_paginationType->display($this->name.'[pagination_type]',@$this->element['pagination_type'],
'');?>
			</dd>
		</dl>
		<dl class="hika_options"
data-part="paginationthumbnail" id="<?php echo
'pagination_width_'.$this->type.'"'; ?>>
			<dt class="hikashop_option_name">
				<?php echo JText::_('PAGINATION_IMAGE_WIDTH');?>
			</dt>
			<dd class="hikashop_option_value">
				<input size=12 name="<?php echo $this->name;
?>[pagination_image_width]" type="text"
value="<?php echo
@$this->element['pagination_image_width'];?>" />
px
			</dd>
		</dl>
		<dl class="hika_options"
data-part="paginationthumbnail" id="<?php echo
'pagination_height_'.$this->type.'"';
?>>
			<dt class="hikashop_option_name">
				<?php echo JText::_('PAGINATION_IMAGE_HEIGHT');?>
			</dt>
			<dd class="hikashop_option_value">
				<input size=12
nmodules/tmpl/savemodules.php000064400000000530151162050350012224
0ustar00hika_options" data-part="carousel" id="<?php
echo 'display_button_'.$this->type.'"';
?>>
			<dt class="hikashop_option_name">
				<?php echo JText::_('HIKA_SWITCH_BUTTONS');?>
			</dt>
			<dd class="hikashop_option_value">
				<?php echo JHTML::_('hikaselect.booleanlist',
$this->name.'[display_button]' ,
'',@$this->element['display_buttomodules/tmpl/selectmodules.php000064400000006031151162050350012547
0ustar00modules/tmpl/savemodules.php000064400000000530151162050350012224
0ustar00<?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');
?><span id="result"><?php echo
implode(',',$this->modules);?></span>
modules/tmpl/selectmodules.php000064400000006031151162050350012547
0ustar00<?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');
?><fieldset>
	<div class="toolbar" id="toolbar"
style="float: right;">
		<button class="btn" type="button"
onclick="submitbutton('savemodules');"><img
src="<?php echo HIKASHOP_IMAGES; ?>save.png"/><?php
echo JText::_('OK'); ?></button>
	</div>
</fieldset>
<div class="iframedoc"
id="iframedoc"></div>
<form action="index.php?option=<?php echo HIKASHOP_COMPONENT
?>&amp;ctrl=modules" method="post" 
name="adminForm" id="adminForm">
	<table id="hikashop_modules_selection_listing"
class="adminlist table table-striped table-hover"
cellpadding="1">
		<thead>
			<tr>
				<th class="title titlenum">
					<?php echo JText::_( 'HIKA_NUM' );?>
				</th>
				<th class="title">
					<?php echo JText::_('HIKA_NAME'); ?>
				</th>
				<th class="title">
					<?php echo JText::_('HIKA_TYPE'); ?>
				</th>
				<th class="title titletoggle">
					<?php echo JText::_('HIKA_ORDER'); ?>
				</th>
				<th class="title titletoggle">
					<?php echo JText::_('HIKA_PUBLISHED'); ?>
				</th>
				<th class="title">
					<?php echo JText::_( 'ID' ); ?>
				</th>
			</tr>
		</thead>
		<tbody>
			<?php
				$k = 0;
				for($i = 0,$a = count($this->rows);$i<$a;$i++){
					$row =& $this->rows[$i];
					if(version_compare(JVERSION,'1.6','<')){
						$link=JRoute::_('iorder/index.html000064400000000032151162050350007645
0ustar00value="component" />
	<inorder/tmpl/address.php000064400000004022151162050350010765
0ustar00order/index.html000064400000000032151162050350007645
0ustar00<html><body></body></html>order/tmpl/address.php000064400000004022151162050350010765
0ustar00<?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');
?><fieldset>
	<div class="toolbar" id="toolbar"
style="float: right;">
		<button class="btn" type="button"
onclick="submitbutton('saveaddress');"><img
src="<?php echo HIKASHOP_IMAGES; ?>save.png"/><?php
echo JText::_('OK'); ?></button>
	</div>
</fieldsorder/tmpl/address_template.php000064400000001004151162050350012655
0ustar00t->order_id;?>" />
	<input type="hidden"
name="data[address][address_user_id]" value="<?php echo
@$address->address_user_id;?>" />
	<input type="hidden"
name="data[address][address_id]" value="<?php echo
@$this->id;?>" />
	<input type="hidden" name="type"
value="<?php echo @$this->type;?>" />
	<input type="hidden" name="option"
value="<?php echo HIKASHOP_COMPONENT; ?>" />
	<input type="hidden" name="task" value=""
/>
	<input type="hidden" name="ctrl"
value="order" />
	<?php echo JHTML::_( 'form.token'
);order/tmpl/changeplugin.php000064400000005602151162050350012011
0ustar00<?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');
?>{address_company}
{address_title} {address_firstname} {address_lastname}
{address_street}
{address_post_code} {address_city} {address_state}
{address_country}
<?php echo
JText::sprintf('TELEPHONE_IN_ADDRESS','{address_telephone}');?>
order/tmpl/changeplugin.php000064400000005602151162050350012011
0ustar00<?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');
?><fieldset>
	<div class="toolbar" id="toolbar"
style="float: right;">
		<button class="btn" type="button"
onclick="submitbutton('savechangeplugin');"><img
src="<?php echo HIKASHOP_IMAGES; ?>save.png"/><?php
echo JText::_('OK'); ?></button>
	</div>
</fieldset>
<div class="iframedoc"
id="iframedoc"></div>
<?php $type = $this->type; ?>
<form action="<?php echo
hikashop_completeLink('order',true); ?>"
method="post"  name="adminForm"
id="adminForm">
	<table width="100%" class="admintable table">
		<tr>
			<td class="key">
				<label>
					<?php echo JText::_( 'NEW_'.strtoupper($type) ); ?>
				</label>
			</td>
			<td>
				<?php echo
$this->$type->getName($this->method,$this->id); ?>
			</td>
		</tr>
		<?php
			if($type=='shipping'){
				?>
				<tr>
					<td class="key">
						<label for="data[order][order_shipping_price]">
							<?php echo JText::_( 'NEW_PRICE' ); ?>
						</label>
					</td>
					<td>
						<input type="text"
name="data[order][order_shipping_price]" value="<?php
echo $this->element->order_shipping_price; ?>" />
					</td>
				</tr>
				<tr>
					<td class="key">
						<order/tmpl/changestatus.php000064400000003270151162050350012035
0ustar00
						<input type="text"
name="data[order][order_payment_price]" value="<?php echo
$this->element->order_payment_price; ?>" />
					</td>
				</tr>
				<?php
			}
			$this->setLayout('notification'); echo
$this->loadTemplate();
		?>
	</table>
	<input type="hidden"
name="data[order][history][history_type]"
value="modification" />
	<input type="hidden" name="data[order][order_id]"
value="<?php echo @$this->element->order_id;?>"
/>
	<input type="hidden" name="data[order][order_<?php
echo $type?>_method]" value="<?php echo $this->method;
?>" />
	<input type="hidden" name="data[order][order_<?php
echo $type?>_id]" value="<?php echo $this->id;
?>" />
	<input type="hidden" name="option"
value="<?php echo HIKASHOP_COMPONENT; ?>" />
	<input type="hidden" name="task" value=""
/>
	<input type="hidden" name="ctrl"
value="order" />
	<?php echo JHTML::_( 'form.token' ); ?>
</form>
order/tmpl/changestatus.php000064400000003270151162050350012035
0ustar00<?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:order/tmpl/customer_set.php000064400000006117151162050350012063
0ustar00this->loadTemplate();?>
	</table>
	<input type="hidden"
name="data[order][history][history_type]"
value="modification" />
	<input type="hidden" name="edit"
value="<?php echo JRequest::getInt('edit',0);?>"
/>
	<input type="hidden" name="data[order][order_id]"
value="<?php echo @$this->element->order_id;?>"
/>
	<input type="hidden" id="data[order][order_status]"
name="data[order][order_status]" value="<?php echo
trim(@$this->element->order_status); ?>" />
	<input type="hidden" name="option"
value="<?php echo HIKASHOP_COMPONENT; ?>" />
	<input type="hidden" name="task" value=""
/>
	<input type="hidden" name="ctrl"
value="order" />
	<?php echo JHTML::_( 'form.token' ); ?>
</form>
order/tmpl/customer_set.php000064400000006117151162050350012063
0ustar00<?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');
?><form action="<?php echo
hikashop_completeLink('order&task=customer_save')
;?>" method="post" name="hikashop_form"
id="hikashop_form">
<div class="hika_confirm">
	<?php echo JText::_('HIKA_CONFIRM_USER')?><br/>
	<table class="admintable table hika_options">
		<tbody>
			<tr>
				<td class="key"><label><?php echo
JText::_('HIKA_NAME'); ?></label></td>
				<td id="hikashop_order_customer_name"><?php echo
$this->rows->name; ?></td>
			</tr>
			<tr>
				<td class="key"><label><?php echo
JText::_('HIKA_EMAIL'); ?></label></td>
				<td id="hikashop_order_customer_email"><?php echo
$this->rows->user_email; ?></td>
			</tr>
			<tr>
				<td class="key"><label><?php echo
JText::_('ID'); ?></label></td>
				<td id="hikashop_order_customer_id"><?php echo
$this->rows->user_id; ?></td>
			</tr>
			<tr>
				<td class="key"><label><?php echo
JText::_('SET_USER_ADDRESS'); ?></label></td>
				<td><?php echo JHTML::_('hikaselect.booleanlist',
'set_user_address', '', 0); ?></td>
			</tr>
			<tr>
				<td class="key"><label><?php echo
JText::_('HISTORY'); ?></label></td>
				<td>
					<span><input
onchange="window.orderMgr.orderadditional_history_changed(this);"
type="checkbox"
id="hikashop_history_orderadditional_store"
name="data[history][store_data]"
value="1"/><label
for="hikashop_history_orderadditional_store"
order/tmpl/discount.php000064400000004427151162050350011201
0ustar00tn">
		<button onclick="hikashop.submitform('customer_save',
'hikashop_form');" class="btn"><img
src="<?php echo HIKASHOP_IMAGES ?>ok.png"
style="vertical-align:middle" alt=""/>
<span><?php echo Jtext::_('OK');
?></span></button>
	</div>
</div>
<script type="text/javascript">
if(!window.orderMgr)
	window.orderMgr = {};
window.orderMgr.orderadditional_history_changed = function(el) {
	var fields = ['hikashop_history_orderadditional_msg'],
displayValue = '';
	if(!el.checked) displayValue = 'none';
	window.hikashop.setArrayDisplay(fields, displayValue);
}
</script>
</form>
order/tmpl/discount.php000064400000004427151162050350011201
0ustar00<?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');
?><fieldset>
	<div class="toolbar" id="toolbar"
style="float: right;">
		<button class="btn" type="button"
onclick="submitbutton('savechangeplugin');"><img
src="<?php echo HIKASHOP_IMAGES; ?>save.png"/><?php
echo JText::_('OK'); ?></button>
	</div>
</fieldset>
<div class="iframedoc"
id="iframedoc"></div>
<form action="<?php echo
hikashop_completeLink('order',true); ?>"
method="post"  name="adminForm"
id="adminForm">
	<table width="100%" class="admintable">
		<tr>
			<td class="key">
				<label
for="datorder/tmpl/edit_additional.php000064400000026443151162050350012470
0ustar00
				<input type="text"
name="data[order][order_discount_tax]" value="<?php echo
@$this->element->order_discount_tax; ?>" />
				<?php echo $this->ratesType->display(
"data[order][order_discount_tax_namekey]" ,
@$this->element->order_discount_tax_namekey ); ?>
			</td>
		</tr>
		<?php $this->setLayout('notification'); echo
$this->loadTemplate();?>
	</table>
	<input type="hidden"
name="data[order][history][history_type]"
value="modification" />
	<input type="hidden" name="data[order][order_id]"
value="<?php echo @$this->element->order_id;?>"
/>
	<input type="hidden" name="option"
value="<?php echo HIKASHOP_COMPONENT; ?>" />
	<input type="hidden" name="task" value=""
/>
	<input type="hidden" name="ctrl"
value="order" />
	<?php echo JHTML::_( 'form.token' ); ?>
</form>
order/tmpl/edit_additional.php000064400000026443151162050350012470
0ustar00<?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');
?><div class="hika_toolbar">
	<div class="hika_toolbar_btn hika_btn_32">
		<div class="hika_toolbar_right">
			<div class="btn"><a href="#save"
onclick="document.getElementById('hikashop_order_notify').value
= 1;return
window.hikashop.submitform('save','hikashop_order_additional_form');"><span
class="btnIcon icon-32-apply"></span><span
class="btnName">Save &
Notify</span></a></div>
			<div class="btn"><a href="#save"
onclick="return
window.hikashop.submitform('save','hikashop_order_additional_form');"><span
class="btnIcon icon-32-apply"></span><span
class="btnName">Save</span></a></div>
		</div>
		<div style="clear:right"></div>
	</div>
</div>
<form action="<?php echo
hikashop_completeLink('order&task=save&subtask=additional&tmpl=component');
?>" name="hikashop_order_additional_form"
id="hikashop_order_additional_form" method="post"
enctype="multipart/form-data">
	<dl class="hika_options">
		<dt
class="hikashop_order_additional_subtotal"><label><?php
echo JText::_('SUBTOTAL'); ?></label></dt>
		<dd
class="hikashop_order_additional_subtotal"><span><?php
echo
$this->currencyHelper->format($this->order->order_subtotal,$this->order->order_currency_id);
?></span></dd>
<?php if(isset($this->edit) && $this->edit === true) {
?>
		<dt
class="hikashop_order_additional_coupon"><label><?php
echo JText::_('HIKASHOP_COUPON'); ?></label></dt>
		<dd class="hikashop_order_additional_coupon">
			<input type="text"
name="data[order][order_discount_code]" value="<?php echo
$this->escape(@$this->order->order_discount_code); ?>"
/><br/>
			<input type="text"
name="data[order][order_discount_price]" value="<?php
echo @$this->order->order_discount_price; ?>"
/><br/>
			<input name="data[order][order_discount_tax]"
value="<?php echo @$this->order->order_discount_tax;
?>" />
			<?php echo $this->ratesType->display(
"data[order][order_discount_tax_namekey]" ,
@$this->order->order_discount_tax_namekey ); ?>
		</dd>
<?php } else { ?>
		<dt
class="hikashop_order_additional_coupon"><label><?php
echo JText::_('HIKASHOP_COUPON'); ?></label></dt>
		<dd
class="hikashop_order_additional_coupon"><span><?php
echo
$this->currencyHelper->format($this->order->order_discount_price*-1.0,$this->order->order_currency_id);
?> <?php echo $this->order->order_discount_code;
?></span></dd>
<?php }

	if(isset($this->edit) && $this->edit === true) { ?>
		<dt
class="hikashop_order_additional_shipping"><label><?php
echo JText::_('SHIPPING'); ?></label></dt>
		<dd class="hikashop_order_additional_shipping">
<?php if(strpos($this->order->order_shipping_id, ';')
=== false) { ?>
			<?php echo
$this->shippingPlugins->display('data[order][shipping]',$this->order->order_shipping_method,$this->order->order_shipping_id);
?><br/>
<?php } ?>
			<input type="text"
name="data[order][order_shipping_price]" value="<?php
echo $this->order->order_shipping_price; ?>"
/><br/>
			<input type="text"
name="data[order][order_shipping_tax]" value="<?php echo
@$this->order->order_shipping_tax; ?>" />
			<?php echo $this->ratesType->display(
"data[order][order_shipping_tax_namekey]" ,
@$this->order->order_shipping_tax_namekey ); ?><br/>
<?php
		if(strpos($this->order->order_shipping_id, ';') !==
false) {
?>
			<table class="hikam_table table table-striped">
				<thead>
					<tr>
						<th><?php echo JText::_('WAREHOUSE_ID');
?></th>
						<th><?php echo JText::_('SHIPPING_METHOD');
?></th>
						<th><?php echo JText::_('SHIPPING_PRICE');
?></th>
						<th><?php echo JText::_('SHIPPING_TAX');
?></th>
					</tr>
				</thead>
				<tbody>
<?php
			$warehouses = array();
			$shipping_ids = explode(';',
$this->order->order_shipping_id);
			foreach($shipping_ids as $shipping_key) {
				$shipping_warehouse = 0;
				if(strpos($shipping_key, '@') !== false)
					list($shipping_id, $shipping_warehouse) = explode('@',
$shipping_key, 2);
				else
					$shipping_id = (int)$shipping_key;
				$warehouses[] = JHTML::_('select.option',
$shipping_warehouse, $shipping_warehouse);
				$shipping_method = '';
				foreach($this->order->shippings as $s) {
					if((int)$s->shipping_id == $shipping_id) {
						$shipping_method = $s->shipping_type;
						break;
					}
				}
				$k = $shipping_id.'_'.$shipping_warehouse;
				$prices =
@$this->order->order_shipping_params->prices[$shipping_key];
?>
					<tr>
						<td><?php echo $shipping_warehouse; ?></td>
						<td><?php echo
$this->shippingPlugins->display('data[order][shipping]['.$shipping_warehouse.']',$shipping_method,$shipping_id);
?></td>
						<td><input type="text"
name="data[order][order_shipping_prices][<?php echo
$shipping_warehouse; ?>]" value="<?php echo
@$prices->price_with_tax; ?>" /></td>
						<td><input type="text"
name="data[order][order_shipping_taxs][<?php echo
$shipping_warehouse; ?>]" value="<?php echo
@$prices->tax; ?>" /></td>
					</tr>
<?php
			}
?>				</tbody>
			</table>
			<table class="hika_table table table-striped">
				<thead>
					<tr>
						<th><?php echo JText::_('HIKA_PRODUCT');
?></th>
						<th><?php echo JText::_('WAREHOUSE_ID');
?></th>
					</tr>
				</thead>
				<tbody>
<?php
			if(empty($warehouses))
				$warehouses[] = JHTML::_('select.option', 0, 0);
			foreach($this->order->products as $k => $product) {
				$map =
'data[order][warehouses]['.$product->order_product_id.']';
				$value = 0;
				if(strpos($product->order_product_shipping_id, '@') !==
false)
					$value = substr($product->order_product_shipping_id,
strpos($product->order_product_shipping_id, '@')+1);
?>
					<tr>
						<td><?php echo $product->order_product_name;
?></td>
						<td><?php echo JHTML::_('select.genericlist',
$warehouses, $map, 'class="inputbox"',
'value', 'text', $value); ?></td>
					</tr>
<?php
			}
?>
				</tbody>
			</table>
<?php
	} ?>
		</dd>
<?php } else { ?>
		<dt
class="hikashop_order_additional_shipping"><label><?php
echo JText::_('SHIPPING'); ?></label></dt>
		<dd
class="hikashop_order_additional_shipping"><span><?php
echo
$this->currencyHelper->format($this->order->order_shipping_price,
$this->order->order_currency_id); ?> - <?php
			if(empty($this->order->order_shipping_method))
				echo
'<em>'.JText::_('NONE').'</em>';
			else
				echo $this->order->order_shipping_method;
			?></span></dd>
<?php }

	if(isset($this->edit) && $this->edit === true) { ?>
		<dt
class="hikashop_order_additional_payment"><label><?php
echo JText::_('HIKASHOP_PAYMENT');
?></label></dt>
		<dd class="hikashop_order_additional_payment">
			<?php echo
$this->paymentPlugins->display('data[order][payment]',$this->order->order_payment_method,$this->order->order_payment_id);
?><br/>
			<input type="text"
name="data[order][order_payment_price]" value="<?php echo
$this->order->order_payment_price; ?>" />
		</dd>
<?php } else { ?>
		<dt
class="hikashop_order_additional_payment_fee"><label><?php
echo JText::_('HIKASHOP_PAYMENT');
?></label></dt>
		<dd
class="hikashop_order_additional_payment_fee"><span><?php
echo
$this->currencyHelper->format($this->order->order_payment_price,
$this->order->order_currency_id); ?> - <?php
			if(empty($this->order->order_payment_method))
				echo
'<em>'.JText::_('NONE').'</em>';
			else
				echo $this->order->order_payment_method;
			?></span></dd>
<?php }

	if(!empty($this->order->additional)) {
		foreach($this->order->additional as $additional) {
?>
		<dt
class="hikashop_order_additional_additional"><label><?php
echo JText::_($additional->order_product_name);
?></label></dt>
		<dd
class="hikashop_order_additional_additional"><span><?php
			if(!empty($additional->order_product_price)) {
				$additional->order_product_price =
(float)$additional->order_product_price;
			}
			if(!empty($additional->order_product_price) ||
empty($additional->order_product_options)) {
				echo
$this->currencyHelper->format($additional->order_product_price,
$this->order->order_currency_id);
			} else {
				echo $additional->order_product_options;
			}
		?></span></dd>
<?php
		}
	}
?>
		<dt
class="hikashop_order_additional_total"><label><?php
echo JText::_('HIKASHOP_TOTAL'); ?></label></dt>
		<dd
class="hikashop_order_additional_total"><span><?php
echo
$this->currencyHelper->format($this->order->order_full_price,$this->order->order_currency_id);
?></span></dd>
<?php
	if(!empty($this->fields['order'])) {
		$editCustomFields = false;
		if(isset($this->edit) && $this->edit === true) {
			$editCustomFields = true;
		}
		foreach($this->fields['order'] as $fieldName =>
$oneExtraField) {
?>
		<dt class="hikashop_order_additional_customfield
hikashop_order_additional_customfield_<?php echo $fieldName;
?>"><?php echo
$this->fieldsClass->getFieldName($oneExtraField);?></dt>
		<dd class="hikashop_order_additional_customfield
hikashop_order_additional_customfield_<?php echo $fieldName;
?>"><span><?php
			if($editCustomFields) {
				echo $this->fieldsClass->display($oneExtraField,
@$this->order->$fieldName,
'data[orderfields]['.$fieldName.']');
			} else {
				echo $this->fieldsClass->show($oneExtraField,
@$this->order->$fieldName);
			}
		?></span></dd>
<?php
		}
	}

?>
		<dt
class="hikashop_orderadditional_history"><label><?php
echo JText::_('HISTORY'); ?></label></dt>
		<dd class="hikashop_orderadditional_history">
			<span><input
onchange="window.orderMgr.orderadditional_history_changed(this);"
type="checkbox"
id="hikashop_history_orderadditional_store"
name="data[history][store_data]"
value="1"/><label
for="hikashop_history_orderadditional_store"
style="display:inline-block"><?php echo
JText::_('SET_HISTORY_MESSAGE');?></label></span><br/>
			<textarea id="hikashop_history_orderadditional_msg"
name="data[history][msg]"
style="display:none;">order/tmpl/edit_products.php000064400000012475151162050350012223
0ustar00eradditional_msg'], displayValue = '';
	if(!el.checked) displayValue = 'none';
	window.hikashop.setArrayDisplay(fields, displayValue);
}
</script>
	</dl>
	<input type="hidden" name="data[notify]"
id="hikashop_order_notify" value="0" />
	<input type="hidden" name="data[additional]"
value="1" />
	<input type="hidden" name="data[customfields]"
value="1" />
	<input type="hidden" name="cid[]"
value="<?php echo @$this->order->order_id; ?>" />
	<input type="hidden" name="option"
value="<?php echo HIKASHOP_COMPONENT; ?>" />
	<input type="hidden" name="task"
value="save" />
	<input type="hidden" name="subtask"
value="additional" />
	<input type="hidden" name="tmpl"
value="component" />
	<input type="hidden" name="ctrl"
value="order" />
	<?php echo JHTML::_( 'form.token' ); ?>
</form>
order/tmpl/edit_products.php000064400000012475151162050350012223
0ustar00<?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');
?><div class="hika_toolbar">
	<div class="hika_toolbar_btn hika_btn_32">
		<div class="hika_toolbar_right">
			<div class="btn"><a href="#save"
onclick="return
window.hikashop.submitform('save','hikashop_order_product_form');"><span
class="btnIcon icon-32-apply"></span><span
class="btnName">Save</span></a></div>
		</div>
		<div style="clear:right"></div>
	</div>
</div>
<form action="<?php echo
hikashop_completeLink('order&task=save&subtask=product&tmpl=component');
?>" name="hikashop_order_product_form"
id="hikashop_order_product_form" method="post"
enctype="multipart/form-data">
	<dl class="hika_options">
		<dt
class="hikashop_order_product_id"><label><?php echo
JText::_('PRODUCT'); ?></label></dt>
		<dd class="hikashop_order_product_id"><?php echo
(int)@$this->orderProduct->product_id; ?> - <?php echo
@$this->originalProduct->product_name; ?></dd>

		<dt
class="hikashop_order_product_name"><label><?php echo
JText::_('HIKA_NAME'); ?></label></dt>
		<dd class="hikashop_order_product_name">
			<input type="text"
name="data[order][product][order_product_name]"
value="<?php echo
$this->escape(@$this->orderProduct->order_product_name);
?>" />
		</dd>

		<dt
class="hikashop_order_product_code"><label><?php echo
JText::_('PRODUCT_CODE'); ?></label></dt>
		<dd class="hikashop_order_product_code">
			<input type="text"
name="data[order][product][order_product_code]"
value="<?php echo
$this->escape(@$this->orderProduct->order_product_code);
?>" />
		</dd>

		<dt
class="hikashop_order_product_price"><label><?php
echo JText::_('UNIT_PRICE'); ?></label></dt>
		<dd class="hikashop_order_product_price">
			<input type="text"
name="data[order][product][order_product_price]"
value="<?php echo @$this->orderProduct->order_product_price;
?>" />
		</dd>

		<dt
class="hikashop_order_product_vat"><label><?php echo
JText::_('VAT'); ?></label></dt>
		<dd class="hikashop_order_product_vat">
			<input type="text"
name="data[order][product][order_product_tax]"
value="<?php echo @$this->orderProduct->order_product_tax;
?>" />
			<?php echo $this->ratesType->display(
"data[order][product][tax_namekey]" ,
@$this->orderProduct->tax_namekey ); ?>
		</dd>

		<dt
class="hikashop_order_product_quantity"><label><?php
echo JText::_('PRODUCT_QUANTITY');
?></label></dt>
		<dd class="hikashop_order_product_quantity">
			<input type="text"
name="data[order][product][order_product_quantity]"
value="<?php echo
@$this->orderProduct->order_product_quantity; ?>" />
		</dd>

<?php
	if(!empty($this->fields['item'])) {
		$editCustomFields = true;
		foreach($this->fields['item'] as $fieldName =>
$oneExtraField) {
?>
		<dt class="hikashop_order_product_customfield
hikashop_order_product_customfield_<?php echo $fieldName;
?>"><?php echo
$this->fieldsClass->getFieldName($oneExtraField);?></dt>
		<dd class="hikashop_order_product_customfield
hikashop_order_product_customfield_<?php echo $fieldName;
?>"><span><?php
			if($editCustomFields) {
				echo $this->fieldsClass->display($oneExtraField,
@$this->orderProduct->$fieldName,
'data[order][product]['.$fieldName.']',false,'',true);
			} else {
				echo $this->fieldsClass->show($oneExtraField,
@$this->orderProduct->$fieldName);
			}
		?></span></dd>
<?php
		}
	}
?>
		<dt
class="hikashop_orderproduct_history"><label><?php
echo JText::_('HISTORY'); ?></label></dt>
		<dd class="hikashop_orderproduct_history">
			<span><input
onchange="window.orderMgr.orderproduct_history_changed(this);"
type="checkbox"
id="hikashop_history_orderproduct_store"
name="data[history][store_data]"
value="1"/><label
for="hikashop_histororder/tmpl/export.php000064400000004025151162050350010664
0ustar00duct][order_product_id]" value="<?php echo
@$this->orderProduct->order_product_id;?>" />
	<input type="hidden"
name="data[order][product][product_id]" value="<?php echo
@$this->orderProduct->product_id;?>" />
	<input type="hidden"
name="data[order][product][order_id]" value="<?php echo
@$this->orderProduct->order_id;?>" />
	<input type="hidden" name="data[products]"
value="1" />
	<input type="hidden" name="cid[]"
value="<?php echo @$this->orderProduct->order_id; ?>"
/>
	<input type="hidden" name="option"
value="<?php echo HIKASHOP_COMPONENT; ?>" />
	<input type="hidden" name="task"
value="save" />
	<input type="hidden" name="subtask"
value="products" />
	<input type="hidden" name="tmpl"
value="component" />
	<input type="hidden" name="ctrl"
value="order" />
	<?php echo JHTML::_( 'form.token' ); ?>
</form>
order/tmpl/export.php000064400000004025151162050350010664 0ustar00<?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
while(ob_get_level() > 1)
	ob_end_clean();

$config =& hikashop_config();
$format = $config->get('export_format','csv');
$separator = $config->get('csv_separator',';');
$force_quote = $config->get('csv_force_quote',1);

$export =
hikashop_getorder/tmpl/fields.php000064400000003235151162050350010613
0ustar00empty($row->order_created)) $row->order_created =
hikashop_getDate($row->order_created,'%Y-%m-%d %H:%M:%S');
		if(!empty($row->order_modified)) $row->order_modified =
hikashop_getDate($row->order_modified,'%Y-%m-%d %H:%M:%S');

		if($maxProd && !empty($productFields)){
			for($i=1;$i<=$maxProd;$i++){
				$prod =& $row->products[$i-1];
				foreach($productFields as $field){
					$n = 'item_'.$i.'_'.$field;
					$row->$n = @$prod->$field;
				}
			}
		}

		$export->writeLine($row);
	}
}

$export->send();
exit;
order/tmpl/fields.php000064400000003235151162050350010613 0ustar00<?php
/**
 * @package	HikaShop for Joomla!
 * @version	2.2.3
 * @author	hikashop.com
 * @copyright	(C) 2010-2013 HIKARI SOFTWARE. All rights reserved.
order/tmpl/form.php000064400000061510151162050350010310
0ustar00						<?php echo
$this->fieldsClass->display($oneExtraField,$this->element->$fieldName,'data[order]['.$fieldName.']');
?>
					</td>
				</tr>
			<?php
			}
		}
		$this->setLayout('notification'); echo
$this->loadTemplate();?>
	</table>
	<input type="hidden"
name="data[order][history][history_type]"
value="modification" />
	<input type="hidden" name="data[order][order_id]"
value="<?php echo @$this->element->order_id;?>"
/>
	<input type="hidden" name="option"
value="<?php echo HIKASHOP_COMPONENT; ?>" />
	<input type="hidden" name="task" value=""
/>
	<input type="hidden" name="ctrl"
value="order" />
	<?php echo JHTML::_( 'form.token' ); ?>
</form>
order/tmpl/form.php000064400000061510151162050350010310 0ustar00<?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');
?><div class="iframedoc"
id="iframedoc"></div>
<?php if(!HIKASHOP_BACK_RESPONSIVE) { ?>
<div id="page-order">
	<table style="width:100%">
		<tr>
			<td valign="top" width="50%">
<?php } else { ?>
<div id="page-order" class="row-fluid">
	<div class="span6">
<?php } ?>
			<fieldset class="adminform"
id="htmlfieldset_general">
				<legend><?php echo JText::_('MAIN_INFORMATION');
?></legend>
				<table class="admintable table">
					<tr>
						<td class="key">
							<?php echo JText::_( 'ORDER_NUMBER' ); ?>
						</td>
						<td>
							<?php echo $this->order->order_number; ?>
						</td>
					</tr>
					<tr>
						<td class="key">
							<?php echo JText::_( 'ORDER_STATUS' ); ?>
						</td>
						<td>
							<?php
							echo $this->popup->display(
								JText::_('ORDER_STATUS'),
								'ORDER_STATUS',
								'/',
								'status_change_link_'.$this->order->order_id,
								760, 480, 'style="display:none;"',
'', 'link'
							);
							$doc = JFactory::getDocument();
							$doc->addScriptDeclaration(' var
'."default_filter_status_".$this->order->order_id.'=\''.$this->order->order_status.'\';
');
							echo
$this->category->display("filter_status_".$this->order->order_id,$this->order->order_status,'onchange="if(this.value==default_filter_status_'.$this->order->order_id.'){return;}
hikashop.openBox(\'status_change_link_'.$this->order->order_id.'\',\''.hikashop_completeLink('order&task=changestatus&order_id='.$this->order->order_id,true).'&status=\'+this.value);this.value=default_filter_status_'.$this->order->order_id.';if(typeof(jQuery)!=\'undefined\'){jQuery(this).trigger(\'liszt:updated\');}"');
?>
						</td>
					</tr>
					<tr>
						<td class="key">
							<?php echo JText::_( 'INVOICE_NUMBER' ); ?>
						</td>
						<td><?php echo @$this->order->order_invoice_number;
?></td>
					</tr>
					<tr>
						<td class="key">
							<?php echo JText::_( 'DATE' ); ?>
						</td>
						<td><?php echo
hikashop_getDate($this->order->order_created,'%Y-%m-%d
%H:%M');?></td>
					</tr>
					<tr>
						<td class="key">
							<?php echo JText::_( 'ID' ); ?>
						</td>
						<td><?php echo $this->order->order_id;
?></td>
					</tr>
				</table>
			</fieldset>
			<fieldset class="adminform"
id="htmlfieldset_customer">
				<legend><?php echo JText::_('CUSTOMER');
?></legend>
				<div style="float:right">
					<?php
						echo $this->popup->display(
							'<img style="vertical-align:middle;"
alt="'.JText::_('HIKA_EDIT').'"
src="'. HIKASHOP_IMAGES.'edit.png"/>',
							'HIKA_EDIT',
							hikashop_completeLink('order&task=user&order_id='.$this->order->order_id,true),
							'hikashop_edit_customer',
							760, 480, '', '', 'link'
						);
					?>
				</div>
				<table class="admintable table">
<?php
	if(!empty($this->order->customer)){
		if(!empty($this->order->customer->name)){
?>
					<tr>
						<td class="key">
							<?php echo JText::_( 'HIKA_USER_NAME' ); ?>
						</td>
						<td><?php echo $this->order->customer->name.'
('.$this->order->customer->username.')';
?></td>
					</tr>
<?php
		}
?>
					<tr>
						<td class="key">
							<?php echo JText::_( 'HIKA_EMAIL' ); ?>
						</td>
						<td>
							<?php echo $this->order->customer->user_email; ?>
						</td>
					</tr>
					<tr>
						<td class="key">
							<?php echo JText::_( 'ID' ); ?>
						</td>
						<td>
							<?php echo $this->order->customer->user_id; ?>
							<a href="<?php echo
hikashop_completeLink('user&task=edit&cid[]='.
$this->order->customer->user_id.'&order_id='.$this->order->order_id);
?>">
								<img style="vertical-align:middle;" src="<?php
echo HIKASHOP_IMAGES; ?>go.png" alt="go" />
							</a>
						</td>
					</tr>
<?php
	}
?>
					<tr>
						<td class="key">
							<?php echo JText::_( 'IP' ); ?>
						</td>
						<td><?php
							echo $this->order->order_ip;
							if(!empty($this->order->geolocation) &&
$this->order->geolocation->geolocation_country!='Reserved'){
								echo ' (
'.$this->order->geolocation->geolocation_city.'
'.$this->order->geolocation->geolocation_state.'
'.$this->order->geolocation->geolocation_country.'
)';
							}
						?></td>
					</tr>
				</table>
			</fieldset>
<?php if(!HIKASHOP_BACK_RESPONSIVE) { ?>
			</td>
			<td valign="top" width="50%">
<?php } else { ?>
	</div>
	<div class="span6">
<?php } ?>
			<fieldset class="adminform"
id="htmlfieldset_additional">
				<legend><?php echo JText::_('ORDER_ADD_INFO');
?></legend>
				<?php
					echo $this->popup->display(
						'<img style="vertical-align:middle;"
alt="'.JText::_('HIKA_EDIT').'"
src="'. HIKASHOP_IMAGES.'edit.png"/>',
						'HIKA_EDIT',
						hikashop_completeLink('order&task=changeplugin&order_id='.$this->order->order_id,true),
						'plugin_change_link',
						760, 480, 'style="display:none;"', '',
'link'
					);
					?>
				<table class="admintable table">
					<tr>
						<td class="key">
							<?php echo JText::_( 'SUBTOTAL' ); ?>
						</td>
						<td><?php
							echo
$this->currencyHelper->format($this->order->order_subtotal,$this->order->order_currency_id);
						?></td>
					</tr>
					<tr>
						<td class="key">
							<?php echo JText::_( 'HIKASHOP_COUPON' ); ?>
						</td>
						<td>
							<?php
								echo
$this->currencyHelper->format($this->order->order_discount_price*-1.0,$this->order->order_currency_id);
								echo $this->popup->display(
									'<img style="vertical-align:middle;"
alt="'.JText::_('HIKA_EDIT').'"
src="'. HIKASHOP_IMAGES.'edit.png"/>',
									'HIKA_EDIT',
									hikashop_completeLink('order&task=discount&order_id='.$this->order->order_id,true),
									'hikashop_edit_coupon',
									760, 480, '', '', 'link'
								);
								echo ' '.$this->order->order_discount_code; ?>
						</td>
					</tr>
					<tr>
						<td class="key">
							<?php echo JText::_( 'SHIPPING' ); ?>
						</td>
						<td>
							<?php
								echo
$this->currencyHelper->format($this->order->order_shipping_price,$this->order->order_currency_id);
								echo $this->popup->display(
									'<img style="vertical-align:middle;"
alt="'.JText::_('HIKA_EDIT').'"
src="'. HIKASHOP_IMAGES.'edit.png"/>',
									'HIKA_EDIT',
									hikashop_completeLink('order&task=changeplugin&plugin='.$this->order->order_shipping_method.'_'.$this->order->order_shipping_id.'&type=shipping&order_id='.$this->order->order_id,true),
									'hikashop_edit_shipping',
									760, 480, '', '', 'link'
								);
								if(!empty($this->shipping)){
									$this->shipping->order = $this->order;
									echo
$this->shipping->display('data[order][shipping]',$this->order->order_shipping_method,$this->order->order_shipping_id);
								}?>
						</td>
					</tr>
					<tr>
						<td class="key">
							<?php echo JText::_( 'HIKASHOP_PAYMENT' ); ?>
						</td>
						<td>
							<?php
								echo
$this->currencyHelper->format($this->order->order_payment_price,$this->order->order_currency_id);
								echo $this->popup->display(
									'<img style="vertical-align:middle;"
alt="'.JText::_('HIKA_EDIT').'"
src="'. HIKASHOP_IMAGES.'edit.png"/>',
									'HIKA_EDIT',
									hikashop_completeLink('order&task=changeplugin&plugin='.$this->order->order_payment_method.'_'.$this->order->order_payment_id.'&type=payment&order_id='.$this->order->order_id,true),
									'hikashop_edit_payment',
									760, 480, '', '', 'link'
								);
								if(!empty($this->payment)){
									$this->payment->order = $this->order;
									echo
$this->payment->display('data[order][payment]',$this->order->order_payment_method,$this->order->order_payment_id);
								}?>
						</td>
					</tr>
<?php
	if($this->config->get('detailed_tax_display') &&
!empty($this->order->order_tax_info)){
		foreach($this->order->order_tax_info as $tax){
?>
					<tr>
						<td class="key">
							<?php echo $tax->tax_namekey; ?>
						</td>
						<td><?php
							echo
$this->currencyHelper->format($tax->tax_amount,$this->order->order_currency_id);
						?></td>
					</tr>
<?php
		}
	}
	if(!empty($this->order->additional)) {
		foreach($this->order->additional as $additional) {
?>
					<tr>
						<td class="key">
							<?php echo JText::_($additional->order_product_name); ?>
						</td>
						<td><?php
							if(!empty($additional->order_product_price)) {
								$additional->order_product_price =
(float)$additional->order_product_price;
							}
							if(!empty($additional->order_product_price) ||
empty($additional->order_product_options)) {
								echo
$this->currencyHelper->format($additional->order_product_price,
$this->order->order_currency_id);
							} else {
								echo $additional->order_product_options;
							}
						?></td>
					</tr>
<?php
		}
	}
?>
					<tr>
						<td class="key">
							<?php echo JText::_( 'HIKASHOP_TOTAL' ); ?>
						</td>
						<td><?php
							echo
$this->currencyHelper->format($this->order->order_full_price,$this->order->order_currency_id);
						?></td>
					</tr>
<?php
		if(!empty($this->fields['order'])){
			foreach($this->fields['order'] as $fieldName =>
$oneExtraField) {
?>
					<tr>
						<td class="key">
							<?php echo
$this->fieldsClass->getFieldName($oneExtraField);?>
						</td>
						<td>
							<?php echo
$this->fieldsClass->show($oneExtraField,@$this->order->$fieldName);
?>
						</td>
					</tr>
<?php
		}
?>
					<tr>
						<td colspan="2">
							<div style="float:right">
								<?php
									echo $this->popup->display(
									'<img style="vertical-align:middle;"
alt="'.JText::_('HIKA_EDIT').'"
src="'. HIKASHOP_IMAGES.'edit.png"/>',
									'HIKA_EDIT',
									hikashop_completeLink('order&task=fields&order_id='.$this->order->order_id,true),
									'hikashop_edit_fields',
									760, 480, '', '', 'link'
								);
								?>
							</div>
						</td>
					</tr>
<?php
	}
?>
				</table>
			</fieldset>
<?php if(!empty($this->order->partner)){ ?>
		<fieldset class="adminform"
id="htmlfieldset_partner">
			<legend><?php echo JText::_('PARTNER');
?></legend>
				<table class="admintable table">
					<tr>
						<td class="key">
							<?php echo JText::_( 'PARTNER_EMAIL' ); ?>
						</td>
						<td>
							<?php echo $this->order->partner->user_email;?>
							<a href="<?php echo
hikashop_completeLink('user&task=edit&cid[]='.
$this->order->partner->user_id.'&order_id='.$this->order->order_id);
?>">
								<img style="vertical-align:middle;" src="<?php
echo HIKASHOP_IMAGES; ?>go.png" alt="go" />
							</a>
							<?php
								echo $this->popup->display(
								'<img style="vertical-align:middle;"
alt="'.JText::_('HIKA_EDIT').'"
src="'. HIKASHOP_IMAGES.'edit.png"/>',
								'HIKA_EDIT',
								hikashop_completeLink('order&task=partner&order_id='.$this->order->order_id,true),
								'hikashop_edit_partner',
								760, 480, '', '', 'link'
							);
							?>
						</td>
					</tr>
<?php if(!empty($this->order->partner->name)){ ?>
					<tr>
						<td class="key">
							<?php echo JText::_( 'PARTNER_NAME' ); ?>
						</td>
						<td><?php
							echo $this->order->partner->name;
						?></td>
					</tr>
<?php } ?>
					<tr>
						<td class="key">
							<?php echo JText::_( 'PARTNER_FEE' ); ?>
						</td>
						<td>
							<?php
								echo
$this->currencyHelper->format($this->order->order_partner_price,$this->order->order_partner_currency_id);
								echo $this->popup->display(
									'<img style="vertical-align:middle;"
alt="'.JText::_('HIKA_EDIT').'"
src="'. HIKASHOP_IMAGES.'edit.png"/>',
									'HIKA_EDIT',
									hikashop_completeLink('order&task=partner&order_id='.$this->order->order_id,true),
									'hikashop_edit_partner2',
									760, 480, '', '', 'link'
								);

								if(empty($this->order->order_partner_paid)){
									echo JText::_('NOT_PAID').'<img
src="'.HIKASHOP_IMAGES.'delete2.png" />';
								}else{
									echo JText::_('PAID').'<img
src="'.HIKASHOP_IMAGES.'ok.png" />';
								}
							?>
						</td>
					</tr>
				</table>
			</fieldset>
<?php } ?>
<?php if(!HIKASHOP_BACK_RESPONSIVE) { ?>
			</td>
		</tr>
	</table>
</div>
<?php } else { ?>
	</div>
</div>
<?php } ?>
<?php if(!HIKASHOP_BACK_RESPONSIVE) { ?>
<div id="page-order2">
	<table style="width:100%">
		<tr>
			<td valign="top" width="50%"
id="hikashop_billing_address">
<?php } else { ?>
<div id="page-order2" class="row-fluid">
	<div class="span6"
id="hikashop_billing_address">
<?php } ?>
			<?php $this->type = 'billing'; echo
$this->loadTemplate('address');?>
<?php if(!HIKASHOP_BACK_RESPONSIVE) { ?>
			</td>
			<td valign="top" width="50%"
id="hikashop_shipping_address">
<?php } else { ?>
	</div>
	<div class="span6"
id="hikashop_shipping_address">
<?php } ?>
<?php
			if(empty($this->order->override_shipping_address)) {
				$this->type = 'shipping'; echo
$this->loadTemplate('address');
			} else {
				?><fieldset class="adminform"
id="htmlfieldset_shipping">
					<legend><?php echo
JText::_('HIKASHOP_SHIPPING_ADDRESS'); ?></legend>
					<?php echo $this->order->override_shipping_address;?>
				</fieldset><?php
			}
		?>
<?php if(!HIKASHOP_BACK_RESPONSIVE) { ?>
			</td>
		</tr>
	</table>
</div>
<?php } else { ?>
	</div>
</div>
<?php } ?>
			<fieldset class="adminform"
id="htmlfieldset_products">
				<legend><?php echo JText::_('PRODUCT_LIST');
?></legend>
				<div style="float:right">
					<?php
					echo $this->popup->display(
						'<img style="vertical-align:middle;"
alt="'.JText::_('ADD').'" src="'.
HIKASHOP_IMAGES.'add.png"/>'.JText::_('ADD'),
						'ADD',
						hikashop_completeLink('order&task=product&order_id='.$this->order->order_id,true),
						'hikashop_add_product',
						760, 480, '', '', 'button'
					);
					echo $this->popup->display(
						'<img style="vertical-align:middle;"
alt="'.JText::_('ADD_EXISTING_PRODUCT').'"
src="'.
HIKASHOP_IMAGES.'add.png"/>'.JText::_('ADD_EXISTING_PRODUCT'),
						'ADD_EXISTING_PRODUCT',
						hikashop_completeLink('order&task=product_select&order_id='.$this->order->order_id,true),
						'hikashop_add_existing_product',
						760, 480, '', '', 'button'
					);

					?>
				</div>
				<table id="hikashop_order_product_listing"
class="adminlist table table-striped table-hover"
cellpadding="1">
					<thead>
						<tr>
							<th class="hikashop_order_item_name_title
title"><?php
								echo JText::_('PRODUCT');
							?></th>
							<th class="hikashop_order_item_files_title
title"><?php
								echo JText::_('HIKA_FILES');
							?></th>
							<th class="hikashop_order_item_price_title
title"><?php
								echo JText::_('UNIT_PRICE');
							?></th>
							<th class="hikashop_order_item_quantity_title title
titletoggle"><?php
								echo JText::_('PRODUCT_QUANTITY');
							?></th>
							<th class="hikashop_order_item_total_price_title title
titletoggle"><?php
								echo JText::_('PRICE');
							?></th>
							<th class="hikashop_order_item_action_title title
titletoggle"><?php
								echo JText::_('ACTIONS');
							?></th>
						</tr>
					</thead>
					<tbody>
<?php
	foreach($this->order->products as $k => $product){
?>
						<tr>
							<td class="hikashop_order_item_name_value">
								<span class="hikashop_order_item_name">
									<?php
									echo $this->popup->display(
										$product->order_product_name.'
'.$product->order_product_code,
										$product->order_product_name.'
'.$product->order_product_code,
										hikashop_frontendLink('index.php?option=com_hikashop&ctrl=product&task=show&cid='.$product->product_id,true),
										'hikashop_see_product_'.$product->product_id,
										760, 480, '', '', 'link'
									);
									$config =& hikashop_config();
									$manage =
hikashop_isAllowed($config->get('acl_product_manage','all'));
									if($manage){ ?>
										<a target="_blank" href="<?php echo
hikashop_completeLink('product&task=edit&cid[]='.
$product->product_id); ?>">
											<img style="vertical-align:middle;"
src="<?php echo HIKASHOP_IMAGES; ?>go.png"
alt="<?php echo JText::_('HIKA_EDIT'); ?>" />
										</a>
									<?php } ?>
								</span>
								<p
class="hikashop_order_product_custom_item_fields"><?php
								if(hikashop_level(2) &&
!empty($this->fields['item'])){
									foreach($this->fields['item'] as $field){
										$namekey = $field->field_namekey;
										if(empty($product->$namekey)){
											continue;
										}
										echo '<p
class="hikashop_order_item_'.$namekey.'">'.$this->fieldsClass->getFieldName($field).':
'.$this->fieldsClass->show($field,$product->$namekey).'</p>';
									}
								}?></p>
							</td>
							<td class="hikashop_order_item_files_value">
								<?php
									if(!empty($product->files)){
										$html = array();
										foreach($product->files as $file){
											if(empty($file->file_name)){
												$file->file_name = $file->file_path;
											}
											$fileHtml = '';
											if(!empty($this->order_status_for_download) &&
!in_array($this->order->order_status,explode(',',$this->order_status_for_download))){
												$fileHtml .= ' /
<b>'.JText::_('BECAUSE_STATUS_NO_DOWNLOAD').'</b>';
											}
											if(!empty($this->download_time_limit)){
													if(($this->download_time_limit+$this->order->order_created)<time()){
														$fileHtml .= ' /
<b>'.JText::_('TOO_LATE_NO_DOWNLOAD').'</b>';
													}else{
														$fileHtml .= ' /
'.JText::sprintf('UNTIL_THE_DATE',hikashop_getDate($this->order->order_created+$this->download_time_limit));
													}
											}
											if(!empty($file->file_limit) &&
(int)$file->file_limit != 0) {
												$download_number_limit = $file->file_limit;
												if($download_number_limit < 0)
													$download_number_limit = 0;
											} else {
												$download_number_limit = $this->download_number_limit;
											}
											if(!empty($download_number_limit)){
												if($download_number_limit<=$file->download_number){
													$fileHtml .= ' /
<b>'.JText::_('MAX_REACHED_NO_DOWNLOAD').'</b>';
												}else{
													$fileHtml .= ' /
'.JText::sprintf('X_DOWNLOADS_LEFT',$download_number_limit-$file->download_number);
												}
												if($file->download_number){
													$fileHtml .= '<a
href="'.hikashop_completeLink('file&task=resetdownload&file_id='.$file->file_id.'&order_id='.$this->order->order_id.'&'.hikashop_getFormToken().'=1&return='.urlencode(base64_encode(hikashop_completeLink('order&task=edit&cid='.$this->order->order_id,false,true)))).'"><img
src="'.HIKASHOP_IMAGES.'delete.png"
alt="'.JText::_('HIKA_DELETE').'"
/></a>';
												}
											}
											$file_pos = '';
											if($file->file_pos > 0) {
												$file_pos = '&file_pos='.$file->file_pos;
											}
											$fileLink = '<a
href="'.hikashop_completeLink('order&task=download&file_id='.$file->file_id.'&order_id='.$this->order->order_id.$file_pos).'">'.$file->file_name.'</a>';
											$html[]=$fileLink.' '.$fileHtml;
										}
										echo implode('<br/>',$html);
									}
								?>
							</td>
							<td
class="hikashop_order_item_price_value"><?php
								echo
$this->currencyHelper->format($product->order_product_price,$this->order->order_currency_id);
								if(bccomp($product->order_product_tax,0,5)){
									echo '
'.JText::sprintf('PLUS_X_OF_VAT',$this->currencyHelper->format($product->order_product_tax,$this->order->order_currency_id));
								}
							?></td>
							<td
class="hikashop_order_item_quantity_value"><?php
								echo $product->order_product_quantity;
							?></td>
							<td
class="hikashop_order_item_total_price_value"><?php
								echo
$this->currencyHelper->format($product->order_product_total_price,$this->order->order_currency_id);
							?></td>
							<td class="hikashop_order_item_action_value">
								<?php
								echo $this->popup->display(
									'<img style="vertical-align:middle;"
alt="'.JText::_('HIKA_EDIT').'"
src="'. HIKASHOP_IMAGES.'edit.png"/>',
									'HIKA_EDIT',
									hikashop_completeLink('order&task=product&product_id='.$product->order_product_id,true),
									'hikashop_edit_product'.$product->order_product_id,
									760, 480, '', '', 'link'
								);
								echo $this->popup->display(
									'<img style="vertical-align:middle;"
alt="'.JText::_('HIKA_DELETE').'"
src="'. HIKASHOP_IMAGES.'delete.png"/>',
									'HIKA_DELETE',
									hikashop_completeLink('order&task=product_delete&product_id='.$product->order_product_id,true),
									'hikashop_delete_product'.$product->order_product_id,
									760, 480, '', '', 'link'
								); ?>
							</td>
						</tr>
<?php
	}
?>
					</tbody>
				</table>
			</fieldset>
<?php
	JPluginHelper::importPlugin('hikashop');
	$dispatcher = JDispatcher::getInstance();
	$dispatcher->trigger('onAfterOrderProductsListingDisplay',
array(&$this->order, 'order_back_show'));
?>

<?php if(!empty($this->order->history)) { ?>
			<fieldset class="adminform"
id="htmlfieldset_history">
				<legend><?php echo JText::_('HISTORY');
?></legend>
				<table id="hikashop_order_history_listing"
class="adminlist table table-striped table-hover"
cellpadding="1">
					<thead>
						<tr>
							<th class="title"><?php
								echo JText::_('HIKA_TYPE');
							?></th>
							<th class="title"><?php
								echo JText::_('ORDER_STATUS');
							?></th>
							<th class="title"><?php
								echo JText::_('REASON');
							?></th>
							<th class="title"><?php
								echo JText::_('HIKA_USER').' /
'.JText::_('IP');
							?></th>
							<th class="title"><?php
								echo JText::_('DATE');
							?></th>
							<th class="title"><?php
								echo JText::_('INFORMATION');
							?></th>
						</tr>
					</thead>
					<tbody>
<?php
	foreach($this->order->history as $k => $history){
?>
						<tr>
							<td><?php
								$val =
preg_replace('#[^a-z0-9]#i','_',strtoupper($history->history_type));
								$trans = JText::_($val);
								if($val!=$trans){
									$history->history_type = $trans;
								}
								echo $history->history_type;
							?></td>
							<td><?php
								echo $this->category->get($history->history_new_status);
							?></td>
							<td><?php
								echo $history->history_reason;
							?></td>
							<td><?php
								if(!empty($history->history_user_id)){
									$class = hikashop_get('class.user');
									$user = $class->get($history->history_user_id);
									echo $user->username.' / ';
								}
								echo $history->history_ip;
							?></td>
							<td><?php
								echo hikashop_getDate($history->history_created,'%Y-%m-%d
%H:%M');
							?></td>
							<td><?php
								echo $history->history_data;
							?></td>
						</tr>
<?php
	}
?>
					</tbody>
				</table>
			</fieldset>
<?php }?>
<?php if(hikashop_level(2) &&
!empty($this->order->entries)) { ?>
			<fieldset class="adminform"
id="htmlfieldset_history">
				<legend><?php echo JText::_('HIKASHOP_ENTRIES');
?></legend>
				<table class="adminlist table table-striped table-hover"
cellpadding="1">
					<thead>
						<tr>
							<th class="title titlenum"><?php
								echo JText::_('HIKA_NUM');
							?></th>
					order/tmpl/form.xml000064400000000310151162050350010310
0ustar00GES.'edit.png"/>',
					'HIKA_EDIT',
					hikashop_completeLink('entry&task=edit&entry_id='.$entry->entry_id,true),
					'hikashop_edit_entry'.$entry->entry_id,
					760, 480, '', '', 'link'
				order/tmpl/form_address.php000064400000004211151162050350012010
0ustar00order/tmpl/form.xml000064400000000310151162050350010310
0ustar00<?xml version="1.0" encoding="utf-8"?>
<metadata>
	<layout title="COM_HIKASHOP_ORDER_CREATE_TITLE">
		<message>
			<![CDATA[COM_HIKASHOP_ORDER_CREATE_DESC]]>
		</message>
	</layout>
</metadata>order/tmpl/form_address.php000064400000004211151162050350012010
0ustar00<?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 $this->typeU=strtoupper($this->type);
if(empty($this->order->fields)) return;
?>
<fieldset class="adminform" id="htmlfieldset_<?php
echo $this->type; ?>">
	<legend><?php echo JText::_('HIKASHOP_'.
$this->typeU .'_ADDRESS'); ?></legend>
	<?php
	$name = $this->type.'_address';

	if(($this->type!='shipping' ||
!empty($this->order->order_shipping_address_id))
&order/tmpl/index.html000064400000000032151162050350010621
0ustar00s->fieldsClass->getFieldNaorder/tmpl/invoice.php000064400000037134151162050350011006
0ustar00order/tmpl/index.html000064400000000032151162050350010621
0ustar00<html><body></body></html>order/tmpl/invoice.php000064400000037134151162050350011006
0ustar00<?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');
?><div id="hikashop_invoice_main_div">
	<div id="print" style="float:right">
		<a href="#"
onclick="document.getElementById('print').style.visibility='hidden';window.focus();window.print();return
false;">
			<img src="<?php echo HIKASHOP_IMAGES;
?>print.png"/>
		</a>
	</div>
	<br/>
	<table width="100%">
		<tr>
			<td>
				<h1 style="text-align:center">
				<?php
				if($this->invoice_type=='full'){
					echo JText::_('INVOICE');
				}else{
					echo JText::_('SHIPPING_INVOICE');
				}
				?>
				</h1>
				<br/>
				<br/>
			</td>
		</tr>
		<tr>
			<td>
				<div style="float:right;width:100px;padding-top:20px">
				<?php echo JText::_('DATE').':
'.hikashop_getDate($this->element->order_created,'%d %B %Y
');?><br/>
				<?php
					if(!empty($this->element->order_invoice_number)) {
						 echo JText::_('INVOICE').':
'.$this->element->order_invoice_number;
					} else {
						 echo JText::_('INVOICE').':
'.@$this->element->order_number;
					}
				?>
				</div>
				<p>
				<?php echo $this->store_address;?>
				</p>
			</td>
		</tr>
		<tr>
			<td>
				<br/>
				<br/>
				<table width="100%">
					<tr>
						<?php if($this->invoice_type=='full' &&
!empty($this->element->billing_address)){?>
						<td>
							<fieldset class="adminform"
id="htmlfieldset_billing">
							<legend style="background-color: #FFFFFF;"><?php
echo JText::_('HIKASHOP_BILLING_ADDRESS'); ?></legend>
								<?php
									$this->setLayout('address_template');
									$html = $this->loadTemplate();
									foreach($this->element->fields as $field){
										$fieldname = $field->field_namekey;
										if(!empty($this->element->billing_address->$fieldname))
$html=str_replace('{'.$fieldname.'}',$this->fieldsClass->show($field,$this->element->billing_address->$fieldname),$html);
									}
									echo
str_replace("\n","<br/>\n",trim(str_replace("\n\n","\n",preg_replace('#{(?:(?!}).)*}#i','',$html)),"\n"));
								?>
							</fieldset>
						</td>
						<?php }?>
						<td>
						<?php
							if(!empty($this->element->order_shipping_id) &&
!empty($this->element->shipping_address)){
								?>
								<fieldset class="adminform"
id="htmlfieldset_shipping">
									<legend style="background-color:
#FFFFFF;"><?php echo
JText::_('HIKASHOP_SHIPPING_ADDRESS'); ?></legend>
									<?php
										if(empty($this->element->override_shipping_address)) {
											$this->setLayout('address_template');
											$html = $this->loadTemplate();
											foreach($this->element->fields as $field){
												$fieldname = $field->field_namekey;
												if(!empty($this->element->shipping_address->$fieldname))
$html=str_replace('{'.$fieldname.'}',$this->fieldsClass->show($field,$this->element->shipping_address->$fieldname),$html);
											}
											echo
str_replace("\n","<br/>\n",trim(str_replace("\n\n","\n",preg_replace('#{(?:(?!}).)*}#i','',$html)),"\n"));
										} else {
											echo $this->element->override_shipping_address;
										}
									?>
								</fieldset>
								<?php
							}
						?>
						</td>
					</tr>
				</table>
			</td>
		</tr>
		<tr>
			<td>
				<br/>
				<fieldset class="adminform"
id="htmlfieldset_products">
					<legend style="background-color: #FFFFFF;"><?php
echo JText::_('PRODUCT_LIST'); ?></legend>
					<table class="adminlist table table-striped"
cellpadding="1" width="100%">
					<?php $colspan = 2; ?>
						<thead>
							<tr>
								<th class="title" width="60%">
									<?php echo JText::_('PRODUCT'); ?>
								</th>
							<?php if ($this->config->get('show_code')) {
$colspan++; ?>
								<th class="title" ><?php echo
JText::_('CART_PRODUCT_CODE'); ?></th>
							<?php } ?>
								<?php if($this->invoice_type=='full'){?>
								<th class="title">
									<?php echo JText::_('UNIT_PRICE'); ?>
								</th>
								<?php } ?>
								<th class="title titletoggle">
									<?php echo JText::_('PRODUCT_QUANTITY'); ?>
								</th>
								<?php if($this->invoice_type=='full'){?>
								<th class="title titletoggle">
									<?php echo JText::_('PRICE'); ?>
								</th>
								<?php } ?>
							</tr>
						</thead>
						<tbody>
						<?php
							$k=0;
							$group = $this->config->get('group_options',0);
							foreach($this->order->products as $product){
								if($group && $product->order_product_option_parent_id)
continue;
								?>
								<tr class="row<?php echo $k;?>">
									<td>
										<?php echo $product->order_product_name;?>
										<p
class="hikashop_order_product_custom_item_fields">
										<?php
										if($group){
											$display_item_price=false;
											foreach($this->order->products as $j =>
$optionElement){
												if($optionElement->order_product_option_parent_id !=
$product->order_product_id) continue;
												if($optionElement->order_product_price>0){
													$display_item_price = true;
												}

											}
											if($display_item_price){
												if($this->config->get('price_with_tax')){
													echo '
'.$this->currencyHelper->format($product->order_product_price+$product->order_product_tax,$this->order->order_currency_id);
												}else{
													echo '
'.$this->currencyHelper->format($product->order_product_price,$this->order->order_currency_id);
												}
											}
										}

										if(hikashop_level(2) &&
!empty($this->fields['item'])){
											foreach($this->fields['item'] as $field){
												$namekey = $field->field_namekey;
												if(empty($product->$namekey) &&
!strlen($product->$namekey)){
													continue;
												}
												echo '<p
class="hikashop_order_item_'.$namekey.'">'.$this->fieldsClass->getFieldName($field).':
'.$this->fieldsClass->show($field,$product->$namekey).'</p>';
											}
										}
										if($group){
											foreach($this->order->products as $j =>
$optionElement){
												if($optionElement->order_product_option_parent_id !=
$product->order_product_id) continue;

												$product->order_product_price
+=$optionElement->order_product_price;
												$product->order_product_tax
+=$optionElement->order_product_tax;
												$product->order_product_total_price+=$optionElement->order_product_total_price;
												$product->order_product_total_price_no_vat+=$optionElement->order_product_total_price_no_vat;

												 ?>
													<p class="hikashop_order_option_name">
														<?php
															echo $optionElement->order_product_name;
															if($optionElement->order_product_price>0){
																if($this->config->get('price_with_tax')){
																	echo ' ( +
'.$this->currencyHelper->format($optionElement->order_product_price+$optionElement->order_product_tax,$this->order->order_currency_id).'
)';
																}else{
																	echo ' ( +
'.$this->currencyHelper->format($optionElement->order_product_price,$this->order->order_currency_id).'
)';
																}
															}
														?>
													</p>
											<?php
											}
										} ?>
										</p>
									</td>
									<?php if ($this->config->get('show_code')) {
?>
										<td><p
class="hikashop_product_code_invoice"><?php echo
$product->order_product_code; ?></p></td>
									<?php } ?>

									<?php if($this->invoice_type=='full'){?>
									<td>
										<?php
										if($this->config->get('price_with_tax')){
											echo
$this->currencyHelper->format($product->order_product_price+$product->order_product_tax,$this->order->order_currency_id);
										}else{
											echo
$this->currencyHelper->format($product->order_product_price,$this->order->order_currency_id);
										} ?>
									</td>
									<?php } ?>
									<td align="center">
										<?php echo $product->order_product_quantity;?>
									</td>
									<?php if($this->invoice_type=='full'){?>
									<td>
										<?php
										if($this->config->get('price_with_tax')){
											echo
$this->currencyHelper->format($product->order_product_total_price,$this->order->order_currency_id);
										}else{
											echo
$this->currencyHelper->format($product->order_product_total_price_no_vat,$this->order->order_currency_id);
										} ?>
									</td>
									<?php } ?>
								</tr>
								<?php
								$k=1-$k;
							}
						?>
							<?php if($this->invoice_type=='full'){?>
							<tr>
								<td style="border-top:2px solid #B8B8B8;"
colspan="<?php echo $colspan; ?>">
								</td>
								<td style="border-top:2px solid #B8B8B8;"
class="key">
									<label>
										<?php echo JText::_( 'SUBTOTAL' ); ?>
									</label>
								</td>
								<td style="border-top:2px solid #B8B8B8;">
									<?php
									if($this->config->get('price_with_tax')){
										echo
$this->currencyHelper->format($this->order->order_subtotal,$this->order->order_currency_id);
									}else{
										echo
$this->currencyHelper->format($this->order->order_subtotal_no_vat,$this->order->order_currency_id);
									} ?>
								</td>
							</tr>
							<?php $taxes =
$this->order->order_subtotal-$this->order->order_subtotal_no_vat+$this->order->order_shipping_tax-$this->order->order_discount_tax;
								if($taxes != 0){
									if($this->config->get('detailed_tax_display')
&& !empty($this->order->order_tax_info)){
										foreach($this->order->order_tax_info as $tax){ ?>
										<tr>
											<td colspan="<?php echo $colspan; ?>">
											</td>
											<td class="hikashop_order_tax_title key">
												<label>
													<?php echo $tax->tax_namekey; ?>
												</label>
											</td>
											<td class="hikashop_order_tax_value">
												<?php echo
$this->currencyHelper->format($tax->tax_amount,$this->order->order_currency_id);
?>
											</td>
										</tr>
									<?php
										}
												}else{ ?>
										<tr>
											<td colspan="<?php echo $colspan; ?>">
											</td>
											<td class="hikashop_order_tax_title key">
												<label>
													<?php echo JText::_( 'VAT' ); ?>
												</label>
											</td>
											<td class="hikashop_order_tax_value">
												<?php echo
$this->currencyHelper->format($taxes,$this->order->order_currency_id);
?>
											</td>
										</tr>

							<?php	}
								}
								if($this->order->order_discount_price != 0){ ?>
							<tr>
								<td colspan="<?php echo $colspan; ?>">
								</td>
								<td class="key">
									<label>
										<?php echo JText::_( 'HIKASHOP_COUPON' ); ?>
									</label>
								</td>
								<td>
									<?php
									if($this->config->get('price_with_tax')){
										echo
$this->currencyHelper->format($this->order->order_discount_price*-1.0,$this->order->order_currency_id);
									}else{
										echo
$this->currencyHelper->format(($this->order->order_discount_price-@$this->order->order_discount_tax)*-1.0,$this->order->order_currency_id);
									} ?>
								</td>
							</tr>
							<?php }
								if(!empty($this->order->additional)) {
									$exclude_additionnal = explode(',',
$this->config->get('order_additional_hide',
''));
									foreach($this->order->additional as $additional) {
										if(in_array($additional->order_product_name,
$exclude_additionnal)) continue;
								?>
							<tr>
								<td colspan="<?php echo $colspan; ?>">
								</td>
								<td class="hikashop_order_additionall_title key">
									<label><?php
										echo JText::_($additional->order_product_name);
									?></label>
								</td>
								<td ><?php
									if(!empty($additional->order_product_price)) {
										$additional->order_product_price =
(float)$additional->order_product_price;
									}
									if(!empty($additional->order_product_price) ||
empty($additional->order_product_options)) {
										echo
$this->currencyHelper->format($additional->order_product_price,
$this->order->order_currency_id);
									} else {
										echo $additional->order_product_options;
									}
								?></td>
							</tr>
								<?php }
								}
								if($this->order->order_shipping_price!=0 ||
($this->config->get('price_with_tax') &&
!empty($this->order->order_shipping_tax))) { ?>
							<tr>
								<td colspan="<?php echo $colspan; ?>">
								</td>
								<td class="key">
									<label>
										<?php echo JText::_( 'SHIPPING' ); ?>
									</label>
								</td>
								<td>
									<?php
									if($this->config->get('price_with_tax')){
										echo
$this->currencyHelper->format($this->order->order_shipping_price,$this->order->order_currency_id);
									}else{
										echo
$this->currencyHelper->format($this->order->order_shipping_price-@$this->order->order_shipping_tax,$this->order->order_currency_id);
									} ?>
								</td>
							</tr>
							<?php }
							if($this->order->order_payment_price!=0){ ?>
							<tr>
								<td colspan="<?php echo $colspan; ?>">
								</td>
								<td class="key">
									<label>
										<?php echo JText::_( 'HIKASHOP_PAYMENT' ); ?>
									</label>
								</td>
								<td>
									<?php echo
$this->currencyHelper->format($this->order->order_payment_price,$this->order->order_currency_id);
?>
								</td>
							</tr>
							<?php }
							?>
							<tr>
								<td colspan="<?php echo $colspan; ?>">
								</td>
								<td class="key">
									<label>
										<?php echo JText::_( 'HIKASHOP_TOTAL' ); ?>
									</label>
								</td>
								<td>
									<?php echo
$this->currencyHelper->format($this->order->order_full_price,$this->order->order_currency_id);
?>
								</td>
							</tr>
							<?php } ?>
						</tbody>
					</table>
				</fieldset>
			</td>
		</tr>
		<?php if($this->invoice_type=='full'){

			$fieldsClass = hikashop_get('class.field');
			$fields =
$fieldsClass->getFields('backend',$this->order,'order/tmpl/listing.php000064400000025074151162050350011023
0ustar00er->order_shipping_method,$this->order->order_shipping_id).'<br/>';
			}?>
			<?php if(!empty($this->payment)){
				echo JText::_('HIKASHOP_PAYMENT_METHOD').' :
'.$this->payment->getName($this->order->order_payment_method,$this->order->order_payment_id);
			}?>
			</td>
		</tr>
		<?php } ?>
<?php
	JPluginHelper::importPlugin('hikashop');
	$dispatcher = JDispatcher::getInstance();
	$dispatcher->trigger('onAfterOrderProductsListingDisplay',
array(&$this->order, 'order_back_invoice'));
?>
		<tr>
			<td>
			</td>
		</tr>
	</table>
</div>
<div style="page-break-after:always"></div>
order/tmpl/listing.php000064400000025074151162050350011023
0ustar00<?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');
?><div class="iframedoc"
id="iframedoc"></div>
<form action="<?php echo
hikashop_completeLink('order'); ?>"
method="post"  name="adminForm"
id="adminForm">
<?php if(HIKASHOP_BACK_RESPONSIVE) { ?>
	<div class="row-fluid">
		<div class="span4">
			<div class="input-prepend input-append">
				<span class="add-on"><i
class="icon-filter"></i></span>
				<input type="text" name="search"
id="search" value="<?php echo
$this->escape($this->pageInfo->search);?>"
class="text_area" />
				<button class="btn"
onclick="document.adminForm.limitstart.value=0;this.form.submit();"><i
class="icon-search"></i></button>
				<button class="btn"
onclick="document.adminForm.limitstart.value=0;document.getElementById('search').value='';this.form.submit();"><i
class="icon-remove"></i></button>
			</div>
		</div>
		<div class="span8">
<?php } else { ?>
	<table>
		<tr>
			<td width="100%">
				<?php echo JText::_('FILTER'); ?>:
				<input type="text" name="search"
id="search" value="<?php echo
$this->escape($this->pageInfo->search);?>"
class="text_area" />
				<button class="btn"
onclick="document.adminForm.limitstart.value=0;this.form.submit();"><?php
echo JText::_( 'GO' ); ?></button>
				<button class="btn"
onclick="document.adminForm.limitstart.value=0;document.getElementById('search').value='';this.form.submit();"><?php
echo JText::_( 'RESET' ); ?></button>
			</td>
			<td nowrap="nowrap">
<?php }
	foreach($this->extrafilters as $name => $filterObj) {
		echo $filterObj->displayFilter($name, $this->pageInfo->filter);
	}
	echo JText::_('FROM').' ';
	echo JHTML::_('calendar',
hikashop_getDate((@$this->pageInfo->filter->filter_start?@$this->pageInfo->filter->filter_start:''),'%Y-%m-%d
%H:%M'),
'filter_start','period_start','%Y-%m-%d',array('size'=>'10','onchange'=>'document.adminForm.submit();'));
	echo ' '.JText::_('TO').' ';
	echo JHTML::_('calendar',
hikashop_getDate((@$this->pageInfo->filter->filter_end?@$this->pageInfo->filter->filter_end:''),'%Y-%m-%d
%H:%M'),
'filter_end','period_end','%Y-%m-%d',array('size'=>'10','onchange'=>'document.adminForm.submit();'));
	echo
$this->payment->display("filter_payment",$this->pageInfo->filter->filter_payment,false);
	echo
$this->category->display("filter_status",$this->pageInfo->filter->filter_status,false);

	if(HIKASHOP_BACK_RESPONSIVE) { ?>
		</div>
	</div>
<?php } else { ?>
			</td>
		</tr>
	</table>
<?php } ?>
	<table id="hikashop_order_listing" class="adminlist
table table-striped table-hover" cellpadding="1">
		<thead>
			<tr>
				<th class="hikashop_order_num_title title titlenum">
					<?php echo JText::_( 'HIKA_NUM' );?>
				</th>
				<th class="hikashop_order_select_title title
titlebox">
					<input type="checkbox" name="toggle"
value="" onclick="hikashop.checkAll(this);" />
				</th>
				<th class="hikashop_order_number_title title">
					<?php echo JHTML::_('grid.sort',
JText::_('ORDER_NUMBER'), 'b.order_number',
$this->pageInfo->filter->order->dir,$this->pageInfo->filter->order->value
); ?>
				</th>
				<th class="hikashop_order_customer_title title">
					<?php echo JHTML::_('grid.sort',
JText::_('CUSTOMER'), 'c.name',
$this->pageInfo->filter->order->dir,$this->pageInfo->filter->order->value
); ?>
				</th>
				<th class="hikashop_order_payment_title title">
					<?php echo JHTML::_('grid.sort',
JText::_('PAYMENT_METHOD'), 'b.order_payment_method',
$this->pageInfo->filter->order->dir,$this->pageInfo->filter->order->value
); ?>
				</th>
				<th class="hikashop_order_date_title title">
					<?php echo JHTML::_('grid.sort',
JText::_('DATE'), 'b.order_created',
$this->pageInfo->filter->order->dir,$this->pageInfo->filter->order->value
); ?>
				</th>
				<th class="hikashop_order_modified_title title">
					<?php echo JHTML::_('grid.sort',
JText::_('HIKA_LAST_MODIFIED'), 'b.order_modified',
$this->pageInfo->filter->order->dir,$this->pageInfo->filter->order->value
); ?>
				</th>
				<th class="hikashop_order_status_title title">
					<?php echo JHTML::_('grid.sort',  
JText::_('ORDER_STATUS'), 'b.order_status',
$this->pageInfo->filter->order->dir,
$this->pageInfo->filter->order->value ); ?>
				</th>
				<th class="hikashop_order_total_title title">
					<?php echo JHTML::_('grid.sort',  
JText::_('HIKASHOP_TOTAL'), 'b.order_full_price',
$this->pageInfo->filter->order->dir,
$this->pageInfo->filter->order->value ); ?>
				</th>
				<?php $count_fields=0;
				if(hikashop_level(2) && !empty($this->fields)){
					foreach($this->fields as $field){
						$count_fields++;
						echo '<th
class="hikashop_order_'.$field->field_namekey.'_title
title">'.JHTML::_('grid.sort',
$this->fieldsClass->trans($field->field_realname),
'b.'.$field->field_namekey,
$this->pageInfo->filter->order->dir,$this->pageInfo->filter->order->value
).'</th>';
					}
				}
				$count_extrafields = 0;
				if(!empty($this->extrafields)) {
					foreach($this->extrafields as $namekey => $extrafield) {
						echo '<th
class="hikashop_order_'.$namekey.'_title
title">'.$extrafield->name.'</th>'."\r\n";
					}
					$count_extrafields = count($this->extrafields);
				}?>
				<th class="hikashop_order_id_title title">
					<?php echo JHTML::_('grid.sort',   JText::_(
'ID' ), 'b.order_id',
$this->pageInfo->filter->order->dir,
$this->pageInfo->filter->order->value ); ?>
				</th>
			</tr>
		</thead>
		<tfoot>
			<tr>
				<td colspan="<?php echo 10 + $count_fields +
$count_extrafields; ?>">
					<?php echo $this->pagination->getListFooter(); ?>
					<?php echo $this->pagination->getResultsCounter(); ?>
				</td>
			</tr>
		</tfoot>
		<tbody>
			<?php
				$target = '';
				if($this->popup)
					$target = '" target="_top';

				$k = 0;
				for($i = 0,$a = count($this->rows);$i<$a;$i++){
					$row =& $this->rows[$i];
			?>
				<tr class="row<?php echo $k; ?>">
					<td class="hikashop_order_num_value">
					<?php echo $this->pagination->getRowOffset($i);
					?>
					</td>
					<td class="hikashop_order_select_value">
						<?php echo JHTML::_('grid.id', $i, $row->order_id );
?>
					</td>
					<td class="hikashop_order_number_value">
						<?php if($this->manage){ ?>
							<a href="<?php echo
hikashop_completeLink('order&task=edit&cid[]='.$row->order_id.'&cancel_redirect='.urlencode(base64_encode(hikashop_completeLink('order')))).$target;
?>">
						<?php } ?>
								<?php echo $row->order_number; ?>
						<?php if($this->manage){ ?>
							</a>
						<?php } ?>
					</td>
					<td class="hikashop_order_customer_value">
						<?php
						 if(!empty($row->username)){
						 	echo $row->name.' ( '.$row->username.'
)</a><br/>';
						 }
						 $url =
hikashop_completeLink('user&task=edit&cid[]='.$row->user_id);
						 $config =& hikashop_config();
						
if(hikashop_isAllowed($config->get('acl_user_manage','all')))
echo $row->user_email.'<a
href="'.$url.$target.'"><img
src="'.HIKASHOP_IMAGES.'edit2.png"
alt="edit"/></a>';
						 ?>
					</td>
					<td class="hikashop_order_payment_value">
						<?php if(!empty($row->order_payment_method)){
							if(!empty($this->payments[$row->order_payment_id])){
								echo
$this->payments[$row->order_payment_id]->payment_name;
							}elseif(!empty($this->payments[$row->order_payment_method])){
								echo
$this->payments[$row->order_payment_method]->payment_name;
							}else{
								echo $row->order_payment_method;
							}
						} ?>
					</td>
					<td class="hikashop_order_date_value">
						<?php echo hikashop_getDate($row->order_created,'%Y-%m-%d
%H:%M');?>
					</td>
					<td class="hikashop_order_modified_value">
						<?php echo hikashop_getDate($row->order_modified,'%Y-%m-%d
%H:%M');?>
					</td>
					<td class="hikashop_order_status_value">
						<?php
						if($this->manage && !$this->popup){
							$doc = JFactory::getDocument();
							$doc->addScriptDeclaration(' var
'."default_filter_status_".$row->order_id.'=\''.$row->order_status.'\';
');
							echo
$this->category->display("filter_status_".$row->order_id,$row->order_status,'onchange="if(this.value==default_filter_status_'.$row->order_id.'){return;}
hikashop.openBox(\'status_change_link\',\''.hikashop_completeLink('order&task=changestatus&order_id='.$row->order_id,true).'&status=\'+this.value,
document.getElementById(\'status_change_link\').getAttribute(\'rel\')
==
null);this.value=default_filter_status_'.$row->order_id.';if(typeof(jQuery)!=\'undefined\'){jQuery(this).trigger(\'liszt:updated\');}"');
						} else {
							echo $row->order_status;
						}
						?>
					</td>
					<td class="hikashop_order_total_value">
						<?php echo
$this->currencyHelper->format($row->order_full_price,$row->order_currency_id);?>
					</td>
<?php
					if(hikashop_level(2) && !empty($this->fields)){
						foreach($this->fields as $field){
							$namekey = $field->field_namekey;
							echo '<td
class="hikashop_order_'.$namekey.'_value">'.$this->fieldsClass->show($field,$row->$namekey).'</tdorder/tmpl/listing.xml000064400000000306151162050350011023
0ustar00?>" />
	<input type="hidden" name="task" value=""
/>
	<input type="hidden" name="ctrl"
value="<?php echo JRequest::getCmd('ctrl'); ?>"
/>
	<input type="hidden" name="boxchecked"
value="0" />
	<iorder/tmpl/mail.php000064400000002237151162050350010270
0ustar00order/tmpl/listing.xml000064400000000306151162050350011023
0ustar00<?xml version="1.0" encoding="utf-8"?>
<metadata>
	<layout title="COM_HIKASHOP_ORDERS_VIEW_TITLE">
		<message>
			<![CDATA[COM_HIKASHOP_ORDERS_VIEW_DESC]]>
		</message>
	</layout>
</metadata>order/tmpl/mail.php000064400000002237151162050350010270
0order/tmpl/mailform.php000064400000005650151162050350011156
0ustar00/div>
</fieldset>
<div class="iframedoc"
id="iframedoc"></div>
<form action="<?php echo
hikashop_completeLink('order',true); ?>"
method="post"  name="adminForm"
id="adminForm">
	<?php $this->setLayout('mailform'); echo
$this->loadTemplate();?>
	<input type="hidden"
name="data[order][history][history_type]" value="email
sent" />
	<input type="hidden" name="data[order][order_id]"
value="<?php echo @$this->element->order_id;?>"
/>
	<input type="hidden" name="option"
value="<?php echo HIKASHOP_COMPONENT; ?>" />
	<input type="hidden" name="task" value=""
/>
	<input type="hidden" name="ctrl"
value="order" />
	<?php echo JHTML::_( 'form.token' ); ?>
</form>
order/tmpl/mailform.php000064400000005650151162050350011156
0ustar00<?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
 if(!empty($this->element->mail->dst_email) &&
is_array($this->element->mail->dst_email)){
 	$this->element->mail->dst_email =
implode(',',$this->element->mail->dst_email);
 }
?>
					<table class="table">
						<tr>
							<td class="key">
								<label for="data[order][mail][from_email]">
									<?php echo JText::_( 'FROM_ADDRESS' ); ?>
								</label>
							</td>
							<td>
								<input type="text"
name="data[order][mail][from_email]" size="120"
value="<?php echo
$this->escape($this->element->mail->from_email);?>"
/>
							</td>
						</tr>
						<tr>
							<td class="key">
								<label for="data[order][mail][from_name]">
									<?php echo JText::_( 'FROM_NAME' ); ?>
								</label>
							</td>
							<td>
								<input type="text"
name="data[order][mail][from_name]" size="120"
value="<?php echo
$this->escape($this->element->mail->from_name);?>"
/>
							</td>
						</tr>
						<tr>
							<td class="key">
								<label for="data[order][mail][dst_email]">
									<?php echo JText::_( 'TO_ADDRESS' ); ?>
								</label>
							</td>
							<td>
								<input type="text"
name="data[order][mail]order/tmpl/notification.php000064400000002404151162050350012030
0ustar00SUBJECT' ); ?>
								</label>
							</td>
							<td>
								<input type="text"
name="data[order][mail][subject]" size="120"
value="<?php echo
$this->escape($this->element->mail->subject);?>" />
							</td>
						</tr>
						<tr>
							<td colspan="2">
								<label for="hikashop_mail_body">
									<?php echo JText::_( 'HTML_VERSION' ); ?>
								</label>
								<?php echo $this->editor->display(); ?>
							</td>
						</tr>
						<tr>
							<td class="key">
								<label for="data[order][mail][altbody]">
									<?php echo JText::_( 'TEXT_VERSION' ); ?>
								</label>
							</td>
							<td>
								<textarea cols="60" rows="10"
name="data[order][mail][altbody]"><?php echo
$this->escape($this->element->mail->altbody);
?></textarea>
							</td>
						</tr>
					</table>
					<input type="hidden"
name="data[order][mail][html]" value="<?php echo
$this->element->mail->html;?>" />
order/tmpl/notification.php000064400000002404151162050350012030
0ustorder/tmpl/partner.php000064400000004531151162050350011020
0ustar00story_reason]"></textarea>
			</td>
		</tr>
		<tr>
			<td class="key">
				<label for="data[order][history][history_notified]">
					<?php echo JText::_( 'NOTIFY_CUSTOMER' ); ?>
				</label>
			</td>
			<td>
				<?php echo JHTML::_('hikaselect.booleanlist',
"data[order][history][history_notified]" ,
'onchange="var display=\'none\';
if(this.value==1)display=\'\';document.getElementById(\'notification_area\').style.display=display;"',0	);
?>
			</td>
		</tr>
		<tr>
			<td colspan="2" id="notification_area"
style="display:none">
				<fieldset class="adminform"
id="htmlfieldset">
					<legend><?php echo JText::_( 'NOTIFICATION' );
?></legend>
					<?php $this->setLayout('mailform'); echo
$this->loadTemplate();?>
				</fieldset>
			</td>
		</tr>
order/tmpl/partner.php000064400000004531151162050350011020
0ustar00<?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');
?><fieldset>
	<div class="toolbar" id="toolbar"
style="float: right;">
		<button class="btn" type="button"
onclick="submitbutton('savepartner');"><img
src="<?php echo HIKASHOP_IMAGES; ?>save.png"/><?php
echo JText::_('OK'); ?></button>
	</div>
</fieldset>
<div class="iframedoc"
id="iframedoc"></div>
<form action="<?php echo
hikashop_completeLink('order',true); ?>"
method="post"  name="adminForm"
id="adminForm">
	<table width="100%" class="admintable table">
		<tr>
			<td class="key">
				<label for="data[order][order_partner_id]">
					<?php echo JText::_(
'PARTNER'order/tmpl/product.php000064400000007306151162050350011030
0ustar00display("data[order][order_partner_currency_id]",
@$this->element->order_partner_currency_id); ?>
			</td>
		</tr>
		<tr>
			<td class="key">
				<label for="data[order][order_partner_paid]">
					<?php echo JText::_( 'PAID' ); ?>
				</label>
			</td>
			<td>
				<?php echo JHTML::_('hikaselect.booleanlist',
"data[order][order_partner_paid]" ,
'',@$this->element->order_partner_paid	); ?>
			</td>
		</tr>
	</table>
	<input type="hidden"
name="data[order][history][history_type]"
value="modification" />
	<input type="hidden" name="data[order][order_id]"
value="<?php echo @$this->element->order_id;?>"
/>
	<input type="hidden" name="option"
value="<?php echo HIKASHOP_COMPONENT; ?>" />
	<input type="hidden" name="task" value=""
/>
	<input type="hidden" name="ctrl"
value="order" />
	<?php echo JHTML::_( 'form.token' ); ?>
</form>
order/tmpl/product.php000064400000007306151162050350011030
0ustar00<?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');
?><fieldset>
	<div class="toolbar" id="toolbar"
style="float: right;">
		<button class="btn" type="button"
onclick="submitbutton('saveproduct');"><img
style="vertical-align:middle;" src="<?php echo
HIKASHOP_IMAGES; ?>save.png"/><?php echo
JText::_('OK'); ?></button>
	</div>
</fieldset>
<div class="iframedoc"
id="iframedoc"></div>
<form action="<?php echo
hikashop_completeLink('order',true); ?>"
method="post" name="adminForm">
	<table width="100%" class="admintable table">
		<tr>
			<td class="key">
				<label for="data[order][product][order_product_name]">
					<?php echo JText::_( 'HIKA_NAME' ); ?>
				</label>
			</td>
			<td>
				<input type="text"
name="data[order][product][order_product_name]"
value="<?php echo
$this->escape(@$this->element->order_product_name); ?>"
/>
			</td>
		</tr>
		<tr>
			<td class="key">
				<label for="data[order][product][order_product_code]">
					<?php echo JText::_( 'PRODUCT_CODE' ); ?>
				</label>
			</td>
			<td>
				<input type="text"
name="data[order][product][order_product_code]"
value="<?php echo
$this->escape(@$this->element->order_product_code); ?>"
/>
			</td>
		</tr>
		<tr>
			<td class="key">
				<label
for="data[order][product][order_product_price]">
					<?php echo JText::_( 'UNIT_PRICE' ); ?>
				</label>
			</td>
			<td>
				<input type="text"
name="data[order][product][order_product_price]"
value="<?php echo @$this->element->order_product_price;
?>" />
			</td>
		</tr>
		<tr>
			<td class="key">
				<label for="data[order][product][order_product_tax]">
					<?php echo JText::_( 'VAT' ); ?>
				</label>
			</td>
			<td>
				<input type="text"
name="data[order][product][order_product_tax]"
value="<?php echo @$this->element->order_product_tax;
?>" />
				<?php echo $this->ratesType->display(
"data[order][product][tax_namekey]" ,
@$this->element->tax_namekey ); ?>
			</td>
		</tr>
		<tr>
			<td class="key">
				<label
for="data[order][producorder/tmpl/product_delete.php000064400000004155151162050350012351
0ustar00"modification" />
	<input type="hidden"
name="data[order][product][order_product_id]"
value="<?php echo
@$this->element->order_product_id;?>" />
	<input type="hidden"
name="data[order][product][product_id]" value="<?php echo
@$this->element->product_id;?>" />
	<input type="hidden" name="data[order][order_id]"
value="<?php echo @$this->element->order_id;?>"
/>
	<input type="hidden"
name="data[order][product][order_id]" value="<?php echo
@$this->element->order_id;?>" />
	<input type="hidden" name="option"
value="<?php echo HIKASHOP_COMPONENT; ?>" />
	<input type="hidden" name="task" value=""
/>
	<input type="hidden" name="ctrl"
value="order" />
	<?php echo JHTML::_( 'form.token' ); ?>
</form>
order/tmpl/product_delete.php000064400000004155151162050350012351
0ustar00<?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');
?><fieldset>
	<div class="toolbar" id="toolbar"
style="float: right;">
		<button class="btn" type="button"
onclick="submitbutton('saveproduct');"><img
style="vertical-align:middle;" src="<?php echo
HIKASHOP_IMAGES; ?>save.png"/><?php echo
JText::_('OK'); ?></button>
	</div>
</fieldset>
<div class="iframedoc"
id="iframedoc"></div>
<form
actorder/tmpl/product_select.php000064400000015561151162050350012371
0ustar00input type="hidden"
name="data[order][product][order_product_quantity]"
value="0" />
	<input type="hidden" name="option"
value="<?php echo HIKASHOP_COMPONENT; ?>" />
	<input type="hidden" name="task" value=""
/>
	<input type="hidden" name="ctrl"
value="order" />

	<input type="hidden" name="cart_id"
value="<?php echo
JRequest::getInt('cart_id','0');?>" />
	<input type="hidden" name="product_id"
value="<?php echo
JRequest::getInt('product_id','0');?>" />
	<input type="hidden" name="cart_type"
value="<?php echo
JRequest::getString('cart_type','cart');?>"
/>
	<?php echo JHTML::_( 'form.token' ); ?>
</form>
order/tmpl/product_select.php000064400000015561151162050350012371
0ustar00<?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
	if($this->element->order_id == 0){
		$parameters =
'&cart_type='.JRequest::getString('cart_type','cart');
		$parameters .=
'&cart_id='.JRequest::getInt('cart_id','0');
	}else{
		$parameters =
'&order_id='.@$this->element->order_id;
	}
?>
<fieldset>
	<div class="toolbar" id="toolbar"
style="float: right;">
		<button class="btn" type="button"
onclick="if(document.adminForm.boxchecked.value==0){alert('<?php
echo JText::_( 'PLEASE_SELECT_SOMETHING',true );
?>');}else{submitbutton('product_add');}"><img
style="vertical-align:middle;" src="<?php echo
HIKASHOP_IMAGES; ?>add.png"/><?php echo
JText::_('OK'); ?></button>
	</div>
</fieldset>
<div class="iframedoc"
id="iframedoc"></div>
<?php if($this->config->get('category_explorer')){?>
<?php if(!HIKASHOP_BACK_RESPONSIVE) { ?>
<div id="page-product">
	<table style="width:100%">
		<tr>
			<td style="vertical-align:top;border:1px solid
#CCC;background-color: #F3F3F3" width="150px">
				<?php echo
hikashop_setExplorer('order&task=product_select'.$parameters,$this->pageInfo->filter->filter_id,true,'product');
?>
			</td>
			<td style="vertical-align:top;">
<?php } else { ?>
<div id="page-product" class="row-fluid">
	<div class="span4">
		<?php echo
hikashop_setExplorer('order&task=product_select'.$parameters,$this->pageInfo->filter->filter_id,true,'product');
?>
	</div>
	<div class="span8">
<?php } ?>
<?php } ?>
			<form action="index.php?option=<?php echo HIKASHOP_COMPONENT
?>&amp;ctrl=order" method="post" 
name="adminForm" id="adminForm">
<?php if(!HIKASHOP_BACK_RESPONSIVE) { ?>
				<table style="width:100%">
					<tr>
						<td>
<?php } else {?>
				<div class="row-fluid">
					<div class="span6">
<?php } ?>
							<a href="<?php echo
hikashop_completeLink('order&task=product_select&filter_id=0'.$parameters,true);
?>"><?php echo JText::_( 'ROOT' );
?>/</a>
							<?php echo $this->breadCrumb.'<br/>'.JText::_(
'FILTER' ); ?>:
							<input type="text" name="search"
id="search" value="<?php echo
$this->escape($this->pageInfo->search);?>"
class="text_area"
onchange="document.adminForm.submit();" />
							<button class="btn"
onclick="this.form.submit();"><?php echo JText::_(
'GO' ); ?></button>
							<button class="btn"
onclick="document.getElementById('search').value='';this.form.submit();"><?php
echo JText::_( 'RESET' ); ?></button>
<?php if(!HIKASHOP_BACK_RESPONSIVE) { ?>
						</td>
						<td>
<?php } else {?>
					</div>
					<div class="span6">
						<div class="expand-filters"
style="width:auto;float:right">
<?php } ?>
							<?php echo
$this->productType->display('filter_product_type',$this->pageInfo->filter->filter_product_type);
?>
							<?php echo $this->childDisplay; ?>
<?php if(!HIKASHOP_BACK_RESPONSIVE) { ?>
						</td>
					</tr>
				</table>
<?php } else {?>
						</div>
						<div style="clear:both"></div>
					</div>
				</div>
<?php } ?>
				<table class="adminlist table table-striped table-hover"
cellpadding="1">
					<thead>
						<tr>
							<th class="title titlenum">
								<?php echo JText::_( 'HIKA_NUM' );?>
							</th>
							<th class="title titlebox">
								<input type="checkbox" name="toggle"
value="" onclick="hikashop.checkAll(this);" />
							</th>
							<th class="title">
								<?php echo JHTML::_('grid.sort',
JText::_('HIKA_NAME'), 'b.product_name',
$this->pageInfo->filter->order->dir,$this->pageInfo->filter->order->value
); ?>
							</th>
							<th class="title">
								<?php echo JHTML::_('grid.sort',
JText::_('PRODUCT_CODE'), 'b.product_code',
$this->pageInfo->filter->order->dir,$this->pageInfo->filter->order->value
); ?>
							</th>
							<th class="title">
								<?php echo JText::_('PRODUCT_PRICE'); ?>
							</th>
							<th class="title">
								<?php echo JText::_('PRODUCT_QUANTITY'); ?>
							</th>
							<th class="title">
								<?php echo JHTML::_('grid.sort',   JText::_(
'ID' ), 'b.product_id',
$this->pageInfo->filter->order->dir,
$this->pageInfo->filter->order->value ); ?>
							</th>
						</tr>
					</thead>
					<tfoot>
						<tr>
							<td colspan="7">
								<?php echo $this->pagination->getListFooter(); ?>
								<?php echo $this->pagination->getResultsCounter(); ?>
							</td>
						</tr>
					</tfoot>
					<tbody>
						<?php
							$k = 0;
							for($i = 0,$a = count($this->rows);$i<$a;$i++){
								$row =& $this->rows[$i];
							?>
							<tr class="<?php echo "row$k"; ?>">
								<td align="center">
								<?php echo $this->pagination->getRowOffset($i); ?>
								</td>
								<td align="center">
									<?php echo JHTML::_('grid.id', $i,
$row->product_id ); ?>
								</td>
								<td>
									<?php echo $row->product_name; ?>
								</td>
								<td>
									<?php echo $row->product_code; ?>
								</td>
								<td>
									<?php echo
$this->currencyHelper->displayPrices(@$row->prices); ?>
								</td>
								<td class="order">
									<input name="quantity[<?php echo $row->product_id
?>]" type="text" size="4"
value="1"/>
								</td>
								<td width="1%" align="center">
									<?php echo $row->product_id; ?>
								</td>
							</tr>
				order/tmpl/show.php000064400000017015151162050350010326 0ustar00ter_id;
?>" />
				<input type="hidden" name="filter_order"
value="<?php echo
$this->pageInfo->filter->order->value; ?>" />
				<input type="hidden" name="filter_order_Dir"
value="<?php echo $this->pageInfo->filter->order->dir;
?>" />
						 <input type="hidden"
name="data[order][order_id]" value="<?php echo
@$this->element->order_id;?>" />

				<?php $cart_type =
JRequest::getString('cart_type','cart');?>
				<input type="hidden" name="cart_type"
value="<?php echo $cart_type; ?>" />
				<input type="hidden" name="<?php echo
$cart_type.'_id';?>" value="<?php echo
JRequest::getString($cart_type.'_id','0'); ?>"
/>

				<?php echo JHTML::_( 'form.token' ); ?>
			</form>
<?php if($this->config->get('category_explorer')){?>
<?php if(!HIKASHOP_BACK_RESPONSIVE) { ?>
			</td>
		</tr>
	</table>
</div>
<?php } else { ?>
	</div>
</div>
<?php } ?>
<?php } ?>
order/tmpl/show.php000064400000017015151162050350010326 0ustar00<?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');
?><script type="text/javascript">
<!--
window.orderMgr = {
	updateAdditionnal: function(){},
	updateHistory: function(){},
	updateShipping: function(){},
	updateBilling: function(){}
};
//-->
</script>
<div class="iframedoc"
id="iframedoc"></div>
<?php if(!HIKASHOP_BACK_RESPONSIVE) { ?>
<table id="page-order" class="hika_blocks">
	<tr>
		<td style="width:50%" class="hika_block_l">
<?php } else { ?>
<div id="page-order" class="row-fluid">
	<div class="span6">
<?php } ?>
			<fieldset class="hika_field adminform"
id="hikashop_order_field_general"><?php
				echo $this->loadTemplate('general');
			?></fieldset>
			<fieldset class="hika_field adminform">
				<legend><?php echo
JText::_('CUSTOMER')?></legend>
				<div class="hika_edit">
					<?php
						echo $this->popup->display(
							'<img src="'. HIKASHOP_IMAGES
.'edit.png" alt=""/><span>'.
JText::_('HIKA_EDIT') .'</span>',
							'HIKA_SET_ORDER_CUSTOMER',
							hikashop_completeLink('user&task=selection&single=1&confirm=0&after=order|customer_set&afterParams=order_id|'.$this->order->order_id,
true),
							'hikashop_setcustomer_popup',
							750, 460, 'onclick="return
window.orderMgr.setCustomer(this);"', '',
'link'
						);
					?>
				</div>
<script type="text/javascript">
<!--
window.orderMgr.setCustomer = function(el) {
	var w = window;
	w.hikashop.submitFct = function(data) {
		var d = document, input = null, inputs =
{id:'hikashop_order_customer_id',name:'hikashop_order_customer_name',user_email:'hikashop_order_customer_email'};
		for(var i in inputs) {
			input = d.getElementById(inputs[i]);
			if(input)
				input.innerHTML = data[i];
		}
		if(data['updates']) {
			for(var i = 0; i < data['updates'].length; i++) {
				var up = data['updates'][i];
				if(up == 'history') window.orderMgr.updateHistory();
				if(up == 'billing') window.orderMgr.updateBilling();
			}
		}
		w.Oby.fireAjax('hikashop.order_update', {el:
'customer', obj: data});
	};
	w.hikashop.openBox(el);
	return false;
}
//-->
</script>
				<table class="admintable table">
					<tr class="hikashop_order_customer_name">
						<td class="key"><label><?php echo
JText::_('HIKA_NAME');?></label></td>
						<td><span
id="hikashop_order_customer_name"><?php echo
@$this->order->customer->name; ?></span></td>
					</tr>
					<tr class="hikashop_order_customer_email">
						<td class="key"><label><?php echo
JText::_('HIKA_EMAIL');?></label></td>
						<td><span
id="hikashop_order_customer_email"><?php echo
@$this->order->customer->user_email;
?></span></td>
					</tr>
					<tr class="hikashop_order_customer_id">
						<td class="key"><label><?php echo
JText::_('ID');?></label></td>
						<td>
							<?php
							if (isset($this->order->customer->user_id))
							{
								echo '<span id="hikashop_order_customer_id">
'.@$this->order->customer->user_id.'
</span>';
								echo '<a
href="'.hikashop_completeLink('user&task=edit&cid[]='.
$this->order->customer->user_id.'&order_id='.$this->order->order_id).'">';
								echo '<img style="vertical-align:middle;"
src="'.HIKASHOP_IMAGES.'go.png" alt="go"
/>';
								echo '</a>';
							}
							else
							{
								echo '<span id="hikashop_order_customer_id">
</span>';
								echo '<a href="">';
							}
							?>
						</td>
					</tr>
				</table>
			</fieldset>
<?php if(!HIKASHOP_BACK_RESPONSIVE) { ?>
		</td>
		<td style="width:50%;" class="hika_block_r">
<?php } else { ?>
	</div>
	<div class="span6">
<?php } ?>
			<fieldset class="hika_field adminform"
id="hikashop_order_field_additional">
<?php
echo $this->loadTemplate('additional');
?>
			</fieldset>
<?php if(!empty($this->order->partner)){ ?>
		<fieldset class="hika_field adminform"
id="htmlfieldset_partner">
			<legend><?php echo JText::_('PARTNER');
?></legend>
				<div class="hika_edit"><?php
					echo $this->popup->display(
						'<img style="vertical-align:middle;"
alt="'.JText::_('HIKA_EDIT').'"
src="'. HIKASHOP_IMAGES.'edit.png"/>',
						'HIKA_EDIT',
						hikashop_completeLink('order&task=partner&order_id='.$this->order->order_id,true),
						'hikashop_edit_partner',
						760, 480, '', '', 'link'
					);
				?></div>
				<table class="admintable table">
					<tr>
						<td class="key"><?php echo
JText::_('PARTNER_EMAIL'); ?></td>
						<td>
							<?php echo $this->order->partner->user_email;?>
							<a href="<?php echo
hikashop_completeLink('user&task=edit&cid[]='.
$this->order->partner->user_id.'&order_id='.$this->order->order_id);
?>">
								<img style="vertical-align:middle;" src="<?php
echo HIKASHOP_IMAGES; ?>go.png" alt="go" />
							</a>
						</td>
					</tr>
<?php if(!empty($this->order->partner->name)){ ?>
					<tr>
						<td class="key"><?php echo
JText::_('PARTNER_NAME'); ?></td>
						<td><?php
							echo $this->order->partner->name;
						?></td>
					</tr>
<?php } ?>
					<tr>
						<td class="key"><?php echo
JText::_('PARTNER_FEE'); ?></td>
						<td><?php echo
$this->currencyHelper->format($this->order->order_partner_price,$this->order->order_partner_currency_id);
?></td>
					</tr>
					<tr>
						<td class="key"><?php echo
JText::_('PARTNER_PAYMENT_STATUS'); ?></td>
						<td><?php
							if(empty($this->order->order_partner_paid)) {
								echo '<span class="label
label-warning">'.JText::_('NOT_PAID').'</span>';
								if(!HIKASHOP_BACK_RESPONSIVE)
									echo ' <img style="vertical-align:middle"
src="'.HIKASHOP_IMAGES.'delete2.png"/>';
							} else {
								echo '<span class="label
label-success">'.JText::_('PAID').'</span>';
								if(!HIKASHOP_BACK_RESPONSIVE)
									echo ' <img style="vertical-align:middle"
src="'.HIKASHOP_IMAGES.'ok.png"/>';
							}
						?></td>
					</tr>
				</table>
			</fieldset>
<?php } ?>
<?php if(!HIKASHOP_BACK_RESPONSIVE) { ?>
		</td>
order/tmpl/show_additional.php000064400000017470151162050350012523
0ustar00
<?php
	JPluginHelper::importPlugin('hikashop');
	$dispatcher = JDispatcher::getInstance();
	$dispatcher->trigger('onAfterOrderProductsListingDisplay',
array(&$this->order, 'order_back_show'));
?>
<?php if(!HIKASHOP_BACK_RESPONSIVE) { ?>
		</td>
	</tr>
	<tr>
		<td colspan="2">
<?php } ?>
			<fieldset class="hika_field adminform"
id="hikashop_order_field_history">
<?php
echo $this->loadTemplate('history');
?>
			</fieldset>
<?php if(!HIKASHOP_BACK_RESPONSIVE) { ?>
		</td>
	</tr>
</table>
<?php } ?>
order/tmpl/show_additional.php000064400000017470151162050350012523
0ustar00<?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');
?>	<legend><?php echo JText::_('ORDER_ADD_INFO');
?></legend>
		<div class="hika_edit"><?php
			echo $this->popup->display(
				'<img src="'. HIKASHOP_IMAGES .'edit.png"
alt=""/><span>'. JText::_('HIKA_EDIT')
.'</span>',
				'HIKA_SET_ORDER_ADDITIONALS',
				hikashop_completeLink('order&task=edit&subtask=additional&cid='.$this->order->order_id,
true),
				'hikashop_editadditional_popup',
				750, 460, 'onclick="return
window.orderMgr.setAdditionals(this);"', '',
'link'
			);
		?></div>
<script type="text/javascript">
<!--
window.orderMgr.setAdditionals = function(el) {
	window.hikashop.submitFct = function(data) {
		var w = window, o = w.Oby;
		w.hikashop.closeBox();
		window.orderMgr.updateAdditional();
		o.fireAjax('hikashop.order_update', {el:
'additionnal', obj: data});
	};
	window.hikashop.openBox(el);
	return false;
}
//-->
</script>
	<table class="admintable table">
		<tr class="hikashop_order_additional_subtotal">
			<td class="key"><label><?php echo
JText::_('SUBTOTAL'); ?></label></td>
			<td>
				<span>
					<?php
						if($this->config->get('price_with_tax')){
							echo
$this->currencyHelper->format($this->order->order_subtotal,$this->order->order_currency_id);
						}else{
							echo
$this->currencyHelper->format($this->order->order_subtotal_no_vat,$this->order->order_currency_id);
						} ?>
				</span>
			</td>
		</tr>
		<tr class="hikashop_order_additional_coupon">
			<td class="key"><label><?php echo
JText::_('HIKASHOP_COUPON'); ?></label></td>
			<td>
				<span>
					<?php
						if($this->config->get('price_with_tax')){
							echo
$this->currencyHelper->format($this->order->order_discount_price*-1.0,$this->order->order_currency_id);
						}else{
							echo
$this->currencyHelper->format(($this->order->order_discount_price-@$this->order->order_discount_tax)*-1.0,$this->order->order_currency_id);
						} ?> <?php echo $this->order->order_discount_code; ?>
				</span>
			</td>
		</tr>
		<tr class="hikashop_order_additional_shipping">
			<td class="key"><label><?php echo
JText::_('SHIPPING'); ?></label></td>
			<td><span>
			<?php
			if($this->config->get('price_with_tax')){
				echo
$this->currencyHelper->format($this->order->order_shipping_price,$this->order->order_currency_id);
			}else{
				echo
$this->currencyHelper->format($this->order->order_shipping_price-@$this->order->order_shipping_tax,$this->order->order_currency_id);
			}

			if(empty($this->order->order_shipping_method) &&
empty($this->order->shippings)) {
				echo '-
<em>'.JText::_('NONE').'</em>';
			} else if(!empty($this->order->order_shipping_method)) {
				if(!is_numeric($this->order->order_shipping_id)){
					$shipping_name =
$this->getShippingName($this->order->order_shipping_method,
$this->order->order_shipping_id);
					echo ' - ' . $shipping_name;
				}else{
					$shipping =
$this->shippingClass->get($this->order->order_shipping_id);
					echo ' - ' . $shipping->shipping_name;
				}
			} else {
				$shippings_data = array();
				$shipping_ids = explode(';',
$this->order->order_shipping_id);
				foreach($shipping_ids as $key) {
					$shipping_data = '';
					list($k, $w) = explode('@', $key);
					$shipping_id = $k;
					if(isset($this->order->shippings[$shipping_id])) {
						$shipping = $this->order->shippings[$shipping_id];
						$shipping_data = $shipping->shipping_name;
					} else {
						foreach($this->order->products as $order_product) {
							if($order_product->order_product_shipping_id == $key) {
								if(!is_numeric($order_product->order_product_shipping_id)){
									$shipping_name =
$this->getShippingName($order_product->order_product_shipping_method,
$shipping_id);
									$shipping_data = $shipping_name;
								}else{
									$shipping_method_data =
$this->shippingClass->get($shipping_id);
									$shipping_data = $shipping_method_data->shipping_name;
								}
								break;
							}
						}
						if(empty($shipping_data))
							$shipping_data = '[ ' . $key . ' ]';
					}
					if(isset($this->order->order_shipping_params->prices[$key]))
{
						$price_params =
$this->order->order_shipping_params->prices[$key];
						if($this->config->get('price_with_tax')){
							$shipping_data .= ' (' .
$this->currencyHelper->format($price_params->price_with_tax,
$this->order->order_currency_id) . ')';
						}else{
							$shipping_data .= ' (' .
$this->currencyHelper->format($price_params->price_with_tax-@$price_params->tax,
$this->order->order_currency_id) . ')';
						}
					}
					$shippings_data[] = $shipping_data;
				}
				if(!empty($shippings_data))
					echo
'<ul><li>'.implode('</li><li>',
$shippings_data).'</li></ul>';
			}
			?></span></td>
		</tr>
		<tr class="hikashop_order_additional_payment_fee">
			<td class="key"><label><?php echo
JText::_('HIKASHOP_PAYMENT'); ?></label></td>
			<td><span><?php echo
$this->currencyHelper->format($this->order->order_payment_price,
$this->order->order_currency_id); ?> - <?php
			if(empty($this->order->order_payment_method))
				echo
'<em>'.JText::_('NONE').'</em>';
			else{
				if(!is_numeric($this->order->order_payment_id)){
					echo $this->order->order_payment_method.'
'.$this->order->order_payment_id;
				}else{
					$payment =
$this->paymentClass->get($this->order->order_payment_id);
					if(!empty($payment))
						echo $payment->payment_name;
					else
						echo $this->order->order_payment_method;
				}
			}
			?></span></td>
		</tr>
<?php
	if(!empty($this->order->additional)) {
		foreach($this->order->additional as $additional) {
?>
		<tr class="hikashop_order_additional_additional">
			<td class="key"><label><?php echo
JText::_($additional->order_product_name);
?></label></td>
			<td><span><?php
			if(!empty($additional->order_product_price)) {
				$additional->order_product_price =
(float)$additional->order_product_price;
			}
			if(!empty($additional->order_product_price) ||
empty($additional->order_product_options)) {
				echo
$this->currencyHelper->format($additional->order_product_price,
$this->order->order_currency_id);
			} else {
				echo
$additional->order_prorder/tmpl/show_address.php000064400000010376151162050350012036
0ustar00order->order_currency_id); ?></span></td>
		</tr>

<?php
	if(!empty($this->fields['order'])) {
		foreach($this->fields['order'] as $fieldName =>
$oneExtraField) {
?>
		<tr class="hikashop_order_additional_customfield
hikashop_order_additional_customfield_<?php echo $fieldName;
?>">
			<td class="key"><?php echo
$this->fieldsClass->getFieldName($oneExtraField);?></td>
			<td><span><?php
			echo $this->fieldsClass->show($oneExtraField,
@$this->order->$fieldName);
		?></span></td>
		</tr>
<?php
		}
	}
?>
	</table>
<script type="text/javascript">
window.orderMgr.updateAdditional = function() {
	window.Oby.xRequest('<?php echo
hikashop_completeLink('order&task=show&subtask=additional&cid='.$this->order->order_id,
true, false, true); ?>', {update:
'hikashop_order_field_additional'});
}
</script>
order/tmpl/show_address.php000064400000010376151162050350012036
0ustar00<?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');
?><legend><?php echo
JText::_('HIKASHOP_'.strtoupper($this->type).'_ADDRESS');
?></legend>
<?php

$name = $this->type.'_address';
$show_url =
'order&task=show&subtask='.$name.'&cid='.$this->order->order_id;
$save_url =
'order&task=save&subtask='.$name.'&cid='.$this->order->order_id;
$update_url =
'order&task=edit&subtask='.$name.'&cid='.$this->order->order_id;

	if(!isset($this->edit) || $this->edit !== true ) {
?>		<div class="hika_edit"><a href="<?php
echo hikashop_completeLink($update_url, true);?>"
onclick="return
window.hikashop.get(this,'hikashop_order_field_<?php echo $name;
?>');"><img src="<?php echo HIKASHOP_IMAGES;
?>edit.png" alt=""/><span><?php echo
JText::_('HIKA_EDIT'); ?></span></a></div>
<?php
	} else {
?>		<div class="hika_edit">
			<a href="<?php echo hikashop_completeLink($save_url,
true);?>" onclick="return
window.hikashop.form(this,'hikashop_order_field_<?php echo $name;
?>');"><img src="<?php echo HIKASHOP_IMAGES;
?>ok.png" alt=""/><span><?php echo
JText::_('HIKA_SAVE'); ?></span></a>
			<a href="<?php echo hikashop_completeLink($show_url,
true);?>" onclick="return
window.hikashop.get(this,'hikashop_order_field_<?php echo $name;
?>');"><img src="<?php echo HIKASHOP_IMAGES;
?>cancel.png" alt=""/><span><?php echo
JText::_('HIKA_CANCEL'); ?></span></a>
		</div>
<?php
	}
?>
<table class="admintable table">
<?php
$address =& $this->order->$name;
$display = 'field_backend';
if(isset($this->edit) && $this->edit === true ) {
	foreach($this->order->fields as $field){
		if($field->$display){
			$fieldname = $field->field_namekey;
?>
	<tr class="hikashop_<?php echo
$this->type;?>order_address_<?php echo $fieldname;?>">
		<td class="key"><label><?php echo
$this->fieldsClass->trans($field->field_realname);?></label></td>
		<td><?php
			$onWhat = 'onchange';
			if($field->field_type == 'radio')
				$onWhat = 'onclick';

			$field->table_name = 'order';
			echo $this->fieldsClass->display(
					$field,
					@$address->$fieldname,
					'data['.$name.']['.$fieldname.']',
					false,
					' ' . $onWhat .
'="hikashopToggleFields(this.value,\''.$fieldname.'\',\''.$name.'\',0);"',
					false,
					$this->order->fields,
					$address
			);
		?></td>
	</tr>
<?php
		}
	}
?>
	<tr class="hikashop_<?php echo
$this->type;?>_history">
		<td class="key"><label><?php echo
JText::_('HISTORY'); ?></label></td>
		<td>
			<span><input onchange="window.orderMgr.<?php echo
$this->type;?>_history_changed(this);" type="checkbox"
id="hikashop_history_<?php
eorder/tmpl/show_general.php000064400000011023151162050350012014 0ustar00as
$field){
		if($field->$display){
			$fieldname = $field->field_namekey;
?>
	<tr class="hikashop_<?php echo
$this->type;?>order_address_<?php echo $fieldname;?>">
		<td class="key"><label><?php echo
$this->fieldsClass->trans($field->field_realname);?></label></td>
		<td><span><?php echo
$this->fieldsClass->show($field,
@$address->$fieldname);?></span></td>
	</tr>
<?php
		}
	}
?></table>
<?php
}
?>
<script type="text/javascript">
window.orderMgr.update<?php echo ucfirst($this->type);?> =
function() {
	window.Oby.xRequest('<?php echo
hikashop_completeLink('order&task=show&subtask='.$this->type.'_address&cid='.$this->order->order_id,
true, false, true); ?>',{update:'hikashop_order_field_<?php
echo $this->type; ?>_address'});
}
</script>
order/tmpl/show_general.php000064400000011023151162050350012014
0ustar00<?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');
?>	<legend><?php echo JText::_('MAIN_INFORMATION');
?></legend>
<?php
$show_url =
'order&task=show&subtask=general&cid='.$this->order->order_id;
$save_url =
'order&task=save&subtask=general&cid='.$this->order->order_id;
$update_url =
'order&task=edit&subtask=general&cid='.$this->order->order_id;
if(!isset($this->edit) || $this->edit !== true ) {
?>		<div class="hika_edit"><a href="<?php
echo hikashop_completeLink($update_url, true);?>"
onclick="return
window.hikashop.get(this,'hikashop_order_field_general');"><img
src="<?php echo HIKASHOP_IMAGES; ?>edit.png"
alt=""/><span><?php echo
JText::_('HIKA_EDIT'); ?></span></a></div>
<?php
} else {
?>		<div class="hika_edit">
			<a href="<?php echo hikashop_completeLink($save_url,
true);?>" onclick="return
window.hikashop.form(this,'hikashop_order_field_general');"><img
src="<?php echo HIKASHOP_IMAGES; ?>ok.png"
alt=""/><span><?php echo
JText::_('HIKA_SAVE'); ?></span></a>
			<a href="<?php echo hikashop_completeLink($show_url,
true);?>" onclick="return
window.hikashop.get(this,'hikashop_order_field_general');"><img
src="<?php echo HIKASHOP_IMAGES; ?>cancel.png"
alt=""/><span><?php echo
JText::_('HIKA_CANCEL'); ?></span></a>
		</div>
<?php
}
?>
	<table class="admintable table">
		<tr class="hikashop_order_ordernumber">
			<td class="key"><label><?php echo
JText::_('ORDER_NUMBER'); ?></label></td>
			<td><span><?php echo $this->order->order_number;
?></span></td>
		</tr>
		<tr class="hikashop_order_invoicenumber">
			<td class="key"><label><?php echo
JText::_('INVOICE_NUMBER'); ?></label></td>
			<td><span><?php echo
@$this->order->order_invoice_number; ?></span></td>
		</tr>
		<tr class="hikashop_order_status">
			<td class="key"><label
for="data[order][order_status]"><?php echo
JText::_('ORDER_STATUS'); ?></label></td>
			<td class="hikashop_order_status"><?php
				if(!isset($this->edit) || $this->edit !== true ) {
					?><span><?php echo
hikashop_orderStatus($this->order->order_status);
?></span><?php
				} else {
					$extra =
'onchange="window.orderMgr.status_changed(this);"';
					echo
$this->order_status->display('data[order][order_status]',
$this->order->order_status, $extra);
				}
			?></td>
		</tr>
		<tr id="hikashop_order_notify_line"
style="display:none;"
class="hikashop_order_notify">
			<td class="key"><label
for="data[notify]"><?php echo
JText::_('NOTIFICATION'); ?></label></td>
			<td><input type="checkbox"
id="data[notify]" name="data[notify]"/><label
style="display:inline-block"
for="data[notify]"><?php echo
JText::_('NOTIFY_CUSTOMER'); ?></label></td>
		</tr>
		<tr class="hikashop_order_created">
			<td class="key"><label><?php echo
JText::_('DATE'); ?></label></td>
			<td><span><?php echo
hikashop_getDate($this->order->order_created,'%Y-%m-%d
%H:%M');?></span></td>order/tmpl/show_history.php000064400000004172151162050350012107
0ustar00_order_notify_line'], displayValue = '';
	if(el.value == '<?php echo $this->order->order_status;
?>')
		displayValue = 'none';
	window.hikashop.setArrayDisplay(fields, displayValue);
}
window.orderMgr.general_history_changed = function(el) {
	var fields = ['hikashop_history_general_msg'], displayValue =
'';
	if(!el.checked) displayValue = 'none';
	window.hikashop.setArrayDisplay(fields, displayValue);
}
</script>
	<input type="hidden" name="data[general]"
value="1"/>
	<?php echo JHTML::_('form.token')."\r\n";
}
order/tmpl/show_history.php000064400000004172151162050350012107
0ustar00<?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');
?><legend><?php echo JText::_('HISTORY');
?></legend>
<div class="hikashop_history_container">
<table id="hikashop_order_history_listing"
class="hika_listing hika_table table table-striped
table-hover">
	<thead>
		<tr>
			<th class="title"><?php
				echo JText::_('HIKA_TYPE');
			?></th>
			<th class="title"><?php
				echo
JText::_('ORDER_STATUS');
order/tmpl/show_products.php000064400000024661151162050350012256
0ustar00{
					$user = $userClass->get($history->history_user_id);
					echo $user->username.' / ';
				}
				echo $history->history_ip;
			?></td>
			<td><?php
				echo hikashop_getDate($history->history_created,'%Y-%m-%d
%H:%M');
			?></td>
			<td><?php
				echo $history->history_data;
			?></td>
		</tr>
<?php
}
?>
	</tbody>
</table>
</div>
<script type="text/javascript">
window.orderMgr.updateHistory = function() {
	window.Oby.xRequest('<?php echo
hikashop_completeLink('order&task=show&subtask=history&cid='.$this->order->order_id,
true, false, true);
?>',{update:'hikashop_order_field_history'});
}
</script>
order/tmpl/show_products.php000064400000024661151162050350012256
0ustar00<?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');
?><legend><?php echo JText::_('PRODUCT_LIST');
?></legend>
<?php
	$url =
hikashop_completeLink('product&task=selection&single=1&confirm=0&after=order|product_create&afterParams=order_id|'.$this->order->order_id,
true);
?>
<div class="hika_edit"><?php
	echo $this->popup->display(
		'<img src="'. HIKASHOP_IMAGES .'plus.png"
alt=""/><span>'. JText::_('HIKA_EDIT')
.'</span>',
		'HIKA_ADD_ORDER_PRODUCT',
		hikashop_completeLink('order&task=product_create&order_id='.$this->order->order_id,
true),
		'hikashop_addproduct_popup',
		750, 460, 'onclick="return
window.orderMgr.addProduct(this);"', '',
'link'
	);
	echo ' ';
	echo $this->popup->display(
		'<img src="'. HIKASHOP_IMAGES .'product.png"
alt=""/><span>'. JText::_('HIKA_EDIT')
.'</span>',
		'HIKA_ADD_ORDER_PRODUCT',
		hikashop_completeLink('product&task=selection&single=1&confirm=0&after=order|product_create&afterParams=order_id|'.$this->order->order_id,
true),
		'hikashop_selectproduct_popup',
		750, 460, 'onclick="return
window.orderMgr.selectProduct(this);"', '',
'link'
	);
?></div>
<script type="text/javascript">
<!--
window.orderMgr.addProduct = function(el) {
	window.hikashop.submitFct = function(data) {
		var d = document, o = window.Oby;
		o.xRequest('<?php echo
hikashop_completeLink('order&task=show&subtask=products&cid='.$this->order->order_id,
true, false, true); ?>', {update:
'hikashop_order_products'});
		window.orderMgr.updateAdditional();
		o.fireAjax('hikashop.order_update', {el: 'product',
type: 'add', obj: data});
		window.hikashop.closeBox();
	};
	window.hikashop.openBox(el);
	return false;
}
window.orderMgr.selectProduct = function(el) {
	window.hikashop.submitFct = function(data) {
		var d = document, o = window.Oby;
		o.xRequest('<?php echo
hikashop_completeLink('order&task=show&subtask=products&cid='.$this->order->order_id,
true, false, true); ?>', {update:
'hikashop_order_products'});
		window.orderMgr.updateAdditional();
		o.fireAjax('hikashop.order_update', {el: 'product',
type: 'select', obj: data});
		window.hikashop.closeBox();
	};
	window.hikashop.openBox(el);
	return false;
}
//-->
</script>
<table class="hika_listing adminlist <?php echo
(HIKASHOP_RESPONSIVE)?'table table-striped
table-hover':'hika_table'; ?>"
id="hikashop_order_product_listing"
style="width:100%">
	<thead>
		<tr>
			<th class="hikashop_order_item_name_title
title"><?php echo JText::_('PRODUCT');
?></th>
			<th class="hikashop_order_item_price_title
title"><?php echo JText::_('UNIT_PRICE');
?></th>
			<th class="hikashop_order_item_files_title
title"><?php echo JText::_('HIKA_FILES');
?></th>
			<th class="hikashop_order_item_quantity_title
title"><?php echo JText::_('PRODUCT_QUANTITY');
?></th>
			<th class="hikashop_order_item_total_price_title
title"><?php echo JText::_('PRICE'); ?></th>
			<th colspan="2"
class="hikashop_order_item_remove_title title"><?php echo
JText::_('ACTIONS'); ?></th>
		</tr>
	</thead>
	<tbody>
<?php
$manage =
hikashop_isAllowed($this->config->get('acl_product_manage','all'));
foreach($this->order->products as $k => $product) {
?>
		<tr>
			<td class="hikashop_order_item_name_value">
<?php
if(!empty($product->product_id)) {
?>
				<a onclick="return window.orderMgr.showProduct(this);"
href="<?php echo
hikashop_frontendLink('index.php?option=com_hikashop&ctrl=product&task=show&cid='.$product->product_id,true);
?>"><?php
					echo $product->order_product_name;
				?></a>
<?php if($manage) { ?>
			<a target="_blank" href="<?php echo
hikashop_completeLink('product&task=edit&cid[]='.
$product->product_id); ?>">
				<img style="vertical-align:middle;" src="<?php
echo HIKASHOP_IMAGES; ?>go.png" alt="<?php echo
JText::_('HIKA_EDIT'); ?>" />
			</a>
<?php }
	} else {
		echo $product->order_product_name;
	}
?>
				<br/><?php echo $product->order_product_code; ?>
				<p
class="hikashop_order_product_custom_item_fields"><?php
				if(hikashop_level(2) &&
!empty($this->fields['item'])){
					foreach($this->fields['item'] as $field){
						$namekey = $field->field_namekey;
						if(empty($product->$namekey) &&
!strlen($product->$namekey)){
							continue;
						}
						echo '<p
class="hikashop_order_item_'.$namekey.'">'.$this->fieldsClass->getFieldName($field).':
'.$this->fieldsClass->show($field,$product->$namekey).'</p>';
					}
				}?></p>
			</td>
			<td class="hikashop_order_item_price_value"><?php
				echo
$this->currencyHelper->format($product->order_product_price,
$this->order->order_currency_id);
				if(bccomp($product->order_product_tax,0,5)) {
					echo '<br/>'.JText::sprintf('PLUS_X_OF_VAT',
$this->currencyHelper->format($product->order_product_tax,
$this->order->order_currency_id));
				}
			?></td>
			<td class="hikashop_order_item_files_value"><?php
	if(!empty($product->files)){
		$html = array();
		foreach($product->files as $file){
			if(empty($file->file_name)){
				$file->file_name = $file->file_path;
			}
			$fileHtml = '';
			if(!empty($this->order_status_for_download) &&
!in_array($this->order->order_status,explode(',',$this->order_status_for_download))){
				$fileHtml .= ' /
<b>'.JText::_('BECAUSE_STATUS_NO_DOWNLOAD').'</b>';
			}
			if(!empty($this->download_time_limit)){
					if(($this->download_time_limit+$this->order->order_created)<time()){
						$fileHtml .= ' /
<b>'.JText::_('TOO_LATE_NO_DOWNLOAD').'</b>';
					}else{
						$fileHtml .= ' /
'.JText::sprintf('UNTIL_THE_DATE',hikashop_getDate($this->order->order_created+$this->download_time_limit));
					}
			}
			if(!empty($file->file_limit) && (int)$file->file_limit !=
0) {
				$download_number_limit = $file->file_limit;
				if($download_number_limit < 0)
					$download_number_limit = 0;
			} else {
				$download_number_limit = $this->download_number_limit;
			}
			if(!empty($download_number_limit)){
				if($download_number_limit<=$file->download_number){
					$fileHtml .= ' /
<b>'.JText::_('MAX_REACHED_NO_DOWNLOAD').'</b>';
				}else{
					$fileHtml .= ' /
'.JText::sprintf('X_DOWNLOADS_LEFT',$download_number_limit-$file->download_number);
				}
				if($file->download_number){
					$fileHtml .= '<a
href="'.hikashop_completeLink('file&task=resetdownload&file_id='.$file->file_id.'&order_id='.$this->order->order_id.'&'.hikashop_getFormToken().'=1&return='.urlencode(base64_encode(hikashop_completeLink('order&task=edit&cid='.$this->order->order_id,false,true)))).'"><img
src="'.HIKASHOP_IMAGES.'delete.png"
alt="'.JText::_('HIKA_DELETE').'"
/></a>';
				}
			}
			$file_pos = '';
			if($file->file_pos > 0) {
				$file_pos = '&file_pos='.$file->file_pos;
			}
			$fileLink = '<a
href="'.hikashop_completeLink('order&task=download&file_id='.$file->file_id.'&order_id='.$this->order->order_id.$file_pos).'">'.$file->file_name.'</a>';
			$html[]=$fileLink.' '.$fileHtml;
		}
		echo implode('<br/>',$html);
	}
			?></td>
			<td class="hikashop_order_item_quantity_value"><?php
echo $product->order_product_quantity;?></td>
			<td
class="hikashop_order_item_total_price_value"><?php echo
$this->currencyHelper->format($product->order_product_total_price,
$this->order->order_currency_id);?></td>
			<td class="hikashop_order_item_edit_value"
style="text-align:center">
				<a onclick="return window.orderMgr.setProduct(this);"
href="<?php
					echo
hikashop_completeLink('order&task=edit&subtask=products&order_id='.$this->order->order_id.'&order_product_id='.$product->order_product_id,
true);
				?>"><img src="<?php echo HIKASHOP_IMAGES;
?>edit.png" alt="<?php echo
JText::_('HIKA_EDIT'); ?>"/></a>
			</td>
			<td class="hikashop_order_item_remove_value"
style="text-align:center">
				<a onclick="return window.orderMgr.delProduct(this, <?php
echo $product->order_product_id; ?>);" href="<?php echo
hikashop_completeLink('order&task=product_delete&order_id='.$this->order->order_id.'&order_product_id='.$product->order_product_id);
?>"><img src="<?php echo HIKASHOP_IMAGES;
?>delete.png" alt="<?php echo
JText::_('HIKA_DELETE'); ?>"/></a>
			</td>
		</tr>
<?php
}
?>
	</tbody>
</table>
<?php
echo $this->popup->display(
	'',
	JText::_('COM_HIKASHOP_PRODUCT_FORM_VIEW_DEFAULT_TITLE'),
	hikashop_completeLink('shop.product&task=show&cid=0',
true),
	'hikashop_showproduct_popup',
	750, 460, 'style="display:none;"', '',
'link'
);
?>
<script type="text/javascript">
<!--
window.orderMgr.showProduct = function(el) {
	window.hikashop.submitFct = function(data) { window.hikashop.closeBox();
};
	window.hikashop.openBox('hikashop_showproduct_popup',
el.getAttribute('href'));
	return false;
}
</script>
<?php
	echo $this->popup->display(
		'',
		JText::_('HIKA_MODIFY_ORDER_PRODUCT'),
		hikashop_completeLink('order&task=edit&subtask=products&order_id='.$this->order->order_id.'&order_product_id=0',
true),
		'hikashop_editproduct_popup'order/tmpl/show_user.php000064400000005561151162050350011367
0ustar00kashop.order_update', {el: 'product', type:
'set', obj: data});
		});
	};
	window.hikashop.openBox('hikashop_editproduct_popup',
el.getAttribute('href'));
	return false;
}
window.orderMgr.delProduct = function(el, id) {
	if(confirm("<?php echo
JText::_('HIKA_CONFIRM_DELETE_ORDER_PRODUCT'); ?>")) {
		var w = window, o = w.Oby;
		el.parentNode.innerHTML = '<img src="<?php echo
HIKASHOP_IMAGES; ?>loading.gif"
alt="loading..."/>';
		o.xRequest('<?php echo
hikashop_completeLink('order&task=product_remove&order_id='.$this->order->order_id.'&order_product_id=HKPRODID',
true, false, true); ?>'.replace('HKPRODID',id),
{mode:'POST', data:'<?php echo hikashop_getFormToken();
?>=1', update: 'hikashop_order_products'}, function() {
			window.orderMgr.updateAdditional();
			window.orderMgr.updateHistory();
			o.fireAjax('hikashop.order_update', {el: 'product',
type: 'del', obj: id});
		});
	}
	return false;
}
//-->
</script>
order/tmpl/show_user.php000064400000005561151162050350011367
0ustar00<?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');
?><legend><?php echo
JText::_('CUSTOMER')?></legend>
<div class="hika_edit">
<?php
echo $this->popup->display(
	'<i class="fas fa-pen"></i> ' .
JText::_('HIKA_EDIT'),
	'HIKA_SET_ORDER_CUSTOMER',
	hikashop_completeLink('user&task=selection&single=1&confirm=0&after=order|customer_set&afterParams=order_id|'.$this->order->order_id,
true),
	'hikashop_setcustomer_popup',
	750, 460, 'onclick="return
window.orderMgr.setCustomer(this);" class="btn btn-primary"
title="'. JText::_('HIKA_EDIT') .'"',
'', 'link'
);
?>
</div>
<script type="text/javascript">
<!--
window.orderMgr.setCustomer = function(el) {
	var w = window;
	w.hikashop.submitFct = function(data) {
		var w = window, o = w.Oby;
		w.hikashop.closeBox();
		window.orderMgr.updateUser();
		window.orderMgr.updateBilling();
		window.orderMgr.updateShipping();
		window.orderMgr.updateHistory();
		o.fireAjax('hikashop.order_update', {el: 'customer',
obj: data});
	};
	w.hikashop.openBox(el);
	return false;
}
window.orderMgr.updateUser = function() {
	window.Oby.xRequest('<?php echo
hikashop_completeLink('order&task=show&subtask=userorder/tmpl/user.php000064400000003721151162050350010323
0ustar00->filter->filter_status);
				break;
		}
		switch($pageInfo->filter->filter_start){
			case '':
				switch($pageInfo->filter->filter_end){
					case '':
						break;
					default:
						$filter_end=explode('-',$pageInfo->filter->filter_end);
						$noHourDay=explode(' ',$filter_end[2]);
						$filter_end[2]=$noHourDay[0];
						$filter_end= mktime(23, 59, 59, $filter_end[1], $filter_end[2],
$filter_end[0]);
						$filters[]='b.order_created < '.$filter_end;
						break;
				}
				break;
			default:
				$filter_start=explode('-',$pageInfo->filter->filter_start);
				$noHourDay=explode(' ',$filter_start[2]);
				$filter_start[2]=$noHourDay[0];
				$filter_start= mktime(0, 0, 0, $filter_start[1], $filter_start[2],
$filter_start[0]);
				switch($pageInfo->filter->filter_end){
					case '':
						$filters[]='b.order_created > '.$filter_start;
						order/tmpl/user.php000064400000003721151162050350010323
0ustar00order_user_id','b.order_number','b.order_id','b.order_invoice_number','b.order_invoice_id','b.order_full_price');
		foreach($fields as $field){
			$searchMap[]='b.'.$field->field_namekey;
		}

		$extrafilters = array();
		JPluginHelper::importPlugin('hikashop');
		if(hikashop_level(2))
			JPluginHelper::getPlugin('system',
'hikashopaffiliate');
		$dispatcher = JDispatcher::getInstance();
		$dispatcher->trigger('onBeforeOrderListing',
array($this->paraorder/view.html.php000064400000134257151162050350010317
0ustar00t_id OR (e.product_parent_id > 0 AND e.product_parent_id =
d.product_id))';
			$filters[] = 'e.product_id =
'.(int)$pageInfo->filter->filter_product.' OR
e.product_parent_id = '.(int)$pageInfo->filter->filter_product;
		}
		$order = '';
		if(!empty($pageInfo->filter->order->value)){
			$order = ' ORDER BY
'.$pageInfo->filter->order->value.'
'.$pageInfo->filter->order->dir;
		}
		if(!empty($filters)){
			$filters = ' WHERE ('. implode(') AND
(',$filters).')';
		}else{
			$filters = '';
		}
		$query = ' FROM '.hikashop_table('order').' AS b
LEFT JOIN '.hikashop_table('user').' AS a ON
b.order_user_id=a.user_id LEFT JOIN
'.hikashop_table('users',false).' AS c ON
a.user_cms_id=c.id '.$tables.$filters.$order;
		$database->setQuery('SELECT
a.*,b.*,c.*'.$query,(int)$pageInfo->limit->start,(int)$pageInfo->limit->value);
		$rows = $database->loadObjectList();

		if(!empty($pageInfo->search)){
			$rows =
hikashop_search($pageInfo->search,$rows,'order_id');order/view.html.php000064400000134257151162050350010317
0ustar00= 'export';
		}
		$this->toolbar = array(
			array('name' => 'custom', 'icon' =>
$exportIcon, 'alt' => JText::_('HIKA_EXPORT'),
'task' => 'export', 'check' => false),
			array('name' => 'custom', 'icon' =>
'copy', 'alt' => JText::_('HIKA_COPY'),
'task' => 'copy', 'display' =>
$manage),
			array('name' => 'link', 'icon' =>
'new', 'alt' =>
JText::_('HIKA_NEW'),'url' =>
hikashop_completeLink('order&task=neworder'),'display'
=> $manage),
			array('name'=> 'editList', 'display'
=> $manage),
			array('name'=> 'deleteList', 'display'
=>
hikashop_isAllowed($config->get('acl_order_delete','all'))),
			'|',
			array('name' => 'pophelp', 'target'
=> $this->ctrl.'-listing'),
			'dashboard'
		);

		$toggleClass = hikashop_get('helper.toggle');
		$this->assignRef('toggleClass',$toggleClass);

		$this->assignRef('fields',$fields);
		$this->assignRef('fieldsClass',$fieldsClass);
		$fieldsClass->handleZoneListing($fields,$rows);
		$pluginClass = hikashop_get('class.plugins');
		$payments = $pluginClass->getMethods('payment');
		$newPayments = array();
		foreach($payments as $payment){
			$newPayments[$payment->payment_id] = $payment;
			$newPayments[$payment->payment_type] = $payment; //backward compat
for old order listing views overrides
		}

		$this->assignRef('payments',$newPayments);
		$this->assignRef('rows',$rows);
		$this->assignRef('pageInfo',$pageInfo);
		$currencyClass = hikashop_get('class.currency');
		$this->assignRef('currencyHelper',$currencyClass);
		$category = hikashop_get('type.categorysub');
		$category->type = 'status';
		$this->assignRef('category',$category);
		$payment = hikashop_get('type.payment');
		$this->assignRef('payment',$payment);
		$this->assignRef('popup',$popup);
		$popupHelper = hikashop_get('helper.popup');
		$this->assignRef('popupHelper',$popupHelper);
		$extrafields = array();
		$dispatcher->trigger('onAfterOrderListing',
array(&$this->rows, &$extrafields, $pageInfo));
		$this->assignRef('extrafields',$extrafields);

		$this->getPagination();
	}

	function form(){
		$order_id = hikashop_getCID('order_id');
		$fieldsClass = hikashop_get('class.field');
		$fields = null;
		if(!empty($order_id)){
			$class = hikashop_get('class.order');
			$order = $class->loadFullOrder($order_id,true);

			if(hikashop_level(2)){
				$fields['order'] =
$fieldsClass->getFields('backend',$order,'order');
				$null = null;
				$fields['entry'] =
$fieldsClass->getFields('backend_listing',$null,'entry');
				$fields['item'] =
$fieldsClass->getFields('backend_listing',$null,'item');
			}
			$task='edit';
		}
		if(empty($order)){
			$app = JFactory::getApplication();
			$app->redirect(hikashop_completeLink('order&task=listing',false,true));
		}
		$config =& hikashop_config();
		$order_status_for_download =
$config->get('order_status_for_download','confirmed,shipped');
		$download_time_limit =
$config->get('download_time_limit',0);
		$download_number_limit =
$config->get('download_number_limit',0);
		$this->assignRef('order_status_for_download',$order_status_for_download);
		$this->assignRef('download_time_limit',$download_time_limit);
		$this->assignRef('download_number_limit',$download_number_limit);
		$this->assignRef('config',$config);

		$category = hikashop_get('type.categorysub');
		$category->type = 'status';
		$category->load(true);
		$this->assignRef('category',$category);

		$pluginsPayment = hikashop_get('type.plugins');
		$pluginsPayment->type='payment';
		$this->assignRef('payment',$pluginsPayment);

		$pluginsShipping = hikashop_get('type.plugins');
		$pluginsShipping->type='shipping';
		$this->assignRef('shipping',$pluginsShipping);

		$currencyClass = hikashop_get('class.currency');
		$this->assignRef('currencyHelper',$currencyClass);

		JPluginHelper::importPlugin( 'hikashop' );
		JPluginHelper::importPlugin( 'hikashoppayment' );
		JPluginHelper::importPlugin( 'hikashopshipping' );
		$dispatcher = JDispatcher::getInstance();
		$dispatcher->trigger( 'onHistoryDisplay', array( &
$order->history) );

		$this->assignRef('order',$order);
		$this->assignRef('fields',$fields);
		$this->assignRef('fieldsClass',$fieldsClass);

		$user_id = JRequest::getInt('user_id',0);
		if(!empty($user_id)){
			$user_info='&user_id='.$user_id;
			$url =
hikashop_completeLink('user&task=edit&user_id='.$user_id);
		}else{
			$user_info='';
			$cancel_url = JRequest::getVar('cancel_redirect');
			if(!empty($cancel_url)){
				$url = base64_decode($cancel_url);
			}else{
				$url = hikashop_completeLink('order');
			}
		}

		if(version_compare(JVERSION,'1.6','<')){
			$url_email =
hikashop_completeLink('order&task=mail&order_id='.$order_id,true);
			$url_invoice =
hikashop_completeLink('order&task=invoice&type=full&order_id='.$order_id,true);
			$url_shipping =
hikashop_completeLink('order&task=invoice&type=shipping&order_id='.$order_id,true);
		} else {
			$url_email =
'index.php?option=com_hikashop&ctrl=order&task=mail&tmpl=component&order_id='.$order_id;
			$url_invoice =
'index.php?option=com_hikashop&ctrl=order&task=invoice&tmpl=component&type=full&order_id='.$order_id;
			$url_shipping =
'index.php?option=com_hikashop&ctrl=order&task=invoice&tmpl=component&type=shipping&order_id='.$order_id;
		}

		$this->toolbar = array(
			array('name' => 'Popup', 'icon' =>
'send', 'id' => 'send', 'alt'
=> JText::_('HIKA_EMAIL'), 'url' => $url_email,
'width' => 720),
			array('name' => 'Popup', 'icon' =>
'invoice', 'id' => 'invoice',
'alt' => JText::_('INVOICE'), 'url' =>
$url_invoice, 'width' => 720),
			array('name' => 'Popup', 'icon' =>
'shipping', 'id' => 'shipping',
'alt' => JText::_('SHIPPING_INVOICE'),
'url' => $url_shipping, 'width' => 720),
			array('name' => 'Link', 'icon' =>
'cancel', 'alt' => JText::_('HIKA_BACK'),
'url' => $url),
			'|',
			array('name' => 'pophelp', 'target'
=> $this->ctrl.'-form')
		);
		$popupHelper = hikashop_get('helper.popup');
		$this->assignRef('popup',$popupHelper);
		hikashop_setTitle(JText::_($this->nameForm),$this->icon,$this->ctrl.'&task='.$task.'&order_id='.$order_id.$user_info);
	}

	function changestatus(){
		$order_id = hikashop_getCID('order_id');
		$new_status = JRequest::getVar('status','');
		if(!empty($order_id)){
			$class = hikashop_get('class.order');
			$order = $class->get($order_id,$new_status);
			$order->order_old_status = $order->order_status;
			$order->order_status = $new_status;
			$class->loadOrderNotification($order);
		}else{
			$order = new stdClass();
		}

		$order->order_status = $new_status;

		$this->assignRef('element',$order);
		$editor = hikashop_get('helper.editor');
		$editor->name = 'hikashop_mail_body';
		$editor->content = $order->mail->body;
		$this->assignRef('editor',$editor);
	}

	function partner(){
		$order_id = hikashop_getCID('order_id');
		if(!empty($order_id)){
			$class = hikashop_get('class.order');
			$order = $class->loadNotification($order_id);
		}else{
			$order = new stdClass();
		}
		$this->assignRef('element',$order);
		$editor = hikashop_get('helper.editor');
		$editor->name = 'hikashop_mail_body';
		$editor->content = '';
		$order->mail->altbody='';
		$this->assignRef('editor',$editor);
		$partners = hikashop_get('type.partners');
		$this->assignRef('partners',$partners);
		$currencyType=hikashop_get('type.currency');
		$this->assignRef('currencyType',$currencyType);
	}

	function discount(){
		$order_id = hikashop_getCID('order_id');
		if(!empty($order_id)){
			$class = hikashop_get('class.order');
			$order = $class->loadNotification($order_id);
		}else{
			$order = new stdClass();
		}
		if(!empty($order->order_tax_info)){
			foreach($order->order_tax_info as $tax){
				if(isset($tax->tax_amount_for_coupon)){
					$order->order_discount_tax_namekey=$tax->tax_namekey;
					break;
				}
			}
		}
		$this->assignRef('element',$order);
		$editor = hikashop_get('helper.editor');
		$editor->name = 'hikashop_mail_body';
		$editor->content = '';
		$order->mail->altbody='';
		$this->assignRef('editor',$editor);
		$ratesType = hikashop_get('type.rates');
		$this->assignRef('ratesType',$ratesType);
	}

	function fields(){
		$order_id = hikashop_getCID('order_id');
		$fieldsClass = hikashop_get('class.field');
		$fields = null;
		if(!empty($order_id)){
			$class = hikashop_get('class.order');
			$order = $class->loadNotification($order_id);
			if(hikashop_level(2)){
				$fields['order'] =
$fieldsClass->getFields('backend',$order,'order');
			}
		}else{
			$order = new stdClass();
		}
		$this->assignRef('element',$order);
		$this->assignRef('fields',$fields);
		$this->assignRef('fieldsClass',$fieldsClass);
		$editor = hikashop_get('helper.editor');
		$editor->name = 'hikashop_mail_body';
		$editor->content = '';
		$order->mail->altbody='';
		$this->assignRef('editor',$editor);
	}

	function changeplugin(){
		$order_id = hikashop_getCID('order_id');
		$new_status = JRequest::getVar('status','');
		if(!empty($order_id)){
			$class = hikashop_get('class.order');
			$order = $class->loadNotification($order_id);
		}else{
			$order = new stdClass();
		}

		if(!empty($order->order_tax_info)){
			foreach($order->order_tax_info as $tax){
				if(isset($tax->tax_amount_for_shipping)){
					$order->order_shipping_tax_namekey=$tax->tax_namekey;
					break;
				}
			}
		}
		$this->assignRef('element',$order);
		$editor = hikashop_get('helper.editor');
		$editor->name = 'hikashop_mail_body';
		$editor->content = '';
		$order->mail->altbody='';
		$this->assignRef('editor',$editor);
		$pluginsPayment = hikashop_get('type.plugins');
		$pluginsPayment->type=JRequest::getWord('type');
		$this->assignRef($pluginsPayment->type,$pluginsPayment);
		$this->assignRef('type',$pluginsPayment->type);
		$full_id = JRequest::getCmd('plugin');
		$this->assignRef('full_id',$full_id);
		$parts = explode('_',$full_id);
		$id = array_pop($parts);
		$this->assignRef('id',$id);
		$method = implode('_',$parts);
		$this->assignRef('method',$method);
		$ratesType = hikashop_get('type.rates');
		$this->assignRef('ratesType',$ratesType);
	}

	function mail(){
		$element = new stdClass();
		$element->order_id = JRequest::getInt('order_id',0);

		if(empty($element->order_id)){
			$user_id = JRequest::getInt('user_id',0);
			$userClass = hikashop_get('class.user');
			$element->customer = $userClass->get($user_id);
			$mailClass = hikashop_get('class.mail');
			$element->mail = new stdClass();
			$element->mail->body='';
			$element->mail->altbody='';
			$element->mail->html=1;
			$mailClass->loadInfos($element->mail,
'user_notification');
			$element->mail->dst_email =&
$element->customer->user_email;
			if(!empty($element->customer->name)){
				$element->mail->dst_name =& $element->customer->name;
			}else{
				$element->mail->dst_name = '';
			}
		}else{
			$orderClass = hikashop_get('class.order');
			$orderClass->loadMail($element);
		}
		$editor = hikashop_get('helper.editor');
		$editor->name = 'hikashop_mail_body';
		$editor->content = $element->mail->body;
		$this->assignRef('editor',$editor);
		$this->assignRef('element',$element);
	}

	function export(){
		$ids = JRequest::getVar( 'cid', array(), '',
'array' );
		$fieldsClass = hikashop_get('class.field');
		$fields =
$fieldsClass->getData('all','order',false);
		$database	= JFactory::getDBO();
		$filters = array('b.order_type=\'sale\'');

		if(empty($ids)){
			$app = JFactory::getApplication();
			$search = $app->getUserStateFromRequest(
$this->paramBase.".search", 'search', '',
'string' );
			$filter_status = $app->getUserStateFromRequest(
$this->paramBase.".filter_status",'filter_status','','string');
			$filter_payment = $app->getUserStateFromRequest(
$this->paramBase.".filter_payment",'filter_payment','','string');
			$filter_partner = $app->getUserStateFromRequest(
$this->paramBase.".filter_partner",'filter_partner','','int');
			$filter_end = $app->getUserStateFromRequest(
$this->paramBase.".filter_end",'filter_end','','string');
			$filter_start = $app->getUserStateFromRequest(
$this->paramBase.".filter_start",'filter_start','','string');

			switch($filter_start){
				case '':
					switch($filter_end){
						case '':
							break;
						default:
							$filter_end=explode('-',$filter_end);
							$noHourDay=explode(' ',$filter_end[2]);
							$filter_end[2]=$noHourDay[0];
							$filter_end= mktime(23, 59, 59, $filter_end[1], $filter_end[2],
$filter_end[0]);
							$filters[]='b.order_created < '.$filter_end;
							break;
					}
					break;
				default:
					$filter_start=explode('-',$filter_start);
					$noHourDay=explode(' ',$filter_start[2]);
					$filter_start[2]=$noHourDay[0];
					$filter_start= mktime(0, 0, 0, $filter_start[1], $filter_start[2],
$filter_start[0]);
					switch($pageInfo->filter->filter_end){
						case '':
							$filters[]='b.order_created > '.$filter_start;
							break;
						default:
							$filter_end=explode('-',$filter_end);
							$noHourDay=explode(' ',$filter_end[2]);
							$filter_end[2]=$noHourDay[0];
							$filter_end= mktime(23, 59, 59, $filter_end[1], $filter_end[2],
$filter_end[0]);
							$filters[]='b.order_created > '.$filter_start. '
AND b.order_created < '.$filter_end;
							break;
					}
					break;
			}

			if(!empty($filter_partner)){
				if($filter_partner==1){
					$filters[]='b.order_partner_id != 0';
				}else{
					$filters[]='b.order_partner_id = 0';
				}
			}
			switch($filter_status){
				case '':
					break;
				default:
					$filters[]='b.order_status =
'.$database->Quote($filter_status);
					break;
			}
			switch($filter_payment){
				case '':
					break;
				default:
					$filters[]='b.order_payment_method =
'.$database->Quote($filter_payment);
					break;
			}
			$searchMap =
array('c.id','c.username','c.name','a.user_email','b.order_user_id','b.order_id','b.order_full_price');
			foreach($fields as $field){
				$searchMap[]='b.'.$field->field_namekey;
			}
			if(!empty($pageInfo->search)){
				$searchVal =
'\'%'.hikashop_getEscaped(JString::strtolower(
$pageInfo->search ),true).'%\'';
				$id = hikashop_decode($pageInfo->search);
				$filter = implode(" LIKE $searchVal OR ",$searchMap)."
LIKE $searchVal";
				if(!empty($id)){
					$filter .= " OR b.order_id LIKE
'%".hikashop_getEscaped($id,true).'%\'';
				}
				$filters[] =  $filter;
			}
		}else{
			JArrayHelper::toInteger($ids,0);
			$filters[] =  'b.order_id IN
('.implode(',',$ids).')';
		}
		$filters = implode(' AND ', $filters);

		$query = ' FROM '.hikashop_table('order').' AS b
LEFT JOIN '.hikashop_table('user').' AS a ON
b.order_user_id=a.user_id LEFT JOIN
'.hikashop_table('users',false).' AS c ON
a.user_cms_id=c.id WHERE '.$filters;
		$database->setQuery('SELECT a.*,b.*,c.*'.$query);

		$rows = $database->loadObjectList('order_id');
		if(!empty($rows)){
			$addressIds = array();
			foreach($rows as $k => $row){
				$rows[$k]->products = array();
				$addressIds[$row->order_shipping_address_id]=$row->order_shipping_address_id;
				$addressIds[$row->order_billing_address_id]=$row->order_billing_address_id;
			}
			if(!empty($addressIds)){
				$database->setQuery('SELECT * FROM
'.hikashop_table('address').' WHERE address_id IN
('.implode(',',$addressIds).')');
				$addresses = $database->loadObjectList('address_id');
				if(!empty($addresses)){
					$zoneNamekeys = array();
					foreach($addresses as $address){
						$zoneNamekeys[$address->address_country]=$database->Quote($address->address_country);
						$zoneNamekeys[$address->address_state]=$database->Quote($address->address_state);
					}
					if(!empty($zoneNamekeys)){
						$database->setQuery('SELECT zone_namekey,zone_name FROM
'.hikashop_table('zone').' WHERE zone_namekey IN
('.implode(',',$zoneNamekeys).')');
						$zones = $database->loadObjectList('zone_namekey');
						if(!empty($zones)){
							foreach($addresses as $i => $address){
								if(!empty($zones[$address->address_country])){
									$addresses[$i]->address_country =
$zones[$address->address_country]->zone_name;
								}
								if(!empty($zones[$address->address_state])){
									$addresses[$i]->address_state =
$zones[$address->address_state]->zone_name;
								}
							}
						}
					}
					$fields = array_keys(get_object_vars(reset($addresses)));
					foreach($rows as $k => $row){
						if(!empty($addresses[$row->order_shipping_address_id])){
							foreach($addresses[$row->order_shipping_address_id] as $key =>
$val){
								$key = 'shipping_'.$key;
								$rows[$k]->$key = $val;
							}
						}else{
							foreach($fields as $field){
								$key = 'shipping_'.$field;
								$rows[$k]->$key = '';
							}
						}
						if(!empty($addresses[$row->order_billing_address_id])){
							foreach($addresses[$row->order_billing_address_id] as $key =>
$val){
								$key = 'billing_'.$key;
								$rows[$k]->$key = $val;
							}
						}else{
							foreach($fields as $field){
								$key = 'billing_'.$field;
								$rows[$k]->$key = '';
							}
						}
					}
				}
			}
			$orderIds = array_keys($rows);
			$database->setQuery('SELECT * FROM
'.hikashop_table('order_product').' WHERE order_id IN
('.implode(',',$orderIds).')');
			$products = $database->loadObjectList();

			foreach($products as $product){
				$order =& $rows[$product->order_id];
				$order->products[] = $product;
				if(!isset($order->order_full_tax)){
					$order->order_full_tax=0;
				}
				$order->order_full_tax+=round($product->order_product_quantity*$product->order_product_tax,2);
			}
			foreach($rows as $k => $row){
				$rows[$k]->order_full_tax+=$row->order_shipping_tax-$row->order_discount_tax;
			}
		}
		JPluginHelper::importPlugin( 'hikashop' );
		$dispatcher = JDispatcher::getInstance();
		$dispatcher->trigger( 'onBeforeOrderExport', array( &
$rows, &$this) );
		$this->assignRef('orders',$rows);
	}

	function invoice(){
		$order_id = hikashop_getCID('order_id');
		$fieldsClass = hikashop_get('class.field');
		$fields = array();
		if(!empty($order_id)){
			$class = hikashop_get('class.order');
			$order = $class->loadFullOrder($order_id);
			$null = null;
			$fields['item'] =
$fieldsClass->getFields('backend_listing',$null,'item');
			$task='edit';
		}else{
			$order = new stdClass();
			$task='add';
		}
		$config =& hikashop_config();
		$store =
str_replace(array("\r\n","\n","\r"),array('<br/>','<br/>','<br/>'),$config->get('store_address',''));
		if(JText::_($store)!=$store){
			$store = JText::_($store);
		}
		$this->assignRef('store_address',$store);
		$this->assignRef('element',$order);
		$this->assignRef('order',$order);
		$this->assignRef('fields',$fields);

		if(!empty($order->order_payment_id)){
			$pluginsPayment = hikashop_get('type.plugins');
			$pluginsPayment->type='payment';
			$this->assignRef('payment',$pluginsPayment);
		}
		if(!empty($order->order_shipping_id)){
			$pluginsShipping = hikashop_get('type.plugins');
			$pluginsShipping->type='shipping';
			$this->assignRef('shipping',$pluginsShipping);
		}

		$type = JRequest::getWord('type');
		$this->assignRef('invoice_type',$type);
		$nobutton = true;
		$this->assignRef('nobutton',$nobutton);
		$display_type = 'frontcomp';
		$this->assignRef('display_type',$display_type);
		$currencyClass = hikashop_get('class.currency');
		$this->assignRef('currencyHelper',$currencyClass);
		$config =& hikashop_config();
		$this->assignRef('config',$config);
		$this->assignRef('fieldsClass',$fieldsClass);
	}

	function product(){
		$product_id = hikashop_getCID('product_id');
		$orderClass = hikashop_get('class.order');
		if(!empty($product_id)){
			$class = hikashop_get('class.order_product');
			$product = $class->get($product_id);
		}else{
			$product = new stdClass();
			$product->order_id = JRequest::getInt('order_id');
			$product->mail = new stdClass();
			$product->mail->body = '';
		}

		$orderClass->loadMail($product);

		if(!empty($product->order_product_tax_info)){
			$tax = reset($product->order_product_tax_info);
			$product->tax_namekey = $tax->tax_namekey;
		}

		$this->assignRef('element',$product);

		$editor = hikashop_get('helper.editor');
		$editor->name = 'hikashop_mail_body';
		$editor->content = $product->mail->body;
		$this->assignRef('editor',$editor);
		$extraFields=array();
		$fieldsClass = hikashop_get('class.field');
		$this->assignRef('fieldsClass',$fieldsClass);
		$null=null;
		$extraFields['item'] =
$fieldsClass->getFields('backend',$null,'item','user&task=state');
		$this->assignRef('extraFields',$extraFields);
		$ratesType = hikashop_get('type.rates');
		$this->assignRef('ratesType',$ratesType);
	}
	function user(){
		$element = new stdClass();
		$element->order_id = JRequest::getInt('order_id');
		$element->mail = new stdClass();
		$element->mail->body = '';
		$orderClass = hikashop_get('class.order');
		$orderClass->loadMail($element);
		$this->assignRef('element',$element);
		$editor = hikashop_get('helper.editor');
		$editor->name = 'hikashop_mail_body';
		$editor->content = $element->mail->body;
		$this->assignRef('editor',$editor);
	}

	function product_delete(){
		$product_id = hikashop_getCID('product_id');
		$orderClass = hikashop_get('class.order');
		if(!empty($product_id)){
			$class = hikashop_get('class.order_product');
			$product = $class->get($product_id);
			$orderClass->loadMail($product);
			$this->assignRef('element',$product);
			$editor = hikashop_get('helper.editor');
			$editor->name = 'hikashop_mail_body';
			$editor->content = $product->mail->body;
			$this->assignRef('editor',$editor);
		}
	}

	function address(){
		$address_id = hikashop_getCID('address_id');
		$address_type = JRequest::getCmd('type');
		$fieldsClass = hikashop_get('class.field');
		$orderClass = hikashop_get('class.order');
		$order = new stdClass();
		$order->order_id = JRequest::getInt('order_id');
		$addressClass=hikashop_get('class.address');
		$name = $address_type.'_address';
		if(!empty($address_id)){
			$order->$name=$addressClass->get($address_id);
		}
		$fieldClass = hikashop_get('class.field');
		$order->fields =
$fieldClass->getData('backend','address');
		$orderClass->loadMail($order);
		$name = $address_type.'_address';
		$fieldsClass->prepareFields($order->fields,$order->$name,'address','field&task=state');

		$this->assignRef('fieldsClass',$fieldsClass);

		$this->assignRef('element',$order);
		$this->assignRef('type',$address_type);
		$this->assignRef('id',$address_id);
		$editor = hikashop_get('helper.editor');
		$editor->name = 'hikashop_mail_body';
		$editor->content = $order->mail->body;
		$this->assignRef('editor',$editor);
	}
	function product_select(){
		$app = JFactory::getApplication();
		$config =& hikashop_config();
		$this->assignRef('config',$config);
		$this->paramBase.="_product_select";
		$element = new stdClass();
		$element->order_id = JRequest::getInt('order_id');
		$this->assignRef('element',$element);
		$pageInfo = new stdClass();
		$pageInfo->filter = new stdClass();
		$pageInfo->filter->order = new stdClass();
		$pageInfo->limit = new stdClass();
		$pageInfo->filter->order->value =
$app->getUserStateFromRequest(
$this->paramBase.".filter_order",
'filter_order',	'a.ordering','cmd' );
		$pageInfo->filter->order->dir	=
$app->getUserStateFromRequest(
$this->paramBase.".filter_order_Dir",
'filter_order_Dir',	'asc',	'word' );
		if(JRequest::getVar('search')!=$app->getUserState($this->paramBase.".search")){
			$app->setUserState( $this->paramBase.'.limitstart',0);
			$pageInfo->limit->start = 0;
		}else{
			$pageInfo->limit->start = $app->getUserStateFromRequest(
$this->paramBase.'.limitstart', 'limitstart', 0,
'int' );
		}
		$pageInfo->search = $app->getUserStateFromRequest(
$this->paramBase.".search", 'search', '',
'string' );
		$pageInfo->search = JString::strtolower( $pageInfo->search );
		$pageInfo->limit->value = $app->getUserStateFromRequest(
$this->paramBase.'.list_limit', 'limit',
$app->getCfg('list_limit'), 'int' );
		if(empty($pageInfo->limit->value)) $pageInfo->limit->value =
500;
		$selectedType = $app->getUserStateFromRequest(
$this->paramBase.".filter_type",'filter_type',0,'int');
		$pageInfo->filter->filter_id = $app->getUserStateFromRequest(
$this->paramBase.".filter_id",'filter_id',0,'string');
		$pageInfo->filter->filter_product_type =
$app->getUserStateFromRequest(
$this->paramBase.".filter_product_type",'filter_product_type','main','word');
		$database = JFactory::getDBO();
		$filters = array();
		$searchMap =
array('b.product_name','b.product_description','b.product_id','b.product_code');
		if(empty($pageInfo->filter->filter_id)||
!is_numeric($pageInfo->filter->filter_id)){
			$pageInfo->filter->filter_id='product';
			$class = hikashop_get('class.category');
			$class->getMainElement($pageInfo->filter->filter_id);
		}
		if(!empty($pageInfo->search)){
			$searchVal =
'\'%'.hikashop_getEscaped($pageInfo->search,true).'%\'';
			$filters[] = implode(" LIKE $searchVal OR ",$searchMap)."
LIKE $searchVal";
		}
		$order = '';
		if(!$selectedType){
			$filters[]='a.category_id='.(int)$pageInfo->filter->filter_id;
			$select='SELECT a.ordering, b.*';
		}else{
			$categoryClass = hikashop_get('class.category');
			$categoryClass->parentObject =& $this;
			$childs =
$categoryClass->getChilds((int)$pageInfo->filter->filter_id,true,array(),'',0,0);
			$filter = 'a.category_id IN (';
			foreach($childs as $child){
				$filter .= $child->category_id.',';
			}
			$filters[]=$filter.(int)$pageInfo->filter->filter_id.')';
			$select='SELECT DISTINCT b.*';
		}
		if($pageInfo->filter->filter_product_type=='all'){
			if(!empty($pageInfo->filter->order->value)){
				$select.=','.$pageInfo->filter->order->value.'
as sorting_column';
				$order = ' ORDER BY sorting_column
'.$pageInfo->filter->order->dir;
			}
		}else{
			if(!empty($pageInfo->filter->order->value)){
				$order = ' ORDER BY
'.$pageInfo->filter->order->value.'
'.$pageInfo->filter->order->dir;
			}
		}
		JPluginHelper::importPlugin( 'hikashop' );
		$dispatcher = JDispatcher::getInstance();
		$dispatcher->trigger( 'onBeforeProductListingLoad', array(
& $filters, & $order, &$this, & $select, & $select2,
& $a, & $b, & $on) );
		if($pageInfo->filter->filter_product_type=='all'){
			$query = '( '.$select.' FROM
'.hikashop_table('product_category').' AS a LEFT JOIN
'.hikashop_table('product').' AS b ON
a.product_id=b.product_id WHERE '.implode(' AND
',$filters).' AND b.product_id IS NOT NULL )
			UNION
						( '.$select.' FROM
'.hikashop_table('product_category').' AS a LEFT JOIN
'.hikashop_table('product').' AS b ON
a.product_id=b.product_parent_id WHERE '.implode(' AND
',$filters).' AND b.product_parent_id IS NOT NULL ) ';
			$database->setQuery($query.$order,(int)$pageInfo->limit->start,(int)$pageInfo->limit->value);
		}else{
			$filters[]='b.product_type =
'.$database->Quote($pageInfo->filter->filter_product_type);
			if($pageInfo->filter->filter_product_type!='variant'){
				$lf = 'a.product_id=b.product_id';
			}else{
				$lf = 'a.product_id=b.product_parent_id';
			}
			$query = ' FROM
'.hikashop_table('product_category').' AS a LEFT JOIN
'.hikashop_table('product').' AS b ON '.$lf.'
WHERE '.implode(' AND ',$filters);
			$database->setQuery($select.$query.$order,(int)$pageInfo->limit->start,(int)$pageInfo->limit->value);
		}
		$rows = $database->loadObjectList();
		if(!empty($pageInfo->search)){
			$rows =
hikashop_search($pageInfo->search,$rows,'product_id');
		}
		if($pageInfo->filter->filter_product_type=='all'){
			$database->setQuery('SELECT COUNT(*) FROM ('.$query.')
as u');
		}else{
			$database->setQuery('SELECT
COUNT(DISTINCT(b.product_id))'.$query);
		}
		$pageInfo->elements = new stdClass();
		$pageInfo->elements->total = $database->loadResult();
		$pageInfo->elements->page = count($rows);
		if($pageInfo->elements->page){
			$this->_loadPrices($rows);
		}

		if($pageInfo->limit->value == 500) $pageInfo->limit->value =
100;

		$toggleClass = hikashop_get('helper.toggle');
		$this->assignRef('toggleClass',$toggleClass);
		$childClass = hikashop_get('type.childdisplay');
		$childDisplay =
$childClass->display('filter_type',$selectedType,false);
		$this->assignRef('childDisplay',$childDisplay);
		$productClass = hikashop_get('type.product');
		$this->assignRef('productType',$productClass);
		$breadcrumbClass = hikashop_get('type.breadcrumb');
		$breadCrumb =
$breadcrumbClass->display('filter_id',$pageInfo->filter->filter_id,'product');
		$this->assignRef('breadCrumb',$breadCrumb);
		$this->assignRef('rows',$rows);
		$this->assignRef('pageInfo',$pageInfo);
		$this->getPagination();
		$currencyClass = hikashop_get('class.currency');
		$this->assignRef('currencyHelper',$currencyClass);
		$doOrdering = !$selectedType;
		if($doOrdering &&
!(empty($pageInfo->filter->filter_product_type) ||
$pageInfo->filter->filter_product_type=='main')){
			$doOrdering=false;
		}
		$this->assignRef('doOrdering',$doOrdering);
		if($doOrdering){
			$order = new stdClass();
			$order->ordering = false;
			$order->orderUp = 'orderup';
			$order->orderDown = 'orderdown';
			$order->reverse = false;
			if($pageInfo->filter->order->value == 'a.ordering'){
				$order->ordering = true;
				if($pageInfo->filter->order->dir == 'desc'){
					$order->orderUp = 'orderdown';
					$order->orderDown = 'orderup';
					$order->reverse = true;
				}
			}
			$this->assignRef('order',$order);
		}
	}
	function _loadPrices(&$rows){
		$ids = array();
		foreach($rows as $row){
			$ids[]=(int)$row->product_id;
		}
		$query = 'SELECT * FROM
'.hikashop_table('price').' WHERE price_product_id IN
('.implode(',',$ids).')';
		$database = JFactory::getDBO();
		$database->setQuery($query);
		$prices = $database->loadObjectList();
		if(!empty($prices)){
			foreach($prices as $price){
				foreach($rows as $k => $row){
					if($price->price_product_id==$row->product_id){
						if(!isset($row->prices)) $row->prices=array();
						$rows[$k]->prices[]=$price;
						break;
					}
				}
			}
		}
	}

	public function show($tpl = null, $toolbar = true) {
		$this->form();

		$edit = JRequest::getVar('task','') ==
'edit';
		$this->assignRef('edit', $edit);
		$order_status_type = hikashop_get('type.order_status');
		$this->assignRef('order_status', $order_status_type);
		$shippingClass = hikashop_get('class.shipping');
		$this->assignRef('shippingClass',$shippingClass);
		$paymentClass = hikashop_get('class.payment');
		$this->assignRef('paymentClass',$paymentClass);
	}

	public function show_general($tpl = null) {
		$this->show($tpl, false);
	}

	public function show_history($tpl = null) {
		$this->show($tpl, false);
	}

	public function edit_additional($tpl = null) {
		$this->show($tpl, false);

		$ratesType = hikashop_get('type.rates');
		$this->assignRef('ratesType',$ratesType);

		$pluginsPayment = hikashop_get('type.plugins');
		$pluginsPayment->type = 'payment';
		$this->assignRef('paymentPlugins', $pluginsPayment);

		$pluginsShipping = hikashop_get('type.plugins');
		$pluginsShipping->type = 'shipping';
		$this->assignRef('shippingPlugins', $pluginsShipping);
	}

	public function show_additional($tpl = null) {
		$task = JRequest::getCmd('task', '');
		if($task == 'save') {
			$html = '<html><body><script
type="text/javascript">'."\r\n".
				'window.parent.hikashop.submitFct();'."\r\n".
				'</script></body></html>';
			die($html);
		}
		$shippingClass = hikashop_get('class.shipping');
		$this->assignRef('shippingClass',$shippingClass);
		$paymentClass = hikashop_get('class.payment');
		$this->assignRef('paymentClass',$paymentClass);
		$this->show($tpl, false);
	}

	public function show_shipping_address($tpl = null) {
		$address_type = 'shipping';
		$this->assignRef('type', $address_type);
		$this->show($tpl, false);

		if($this->edit) {
			if(!empty($this->order->order_shipping_address_id)) {
				$addressClass = hikashop_get('class.address');
				$this->order->shipping_address =
$addressClass->get($this->order->order_shipping_address_id);
			}
			$this->fieldsClass->prepareFields($this->order->fields,
$this->order->shipping_address, 'address',
'user&task=state');
		}

		$this->setLayout('show_address');
	}

	public function show_billing_address($tpl = null) {
		$address_type = 'billing';
		$this->assignRef('type', $address_type);
		$this->show($tpl, false);

		if($this->edit) {
			if(!empty($this->order->order_billing_address_id)) {
				$addressClass = hikashop_get('class.address');
				$this->order->billing_address =
$addressClass->get($this->order->order_billing_address_id);
			}
			$this->fieldsClass->prepareFields($this->order->fields,
$this->order->billing_address, 'address',
'user&task=state');
		}

		$this->setLayout('show_address');
	}

	public function show_products($tpl = null) {
		$task = JRequest::getCmd('task', '');
		if($task == 'save') {
			$html = '<html><body><script
type="text/javascript">'."\r\n".
				'window.parent.hikashop.submitFct();'."\r\n".
				'</script></body></html>';
			die($html);
		}
		$this->show($tpl, false);
	}

	public function edit_products($tpl = null) {
		$config = hikashop_config();
		$this->assignRef('config', $config);
		$productClass = hikashop_get('class.product');
		$fieldsClass = hikashop_get('class.field');
		$this->assignRef('fieldsClass', $fieldsClass);

		$order_id = JRequest::getInt('order_id');
		$order_product_id = JRequest::getInt('order_product_id', 0);

		$orderClass = hikashop_get('class.order');
		$order = $orderClass->get($order_id);
		$originalProduct = new stdClass();

		if(!empty($order_product_id)){
			$orderProductClass = hikashop_get('class.order_product');
			$orderProduct = $orderProductClass->get($order_product_id);
			if(empty($orderProduct) || $orderProduct->order_id != $order_id) {
				$orderProduct = new stdClass();
				$orderProduct->order_id = $order_id;
			}
			if(!empty($orderProduct->product_id)) {
				$originalProduct =
$productClass->get($orderProduct->product_id);
			}
		}else{
			$orderProduct = new stdClass();
			$orderProduct->order_id = $order_id;

			$product_id = JRequest::getVar('cid', array(), '',
'array');

			if(!empty($product_id)) {
				$database = JFactory::getDBO();
				$query = 'SELECT product_parent_id FROM
'.hikashop_table('product').' WHERE product_id =
'. (int)$product_id[0];
				$database->setQuery($query);
				$product_parent_id = $database->loadResult();
				$isVariant = false;
				if($product_parent_id != 0){
					$product_id[1] = $product_parent_id;
					$isVariant = true;
				}

				if($productClass->getProducts($product_id)) {
					$products = $productClass->products;
					$allproducts = $productClass->all_products;
					if(!$isVariant)
						$product = $products[ (int)$product_id[0] ];
					else
						$product = $allproducts[ (int)$product_id[1] ]->variants[
(int)$product_id[0] ];
					$product->options = array();

					$originalProduct = $product;

					$orderProduct->product_id = $product->product_id;
					if($isVariant && empty($product->product_name)){
						$product->product_name = $allproducts[ (int)$product_id[1]
]->product_name;
					}

					$orderProduct->order_product_name =
strip_tags($product->product_name);

					$orderProduct->order_product_code = $product->product_code;
					$orderProduct->order_product_quantity = 1;

					$currencyClass = hikashop_get('class.currency');
					$main_currency = (int)$config->get('main_currency',1);
					$discount_before_tax =
(int)$config->get('discount_before_tax',0);
					$currency_id = $order->order_currency_id;

					if($config->get('tax_zone_type', 'shipping') ==
'billing'){
						$zone_id = hikashop_getZone('billing');
					} else {
						$zone_id = hikashop_getZone('shipping');
					}

					$rows = array($product);
					if($isVariant){
						$rows[]=$allproducts[ (int)$product_id[1] ];
					}

					$currencyClass->getPrices($rows, $product_id, $currency_id,
$main_currency, $zone_id, $discount_before_tax);
					if(empty($rows[0]->prices) && !empty($rows[1]->prices))
{
						$rows[0]->prices = $rows[1]->prices;
					}
					$currencyClass->pricesSelection($rows[0]->prices, 0);
					if(!empty($rows[0]->prices)) {
						foreach($rows[0]->prices as $price) {
							$orderProduct->order_product_price = $price->price_value;
							$orderProduct->order_product_tax =
(@$price->price_value_with_tax - @$price->price_value);
							$orderProduct->order_product_tax_info = @$price->taxes;
						}
					}
				}
			}
		}
		$this->assignRef('orderProduct', $orderProduct);
		$this->assignRef('originalProduct', $originalProduct);

		$ratesType = hikashop_get('type.rates');
		$this->assignRef('ratesType',$ratesType);

		if(hikashop_level(2)) {
			$null = null;
			$this->fields['item'] =
$this->fieldsClass->getFields('backend',$null,'item','user&task=state');
		}
	}

	public function customer_set() {
		$users = JRequest::getVar('cid', array(), '',
'array');
		$closePopup = JRequest::getInt('finalstep', 0);

		if($closePopup) {
			$formData = JRequest::getVar('data', array(), '',
'array');
			$users = array(
(int)$formData['order']['order_user_id'] );
		}
		$rows = array();
		$data = '';
		$singleSelection = true; //JRequest::getVar('single', false);
		$order_id = JRequest::getInt('order_id', 0);

		$elemStruct = array(
			'user_email',
			'user_cms_id',
			'name',
			'username',
			'email'
		);

		$set_address = JRequest::getInt('set_user_address', 0);

		if(!empty($users)) {
			JArrayHelper::toInteger($users);
			$db = JFactory::getDBO();
			$query = 'SELECT a.*, b.* FROM
'.hikashop_table('user').' AS a LEFT JOIN
'.hikashop_table('users', false).' AS b ON
a.user_cms_id = b.id WHERE a.user_id IN
('.implode(',',$users).')';
			$db->setQuery($query);
			$rows = $db->loadObjectList();

			if(!empty($rows)) {
				$data = array();
				foreach($rows as $v) {
					$d = '{id:'.$v->user_id;
					foreach($elemStruct as $s) {
						if($s == 'id')
							continue;
						$d .= ','.$s.':\''.
str_replace('"','\'',$v->$s).'\'';
					}
					if($set_address && $singleSelection)
						$d .=
',updates:[\'billing\',\'history\']';
					$data[] = $d.'}';
				}
				if(!$singleSelection)
					$data = '['.implode(',',$data).']';
				else {
					$data = $data[0];
					$rows = $rows[0];
				}
			}
		}
		$this->assignRef('rows', $rows);
		$this->assignRef('data', $data);
		$this->assignRef('singleSelection', $singleSelection);
		$this->assignRef('order_id', $order_id);

		if($closePopup) {
			hikashop_loadJslib('mootools');
			$js = 'window.addEvent("domready",
function(){window.parent.hikashop.submitBox('.$data.');});';
			$doc = JFactory::getDocument();
			$doc->addScriptDeclaration($js);
		}
	}

	function getShippingName($shipping_method, $shipping_id) {
		$shipping_name = $shipping_method . ' ' . $shipping_id;
		if(strpos($shipping_id, '-') !== false) {
			$shipping_ids = explode('-', $shipping_id, 2);
			$shipping = $this->shippingClass->get($shipping_ids[0]);
			if(!empty($shipping->shipping_params) &&
is_string($shipping->shipping_params))
				$shipping->shipping_params =
unserialize($shipping->shipping_params);
			$shippingMethod = hikashop_import('hikashopshipping',
$shipping_method);
			$methods = $shippingMethod->shippingMethods($shipping);

			if(isset($methods[$shipping_id])){
				$shipping_name = $shipping->shipping_name.' -
'.$methods[$shipping_id];
			}else{
				$shipping_name = $shipping_id;
			}
		}
		return $shipping_name;
	}
}
orderstatus/index.html000064400000000034151162050350011113
0ustar00<html><body></body></html>
orderstatus/tmpl/form.php000064400000006010151162050350011546
0ustar00<?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');
?><div class="iframedoc"
id="iframedoc"></div>
<form action="<?php echo
hikashop_completeLink('orderstatus'); ?>"
method="post"  name="adminForm"
id="adminForm" enctype="multipart/form-data">

<div class="hk-container-fluid
hikashop_backend_tile_edition">
	<div class="hkc-lg-6 hikashop_tile_block"><div>
		<div class="hikashop_tile_title"><?php
			echo JText::_('MAIN_OPTIONS');
		?></div>

		<dl class="hika_options">
			<dt class="hikashop_orderstatus_name"><label
for="data_orderstatus__orderstatus_name"><?php echo
JText::_('HIKA_NAME'); ?></label></dt>
			<dd class="hikashop_orderstatus_name"><input
type="text" id="data_orderstatus__orderstatus_name"
name="data[orderstatus][orderstatus_name]" value="<?php
echo $this->escape(@$this->element->orderstatus_name);
?>"/></dd>

<?php if(empty($this->element->orderstatus_id)) { ?>
			<dt class="hikashop_orderstatus_namekey"><label
for="data_orderstatus__orderstatus_namekey"><?php echo
JText::_('HIKA_NAMEKEY'); ?></label></dt>
			<dd class="hikashop_orderstatus_namekey"><input
type="text" id="data_orderstatus__orderstatus_namekey"
name="data[orderstatus][orderstatus_namekey]"
value="<?php echo
$this->escape(@$this->element->orderstatus_namekey);
?>"/></dd>
<?php } else { ?>
			<dt
class="hikashop_orderstatus_namekey"><label><?php
echo JText::_('HIKA_NAMEKEY'); ?></label></dt>
			<dd class="hikashop_orderstatus_namekey"><?php echo
@$this->element->orderstatus_namekey; ?></dd>
<?php } ?>
			<dt
class="hikashop_orderstatus_color"><label><?php echo
JText::_('BOX_COLOR'); ?></label></dt>
			<dd class="hikashop_orderstatus_color"><?php echo
$this->colorType->displayAll('','data[orderstatus][orderstatus_color]',@$this->element->orderstatus_color);
?></dd>

			<dt
class="hikashop_orderstatus_published"><label><?php
echo JText::_('HIKA_PUBLISHED'); ?></label></dt>
			<dd class="hikashop_orderstatus_published"><?php echo
JHTML::_('hikaselect.booleanlist',
"data[orderstatus][orderstatus_published]" , '',
@$this->element->orderstatus_published); ?></dd>

		</dl>
	</div></div>

	<div class="hkc-lg-6 hikashop_tile_block"><div>
		<div class="hikashop_tile_title"><?php
			echo JText::_('HIKA_DESCRIPTION');
		?></div>
		<?php echo $this->editor->display(); ?>
		<div style="clear:both"></div>
	</div></div>
</div>

	<div style="clear:both"
class="clr"></div>
	<input type="hidden" name="cid"
value="<?php echo @$this->element->orderstatus_id;
?>"/>
	<input type="hidden"
name="data[orderstatus][orderstatus_id]" value="<?php
echo @$this->element->orderstatus_id; ?>"/>
	<input type="hidden" name="option"
value="<?php echo HIKASHOP_COMPONENT; ?>"/>
	<input type="hidden" name="task"
value=""/>
	<input type="hidden" name="ctrl"
value="orderstatus"/>
	<?php echo JHTML::_('form.token'); ?>
</form>
orderstatus/tmpl/index.html000064400000000034151162050350012067
0orderstatus/index.html000064400000000034151162050350011113
0ustar00orderstatus/tmpl/listing.phporderstatus/tmpl/form.php000064400000006010151162050350011546
0ustar00orderstatus/index.html000064400000000034151162050350011113
0ustar00nclick="hikashop.checkAll(thorderstatus/tmpl/form.php000064400000006010151162050350011546
0ustar00Info->filter->order->value );
				?></th>
				<th class="title"><?php
					echo JHTML::_('grid.sort', JText::_('ID'),
'o.orderstatus_id',
$this->pageInfo->filter->order->dir,
$this->pageInfo->filter->order->value );
				?></th>
			</tr>
		</thead>
		<tfoot>
			<tr>
				<td colspan="<?php echo 7 +
count($this->orderstatus_columns); ?>">
					<?php echo $this->pagination->getListFooter(); ?>
					<?php echo $this->pagination->getResultsCounter(); ?>
				</td>
			</tr>
		</tfoot>
		<tbody>
<?php
	$k = 0;
	$i = 0;
	$nbRows = count($this->rows);
	foreach($this->rows as $row) {
		$publishedid =
'orderstatus_published-'.$row->orderstatus_id;
		$attributes = '';
		if(!empty($this->orderStatuses[$row->orderstatus_namekey]->orderstatus_color))
			$attributes .= '
style="background-color:'.$this->orderStatuses[$row->orderstatus_namekey]->orderstatus_color.';"';
?>
			<tr class="row<?php echo $k; ?>"<?php echo
$attributes; ?>>
				<td style="text-align:center"><?php
					echo $this->pagination->getRowOffset($i);
				?></td>
				<td style="text-align:center"><?php
					echo JHTML::_('grid.id', $i, $row->orderstatus_id);
				?></td>
				<td>
<?php if($this->manage) { ?>
					<a href="<?php echo
hikashop_completeLink('orderstatus&task=edit&cid='.(int)$row->orderstatus_id);
?>" title="<?php echo JText::_('HIKA_EDIT');
?>">
						<i class="fas fa-pen"></i>
					</a>
<?php } ?>
				</td>
				<td>
<?php if($this->manage) { ?>
					<a href="<?php echo
hikashop_completeLink('orderstatus&task=edit&corderstatus/tmpl/index.html000064400000000034151162050350012067
0ustar00span><?php echo
$this->paginorderstatus/tmpl/listing.php000064400000014377151162050350012273
0ustar00orderstatus/tmpl/index.html000064400000000034151162050350012067
0ustar00="hidden"
name="filter_orderorderstatus/tmpl/listing.php000064400000014377151162050350012273
0ustar00<?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 OrderstatusViewOrderstatus extends hikashopView
{
	var $type = '';
	var $ctrl = 'orderstatus';
	var $nameListing = 'HIKA_ORDERSTATUSES';
	var $nameForm = 'HIKA_ORDERSTATUS';
	var $icon = 'tasks';
	var $triggerView = true;

	public function display($tpl = null) {
		$this->paramBase =
HIKASHOP_COMPONENT.'.'.$this->getName();
		$function = $this->getLayout();
		if(method_exists($this,$function))
			$this->$function();
		parent::display($tpl);
	}

	public function listing() {
		$app = JFactory::getApplication();
		$db = JFactory::getDBO();
		$config = hikashop_config();

		$this->loadRef(array(
			'toggleHelper' => 'helper.toggle'
		));

		$pageInfo = $this->getPageInfo('o.orderstatus_ordering');

		$filters = array();
		$order = '';
		$searchMap = array('o.orderstatus_id',
'o.orderstatus_name', 'o.orderstatus_namekey',
'o.orderstatus_description');

		$this->processFilters($filters, $order, $searchMap);
		$query = ' FROM ' .
hikashop_table('orderstatus').' AS o ' . $filters .
$order;
		$this->getPageInfoTotal($query, '*');
		$db->setQuery('SELECT o.*' . $query,
$pageInfo->limit->start, $pageInfo->limit->value);
		$rows = $db->loadObjectList();

		if(!empty($pageInfo->search)) {
			$rows = hikashop_search($pageInfo->search, $rows,
array('orderstatus_id', 'orderstatus_namekey',
'orderstatus_published', 'orderstatus_ordering',
'orderstatus_email_params',
'orderstatus_links_params'));
		}


		$orderstatusClass = hikashop_get('class.orderstatus');
		$this->orderStatuses = $orderstatusClass->getList();
		$this->colors = true;
		foreach($this->orderStatuses as $status) {
			if(!empty($status->orderstatus_color)) {
				$this->colors = true;
				break;
			}
		}

		$this->assignRef('rows', $rows);

		$orderstatus_columns = array(
			'created' => array(
				'text' => JText::_('CREATED'),
				'title' => JText::_('DEFAULT_ORDER_STATUS'),
				'description' => JText::_('CREATED_DESC'),
				'key' => 'order_created_status',
				'default' => 'created',
				'type' => 'radio'
			),
			'unpaid' => array(
				'text' => JText::_('UNPAID'),
				'title' => JText::_('UNPAID_ORDER_STATUSES'),
				'description' => JText::_('UNPAID_DESC'),
				'key' => 'order_unpaid_statuses',
				'default' => 'created',
				'type' => 'toggle'
			),
			'cancellable' => array(
				'text' => JText::_('CANCELLABLE'),
				'title' =>
JText::_('CANCELLABLE_ORDER_STATUS'),
				'description' => JText::_('CANCELLABLE_DESC'),
				'key' => 'cancellable_order_status',
				'default' => '',
				'type' => 'toggle'
			),
			'cancelled' => array(
				'text' => JText::_('CANCELLED'),
				'title' => JText::_('CANCELLED_ORDER_STATUS'),
				'description' => JText::_('CANCELLED_DESC'),
				'key' => 'cancelled_order_status',
				'default' => '',
				'type' => 'toggle'
			),
			'capture' => array(
				'text' => JText::_('CAPTURE'),
				'title' =>
JText::_('PAYMENT_CAPTURE_ORDER_STATUS'),
				'description' => JText::_('CAPTURE_DESC'),
				'key' => 'payment_capture_order_status',
				'default' => '',
				'type' => 'toggle'
			),
			'confirmed' => array(
				'text' => JText::_('CONFIRMED'),
				'title' => JText::_('CONFIRMED_ORDER_STATUS'),
				'description' => JText::_('CONFIRMED_DESC'),
				'key' => 'order_confirmed_status',
				'default' => 'confirmed,shipped',
				'type' => 'radio'
			),
			'invoice' => array(
				'text' => JText::_('INVOICE'),
				'title' => JText::_('INVOICE_ORDER_STATUSES'),
				'description' => JText::_('INVOICE_DESC'),
				'key' => 'invoice_order_statuses',
				'default' => 'confirmed,shipped',
				'type' => 'toggle'
			),
		);

		if(hikashop_level(1)){
			$orderstatus_columns['print'] = array(
				'text' => JText::_('PRINT_INVOICE'),
				'title' => JText::_('PRINT_ORDER_STATUSES'),
				'description' => JText::_('PRINT_DESC'),
				'key' => 'print_invoice_statuses',
				'default' => 'confirmed,shipped,refunded',
				'type' => 'toggle'
			);
		}
		$orderstatus_columns['download'] = array(
			'text' => JText::_('DOWNLOAD'),
			'title' =>
JText::_('ORDER_STATUS_FOR_DOWNLOAD'),
			'description' => JText::_('DOWNLOAD_DESC'),
			'key' => 'order_status_for_download',
			'default' => 'confirmed,shipped',
			'type' => 'toggle'
		);


		if(!$config->get('legacy_widgets',0)){
			$orderstatus_columns['statistics'] = array(
				'text' => JText::_('HIKA_STATISTICS'),
				'title' => JText::_('STATISTICS_ORDER_STATUS'),
				'description' => JText::_('STATISTICS_DESC'),
				'key' => 'stats_valid_order_statuses',
				'dorderstatus/view.html.php000064400000016741151162050350011560
0ustar00			$orderstatus_columns[$key]['trigger'] =
'fct.configstatus';
		}

		foreach($rows as &$row) {
			$row->columns = $columns;
			foreach($orderstatus_columns as $key => $column) {
				if(!empty($column['key']) &&
in_array($row->orderstatus_namekey, explode(',',
$config->get($column['key'], $column['default']))))
					$row->columns[$key] = true;
				if(empty($column['key']) &&
in_array($row->orderstatus_namekey, explode(',',
$column['default'])))
					$row->columns[$key] = true;
			}
		}
		unset($row);

		$this->getPagination();
		$this->getOrdering('o.orderstatus_ordering', true);

		hikashop_setTitle(JText::_($this->nameListing), $this->icon,
$this->ctrl);

		$manage = array(
			'edit' =>
hikashop_isAllowed($config->get('acl_orderstatus_orderstatus/view.html.php000064400000016741151162050350011560
0ustar00rType' => 'type.color',
		));
		$this->editor->name = 'orderstatus_description';
		$this->editor->content = @$element->orderstatus_description;

		$title = JText::_($this->nameForm);
		if(!empty($element->orderstatus_name))
			$title .= ': '.$element->orderstatus_name;
		hikashop_setTitle($title, $this->icon, $this->ctrl);

		$this->toolbar = array(
			'save-group',
			'cancel',
			'|',
			array('name' => 'pophelp', 'target'
=> $this->ctrl.'-form')
		);
	}
}
plugins/index.html000064400000000032151162050350010213
0ustar00<html><body></body></html>plugins/tmpl/edit_translation.php000064400000005261151162050350013257
0ustar00<?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');
?><fieldset>
	<div class="toolbar" id="toolbar"
style="float: right;">
		<button class="btn" type="button"
onclick="submitbutton('save_translation');"><img
src="<?php echo HIKASHOP_IMAGES; ?>save.png"/><?php
echo JText::_('OK'); ?></button>
	</div>
</fieldset>
<div class="iframedoc"
id="iframedoc"></div>
<form action="index.php?option=<?php echo HIKASHOP_COMPONENT
?>&amp;ctrl=plugins" method="post" 
name="adminForm" id="adminForm"
enctype="multipart/form-data">

<?php
	$type=$this->plugin_type;
	$id_field = $type.'_id';
	echo $this->tabs->startPane( 'translations');
		if(!empty($this->element->translations)){
			foreach($this->element->translations as $language_id =>
$translation){
				$plugin_name = $type.'_name';
				$plugin_name_input =$plugin_name.'_input';
				$plugin_description = $type.'_description';
				$this->$plugin_name_input =
"translation[".$plugin_name."][".$language_id."]";
				$this->element->$plugin_name =
@$translation->$plugin_name->value;
				$this->editor->name =
'translation_'.$type.'_description_'.$language_id;
				$this->element->$plugin_description =
@$translation->$plugin_description->value;
				$plugin_name_published = $plugin_name.'_published';
				$plugin_name_id = $plugin_name.'_id';
				if(isset($translation->$plugin_name->published)){
					$this->$plugin_name_published =
$translation->$plugin_name->published;
					$this->$plugin_name_id = $translation->$plugin_name->id;
				}
				$plugin_description_published =
$plugin_description.'_published';
				$plugin_description_id = $plugin_description.'_id';
				if(isset($translation->$plugin_description->published)){
					$this->$plugin_description_published =
$translation->$plugin_description->published;
					$this->$plugin_description_id =
$translation->$plugin_description->id;
				}
				echo
$this->tabs->startPanel($this->transHelper->getFlag($language_id),
'translation_'.$language_id);
					$this->setLayout('normal');
					echo $this->loadTemplate();
				echo $this->tabs->endPanel();
			}
		}
	echo $this->tabs->endPane();
?>
	<input type="hidden" name="cid"
value="<?php echo $this->element->$id_field;?>"/>
	<input type="hidden" name="type"
value="<?php echo $type;?>"/>
	<input type="hidden" name="ctrl"
value="plugins" />
	<input type="hidden" name="option"
value="<?php echo HIKASHOP_COMPONENT; ?>" />
	<input type="hidden" name="task" value=""
/>
	<?php echo JHTML::_( 'form.token' ); ?>
</form>
plugins/tmpl/form.php000064400000064305151162050350010663 0ustar00<?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');
?><div class="iframedoc"
id="iframedoc"></div>
<div>
	<form action="index.php?option=<?php echo HIKASHOP_COMPONENT;
?>&amp;ctrl=plugins" method="post" 
name="adminForm" id="adminForm"
enctype="multipart/foplugins/index.html000064400000000032151162050350010213
0ustar00="page-plugins">
	<table
plugins/tmpl/edit_translation.php000064400000005261151162050350013257
0ustar00plugins/index.html000064400000000032151162050350010213
0ustar00->popup->display(
							plugins/tmpl/edit_translation.php000064400000005261151162050350013257
0ustar00pe="text"
name="data[payment][payment_params][payment_percentage]"
value="<?php echo
(float)@$this->element->payment_params->payment_percentage;
?>" />%
					</td>
				</tr>
<?php
	}
	if($this->plugin_type == 'shipping' &&
$this->multiple_interface) {
?>
				<tr>
					<td class="key">
						<label for="data[shipping][shipping_price]"><?php
							echo JText::_('PRICE');
						?></label>
					</td>
					<td>
						<input type="text"
name="data[shipping][shipping_price]" value="<?php echo
@$this->element->shipping_price; ?>" /><?php echo
$this->data['currency']->display('data[shipping][shipping_currency_id]',@$this->element->shipping_currency_id);
?>
					</td>
				</tr>
				<tr>
					<td class="key">
						<label
for="data[shipping][shipping_price][shipping_percentage]"><?php
							echo JText::_('DISCOUNT_PERCENT_AMOUNT');
						?></label>
					</td>
					<td>
						<input type="text"
name="data[shipping][shipping_params][shipping_percentage]"
value="<?php echo
(float)@$this->element->shipping_params->shipping_percentage;
?>" />%
					</td>
				</tr>
				<tr>
					<td class="key">
						<label for="shipping_tax_id"><?php
							echo JText::_(
'TAXATION_plugins/tmpl/form.php000064400000064305151162050350010663
0ustar00 if($this->element->shipping_params->shipping_per_product
== false) { echo ' style="display:none;"';}?>>
					<td class="key">
						<label
for="data[shipping][shipping_price_per_product]"><?php
							echo JText::_( 'PRICE_PER_PRODUCT' );
						?></label>
					</td>
					<td>
						<input type="text"
name="data[shipping][shipping_params][shipping_price_per_product]"
value="<?php echo
@$this->element->shipping_params->shipping_price_per_product;
?>" />
					</td>
				</tr>
				<tr>
					<td class="key">
						<label
for="data[shipping][shipping_params][shipping_override_address]"><?php
							echo JText::_( 'OVERRIDE_SHIPPING_ADDRESS' );
						?></label>
					</td>
plugins/tmpl/form.php000064400000064305151162050350010663
0ustar00alue == 4) {
						t.style.display = '';
					} else {
						t.style.display = 'none';
					}
				}
				</script>
				<tr id="hikashop_shipping_override_text"
style="<?php
						$override =
(int)@$this->element->shipping_params->shipping_override_address;
						if( $override != 3 && $override != 4 ) { echo
'display:none;'; }
					?>">
					<td class="key">
						<label
for="data[shipping][shipping_params][shipping_override_address_text]"><?php
							echo JText::_( 'OVERRIDE_SHIPPING_ADDRESS_TEXT' );
						?></label>
					</td>
					<td>
						<textarea
name="data[shipping][shipping_params][shipping_override_address_text]"><?php
							echo
@$this->element->shipping_params->shipping_override_address_text;
						?></textarea>
					</td>
				</tr>
<?php
	}

	if(!empty($this->extra_config)) {
		echo implode("\r\n", $this->extra_config);
	}
?>
			</table>
		</fieldset>
<?php
	if(!empty($this->content)) {
?>
		<fieldset class="adminform">
			<legend><?php echo
JText::_('PLUGIN_SPECIFIC_CONFIGURATION'); ?></legend>
			<table class="admintable table"><?php
				echo $this->content;
			?></table>
		</fieldset>
<?php
	}

	if(!empty($this->extra_blocks)) {
		echo implode("\r\n", $this->extra_blocks);
	}

	if($this->plugin_type == 'payment' || $this->plugin_type
== 'shipping') {
?>
		<fieldset class="adminform">
<?php
		$restriction_fields = array(
			'zone_id',
			'payment_shipping_methods_id',
			'payment_currency',
			array('shipping_params','shipping_warehouse_filter'),
			array('shipping_params','shipping_min_price'),
			array('shipping_params','shipping_max_price'),
			array('shipping_params','shipping_min_weight'),
			array('shipping_params','shipping_max_weight'),
			array('shipping_params','shipping_min_volume'),
			array('shipping_params','shipping_max_volume'),
			array('shipping_params','shipping_zip_prefix'),
			array('shipping_params','shipping_min_zip'),
			array('shipping_params','shipping_max_zip'),
			array('shipping_params','shipping_zip_suffix'),
		);

		$field_style = 'style="display:none;"';
		$checked = '';
		$is_restriction = false;
		foreach($restriction_fields as $f) {
			$e = $this->element;
			if(is_array($f)) {
				$g = $f[0];
				$f = $f[1];
				if(!empty($g)) {
					if(isset($this->element->$g))
						$e = $this->element->$g;
					else
						continue;
				}
			}
			if(!empty($e->$f)) {
				if(is_array($e->$f)) {
					if(count($e->$f) > 1 || (count($e->$f) == 1 &&
reset($e->$f) != '')) {
						$is_restriction = true;
						break;
					}
				} else {
					$is_restriction = true;
					break;
				}
			}
		}
		if($is_restriction) {
			$field_style = '';
			$checked='checked';
		}
?>
			<legend><input type="checkbox"
id="restrictions_checkbox" name="restrictions_checkbox"
onchange="var display_fieldset ='none'; if(this.checked){
display_fieldset = 'block'; }
document.getElementById('restrictions').style.display=display_fieldset;"
<?php echo $checked;?> /><label
style="cursor:pointer;"
for="restrictions_checkbox"><?php echo
JText::_('HIKA_RESTRICTIONS');
?></label></legend>
			<div id="restrictions" <?php echo $field_style;
?>>
				<table class="admintable table">
					<tr>
						<td class="key"><?php echo
JText::_('ZONE'); ?></td>
						<td>
							<span id="zone_id"><?php
								echo @$this->element->zone_id.'
'.@$this->element->zone_name_english;
								$plugin_zone_namekey = $type.'_zone_namekey';
							?><input type="hidden" name="data[<?php echo
$type;?>][<?php echo $type;?>_zone_namekey]"
value="<?php echo @$this->element->$plugin_zone_namekey;
?>" />
							</span><?php
								echo $this->popup->display(
									'<img src="'.
HIKASHOP_IMAGES.'edit.png"
alt="'.JText::_('HIKA_EDIT').'"/>',
									'ZONE',
									
hikashop_completeLink("zone&task=selectchildlisting&type=".$type,true
),
									'zone_id_link',
									760, 480, '', '', 'link'
								);
							?><a href="#"
onclick="document.getElementById('zone_id').innerHTML='<input
type=\'hidden\' name=\'data[<?php echo
$type;?>][<?php echo $type;?>_zone_namekey]\'
value=\'\' />';return false;" >
								<img src="<?php echo HIKASHOP_IMAGES;
?>delete.png" alt="delete"/>
							</a>
						</td>
					</tr>
<?php
		if($this->plugin_type == 'payment') {
?>
					<tr>
						<td class="key"><?php echo
JText::_('HIKASHOP_SHIPPING_METHOD'); ?></td>
						<td><?php
							echo
$this->shippingMethods->display('data[payment][payment_shipping_methods][]',@$this->element->payment_shipping_methods_type,@$this->element->payment_shipping_methods_id,true,'multiple="multiple"
size="3"');
			if(!HIKASHOP_BACK_RESPONSIVE) {
						?><br/><a href="javascript:void(0)"
onclick="selectNone('datapaymentpayment_shipping_methods');"><?php
echo JText::_('HIKA_NO_RESCTION'); ?></a>
<?php
			}
?>
						</td>
					</tr>
					<tr>
						<td class="key"><?php
							echo JText::_('CURRENCY');
						?></td>
						<td><?php
							echo
$this->currencies->display('data[payment][payment_currency][]',
@$this->element->payment_currency,
'multiple="multiple" size="3"');
			if(!HIKASHOP_BACK_RESPONSIVE) {
						?><br/><a href="javascript:void(0)"
onclick="selectNone('datapaymentpayment_currency');"><?php
echo JText::_('HIKA_NO_RESCTION'); ?></a>
<?php
			}
?>
						</td>
					</tr>
<?php
		}

		if($this->plugin_type == 'shipping' &&
$this->multiple_interface) {
?>
				<tr>
					<td class="key">
						<label
for="data[shipping][shipping_params][shipping_warehouse_filter]"><?php
							echo JText::_('WAREHOUSE');
						?></label>
					</td>
					<td>
						<input type="text"
name="data[shipping][shipping_params][shipping_warehouse_filter]"
value="<?php echo
@$this->element->shipping_params->shipping_warehouse_filter;
?>" />
					</td>
				</tr>
				<tr>
					<td class="key">
						<label
for="data[shipping][shipping_params][shipping_min_price]"><?php
							echo JText::_('SHIPPING_MIN_PRICE');
						?></label>
					</td>
					<td>
						<input type="text"
name="data[shipping][shipping_params][shipping_min_price]"
value="<?php echo
@$this->element->shipping_params->shipping_min_price; ?>"
/>
					</td>
				</tr>
				<tr>
					<td class="key">
						<label
for="data[shipping][shipping_params][shipping_max_price]"><?php
							echo JText::_( 'SHIPPING_MAX_PRICE' );
						?></label>
					</td>
					<td>
						<input type="text"
name="data[shipping][shipping_params][shipping_max_price]"
value="<?php echo
@$this->element->shipping_params->shipping_max_price; ?>"
/>
					</td>
				</tr>
				<tr>
					<td class="key">
						<label
for="data[shipping][shipping_params][shipping_virtual_included]"><?php
echo JText::_( 'INCLUDE_VIRTUAL_PRODUCTS_PRICE' );
?></label>
					</td>
					<td><?php
						if(!isset($this->element->shipping_params->shipping_virtual_included)){
							$config = hikashop_config();
							$this->element->shipping_params->shipping_virtual_included
= $config->get('force_shipping',1);
						}
						echo JHTML::_('hikaselect.booleanlist',
"data[shipping][shipping_params][shipping_virtual_included]" ,
'',$this->element->shipping_params->shipping_virtual_included);
					?></td>
				</tr>
				<tr>
					<td class="key">
						<label
for="data[shipping][shipping_params][shipping_price_use_tax]"><?php
							echo JText::_('WITH_TAX');
						?></label>
					</td>
					<td>
						<?php
						if(!isset($this->element->shipping_params->shipping_price_use_tax))
$this->element->shipping_params->shipping_price_use_tax=1;
						echo JHTML::_('hikaselect.booleanlist',
"data[shipping][shipping_params][shipping_price_use_tax]" ,
'',
$this->element->shipping_params->shipping_price_use_tax); ?>
					</td>
				</tr>
				<tr>
					<td class="key">
						<label
for="data[shipping][shipping_params][shipping_min_quantity]"><?php
							echo JText::_('SHIPPING_MIN_QUANTITY');
						?></label>
					</td>
					<td>
						<input type="text"
name="data[shipping][shipping_params][shipping_min_quantity]"
value="<?php echo
@$this->element->shipping_params->shipping_min_quantity;
?>"/>
					</td>
				</tr>
				<tr>
					<td class="key">
						<label
for="data[shipping][shipping_params][shipping_max_quantity]"><?php
							echo JText::_('SHIPPING_MAX_QUANTITY');
						?></label>
					</td>
					<td>
						<input type="text"
name="data[shipping][shipping_params][shipping_max_quantity]"
value="<?php echo
@$this->element->shipping_params->shipping_max_quantity;
?>"/>
					</td>
				</tr>
				<tr>
					<td class="key">
						<label
for="data[shipping][shipping_params][shipping_min_weight]"><?php
							echo JText::_('SHIPPING_MIN_WEIGHT');
						?></label>
					</td>
					<td>
						<input type="text"
name="data[shipping][shipping_params][shipping_min_weight]"
value="<?php echo
@$this->element->shipping_params->shipping_min_weight;
?>"/>
						<?php
							echo
$this->data['weight']->display('data[shipping][shipping_params][shipping_weight_unit]',@$this->element->shipping_params->shipping_weight_unit);
						?>
					</td>
				</tr>
				<tr>
					<td class="key">
						<label
for="data[shipping][shipping_params][shipping_max_weight]"><?php
							echo JText::_('SHIPPING_MAX_WEIGHT');
						?></label>
					</td>
					<td>
						<input type="text"
name="data[shipping][shipping_params][shipping_max_weight]"
value="<?php echo
@$this->element->shipping_params->shipping_max_weight;
?>"/>
					</td>
				</tr>
				<tr>
					<td class="key">
						<label
for="data[shipping][shipping_params][shipping_min_volume]"><?php
							echo JText::_('SHIPPING_MIN_VOLUME');
						?></label>
					</td>
					<td>
						<input type="text"
name="data[shipping][shipping_params][shipping_min_volume]"
value="<?php echo
@$this->element->shipping_params->shipping_min_volume;
?>"/>
						<?php
							echo
$this->data['volume']->display('data[shipping][shipping_params][shipping_size_unit]',@$this->element->shipping_params->shipping_size_unit);
						?>
					</td>
				</tr>
				<tr>
					<td class="key">
						<label
for="data[shipping][shipping_params][shipping_max_volume]"><?php
							echo JText::_('SHIPPING_MAX_VOLUME');
						?></label>
					</td>
					<td>
						<input type="text"
name="data[shipping][shipping_params][shipping_max_volume]"
value="<?php echo
@$this->element->shipping_params->shipping_max_volume;
?>"/>
					</td>
				</tr>
<?php
		}

		if($this->plugin_type == 'payment' &&
$this->multiple_interface) {
?>
				<tr>
					<td class="key">
						<label
for="data[payment][payment_params][payment_min_price]"><?php
							echo JText::_('SHIPPING_MIN_PRICE');
						?></label>
					</td>
					<td>
						<input type="text"
name="data[payment][payment_params][payment_min_price]"
value="<?php echo
@$this->element->payment_params->payment_min_price; ?>"
/>
					</td>
				</tr>
				<tr>
					<td class="key">
						<label
for="data[payment][payment_params][payment_max_price]"><?php
							echo JText::_( 'SHIPPING_MAX_PRICE' );
						?></label>
					</td>
					<td>
						<input type="text"
name="data[payment][payment_params][payment_max_price]"
value="<?php echo
@$this->element->payment_params->payment_max_price; ?>"
/>
					</td>
				</tr>
				<tr>
					<td class="key">
						<label
for="data[payment][payment_params][payment_price_use_tax]"><?php
							echo JText::_('WITH_TAX');
						?></label>
					</td>
					<td>
						<?php
						if(!isset($this->element->payment_params->payment_price_use_tax))
$this->element->payment_params->payment_price_use_tax=1;
						echo JHTML::_('hikaselect.booleanlist',
"data[payment][payment_params][payment_price_use_tax]" ,
'',
$this->element->payment_params->payment_price_use_tax); ?>
					</td>
				</tr>
				<tr>
					<td class="key">
						<label
for="data[payment][payment_params][payment_min_quantity]"><?php
							echo JText::_('SHIPPING_MIN_QUANTITY');
						?></label>
					</td>
					<td>
						<input type="text"
name="data[payment][payment_params][payment_min_quantity]"
value="<?php echo
@$this->element->payment_params->payment_min_quantity;
?>"/>
					</td>
				</tr>
				<tr>
					<td class="key">
						<label
for="data[payment][payment_params][payment_max_quantity]"><?php
							echo JText::_('SHIPPING_MAX_QUANTITY');
						?></label>
					</td>
					<td>
						<input type="text"
name="data[payment][payment_params][payment_max_quantity]"
value="<?php echo
@$this->element->payment_params->payment_max_quantity;
?>"/>
					</td>
				</tr>
				<tr>
					<td class="key">
						<label
for="data[payment][payment_params][payment_min_weight]"><?php
							echo JText::_('SHIPPING_MIN_WEIGHT');
						?></label>
					</td>
					<td>
						<input type="text"
name="data[payment][payment_params][payment_min_weight]"
value="<?php echo
@$this->element->payment_params->payment_min_weight;
?>"/>
						<?php
							echo
$this->data['weight']->display('data[payment][payment_params][payment_weight_unit]',@$this->element->payment_params->payment_weight_unit);
						?>
					</td>
				</tr>
				<tr>
					<td class="key">
						<label
for="data[payment][payment_params][payment_max_weight]"><?php
							echo JText::_('SHIPPING_MAX_WEIGHT');
						?></label>
					</td>
					<td>
						<input type="text"
name="data[payment][payment_params][payment_max_weight]"
value="<?php echo
@$this->element->payment_params->payment_max_weight;
?>"/>
					</td>
				</tr>
				<tr>
					<td class="key">
						<label
for="data[payment][payment_params][payment_min_volume]"><?php
							echo JText::_('SHIPPING_MIN_VOLUME');
						?></label>
					</td>
					<td>
						<input type="text"
name="data[payment][payment_params][payment_min_volume]"
value="<?php echo
@$this->element->payment_params->payment_min_volume;
?>"/>
						<?php
							echo
$this->data['volume']->display('data[payment][payment_params][payment_size_unit]',@$this->element->payment_params->payment_size_unit);
						?>
					</td>
				</tr>
				<tr>
					<td class="key">
						<label
for="data[payment][payment_params][payment_max_volume]"><?php
							echo JText::_('SHIPPING_MAX_VOLUME');
						?></label>
					</td>
					<td>
						<input type="text"
name="data[payment][payment_params][payment_max_volume]"
value="<?php echo
@$this->element->payment_params->payment_max_volume;
?>"/>
					</td>
				</tr>
<?php
		}


		if($this->plugin_type == 'shipping') {
?>
				<tr>
					<td class="key">
						<label
for="data[shipping][shipping_params][shipping_zip_prefix]"><?php
							echo JText::_('SHIPPING_PREFIX');
						?></label>
					</td>
					<td>
						<input type="text"
name="data[shipping][shipping_params][shipping_zip_prefix]"
value="<?php echo
@$this->element->shipping_params->shipping_zip_prefix;
?>"/>
					</td>
				</tr>
				<tr>
					<td class="key">
						<label
for="data[shipping][shipping_params][shipping_min_zip]"><?php
							echo JText::_('SHIPPING_MIN_ZIP');
						?></label>
					</td>
					<td>
						<input type="text"
name="data[shipping][shipping_params][shipping_min_zip]"
value="<?php echo
@$this->element->shipping_params->shipping_min_zip;
?>"/>
					</td>
				</tr>
				<tr>
					<td class="key">
						<label
for="data[shipping][shipping_params][shipping_max_zip]"><?php
							echo JText::_('SHIPPING_MAX_ZIP');
						?></label>
					</td>
					<td>
						<input type="text"
name="data[shipping][shipping_params][shipping_max_zip]"
value="<?php echo
@$this->element->shipping_params->shipping_max_zip;
?>"/>
					</td>
				</tr>
				<tr>
					<td class="key">
						<label
for="data[shipping][shipping_params][shipping_zip_suffix]"><?php
							echo JText::_('SHIPPING_SUFFIX');
						?></label>
					</td>
					<td>
						<input type="text"
name="data[shipping][shipping_params][shipping_zip_suffix]"
value="<?php echo
@$this->element->shipping_params->shipping_zip_suffix;
?>"/>
					</td>
				</tr>
<?php
		}
		if($this->plugin_type == 'payment') {
?>
				<tr>
					<td class="key">
						<label
for="data[payment][payment_params][payment_zip_prefix]"><?php
							echo JText::_('SHIPPING_PREFIX');
						?></label>
					</td>
					<td>
						<input type="text"
name="data[payment][payment_params][payment_zip_prefix]"
value="<?php echo
@$this->element->payment_params->payment_zip_prefix;
?>"/>
					</td>
				</tr>
				<tr>
					<td class="key">
						<label
for="data[payment][payment_params][payment_min_zip]"><?php
							echo JText::_('SHIPPING_MIN_ZIP');
						?></label>
					</td>
					<td>
						<input type="text"
name="data[payment][payment_params][payment_min_zip]"
value="<?php echo
@$this->element->payment_params->payment_min_zip;
?>"/>
					</td>
				</tr>
				<tr>
					<td class="key">
						<label
for="data[payment][payment_params][payment_max_zip]"><?php
							echo JText::_('SHIPPING_MAX_ZIP');
						?></label>
					</td>
					<td>
						<input type="text"
name="data[payment][payment_params][payment_max_zip]"
value="<?php echo
@$this->element->payment_params->payment_max_zip;
?>"/>
					</td>
				</tr>
				<tr>
					<td class="key">
						<label
for="data[payment][payment_params][payment_zip_suffix]"><?php
							echo JText::_('SHIPPING_SUFFIX');
						?></label>
					</td>
					<td>
						<input type="text"
name="data[payment][payment_params][payment_zip_suffix]"
value="<?php echo
@$this->element->payment_params->payment_zip_suffix;
?>"/>
					</td>
				</tr>
<?php
		}
?>
				</table>
			</div>
		</fieldset>
<?php
	}
?>
		<fieldset class="adminform">
			<legend><?php echo JText::_('ACCESS_LEVEL');
?></legend>
<?php
	if(hikashop_level(2)) {
		$acltype = hikashop_get('type.acl');
		$access = $type.'_access';
		echo $acltype->display($access, @$this->element->$access,
$type);
	} else {
		echo '<small
style="color:red">'.JText::_('ONLY_FROM_BUSINESS').'</small>';
	}
?>
		</fieldset>
<?php
	if(!HIKASHOP_BACK_RESPONSIVE) {
?>
		</td>
	</tr>
	</table>
</div>
<script>
function selectNone(name) {
	var el = document.getElementById(name);
	if(!el) return false;
	for (var i = 0; i < el.options.length; i++) {
		el.options[i].selected = false;
	}
}
function hikashop_switch_tr(el, name, num) {
	var d = document, s = (el.value == '1');
	if(!el.checked) { s = !s; }
	if(num === undefined) {
		var e = d.getElementById(name);
		if(!e) return;
		e.style.display = (s?'':'none');
		return;
	}
	var e = null;
	for(var i = num; i >= 0; i--) {
		var e = d.getElementById(name + i);
		if(e) {
			e.style.display = (s?'':'none');
		}
	}
}
</script>
<?php
	} else {
?>
	</div>
</div>
<?php
	}
?>
		<input type="hidden" name="data[<?php echo
$type;?>][<?php echo $type;?>_id]" value="<?php echo
$this->id;?>"/>
		<input type="hidden" name="data[<?php echo
$type;?>][<?php echo $type;?>_type]" value="<?php
echo $this->name;?>"/>
		<input type="hidden" name="task"
value="save"/>
<?php
}
?>
		<input type="hidden" name="name"
value="<?php echo $this->name;?>"/>
		<input type="hidden" name="subtask"
value="<?php echo JRequest::getVar('subtask',
'');?>"/>
		<input type="hidden" name="ctrl"
value="plugins" />
		<input type="hidden" name="plugin_type"
value="<?php echo $this->plugin_type;?>" />
		<input type="hidden" name="<?php echo
$this->plugin_type; ?>_plugin_type" value="<?php echo
$this->name; ?>"/>
		<input type="hidden" name="option"
value="<?php echo HIKASHOP_COMPONENT; ?>" />
		<?php echo JHTML::_('form.token'); ?>
	</form>
</div>
plugins/tmpl/index.html000064400000000032151162050350011167
0ustar00<html><body></body></html>plugins/tmpl/listing.php000064400000014031151162050350011360
0ustar00<?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');
?><div class="iframedoc"
id="iframedoc"></div>
<?php if(!empty($this->filters)) { ?>
	<div style="float:right"><?php echo implode('
', $this->filters); ?></div>
	<div style="clear:right"></div>
<?php } ?>
<form action="index.php?option=<?php echo HIKASHOP_COMPONENT;
?>&amp;ctrl=plugins&plugin_type=<?php echo
$this->plugin_type;?>" method="post" 
name="adminForm" id="adminForm"
enctype="multipart/form-data">
	<table>
		<tr>
			<td width="100%">
				<?php echo JText::_( 'FILTER' ); ?>:
				<input type="text" name="search"
id="search" value="<?php echo
$this->escape($this->pageInfo->search);?>"
class="text_area" />
				<button class="btn"
onclick="document.adminForm.limitstart.value=0;this.form.submit();"><?php
echo JText::_( 'GO' ); ?></button>
				<button class="btn"
onclick="document.adminForm.limitstart.value=0;document.getElementById('search').value='';this.form.submit();"><?php
echo JText::_( 'RESET' ); ?></button>
			</td>
			<td nowrap="nowrap">
<?php
				if(!empty($this->extrafilters)) {
					foreach($this->extrafilters as $name => $filterObj) {
						echo $filterObj->displayFilter($name,
$this->pageInfo->filter);
					}
				}
?>
			</td>
		</tr>
	</table>
<?php $cols = 7; ?>
<table class="adminlist table table-striped"
cellpadding="1">
	<thead>
		<tr>
			<th class="title titlenum"><?php echo
JText::_('HIKA_NUM');?></th>
			<th class="title titlebox">
				<input type="checkbox" name="toggle"
value="" onclick="hikashop.checkAll(this);" />
			</th>
			<th class="title"><?php echo
JText::_('HIKA_NAME');?></th>
<?php
	if(!empty($this->listing_columns)) {
		foreach($this->listing_columns as $key => $column) {
			$cols++;
?>			<th class="title"><?php echo
JText::_($column['name']);?></th>
<?php
		}
	}
?>
			<th class="title"><?php echo
JText::_('HIKA_TYPE');?></th>
			<th class="title titleorder"
style="width:10%;"><?php
				if($this->ordering->ordering)
					echo JHTML::_('grid.order',  $this->rows);
				echo JText::_( 'HIKA_ORDER' );
			?></th>
			<th class="title" style="width:2%;"><?php
echo JText::_('HIKA_DELETE');?></th>
			<th class="title" style="width:2%;"><?php
echo JText::_('HIKA_PUBLISHED');?></th>
		</tr>
	</thead>
	<tfoot>
		<tr>
			<td colspan="<?php echo $cols; ?>">
				<?php echo $this->pagination->getListFooter(); ?>
				<?php echo $this->pagination->getResultsCounter(); ?>
			</td>
		</tr>
	</tfoot>
	<tbody>
<?php
$p_id = $this->plugin_type.'_id';
$p_name = $this->plugin_type.'_name';
$p_order = $this->plugin_type.'_ordering';
$p_published = $this->plugin_type.'_published';
$p_type = $this->plugin_type.'_type';

if(empty($this->rows))
	$this->rows = array();

$k = 0;
$i = 0;
$count = count($this->rows);
if(!empty($this->rows)) {
	foreach($this->rows as $plugin_id => $plugin){
		$published_id = $this->plugin_type.'_published-' .
$plugin->$p_id;
		$id = $this->plugin_type.'_' . $plugin->$p_id;

		$currentPlugin = null;
		if(isset($this->plugins[ $plugin->$p_type ])) {
			$currentPlugin = $this->plugins[ $plugin->$p_type ];
			$plugin->$p_published = $plugin->$p_published &&
$currentPlugin->published;
		}
?>
		<tr class="row<?php echo $k;?>" id="<?php echo
$id;?>">
			<td align="center"><?php
				echo $i+1;
			?></td>
			<td align="center"><?php
				echo JHTML::_('grid.id', $i, $plugin->$p_id );
			?></td>
			<td>
				<a href="<?php echo
hikashop_completeLink('plugins&plugin_type='.$this->plugin_type.'&task=edit&name='.
$plugin->$p_typplugins/tmpl/index.html000064400000000032151162050350011167
0ustar00order),
							$this->ordplugins/tmpl/listing.php000064400000014031151162050350011360
0ustar00plugins/tmpl/index.html000064400000000032151162050350011167
0ustar00m.token' ); ?>
</form>
plugins/tmpl/listing.php000064400000014031151162050350011360
0ustar00<?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
$type = $this->plugin_type;
$upType = strtoupper($type);
$plugin_name = $type.'_name';
$plugin_published = $type.'_published';
$plugin_name_input =$plugin_name.'_input';
$plugin_description = $type.'_description';
$plugin_name_published = $plugin_name.'_published';
$plugin_name_id = $plugin_name.'_id';
$plugin_description_published =
$plugin_description.'_published';
$plugin_description_id = $plugin_description.'_id';
?>
<table class="admintable" style="width:100%">
	<tr>
		<td class="key"><?php
			echo JText::_( 'HIKA_NAME' );
		?></td>
		<td>
			<input id="hikashop_plugin_name_field"
type="text" name="<?php echo
$this->$plugin_name_input; ?>" value="<?php echo
$this->escape(@$this->element->$plugin_name); ?>" />
<?php if(isset($this->$plugin_name_published)) {
	$publishedid = 'published-'.$this->$plugin_name_id;
?>
			<span id="<?php echo $publishedid; ?>"
class="spanloading"><?php echo
$this->toggle->toggle($publishedid,(int)
$this->$plugin_name_published,'translation')
?></span>
<?php } ?>
		</td>
	</tr>
	<tr>
		<td class="key"  colspan="2"
width="100%">
			<span style="float:left"><?php echo
JText::_('HIKA_DESCRIPTION'); ?></span>
<?php if(isset($this->$plugin_description_published)){
	$publishedid = 'published-'.$this->$plugin_description_id;
?>
			<span id="<?php echo $publishedid; ?>"
class="spanloading"><?php echo
$this->toggle->toggle($publishedid,(int)
$this->$plugin_description_published,'translation')
?></span>
<?php } ?>
			<br/>
<?php
	$this->editor->content =
@$this->element->$plugin_description;
	echo $this->editor->display();
?>
		</td>
	</tr>
</table>
plugins/tmpl/selectimages.php000064400000005102151162050350012353
0ustar00<?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');
?><script language="javascript"
type="text/javascript">
<!--
	var selectedContents = new Array();
	var allElements = <?php echo count($this->rows);?>;
	<?php
		foreach($this->rows as $oneRow){
			if(!empty($oneRow->selected)){
				echo "selectedContents['".$oneRow->id."'] =
'content';";
			}
		}
	?>
	function applyContent(contentid,rowClass){
		if(selectedContents[contentid]){
			window.document.getElementById('content'+contentid).className
= rowClass;
			delete selectedContents[contentid];
		}else{
			window.document.getElementById('content'+contentid).className
= 'selectedrow';
			selectedContents[contentid] = 'content';
		}
	}

	function insertTag(){
		var tag = '';
		for(var i in selectedContents){
			if(selectedContents[i] == 'content'){
				allElements--;
				if(tag != '') tag += ',';
				tag = tag + i;
			}
		}
		if(allElements == 0) tag = 'All';
		if(allElements == <?php echo count($this->rows);?>) tag =
'None';
		window.top.document.getElementById('plugin_images').value =
tag;
		window.parent.hikashop.closeBox();
	}
//-->
</script>
<style type="text/css">
	table.adminlist tr.selectedrow td{
		background-color:#FDE2BA;
	}
</style>
<form action="index.php?option=<?php echo HIKASHOP_COMPONENT
?>" method="post"  name="adminForm"
id="adminForm">
<div style="float:right;margin-bottom : 10px">
	<button class="btn" id='insertButton'
onclick="insertTag(); return false;"><?php echo
JText::_('HIKA_APPLY'); ?></button>
</div>
<div style="clear:both"/>
	<table class="adminlist table table-striped table-hover"
cellpadding="1">
		<thead>
			<tr>
				<th class="title">
					<?php echo JText::_('HIKA_IMAGE'); ?>
				</th>
				<th class="title">
					<?php echo JText::_('HIKA_NAME'); ?>
				</th>
			</tr>
		</thead>
		<tplugins/tmpl/normal.php000064400000003601151162050350011200
0ustar00plugins/tmpl/selectnew.php000064400000005156151162050350011710
0ustar00<?php
/**
 * @package	Hplugins/tmpl/normal.php000064400000003601151162050350011200
0ustar00" alt="Y"/>';
	$icon_no = '<img src="images/publish_x.png"
alt=""/>';
} else if(!HIKASHOP_J30) {
	$icon_yes = '<img
src="templates/hathor/images/admin/tick.png"
alt="Y"/>';
	$icon_no = '<img
src="templates/hathor/images/admin/publish_x.png"
alt=""/>';
} else {
	$icon_yes = '<span
class="icon-publish"></span>';
	$icon_no = '<span
class="icon-unpublish"></span>';
}

foreach(plugins/tmpl/selectimages.php000064400000005102151162050350012353
0ustar00><?php
				if(empty($row->accepted_currencies) ||
in_array($currency->currency_code, $row->accepted_currencies))
					echo $icon_yes;
				else
					echo $icon_no;
			?></td>
<?php
		}
	}
?>
			<td align="center">
				<span id="<?php echo $publishedid ?>"
class="loading"><?php
					if($this->manage){
						echo
$this->toggleClass->toggle($publishedid,$row->published,'plugins');
					}else{
						$this->toggleClass->display('activate',$row->published);
					}
				?></span>
			</td>
			<td align="center"><?php
				echo $row->id;
			?></td>
		</tr>
<?php
	$k = 1-$k;
}
?>
	</tbody>
</table>
plugins/tmpl/selectimages.php000064400000005102151162050350012353
0ustar00<?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');
?><div class="iframedoc"
id="iframedoc"></div>
<?php if(!empty($this->filters)) { ?>
	<div style="float:right"><?php echo implode('
', $this->filters); ?></div>
	<div style="clear:right"></div>
<?php } ?>
<table class="adminlist table table-striped"
cellpadding="1">
	<thead>
		<tr>
			<th class="title titlenum"><?php echo
JText::_('HIKA_NUM');?></th>
			<th class="title titlebox">
				<input type="checkbox" name="toggle"
value="" onclick="hikashop.checkAll(this);" />
			</th>
			<th class="title"><?php echo
JText::_('HIKA_NAME');?></th>
			<th class="title titleorder"
style="width:10%;"><?php
				if(@$this->data['order']->ordering)
					echo JHTML::_('grid.order',  $this->elements);
				echo JText::_( 'HIKA_ORDER' );
			?></th>
			<th class="title" style="width:2%;"><?php
echo
JText::_('plugins/tmpl/selectnew.php000064400000005156151162050350011710
0ustar00'].'&subtask='.$this->plugin_type.'_edit&'.$p_id.'='.$plugin->$p_id);?>"><?php
echo $plugin->$p_name;?></a>
			</td>
			<td class="order">
				<span><?php
					echo $this->data['pagination']->orderUpIcon(
							$i,
							$this->data['order']->reverse XOR
($plugin->$p_order >= @$plugins[$i-1]->$p_order),
							$this->data['order']->orderUp,
							'Move Up',
							$this->data['order']->ordering
						);
				?></span>
				<span><?php
					echo $this->data['pagination']->orderDownIcon(
							$i,
							$a,
							$this->data['order']->reverse XOR
($plugiplugins/tmpl/selectnew.php000064400000005156151162050350011710
0ustar00
<input type="hidden" name="option"
value="<?php echo HIKASHOP_COMPONENT;?>" />
<input type="hidden" name="task"
value="edit"/>
plugins/tmpl/translation.php000064400000005303151162050350012247
0ustar00<?php
/**
 * @package	HikaShop for Joomla!
 * @version	2.2.3
 * @author	hikashop.com
 * @copyright	(C)
20plugins/tmpl/sublisting.php000064400000007202151162050350012074
0ustar00ho
$this->tabs->startPanel(JText::_('MAIN_INFORMATION'),
'main_translation');
			$this->setLayout('normal');
			echo $this->loadTemplate();
		echo $this->tabs->endPanel();
		if($this->config->get('multilang_display')!='popups'
&& !empty($this->element->translations)){
			foreach($this->element->translations as $language_id =>
$translation){
				echo
$this->tabs->startPanel($this->transHelper->getFlag($language_id),
'translation_'.$language_id);
					$plugin_name = $type.'_name';
					$plugin_name_input =$plugin_name.'_input';
					$plugin_description = $type.'_description';
					$this->$plugin_name_input
plugins/tmpl/sublisting.php000064400000007202151162050350012074 0ustar00=
$translation->$plugin_description->id;
					}
					$this->setLayout('normal');
					echo $this->loadTemplate();
				echo $this->tabs->endPanel();
			}
		}
	echo $this->tabs->endPane();
plugins/view.html.php000064400000055052151162050350010660 0ustar00<?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 PluginsViewPlugins extends hikashopView{
	var $type = '';
	var $ctrl = 'plugins';
	var $nameListing = 'PLUGINS';
	var $nameForm = 'PLUGINS';
	var $icon = 'plugin';

	function display($tpl = null) {
		$this->paramBase =
HIKASHOP_COMPONENT.'.'.$this->getName();
		$function = $this->getLayout();
		if(!method_exists($this, $function) || $this->$function())
			parent::display($tpl);
	}

	function listing() {
		$app = JFactory::getApplication();
		$db = JFactory::getDBO();

		$config =& hikashop_config();
		$this->assignRef('config', $config);

		$toggle = hikashop_get('helper.toggle');
		$this->assignRef('toggleClass',$toggle);

		$currencyClass = hikashop_get('class.currency');
		$this->assignRef('currencyClass', $currencyClass);
		$zoneClass = hikashop_get('class.zone');
		$this->assignRef('zoneClass', $zoneClass);

		$manage =plugins/tmpl/translation.php000064400000005303151162050350012247
0ustar00s($filters, $order, $searchMap);

		JPluginHelper::importPlugin('hikashop');
		if(in_array($type, array('shipping', 'payment')))
			JPluginHelper::importPlugin('hikashop'.$type);
		$dispatcher = JDispatcher::getInstance();
		$dispatcher->trigger('onBeforeHikaPluginConfigurationListing',
array($type, &$filters, &$order, &$searchMap,
&$extrafilters, &$this));

		$query = 'FROM '.hikashop_table($cfg['table']).'
AS plugin '.$filters.$order;

		$this->getPageInfoTotal($query, '*');

		$db->setQuery('SELECT * '.$query,
(int)$pageInfo->limit->start, (int)$pageInfo->limit->value);

		$rows = $db->loadObjectList();
		if(!empty($plugins/tmpl/translation.php000064400000005303151162050350012247
0ustar00
		$this->assignRef('listing_columns', $listing_columns);

		$this->getPagination();
		$this->getOrdering('plugin.'.$type.'_ordering',
true);

		if(!HIKASHOP_J16) {
			$db->setQuery('SELECT id, published, name, element FROM
'.hikashop_table('plugins',false).' WHERE `folder` =
'.$db->Quote('hikashop'.$type));
		} else {
			$db->setQuery('SELECT extension_id as id, enabled as published,
name, element FROM
'.hikashop_table('extensions',false).' WHERE `folder` =
'.$db->Quote('hikashop'.$type).' AND
type=\'plugin\'');
		}
		$plugins = $db->loadObjectList('element');
		$this->assignRef('plugins', $plugins);

		$this->toolbar = array(
			'|',
			array('name' => 'custom', 'icon' =>
'copy', 'task' => 'copy', 'alt'
=> JText::_('HIKA_COPY'),'display'=>$manage),
			array('name' => 'publishList',
'display' => $manage),
			array('name' => 'unpublishList',
'display' => $manage),
			array('name' => 'addNew', 'display'
=> $manage),
			'|',
			array('name' => 'pophelp', 'target'
=> $this->ctrl.'-listing'),
			'dashboard'
		);


		return true;
	}

	function selectnew() {
		$app = JFactory::getApplication();
		$db = JFactory::getDBO();

		$config =& hikashop_config();
		$this->assignRefplugins/view.html.php000064400000004735151162050350010662
0ustar00le('extensions',false).' WHERE `folder` =
'.$db->Quote($group).' AND type=\'plugin\' ORDER BY
enabled DESC, name ASC, ordering ASC');
		}
		$plugins = $db->loadObjectList();

		JPluginHelper::importPlugin('hikashop'.$type);
		$dispatcher = JDispatcher::getInstance();
		$dispatcher->trigger('onAfterHikaPluginConfigurationSelectionListing',
array($type, &$plugins, &$this));

		$query = 'SELECT * FROM '.hikashop_table($type);
		$db->setQuery($query);
		$obj = $db->loadObject();
		if(empty($obj)) {
			$app->enqueueMessage(JText::_('EDIT_PLUGINS_BEFORE_DISPLAY'));
		}

		$currencies = null;
		if($type == 'payment') {
			$currencyClass = hikashop_get('class.currency');
			$mainCurrency plugins/view.html.php000064400000004735151162050350010662
0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_plugins
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

/**
 * View class for a list of plugins.
 *
 * @since  1.5
 */
class PluginsViewPlugins extends JViewLegacy
{
	protected $items;

	protected $pagination;

	protected $state;

	/**
	 * Display the view.
	 *
	 * @param   string  $tpl  The name of the template file to parse;
automatically searches through the template paths.
	 *
	 * @return  mixed  A string if successful, otherwise an Error object.
	 */
	public function display($tpl = null)
	{
		$this->items = $this->get('Items');
		$this->pagination = $this->get('Pagination');
		$this->state = $this->get('State');
		$this->filterForm = $this->get('FilterForm');
		$this->activeFilters = $this->get('ActiveFilters');

		// Check for errors.
		if (count($errproduct/index.html000064400000000032151162050350010212
0ustar00		JToolbarHelper::publish(product/tmpl/addcategory.php000064400000003714151162050350012202
0ustar00product/index.html000064400000000032151162050350010212 0ustar00
$k;?>" id="image_<?php
ecproduct/tmpl/addcategory.php000064400000003714151162050350012202 0ustar00
src="<?php echo HIKASHOP_IMAGES;
?>delete.png"/></a>
			</td>
			<td width="1%" align="center">
				<?php echo $row->file_id; ?>
				<div id="image_div_<?php echo
$row->file_id.'_'.$id;?>">
					<input type="hidden" name="image[<?php echo
$row->file_id;?>]" id="image[<?php echo
$row->file_id;?>][<?php echo $id;?>]" value="<?php
echo $row->file_id;?>"/>
				</div>
			</td>
		</tr>
<?php
	$k = 1-$k;
}
?>
	</tbody>
</table>
product/tmpl/addfile.php000064400000004217151162050350011303
0ustar00<?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');
?><table class="adminlist table table-striped"
cellpadding="1" width="100%">
	<tbody id="result">
<?php
	$k = 0;
	$type = $this->type;
	for($i = 0,$a = count($this->rows);$i<$a;$i++){
		$row =& $this->rows[$i];
		$id=rand();
?>
			<tr class="row<?php echo $k; ?>" id="<?php
echo
$type.'_'.$row->product_id.'_'.$id;?>">
				<td>
					<a href="<?php echo
hikashop_completeLink('product&task=edit&cid='.$row->product_id);
?>"><?php echo $row->product_name; ?></a>
				</td>
<?php if($type!='widget'){ ?>
				<td><?php 
					echo $row->product_code;
				?></td>
				<td><?php
					echo $this->currencyHelper->displayPrices(@$row->prices);
				?></td>
				<td align="center"
class="oproduct/tmpl/addfile.php000064400000004217151162050350011303
0ustar00p echo $id;?>]','<?php echo
$type.'_'.$row->product_id.'_'.$id;?>');"><img
src="<?php echo HIKASHOP_IMAGES;
?>delete.png"/></a>
				</td>
				<td width="1%" align="center">
					<?php echo $row->product_id; ?>
					<div id="<?php echo
$type.'_div_'.$row->product_id.'_'.$id;?>">
						<input type="hidden" name="<?php echo
$type;?>[<?php echo $row->product_id;?>]"
id="<?php echo $type;?>[<?php echo
$row->product_id;?>][<?php echo $id;?>]"
value="<?php echo $row->product_id;?>"/>
					</div>
				</td>
			</tr>
<?php
		$k = 1-$k;
	}
?>
	</tbody>
</table>
product/tmpl/addimage.php000064400000003671151162050350011451
0ustar00<?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');
?><div style="float:right">
	<?php
		echo $this->popup->display(
			'<img
src="'.HIKASHOP_IMAGES.'add.png"/>'.JText::_('ADD'),
			'ADD',
			hikashop_completeLink("product&task=selectcategory",
true),
			'category_add_button',
			860, 480, '', '', 'button'
		);
	?>
</div>
<br/>
<table class="adminlist table table-striped table-hover"
cellpadding="1" width="100%">
	<tproduct/tmpl/addimage.php000064400000003671151162050350011451
0ustar00nue;
									$html[] = '<a href="'.
hikashop_completeLink('category&task=edit&cid='.$parent->category_id).'">'.$parent->category_name.'</a>';
								}
								if(empty($html)) {
									$parent = end($parents);
									$html[] = '<a href="'.
hikashop_completeLink('category&task=edit&cid='.$parent->category_id).'">'.$parent->category_name.'</a>';
								}
								echo implode(' / ',$html); ?>
							</td>
							<td
align="cproduct/tmpl/addrelated.php000064400000004074151162050350012005
0ustar00					</div>
							</td>
						</tr>
					<?php
					}
					$k = 1-$k;
				}
			}
		?>
	</tbody>
</table>

product/tmpl/characteristic.php000064400000007006151162050350012702
0ustar00product/tmpl/addrelated.php000064400000004074151162050350012005
0ustar00opup->display(
			'<img
src="'.HIKASHOP_IMAGES.'add.png"/>'.JText::_('ADD'),
			'ADD',
			hikashop_completeLink("characteristic&task=selectcharacteristic",true
),
			'characteristic_add_button',
			860, 480, '', '', 'button'
		);
	?>
</div>
<br/>
<table class="adminlist table table-striped table-hover"
cellpadding="1" width="100%">
	<thead>
		<tr>
			<th class="title">
				<?php echo JText::_('HIKA_NAME'); ?>
			</th>
			<th class="title">
				<?php echo JText::_('DEFAULT_VALUE'); ?>
			</th>
			<th class="title">
				<?php echo
JText::_('HIKA_ORproduct/tmpl/category.php000064400000005167151162050350011535
0ustar00="order">
							<div id="characteristic_ordering_div_<?php echo
$row->characteristic_id.'_'.$id;?>">
								<input type="text" size="3"
name="characteristic_ordering[<?php echo
$row->characteristic_id;?>]"
id="characteristic_ordering[<?php echo
$row->characteristic_id;?>][<?php echo $id?>]"
value="<?php echo intval(@$row->ordering);?>"/>
							</div>
						</td>
						<td align="center">
							<a href="#" onclick="return
deleteRow('characteristic_div_<?php echo
$row->characteristic_id.'_'.$id;?>','characteristic[<?php
echo
$row->characteristic_id;?>][<?phpproduct/tmpl/category.php000064400000005167151162050350011535
0ustar00ble>
product/tmpl/common.php000064400000013303151162050350011177
0ustar00<?php
/**
 * @package	HikaShop for Joomla!
 * @version	2.2.3
 * @author	hikashop.com
 * @copyright	(C) 2010-2013
Hproduct/tmpl/characteristic.php000064400000007006151162050350012702
0ustar00 } ?>
				<tr>
					<td class="key">
							<?php echo JText::_( 'PRODUCT_MIN_QUANTITY_PER_ORDER'
); ?>
					</td>
					<td>
						<input type="text"
name="data[product][product_min_per_order]" value="<?php
echo (int)@$this->element->product_min_per_order; ?>" />
					</td>
				</tr>
				<tr>
					<td class="key">
							<?php echo JText::_( 'PRODUCT_MAX_QUANTITY_PER_ORDER'
); ?>
					</td>
					<td>
						<input type="text"
name="data[product][product_max_per_order]" <?php echo
is_numeric(@$this->element->product_max_per_order)? '' :
'onfocus="if(isNaN(parseInt(this.value)))
this.value=\'\';"'; ?>
value="<?phproduct/tmpl/characteristic.php000064400000007006151162050350012702
0ustar00DUCT_MSRP' ); ?>
					</td>
					<?php $currencyClass = hikashop_get('class.currency');
$curr = ''; $mainCurr = $currencyClass->mainCurrency();
$mainCurr = $currencyClass->getCurrencies(@$mainCurr,$curr); ?>
					<td>
						<input type="text"
name="data[product][product_msrp]" value="<?php echo
@$this->element->product_msrp; ?>"/><?php echo '
'.@$mainCurr[1]->currency_symbol.'
'.@$mainCurr[1]->currency_code; ?>
					</td>
				</tr>
				<tr>
					<td class="key">
							<?php echo JText::_( 'PRODUCT_WEIGHT' ); ?>
					</td>
					<td>
						<input type="text"
name="data[product][product_weight]" value="<?php echo
@$this->element->product_weight; ?>"/><?php echo
$this->weight->display('data[product][product_weight_unit]',@$this->element->product_weight_unit);
?>
					</td>
				</tr>
				<tr>
					<td class="key">
						<?php echo JText::_( 'PRODUCT_VOLUME' ); ?>
					</td>
					<td>
						<table class="table">
							<tr>
								<td>
									<?php echo JText::_( 'PRODUCT_LENGTH' ); ?>
								</td>
								<td>
									<input size="10" type="text"
name="data[product][product_length]" value="<?php echo
@$this->element->product_length; ?>"/>
								</td>
								<td class="noborder">
								</td>
							</tr>
							<tr>
								<td>
									<?php echo JText::_( 'PRODUCT_WIDTH' ); ?>
								</td>
								<td>
									<input size="10" type="text"
name="data[product][product_width]" value="<?php echo
@$this->element->product_width; ?>"/>
								</td>
								<td class="noborder">
									<?php echo
$this->volume->display('data[product][product_dimension_unit]',@$this->element->product_dimension_unit);
?>
								</td>
							</tr>
							<tr>
								<td>
									<?php echo JText::_( 'PRODUCT_HEIGHT' ); ?>
								</td>
								<td>
									<input size="10" type="text"
name="data[product][product_height]" value="<?php echo
@$this->element->product_height; ?>"/>
								</td>
								<td class="noborder">
								</td>
							</tr>
						</table>
					</td>
				product/tmpl/common.php000064400000013303151162050350011177
0ustar00$html = array();
	$dispatcher->trigger( 'onProductDisplay', array( &
$this->element, & $html ) );
	if(!empty($html)){
		foreach($html as $h){
			echo $h;
		}
	}
?>
					</td>
				</tr>
producproduct/tmpl/common.php000064400000013303151162050350011177
0ustar00	</span>
product/tmpl/edit_translation.php000064400000011157151162050350013257
0ustar00<?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');
?><fieldset>
	<div class="toolbar" id="toolbar"
style="float: right;">
		<button class="btn" type="button"
onclick="submitbutton('save_translation');"><img
src="<?php echo HIKASHOP_IMAGES; ?>save.png"/><?php
echo JText::_('OK'); ?></button>
	</div>
</fieldset>
<div class="iframedoc"
id="iframedoc"></div>
<form action="index.php?option=<?php echo HIKASHOP_COMPONENT
?>&amp;ctrl=product" method="post" 
name="adminForm" id="adminForm"
enctype="multipart/form-data">

<?php
	echo $this->tabs->startPane( 'translations');
		if(!empty($this->element->translations)){
			foreach($this->element->translations as $language_id =>
$translation){
				$this->product_name_input =
"translation[product_name][".$language_id."]";
				$this->element->product_name =
@$translation->product_name->value;
				if(isset($translation->product_name->published)){
					$this->product_name_published =
$translation->product_name->published;
					$this->product_name_id = $translation->product_name->id;
				}

				$this->editor->name =
'translation_product_description_'.$language_id;
				$this->element->product_description =
@$translation->product_description->value;
				if(isset($translation->product_description->published)){
					$this->product_description_published =
$translation->product_description->published;
					$this->product_description_id =
$translation->product_description->id;
				}
				if($this->element->product_type=='main'){
					$this->product_url_input =
"translation[product_url][".$language_id."]";
					$this->element->product_url =
@$translation->product_url->value;
					if(isset($translation->product_url->published)){
						$this->product_url_published =
$translation->product_url->published;
						$this->product_url_id = $translation->product_url->id;
					}

					$this->product_meta_description_input =
"translation[product_meta_description][".$language_id."]";
					$this->element->product_meta_description =
@$translation->product_meta_description->value;
					if(isset($translation->product_meta_description->published)){
						$this->product_meta_description_published =
$translation->product_meta_description->published;
						$this->product_meta_description_id =
$translation->product_meta_description->id;
					}

					$this->product_keywords_input =
"translation[product_keywords][".$language_id."]";
					$this->element->product_keywords =
@$translation->product_keywords->value;
					if(isset($translation->product_keywords->published)){
						$this->product_keywords_published =
$translation->product_keywords->published;
						$this->product_keywords_id =
$translation->product_keywords->id;
					}
					$this->product_page_title_input =
"translation[product_page_title][".$language_id."]";
					$this->element->product_page_title =
@$translation->product_page_title->value;
					if(isset($translation->product_page_title->published)){
						$this->product_page_titlepublished =
$translation->product_page_title->publiproduct/tmpl/discount.php000064400000001012151162050350011531
0ustar00on->product_canonical->id;
					}
				}
				echo
$this->tabs->startPanel($this->transHelper->getFlag($language_id),
'translation_'.$language_id);
					$this->setLayout('normal');
					echo $this->loadTemplate();
				echo $this->tabs->endPanel();
			}
		}
	echo $this->tabs->endPane();
?>
	<input type="hidden" name="cid[]"
value="<?php echo @$this->element->product_id; ?>"
/>
	<input type="hidden" name="option"
value="<?php echo HIKASHOP_COMPONENT; ?>" />
	<input type="hidden" name="task" value=""
/>
	<inproduct/tmpl/edit_translation.php000064400000011157151162050350013257
0ustar00<?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');
?><fieldset>
	<div class="toolbar" id="toolbar"
style="float: right;">
		<button class="btn" type="button"
onclick="submitbutton('save_translation');"><img
src="<?php echo HIKASHOP_IMAGES; ?>save.png"/><?php
echo JText::_('OK'); ?></button>
	</dproduct/tmpl/edit_translation.php000064400000011157151162050350013257
0ustar00published = $translation->product_description->published;
					$this->product_description_id =
$translation->product_description->id;
				}
				if($this->element->product_type=='main'){
					$this->product_url_input =
"translation[product_url][".$language_id."]";
					$this->element->product_url =
@$translation->product_url->value;
					if(isset($translation->product_url->published)){
						$this->product_url_published =
$translation->product_url->published;
						$this->product_url_id = $translation->product_url->id;
					}

					$this->product_meta_description_input =
"translation[product_meta_description][".$language_id."]";
					$this->element->product_meta_description =
@$translation->product_meta_description->value;
					if(isset($translation->product_meta_description->published)){
						$this->product_meta_description_published =
$translation->product_meta_description->published;
						$this->product_meta_description_id =
$translation->product_meta_description->id;
					}

					$this->product_keywords_input =
"translation[product_keywords][".$language_id."]";
					$this->element->product_keywords =
@$translation->product_keywords->value;
					if(isset($translation->product_keywords->published)){
						$this->product_keywords_published =
$translation->product_keywords->published;
						$this->product_keywords_id =
$translation->product_keywords->id;
					}
					$this->product_page_title_input =
"translation[product_page_title][".$language_id."]";
					$this->element->product_page_title =
@$translation->product_page_title->value;
					if(isset($translation->product_page_title->published)){
						$this->product_page_titlepublished =
$translation->product_page_title->published;
						$this->product_page_title_id =
$translation->product_page_title->id;
					}
					$this->product_alias_input =
"translation[product_alias][".$language_id."]";
					$this->element->product_alias =
@$translation->product_alias->value;
					if(isset($translation->product_alias->published)){
						$this->product_alias_published =
$translation->product_alias->published;
						$this->product_alias_id = $translation->product_alias->id;
					}
					$this->product_canonical_input =
"translation[product_canonical][".$language_id."]";
					$this->element->product_canonical =
@$translation->product_canonical->value;
					if(isset($translation->product_canonical->published)){
						$this->product_canonical_published =
$translation->product_canonical->published;
						$this->product_canonical_id =
$translation->product_canonical->id;
					}
				}
				echo
$this->tabs->startPanel($this->transHelper->getFlag($language_id),
'translation_'.$language_id);
					$this->setLayout('normal');
					echo $this->loadTemplate();
				echo $this->tabs->endPanel();
			}
		}
	echo $this->tabs->endPane();
?>
	<input type="hidden" name="cid[]"
value="<?php echo @$this->element->product_id; ?>"
/>
	<input type="hidden" name="option"
value="<?php echo HIKASHOP_COMPONENT; ?>" />
	<input type="hidden" name="task" value=""
/>
	<input type="hidden" name="ctrl"
value="product" />
	<?php echo JHTML::_( 'form.token' ); ?>
</form>
product/tmpl/edit_translation_legacy.php000064400000011157151162050350014603
0ustar00<?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
while(ob_get_level() > 1)
	ob_end_clean();

$config =& hikashop_config();
$format = $config->get('export_format','csv');
$separator = $config->get('csv_separator',';');
$force_quote = $config->get('csv_force_quote',1);

$export = hikashop_get('helper.spreadsheet');
$export->init($format, 'hikashopexport', $separator,
$force_quoteproduct/tmpl/edit_translation_legacy.php000064400000011157151162050350014603
0ustar00 => 'files',
	'images' => 'images',
	'related' => 'related',
	'options' => 'options'
));

$characteristicsColumns = array();
if(!empty($this->characteristics)) {
	foreach($this->characteristics as $characteristic) {
		if(empty($characteristic->characteristic_parent_id)) {
			if(!empty($characteristic->characteristic_alias)){
				$characteristic->characteristic_value =
$characteristic->characteristic_alias;
			}
			$columns['char_'.$characteristic->characteristic_id] =
$characteristic->characteristic_value;
			$characteristicsColumns['char_'.$characteristic->characteristic_id]
= $characteristic->characteristic_value;
		}
	}
}
$after_category_count = count($columns)-($product_table_count+3);
$export->writeline($columns);

if(!empty($this->categories)) {
	foreach($this->categories as $category) {
		$data = array();
		for($i = 0; $i < $product_table_count; $i++)
			$data[] = '';
		if(!empty($category->category_parent_id) &&
isset($this->categories[$category->category_parent_id]))
			$data[] =
$this->categories[$category->category_parent_id]->category_name;
		else
			$data[] = '';
		if(!empty($category->file_path))
			 $data[] = $category->file_path;
		else
			$data[] = '';

		$data[] = $category->category_name;
		for($i = 0; $i < $after_category_count; $i++)
			$data[] = '';
		$export->writeline($data);
	}
}

if(!empty($this->products)) {
	foreach($this->products as $k => $product) {
		if($product->product_type == 'variant')
			$this->products[$k]->product_parent_id =
$this->products[$product->product_parent_id]->product_code;
	}
	foreach($this->products as $product) {
		$data = array();

		foreach($products_columns as $column) {
			if(!empty($product->$column) &&
is_array($product->$column))
				$product->$column = implode($separator,$product->$column);
			$data[] = @$product->$column;
		}

		$categories = array();
		if(!empty($product->categories)) {
			foreach($product->categories as $category) {
				if(!empty($this->categories[$category]))
					$categories[] =
str_replace(array('"',',',';'),
array('""','\\,','\\;'),
$this->categories[$category]->category_name);
			}
		}
		$data[] = '';
		$data[] = '';

		if(!empty($categories))
			$data[] = implode($separator,$categories);
		else
			$data[] = '';

		$values = array();
		$codes = array();
		$qtys = array();
		$accesses = array();
		if(!empty($product->prices)) {
			foreach($product->prices as $price) {
				$values[] = $price->price_value;
				$codes[] =
$this->currencies[$price->price_currency_id]->currency_code;
				$qtys[] = $price->price_min_quantity;
				$accesses[] = $price->price_access;
			}

		}
		if(empty($values)) {
			$data[] = '';
			$data[] = '';
			$data[] = '';
			$data[] = '';
		} else {
			$data[] = implode('|', $values);
			$data[] = implode('|', $codes);
			$data[] = implode('|', $qtys);
			$data[] = implode('|', $accesses);
		}

		$files = array();
		if(!empty($product->files)) {
			foreach($product->files as $file) {
				$files[] =
str_replace(array('"',',',';'),
array('""','\\,','\\;'),
$file->file_path);
			}
		}
		if(empty($files)) {
			$data[] = '';
product/tmpl/export.php000064400000015160151162050350011233
0ustar00set($this->products[$rel]->product_code))
$this->products[$rel] = $classProduct->get($rel);
				$options[] =
str_replace(array('"',',',';'),
array('""','\\,','\\;'),
@$this->products[$rel]->product_code);
			}
		}
		if(empty($options)) {
			$data[] = '';
		} else {
			$data[] = implode($separator, $options);
		}

		if(!empty($product->variant_links)) {
			$characteristics = array();
			if(!empty($characteristicsColumns)) {
				foreach($product->variant_links as $char_id) {
					if(!empty($this->characteristics[$char_id])) {
						$char = $this->characteristics[$char_id];
						if(!empty($this->characproduct/tmpl/export.php000064400000015160151162050350011233
0ustar00product/tmpl/field.php000064400000001000151162050350010761
0ustar00<?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');
?>				<span id="result" >
					<?php echo @$this->rows[0]->product_id.'
'.@$this->rows[0]->product_name; ?> 
					<input type="hidden"
name="field_options[product_id]" value="<?php echo
@$this->rows[0]->product_id; ?>" />
				</span>
product/tmpl/file.php000064400000010051151162050350010623 0ustar00<?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');
?><div style="float:right">
	<?php
		echo $this->popup->display(
			'<img
src="'.HIKASHOP_IMAGES.'add.png"/>'.JText::_('ADD'),
			'ADD',
			hikashop_completeLink("product&task=selectfile&product_id=".@$this->element->product_id,true),
			'file_add_button',
			860, 480, '', '', 'button'
		);
	?>
</div>
<br/>
				<table id="hikashop_product_file_table"
class="adminlist table table-striped table-hover"
cellpadding="1">
					<thead>
						<tr>
							<th class="title">
								<?php echo JText::_('HIKA_EDIT'); ?>
							</th>
							<th class="title">
								<?php echo JText::_('FILENAME'); ?>
							</th>
							<th class="title">
								<?php echo JText::_('HIKA_NAME'); ?>
							</th>
							<th class="title">
								<?php echo JText::_('DOWNLOADS'); ?>
							</th>
							<th class="title">
								<?php echo JText::_('FREE_DOWNLOAD'); ?>
							</th>
							<th class="title">
								<?php echo JText::_('HIKA_DELETE'); ?>
							</th>
							<th class="title">
								<?php echo JText::_( 'ID' ); ?>
							</th>
						</tr>
					</thead>
					<tbody id="file_listing">
						<?php
							if(!empty($this->element->files)){
								$k = 0;
								foreach($this->element->files as $row){
									$id=rand();
									if(substr($row->file_path,0,1) == '@')
										continue;
									if(!isset($row->file_limit) || $row->file_limit == 0)
										$row->file_limit =
'<em>'.$this->config->get('download_number_limit').'</em>';
							?>
								<tr class="<?php echo "row$k"; ?>"
id="file_<?php echo
$row->file_id.'_'.$id;?>">
									<td width="1%" align="center">
										<?php
											echo $this->popup->display(
												'<img
src="'.HIKASHOP_IMAGES.'edit.png"/>',
												'HIKA_EDIT',
												hikashop_completeLink("product&task=selectfile&cid=".$row->file_id."&product_id=".@$this->element->product_id.'&id='.$id,true
),
												'file_edit_button'.$row->file_id,
												860, 480, '', '', 'link'
											);
										?>
									</td>
									<td>
										<?php echo $row->file_path; ?>
									</td>
									<td>
										<?php echo $row->file_name; ?>
									</td>
									<td width="1%" align="right">
										<?php
											echo (int)@$row->download_number . ' / ';
											if(!is_numeric($row->file_limit) || $row->file_limit >
0)
												echo $row->file_limit;
											else
												echo JText::_('UNLIMITED');
											if(@$row->download_number){
												echo ' <a
href="'.hikashop_completeLink('file&task=resetdownload&file_id='.$row->file_id.'&'.hikashop_getFormToken().'=1&return='.urlencode(base64_encode(hikashop_completeLink('product&task=edit&cid='.@$this->element->product_id,false,true)))).'"><img
src="'.HIKASHOP_IMAGES.'delete.png"
alt="'.JText::_('HIKA_DELETE').'"
/></a>';
											}
										?>
									</td>
									<td width="1%" align="center">
										<input type="checkbox" disabled="disabled"
<?php echo !empty($row->file_free_download) ?
'checked="checked"' : ''; ?> />
									</td>
									<td width="1%" align="center">
										<a href="#" onclick="return
deleteRow('file_div_<?php echo
$row->file_id.'_'.$id;?>','file[<?php echo
$row->file_id;?>][<?php echo $id;?>]','file_<?php
echo $row->file_id.'_'.$id;?>');"><img
src="<?php echo HIKASHOP_IMAGES;
?>delete.png"/></a>
									</td>
									<td
width="1product/tmpl/field.php000064400000001000151162050350010761
0ustar00product/tmpl/form.php000064400000014255151162050350010661
0ustar00product/tmpl/file.php000064400000010051151162050350010623
0ustar00product/tmpl/field.php000064400000001000151162050350010761
0ustar00_input = "data[product][product_keywords]";
					$this->product_page_title_input =
"data[product][product_page_title]";
					$this->product_alias_input =
"data[product][product_alias]";
					$this->product_canonical_input =
"data[product][product_canonical]";
					if($this->translation){
						$this->setLayout('translation');
						echo $this->loadTemplate();
					}else{
						?>
						<fieldset class="adminform hikashop_product_maininfo"
id="htmlfieldset">
							<legend><?php echo JText::_(
'MAIproduct/tmpl/file.php000064400000010051151162050350010623
0ustar00able" width="100%">
						<?php foreach($this->fields as $fieldName =>
$oneExtraField){
							if(!$oneExtraField->field_backend){
								if($oneExtraField->field_type != "customtext"){?>
							<tr><td><input type="hidden"
name="data[product][<?php echo $fieldName; ?>]"
value="<?php echo $this->element->$fieldName; ?>"
/></td></tr>
							<?php }
							}else{ ?>
							<tr id="hikashop_product_<?php echo $fieldName;
?>">
								<td class="key">
									<?php echo
$this->fieldsClass->getFieldName($oneExtraField);?>
								</td>
								<td>
									<?php
										if(!isset($this->element->$fieldName))
											$this->element->$fieldName =
$oneExtraField->field_default;
									?>
									<?php $onWhat='onchange';
if($oneExtraField->field_type=='radio')
$onWhat='onclick'; ?>
									<?php echo
$this->fieldsClass->display($oneExtraField,$this->element->$fieldName,'data[product]['.$fieldName.']',false,'
'.$onWhat.'="hikashopToggleFields(this.value,\''.$fieldName.'\',\'product\',0);"');
?>
								</td>
							</tr>
							<?php }
						} ?>
						</table>
					<?php }?>
	<?php if(!HIKASHOP_BACK_RESPONSIVE) { ?>
				</td>
				<td valign="top">
	<?php } else { ?>
		</div>
		<div class="span6">
	<?php } ?>
				<?php if($this->element->product_type=='main' ||
$this->element->product_type=='template'){?>
					<fieldset class="adminform hikashop_product_categories"
id="htmlfieldset">
						<legend><?php echo JText::_( 'HIKA_CATEGORIES' );
?></legend>
					<?php
							$this->setLayout('category');
							echo $this->loadTemplate();
					?>
					</fieldset>
					<fieldset class="adminform hikashop_product_related"
id="htmlfieldset">
						<legend><?php echo JText::_( 'RELATED_PRODUCTS' );
?></legend>
					<?php
							$this->type='related';
							$this->setLayout('related');
							echo $this->loadTemplate();
					?>
					</fieldset>
					<fieldset class="adminform hikashop_product_options"
id="htmlfieldset">
						<legend><?php echo JText::_( 'OPTIONS' );
?></legend>
					<?php
					if(hikashop_level(1)){
						$this->type='options';
						$this->setLayout('related');
						echo $this->loadTemplate();
					}else{
						echo hikashop_getUpgradeLink('essential');;
					}
					?>
					</fieldset>
					<fieldset class="adminform
hikashop_product_characteristics" id="htmlfieldset">
						<legend><?php echo
JText::_('CHARACTERISTICS');?></legend>
						<div id="hikashop_product_characteristics_message"
style="display: none;" class="alert"></div>
						<?php
							$this->setLayout('characteristiproduct/tmpl/form.php000064400000014255151162050350010661
0ustar00ment, &$html));
if(!empty($html)){
	foreach($html as $h){
		echo $h;
	}
}
?>
	<?php if(!HIKASHOP_BACK_RESPONSIVE) { ?>
				</td>
			</tr>
		</table>
	</div>
	<?php } else { ?>
		</div>
	</div>
	<?php } ?>
	<div class="clr"></div>
	<input type="hidden"
name="data[product][product_type]" value="<?php echo
@$this->element->product_type; ?>" />
	<input type="hidden" name="cid[]"
value="<?php echo @$this->element->product_id; ?>"
/>
	<input type="hidden" name="option"
value="<?php echo HIKASHOP_COMPONENT; ?>" />
	<input
type="hiddenproduct/tmpl/form.php000064400000014255151162050350010661
0ustar00<?xml version="1.0" encoding="utf-8"?>
<metadata>
	<layout title="COM_HIKASHOP_PRODUCT_CREATE_TITLE">
		<message>
			<![CDATA[COM_HIKASHOP_PRODUCT_CREATE_DESC]]>
		</message>
	</layout>
</metadata>product/tmpl/form_bundle.php000064400000010214151162050350012201
0ustar00<?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');
?><table id="hikashop_product_characteristics_table"
class="adminlist table table-striped"
style="width:100%">
	<thead>
		<tr>
			<th class="title"><?php
				echo JText::_('HIKA_NAME');
			?></th>
			<th class="title"><?php
				echo JText::_('PRODUCT_QUANTITY');
			?></th>
			<th style="width:40px;text-align:center">
				<a href="#" onclick="return
window.productMgr.newBundle();" title="<?php echo
JText::_('ADD'); ?>"><i class="fa
fa-plus"></i></a>
			</th>
		</tr>
	</thead>
	<tfoot>
		<tr id="hikashop_bundle_add_zone"
style="display:none;">
			<td colspan="3">
<dl>
	<dt><?php echo JText::_('PRODUCT_NAME');
?></dt>
	<dd><?php
		echo $this->nameboxType->display(
			null,
			null,
			hikashopNameboxType::NAMEBOX_SINGLE,
			'product',
			array(
				'id' => 'hikashop_bundle_nb_add',
				'default_text' => 'PLEASE_SELECT',
				'variants' => 1,
			)
		);
	?></dd>
	<dt><?php echo JText::_('PRODUCT_QUANTITY');
?></dt>
	<dd>
		<input type="text" size="5"
style="width:70px;" id="hikashop_bundle_qty_add"
name="" value="1"/>
	</dd>
</dl>
<div style="float:right">
	<button onclick="return window.productMgr.addBundle();"
class="btn btn-success"><i class="fa
fa-save"></i> <?php echo JText::_('HIKA_SAVE');
;?></button>
</div>
<button onclick="return window.productMgr.cancelNewBundle();"
class="btn btn-danger"><i class="fa
fa-times"></i> <?php echo
JText::_('HIKA_CANCEL'); ;?></button>
<div style="clear:both"></div>
			</td>
		</tr>
	</tfoot>
	<tbody>
<?php
	$k = 0;
	if(!empty($this->product->bundle)) {
		foreach($this->product->bundle as $bundle) {
			$pid = (int)$bundle->product_related_id;
?>
		<tr class="row<?php echo $k ?>">
			<td><?php
				$desc = JText::_('PRODUCT_ID') . ': ' . $pid;
				echo hikashop_hktooltip($desc, $bundle->product_name,
$bundle->product_name);
			?></td>
			<td>
				<input type="text" size="5"
style="width:70px;" name="data[product][bundle][<?php
echo $pid; ?>]" value="<?php echo
max((int)$bundle->product_related_quantity, 1); ?>"/>
			</td>
			<td style="text-align:center">
				<a href="#delete"
onclick="window.hikashop.deleteRow(this); return false;"><i
class="fas fa-trash"></i></a>
			</td>
		</tr>
<?php
			$k = 1 - $k;
		}
	}
?>
		<tr id="hikashop_bundle_row_template"
class="row<?php echo $k ?>"
style="display:none;">
			<td>{NAME}</td>
			<td style="text-align:center">
				<input type="text" size="5"
style="width:70px;" name="{INPUT_NAME}"
value="{VALUE}"/>
			</td>
			<td style="text-align:center">
				<a href="#delete"
onclick="window.hikashop.deleteRow(this); return false;"><i
class="fas fa-trash"></i></a>
			</td>
		</tr>
	</tbody>
</table>
<script type="text/javascript">
window.productMgr.newBundle = function() {
	var w = window, d = document, el = null;
	w.oNameboxes['hikashop_bundle_nb_add'].clear();
	el = d.getElementById('hikashop_bundle_qty_add');
	if(el) el.value = '1';
	el = d.getElementById('hikashop_bundle_add_zone');
	if(el) el.style.display = '';
	return false;
};
window.productMgr.cancelNewBundle = function() {
	var w = window, d = document, o = w.Oby;
	var el = d.getElementById('hikashop_bundle_add_zone');
	if(el) el.style.display = 'none';
	return false;
};
window.productMgr.addBundle = function() {
	var w = window, d = document, o = w.Oby, c = null, cv = null, ct = null,
		el = d.getElementById('hikashop_bundle_nb_add_valuehidden');
	if(el) {
		c = parseInt(el.value);
		el = d.getElemeproduct/tmpl/form.xml000064400000000314151162050350010661
0ustar00product/tmpl/form_characteristic.php000064400000022013151162050350013720
0product/tmpl/form_bundle.php000064400000010214151162050350012201
0ustar00product/tmpl/form.xml000064400000000314151162050350010661
0ustar00ay(
			'id' => 'hikashop_characteristic_nb_add',
			'add' => true,
			'vendor' => @$this->vendor->vendor_id,
			'default_text' => 'PLEASE_SELECT'
		)
	);
					?></dd>
					<dt><?php echo
JText::_(product/tmpl/form_bundle.php000064400000010214151162050350012201
0ustar00o JText::_('HIKA_CANCEL'); ;?></button>
				<div style="clear:both"></div>
			</td>
		</tr>
	</tfoot>
	<tbody>
<?php
$k = 0;
$current_characteristics = array();
if(empty($this->product->characteristics))
	$this->product->characteristics = array();
foreach($this->product->characteristics as $characteristic) {
	if((int)$characteristic->characteristic_parent_id > 0)
		continue;

	$current_characteristics[] = (int)$characteristic->characteristic_id;
?>
		<tr class="row<?php echo $k ?>">
			<td class="column_move"><img src="<?php echo
HIKASHOP_IMAGES; ?>move.png"/></td>
			<td><?php
				echo hikashop_translate($characteristic->characteristic_value);
				if(!empty($characteristic->characteristic_alias))
					echo ' - ' . $characteristic->characteristic_alias;
			?></td>
			<td style="text-align:center">
				<a href="#delete" onclick="return
window.productMgr.deleteCharacteristic(this, <?php echo
(int)$characteristic->characteristic_id; ?>); return
false;"><i class="fas
fa-trash"></i></a>
				<input type="hidden"
name="data[characteristics][]" value="<?php echo
(int)$characteristic->characteristic_id; ?>"/>
			</td>
		</tr>
<?php
	$k = 1 - $k;
}
?>
		<tr id="hikashop_characteristic_row_template"
class="row<?php echo $k ?>"
style="display:none;">
			<td class="column_move"><img src="<?php echo
HIKASHOP_IMAGES; ?>move.png"/></td>
			<td>{NAME}</td>
			<td style="text-align:center">
				<a href="#delete" onclick="return
window.productMgr.deleteCharacteristic(this, {ID}); return
false;"><i class="fas
fa-trash"></i></a>
				<input type="hidden" name="{INPUT_NAME}"
value="{ID}"/>
				<input type="hidden" name="{INPUT_NAME_2}"
value="{ID_2}"/>
			</td>
		</tr>
	</tbody>
</table>
<script type="text/javascript">
hkjQuery("#hikashop_product_characteristics_table
tbody").sortable({
	axis: "y", cursor: "move", opacity: 0.8,
	helper: function(e, ui) {
		ui.children().each(function() {
			hkjQuery(this).width(hkjQuery(this).width());
		});
		return ui;
	},
	stop: function(event, ui) {
		window.hikashop.cleanTableRows('hikashop_product_characteristics_table');
	}
});

window.productMgr.current_characteristics = [<?php echo
implode(',', $current_characteristics); ?>];
window.productMgr.addCharacteristic = function() {
	var w = window, d = document, o = w.Oby, c = null, cv = null, ct = null,
		el =
d.getElementById('hikashop_characteristic_nb_add_valuehidden');

	if(el) {
		c = parseInt(el.value);
		el =
d.getElementById('hikashop_characteristic_nb_add_valuetext');
		if(el)
			ct = el.innerHTML;
	}
	if(isNaN(c) || c === 0) c = null;

	el =
d.getElementById('hikashop_characteristic_nb_def_valuehidden')
	ifproduct/tmpl/form_characteristic.php000064400000022013151162050350013720
0ustar00gr.refreshVariantList)
			window.productMgr.refreshVariantList();
	});
<?php } ?>

	var htmlblocks = {
		NAME: ct, ID: c, INPUT_NAME: 'data[characteristics][]',
<?php if(!empty($this->product->product_id) &&
(int)$this->product->product_id > 0) { ?>
		INPUT_NAME_2: '', ID_2: ''
<?php } else { ?>
		INPUT_NAME_2: 'data[characteristics][]', ID_2: cv
<?php } ?>
	};
	w.hikashop.dupRow('hikashop_characteristic_row_template',
htmlblocks);
	w.productMgr.cancelNewCharacteristic();

	w.productMgr.current_characteristics[w.productMgr.current_characteristics.length]
= c;

	return false;
};
window.productMgr.deleteCharacteristic =
functiproduct/tmpl/form_characteristic.php000064400000022013151162050350013720
0ustar00
<?php } ?>

	if(w.oNameboxes['hikashop_characteristic_nb_add'] &&
w.oNameboxes['hikashop_characteristic_nb_add'].content)
		w.oNameboxes['hikashop_characteristic_nb_add'].content.unblock(id);
	for(var i = w.productMgr.current_characteristics.length - 1; i >= 0;
i--) {
		if(w.productMgr.current_characteristics[i] &&
w.productMgr.current_characteristics[i] == id) {
			delete w.productMgr.current_characteristics[i];
			break;
		}
	}

	w.hikashop.deleteRow(el);
	return false;
};
window.productMgr.newCharacteristic = function() {
	var w = window, d = document;
	w.oNameboxes['hikashop_characteristic_nb_add'].clear();
	w.oNameboxes['hikashop_characteristic_nb_add'].content.config.hideBlocked
= true;
	w.oNameboxes['hikashop_characteristic_nb_add'].content.block(w.productMgr.current_characteristics);
	var el = d.getElementById('hikashop_characteristic_add_zone');
	if(el) el.style.display = '';
	return false;
};
window.productMgr.cancelNewCharacteristic = function() {
	var w = window, d = document, o = w.Oby;
	var el = d.getElementById('hikashop_characteristic_add_zone');
	if(el) el.style.display = 'none';
	el = d.getElementById('hikashop_characteristic_add_list');
	if(el) setTimeout(function() { el.innerHTML = ''; }, 10);
	return false;
};
window.hikashop.ready(function() {
	var w = window, ona = 'hikashop_characteristic_nb_add', onv =
'hikashop_characteristic_nb_def',
		u = '<?php echo
hikashop_completeLink('characteristic&task=findList&characteristic_type=value&characteristic_parent_id={ID}',
true, false, true); ?>',
		a = '<?php echo
hikashop_completeLink('characteristic&task=add&characteristic_type=value&characteristic_parent_id={ID}&tmpl=json',
true, false, true); ?>';
	if(!w.oNameboxes[ona] || !w.oNameboxes[onv])
		return;
	w.oNameboxes[ona].register('set', function(e) {
		if(e.value) {
			w.oNameboxes[onv].changeUrl(u.replace('{ID}', e.value), {add:
a.replace('{ID}', e.value)});
		} else {
			w.oNameboxes[onv].loadData(null);
			w.oNameboxes[onv].clear();
		}
	});
});
</script>
product/tmpl/form_file.php000064400000011161151162050350011651
0ustar00<?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
$ajax = false;
if(!empty($this->upload_ajax))
	$ajax = true;
$product_type = (!empty($this->params->product_type) &&
$this->params->product_type == 'variant') ?
'variant' : 'product';
$upload = hikashop_acl('product/edit/files/upload');
$options = array(
	'classes' => array(
		'mainDiv' => 'hikashop_main_file_div',
		'contentClass' => 'hikashop_product_files',
		'btn_add' => 'fa fa-plus',
		'btn_upload' => 'fa fa-upload'
	),
	'upload' => $upload,
	'toolbar' => array(
		$this->popup->display(
			'<span class="fa fa-plus"></span>',
			JText::_('ADD_FILE'),
			hikashop_completeLink('product&task=selectfile&pid='.@$this->product->product_id,true),
			'hikashop_file_add',
			750, 460, 'class="hikabtn hikabtn-primary"
onclick="return
window.productMgr.addFile(this,'.(int)@$this->product->product_id.',\''.$product_type.'\');"'.'
data-toggle="hk-tooltip"
data-title="'.JText::_('ADD_FILE').'"',
'', 'link'
		)
	),
	'tooltip' => true,
	'text' => ($upload ?
JText::_('HIKA_PRODUCT_FILES_EMPTY_UPLOAD') :
JText::_('HIKA_PRODUCT_FILES_EMPTY')),
	'uploader' => array('product',
'product_file'),
	'vars' => array(
		'product_id' => @$this->product->product_id,
		'product_type' => $product_type,
		'file_type' => 'file'
	),
	'ajax' => $ajax
);

$content = array();
if(!empty($this->product->files)) {
	foreach($this->product->files as $k => $file) {
		$file->product_id = $this->product->product_id;
		$file->product_type = $product_type;
		$this->params = $file;
		$content[] = $this->loadTemplate('file_entry');
	}
}


if(empty($this->editing_variant))
	echo
$this->uploaderType->displayFileMultiple('hikashop_product_file',
$content, $options);
else
	echo
$this->uploaderType->displayFileMultiple('hikashop_product_variant_file',
$content, $options);

if(empty($this->editing_variant))
	echo
$this->popup->display('','HIKASHOP_FILE','','hikashop_product_file_edit',750,
460,'', '', 'link');
else
	echo
$this->popup->display('','HIKASHOP_FILE','','hikashop_product_variant_file_edit',750,
460,'', '', 'link');

?>
<script type="text/javascript">
window.productMgr.addFile = function(el, pid, type) {
	var t = window.hikashop;
	if(type === undefined || type == '') type =
'product';
	if(type == 'variant') type = 'product_variant';
	t.submitFct = function(data) {
		var o = window.Oby, d = document, c =
d.getElementById('hikashop_'+type+'_file_content');
		if(data.cid) {
			var url = "<?php echo
hikashop_completeLink('product&task=file_entry&pid=HIKAPID&cid=HIKACID',
true, false, true); ?>";
			o.xRequest(
				url.replace('HIKAPID',pid).replace('HIKACID',data.cid),
				null,
				function(xhr,params){
					var myData = document.createElement('div');
					hkjQuery(myData).html(xhr.responseText);
					c.appendChild(myData);
					hkjQuery('#hikashop_'+type+'_file_empty').hide();
				}
			);
		}
	};
	t.openBox(el);
	return false;
};
window.productMgr.editFile = function(el, id, pid, type) {
	var t = window.hikashop, href = null, n = el;
	if(type === undefined || type == '') type =
'product';
	if(type == 'variant') type = 'product_variant';
	t.submitFct = function(data) {
		var o = window.Oby, c = el;
		while(c && !o.hasClass(c,
'hikashop_'+type+'_file'))
			c = c.parentNode;
		if(c && data.cid) {
			var url = "<?php echo
hikashop_completeLink('product&task=file_entry&pid=HIKAPID&cid=HIKACID',
true, false, true); ?>";
			o.xRequest(
				url.replace('HIKAPID',
pid).replace('HIKACID',data.cid),
				null,
				function(xhr,params){
					var myData = document.createElement('div');
					hkjQuery(myData).html(xhr.responseText);
					c.parentNode.replaceChild(myData, c);
				}
			);
		}
	};
	if(el.getAttribute('rel') == null) {
		href = el.href;
		n = 'hikashop_'+type+'_file_edit';
	}
	t.openBox(n,href);
	return false;
};
window.productMgr.delFile = function(el, type) {
	if(!confirm('<?php echo
$this->escape(JText::_('PLEASE_CONFIRM_DELETION'));
?>')) return false;
	if(type === undefined || type == '') type =
'product';
	if(type == 'variant') type = 'product_variant';
	return
window.hkUploaderList['hikashop_'+type+'_file'].delBlock(el);
};
window.hikashop.ready(function() {
	hkjQuery('#hikashop_product<?php
if(!empty($this->editing_variant)) { echo '_variant'; }
?>_file_content').sortable({
		cursoproduct/tmpl/form_file.php000064400000011161151162050350011651
0ustar00<?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
$type = (!empty($this->params->product_type) &&
$this->params->product_type == 'variant') ?
'variant' : 'product';
?><div class="hikashop_product_file">
	<a href="#delete" class="deleteFile"
onclick="return
window.productMgr.delFile(this,product/tmpl/form_file.php000064400000011161151162050350011651
0ustar00s="file_path"><?php
		echo hikashop_limitString($this->params->file_path, 24,
'...', true);
	?></span><br/>
	<span class="file_limit_text"><?php echo
JText::_('DOWNLOADS');?>: </span><span
class="file_limit"><?php
		echo (int)@$this->params->download_number . ' / ';

		if(!isset($this->params->file_limit) ||
(int)$this->params->file_limit == 0)
			echo
'<em>'.$this->config->get('download_number_limit').'</em>';
		else if((int)$this->params->file_limit > 0)
			echo $this->params->file_limit;
		else
			echo JText::_('UNLIMITED');
	?></span><br/>
	<span class="file_free_text"><?php echo
JText::_('FREE_DOWNLOAD');?>: </span><span
class="file_free"><?php
		echo ( !empty($this->params->file_free_download) ?
JText::_('JYES') : JText::_('JNO') );
	?></span>
	<input type="hidden" name="data[<?php echo $type;
?>][product_files][]" value="<?php echo
$this->params->file_id; ?>"/>
</div>
product/tmpl/form_image.php000064400000006077151162050350012026
0ustar00<?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
$ajax = false;
if(!empty($this->upload_ajax))
	$ajax = true;

$product_type = (!empty($this->params->product_type) &&
$this->params->product_type == 'variant') ?
'variant' : 'product';
$uploader_id = empty($this->editing_variant) ?
'hikashop_product_image' :
'hikashop_product_variant_image';
$upload = hikashop_acl('product/edit/images/upload');
$options = array(
	'classes' => array(
		'mainDiv' => 'hikashop_main_image_div',
		'contentClass' => 'hikashop_product_images',
		'firstImg' =>
'hikashop_product_main_image_thumb',
		'otherImg' => 'hikashop_small_image_div',
		'btn_add' => 'fa fa-plus',
		'btn_upload' => 'fa fa-upload'
	),
	'upload' => $upload,
	'gallery' => $upload,
	'text' => ($upload ?
JText::_('HIKA_PRODUCT_IMAGES_EMPTY_UPLOAD') :
JText::_('HIKA_PRODUCT_IMAGES_EMPTY')),
	'tooltip' => true,
	'uploader' => array('product',
'product_image'),
	'vars' => array(
		'product_id' => @$this->product->product_id,
		'product_type' => $product_type,
		'file_type' => 'product'
	),
	'buttons' => array(
		array(
			'tooltip' => JText::_('HIKA_ENTER_IMAGE_PATH'),
			'class' => 'fa fa-link',
			'text' => 'HIKA_ENTER_IMAGE_PATH',
			'id' => $uploader_id.'_urlpopup',
			'url' =>
hikashop_completeLink('product&task=selectimage&pathonly=1&pid='.@$this->product->product_id,true),
			'onclick' => 'return
window.hkUploaderLisproduct/tmpl/form_file_entry.php000064400000004612151162050350013075
0ustar00derList['hikashop_'+type+'_image'].imageClickBlocked)
return false; // Firefox trick
	t.submitFct = function(data) {};
	if(el.getAttribute('rel') == null) {
		href = el.href;
		n = 'hikashop_product_image_edit';
	}
	t.openBox(n,href);
	return false;
}
window.productMgr.delImage = function(el, type) {
	if(type === undefined || type == '') type =
'product';
	if(type == 'variant') type = 'product_variant';
	if(!window.hkUploaderList['hikashop_'+type+'_image'])
return false;
	return
window.hkUploaderList['hikashop_'+type+'_image'].delImage(el);
}
</script>
product/tmpl/form_file_entry.php000064400000004612151162050350013075
0ustar00<?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
$type = (!empty($this->params->product_type) &&
$this->params->product_type == 'variant') ?
'variant' : 'product';
?><a href="#delete" class="deleteImg"
onclick="return window.productMgr.delImage(this, '<?php echo
$type; ?>');" title="<?php echo
JText::_('HIKA_DELETE'); ?>">
	<span class="fa-stack">
		<i class="fas fa-circle fa-stack-1x"
style="color:white"></i>
		<i class="fa fa-times-circle fa-stack-1x"></i>
	</span>
</a>
<div class="hikashop_image">
<?php
	if(empty($this->params->file_id))
		$this->params->file_id = 0;
	$image =
$this->imageHelper->getThumbnail(@$this->params->file_path,
array(100,
100product/tmpl/form_image.php000064400000006077151162050350012026
0ustar00ctMgr.editImage(this, '.$this->params->file_id.',
\''.$type.'\');"', '',
'link'
	);
?>
</div><input type="hidden" name="data[<?php echo
$type; ?>][product_images][]" value="<?php echo
@$this->params->file_id;?>"/>
product/tmpl/form_legacy.php000064400000016203151162050350012200
0ustar00product/tmpl/form_image.php000064400000006077151162050350012026
0ustar00ONSIVE) { ?>
	<div id="hikashop_zone_form">
		<table style="width:100%" class="table">
			<tr>
				<td width="70%" valign="top">
	<?php } else { ?>
	<div id="hikashop_product_form"
class="row-fluid">
		<div class="span6 hikaspanleft">
	<?php } ?>
				<?php
					$this->product_name_input =
"data[product][product_name]";
					$this->product_url_input = "data[product][product_url]";
					$this->product_meta_description_input =
"data[product][product_meta_description]";
					$this->product_keywords_input =
"data[product][product_keywords]";
					$this->product_page_title_input =
"data[product][product_page_title]";
					$this->product_alias_input =
"data[product][product_alias]";
					$this->product_canonical_input =
"data[product][product_canonical]";
					if($this->translation){
						$this->setLayout('translation');
						echo $this->loadTemplate();
					}else{
						?>
						<fieldset class="adminform hikashop_product_maininfo"
id="htmlfieldset">
							<legend><?php echo JText::_( 'MAIN_INFORMATION'
); ?></legend>
							<?php
								$this->setLayout('normal');
								echo $this->loadTemplate();
							?>
						</fieldset>
						<?php
					}

					if($this->element->product_type=='main' ||
$this->element->product_type=='template'){
						$this->setLayout('info');
						echo $this->loadTemplate();
					}else{
						$this->setLayout('infovariant');
						echo $this->loadTemplate();
					}

					if(!empty($this->fields)){?>
						<table class="admintable table"
width="100%">
						<?php foreach($this->fields as $fieldName =>
$oneExproduct/tmpl/form_image_entry.php000064400000003332151162050350013236
0ustar00							</td>
							</tr>
							<?php }
						} ?>
						</table>
					<?php }

					if(!empty($this->extra_blocks['product'])) {
						foreach($this->extra_blocks['product'] as $r) {
							if(is_string($r))
								echo $r;
							if(is_object($r)) $r = (array)$r;
							if(is_array($r)) {
								if(!isset($r['name']) && isset($r[0]))
									$r['name'] = $r[0];
								if(!isset($r['value']) && isset($r[1]))
									$r['value'] = $r[1];
					?>
							<tr>
								<td class="key"><?php echo
JText::_(@$r['name']); ?></td>
								<td><?php
echproduct/tmpl/form_image_entry.php000064400000003332151162050350013236
0ustar00						<legend><?php echo JText::_( 'OPTIONS' );
?></legend>
					<?php
					if(hikashop_level(1)){
						$this->type='options';
						$this->setLayout('related');
						echo $this->loadTemplate();
					}else{
		product/tmpl/form_legacy.php000064400000016203151162050350012200
0ustar00						?>
					</fieldset>
				<?php }?>
				<fieldset class="adminform hikashop_product_prices"
id="htmlfieldset">
					<legend><?php echo
JText::_('PRICES');?></legend>
					<?php
						$this->setLayout('price');
						echo $this->loadTemplate();
					?>
				</fieldset>
				<fieldset class="adminform hikashop_product_images"
id="htmlfieldset">
					<legend><?php echo
JText::_('HIKA_IMAGES');?></legend>
					<?php
						$this->setLayout('image');
						echo $this->loadTemplate();
					?>
				</fieldset>
				<fieldset class="adminform hikashop_product_files"
id="htmlfieldset">
					<legend><?php echo
JText::_('HIKA_FILES');?></legend>
					<?php
						$this->setLayout('file');
						echo
$this->loadTeproduct/tmpl/form_legacy.php000064400000016203151162050350012200
0ustar00me="ctrl" value="product" />
	<input type="hidden" name="legacy"
value="1" />
	<?php echo JHTML::_( 'form.token' ); ?>
</form>
product/tmpl/form_price.php000064400000034317151162050350012044
0ustar00<?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
$form_key = 'price';
if(!empty($this->editing_variant))
	$form_key = 'variantprice';
?>
<table id="hikashop_product_<?php echo $form_key;
?>_table" class="adminlist table table-striped"
style="width:100%">
	<thead>
		<tr>
			<th class="title"><?php
				echo JText::_('PRICE');
			?></th>
			<th class="title"><?php
				echo JText::_('RESTRICTIONS');
			?></th>
			<th style="width:60px;text-align:center">
				<button href="#" class="hikabtn btn-primary"
onclick="return window.productMgr.editPrice('<?php echo
$form_key ?>', 0);" title="<?php echo
JText::_('ADD'); ?>"><i class="fa
fa-plus"></i></button>
			</th>
		</tr>
	</thead>
	<tbody>
<?php
	$k = 0;
	foreach($this->product->prices as $i => $price) {
		if(empty($price->price_value))
			continue;
?>
		<tr class="row<?php echo $k ?>"
id="price_<?php echo $price->price_id; ?>">
			<td style="white-space: nowrap;"><?php
				if(!$this->config->get('floating_tax_prices',0)){
					echo
$this->currencyClass->format($price->price_value,$price->price_currency_id).
' / ';
				}
				echo
$this->currencyClass->format($price->price_value_with_tax,$price->price_currency_id);
			?></td>
			<td>
<?php
		$restrictions = array();
		$qty = max((int)$price->price_min_quantity, 1);
		if($qty > 1)
			$restrictions[] =
'<strong>'.JText::_('MINIMUM_QUANTITY').'</strong>:
'.$qty;
		if(!empty($price->price_users)) {
			$users = explode(',',$price->price_users);
			$text = array();
			foreach($users as $user) {
				if($user) {
					$data = $this->userClass->get($user);
					if($data){
						if(!empty($data->name))
							$text[] = $data->name;
						else
							$text[] = $data->user_email;
					}
				}
			}
			$restrictions[] =
'<strong>'.JText::_('USERS').'</strong>:
'.implode(', ',$text);
		}
		if($price->price_access != 'all' &&
hikashop_level(2)) {
			$groups = $this->joomlaAcl->getList();
			$access = explode(',',$price->price_access);
			$text = array();
			foreach($access as $a){
				if(empty($a))
					continue;
				foreach($groups as $group){
					if($group->id == $a){
						$text[] = $group->text;
						break;
					}
				}
			}
			$restrictions[] =
'<strong>'.JText::_('ACCESS_LEVEL').'</strong>:
'.implode(', ', $text);
		}
		if(!empty($price->price_start_date) &&
(int)$price->price_start_date > 0 && hikashop_level(2)) {
			$price->price_start_date =
hikashop_getDate($price->price_start_date, '%d %B %Y %H:%M');
			$restrictions[] =
'<strong>'.JText::_('START_DATE').'</strong>:
'. $price->price_start_date;
		}
		if(!empty($price->price_end_date) &&
(int)$price->price_end_date > 0 && hikashop_level(2)) {
			$price->price_end_date = hikashop_getDate($price->price_end_date,
'%d %B %Y %H:%M');
			$restrictions[] =
'<strong>'.JText::_('END_DATE').'</strong>:
'. $price->price_end_date;
		}
		if(!empty($price->price_site_id))
			$restrictions[] =
'<strong>'.JText::_('SITE_ID').'</strong>:
'.$price->price_site_id;
		echo implode('<br/>',$restrictions);
?>
			<input type="hidden" name="<?php echo
$form_key.'['.$i.'][price_access]'; ?>"
value="<?php echo $price->price_access; ?>"/>
			<input type="hidden" name="<?php echo
$form_key.'['.$i.'][price_end_date]'; ?>"
value="<?php echo @$price->price_end_date; ?>"/>
			<input type="hidden" name="<?php echo
$form_key.'['.$i.'][price_start_date]'; ?>"
value="<?php echo @$price->price_start_date; ?>"/>
			<input type="hidden" name="<?php echo
$form_key.'['.$i.'][price_users]'; ?>"
value="<?php echo $price->price_users; ?>"/>
			<input type="hidden" name="<?php echo
$form_key.'['.$i.'][price_min_quantity]'; ?>"
value="<?php echo $qty; ?>"/>
			<input type="hidden" name="<?php echo
$form_key.'['.$i.'][price_site_id]'; ?>"
value="<?php echo $price->price_site_id; ?>"/>
			<input type="hidden" name="<?php echo
$form_key.'['.$i.'][price_currency_id]'; ?>"
value="<?php echo $price->price_currency_id; ?>"/>
			<input type="hidden" name="<?php echo
$form_key.'['.$i.'][price_id]'; ?>"
value="<?php echo $price->price_id;?>" />
			<input type="hidden" name="<?php echo
$form_key.'['.$i.'][price_value]'; ?>"
value="<?php
if($this->config->get('floating_tax_prices',0)){ echo
@$price->price_value_with_tax; }else{ echo @$price->price_value; }
?>" />
			</td>
			<td style="text-align:center">
				<a href="#edit"
onclick="window.productMgr.editPrice('<?php echo $form_key
?>', <?php echo $price->price_id;?>); return false;"
title="<?php
echoproduct/tmpl/form_price.php000064400000034317151162050350012044
0ustar00E_QTY_INPUT_NAME}" value="{PRICE_QTY_VALUE}"/>
				<input type="hidden"
name="{PRICE_SITE_INPUT_NAME}"
value="{PRICE_SITE_VALUE}"/>
				<input type="hidden"
name="{PRICE_CURRENCY_INPUT_NAME}"
value="{PRICE_CURRENCY_VALUE}"/>
				<input type="hidden"
name="{PRICE_ID_INPUT_NAME}" value="{PRICE_ID}"/>
				<input type="hidden"
name="{PRICE_VALUE_INPUT_NAME}"
value="{PRICE_VALUE}"/>
			</td>
			<td style="text-align:center;">
				{EDIT_BUTTON}
				<a href="#delete"
onclick="window.hikashop.deleteRow(this); return false;"
title="<?php echo JText::_('HIKA_DELETE');
?>"><i class="fas
fa-trash"></i></a>
			</td>
		</tr>
	</tbody>
</product/tmpl/form_price.php000064400000034317151162050350012044
0ustar00ition[formkey] = pid;

	el = d.getElementById('hikashop_' + formkey +
'_edit_zone');
	if(!el)
		return false;

	window.productMgr.priceEdition[formkey+'_edit'] = true;
	el.style.display = '';

	o.xRequest(u.replace('{ID}', pid).replace('{FORMKEY}',
formkey), {mode:"GET"}, function(x,p) {
		if(x.responseText == '') return;
		td = el;
		if(typeof(hkjQuery) != "undefined") {
			o.updateElem(td, x.responseText);
			if(hkjQuery().chosen)
				hkjQuery('.hika_options select').chosen();

			var elements, i;
			elements = document.querySelectorAll(".field-calendar");
			for (i = 0; i < elements.length; i++) {
				if(typeof(JoomlaCalendar) != "undefined")
					JoomlaCalendar.init(elements[i]);
			}

		} else {
			o.updateElem(td, x.responseText);
		}
		window.productMgr.priceEdition[formkey+'_edit'] = false;
	});

	return false;
};
window.productMgr.disablePriceRow = function(id) {
	var d = document;
	el = d.getElementById('price_' + id);
	if(el)
		el.style.display = 'none';
	return;
};
window.productMgr.restorePriceRow = function(id) {
	var d = document;
	el = d.getElementById('price_' + id);
	if(el)
		el.style.display = '';
	return;
};
window.productMgr.cancelNewPrice = function(formkey) {
	var d = document;
	var el = d.getElementById('hikashop_' + formkey +
'_edit_zone');
	if(!el)
		return false;
	el.style.display = 'none';
	return false;
};
window.productMgr.addPrice = function(formkey) {
	var w = window, d = document, o = w.Oby, id = null, qty = null, site =
'', i = null,
		el = null, value = null, curr = null, row_id = false, users = null,
userid = [],
		username = '', access = null, start_date = null, end_date =
null, edit = '', price = '', restrictions = [];

	el = d.getElementById('hikashop_' + formkey +
'_site_edit');
	if(el) site = el.value;
	el = d.getElementById('hikashop_' + formkey +
'_qty_edit');
	if(el) qty = parseInt(el.value);
	el = d.getElementById('hikashop_' + formkey +
'_id_edit');
	if(el) id = parseInt(el.value);

	if(id){
		el = d.getElementById('price_' + id);
		if(el){
			var tbody = el.parentNode;
			tbody.removeChild(el);
			var table = tbody.parentNode;
			w.hikashop.cleanTableRows(table);
		}
		row_id = 'price_' + id;
		edit = '<a href="#edit"
onclick="window.productMgr.editPrice(\'' + formkey +
'\',' + id + '); return false;"><img
src="<?php echo HIKASHOP_IMAGES; ?>edit.png"
alt="<?php echo JText::_('HIKA_EDIT', true);
?>"></a>';
	}

	el = d.getElementById('hikashop_' + formkey +
'_currency_edit');
	if(el){
		currid = parseInt(el.options[el.selectedIndex].value);
		curr = el.options[el.selectedIndex].text;
	}
	el = d.getElementById('hikashop_' + formkey +
'_acl_edit');
	if(el) access = el.value;
	el = d.getElementById('hikashop_' + formkey +
'_start_date_edit');
	if(el) start_date = el.getAttribute('data-alt-value');
	el = d.getElementById('hikashop_' + formkey +
'_end_date_edit');
	if(el) end_date = el.getAttribute('data-alt-value');

	el = d.getElementById('hikashop_' + formkey +
'_edit');
	if(el) {
		value = parseFloat(el.value.replace(',', '.'));
		if(isNaN(value))
			value = 0;
		price = value + ' ' + curr;

		el = d.getElementById('hikashop_' + formkey +
'_with_tax_edit');
		if(el) {
			value_with_tax = parseFloat(el.value.replace(',',
'.'));
			if(isNaN(value_with_tax))
				value_with_tax = 0;
			price += ' / ' + value_with_tax + ' ' + curr;
		}
	}

	users = d.getElementsByName('hikashop_' + formkey +
'_user_edit[]');
	var names = [];
	if(users && users.length) {
		userid.push('');
		for(var i = 0; i < users.length; i++) {
			userid.push(users[i].value);
			var usersList = w.oNameboxes['hikashop_' + formkey +
'_user_edit'].data;
			usersList = Object.keys(usersList).map(function (key) { return
usersList[key]; });
			for(var j = 0; j < usersList.length; j++) {
				if(usersList[j].user_id == users[i].value){
					names.push(usersList[j].name);
					break;
				}
			}
		}
		userid.push('');
	}

	if(isNaN(qty))
		qty = 1;
	if(qty > 1)
		restrictions.push('<strong><?php echo
JText::_('MINIMUM_QUANTITY', true); ?></strong>: '
+ qty);

	if(names.length)
		restrictions.push('<strong><?php echo
JText::_('USERS', true); ?></strong>: ' +
names.join(', '));
	if(start_date != '')
		restrictions.push('<strong><?php echo
JText::_('START_DATE', true); ?></strong>: ' +
start_date);
	if(end_date != '')
		restrictions.push('<strong><?php echo
JText::_('END_DATE', true); ?></strong>: ' +
end_date);
	if(access && access != 'all'){
		var groups = access.split(",");
		var length = groups.length;
		var text = [];
		for (var i = 0; i < length; i++) {
			if(groups[i] == '')
				continue;
			node = w['hikashop_' + formkey +
'_acl_edit'].find(groups[i]);
			if(node)
				text.push(node.name);
		}
		restrictions.push('<strong><?php echo
JText::_('ACCESS_LEVEL', true); ?></strong>: ' +
text.join(', '));
	}
	if(site != '')
		restrictions.push('<strong><?php echo
JText::_('SITE_ID', true); ?></strong>: ' + site);

	i = d.getElementById('hikashop_product_' + formkey +
'_table').tBodies[0].rows.length;

	var htmlblocks = {
		PRICE: price, RESTRICTIONS: restrictions.join('<br/>'),
		PRICE_USERS_INPUT_NAME: formkey + '[' + i +
'][price_users]', PRICE_USERS_VALUE: userid.join(','),
		PRICE_ACCESS_INPUT_NAME: formkey + '[' + i +
'][price_access]', PRICE_ACCESS_VALUE: access,
		PRICE_START_DATE_INPUT_NAME: formkey + '[' + i +
'][price_start_date]', PRICE_START_DATE_VALUE: start_date,
		PRICE_END_DATE_INPUT_NAME: formkey + '[' + i +
'][price_end_date]', PRICE_END_DATE_VALUE: end_date,
		PRICE_QTY_INPUT_NAME: formkey + '[' + i +
'][price_min_quantity]', PRICE_QTY_VALUE: qty,
		PRICE_SITE_INPUT_NAME: formkey + '[' + i +
'][price_site_id]', PRICE_SITE_VALUE: site,
		PRICE_CURRENCY_INPUT_NAME: formkey + '[' + i +
'][price_currency_id]', PRICE_CURRENCY_VALUE: currid,
		PRICE_ID_INPUT_NAME: formkey + '[' + i +
'][price_id]', PRICE_ID: id,
		PRICE_VALUE_INPUT_NAME: formkey + '[' + i +
'][price_value]', PRICE_VALUE: value,
		EDIT_BUTTON: edit
	};

	w.hikashop.dupRow('hikashop_' + formkey +
'_row_template', htmlblocks, row_id);
	w.productMgr.cancelNewPrice(formkey);
	return false;
};

window.productMgr.updatePrice = function(taxed, key) {
	var d = document, o = window.Oby, conversion = '', elName =
'hikashop_' + key, destName = elName;
	if(taxed) {
		elName += '_with_tax_edit'; destName += '_edit';
conversion = 1;
	} else {
		elName += '_edit'; destName += '_with_tax_edit';
conversion = 0;
	}

	var price = d.getElementById(elName).value,
		dest = d.getElementById(destName),
		taxElem = d.getElementById('dataproductproduct_tax_id'),
		tax_id = -1;

	if(!dest)
		return;

	if(taxElem)
		tax_id = taxElem.value;
<?php if(!empty($this->product->product_tax_id)) { ?>
	else
		tax_id = <?php echo $this->product->product_tax_id; ?>;
<?php } ?>
	var url = '<?php echo str_replace('\'',
'\\\'',
hikashop_completeLink('product&task=getprice&price={PRICE}&tax_id={TAXID}&conversion={CONVERSION}',
true, false, true)); ?>';
	url = url.replace('{PRICE}',
encodeURIComponent(price)).replace('{TAXID}',
encodeURIComponent(tax_id)).replace('{CONVERSION}',
encodeURIComponent(conversion));
	o.xRequest(url, null, function(xhr, params) {
		dest.value = xhr.responseText;
	});
};
</script>
product/tmpl/form_price_edit.php000064400000010070151162050350013037
0ustar00<?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');
?><dl class="hika_options">
	<dt><?php echo JText::_('PRICE'); ?></dt>
	<dd>
		<input type="hidden" id="hikashop_<?php echo
$this->form_key; ?>_id_edit" name=""
value="<?php echo @$this->price->price_id;
?>>"/>
		<input type="text" size="5"
style="width:70px;"
onchange="window.productMgr.updatePrice(false, '<?php echo
$this->form_key; ?>')" id="hikashop_<?php echo
$this->form_key; ?>_edit" name="" value="<?php
if($this->config->get('floating_tax_prices',0)){ echo
@$this->price->price_value_with_tax; }else{ echo
@$this->price->price_value; } ?>"/>
	</dd>
<?php
if(!$this->config->get('floating_tax_prices',0)){ ?>
	<dt><?php echo JText::_('PRICE_WITH_TAX');
?></dt>
	<dd>
		<input type="text" size="5"
style="width:70px;"
onchange="window.productMgr.updatePrice(true, '<?php echo
$this->form_key; ?>')" id="hikashop_<?php echo
$this->form_key; ?>_with_tax_edit" name=""
value="<?php echo @$this->price->price_value_with_tax;
?>"/>
	</dd>
<?php } ?>
	<dt><?php echo JText::_('CURRENCY'); ?></dt>
<?php 
$width = '80px';
if (HIKASHOP_J40) {
	$width = '110px';
} ?>
	<dd>
		<?php echo $this->currencyType->display('',
@$this->price->price_currency_id, 'size="1"
style="width:'.$width.'"','hikashop_' .
$this->form_key . '_currency_edit'); ?>
	</dd>
	<dt><?php echo JText::_('PRODUCT_QUANTITY');
?></dt>
	<dd>
		<input type="text" size="5"
style="width:70px;" id="hikashop_<?php echo
$this->form_key; ?>_qty_edit" name=""
value="<?php echo $this->price->price_min_quantity;
?>"/>
	</dd>
<?php if(hikashop_level(2)) { ?>
	<dt><?php echo JText::_('START_DATE');
?></dt>
	<dd>
		<?php echo JHTML::_('calendar',
hikashop_getDate((@$this->price->price_start_date?@$this->price->price_start_date:''),'%Y-%m-%d
%H:%M'), 'price_start_date', 'hikashop_' .
$this->form_key . '_start_date_edit',
hikashop_getDateFormat('%d %B %Y %H:%M'), array('size'
=> '20', 'showTime' => true)); ?>
	</dd>
	<dt><?php echo JText::_('END_DATE'); ?></dt>
	<dd>
		<?php echo JHTML::_('calendar',
hikashop_getDate((@$this->price->price_end_date?@$this->price->price_end_date:''),'%Y-%m-%d
%H:%M'), 'price_end_date', 'hikashop_' .
$this->form_key . '_end_date_edit',
hikashop_getDateFormat('%d %B %Y %H:%M'), array('size'
=> '20', 'showTime' => true)); ?>
	</dd>
	<dt><?php echo JText::_('ACCESS_LEVEL');
?></dt>
	<dd>
		<?php echo $this->joomlaAcl->display('hikashop_' .
$this->form_key . '_acl_edit'.$this->price->price_id,
@$this->price->price_access, true, true, 'hikashop_' .
$this->form_key . '_acl_edit'); ?>
	</dd>
	<dt><?php echo JText::_('USERS'); ?></dt>
	<dd>
<?php
echo $this->nameboxVariantType->display(
	'hikashop_' . $this->form_key . '_user_edit',
	explode(',',trim(@$this->price->price_users,',')),
	hikashopNameboxType::NAMEBOX_MULTIPLE,
	'user',
	array(
		'id' => 'hikashop_' . $this->form_key .
'_user_edit',
		'add' => true,
		'default_text' => 'PLEASE_SELECT'
	)
);
?>
	</dd>
<?php } ?>
<?php if($this->jms_integration){ ?>
	<dt><?php echo JText::_('SITE_ID'); ?></dt>
	<dd>
		<?php echo
str_replace('class="custom-select"','class="custom-select
no-chzn" style="width:90px;"',
MultisitesHelperUtils::getComboSiteIDs( @$this->price->price_site_id,
'hikashop_' . $this->form_key . '_site_edit',
JText::_( 'SELECT_A_SITE'))); ?>
	</dd>
<?php } ?>
</dl>
<div style="float:right">
	<button onclick="return window.productMgr.addPrice('<?php
echo $this->form_key; ?>');" class="btn
btn-success">
		<i class="fa fa-save"></i> <?php echo
JText::_('HIKA_OK'); ;?>
	</button>
</div>
<button onclick="<?php if(!empty($this->price->price_id))
echo
'window.productMgr.restorePriceRow('.$this->price->price_id.');';
?>return window.productMgr.cancelNewPrice('<?php echo
$this->form_key ?>');" class="btn
btn-danger">
	<i class="fa fa-times"></i> <?php echo
JText::_('HIKA_CANCEL'); ;?>
</button>
<div style="clear:both"></div>
product/tmpl/form_variants.php000064400000037442151162050370012575
0product/tmpl/form_price_edit.php000064400000010070151162050350013037
0ustar00nt)$this->product->product_id; ?>);"><i
class="fa fa-plus"></i> <?php echo
JText::_('HIKA_ADD_VARIANTS'); ?></button>
	</div>
	<div id="hikashop_variant_bundle_toolbar"
style="display:none;">
		<button class="btn btn-danger" onclick="return
window.productMgr.deleteVariants(this, <?php echo
(int)$this->product->product_id; ?>);"><i
class="fa fa-times"></i> <?php echo
JText::_('HIKA_DELETE'); ?></button>
		<button class="btn btn-info" onclick="return
window.productMgr.duplicateVariants(this, <?php echo
(int)$this->product->product_id; ?>);"><i
class="fa fa-copy"></i> <?php echo
JText::_('HIKA_DUPLICATE'); ?></button>
	</div>
	<div style="clear:both"></div>
</div>
<div
id="hikashop_product_variant_creatioproduct/tmpl/form_price_edit.php000064400000010070151162050350013037
0ustar00		continue;
		}
		$characteristics[(int)$characteristic->characteristic_id] =
(int)$characteristic->characteristic_id;

?>			<th><?php echo
hikashop_translate($characteristic->characteristic_value);
?></th>
<?php
	}
?>
			<th><?php echo JText::_('PRICE'); ?></th>
			<th><?php echo JText::_('PRODUCT_QUANTITY');
?></th>
			<th style="width:1%"><?php echo
JText::_('HIKA_PUBLISHED'); ?></th>
			<th style="width:1%"><?php echo
JText::_('HIKA_DEFAULT'); ?></th>
			<th style="width:1%"><?php echo
JText::_('ID'); ?></th>
		</tr>
	</thead>
	<tbody>
<?php
	$tab_notice_msg = '';
	$tab_variant_counter_color = (count($this->product->variants) >
1) ? 'green' : (count($this->product->variants) == 0 ?
'red' : 'orange');
	$default_found = false;
	$k = 0;
	foreach($this->product->variants as $variant) {
	?>	<tr class="row<?php echo $k; ?>"
id="hikashop_product_variant_line_<?php echo
$variant->product_id; ?>">
<!--style="cursor:pointer" onclick="return
window.productMgr.editVariant(<?php echo $variant->product_id;
?>);">-->
			<td style="text-align:center">
				<input onchange="window.productMgr.checkVariant(this, <?php
echo $variant->product_id; ?>);" type="checkbox"
id="hikashop_product_variant_checkbox_<?php echo
$variant->product_id; ?>" value="<?php echo
$variant->product_id; ?>"/>
			</td>
			<td style="text-align:center"><a
href="#edit:<?php echo $variant->product_id; ?>"
onclick="return window.productMgr.editVariant(<?php echo
$variant->product_id; ?>);"><i class="fas
fa-pen"></i></a></td>
			<td>
				<?php echo $variant->product_code; ?>
			</td>
<?php
		$cpt = 0;
		foreach($this->product->characteristics as $characteristic) {
			if((int)$characteristic->characteristic_parent_id > 0)
				continue;

			$o =
@$variant->characteristics[$characteristic->characteristic_id];
			if(!empty($o) && isset($default_variants[ (int)$o->id ]))
				$cpt++;
?>			<td style="cursor:pointer" onclick="return
window.productMgr.editVariant(<?php echo $variant->product_id;
?>);"><?php echo hikashop_translate(@$o->value);
?></td>
<?php
		}
		$variant_default = ($cpt == count($default_variants)) ?
'icon-publish' : 'icon-unpublish';
		if($variant_default == 'icon-publish')
			$default_found = true;
		if(!HIKASHOP_J30)
			$variant_default = ($variant_default == 'icon-publish') ?
'grid_true' : 'grid_false';
		$field = 'price_value';
		if($this->config->get('floating_tax_prices')){
			$field = 'price_value_with_tax';
		}
?>			<td style="cursor:pointer" onclick="return
window.productMgr.editVariant(<?php echo $variant->product_id;
?>);"><?php echo
$this->currproduct/tmpl/form_variants.php000064400000037442151162050370012575
0ustar00 = ' - ' .
JText::_('HIKA_NOT_DEFAULT_VARIANT');
	}
?>
	</tbody>
</table>
<?php if(hikaInput::get()->getCmd('tmpl', '') !=
'component') { ?>
<script type="text/javascript">
window.hikashop.ready(function(){
	var el =
document.getElementById('hikashop_product_variant_label');
	if(el)
		el.innerHTML = '<span class="hk-label hk-label-<?php echo
$tab_variant_counter_color; ?>"><?php echo
count($this->product->variants) . $tab_notice_msg;
?></span>';
});
window.productMgr.variantEdition = {
	current: null,
	loading: false,
	checked: null
};
window.prproduct/tmpl/form_variants.php000064400000037442151162050370012575
0ustar00yId('hikashop_product_variant_edition'),
		url = '<?php echo
hikashop_completeLink('product&task=variant&product_id='.$this->product->product_id.'&cid={CID}',true,false,true);
?>';

	id = parseInt(id);
	if(isNaN(id) || id === 0)
		return false;
	if(w.productMgr.variantEdition.loading == true)
		return false;

	if(t.variantEdition.current) {
		l = d.getElementById('hikashop_product_variant_line_' +
t.variantEdition.current);
		if(l) o.removeClass(l, 'selectedVariant');
	}
	if(t.variantEdition.current &&
window.productMgr.closeVariantEditor) {
		try { window.productMgr.closeVariantEditor(); } catch(err){}
	}

	l = d.getElementById('hikashop_product_variant_line_' + id);
	if(l) o.addClass(l, 'selectedVariant');

	w.productMgr.variantEdition.current = id;
	var url = url.replace('{CID}',id);
	o.addClass(el, 'ajax_loading');
	o.xRequest(url,{update:el},function(x,p){
		o.removeClass(el, 'ajax_loading');
		w.productMgr.variantEdition.loading = false;
		setTimeout(function(){
			window.Oby.scrollTo('hikashop_product_variant_edition', true,
true, 100);
			if(typeof(hkjQuery) != "undefined" &&
hkjQuery().hktooltip)
				hkjQuery('[data-toggle="hk-tooltip"]').hktooltip({"html":
true,"container": "body"});
			window.hikashop.dlTitle(el);
			if(typeof(hkjQuery) != "undefined" &&
hkjQuery().chosen) {
				hkjQuery('.hika_options select').chosen();
				hkjQuery('.hikashop_field_dropdown').chosen();
			}
		},20);
	});
	return false;
};
window.productMgr.closeVariant = function() {
	var t = this, d = document,
		el = d.getElementById('hikashop_product_variant_edition');

	if(window.productMgr.closeVariantEditor) {
		try { window.productMgr.closeVariantEditor(); } catch(err){}
	}
	if(el) {
		setTimeout(function() {
			el.innerHTML = '';
		}, 10);
	}
	if(t.variantEdition.current) {
		var l = d.getElementById('hikashop_product_variant_line_' +
t.variantEdition.current);
		if(l) window.Oby.removeClass(l, 'selectedVariant');
	}
	t.variantEdition.current = null;
	t.variantEdition.loading = false;
	return false;
};
window.productMgr.cancelVariantEdition = function() {
	var t = this;
	if(t.variantEdition.current === null)
		return true;
	if(t.variantEdition.loading)
		return false;
	if(confirm('<?php echo str_replace('\'',
'\\\'',
JText::_('CONFIRM_CLOSING_VARIANT_IN_EDITION')); ?>')) {
		t.closeVariant();
		return true;
	}
	return false;
};
window.productMgr.saveVariant = function(id) {
	var w = window, o = w.Oby, d = document,
		el = d.getElementById('hikashop_product_variant_edition'),
		form = d.getElementById('hikashop_products_form');
		url = '<?php echo
hikashop_completeLink('product&task=save&subtask=variant&product_id='.$this->product->product_id.'&variant=1&variant_id={CID}&'.hikashop_getFormToken().'=1',true,false,true);
?>';
	if(!el)
		return false;
	url = url.replace('{CID}', id);

	o.addClass(el, 'ajax_loading');
	w.productMgr.variantEdition.loading = true;

	if(window.productMgr.saveVariantEditor) {
		try { window.productMgr.saveVariantEditor(); } catch(err){}
	}
	o.fireAjax("syncWysiwygEditors", null);

	var formData = o.getFormData(el);
	o.xRequest(url, {update:el, mode: 'POST', data:formData},
function(x,p) {
		o.removeClass(el, 'ajax_loading');
		w.productMgr.variantEdition.loading = false;
		w.productMgr.refreshVariantList();
	});
	return false;
};
window.productMgr.publishVariant = function(ev, id) {
	var event = ev || window.event;
	event.stopPropagation();
	event.preventDefault();

	var w = window, o = w.Oby, d = document,
		url = '<?php echo
hikashop_completeLink('product&task=variants&subtask=publish&product_id='.$this->product->product_id.'&variant_id={CID}&'.hikashop_getFormToken().'=1',true,false,true);
?>';
	url = url.replace('{CID}', id);
	o.xRequest(url, {update:'hikashop_product_variant_list'});
	return false;
};
window.productMgr.setDefaultVariant = function(ev, id) {
	var event = ev || window.event;
	event.stopPropagation();
	event.preventDefault();

	var w = window, o = w.Oby, d = document,
		url = '<?php echo
hikashop_completeLink('product&task=variants&subtask=setdefault&product_id='.$this->product->product_id.'&variant_id={CID}&'.hikashop_getFormToken().'=1',true,false,true);
?>';
	url = url.replace('{CID}', id);
	o.xRequest(url, {update:'hikashop_product_variant_list'});
	return false;
};
window.productMgr.checkVariant = function(el, id) {
	var ve = window.productMgr.variantEdition, d = document,
		tool = d.getElementById('hikashop_variant_bundle_toolbar');
	if(!tool)
		return;
	if(el.checked) {
		if(ve.checked === null)
			ve.checked = [];
		if(ve.checked.indexOf(id) < 0)
			ve.checked.push(id);
	} else {
		if(ve.checked === null)
			ve.checked = [];
		var p = ve.checked.indexOf(id);
		if(p >= 0)
			ve.checked.splice(p, 1);
		if(ve.checked.length == 0) {
			ve.checked = null;
			var e =
d.getElementById('hikashop_product_variant_checkbox_general');
			if(e)
				e.checked = false;
		}
	}
	tool.style.display = (ve.checked && ve.checked.length > 0) ?
'' : 'none';
};
window.productMgr.addVariants = function(el, id) {
	if(this.cancelVariantEdition && !this.cancelVariantEdition())
		return false;
	window.Oby.xRequest('<?php echo
hikashop_completeLink('product&task=variants&subtask=add&product_id='.$this->product->product_id.'&'.hikashop_getFormToken().'=1',true,false,true);
?>',
{update:'hikashop_product_variant_creation_container'});
	return false;
};
window.productMgr.populateVariants = function(mode) {
	var d = document, w = window, o = w.Oby, data = null,
		ve = window.productMgr.variantEdition,
		el =
d.getElementById('hikashop_product_variant_creation_container');
	if(!el)
		return false;

	data = o.getFormData(el);
	if(mode && mode == 'duplicate') {
		if(ve.length == 0) {
			alert('<?php echo str_replace("'",
"\\'", JText::_('PLEASE_SELECT_SOMETHING'));
?>');
			return false;
		}

		for(var i = ve.checked.length - 1; i >= 0; i--) {
			data += '&cid[]=' + ve.checked[i];
		}
	}
	if(mode && mode == 'add') {
		var characteristics = [<?php echo implode(',',
$characteristics); ?>];
		rawData = data;
		if(rawData.indexOf('data[variant_add]') < 0)
			rawData = decodeURI(rawData);
		if(rawData.indexOf('data[variant_add]') >= 0) {
			for(var i = characteristics.length - 1; i >= 0; i--) {
				if(rawData.indexOf('data[variant_add][' + characteristics[i]
+ '][]') >= 0)
					continue;
				alert('<?php echo str_replace("'",
"\\'",
JText::_('PLEASE_SELECT_A_VALUE_FOR_EACH_CHARACTERISTIC'));
?>');
				return false;
			}
		}
	}

	o.xRequest('<?php echo
hikashop_completeLink('product&task=variants&subtask=populate&product_id='.$this->product->product_id.'&'.hikashop_getFormToken().'=1',true,false,true);
?>',
		{mode: 'POST', data: data},
		function(x,p) {
			if(x.responseText != '1')
				o.updateElem(el, x.responseText);
			window.productMgr.refreshVariantList();
		}
	);
	return false;
};
window.productMgr.cancelPopulateVariants = function() {
	var d = document, el =
d.getElementById('hikashop_product_variant_creation_container');
	if(el)
		setTimeout(function() { el.innerHTML = ''; }, 10);
	return false;
};
window.productMgr.duplicateVariants = function(el, id) {
	var ve = window.productMgr.variantEdition, d = document;
	if(ve.checked.length > 0) {
		window.Oby.xRequest('<?php echo
hikashop_completeLink('product&task=variants&subtask=duplicate&product_id='.$this->product->product_id.'&'.hikashop_getFormToken().'=1',true,false,true);
?>',
{update:'hikashop_product_variant_creation_container'});
	} else {
		var el =
d.getElementById('hikashop_product_variant_creation_container');
		if(el) el.innerHTML = '';
	}
	return false;
};
window.productMgr.deleteVariants = function(el, id) {
	var w = window, d = document, o = w.Oby, ve =
window.productMgr.variantEdition, data = '';
	if(ve.checked.length == 0)
		return false;
	var msg = '<?php echo str_replace('\'',
'\\\'',
JText::_('PLEASE_CONFIRM_DELETION_X_VARIANTS')); ?>';
	if(!confirm(msg.replace('{NUM}', ve.checked.length)))
		return false;
	for(var i = ve.checked.length - 1; i >= 0; i--) {
		if(data.length > 0) data += '&';
		data += 'cid[]=' + ve.checked[i];
	}
	o.xRequest('<?php echo
hikashop_completeLink('product&task=variants&subtask=delete&product_id='.$this->product->product_id.'&'.hikashop_getFormToken().'=1',true,false,true);
?>',
		{mode: 'POST', data: data},
		function(x,p) {
			window.productMgr.refreshVariantList();
		}
	);
	return false;
};
</script>
<?php } else { ?>
<script type="text/javascript">
if(window.productMgr.variantEdition)
	window.productMgr.variantEdition.checked = null;
var el =
document.getElementById('hikashop_product_variant_label');
if(el)
	el.innerHTML = '<span class="hk-label hk-label-<?php echo
$tab_variant_counter_color; ?>"><?php echo
count($this->product->variants) . $tab_notice_msg;
?></span>';
</script>
<?php }
product/tmpl/form_variants_add.php000064400000005606151162050370013402
0ustar00<?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
if($this->subtask != 'duplicate') {
	$populateMode = 'add';
?>
<dl>
<?php foreach($this->characteristics as $characteristic) { ?>
	<dt><?php echo $characteristic->characteristic_value;
?></dt>
	<dd><?php
		echo $this->nameboxVariantType->display(
			'data[variant_add][' . $characteristic->characteristic_id .
'][]',
			null,
			hikashopNameboxType::NAMEBOX_MULTIPLE,
			'characteristic_value',
			array(
				'add' => true,
				'url_params' => array('ID' =>
$characteristic->characteristic_id)
			)
		);
	?></dd>
<?php } ?>
</dl>
<?php
} else {
	$populateMode = 'duplicate';
?>
<div>
	<select style="width:30%"
name="data[variant_duplicate][characteristic]"
onchange="window.productMgr.duplicateChangeCharacteristic(this);">
<?php foreach($this->characteristics as $characteristic) { ?>
		<option value="<?php echo
$characteristic->characteristic_id; ?>"><?php echo
$characteristic->characteristic_value; ?></option>
<?php } ?>
	</select>
	<div style="display:inline-block;width:68%;">
<?php
	if(empty($this->productClass))
		$this->productClass = hikashop_get('class.product');
	$c = reset($this->characteristics);
	echo $this->nameboxVariantType->display(
		'data[variant_duplicate][variants][]',
		null,
		hikashopNameboxType::NAMEBOX_MULTIPLE,
		'characteristic_value',
		array(
			'add' => true,
			'url_params' => array('ID' =>
$c->characteristic_id)
		)
	);
?>
	</div>
</div>
<script type="text/javascript">
window.productMgr.duplicateChangeCharacteristic = function(el) {
	var w = window, d = document,
		u = '<?php echo
hikashop_completeLink('characteristic&task=findList&characteristic_type=value&characteristic_parent_id={ID}',
true, false, true); ?>',
		a = '<?php echo
hikashop_completeLink('characteristic&task=add&characteristic_type=value&characteristic_parent_id={ID}&tmpl=json',
true, false, true); ?>';
	var n = w.oNameboxes['data_variant_duplicate_variants'];
	if(!n) return true;
	n.changeUrl(u.replace('{ID}', el.value), {add:
a.replace('{ID}', el.value)});
	return true;
};
</script>
<?php } ?>
<div style="clear:both"></div>
<div style="float:right">
	<button onclick="return
window.productMgr.populateVariants('<?php echo $populateMode;
?>');" class="btn btn-success"><img
src="<?php echo HIKASHOP_IMAGES; ?>save.png"
alt="" style="vertical-align:middle;"/> <?php
echo JText::_('HIKA_SAVE'); ;?></button>
</div>
<button onclick="return
window.productMgr.cancelPopulateVariants();" class="btn
btn-danger"><img src="<?php echo HIKASHOP_IMAGES;
?>cancel.png" alt=""
style="vertical-align:middle;"/> <?php echo
JText::_('HIKA_CANCEL'); ;?></button>
<div style="clear:both"></div>
product/tmpl/galleryimage.php000064400000010632151162050370012355
0ustar00<?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');
?><fieldset>
	<div class="toolbar" id="toolbar"
style="float: right;">
		<button class="btn" type="button"
onclick="submitbutton('galleryselect');"><img
style="vertical-align: middle" src="<?php echo
HIKASHOP_IMAGES; ?>save.png"/><?php echo
JText::_('OK'); ?></button>
	</div>
</fieldset>
<form action="index.php?option=<?php echo HIKASHOP_COMPONENT;
?>&amp;ctrl=product" method="post"
name="adminForm" id="adminForm"
enctype="multipart/form-data">
	<table width="100%" height="100%"
class="adminlist" style="width:100%;height:100%;">
		<thead>
			<tr>
				<th></th>
				<th>
					<?php echo JText::_('FILTER');?>:
					<input type="text" name="search"
id="search" value="<?php echo
$this->escape($this->pageInfo->search);?>"
class="text_area"
onchange="document.adminForm.submit();" />
					<button class="btn"
onclick="document.adminForm.limitstart.value=0;this.form.submit();"><?php
echo JText::_( 'GO' ); ?></button>
					<button class="btn"
onclick="document.adminForm.limitstart.value=0;document.getElementById('search')product/tmpl/form_variants_add.php000064400000005606151162050370013402
0ustar00lleryimage&id='.JRequest::getInt('id').'&cid='.@$this->cid.'&product_id='.JRequest::getInt('product_id'),
true, true) ;?>&folder=" + node.value;
	}
}
</script>
					</div>
				</td>
				<td>
					<ul class="hikaGallery">
<?php
if(!empty($this->dirContent)) {
	foreach($this->dirContent as $k => $content) {
		$chk_uid = 'hikaGalleryChk_' . $k . '_' . uniqid();
?>
	<li class="hikaGalleryItem">
		<a class="hikaGalleryPhoto" href="#"
onclick="return window.hikagallery.select(this, '<?php echo
$chk_uid; ?>');">
			<img src="<?php echo $content->thumbnail->url;
?>" alt="<?php echo $content->filename;
?>"/>
			<span style="display:none;"
class="hikaGalleryChk"><input type="checkbox"
id="<?php echo $chk_uid ;?>" name="files[]"
value="<?php echo $content->path; ?>"/></span>
			<div
clproduct/tmpl/form_variants_add.php000064400000005606151162050370013402
0ustar00
				try {
					window.hikagallery.selection.chk.checked = false;
					o.removeClass(window.hikagallery.selection.obj,
'selected');
				} catch(e) {}
			}
			o.addClass(el.parentNode, 'selected');
			chk.checked = true;
			window.hikagallery.selection = {obj: el.parentNode, chk: chk};
		}
	}
	return false;
}
</script>
	<div class="clr"></div>
	<input type="hidden" name="data[file][file_type]"
value="product" />
	<input type="hidden" name="data[file][file_ref_id]"
value="<?php echo JRequest::getInt('product_id');
?>" />
	<input type="hidden" name="id" value="<?php
echo JRequest::getInt('id');?>" />
	<input type="hidden" name="option"
value="<?php echo HIKASHOP_COMPONENT; ?>" />
	<input type="hidden" name="tmpl"
value="component" />
	<input type="hidden" name="task"
value="galleryimage" />
	<input type="hidden" name="ctrl"
value="product" />
	<?php echo JHTML::_('form.token'); ?>
</form>
product/tmpl/image.php000064400000006731151162050370011002
0ustar00product/tmpl/galleryimage.php000064400000010632151162050370012355
0ustar00),
			'image_add_button',
			860, 480, '', '', 'button'
		);
	?>
	<?php
		echo $this->popup->display(
			'<img
src="'.HIKASHOP_IMAGES.'go.png"/>'.JText::_('SELECT'),
			'SELECT',
			hikashop_completeLink("product&task=galleryimage&product_id=".@$this->element->product_id,true),
			'image_gallery_button',
			860, 480, '', '', 'button'
		);
	?>
</div>
<br/>
				<table class="adminlist table table-striped table-hover"
cellpadding="1">
					<thead>
						<tr>
							<th class="title"><?php
								echo JText::_('HIKA_EDIT');
							?></th>
							<th class="title"><?php
								echo JText::_('HIKA_IMAGE');
							?></th>
							<th class="title"><?php
								echo JText::_('HIKA_NAME');
							?></th>
							<th class="title"><?php
								echo JText::_('HIKA_ORDER');
							?></th>
							<th class="title"><?php
								echo JText::_('HIKA_DELETE');
							?><product/tmpl/galleryimage.php000064400000010632151162050370012355
0ustar00HIKA_EDIT',
												hikashop_completeLink("product&task=selectimage&cid=".$row->file_id."&product_id=".@$this->element->product_id.'&id='.$id,true
),
												'image_edit_button'.$row->file_id,
												860, 480, '', '', 'link'
											);
										?>
									</td>
									<td class="hikashop_product_image_thumbnail">
										<?php echo
$this->image->display($row->file_path,true,"",'','',
100, 100); ?>
									</td>
									<td>
										<?php echo $row->file_name; ?>
									</td>
									<td class="order"><input type="text"
size="5" value="<?php echo
$row->file_ordering;?>" name="imageorder[<?php echo
$row->file_id;?>]" class="text_area"
style="text-align:center"/></td>
									<td width="1%" align="center">
										<a href="#" onclick="return
deleteRow('image_div_<?php echo
$row->file_id.'_'.$id;?>','image[<?php echo
$row->file_id;?>][<?php echo $id;?>]','image_<?php
echo $row->file_id.'_'.$id;?>');"><img
src="<?php echo HIKASHOP_IMAGES;
?>delete.png"/></a>
									</td>
									<td width="1%" align="center">
										<?php echo $row->file_id; ?>
										<div id="image_div_<?php echo
$row->file_id.'_'.$id;?>">
											<input type="hidden" name="image[<?php echo
$row->file_id;?>]" id="image[<?php echo
$row->file_id;?>][<?php echo $id;?>]" value="<?php
echo $row->file_id;?>"/>
										</div>
									</td>
								</tr>
							<?php
									$k = 1-$k;
								}
							}
						?>
					</tbody>
				</table>
product/tmpl/import.php000064400000000767151162050370011235
0ustar00<?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');
?>				<span id="result" >
					<?php echo @$this->rows[0]->product_id.'
'.@$this->rows[0]->product_name; ?> 
					<input type="hidden" name="template_product"
value="<?php echo @$this->rows[0]->product_id; ?>"
/>
				</span>
product/tmpl/index.html000064400000000032151162050370011170
0ustar00product/tmpl/image.php000064400000006731151162050370011002
0ustar00product/tmpl/info.php000064400000004645151162050370010655
0ustar00<?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');
?>			<table class="admintable table"
width="100%">
				<tr>
					<td class="key">
							<?php echo JText::_( 'PRODUCT_CODE' ); ?>
	product/tmpl/image.php000064400000006731151162050370011002
0ustar00oduct][product_tax_id]',@$this->element->product_tax_id);?>
					</td>
				</tr>
				<tr>
					<td class="key">
							<?php echo JText::_( 'MANUFACTURER' ); ?>
					</td>
					<td>
						<?php echo
$this->manufacturerType->display('data[product][product_manufacturer_id]',@$this->element->product_manufacturer_id);?>
					</td>
				</tr>

				<?php
				if(hikashop_level(1) &&
$this->config->get('product_contact',0)==1){ ?>
				<tr>
					<td class="key">
							<?php echo JText::_('DISPLAY_CONTACT_BUTTON'); ?>
					</td>
					<td>
						<?php echo JHTML::_('hikaselect.booleanlist',
"data[product][product_contact]" ,
'',@$this->element->product_contact ); ?>
					</td>
				</tr>
				<?php }
				if(hikashop_level(1) &&
$this->config->get('product_waitlist',0)==1){ ?>
				<tr>
					<td class="key">
							<?php echo JText::_('DISPLAY_WAITLIST_BUTTON'); ?>
					</td>
					<td>
						<?php echo JHTML::_('hikaselect.booleanlist',
"data[product][product_waitlist]" ,
'',@$this->element->product_waitlist ); ?>
					</td>
				</tr>
				<?php } ?>
				<tr>
					<td class="key">
							<?php echo JText::_( 'LAYOUT_ON_PRODUCT_PAGE' ); ?>
					</td>
					<td>
						<?php echo
$this->productDisplayType->display('data[product][product_layout]'
, @$this->element->product_layout); ?>
					</td>
				</tr>
				<?php
				$this->setLayout('common');
				echo $this->loadTemplate();
				?>
			</table>
product/tmpl/infovariant.php000064400000003276151162050370012241
0ustar00product/tmpl/import.php000064400000000767151162050370011235
0ustar00his->escape(@$this->element->product_code); ?>"
/>
					</td>
				</tr>
				<?php

					if(!empty($this->element->characteristics)){
						foreach($this->element->characteristics as $characteristic){
							?>
							<tr>
								<td class="key">
										<?php echo $characteristic->characteristic_value; ?>
								</td>
								<td>
									<?php echo
$this->characteristicHelper->display('characteristic['.$characteristic->characteristic_id.']',(int)@$characteristic->default_id,@$chaproduct/tmpl/index.html000064400000000032151162050370011170
0ustar00product/tmpl/import.phpproduct/tmpl/info.php000064400000004645151162050370010655
0ustar00product/tmpl/index.html000064400000000032151162050370011170
0ustar00n>
product/tmpl/info.php000064400000004645151162050370010655 0ustar00<?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');
?><div class="iframedoc"
id="iframedoc"></div>
<?php if($this->config->get('category_explorer')){?>
<?php if(!HIKASHOP_BACK_RESPONSIVE) { ?>
<div id="page-product">
	<table style="width:100%">
		<tr>
			<td style="vertical-align:top;border:1px solid
#CCC;background-color: #F3F3F3" width="200px">
				<?php echo
hikashop_setExplorer('product&task=listing',$this->pageInfo->filter->filter_id,false,'product');
?>
			</td>
			<td style="vertical-align:top;">
<?php } else { ?>
<div id="page-product" class="row-fluid">
	<div class="span2">
		<?php echo
hikashop_setExplorer('product&task=listing',$this->pageInfo->filter->filter_id,false,'product')product/tmpl/infovariant.php000064400000003276151162050370012241
0ustar00<?php echo JText::_( 'FILTER' ); ?>:
							<input type="text" name="search"
id="search" value="<?php echo
$this->escape($this->pageInfo->search);?>"
class="text_area" onchange="this.form.submit();" />
							<button class="btn"
onclick="this.form.limitstart.value=0;this.form.submit();"><?php
echo JText::_('GO'); ?></button>
							<button class="btn"
onclick="this.form.limitstart.value=0;document.getElementById('search').value='';this.form.submit();"><?php
echo JText::_('RESET'); ?></button>
						</td>
						<td>
<?php } else { ?>
						<div class="input-prepend input-append"
style="margin-top:4px;">
							<span class="add-on"><i
class="icon-filter"></i></span>
							<input type="text" name="search"
id="search" value="<?php echo
$this->escape($this->pageInfo->search);?>"
class="text_area" onchange="this.form.submit();" />
							<button class="btn"
onclick="this.form.limitstart.value=0;this.form.submit();"product/tmpl/infovariant.php000064400000003276151162050370012241
0ustar00HIKASHOP_BACK_RESPONSIVE) { ?>
						</td>
					</tr>
				</table>
<?php } else {?>
						</div>
						<div style="clear:both"></div>
					</div>
				</div>
<?php } ?>
				<table iproduct/tmpl/limit.php000064400000001004151162050370011022
0ustar00CT_PRICE'); ?>
							</th>
							<th class="title">
								<?php echo JHTML::_('grid.sort',
JText::_('PRODUCT_QUANTITY'), 'b.product_quantity',
$this->pageInfo->filter->order->dir,$this->pageInfo->filter->order->value
); ?>
							</th>
							<?php
								if(!empty($this->fields)){
									foreach($this->fields as $field){
										echo '<th
class="title">'.JHTML::_('grid.sort',
$this->fieldsClass->trans($field->field_realname),
'b.'.$field->field_namekey,
$this->pageInfo->filter->order->dir,$thiproduct/tmpl/listing.php000064400000022700151162050370011363
0ustar00								$count++;
							}
							echo $count;
							?>">
								<?php echo $this->pagination->getListFooter(); ?>
								<?php echo $this->pagination->getResultsCounter(); ?>
							</td>
						</tr>
					</tfoot>
					<tbody>
						<?php
							$k = 0;
							for($i = 0,$a = count($this->rows);$i<$a;$i++){
								$row =& $this->rows[$i];
								$publishedid = 'product_published-'.$row->product_id;
						?>
							<tr class="<?php echo "row$k"; ?>">
								<td align="center">
								<?product/tmpl/listing.php000064400000022700151162050370011363
0ustar00
								</td>
								<?php
								if(!empty($this->fields)){
									foreach($this->fields as $field){
										$namekey = $field->field_namekey;
										echo
'<td>'.$this->fieldsClass->show($field,$row->$namekey).'</td>';
									}
								}

								if($this->doOrdering){?>
								<td class="order">
									<?php if($this->manage){ ?>
										<span><?php echo $this->pagination->orderUpIcon(
$i, $this->order->reverse XOR ( $row->ordering >=
@$this->rows[$i-1]->ordering ), $this->order->orderUp,
'Move Up',$this->order->ordering ); ?></span>
										<span><?php echo $this->pagination->orderDownIcon(
$i, $a, $this->order->reverse XOR ( $row->ordering <=
@$this->rows[$i+1]->ordering ), $this->order->orderDown,
'Move Down' ,$this->order->ordering); ?></span>
										<input type="text" name="order[]"
size="5" <?php if(!$this->order->ordering) echo
'disabled="disabled"'?> value="<?php echo
$row->ordering; ?>" class="text_area"
style="text-align: center" />
									<?php }else{ echo $row->ordering; } ?>
								</td>
								<?php }?>
								<td align="center">
									<?php if($this->manage){ ?>
										<span id="<?php echo $publishedid ?>"
class="spanloading"><?php echo
$this->toggleClass->toggle($publishedid,(int)
$row->product_published,'product') ?></span>
									<?php }else{ echo
$this->toggleClass->display('activate',$row->product_published);
} ?>
								</td>
								<td width="1%" align="center">
									<?php echo $row->product_id; ?>
								</td>
							</tr>
						<?php
								$k = 1-$k;
							}
						?>
					</tbody>
				</table>
				<input type="hidden" name="option"
value="<?php echo HIKASHOP_COMPONENT; ?>" />
				<input type="hidden" name="task"
value="" />
				<input type="hidden" name="ctrl"
value="<?php echo JRequest::getCmd('ctrl'); ?>"
/>
				<input type="hidden" name="boxchecked"
value="0" />
				<input type="hidden" id="filter_id"
name="filter_id" value="<?php echo
$this->pageInfo->filter->filter_id; ?>" />
				<input type="hidden" name="filter_order"
value="<?php echo
$this->pageInfo->filter->order->value; ?>" />
				<input type="hidden" name="filter_order_Dir"
value="<?php echo $this->pageInfo->filter->order->dir;
?>" />
				<?php echo JHTML::_( 'form.token' ); ?>
			</form>
<?php if($this->config->get('category_explorer')){?>
<?php if(!HIKASHOP_BACK_RESPONSIVE) { ?>
			</td>
		</tr>
	</table>
</div>
<?php } else { ?>
	</div>
</div>
<?php } ?>
<?php } ?>
product/tmpl/listing.xml000064400000000312151162050370011367
0ustar00<?xml version="1.0" encoding="utf-8"?>
<metadata>
	<layout title="COM_HIKASHOP_PRODUCTS_VIEW_TITLE">
		<message>
			<![CDATA[COM_HIKASHOP_PRODUCTS_VIEW_DESC]]>
		</message>
	</layout>
</metadata>product/tmpl/menu.php000064400000001003151162050370010647
0ustar00<?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');
?>				<span id="result" >
					<?php echo @$this->rows[0]->product_id.'
'.@$this->rows[0]->product_name; ?>
					<input type="hidden" name="<?php echo
$this->control; ?>" value="<?php echo
@$this->rows[0]->product_id; ?>" />
				</span>
product/tmpl/normal.php000064400000013356151162050370011211
0ustar00<?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');
?>				<table class="admintable table" 
width="100%">
						<tr>
							<td class="key">
									<?php echo JText::_( 'HIKA_NAME' ); ?>
							</td>
							<td>
								<input id="product_name" type="text"
size="80" name="<?php echo $this->product_name_input;
?>" value="<?php echo
$this->escape(@$this->element->product_name); ?>" />
								<?php if(isset($this->product_name_published)){
										$publishedid = 'published-'.$this->product_name_id;
								?>
								<span id="<?php echo $publishedid; ?>"
class="spanloading"><?php echo
$this->toggle->toggle($publishedid,(int)
$this->product_name_published,'translation')
?></span>
								<?php } ?>*
							</td>
						</tr>
						<tr>
							<td class="key">
									<?php echo JText::_( 'PRODUCT_DESCRIPTION' ); ?>
							</td>
							<td width="100%"></td>
						</tr>
						<tr>
							<td colspan="2" width="100%">
								<?php if(isset($this->product_description_published)){
										$publishedid =
'published-'.$this->product_description_id;
								?>
								<span id="<?php echo $publishedid; ?>"
class="spanloading"><?php echo
$this->toggle->toggle($publishedid,(int)
$this->product_description_published,'translation')
?></span>
								<br/>
								<?php }
									$this->editor->content =
@$this->element->product_description;
									echo $this->editor->display();
								?>
							</td>
						</tr>
						<?php if($this->element->product_type=='main'){
?>
							<tr>
								<td class="key">
										<?php echo JText::_( 'URL' ); ?>
								</td>
								<td>
									<input id="product_url" type="text"
size="80" name="<?php echo $this->product_url_input;
?>" value="<?php echo
$this->escape(@$this->element->product_url); ?>" />
									<?php if(isset($this->product_url_published)){
											$publishedid = 'published-'.$this->product_url_id;
									?>
									<span id="<?php echo $publishedid; ?>"
class="spanloading"><?php echo
$this->toggle->toggle($publishedid,(int)
$this->product_url_published,'translation')
?></span>
									<?php } ?>
								</td>
							</tr>
							<tr>
								<td class="key">
										<?php echo JText::_( 'PRODUCT_META_DESCRIPTION' );
?>
			product/tmpl/listing.xml000064400000000312151162050370011367
0ustar00</span>
									<?php } ?>
								</td>
							</tr>
							<tr>
								<td class="key">
										<?php echo JText::_( 'PRODUCT_KEYWORDS' ); ?>
								</td>
								<td>
									<textareaproduct/tmpl/menu.php000064400000001003151162050370010647
0ustar00product/tmpl/listing.xml000064400000000312151162050370011367
0ustar00/tdproduct/tmpl/normal.php000064400000013356151162050370011211
0ustar00cho $publishedid; ?>"
class="spanloading"><?php echo
$this->toggle->toggle($publishedid,(int)
$this->product_canonical_published,'translation')
?></span>
									<?php } ?>
								</td>
							</tr>
						<?php } ?>
					</table>
proproduct/tmpl/normal.php000064400000013356151162050370011211 0ustar00ent,
count = parseInt(d.getElementById('count_price').value);
	d.getElementById('count_price').value=count+1;
	var theTable = d.getElementById('price_listing'), oldRow =
d.getElementById('price_##'), rowData = oldRow.cloneNode(true);
	rowData.id = rowData.id.replace(/##/g,count);
	theTable.appendChild(rowData);
	for (var c = 0,m=oldRow.cells.length;c<m;c++){
		rowData.cells[c].innerHTML =
rowData.cells[c].innerHTML.replace(/##/g,count);
	}
<?php if(HIKASHOP_BACK_RESPONSIVE) { ?>
	try {
		jQuery('#priceprice_currency_id'+count).removeClass("chzn-done").chosen();
	}catch(e){}
<?php } ?>
	return false;
}
</script>
<div style="float:right">
	<button class="btn" type="button"
onclick="return addPriceRow();">
		<img src="<?php echo HIKASHOP_IMAGES;
?>add.png"/><?php echo JText::_('ADD');?>
	</button>
</div>
<br/>
<table id="hikashop_product_price_table" class="adminlist
table table-striped table-hover" cellpadding="1"
width="100%" id="price_listing_table">
	<thead>
		<tr>
			<th class="title">
				<?php echo JText::_( 'PRICE' ); ?>
			</th>
			<th class="title">
				<?php echo JText::_( 'PRICE_WITH_TAX' ); ?>
			</th>
			<th class="title">
				<?php echo JText::_( 'CURRENCY' ); ?>
			</th>
			<th class="title">
				<?php echo JText::_( 'MINIMUM_QUANTITY' ); ?>
			</th>
			<?php if(hikashop_level(2)){ ?>
			<th class="title">
				<?php echo JText::_( 'ACCESS_LEVEL' ); ?>
			</th>
			<?php } ?>
			<th class="title">
				<?php echo JText::_('ID'); ?>
			</th>
		</tr>
	</thead>
	<tbody id="price_listing">
	<?php
		$a = @count($this->element->prices);
		if($a){
			for($i = 0;$i<$a;$i++){
				$row =& $this->element->prices[$i];
					if(empty($row->price_min_quantity)){
						$row->price_min_quantity = 1;
					}
				?>
				<tr class="row0" id="price_<?php echo
$i;?>">
					<td>
						<input size="10" type="text"
id="price[price_value][<?php echo $i;?>]"
name="price[price_value][<?php echo $i;?>]"
value="<?php echo @$row->price_value; ?>"
onchange="updatePrice('price_with_tax_<?php echo
$i;?>',this.value,this.form['data[product][product_tax_id]'].value,0);"
/>
					</td>
					<td>
						<input size="10" type="text"
id="price_with_tax_<?php echo $i;?>"
name="price_with_tax_<?php echo $i;?>" value="<?php
echo @$row->price_value_with_tax; ?>"
onchange="updatePrice('price[price_value][<?php echo
$i;?>]',this.value,this.form['data[product][product_tax_id]'].value,1);"/>
					</td>
					<td>
						<?php echo
@$this->currency->display('price[price_currency_id]['.$i.']',@$row->price_currency_id);
?>
					</td>
					<td>
						<input size="3" type="text"
id="price[price_min_quantity][<?php echo $i;?>]"
name="price[price_min_quantity][<?php echo $i;?>]"
value="<?php echo @$row->price_min_quantity; ?>" />
					</td>
					<?php if(hikashop_level(2)){ ?>
					<td>
						<?php if(!empty($row->price_id)){ ?>
						<?php
							echo $this->popup->display(
								'<img src="'.
HIKASHOP_IMAGES.'icons/icon-16-levels.png"
title="'.JText::_('ACCESS_LEVEL').'"
/>',
								'ACCESS_LEVEL',
								'\''.hikashop_completeLink('product&task=priceaccess&id='.$i,true).'&access=\'+document.getElementById(\'price_access_'.$i.'\').value',
								'price_'.$i.'_acl',
								760, 480, '', '', 'link',true
							);
						?>
						<input type="hidden" id="price_access_<?php echo
$i;?>" name="price[price_access][<?php echo $i;?>]"
value="<?php echo @$row->price_access; ?>" />
						<?php }else{echo '--';}?>
					</td>
					<?php } ?>
					<td>
						<?php
						if(!empty($row->price_id)){
							echo $row->price_id. '<input type="hidden"
id="price[price_id]['.$i.']"
name="price[price_id]['.$i.']"
value="'.$row->price_id.'" />';
						}else{
							echo '--';
						} ?>
					</td>
				</tr>
			<?php
			}
		}

		?>
	</tbody>
</table>
<?php
if(!in_array($this->element->product_type,array('main','template'))){
?>
	<table class="admintable table" width="100%">
		<tr>
			<td class="key">
					<?php echo JText::_( 'MAIN_PRICE_OVERRIDE' ); ?>
			</td>
			<td>
				<input type="text"
name="data[product][product_price_percentage]"
value="<?php echo
$this->escape(@$this->element->product_price_percentage);
?>" />%
			</td>
		</tr>
	</table>
<?php } ?>
<input type="hidden" name="count_price"
value="<?product/tmpl/price.php000064400000013365151162050370011023
0ustar00"text" size="3"
id="price[price_min_quantity][##]"
name="price[price_min_quantity][##]" value="1" />
			</td>
			<?php if(hikashop_level(2)){ ?>
			<td>
				--
			</td>
			<?php } ?>
			<td>
				--
			</td>
		</tr>
	</table>
</div>
product/tmpl/priceaccess.php000064400000001666151162050370012206
0product/tmpl/price.php000064400000013365151162050370011023
0ustar00fieldset>

<form action="index.php?option=<?php echo HIKASHOP_COMPONENT
?>&amp;ctrl=product" method="post" 
name="adminForm" id="adminForm"
enctype="multipart/form-data">
	<fieldset class="adminform">
		<legend><?php echo JText::_('ACCESS_LEVEL');
?></legend>
		<?php
		if(hikashop_level(2)){
			$acltype = hikashop_get('type.acl');
			echo
$acltype->display('price_access',$this->access,'price');
		} ?>
	</fieldset>
</form>
product/tmpl/related.php000064400000005742151162050370011341
0ustar00<?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');
?><div style="float:right">
	<?php
		echo $this->popup->display(
			'<img
src="'.HIKASHOP_IMAGES.'add.png"/>'.JText::_('ADD'),
			'ADD',
			hikashop_completeLink("product&task=selectrelated&select_type=".$this->type,true
),
			$this->type.'_add_button',
			860, 480, '', '', 'button'
		);
	?>
</div>
<br/>
<table class="adminlist table table-striped table-hover"
cellpadding="1">
	<thead>
		<tr>
			<th class="title">
				<?php echo JText::_('HIKA_NAME'); ?>
			</th>
			<th class="title">
				<?php echo JText::_('PRODUCT_CODE'); ?>
			</th>
			<th class="title">
				<?php echo JText::_('PRODUCT_PRICE'); ?>
			</th>
			<th class="title">
				<?php echo JText::_('HIKA_ORDER'); ?>
			</th>
			<th class="title titletoggle">
				<?php echo JText::_('HIKA_DELETE'); ?>
			</th>
			<th class="title">
				<?php echo JText::_( 'ID' ); ?>
			</th>
		</tr>
	</thead>
	<tbody id="<?php echo $this->type;?>_listing">
		<?php
			$type=$this->type;
			if(!empty($this->element->$type)){
				$k = 0;

				for($i = 0,$a = count($this->element->$type);$i<$a;$i++){
					$row =& $this->element->{$type}[$i];
					$id = rand();
			?>
				<tr class="<?php echo "row$k"; ?>"
id="<?php echo
$type.'_'.$row->product_id.'_'.$id;?>">
					<td>
						<a href="<?php echo
hikashop_completeLink('product&task=edit&cid='.$row->product_id);
?>"><?php echo $row->product_name; ?></a>
					</td>
					<td>
						<?php echo $row->product_code; ?>
					</td>
					<td>
						<?php echo
$this->currencyHelper->displayPrices(@$row->prices); ?>
					</td>
					<td align="center" class="order">
						<div id="<?php echo $type;?>_ordering_div_<?php echo
$row->product_id.'_'.$id;?>">
							<input type="text" size="3"
name="<?php echo $type;?>_ordering[<?php echo
$row->product_id;?>]" id="<?php echo
$type;?>_ordering[<?php echo $row->product_id;?>][<?php echo
$id?>]" value="<?php echo
intval(@$row->product_related_ordering);?>"/>
						</div>
					</td>
					<td align="center">
							<a href="#" onclick="return
deleteRow('<?php echo
$type.'_div_'.$row->product_id.'_'.$id;?>','<?php
echo $type;?>[<?php echo $row->product_id;?>][<?php echo
$id;?>]','<?php echo
$type.'_'.$row->product_id.'_'.$id;?>');"><img
src="<?php echo HIKASHOP_IMAGES;
?>delete.png"/></a>
					</td>
					<td width="1%" align="center">
						<?php echo $row->product_id; ?>
						<div id="<?php echo
$type.'_div_'.$row->product_id.'_'.$id;?>">
							<input type="hidden" name="<?php echo
$type;?>[<?php echo $row->product_id;?>]"
id="<?php echo $type;?>[<?php echo
$row->product_id;?>][<?php echo $id;?>]"
value="<?php echo $row->product_id;?>"/>
						</div>
					</td>
				</tr>
			<?php
					$k = 1-$k;
				}
			}
		?>
	</tbody>
</table>
product/tmpl/selectcategory.php000064400000013147151162050370012734
0product/tmpl/priceaccess.php000064400000001666151162050370012206
0ustar00itbutton('addcategory');}"><img
src="<?php echo HIKASHOP_IMAGES; ?>add.png"/><?php
echo JText::_('OK'); ?></button>
	</div>
</fieldset>
<div class="iframedoc"
id="iframedoc"></div>
<?php if($this->config->get('category_explorer')){?>
<?php if(!HIKASHOP_BACK_RESPONSIVE) { ?>
<div id="page-product">
	<table style="width:100%">
		<tr>
			<td style="vertical-align:top;border:1px solid
#CCC;background-color: #F3F3F3" width="150px">
				<?php echo
hikashop_setExplorer('product&task=selectcategory',$this->pageInfo->filter->filter_id,true,'product');
?>
			</td>
			<td style="vertical-align:top;">
<?php } else { ?>
<div id="page-product" class="row-fluid">
	<div class="span4">
		<?php echo
hikashop_setExplorer('product&task=selectcategory'product/tmpl/related.php000064400000005742151162050370011341
0ustar00on>
							<button class="btn"
onclick="document.getElementById('search').value='';this.form.submit();"><?php
echo JText::_( 'RESET' ); ?></button>
						</td>
						<td nowrap="nowrap">
							<?php echo $this->childDisplay; ?>
						</td>
					</tr>
				</table>
				<table class="adminlist table table-striped table-hover"
cellpadding="1">
					<thead>
						<tr>
							<th class="title titlenum">
								<?php echo JText::_( 'HIKA_NUM' );?>
							</th>
							<th class="title titlebox">
								<input type="checkbox" name="toggle"
value="" onclick="hikashop.checkAll(this);" />
							</th>
							<th class="title">
								<?php echo JHTML::_('grid.sort',
JText::_('HIKA_NAME'), 'a.category_name',
$this->pageInfo->filter->order->dir,$this->pageInfo->filter->order->value,'selectcategory'
); ?>
							</th>
							<th class="title">
								<?php echo JText::_('SHOW_SUB_CATEGORIES'); ?>
							</th>
							<th
claproduct/tmpl/related.php000064400000005742151162050370011341
0ustar00?>
							<tr class="<?php echo "row$k"; ?>">
								<td align="center">
								<?php echo $this->pagination->getRowOffset($i); ?>
								</td>
								<td align="center">
									<?php echo JHTML::_('grid.id', $i,
$row->category_id ); ?>
								</td>
								<td>
									<a href="#"
onclick="document.getElementById('cb<?php echo $i;
?>').checked=true;submitbutton('addcategory');return
false;">
										<?php echo $row->category_name; ?>
									</a>
								</td>
								<td>
									<?php
									$control = JRequest::getCmd('control');
									if(!empty($control)){
									$control='&control='.$control;
									}?>
									<a href="<?php echo
hikashop_completeLink('product&task=selectcategory&filter_id='.$row->category_id.$control,true);
?>">
										<img src="<?php echo HIKASHOP_IMAGES;
?>go.png" alt="edit"/>
									</a>
								</td>
								<td width="1%" align="center">
									<?php echo $row->category_id; ?>
								</td>
							</tr>
						<?php
								$k = 1-$k;
							}
						?>
					</tbody>
				</table>
				<input type="hidden" name="option"
value="<?php echo HIKASHOP_COMPONENT; ?>" />
				<input type="hidden" name="task"
value="<?php echo JRequest::getCmd('task'); ?>"
/>
				<input type="hidden" name="ctrl"
value="<?php echo JRequest::getCmd('ctrl'); ?>"
/>
				<input type="hidden" name="control"
value="<?php echo JRequest::getCmd('control');
?>" />
				<input type="hidden" name="boxchecked"
value="0" />
				<iproduct/tmpl/selectcategory.php000064400000013147151162050370012734
0ustar00 ?>
			</td>
		</tr>
	</table>
</div>
<?php } else { ?>
	</div>
</div>
<?php } ?>
<?php } ?>
product/tmpl/selectfile.php000064400000011375151162050370012037
0ustar00product/tmpl/selectcategory.php000064400000013147151162050370012734
0ustar00div>
</fieldset>
<div class="iframedoc"
id="iframedoc"></div>
<form action="index.php?option=<?php echo HIKASHOP_COMPONENT
?>&amp;ctrl=product" method="post" 
name="adminForm" id="adminForm"
enctype="multipart/form-data">
	<table width="100%">
		<tr>
			<td class="key">
				<label for="file_name"><?php
					echo JText::_( 'HIKA_NAME' );
				?></label>
			</td>
			<td>
				<input type="text" name="data[file][file_name]"
value="<?php echo
$this->escape(@$this->element->file_name); ?>"/>
			</td>
		</tr>
		<tr>
<?php
	if(empty($this->element->file_path)){
?>
		<tr>
			<td class="key">
				<label for="files"><?php
					echo JText::_('HIKA_FILE_MODE');
				?></label>
			</td>
			<td><?php
				$values = array(
					JHTML::_('select.option', 'upload',
JText::_('HIKA_FILE_MODE_UPLOAD')),
					JHTML::_('select.option', 'path',
JText::_('HIKA_FILE_MODE_PATH'))
				);
				echo JHTML::_('hikaselect.genericlist', $values,
"data[filemode]", 'class="inputbox"
size="1" onchange="hikashop_switchmode(this);"',
'value', 'text', 'upload');
			?>
			<script type="text/javascript">
			function hikashop_switchmode(el) {
				var d = document, v = el.value, modes =
['upload','path'], e = null;
				for(var i = 0; i < modes.length; i++) {
					mode = modes[i];
					e =
d.getElementById('hikashop_'+mode+'_section');
					if(!e) continue;
					if(v == mode) {
						e.style.display = '';
					} else {
						e.style.display = 'none';
					}
				}
			}
			</script>
			</td>
		</tr>
		<tr id="hikashop_upload_section">
			<td class="key">
				<label for="files"><?php
					echo JText::_('HIKA_FILE');
				?></label>
			</td>
			<td>
				<input type="file" name="files[]"
size="30" />
				<?php echo
JText::sprintf('MAX_UPLOAD',(hikashop_bytes(ini_get('upload_max_filesize'))
> hikashop_bytes(ini_get('post_max_size'))) ?
ini_get('post_max_size') :
ini_get('upload_max_filesize')); ?>
			</td>
		</tr>
		<tr id="hikashop_path_section"
style="display:none;">
			<td class="key">
				<label for="files"><?php
					echo JText::_('HIKA_PATH');
				?></label>
			</td>
			<td>
				<input type="text" name="data[filepath]"
size="60" value=""/>
			</td>
		</tr>
<?php
	}else{
?>
			<td class="key">
				<label for="files"><?php
					echo JText::_('FILENAME');
				?></label>
			</td>
			<td>
				<input type="text" name="data[file][file_path]"
size="60" value="<?php echo
$this->element->file_path;?>"/>
			</td>
<?php
	}
?>
		</tr>
		<tr>
			<td class="key">
				<label for="file_limit"><?php
					echo JText::_('DOWNLOAD_NUMBER_LIMIT');
				?></label>
			</td>
			<td>
				<input type="text" name="data[file][file_limit]"
value="<?php
					if(isset($this->element->file_limit)) {
						if($this->element->file_limit < 0)
							echo JText::_('UNLIMITED');
						else
							echo $this->element->file_limit;
					}
				?>"/><br/>
			</td>
		</tr>
		<tr>
			<td class="key"></td>
			<td>
				0: <?php echo
JText::_('DEFAULT_PARAMS_FOR_PRODUCTS');?> (<?php echo
$this->config->get('download_number_limit');?>)<br/>
				-1: <?php echo JText::_('UNLIMITED');?><br/>
			</td>
		</tr>
		<tr>
			<td class="key">
				<label for="file_free_download"><?php
					echo JText::_('FREE_DOWNLOAD');
				?></label>
			</td>
			<td>
				<?php echo JHTML::_('hikaselect.booleanlist',
"data[file][file_free_download]" , '',
@$this->element->file_free_download); ?>
			</td>
		</tr>
		<tr>
			<td class="key">
				<label for="file_description"><?php
					echo JText::_( 'HIKA_DESCRIPTION' );
				?></label>
			</td>
			<td><?php
				echo $this->editor->display();
			?></td>
		</tr>
	</table>
	<div class="clr"></div>
	<input type="hidden" name="data[file][file_type]"
value="file" />
	<input type="hidden" name="data[file][file_ref_id]"
value="<?php echo JRequest::getInt('product_id');
?>" />
	<input type="hidden" name="cid[]"
value="<?php echo @$this->cid; ?>" />
	<input type="hidden" name="id" value="<?php
echo JRequest::getInt('id');?>" />
	<input type="hidden" name="option"
value="<?php echo HIKASHOP_COMPONENT; ?>" />
	<input type="hidden" name="tmpl"
value="component" />
	<input
typeproduct/tmpl/selectfile.php000064400000011375151162050370012037
0ustar00<?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');
?><fieldset>
	<div class="toolbar" id="toolbar"
style="float: right;">
		<button class="btn" type="button"
onclick="submitbutton('addimage');"><img
src="<?php echo HIKASHOP_IMAGES; ?>save.png"/><?php
echo JText::_('OK'); ?></button>
	</div>
</fieldset>
<div class="iframedoc"
id="iframedoc"></div>
<form action="index.php?option=<?php
product/tmpl/selectfile.php000064400000011375151162050370012037
0ustar00alues = array(
					JHTML::_('select.option', 'upload',
JText::_('HIKA_FILE_MODE_UPLOAD')),
					JHTML::_('select.option', 'path',
JText::_('HIKA_FILE_MODE_PATH'))
				);
				echo JHTML::_('hikaselect.genericlist', $values,
"data[filemode]", 'class="inputbox"
size="1" onchange="hikashop_switchmode(this);"',
'value', 'text', 'upload');
			?>
			<script type="text/javascript">
			function hikashop_switchmode(el) {
				var d = document, v = el.value, modes =
['upload','path'], e = null;
				for(var i = 0; i < modes.length; i++) {
					mode = modes[i];
					e =
d.getElementById('hikashop_'+mode+'_section');
					if(!e) continue;
					if(v == mode) {
						e.style.display = '';
					} else {
						e.style.display = 'none';
					}
				}
			}
			</script>
			</td>
		</tr>
		<tr id="hikashop_upload_section">
			<td class="key">
				<label for="files"><?php
					echo JText::_( 'HIKA_IMAGE' );
				?></label>
			</td>
			<td>
				<input type="file" name="files[]"
size="30" />
				<?php echo
JText::sprintf('MAX_UPLOAD',(hikashop_bytes(ini_get('upload_max_filesize'))
> hikashop_bytes(ini_get('post_max_size'))) ?
ini_get('post_max_size') :
ini_get('upload_max_filesize')); ?>
			</td>
		</tr>
		<tr id="hikashop_path_section"
style="display:none;">
			<td class="key">
				<label for="files"><?php
					echo JText::_('HIKA_PATH');
				?></label>
			</td>
			<td>
				<input type="text" name="data[filepath]"
size="60" value=""/>
			</td>
		</tr>
<?php
	}else{
?>
		<tr>
			<td class="key">
				<label for="files"><?php
					echo JText::_( 'HIKA_IMAGE' );
				?></label>
			</td>
			<td>
				<?php echo
$this->image->display($this->element->file_path,false,'','','',
100, 100);?>
			</td>
		</tr>
<?php
	}
?>
	</table>
	<div class="clr"></div>
	<input type="hidden" name="data[file][file_type]"
value="product" />
	<input type="hidden" name="data[file][file_ref_id]"
value="<?php echo JRequest::getInt('product_id');
?>" />
	<input type="hidden" name="cid[]"
value="<?php echo @$this->cid; ?>" />
	<input type="hidden" name="id" value="<?php
echo JRequest::getInt('id');?>" />
	<input type="hidden" name="option"
value="<?php echo HIKASHOP_COMPONENT; ?>" />
	<input type="hidden" name="tmpl"
value="component" />
	<input type="hidden" name="task"
value="selectimage" />
	<input type="hidden" name="ctrl"
value="product" />
	<?php echo JHTML::_( 'form.token' ); ?>
</form>
product/tmpl/selection.php000064400000023610151162050370011700
0ustar00<?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('Rproduct/tmpl/selectimage.php000064400000007617151162050370012206
0ustar00ment.getElementById("hikashop_form");
	form.cid.value = id;
	form.ctrl.value = '<?php echo $this->ctrl ?>';
	hikashop.submitform("<?php echo $this->task;
?>",form);
}
</script>
<?php } ?>
<form action="<?php echo
hikashop_completeLink('product'); ?>"
method="post" name="hikashop_form"
id="hikashop_form">
	<table class="hika_filter" style="width:100%">
		<tr>
			<td width="100%">
				<?php echo JText::_('FILTER');?>:
				<input type="text" id="hikashop_product_search"
name="search" value="<?php echo
$this->escape($this->pageInfo->search);?>"
class="text_area" onchange="this.form.submit();" />
				<button class="btn"
onclick="this.form.submit();"><?php echo
JText::_('GO'); ?></button>
				<button class="btn"
onclick="document.getElementById('hproduct/tmpl/selectimage.php000064400000007617151162050370012206
0ustar00<a
href="'.hikashop_completeLink('category&task=listing&cid='.$breadcrumb->category_id).'">'.JText::_($breadcrumb->category_name).'</a></span>
';
		} else {
			echo '<span
class="breadcrumb_el">'.JText::_($breadcrumb->category_name).'</span>
';
		}
	}
?>
	</div>
<?php
}

if($this->config->get('show_category_explorer', 1)) {
?>
	<table id="hika_product_listing"
style="border:0px;width:100%">
		<tr>
			<td style="vertical-align:top;width:1%">
				<div id="category_explorer_btn"
class="category_explorer_btn_hide">
					<a href="#" onclick="return
category_listing_hideshow(this);"><span><?php echo
JText::_('EXPLORER'); ?></span></a>
				</div>
				<?php echo
$this->shopCategoryType->displayTree('hika_categories', 0,
null, true, true); ?>
			</td>
			<td style="vertical-align:top;"
id="hika_product_main_listing">
<?php } ?>
	<table class="adminlist <?php echo
(HIKASHOP_RESPONSIVE)?'table table-striped
table-hover':'hika_table'; ?>"
style="width:100%;cell-spacing:1px">
		<thead>
			<tr>
				<th class="title titlenum"><?php
					echo JText::_('HIKA_NUM');
				?></th>
<?php
$cols = 6;
if( !$this->singleSelection ) {
	$cols = 7;
?>
				<th class="title titlebox">
					<input type="checkbox" name="toggle"
value="" onclick="hikashop.checkAll(this);" />
				</th>
<?php } ?>
				<th class="hikashop_product_name_title title"><?php
					echo JHTML::_('grid.sort', JText::_('HIKA_NAME'),
'a.product_name',
$this->pageInfo->filter->order->dir,
$this->pageInfo->filter->order->value);
				?></th>
				<th class="hikashop_product_code_title title"><?php
					echo JHTML::_('grid.sort',
JText::_('PRODUCT_CODE'), 'a.product_code',
$this->pageInfo->filter->order->dir,
$this->pageInfo->filter->order->value);
				?></th>
				<th class="hikashop_product_quantity_title
title"><?php
					echo JHTML::_('grid.sort',
JText::_('PRODUCT_QUANTITY'), 'a.product_quantity',
$this->pageInfo->filter->order->dir,
$this->pageInfo->filter->order->value);
				?></th>
				<th class="hikashop_product_price_title
title"><?php
					echo JText::_('PRODUCT_PRICE');
				?></th>
				<th class="hikashop_product_id_title title"><?php
					echo JHTML::_('grid.sort', JText::_('ID'),
'a.product_id', $this->pageInfo->filter->order->dir,
$this->pageInfo->filter->order->value);
				?></th>
			</tr>
		</thead>
		<tfoot>
			<tr>
				<td colspan="<?php echo $cols ?>">
					<?php echo
$this->pagination->getListFootproduct/tmpl/selection.php000064400000023610151162050370011700
0ustar00xtraTr = ' style="cursor:pointer"
onclick="hikashop_setId(\''.$product->product_id.'\');"';
		}

		if(!empty($this->pageInfo->search)) {
			$row = hikashop_search($this->pageInfo->search, $product,
'product_id');
		}
	} else {
		$lbl1 = '<label for="cb'.$i.'">';
		$lbl2 = '</label>';
		$extraTr = '
onclick="hikashop.checkRow(\'cb'.$i.'\');"';
	}
?>
			<tr class="row<?php echo $k; ?>"<?php echo
$extraTr; ?>>
				<td align="center"><?php
					echo $this->pagination->getRowOffset($i);
				?></td>
<?php if( !$this->singleSelection ) { ?>
				<td align="center"><input type="checkbox"
onclick="this.clicked = true; this.checked = !this.checked;"
value="<?php echo $product->product_id; ?>"
name="cid[]" id="cb<?php echo $i;
?>"/></td>
<?php } ?>
				<td class="hikashop_product_name_value"><?php
					echo $product->product_name;
				?></td>
				<td
class="hikashop_product_code_value"><?product/tmpl/selection.php000064400000023610151162050370011700
0ustar00le>
		</td>
	</tr>
<script type="text/javascript">
hika_categories.sel(hika_categories.find(<?php echo $this->cid;
?>));
hika_categories.callbackSelection = function(tree,id) {
	var d = document, node = tree.get(id);
	if( node.value && node.name) {
		var form = document['hikashop_form'];
		form['cid'].value = node.value;
		form.submit();
	}
};
function category_listing_hideshow(el, state) {
	var d = document, w = window, o = w.Oby, tree =
d.getElementById("hika_categories_otree"), p = el.parentNode;
	if((state !== true && o.hasClass(p,
"category_explorer_btn_hide")) || state === false) {
		tree.style.display = "none";
		o.removeClass(p, "category_explorer_btn_hide");
		o.addClass(p, "category_explorer_btn_show");
		state = 0;
	} else {
		o.removeClass(p, "category_explorer_btn_show");
		o.addClass(p, "category_explorer_btn_hide");
		tree.style.display = "";
		state = 1;
	}
	w.hikashop.dataStore("hikashop_product_listing_explorer",
state);
	return false;
}
(function(){
	var el = document.getElementById('category_explorer_btn'),
		data =
window.hikashop.dataGet("hikashop_product_listing_explorer");
	if(el && el.parentNode)
		el.parentNode.style.height = (el.parentNode.offsetHeight) +
'px';
	if(el && el.firstChild && (data == 0 || data ==
'0'))
		category_listing_hideshow(el.firstChild, false);
})();
</script>
<?php } ?>
	</table>
<?php if( $this->singleSelection ) { ?>
	<input type="hidden" name="pid" value="0"
/>
<?php } ?>
	<input type="hidden" name="cid"
value="<?php echo @$this->cid; ?>" />
	<input type="hidden" name="option"
value="<?php echo HIKASHOP_COMPONENT; ?>" />
	<input type="hidden" name="task"
value="selection" />
	<input type="hidden" name="tmpl"
value="component" />
	<input type="hidden" name="selection"
value="products" />
	<input type="hidden" name="confirm"
value="<?php echo $this->confirm ? '1' :
'0'; ?>" />
	<input type="hidden" name="single"
value="<?php echo $this->singleSelection ? '1' :
'0'; ?>" />
	<input type="hidden" name="ctrl"
value="product" />
	<input type="hidden" name="boxchecked"
value="0" />
	<input type="hidden" name="filter_order"
value="<?php echo
$this->pageInfo->filter->order->value; ?>" />
	<input type="hidden" name="filter_order_Dir"
value="<?php echo $this->pageInfo->filter->order->dir;
?>" />
<?php
	if(!empty($this->afterParams)) {
		foreach($this->afterParams as $p) {
			if(empty($p[0]) || !isset($p[1]))
				continue;
			echo '<input type="hidden"
name="'.$this->escape($p[0]).'"
value="'.$this->escape($p[1]).'"/>' .
"\r\n";
		}
		echo '<input type="hidden" name="after"
value="'.JRequest::getString('after',
'').'"/>'."\r\n";
		echo '<input type="hidden" name="afterParams"
value="'.JRequest::getString('afterParams',
'').'"/>'."\r\n";
	}
?>
	<?php echo JHTML::_('form.token'); ?>
</form>
<script type="text/javascript">
document.adminForm = document.getElementById("hikashop_form");
</script>
product/tmpl/selectrelated.php000064400000013767151162050370012547
0ustar00<?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');
?><fieldset>
	<div class="toolbar" id="toolbar"
style="float: right;">
		<button class="btn" type="button"
onclick="if(document.adminForm.boxchecked.value==0){alert('<?php
echo JText::_( 'PLEASE_SELECT_SOMETHING',true );
?>');}else{submitbutton('addrelated');}"><img
src="<?php echo HIKASHOP_IMAGES; ?>add.png"/><?php
echo JText::_('OK'); ?></button>
	</div>
</fieldset>
<div class="iframedoc"
id="iframedoc"></div>
<?php if($this->config->get('category_explorer')){?>
<?php if(!HIKASHOP_BACK_RESPONSIVE) { ?>
<div id="page-product">
	<table style="width:100%">
		<tr>
			<td style="vertical-align:top;border:1px solid
#CCC;background-color: #F3F3F3" width="200px">
				<?php echo
hikashop_setExplorer('product&task=selectrelated&select_type='.$this->type.'&control='.$this->control,$this->pageInfo->filter->filter_id,true,'product');
?>
			</td>
			<td style="vertical-align:top;">
<?php } else { ?>
<div id="page-product" class="row-fluid">
	<div class="span4">
		<?php echo
hikashop_setExplorer('product&task=selectrelated&select_type='.$this->type.'&control='.$this->control,$this->pageInfo->filter->filter_id,true,'product');
?>
	</div>
	<div class="span8">
<?php } ?>
<?php } ?>
			<form action="index.php?option=<?php echo HIKASHOP_COMPONENT
?>&amp;ctrl=product" method="post" 
name="adminForm" id="adminForm">
				<table>
					<tr>
						<td width="100%">
							<a href="<?php echo
hikashop_completeLink('product&task=selectrelated&filter_id=0&select_type='.$this->type.'&control='.$this->control,true);
?>"><?php echo JText::_( 'ROOT' );
?>/</a>
							<?php echo $this->breadCrumb.' '.JText::_(
'FILTER' ); ?>:
							<input type="text" name="search"
id="search" value="<?php echo
$this->escape($this->pageInfo->search);?>"
class="text_area"
onchange="document.adminForm.submit();" />
							<button class="btn"
onclick="this.form.submit();"><?php echo JText::_(
'GO' ); ?></button>
							<button
onclick="document.getElementById('search').value='';this.form.submit();"><?php
echo JText::_( 'RESET' ); ?></button>
						</td>
						<td nowrap="nowrap">
							<?php echo $this->childDisplay; ?>
						</td>
					</tr>
				</table>
				<table class="adminlist table table-striped table-hover"
cellpadding="1">
					<thead>
						<tr>
							<th class="title titlenum">
								<?php echo JText::_( 'HIKA_NUM' );?>
							</th>
							<th class="title titlebox">
								<input type="checkbox" name="toggle"
value="" onclick="hikashop.checkAll(this);" />
							</th>
							<th class="title">
								<?php echo JHTML::_('grid.sort',
JText::_('HIKA_NAME'), 'b.product_name',
$this->pageInfo->filter->order->dir,$this->pageInfo->filter->order->value,'selectrelated'
); ?>
							</th>
							<th class="title">
								<?php echo JHTML::_('grid.sort',
JText::_('PRODUCT_CODE'), 'b.product_code',
$this->pageInfo->filter->order->dir,$this->pageInfo->filter->order->value,'selectrelated'
); ?>
							</th>
							<th class="title">
								<?php echo JText::_('PRODUCT_PRICE'); ?>
							</th>
							<th class="title">
								<?php echo JHTML::_('grid.sort',   JText::_(
'ID' ), 'b.product_id',
$this->pageInfo->filter->order->dir,
$this->pageInfo->filter->order->value,'selectrelated'
); ?>
							</th>
						</tr>
					</thead>
					<tfoot>
						<tr>
							<td colspan="9">
								<?php echo $this->pagination->getListFooter(); ?>
								<?php echo $this->pagination->getResultsCounter(); ?>
							</td>
						</tr>
					</tfoot>
					<tbody>
						<?php
							$k = 0;
							for($i = 0,$a = count($this->rows);$i<$a;$i++){
								$row =& $this->rows[$i];
						?>
							<tr class="<?php echo "row$k"; ?>">
								<td align="center">
								<?php echo $this->pagination->getRowOffset($i); ?>
								</td>
								<td align="center">
									<?php echo JHTML::_('grid.id', $i,
$row->product_id ); ?>
								</td>
								<td align="center">
									<?php
if(in_array($this->type,array('discount','import'))){
?>
										<a href="<?php echo
hikashop_completeLink('product&task=addrelated&cid='.$row->product_id.'&select_type='.$this->type.'&control='.$this->control,true);
?>">
									<?php }?>
										<?php echo $row->product_name; ?>
									<?php
if(in_array($this->type,array('discount','import'))){
?>
										</a>
									<?php }?>
								</td>
								<td>
									<?php echo $row->product_code; ?>
								</td>
								<td>
									<?php echo
$this->currencyHelper->displayPrices(@$row->prices); ?>
								</td>
								<td width="1%" align="center">
									<?php echo $row->product_id; ?>
								</td>
							</tr>
						<?php
								$k = 1-$k;
							}
						?>
			product/tmpl/selectrelated.php000064400000013767151162050370012547
0ustar00o->filter->filter_id; ?>" />
				<input type="hidden" name="filter_order"
value="<?php echo
$this->pageInfo->filter->order->value; ?>" />
				<input type="hidden" name="filter_order_Dir"
value="<?php echo $this->pageInfo->filter->order->dir;
?>" />
				<?php echo JHTML::_( 'form.token' ); ?>
			</form>
<?php if($this->config->get('category_explorer')){?>
<?php if(!HIKASHOP_BACK_RESPONSIVE) { ?>
			</td>
		</tr>
	</table>
</div>
<?php } else { ?>
	</div>
</div>
<?php } ?>
<?php } ?>
product/tmpl/translation.php000064400000010350151162050370012246
0ustar00product/tmpl/selectrelated.php000064400000013767151162050370012547
0ustar00d => $translation){
		echo '<a class="modal" rel="{handler:
\'iframe\', size: {x: 760, y: 480}}"
href="'.hikashop_completeLink("product&task=edit_translation&product_id=".@$this->element->product_id.'&language_id='.$language_id,true
).'"><div
class="hikashop_multilang_button">'.$this->transHelper->getFlag($language_id).'</div></a>';
	}
	echo '</div>';
}
	echo $this->tabs->startPane( 'translations');
		echo
$this->tabs->startPanel(JText::_('MAIN_INFORMATION'),
'main_translation');
			$this->setLayout('normal');
			echo $this->loadTemplate();
		echo $this->tabs->endPanel();
		if($this->config->get('multilang_display')!='popups'
&& !empty($this->element->translations)){
			foreach($this->element->translations as $language_id =>
$translation){
				$this->product_name_input =
"translation[product_name][".$language_id."]";
				$this->element->product_name =
@$translation->product_name->value;
				if(isset($translation->product_name->published)){
					$this->product_name_published =
$translation->product_name->published;
					$this->product_name_id = $translation->product_name->id;
				}

				$this->editor->name =
'translation_product_description_'.$language_id;
				$this->element->product_description =
@$translation->product_description->value;
				if(isset($translation->product_description->published)){
					$this->product_description_published =
$translation->product_description->published;
					$this->product_description_id =
$translation->product_description->id;
				}
				if($this->element->product_type=='main'){
					$this->product_url_input =
"translation[product_url][".$language_id."]";
					$this->element->product_url =
@$translation->product_url->value;
					if(isset($translation->product_url->published)){
						$this->product_url_published =
$translation->product_url->published;
						$this->product_url_id = $translation->product_url->id;
					}

					$this->product_meta_description_input =
"translation[product_meta_description][".$language_id."]";
					$this->element->product_meta_description =
@$translation->product_meta_description->value;
					if(isset($translation->product_meta_description->published)){
						$this->product_meta_description_published =
$translation->product_meta_description->published;
						$this->product_meta_description_id =
$translation->product_meta_description->id;
					}

					$this->product_keywords_input =
"translation[product_keywords][".$language_id."]";
					$this->element->product_keywords =
@$translation->product_keywords->value;
					if(isset($translation->product_keywords->published)){
						$this->product_keywords_published =
$translation->product_keywords->published;
						$this->product_keywords_id =
$translation->product_keywords->id;
					}
					$this->product_alias_input =
"translation[product_alias][".$language_id."]";
					$this->element->product_alias =
@$translation->product_alias->value;
					if(isset($translation->product_alias->published)){
						$this->product_alias_published =
$translation->product_alias->published;
						$this->product_alias_id = $translation->product_alias->id;
					}
					$this->product_canonical_input =
"translation[product_canonical][".$language_id."]";
					$this->element->product_canonical =
@$translation->product_canonical->value;
					if(isset($translation->product_canonical->published)){
						$this->product_canonical_published =
$translation->product_canonical->published;
						$this->product_canonical_id =
$translation->product_canonical->id;
					}
				}
				echo
$this->tabs->startPanel($this->transHelper->getFlag($language_id),
'translation_'.$language_id);
					$this->setLayout('normal');
					echo $this->loadTemplate();
				echo $this->tabs->endPanel();
			}
		}
	echo $this->tabs->endPane();
product/tmpl/trashlist.php000064400000013751151162050370011735
0ustar00product/tmpl/translation.php000064400000010350151162050370012246
0ustar00arch_zone">
		<div class="hikashop_search_block">
<?php echo $this->loadHkLayout('search', array()); ?>
		</div>
		<div class="hikashop_order_sort"><?php
			if(!empty($this->ordering_values))
				echo JHTML::_('select.genericlist',
$this->ordering_values, 'filter_fullorder',
'onchange="this.form.submit();"', 'value',
'text', $this->full_ordering);
		?></div>
	</div>
</div>

<table id="hikashop_product_listing" class="adminlist
table table-striped table-hover" cellpadding="1">
	<thead>
		<tr>
			<th class="title titlenum"><?php
				echo JText::_('HIKA_NUM');
			?></th>
			<th class="title titlebox">
				<input type="checkbox" name="toggle"
value="" onclick="hikashop.checkAll(this);" />
			</th>
			<th class="title"><?php
				echo JText::_('HIKA_IMAGE');
			?></th>
			<th class="title"><?php
				echo JHTML::_('grid.sort', JText::_('HIKA_NAME'),
'b.product_name',
$this->pageInfo->filter->order->dir,$this->pageInfo->filter->order->value
); ?> / <?php echo JHTML::_('grid.sort',
JTeproduct/tmpl/translation.php000064400000010350151162050370012246
0ustar00		?></th>
<?php
	if(!empty($this->fields)){
		foreach($this->fields as $field){
			if($field->field_type == 'customtext') continue;
			echo '<th
class="title">'.JHTML::_('grid.sort',
$this->fieldsClass->trans($field->field_realname),
'b.'.$field->field_namekey,
$this->pageInfo->filter->order->dir,$this->pageInfo->filter->order->value
).'</th>';
		}
	}
	$count_extrafields = 0;
	if(!empty($this->extrafields)) {
		foreach($this->extrafields as $namekey => $extrafield) {
			echo '<th
class="hikashop_product_'.$namekey.'_title
title">'.$extrafield->name.'</th>'."\r\n";
		}
		$count_extrafields = count($this->extrafields);
	}
?>
			<th class="title titletoggle"><?php
				echo JHTML::_('grid.sort',
JText::_('HIKA_PUBLISHED'), 'b.product_published',
$this->pageInfo->filter->order->dir,
$this->pageInfo->filter->order->value );
			?></th>
			<th class="title"><?php
				echo JHTML::_('grid.sort', JText::_('ID'),
'b.product_id', $this->pageInfo->filter->order->dir,
$this->pageInfo->filter->order->value );
			?></th>
		</tr>
	</thead>
<?php $count = 8 + (!empty($this->fields) ? count($this->fields) :
0) + $count_extrafields; ;?>
	<tfoot>
		<tr>
			<td colspan="<?php echo $count; ?>">
				<?php echo $this->pagination->getListFooter(); ?>
				<?php echo $this->pagination->getResultsCounter(); ?>
			</td>
		</tr>
	</tfoot>
	<tbody>
<?php
	$i = 0;
	$k = 0;
	foreach($this->rows as &$row) {
		$publishedid = 'product_published-'.$row->product_id;
?>
		<tr class="row<?php echo $k; ?>">
			<td class="hk_center"><?php
				echo $this->pagination->getRowOffset($i);
			?></td>
			<td class="hk_center"><?php
				echo JHTML::_('grid.id', $i, $row->product_id );
			?></td>
			<td><?php
				$image_options = array('default' =>
true,'forcesize'=>$this->config->get('image_force_size',true),'scale'=>$this->config->get('image_scale_mode','inside'));
				$img = $this->imageHelper->getThumbnail(@$row->file_path,
array('width' => 50, 'height' => 50),
$image_options);
				if($img->success) {
					$attributes = '';
					if($img->external)
						$attributes = '
width="'.$img->req_width.'"
height="'.$img->req_height.'"';
					echo '<img class="hikashop_product_image"
title="'.$this->escape(@$row->file_description).'"
alt="'.$this->escape(@$row->file_name).'"
src="'.$img->url.'"'.$attributes.'/>';
				}
			?></td>
			<td>
				<?php if($this->manage){ ?>
					<a href="<?php echo
hikashop_completeLink('product&task=edit&cid[]='.$row->product_id);
?>">
				<?php } ?>
						<?php echo $row->product_name; ?><br/><?php echo
$row->product_code; ?>
				<?php if($this->manage){ ?>
					</a>
				<?php } ?>
			</td>
			<td><?php
				$field = 'price_value';
				if($this->config->get('floating_tax_prices')){
					$field =
'price_product/tmpl/trashlist.php000064400000013751151162050370011735
0ustar00OMPONENT; ?>" />
	<input type="hidden" name="task"
value="trashlist" />
	<input type="hidden" name="ctrl"
value="<?php echo hikaInput::get()->getCmd('ctrl');
?>" />
	<input type="hidden" name="boxchecked"
value="0" />
	<input type="hidden" name="filter_order"
value="<?php echo
$this->pageInfo->filter->order->value; ?>" />
	<input type="hidden" name="filter_order_Dir"
value="<?php echo $this->pageInfo->filter->order->dir;
?>" />
	<?php echo JHTML::_( 'form.token' ); ?>
</form>
product/tmpl/useselection.php000064400000003607151162050370012421
0product/tmpl/trashlist.php000064400000013751151162050370011735
0ustar00KA_NAME'); ?></label></td>
			<td id="hikashop_order_customer_name"><?php echo
$this->rows->name; ?></td>
		</tr>
		<tr>
			<td class="key"><label><?php echo
JText::_('HIKA_EMAIL'); ?></label></td>
			<td id="hikashop_order_customer_email"><?php echo
$this->rows->email; ?></td>
		</tr>
		<tr>
			<td class="key"><label><?php echo
JText::_('ID'); ?></label></td>
			<td id="hikashop_order_customer_id"><?php echo
$this->rows->user_id; ?></td>
		</tr>
	</table>
<?php } else { ?>
	<?php echo JText::_('HIKA_CONFIRM_USERS')?><br/>
	<table class="hika_listing adminlist">
		<thead>
			<tr>
				<th class="title">
					<?php echo JText::_('HIKA_LOGIN'); ?>
				</th>
				<th class="title">
					<?php echo JText::_('HIKA_NAME'); ?>
				</th>
				<th class="title">
					<?php echo JText::_('HIKA_EMAIL'); ?>
				</th>
				<th class="title">
					<?php echo JText::_('ID'); ?>
				</th>
			</tr>
		</thead>
<?php foreach($this->rows as $row) { ?>
		<tr>
			<td><?php echo $row->login; ?></td>
			<td><?php echo $row->name; ?></td>
			<td><?php echo $row->email; ?></td>
			<td><?php echo $row->user_id; ?></td>
		</tr>
<?php } ?>
	</table>
<?php } ?>
	<div class="hika_confirm_btn"><a href="#"
onclick="window.top.hikashop.submitBox(<?php echo $this->data;
?>); return false;"><img src="<?php echo
HIKASHOP_IMAGES ?>save.png"/><span><?php echo
'OK'; ?></span></a></div>
</div>
product/tmpl/variant.php000064400000007171151162050370011363
0ustar00<?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');
?><div class="iframedoc"
id="iframedoc"></div>
<table width="100%">
	<tr>
		<td style="vertical-align:top;">
			<form action="index.php?option=<?php echo HIKASHOP_COMPONENT
?>&amp;ctrl=product" method="post" 
name="adminForm" id="adminForm">
				<table class="adminlist table table-striped table-hover"
cellpadding="1">
					<thead>
						<tr>
							<th class="title titlenum">
								<?php echo JText::_( 'HIKA_NUM' );?>
							</th>
							<th class="title titlebox">
								<input type="checkbox" name="toggle"
value="" onclick="hikashop.checkAll(this);" />
							</th>
							<th class="title">
								<?php echo JText::_('PRODUCT_CODE'); ?>
							</th>
							<?php if(!empty($this->characteristics)){
								foreach($this->characteristics as $characteristic){
									echo '<th
class="title">'.$characteristic->characteristic_value.'</th>';
								}
							}?>
							<th class="title">
								<?php echo JText::_('PRODUCT_PRICE'); ?>
							</th>
							<th class="title">
								<?php echo JText::_('PRODUCT_QUANTITY'); ?>
							</th>
							<th class="title titletoggle">
								<?php echo JText::_('HIKA_PUBLISHED'); ?>
							</th>
							<th class="title">
								<?php echo JText::_( 'ID' ); ?>
							</th>
						</tr>
					</thead>
					<tbody>
						<?php

							if(!empty($this->rows)){
								$k = 0;
								for($i = 0,$a = count($this->rows);$i<$a;$i++){
									$row =& $this->rows[$i];
									$publishedid =
'product_published-'.$row->product_id;
								?>
								<tr class="<?php echo "row$k";
?>">
									<td align="center">
									<?php echo $i; ?>
									</td>
									<td align="center">
										<?php echo JHTML::_('grid.id', $i,
$row->product_id ); ?>
									</td>
									<td>
										<a href="<?php echo
hikashop_completeLink('product&task=edit&variant=1&cid[]='.$row->product_id);
?>">
											<?php echo $row->product_code; ?>
										</a>
									</td>
									<?php if(!empty($this->characteristics)){
										foreach($this->characteristics as $characteristic){
											echo
'<td>'.@$row->characteristics[$characteristic->characteristic_value].'</td>';
										}
									}?>
									<td>
										<?php echo
$thisproduct/tmpl/useselection.php000064400000003607151162050370012421
0ustar00				<?php
									$k = 1-$k;
								}
							}
						?>
					</tbody>
				</table>
				<input type="hidden" name="option"
value="<?php echo HIKASHOP_COMPONENT; ?>" />
				<input type="hidden" name="task"
value="variant" />
				<input type="hidden" name="ctrl"
value="<?php echo JRequest::getCmd('ctrl'); ?>"
/>
				<input type="hidden" name="boxchecked"
value="0" />
				<input type="hidden" id="parent_id"
name="parent_id" value="<?php echo $this->product_id;
?>" />
				<input type="hidden" id="variant"
name="variant" value="1" />
				<?php echo JHTML::_( 'form.token' ); ?>
			</form>
		</td>
	</tr>
</table>
product/tmpl/useselection.php000064400000003607151162050370012421
0ustar00<?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');
?><div class="iframedoc"
id="iframedoc"></div>
<form action="<?php echo
hikashop_completeLink('product'); ?>"
methodproduct/tmpl/variant.php000064400000007171151162050370011363
0ustar00?>
				<th class="title"><?php
					echo JText::_('PRODUCT_PRICE');
				?></th>
				<th class="title"><?php
					echo JText::_('PRODUCT_QUANTITY');
				?></th>
<?php
	if(!empty($this->fields)) {
		foreach($this->fields as $field) {
			echo "\r\n".'<th
class="title">'.$this->fieldsClass->trans($field->field_realname).'</th>';
		}
	}
?>
				<th class="title titletoggle"><?php
					echo JText::_('HIKA_PUBLISHED');
				?></th>
				<th class="title"><?php
					echo JText::_('ID');
				?></th>
			</tr>
		</thead>
		<tbody>
<?php
	if(!empty($this->rows)){
		$k = 0;
		for($i = 0,$a = count($this->rows);$i<$a;$i++){
			$row =& $this->rows[$i];
			$publishedid = 'product_published-'.$row->product_id;
?>
			<tr class="row<?php echo $k; ?>">
				<td class="hk_center"><?php
					echo $i;
				?></td>
				<td class="hk_center">
					<?php echo JHTML::_('grid.id', $i,
$roproduct/tmpl/variant.php000064400000007171151162050370011363
0ustar00ty);
				?></td>
<?php
			if(!empty($this->fields)){
				foreach($this->fields as $field){
					$namekey = $field->field_namekey;
					echo
"\r\n".'<td>'.$this->fieldsClass->show($field,$row->$namekey).'</td>';
				}
			}
?>
				<td class="hk_center">
					<span id="<?php echo $publishedid ?>"
class="spanloading"><?php
						echo $this->toggleClass->toggle($publishedid,
(int)$row->product_published,'product')
					?></span>
				</td>
				<td width="1%" class="hk_center"><?php
					echo $row->product_id;
				?></td>
			</tr>
<?php
			$k = 1 - $k;
		}
	}
?>
		</tbody>
	</table>
	<input type="hidden" name="option"
value="<?php echo HIKASHOP_COMPONENT; ?>" />
	<input type="hidden" name="task"
value="variant" />
	<input type="hidden" name="ctrl"
value="<?php echo hikaInput::get()->getCmd('ctrl');
?>" />
	<input type="hidden" name="boxchecked"
value="0" />
	<input type="hidden" id="parent_id"
name="parent_id" value="<?php echo $this->product_id;
?>" />
	<input type="hidden" id="variant"
name="variant" value="1" />
	<input type="hidden" name="legacy"
value="1" />
	<?php echo JHTML::_( 'form.token' ); ?>
</form>
product/tmpl/waitlist.php000064400000001000151162050370011540
0ustar00<?php
/**
 * @package	HikaShop for Joomla!
 * @version	2.2.3
 * @author	hikashop.com
 * @copyright	(C) 2010-2013
HIKproduct/tmpl/variant_legacy.php000064400000007205151162050370012705
0ustar00<?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 ProductViewProduct extends hikashopView
{
	var $type = 'main';
	var $ctrl= 'product';
	var $nameListing = 'PRODUCTS';
	var $nameForm = 'PRODUCTS';
	var $icon = 'product';
	var $displayCompleted = false;

	function display($tpl = null){
		$this->paramBase =
HIKASHOP_COMPONENT.'.'.$this->getName();
		$function =
$this->getLayout();product/tmpl/variant_legacy.php000064400000007205151162050370012705
0ustar00aramBase.".filter_id"))){
			$app->setUserState( $this->paramBase.'.limitstart',0);
			$pageInfo->limit->start = 0;
		}else{
			$pageInfo->limit->start = $app->getUserStateFromRequest(
$this->paramBase.'.limitstart', 'limitstart', 0,
'int' );
		}
		$pageInfo->search = $app->getUserStateFromRequest(
$this->paramBase.".search", 'search', '',
'string' );
		$pageInfo->search = JString::strtolower( $pageInfo->search );

		$pageInfo->limit->value = $app->getUserStateFromRequest(
$this->paramBase.'.list_limit', 'limit',
$app->getCfg('list_limit'), 'int' );
		if(empty($pageInfo->limit->value)) $pageInfo->limit->value =
500;
		$selectedType = $app->getUserStateFromRequest(
$this->paramBase.".filter_type",'filter_type',$config->get('sub_products_display_all',0),'int');
		$pageInfo->selectedType = $selectedType;
		$pageInfo->filter->filter_id = $app->getUserStateFromRequest(
$this->paramBase.".filter_id",'filter_id',0,'string');
		$pageInfo->filter->filter_product_type =
$app->getUserStateFromRequest(
$this->paramBase.".filter_product_type",'filter_product_type','main','word');
		$pageInfo->filter->filter_published =
$app->getUserStateFromRequest(
$this->paramBase.".filter_published",'filter_published',0,'int');
		$pageInfo->filter->filter_manufacturer =
$app->getUserStateFromRequest(
$this->paramBase.".filter_manufacturer",'filter_manufacturer','','string');
		$database	= JFactory::getDBO();
		$filters = array();

		if($pageInfo->filter->filter_published==2){
			$filters[]='b.product_published=1';
		}elseif($pageInfo->filter->filter_published==1){
			$filters[]='b.product_published=0';
		}

		if(empty($pageInfo->filter->filter_id)||
!is_numeric($pageInfo->filter->filter_id)){
			$pageInfo->filter->filter_id='product';
			$class = hikashop_get('class.category');
			$class->getMainElement($pageInfo->filter->filter_id);
		}

		$manufacturerDisplay = hikashop_get('type.manufacturer');
		$manufacturer =
$manufacturerDisplay->display('filter_manufacturer',$pageInfo->filter->filter_manufacturer);
		$this->assignRef('manufacturerDisplay',$manufacturer);

		if (!empty($manufacturer))
		{
			if(!empty($pageInfo->filter->filteproduct/tmpl/waitlist.php000064400000001000151162050370011540
0ustar00	$filters[]=$filter.(int)$pageInfo->filter->filter_id.')';
			$select='SELECT DISTINCT b.*';
		}

		$searchMap =
array('b.product_name','b.product_description','b.product_id','b.product_code');

		$fieldsClass = hikashop_get('class.field');
		$parent_cat_ids = array();
		if(!empty($cat_ids)){
			$parents =
$categoryClass->getParents($cat_ids,true,array(),'',0,0);
			if(!empty($parents)){
				foreach($parents as $parent){
					$parent_cat_ids[]=$parent->category_id;
				}
			}
		}
		$categoriproduct/view.html.php000064400000142351151162050370010660
0ustar00product/tmpl/waitlist.php000064400000001000151162050370011540
0ustar00);
		$dispatcher = JDispatcher::getInstance();
		$dispatcher->trigger( 'onBeforeProductListingLoad', array(
& $filters, & $order, &$this, & $select, & $select2,
& $a, & $b, & $on) );

		if($pageInfo->filter->filter_product_type=='all'){
			$query = '( '.$select.' FROM
'.hikashop_table('product_category').' AS a LEFT JOIN
'.hikashop_table('product').' AS b ON
a.product_id=b.product_id WHERE '.implode(' AND
',$filters).' AND b.product_id IS NOT NULL )
			UNION
						( '.$select.' FROM
'.hikashop_table(product/view.html.php000064400000142351151162050370010660
0ustar00oduct_id=b.product_parent_id';
			}
			$query = ' FROM
'.hikashop_table('product_category').' AS a LEFT JOIN
'.hikashop_table('product').' AS b ON '.$lf.'
WHERE '.implode(' AND ',$filters);

			$database->setQuery($select.$query.$order,(int)$pageInfo->limit->start,(int)$pageInfo->limit->value);
		}

		$rows = $database->loadObjectList();
		$fieldsClass->handleZoneListing($fields,$rows);
		if(!empty($pageInfo->search)){
			$rows =
hikashop_search($pageInfo->search,$rows,'product_id');
		}
		if($pageInfo->filter->filter_product_type=='all'){
			$database->setQuery('SELECT COUNT(*) FROM ('.$query.')
as u');
		}else{
			$database->setQuery('SELECT
COUNT(DISTINCT(b.product_id))'.$query);
		}
		$pageInfo->elements = new stdClass();
		$pageInfo->elements->total = $database->loadResult();
		$pageInfo->elements->page = count($rows);
		if($pageInfo->elements->page){
			$this->_loadPrices($rows);
		}
		if($pageInfo->limit->value == 500) $pageInfo->limit->value =
100;

		hikashop_setTitle(JText::_($this->nameListing),$this->icon,$this->ctrl);

		$config =& hikashop_config();
		$manage =
hikashop_isAllowed($config->get('acl_product_manage','all'));
		$this->assignRef('manage',$manage);
		$exportIcon = 'archive';
		if(HIKASHOP_J30) {
			$exportIcon = 'export';
		}
		$this->toolbar = array(
			array('name' => 'link', 'icon' =>
'limit',
'alt'=>JText::_('LIMIT'),'url'=>hikashop_completeLink('limit'),'display'
=> hikashop_level(1) &&
hikashop_isAllowed($config->get('acl_limit_view','all'))),
			array('name' => 'custom', 'icon' =>
$exportIcon, 'alt'=>JText::_('HIKA_EXPORT'),
'task' => 'export', 'check' => false),
			array('name' => 'publishList',
'display' => $manage),
			array('name' => 'unpublishList',
'display' => $manage),
			array('name' => 'custom', 'icon' =>
'copy', 'alt' => JText::_('HIKA_COPY'),
'task' => 'copy', 'display' =>
$manage),
			array('name' => 'addNew', 'display'
=> $manage),
			array('name' => 'editList', 'display'
=> $manage),
			array('name' => 'deleteList', 'display'
=>
hikashop_isAllowed($config->get('acl_product_delete','all'))),
			'|',
			array('name' => 'pophelp', 'target'
=> $this->ctrl.'-listing'),
			'dashboard'
		);

		$toggleClass = hikashop_get('helper.toggle');
		$this->assignRef('toggleClass',$toggleClass);
		$childClass = hikashop_get('type.childdisplay');
		$this->assignRef('childDisplayType',$childClass);
		$filter_type=$childClass->display('filter_type',$selectedType,false);
		$this->assignRef('childDisplay',$filter_type);
		$publishDisplay = hikashop_get('type.published');
		$publish =
$publishDisplay->display('filter_published',$pageInfo->filter->filter_published);
		$this->assignRef('publishDisplay',$publish);
		$productClass = hikashop_get('type.product');
		$this->assignRef('productType',$productClass);
		$breadcrumbClass = hikashop_get('type.breadcrumb');
		$breadcrumb =
$breadcrumbClass->display('filter_id',$pageInfo->filter->filter_id,'product');
		$this->assignRef('breadCrumb',$breadcrumb);
		$this->assignRef('rows',$rows);
		$this->assignRef('pageInfo',$pageInfo);
		$doOrdering = !$selectedType;
		if($doOrdering &&
!(empty($pageInfo->filter->filter_product_type) ||
$pageInfo->filter->filter_product_type=='main')){
			$doOrdering=false;
		}
		$this->assignRef('doOrdering',$doOrdering);
		if($doOrdering){
			$order = new stdClass();
			$order->ordering = false;
			$order->orderUp = 'orderup';
			$order->orderDown = 'orderdown';
			$order->reverse = false;
			if($pageInfo->filter->order->value == 'a.ordering'){
				$order->ordering = true;
				if($pageInfo->filter->order->dir == 'desc'){
					$order->orderUp = 'orderdown';
					$order->orderDown = 'orderup';
					$order->reverse = true;
				}
			}
			$this->assignRef('order',$order);
		}
		$currencyClass = hikashop_get('class.currency');
		$this->assignRef('currencyHelper',$currencyClass);
		$config =& hikashop_config();
		$this->assignRef('config',$config);
		$this->getPagination();
	}

	function form(){
		$product_id = hikashop_getCID('product_id');
		$class = hikashop_get('class.product');
		$popup = hikashop_get('helper.popup');
		$this->assignRef('popup',$popup);
		$database	= JFactory::getDBO();
		if(!empty($product_id)){
			$element = $class->get($product_id,true);
			$task='edit';
			if($element){
				$query = 'SELECT b.* FROM
'.hikashop_table('product_category').' AS a LEFT JOIN
'.hikashop_table('category').' AS b ON
a.category_id=b.category_id WHERE a.product_id = '.$product_id.'
ORDER BY a.product_category_id';
				$database->setQuery($query);
				$element->categories = $database->loadObjectList();
				$query = 'SELECT a.*,b.* FROM
'.hikashop_table('product_related').' AS a LEFT JOIN
'.hikashop_table('product').' AS b ON
a.product_related_id=b.product_id WHERE
a.product_related_type=\'related\' AND a.product_id =
'.$product_id;
				$database->setQuery($query);
				$element->related = $database->loadObjectList();
				$query = 'SELECT a.*,b.* FROM
'.hikashop_table('product_related').' AS a LEFT JOIN
'.hikashop_table('product').' AS b ON
a.product_related_id=b.product_id WHERE
a.product_related_type=\'options\' AND a.product_id =
'.$product_id;
				$database->setQuery($query);
				$element->options = $database->loadObjectList();
				$query = 'SELECT * FROM
'.hikashop_table('file').' WHERE file_ref_id =
'.$product_id.' AND file_type=\'product\' ORDER BY
file_ordering, file_id';
				$database->setQuery($query);
				$element->images = $database->loadObjectList();
				$query = 'SELECT * FROM
'.hikashop_table('file').' WHERE file_ref_id =
'.$product_id.' AND file_type=\'file\' ORDER BY
file_ordering, file_id';
				$database->setQuery($query);
				$element->files =
$database->loadObjectList('file_id');
				if(!empty($element->files)){
					$query = 'SELECT SUM(download_number) AS download_number,file_id
FROM '.hikashop_table('download').' WHERE file_id IN (
'.implode(',',array_keys($element->files)).' ) GROUP
BY file_id';
					$database->setQuery($query);
					$downloads = $database->loadObjectList('file_id');
					if(!empty($downloads)){
						foreach($downloads as $download){
							$element->files[$download->file_id]->download_number =
$download->download_number;
						}
					}
				}
				if($element->product_type=='variant'){
					$query = 'SELECT b.* FROM
'.hikashop_table('variant').' AS a LEFT JOIN
'.hikashop_table('characteristic').' AS b ON
a.variant_characteristic_id=b.characteristic_id WHERE variant_product_id =
'.$product_id;
					$database->setQuery($query);
					$characteristics =
$database->loadObjectList('characteristic_parent_id');
				}else{
					$element->characteristics =
$this->_getCharacteristics($product_id);
				}

				$ids = array($product_id);
			}
		}else{
			$ids = array();
			$element = JRequest::getVar('fail');
			if(empty($element)){
				$element = new stdClass();
				$element->product_published=1;
				if(JRequest::getBool('variant')){
					$element->product_type = 'variant';
					$element->product_parent_id =
JRequest::getInt('parent_id');
				}else{
					$element->product_type = 'main';
				}
				$element->product_quantity=-1;
				$categoryClass = hikashop_get('class.category');
				$mainTaxCategory = 'tax';
				$categoryClass->getMainElement($mainTaxCategory);
				$database->setQuery('SELECT category_id FROM '.
hikashop_table('category'). ' WHERE
category_type=\'tax\' &&
category_parent_id='.(int)$mainTaxCategory.' ORDER BY
category_ordering DESC');
				$element->product_tax_id = $database->loadResult();

				if($element->product_type == 'main') {
					$app = JFactory::getApplication();
					$id =
$app->getUserState(HIKASHOP_COMPONENT.'.product.filter_id');
					if(empty($id) || !is_numeric($id)){
						$id='product';
						$class = hikashop_get('class.category');
						$class->getMainElement($id);
					}
					if(!empty($id)){
						$element->categories = array($categoryClass->get($id));
					}
				}
			}else{
				if(!empty($element->related)){
					$rel_ids = array();
					foreach($element->related as $related){
						$rel_ids[(int)$related->product_related_id]=$related->product_related_ordering;
					}
					$query = 'SELECT b.* FROM
'.hikashop_table('product').' AS b WHERE b.product_id
IN ('.implode(',',array_keys($rel_ids)).')';
					$database->setQuery($query);
					$element->related = $database->loadObjectList();
					foreach($element->related as $k => $option){
						$element->related[$k]->product_related_id =
$option->product_id;
						$element->related[$k]->product_related_ordering =
$rel_ids[$option->product_id];
					}
				}
				if(!empty($element->options)){
					$rel_ids = array();
					foreach($element->options as $related){
						$rel_ids[(int)$related->product_related_id]=$related->product_related_ordering;
					}
					$query = 'SELECT b.* FROM
'.hikashop_table('product').' AS b WHERE b.product_id
IN ('.implode(',',array_keys($rel_ids)).')';
					$database->setQuery($query);
					$element->options = $database->loadObjectList();
					foreach($element->options as $k => $option){
						$element->options[$k]->product_related_id =
$option->product_id;
						$element->options[$k]->product_related_ordering =
$rel_ids[$option->product_id];
					}
				}
				if(!empty($element->characteristics)){
					$char_ids = array();
					foreach($element->characteristics as $k => $char){
						$char_ids[(int)$char->characteristic_id] = $k;
					}
					$query = 'SELECT b.* FROM
'.hikashop_table('characteristic').' AS b WHERE
b.characteristic_id IN
('.implode(',',array_keys($char_ids)).')';
					$database->setQuery($query);
					$characteristics = $database->loadObjectList();
					foreach($characteristics as $char){
						$element->characteristics[$char_ids[$char->characteristic_id]]->characteristic_value
= $char->characteristic_value;
					}
				}
			}
			$task='add';
		}
		if(!empty($element->related)){
			foreach($element->related as $related){
				$ids[]=(int)@$related->product_id;
			}
		}
		if(!empty($element->options)){
			foreach($element->options as $optionElement){
				$ids[]=(int)@$optionElement->product_id;
			}
		}
		if(!empty($ids)){
			$query = 'SELECT * FROM
'.hikashop_table('price').' WHERE price_product_id IN
('.implode(',',$ids).')';
			$database->setQuery($query);
			$prices = $database->loadObjectList();
			if(!empty($prices)){
				foreach($prices as $price){
					if($price->price_product_id==$product_id){
						$element->prices[]=$price;
					}
					if(!empty($element->related)){
						foreach($element->related as $k => $related){
							if($price->price_product_id==$related->product_id){
								$element->related[$k]->prices[]=$price;
								break;
							}
						}
					}
					if(!empty($element->options)){
						foreach($element->options as $k => $optionElement){
							if($price->price_product_id==$optionElement->product_id){
								$element->options[$k]->prices[]=$price;
								break;
							}
						}
					}
				}
			}
		}
		$config =& hikashop_config();
		$main_currency = $config->get('main_currency',1);
		$currency = hikashop_get('type.currency');
		$this->assignRef('currency',$currency);
		$this->assignRef('config',$config);
		$currencyClass = hikashop_get('class.currency');
		$this->assignRef('currencyHelper',$currencyClass);
		if($element->product_type=='variant'){
			$element->characteristics =
$this->_getCharacteristics(@$element->product_parent_id);
			foreach($element->characteristics as $key => $characteristic){
				if(isset($characteristics[$characteristic->characteristic_id])){
					$element->characteristics[$key]->default_id=$characteristics[$characteristic->characteristic_id]->characteristic_id;
				}
			}
			$parentdata = $class->get($element->product_parent_id);
			$element->product_tax_id=$parentdata->product_tax_id;
		}
		if(!empty($element->product_tax_id)){
			$main_tax_zone =
explode(',',$config->get('main_tax_zone',''));
			if(count($main_tax_zone)){
				$main_tax_zone = array_shift($main_tax_zone);
			}
		}
		if(!empty($element->prices)){
			$unset = array();
			foreach($element->prices as $key => $price){
				if(empty($price->price_value)){
					$unset[]=$key;
				}
			}
			foreach($unset as $u){
				unset($element->prices[$u]);
			}
			if(!empty($element->product_tax_id)){
				foreach($element->prices as $key => $price){
					$element->prices[$key]->price_value_with_tax =
$currencyClass->getTaxedPrice($price->price_value,$main_tax_zone,$element->product_tax_id);
				}
			}else{
				foreach($element->prices as $key => $price){
					$element->prices[$key]->price_value_with_tax =
$price->price_value;
				}
			}
		}
		if(empty($element->prices)){
			$obj = new stdClass();
			$obj->price_value=0;
			$obj->price_value_with_tax=0;
			$obj->price_currency_id = $main_currency;
			$element->prices = array($obj);
		}

		if($element->product_quantity==-1){
			$element->product_quantity=JText::_('UNLIMITED');
		}

		if(empty($element->product_max_per_order)){
			$element->product_max_per_order=JText::_('UNLIMITED');
		}

		hikashop_setTitle(JText::_($this->nameForm),$this->icon,$this->ctrl.'&task='.$task.'&product_id='.$product_id);

		if(version_compare(JVERSION,'1.6','<')){
			$url =
hikashop_completeLink('product&task=updatecart&cid='.$product_id,true);
		}else{
			$url =
'index.php?option=com_hikashop&ctrl=product&task=updatecart&tmpl=component&cid='.$product_id;
		}
		$this->toolbar = array(
			array('name' =>
'popup','icon'=>'upload','alt'=>JText::_('ADD_TO_CART_HTML_CODE'),'url'=>$url),
			'|',
			'save',
			array('name' => 'save2new', 'display'
=> version_compare(JVERSION,'1.7','>=')),
			'apply'
		);
		if(JRequest::getInt('variant')){
			$variant = 1;
			$this->assignRef('variant',$variant);
			$this->toolbar[] = array('name' => 'link',
'icon'=>'cancel','alt'=>JText::_('HIKA_CANCEL'),'url'=>hikashop_completeLink('product&task=variant&cid='.$element->product_parent_id));
		}else{
			$cancel_url = JRequest::getVar('cancel_redirect');
			if(!empty($cancel_url)){
				$url = base64_decode($cancel_url);
				$this->toolbar[] = array('name' => 'link',
'icon'=>'cancel','alt'=>JText::_('HIKA_BACK'),'url'=>$url);
			}else{
				$this->toolbar[] = 'cancel';
			}
		}

		if($element->product_type=='variant'){
			$this->toolbar[] = array('name' => 'link',
'icon'=>'forward','alt'=>JText::_('GO_TO_MAIN_PRODUCT'),'url'=>hikashop_completeLink('product&task=edit&cid='.$element->product_parent_id));
		}
		$this->toolbar[] = '|';
		$this->toolbar[] = array('name' => 'pophelp',
'target' => $this->ctrl.'-form');

		$this->assignRef('element',$element);

		JHTML::_('behavior.modal');
		$type = 'tabs';
		if($config->get('multilang_display','tabs')!='popups'){
			$type =
$config->get('multilang_display','tabs');
		}

		$tabs = hikashop_get('helper.tabs');
		$this->assignRef('tabs', $tabs);

		$translation = false;
		$transHelper = hikashop_get('helper.translation');
		if($transHelper && $transHelper->isMulti()){
			$translation = true;
			$transHelper->load('hikashop_product',@$element->product_id,$element);
			$this->assignRef('transHelper',$transHelper);
		}
		$toggle=hikashop_get('helper.toggle');
		$this->assignRef('toggle',$toggle);

		$js = '
		function deleteRow(divName,inputName,rowName,div1,input1,div2,input2){
			var d = document.getElementById(divName);
			var olddiv = document.getElementById(inputName);
			if(d && olddiv){
				d.removeChild(olddiv);
				document.getElementById(rowName).style.display=\'none\';
			}
			if(div1 && input1){
				deleteRow(div1,input1,rowName);
			}
			if(div2 && input2){
				deleteRow(div2,input2,rowName);
			}
			return false;
		}
		function updatePrice(divId,price,tax_id,conversion){
			try{
				new
Ajax(\'index.php?option=com_hikashop&tmpl=component&ctrl='.$this->ctrl.'&task=getprice&price=\'+price+\'&tax_id=\'+tax_id+\'&conversion=\'+conversion,
{ method: \'get\', onComplete: function(result)
{window.document.getElementById(divId).value = result;}}).request();
			}catch(err){
				new
Request({url:\'index.php?option=com_hikashop&tmpl=component&ctrl='.$this->ctrl.'&task=getprice&price=\'+price+\'&tax_id=\'+tax_id+\'&conversion=\'+conversion,method:
\'get\', onComplete: function(result)
{window.document.getElementById(divId).value = result;}}).send();
			}
		}';
		if (!HIKASHOP_PHP5) {
			$doc =& JFactory::getDocument();
		}else{
			$doc = JFactory::getDocument();
		}
		$doc->addScriptDeclaration( $js );

		$this->assignRef('translation',$translation);

		$editor = hikashop_get('helper.editor');
		$editor->name = 'product_description';
		$editor->content = @$element->product_description;
		$editor->height=300;
		$this->assignRef('editor',$editor);

		$categoryType = hikashop_get('type.categorysub');
		$categoryType->type='tax';
		$categoryType->field='category_id';
		$this->assignRef('categoryType',$categoryType);

		$manufacturerType = hikashop_get('type.categorysub');
		$manufacturerType->type='manufacturer';
		$manufacturerType->field='category_id';
		$this->assignRef('manufacturerType',$manufacturerType);

		$quantity = hikashop_get('type.quantity');
		$this->assignRef('quantity',$quantity);

		$weightType = hikashop_get('type.weight');
		$this->assignRef('weight',$weightType);
		$volumeType = hikashop_get('type.volume');
		$this->assignRef('volume',$volumeType);
		$image=hikashop_get('helper.image');
		$this->assignRef('image',$image);
		$characteristicHelper = hikashop_get('type.characteristic');
		$this->assignRef('characteristicHelper',$characteristicHelper);
		$productDisplayType = hikashop_get('type.productdisplay');
		$this->assignRef('productDisplayType',$productDisplayType);
		$this->_addCustom($element);
	}

	function edit_translation(){
		$language_id = JRequest::getInt('language_id',0);
		$product_id = hikashop_getCID('product_id');
		$class = hikashop_get('class.product');
		$element = $class->get($product_id);
		$translation = false;
		$transHelper = hikashop_get('helper.translation');
		if($transHelper && $transHelper->isMulti()){
			$translation = true;
			$transHelper->load('hikashop_product',@$element->product_id,$element,$language_id);
			$this->assignRef('transHelper',$transHelper);
		}
		$editor = hikashop_get('helper.editor');
		$editor->name = 'product_description';
		$editor->content = @$element->product_description;
		$editor->height=300;
		$this->assignRef('editor',$editor);
		$toggle=hikashop_get('helper.toggle');
		$this->assignRef('toggle',$toggle);
		$this->assignRef('element',$element);
		$tabs = hikashop_get('helper.tabs');
		$this->assignRef('tabs',$tabs);
	}

	function _addCustom(&$element){
		$fieldsClass = hikashop_get('class.field');
		$fields =
$fieldsClass->getFields('',$element,'product','field&task=state');
		$null=array();
		$fieldsClass->addJS($null,$null,$null);
		$fieldsClass->jsToggle($fields,$element,0);
		$this->assignRef('fieldsClass',$fieldsClass);
		$this->assignRef('fields',$fields);
	}

	function _getCharacteristics($product_id){
		$database = JFactory::getDBO();
		$query = 'SELECT a.ordering,b.* FROM
'.hikashop_table('variant').' AS a LEFT JOIN
'.hikashop_table('characteristic').' AS b ON
a.variant_characteristic_id=b.characteristic_id WHERE a.variant_product_id
= '.(int)$product_id.' ORDER BY a.ordering';
		$database->setQuery($query);
		$characteristics = $database->loadObjectList();
		if(!empty($characteristics)){
			$unsetList = array();
			$ids = array();
			foreach($characteristics as $key => $characteristic){
				if(!empty($characteristic->characteristic_parent_id)){
					$unsetList[]=$key;
					foreach($characteristics as $key2 => $characteristic2){
						if($characteristic->characteristic_parent_id==$characteristic2->characteristic_id){
							$characteristics[$key2]->default_id=$characteristic->characteristic_id;
							break;
						}
					}
				}else{
					$ids[] = (int)$characteristic->characteristic_id;
				}
			}
			if(!empty($unsetList)){
				foreach($unsetList as $item){
					unset($characteristics[$item]);
				}
				$characteristics=array_values($characteristics);
			}
			if(!empty($ids)){
				$config =& hikashop_config();
				$sort = $config->get('characteristics_values_sorting');
				if($sort=='old'){
					$order = 'characteristic_id ASC';
				}elseif($sort=='alias'){
					$order = 'characteristic_alias ASC';
				}elseif($sort=='ordering'){
					$order = 'characteristic_ordering ASC';
				}else{
					$order = 'characteristic_value ASC';
				}
				$query = 'SELECT * FROM
'.hikashop_table('characteristic').' WHERE
characteristic_parent_id IN ('.implode(',',$ids).')
ORDER BY '.$order;
				$database->setQuery($query);
				$values = $database->loadObjectList();
				if(!empty($values)){
					foreach($values as $value){
						foreach($characteristics as $key => $characteristic){
							if($value->characteristic_parent_id==$characteristic->characteristic_id){
								if(!isset($characteristics[$key]->values)){
									$characteristics[$key]->values=array();
								}
								$characteristics[$key]->values[$value->characteristic_id]=$value->characteristic_value;
								break;
							}
						}
					}
				}
			}
		}
		return $characteristics;
	}

	function _loadPrices(&$rows){
		$ids = array();
		foreach($rows as $row){
			$ids[]=(int)$row->product_id;
		}
		$query = 'SELECT * FROM
'.hikashop_table('price').' WHERE price_product_id IN
('.implode(',',$ids).')';
		$database = JFactory::getDBO();
		$database->setQuery($query);
		$prices = $database->loadObjectList();
		if(!empty($prices)){
			foreach($rows as $k => $row){
				foreach($prices as $price){
					if($price->price_product_id==$row->product_id){
						if(!isset($row->prices)) $row->prices=array();
						$rows[$k]->prices[$price->price_min_quantity]=$price;
					}
				}
			}
		}
	}

	function variant(){
		$app = JFactory::getApplication();
		$database	= JFactory::getDBO();
		$filters = array();
		$product_id = JRequest::getInt('parent_id');
		if(empty($product_id)){
			$product_id = hikashop_getCID('product_id');
		}

		$characteristics = false;
		$filters[]='a.variant_product_id = '.$product_id;
		$query = 'SELECT a.* FROM
'.hikashop_table('variant').' AS a WHERE
'.implode(' AND ',$filters);
		$database->setQuery($query);
		$variants = $database->loadObjectList();

		if(count($variants)){
			$filters = array();
			$filters[]='a.product_parent_id = '.$product_id;
			$query = 'SELECT a.* FROM
'.hikashop_table('product').' AS a WHERE
'.implode(' AND ',$filters);
			$database->setQuery($query);
			$rows = $database->loadObjectList();
			$characteristics = $this->_getCharacteristics($product_id);
			if(count($rows)){

				$this->_loadPrices($rows);

				$ids = array();
				foreach($rows as $row){
					$ids[]=$row->product_id;
				}
				$query = 'SELECT a.variant_product_id,b.* FROM
'.hikashop_table('variant').' AS a LEFT JOIN
'.hikashop_table('characteristic').' AS b ON
a.variant_characteristic_id=b.characteristic_id WHERE variant_product_id IN
('.implode(',',$ids).')';
				$database->setQuery($query);
				$variants = $database->loadObjectList();
				if(!empty($variants)){
					foreach($variants as $variant){
						foreach($rows as $k => $row){
							if($variant->variant_product_id==$row->product_id){
								$name = false;
								foreach($characteristics as $characteristic){
									if($characteristic->characteristic_id==$variant->characteristic_parent_id){
										$name = $characteristic->characteristic_value;
										break;
									}
								}
								if($name!==false){
									$rows[$k]->characteristics[$name]=$variant->characteristic_value;
								}
								break;
							}
						}
					}
				}
			}
			$config =& hikashop_config();
			$this->toolbar = array(
				array('name'=>'publishList'),
				array('name'=>'unpublishList'),
				'|',
				array('name' => 'link',
'icon'=>'new','alt'=>JText::_('HIKA_NEW'),'url'=>hikashop_completeLink('product&task=edit&variant=1&parent_id='.$product_id)),
				array('name'=>'editList'),
				array('name'=>'deleteList','display'=>hikashop_isAllowed($config->get('acl_product_delete','all'))),
			);
			$this->assignRef('rows',$rows);
			$this->assignRef('characteristics',$characteristics);
		}else{
			$app->enqueueMessage(JText::_('CHARACTERISTICS_FIRST'));
		}

		hikashop_setTitle(JText::_('VARIANTS'),$this->icon,'product&task=variant&cid='.$product_id);

		$this->toolbar[]=array('name' => 'link',
'icon'=>'cancel','alt'=>JText::_('GO_TO_MAIN_PRODUCT'),'url'=>hikashop_completeLink('product&task=edit&cid='.$product_id));
		$this->toolbar[]='|';
		$this->toolbar[]=array('name' => 'pophelp',
'target' => $this->ctrl.'variant-listing');
		$this->toolbar[]='dashboard';

		$currencyClass = hikashop_get('class.currency');
		$this->assignRef('currencyHelper',$currencyClass);
		$this->assignRef('product_id', $product_id);
		$toggle=hikashop_get('helper.toggle');
		$this->assignRef('toggleClass',$toggle);
	}

	function selectcategory(){
		$this->paramBase .= '_category';
		$app = JFactory::getApplication();
		$pageInfo = new stdClass();
		$pageInfo->filter = new stdClass();
		$pageInfo->filter->order = new stdClass();
		$pageInfo->limit = new stdClass();
		$pageInfo->filter->order->value =
$app->getUserStateFromRequest(
$this->paramBase.".filter_order",
'filter_order',	'a.category_ordering','cmd'
);
		$pageInfo->filter->order->dir	=
$app->getUserStateFromRequest(
$this->paramBase.".filter_order_Dir",
'filter_order_Dir',	'asc',	'word' );
		$pageInfo->search = $app->getUserStateFromRequest(
$this->paramBase.".search", 'search', '',
'string' );
		$pageInfo->search = JString::strtolower( $pageInfo->search );
		$pageInfo->limit->value = $app->getUserStateFromRequest(
$this->paramBase.'.list_limit', 'limit',
$app->getCfg('list_limit'), 'int' );
		$pageInfo->limit->start = $app->getUserStateFromRequest(
$this->paramBase.'.limitstart', 'limitstart', 0,
'int' );
		$selectedType = $app->getUserStateFromRequest(
$this->paramBase.".filter_type",'filter_type',0,'int');
		$pageInfo->filter->filter_id = $app->getUserStateFromRequest(
$this->paramBase.".filter_id",'filter_id','product','string');
		$database	= JFactory::getDBO();
		$searchMap =
array('a.category_name','a.category_description','a.category_id');
		$filters = array();
		if(!empty($pageInfo->search)){
			$searchVal =
'\'%'.hikashop_getEscaped($pageInfo->search,true).'%\'';
			$filters[] = implode(" LIKE $searchVal OR ",$searchMap)."
LIKE $searchVal";
		}
		$order = '';
		if(!empty($pageInfo->filter->order->value)){
			$order = ' ORDER BY
'.$pageInfo->filter->order->value.'
'.$pageInfo->filter->order->dir;
		}

		$class = hikashop_get('class.category');
		$class->parentObject =& $this;
		$rows =
$class->getChilds($pageInfo->filter->filter_id,$selectedType,$filters,$order,$pageInfo->limit->start,$pageInfo->limit->value,false);
		if(!empty($pageInfo->search)){
			$rows =
hikashop_search($pageInfo->search,$rows,'category_id');
		}
		$database->setQuery('SELECT COUNT(*)'.$class->query);
		$pageInfo->elements=new stdClass();
		$pageInfo->elements->total = $database->loadResult();
		$pageInfo->elements->page = count($rows);

		hikashop_setTitle(JText::_($this->nameListing),$this->icon,$this->ctrl);

		$this->toolbar = array(
			'addNew',
			'editList',
			'deleteList',
			'|',
			array('name' => 'pophelp', 'target'
=> $this->ctrl.'-listing'),
			'dashboard'
		);
		$toggleClass = hikashop_get('helper.toggle');
		$this->assignRef('toggleClass',$toggleClass);
		$childClass = hikashop_get('type.childdisplay');
		$childDisplay =
$childClass->display('filter_type',$selectedType,false);
		$this->assignRef('childDisplay',$childDisplay);
		$breadcrumbClass = hikashop_get('type.breadcrumb');
		$breadcrumb =
$breadcrumbClass->display('filter_id',$pageInfo->filter->filter_id,'product');
		$this->assignRef('breadCrumb',$breadcrumb);
		$this->assignRef('rows',$rows);
		$this->assignRef('pageInfo',$pageInfo);
		$order = new stdClass();
		$order->ordering = false;
		$order->orderUp = 'orderup';
		$order->orderDown = 'orderdown';
		$order->reverse = false;
		if($pageInfo->filter->order->value ==
'a.category_ordering'){
			$order->ordering = true;
			if($pageInfo->filter->order->dir == 'desc'){
				$order->orderUp = 'orderdown';
				$order->orderDown = 'orderup';
				$order->reverse = true;
			}
		}
		$this->assignRef('order',$order);
		$config =& hikashop_config();
		$this->assignRef('config',$config);
		$this->getPagination();
	}

	function addcategory(){
		$categories = JRequest::getVar( 'cid', array(), '',
'array' );
		$rows = array();
		if(!empty($categories)){
			JArrayHelper::toInteger($categories);
			$database	= JFactory::getDBO();
			$query = 'SELECT * FROM
'.hikashop_table('category').' WHERE category_id IN
('.implode(',',$categories).')';
			$database->setQuery($query);
			$rows = $database->loadObjectList();
		}
		$this->assignRef('rows',$rows);
		if (!HIKASHOP_PHP5) {
			$document=& JFactory::getDocument();
		}else{
			$document= JFactory::getDocument();
		}
		$js = "window.addEvent('domready', function() {
				var dstTable =
window.parent.document.getElementById('category_listing');
				var srcTable = document.getElementById('result');
				for (var c = 0,m=srcTable.rows.length;c<m;c++){
					var rowData = srcTable.rows[c].cloneNode(true);
					dstTable.appendChild(rowData);
				}
				window.parent.hikashop.closeBox();
		});";
		$document->addScriptDeclaration($js);
	}

	function selectrelated(){
		$type = JRequest::getCmd('select_type');
		$this->paramBase .= '_related_'.$type;
		switch($type){
			case 'field':
			case 'waitlist':
			case 'menu':
			case 'menu_0':
			case 'menu_1':
			case 'menu_2':
			case 'menu_3':
			case 'menu_4':
			case 'menu_5':
				$_REQUEST['filter_product_type']='all';
			default:
				break;
		}
		$this->listing();
		$this->assignRef('type',$type);
		$control = JRequest::getString('control');
		$this->assignRef('control',$control);
	}

	function addrelated(){
		$elements = JRequest::getVar( 'cid', array(), '',
'array' );
		$type = JRequest::getCmd('select_type');
		$this->assignRef('type',$type);
		$control = JRequest::getString('control');
		$this->assignRef('control',$control);
		$rows = array();
		if(!empty($elements)){
			JArrayHelper::toInteger($elements);
			$database	= JFactory::getDBO();
			$query = 'SELECT * FROM
'.hikashop_table('product').' WHERE product_id IN
('.implode(',',$elements).')';
			$database->setQuery($query);
			$rows = $database->loadObjectList();
			if(!empty($rows)){
				$this->_loadPrices($rows);
			}
		}
		$this->assignRef('rows',$rows);
		if (!HIKASHOP_PHP5) {
			$document =& JFactory::getDocument();
		}else{
			$document = JFactory::getDocument();
		}
		$id = 'product_id';
		$layout = $type;
		switch($type){
			case 'menu_0':
				$id.='_0';
				$layout = 'menu';
				break;
			case 'menu_1':
				$id.='_1';
				$layout = 'menu';
				break;
			case 'menu_2':
				$id.='_2';
				$layout = 'menu';
				break;
			case 'menu_3':
				$id.='_3';
				$layout = 'menu';
				break;
			case 'menu_4':
				$id.='_4';
				$layout = 'menu';
				break;
			case 'menu_5':
				$id.='_5';
				$layout = 'menu';
				break;
			case 'menu_6':
				$id.='_6';
				$layout = 'menu';
				break;
			case 'menu_7':
				$id.='_7';
				$layout = 'menu';
				break;
		}
		switch($type){
			case 'discount':
			case 'limit':
			case 'field':
			case 'waitlist':
			case 'menu':
			case 'menu_0':
			case 'menu_1':
			case 'menu_2':
			case 'menu_3':
			case 'menu_4':
			case 'menu_5':
			case 'menu_6':
			case 'menu_7':
				$js = "window.addEvent('domready', function() {
						window.parent.document.getElementById('".$id."').innerHTML
= document.getElementById('result').innerHTML;
						window.parent.hikashop.closeBox();
				});";
				$document->addScriptDeclaration($js);
				$this->setLayout($layout);
				break;
			case 'import':
				$js = "window.addEvent('domready', function() {
						window.parent.document.getElementById('template_product').innerHTML
= document.getElementById('result').innerHTML;
						window.parent.hikashop.closeBox();
				});";
				$document->addScriptDeclaration($js);
				$this->setLayout('import');
				break;
			default:
				$js = "window.addEvent('domready', function() {
						var dstTable =
window.parent.document.getElementById('".$type."_listing');
						var srcTable = document.getElementById('result');
						for (var c = 0,m=srcTable.rows.length;c<m;c++){
							var rowData = srcTable.rows[c].cloneNode(true);
							dstTable.appendChild(rowData);
						}
						window.parent.hikashop.closeBox();
				});";
				$document->addScriptDeclaration($js);
				$currencyClass = hikashop_get('class.currency');
				$this->assignRef('currencyHelper',$currencyClass);
				break;
		}
	}

	function selectimage(){
		$id = (int)hikashop_getCID( 'file_id');
		if(!empty($id)){
			$class = hikashop_get('class.file');
			$element = $class->get($id);
		}else{
			$element = new stdClass();
		}
		$this->assignRef('cid',$id);
		$this->assignRef('element',$element);
		$image=hikashop_get('helper.image');
		$this->assignRef('image',$image);
		$editor = hikashop_get('helper.editor');
		$editor->name = 'file_description';
		$editor->content = @$element->file_description;
		$editor->height=200;
		$this->assignRef('editor',$editor);
	}

	function addimage(){
		$element = JRequest::getInt( 'cid');
		$rows = array();
		if(!empty($element)){
			$database	= JFactory::getDBO();
			$query = 'SELECT * FROM
'.hikashop_table('file').' WHERE file_id
='.$element;
			$database->setQuery($query);
			$rows = $database->loadObjectList();
			if (!HIKASHOP_PHP5) {
				$document =& JFactory::getDocument();
			}else{
				$document = JFactory::getDocument();
			}
			$id = JRequest::getInt('id');
			$js = "window.addEvent('domready', function() {
					window.top.deleteRow('image_div_".$rows[0]->file_id.'_'.$id."','image[".$rows[0]->file_id."][".$id."]','image_".$rows[0]->file_id.'_'.$id."');
					var dstTable =
window.top.document.getElementById('image_listing');
					var srcTable = document.getElementById('result');
					for (var c = 0,m=srcTable.rows.length;c<m;c++){
						var rowData = srcTable.rows[c].cloneNode(true);
						dstTable.appendChild(rowData);
					}
					setTimeout(function(){
						window.parent.hikashop.closeBox();
					},200);
			});";
			$document->addScriptDeclaration($js);
		}
		$this->assignRef('rows',$rows);
		$image=hikashop_get('helper.image');
		$this->assignRef('image',$image);
		$popup = hikashop_get('helper.popup');
		$this->assignRef('popup',$popup);
	}

	function selectfile(){
		$id = (int)hikashop_getCID( 'file_id');
		if(!empty($id)){
			$class = hikashop_get('class.file');
			$element = $class->get($id);
		}else{
			$element = new stdClass();
		}
		$this->assignRef('cid',$id);
		$this->assignRef('element',$element);
		$editor = hikashop_get('helper.editor');
		$editor->name = 'file_description';
		$editor->content = @$element->file_description;
		$editor->height=200;
		$this->assignRef('editor',$editor);
		$config =& hikashop_config();
		$this->assignRef('config',$config);
	}

	function addfile(){
		$element = JRequest::getInt('cid');
		$rows = array();
		if(!empty($element)){
			$database = JFactory::getDBO();
			$query = 'SELECT * FROM
'.hikashop_table('file').' WHERE file_id
='.$element;
			$database->setQuery($query);
			$rows = $database->loadObjectList();
			if (!HIKASHOP_PHP5) {
				$document =& JFactory::getDocument();
			}else{
				$document = JFactory::getDocument();
			}
			$id = JRequest::getInt('id');
			$js = "
			window.addEvent('domready', function() {
					window.top.deleteRow('file_div_".$rows[0]->file_id.'_'.$id."','file[".$rows[0]->file_id."][".$id."]','file_".$rows[0]->file_id.'_'.$id."');
					var dstTable =
window.top.document.getElementById('file_listing');
					var srcTable = document.getElementById('result');
					for (var c = 0,m=srcTable.rows.length;c<m;c++){
						var rowData = srcTable.rows[c].cloneNode(true);
						dstTable.appendChild(rowData);
					}
					window.parent.hikashop.closeBox();
			});";
			$document->addScriptDeclaration($js);
		}
		$this->assignRef('rows',$rows);
		$config =& hikashop_config();
		$this->assignRef('config',$config);
		$popup = hikashop_get('helper.popup');
		$this->assignRef('popup',$popup);
	}

	function galleryimage() {
		hikashop_loadJslib('otree');
		$app = JFactory::getApplication();

		$config = hikashop_config();
		$this->assignRef('config', $config);

		$pageInfo = new stdClass();
		$pageInfo->limit = new stdClass();
		$pageInfo->limit->value = $app->getUserStateFromRequest(
$this->paramBase.'.gallery.list_limit', 'limit', 20,
'int' );
		$pageInfo->limit->start = $app->getUserStateFromRequest(
$this->paramBase.'.gallery.limitstart',
'limitstart', 0, 'int' );
		$pageInfo->search = $app->getUserStateFromRequest(
$this->paramBase.'.gallery.search', 'search',
'', 'string');

		$this->assignRef('pageInfo', $pageInfo);

		$galleryHelper = hikashop_get('helper.gallery');
		$config =& hikashop_config();
		$uploadFolder =
ltrim(JPath::clean(html_entity_decode($config->get('uploadfolder'))),DS);
		$uploadFolder = rtrim($uploadFolder,DS).DS;
		$uploadFolder = JPATH_ROOT.DS.$uploadFolder.DS;
		$galleryHelper->setRoot($uploadFolder);
		$this->assignRef('galleryHelper', $galleryHelper);

		$destFolder = rtrim(JRequest::getString('folder',
''), '/\\');
		if(!$galleryHelper->validatePath($destFolder))
			$destFolder = '';
		if(!empty($destFolder)) $destFolder .= '/';
		$this->assignRef('destFolder', $destFolder);

		$galleryOptions = array(
			'filter' => '.*' .
str_replace(array('.','?','*','$','^'),
array('\.','\?','\*','$','\^'),
$pageInfo->search) . '.*',
			'offset' => $pageInfo->limit->start,
			'length' => $pageInfo->limit->value
		);
		$this->assignRef('galleryOptions', $galleryOptions);

		$treeContent = $galleryHelper->getTreeList(null, $destFolder);
		$this->assignRef('treeContent', $treeContent);

		$dirContent = $galleryHelper->getDirContent($destFolder,
$galleryOptions);
		$this->assignRef('dirContent', $dirContent);

		if(empty($this->pageInfo->elements))
			$this->pageInfo->elements = new stdClass();
		$this->pageInfo->elements->total =
$galleryHelper->filecount;
		$this->getPagination();
	}

	function priceaccess(){
		$js = "
		function hikashopSetACL() {
			acl = document.getElementById('hidden_price_access');
			price =
window.top.document.getElementById('price_access_".JRequest::getInt('id')."');
			if(acl && price){
				price.value = acl.value;
			}
			window.parent.hikashop.closeBox();
		}";
		if (!HIKASHOP_PHP5) {
			$document =& JFactory::getDocument();
		}else{
			$document = JFactory::getDocument();
		}
		$document->addScriptDeclaration($js);
		$access = JRequest::getVar('access','');
		$this->assignRef('access',$access);
	}

	function export(){
		$product = hikashop_get('class.product');
		$products = JRequest::getVar( 'cid', array(), '',
'array' );
		$product->getProducts($products,'object');
		$products =& $product->all_products;

		if(!empty($products)){
			$currencies = array();
			foreach($products as $product){
				if(!empty($product->prices)){
					foreach($product->prices as $price){
						$currencies[$price->price_currency_id]=$price->price_currency_id;
					}
				}
			}
			if(!empty($currencies)){
				$currency = hikashop_get('class.currency');
				$null=null;
				$currencies = $currency->getCurrencies($currencies,$null);
			}

			$this->assignRef('currencies',$currencies);
		}
		$db = JFactory::getDBO();
		$db->setQuery('SELECT * FROM
'.hikashop_table('category').' AS a WHERE
a.category_type=\'product\' ORDER BY a.category_left ASC');

		$categories = $db->loadObjectList('category_id');

		$db->setQuery('SELECT * FROM
'.hikashop_table('file').' AS a WHERE
a.file_type=\'category\' AND a.file_ref_id IN
('.implode(',',array_keys($categories)).')');

		$files = $db->loadObjectList('file_ref_id');
		foreach($categories as $id => $cat){
			if(isset($files[$id])){
				$categories[$id]->file_path=$files[$id]->file_path;
			}
		}
		JPluginHelper::importPlugin( 'hikashop' );
		$dispatcher = JDispatcher::getInstance();
		$dispatcher->trigger( 'onBeforeProductExport', array( &
$products, &$categories, &$this) );
		$this->assignRef('categories',$categories);
		$this->assignRef('products',$products);
	}

	public function selection($tpl = null) {
		$singleSelection = JRequest::getVar('single', 0);
		$confirm = JRequest::getVar('confirm', 1);
		$this->assignRef('singleSelection', $singleSelection);
		$this->assignRef('confirm', $confirm);

		$elemStruct = array(
			'product_name',
			'product_code',
			'product_price',
			'product_quantity'
		);
		$this->assignRef('elemStruct', $elemStruct);

		$ctrl = JRequest::getCmd('ctrl');
		$this->assignRef('ctrl', $ctrl);

		$task = 'useselection';
		$this->assignRef('task', $task);

		$afterParams = array();
		$after = JRequest::getString('after', '');
		if(!empty($after)) {
			list($ctrl, $task) = explode('|', $after, 2);

			$afterParams = JRequest::getString('afterParams',
'');
			$afterParams = explode(',', $afterParams);
			foreach($afterParams as &$p) {
				$p = explode('|', $p, 2);
				unset($p);
			}
		}
		$this->assignRef('afterParams', $afterParams);

		$cid = hikashop_getCID();
		if(empty($cid))
			$cid = 0;
		$this->assignRef('cid', $cid);
		JRequest::setVar('filter_id', $cid);

		$this->listing();

		$cid = $this->pageInfo->filter->filter_id;
		$shopCategoryType = hikashop_get('type.categorysub');
		$this->assignRef('shopCategoryType', $shopCategoryType);
	}

	public function useselection() {
		$products = JRequest::getVar('pid', array(), '',
'array');
		$rows = array();
		$data = '';
		$confirm = JRequest::getVar('confirm', true);
		$singleSelection = JRequest::getVar('single', false);

		$elemStruct = array(
			'product_name',
			'product_code',
			'product_price',
			'product_quantity'
		);

		if(!empty($products)) {
			JArrayHelper::toInteger($products);
		}

		$this->assignRef('rows', $rows);
		$this->assignRef('data', $data);
		$this->assignRef('confirm', $confirm);
		$this->assignRef('singleSelection', $singleSelection);

		if($confirm == true) {
			hikamarket::loadJslib('mootools');
			$js = 'window.addEvent("domready",
function(){window.parent.hikashop.submitBox('.$data.');});';
			$doc = JFactory::getDocument();
			$doc->addScriptDeclaration($js);
		}
	}
}
report/index.html000064400000000032151162050370010047
0ustar00<html><body></body></html>report/tmpl/form.php000064400000104313151162050370010511
0ustar00<?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');
?><div id="iframedoc"></div>
<form action="index.php?option=<?php echo HIKASHOP_COMPONENT
?>&amp;ctrl=report" method="post"
name="adminForm" id="adminForm">
<?php if(!HIKASHOP_BACK_RESPONSIVE) { ?>
<div id="page-report">
	<table style="width:100%">
		<tr>
			<td valign="top" width="50%">
<?php } else { ?>
<div id="page-report" class="row-fluid">
	<div class="span6">
<?php } ?>
				<fieldset class="adminform">
					<legend><?php echo JText::_('CURRENT_REPORT');
?></legend>
					<table class="paramlist admintable table">
						<tr>
							<td class="key">
									<?php echo JText::_( 'HIKA_NAME' ); ?>
							</td>
							<td>
								<input type="text"
name="data[widget][widget_name]" id="name"
class="inputbox" size="40" value="<?php echo
$this->escape(@$this->element->widget_name); ?>" />
							</td>
						</tr>
						<tr>
							<td class="key">
									<?php echo JText::_( 'HIKA_PUBLISHED' ); ?>
							</td>
							<td>
								<?php echo JHTML::_('hikaselect.booleanlist',
"data[widget][widget_published]" ,
'',@$this->element->widget_published,
'HIKASHOP_YES', 'HIKASHOP_NO',
'data_widget_widget_published'); ?>
							</td>
						</tr>
					</table>
				</fieldset>
				<fieldset class="adminform">
					<legend><?php echo JText::_('ACCESS_LEVEL');
?></legend>
					<?php
					if(hikashop_level(2)){
						$acltype = hikashop_get('type.acl');
						echo
$acltype->display('widget_access',@$this->element->widget_access,'widget');
					}else{
						echo hikashop_getUpgradeLink('business');;
					} ?>
				</fieldset>
<?php if(!HIKASHOP_BACK_RESPONSIVE) { ?>
			</td>
			<td valign="top" width="50%">
<?php } else { ?>
	</div>
	<div class="span6">
<?php } ?>
				<fieldset class="adminform">
					<legend><?php echo JText::_('DISPLAY');
?></legend>
					<table class="paramlist admintable table">
						<tr>
							<td class="key">
									<?php echo JText::_( 'HIKA_TYPE' );?>
							</td>
							<td >
								<?php echo
$this->widget_dataType->display('data[widget][widget_params][display]',@$this->element->widget_params->display,
'', 'widget_display',@$this->element->widget_id,
$this->row_id, $this->element->widget_params->display); ?>
							</td>
						</tr>
						<tr id="widget_date">
							<td class="key" >
								<?php echo JText::_( 'DATE_TYPE' );// only for orders
?>
							</td>
							<td>
								<?php echo
$this->dateType->display('data[widget][widget_params][date_type]',@$this->element->widget_params->date_type);
?>
							</td>
						</tr>
						<tr id="widget_group">
							<td class="key" >
								<?php echo JText::_( 'DATE_GROUP' );//only for graph
and gauge ?>
							</td>
							<td>
								<?php echo
$this->dateGroup->display('data[widget][widget_params][date_group]',@$this->element->widget_params->date_group);
?>
							</td>
						</tr>
						<tr id="widget_period">
							<td class="key"><?php echo
JText::_('PERIOD'); ?></td>
							<td>
								<span><input <?php
if(empty($this->element->widget_params->periodType) ||
$this->element->widget_params->periodType ==
'proposedPeriod') echo 'checked="checked"';
?> onClick="updatePeriodSelection()" type="radio"
value="proposedPeriod"
name="data[widget][widget_params][periodType]"
id="display_proposed_period"/>
									<?php echo
$this->periodType->display('data[widget][widget_params][proposedPeriod]',@$this->element->widget_params->proposedPeriod);
?>
								</label></span><br/>
								<span><input <?php
if(!empty($this->element->widgetreport/index.html000064400000000032151162050370010047
0ustar00%Y-%m-%d
%H:%M',array('sizreport/tmpl/form.php000064400000104313151162050370010511
0ustar00report/index.html000064400000000032151162050370010047
0ustar00_params->content ==
'taxesreport/tmpl/form.php000064400000104313151162050370010511
0ustar00></label></span>
										<span id="type_listing_prod"><input <?php
if(!empty($this->element->widget_params->content) &&
$this->element->widget_params->content == 'products')
echo 'checked="checked"'; ?>
onClick="updateDisplayType()" type="radio"
value="products"
name="data[widget][widget_params][content]"
id="type_products"/><label
for="type_products"><?php echo JText::_(
'PRODUCTS' );  ?></label></span>
										<span id="type_listing_cat"><input <?php
if(!empty($this->element->widget_params->content) &&
$this->element->widget_params->content == 'categories')
echo 'checked="checked"'; ?>
onClick="updateDisplayType()" type="radio"
value="categories"
name="data[widget][widget_params][content]"
id="type_categories"/><label
for="type_categories"><?php echo JText::_(
'HIKA_CATEGORIES' );  ?></label></span>
										<span id="type_listing_discounts"><input
<?php if(!empty($this->element->widget_params->content)
&& $this->element->widget_params->content ==
'discounts') echo 'checked="checked"'; ?>
onClick="updateDisplayType()" type="radio"
value="discounts"
name="data[widget][widget_params][content]"
id="type_discounts"/><label
for="type_discounts"><?php echo JText::_(
'DISCOUNT' );  ?></label></span>
										<?php ?>
									</fieldset>
								</div>
							</td>
						</tr>
					</table>
				</fieldset>
			</div>
<?php if(!HIKASHOP_BACK_RESPONSIVE) { ?>
<div id="page-report2">
	<table style="width:100%">
		<tr>
			<td valign="top" width="50%">
<?php } else { ?>
<div id="page-report2" class="row-fluid">
	<div class="span6">
<?php } ?>
				<div id="filters">
					<fieldset class="adminform">
						<legend><?php echo JText::_( 'FILTERS' );
?></legend>
						<table class="paramlist admintable table"
width="100%">
							<tr id="widget_status">
								<td class="key" >
									<?php echo JText::_( 'ORDER_STATUS' );  ?>
								</td>
								<td>
									<?php echo
$this->status->display('data[widget][widget_params][filters][a.order_status][]',@$this->element->widget_params->filters['a.order_status'],'
multiple="multiple" size="5"',false); ?>
								</td>
							</tr>
							<tr id="widget_currencies">
								<td class="key">
												<?php echo JText::_( 'CURRENCIES' ); ?>
									</td>
									<td>
											<?php 	$currency=hikashop_get('type.currency');
											
$currencyList=$currency->display("data[widget][widget_params][filters][a.order_currency_id][]",
@$this->element->widget_params->filters['a.order_currency_id'],
'multiple="multiple" size="4"');
												echo $currencyList;
											?>
									</td>
								</tr>
								<tr>
									<td class="key">
											<?php echo JText::_( 'HIKASHOP_SHIPPING_METHOD' );
?>
									</td>
									<td>
										<?php echo
$this->shippingMethods->display('data[widget][widget_params][shipping][]',@$this->element->widget_params->shipping_type,@$this->element->widget_params->shipping_id,true,'multiple="multiple"
size="5"'); ?>
									</td>
								</tr>
								<tr>
									<td class="key">
											<?php echo JText::_( 'HIKASHOP_PAYMENT_METHOD' );
?>
									</td>
									<td>
										<?php echo
$this->paymentMethods->display('data[widget][widget_params][payment][]',@$this->element->widget_params->payment_type,@$this->element->widget_params->payment_id,
true, 'multiple="multiple" size="5"'); ?>
									</td>
								</tr>
								<tr>
									<td class="key">
											<?php echo JText::_( 'HIKA_CATEGORIES' ); ?>
									</td>
									<td>
											<div style="text-align:right;">
												<a class="modal" rel="{handler:
'iframe', size: {x: 760, y: 480}}" href="<?php echo
hikashop_completeLink("product&task=selectcategory",true );
?>">
														<button class="btn" type="button"
onclick="return false">
															<img src="<?php echo HIKASHOP_IMAGES;
?>add.png"/><?php echo JText::_('ADD');?>
														</button>
												</a>
											</div>
											<br/>
											<table class="adminlist table table-striped
table-hover" cellpadding="1" width="100%">
												<thead>
														<tr>
															<th class="title">
																	<?php echo JText::_('HIKA_NAME'); ?>
															</th>
															<th class="title">
																	<?php echo JText::_('HIKA_DELETE'); ?>
															</th>
															<th class="title">
																	<?php echo JText::_('ID'); ?>
															</th>
														</tr>
												</thead>
											<tbody id="category_listing">
													<?php
														if(!empty($this->element->widget_params->categories)
&&
$this->element->widget_params->categories!='all'){
								$k = 0;
								for($i = 0,$a =
count($this->element->widget_params->categories)+1;$i<$a-1;$i++){

									$row =&
$this->element->widget_params->categories[$i];
									if(!empty($row->category_id)){
									?>
										<tr id="category_<?php echo
$row->category_id;?>">
											<td>
												<div id="category_<?php echo $row->category_id;
?>_id">
												<a href="<?php echo
hikashop_completeLink('category&task=edit&cid='.$row->category_id);
?>"><?php echo $row->category_name; ?></a>
											</td>
											<td align="center">
												<a href="#" onclick="return
deleteRow('category_div_<?php echo
$row->category_id;?>','category[<?php echo
$row->category_id;?>]','category_<?php echo
$row->category_id; ?>');">
													<img
src="../media/com_hikashop/images/delete.png"/>
												</a>
											</td>
											<td width="1%" align="center">
												<?php echo $row->category_id; ?>
												<div id="category_div_<?php echo
$row->category_id;?>">
													<input style="width: 50px;
background-color:#e8f9db;" type	="hidden"
name="category[<?php echo $row->category_id;?>]"
id="category[<?php echo $row->category_id;?>]"
value="<?php echo $row->category_id;?>"/>
												</div>
											</td>
										</tr>
									<?php
									}
									$k = 1-$k;
								}
							}
													?>
											</tbody>
										</table>
								</td>
						</tr>
						<tr>
								<td class="key">
										<?php echo JText::_( 'INCLUDING_SUB_CATEGORIES' );
?>
							</td>
							<td>
									<?php echo JHTML::_('hikaselect.booleanlist',
"data[widget][widget_params][category_childs]" ,
'',@$this->element->widget_params->category_childs	);
?>
							</td>
						</tr>
						<tr>
							<td class="key">
									<?php echo JText::_( 'PRODUCTS' ); ?>
								</td>
								<td>
										<div style="float:right">
											<a class="modal" rel="{handler:
'iframe', size: {x: 760, y: 480}}" href="<?php echo
hikashop_completeLink("product&task=selectrelated&select_type=widget",true
); ?>">
													<button class="btn" type="button"
onclick="return false">
														 <img src="<?php echo HIKASHOP_IMAGES;
?>add.png"/><?php echo JText::_('ADD');?>
													</button>
											</a>
										</div>
								 <br/>
										<table class="adminlist table table-striped
table-hover" cellpadding="1">
											<thead>
													<tr>
														<th class="title">
																<?php echo JText::_('HIKA_NAME'); ?>
														</th>
														<th class="title">
																<?php echo JText::_('HIKA_DELETE'); ?>
														</th>
														<th class="title">
																<?php echo JText::_( 'ID' ); ?>
														</th>
													</tr>
										</thead>
										<tbody id="widget_listing">
												<?php
													$type='widget';
													if(!empty($this->element->widget_params->products)){
															$k = 0;
															foreach($this->element->widget_params->products as
$product){
																$row =$product;
																$id = rand();
															?>
																<tr class="<?php echo "row$k";
?>" id="<?php echo
$type.'_'.$row->product_id.'_'.$id;?>">
																	<td>
																			<a href="<?php echo
hikashop_completeLink('product&task=edit&cid='.$row->product_id);
?>"><?php echo $row->product_name; ?></a>
																	</td>
																	<td align="center">
																			<a href="#" onclick="return
deleteRow('<?php echo
$type.'_div_'.$row->product_id.'_'.$id;?>','<?php
echo $type;?>[<?php echo $row->product_id;?>][<?php echo
$id;?>]','<?php echo
$type.'_'.$row->product_id.'_'.$id;?>');"><img
src="<?php echo HIKASHOP_IMAGES;
?>delete.png"/></a>
																	</td>
																	<td width="1%" align="center">
																			<?php echo $row->product_id; ?>
																			<div id="<?php echo
$type.'_div_'.$row->product_id.'_'.$id;?>">
																				<input type="hidden" name="<?php
echo $type;?>[<?php echo $row->product_id;?>]"
id="<?php echo $type;?>[<?php echo
$row->product_id;?>][<?php echo $id;?>]"
value="<?php echo $row->product_id;?>"/>
																			</div>
																	</td>
																</tr>
															<?php
																$k = 1-$k;
															}
													}
													?>
											</tbody>
										</table>
								 </td>
							 </tr>
							 <tr>
									<td class="key">
											<?php echo JText::_( 'COUPONS' ); ?>
									</td>
									<td>
											<div style="text-align:right;">
												<a class="modal" rel="{handler:
'iframe', size: {x: 760, y: 480}}" href="<?php echo
hikashop_completeLink("discount&task=select_coupon",true );
?>">
														<button class="btn" type="button"
onclick="return false">
															<img src="<?php echo HIKASHOP_IMAGES;
?>add.png"/><?php echo JText::_('ADD');?>
														</button>
												</a>
											</div>
											<br/>
											<table class="adminlist table table-striped
table-hover" cellpadding="1" width="100%">
												<thead>
														<tr>
															<th class="title">
																	<?php echo JText::_('HIKA_NAME'); ?>
															</th>
															<th class="title">
																	<?php echo JText::_('HIKA_DELETE'); ?>
															</th>
															<th class="title">
																	<?php echo JText::_('ID'); ?>
															</th>
														</tr>
												</thead>
											<tbody id="coupon_listing">
													<?php
														if(!empty($this->element->widget_params->coupons)
&&
$this->element->widget_params->coupons!='all'){
								$k = 0;
								for($i = 0,$a =
count($this->element->widget_params->coupons)+1;$i<$a-1;$i++){
									$row =& $this->element->widget_params->coupons[$i];
									if(!empty($row->discount_id)){
									?>
										<tr id="coupon_<?php echo
$row->discount_id;?>">
											<td>
												<div id="coupon_<?php echo $row->discount_id;
?>_id">
												<a href="<?php echo
hikashop_completeLink('discount&task=edit&cid='.$row->discount_id);
?>"><?php echo $row->discount_code; ?></a>
											</td>
											<td align="center">
												<a href="#" onclick="return
deleteRow('coupon_div_<?php echo
$row->discount_id;?>','coupon[<?php echo
$row->discount_id;?>]','coupon_<?php echo
$row->discount_id; ?>');">
													<img
src="../media/com_hikashop/images/delete.png"/>
												</a>
											</td>
											<td width="1%" align="center">
												<?php echo $row->discount_id; ?>
												<div id="coupon_div_<?php echo
$row->discount_id;?>">
													<input style="width: 50px;
background-color:#e8f9db;" type	="hidden"
name="coupon[<?php echo $row->discount_id;?>]"
id="coupon[<?php echo $row->discount_id;?>]"
value="<?php echo $row->discount_id;?>"/>
												</div>
											</td>
										</tr>
									<?php
									}
									$k = 1-$k;
								}
							}
													?>
											</tbody>
										</table>
								</td>
						</tr>
					</table>
				</fieldset>
			</div>
<?php if(!HIKASHOP_BACK_RESPONSIVE) { ?>
			</td>
			<td valign="top" width="50%">
<?php } else { ?>
	</div>
	<div class="span6">
<?php } ?>
			<div id="customers_options">
				<fieldset class="adminform">
					<legend><?php echo JText::_( 'SPECIFIC_OPTIONS' );
?></legend>
					<table class="paramlist admintable table">
						<tr id="widget_status">
							<td class="key" >
								<?php echo JText::_( 'DISPLAYED_INFORMATION' ); 
?>
							</td>
							<td>
								<select name="data[widget][widget_params][customers]"
size=2>
									<option <?php
if(!isset($this->element->widget_params->customers) ||
$this->element->widget_params->customers=='last_customers')
echo "selected=\"selected\""; ?>
value="last_customers"><?php echo JText::_(
'LAST_CUSTOMER' );  ?></option>
									<option <?php
if(isset($this->element->widget_params->customers) &&
$this->element->widget_params->customers ==
'best_customers') echo
"selected=\"selected\""; ?>
value="best_customers"><?php echo JText::_(
'BEST_CUSTOMER' );  ?></option>
								</select>
							</td>
						</tr>
						<tr id="widget_status">
							<td class="key" >
								<?php echo JText::_( 'ORDERING' ); ?>
							</td>
							<td>
								<select
name="data[widget][widget_params][customers_order]" size=2>
									<option <?php
if(!isset($this->element->widget_params->customers_order) ||
$this->element->widget_params->customers_order ==
'sales') echo "selected=\"selected\""; ?>
value="sales"><?php echo JText::_( 'SALES' ); 
?></option>
									<option <?php
if(isset($this->element->widget_params->customers_order)
&&
$this->element->widget_params->customers_order=='orders')
echo "selected=\"selected\""; ?>
value="orders"><?php echo JText::_( 'ORDERS' ); 
?></option>
								</select>
							</td>
						</tr>
					</table>
				</fieldset>
			</div>
			<div id="partners_options">
				<fieldset class="adminform">
					<legend><?php echo JText::_( 'SPECIFIC_OPTIONS' );
?></legend>
					<table class="paramlist admintable table">
						<tr id="widget_status">
							<td class="key" >
								<?php echo JText::_( 'DISPLAYED_INFORMATION' ); 
?>
							</td>
							<td>
								<select name="data[widget][widget_params][partners]"
size=2>
									<option <?php
if(!isset($this->element->widget_params->partners) ||
$this->element->widget_params->partners=='last_customers')
echo "selected=\"selected\""; ?>
value="last_customers"><?php echo JText::_(
'LAST_PARTNER' );  ?></option>
									<option <?php
if(isset($this->element->widget_params->partners) &&
$this->element->widget_params->partners ==
'best_customers') echo
"selected=\"selected\""; ?>
value="best_customers"><?php echo JText::_(
'BEST_PARTNER' );  ?></option>
								</select>
							</td>
						</tr>
						<tr id="widget_status">
							<td class="key" >
								<?php echo JText::_( 'ORDERING' );  ?>
							</td>
							<td>
								<select
name="data[widget][widget_params][partners_order]" size=2>
									<option <?php
if(!isset($this->element->widget_params->partners_order) ||
$this->element->widget_params->partners_order ==
'sales') echo "selected=\"selected\""; ?>
value="sales"><?php echo JText::_( 'SALES' ); 
?></option>
									<option <?php
if(isset($this->element->widget_params->partners_order) &&
$this->element->widget_params->partners_order=='orders')
echo "selected=\"selected\""; ?>
value="orders"><?php echo JText::_( 'ORDERS' ); 
?></option>
								</select>
							</td>
						</tr>
					</table>
				</fieldset>
			</div>
			<div id='widget_compare'>
				<fieldset class="adminform">
					<legend><?php echo JText::_( 'COMPARE' );
?></legend>
					<table width:"100%" class="paramlist admintable
table">
						<tr>
							<td class="key" >
								<?php echo JText::_( 'COMPARE' );  ?>
							</td>
							<td>
								<span>
									<input <?php
if(empty($this->element->widget_params->compare_with) ||
$this->element->widget_params->compare_with == 'values')
echo 'checked="checked"'; ?>
onClick="updateCompare()" type="radio"
value="values"
name="data[widget][widget_params][compare_with]"
id="compare_with_values"/>
									<label  for="compare_with_values"><?php echo
JText::_( 'VALUES' ); ?>:</label>
									<span><input <?php
if(!empty($this->element->widget_params->compares['a.order_status']))
echo 'checked="checked"'; ?>
type="checkbox" value="a.order_status"
name="data[widget][widget_params][compares][a.order_status]"
id="compares_order_status"/><label
for="compares_order_status">Order
status</label></span>
									<span><input <?php
if(!empty($this->element->widget_params->compares['a.order_currency_id']))
echo 'checked="checked"'; ?>
type="checkbox" value="d.currency_name"
name="data[widget][widget_params][compares][a.order_currency_id]"
id="compares_order_currency_id"/><label
for="compares_order_currency_id">Currencies</label></span>
									<span><input <?php
if(!empty($this->element->widget_params->compares['a.order_payment_method']))
echo 'checked="checked"'; ?>
type="checkbox" value="a.order_payment_method"
name="data[widget][widget_params][compares][a.order_payment_method]"
id="compares_order_payment_method"/><label
for="compares_order_payment_method">Payment
Methods</label></span>
									<span><input <?php
if(!empty($this->element->widget_params->compares['a.order_shipping_method']))
echo 'checked="checked"'; ?>
type="checkbox" value="a.order_shipping_method"
name="data[widget][widget_params][compares][a.order_shipping_method]"
id="compares_order_shipping_method"/><label
for="compares_order_shipping_method">Shipping
Methods</label></span>
									<span><input <?php
if(!empty($this->element->widget_params->compares['a.order_discount_code']))
echo 'checked="checked"'; ?>
type="checkbox" value="a.order_discount_code"
name="data[widget][widget_params][compares][a.order_discount_code]"
id="compares_order_discount_code"/><label
for="compares_order_discount_code">Coupons</label></span>
									<span><input <?php
if(!empty($this->element->widget_params->compares['prod.order_product_name']))
echo 'checked="checked"'; ?>
type="checkbox" value="prod.order_product_name"
name="data[widget][widget_params][compares][prod.order_product_name]"
id="compares_products"/><label
for="compares_products">Products</label></span>
									<span><input <?php
if(!empty($this->element->widget_params->compares['c.category_id']))
echo 'checked="checked"'; ?>
type="checkbox" value="c.category_name"
name="data[widget][widget_params][compares][c.category_id]"
id="compares_categories"/><label
for="compares_categories">Categories</label></span>
											<?php  ?>
								</span>
								<br/>
								<span>
									<input <?php
if(empty($this->element->widget_params->compare_with) ||
$this->element->widget_params->compare_with ==
'periods') echo 'checked="checked"'; ?>
onClick="updateCompare()" type="radio"
value="periods"
name="data[widget][widget_params][compare_with]"
id="compare_with_period"/>
									<label  for="compare_with_period"><?php echo
JText::_( 'PERIOD' ); ?>:</label>
									<select
name="data[widget][widget_params][period_compare]"
id="compare_period">
												<option <?php
if(!isset($this->element->widget_params->period_compare) ||
$this->element->widget_params->period_compare=='none')
echo "selected=\"selected\""; ?>
value="none">None</option>
										<option <?php
if(isset($this->element->widget_params->period_compare) &&
$this->element->widget_params->period_compare ==
'last_period') echo "selected=\"selected\"";
?> value="last_period">Last Similare Period</option>
										<option <?php
if(isset($this->element->widget_params->period_compare) &&
$this->element->widget_params->period_compare ==
'last_year') echo "selected=\"selected\"";
?> value="last_year">Same period last year</option>
									</select>
								</span>
							</td>
						</tr>
					</table>
				</fieldset>
			</div>
			<div id="widget_specific_options">
			 	<fieldset class="adminform">
					<legend><?php echo JText::_( 'OPTIONS' );
?></legend>
					<table class="paramlist admintable table">
						<tr id="widget_limit">
							<td class="key">
								<?php echo JText::_( 'LIMIT' );?>
							</td>
							<td>
								<input type="texts"
name="data[widget][widget_params][limit]" value="<?php
echo $this->escape(@$this->element->widget_params->limit);
?>" onchange="if(this.value <0 || this.value > 50){
alert('Setting a negative value or a too high value for the limit
might might broke the dashboard.'); this.value=7;}" />
							</td>
						</tr>
						<tr id="widget_region">
							<td class="key">
								<?php echo JText::_( 'ZONE' );//only for map ?>
							</td>
							<td>
								<?php echo
$this->region->display('data[widget][widget_params][region]',@$this->element->widget_params->region);
?>
							</td>
						</tr>
						<?php if(hikashop_level(2)){ ?>
						<tr>
							<td class="key">
								<?php echo JText::_('ENCODING_FORMAT'); ?>
							</td>
							<td>
								<?php echo
$this->encoding->display("data[widget][widget_params][format]",@$this->element->widget_params->format);
?>
							</td>
						</tr>
						<?php }else{ ?>
						<tr>
							<td class="key">
								<?php echo JText::_('ENCODING_FORMAT'); ?>
							</td>
							<td>
								<?php echo hikashop_getUpgradeLink('business');;
?>
							</td>
						</tr>
						<?php } ?>
						<tr id="map_options">
							<td class="key">
								<?php echo JText::_( 'ORDERING' ); ?>
							</td>
							<td>
								<div class="controls">
									<fieldset class="radio btn-group">
										<input <?php
if(empty($this->element->widget_params->map_source) ||
$this->element->widget_params->map_source == 'shipping')
echo 'checked="checked"'; ?> type="radio"
value="shipping"
name="data[widget][widget_params][map_source]"
id="map_source_shipping"/><label
for="map_source_shipping"><?php echo JText::_(
'HIKASHOP_SHIPPING_ADDRESS' );  ?></label>
										<input <?php
if(!empty($this->element->widget_params->map_source) &&
$this->element->widget_params->map_source == 'billing')
echo 'checked="checked"'; ?> type="radio"
value="billing"
name="data[widget][widget_params][map_source]"
id="map_source_billing"/><label
for="map_source_billing"><?php echo JText::_(
'HIKASHOP_BILLING_ADDRESS' );  ?></label>
									</fieldset>
								</div>
							</td>
						</tr>
					</table>
				</fieldset>
			</div>
			<div id="products_options">
				<fieldset class="adminform">
					<legend><?php echo JText::_( 'SPECIFIC_OPTIONS' );
?></legend>
					<table class="paramlist admintable">
						<tr id='product_datas'>
							<td class="key">
								<?php echo JText::_( 'DISPLAYED_INFORMATION' );?>
							</td>
							<td>
								<div class="controls">
									<fieldset class="radio btn-group">
										<input <?php
if(empty($this->element->widget_params->product_data) ||
$this->element->widget_params->product_data == 'sales')
echo 'checked="checked"'; ?> type="radio"
value="sales"
name="data[widget][widget_params][product_data]"
id="data_sales"/><label
for="data_sales"><?php echo JText::_( 'SALES' ); 
?></label>
										<input <?php
if(!empty($this->element->widget_params->product_data) &&
$this->element->widget_params->product_data == 'orders')
echo 'checked="checked"'; ?> type="radio"
value="orders"
name="data[widget][widget_params][product_data]"
id="data_orders"/><label
for="data_orders"><?php echo JText::_( 'ORDERS'
);  ?></label>
										<span id="data_hits"><input <?php
if(!empty($this->element->widget_params->product_data) &&
$this->element->widget_params->product_data == 'clicks')
echo 'checked="checked"'; ?> type="radio"
value="clicks"
name="data[widget][widget_params][product_data]"
id="data_clicks"/><label
for="data_clicks"><?php echo JText::_( 'CLICKS'
);  ?></label></span>
									</fieldset>
								</div>
							</td>
						</tr>
						<tr>
							<td class="key">
								<?php echo JText::_( 'ORDERING' );?>
							</td>
							<td>
							<div class="controls">
										<fieldset class="radio btn-group">
								<input <?php
if(empty($this->element->widget_params->product_order_by) ||
$this->element->widget_params->product_order_by ==
'best') echo 'checked="checked"'; ?>
type="radio" value="best"
name="data[widget][widget_params][product_order_by]"
id="order_best"/><label
for="order_best"><?php echo JText::_( 'BEST' ); 
?></label>
												<input <?php
if(!empty($this->element->widget_params->product_order_by)
&& $this->element->widget_params->product_order_by ==
'worst') echo 'checked="checked"'; ?>
type="radio" value="worst"
name="data[widget][widget_params][product_order_by]"
id="order_worst"/><label
for="order_worst"><?php echo JText::_( 'WORST' );
 ?></label>
								</fieldset>
							</div>
							</td>
						</tr>
					</table>
				</fieldset>
			</div>
			<div id="orders_options">
				<fieldset class="adminform">
					<legend><?php echo JText::_( 'SPECIFIC_OPTIONS' );
?></legend>
					<table class="paramlist admintable table">
						<tr id="orders_order_by">
							<td class="key">
								<?php echo JText::_( 'ORDERING' ); ?>
							</td>
							<td>
							<div class="controls">
								<fieldset class="radio btn-group">
										<input <?php
if(empty($this->element->widget_params->orders_order_by) ||
$this->element->widget_params->orders_order_by ==
'last') echo 'checked="checked"'; ?>
type="radio" value="last"
name="data[widget][widget_params][orders_order_by]"
id="orders_order_last"/><label
for="orders_order_last"><?php echo JText::_(
'LAST' );  ?></label>
										<input <?php
if(!empty($this->element->widget_params->orders_order_by)
&& $this->element->widget_params->orders_order_by ==
'best') echo 'checked="checked"'; ?>
type="radio" value="best"
name="data[widget][widget_params][orders_order_by]"
id="orders_order_best"/><label
for="orders_order_best"><?php echo JText::_(
'BEST' );  ?></label>
								</fieldset>
							</div>
							</td>
						</tr>
						<tr id="orders_total_calculation">
							<td class="key">
								<?php echo JText::_( 'INCLUDE_SHIPPING' ); ?>
							</td>
							<td>
							<div class="controls">
								<fieldset class="radio btn-group">
									<input <?php
if(empty($this->element->widget_params->orders_total_calculation)
|| $this->element->widget_params->orders_total_calculation ==
'include_fees') echo 'checked="checked"';
?> type="radio" value="include_fees"
name="data[widget][widget_params][orders_total_calculation]"
id="include_fees"/><label
for="include_fees"><?php echo JText::_( 'YES' ); 
?></label>
									<input <?php
if(!empty($this->element->widget_params->orders_total_calculation)
&& $this->element->widget_params->orders_total_calculation
== 'exclude_fees') echo 'checked="checked"';
?> type="radio" value="exclude_fees"
name="data[widget][widget_params][orders_total_calculation]"
id="exclude_fees"/><label
for="exclude_fees"><?php echo JText::_( 'NO' ); 
?></label>
								</fieldset>
							</div>
							</td>
						</tr>
					</table>
				</fieldset>
			</div>
<?php if(!HIKASHOP_BACK_RESPONSIVE) { ?>
			</td>
		</tr>
	</table>
</div>
<?php } else { ?>
	</div>
</div>
<?php } ?>

	<div style="clear:both"
class="clr"></div>
	<?php if($this->dashboard){ 'ok';?>
	<input type="hidden" name="dashboard"
value="<?php echo "TRUE"; ?>"/>
	<?php } ?>
	<input type="hidden" name="cid[]"
value="<?php echo @$this->element->widget_id; ?>"
/>
	<input type="hidden" name="option"
value="<?php echo HIKASHOP_COMPONENT; ?>" />
	<input type="hidden" name="task" value=""
/>
	<input type="hidden" name="delete_row"
id="delete_row" value="-1" />
	<input type="hidden" name="ctrl"
value="report" />
	<?php echo JHTML::_( 'form.token' ); ?>
</form>
<div id="chart" ></div>
<br style="clear:both" />
report/tmpl/index.html000064400000000032151162050370011023
0ustar00<html><body></body></html>report/tmpl/listing.php000064400000011564151162050370011224
0ustar00<?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');
?><div class="iframedoc"
id="iframedoc"></div>
<form action="index.php?option=<?php echo HIKASHOP_COMPONENT
?>&amp;ctrl=report" method="post" 
name="adminForm" id="adminForm">
	<table>
		<tr>
			<td width="100%">
				<?php echo JText::_( 'FILTER' ); ?>:
				<input type="text" name="search"
id="search" value="<?php echo
$this->escape($this->pageInfo->search);?>"
class="text_area" />
				<button class="btn"
onclick="this.form.submit();"><?php echo JText::_(
'GO' ); ?></button>
				<button class="btn"
onclick="document.getElementById('search').value='';this.form.submit();"><?php
echo JText::_( 'RESET' ); ?></button>
			</td>
		</tr>
	</table>
	<table class="adminlist table table-striped table-hover"
cellpadding="1">
		<thead>
			<tr>
				<th class="title titlenum">
					<?php echo JText::_( 'HIKA_NUM' );?>
				</th>
				<th class="title titlebox">
					<input type="checkbox" name="toggle"
value="" onclick="hikashop.checkAll(this);" />
				</th>
				<th class="title">
					<?php echo JHTML::_('grid.sort',
JText::_('HIKA_TITLE'), 'a.widget_name',
$this->pageInfo->filter->order->dir,$this->pageInfo->filter->order->value
); ?>
				</th>
				<?php  ?>
				<th class="title titleorder">
				<?php echo JHTML::_('grid.sort',    JText::_(
'HIKA_ORDER' ),
'a.widget_ordering',$this->pageInfo->filter->order->dir,
$this->pageInfo->filter->order->value ); ?>
					<?php if ($this->order->ordering) echo
JHTML::_('grid.order',  $this->rows ); ?>
				</th>
				<th class="title titletoggle">
					<?php echo JHTML::_('grid.sort',  
JText::_('HIKA_PUBLISHED'), 'a.widget_published',
$this->pageInfo->filter->order->dir,
$this->pageInfo->filter->order->value ); ?>
				</th>
				<th class="title">
					<?php echo JHTML::_('grid.sort',   JText::_(
'ID' ), 'a.widget_id',
$this->pageInfo->filter->order->dir,
$this->pageInfo->filter->order->value ); ?>
				</th>
			</tr>
		</thead>
		<tfoot>
			<tr>
				<td colspan="8">
					<?php echo $this->pagination->getListFooter(); ?>
					<?php echo $this->pagination->getResultsCounter(); ?>
				</td>
			</tr>
		</tfoot>
		<tbody>
			<?php
				$k = 0;
				$a = count($this->rows);
				if($a){
					for($i = 0;$i<$a;$i++){
						$row =& $this->rows[$i];
						$publishedid = 'widget_published-'.$row->widget_id;
				?>
					<tr class="<?php echo "row$k"; ?>">
						<td align="center">
						<?php echo $this->pagination->getRowOffset($i); ?>
						</td>
						<td align="center">
							<?php echo JHTML::_('grid.id', $i, $row->widget_id
); ?>
						</td>
						<td>
							<?php if($this->viewAccess){ ?>
								<a href="<?php echo
hikashop_completeLink('report&task=edit&cid[]='.$row->widget_id);
?>">
							<?php } ?>
									<?php echo $row->widget_name; ?>
							<?php if($this->viewAccess){ ?>
								</a>
							<?php } ?>
						</td>

						<td class="order">
							<?php if($this->manage){ ?>
								<span><?php echo $this->pagination->orderUpIcon( $i,
$this->order->reverse XOR ( $row->widget_ordering >=
@$this->rows[$i-1]->widget_ordering ), $this->order->orderUp,
'Move Up',$this->order->ordering ); ?></span>
								<span><?php echo $this->pagination->orderDownIcon(
$i, $a, $this->order->reverse XOR ( $row->widget_ordering <=
@$this->rows[$i+1]->widget_ordering ), $this->order->orderDown,
'Move Down' ,$this->order->ordering); ?></span>
								<input type="text" name="order[]"
size="5" <?php if(!$this->order->ordering) echo
'disabled="disabled"'?> value="<?php echo
report/tmpl/index.html000064400000000032151162050370011023
0ustar00alue="<?php echo
JRequest:report/tmpl/listing.php000064400000011564151162050370011224
0ustar00report/tmpl/index.html000064400000000032151162050370011023
0ustar00getElementById('widget_accreport/tmpl/listing.php000064400000011564151162050370011224
0ustar00&amp;ctrl=product" method="post"
name="adminForm" id="adminForm">
	<table width="100%" >
		<tr>
				<td width="50%" valign="top">
					<fieldset class="adminform">
							<legend><?php echo JText::_('CURRENT_REPORT');
?></legend>
							<table class="paramlist admintable table">
								<tr>
										<td class="key">
											<label for="data[widget][widget_params][table][<?php
echo $this->row->row_id; ?>][row_name]">
													<?php echo JText::_( 'HIKA_NAME' ); ?>
											</label>
									</td>
									<td>
										<input type="text"
name="data[widget][widget_params][table][<?php echo
$this->row->row_id; ?>][row_name]" id="row_name"
class="inputbox" size="40" value="<?php echo
$this->escape(@$this->row->row_name); ?>" />
									</td>
								</tr>
							<tr id="widget_period">
									<td class="key"><?php echo
JText::_('PERIOD'); ?></td>
								<td>
									<input <?php
if(empty($this->row->widget_params->periodType) ||
$this->row->widget_params->periodType ==
'proposedPeriod') echo 'checked="checked"';
?> type="radio" value="proposedPeriod"
name="data[widget][widget_params][table][<?php echo
$this->row->row_id; ?>][widget_params][periodType]"
id="display_proposed_period"/>
										<?php echo
$this->periodType->display('data[widget][widget_params][table]['.$this->row->row_id.'][widget_params][proposedPeriod]',@$this->row->widget_params->proposedPeriod);
?>
											</label><br/>
											<input <?php
if(!empty($this->row->widget_params->periodType) &&
$this->row->widget_params->periodType ==
'specificPeriod') echo 'checked="checked"';
?> type="radio" value="specificPeriod"
name="data[widget][widget_params][table][<?php echo
$this->row->row_id; ?>][widget_params][periodType]"
id="display_specific_period"/><label
for="display_specific_period">
										<?php echo JText::_('START_DATE').' ';
echo JHTML::_('calendar',
hikashop_getDate((@$this->row->widget_params->start?@$this->row->widget_params->start:''),'%Y-%m-%d
%H:%M'),
'data[widget][widget_params][table]['.$this->row->row_id.'][widget_params][start]','period_start','%Y-%m-%d
%H:%M',array('size'=>'20')); ?>
										<?php echo JText::_('END_DATE').' '; echo
JHTML::_('calendar',
hikashop_getDate((@$this->row->widget_params->end?@$this->row->widget_params->end:''),'%Y-%m-%d
%H:%M'),
'data[widget][widget_params][table]['.$this->row->row_id.'][widget_params][end]','period_end','%Y-%m-%d
%H:%M',array('size'=>'20')); ?>
										<br/><?php echo JText::_('PERIOD').'
'; echo
$this->delay->display('data[widget][widget_params][table]['.$this->row->row_id.'][widget_params][period]',(int)@$this->row->widget_params->period,3);
?>
								</td>
							</tr>
					</table>
					</fieldset>
	 		</td>
		</tr>
		<tr id="widget_type">
				<td colspan=2>
					<fieldset class="adminform">
							<legend><?php echo JText::_('HIKA_TYPE');
?></legend>
							<table class="paramlist admintable table">
								<tr>
									<td>
										<div class="controls">
											<fieldset class="radio btn-group">
												<input <?php
if(empty($this->row->widget_params->content) ||
$this->row->widget_params->content == 'orders') echo
'checked="checked"'; ?>
onchange="updateDisplay();" type="radio"
value="orders"
name="data[widget][widget_params][table][<?php echo
$this->row->row_id; ?>][widget_params][content]"
id="type_orders"/><label
for="type_orders"><?php echo JText::_( 'ORDERS'
);  ?>report/tmpl/tableform.php000064400000060042151162050370011521
0ustar00 echo $this->row->row_id;
?>][widget_params][content]"
id="type_taxes"/><label
for="type_taxes"><?php echo JText::_( 'TAXES' ); 
?></label>
												<input <?php
if(!empty($this->row->widget_params->content) &&
$this->row->widget_params->content == 'customers') echo
'checked="checked"'; ?>
onchange="updateDisplay();" type="radio"
value="customers"
name="data[widget][widget_params][table][<?php echo
$this->row->row_id; ?>][widget_params][content]"
id="type_customers"/><label
for="type_customers"><?php echo JText::_(
'CUSTOMERS' );  ?></label>
												<input <?php
if(!empty($this->row->widget_params->content) &&
$this->row->widget_params->content == 'partners') echo
'checked="checked"'; ?>
onchange="updateDisplay();" type="radio"
value="partners"
name="data[widget][widget_params][table][<?php echo
$this->row->row_id; ?>][widget_params][content]"
id="type_partners"/report/tmpl/tableform.php000064400000060042151162050370011521
0ustar00" value="worst"
name="data[widget][widget_params][table][<?php echo
$this->row->row_id; ?>][widget_params][content]"
id="type_worst"/><label
for="type_worst"><?php echo JText::_( 'WORST' ); 
?></label>
												<?php ?>
											</fieldset>
										</div>
									</td>
								</tr>
							</table>
					</fieldset>
				</td>
		</tr>
		<tr>
			<td width="50%" valign="top" rowspan=2>
					<fieldset id='sales_options'
class="adminform">
						<legend><?php echo JText::_( 'OPTIONS' );
?></legend>
						<table class="paramlist admintable"
width="100%">
							<tr id="tax_include">
								<td class="key" >
									<?php echo JText::_( 'WITH_TAX' );  ?>
								</td>
								<td>
									<?php echo JHTML::_('hikaselect.booleanlist',
'data[widget][widget_params][table]['.$this->row->row_id.'][widget_params][with_tax]'
, '',@$this->row->widget_params->with_tax); ?>
								</td>
							</tr>
						</table>
					</fieldset>

					<fieldset id='filters' class="adminform">
						<legend><?php echo JText::_( 'FILTERS' );
?></legend>
						<table class="paramlist admintable table"
width="100%">
							<tr id="widget_status">
						<td class="key" >
							<?php echo JText::_( 'ORDER_STATUS' );  ?>
						</td>
						<td>
							<?php echo
$this->status->display('data[widget][widget_params][table]['.$this->row->row_id.'][widget_params][filters][a.order_status][]',@$this->row->widget_params->filters['a.order_status'],'
multiple="multiple" size="5"',false); ?>
						</td>
					</tr>
								<tr id="widget_currencies">
								<td class="key">
										<label for="data[widget][widget_params][table][<?php
echo $this->row->row_id;
?>][widget_params][filters][a.order_currency_id]">
												<?php echo JText::_( 'CURRENCIES' ); ?>
											</label>
									</td>
									<td>
												<?php 	$currency=hikashop_get('type.currency');
												
$currencyList=$currency->display("data[widget][widget_params][table][".$this->row->row_id."][widget_params][filters][a.order_currency_id][]",
@$this->row->widget_params->filters['a.order_currency_id'],
'multiple="multiple" size="4"');
											 echo $currencyList;
											?>
									</td>
								</tr>
								<tr>
						<td class="key">
							<label>
								<?php echo JText::_( 'HIKASHOP_SHIPPING_METHOD' );
?>
							</label>
						</td>
						<td>
							<?php if(!empty($this->shipping)){
								echo
$this->shipping->display('data[widget][widget_params][table]['.$this->row->row_id.'][widget_params][shipping][]',$this->row->widget_params->shipping,
'multiple', true, 'multiple="multiple"
size="5"');
						}?>
						</td>
					</tr>
					<tr>
						<td class="key">
							<label>
								<?php echo JText::_( 'HIKASHOP_PAYMENT_METHOD' );
?>
							</label>
						</td>
						<td>
							<?php echo
$this->paymentMethods->display('data[widget][widget_params][table]['.$this->row->row_id.'][widget_params][payment][]',$this->row->widget_params->payment_type,@$this->row->widget_params->payment_id,
true, 'multiple="multiple" size="5"'); ?>
						</td>
					</tr>
									<tr>
									<td class="key">
												<?php echo JText::_( 'HIKA_CATEGORIES' ); ?>
									</td>
									<td>
												<div style="text-align:right;">
													<a class="modal" rel="{handler:
'iframe', size: {x: 760, y: 380}}" href="<?php echo
hikashop_completeLink("product&task=selectcategory",true );
?>">
															<button class="btn" type="button"
onclick="return false">
																<img src="<?php echo HIKASHOP_IMAGES;
?>add.png"/><?php echo JText::_('ADD');?>
															</button>
													</a>
											</div>
											<br/>
											<table class="adminlist table table-striped
table-hover" cellpadding="1" width="100%">
												<thead>
														<tr>
																<th class="title">
																		<?php echo JText::_('HIKA_NAME'); ?>
																</th>
																<th class="title">
																		<?php echo JText::_('HIKA_DELETE'); ?>
																</th>
																<th class="title">
																		<?php echo JText::_('ID'); ?>
																</th>
															</tr>
													</thead>
												<tbody id="category_listing">
													<?php
													if(!empty($this->row->widget_params->categories)
&&
$this->row->widget_params->categories!='all'){
								$k = 0;
								for($i = 0,$a =
count($this->row->widget_params->categories)+1;$i<$a-1;$i++){

									$row =& $this->row->widget_params->categories[$i];
									if(!empty($row->category_id)){
									?>
										<tr id="category_<?php echo
$row->category_id;?>">
											<td>
												<div id="category_<?php echo $row->category_id;
?>_id">
												<a href="<?php echo
hikashop_completeLink('category&task=edit&cid='.$row->category_id);
?>"><?php echo $row->category_name; ?></a>
											</td>
											<td align="center">
												<a href="#" onclick="return
deleteRow('category_div_<?php echo
$row->category_id;?>','category[<?php echo
$row->category_id;?>]','category_<?php echo
$row->category_id; ?>');">
													<img
src="../media/com_hikashop/images/delete.png"/>
												</a>
											</td>
											<td width="1%" align="center">
												<?php echo $row->category_id; ?>
												<div id="category_div_<?php echo
$row->category_id;?>">
													<input style="width: 50px;
background-color:#e8f9db;" type	="hidden"
name="category[<?php echo $row->category_id;?>]"
id="category[<?php echo $row->category_id;?>]"
value="<?php echo $row->category_id;?>"/>
												</div>
											</td>
										</tr>
										<?php
										}
									$k = 1-$k;
									}
								}
													?>
											</tbody>
										</table>
								</td>
						</tr>
							<tr>
								<td class="key">
										<label for="data[widget][widget_params][table][<?php
echo $this->row->row_id;
?>][widget_params][category_childs]">
											<?php echo JText::_( 'INCLUDING_SUB_CATEGORIES' );
?>
										</label>
								</td>
								<td>
										<?php echo JHTML::_('hikaselect.booleanlist',
"data[widget][widget_params][table][".$this->row->row_id."][widget_params][category_childs]"
, '',@$this->row->widget_params->category_childs	);
?>
								</td>
							</tr>
							<tr>
								<td class="key">
										<?php echo JText::_( 'PRODUCTS' ); ?>
									</td>
									<td>
											<div style="float:right">
												<a class="modal" rel="{handler:
'iframe', size: {x: 760, y: 380}}" href="<?php echo
hikashop_completeLink("product&task=selectrelated&select_type=widget",true
); ?>">
														<button class="btn" type="button"
onclick="return false">
															 <img src="<?php echo HIKASHOP_IMAGES;
?>add.png"/><?php echo JText::_('ADD');?>
														</button>
												</a>
											</div>
										 <br/>
											<table class="adminlist table table-striped
table-hover" cellpadding="1">
												<thead>
														<tr>
															<th class="title">
																	<?php echo JText::_('HIKA_NAME'); ?>
															</th>
															<th class="title">
																	<?php echo JText::_('HIKA_DELETE'); ?>
															</th>
															<th class="title">
																	<?php echo JText::_( 'ID' ); ?>
															</th>
														</tr>
												</thead>
												<tbody id="widget_listing">
														<?php
														$type='widget';
														if(!empty($this->row->widget_params->products)){
																$k = 0;
																foreach($this->row->widget_params->products as
$product){
																	$row =$product;
																	$id = rand();
																?>
																	<tr class="<?php echo "row$k";
?>" id="<?php echo
$type.'_'.$row->product_id.'_'.$id;?>">
																		<td>
																				<a href="<?php echo
hikashop_completeLink('product&task=edit&cid='.$row->product_id);
?>"><?php echo $row->product_name; ?></a>
																		</td>
																		<td align="center">
																				<a href="#" onclick="return
deleteRow('<?php echo
$type.'_div_'.$row->product_id.'_'.$id;?>','<?php
echo $type;?>[<?php echo $row->product_id;?>][<?php echo
$id;?>]','<?php echo
$type.'_'.$row->product_id.'_'.$id;?>');"><img
src="<?php echo HIKASHOP_IMAGES;
?>delete.png"/></a>
																		</td>
																		<td width="1%" align="center">
																				<?php echo $row->product_id; ?>
																				<div id="<?php echo
$type.'_div_'.$row->product_id.'_'.$id;?>">
																					<input type="hidden" name="<?php
echo $type;?>[<?php echo $row->product_id;?>]"
id="<?php echo $type;?>[<?php echo
$row->product_id;?>][<?php echo $id;?>]"
value="<?php echo $row->product_id;?>"/>
																				</div>
																		</td>
																	</tr>
																<?php
																	$k = 1-$k;
																}
														}
														?>
												</tbody>
										</table>
								 </td>
					 </tr>
					 <tr>
								<td class="key">
										<?php echo JText::_( 'COUPONS' ); ?>
								</td>
								<td>
										<div style="text-align:right;">
												<a class="modal" rel="{handler:
'iframe', size: {x: 760, y: 380}}" href="<?php echo
hikashop_completeLink("discount&task=select_coupon",true );
?>">
														<button class="btn" type="button"
onclick="return false">
															<img src="<?php echo HIKASHOP_IMAGES;
?>add.png"/><?php echo JText::_('ADD');?>
														</button>
												</a>
										</div>
										<br/>
										<table class="adminlist table table-striped
table-hover" cellpadding="1" width="100%">
											<thead>
													<tr>
														<th class="title">
																<?php echo JText::_('HIKA_NAME'); ?>
														</th>
														<th class="title">
																<?php echo JText::_('HIKA_DELETE'); ?>
														</th>
														<th class="title">
																<?php echo JText::_('ID'); ?>
														</th>
													</tr>
											</thead>
											<tbody id="coupon_listing">
													<?php
													if(!empty($this->row->widget_params->coupons)
&& $this->row->widget_params->coupons!='all'){
								$k = 0;
								for($i = 0,$a =
count($this->row->widget_params->coupons)+1;$i<$a-1;$i++){
									$row =& $this->row->widget_params->coupons[$i];
									if(!empty($row->discount_id)){
									?>
										<tr id="row_coupon_<?php echo
$row->discount_id;?>">
											<td>
												<div id="row_coupon_<?php echo $row->discount_id;
?>_id">
												<a href="<?php echo
hikashop_completeLink('discount&task=edit&cid='.$row->discount_id);
?>"><?php echo $row->discount_code; ?></a>
											</td>
											<td align="center">
												<a href="#" onclick="return
deleteRow('row_coupon_div_<?php echo
$row->discount_id;?>','row_coupon[<?php echo
$row->discount_id;?>]','row_coupon_<?php echo
$row->discount_id; ?>');">
													<img
src="../media/com_hikashop/images/delete.png"/>
												</a>
											</td>
											<td width="1%" align="center">
												<?php echo $row->discount_id; ?>
												<div id="coupon_div_<?php echo
$row->discount_id;?>">
													<input style="width: 50px;
background-color:#e8f9db;" type	="hidden"
name="row_coupon[<?php echo $row->discount_id;?>]"
id="row_coupon[<?php echo $row->discount_id;?>]"
value="<?php echo $row->discount_id;?>"/>
												</div>
											</td>
										</tr>
										<?php
										}
									$k = 1-$k;
									}
								}
												?>
											</tbody>
										</table>
								</td>
						</tr>
			</table>
		</fieldset>
		<fieldset id='customers_options'
class="adminform">
			<legend><?php echo JText::_( 'OPTIONS' );
?></legend>
			<table class="paramlist admintable table"
width="100%">
						<tr id="widget_status">
					<td class="key" >
						<?php echo JText::_( 'DISPLAYED_INFORMATION' );  ?>
					</td>
					<td>
								<select name="data[widget][widget_params][table][<?php
echo $this->row->row_id; ?>][widget_params][customers]"
size=3>
									<option <?php
if(!isset($this->row->widget_params->customers) ||
$this->row->widget_params->customers=='last_customer')
echo "selected=\"selected\""; ?>
value="last_customer"><?php echo JText::_(
'LAST_CUSTOMER' );  ?></option>
							<option <?php
if(isset($this->row->widget_params->customers) &&
$this->row->widget_params->customers == 'best_customer')
echo "selected=\"selected\""; ?>
value="best_customer"><?php echo JText::_(
'BEST_CUSTOMER' );  ?></option>
							<option <?php
if(isset($this->row->widget_params->customers) &&
$this->row->widget_params->customers ==
'total_customers') echo
"selected=\"selected\""; ?>
value="total_customers"><?php echo JText::_(
'TOTAL_CUSTOMERS' );  ?></option>
						</select>
					</td>
				</tr>
			</table>
		</fieldset>
		<fieldset id='partners_options'
class="adminform">
			<legend><?php echo JText::_( 'OPTIONS' );
?></legend>
			<table class="paramlist admintable table"
width="100%">
						<tr id="widget_status">
					<td class="key" >
						<?php echo JText::_( 'DISPLAYED_INFORMATION' );  ?>
					</td>
					<td>
								<select name="data[widget][widget_params][table][<?php
echo $this->row->row_id; ?>][widget_params][partners]"
size=3>
									<option <?php
if(!isset($this->row->widget_params->partners) ||
$this->row->widget_params->partners=='last_partners')
echo "selected=\"selected\""; ?>
value="last_partners"><?php echo JText::_(
'LAST_PARTNER' );  ?></option>
							<option <?php
if(isset($this->row->widget_params->partners) &&
$this->row->widget_params->partners == 'best_partners')
echo "selected=\"selected\""; ?>
value="best_partners"><?php echo JText::_(
'BEST_PARTNER' );  ?></option>
							<option <?php
if(isset($this->row->widget_params->partners) &&
$this->row->widget_params->partners == 'total_partners')
echo "selected=\"selected\""; ?>
value="total_partners"><?php echo JText::_(
'TOTAL_PARTNERS' );  ?></option>
						</select>
					</td>
				</tr>
			</table>
		</fieldset>
		<fieldset id='best_options'>
			<legend><?php echo JText::_( 'OPTIONS' );
?></legend>
			<table class="paramlist admintable"
width="100%">
						<tr id="widget_status">
					<td class="key" >
						<?php echo JText::_( 'APPLY_ON' );  ?>
					</td>
					<td>
								<select name="data[widget][widget_params][table][<?php
echo $this->row->row_id; ?>][widget_params][apply_on]"
size=4>
									<option <?php
if(!isset($this->row->widget_params->apply_on) ||
$this->row->widget_params->apply_on=='product') echo
"selected=\"selected\""; ?>
value="product"><?php echo JText::_( 'PRODUCT' );
 ?></option>
							<option <?php
if(isset($this->row->widget_params->apply_on) &&
$this->row->widget_params->apply_on == 'category') echo
"selected=\"selected\""; ?>
value="category"><?php echo JText::_( 'CATEGORY'
);  ?></option>
							<option <?php
if(isset($this->row->widget_params->apply_on) &&
$this->row->widget_params->apply_on ==
'shipping_method') echo
"selected=\"selected\""; ?>
id="best_worst_shipping"
value="shipping_method"><?php echo JText::_(
'HIKASHOP_SHIPPING_METHOD' );  ?></option>
							<option <?php
if(isset($this->row->widget_params->apply_on) &&
$this->row->widget_params->apply_on == 'payment_method')
echo "selected=\"selected\""; ?>
id="best_worst_payment"
value="payment_method"><?php echo JText::_(
'HIKASHOP_PAYMENT_METHOD' );  ?></option>
							<option <?php
if(isset($this->row->widget_params->apply_on) &&
$this->row->widget_params->apply_on == 'currency') echo
"selected=\"selected\""; ?>
id="best_worst_currency" value="currency"><?php
echo JText::_( 'CURRENCY' );  ?></option>
							<option <?php
if(isset($this->row->widget_params->apply_on) &&
$this->row->widget_params->apply_on == 'discount') echo
"selected=\"selected\""; ?>
value="discount"><?php echo JText::_( 'DISCOUNT'
);  ?></option>
							<option <?php
if(isset($this->row->widget_params->apply_on) &&
$this->row->widget_params->apply_on == 'country') echo
"selected=\"selected\""; ?>
id="best_worst_country" value="country"><?php
echo JText::_( 'COUNTRY' );  ?></option>
						</select>
					</td>
				</tr>
			</table>
		</fieldset>
	</table>
	<input type="hidden" name="option"
value="<?php echo HIKASHOP_COMPONENT; ?>" />
	<input type="hidden" id="name"
name="data[widget][widget_name]" value="" />
	<input type="hidden" id="name"
name="data[widget][widget_params][table][<?php echo
$this->row->row_id; ?>][widget_params][display]"
value="table" />
	<input type="hidden" id="published"
name="data[widget][widget_published]" value="" />
	<input type="hidden" id="access"
name="data[widget][widget_access]" value="" />
	<input type="hidden" name="data[edit_row]"
value="1" />
	<input type="hidden" name="data[widget][widget_id]"
value="<?php echo (int)@$this->element->widget_id;
?>" />
	<input type="hidden" name="cid[]"
value="<?php echo @$this->element->widget_id; ?>"
/>
	<input type="hidden" name="task" value=""
/>
	<input type="hidden" name="tmpl"
value="component" />
	<input type="hidden" name="ctrl"
value="<?php echo JRequest::getVar('ctrl');?>"
/>

	<?php echo JHTML::_( 'form.token' );?>
</form>
report/view.html.php000064400000050716151162050370010516 0ustar00<?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 reportViewReport extends hikashopView {
	var $ctrl= 'report';
	var $nameListing = 'HIKASHOP_REPORTS';
	var $nameForm = 'HIKASHOP_REPORT';
	var $icon = 'report';

	var $charttype = 'ColumnChart';
	var $interval = 'month';

	function display($tpl = null){

		if (!HIKASHOP_PHP5) {
			$doc =& JFactory::getDocument();
		}else{
			$doc = JFactory::getDocument();
		}
		$this->paramBase =
HIKASHOP_COMPONENT.'.'.$this->getName();
		$doc->addScript(((empty($_SERVER['HTTPS']) OR
strtolower($_SERVER['HTTPS']) != "on" ) ?
'http://' :
'https://')."www.google.com/jsapi");

		$function = $this->getLayout();
		if(method_exists($this,$function)) $this->$function();


		parent::display($tpl);
	}

	function listing(){
		$app = JFactory::getApplication();
		$pageInfo = new stdClass();
		$pageInfo->filter = new stdClass();
		$pageInfo->filter->order = new stdClass();
		$pageInfo->limit = new stdClass();
		$pageInfo->search = $app->getUserStateFromRequest(
$this->paramBase.".search", 'search', '',
'string' );
		$pageInfo->filter->order->value =
$app->getUserStateFromRequest(
$this->paramBase.".filter_order",
'filter_order',	'a.widget_ordering','cmd' );
		$pageInfo->filter->order->dir	=
$app->getUserStateFromRequest(
$this->paramBase.".filter_order_Dir",
'filter_order_Dir',	'desc',	'word' );
		$pageInfo->limit->value = $app->getUserStateFromRequest(
$this->paramBase.'.list_limit', 'limit',
$app->getCfg('list_limit'), 'int' );
		$pageInfo->limit->start = $app->getUserStateFromRequest(
$this->paramBase.'.limitstart', 'limitstart', 0,
'int' );
		$database	= JFactory::getDBO();

		$filters = array();
		$searchMap = array('a.widget_id','a.widget_name');

		if(!empty($pageInfo->search)){
		$searchVal =
'\'%'.hikashop_getEscaped(JString::strtolower(
$pageInfo->search ),true).'%\'';
			$filters[] =  implode(" LIKE $searchVal OR
",$searchMap)." LIKE $searchVal";
		}
		$order = '';
		if(!empty($pageInfo->filter->order->value)){
			$order = ' ORDER BY
'.$pageInfo->filter->order->value.'
'.$pageInfo->filter->order->dir;
		}
		hikashop_addACLFilters($filters,'widget_access','a');
		if(!empty($filters)){
			$filters = ' WHERE ('. implode(') AND
(',$filters).')';
		}else{
			$filters = '';
		}
		$query = ' FROM '.hikashop_table('widget').' AS
a '.$filters.$order;
		$database->setQuery('SELECT
a.*'.$query,(int)$pageInfo->limit->start,(int)$pageInfo->limit->value);
		$rows = $database->loadObjectList();
		if(!empty($pageInfo->search)){
			$rows =
hikashop_search($pageInfo->search,$rows,'widget_id');
		}
		$database->setQuery('SELECT COUNT(*)'.$query);
		$pageInfo->elements = new stdClass();
		$pageInfo->elements->total = $database->loadResult();
		$pageInfo->elements->page = count($rows);

		$toggleClass = hikashop_get('helper.toggle');
		$this->assignRef('toggleClass',$toggleClass);
		$this->assignRef('rows',$rows);
		$this->assignRef('pageInfo',$pageInfo);
		$order = new stdClass();
		$order->ordering = true;
		$order->orderUp = 'orderup';
		$order->orderDown = 'orderdown';
		$order->reverse = false;
		if($pageInfo->filter->order->value ==
'a.widget_ordering'){
			if($pageInfo->filter->order->dir == 'desc'){
				$order->orderUp = 'orderdown';
				$order->orderDown = 'orderup';
				$order->reverse = true;
			}
		}
		$this->assignRef('order',$order);
		hikashop_setTitle(JText::_($this->nameListing),$this->icon,$this->ctrl);
		$this->getPagination();

		$config =& hikashop_config();
		$manage =
hikashop_isAllowed($config->get('acl_report_manage','all'));
		$this->assignRef('manage',$manage);
		$viewAccess =
hikashop_isAllowed($config->get('acl_report_view','all'));
		$this->assignRef('viewAccess',$viewAccess);
		$this->toolbar = array(
			array('name'=>'addNew','display'=>$manage),
			array('name'=>'editList','display'=>$viewAccess),
			array('name'=>'deleteList','display'=>hikashop_isAllowed($config->get('acl_report_delete','all'))),
			'|',
			array('name' => 'pophelp', 'target'
=> $this->ctrl.'-listing'),
			'dashboard'
		);
	}

	function form(){
		$dashboard=false;
		$config =& hikashop_config();
		$widget_id = hikashop_getCID('widget_id');
		$class = hikashop_get('class.widget');
		$db = JFactory::getDBO();
		if(!empty($widget_id)){
			$element = $class->get($widget_id);
			$task='edit';
		}else{
report/view.html.php000064400000050716151162050370010516
0ustar00splay!='table'){
			if($element->widget_params->display!='listing'
&& ($element->widget_params->content=='products' ||
$element->widget_params->content=='categories' ||
$element->widget_params->content=='discount')){
			$element->widget_params->content='orders';
			}
		}

		hikashop_setTitle(JText::_($this->nameForm),$this->icon,$this->ctrl.'&task='.$task.'&widget_id='.$widget_id);


		$this->toolbar = array(
			array(
				'name' => 'link',
				'icon'=>'archive',
				'alt'=>JText::_('HIKA_EXPORT'),
				'url'=>
hikashop_completreport/view.html.php000064400000050716151162050370010516
0ustar00lang_display','tabs');
			if($multilang_display=='popups') $multilang_display =
'tabs';
			$tabs = hikashop_get('helper.tabs');
			$this->assignRef('tabs',$tabs);
			$this->assignRef('transHelper',$transHelper);

		}
		$toggle=hikashop_get('helper.toggle');
		$this->assignRef('toggle',$toggle);
		$this->assignRef('translation',$translation);
		$currencyClass = hikashop_get('class.currency');
		$this->assignRef('currencyHelper',$currencyClass);
		$periodType = hikashop_get('type.period');
		$this->assignRef('periodType',$periodType);
		$widget_dataType = hikashop_get('type.widget_data');
		$this->assignRef('widget_dataType',$widget_dataType);
		$status = hikashop_get('type.categorysub');
		$status->type='status';
		$this->assignRef('status',$status);
		$delay = hikashop_get('type.delay');
		$this->assignRef('delay',$delay);
		$region = hikashop_get('type.region');
		$this->assignRef('region',$region);
		if(hikashop_level(2)){
			$encoding = hikashop_get('type.charset');
			$this->assignRef('encoding',$encoding);
		}
		$widgetClass = hikashop_get('class.widget');
		$this->assignRef('widgetClass',$widgetClass);
		$dateGroup = hikashop_get('type.dategroup');
		$this->assignRef('dateGroup',$dateGroup);
		$dateType = hikashop_get('type.datetype');
		$this->assignRef('dateType',$dateType);
		$shippingMethods = hikashop_get('type.plugins');
	$shippingMethods->type='shipping';
	$shippingMethods->manualOnly=true;
	$this->assignRef('shippingMethods',$shippingMethods);
	$paymentMethods = hikashop_get('type.plugins');
	$paymentMethods->type='payment';
	$paymentMethods->manualOnly=true;
	$this->assignRef('paymentMethods',$paymentMethods);
	$dashboard = JRequest::getVar( 'dashboard');
	$this->assignRef('dashboard',$dashboard);

		JHTML::_('behavior.modal');

		$script = "
	function deleteRow(divName,inputName,rowName){
		var d = document.getElementById(divName);
		var olddiv = document.getElementById(inputName);
		if(d && olddiv){
			d.removeChild(olddiv);
			document.getElementById(rowName).style.display='none';
		}
		return false;
	}

	function updatePeriodSelection(){
		selectedPeriod =
document.getElementById('display_proposed_period').checked;
		document.getElementById('period_start').disabled=false;
		document.getElementById('period_end').disabled=false;
		document.getElementById('delayvalue1').disabled=false;
		document.getElementById('delaytype1').disabled=false;
		document.getElementById('datawidgetwidget_paramsproposedPeriod').disabled=false;
		if(selectedPeriod==true){
			document.getElementById('period_start').disabled=true;
			document.getElementById('period_end').disabled=true;
			document.getElementById('delayvalue1').disabled=true;
			document.getElementById('delaytype1').disabled=true;
		}else{
			document.getElementById('datawidgetwidget_paramsproposedPeriod').disabled=true;
		}
	}

	function updateCompare(){
		selectedCompare =
document.getElementById('compare_with_values').checked;
		document.getElementById('compares_order_status').disabled=false;
		document.getElementById('compares_order_currency_id').disabled=false;
		document.getElementById('compares_order_payment_method').disabled=false;
		document.getElementById('compares_order_shipping_method').disabled=false;
		document.getElementById('compares_order_discount_code').disabled=false;
		document.getElementById('compares_products').disabled=false;
		document.getElementById('compares_categories').disabled=false;
		document.getElementById('compare_period').disabled=false;
		if(selectedCompare==true){
			document.getElementById('compare_period').disabled=true;
		}else{
			document.getElementById('compares_order_status').disabled=true;
			document.getElementById('compares_order_currency_id').disabled=true;
			document.getElementById('compares_order_payment_method').disabled=true;
			document.getElementById('compares_order_shipping_method').disabled=true;
			document.getElementById('compares_order_discount_code').disabled=true;
			document.getElementById('compares_products').disabled=true;
			document.getElementById('compares_categories').disabled=true;
		}
	}

	function updateDisplayType(){
		theType=false;
		values = new Array('gauge', 'column',
'graph', 'line', 'pie', 'area',
'map', 'listing', 'table');
		for(var i=0; i<values.length; i++){
			newType =
document.getElementById('widget_display_'+values[i]).checked;
			if(newType==true){
				displayType =
document.getElementById('widget_display_'+values[i]).value;
			}
		}
		if(displayType=='pie'){
			values = new Array('orders', 'sales',
'taxes', 'partners', 'customers');
			for(var i=0; i<values.length; i++){
				newType =
document.getElementById('type_'+values[i]).checked;
				if(newType==true){
						theType =
document.getElementById('type_'+values[i]).value;
					}
			}
			if(theType=='customers' || theType=='partners'){
				 document.getElementById('type_orders').checked=true;
			}
		}
		if(displayType=='map'){
			values = new Array('orders', 'sales',
'taxes', 'partners', 'customers');
			for(var i=0; i<values.length; i++){
				newType =
document.getElementById('type_'+values[i]).checked;
				if(newType==true){
					theType = document.getElementById('type_'+values[i]).value;
				}
			}

			document.getElementById('map_options').style.display='none';
			document.getElementById('filters').style.display='';
			if(theType=='orders' || theType=='sales' || 
theType=='taxes'){
				document.getElementById('map_options').style.display='';
			}
			if(theType=='customers' ||  theType=='partners'){
			}
		}
		if(displayType=='gauge' || displayType=='line' ||
displayType=='area' || displayType=='graph' ||
displayType=='column'){
			values = new Array('orders', 'sales',
'taxes', 'partners', 'customers');
			for(var i=0; i<values.length; i++){
				newType =
document.getElementById('type_'+values[i]).checked;
				if(newType==true){
						theType =
document.getElementById('type_'+values[i]).value;
					}
			}
			if(theType==false){
				theType='orders';
			 	theType =
document.getElementById('type_orders').checked=true;
			}
			document.getElementById('widget_compare').style.display='';
			if(theType=='orders' || theType=='sales' || 
theType=='taxes'){
				document.getElementById('widget_compare').style.display='';
			}
			if(theType=='customers' ||  theType=='partners'){
				document.getElementById('widget_compare').style.display='none';
			}
		}
		if(displayType=='table'){
			document.getElementById('products_options').style.display='none';
			document.getElementById('filters').style.display='none';
			document.getElementById('customers_options').style.display='none';
			document.getElementById('partners_options').style.display='none';
			document.getElementById('orders_options').style.display='none';
			document.getElementById('product_datas').style.display='none';
			document.getElementById('widget_compare').style.display='none';
			document.getElementById('widget_limit').style.display='none';
			document.getElementById('widget_region').style.display='none';
			document.getElementById('map_options').style.display='none';
		}
		if(displayType!='listing'){ return 0; }

		values = new Array('orders', 'products',
'customers', 'partners', 'categories',
'discounts');
		for(var i=0; i<values.length; i++){
			newType = document.getElementById('type_'+values[i]).checked;
			if(newType==true){
				theType = document.getElementById('type_'+values[i]).value;
			}
		}
		if(!theType){
			document.getElementById('type_orders').checked=true;
			theType='orders';
		}
		document.getElementById('products_options').style.display='none';
		document.getElementById('filters').style.display='none';
		document.getElementById('customers_options').style.display='none';
		document.getElementById('partners_options').style.display='none';
		document.getElementById('orders_options').style.display='none';
		document.getElementById('product_datas').style.display='none';

		if(theType=='orders' || theType=='products' ||
theType=='categories' || theType=='discounts' ||
theType=='customers' || theType== 'partners'){
			document.getElementById('filters').style.display='';
			document.getElementById('product_datas').style.display='';
			if(theType=='categories'){
				document.getElementById('data_hits').style.display='none';
				clicksValue =
document.getElementById('data_clicks').checked;
				if(clicksValue==true){
					document.getElementById('data_orders').checked=true;
				}
			}else if(theType=='products'){
				document.getElementById('data_hits').style.display='';
			}
		}
		if(theType=='discounts'){
			document.getElementById('product_datas').style.display='none';
		}
		if(theType=='products' || theType=='categories' ||
theType=='discounts'){
			document.getElementById('products_options').style.display='';
		}
		if(theType=='customers'){
			document.getElementById('customers_options').style.display='';
		}
		if(theType=='partners'){
			document.getElementById('partners_options').style.display='';
		}
		if(theType=='orders'){
			document.getElementById('orders_options').style.display='';
		}

	}
	window.addEvent('domready', function(){ updateDisplayType();
});
	window.addEvent('domready', function(){ updatePeriodSelection();
});
	window.addEvent('domready', function(){ updateCompare(); });

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

		$js='';
		$params= $element;
		echo
hikashop_getLayout('dashboard','widget',$params,$js);
	}

	function tableform(){
		$widget_id= JRequest::getVar( 'widget_id');
		$row_id= JRequest::getVar( 'row_id');
		$first = JRequest::getVar( 'first');
		$class = hikashop_get('class.widget');
		if(!empty($widget_id)){
			$element = $class->get($widget_id);
			$task='edit';
		}
		if(!isset($first) &&
isset($element->widget_params->table[$row_id])){
			$class->loadDatas($element->widget_params->table[$row_id]);
			$row=$element->widget_params->table[$row_id];
			$row->row_id=$row_id;
		}else{
			$row = new stdClass();
			$row->row_name='New row';
			$row->row_id=$row_id;
			$row->widget_params = new stdClass();
			$row->widget_params->periodType='proposedPeriod';
			$row->widget_params->proposedPeriod='thisMonth';
			$row->widget_params->content='sales';
			$row->widget_params->payment_id = array();
			$row->widget_params->payment_type = array();
		}

		$this->assignRef('first',$first);
		$this->assignRef('element',$element);
		$this->assignRef('row',$row);

		$dateGroup = hikashop_get('type.dategroup');
		$this->assignRef('dateGroup',$dateGroup);
		$periodType = hikashop_get('type.period');
		$this->assignRef('periodType',$periodType);
		$delay = hikashop_get('type.delay');
		$this->assignRef('delay',$delay);
		$status = hikashop_get('type.categorysub');
		$status->type='status';
		$this->assignRef('status',$status);
		$shippingMethods = hikashop_get('type.plugins');
		$shippingMethods->type='shipping';
		$shippingMethods->manualOnly=true;
		$this->assignRef('shippingMethods',$shippingMethods);
		$paymentMethods = hikashop_get('type.plugins');
		$paymentMethods->type='payment';
		$paymentMethods->manualOnly=true;
		$this->assignRef('paymentMethods',$paymentMethods);
		JHTML::_('behavior.modal');
		$this->_addUpdateJS();
	}

	function _addUpdateJS(){

		$js="
function updateDisplay(){
	var values = new Array('orders', 'sales',
'customers', 'partners', 'taxes',
'best', 'worst');
	for(var i=0; i<values.length; i++){
		e = document.getElementById('type_'+values[i]);
		if(e){
			newType = e.checked;
			if(newType==true){
				theType = e.value;
			}
		}else {
		}
	}
	var d = document;
	var show = new Array('best_worst_shipping',
'best_worst_payment',
'best_worst_currency','best_worst_country');
	var hide = new
Array('customers_options','partners_options',
'best_options','filters', 'sales_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(theType=='sales' || theType=='orders' ||
theType=='taxes'){
		d.getElementById('filters').style.display='';
	}
	if(theType=='customers'){
		d.getElementById('customers_options').style.display='';
	}
	if(theType=='partners'){
		d.getElementById('partners_options').style.display='';
	}
	if(theType=='best' || theType=='worst'){
		d.getElementById('best_options').style.display='';
		if(theType=='worst'){
			d.getElementById('best_worst_shipping').style.display='none';
			d.getElementById('best_worst_payment').style.display='none';
			d.getElementById('best_worst_currency').style.display='none';
			d.getElementById('best_worst_country').style.display='none';
		}
	}
	if(theType=='sales'){
			document.getElementById('sales_options').style.display='';
		}

}
window.addEvent('domready', function(){updateDisplay(); });

function deleteRow(divName,inputName,rowName){
	var d = document, div = d.getElementById(divName), olddiv =
d.getElementById(inputName);
	if(div && olddiv){
		div.removeChild(olddiv);
		d.getElementById(rowName).style.display='none';
	}
	return false;
}";

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

	function csv(){
		$widgetClass = hikashop_get('class.widget');
		$widgetClass->csv();
	}
}
tax/index.html000064400000000032151162050370007330
0ustar00<html><body></body></html>tax/tmpl/export.php000064400000004120151162050370010343
0ustar00<?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
hikashop_cleanBuffers();

$config =& hikashop_config();
$format = $config->get('export_format','csv');
$separator = $config->get('csv_separator',';');
$force_quote = $config->get('csv_force_quote',1);
$force_text = $config->get('csv_force_text', false);
$decimal_separator =
$config->get('csv_decimal_separator','.');

$export = hikashop_get('helper.spreadsheet');
$export->init($format, 'hikashopexport', $separator,
$force_quote, $decimal_separator, $force_text);

$classTax = hikashop_get('class.tax');
$columns = array(
	'1' => 'tax_namekey',
	'2' => 'tax_rate'
);
$main_currency = (int)$config->get('main_currency', 1);
$count_curr_column = 0;
$main_curr_code = '';
$i = 3;

if(count($this->currencies)>1){
	foreach($this->currencies as $id => $currency){
		$columns[$i] =
JText::sprintf('AMOUNT_X',$currency->currency_code);
		$i++;
		$columns[$i] =
JText::sprintf('TAXCLOUD_TAX',$currency->currency_code);
		$i++;
		if ($currency->currency_id == $main_currency)
			$main_curr_code = $currency->currency_code;
	}
}
if ($main_curr_code == '')
	$main_curr_code = $this->currencies['1']->currency_code;

$columns[$i] =
JText::_('TOTAL_AMOUNT').'('.$main_curr_code.')';
$i++;
$columns[$i] = 'tax_amount';
if(count($this->currencies)>1)
	$count_curr_column = $i - 4;

$export->writeline($columns);

if(!empty($this->rows)) {
	foreach($this->rows as $k => $tax) {
		$data = array();
		$data[] = $tax->tax_namekey;
		$data[] = $tax->tax_rate;

		if($count_curr_column>0) {
			if (is_array($tax->tax_amounts)) {
				foreach($tax->tax_amounts as $id => $value){
					$data[] = $tax->amounts[$id];
					$data[] = $tax->tax_amounts[$id];
				}
			}
		}
		$data[] = round($tax->amount,2);
		$data[] = round($tax->tax_amount,2);

		$export->writeline($data);
	}
}
$export->send();
exit;
tax/tmpl/form.php000064400000002773151162050370010001 0ustar00<?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');
?><div class="iframedoc"
id="iframedoc"></div>
<form action="<?php echo
hikashop_completeLink('tax');?>" method="post" 
name="adminForm" id="adminForm">
	<center>
	<table class="admintable">
		<tr>
			<td class="key">
					<?php echo JText::_( 'TAX_NAMEKEY' ); ?>
			</td>
			<td>
				<?php if(empty($this->element->tax_namekey)){?>
					<input type="text"
name="data[tax][tax_namekey]" value="" />
				<?php }else{
					echo $this->element->tax_namekey;
					?><input type="hidden"
name="data[tax][tax_namekey]" value="<?php echo
$this->escape($this->element->tax_namekey ); ?>"
/><?php
				}?>
			</td>
		</tr>
		<tr>
			<td class="key">
					<?php echo JText::_( 'RATE' ); ?>
	tax/index.html000064400000000032151162050370007330
0ustar00tax/tmpl/index.htmltax/tmpl/export.php000064400000004120151162050370010343
0ustar00tax/index.html000064400000000032151162050370007330
0ustar00<?php
/**
 * @package	Hitax/tmpl/export.php000064400000004120151162050370010343
0ustar00le-hover" cellpadding="1">
		<thead>
			<tr>
				<th class="title titlenum">
					<?php echo JText::_( 'HIKA_NUM' );?>
				</th>
				<th class="title titlebox">
					<input type="checkbox" name="toggle"
value="" onclick="hikashop.checkAll(this);" />
				</th>
				<th class="title">
					<?php echo JHTML::_('grid.sort',
JText::_('TAX_NAMEKEY'), 'a.tax_namekey',
$this->pageInfo->filter->order->dir,$this->pageInfo->filter->order->value
); ?>
				</th>
				<th class="title">
					<?php echo JHTML::_('grid.sort',
JText::_('RATE'), 'a.tax_rate',
$this->pageInfo->filter->order->dtax/tmpl/form.php000064400000002773151162050370010001
0ustar00	$k = 1-$k;
				}
			?>
		</tbody>
	</table>
	<input type="hidden" name="option"
value="<?php echo HIKASHOP_COMPONENT; ?>" />
	<input type="hidden" name="task" value=""
/>
	<input type="hidden" name="return"
value="<?php echo $this->return;?>" />
	<input type="hidden" name="ctrl"
value="<?php echo JRequest::getCmd('ctrl'); ?>"
/>
	<input type="hidden" name="boxchecked"
value="0" />
	<input type="hidden" name="filter_order"
value="<?php echo
$this->pageInfo->filter->order->value; ?>" />
	<input type="hidden" name="filter_order_Dir"
value="<?php echo
$this->pageInfo->filter->otax/tmpl/form.php000064400000002773151162050370010001
0ustar00tax/tmpl/index.html000064400000000032151162050370010304
0ustar00e();
		$function =
$this-tax/tmpl/listing.php000064400000006226151162050370010504
0ustar00tax/tmpl/index.html000064400000000032151162050370010304 0ustar00{
			$filters = ' WHERE
(tax/tmpl/listing.php000064400000006226151162050370010504
0ustar00[]='|';
		$this->toolbar[]=array('name' => 'pophelp',
'target' => $this->ctrl.'-listing');
		$this->toolbar[]='dashboard';

	}
	function form(){

		$tax_namekey = JRequest::getString('tax_namekey');
		if(empty($tax_namekey)){
			$id = JRequest::getVar( 'cid', array(), '',
'array' );
			if(is_array($id) && count($id)) $tax_namekey = reset($id);
			else $tax_namekey = $id;
		}

		$class = hikashop_get('class.tax');
		if(!empty($tax_namekey)){
			$element = $class->get($tax_namekey);
			$task='edit';
		}else{
			$element = new stdClass();
			$element->banner_url = HIKASHOP_LIVE;
			$task='add';
		}
		$this->assignRef('element',$element);

		hikashop_setTitle(JText::_($this->nameForm),$this->icon,$this->ctrl.'&task='.$task.'&tax_namekey='.$tax_namekey);

		$this->toolbar = array(
			'save',
			array('name' => 'save2new', 'display'
=> version_compare(JVERSION,'1.7','>=')),
			'apply',
			'cancel',
			'|',
			array('name' => 'pophelp', 'target'
=> $this->ctrl.'-form')
		);

		$return = JRequest::getString('return','');
		$this->assignRef('return',$return);
	}
}
taxation/index.html0000644000000000321511620503700tax/view.html.php000064400000010130151162050370007761
0ustar00taxation/tmpl/form.php000064400000007044151162050370011030
0ustar00<?php
/**
 * @package	HikaShop for Joomla!
 * @version	2.2.3
 * @author	hikashop.com
 * @copyright	(C) 2010-2013 HIKARI SOFTWARE. All rights
resetax/view.html.php000064400000010130151162050370007761 0ustar00
			<td>
				<?php echo JHTML::_('hikaselect.booleanlist',
"data[taxation][taxation_cumulative]" ,
'',@$this->element->taxation_cumulative	); ?>
			</td>
		</tr>
		<tr>
			<td class="key">
					<?php echo JText::_( 'POST_CODE' ); ?>
			</td>
			<td>
				<input type="text"
name="data[taxation][taxation_post_code]" value="<?php
echo @$this->element->taxation_post_code; ?>" />
			</td>
		</tr>
		<tr>
			<td class="key">
					<?php echo JText::_( 'ZONE' ); ?>
			</td>
			<td>
				<span id="zone_id" >
					<?php echo (int)@$this->element->zone_id.'
'.@$this->element->zone_name_english; ?>
					<input type="hidden"
name="data[taxation][zone_namekey]" value="<?php echo
@$this->element->zone_namekey; ?>" />
				</span>
				<?php
					echo $this->popup->display(
						'<img src="'. HIKASHOP_IMAGES.'edit.png"
alt="'.JText::_('HIKA_EDIT').'"/>',
						'ZONE',
						
hikashop_completeLink("zone&task=selectchildlisting&type=tax",true
),
						'zone_id_link',
						760, 480, '', '', 'link'
					);
				?>
				<a href="#"
onclick="document.getElementById('zone_id').innerHTML='0
<?php echo
$this->escape(JText::_('ZONE_NOT_FOUND'));?>';return
false;" >
					<img src="<?php echo HIKASHOP_IMAGES; ?>delete.png"
alt="delete"/>
				</a>
			</td>
		</tr>
		<tr>
			<td class="key">
					<?php echo JText::_( 'CUSTOMER_TYPE' ); ?>
			</td>
			<td>
				<?php echo $this->taxType->display(
"data[taxation][taxation_type]" ,
@$this->element->taxation_type ); ?>
			</td>
		</tr>
		<tr>
			<td colspan="2">
				<fieldset class="adminform">
					<legend><?php echo JText::_('ACCESS_LEVEL');
?></legend>
					<?php
					if(hikashop_level(2)){
						$acltype = hikashop_get('type.acl');
						echo
$acltype->display('taxation_access',@$this->element->taxation_access,'taxation');
					}else{
						echo hikashop_getUpgradeLink('business');;
					} ?>
				</fieldset>
			</td>
		</tr>
		<tr>
			<td class="key">
					<?php echo JText::_( 'HIKA_PUBLISHED' ); ?>
			</td>
			<td>
				<?php echo JHTML::_('hikaselect.booleanlist',
"data[taxation][taxation_published]" ,
'',@$this->element->taxation_published	); ?>
			</td>
		</tr>
	</table>
	</center>
	<div class="clr"></div>

	<input type="hidden" name="taxation_id"
value="<?php echo @$this->element->taxation_id; ?>"
/>
	<input type="hidden" name="option"
value="<?php echo HIKASHOP_COMPONENT;?>" />
	<input type="hidden" name="task" value=""
/>
	<input type="hidden" name="ctrl"
value="<?php echo JRequest::getString('ctrl');?>"
/>
	<?php echo JHTML::_( 'form.token' ); ?>
</form>
taxation/index.html000064400000000032151162050370010363
0ustar00<html><body></body></html>taxation/tmpl/form.php000064400000007044151162050370011030
0ustar00taxation/index.html000064400000000032151162050370010363
0ustar00owrap="nowrap">
				<?phptaxation/tmpl/form.php000064400000007044151162050370011030
0ustar00?php echo JHTML::_('grid.sort',
JText::_('RATE'), 'b.tax_rate',
$this->pageInfo->filter->order->dir,$this->pageInfo->filter->order->value
); ?>
				</th>
				<th class="title">
					<?php echo JHTML::_('grid.sort',    JText::_(
'CUSTOMER_TYPE' ),
'a.taxation_type',$this->pageInfo->filter->order->dir,
$this->pageInfo->filter->order->value ); ?>
				</th>
				<th class="title titletoggle">
					<?php echo JHTML::_('grid.sort',  
JText::_('HIKA_PUBLISHED'), 'a.taxation_published',
$this->pageInfo->filter->order->dir,
$this->pageInfo->filter->order->value ); ?>
				</th>
				<th class="title">
					<?php echo JHTML::_('grid.sort',   JText::_(
'ID' ), 'a.taxation_id',
$this->pageInfo->filter->order->dir,
$this->pageInfo->filter->order->value ); ?>
				</th>
			</tr>
		</thead>
		<tfoot>
			<tr>
				<td colspan="8">
					<?php echo $this->pagination->getListFooter(); ?>
					<?php echo $this->pagination->getResultsCounter(); ?>
				</td>
			</tr>
		</tfoot>
		<tbody>
			<?php
				$k = 0;
				$config =& hikashop_config();
				for($i = 0,$a = count($this->rows);$i<$a;$i++){
					$row =& $this->rows[$i];
					$publishedid = 'taxation_published-'.$row->taxation_id;
			?>
				<tr class="<?php echo "row$k"; ?>">
					<td align="center">
					<?php echo $this->pagination->getRowOffset($i); ?>
					</td>
					<td align="center">
						<?php echo JHTML::_('grid.id', $i, $row->taxation_id
); ?>
					</td>
					<td>
						<?php
if(hikashop_isAllowed($config->get('acl_zone_manage','all'))){
?>
							<a href="<?php echo
hikashop_completeLink('zone&task=edit&zone_id='.@$row->zone_id);
?>">
						<?php } ?>
								<?php echo @$row->zone_name; ?>
						<?php
if(hikashop_isAllowed($config->get('acl_zone_manage','all'))){
?>
							</a>
						<?php } ?>
					</td>
					<td>
						<?php
if(hikashop_isAllowed($config->get('acl_category_manage','all'))){
?>
							<a href="<?php echo
hikashop_completeLink('category&task=edit&category_id='.@$row->category_id);
?>">
						<?php } ?>
								<?php echo @$row->category_name;
?>
taxation/tmpl/index.html000064400000000032151162050370011337
0ustar00td>
					<td width="1%"
ataxation/tmpl/listing.php000064400000012301151162050370011526
0ustar00taxation/tmpl/index.html000064400000000032151162050370011337
0ustar00<?php
/**
 * @package	Hitaxation/tmpl/listing.php000064400000012301151162050370011526
0ustar00	$pageInfo->filter->order->dir	=
$app->getUserStateFromRequest(
$this->paramBase.".filter_order_Dir",
'filter_order_Dir',	'desc',	'word' );
		$pageInfo->limit->value = $app->getUserStateFromRequest(
$this->paramBase.'.list_limit', 'limit',
$app->getCfg('list_limit'), 'int' );
		$pageInfo->limit->start = $app->getUserStateFromRequest(
$this->paramBase.'.limitstart', 'limitstart', 0,
'int' );
		$pageInfo->filter->tax_namekey=$app->getUserStateFromRequest(
HIKASHOP_COMPONENT.'.tax_namekey','tax_namekey',''
,'string');
		$pageInfo->filter->taxation_type=$app->getUserStateFromRequest(
HIKASHOP_COMPONENT.'.taxation_type','taxation_type',''
,'string');
		$database = JFactory::getDBO();

		$filters = array();

		if(!empty($pageInfo->filter->tax_namekey)){
			$filters[]='a.tax_namekey='.$database->Quote($pageInfo->filter->tax_namekey);
		}
		if(!empty($pageInfo->filter->taxation_type)){
			$filters[]='a.taxation_type='.$database->Quote($pageInfo->filter->taxation_type);
		}

		$order = '';
		if(!empty($pageInfo->filter->order->value)){
			$order = ' ORDER BY
'.$pageInfo->filter->order->value.'
'.$pageInfo->filter->order->dir;
		}
		if(!empty($filters)){
			$filters = ' WHERE ('. implode(') AND
(',$filters).')';
		}else{
			$filters = '';
		}
		$query = ' FROM '.hikashop_table('taxation').'
AS a LEFT JOIN '.hikashop_table('tax').' AS b ON
a.tax_namekey=b.tax_namekey LEFT JOIN
'.hikashop_table('category').' AS c ON
a.category_namekey=c.category_namekey AND
a.category_namekey!=\'\' AND c.category_type=\'tax\'
LEFT JOIN '.hikashop_table('zone').' AS d ON
a.zone_namekey=d.zone_namekey AND
a.zone_namekey!=\'\''.$filters.$order;
		$database->setQuery('SELECT
b.*,c.*,d.*,a.*'.$query,(int)$pageInfo->limit->start,(int)$pageInfo->limit->value);
		$rows = $database->loadObjectList();

		$database->setQuery('SELECT COUNT(*)'.$query);
		$pageInfo->elements = new stdClass();
		$pageInfo->elements->total = $database->loadResult();
		$pageInfo->elements->page = count($rows);

		$toggleClass = hikashop_get('helper.toggle');
		$this->assignRef('toggleClass',$toggleClass);
		$this->assignRef('rows',$rows);
		$this->assignRef('pageInfo',$pageInfo);

		$taxType = hikashop_get('type.tax');
		$this->assignRef('taxType',$taxType);
		$ratesType = hikashop_get('type.rates');
		$this->assignRef('ratesType',$ratesType);
		hikashop_setTitle(JText::_($this->nameListing),$this->icon,$this->ctrl);
		$this->getPagination();

		$config =& hikashop_config();
		$manage =
hikashop_isAllowed($config->get('acl_taxation_manage','all'));
		$this->assignRef('manage',$manage);

		$this->toolbar = array(

			array('name' => 'link',
'icon'=>'edit','alt'=>JText::_('MANAGE_TAX_CATEGORIES'),
'url'
=>hikashop_completeLink('category&filter_id=tax'),'display'=>$manage),
			array('name' => 'link',
'icon'=>'edit','alt'=>JText::_('MANAGE_RATES'),
'url'
=>hikashop_completeLink('tax&return=taxation')
,'display'=>$manage),
			array('name'=>'|','display'=>$manage),
			array('name'=>'addNew','display'=>$manage),
			array('name'=>'editList','display'=>$manage),
			array('name'=>'deleteList','display'=>hikashop_isAllowed($config->get('acl_taxation_delete','all'))),
			'|',
			array('name' => 'pophelp', 'target'
=> $this->ctrl.'-listing'),
			'dashboard'
		);

		JHTML::_('behavior.modal');
	}
	function form(){
		$taxation_id = hikashop_getCID('taxation_id');
		$class = hikashop_get('class.taxation');
		if(!empty($taxation_id)){
			$element = $class->get($taxation_id);
			$task='edit';
		}else{
			$element = new stdClass();
			$element->banner_url = HIKASHOP_LIVE;
			$task='add';
		}

		hikashop_setTitle(JText::_($this->nameForm),$this->icon,$this->ctrl.'&task='.$task.'&taxation_id='.$taxation_id);

		taxation/view.html.php000064400000012565151162050370011032
0ustar00update/index.html000064400000000032151162050370010016
0ustar00<html><body></body></html>taxation/view.html.php000064400000012565151162050370011032
0ustar00<html><body></body></html>update/tmpl/listing.xml000064400000000304151162050370011172
0ustar00<?xml version="1.0" encoding="utf-8"?>
<metadata>
	<layout title="COM_HIKASHOP_ABOUT_VIEW_TITLE">
		<message>
			<![CDATA[COM_HIKASHOP_ABOUT_VIEW_DESC]]>
		</message>
	</layout>
</metadata>update/tmpl/wizard.php000064400000032017151162050370011016
0ustar00<?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');
?><form action="<?php echo
hikashop_completeLink('update&task=wizard_save'); ?>"
method="post" name="adminForm"
id="adminForm">
<?php if(!HIKASHOP_J30) { ?>
	<fieldset>
<?php } ?>
	<div id="layout_menu_module_div" class="row-fluid
wizard_main_divs <?php if(!HIKASHOP_J30)echo
'wizard_main_divs_j25'; ?>">
		<div style="text-align:left; margin-bottom:
10px;"><img src="<?php echo HIKASHOP_IMAGES;
?>wizard/step1.png" alt="1"/><?php echo
JText::_('WIZARD_SHOP_ACCESS'); ?></div>
		<div class="span2 offsetdiv"></div>
		<div id="layout_products_menu" class="span2
wizard_thumbnail" onclick="selectLayout(this,
'layout_menu_module','products_menu');">
			<div class="wizard_thumbnail_img">
				<img src="<?php echo HIKASHOP_IMAGES;
?>wizard/menu_products.png" alt="layout_menu"/>
			</div>
			<div class="wizard_thumbnail_desc">
				<?php echo JText::_('PRODUCTS_LISTING_MENU'); ?>
				<br/><img src="<?php echo HIKASHOP_IMAGES;
?>wizard/separator.png" alt=""/><br/>
				<?php echo JText::_('PRODUCTS_LISTING_MENU_DESC'); ?>
			</div>
		</div>
		<div class="span1 offsetdiv"></div>
		<div id="layout_categories_menu" class="span2
wizard_thumbnail" onclick="selectLayout(this,
'layout_menu_module','categories_menu');">
			<div class="wizard_thumbnail_img">
				<img src="<?php echo HIKASHOP_IMAGES;
?>wizard/menu_categories.png" alt="layout_menu"/>
			</div>
			<div class="wizard_thumbnail_desc">
				<?php echo JText::_('CATEGORIES_LISTING_MENU'); ?>
				<br/><img src="<?php echo HIKASHOP_IMAGES;
?>wizard/separator.png" alt=""/><br/>
				<?php echo JText::_('CATEGORIES_LISTING_MENU_DESC');
?>
			</div>
		</update/index.html000064400000000032151162050370010016
0ustar00value="1"
id="products_menupdate/tmpl/index.html000064400000000032151162050370010772
0ustar00update/index.htmlupdate/tmpl/listing.xml000064400000000304151162050370011172
0ustar00update/tmpl/index.html000064400000000032151162050370010772
0update/tmpl/wizard.php000064400000032017151162050370011016
0ustar00update/tmpl/listing.xml000064400000000304151162050370011172
0ustar00		<div class="wizard_shop_address">
				<span class="wizard_label"><label
for="shop_address"><?php echo
JText::_('ADDRESS').': ';
?></label></span>
				<textarea class="wizard_shop_address"
stylupdate/tmpl/wizard.php000064400000032017151162050370011016
0ustar00class="wizard_label"><label
for="wizard_currency"><?php echo
JText::_('MAIN_CURRENCY').': ';
?></label></span>
					<select name="currency"
id="wizard_currency"><?php
						foreach($this->currencies as $currency){
							$selected = '';
							if($currency->currency_code == 'EUR') $selected =
'selected="selected"';
							echo '<option
value="'.$currency->currency_id.'"
'.$selected.'>'.$currency->currency_code.'
'.$currency->currency_symbol.'</option>';
						}
					?></select>
				</div>
		<!-- TAX -->
				<div class="wizard_shop_tax">
					<dl>
						<dt>
							<label for="wizard_tax_name"><?php echo
JText::_('TAX_NAME').': '; ?></label>
						</dt>
						<dd>
							<input type="text" name="tax_name"
id="wizard_tax_name" value=""/>
						</dd>
						<dt>
							<label for="wizard_tax_rate"><?php echo
JText::_('RATE').': '; ?></label>
						</dt>
						<dd>
							<input style="width:50px;" type="text"
name="tax_rate" id="wizard_tax_rate"
value=""/>%
						</dd>
					</dl>
				</div>
			</div>
			</div>
<?php
	if(!empty($this->languageNames)){
?>
			<div style="clear:both;"></div>
			<div>
			<div class="wizard_subdiv_left span3">
				<img src="<?php echo HIKASHOP_IMAGES;
?>wizard/language.png" alt=""/>
			</div>
			<div class="wizard_subdiv_right span8">
				<img src="<?php echo HIKASHOP_IMAGES;
?>wizard/separator2.png" alt=""/>
		<!-- LANGUAGES -->
				<div class="wizard_shop_language">
				<?php
					echo '<div
class="wizard_language">'.JText::_('WIZARD_LANGUAGE').'</div>';
					echo
JText::sprintf('USE_JOOMLA_LANGUAGES',$this->languageNames);
?><br/>
					<?php
					$values = array(
						JHTML::_('select.option', $this->languageCodes,
JText::_('HIKASHOP_YES')),
						JHTML::_('select.option',
0,JText::_('HIKASHOP_NO'))
					);
					echo JHTML::_('hikaselect.radiolist',  $values,
'import_language', '', 'value',
'text', 0 );
					?>
				</div>
			</div>
			</div>
<?php
	}
?>
			<div style="clear:both;"></div>
			<div>
			<div class="wizard_subdiv_left span3">
				<br/><br/>
				<img src="<?php echo HIKASHOP_IMAGES;
?>wizard/paypal.png" alt=""/>
			</div>
			<div class="wizard_subdiv_right span8">
				<img src="<?php echo HIKASHOP_IMAGES;
?>wizard/separator2.png" alt=""/>
		<!-- PAYPAL -->
				<div class="wizard_shop_paypal">
					<div class="wizard_language"><?php echo
JText::_('WIZARD_PAYPAL'); ?></div>
					<label for="wizard_paypal_email"><?php echo
JText::_('HIKA_PAYPAL_EMAIL_OPTIONAL').': ';
?></label>
					<input type="text" name="paypal_email"
id="wizard_paypal_email" value=""/>
				</div>
			</div>
			</div>
			<div style="clear:both;"></div>
			<div>
			<div class="wizard_subdiv_left span3">
				<br/><br/>
				<img src="<?php echo HIKASHOP_IMAGES;
?>wizard/shipping.png" alt=""/>
			</div>
			<div class="wizard_subdiv_right span8">
				<img src="<?php echo HIKASHOP_IMAGES;
?>wizard/separator2.png" alt=""/>
		<!-- PAYPAL -->
				<div class="wizard_shop_virtual">
					<div class="wizard_product_type"><b><?php
echo JText::_('WIZARD_PRODUCT_TYPE');
?></b></div>
					<label for="wizard_virtual_product"><?php echo
JText::_('WIZARD_PRODUCT_TYPE_SOLD').': ';
?></label>
					<select name="product_type"
id="wizard_virtual_product">
						<option value="virtual"><?php echo
JText::_('WIZARD_VIRTUAL'); ?></option>
						<option value="real"><?php echo
JText::_('WIZARD_REAL'); ?></option>
						<option value="both"><?php echo
JText::_('WIZARD_BOTH'); ?></option>
					</select>
				</div>
			</div>
			</div>
<?php if(!HIKASHOP_J30){ ?>
		</div>
<?php } ?>
	</div>
	<div style="text-align:center;	margin: 40px auto;">
		<input class="wizard_button" type="submit"
value="<?php echo
JText::_('SAVE_AND_CREATE_FIRST_PRODUCT'); ?>"/>
		<span class="wizard_submit_arrow<?php if(HIKASHOP_J30)echo
'_j30'; ?>">
			<img onclick="document.adminForm.submit();;"
src="<?php echo HIKASHOP_IMAGES; ?>wizard/arrow.png"
alt=""/>
		</span>
	</div>
<?php if(!HIKASHOP_J30) { ?>
	</fieldset>
<?php } ?>
</form>
<script type="text/javascript">
	if(!window.hkjQuery)
		window.hkjQuery = window.jQuery;

	function selectLayout(el, type, value){
		if(type == 'layout_menu_module') {
			var selected = hkjQuery('#'+value).val();
			if(selected == 0) {
				selected = 0;
				hkjQuery(el).addClass('selected');
			} else {
				selected = 1;
				hkjQuery(el).removeClass('selected');
			}
			hkjQuery('#'+value).val( (1 - selected) );
		} else {
			var currentValue = hkjQuery('#'+type).val();
			hkjQuery('#layout_'+currentValue).removeClass('selected');
			hkjQuery(el).addClass('selected');
			hkjQuery('#'+type).val(value);
		}
	}

	hkjQuery(document).ready(function () {
		fillShopAddress(1000);
		setTimeout(function(){
			var currentValue = hkjQuery('#layout_type').val();
			hkjQuery('#layout_'+currentValue).addClass('selected');

			hkjQuery.each(['products_menu', 'categories_menu',
'categories_module'], function(index, value) {
				var e = hkjQuery('#'+value);
				if(e.val() == 1) {
					hkjQuery('#layout_' +
value).addClass('selected');
				}
			});

		}, 500);
	});
	hkjQuery("#address_state").on("change",
function(event) {
		fillShopAddress();
	});
	hkjQuery("#address_country").on("change",
function(event) {
		fillShopAddress();
	});
	window.Oby.registerAjax('hikashop.stateupdated',
function(params) {
		hkjQuery(params.elem).on("change", function(event) {
			fillShopAddress();
		});
		fillShopAddress();
	});
	function fillShopAddress(wait){
		if(wait === undefined)
			wait = 10;
		setTimeout(function () {
			var country = hkjQuery("#address_country
option:selected").text();
			if(hkjQuery("#address_state").length != 0){
				var state = hkjQuery("#address_state
option:selected").text()+'\r\n';
			}else{
				var state = '';
			}
			var content = hkjQuery("#shop_address").html();
			if(hkjQuery("#shop_address").html().match('<?php echo
JText::_('YOUR_ADDRESS'); ?>') || content ==
''){
				hkjQuery("#shop_address").html('<?php echo
JText::_('YOUR_ADDRESS');
?>'+'\r\n\r\n'+state+country);
			}
		}, wait);
	}
</script>
upload/index.html000064400000000032151162050370010020
0ustar00<html><body></body></html>upload/tmpl/file_entry.php000064400000002705151162050370011661
0ustar00<?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');
?><div>
<?php
	if(!empty($this->params->delete) &&
!empty($this->params->uploader_id)) {
		$p = '';
		if(!empty($this->params->field_name))
			$p = ',\'' . $this->params->field_name .
'\'';
?>
	<a href="#delete" class="deleteImg"
onclick="return window.hkUploaderList['<?php echo
$this->params->uploader_id; ?>'].delImage(this<?php echo
$p;?>);"><img src="<?php echo HIKASHOP_IMAGES;
?>cancel.png" border="0"></a>
<?php
	}

if(!empty($this->params->file_name)) {
?>
	<span class="file_name"
style="white-space:nowrap"><?php echo
$this->params->file_name; ?></span><br/>
	<span class="file_size"><?php
		$u =
array('B','KB','MB','GB','TB','PB');
		echo sprintf('%01.2f',
@round($this->params->file_size/pow(1024,($i=floor(log($this->params->file_size,1024)))),2)).'&nbsp;'.$u[$i];
	?></span>
<?php
}

if(!empty($this->params->field_name))
	echo '<input type="hidden"
name="'.$this->params->field_name.'"
value="'.$this->escape(@$this->params->file_path).'"/>';
if(!empty($this->params->extra_fields)) {
	foreach($this->params->extra_fields as $key => $value) {
		echo '<input type="hidden"
name="'.$this->escape($key).'"
value="'.$this->escape($value).'"/>';
	}
}
?>
</div>
upload/tmpl/galleryimage.php000064400000011022151162050370012153
0ustar00<?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');
?><fieldset>
	<div class="toolbar" id="toolbar"
style="float: right;">
		<button class="btn" type="button"
onclick="window.hikashop.submitform('galleryselect','adminForm');"><img
style="vertical-align: middle" src="<?php echo
HIKASHOP_IMAGES; ?>save.png"/><?php echo
JText::_('OK'); ?></button>
	</div>
</fieldset>
<form action="<?php echo
hikashop_completeLink('upload&task=galleryimage', true);
?>" method="post" name="adminForm"
id="adminForm">
	<table width="100%" height="100%"
class="adminlist" style="width:100%;height:100%;">
		<thead>
			<tr>
				<th></th>
				<th>
					<?php echo JText::_('FILTER');?>:
					<input type="text" name="search"
value="<?php echo
$this->escape($this->pageInfo->search);?>"
class="text_area"
onchange="document.adminForm.submit();" />
					<button class="btn"
onclick="document.adminForm.limitstart.value=0;this.form.submit();"><?php
echo JText::_( 'GO' ); ?></button>
					<button class="btn"
onclick="document.adminForm.limitstart.value=0;document.getElementById('search').value='';this.form.submit();"><?php
echo JText::_( 'RESET' ); ?></button>
				</th>
			</tr>
		</thead>
		<tfoot>
			<tr>
				<td></td>
				<td>
					<?php echo $this->pagination->getListFooter(); ?>
					<?php echo
$this->pagination->getReupload/index.html000064400000000032151162050370010020
0ustar00) {
	foreach($this->dirCoupload/tmpl/file_entry.php000064400000002705151162050370011661
0ustar00upload/index.html000064400000000032151162050370010020
0ustar00hidden" name="folder"
valuupload/tmpl/file_entry.php000064400000002705151162050370011661
0ustar00upload/tmpl/galleryimage.php000064400000011022151162050370012153
0ustar00<?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');
?><div>
<?php
if(!empty($this->params->delete) &&
!empty($this->params->uploader_id)) {
	$p = '';
	if(!empty($this->params->field_name))
		$p = ',\'' . $this->params->field_name .
'\'';
?>
	<a href="#delete" class="deleteImg"
onclick="return window.hkUploaderList['<?php echo
$this->params->uploader_id; ?>'].delImage(this<?php echo
$p;?>);"><img src="<?php echo HIKASHOP_IMAGES;
?>cancel.png" border="0"></a>
<?php
}

if(empty($this->params->thumbnail_url))
	$img =
$this->imageHelper->getThumbnail(@$this->params->file_path,
array(100, 100), null);
if(!empty($this->params->thumbnail_url) || (!empty($img) &&
$img->success)) {
?>
	<div class="hikashop_image"><?php
		$img_uupload/tmpl/galleryimage.php000064400000011022151162050370012153
0ustar00his->escape(@$this->params->file_path).'"/>';
if(!empty($this->params->extra_fields)) {
	foreach($this->params->extra_fields as $key => $value) {
		echo '<input type="hidden"
name="'.$this->escape($key).'"
value="'.$this->escape($value).'"/>';
	}
}
?>
</div>
upload/tmpl/index.html000064400000000032151162050370010774
0ustar00<html><body></body></html>upload/tmpl/sendfile.php000064400000004366151162050370011317
0ustar00<?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');
?><fieldset>
	<div class="toolbar" id="toolbar"
style="float: right;">
		<button class="btn" type="button"
onclick="window.hikashop.submitform('addimage','hikashop_form');"><img
style="vertical-align:middle" src="<?php echo
HIKASHOP_IMAGES; ?>save.png"/><?php echo
JText::_('OK'); ?></button>
	</div>
</fieldset>
<form action="<?php echo
hikashop_completeLink('upload&task=image'); ?>"
method="post" name="hikashop_form"
id="hikashop_form" enctype="multipart/form-data">
	<table width="100%">
		<tr>
<?php
	if(empty($this->element->file_path)) {
?>
			<td class="key">
				<label for="files"><?php echo
JText::_('HIKA_IMAGE'); ?></label>
			</td>
			<td>
				<input type="file" name="files[]"
size="30" />
				<?php echo
JText::sprintf('MAX_UPLOAD',(hiupload/tmpl/image_entry.php000064400000003413151162050370012021
0ustar00this->uploadConfig['extra'] as $uploadField =>
$uploadFieldValue) {
?>
	<input type="hidden" name="<?php echo $uploadField;
?>" value="<?php echo $uploadFieldValue; ?>" />
<?php
		}
	}
?>
	<?php echo JHTML::_( 'form.token' ); ?>
</form>
upload/view.html.pupload/tmpl/image_entry.php000064400000003413151162050370012021
0ustar00his->getLayout();
		if(method_exists($this, $fct)) {
			if($this->$fct() === false)
				return;
		}
		parent::display($tpl);
	}

	public function sendfile() {
		$uploadConfig = JRequest::getVar('uploadConfig', null);
		if(empty($uploadConfig) ||
!is_array($upload/tmpl/index.html000064400000000032151162050370010774
0ustar00
		$this->assignRef('uploupload/tmpl/sendfile.php000064400000004366151162050370011317
0ustar00upload/tmpl/index.html000064400000000032151162050370010774
0ustar00lue
		);
		$this->assignupload/tmpl/sendfile.php000064400000004366151162050370011317
0ustar00user/index.html000064400000000032151162050370007512
0ustar00<html><body></body></html>upload/view.html.php000064400000007343151162050370010465
0ustar00<?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');
?><div class="iframedoc"
id="iframedoc"></div>
<form action="<?php echo
hikashop_completeLink('user'); ?>"
method="post"  name="adminForm"
id="adminForm">
	<table>
		<tr>
			<td width="100%">
				<?php echo JText::_( 'FILTER' ); ?>:
				<input type="text" name="search"
id="search" value="<?php echo
$this->escape($this->pageInfo->search);?>"
class="text_area"
onchange="document.adminForm.submit();" />
				<button class="btn"
onclick="this.form.submit();"><?php echo
JText::_upload/view.html.php000064400000007343151162050370010465
0ustar00dir,$this->pageInfo->filter->order->value ); ?>
				</th>
				<?php } ?>
				<th class="title">
					<?php echo JHTML::_('grid.sort',
JText::_('IP'), 'a.click_ip',
$this->pageInfo->filter->order->dir,$this->pageInfo->filter->order->value
); ?>
				</th>
				<th class="title">
					<?php echo JHTML::_('grid.sort',
JText::_('REFERER'), 'a.click_referer',
$this->pageInfo->filter->order->dir,$this->pageInfo->filter->order->value
); ?>
				</th>

				<th class="title">
					<?php echo JHTML::_('grid.sort',
JText::_('TOTAL_UNPAID_AMOUNT'),
'a.click_partner_price',
$this->pageInfo->filter->order->dir,$this->pageInfo->filter->order->value
); ?>
				</th>
				<th class="title">
					<?php echo JHTML::_('grid.sort',   JText::_(
'ID' ), 'a.click_id',
$this->pageInfo->filter->order->dir,
$this->pageInfo->filter->order->value ); ?>
				</th>
			</tr>
		</thead>
		<tfoot>
			<tr>
				<td colspan="<?php echo empty($this->user_id) ? 7 : 6;
?>">
					<?php echo $this->pagination->getListFooter(); ?>
					<?php echo $this->pagination->getResultsCounter(); ?>
				</td>
			</tr>
		</tfoot>
		<tbody>
			<?php
				$k = 0;
				for($i = 0,$a = count($this->rows);$i<$a;$i++){
					$row =& $this->rows[$i];
			?>
				<tr class="<?php echo "row$k"; ?>">
					<td align="center">
					<?php echo $this->pagination->getRowOffset($i);
					?>
					</td>
					<td align="center">
						<?php echo  hikashop_getDate($row->click_created,'%Y-%m-%d
%H:%M'); ?>
					</td>
					<?php if(empty($this->user_id)){?>
					<td align="center">
						<a href="<?php echo
hikashop_completeLink('user&task=edit&cid[]='.$row->click_partner_id);?>"><?php
echo $row->user_email; ?></a>
					</td>
					<?php } ?>
					<td align="center">
						<?php echo $row->click_ip; ?>
					</td>
					<td>
						<a target="_blank" href="<?php echo
strip_tags($row->click_referer); ?>">
						<?php if(strlen(strip_tags($row->click_referer)) > 50){
							$row->click_referer = strip_tags($row->click_referer);
							$row->click_referer =
substr($row->click_referer,0,20).'...'.substr($row->click_referer,-20);
						}
						echo $row->click_referer; ?>
						</a>
					</td>

					<td align="center">
						<?php
						if(bccomp($row->click_partner_priceuser/index.html000064400000000032151162050370007512
0ustar00dden" name="filter_order"
user/tmpl/clicks.php000064400000011373151162050370010464
0ustar00user/index.html000064400000000032151162050370007512
0ustar00ipart/form-data">
		<tabluser/tmpl/clicks.php000064400000011373151162050370010464
0ustar00name="data[address][address_user_id]"
value="<?php echo $this->user_id;?>"/>
		<input type="hidden"
name="data[address][address_id]" value="<?php echo
(int)@$this->address->address_id;?>"/>
<?php
	echo JHTML::_( 'form.token' );
	echo
$this->cart->displayButton(JText::_('OK'),'ok',$this->params,hikashop_completeLink('user&task=saveaddress'),'if(hikashopCheckChangeForm(\'address\',\'hikashop_address_form\'))
document.forms[\'hikashop_address_form\'].submit(); return
false;','style="float:right"');
?>
	</form>
</div>
user/tmpl/form.php000064400000036720151162050370010162 0ustar00<?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');
?><div class="iframedoc"
id="iframedoc"></div>
<form action="index.php?option=com_hikashop&amp;ctrl=user"
method="post"  name="adminForm"
id="adminForm"  enctype="multipart/form-data">
<?php if(!HIKASHOP_BACK_RESPONSIVE) { ?>
<div id="page-mail">
	<table style="width:100%">
		<tr>
			<td valign="top" width="30%">
<?php } else { ?>
<div id="page-files" class="row-fluid">
	<div class="span6">
<?php } ?>
				<fieldset class="adminform">
					<legend><?php echo JText::_('MAIN_INFORMATION');
?></legend>
					<table class="admintable table">
						<tr>
							<td class="key">
									<?php echo JText::_( 'HIKA_USER_NAME' ); ?>
							</td>
							<td>
								<?php echo $this->escape(@$this->user->name); ?>
							</td>
						</tr>
						<tr>
							<td class="key">
									<?php echo JText::_( 'HIKA_USERNAME' ); ?>
							</td>
							<td>
								<?php echo $this->escape(@$this->user->username);
?>
							</td>
						</tr>
						<tr>
							<td class="key">
									<?php echo JText::_( 'HIKA_EMAIL' ); ?>
							</td>
							<td>
								<input type="text" size="30"
name="data[user][user_email]" class="inputbox"
value="<?php echo $this->escape(@$this->user->user_email);
?>" />
							</td>
						</tr>
						<?php if(hikashop_level(2) &&
!empty($this->user->geolocation_ip)){ ?>
							<tr>
								<td class="key">
										<?php echo JText::_( 'IP' ); ?>
								</td>
								<td>
									<?php
									echo $this->user->geolocation_ip;
							user/tmpl/editaddress.php000064400000004020151162050370011476
0ustar00er][user_partner_email]" class="inputbox"
value="<?php echo
$this->escape(@$this->user->user_partner_email); ?>"
/>
								</td>
							</tr>
						<?php
						}
						if(!empty($this->fields['user'])){
							foreach($this->fields['user'] as $fieldName =>
$oneExtraField) {
							?>
								<tr>
									<td class="key">
										<?php echo
$this->fieldsClass->getFieldName($oneExtraField);?>
									</td>
									<td>
										<?php echo
$this->fieldsClass->display($oneExtraField,$this->user->$fieldName,'data[user]['.$fieldName.']');
?>
									</td>
								</tr>
							<?php
							}
						}
						if(!empty($this->user->user_partner_activated)){
						?>
							<tr>
								<td class="key">
										<?php echo JText::_(
user/tmpl/editaddress.php000064400000004020151162050370011476 0ustar00ho
JText::_( 'CUSTOM_FEES' ); ?>
								</td>
								<td>
									<?php echo JHTML::_('hikaselect.booleanlist',
"data[user][user_params][user_custom_fee]",
'onchange="updateCustomFeesPanel(this.value);return
false;"',@$this->user->user_params->user_custom_fee);?>
								</td>
							</tr>
						</table>
						<div id="custom_fees_panel" <?php
if(empty($this->user->user_params->user_custom_fee)) echo
'style="display:none"';?>>
							<table class="admintable table">
								<tr>
									<td class="key">
				user/tmpl/form.php000064400000036720151162050370010162 0ustar00
								<tr>
									<td class="key">
											<?php echo JText::_( 'PARTNER_ORDER_FLAT_FEE' );
?>
									</td>
									<td>
										<input type="text" size="5"
name="data[user][user_params][user_partner_flat_fee]"
class="inputbox" value="<?php echo
$this->escape(@$this->user->user_params->user_partner_flat_fee);
?>" />
									</td>
								</tr>
								<tr>
									<td class="key">
											<?php echo JText::_( 'PARTNER_CLICK_FEE' ); ?>
									</td>
									<td>
										<input
type="text"user/tmpl/form.php000064400000036720151162050370010162
0ustar00d>
											<?php echo JText::_( 'CLICKS_UNPAID_AMOUNT' );

												echo $this->popup->display(
													'<img src="'.
HIKASHOP_IMAGES.'go.png"
alt="'.JText::_('CLICKS_UNPAID_AMOUNT').'"/>',
													'CLICKS_UNPAID_AMOUNT',
													hikashop_completeLink('user&task=clicks&user_id='.$this->user->user_id.'',true),
													'clicks_link',
													760, 480, '', '', 'link'
												);
											?>
										</td>
										<?php if(!empty($affiliate_payment_delay)){ ?><td
align="center">
											<?php echo
$this->escape(@$this->user->accumulated['currentclicks']);?>
										</td><?php } ?>
										<td align="center">
											<?php echo
$this->escape(@$this->user->accumulated['clicks']);?>
										</td>
									</tr>
									<tr>
										<td>
											<?php echo JText::_( 'LEADS_UNPAID_AMOUNT' );
												echo $this->popup->display(
													'<img src="'.
HIKASHOP_IMAGES.'go.png"
alt="'.JText::_('LEADS_UNPAID_AMOUNT').'"/>',
													'LEADS_UNPAID_AMOUNT',
													hikashop_completeLink('user&task=leads&user_id='.$this->user->user_id.'',true),
													'leads_link',
													760, 480, '', '', 'link'
												);?>
										</td>
										<?php if(!empty($affiliate_payment_delay)){ ?><td
align="center">
											<?php echo
$this->escape(@$this->user->accumulated['currentleads']);?>
										</td><?php } ?>
										<td align="center">
											<?php echo
$this->escape(@$this->user->accumulated['leads']);?>
										</td>
									</tr>
									<tr>
										<td>
											<?php echo JText::_( 'SALES_UNPAID_AMOUNT' );
												echo $this->popup->display(
													'<img src="'.
HIKASHOP_IMAGES.'go.png"
alt="'.JText::_('SALES_UNPAID_AMOUNT').'"/>',
													'SALES_UNPAID_AMOUNT',
													hikashop_completeLink('user&task=sales&user_id='.$this->user->user_id.'',true),
													'sales_link',
													760, 480, '', '', 'link'
												); ?>
										</td>
										<?php if(!empty($affiliate_payment_delay)){ ?><td
align="center">
											<?php echo
$this->escape(@$this->user->accumulated['currentsales']);
?>
										</td><?php } ?>
										<td align="center">
											<?php echo
$this->escape(@$this->user->accumulated['sales']);
?>
										</td>
									</tr>
									<tr>
										<td>
											<?php echo JText::_( 'TOTAL_UNPAID_AMOUNT' );
												echo $this->popup->display(
													'<img src="'.
HIKASHOP_IMAGES.'pay.png"
alt="'.JText::_('PAY_NOW').'"/>',
													'PAY_NOW',
													hikashop_completeLink('user&task=pay&user_id='.$this->user->user_id.'',true),
													'pay_link',
													760, 480, '', '', 'link'
												); ?>
										</td>
										<?php if(!empty($affiliate_payment_delay)){ ?><td
align="center">
											<?php echo
$this->escape(@$this->user->accumulated['currenttotal']);
?>
										</td><?php } ?>
										<td align="center">
											<?php echo
$this->escape(@$this->user->accumulated['total']);
?>
										</td>
									</tr>
								</tbody>
							</table>
						<?php } ?>
				</fieldset>
				<fieldset class="adminform">
					<legend><?php echo
JText::_('ADDRESSES');?></legend>
					<div class="toolbar" id="toolbar"
style="float: right;">
						<?php
						echo $this->popup->display(
							'<img src="'. HIKASHOP_IMAGES.'add.png"
alt="'.JText::_('ADD').'"/>',
							'ADD',
							hikashop_completeLink('user&task=editaddress&user_id='.$this->user->user_id.'',true),
							'add_address_link',
							760, 480, '', '', 'link'
						); ?>
					</div>
					<?php
						if(!empty($this->addresses)){
					?>
					<div style=" width: 300px ; margin-left: auto ; margin-right:
auto ;">
					<table width"100%">
					<?php
							foreach($this->addresses as $address){
								$this->address =& $address;
						?>
						<tr>
							<td>
								<input type="radio" name="address_default"
value="<?php echo
$this->address->address_id;?>"<?php
									if($this->address->address_default == 1) {
										echo ' checked="checked"';
									}
								?>
onclick="submitbutton('setdefault');"/>
							</td>
							<td>
								<span>
						<?php
								$params='';
								$js = '';
								$html =
hikashop_getLayout('order','address_template',$params,$js);
								foreach($this->fields['address'] as $field){
									$fieldname = $field->field_namekey;
									if(!empty($address->$fieldname))
$html=str_replace('{'.$fieldname.'}',$this->fieldsClass->show($field,$address->$fieldname),$html);
								}
								echo
str_replace("\n","<br/>\n",str_replace("\n\n","\n",preg_replace('#{(?:(?!}).)*}#i','',$html)));
						?>
								</span>
							</td>
							<td>
								<a href="<?php echo
hikashop_completeLink('user&task=deleteaddress&address_id='.$address->address_id.'&'.hikashop_getFormToken().'=1');?>"><img
src="<?php echo HIKASHOP_IMAGES;
?>delete.png"/></a>
								<?php
								echo $this->popup->display(
									'<img src="'.
HIKASHOP_IMAGES.'edit.png"
alt="'.JText::_('HIKA_EDIT').'"/>',
									'HIKA_EDIT',
									hikashop_completeLink('user&task=editaddress&user_id='.$this->user->user_id.'&address_id='.$address->address_id,true),
									'aedit_address_'.$address->address_id.'_link',
									760, 480, '', '', 'link'
								); ?>
							</td>
						</tr>
						<?php
							}
					?>
					</table>
					</div>
					<?php
						}
					?>

				</fieldset>
<?php if(!HIKASHOP_BACK_RESPONSIVE) { ?>
			</td>
			<td valign="top" width="50%">
<?php } else { ?>
	</div>
	<div class="span6">
<?php } ?>
				<fieldset class="adminform">
					<legend><?php echo
JText::_('ORDERS');?></legend>
					<table id="hikashop_user_order_listing"
class="adminlist table table-striped table-hover"
cellpadding="1">
						<thead>
							<tr>
								<th class="title titlenum">
									<?php echo JText::_( 'HIKA_NUM' );?>
								</th>
								<th class="title">
									<?php echo JText::_('ORDER_NUMBER'); ?>
								</th>
								<th class="title">
									<?php echo JText::_('PAYMENT_METHOD'); ?>
								</th>
								<th class="title">
									<?php echo JText::_('DATE'); ?>
								</th>
								<th class="title">
									<?php echo JText::_('HIKA_LAST_MODIFIED'); ?>
								</th>
								<th class="title">
									<?php echo JText::_('ORDER_STATUS'); ?>
								</th>
								<th class="title">
									<?php echo JText::_('HIKASHOP_TOTAL'); ?>
								</th>
								<th class="title">
									<?php echo JText::_( 'ID' ); ?>
								</th>
							</tr>
						</thead>
						<tbody>
							<?php
								$k = 0;
								$i = 0;
								foreach($this->rows as $row){
									$i++;
							?>
								<tr class="<?php echo "row$k";
?>">
									<td align="center">
									<?php echo $i; ?>
									</td>
									<td align="center">
										<a href="<?php echo
hikashop_completeLink('order&task=edit&cid[]='.$row->order_id.'&user_id='.$this->user->user_id);
?>">
											<?php echo $row->order_number; ?>
										</a>
									</td>
									<td align="center">
										<?php echo $row->order_payment_method; ?>
									</td>
									<td align="center">
										<?php echo
hikashop_getDate($row->order_created,'%Y-%m-%d %H:%M');?>
									</td>
									<td align="center">
										<?php echo
hikashop_getDate($row->order_modified,'%Y-%m-%d %H:%M');?>
									</td>
									<td align="center">
										<?php echo $row->order_status; ?>
									</td>
									<td align="center">
										<?php echo
$this->currencyHelper->format($row->order_full_price,$row->order_currency_id);?>
									</td>
									<td width="1%" align="center">
										<?php echo $row->order_id; ?>
									</td>
								</tr>
							<?php
									$k = 1-$k;
								}
							?>
						</tbody>
					</table>
				</fieldset>
<?php if(!HIKASHOP_BACK_RESPONSIVE) { ?>
			</td>
		</tr>
	</table>
</div>
<?php } else { ?>
	</div>
</div>
<?php } ?>
	<input type="hidden" name="cancel_redirect"
value="<?php echo
base64_encode(JRequest::getString('cancel_redirect'));?>"
/>
	<input type="hidden" name="cid[]"
value="<?php echo @$this->user->user_id; ?>" />
	<input type="hidden" name="order_id"
value="<?php echo JRequest::getInt('order_id',0);
?>" />
	<input type="hidden" name="option"
value="com_hikashop" />
	<input type="hidden" name="task" value=""
/>
	<input type="hidden" name="ctrl"
value="user" />
	<?php echo JHTML::_( 'form.token' ); ?>
</form>
user/tmpl/form_address.php000064400000010616151162050370011663
0ustar00<?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 if(empty($this->ajax)) { ?>
<div id="hikashop_user_addresses_show">
<?php } ?>
	<dl class="hika_options large">
		<dt><label><?php echo
JText::_('HIKASHOP_SELECT_DEFAULT_'.strtoupper($this->type).'_ADDRESS');
?></label></dt>
		<dd><?php

	$current = 0;
	$values = array();
	if(!empty($this->addresses[$this->type])) {
		foreach($this->addresses[$this->type] as $k => $address) {
			$addr = $this->addressClass->miniFormat($address,
$this->fields['address']);
			$values[] = JHTML::_('select.option', $k, $addr);
			if(!empty($address->address_default))
				$current = $address->address_id;
		}
	}
	if(empty($values))
		$values = array(JHTML::_('select.option', '',
JText::_('HIKA_NO_ADDRESS')));
	echo JHTML::_('select.genericlist', $values,
$this->type.'_address_default',
'class="hikashop_default_address_dropdown"
style="width:100%;"', 'value', 'text',
$current,
'hikashop_default_'.$this->type.'_address_selector');

		?></dd>
	</dl>

	<div class="hikashop_user_addresses_list">
<?php
if(empty($this->edit_address)) {
	foreach($this->addresses[$this->type] as $address) {
?>
	<div class="hikashop_user_address address_selection"
id="hikashop_user_address_<?php echo $address->address_id;
?>">
		<div class="hika_edit">
<?php
	echo $this->popup->display(
		'<i class="fas fa-pen"></i>',
		'HIKA_EDIT',
		hikashop_completeLink('user&task=editaddress&user_id='.$this->user->user_id.'&address_id='.$address->address_id,true),
		'edit_address_'.$address->address_id.'_link',
		760, 480,
'title="'.JText::_('HIKA_EDIT').'"',
'', 'link'
	);
?>
			<a href="<?php echo
hikashop_completeLink('user&task=deleteaddress&address_id='.$address->address_id.'&'.hikashop_getFormToken().'=1');?>"
title="<?php echo JText::_('HIKA_DELETE');
?>">
				<i class="fas fa-trash"></i>
			</a>
		</div>
<?php
	echo
$this->addressClass->displayAddress($this->fields['address'],
$address, 'order');
?>
	</div>
<?php
	}
?>
	</div>
	<div class="hikashop_user_addresses_button">
<?php
	echo $this->popup->display(
		'<i class="fa fa-plus"></i>
'.JText::_('ADD'),
		'ADD',
		hikashop_completeLink('user&task=editaddress&user_id='.$this->user->user_id.'&type='.$this->type,true),
		'add_address_link',
		760, 480, 'class="btn btn-success"', '',
'link'
	);
?>
	</div>
<?php
} else {
	foreach($this->fields['address'] as $fieldname => $field)
{
?>
	<dl id="hikamarket_user_address_<?php echo
$this->address->address_id; ?>_<?php echo
$fieldname;?>" class="hikam_options">
		<dt class="hikamarket_user_address_<?php echo
$fieldname;?>"><label><?php
			echo $this->fieldsClass->trans($field->field_realname);
			if($field->field_required && !empty($field->vendor_edit))
				echo ' <span
class="field_required">*</span>';
		?></label></dt>
		<dd class="hikamarket_user_address_<?php echo
$fieldname;?>"><?php
			if(!empty($field->vendor_edit)) {
				$onWhat = 'onchange';
				if($field->field_type == 'radio')
					$onWhat = 'onclick';

				$field->field_required = false;
				echo $this->fieldsClass->display(
						$field,
						@$this->address->$fieldname,
						'data[user_address]['.$fieldname.']',
						false,
						' ' . $onWhat .
'="window.hikashop.toggleField(this.value,\''.$fieldname.'\',\'user_address\',0);"',
						false,
						$this->fields['address'],
						$this->address
				);
			} else {
				echo $this->fieldsClass->show($field,
@$this->address->$fieldname);
			}
		?></dd>
	</dl>
<?php
	}
	echo '<input type="hidden"
name="data[user_address][address_id]"
value="'.@$this->address->address_id.'"/>';
	echo '<input type="hidden"
name="data[user_address][address_user_id]"
value="'.@$this->address->address_user_id.'"/>';
}
?>

<?php
if(empty($this->ajax)) {
?>
</div>
<script type="text/javascript">
if(!window.addressMgr) window.addressMgr = {};
window.addressMgr.deleteAddress = function(el) {
	return false;
};
window.addressMgr.editAddress = function(el) {
	return false;
};
window.addressMgr.newAddress = function(el) {
	return false;
};
window.addressMgr.submitAddress = function(el) {
	return false;
};
window.addressMgr.cancelEditAddress = function(el) {
	return false;
};
</script>
<?php
}
user/tmpl/form_affiliate.php000064400000017327151162050370012170
0ustar00user/tmpl/form_address.php000064400000010616151162050370011663
0ustar00bel><?php
			echo JText::_('AFFILIATE_ACCOUNT_ACTIVE');
		?></label></dt>
		<dd><?php
			echo JHTML::_('hikaselect.booleanlist',
'data[user][user_partner_activated]', '',
@$this->user->user_partner_activated);
		?></dd>
		<dt><label for="user_partner_email"><?php
			echo JText::_('PAYMENT_EMAIL_ADDRESS');
		?></label></dt>
		<dd class="input_large">
			<input type="text" size="30"
name="data[user][user_partner_email]"
id="user_partner_email" class="inputbox"
value="<?php echo
$this->escape(@$this->user->user_partner_email); ?>"
/>
		</dd>

		<dt><label><?php
			echo JText::_('PARTNER_CURRENCY');
		?></label></dt>
		<dd><?php
			if(!$this->config->get('allow_currency_selection', 0) ||
empty($this->user->user_currency_id)) {
				$this->user->user_currency_id = 
$this->config->get('partner_currency',1);
			}
			if($this->config->get('allow_currency_selection', 0)) {
				echo
$this->currencyType->display('data[user][user_currency_id]',
$this->ususer/tmpl/form_address.php000064400000010616151162050370011663
0ustar00boxType->display(
				'data[user][user_partner_id]',
				@$this->user->user_partner_id,
				hikashopNameboxType::NAMEBOX_SINGLE,
				'user',
				array(
					'delete' => true,
					'default_text' =>
'<em>'.JText::_('HIKA_NONE').'</em>',
				)
			);
		?></dd>

	</dl>

	<div id="custom_fees_panel" <?php
if(empty($this->user->user_params->user_custom_fee)) echo
'style="display:none"';?>>
	<dl class="hika_options large">
		<dt><label><?php
			echo JText::_('PARTNER_FEES_CURRENCY');
		?></label></dt>
		<dd><?php
			echo
$this->currencyType->display("data[user][user_params][partner_fee_currency]",@$this->user->user_params->partner_fee_currency);
		?></dd>
		<dt><label for="user_partner_email"><?php
			echo JText::_('PARTNER_LEAD_FEE');
		?></label></dt>
		<dd class="">
			<input type="text" size="5"
name="data[user][user_params][user_partner_lead_fee]"
class="inputbox" value="<?php echo
$this->escape(@$this->user->user_params->user_partner_lead_fee);
?>" />
		</dd>
		<dt><label for="user_partner_email"><?php
			echo JText::_('PARTNER_ORDER_PERCENT_FEE');
		?></label></dt>
		<dd class="">
			<input type="text" size="5"
name="data[user][user_params][user_partner_percent_fee]"
class="inputbox" value="<?php echo
$this->escape(@$this->user->user_params->user_partner_percent_fee);
?>" />%
		</dd>
		<dt><label for="user_partner_email"><?php
			echo JText::_('PARTNER_ORDER_FLAT_FEE');
		?></label></dt>
		<dd class="">
			<input type="text" size="5"
name="data[user][user_params][user_partner_flat_fee]"
class="inputbox" value="<?php echo
$this->escape(@$this->user->user_params->user_partner_flat_fee);
?>" />
		</dd>
		<dt><label for="user_partner_email"><?php
			echo JText::_('PARTNER_CLICK_FEE');
		?></label></dt>
		<dd class="">
			<input type="text" size="5"
name="data[user][user_params][user_partner_click_fee]"
class="inputbox" value="<?php echo
$this->escape(@$this->user->user_params->user_partner_click_fee);
?>" />
		</dd>
	</dl>
	</div>

</div></div>

<?php if(!empty($this->user->user_partner_activated)) { ?>
<div class="hkc-lg-6 hikashop_tile_block
hikashop_user_addresses_general"><div>
	<div class="hikashop_tile_title"><?php echo
JText::_('STATS'); ?></div>
<?php
	$affiliate_payment_delay =
$this->config->get('affiliate_payment_delay');
	if(!empty($affiliate_payment_delay))
		$delayType = hikashop_get('type.delay');
?>
	<table class="admintable table table-striped table-bordered
table-hover">
		<thead>
			<tr>
				<th></th>
				<th><?php echo JText::_('HIKASHOP_ACTIONS');
?></th>
<?php if(!empty($affiliate_payment_delay)) { ?>
				<th><?php
					echo hikashop_tooltip(JText::sprintf('AMOUNT_DELAY',
$delayType->displayDelay($this->config->get('affiliate_payment_delay'))),
JText::_('PAYABLE'), '',
JText::_('PAYABLE'))
				?></th>
<?php } ?>
				<th><?php echo JText::_('HIKASHOP_TOTAL');
?></th>
			</tr>
		</thead>
		<tbody>
			<tr>
				<td><?puser/tmpl/form_affiliate.php000064400000017327151162050370012170
0ustar00icks']);
				?></td>
			</tr>
			<tr>
				<td><?php echo JText::_('LEADS_UNPAID_AMOUNT');
?></td>
				<td><?php
					echo $this->popup->display(
						'<span
class="hikabtn">'.JText::_('HIKA_DETAILS').'</span>',
						'LEADS_UNPAID_AMOUNT',
						hikashop_completeLink('user&task=leads&user_id='.$this->user->user_id.'',true),
						'leads_link',
						760, 480, '', '', 'link'
					);
				?></td>
<?php if(!empty($affiliate_payment_delay)) { ?>
				<td class="hk_center"><?php
					echo
$this->escape(@$this->user->accumulated['currentleads']);
				?></td>
<?php } ?>
				<td class="hk_center"><?php
					echo
$this->escape(@$this->user->accumulated['leads']);
				?></td>
			</tr>
			<tr>
				<td><?php echo JText::_('SALES_UNPAID_AMOUNT');
?></td>
				<td><?php
					echo $this->popup->display(
						'<span
class="hikabtn">'.JText::_('HIKA_DETAILS').'</span>',
						'SALES_UNPAuser/tmpl/form_affiliate.php000064400000017327151162050370012170
0ustar00ment_delay)) {
		$total = @$this->user->accumulated['currenttotal'];
	}
	if($total > 0) {
		echo $this->popup->display(
			'<span
class="hikabtn">'.JText::_('PAY_NOW').'</span>',
			'PAY_NOW',
			hikashop_completeLink('user&task=pay&user_id='.$this->user->user_id.'',true),
			'pay_link',
			760, 480, '', '', 'link'
		);
	}
				?></td>
<?php if(!empty($affiliate_payment_delay)) { ?>
				<td class="hk_center"><?php
					echo
$this->escape(@$this->user->accumulated['currenttotal']);
				?></td>
<?php } ?>
				<td class="hk_center"><?php
					echo
$this->escape(@$this->user->accumulated['total']);
				?></td>
			</tr>
	</tbody>
</table>

</div></div>
<?php } ?>

<div class="clear_both"></div>
user/tmpl/index.html000064400000000032151162050370010466
0ustar00<html><body></body></html>user/tmpl/leads.php000064400000010501151162050370010274
0ustar00<?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');
?><div class="iframedoc"
id="iframedoc"></div>
<form action="<?php echo
hikashop_completeLink('user'); ?>"
method="post"  name="adminForm"
id="adminForm">
	<table>
		<tr>
			<td width="100%">
				<?php echo JText::_( 'FILTER' ); ?>:
				<input type="text" name="search"
id="search" value="<?php echo
$this->escape($this->pageInfo->search);?>"
class="text_area"
onchange="document.adminForm.submit();" />
				<button class="btn"
onclick="this.form.submit();"><?php echo JText::_(
'GO' ); ?></button>
				<button class="btn"
onclick="document.getElementById('search').value='';this.form.submit();"><?php
echo JText::_( 'RESET' ); ?></button>
			</td>
		</tr>
	</table>
	<table class="adminlist table table-striped table-hover"
cellpadding="1">
		<thead>
			<tr>
				<th class="title titlenum">
					<?php echo JText::_( 'HIKA_NUM' );?>
				</th>
				<th class="title">
					<?php echo JHTML::_('grid.sort',
JText::_('HIKA_USER_NAME'), 'b.name',
$this->pageInfo->filter->order->dir,$this->pageInfo->filter->order->value
); ?>
				</th>
				<th class="title">
					<?php echo JHTML::_('grid.sort',
JText::_('HIKA_USERNAME'), 'b.username',
$this->pageInfo->filter->order->dir,$this->pageInfo->filter->order->value
); ?>
				</th>
				<th class="title">
					<?php echo JHTML::_('grid.sort',
JText::_('HIKA_EMAIL'), 'a.user_email',
$this->pageInfo->filter->order->dir,$this->pageInfo->filter->order->value
); ?>
				</th>
				<?php
				if(!empty($this->fields)){
					foreach($this->fields as $field){
						echo '<th
class="title">'.JHTML::_('grid.sort',
$this->fieldsClass->trans($field->field_realname),
'a.'.$field->field_namekey,
$this->pageInfo->filter->order->dir,$this->pageInfo->filter->order->value
).'</th>';
					}
				}
				?>
				<th class="title">
					<?php echo JHTML::_('grid.sort',
JText::_('TOTAL_UNPAID_AMOUNT'),
'a.user_unpaid_amount',
$this->pageInfo->filter->order->dir,$this->pageInfo->filter->order->value
); ?>
				</th>
				<th class="title">
					<?php echo JHTML::_('grid.sort',   JText::_(
'ID' ), 'a.user_id',
$this->pageInfo->filter->order->dir,
$this->pageInfo->filter->order->value ); ?>
				</th>
			</tr>
		</thead>
		<tfoot>
			<tr>
				<td colspan="<?php $count = 6+count($this->fields); echo
$count;?>">
					<?php echo $this->pagination->getListFooter(); ?>
					<?php echo $this->pagination->getResultsCounter(); ?>
				</td>
			</tr>
		</tfoot>
		<tbody>
			<?php
				$k = 0;
				for($i = 0,$a = count($this->rows);$i<$a;$i++){
					$row =& $this->rows[$i];
			?>
				<tr class="<?php echo "row$k"; ?>">
					<td align="center">
					<?php echo $this->pagination->getRowOffset($i);
					?>
					</td>
					<td>
						<?php echo @$row->name; ?>
					</td>
					<td>
						<?php echo @$row->username; ?>
					</td>
					<td>
						<?php echo $row->user_email; ?>
					</td>
					<?php
					if(!empty($this->fields)){
						foreach($this->fields as $field){
							$namekey = $field->field_namekey;
							echo
'<td>'.$row->$namekey.'</td>';
						}
					}
					?>
					<td align="center">
						<?php
						if(bccomp($row->user_partner_price,0,5)){
							echo
$this->currencyHelper->format($row->user_partner_price,$this->user->user_currency_id);
						}
						?>
					</td>
					<td width="1%" align="center">
						<?php echo $row->user_id; ?>
					</td>
				</tr>
			<?php
					$k = 1-$k;
				}
			?>
		</tbody>
	</table>
	<input type="hidden" name="option"
value="<?php echo
HIKASHOP_COMPONuser/tmpl/index.html000064400000000032151162050370010466
0ustar00user/tmpl/listing.phpuser/tmpl/leads.php000064400000010501151162050370010274
0ustar00user/tmpl/index.html000064400000000032151162050370010466
0ustar00ea" />
				<button
class=user/tmpl/leads.php000064400000010501151162050370010274
0ustar00alse);
	}
if(HIKASHOP_BACK_RESPONSIVE) { ?>
		</div>
	</div>
<?php } else { ?>
			</td>
		</tr>
	</table>
<?php } ?>
	<table id="hikashop_user_listing" class="adminlist table
table-striped table-hover" cellpadding="1">
		<thead>
			<tr>
				<th class="title titlenum">
					<?php echo JText::_( 'HIKA_NUM' );?>
				</th>
				<th class="title titlebox">
					<input type="checkbox" name="toggle"
value="" onclick="hikashop.checkAll(this);" />
				</th>
				<th class="title">
					<?php echo JText::_('HIKA_EDIT'); ?>
				</th>
				<th class="title">
					<?php echo JHTML::_('grid.sort',
JText::_('HIKA_USER_NAME'), 'juser.name',
$this->pageInfo->filter->order->dir,$this->pageInfo->filter->order->value
); ?>
				</th>
				<th class="title">
					<?php echo JHTML::_('grid.sort',
JText::_('HIKA_USERNAME'), 'juser.username',
$this->pageInfo->filter->order->dir,$this->pageInfo->filter->order->value
); ?>
				</th>
				<th class="title">
					<?php echo JHTML::_('grid.sort',
JText::_('HIKA_EMAIL'), 'huser.user_email',
$this->pageInfo->filter->order->dir,$this->pageInfo->filter->order->value
); ?>
				</th>
				<?php
				if(!empty($this->fields)){
					foreach($this->fields as $field){
						echo '<th
class="title">'.JHTML::_('grid.sort',
$this->fieldsClass->trans($field->field_realname),
'huser.'.$field->field_namekey,
$this->pageInfo->filter->order->dir,$this->pageInfo->filter->order->value
).'</th>';
					}
				}
				if($this->pageInfo->filter->filter_partner==1){?>
				<th class="title">
					<?php echo JHTML::_('grid.sort',
JText::_('TOTAL_UNPAID_AMOUNT'),
'huser.user_unpaid_amount',
$this->pageInfo->filter->order->dir,$this->pageInfo->filter->order->value
); ?>
				</th>
				<?php }?>
				<th class="title">
					<?php echo JHTML::_('grid.sort',   JText::_(
'ID' ), 'huser.user_id',
$this->pageInfo->filter->order->dir,
$this->pageInfo->filter->order->value ); ?>
				</th>
			</tr>
		</thead>
		<tfoot>
			<tr>
				<td colspan="<?php
				$count = 7+count($this->fields);
				if($this->pageInfo->filter->filter_partner==1){
					$count++;
				}
				echo $count;
				?>">
					<?php echo $this->pagination->getListFooter(); ?>
					<?php echo $this->pagination->getResultsCounter(); ?>
				</td>
			</tr>
		</tfoot>
		<tbody>
			<?php
				$k = 0;
				for($i = 0,$a = count($this->rows);$i<$a;$i++){
					$row =& $this->rows[$i];
			?>
				<tr class="<?php echo "row$k"; ?>">
					<td align="center">
					<?php echo $this->pagination->getRowOffset($i);
					?>
					</td>
					<td align="center">
						<?php echo JHTML::_('grid.id', $i, $row->user_id );
?>
					</td>
					<td align="center">
						<?php if($this->manage){ ?>
							<a href="<?php echo
hikashop_completeLink('user&task=edit&cid[]='.$row->user_id);
?>">
								<img src="<?php echo HIKASHOP_IMAGES;?>edit.png"
alt=user/tmpl/listing.php000064400000014657151162050370010675
0ustar00row->user_currency_id)){
								$row->user_currency_id = 
$config->get('partner_currency',1);
							}
							echo
$this->currencyHelper->format($row->user_unpaid_amount,$row->user_currency_id);
						}
						?>
					</td>
					<?php }?>
					<td width="1%" align="center">
						<?php echo $row->user_id; ?>
					</td>
				</tr>
			<?php
					$k = 1-$k;
				}
			?>
		</tbody>
	</table>
	<input type="hidden" name="option"
value="<?php echo HIKASHOP_COMPONENT; ?>" />
	<input type="hidden" name="task" value=""
/>
	<input type="hidden" name="ctrl"
value="<?php echo JRequest::getCmd('ctrl'); ?>"
/>
	<input type="hidden" name="boxchecked"
value="0" />
	<input type="hidden" name="filter_order"
value="<?php echo
$this->pageInfo->filter->order->value; ?>" />
	<input type="hidden" name="filter_order_Dir"
valuuser/tmpl/listing.php000064400000014657151162050370010675
0ustar00<?xml version="1.0" encoding="utf-8"?>
<metadata>
	<layout title="COM_HIKASHOP_DISCOUNTS_VIEW_TITLE">
		<message>
			<![CDATA[COM_HIKASHOP_DISCOUNTS_VIEW_DESC]]>
		</message>
	</layout>
</metadata>user/tmpl/pay.php000064400000002563151162050370010006
0ustar00<?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');
?><div style="text-align:center">
	<form
action="index.php?option=com_hikashop&amp;ctrl=user"
method="post"  name="adminForm"
id="adminForm" >
	<?php
	echo
JText::sprintf('PAY_X_TO_X',$this->currencyHelper->format($this->user->accumulated['currenttotal'],$this->user->user_currency_id),@$this->user->name.'
('.$this->user->user_partner_email.')');
	echo '<br/>';
	echo
JText::sprintf('REDIRECTION_FOR_PAYMENT',$this->method);
	echo '<br/>';
	echo JHTML::_('hikaselect.booleanlist', "pay",
'',0);
	echo '<br/>';
	?>
		<input type="button" name="pay_confirm"
class="btn" value="<?php echo
JText::_('PROCEED');?>"
onclick="document.adminForm.submit();" />
		<input type="hidden" name="cid[]"
value="<?php echo @$this->user->user_id; ?>" />
		<input type="hidden" name="tmpl"
value="component" />
		<input type="hidden" name="pay_method"
value="<?php echo $this->method;?>" />
		<input type="hidden" name="option"
value="com_hikashop" />
		<input type="hidden" name="task"
value="pay_confirm" />
		<input type="hidden" name="ctrl"
value="user" />
		<?php echo JHTML::_( 'form.token' ); ?>
	</form>
</div>
user/tmpl/sales.php000064400000011344151162050370010321 0ustar00<?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');
?><div class="iframedoc"
id="iframedoc"></div>
<form action="<?php echo
hikashop_completeLink('order'); ?>"
method="post"  name="adminForm"
id="adminForm">
	<table>
		<tr>
			<td width="100%">
				<?php echo JText::_( 'FILTER' ); ?>:
				<input type="text" name="search"
id="search" value="<?php echo
$this->escape($this->pageInfo->search);?>"
class="text_area"
onchange="document.adminForm.submit();" />
				<button class="btn"
onclick="this.form.submit();"><?php echo JText::_(
'GO' ); ?></button>
				<button class="btn"
onclick="document.getElementById('search').value='';this.form.submit();"><?php
echo JText::_( 'RESET' ); ?></button>
			</td>
		</tr>
	</table>
	<table class="adminlist table table-striped table-hover"
cellpadding="1">
		<thead>
			<tr>
				<th class="title titlenum">
					<?php echo JText::_( 'HIKA_NUM' );?>
				</th>
				<th class="title">
					<?php echo JText::_('ORDER_NUMBER'); ?>
				</th>
				<th class="title">
					<?php echo JHTML::_('grid.sort',
JText::_('CUSTOMER'), 'c.name',
$this->pageInfo->filter->order->dir,$this->pageInfo->filter->order->value
); ?>
				</th>
				<th class="title">
					<?php echo JHTML::_('grid.sort',
JText::_('PAYMENT_METHOD'), 'b.order_payment_method',
$this->pageInfo->filter->order->dir,$this->pageInfo->filter->order->value
); ?>
				</th>
				<th class="title">
					<?php echo JHTML::_('grid.sort',
JText::_('DATE'), 'b.order_created',
$this->pageInfo->filter->order->dir,$this->pageInfo->filter->order->value
); ?>
				</th>
				<th class="title">
					<?php echo JHTML::_('grid.sort',  
JText::_('ORDER_STATUS'), 'b.order_status',
$this->pageInfo->filter->order->dir,
$this->pageInfo->fiuser/tmpl/listing.xml000064400000000314151162050370010667
0ustar00nfo->filter->order->value ); ?>
				</th>
			</tr>
		</thead>
		<tfoot>
			<tr>
				<td colspan="9">
					<?php echo $this->pagination->getListFooter(); ?>
					<?php echo
$this->pagination->getReuser/tmpl/pay.php000064400000002563151162050370010006
0ustar00user/tmpl/listing.xml000064400000000314151162050370010667
0ustar00			$k = 1-$k;
				}
			?>
		</tbody>
	</table>
	<input type="hidden" name="option"
value="<?php echo HIKASHOP_COMPONENT; ?>" />
	<input type="hidden" name="task"
value="sales" />
	<input
type="hidduser/tmpl/pay.php000064400000002563151162050370010006
0ustar00user/tmpl/sales.php000064400000011344151162050370010321
0ustar00<?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 if( !$this->singleSelection ) { ?>
<fieldset>
	<div class="toolbar" id="toolbar"
style="float: right;">
		<button class="btn" type="button"
onclick="hikashop_setId(this);"><img src="<?php
echo HIKASHOP_IMAGES; ?>add.png"/><?php echo
JText::_('OK'); ?></button>
	</div>
</fieldset>
<script type="text/javascript">
function hikashop_setId(el) {
	if(document.adminForm.boxchecked.value==0){
		alert('<?php echo JText::_('PLEASE_SELECT_SOMETHING',
true); ?>');
	}else{
		el.form.ctrl.value = '<?php echo $this->ctrl ?>';
		hikamarket.submitform("<?php echo $this->task;
?>",el.form);
	}
}
<user/tmpl/sales.php000064400000011344151162050370010321
0ustar00h);?>" class="text_area"
onchange="this.form.submit();" />
				<button class="btn"
onclick="this.form.submit();"><?php echo
JText::_('GO'); ?></button>
				<button class="btn"
onclick="document.getElementById('search').value='';this.form.submit();"><?php
echo JText::_('RESET'); ?></button>
			</td>
		</tr>
	</table>
	<table class="adminlist hika_listing <?php echo
(HIKASHOP_RESPONSIVE)?'table table-striped
table-hover':'hikam_table'; ?>"
style="cell-spacing:1px">
		<thead>
			<tr>
				<th class="title titlenum">
					<?php echo JText::_( 'HIKA_NUM' );?>
				</th>
<?php if( !$this->singleSelection ) { ?>
				<th class="title titlebox">
					<input type="checkbox" name="toggle"
value="" onclick="checkAll(this);" />
				</th>
<?php } ?>
				<th class="title"><?php
					echo JHTML::_('grid.sort', JText::_('HIKA_LOGIN'),
'a.user_login', $this->pageInfo->filter->order->dir,
$this->pageInfo->filter->order->value ,'selection');
				?></th>
				<th class="title"><?php
					echo JHTML::_('grid.sort', JText::_('HIKA_NAME'),
'a.user_name', $this->pageInfo->filter->order->dir,
$this->pageInfo->filter->order->value,'selection' );
				?></th>
				<th class="title"><?php
					echo JHTML::_('grid.sort', JText::_('HIKA_EMAIL'),
'a.user_email', $this->pageInfo->filter->order->dir,
$this->pageInfo->filter->order->value ,'selection');
				?></th>
				<th class="title"><?php
					echo JHTML::_('grid.sort', JText::_('ID'),
'a.user_id', $this->pageInfo->filter->order->dir,
$this->pageInfo->filter->order->value,'selection' );
				?></th>
			</tr>
		</thead>
		<tfoot>
			<tr>
				<td colspan="10">
					<?php echo $this->pagination->getListFooter(); ?>
					<?php echo $this->pagination->getResultsCounter(); ?>
				</td>
			</tr>
		</tfoot>
		<tbody>
<?php
	$k = 0;
	foreach($this->rows as $i => $row) {

		$lbl1 = ''; $lbl2 = '';
		$extraTr = '';
		if( $this->singleSelection ) {
			if($this->confirm) {
				$data = '{id:'.$row->user_id;
				foreach($this->elemStruct as $s) {
					if($s == 'id')
						continue;
					$data .= ','.$s.':\''.
str_replace(array('\'','"'),array('\\\'','\\\''),$row->$s).'\'';
				}
				$data .= '}';
				$extraTr = ' style="cursor:pointer"
onclick="window.top.hikashop.submitBox('.$data.');"';
			} else {
				$extraTr = ' style="cursor:pointer"
onclick="hikashop_setId(\''.$row->user_id.'\');"';
			}
		} else {
			$lbl1 = '<label for="cb'.$i.'">';
			$lbl2 = '</label>';
			$extraTr = '
onclick="hikashop.checkRow(\'cb'.$i.'\');"';
		}

		if(!empty($this->pageInfo->search)) {
			$row = hikashop_search($this->pageInfo->search, $row,
'user_id');
		}
?>
			<tr class="row<?php echo $k; ?>"<?php echo
$extraTr; ?>>
				<td align="center">
					<?php echo $this->pagination->getRowOffset($i); ?>
				</td>
<?php if( !$this->singleSelection ) { ?>
				<td align="center">
					<?php echo JHTML::_('grid.id', $i, $row->user_id );
?>
				</td>
<?php } ?>
				<td>
					<?php echo $lbl1 . $row->username . $lbl2; ?>
				</td>
				<td>
					<?php echo $lbl1 . $row->name . $lbl2; ?>
				</td>
				<td>
					<?php echo $lbl1 . $row->user_email . $lbl2; ?>
				</td>
				<td width="1%" align="center">
					<?php echo $row->user_id; ?>
				</td>
			</tr>
<?php
		$k = 1-$k;
	}
?>
user/tmpl/selection.php000064400000013737151162050370011207 0ustar00r"
value="<?php echo $this->pageInfo->filter->order->dir;
?>" />
<?php
	if(!empty($this->afterParams)) {
		foreach($this->afterParams as $p) {
			if(empty($p[0]) || !isset($p[1]))
				continue;
			echo '<input type="hidden"
name="'.$this->escape($p[0]).'"
value="'.$this->escape($p[1]).'"/>' .
"\r\n";
		}
	}
?>
	<?php echo JHTML::_('form.token'); ?>
</form>
<script type="text/javascript">
document.adminForm = document.getElementById("hikashop_form");
</script>
user/tmpl/useselection.php000064400000003720151162050370011713
0user/tmpl/selection.php000064400000013737151162050370011207 0ustar00?php
echo JText::_('HIKA_NAME'); ?></label></td>
			<td id="hikashop_order_customer_name"><?php echo
$this->rows->name; ?></td>
		</tr>
		<tr>
			<td class="key"><label><?php echo
JText::_('HIKA_EMAIL'); ?></label></td>
			<td id="hikashop_order_customer_email"><?php echo
$this->rows->email; ?></td>
		</tr>
		<tr>
			<td class="key"><label><?php echo
JText::_('ID'); ?></label></td>
			<td id="hikashop_order_customer_id"><?php echo
$this->rows->user_id; ?></td>
		</tr>
	</table>
<?php } else { ?>
	<?php echo JText::_('HIKA_CONFIRM_USERS')?><br/>
	<table class="adminlist hika_listing">
		<thead>
			<tr>
				<th class="title">
					<?php echo JText::_('HIKA_LOGIN'); ?>
				</th>
				<th class="title">
					<?php echo JText::_('HIKA_NAME'); ?>
				</th>
				<th class="title">
					<?php echo JText::_('HIKA_EMAIL'); ?>
				</th>
				<th class="title">
					<?php echo JText::_('ID'); ?>
				</th>
			</tr>
		</thead>
<?php foreach($this->rows as $row) { ?>
		<tr>
			<td><?php echo $row->login; ?></td>
			<td><?php echo $row->name; ?></td>
			<td><?php echo $row->email; ?></td>
			<td><?php echo $row->user_id; ?></td>
		</tr>
<?php } ?>
	</table>
<?php } ?>
	<div class="hika_confirm_btn"><button
class="btn" onclick="window.top.hikashop.submitBox(<?php
echo $this->data; ?>); return false;"><img
src="<?php echo HIKASHOP_IMAGES ?>save.png"
style="vertical-align:middle" alt=""/>
<span><?php echo 'OK';
?></span></button></div>
</div>
view/index.html000064400000000032151162050370007506
0ustar00<html><body></body></html>view/tmpl/form.php000064400000005326151162050370010154
0ustar00<?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');
?><form action="<?php echo
hikashop_completeLink('view');?>" method="post"
 name="adminForm" id="adminForm">

	<?php if($this->ftp){ ?>
	<fieldset title="<?php echo JText::_('DESCFTPTITLE');
?>">
		<legend><?php echo JText::_('DESCFTPTITLE');
?></legend>

		<?php echo JText::_('DESCFTP'); ?>

		<?php if(JError::isError($this->ftp)){ ?>
			<p><?php echo JText::_($this->ftp->message);
?></p>
		<?php } ?>

		<table class="adminform nospace">
		<tbody>
		<tr>
			<td width="120">
				<label for="username"><?php echo
JText::_('HIKA_USERNAME'); ?>:</label>
			</td>
			<td>
				<input type="text" id="username"
name="username" class="input_box" size="70"
value="" />
			</td>
		</tr>
		<tr>
			<td width="120">
				<label for="password"><?php echo
JText::_('HIKA_PASSWORD'); ?>:</label>
			</td>
			<td>
				<input type="password" id="password"
name="password" class="input_box" size="70"
value="" />
			</td>
		</tr>
		</tbody>
		</table>
	</fieldset>
	<?php } ?>

	<table id="hikashop_edit_view" class="adminform
table">
	<tr>
		<th><?php
			if($this->element->type_name != HIKASHOP_COMPONENT &&
!empty($this->element->type_pretty_name)) {
				echo $this->element->type_pretty_name . ' -
'user/tmpl/useselection.php000064400000003720151162050370011713
0ustar00$this->element->view .' /
'.$name[0].'_<input type="text"
name="duplicate" id="duplicate"
value="'.$name[1].'"/>.php';
			} else {
				echo $this->element->view .' / '.
$this->element->filename;
			}
		?></th>
	</tr>
	<tr>
		<td>
			<?php echo
$this->editor->displayCode('filecontent',$this->element->content);
?>
		</td>
	</tr>
	</table>

	<div class="clr"></div>

	<input type="hidden" name="id" value="<?php
echo $this->element->id; ?>" />
	<input type="hidden" name="option"
value="<?php echo HIKASHOP_COMPONENT;?>" />
	<input type="hidden" name="task" value=""
/>
	<input type="hidden" name="ctrl"
value="<?php echo JRequest::getString('ctrl');?>"
/>
	<?php echo JHTML::_( 'form.token' ); ?>
</form>
user/tmpl/useselection.php000064400000003720151162050370011713
0ustar00<html><body></body></html>view/index.html000064400000000032151162050370007506
0ustar00<?php
/**
 * @package	Hiview/tmpl/form.php000064400000005326151162050370010154
0ustar00view/index.html000064400000000032151162050370007506
0ustar00		</td>
		</tr>
		</tbodview/tmpl/form.php000064400000005326151162050370010154
0ustar00view['component']] = true;
						}
					}
					unset($components);
					echo JHTML::_('hikaselect.genericlist', $values,
'component', 'class="inputbox"
onchange="document.adminForm.submit();return false;"
size="1"', 'value', 'text',
$this->pageInfo->filter->component);
				}?>
				<?php
					echo JHTML::_('hikaselect.genericlist', $this->viewTypes,
"viewType", 'class="inputbox" size="1"
onchange="document.adminForm.submit();return false;"',
'value', 'text',
@$this->pageInfo->filter->viewType);
				 ?>
				<?php echo
$this->templateType->display("template",$this->pageInfo->filter->template,$this->templateValues);?>
				<?php echo
$this->viewType->display("client_id",$this->pageInfo->filter->client_id);?>
			</td>
		</tr>
	</table>
	<table id="hikashop_view_listing" class="adminlist table
table-striped table-hover" cellpadding="1">
		<thead>
			<tr>
				<th class="title titlenum">
					<?php echo JText::_( 'HIKA_NUM' );?>
				</th>
				<th class="title">
					<?php echo JText::_('CLIENT'); ?>
				</th>
				<th class="title">
					<?php echo JText::_('HIKA_TEMPLATE'); ?>
				</th>
				<th class="title">
					<?php echo JText::_('HIKA_VIEW'); ?>
				</th>
				<th class="title">
					<?php echoview/tmpl/index.html000064400000000032151162050370010462
0ustar00Route::_('index.php?optionview/tmpl/listing.php000064400000014274151162050370010664
0ustar00view/tmpl/index.html000064400000000032151162050370010462
0ustar00lter->order->value; ?>"
/>view/tmpl/listing.php000064400000014274151162050370010664
0ustar00<?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 ViewViewView extends hikashopView{
	var $type = '';
	var $ctrl= 'view';
	var $nameListing = 'VIEWS';
	var $nameForm = 'VIEWS';
	var $icon = 'view';
	function display($tpl = null){
		$this->paramBase =
HIKASHOP_COMPONENT.'.'.$this->getName();
		$function = $this->getLayout();
		if(method_exists($this,$function)) $this->$function();
		parent::display($tpl);
	}

	function getName(){
		return 'view';
	}

	function listing(){
		$app = JFactory::getApplication();
		$pageInfo = new stdClass();
		$pageInfo->filter = new stdClass();
		$pageInfo->filter->order = new stdClass();
		$pageInfo->limit = new stdClass();
		$pageInfo->filter->client_id =
$app->getUserStateFromRequest(HIKASHOP_COMPONENT.'.client_id',
'client_id', 2 , 'int');
		$pageInfo->filter->template =
$app->getUserStateFromRequest(HIKASHOP_COMPONENT.'.template',
'template', '' , 'string');
		$pageInfo->filter->component =
$app->getUserStateFromRequest(HIKASHOP_COMPONENT.'.component',
'component', '' , 'string');
		$pageInfo->filter->viewType =
$app->getUserStateFromRequest(HIKASHOP_COMPONENT.'.viewType',
'viewType', '' , 'string');
		$pageInfo->limit->value =
$app->getUserStateFromRequest($this->paramBase.'.limit',
'limit', $app->getCfg('list_limit'),
'int');
		if(empty($pageInfo->limit->value)) $pageInfo->limit->value =
500;
		if(JRequest::getVar('search')!=$app->getUserState($this->paramBase.".search")){
			$app->setUserState( $this->paramBase.'.limitstart',0);
			$pageInfo->limit->start = 0;
		}else{
			$pageInfo->limit->start = $app->getUserStateFromRequest(
$this->paramBase.'.limitstart', 'limitstart', 0,
'int' );
		}
		$pageInfo->search = $app->getUserStateFromRequest(
$this->paramBase.'.search', 'search', '',
'string' );
		$pageInfo->filter->order->value =
$app->getUserStateFromRequest(
$this->paramBase.'.filter_order',
'filter_order',	'a.user_id','cmd' );
		$pageInfo->filter->order->dir	=
$app->getUserStateFromRequest(
$this->paramBase.'.filter_order_Dir',
'filter_order_Dir',	'desc',	'word' );

		$views = array();
		switch($pageInfo->filter->client_id){
			case 0:
				$views[0] = HIKASHOP_FRONT.'views'.DS;
				break;
			case 1:
				$views[1] = HIKASHOP_BACK.'views'.DS;
				break;
			default:
				$views[0] = HIKASHOP_FRONT.'views'.DS;
				$views[1] = HIKASHOP_BACK.'views'.DS;
				break;
		}

		JPluginHelper::importPlugin('hikashop');
		$dispatcher = JDispatcher::getInstance();
		$pluginViews = array();
		$dispatcher->trigger('onViewsListingFilter',
array(&$pluginViews, $pageInfo->filter->client_id));
		if(!empty($pluginViews)) {
			$i = 2;
			foreach($pluginViews as $pluginView) {
				$views[$i++] = $pluginView;
			}
		}
		$this->assignRef('pluginViews', $pluginViews);

		jimport('joomla.filesystem.folder');
		if(version_compare(JVERSION,'1.6','<')){
			require_once
(rtrim(JPATH_ADMINISTRATOR,DS).DS.'components'.DS.'com_templates'.DS.'helpers'.DS.'template.php');
		}
		$templates = array();
		$templateValues = array();

		foreach($views as $client_id => $view){
			$component_name = '';
			$component = HIKASHOP_COMPONENT;
			if(is_array($view)) {
				$client_id = $view['client_id'];
				$component_name = $view['name'];
				$component = $view['component'];
				$view = $view['view'];
			}

			if(!empty($pageInfo->filter->component) &&
$pageInfo->filter->component != $component)
				continue;

			$folders = JFolder::folders($view);
			if(empty($folders))
				continue;

			$clientTemplates = array();
			foreach($folders as $folder){
				if(JFolder::exists($view.$folder.DS.'tmpl')){
					$files = JFolder::files($view.$folder.DS.'tmpl');
					if(!empty($files)){
						foreach($files as $file){
							if(substr($file,-4)=='.php'){
								$obj = new stdClass();
								$obj->path = $view.$folder.DS.'tmpl'.DS.$file;
								$obj->filename = $file;
								$obj->folder = $view.$folder.DS.'tmpl'.DS;
								$obj->client_id = $client_id;
								$obj->view = $folder;
								$obj->type = 'component';
								$obj->type_name = $component;
								$obj->file = substr($file,0,strlen($file)-4);
								$clientTemplates[]=$obj;
							}
						}
					}
				}
			}

			if($client_id==0 && $component == HIKASHOP_COMPONENT){
				$plugins_folder =
rtrim(JPATH_PLUGINS,DS).DS.'hikashoppayment';
				if(Jfolder::exists($plugins_folder)){
					$files = Jfolder::files($plugins_folder);
					foreach($files as $file){
						if(preg_match('#^.*_(?!configuration).*\.php$#',$file)){view/view.html.php000064400000030655151162050370010155
0ustar00tDBO();
					$db->setQuery($query);
					$joomlaTemplates = $db->loadObjectList();
					foreach($joomlaTemplates as $k => $v){
						$joomlaTemplates[$k]->assigned =
$joomlaTemplates[$k]->protected;
						$joomlaTemplates[$k]->published =
$joomlaTemplates[$k]->enabled;
						$joomlaTemplates[$k]->directory =
$joomlaTemplates[$k]->element;
					}

				}
				for($i = 0; $i < count($joomlaTemplates); $i++)  {
					if(version_compare(JVERSION,'1.6','<')){
						$joomlaTemplates[$i]->assigned =
TemplatesHelper::isTemplateAssigned($joomlaTemplates[$i]->directory);
						$joomlaTemplates[$i]->published =
TemplatesHelper::isTemplateDefault($joomlaTemplates[$i]->directory,
$client->id);
view/view.html.php000064400000030655151162050370010155
0ustar00->view.DS;
							}
							$templatePerJoomlaTemplate->override .= $template->filename;
							$templatePerJoomlaTemplate->overriden=false;

							if(file_exists($templatePerJoomlaTemplate->override)){
								$templatePerJoomlaTemplate->overriden=true;
							}
							$templatePerJoomlaTemplate->id =
$templatePerJoomlaTemplate->client_id.'|'.$templatePerJoomlaTemplate->template
.'|'. $templatePerJoomlaTemplate->type.'|'.
$templatePerJoomlaTemplate->type_name.'|'.
$templatePerJoomlaTemplate->view.'|'.$templatePerJoomlaTemplate->filename;
							$key =
$templatePerJoomlaTemplate->client_id.'|'.$templatePerJoomlaTemplate->template
.'|'.$templatePerJoomlaTemplate->type_name.'|'.
$templatePerJoomlaTemplate->view.'|'.$templatePerJoomlaTemplate->filename;

							if(!empty($pageInfo->filter->viewType) &&
$templatePerJoomlaTemplate->view!=$pageInfo->filter->viewType){
								continue;
							}

							$templates[$key]=$templatePerJoomlaTemplate;
						}

						if(JFolder::exists($templateFolder.'html'.DS.$component.DS)){
							$folders =
JFolder::folders($templateFolder.'html'.DS.$component.DS);
							if(!empty($folders)){
								foreach($folders as $folder){

									$files =
JFolder::files($templateFolder.'html'.DS.$component.DS.$folder);
									if(empty($files))
										continue;
									foreach($files as $file) {
										if(substr($file,-4)!='.php')
											continue;

										$filename =
$templateFolder.'html'.DS.$component.DS.$folder.DS.$file;
										$found = false;
										foreach($templates as $tpl) {
											if($tpl->override == $filename) {
												$found = true;
												break;
											}
										}
										if(!$found) {
											$obj = new stdClass();
											$obj->path = $view.$folder.DS.'tmpl'.DS.$file;
											$obj->filename = $file;
											$obj->folder = $view.$folder.DS.'tmpl'.DS;
											$obj->client_id = $client_id;
											$obj->view = $folder;
											$obj->template = $joomlaTemplates[$i]->directory;
											$obj->type = 'component';
											$obj->type_name = $component;
											$obj->file = substr($file,0,strlen($file)-4);
											$obj->override = $filename;
											$obj->overriden = true;
											$obj->id =
$obj->client_id.'|'.$obj->template.'|'.$obj->type.'|'.$obj->type_name.'|'.$obj->view.'|'.$obj->filename;
											$key =
$obj->client_id.'|'.$obj->template.'|'.$obj->view.'|'.$obj->filename;
											$templates[$key]=$obj;
										}
									}
								}
							}
						}
					}
				}
			}
		}
		ksort($templates);
		$searchMap =
array('filename','view','template');
		if(!empty($pageInfo->search)){

			$unset = array();
			foreach($templates as $k => $template){
				$found = false;
				foreach($searchMap as $field){
					if(strpos($template->$field,$pageInfo->search)!==false){
						$found=true;
					}
				}
				if(!$found){
					$unset[]=$k;
				}
			}
			if(!empty($unset)){
				foreach($unset as $u){
					unset($templates[$u]);
				}
			}
			$templates =
hikashop_search($pageInfo->search,$templates,'id');
		}

		$viewTypes= array('0' => JHTML::_('select.option',
0, JText::_('ALL_VIEWS')));
		foreach($templates as $temp){
			if(!isset($viewTypes[strip_tags($temp->view)]) &&
!empty($temp->view)){
				$viewTypes[strip_tags($temp->view)] =
JHTML::_('select.option', strip_tags($temp->view),
strip_tags($temp->view));
			}
		}

		$pageInfo->elements = new stdClass();
		$pageInfo->elements->total = count($templates);
		if($pageInfo->limit->value == 500) $pageInfo->limit->value =
100;
		$this->assignRef('pageInfo',$pageInfo);
		$this->getPagination();

		$templates = array_slice($templates, $this->pagination->limitstart,
$this->pagination->limit);
		$pageInfo->elements->page = count($templates);

		$this->assignRef('viewTypes',$viewTypes);
		$this->assignRef('rows',$templates);
		$this->assignRef('templateValues',$templateValues);
		$viewType = hikashop_get('type.view');
		$this->assignRef('viewType',$viewType);
		$templateType = hikashop_get('type.template');
		$this->assignRef('templateType',$templateType);
		hikashop_setTitle(JText::_($this->nameListing),$this->icon,$this->ctrl);
		$config =& hikashop_config();
		$manage =
hikashop_isAllowed($config->get('acl_view_manage','all'));
		$this->assignRef('manage',$manage);
		$delete =
hikashop_isAllowed($config->get('acl_view_delete','all'));
		$this->assignRef('delete',$delete);
		$this->toolbar = array(
			array('name' => 'pophelp', 'target'
=> $this->ctrl.'-listing'),
			'dashboard'
		);

		jimport('joomla.client.helper');
		$ftp = JClientHelper::setCredentialsFromRequest('ftp');
		$this->assignRef('ftp',$ftp);
	}

	function form(){
		$id = JRequest::getString('id','');
		$viewClass = hikashop_get('class.view');
		$obj = $viewClass->get($id);

		if($obj){
			jimport('joomla.filesystem.file');
			$obj->content = htmlspecialchars(JFile::read($obj->edit),
ENT_COMPAT, 'UTF-8');
		}

		$this->toolbar = array(
			'save',
			'apply',
			'cancel',
			'|',
			array('name' => 'pophelp', 'target'
=> $this->ctrl.'-form')
		);


		hikashop_setTitle(JText::_($this->nameForm),$this->icon,$this->ctrl.'&task=edit&id='.$id);

		jimport('joomla.client.helper');
		$ftp = JClientHelper::setCredentialsFromRequest('ftp');
		$this->assignRef('ftp',$ftp);
		$this->assignRef('element',$obj);
		$editor = hikashop_get('helper.editor');
		$this->assignRef('editor',$editor);

	}
}
vote/index.html000064400000000032151162050370007511
0ustar00<html><body></body></html>vote/tmpl/form.php000064400000003044151162050370010152
0ustar00<?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');
?><div class="iframedoc"
id="iframedoc"></div>
<form action="index.php?option=<?php echo HIKASHOP_COMPONENT
?>&amp;ctrl=vote" method="post"
name="adminForm" id="adminForm"
enctype="multipart/form-data">
	<?php
		$this->vote_ref_id_input = "data[vote][vote_ref_id]";
		$this->vote_type_input = "data[vote][vote_type]";
		$this->vote_pseudo_input = "data[vote][vote_pseudo]";
		$this->vote_email_input = "data[vote][vote_email]";
		$this->vote_rating_input = "data[vote][vote_rating]";
		$this->vote_comment_input = "data[vote][vote_comment]";

		$this->setLayout('normal');

		echo $this->loadTemplate();
	?>
	<table class="admintable table" width="100%">
		<tr>
			<td class="key">
				<label for="data[vote][vote_published]">
					<?php echo JText::_( 'HIKA_PUBLISHED' ); ?>
				</label>
			</td>
			<td>
				<?php echo JHTML::_('hikaselect.booleanlist',
"data[vote][vote_published]" ,
'',@$this->element->vote_published); ?>
			</td>
		</tr>
	</table>
	<input type="hidden" name="cid[]"
value="<?php echo @$this->element->vote_id; ?>"
/>
	<input type="hidden" name="option"
value="<?php echo HIKASHOP_COMPONENT; ?>" />
	<input type="hidden" name="task" value=""
/>
	<input type="hidden" name="ctrl"
value="vote" />
	<?php echo JHTML::_( 'form.token' ); ?>
</form>
vote/tmpl/index.html000064400000000032151162050370010465
0ustar00<html><body></body></html>vote/tmpl/listing.php000064400000022100151162050370010652
0ustar00<?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');
?><div class="iframedoc"
id="iframedoc"></div>
<form action="index.php?option=<?php echo HIKASHOP_COMPONENT
?>&amp;ctrl=vote" method="post"
name="adminForvote/index.html000064400000000032151162050370007511
0ustar00hp
if($this->pageInfo->enavote/tmpl/form.php000064400000003044151162050370010152
0ustar00vote/index.html000064400000000032151162050370007511
0ustar00if($this->pageInfo->enablevote/tmpl/form.php000064400000003044151162050370010152
0ustar00tle_title_email">
					<?php echo
Jvote/tmpl/index.html000064400000000032151162050370010465 0ustar00?php
				$k = 0;
				$a vote/tmpl/listing.php000064400000022100151162050370010652
0ustar00vote/tmpl/index.html000064400000000032151162050370010465
0ustar00.$row->vote_id,false,true)vote/tmpl/listing.php000064400000022100151162050370010652
0ustar00]='.$row->vote_user_id,false,true).">$username</a>";
									}
									else{
										echo $username;
									}
								}
								else if($username == '0' && ($row->vote_pseudo
== '0' || $row->vote_pseudo == '')){echo
'empty';}
								else{
									echo $row->vote_pseudo;
								}
								?>
							</td>
							<td>
								<?php echo $row->vote_ip; ?>
							</td>
							<td>
								<?php
								if(($row->vote_email == '0' || $row->vote_email ==
'') && $email !='0' ){
									if($this->pageInfo->manageUser){
										echo "<a
href=".hikashop_completeLink('option=com_hikashop&ctrl=user&task=edit&cid[]='.$row->vote_user_id,false,true).">$email</a>";
									}
									else{
										echo $email;
									}
								}
								else if($email == 0 && ($row->vote_email ==
'0' || $row->vote_email == '')){echo
'empty';}
								else{
									echo $row->vote_email;
								} ?>
							</td>
							<td class="order">
								<?php  echo $date = date('d/m/Y h:m:s',
$row->vote_date);  ?>
							</td>
							<td align="center">
								<?php if($this->manage){ ?>
									<span id="<?php echo $publishedid?>"
class="spanloading"><?php echo
$this->toggleClass->toggle($publishedid,(int)
$row->vote_published,'vote') ?></span>
								<?php }else{ echo
$this->toggleClass->display('activate',$row->vote_published);
} ?>
							</td>
							<td width="1%" align="center">
								<?php echo $row->vote_id; ?>
							</td>
						</tr>
					<?php
							$k = 1-$k;
						}
					}
				}
			?>
		</tbody>
	</table>
	<input type="hidden" name="option"
value="<?php echo HIKASHOP_COMPONENT; ?>" />
	<input type="hidden" name="task" value=""
/>
	<input type="hidden" name="ctrl"
value="<?php echo JRequest::getCmd('ctrl'); ?>"
/>
	<input type="hidden" name="boxchecked"
value="0" />
	<input type="hidden" name="filter_order"
value="<?php echo
$this->pageInfo->filter->order->value; ?>" />
	<input type="hidden" name="filter_order_Dir"
value="<?php echo $this->pageInfo->filter->order->dir;
?>" />
	<?php echo JHTML::_( 'form.token' ); ?>
</form>
vote/tmpl/normal.php000064400000010252151162050370010476 0ustar00<?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
	$row =& $this->rows[0];
	if($row == null) $row = new stdClass();
	$item =& $this->item;
	$newItem = $item->newItem;
	if($newItem == true){
		$row->vote_ip = '';
		$this->element->vote_type = 'product';
		$this->item->enabled = '3';
		$row->vote_rating = '';
		$row->vote_comment = ' ';
		$row->vote_date = time();
	}
?>
					<table class="admintable table" 
width="100%">
						<tr>
							<td class="key">
								<label for="data[vote][vote_ref_id]">
									<?php echo JText::_( 'HIKASHOP_ITEM' ); ?>
								</label>
							</td>
							<td>
								<?php if($newItem != true){echo $row->product_name;}
										else{?><input type='text' size='100'
name='<?php echo $this->vote_ref_id_input; ?>'
value=''><?php echo JText::_(
'VOTE_ENTER_ITEM_ID' );}?>
							</td>
						</tr>
						<?php if($newItem == true){ ?>
						<tr>
							<td class="key">
								<label for="data[vote][vote_type]">
									<?php echo JText::_( 'HIKA_TYPE' ); ?>
								</label>
							</td>
							<td>
								<input type="text" size="100"
name="<?php echo $this->vote_type_input; ?>"
value="<?php echo $this->element->vote_type;
?>"/>
							</td>
						</tr>
						<?php } ?>
						<tr>
							<td class="key">
								<label for="data[vote][vote_pseudo]">
									<?php echo JText::_( 'HIKA_USERNAME' ); ?>
								</label>
							</td>
							<td>
								<input type="text" size="100"
name="<?php echo $this->vote_pseudo_input; ?>"
								value="<?php if($newItem == true){echo
"\"";}else if($this->element->vote_pseudo ==
'0'){echo $row->username."\"
disabled=\"disabled\"";}else{echo
$this->escape(@$this->element->vote_pseudo);} ?>" />

							</td>
						</tr>
						<tr>
							<td class="key">
								<label for="data[vote][vote_ip]">
									<?php echo JText::_( 'HIKA_IP' ); ?>
								</label>
							</td>
							<td>
								<input type="text" size="100"
name="<?php echo $row->vote_ip; ?>" value="<?php
if($newItem == true){echo "\"";}else{ echo
$row->vote_ip."\" disabled=\"disabled\"";}
?>" />
							</td>
						</tr>
						<tr>
							<td class="key">
								<label for="data[vote][vote_email]">
									<?php echo JText::_( 'HIKA_EMAIL' ); ?>
								</label>
							</td>
							<td>
								<input type="text" size="100"
name="<?php echo $this->vote_email_input; ?>"
								value="<?php if($newItem == true){echo
"\"";} else if($this->element->vote_pseudo ==
'0'){echo $row->email."\"
disabled=\"disabled\"";}elseif($this->element->vote_email
!= '0'){echo
$this->escape(@$this->element->vote_email)."\"";}else{echo
"";}?> "/>

							</td>
						</tr>
						<?php if(($this->item->enabled == 1 ||
$this->item->enabled == 3) && $row->vote_rating !=
'0'){ ?>
						<tr>
							<td class="key">
								<label for="data[vote][vote_rating]">
									<?php echo JText::_( 'VOTE' ); ?>
								</label>
							</td>
							<td>
								<input type="text" size="100"
name="<?php echo $this->vote_rating_input; ?>"
								value="<?php echo
$this->escape(@$this->element->vote_rating);?>" />

							</td>
						</tr>
						<?php }
							if(($this->item->enabled == 2 || $this->item->enabled ==
3) && $row->vote_comment != ''){
						?>
						<tr>
							<td class="key">
								<label for="data[vote][vote_comment]">
									<?php echo JText::_( 'COMMENT' ); ?>
								</label>
							</td>
							<td>
								<textarea cols="71" name="<?php echo
$this->vote_comment_input; ?>" ><?php echo
$this->escape(@$this->element->vote_comment);
?></textarea>

							</td>
						</tr>
						<?php } ?>
						<tr>
							<td class="key">
								<label for="data[vote][vote_date]">
									<?php echo JText::_( 'DATE' ); ?>
								</label>
							</td>
							<td>
								<input type="text" size="100"
name="<?php echo $row->vote_date; ?>"
value="<?php echo date('d/m/Y h:m:s',
$row->vote_date); ?>" disabled="disabled"/>
							</td>
						</tr>
					</table>
vote/view.html.phpvote/tmpl/normal.php000064400000010252151162050370010476
0ustar00me();
		$function = $this->getLayout();
		if(method_exists($this,$function)) $this->$function();
		parent::display($tpl);
	}

	function isEnabled(){
		$config = hikashop_config();
		$db = JFactory::getDBO();

		if($config->get('enable_status_vote',0)=='two' ||
$config->get('enable_status_vote',0)=='both' ){
			$enabled = 3;	// vote & comment enabled
		}
		elseif($config->get('enable_status_vote',0)=='vote'){
			$enabled = 1;	// vote enabled
		}
		elseif($config->get('enable_status_vote',0)=='comment'){
			$enabled = 2;	// comment enabled
		}
		else{
vote/tmpl/normal.php000064400000010252151162050370010476
0ustar00	$database	= JFactory::getDBO();
		$filters = array();
		$searchMap =
array('a.vote_id','a.vote_rating','a.vote_ref_id','a.vote_pseudo','a.vote_comment','a.vote_email','a.vote_user_id','a.vote_ip','a.vote_date');
		if(!empty($pageInfo->search)){
			$searchVal =
'\'%'.hikashop_getEscaped(JString::strtolower(
$pageInfo->search ),true).'%\'';
			$filters[] =  implode(" LIKE $searchVal OR
",$searchMap)." LIKE $searchVal";
		}
		$order = '';
		if(!empty($pageInfo->filter->order->value)){
			$order = ' ORDER BY
'.$pageInfo->filter->order->value.'
'.$pageInfo->filter->order->dir;
		}
		if(!empty($filters)){
			$filters = ' WHERE '. implode(' AND ',$filters);
		}else{
			$filters = '';
		}
		$query = ' FROM '.hikashop_table('vote').' AS a
'.$filters.$order;
		$database->setQuery('SELECT
a.*'.$query,(int)$pageInfo->limit->start,(int)$pageInfo->limit->value);
		$rows = $database->loadObjectList();
		if(!empty($rows)){
			foreach($rows as $k => $v){
				if(function_exists('mb_substr')){
					$rows[$k]->vote_comment_short=mb_substr($v->vote_comment,0,51);
				}else{
					$rows[$k]->vote_comment_short=substr($v->vote_comment,0,51);
				}
				if($rows[$k]->vote_type == 'vendor'){
					$query2='SELECT vendor_name FROM `#__hikamarket_vendor` WHERE
vendor_id = '.(int)$rows[$k]->vote_ref_id.'';
				}else{
					$query2='SELECT product_name FROM `#__hikashop_product` WHERE
product_id = '.(int)$rows[$k]->vote_ref_id.'';
				}
				$database->setQuery($query2);
				$rows[$k]->item_name  = $database->loadResult();

				if($rows[$k]->vote_pseudo == '0'){
					$userClass = hikashop_get('class.user');
					$userInfos = $userClass->get($rows[$k]->vote_user_id);
					if(!empty($userInfos)){
						$rows[$k]->username	= $userInfos->username;
						$rows[$k]->email	= $userInfos->email;
					}
				}
			}
		}
		$pageInfo->enabled = $this->isEnabled();
		$pageInfo->manageProduct =
hikashop_isAllowed($config->get('acl_product_manage','all'));
		$pageInfo->manageUser =
hikashop_isAllowed($config->get('acl_user_manage','all'));
		if(!empty($pageInfo->search)){
			$rows =
hikashop_search($pageInfo->search,$rows,'vote_id');
		}
		$database->setQuery('SELECT COUNT(*)'.$query);
		$pageInfo->elements = new stdClass();
		$pageInfo->elements->total = $database->loadResult();
		$pageInfo->elements->page = count($rows);

		$toggleClass = hikashop_get('helper.toggle');
		$this->assignRef('toggleClass',$toggleClass);
		$this->assignRef('rows',$rows);
		$this->assignRef('pageInfo',$pageInfo);
		$this->getPagination();
		$order = new stdClass();
		$order->ordering = true;
		$order->orderUp = 'orderup';
		$order->orderDown = 'orderdown';
		$order->reverse = false;
		ifvote/view.html.php000064400000017677151162050370010171
0ustar00tCID('currency_id',false);
		$item = new stdClass();
		$database	= JFactory::getDBO();

		if(!empty($vote_id)){
			$query = 'SELECT * FROM `#__hikashop_vote` WHERE vote_id =
'.(int)$vote_id.'';
			$database->setQuery($query);
			$rows = $database->loadObjectList();
			if(!empty($rows)){
				foreach($rows as $k => $v){
					$query2='SELECT product_name FROM `#__hikashop_product` WHERE
product_id  = '.(int)$rows[$k]->vote_ref_id.'';
					$database->setQuery($query2);
					$product_names = $database->loadObjectList();
					foreach($product_names as $product_name){
						$rows[$k]->product_name = $product_name->product_name;
					}
					if($rows[$k]->vote_pseudovote/view.html.php000064400000017677151162050370010171
0ustar00	}
		hikashop_setTitle(JText::_($this->nameForm),$this->icon,$this->ctrl.'&task='.$task.'&vote_id='.$vote_id);
		$this->toolbar = array(
			'save',
			'apply',
			'cancel',
			'|',
			array('name' => 'pophelp', 'target'
=> $this->ctrl.'-listing')
		);

		$this->assignRef('element',$element);
		$translation = false;
		$transHelper = hikashop_get('helper.translation');
		if($transHelper && $transHelper->isMulti()){
			$translation = true;
			$transHelper->load('hikashop_vote',@$element->vote_id,$element);
			$config =& hikashop_config();
			$multilang_display=$config->get('multilang_display','tabs');
			if($multilang_display=='popups') $multilang_display =
'tabs';
			$tabs = hikashop_get('helper.tabs');
			$this->assignRef('tabs',$tabs);
			$this->assignRef('transHelper',$transHelper);
		}
		$toggle=hikashop_get('helper.toggle');
		$this->assignRef('toggle',$toggle);
		$this->assignRef('translation',$translation);
	}
}
waitlist/index.html000064400000000032151162050370010374
0ustar00<html><body></body></html>waitlist/tmpl/form.php000064400000005407151162050370011042
0ustar00<?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');
?><div class="iframedoc"
id="iframedoc"></div>
<form action="index.php?option=<?php echo HIKASHOP_COMPONENT
?>&amp;ctrl=waitlist" method="post" 
name="adminForm" id="adminForm"
enctype="multipart/form-data">
	<table class="admintable table" width="100%">
		<tr>
			<td class="key">
					<?php echo JText::_( 'HIKA_NAME' ); ?>
			</td>
			<td>
				<input type="text" size="40"
name="data[waitlist][name]" value="<?php echo
$this->escape(@$this->element->name); ?>" />
			</td>
		</tr>
		<tr>
			<td class="key">
					<?php echo JText::_( 'HIKA_EMAIL' ); ?>
			</td>
			<td>
				<input type="text" size="40"
name="data[waitlist][email]" value="<?php echo
$this->escape(@$this->element->email); ?>" />
			</td>
		</tr>
		<tr>
			<td class="key">
					<?php echo JText::_( 'PRODUCT' ); ?>
			</td>
			<td>
				<span id="product_id" >
					<?php echo (int)@$this->element->product_id.'
'.@$this->element->product_name; ?>
					<input type="hidden"
name="data[waitlist][product_id]" value="<?php echo
@$this->element->product_id; ?>" />
				</span>
				<?php
					echo $this->popup->display(
							'<img src="'. HIKASHOP_IMAGES.'edit.png"
alt="'.JText::_('PRODUCT').'"/>',
							'PRODUCT',
							
hikashop_completeLink("product&task=selectrelated&select_type=waitlist",true
),
							'product_link',
							760, 480, '', '', 'link'
						);
					?>
				<a href="#"
onclick="document.getElementById('product_id').innerHTML='<input
type=\'hidden\' name=\'data[waitlist][product_id]\'
value=\'0\' />';return false;" >
					<img src="<?php echo HIKASHOP_IMAGES; ?>delete.png"
alt="delete"/>
				</a>
			</td>
		</tr>
		<tr>
			<td class="key">
					<?php echo JText::_( 'MENU' ); ?>
			</td>
			<td>
				<?php $menuType = hikashop_get('type.menus');
					echo
$menuType->display('data[waitlist][product_item_id]',@$this->element->product_item_id);?>
			</td>
		</tr>
		<tr>
			<td class="key">
					<?php echo JText::_( 'DATE' ); ?>
			</td>
			<td>
				<?php echo JHTML::_('calendar',
(@$this->element->date?hikashop_getDate(@$this->element->date,'%Y-%m-%d
%H:%M'):''),
'data[waitlist][date]','date','%Y-%m-%d
%H:%M',array('size'=>'20')); ?>
			</td>
		</tr>
	</table>
	<input type="hidden" name="cid[]"
value="<?php echo @$this->element->waitlist_id; ?>"
/>
	<input type="hidden" name="option"
value="<?php echo HIKASHOP_COMPONENT; ?>" />
	<input type="hidden" name="task" value=""
/>
	<input type="hidden" name="ctrl"
value="waitlist" />
	<?php echo JHTML::_( 'form.token' ); ?>
</form>
waitlist/tmpl/index.html000064400000000032151162050370011350
0ustar00<html><body></body></html>waitlist/index.html000064400000000032151162050370010374
0ustar00<?php
/**
 * @package	Hiwaitlist/tmpl/form.php000064400000005407151162050370011042
0ustar00waitlist/index.html000064400000000032151162050370010374
0ustar00xt::_('HIKA_EMAIL'),
'a.emwaitlist/tmpl/form.php000064400000005407151162050370011042
0ustar00 =& $this->rows[$i];
				?>
					<tr class="<?php echo "row$k"; ?>">
						<td align="center">
						<?php echo $this->pagination->getRowOffset($i); ?>
						</td>
						<td align="center">
							<?php echo JHTML::_('grid.id', $i, $row->waitlist_id
); ?>
						</td>
						<td>
							<?php if($this->manage){ ?>
								<a href="<?php echo
hikashop_completeLink('waitlist&task=edit&cid[]='.$row->waitlist_id);
?>">
							<?php } ?>
									<?php echo $row->name; ?>
							<?php if($this->manage){ ?>
								</a>
							<?php } ?>
						</td>
						<td>
							<?php if($this->manage){ ?>
								<a href="<?php echo
hikashop_completeLink('waitlist&task=edit&cid[]='.$row->waitlist_id);
?>">
							<?php } ?>
									<?php echo $row->email; ?>
							<?php if($this->manage){ ?>
								</a>
							<?php } ?>
						</td>
						<td>
							<a href="<?php echo
hikashop_completeLink('product&task=edit&cid[]='.$row->product_id);
?>">
								<?php echo $row->product_name; ?>
							</a>
						</td>
						<td align="center">
							<?php echo hikashop_getDate($row->date,'%Y-%m-%d
%H:%M');?>
						</td>
						<td width="1%" align="center">
							<?php echo $row->waitlist_id; ?>
						</td>
					</tr>
				<?php
						$k = 1-$k;
					}
waitlist/tmpl/index.html000064400000000032151162050370011350
0ustar00waitlist/view.html.phpwaitlist/tmpl/listing.php000064400000010504151162050370011542
0ustar00waitlist/tmpl/index.html000064400000000032151162050370011350
0ustar00rder->value =
$app->getUsewaitlist/tmpl/listing.php000064400000010504151162050370011542
0ustar00ue.' '.$pageInfo->filter->order->dir;
		}
		if(!empty($filters)){
			$filters = ' WHERE ('. implode(') AND
(',$filters).')';
		}else{
			$filters = '';
		}
		$query = ' FROM '.hikashop_table('waitlist').'
AS a LEFT JOIN '.hikashop_table('product').' AS b ON
a.product_id=b.product_id '.$filters.$order;
		$database->setQuery('SELECT
*'.$query,(int)$pageInfo->limit->start,(int)$pageInfo->limit->value);
		$rows = $database->loadObjectList();
		$class = hikashop_get('class.product');
		foreach($rows as $i => $element){
			if($element->product_type=='variant'){
				$database->setQuery('SELECT * FROM
'.hikashop_table('variant').' AS a LEFT JOIN
'.hikashop_table('characteristic') .' AS b ON
a.variant_characteristic_id=b.characteristic_id WHERE
a.variant_product_id='.(int)$element->product_id.' ORDER BY
a.ordering');
				$element->characteristics = $database->loadObjectList();
				$parentProduct = $class->get((int)$element->product_parent_id);
				$class->checkVariant($element,$parentProduct);
				$rows[$i] = $element;
			}
		}

		if(!empty($pageInfo->search)){
			$rows =
hikashop_search($pageInfo->search,$rows,'waitlist_id');
		}
		$database->setQuery('SELECT COUNT(*)'.$query);
		$pageInfo->elements = new stdClass();
		$pageInfo->elements->total = $database->loadResult();
		$pageInfo->elements->page = count($rows);

		$toggleClass = hikashop_get('helper.toggle');
		$this->assignRef('toggleClass',$toggleClass);
		$this->assignRef('rows',$rows);
		$this->assignRef('pageInfo',$pageInfo);
		$this->getPagination();

		hikashop_setTitle(JText::_($this->nameListing),$this->icon,$this->ctrl);

		$config =& hikashop_config();
		$manage =
hikashop_isAllowed($config->get('acl_waitlist_manage','all'));
		$this->assignRef('manage',$manage);
		$this->toolbar = array(
			array('name'=>'addNew','display'=>$manage),
			array('name'=>'editList','display'=>$manage),
			array('name'=>'deleteList','display'=>hikashop_isAllowed($config->get('acl_waitlist_delete','all'))),
			'|',
			array('name' => 'pophelp', 'target'
=> $this->ctrl.'-listing'),
			'dashboard'
		);
	}
	function form(){
		$waitlist_id = hikashop_getCID('waitlist_id');
		$class = hikashop_get('class.waitlist');
		if(!empty($waitlist_id)){
			$element = $class->get($waitlist_id);
			if(@$element->product_type=='variant'){
				$db = JFactory::getDBO();
				$db->setQuery('SELECT * FROM
'.hikashop_table('variant').' AS a LEFT JOIN
'.hikashop_table('characteristic') .' AS b ON
a.variant_characteristic_id=b.characteristic_id WHERE
a.variant_product_id='.(int)$element->product_id.' ORDER BY
a.ordering');
				$element->characteristics = $db->loadObjectList();
				$class = hikashop_get('class.product');
				$parentProduct = $class->get((int)$element->product_parent_id);
				$class->checkVariant($element,$parentProduct);
			}
			$task='edit';
		waitlist/view.html.php000064400000012545151162050370011041
0ustar00warehouse/index.html000064400000000034151162050370010540
0ustar00<html><body></body></html>
waitlist/view.html.php000064400000012545151162050370011041
0ustar00<?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');
?><div class="iframedoc"
id="iframedoc"></div>
<form action="<?php echo
hikashop_completeLink('warehouse'); ?>"
method="post" name="adminForm"
id="adminForm">
	<table class="admintable table"
style="width:100%">
		<tr>
			<td class="key"><?php
				echo JText::_( 'HIKA_NAME' );
			?></td>
			<td>
				<input id="warehouse_name" type="text"
size="40" name="data[warehouse][warehouse_name]"
value="<?php echo
$this->escape(@$this->element->warehouse_name); ?>" />
			</td>
		</tr>
		<tr>
			<td class="key"><?php
				echo JText::_( 'HIKA_PUBLISHED' );
			?></td>
			<td>
				<?php echo JHTML::_('hikaselect.booleanlist',
"data[warehouse][warehouse_published]" ,
'',@$this->element->warehouse_published);?>
			</td>
		</tr>
		<tr>
			<td class="key">
				<?php echo JText::_( 'HIKA_DESCRIPTION' ); ?>
			</td>
			<td width="80%"></td>
		</tr>
		<tr>
			<td colspan="2" width="100%"><?php
				$this->editor->content =
@$this->element->warehouse_description;
				echo $this->editor->display();
			?></td>
		</tr>
	</table>
	<input type="hidden" name="cid[]"
value="<?php echo @$this->element->warehouse_id; ?>"
/>
	<input type="hidden" name="option"
value="<?php echo HIKASHOP_COMPONENT; ?>" />
	<input type="hidden" name="task" value=""
/>
	<input type="hidden" name="ctrl"
value="warehouse" />
	<?php echo JHTML::_( 'form.token' ); ?>
</form>
warehouse/tmpl/index.html000064400000000034151162050370011514
0ustar00<html><body></body></html>
warehouse/tmpl/listing.php000064400000012033151162050370011703
0ustar00<?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');
?><div class="iframedoc"
id="iframedoc"></div>
<form action="<?php echo
hikashop_cwarehouse/index.html000064400000000034151162050370010540
0ustar00="hikashop.checkAll(this);"
warehouse/tmpl/form.php000064400000003164151162050370011202
0ustar00warehouse/index.html000064400000000034151162050370010540 0ustar00d
class="hk_center">
						warehouse/tmpl/form.php000064400000003164151162050370011202
0ustar00$this->ordering->reverse XOR ($row->warehouse_ordering
<= @$this->rows[$i+1]->warehouse_ordering),
											$thiswarehouse/tmpl/index.html000064400000000034151162050370011514
0ustar00ut type="hidden"
name="optiowarehouse/tmpl/listing.php000064400000012033151162050370011703
0ustar00warehouse/tmpl/index.html000064400000000034151162050370011514
0ustar00<?php
/**
 *
@package	Hikawarehouse/tmpl/listing.php000064400000012033151162050370011703
0ustar00s="input-prepend input-append">
				<span class="add-on"><i
class="icon-filter"></i></span>
				<input type="text" name="search"
id="search" value="<?php echo
$this->escape($this->pageInfo->search);?>"
onchange="this.form.submit();" />
				<button class="btn"
onclick="this.form.limitstart.value=0;this.form.submit();"><i
class="icon-search"></i></button>
				<button class="btn"
onclick="this.form.limitstart.value=0;document.getElementById('search').value='';this.form.submit();"><i
class="icon-remove"></i></button>
			</div>
		</div>
	</div>
<?php } else { ?>
	<table>
		<tr>
			<td width="100%">
				<?php echo JText::_( 'FILTER' ); ?>:
				<input type="text" name="search"
id="search" value="<?php echo
$this->escape($this->pageInfo->search);?>"
class="text_area"
onchange="document.adminForm.submit();" />
				<button class="btn"
onclick="this.form.submit();"><?php echo JText::_(
'GO' ); ?></button>
				<button class="btn"
onclick="document.getElementById('search').value='';this.form.submit();"><?php
echo JText::_( 'RESET' ); ?></button>
			</td>
		</tr>
	</table>
<?php } ?>
	<table class="adminlist table table-striped table-hover"
style="cell-spacing:1px">
		<thead>
			<tr>
				<th class="title titlenum"><?php
				echo JText::_( 'HIKA_NUM' );
				?></th>
<?php if( !$this->singleSelection ) { ?>
				<th class="title titlebox"><input
type="checkbox" name="toggle" value=""
onclick="hikashop.checkAll(this);" /></th>
<?php } ?>
				<th class="title">
					<?php //echo JHTML::_('grid.sort',
JText::_('HIKA_NAME'), 'a.warehouse_name',
$this->pageInfo->filter->order->dir,$this->pageInfo->filter->order->value
);
					echo JText::_('HIKA_NAME');
					?>
				</th>
				<th class="title">
					<?php //echo JHTML::_('grid.sort',   JText::_(
'ID' ), 'a.warehouse_id',
$this->pageInfo->filter->order->dir,
$this->pageInfo->filter->order->value );
					echo JText::_('ID');
					?>
				</th>
			</tr>


			</tr>
		</thead>
		<tfoot>
			<tr>
				<td colspan="10"><?php
					echo $this->pagination->getListFooter();
					echo $this->pagination->getResultsCounter();
				?></td>
			</tr>
		</tfoot>
		<tbody>
<?php
	$k = 0;
	for($i = 0, $a = count($this->rows); $i < $a; $i++) {
		$row =& $this->rows[$i];

		$lbl1 = ''; $lbl2 = '';
		$extraTr = '';
		if( $this->singleSelection ) {
			$data = '{id:'.$row->warehouse_id;
			foreach($this->elemStruct as $s) {
				if($s == 'id')
					continue;
				$data .= ','.$s.':\''.
str_replace(array('\'','"'),array('\\\'','\\"'),$row->$s).'\'';
			}
			$data .= '}';
			$extraTr = ' style="cursor:pointer"
onclick="window.top.hikashop.submitBox('.$data.');"';
		} else {
			$lbl1 = '<label for="cb'.$i.'">';
			$lbl2 = '</label>';
			$extraTr = '
onclick="hikashop.checkRow(\'cb'.$i.'\');"';
		}
?>
			<tr class="row<?php echo $k; ?>"<?php echo
$extraTr; ?>>
				<td class="hk_center"><?php
					echo $this->pagination->getRowOffset($i);
				?></td>
<?php if( !$this->singleSelection ) { ?>
				<td class="hk_center">
					<input type="checkbox" onclick="this.clicked=true;
this.checked=!this.checked" value="<?php echo
$row->warehouse_id;?>" name="cid[]"
id="cb<?php echo $i;?>"/>
				</td>
<?php } ?>
				<td><?php
					echo $lbl1 . $row->warehouse_name . $lbl2;
				?></td>
				<td width="1%" class="hk_center"><?php
					echo $row->warehouse_id;
				?></td>
			</tr>
<?php
		$k = 1-$k;
	}
?>
		</tbody>
	</table>
	<input type="hidden" name="option"
value="<?php echo HIKASHOP_COMPONENT; ?>" />
	<input type="hidden" name="task"
value="selection" />
	<input
type="hwarehouse/tmpl/selection.php000064400000012103151162050370012215
0ustar00warehouse/tmpl/useselection.php000064400000000424151162050370012735
0ustar00<?php
/**
 *
@package	Hikwarehouse/tmpl/selection.php000064400000012103151162050370012215
0ustar00<?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 WarehouseViewWarehouse extends hikashopView {
	var $type = 'warehouse';
	var $ctrl = 'warehouse';
	var $nameListing = 'WAREHOUSE';
	var $nameForm = 'WAREHOUSE';
	var $icon = 'industry';

	function display($tpl = null){
		$this->paramBase =
HIKASHOP_COMPONENT.'.'.$this->getName();
		$function = $this->getLayout();
		if(method_exists($this,$function)) $this->$function();
		parent::display($tpl);
	}

	function listing() {
		$app = JFactory::getApplication();
		$database = JFactory::getDBO();
		$toggleClass = hikashop_get('helper.toggle');
		$this->assignRef('toggleClass',$toggleClass);

		$pageInfo = $this->getPageInfo('a.warehouse_id');

		$filters = array();
		$order = '';
		$searchMap =
array('a.warehouse_id','a.warehouse_name','a.warehouse_description');
		$this->processFilters($filters, $order, $searchMap);

		$query = ' FROM '.hikashop_table('warehouse').'
AS a'.$filters.$order;
		$this->getPageInfoTotal($query, '*');
		$database->setQuery('SELECT
a.*'.$query,$pageInfo->limit->start,$pageInfo->limit->value);
		$rows = $database->loadObjectList();

		if(!empty($pageInfo->search)){
			$rows =
hikashop_search($pageInfo->search,$rows,'warehouse_id');
		}
		$database->setQuery('SELECT count(*)'.$query );
		$pageInfo->elements->page = count($rows);

		$toggleClass = hikashop_get('helper.toggle');
		$this->assignRef('toggleClass',$toggleClass);
		$this->assignRef('rows',$rows);
		$this->assignRef('pageInfo',$pageInfo);
		$this->getPagination();
		$this->getOrdering('a.warehouse_ordering', true);
		$this->assignRef('order',$order);
		hikashop_setTitle(JText::_($this->nameListing),$this->icon,$this->ctrl);

		$config =& hikashop_config();
		$manage =
hikashop_isAllowed($config->get('acl_warehouse_manage','all'));
		$this->assignRef('manage',$manage);

		$this->toolbar = array(
			array('name' => 'addNew', 'display'
=> $manage),
			array('name' => 'editList', 'display'
=> $manage),
			array('name' => 'deleteList', 'check'
=> JText::_('HIKA_VALIDDELETEITEMS'), 'display'
=>
hikashop_isAllowed($config->get('acl_warehouse_delete','all'))),
			'|',
			array('name' => 'pophelp', 'target'
=> $this->ctrl.'-listing'),
			'dashboard'
		);
	}

	function form(){
		$warehouse_id = hikashop_getCID('warehouse_id');
		$class = hikashop_get('class.warehouse');
		if(!empty($warehouse_id)){
			$element = $class->get($warehouse_id,true);
			$task='edit';
		}else{
			$element = new stdClass();
			$element->warehouse_published = 1;
			$task='add';
		}
		hikashop_setTitle(JText::_($this->nameForm),$this->icon,$this->ctrl.'&task='.$task.'&warehouse='.$warehouse_id);

		$this->toolbar = array(
			'save-group',
			'cancel',
			'|',
			array('name' => 'pophelp', 'target'
=> $this->ctrl.'-listing')
		);
		$editor = hikashop_get('helper.editor');
		$editor->name = 'data[warehouse][warehouse_description]';
		$editor->content = @$element->warehouse_description;
		$this->assignRef('editor',$editor);
		$this->assignRef('element',$element);
		$toggle=hikashop_get('helper.toggle');
		$this->assignRef('toggle',$toggle);
		$warehouse=hikashop_get('type.warehouse');
		$this->assignRef('warehouse',$warehouse);
		$popup = hikashop_get('helper.popup');
		$this->assignRef('popup', $popup);
	}

	public function selection($tpl = null) {
		$this->listing($tpl,warehouse/tmpl/useselection.php000064400000000424151162050370012735
0ustar00<html><body></body></html>warehouse/view.html.php000064400000007465151162050370011210
0ustar00warehouse/tmpl/useselection.php000064400000000424151162050370012735
0ustar00		<input type="hidden"
name="data[discount][discount_zone_id]" value="<?php echo
@$this->element->zone_id; ?>" />
					<?php 
					}elseif($type=='tax'){
					?>
						<input type="hidden"
name="data[taxation][zone_namekey]" value="<?php echo
@$this->element->zone_namekeywarehouse/view.html.php000064400000007465151162050370011210
0ustar00zone/tmpl/child.php000064400000002015151162050370010265
0ustar00<?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');
?><tr id="zone_namekey-<?php echo
$this->row->zone_namekey; ?>" class="row<?php echo
$this->k; ?>">
	<td align="center">
		<?php echo @$this->row->zone_name_english; ?>
	</td>
	<td align="center">
		<?php echo @$this->row->zone_name; ?>
	</td>
	<td align="center">
		<?php echo @$this->row->zone_code_2; ?>
	</td>
	<td align="center">
		<?php echo @$this->row->zone_code_3; ?>
	</td>
	<td align="center">
		<?php echo @$this->row->zone_type; ?>
	</td>
	<td align="center">
		<span class="spanloading">
			<?php echo
$this->toggleClass->delete("zone_namekey-".$this->row->zone_namekey,$this->main_namekey.'-'.$this->row->zone_namekey,'zone',true)
?>
		</span>
	</td>
	<td align="center">
		<?php echo @$this->row->zone_id; ?>
	</td>
</tr>
zone/tmpl/childlisting.php000064400000003067151162050370011667
0ustar00zone/index.html000064400000000032151162050370007507
0ustar00.$this->main_namekey,true
zone/tmpl/addchild.php000064400000002572151162050370010746
0ustar00zone/index.html000064400000000032151162050370007507
0ustar00zone/tmpl/form.phpzone/tmpl/addchild.php000064400000002572151162050370010746
0ustar00zone/tmpl/child.php000064400000002015151162050370010265
0ustar00K_RESPONSIVE) { ?>
				</td>
				<td valign="top">
	<?php } else { ?>
		</div>
		<div class="span8">
	<?php } ?>
					<fieldset class="adminform"
id="htmlfieldset">
						<legend><?php echo JText::_( 'SUBZONES' );
?></legend>
						<?php if(empty($this->element->zone_namekey)){
							echo JText::_( 'SUBZONES_CHOOSER_DISABLED' );
						}else{
							$this->setLayout('childlisting');
							echo $this->loadTemplate();
						} ?>
					</fieldset>
	<?php if(!HIKASHOP_BACK_RESPONSIVE) { ?>
				</td>
			</tr>
		</table>
	</div>
	<?php } else { ?>
		</div>
	</div>
	<?php } ?>
	<div class="clr"></div>
	<input type="hidden" name="cid[]"
value="<?php echo @$this->element->zone_id; ?>"
/>
	<input type="hidden" name="option"
value="<?php echo HIKASHOP_COMPONENT; ?>" />
	<input type="hidden" name="task" value=""
/>
	<input type="hidden" name="ctrl"
value="zone"zone/tmpl/chizone/tmpl/childlisting.php000064400000003067151162050370011667
0ustar00zone/tmpl/information.php000064400000005540151162050370011535
0ustar00<?php
/**
 zone/tmpl/childlisting.php000064400000003067151162050370011667 0ustar00
							<td class="key">
								<label
for="zone_codezone/tmpl/form.php000064400000003662151162050370010156
0ustar00 ?>
								</label>
							</td>
							<td>
								<?php echo JHTML::_('hikaselect.booleanlist',
"data[zone][zone_published]" ,
'',@$this->element->zone_published	); ?>
							</td>
						</tr>
						<tr>
							<td class="key">
								<label for="zone_published">
									<?php echo JText::_( 'CURRENCY' ); ?>
								</label>
							</td>
							<td>
							<?php
								if(hikashop_level(2)){
									$currencytype = hikashop_get('type.currency');
									$currencytype->displayType='all';
									echo
$currencytype->display('data[zone]zone/tmpl/form.php000064400000003662151162050370010156
0ustar00<?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');
?><div class="iframedoc"
id="iframedoc"></div>
<form action="index.php?option=<?php echo HIKASHOP_COMPONENT
?>&amp;ctrl=zone" method="post" 
name="adminForm"
izone/tmpl/index.html000064400000000032151162050370010463
0ustar00	</td>
		</tr>
	</table>zone/tmpl/information.php000064400000005540151162050370011535
0ustar00zone/tmpl/index.html000064400000000032151162050370010463
0ustar00lter->order->value ); ?>
zone/tmpl/information.php000064400000005540151162050370011535 0ustar00hp
echo $row->zone_name_english; ?>
						<?php if($this->manage){ ?>
							</a>
						<?php } ?>
					</td>
					<td>
						<?php if($this->manage){ ?>
							<a href="<?php echo
hikashop_completeLink('zone&task=edit&cid[]='.$row->zone_id);
?>">
						<?php } ?>
								<?php echo $row->zone_name; ?>
						<?php if($this->manage){ ?>
							</a>
						<?php } ?>
					</td>
					<td align="center">
						<?php echo $row->zone_code_2; ?>
					</td>
					<td align="center">
						<?php echo $row->zone_code_3; ?>
					</td>
					<td align="center">
						<?php echo $row->zone_type; ?>
					</td>
					<td align="center">
						<?php if($this->manage){ ?>
							<span id="<?php echo $publishedid ?>"
class="spanloading"><?php echo
$this->toggleClass->toggle($publishedid,(int)
$row->zone_published,'zone') ?></span>
						<?php }else{ echo
$this->toggleClass->display('activate',$row->zone_published);
} ?>
					</td>
					<td width="1%" align="center">
						<?php echo $row->zone_id; ?>
					</td>
				</tr>
			<?php
					$k = 1-$k;
				}
			?>
		</tbody>
	</table>
	<input type="hidden" name="option"
value="<?php echo HIKASHOP_COMPONENT; ?>" />
	<input type="hidden" name="task" value=""
/>
	<input type="hidden" name="ctrl"
value="<?php echo JRequest::getCmd('ctrl'); ?>"
/>
	<input type="hidden" name="boxchecked"
value="0"
zone/tmpl/listing.php000064400000012157151162050370010663
0ustar00zone/tmpl/newchild.php000064400000001112151162050370010774
0ustar00<?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');
?><table class="adminlist table" cellpadding="1"
width="100%">
	<tbody
id="rezone/tmpl/listing.php000064400000012157151162050370010663
0ustar00zone/tmpl/newchildform.php000064400000002765151162050370011677
0ustar00<?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');
?><fieldset>
	<div class="toolbar" id="toolbar"
style="float: right;">
		<button class="btn" type="button"
onclick="submitbutton('savechild');"><img
src="<?php echo HIKASHOP_IMAGES; ?>save.png"/><?php
echo JText::_('HIKA_SAVE'); ?></button>
		<button class="btn" type="button"
onclick="submitbutton('selectchildlisting');"><img
src="<?php echo HIKASHOP_IMAGES; ?>cancel.png"/><?php
echo JText::_('HIKA_CANCEL'); ?></button>
	</div>
</fieldset>
<div class="iframedoc"
id="iframedoc"></div>
<form action="index.php?option=<?php echo HIKASHOP_COMPONENT
?>&amp;ctrl=zone&amp;tmpl=component"
method="post"  name="adminForm"
id="adminForm" enctype="multipart/form-data">
	<?php
	$this->setLayout('information');
	echo $this->loadTemplate();
	?>
	<div class="clr"></div>
	<input type="hidden" name="cid[]"
value="0" />
	<input type="hidden" name="option"
value="<?php echo HIKASHOP_COMPONENT; ?>" />
	<input type="hidden" name="main_namekey"
value="<?php echo JRequest::getCmd('main_namekey');
?>" />
	<input type="hidden" name="main_id"
value="<?php echo JRequest::getInt('main_id');
?>" />
	<input type="hidden" name="task" value=""
/>
	<input type="hidden" name="ctrl"
value="zone" />
	<?php echo JHTML::_( 'form.token' ); ?>
</form>
zone/tmpl/selectchildlisting.php000064400000014636151162050370013073
0ustar00<?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');
?><fieldset>
	<div class="toolbar" id="toolbar"
style="float: right;">
		<?php
if(!in_array($this->type,array('discount','shipping','payment','config','tax'))){?>
			<button class="btn" type="button"
onclick="submitbutton('newchild');"><img
src="<?php echo HIKASHOP_IMAGES; ?>new.png"/><?php
echo JText::_('HIKA_NEW'); ?></button>
		<?php }?>
		<button class="btn" type="button"
onclick="if(document.adminForm.boxchecked.value==0){alert('<?php
echo JText::_( 'PLEASE_SELECT_SOMETHING',true );
?>');}else{submitbutton('addchild');}"><img
src="<?php echo HIKASHOP_IMAGES; ?>add.png"/><?php
echo JText::_('OK'); ?></button>
	</div>
</fieldset>
<div class="iframedoc"
id="iframedoc"></div>
<form action="index.php?option=<?php echo HIKASHOP_COMPONENT
?>&amp;ctrl=zone&amp;tmpl=component"
method="post"  name="adminForm"
id="adminForm">
	<table>
		<tr>
	zone/tmpl/newchild.php000064400000001112151162050370010774
0ustar00gle" value=""
onclick="hikashop.checkAll(this);" />
				</th>
				<th class="title">
					<?php echo JHTML::_('grid.sort',
JText::_('ZONE_NAME_ENGLISH'), 'a.zone_name_english',
$this->pageInfo->filter->order->dir,$this->pageInfo->filter->order->value,'selectchildlisting'
); ?>
				</th>
				<th class="title">
					<?php echo JHTML::_('grid.sort',
JText::_('HIKA_NAME'), 'a.zone_name',
$this->pageInfo->filter->order->dir,$this->pageInfo->filter->order->value,'selectchildlisting'
); ?>
				</th>
				<th class="title">
					<?php echo JHTML::_('grid.sort',
JText::_('ZONE_CODzone/tmpl/newchildform.php000064400000002765151162050370011677
0ustar00fo->filter->order->value,'selectchildlisting' );
?>
				</th>
			</tr>
		</thead>
		<tfoot>
			<tr>
				<td colspan="10">
					<?php echo $this->pagination->getListFooter(); ?>
					<?php echo $this->pagination->getResultsCounter(); ?>
				</td>
			</tr>
		</tfoot>
		<tbody>
			<?php
				$k = 0;
				for($i = 0,$a = count($this->rows);$i<$a;$i++){
					$row =& $this->rows[$i];
					$publishedid = 'zone_published-'.$row->zone_id;
			?>
				<tr class="<?php echo "row$k"; ?>">
					<td align="center">
					<?php echo $this->pagination->getRowOffset($i); ?>
					zone/tmpl/newchildform.php000064400000002765151162050370011677
0ustar00zone/tmpl/selectchildlisting.php000064400000014636151162050370013073
0ustar00->subtype;?>" />
		<input type="hidden" name="map"
value="<?php echo $this->map;?>" />
	<?php }?>
	<input type="hidden" name="option"
value="<?php echo HIKASHOP_COMPONENT; ?>" />
	<input type="hidden" name="task"
value="<?php echo JRequest::getCmd('task'); ?>"
/>
	<input type="hidden" name="ctrl"
value="<?php echo JRequest::getCmd('ctrl'); ?>"
/>
	<input type="hidden" name="tmpl"
value="component" />
	<input type="hidden" name="main_namekey"
value="<?php echo JRequest::getCmd('main_namekey');
?>" />
	<input type="hidden" name="main_id"
value="<?php echo JRequest::getInt('main_id');
?>" />
	<input type="hidden" name="boxchecked"
value="0" />
	<input type="hidden" name="filter_order"
value="<?php echo
$this->pageInfo->filter->order->value; ?>" />
	<input type="hidden" name="filter_order_Dir"
value="<?php echo $this->pageInfo->filter->order->dir;
?>" />
	<?php echo JHTML::_( 'form.token' ); ?>
</form>
zone/tmpl/selectchildlisting.php000064400000014636151162050370013073
0ustar00<?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 ZoneViewZone extends hikashopView
{
	var $type = '';
	var $ctrl= 'zone';
	var $nameListing = 'ZONES';
	var $nameForm = 'ZONES';
	var $icon = 'langmanager';

	function display($tpl = null)
	{
		$this->paramBase =
HIKASHOP_COMPONENT.'.'.$this->getName();
		$function = $this->getLayout();
		if(method_exists($this,$function)) $this->$function();
		parent::display($tpl);
	}

	function listing(){
		$app = JFactory::getApplication();
		$pageInfo = new stdClass();
		$pageInfo->filter = new stdClass();
		$pageInfo->filter->order = new stdClass();
		$pageInfo->limit = new stdClass();
		$pageInfo->filter->order->value =
$app->getUserStateFromRequest(
$this->paramBase.".filter_order",
'filter_order',	'a.zone_id','cmd' );
		$pageInfo->filter->order->dir	=
$app->getUserStateFromRequest(
$this->paramBase.".filter_order_Dir",
'filter_order_Dir',	'asc',	'word' );

		$selectedType = $app->getUserStateFromRequest(
$this->paramBase.".filter_type",'filter_type','','string');
		$pageInfo->limit->value = $app->getUserStateFromRequest(
$this->paramBase.'.list_limit', 'limit',
$app->getCfg('list_limit'), 'int' );
		if(JRequest::getVar('search')!=$app->getUserState($this->paramBase.".search")){
			$app->setUserState( $this->paramBase.'.limitstart',0);
			$pageInfo->limit->start = 0;
		}else{
			$pageInfo->limit->start = $app->getUserStateFromRequest(
$this->paramBase.'.limitstart', 'limitstart', 0,
'int' );
		}
		$pageInfo->search = $app->getUserStateFromRequest(
$this->paramBase.".search", 'search', '',
'string' );
		$pageInfo->search = JString::strtolower( $pageInfo->search );
		if(empty($pageInfo->limit->value)) $pageInfo->limit->value =
500;
		$database	= JFactory::getDBO();
		$searchMap =
array('a.zone_code_3','a.zone_code_2','a.zone_name_english','a.zone_name','a.zone_id');
		$filters = array();
		if(!empty($pageInfo->search)){
			$searchVal =
'\'%'.hikashop_getEscaped($pageInfo->search,true).'%\'';
			$filters[] = implode(" LIKE $searchVal OR ",$searchMap)."
LIKE $searchVal";
		}

		$query = ' FROM '.hikashop_table('zone').' AS
a';
		if(!empty($selectedType)){
			$filters[] = 'a.zone_type =
'.$database->Quote($selectedType);
			if($selectedType=='state'){
				$selectedCountry = $app->getUserStateFromRequest(
$this->paramBase.".filter_country",'filter_country',0,'int');
				if($selectedCountry){
					$query = ' FROM '.hikashop_table('zone').' AS
c LEFT JOIN '.hikashop_table('zone_link') .' AS b ON
c.zone_namekey=b.zone_parent_namekey LEFT JOIN
'.hikashop_table('zone').' AS a ON
b.zone_child_namekey=a.zone_namekey';
					$filters[] = 'c.zone_id =
'.$database->Quote($selectedCountry);
				}
			}
		}
		if(!empty($filters)){
			$query.= ' WHERE ('.implode(') AND
(',$filters).')';
		}
		if(!empty($pageInfo->filter->order->value)){
			$query .= ' ORDER BY
'.$pageInfo->filter->order->value.'
'.$pageInfo->filter->order->dir;
		}
		$database->setQuery('SELECT
a.*'.$query,$pageInfo->limit->start,$pageInfo->limit->value);
		$rows = $database->loadObjectList();
		if(!empty($pageInfo->search)){
			$rows =
hikashop_search($pageInfo->search,$rows,'zone_id');
		}
		$database->setQuery('SELECT count(*)'.$query);
		$pageInfo->elements = new stdClass();
		$pageInfo->elements->total = $database->loadResult();
		$pageInfo->elements->page = count($rows);

		if($pageInfo->limit->value == 500) $pageInfo->limit->value =
100;
		hikashop_setTitle(JText::_($this->nameListing),$this->icon,$this->ctrl);


		$config =& hikashop_config();
		$manage =
hikashop_isAllowed($config->get('acl_zone_manage','all'));
		$this->assignRef('manage',$manage);

		$this->toolbar = array(
			array('name'=>'publishList','display'=>$manage),
			array('name'=>'unpublishList','display'=>$manage),
			'|',
			array('name' => 'custom',
'icon'=>'copy','alt'=>JText::_('HIKA_COPY'),
'task' => 'copy','display'=>$manage),
			array('name'=>'addNew','display'=>$manage),
			array('name'=>'editList','display'=>$manage),
			array('name'=>'deleteList','display'=>hikashop_isAllowed($config->get('acl_zone_delete','all'))),
			'|',
			array('name' => 'pophelp', 'target'
=> $this->ctrl.'-listing'),
			'dashboard'
		);

		$filters = new stdClass();
		$zoneType = hikashop_get('type.zone');
		$filters->type =
$zoneType->display('filter_type',$selectedType);
		if($selectedType=='state'){
			$countryType = hikashop_get('type.country');
			$filters->country =
$countryType->display('filter_country',$selectedCountry);
		}else{
			$filters->country = '';
		}
		$toggleClass = hikashop_get('helper.toggle');
		$this->assignRef('filters',$filters);
		$this->assignRef('toggleClass',$toggleClass);
		$this->assignRef('rows',$rows);
		$this->assignzone/view.html.php000064400000025144151162050370010153
0ustar00tVar('fail');
			if(empty($element)){
				$element = new stdClass();
				$app = JFactory::getApplication();
				$element->zone_type = $app->getUserState(
$this->paramBase.".filter_type");
			}
			$task='add';
		}
		hikashop_setTitle(JText::_($this->nameForm),$this->icon,$this->ctrl.'&task='.$task.'&zone_id='.$zone_id);

		$this->toolbar = array(
			'save',
			array('name' => 'save2new', 'display'
=> version_compare(JVERSION,'1.7','>=')),
			'apply',
			'cancel',
			'|',
			array('name' => 'pophelp', 'target'
=> $this->ctrl.'-form')
		);

		$zoneType = hikashop_get('type.zone');
		$this->assignRef('element',$element);
		$this->assignRef('type',$zoneType);

		$control=JRequest::getWord('type');
		$this->assignRef('control',$control);
		$popup = hikashop_get('helper.popup');
		$this->assignRef('popup',$popup);

		$this->_childZones($zone_id,@$element->zone_namekey);

	}

	function newzone/view.html.php000064400000025144151162050370010153
0ustar00his->assignRef('type',$zoneType);
	}

	function savechild(){
		$database = JFactory::getDBO();
		$id = JRequest::getInt( 'cid' );
		if(!empty($id)){
			$query = 'SELECT a.* FROM
'.hikashop_table('zone').' AS a WHERE
a.zone_id='.$id;
			$database->setQuery($query);
			$rows =  $database->loadObjectList();
		}else{
			$rows = array();
		}
		$this->assignRef('list',$rows);
		$main_namekey = JRequest::getCmd('main_namekey');
		$this->assignRef('main_namekey',$main_namekey);
		$toggle = hikashop_get('helper.toggle');
		$this->assignRef('toggleClass',$toggle);
		$document= JFactory::getDocument();
		$js = "window.addEvent('domready', function() {
				var dstTable =
window.top.document.getElementById('list_0_data');
				var srcTable = document.getElementById('result');
				for (var c = 0,m=srcTable.rows.length;c<m;c++){
					var rowData = srcTable.rows[c].cloneNode(true);
					dstTable.appendChild(rowData);
				}
				window.top.hikashop.closeBox();
		});";
		$document->addScriptDeclaration($js);
		$this->setLayout('newchild');
	}

	function newchild(){
		$document = JFactory::getDocument();
		$database = JFactory::getDBO();
		$childNamekeys = JRequest::getVar( 'cid', array(),
'', 'array' );
		if(!empty($childNamekeys)){
			$query = 'SELECT a.* FROM
'.hikashop_table('zone').' AS a WHERE a.zone_namekey 
IN (';
			foreach($childNamekeys as $namekey){
				$query.=$database->Quote($namekey).',';
			}
			$query=rtrim($query,',').');';
			$database->setQuery($query);
			$rows =  $database->loadObjectList();
		}else{
			$rows = array();
		}
		$this->assignRef('list',$rows);
		$main_namekey = JRequest::getCmd('main_namekey');
		$this->assignRef('main_namekey',$main_namekey);
		$toggle = hikashop_get('helper.toggle');
		$this->assignRef('toggleClass',$toggle);
		$js = "window.addEvent('domready', function() {
				var dstTable =
window.top.document.getElementById('list_0_data');
				var srcTable = document.getElementById('result');
				for (var c = 0,m=srcTable.rows.length;c<m;c++){
					var rowData = srcTable.rows[c].cloneNode(true);
					dstTable.appendChild(rowData);
				}
				window.top.hikashop.closeBox();
		});";
		$document->addScriptDeclaration($js);
	}

	function addchild(){
		$document= JFactory::getDocument();
		$database = JFactory::getDBO();
		$zone_id = hikashop_getCID( 'zone_id');
		if(!empty($zone_id)){
			$query = 'SELECT a.* FROM
'.hikashop_table('zone').' AS a WHERE a.zone_id 
='.$zone_id;
			$database->setQuery($query);
			$element =  $database->loadObject();
		}else{
			$element = new stdClass();
		}
		if(empty($element->zone_name_english)){
			if(!empty($element->zone_name)){
				$element->zone_name_english = $element->zone_name;
			}else{
				$element->zone_name_english=JText::_('ZONE_NOT_FOUND');
			}
		}
		$subtype=JRequest::getVar('subtype');
		if(empty($subtype)){
			$subtype='zone_id';
		}

		$js = "window.addEvent('domready', function() {
					window.top.document.getElementById('".$subtype."').innerHTML
= document.getElementById('result').innerHTML;
					window.top.hikashop.closeBox();
			});";
		$document->addScriptDeclaration($js);
		$this->assignRef('element',$element);
	}

	function _childZones($zone_id,$zone_namekey){
		$toggleClass = hikashop_get('helper.toggle');
		if(!empty($zone_id)){
			$zoneClass = hikashop_get('class.zone');
			$rows =  $zoneClass->getChilds($zone_namekey);
			$this->assignRef('list',$rows);
			$this->assignRef('main_id',$zone_id);
			$this->assignRef('main_namekey',$zone_namekey);
			$this->assignRef('toggleClass',$toggleClass);
		}
		$toggleClass->addDeleteJS();
	}

}
installed/tmpl/default.php000064400000011737151162146410011646
0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_languages
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

// Add specific helper files for html generation
JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html');

JHtml::_('formbehavior.chosen', 'select');
JHtml::_('bootstrap.tooltip');

$user      = JFactory::getUser();
$listOrder =
$this->escape($this->state->get('list.ordering'));
$listDirn  =
$this->escape($this->state->get('list.direction'));
?>
<form action="<?php echo
JRoute::_('index.php?option=com_languages&view=installed');
?>" method="post" id="adminForm"
name="adminForm">
<?php if (!empty($this->sidebar)) : ?>
	<div id="j-sidebar-container" class="span2">
		<?php echo $this->sidebar; ?>
	</div>
	<div id="j-main-container" class="span10">
<?php else : ?>
	<div id="j-main-container">
<?php endif; ?>
		<?php echo
JLayoutHelper::render('joomla.searchtools.default',
array('view' => $this)); ?>
		<?php if ($this->total > 0) : ?>
		<table class="table table-striped">
			<thead>
				<tr>
					<th width="1%">
						&#160;
					</th>
					<th width="15%" class="nowrap">
						<?php echo JHtml::_('searchtools.sort',
'JGLOBAL_TITLE', 'name', $listDirn, $listOrder); ?>
					</th>
					<th width="15%" class="hidden-phone">
						<?php echo JHtml::_('searchtools.sort',
'COM_LANGUAGES_HEADING_TITLE_NATIVE', 'nativeName',
$listDirn, $listOrder); ?>
					</th>
					<th class="nowrap">
						<?php echo JHtml::_('searchtools.sort',
'COM_LANGUAGES_HEADING_LANG_TAG', 'language',
$listDirn, $listOrder); ?>
					</th>
					<th class="nowrap center">
						<?php echo JHtml::_('searchtools.sort',
'COM_LANGUAGES_HEADING_DEFAULT', 'published',
$listDirn, $listOrder); ?>
					</th>
					<th class="nowrap center">
						<?php echo JHtml::_('searchtools.sort',
'COM_LANGUAGES_HEADING_VERSION', 'version', $listDirn,
$listOrder); ?>
					</th>
					<th class="hidden-phone">
						<?php echo JHtml::_('searchtools.sort',
'COM_LANGUAGES_HEADING_DATE', 'creationDate',
$listDirn, $listOrder); ?>
					</th>
					<th class="hidden-phone">
						<?php echo JHtml::_('searchtools.sort',
'COM_LANGUAGES_HEADING_AUTHOR', 'author', $listDirn,
$listOrder); ?>
					</th>
					<th class="hidden-phone hidden-tablet">
						<?php echo JHtml::_('searchtools.sort',
'COM_LANGUAGES_HEADING_AUTHOR_EMAIL', 'authorEmail',
$listDirn, $listOrder); ?>
					</th>
					<th class="nowrap hidden-phone">
						<?php echo JHtml::_('searchtools.sort',
'JGRID_HEADING_ID', 'extension_id', $listDirn,
$listOrder); ?>
					</th>
				</tr>
			</thead>
			<tfoot>
				<tr>
					<td colspan="10">
						<?php echo $this->pagination->getListFooter(); ?>
					</td>
				</tr>
			</tfoot>
			<tbody>
			<?php
			$version = new JVersion;
			$currentShortVersion = preg_replace('#^([0-9\.]+)(|.*)$#',
'$1', $version->getShortVersion());
			foreach ($this->rows as $i => $row) :
				$canCreate = $user->authorise('core.create',    
'com_languages');
				$canEdit   = $user->authorise('core.edit',      
'com_languages');
				$canChange = $user->authorise('core.edit.state',
'com_languages');
			?>
				<tr class="row<?php echo $i % 2; ?>">
					<td>
						<?php echo JHtml::_('languages.id', $i,
$row->language); ?>
					</td>
					<td>
						<label for="cb<?php echo $i; ?>">
							<?php echo $this->escape($row->name); ?>
						</label>
					</td>
					<td class="hidden-phone">
						<?php echo $this->escape($row->nativeName); ?>
					</td>
					<td>
						<?php echo $this->escape($row->language); ?>
					</td>
					<td class="center">
						<?php echo JHtml::_('jgrid.isdefault',
$row->published, $i, 'installed.', !$row->published
&& $canChange); ?>
					</td>
					<td class="center small">
					<?php $minorVersion = $version::MAJOR_VERSION . '.' .
$version::MINOR_VERSION; ?>
					<?php // Display a Note if language pack version is not equal to
Joomla version ?>
					<?php if (strpos($row->version, $minorVersion) !== 0 ||
strpos($row->version, $currentShortVersion) !== 0) : ?>
						<span class="label label-warning hasTooltip"
title="<?php echo
JText::_('JGLOBAL_LANGUAGE_VERSION_NOT_PLATFORM');
?>"><?php echo $row->version; ?></span>
					<?php else : ?>
						<span class="label label-success"><?php echo
$row->version; ?></span>
					<?php endif; ?>
					</td>
					<td class="hidden-phone">
						<?php echo $this->escape($row->creationDate); ?>
					</td>
					<td class="hidden-phone">
						<?php echo $this->escape($row->author); ?>
					</td>
					<td class="hidden-phone hidden-tablet">
						<?php echo
JStringPunycode::emailToUTF8installed/tmpl/default.php000064400000011737151162146410011646
0ustar00<?xml version="1.0" encoding="utf-8"?>
<metadata>
	<layout
title="COM_LANGUAGES_INSTALLED_VIEW_DEFAULT_TITLE">
		<message>
			<![CDATA[COM_LANGUAGES_INSTALLED_VIEW_DEFAULT_DESC]]>
		</message>
	</layout>
</metadata>
installed/view.html.phpinstalled/tmpl/default.php000064400000011737151162146410011646
0ustar00an|JException True, if FTP settings should be shown, or an
exception.
	 */
	protected $ftp = null;

	/**
	 * @var string option name.
	 */
	protected $option = null;

	/**
	 * @var object pagination information.
	 */
	protected $pagination = null;

	/**
	 * @var array languages information.
	 */
	protected $rows = null;

	/**
	 * @var object user object
	 */
	protected $user = null;

	/**
	 * Display the view.
	 *
	 * @param   string  $tpl  The name of the template file to parse.
	 *
	 * @return  void
	 */
	public function display($tpl = null)
	{
		$this->ftp           = $this->get('Ftp');
		$this->option        = $this->get('Option');
		$this->pagination    = $this->get('Pagination');
		$this->rows          = $this->get('Data');
		$this->total         = $this->get('Total');
		$this->state         = $this->get('State');
		$this->filterForm    = $this->get('FilterForm');
		$this->activeFilters = $this->get('ActiveFilters');

		LanguagesHelper::addSubmenu('installed');

		// Check for errors.
		if (count($errors = $this->get('Errors')))
		{
			throw new Exception(implode("\n", $errors), 500);
		}

		$this->addToolbar();

		parent::display($tpl);
	}

	/**
	 * Add the page title and toolbar.
	 *
	 * @return  void
	 *
	 * @since   1.6
	 */
	protected function addToolbar()
	{
		$canDo = JHelperContent::getActions('com_languages');

		if ((int) $this->state->get('client_id') === 1)
		{
			JToolbarHelper::title(JText::_('COM_LANGUAGES_VIEW_INSTALLED_ADMIN_TITLE'),
'comments-2 langmanager');
		}
		else
		{
			JToolbarHelper::title(JText::_('COM_LANGUAGES_VIEW_INSTALLED_SITE_TITLE'),
'comments-2 langmanager');
		}

		if ($canDo->get('core.edit.state'))
		{
			JToolbarHelper::makeDefault('installed.setDefault');
			JToolbarHelper::divider();
		}

		if ($canDo->get('core.admin'))
		{
			// Add install languages link to the lang installer component.
			$bar = JToolbar::getInstance('toolbar');

			// Switch administrator language
			if ($this->state->get('client_id', 0) == 1)
			{
				JToolbarHelper::custom('installed.switchadminlanguage',
'refresh', 'refresh',
'COM_LANGUAGES_SWITCH_ADMIN', false);
				JToolbarHelper::divider();
			}

			$bar->appendButton('Link', 'upload',
'COM_LANGUAGES_INSTALL',
'index.php?option=com_installer&view=languages');
			JToolbarHelper::divider();

			JToolbarHelper::preferences('com_languages');
			JToolbarHelper::divider();
		}

		JToolbarHelper::help('JHELP_EXTENSIONS_LANGUAGE_MANAGER_INSTALLED');

		$this->sidebar = JHtmlSidebar::render();
	}
}
language/tmpl/edit.php000064400000006064151162146410010750 0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_languages
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html');

JHtml::_('behavior.formvalidator');
JHtml::_('formbehavior.chosen', 'select');

JFactory::getDocument()->addScriptDeclaration(
	'
	Joomla.suinstalled/tmpl/default.xml000064400000000330151162146410011642
0ustar00emoveAttr("alt");
			}
	});
});'
);
?>

<form action="<?php echo
JRoute::_('index.php?option=com_languages&view=language&layout=edit&lang_id='
. (int) $this->item->lang_id); ?>" method="post"
name="adminForm"
id="laninstalled/view.html.php000064400000005715151162146410011162
0ustar00installed/tmpl/default.xml000064400000000330151162146410011642
0ustar00addTab', 'myTab', 'metadata',
JText::_('JGLOBAL_FIELDSET_METADATA_OPTIONS')); ?>
		<?php echo $this->form->renderFieldset('metadata');
?>
		<?php echo JHtml::_('bootstrap.endTab'); ?>

		<?php echo
JHtml::_('bootstrainstalled/view.html.php000064400000005715151162146410011162
0ustar00language/view.html.php000064400000004101151162146410010752
0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_languages
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

/**
 * HTML View class for the Languages component.
 *
 * @since  1.5
 */
class LanguagesViewLanguage extends JViewLegacy
{
	public $item;

	public $form;

	public $state;

	/**
	 * Display the view.
	 *
	 * @param   string  $tpl  The name of the template file to parse.
	 *
	 * @return  void
	 */
	public function display($tpl = null)
	{
		$this->item  = $this->get('Item');
		$this->form  = $this->get('Form');
		$this->state = $this->get('State');
		$this->canDo = JHelperContent::getActions('com_languages');

		// Check for errors.
		if (count($errors = $this->get('Errors')))
		{
			throw new Exception(implode("\n", $errors), 500);
		}

		$this->addToolbar();
		parent::display($tpl);
	language/tmpl/edit.php000064400000006064151162146410010750
0ustar00o->get('core.create')) || (!$isNew &&
$canDo->get('core.edit')))
		{
			JToolbarHelper::apply('language.apply');
			JToolbarHelper::save('language.save');
		}

		// If an existing item, can save to a copy only if we have create rights.
		if ($canDo->get('core.create'))
		{
			JToolbarHelper::save2new('language.save2new');
		}

		if ($isNew)
		{
			JToolbarHelper::cancel('language.cancel');
		}
		else
		{
			JToolbarHelper::cancel('language.cancel',
'JTOOLBAR_CLOSE');
		}

		JToolbarHelper::divider();
		JToolbarHelper::help('JHELP_EXTENSIONS_LANGUAGE_MANAGER_EDIT');
	}
}
language/tmpl/edit.php000064400000006064151162146410010750 0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_languages
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

$notice_homes     = $this->homes == 2 || $this->homes == 1 ||
$this->homes - 1 != count($this->contentlangs) &&
($this->language_filter || $this->switchers != 0);
$notice_disabled  = !$this->language_filter	&& ($this->homes
> 1 || $this->switchers != 0);
$notice_switchers = !$this->switchers && ($this->homes > 1
|| $this->language_filter);
?>
<div class="mod-multilangstatus">
	<?php if (!$this->language_filter && $this->switchers ==
0) : ?>
		<?php if ($this->homes == 1) : ?>
			<div class="alert alert-info"><?php echo
JText::_('COM_LANGUAGES_MULTILANGSTATUS_NONE'); ?></div>
		<?php else : ?>
			<div class="alert alert-info"><?php echo
JText::_('COM_LANGUAGES_MULTILANGSTATUS_USELESS_HOMES');
?></div>
		<?php endif; ?>
	<?php else : ?>
	<table class="table table-striped table-condensed">
		<tbody>
		<?php if ($this->defaultHome == true) : ?>
			<tr class="warning">
				<td>
					<span class="icon-pending"
aria-hidden="true"></span><span
class="element-invisible"><?php echo
JText::_('WARNING'); ?></span>
				</td>
				<td>
					<?php echo
JText::_('COM_LANGUAGES_MULTILANGSTATUS_DEFAULT_HOME_MODULE_PUBLISHED');
?>
				</td>
			</tr>
		<?php endif; ?>
		<?php if ($notice_homes) : ?>
			<tr class="warning">
				<td>
					<span class="icon-pending"
aria-hidden="true"></span><span
class="elemenlanguage/view.html.php000064400000004101151162146410010752
0ustar00ng->lang_code, $this->homepages) &&
(!array_key_exists($contentlang->lang_code, $this->site_langs) ||
!$contentlang->published)) : ?>
				<tr class="warning">
					<td>
						<span class="icon-pending"
aria-hidden="true"></span><span
class="element-invisible"><?php echo
JText::_('WARNING'); ?></span>
					</td>
					<td>
						<?php echo
JText::sprintf('COM_LANGUAGES_MULTILANGSTATUS_ERROR_CONTENT_LANGUAGE',
$contentlang->lang_code); ?>
					</td>
				</tr>
			<?php endif; ?>
			<?php if (!array_key_exists($contentlang->lang_code,
$this->site_langs)) : ?>
			language/view.html.php000064400000004101151162146410010752
0ustar00		</td>
				<td>
					<?php echo
JText::_('COM_LANGUAGES_MULTILANGSTATUS_CONTACTS_ERROR_TIP');
?>
					<ul>
					<?php foreach ($this->listUsersError as $user) : ?>
						<li>
						<?php echo
JText::sprintf('COM_LANGUAGES_MULTILANGSTATUS_CONTACTS_ERROR',
$user->name); ?>
						</li>
					<?php endforeach; ?>
					</ul>
				</td>
			</tr>
		<?php endif; ?>
		</tbody>
	</table>
	<table class="table table-striped table-condensed"
style="border-top: 1px solid #CCCCCC;">
		<thead>
			<tr>
				<th>
					<?php echo JText::_('JDETAILS'); ?>
				</th>
				<th class="center">
			multilangstatus/tmpl/default.php000064400000023575151162146440013135
0ustar00MULTILANGSTATUS_HOMES_PUBLISHED'); ?>
					<?php endif; ?>
				</th>
				<td class="center">
					<?php if ($this->homes > 1) : ?>
						<?php echo $this->homes; ?>
					<?php else : ?>
						<?php echo
JText::_('COM_LANGUAGES_MULTILANGSTATUS_HOMES_PUBLISHED_ALL');
?>
					<?php endif; ?>
				</td>
			</tr>
		</tbody>
	</table>
	<table class="table table-striped table-condensed"
style="border-top: 1px solid #CCCCCC;">
		<thead>
			<tr>
				<th>
					<?php echo JText::_('JGRID_HEADING_LANGUAGE'); ?>
				</th>
				<th class="center">
					<?php echo
JText::_('COM_LANGUAGESmultilangstatus/tmpl/default.php000064400000023575151162146440013135
0ustar00) : ?>
						<td class="center">
							<span class="icon-ok"
aria-hidden="true"></span><span
class="element-invisible"><?php echo
JText::_('JYES'); ?></span>
						</td>
				<?php elseif ($status->lang_code && $status->published
== 0) : ?>
						<td class="center">
							<span class="icon-pending"
aria-hidden="true"></span><span
class="element-invisible"><?php echo
JText::_('WARNING'); ?></span>
						</td>
				<?php elseif ($status->lang_code && $status->published
== -2) : ?>
						<td class="center">
							<span class="icon-trash"
aria-hidden="true"></span><span
class="element-invisible"><?php echo
JText::_('WARNING'); ?></span>
						</td>
				<?php else : ?>
						<td class="center">
							<span class="icon-pending"
aria-hidden="true"></span><span
class="element-invisible"><?php echo
JText::_('WARNING'); ?></span>
						</td>
				<?php endif; ?>
				<?php // Published Home pages ?>
				<?php if ($status->home_language) : ?>
						<td class="center">
							<span class="icon-ok"
aria-hidden="true"></span><span
class="element-invisible"><?php echo
JText::_('JYES'); ?></span>
						</td>
				<?php else : ?>
						<td class="center">
							<span class="icon-not-ok"
aria-hidden="true"></span><span
class="element-invisible"><?php echo
JText::_('JNO'); ?></span>
						</td>
				<?php endif; ?>
				</tr>
			<?php endforeach; ?>
			<?php foreach ($this->contentlangs as $contentlang) : ?>
				<?php if (!array_key_exists($contentlang->lang_code,
$this->site_langs)) : ?>
					<tr>
						<td>
							<?php echo $contentlang->lang_code; ?>
						</td>
						<td class="center">
							<span class="icon-pending"
aria-hidden="true"></span><span
class="element-invisible"><?php echo
JText::_('WARNING'); ?></span>
						</td>
						<td class="center">
							<?php if ($contentlang->published) : ?>
								<span class="icon-ok"
aria-hidden="true"></span><span
class="element-invisible"><?php echo
JText::_('JYES'); ?></span>
							<?php elseif (!$contentlang->published &&
array_key_exists($contentlang->lang_code, $this->homepages)) : ?>
								<span class="icon-not-ok"
aria-hidden="true"></span><span
class="element-invisible"><?php echo
JText::_('JNO'); ?></span>
							<?php elseif (!$contentlang->published) : ?>
								<span class="icon-pending"
aria-hidden="true"></span><span
class="element-invisible"><?php echo
JText::_('WARNING'); ?></span>
							<?php endif; ?>
						</td>
						<td class="center">
							<?php if (!array_key_exists($contentlang->lang_code,
$this->homepages)) : ?>
								<span class="icon-pending"
aria-hidden="true"></span><span
class="element-invisible"><?php echo
JText::_('WARNING'); ?></span>
							<?php else : ?>
								<span class="icon-ok"
aria-hidden="true"></span><span
class="element-invisible"><?php echo
JText::_('JYES'); ?></span>
							<?php endif; ?>
						</td>
					</tr>
				<?php endif; ?>
			<?php endforeach; ?>
		</tbody>
	</table>
	<?php endif; ?>
</div>
multilangstatus/view.html.php000064400000002452151162146440012441
0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_languages
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

/**
 * Displays the multilang status.
 *
 * @since  1.7.1
 */
class LanguagesViewMultilangstatus extends JViewLegacy
{
	/**
	 * Display the view.
	 *
	 * @param   string  $tpl  The name of the template file to parse.
	 *
	 * @return  void
	 */
	public function display($tpl = null)
	{
		JLoader::register('MultilangstatusHelper', JPATH_ADMINISTRATOR
. '/components/com_languages/helpers/multilangstatus.php');

		$this->homes           = MultilangstatusHelper::getHomes();
		$this->language_filter = JLanguageMultilang::isEnabled();
		$this->switchers       = MultilangstatusHelper::getLangswitchers();
		$this->listUsersError  = MultilangstatusHelper::getContacts();
		$this->contentlangs    = MultilangstatusHelper::getContentlangs();
		$this->site_langs      = JLanguageHelper::getInstalledLanguages(0);
		$this->statuses        = MultilangstatusHelper::getStatus();
		$this->homepages       = JLanguageMultilang::getSiteHomePages();
		$this->defaultHome     =
MultilangstatusHelper::getDefaultHomeModule();

		parent::display($tpl);
	}
}
override/tmpl/edit.php000064400000011444151162146440011005 0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_languages
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html');

JHtml::_('behavior.formvalidator');
JHtml::_('behavior.keepalive');
JHtml::_('formbehavior.chosen', 'select');

$expired = ($this->state->get('cache_expired') == 1 ) ?
'1' : '';

JHtml::_('stylesheet', 'overrider/overrider.css',
array('version' => 'auto', 'relative'
=> true));

JHtml::_('behavior.core');
JHtml::_('jquery.framework');
JHtml::_('script', 'overrider/overrider.min.js',
array('version' => 'auto', 'relative'
=> true));

JFactory::getDocument()->addScriptDeclaration('
	jQuery(document).ready(function($) {
		$("#jform_searchstring").on("focus", function() {
			if (!Joomla.overrider.states.refreshed)
			{
				var expired = "' . $expired . '";
				if (expired)
				{
					Joomla.overrider.refreshCache();
					Joomla.overrider.states.refreshed = true;
				}
			}
			$(this).removeClass("invalid");
		});
	});

	Joomla.submitbutton = function(task) {
		if (task == "override.cancel" ||
document.formvalidator.isValid(document.getElementById("override-form")))
		{
			Joomla.submitform(task,
document.getElementById("override-form"));
		}
	};
');
?>

<form action="<?php echo
JRoute::_('index.php?option=com_languages&id=' .
$this->item->key); ?>" method="post"
name="adminForm" id="override-form"
class="form-validate form-horizontal">
	<div class="row-fluid">
		<div class="span6">
			<fieldset>
				<legend><?php echo empty($this->item->key) ?
JText::_('COM_LANGUAGES_VIEW_OVERRIDE_EDIT_NEW_OVERRIDE_LEGEND')
:
JText::_('COM_LANGUAGES_VIEW_OVERRIDE_EDIT_EDIT_OVERRIDE_LEGEND');
?></legend>
				<div class="control-group">
					<div class="control-label">
						<?php echo $this->form->getLabel('language');
?>
					</div>
					<div class="controls">
						<?php echo $this->form->getInput('language');
?>
					</div>
				</div>

				<div class="control-group">
					<div class="control-label">
						<?php echo $this->form->getLabel('client'); ?>
					</div>
					<div class="controls">
						<?php echo $this->form->getInput('client'); ?>
					</div>
				</div>

				<div class="control-group">
					<div class="control-label">
						<?php echo $this->form->getLabel('key'); ?>
					</div>
					<div class="controls">
						<?php echo $this->form->getInput('key'); ?>
					</div>
				</div>

				<div class="control-group">
					<div class="control-label">
						<?php echo $this->form->getLabel('override');
?>
					</div>
					<div class="controls">
						<?php echo $this->form->getInput('override');
?>
					</div>
				</div>

				<?php if ($this->state->get('filter.client') ==
'administrator') : ?>
				<div class="control-group">
					<div class="control-label">
						<?php
echmultilangstatus/view.html.php000064400000002452151162146440012441
0ustar00RCH_TIP'); ?></p></div>

				<div class="control-group">
					<?php echo $this->form->getInput('searchstring');
?>
					<button type="submit" class="btn btn-primary"
onclick="Joomla.overrider.searchStrings();return false;"
formnovalidate>
						<?php echo
JText::_('COM_LANGUAGES_VIEW_OVERRIDE_SEARCH_BUTTON'); ?>
					</button>
					<span id="refresh-status" class="overrider-spinner 
help-block">
						<?php echo
JText::_('COM_LANGUAGES_VIEW_OVERRIDE_REFRESHING'); ?>
					</span>
				</div>
				<div class="control-group">
					<div class="control-label">
						<?php echo $this->form->getLabel('searchtype');
?>
					</div>
					<div class="controls">
						<?php echo $this->form->getInput('searchtype');
?>
					</div>
				</div>

			</fieldset>

			<fieldset id="results-container"
class="adminform">
				<legend><?php echo
JText::_('COM_LANGUAGES_VIEW_OVERRIDE_RESULTS_LEGEND');
?></lmultilangstatus/view.html.php000064400000002452151162146440012441
0ustar00override/tmpl/edit.php000064400000011444151162146440011005
0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_languages
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

/**
 * View to edit a language override
 *
 * @since  2.5
 */
class LanguagesViewOverride extends JViewLegacy
{
	/**
	 * The form to use for the view.
	 *
	 * @var		object
	 * @since	2.5
	 */
	protected $form;

	/**
	 * The item to edit.
	 *
	 * @var		object
	 * @since	2.5
	 */
	protected $item;

	/**
	 * The model state.
	 *
	 * @var		object
	 * @since	2.5
	 */
	protected $state;

	/**
	 * Displays the view.
	 *
	 * @param   string  $tpl  The name of the template file to parse
	 *
	 * @return  void
	 *
	 * @since   2.5
	 */override/tmpl/edit.php000064400000011444151162146440011005
0ustar00)->getUserState(
			'com_languages.overrides.cachedtime.' .
$this->state->get('filter.client') . '.' .
$this->state->get('filter.language'),
			0
		);

		if (time() - $cached_time > 60 * 5)
		{
			$this->state->set('cache_expired', true);
		}

		// Add strings for translations in Javascript.
		JText::script('COM_LANGUAGES_VIEW_OVERRIDE_NO_RESULTS');
		JText::script('COM_LANGUAGES_VIEW_OVERRIDE_REQUEST_ERROR');

		$this->addToolbar();
		parent::display($tpl);
	}

	/**
	 * Adds the page title and toolbar.
	 *
	 * @return void
	 *
	 * @since	2.5
	 */
	protected function addToolbar()
	{
		JFactory::getApplication()->input->set('hidemainmenu',
true);

		$canDo = JHelperContent::getActions('com_languages');

		JToolbarHelper::title(JText::_('COM_LANGUAGES_VIEW_OVERRIDE_EDIT_TITLE'),
'comments-2 langmanager');

		if ($canDo->get('core.edit'))
		{
			JToolbarHelper::apply('override.apply');
			JToolbarHelper::save('override.save');
		}

		// This component does not support Save as Copy.
		if ($canDo->get('core.edit') &&
$canDo->get('core.create'))
		{
			JToolbarHelper::save2new('override.save2new');
		}

		if (empty($this->item->key))
		{
			JToolbarHelper::cancel('override.cancel');
		}
		else
		{
			JToolbarHelper::cancel('override.cancel',
'JTOOLBAR_CLOSE');
		}

		JToolbarHelper::divider();
		JToolbarHelper::help('JHELP_EXTENSIONS_LANGUAGE_MANAGER_OVERRIDES_EDIT');
	}
}
overrides/tmpl/default.php000064400000007702151162146440011671
0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_languages
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

JHtml::_('formbehavior.chosen', 'select');
JHtml::_('bootstrap.tooltip');

JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html');
$client    = $this->state->get('filter.client') ==
'site' ? JText::_('JSITE') :
JText::_('JADMINISTRATOR');
$language  = $this->state->get('filter.language');
$listOrder =
$this->escape($this->state->get('list.ordering'));
$listDirn  =
$this->escape($this->state->get('list.direction'));

$oppositeClient   = $this->state->get('filter.client') ==
'administrator' ? JText::_('JSITE') :
JText::_('JADMINISTRATOR');
$oppositeFileName = constant('JPATH_' .
strtoupper($this->state->get('filter.client') ===
'site' ? 'administrator' : 'site'))
	. '/language/overrides/' .
$this->state->get('filter.language', 'en-GB') .
'.override.ini';
$oppositeStrings  = JLanguageHelper::parseIniFile($oppositeFileName);
?>

<form action="<?php echo
JRoute::_('index.php?option=com_languages&view=overrides');
?>" method="post" name="adminForm"
id="adminForm">
<?php if (!empty( $this->sidebar)) : ?>
	<div
id="j-sidebar-coverride/view.html.php000064400000005556151162146440011030
0ustar00AGES_VIEW_OVERRIDES_KEY', 'key', $listDirn,
$listOrder); ?>
						</th>
						<th class="left hidden-phone">
							<?php echo JHtml::_('searchtools.sort',
'COM_LANGUAGES_VIEW_OVERRIDES_TEXT', 'text', $listDirn,
$listOrder); ?>
						</th>
						<th class="nowrap hidden-phone">
							<?php echo
JText::_('COM_LANGUAGES_FIELD_LANG_TAG_LABEL'); ?>
						</th>
						<th class="hidden-phone">
							<?php echo JText::_('JCLIENT'); ?>
						</th>
					</tr>
				</thead>
				<tfoot>
					<tr>
						<td colspan="5">
							<?php echo $this->pagination->getListFooter(); ?>
						</td>
					</tr>
				</tfoot>
				<tbody>
				<?php $canEdit =
JFactory::getUser()->authorise('core.edit',
'com_languages'); ?>
				<?php $i = 0; ?>
				<?php foreach ($this->items as $key => $text) : ?>
					<tr
class="row<?poverride/view.html.php000064400000005556151162146440011030
0ustar00ne">
							<?php echo $client; ?><?php
							if (isset($oppositeStrings[$key]) && $oppositeStrings[$key]
=== $text)
							{
								echo '/' . $oppositeClient;
							}
							?>
						</td>
					</tr>
				<?php $i++; ?>
				<?php endforeach; ?>
				</tbody>
			</table>
		<?php endif; ?>

		<input type="hidden" name="task"
value="" />
		<input type="hidden" name="boxchecked"
value="0" />
		<?php echo JHtml::_('form.token'); ?>
	</div>
</form>
overrides/tmpl/default.xml000064400000000326151162146440011675
0ustar00<?xml version="1.0" encoding="utf-8"?>
<metadata>
	<layout title="COM_LANGUAGES_OVERRIDE_VIEW_DEFAULT_TITLE">
		<message>
			<![CDATA[COM_LANGUAGES_OVERRIDE_VIEW_DEFAULT_DESC]]>
		</message>
	</layout>
</metadata>
overrides/tmpl/default.php000064400000007702151162146440011671
0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_languages
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

/**
 * View for language overrides list.
 *
 * @since  2.5
 */
class LanguagesViewOverrides extends JViewLegacy
{
	/**
	 * The items to list.
	 *
	 * @var		array
	 * @since	2.5
	 */
	protected $items;

	/**
	 * The pagination object.
	 *
	 * @var		object
	 * @since	2.5
	 */
	protected $pagination;

	/**
	 * The model state.
	 *
	 * @var		object
	 * @since	2.5
	 */
	protected $state;

	/**
	 * Displays the view.
	 *
	 * @param   string  $tpl  The name of the template file to parse.
	 *
	 * @return  void
	 *
	 * @since   2.5
	 */
	public function display($tpl = null)
	{
		$this->state        
overrides/tmpl/default.php000064400000007702151162146440011671
0ustar00action
		$canDo = JHelperContent::getActions('com_languages');

		JToolbarHelper::title(JText::_('COM_LANGUAGES_VIEW_OVERRIDES_TITLE'),
'comments-2 langmanager');

		if ($canDo->get('core.create'))
		{
			JToolbarHelper::addNew('override.add');
		}

		if ($canDo->get('core.edit') &&
$this->pagination->total)
		{
			JToolbarHelper::editList('override.edit');
		}

		if ($canDo->get('core.delete') &&
$this->pagination->total)
		{
			JToolbarHelper::deleteList('JGLOBAL_CONFIRM_DELETE',
'overrides.delete', 'JTOOLBAR_DELETE');
		}

		if (JFactory::getUser()->authorise('core.admin'))
		{
			JToolbarHelper::custom('overrides.purge',
'refresh.png', 'refresh_f2.png',
'COM_LANGUAGES_VIEW_OVERRIDES_PURGE', false);
		}

		if ($canDo->get('core.admin'))
		{
			JToolbarHelper::preferences('com_languages');
		}

		JToolbarHelper::divider();
		JToolbarHelper::help('JHELP_EXTENSIONS_LANGUAGE_MANAGER_OVERRIDES');

		JHtmlSidebar::setAction('index.php?option=com_languages&view=overrides');

		$this->sidebar = JHtmlSidebar::render();
	}
}
field/tmpl/edit.php000064400000007615151162212030010243 0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_fields
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */
defined('_JEXEC') or die;

// Include the component HTML helpers.
JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html');

JHtml::_('behavior.formvalidator');
JHtml::_('behavior.keepalive');
JHtml::_overrides/tmpl/default.xml000064400000000326151162146440011675
0ustar00Query("#jform_title").val());
		jQuery("#jform_title").change(function(data, handler) {
			if(jQuery("#jform_title").data("dp-old-value") ==
jQuery("#jform_label").val()) {
				jQuery("#jform_label").val(jQuery("#joverrides/view.html.php000064400000005012151162146440011176
0ustar00overrides/tmpl/default.xml000064400000000326151162146440011675
0ustar00
			<div class="span3">
				<?php $this->set('fields',
						array(
							array(
								'published',
								'state',
								'enabled',
							),
							'group_id',
							'assigned_cat_ids',
							'access',
		overrides/view.html.php000064400000005012151162146440011176
0ustar00dTab', 'myTab', 'rules',
JText::_('JGLOBAL_ACTION_PERMISSIONS_LABEL', true)); ?>
			<?php echo $this->form->getInput('rules'); ?>
			<?php echo JHtml::_('bootstrap.endTab'); ?>
		<?php endif; ?>
		<?php echo JHtml::_('bootstrap.endTabSet'); ?>
		<?php echo $this->form->getInput('context'); ?>
		<input type="hidden" name="task"
value="" />
		<?php echo JHtml::_('form.token'); ?>
	</div>
</form>
fields/tmpl/default.php000064400000021001151162212030011106
0ustar00<?php
/**
field/tmpl/edit.php000064400000007615151162212030010243 0ustar00ject of the
component
$category = JCategories::getInstance(str_replace('com_',
'', $component) . '.' . $section);

// If there is no category for the component and section, so check the
component only
if (!$category)
{
	$category = JCategories::getInstance(str_replace('com_',
'', $component));
}

if ($saveOrder)
{
	$saveOrderingUrl =
'index.php?option=com_fields&task=fields.saveOrderAjax&tmpl=component';
	JHtml::_('sortablelist.sortable', 'fieldList',
'adminForm', strtolower($listDirn), $saveOrderingUrl, false,
true)field/tmpl/edit.php000064400000007615151162212030010243
0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_fields
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */
defined('_JEXEC') or die;

// Include the component HTML helpers.
JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html');

JHtml::_('behavior.formvalidator');
JHtml::_('behavior.keepalive');
JHtml::_('behavior.tabstate');
JHtml::_('formbehavior.chosen', '#jform_catid', null,
array('disable_search_threshold' => 0 ));
JHtml::_('formbehavior.chosen', 'select');

$app = JFactory::getApplication();
$input = $app->input;

JFactory::getDocument()->addScriptDeclaration('
	Joomla.submitbutton = function(task)
	{
		if (task == "field.cancel" ||
document.formvalidator.isValid(document.getElementById("item-form")))
		{
			Joomla.submitform(task, document.getElementById("item-form"));
		}
	};
	jQuery(document).ready(function() {
		jQuery("#jform_title").data("dp-old-value",
jQuery("#jform_title").val());
		jQuery("#jform_title").change(function(data, handler) {
			if(jQuery("#jform_title").data("dp-old-value") ==
jQuery("#jform_label").val()) {
				jQuery("#jform_label").val(jQuery("#jform_title").val());
			}

			jQuery("#jform_title").data("dp-old-value",
jQuery("#jform_title").val());
		});
	});
');

?>

<form action="<?php echo
JRoute::_('index.php?option=com_fields&context=' .
$input->getCmd('context', 'com_content') .
'&layout=edit&id=' . (int) $this->item->id);
?>" method="post" name="adminForm"
id="item-form" class="form-validate">
	<?php echo JLayoutHelper::render('joomla.edit.title_alias',
$this); ?>
	<div class="form-horizontal">
		<?php echo JHtml::_('bootstrap.startTabSet',
'myTab', array('active' => 'general'));
?>
		<?php echo JHtml::_('bootstrap.addTab', 'myTab',
'general',
JText::_('COM_FIELDS_VIEW_FIELD_FIELDSET_GENERAL', true)); ?>
		<div class="row-fluid">
			<div class="span9">
				<?php echo $this->form->renderField('type'); ?>
				<?php echo $this->form->renderField('name'); ?>
				<?php echo $this->form->renderField('label'); ?>
				<?php echo $this->form->renderField('description');
?>
				<?php echo $this->form->renderField('required');
?>
				<?php echo
$this->form->renderField('default_value'); ?>

				<?php foreach
($this->form->getFieldsets('fieldparams') as $name =>
$fieldSet) : ?>
					<?php foreach ($this->form->getFieldset($name) as
$ffields/tmpl/default.php000064400000021001151162212030011106 0ustar00 echo
JLayoutHelper::render('joomla.edit.params', $this); ?>
		<?php echo JHtml::_('bootstrap.addTab', 'myTab',
'publishing', JText::_('JGLOBAL_FIELDSET_PUBLISHING',
true)); ?>
		<div class="row-fluid form-horizontal-desktop">
			<div class="span6">
				<?php echo
JLayoutHelper::render('joomla.edit.publishingdata', $this); ?>
			</div>
			<div class="span6">
			</div>
		</div>
		<?php echo JHtml::_('bootstrap.endTab'); ?>
		<?php if ($this->canDo->get('core.admin')) : ?>
			<?php echo JHtml::_('bootstrap.addTab', 'myTab',
'rules', JText::_('JGLOBAL_ACTION_PERMISSIONS_LABEL',
true)); ?>
			<?php echo $this->form->getInput('rules'); ?>
			<?php echo JHtml::_('bootstrap.endTab'); ?>
		<?php endif; ?>
		<?php echo JHtml::_('bootstrap.endTabSet'); ?>
		<?php echo $this->form->getInput('context'); ?>
		<input type="hidden" name="task"
value="" />
		<?php echo JHtml::_('form.token'); ?>
	</div>
</form>
fields/tmpl/default.php000064400000021001151162212030011106
0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_fields
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */
defined('_JEXEC') or die;

// Include the component HTML helpers.
JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html');

JHtml::_('bootstrap.tooltip');
JHtml::_('behavior.multiselect');
JHtml::_('formbehavior.chosen', 'select');

$app       = JFactory::getApplication();
$user      = JFactory::getUser();
$userId    = $user->get('id');
$context   =
$this->escape($this->state->get('filter.context'));
$component = $this->state->get('filter.component');
$section   = $this->state->get('filter.section');
$listOrder =
$this->escape($this->state->get('list.ordering'));
$listDirn  =
$this->escape($this->state->get('list.direction'));
$ordering  = ($listOrder == 'a.ordering');
$saveOrder = ($listOrder == 'a.ordering' &&
strtolower($listDirn) == 'asc');

// The category object of the component
$category = JCategories::getInstance(str_replace('com_',
'', $component) . '.' . $section);

// If there is no category for the component and section, so check the
component only
if (!$category)
{
	$category = JCategories::getInstance(str_replace('com_',
'', $component));
}

if ($saveOrder)
{
	$saveOrderingUrl =
'index.php?option=com_fields&task=fields.saveOrderAjax&tmpl=component';
	JHtml::_('sortablelist.sortable', 'fieldList',
'adminForm', strtolower($listDirn), $saveOrderingUrl, false,
true);
}
?>

<form action="<?php echo
JRoute::_('index.php?option=com_fields&view=fields');
?>" method="post" name="adminForm"
id="adminForm">
	<div id="j-sidebar-container" class="span2">
		<?php echo $this->sidebar; ?>
	</div>
	<div id="j-main-container" class="span10">
		<div id="filter-bar" class="js-stools-container-bar
pull-left">
			<div class="btn-group pull-left">
				<?php echo
$this->filterForm->getField('context')->input; ?>
			</div>&nbsp;
		</div>
		<?php echo
JLayoutHelper::render('joomla.searchtools.default',
array('view' => $this)); ?>
		<?php if (empty($this->items)) : ?>
			<div class="alert alert-no-items">
				<?php echo JText::_('JGLOBAL_NO_MATCHING_RESULTS'); ?>
			</div>
		<?php else : ?>
			<table class="table table-striped"
id="fieldList">
				<thead>
					<tr>
						<th width="1%" class="nowrap center
hidden-phone">
							<?php echo JHtml::_('searchtools.sort', '',
'a.ordering', $listDirn, $listOrder, null, 'asc',
'JGRID_HEADING_ORDERING', 'icon-menu-2'); ?>
						</th>
						<th width="1%" class="center">
							<?php echo JHtml::_('grid.checkall'); ?>
						</th>
						<th width="1%" class="nowrap center">
							<?php echo JHtml::_('searchtools.sort',
'JSTATUS', 'a.state', $listDirn, $listOrder); ?>
						</th>
						<th>
							<?php echo JHtml::_('searchtools.sort',
'JGLOBAL_TITLE', 'a.title', $listDirn, $listOrder);
?>
						</th>
						<th>
							<?php echo JHtml::_('searchtools.sort',
'COM_FIELDS_FIELD_TYPE_LABEL', 'a.type', $listDirn,
$listOrder); ?>
						</th>
						<th>
							<?php echo JHtml::_('searchtools.sort',
'COM_FIELDS_FIELD_GROUP_LABEL', 'g.title', $listDirn,
$listOrder); ?>
						</th>
						<th width="10%" class="nowrap
hidden-phone">
							<?php echo JHtml::_('searchtools.sort',
'JGRID_HEADING_ACCESS', 'a.access', $listDirn,
$listOrder); ?>
						</th>
						<th width="5%" class="nowrap hidden-phone">
							<?php echo JHtml::_('searchtools.sort',
'JGRID_HEADING_LANGUAGE', 'a.language', $listDirn,
$listOrder); ?>
						</th>
						<th width="1%" class="nowrap hidden-phone">
							<?php echo JHtml::_('searchtools.sort',
'JGRID_HEADING_ID', 'a.id', $listDirn, $listOrder);
?>
						</th>
					</tr>
				</thead>
				<tfoot>
					<tr>
						<td colspan="9">
							<?php echo $this->pagination->getListFooter(); ?>
						</td>
					</tr>
				</tfoot>
				<tbody>
					<?php foreach ($this->items as $i => $item) : ?>
						<?php $ordering   = ($listOrder == 'a.ordering'); ?>
						<?php $canEdit    = $user->authorise('core.edit',
$component . '.field.' . $item->id); ?>
						<?php $canCheckin = $user->authorise('core.admin',
'com_checkin') || $item->checked_out == $userId ||
$item->checked_out == 0; ?>
						<?php $canEditOwn = $user->authorise('core.edit.own',
$component . '.field.' . $item->id) &&
$item->created_user_id == $userId; ?>
						<?php $canChange  =
$user->authorise('core.edit.state', $component .
'.field.' . $item->id) && $canCheckin; ?>
						<tr class="row<?php echo $i % 2; ?>"
item-id="<?php echo $item->id ?>">
							<td class="order nowrap center hidden-phone">
								<?php $iconClass = ''; ?>
								<?php if (!$canChange) : ?>
									<?php $iconClass = ' inactive'; ?>
								<?php elseif (!$saveOrder) : ?>
									<?php $iconClass = ' inactive tip-top hasTooltip"
title="' . JHtml::tooltipText('JORDERINGDISABLED');
?>
								<?php endif; ?>
								<span class="sortable-handler<?php echo $iconClass;
?>">
									<span class="icon-menu"
aria-hidden="true"></span>
								</span>
								<?php if ($canChange && $saveOrder) : ?>
									<input type="text" style="display:none"
name="order[]" size="5" value="<?php echo
$item->ordering; ?>" />
								<?php endif; ?>
							</td>
							<td class="center">
								<?php echo JHtml::_('grid.id', $i, $item->id);
?>
							</td>
							<td class="center">
								<div class="btn-group">
									<?php echo JHtml::_('jgrid.published',
$item->state, $i, 'fields.', $canChange, 'cb');
?>
									<?php // Create dropdown items and render the dropdown list.
?>
									<?php if ($canChange) : ?>
										<?php JHtml::_('actionsdropdown.' . ((int)
$item->state === 2 ? 'un' : '') .
'archive', 'cb' . $i, 'fields'); ?>
										<?php JHtml::_('actionsdropdown.' . ((int)
$item->state === -2 ? 'un' : '') .
'trash', 'cb' . $i, 'fields'); ?>
										<?php echo JHtml::_('actionsdropdown.render',
$this->escape($item->title)); ?>
									<?php endif; ?>
								</div>
							</td>
							<td>
								<div class="pull-left break-word">
									<?php if ($item->checked_out) : ?>
										<?php echo JHtml::_('jgrid.checkedout', $i,
$item->editor, $item->checked_out_time, 'fields.',
$canCheckin); ?>
									<?php endif; ?>
									<?php if ($canEdit || $canEditOwn) : ?>
										<a href="<?php echo
JRoute::_('index.php?option=com_fields&task=field.edit&id='
. $item->id . '&context=' . $context); ?>">
											<?php echo $this->escape($item->title); ?></a>
									<?php else : ?>
										<?php echo $this->escape($item->title); ?>
									<?php endif; ?>
									<span class="small break-word">
										<?php if (empty($item->note)) : ?>
											<?php echo JText::sprintf('JGLOBAL_LIST_NAME',
$this->escape($item->name)); ?>
										<?php else : ?>
											<?php echo JText::sprintf('JGLOBAL_LIST_NAME_NOTE',
$this->escape($item->name), $this->escape($item->note)); ?>
										<?php endif; ?>
									</span>
									<div class="small">
										<?php if ($category) : ?>
											<?php echo JText::_('JCATEGORY') . ': ';
?>
											<?php $categories =
FieldsHelper::getAssignedCategoriesTitles($item->idfields/tmpl/default_batch_body.php000064400000004450151162212030013275
0ustar00horise('core.edit.state', $component)) : ?>
				<?php echo JHtml::_(
						'bootstrap.renderModal',
						'collapseModal',
						array(
							'title' =>
JText::_('COM_FIELDS_VIEW_FIELDS_BATCH_OPTIONS'),
							'footer' =>
$this->loadTemplate('batch_footer')
						),
						$this->loadTemplate('batch_body')
					); ?>
			<?php endif; ?>
		<?php endif; ?>
		<input type="hidden" name="task"
value="" />
		<input type="hidden" name="boxchecked"
value="0" />
		<?php echo JHtml::_('form.token'); ?>
	</div>
</form>
fields/tmpl/default_batch_body.php000064400000004450151162212030013275
0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_fields
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */
defined('_JEXEC') or die;

JHtml::_('formbehavior.chosen', 'select');
JFactory::getDocument()->addScriptDeclaration(
	'
		jQuery(document).ready(function($){
			if ($("#batch-group-id").length){var batchSelector =
$("#batch-group-id");}
			if ($("#batch-copy-move").length) {
				$("#batch-copy-move").hide();
				batchSelector.on("change", function(){
					if (batchSelector.val() != 0 || batchSelector.val() != "") {
						$("#batch-copy-move").show();
					} else {
						$("#batch-copy-move").hide();
					}
				});
			}
		});
			'
);

$context   =
$this-fields/tmpl/default_batch_footer.php000064400000001307151162212030013634
0ustar00se-action-lbl" for="batch-choose-action"><?php
echo JText::_('COM_FIELDS_BATCH_GROUP_LABEL');
?></label>
				<div id="batch-choose-action"
class="control-group">
					<select name="batch[group_id]" class="inputbox"
id="batch-group-id">
						<option value=""><?php echo
JText::_('JLIB_HTML_BATCH_NO_CATEGORY'); ?></option>
						<option value="nogroup"><?php echo
JText::_('COM_FIELDS_BATCH_GROUP_OPTION_NONE');
?></option>
						<?php echo JHtml::_('select.options',
$this->get('Groups'), 'value', 'text');
?>
					</select>
				</div>
				<div id="batch-copy-move" class="control-group
radio">
					<?php echo JText::_('JLIB_HTML_BATCH_MOVE_QUESTION');
?>
					<?php echo JHtml::_('select.radiolist',
$optionsfields/tmpl/modal.php000064400000011210151162212030010557
0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_fields
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */
defined('_JEXEC') or die;

?>
<button type="button" class="btn"
onclick="document.getElementById('batch-field-id').value='';document.getElementById('batch-access').value='';document.getElementById('batch-language-id').value=''"
data-dismiss="modal">
	<?php echo JText::_('JCANCEL'); ?>
</button>
<button type="submit" class="btn btn-success"
onclick="Joomla.submitbutton('field.batch');return
false;">
	<?php echo JText::_('JGLOBAL_BATCH_PROCESS'); ?>
</button>
fields/tmpl/modal.php000064400000011210151162212030010557 0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_fields
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

if (JFactory::getApplication()->isClient('site'))
{
	JSession::checkToken('get') or
die(JText::_('JINVALID_TOKEN'));
}

JHtml::_('behavior.core');
JHtml::_('bootstrap.tooltip', '.hasTooltip',
array('placement' => 'bottom'));
JHtml::_('bootstrap.popover', '.hasPopover',
array('placement' => 'bottom'));
JHtml::_('formbehavior.chosen', 'select');
JHtml::_('script', 'com_fields/admin-fields-modal.js',
array('version' => 'auto', 'relative'
=> true));

// Special case for the search field tooltip.
$searchFilterDesc =
$this->filterForm->getFieldAttribute('search',
'description', null, 'filter');
JHtml::_('bootstrap.tooltip', '#filter_search',
array('title' => JText::_($searchFilterDesc),
'placement' => 'bottom'));

$listOrder =
$this->escape($this->state->get('list.ordering'));
$listDirn  =
$this->escape($this->state->get('list.direction'));
$editor    =
JFactory::getApplication()->input->get('editor',
'', 'cmd');
?>
<div class="container-popup">

	<form action="<?php echo
JRoute::_('index.php?option=com_fields&view=fields&layout=modal&tmpl=component&editor='
. $editor . '&' . JSession::getFormToken() . '=1');
?>" method="post" name="adminForm"
id="adminForm">

		<?php echo
JLayoutHelper::render('joomla.searchtools.default',
array('view' => $this)); ?>
		<?php if (empty($this->items)) : ?>
			<div class="alert alert-no-items">
				<?php echo JText::_('JGLOBAL_NO_MATCHING_RESULTS'); ?>
			</div>
		<?php else : ?>
			<table class="table table-striped"
id="moduleList">
				<thead>
					<tr>
						<th width="1%" class="nowrap center">
							<?php echo JHtml::_('searchtools.sort',
'JSTATUS', 'a.state', $listDirn, $listOrder); ?>
						</th>
						<th class="title">
							<?php echo JHtml::_('searchtools.sort',
'JGLOBAL_TITLE', 'a.title', $listDirn, $listOrder);
?>
						</th>
						<th width="15%" class="nowrap
hidden-phone">
							<?php echo JHtml::_('searchtools.sort',
'COM_FIELDS_FIELD_GROUP_LABEL', 'g.title', $listDirn,
$listOrder); ?>
						</th>
						<th width="10%" class="nowrap
hidden-phone">
							<?php echo JHtml::_('searchtools.sort',
'COM_FIELDS_FIELD_TYPE_LABEL', 'a.type', $listDirn,
$listOrder); ?>
						</th>
						<th width="10%" class="nowrap
hidden-phone">
							<?php echo JHtml::_('searchtools.sort',
'JGRID_HEADING_ACCESS', 'a.access', $listDirn,
$listOrder); ?>
						</th>
						<th width="10%" class="nowrap
hidden-phone">
							<?php echo JHtml::_('searchtools.sort',
'JGRID_HEADING_LANGUAGE', 'a.language', $listDirn,
$listOrder); ?>
						</th>
						<th width="1%" class="nowrap hidden-phone">
							<?php echo JHtml::_('searchtools.sort',
'JGRID_HEADING_ID', 'a.id', $listDirn, $listOrder);
?>
						</th>
					</tr>
				</thead>
				<tfoot>
					<tr>
						<td colspan="8">
							<?php echo $this->pagination->getListFooter(); ?>
						</td>
					</tr>
				</tfoot>
				<tbody>
					<?php
					$iconStates = array(
						-2 => 'icon-trash',
						0  =>
'icon-unpublifields/view.html.php000064400000011713151162212030010434
0ustar00			</td>
						<td class="small hidden-phone">
							<?php echo $item->type; ?>
						</td>
						<td class="small hidden-phone">
							<?php echo $this->escape($item->access_level); ?>
						</td>
						<td class="small hidden-phone">
							<?php echo
JLayoutHelper::render('joomla.content.language', $item); ?>
						</td>
						<td class="hidden-phone">
							<?php echo (int) $item->id; ?>
						</td>
					</tr>
				<?php endforeach; ?>
				</tbody>
			</table>
		<?php endif; ?>

		<input type="hidden" name="task"
value="" />
		<input type="hidden" name="boxchecked"
value="0" />
		<?php echo JHtml::_('form.token'); ?>

	</form>
</div>
fields/view.html.php000064400000011713151162212030010434 0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_fields
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */
defined('_JEXEC') or die;

/**
 * Fields View
 *
 * @since  3.7.0
 */
class FieldsViewFields extends JViewLegacy
{
	/**
	 * @var  JForm
	 *
	 * @since  3.7.0
	 */
	public $filterForm;

	/**
	 * @var  array
	 *
	 * @since  3.7.0
	 */
	public $activeFilters;

	/**
	 * @var  array
	 *
	 * @since  3.7.0
	 */
	protected $items;

	/**
	 * @var  JPagination
	 *
	 * @since  3.7.0
	 */
	protected $pagination;

	/**
	 * @var  JObject
	 *
	 * @since  3.7.0
	 */
	protected $state;

	/**
	 * @var  string
	 *
	 * @since  3.7.0
	 */
	protected $sidebar;

	/**
	 * Execute and display a template script.
	 *
	 * @param   string  $tpl  The name of the template file to parse;
automatically searches through the template paths.
	 *
	 * @return  mixed  A string if successful, otherwise an Error object.
	 *
	 * @see     JViewLegacy::loadTemplate()
	 * @since   3.7.0
	 */
	public function display($tpl = null)
	{
		$this->state         = $this->get('State');
		$this->items         = $this->get('Items');
		$this->pagination    = $this->get('Pagination');
		$this->filterForm    = $this->get('FilterForm');
		$this->activeFilters = $this->get('ActiveFilters');

		// Check for errors.
		if (count($errors = $this->get('Errors')))
		{
			throw new Exception(implode("\n", $errors), 500);
		}

		// Display a warning if the fields system plugin is disabled
		if (!JPluginHelper::isEnabled('system', 'fields'))
		{
			$link =
JRoute::_('index.php?option=com_plugins&task=plugin.edit&extension_id='
. FieldsHelper::getFieldsPluginId());
			JFactory::getApplication()->enqueueMessage(JText::sprintf('COM_FIELDS_SYSTEM_PLUGIN_NOT_ENABLED',
$link), 'warning');
		}

		// Only add toolbar when not in modal window.
		if ($this->getLayout() !== 'modal')
		{
			$this->addToolbar();
			FieldsHelper::addSubmenu($this->state->get('filter.context'),
'fields');
			$this->sidebar = JHtmlSidebar::render();
		}

		return parent::display($tpl);
	}

	/**
	 * Adds the toolbar.
	 *
	 * @return  void
	 *
	 * @since   3.7.0
	 */
	protected function addToolbar()
	{
		$fieldId   = $this->state->get('filter.field_id');
		$component = $this->state->get('filter.component');
		$section   = $this->state->get('filter.section');
		$canDo     = JHelperContent::getActions($component, 'field',
$fieldId);

		// Get the toolbar object instance
		$bar = JToolBar::getInstance('toolbar');

		// Avoid nonsense situation.
		if ($component == 'com_fields')
		{
			return;
		}

		// Load extension language file
		$lang = JFactory::getLanguage();
		$lang->load($component, JPATH_ADMINISTRATOR)
		|| $lang->load($component, JPath::clean(JPATH_ADMINISTRATOR .
'/components/' . $component));

		$title = JText::sprintf('COM_FIELDS_VIEW_FIELDS_TITLE',
JText::_(strtoupper($component)));

		// Prepare the toolbar.
		JToolbarHelper::title($title, 'puzzle fields ' .
substr($component, 4) . ($section ? "-$section" : '') .
'-fields');

		if ($canDo->get('core.create'))
		{
			JToolbarHelper::addNew('field.add');
		}

		if ($canDo->get('core.edit') ||
$canDo->get('core.edit.own'))
		{
			JToolbarHelper::editList('field.edit');
		}

		if ($canDo->get('core.edit.state'))
		{
			JToolbarHelper::publish('fields.publish',
'JTOOLBAR_PUBLISH', true);
			JToolbarHelper::unpublish('fields.unpublish',
'JTOOLBAR_UNPUBLISH', true);
			Jgroups/tmpl/default_batch_body.php000064400000001311151162212060013342
0ustar00l, 'batch');
		}

		if ($canDo->get('core.admin') ||
$canDo->get('core.options'))
		{
			JToolbarHelper::preferences($component);
		}

		if ($this->state->get('filter.state') == -2 &&
$canDo->get('core.delete', $component))
		{
			JToolbarHelper::deleteList('', 'fields.delete',
'JTOOLBAR_EMPTY_TRASH');
		}
		elseif ($canDo->get('core.edit.state'))
		{
			JToolbarHelper::trash('fields.trash');
		}

		JToolbarHelper::help('JHELP_COMPONENTS_FIELDS_FIELDS');
	}

	/**
	 * Returns the sort fields.
	 *
	 * @return  array
	 *
	 * @since   3.7.0
	 */
	protected function getSortFields()
	{
		return array(
			'a.ordering' =>
JText::_('JGRID_HEADING_ORDERING'),
			'a.state'    => JText::_('JSTATUS'),
			'a.title'  
groups/tmpl/default_batch_footer.php000064400000001307151162212060013710
0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_fields
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */
defined('_JEXEC') or die;

JHtml::_('formbehavior.chosen', 'select');
?>

<div class="container-fluid">
	<div class="row-fluid">
		<div class="control-group span6">
			<div class="controls">
				<?php echo
JLayoutHelper::render('joomla.html.batch.language', array());
?>
			</div>
		</div>
		<div class="control-group span6">
			<div class="controls">
				<?php echo
JLayoutHelper::render('joomla.html.batch.access', array()); ?>
			</div>
		</div>
	</div>
</divcontact/tmpl/edit.php000064400000011664151162336720010627
0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_fields
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */
defined('_JEXEC') or die;

?>
<button type="button" class="btn"
onclick="document.getElementById('batch-field-id').value='';document.getElementById('batch-access').value='';document.getElementById('batch-language-id').value=''"
data-dismiss="modal">
	<?php echo JText::_('JCANCEL'); ?>
</button>
<button type="submit" class="btn btn-success"
onclick="Joomla.submitbutton('group.batch');return
false;">
	<?php echo JText::_('JGLOBAL_BATCH_PROCESS'); ?>
</button>
contact/tmpl/edit.php000064400000011664151162336720010627 0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_contact
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

// Include the component HTML helpers.
JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html');

JHtml::_('behavior.formvalidator');
JHtml::_('behavior.keepalive');
JHtml::_('formbehavior.chosen', '#jform_catid', null,
array('disable_search_threshold' => 0 ));
JHtml::_('formbehavior.chosen', '#jform_tags', null,
array('placeholder_text_multiple' =>
JText::_('JGLOBAL_TYPE_OR_SELECT_SOME_TAGS')));
JHtml::_('formbehavior.chosen', 'select');

$app = JFactory::getApplication();
$input = $app->input;

$assoc = JLanguageAssociations::isEnabled();

JFactory::getDocument()->addScriptDeclaration('
	Joomla.submitbutton = function(task)
	{
		if (task == "contact.cancel" ||
document.formvalidator.isValid(document.getElementById("contact-form")))
		{
			' . $this->form->getField('misc')->save() .
'
			Joomla.submitform(task,
document.getElementById("contact-form"));

			// @deprecated 4.0  The following js is not needed since 3.7.0.
			if (task !== "contact.apply")
			{
				window.parent.jQuery("#contactEdit' . $this->item->id .
'Modal").modal("hide");
			}
		}
	};
');

// Fieldsets to not automatically render by /layouts/joomla/edit/params.php
$this->ignore_fieldsets = array('details',
'item_associations', 'jmetadata');

// In case of modal
$isModal = $input->get('layout') == 'modal' ? true :
false;
$layout  = $isModal ? 'modal' : 'edit';
$tmpl    = $isModal || $input->get('tmpl', '',
'cmd') === 'component' ?
'&tmpl=component' : '';
?>

<form action="<?php echo
JRoute::_('index.php?option=com_contact&layout=' . $layout .
$tmpl . '&id=' . (int) $this->item->id); ?>"
method="post" name="adminForm"
id="contact-form" class="form-validate">

	<?php echo JLayoutHelper::render('joomla.edit.title_alias',
$this); ?>

	<div class="form-horizontal">
		<?php echo JHtml::_('bootstrap.startTabSet',
'myTab', array('active' => 'details'));
?>

		<?php echo JHtml::_('bootstrap.addTab', 'myTab',
'details', empty($this->item->id) ?
JText::_('COM_CONTACT_NEW_CONTACT') :
JText::_('COM_CONTACT_EDIT_CONTACT')); ?>
		<div class="row-fluid">
			<div class="span9">
				<div class="row-fluid form-horizontal-desktop float-cols"
>
					<div class="span6">
						<?php echo $this->form->renderField('user_id');
?>
						<?php echo $this->form->renderField('image');
?>
						<?php echo
$this->form->renderField('con_position'); ?>
						<?php echo $this->form->renderField('email_to');
?>
						<?php echo $this->form->renderField('address');
?>
						<?php echo $this->form->renderField('suburb');
?>
						<?php echo $this->form->renderField('state');
?>
						<?php echo $this->form->renderField('postcode');
?>
						<?php echo $this->form->renderField('country');
?>
					</div>
					<div class="span6">
						<?php echo $this->form->renderField('telephone');
?>
						<?php echo $this->form->renderField('mobile');
?>
						<?php echo $this->form->renderField('fax'); ?>
						<?php echo $this->form->renderField('webpage');
?>
						<?php echo $this->form->renderField('sortname1');
?>
						<?php echo $this->form->renderField('sortname2');
?>
						<?php echo $this->form->renderField('sortname3');
?>
					</div>
				</div>
			</div>
			<div class="span3">
				<?php echo JLayoutHelper::render('joomla.edit.global',
$this);
contact/tmpl/edit_associations.php000064400000000525151162336720013400
0ustar00rizontal-desktop">
			<div class="span6">
				<?php echo
JLayoutHelper::render('joomla.edit.publishingdata', $this); ?>
			</div>
			<div class="span6">
				<?php echo JLayoutHelper::render('joomla.edit.metadata',
$this); ?>
			</div>
		</div>
		<?php echo JHtml::_('bootstrap.endTab'); ?>

		<?php if ( ! $isModal && $assoc) : ?>
			<?php
econtact/tmpl/edit_metadata.php000064400000000521151162336720012455
0ustar00contact/tmpl/edit_associations.php000064400000000525151162336720013400
0ustar00contact/tmpl/edit_params.php000064400000001744151162336720012170
0ustar00contact/tmpl/edit_metadata.php000064400000000521151162336720012455
0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_contact
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

echo JLayoutHelper::render('joomla.edit.metadata', $this);
contact/tmpl/modal.php000064400000002556151162336720010776 0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_contact
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

$fieldSets = $this->form->getFieldsets('params');
foreach ($fieldSets as $name => $fieldSet) :
	$paramstabs = 'params-' . $name;
	echo JHtml::_('bootstrap.addTab', 'myTab',
$paramstabs, JText::_($fieldSet->label));

	if (isset($fieldSet->description) &&
trim($fieldSet->description)) :
		echo '<p class="alert alert-info">' .
$this->escape(JText::_($fieldSet->description)) .
'</p>';
	endif;
	?>
		<?php foreach ($this->form->getFieldset($name) as $field) :
?>
			<div class="control-group">
				<div class="control-label"><?php echo
$field->label; ?></div>
				<div class="controls"><?php echo $field->input;
?></div>
			</div>
		<?php endforeach; ?>
	<?php echo JHtml::_('bootstrap.endTab'); ?>
<?php endforeach; ?>
contact/tmpl/modal.php000064400000002556151162336720010776
0ustar00contact/tmpl/modal_associations.php000064400000000525151162336720013547
0ustar00('function', 'jEditContact_' . (int)
$this->item->id);

// Function to update input title when changed
JFactory::getDocument()->addScriptDeclaration('
	function jEditContactModal() {
		if (window.parent &&
document.formvalidator.isValid(document.getElementById("contact-form")))
{
			return window.parent.' . $this->escape($function) .
'(doccontact/tmpl/modal_metadata.php000064400000000521151162336720012624
0ustar00contact/tmpl/modal_associations.php000064400000000525151162336720013547
0ustar00contact/tmpl/modal_params.php000064400000001744151162336720012337
0ustar00contact/tmpl/modal_metadata.php000064400000000521151162336720012624
0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_contact
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

echo JLayoutHelper::render('joomla.edit.metadata', $this);
contact/view.html.php000064400000010457151162336720010642 0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_contact
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

$fieldSets = $this->form->getFieldsets('params');
foreach ($fieldSets as $name => $fieldSet) :
	$paramstabs = 'params-' . $name;
	echo JHtml::_('bootstrap.addTab', 'myTab',
$paramstabs, JText::_($fieldSet->label));

	if (isset($fieldSet->description) &&
trim($fieldSet->description)) :
		echo '<p class="alert alert-info">' .
$this->escape(JText::_($fieldSet->description)) .
'</p>';
	endif;
	?>
		<?php foreach ($this->form->getFieldset($name) as $field) :
?>
			<div class="control-group">
				<div class="control-label"><?php echo
$field->label; ?></div>
				<div class="controls"><?php echo $field->input;
?></div>
			</div>
		<?php endforeach; ?>
	<?php echo JHtml::_('bootstrap.endTab'); ?>
<?php endforeach; ?>
contact/view.html.php000064400000010457151162336720010642 0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_contact
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

/**
 * View to edit a contact.
 *
 * @since  1.6
 */
class ContactViewContact extends JViewLegacy
{
	/**
	 * The JForm object
	 *
	 * @var  JForm
	 */
	protected $form;

	/**
	 * The active item
	 *
	 * @var  object
	 */
	protected $item;

	/**
	 * The model state
	 *
	 * @var  object
	 */
	protected $state;

	/**
	 * Display the view.
	 *
	 * @param   string  $tpl  The name of the template file to parse;
automatically searches through the template paths.
	 *
	 * @return  mixed  A string if successful, otherwise an Error object.
	 */
	public function display($tpl = null)
	{
		// Initialise variables.
		$this->form  = $this->get('Form');
		$this->item  = $this->get('Item');
		$this->state = $this->get('State');

		// Check for errors.
		if (count($errors = $this->get('Errors')))
		{
			throw new Exception(implode("\n", $errors), 500);
		}

		// If we are forcing a language in modal (used for associations).
		if ($this->getLayout() === 'modal' &&
$forcedLanguage =
JFactory::getApplication()->input->get('forcedLanguage',
'', 'cmd'))
		{
			// Set the language field to the forcedLanguage and disable changing it.
			$this->form->setValue('language', null,
$forcedLanguage);
			$this->form->setFieldAttribute('language',
'readonly', 'true');

			// Only allow to select categories with All language or with the forced
language.
			$this->form->setFieldAttribute('catid',
'language', '*,' . $forcedLanguage);

			// Only allow to select tags with All language or with the forced
language.
			$this->form->setFieldAttribute('tags',
'language', '*,' . $forcedLanguage);
		}

		$this->addToolbar();

		return parent::display($tpl);
	}

	/**
	 * Add the page title and toolbar.
	 *
	 * @return  void
	 *
	 * @since   1.6
	 */
	protected function addToolbar()
	{
		JFactory::getApplication()->input->set('hidemainmenu',
true);

		$user       = JFactory::getUser();
		$userId     = $user->id;
		$isNew      = ($this->item->id == 0);
		$checkedOut = !($this->item->checked_out == 0 ||
$this->item->checked_out == $userId);

		// Since we don't track these assets at the item level, use the
category id.
		$canDo = JHelperContent::getActions('com_contact',
'category', $this->item->catid);

		JToolbarHelper::title($isNew ?
JText::_('COM_CONTACT_MANAGER_CONTACT_NEW') :
JText::_('COM_CONTACT_MANAGER_CONTACT_EDIT'), 'address
contact');

		// Build the actions for new and existing records.
		if ($isNew)
		{
			// For new records, check the create permission.
			if ($isNew &&
(count($user->getAuthorisedCategories('com_contact',
'core.create')) > 0))
			{
				JToolbarHelper::applycontacts/tmpl/default.php000064400000020246151162336720011505
0ustar00.create'))
				{
					JToolbarHelper::save2new('contact.save2new');
				}
			}

			// If checked out, we can still save
			if ($canDo->get('core.create'))
			{
				JToolbarHelper::save2copy('contact.save2copy');
			}

			if (JComponentHelper::isEnabled('com_contenthistory')
&& $this->state->params->get('save_history', 0)
&& $itemEditable)
			{
				JToolbarHelper::versions('com_contact.contact',
$this->item->id);
			}

			if (JLanguageAssociations::isEnabled() &&
JComponentHelper::isEnabled('com_associations'))
			{
				JToolbarHelper::custom('contact.editAssociations',
'contract', 'contract',
'JTOOLBAR_ASSOCIATIONS', false, false);
			}

			JToolbarHelper::cancel('contact.cancel',
'JTOOLBAR_CLOSE');
		}

		JToolbarHelper::divider();
		JToolbarHelper::help('JHELP_COMPONENTS_CONTACTS_CONTACTS_EDIT');
	}
}
contacts/tmpl/default.php000064400000020246151162336720011505
0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_contact
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html');

JHtml::_('bootstrap.tooltip');
JHtml::_('behavior.multiselect');
JHtml::_('formbehavior.chosen', 'select');

$user      = JFactory::getUser();
$userId    = $user->get('id');
$listOrder =
$this->escape($this->state->get('list.ordering'));
$listDirn  =
$this->escape($this->state->get('list.direction'));
$saveOrder = $listOrder == 'a.ordering';
$assoc     = JLanguageAssociations::isEnabled();

if ($saveOrder)
{
	$saveOrderingUrl =
'index.php?option=com_contact&task=contacts.saveOrderAjax&tmpl=component';
	JHtml::_('sortablelist.sortable', 'contactList',
'adminForm', strtolower($listDirn), $saveOrderingUrl);
}
?>
<form action="<?php echo
JRoute::_('index.php?option=com_contact'); ?>"
method="post" name="adminForm"
id="adminForm">
	<?php if (!empty($this->sidebar)) : ?>
	<div id="j-sidebar-container" class="span2">
		<?php echo $this->sidebar; ?>
	</div>
	<div id="j-main-container" class="span10">
	<?php else : ?>
	<div id="j-main-container">
	<?php endif; ?>
		<?php echo
JLayoutHelper::render('joomla.searchtools.default',
array('view' => $this)); ?>
		<div class="clearfix"></div>
		<?php if (empty($this->items)) : ?>
		<div class="alert alert-no-items">
			<?php echo JText::_('JGLOBAL_NO_MATCHING_RESULTS'); ?>
		</div>
		<?php else : ?>
			<table class="table table-striped"
id="contactList">
				<thead>
					<tr>
						<th width="1%" class="nowrap center
hidden-phone">
							<?php echo JHtml::_('searchtools.sort', '',
'a.ordering', $listDirn, $listOrder, null, 'asc',
'JGRID_HEADING_ORDERING', 'icon-menu-2'); ?>
						</th>
						<th width="1%" class="nowrap center">
							<?php echo JHtml::_('grid.checkall'); ?>
						</th>
						<th width="1%" style="min-width:55px"
class="nowrap center">
							<?php echo JHtml::_('searchtools.sort',
'JSTATUS', 'a.published', $listDirn, $listOrder); ?>
						</th>
						<th class="nowrap">
							<?php echo JHtml::_('searchtools.sort',
'JGLOBAL_TITLE', 'a.name', $listDirn, $listOrder);
?>
						</th>
						<th class="nowrap hidden-phone hidden-tablet">
							<?php echo JHtml::_('searchtools.sort',
'COM_CONTACT_FIELD_LINKED_USER_LABEL', 'ul.name',
$listDirn, $listOrder); ?>
						</th>
						<th width="10%" class="nowrap
hidden-phone">
							<?php echo JHtml::_('searchtools.sort',
'JGRID_HEADING_ACCESS', 'access_level', $listDirn,
$listOrder); ?>
						</th>
						<?php if ($assoc) : ?>
						<th width="5%" class="nowrap hidden-phone
hidden-tablet">
							<?php echo JHtml::_('searchtools.sort',
'COM_CONTACT_HEADING_ASSOCIATION', 'association',
$listDirn, $listOrder); ?>
						</th>
						<?php endif; ?>
						<th width="15%" class="nowrap
hidden-phone">
							<?php echo JHtml::_('searchtools.sort',
'JGRID_HEADING_LANGUAGE', 'language_title', $listDirn,
$listOrder); ?>
						</th>
						<th width="1%" class="nowrap hidden-phone">
							<?php echo JHtml::_('searchtools.sort',
'JGRID_HEADING_ID', 'a.id', $listDirn, $listOrder);
?>
						</th>
					</tr>
				</thead>
				<tfoot>
					<tr>
						<td colspan="10">
							<?php echo $this->pagination->getListFooter(); ?>
						</td>
					</tr>
				</tfoot>
				<tbody>
				<?php
				$n = count($this->items);
				foreach ($this->items as $i => $item) :
					$canCreate  = $user->authorise('core.create',    
'com_contact.category.' . $item->catid);
					$canEdit    = $user->authorise('core.edit',      
'com_contact.category.' . $item->catid);
					$canCheckin = $user->authorise('core.manage',    
'com_checkin') || $item->checked_out == $userId ||
$item->checked_out == 0;
					$canEditOwn = $user->authorise('core.edit.own',  
'com_contact.category.' . $item->catid) &&
$item->created_by == $userId;
					$canChange  = $user->authorise('core.edit.state',
'com_contact.category.' . $item->catid) &&
$canCheckin;

					$item->cat_link =
JRoute::_('index.php?option=com_categories&extension=com_contact&task=edit&type=other&id='
. $item->catid);
					?>
					<tr class="row<?php echo $i % 2; ?>"
sortable-group-id="<?php echo $item->catid; ?>">
						<td class="order nowrap center hidden-phone">
							<?php
							$iconClass = '';
							if (!$canChange)
							{
								$iconClass = ' inactive';
							}
							elseif (!$saveOrder)
							{
								$iconClass = ' inactive tip-top hasTooltip"
title="' . JHtml::_('tooltipText',
'JORDERINGDISABLED');
							}
							?>
							<span class="sortable-handler<?php echo $iconClass;
?>">
								<span class="icon-menu"
aria-hidden="true"></span>
							</span>
							<?php if ($canChange && $saveOrder) : ?>
								<input type="text" style="display:none"
name="order[]" size="5"
									value="<?php echo $item->ordering; ?>"
class="width-20 text-area-order" />
							<?php endif; ?>
						</td>
						<td class="center">
							<?php echo JHtml::_('grid.id', $i, $item->id); ?>
						</td>
						<td class="center">
							<div class="btn-group">
								<?php echo JHtml::_('jgrid.published',
$item->published, $i, 'contacts.', $canChange, 'cb',
$item->publish_up, $item->publish_down); ?>
								<?php echo JHtml::_('contact.featured',
$item->featured, $i, $canChange); ?>
								<?php // Create dropdown items and render the dropdown list.
								if ($canChange)
								{
									JHtml::_('actionsdropdown.' . ((int) $item->published
=== 2 ? 'un' : '') . 'archive',
'cb' . $i, 'contacts');
									JHtml::_('actionsdropdown.' . ((int) $item->published
=== -2 ? 'un' : '') . 'trash', 'cb'
. $i, 'contacts');
									echo JHtml::_('actionsdropdown.render',
$this->escape($item->name));
								}
								?>
							</div>
						</td>
						<td class="has-context">
							<div class="pull-left break-word">
								<?php if ($item->checked_out) : ?>
									<?php echo JHtml::_('jgrid.checkedout', $i,
$item->editor, $item->checked_out_time, 'contacts.',
$canCheckin); ?>
								<?php endif; ?>
								<?php if ($canEdit || $canEditOwn) : ?>
									<a href="<?php echo
JRoute::_('index.php?option=com_contact&task=contact.edit&id='
. (int) $item->id); ?>"><?php echo
$this->escape($item->name); ?></a>
								<?php else : ?>
									<?php echo $this->escape($item->name); ?>
								<?php endif; ?>
								<span class="small">
									<?php echo JText::sprintf('JGLOBAL_LIST_ALIAS',
$this->escape($item->alias)); ?>
								</span>
								<div class="small">
									<?php echo JText::_('JCATEGORY') . ': ' .
$this->escape($item->category_title); ?>
								</div>
							</div>
						</td>
						<td class="small hidden-phone hidden-tablet">
							<?php if
(!empty($item-contacts/tmpl/default_batch.php000064400000004152151162336720012644
0ustar00e>
			<?php // Load the batch processing form. ?>
			<?php if ($user->authorise('core.create',
'com_contact')
				&& $user->authorise('core.edit',
'com_contact')
				&& $user->authorise('core.edit.state',
'com_contact')) : ?>
				<?php echo JHtml::_(
					'bootstrap.renderModal',
					'collapseModal',
					array(
						'title'  =>
JText::_('COM_CONTACT_BATCH_OPTIONS'),
						'footer' =>
$this->loadTemplate('batch_footer'),
					),
					$this->loadTemplate('batch_body')
				); ?>
			<?php endif; ?>
		<?php endif; ?>
		<input type="hidden" name="task"
value="" />
		<input type="hidden" name="boxchecked"
value="0" />
		<?php echo JHtml::_('form.token'); ?>
	</div>
</form>
contacts/tmpl/default_batch.php000064400000004152151162336720012644
0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_contact
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

$published = $this->state->get('filter.published');
?>
<div class="modal hide fade" id="collapseModal">
	<div class="modal-header">
		<button type="button" class="close"
data-dismiss="modal" aria-label="<?php echo
JText::_('JLIB_HTML_BEHAVIOR_CLOSE'); ?>">
			<span aria-hidden="true">&times;</span>
		</button>
		<h3><?php echo
JText::_('Ccontacts/tmpl/default_batch_body.php000064400000002147151162336720013663
0ustar00			</div>
		</div>
	</div>
	<div class="modal-footer">
		<button type="button" class="btn"
onclick="document.getElementById('batch-category-id').value='';document.getElementById('batch-access').value='';document.getElementById('batch-language-id').value='';document.getElementById('batch-user-id').value='';document.getElementById('batch-tag-id').value=''"
data-dismiss="modal">
			<?php echo JText::_('JCANCEL'); ?>
		</button>
		<button type="submit" class="btn btn-primary"
onclick="Joomla.submitbutton('contact.batch');return
false;">
			<?php echo JText::_('JGLOBAL_BATCH_PROCESS'); ?>
		</button>
	</div>
</div>
contacts/tmpl/default_batch_body.php000contacts/tmpl/default_batch_footer.php000064400000001460151162336720014221
0ustar00>
		<div class="control-group span6">
			<div class="controls">
				<?php echo JHtml::_('batch.access'); ?>
			</div>
		</div>
	</div>
	<div class="row-fluid">
		<?php if ($published >= 0) : ?>
			<div class="control-group span6">
				<div class="controls">
					<?php echo JHtml::_('batch.item',
'com_contact'); ?>
				</div>
			</div>
		<?php endif; ?>
		<div class="control-group span6">
			<div class="controls">
				<?php echo JHtml::_('batch.tag'); ?>
			</div>
		</div>
		<div class="control-group span6">
			<div class="controls">
				<?php echo JHtml::_('batch.user'); ?>
			</div>
		</div>
	</div>
</div>
contacts/tmpl/modal.php000064400000013160151162336720011152
0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_contact
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */
defined('_JEXEC') or die;

?>
<button type="button" class="btn"
onclick="document.getElementById('batch-category-id').value='';document.getElementById('batch-access').value='';document.getElementById('batch-language-id').value='';document.getElementById('batch-user-id').value='';document.getElementById('batch-tag-id').value=''"
data-dismiss="modal">
	<?php echo JText::_('JCANCEL'); ?>
</button>
<button type="submit" class="btn btn-success"
onclick="Joomla.submitbutton('contact.batch');return
false;">
	<?php echo JText::_('JGLOBAL_BATCH_PROCESS'); ?>
</button>
contacts/tmpl/modal.php000064400000013160151162336720011152
0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_contact
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

$app = JFactory::getApplication();

if ($app->isClient('site'))
{
	JSession::checkToken('get') or
die(JText::_('JINVALID_TOKEN'));
}

JLoader::register('ContactHelperRoute', JPATH_ROOT .
'/components/com_contact/helpers/route.php');

JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html');

JHtml::_('behavior.core');
JHtml::_('bootstrap.tooltip', '.hasTooltip',
array('placement' => 'bottom'));
JHtml::_('bootstrap.popover', '.hasPopover',
array('placement' => 'bottom'));
JHtml::_('formbehavior.chosen', 'select');
JHtml::_('behavior.polyfill', array('event'), 'lt
IE 9');
JHtml::_('script',
'com_contact/admin-contacts-modal.min.js',
array('version' => 'auto', 'relative'
=> true));

// Special case for the search field tooltip.
$searchFilterDesc =
$this->filterForm->getFieldAttribute('search',
'description', null, 'filter');
JHtml::_('bootstrap.tooltip', '#filter_search',
array('title' => JText::_($searchFilterDesc),
'placement' => 'bottom'));

$function  = $app->input->getCmd('function',
'jSelectContact');
$editor    = $app->input->getCmd('editor', '');
$listOrder =
$this->escape($this->state->get('list.ordering'));
$listDirn  =
$this->escape($this->state->get('list.direction'));
$onclick   = $this->escape($function);

if (!empty($editor))
{
	// This view is used also in com_menus. Load the xtd script only if the
editor is set!
	JFactory::getDocument()->addScriptOptions('xtd-contacts',
array('editor' => $editor));
	$onclick = "jSelectContact";
}
?>
<div class="container-popup">

	<form action="<?php echo
JRoute::_('index.php?option=com_contact&view=contacts&layout=modal&tmpl=component&editor='
. $editor . '&function=' . $function . '&' .
JSession::getFormToken() . '=1'); ?>"
method="post" name="adminForm" id="adminForm"
class="form-inline">

		<?php echo
JLayoutHelper::render('joomla.searchtools.default',
array('view' => $this)); ?>

		<?php if (empty($this->items)) : ?>
			<div class="alert alert-no-items">
				<?php echo JText::_('JGLOBAL_NO_MATCHING_RESULTS'); ?>
			</div>
		<?php else : ?>
			<table class="table table-striped table-condensed">
				<thead>
					<tr>
						<th width="1%" class="center nowrap">
							<?php echo JHtml::_('searchtools.sort',
'JSTATUS', 'a.published', $listDirn, $listOrder); ?>
						</th>
						<th class="nowrap title">
							<?php echo JHtml::_('searchtools.sort',
'JGLOBAL_TITLE', 'a.name', $listDirn, $listOrder);
?>
						</th>
						<th width="10%" class="nowrap">
							<?php echo JHtml::_('searchtools.sort',
'COM_CONTACT_FIELD_LINKED_USER_LABEL', 'ul.name',
$listDirn, $listOrder); ?>
						</th>
						<th width="15%" class="nowrap
hidden-phone">
							<?php echo JHtml::_('searchtools.sort',
'JGRID_HEADING_ACCESS', 'access_level', $listDirn,
$listOrder); ?>
						</th>
						<th width="10%" class="nowrap
hidden-phone">
							<?php echo JHtml::_('searchtools.sort',
'JGRID_HEADING_LANGUAGE', 'language_title', $listDirn,
$listOrder); ?>
						</th>
						<th width="1%" class="nowrap">
							<?php echo JHtml::_('searchtools.sort',
'JGRID_HEADING_ID', 'a.id', $listDirn, $listOrder);
?>
						</th>
					</tr>
				</thead>
				<tfoot>
					<tr>
						<td colspan="6">
							<?php echo $this->pagination->getListFooter(); ?>
						</td>
					</tr>
				</tfoot>
				<tbody>
				<?php
				$iconStates = array(
					-2 => 'icon-trash',
					0  => 'icon-unpublish',
					1  => 'icon-publish',
					2  => 'icon-archive',
				);
				?>
				<?php foreach ($this->items as $i => $item) : ?>
					<?php if ($item->language &&
JLanguageMultilang::isEnabled())
					{
						$tag = strlen($item->language);
						if ($tag == 5)
						{
							$lang = substr($item->language, 0, 2);
						}
						elseif ($tag == 6)
						{
							$lang = substr($item->language, 0, 3);
						}
						else {
							$lang = '';
						}
					}
					elseif (!JLanguageMultilang::isEnabled())
					{
						$lang = '';
					}
					?>
					<tr class="row<?php echo $i % 2;
?>">contacts/view.html.php000064400000013555151162336720011027
0ustar00						</td>
						<td class="small hidden-phone">
							<?php echo $this->escape($item->access_level); ?>
						</td>
						<td class="small hidden-phone">
							<?php echo
JLayoutHelper::render('joomla.content.language', $item); ?>
						</td>
						<td align="center">
							<?php echo (int) $item->id; ?>
						</td>
					</tr>
				<?php endforeach; ?>
				</tbody>
			</table>
		<?php endif; ?>

		<input type="hidden" name="task"
value="" />
		<input type="hidden" name="forcedLanguage"
value="<?php echo
$app->input->get('forcedLanguage', '',
'CMD'); ?>" />
		<?php echo JHtml::_('form.token'); ?>

	</form>
</div>
contacts/view.html.php000064400000013555151162336720011027 0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_contact
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

/**
 * View class for a list of contacts.
 *
 * @since  1.6
 */
class ContactViewContacts extends JViewLegacy
{
	/**
	 * An array of items
	 *
	 * @var  array
	 */
	protected $items;

	/**
	 * The pagination object
	 *
	 * @var  JPagination
	 */
	protected $pagination;

	/**
	 * The model state
	 *
	 * @var  object
	 */
	protected $state;

	/**
	 * Form object for search filters
	 *
	 * @var  JForm
	 */
	public $filterForm;

	/**
	 * The active search filters
	 *
	 * @var  array
	 */
	public $activeFilters;

	/**
	 * The sidebar markup
	 *
	 * @var  string
	 */
	protected $sidebar;

	/**
	 * Display the view.
	 *
	 * @param   string  $tpl  The name of the template file to parse;
automatically searches through the template paths.
	 *
	 * @return  mixed  A string if successful, otherwise an Error object.
	 */
	public function display($tpl = null)
	{
		if ($this->getLayout() !== 'modal')
		{
			ContactHelper::addSubmenu('contacts');
		}

		$this->items         = $this->get('Items');
		$this->pagination    = $this->get('Pagination');
		$this->state         = $this->get('State');
		$this->filterForm    = $this->get('FilterForm');
		$this->activeFilters = $this->get('ActiveFilters');

		// Check for errors.
		if (count($errors = $this->get('Errors')))
		{
			throw new Exception(implode("\n", $errors), 500);
		}

		// Preprocess the list of items to find ordering divisions.
		// TODO: Complete the ordering stuff with nested sets
		foreach ($this->items as &$item)
		{
			$item->order_up = true;
			$item->order_dn = true;
		}

		// We don't need toolbar in the modal window.
		if ($this->getLayout() !== 'modal')
		{
			$this->addToolbar();
			$this->sidebar = JHtmlSidebar::render();
		}
		else
		{
			// In article associations modal we need to remove language filter if
forcing a language.
			// We also need to change the category filter to show show categories
with All or the forced language.
			if ($forcedLanguage =
JFactory::getApplication()->input->get('forcedLanguage',
'', 'CMD'))
			{
				// If the language is forced we can't allow to select the
language, so transform the language selector filter into a hidden field.
				$languageXml = new SimpleXMLElement('<field
name="language" type="hidden" default="' .
$forcedLanguage . '" />');
				$this->filterForm->setField($languageXml, 'filter',
true);

				// Also, unset the active language filter so the search tools is not
open by default with this filter.
				unset($this->activeFilters['language']);

				// One last changes needed is to change the category filter to just
show categories with All language or with the forced language.
				$this->filterForm->setFieldAttribute('category_id',
'language', '*,' . $forcedLanguage,
'filter');
			}
		}

		return parent::display($tpl);
	}

	/**
	 * Add the page title and toolbar.
	 *
	 * @return  void
	 *
	 * @since   1.6
	 */
	protected function addToolbar()
	{
		$canDo = JHelperContent::getActions('com_contact',
'category',
$this->state->get('filter.category_id'));
		$user  = JFactory::getUser();

		JToolbarHelper::title(JText::_('COM_CONTACT_MANAGER_CONTACTS'),
'address contact');

		if ($canDo->get('core.create') ||
count($user->getAuthorisedCategories('com_contact',
'core.create')) > 0)
		{
			JToolbarHelper::addNew('contact.add');
		}

		if ($canDo->get('core.edit') ||
$canDo->get('core.edit.own'))
		{
			JToolbarHelper::editList('contact.edit');
		}

		if ($canDo->get('core.edit.state'))
		{
			JToolbarHelper::publish('contacts.publish',
'JTOOLBAR_PUBLISH', true);
			JToolbarHelper::unpublish('contacts.unpublish',
'JTOOLBAR_UNPUBLISH', true);
			JToolbarHelper::custom('contacts.featured',
'featured.png', 'featured_f2.png',
'JFEATURE', true);
			JToolbarHelper::custom('contacts.unfeatured',
'unfeatured.png', 'featured_f2.png',
'JUNFEATURE', true);
			JToolbarHelper::archiveList('contacts.archive');
			JToolbarHelper::checkin('contacts.checkin');
		}

		// Add a batch button
		if ($user->authorise('core.create', 'com_contact')
			&& $user->authorise('core.edit',
'com_contact')
			&& $user->authorise('core.edit.state',
'com_contact'))
		{
			$title = JText::_('JTOOLBAR_BATCH');

			// Instantiate a new JLayoutFile
instancelink/tmpl/edit.php000064400000003676151162427640010137 0ustar00;
		}

		JToolbarHelper::help('JHELP_COMPONENTS_CONTACTS_CONTACTS');

		JHtmlSidebar::setAction('index.php?option=com_contact');
	}

	/**
	 * Returns an array of fields the table can be sorted by
	 *
	 * @return  array  Array containing the field name to sort by as the key
and display text as value
	 *
	 * @since   3.0
	 */
	protected function getSortFields()
	{
		return array(
			'a.ordering'     =>
JText::_('JGRID_HEADING_ORDERING'),
			'a.published'    => JText::_('JSTATUS'),
			'a.name'         => JText::_('JGLOBAL_TITLE'),
			'category_title' => JText::_('JCATEGORY'),
			'ul.name'        =>
JText::_('COM_CONTACT_FIELD_LINKED_USER_LABEL'),
			'a.featured'     => JText::_('JFEATURED'),
			'a.access'       =>
JText::_('JGRID_HEADING_ACCESS'),
			'a.language'     =>
JText::_('JGRID_HEADING_LANGUAGE'),
			'a.id'           => JText::_('JGRID_HEADING_ID'),
		);
	}
}
link/tmpl/edit.php000064400000003676151162427640010137
0ustar00	'footer'      => '<button
type="button" class="btn"
data-dismiss="modal"'
						. ' onclick="jQuery(\'#plugin' .
$this->redirectPluginId . 'Modal
iframe\').contents().find(\'#closeBtn\').click();">'
						. JText::_('JLIB_HTML_BEHAVIOR_CLOSE') .
'</button>'
						. '<button type="button" class="btn
btn-primary" data-dismiss="modal"
onclick="jQuery(\'#plugin' . $this->redirectPluginId .
'Modal
iframe\').contents().find(\'#saveBtn\').click();"link/view.html.php000064400000004130151162427640010135
0ustar00p echo JHtml::_('grid.checkall'); ?>
						</th>
						<th width="1%" class="center nowrap">
							<?php echo JHtml::_('searchtools.sort',
'JSTATUS', 'a.published', $listDirn, $listOrder); ?>
						</th>
						<th class="nowrap title">
							<?php echo JHtml::_('searchtools.sort',
'COM_REDIRECT_HEADING_OLD_URL', 'a.old_url', $listDirn,
$listOrder); ?>
						</th>
						<th width="30%" class="nowrap">
							<?php echo JHtml::_('searchtools.sort',
'COM_REDIRECT_HEADING_NEW_URL', 'a.new_url', $listDirn,
$listOrder); ?>
						</th>
						<th width="30%" class="nowrap hidden-phone
hidden-tablet">
							<?php echo JHtml::_('searchtools.sort',
'COM_REDIRECT_HEADING_REFERRER', 'a.referer',
$listDirn, $listOrder); ?>
						</th>
						<th width="1%" class="nowrap hidden-phone
hidden-tablet">
							<?php echo JHtml::_('searchtools.sort',
'COM_REDIRECT_HEADING_CREATED_DATE', 'a.created_date',
$listDirn, $listOrder); ?>
						</th>
						<th
width="1%link/view.html.php000064400000004130151162427640010135
0ustar00		<?php echo $this->pagination->getListFooter(); ?>
						</td>
					</tr>
				</tfoot>
				<tbody>
				<?php foreach ($this->items as $i => $item) :
					$canEdit   = $user->authorise('core.edit',      
'com_redirect');
					$canChange = $user->authorise('core.edit.state',
'com_redirect');
					?>
					<tr class="row<?php echo $i % 2; ?>">
						<td class="center">
							<?php echo JHtml::_('grid.id', $i, $item->id); ?>
						</td>
						<td class="center">
							<div class="btn-group">
								<?php echo JHtml::_('redirect.published',
$item->published, $i); ?>
								<?php // Create
dropdlinks/tmpl/default.php000064400000015724151162427640011016 0ustar00ll
break-word">
							<?php echo $this->escape(rawurldecode($item->new_url));
?>
						</td>
						<td class="small break-word hidden-phone
hidden-tablet">
							<?php echo $this->escape($item->referer); ?>
						</td>
						<td class="small hidden-phone hidden-tablet">
							<?php echo JHtml::_('date', $item->created_date,
JText::_('DATE_FORMAT_LC4')); ?>
						</td>
						<td class="hidden-phone">
							<?php echo (int) $item->hits; ?>
						</td>
						<td class="hidden-phone">
							<?php echo (int) $item->header; ?>
						</td>
						<td class="hidden-phone">
							<?php echo (int)
links/tmpl/default.php000064400000015724151162427640011016
0ustar00links/tmpl/default.xml000064400000000254151162427640011017
0ustar00<?xml version="1.0" encoding="utf-8"?>
<metadata>
	<layout title="COM_REDIRECT">
		<message>
			<![CDATA[COM_REDIRECT_XML_DESCRIPTION]]>
		</message>
	</layout>
</metadata>links/tmpl/default_addform.php000064400000003154151162427640012504
0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_redirect
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

?>
<div class="accordion hidden-phone"
id="accordion1">
	<div class="accordion-group">
		<div class="accordion-heading">
			<a class="accordion-toggle"
data-toggle="collapse" data-parent="#accordion2"
href="#batch">
				<?php echo
JText::_('COM_REDIRECT_BATCH_UPDATE_WITH_NEW_URL'); ?>
			</a>
		</div>
		<div id="batch" class="accordion-body
collapse">
			<div class="accordion-inner">
				<fieldset class="batch form-inline">
					<div class="control-group">
						<label for="new_url"
class="control-label"><?php echo
JText::_('COM_REDIRECT_FIELD_NEW_URL_LABEL'); ?></label>
						<div class="controls">
							<input type="text" name="new_url"
id="new_url" value="" size="50"
title="<?php echo
JText::_('COM_REDIRECT_FIELD_NEW_URL_DESC'); ?>" />
						</div>
					</div>
					<div class="control-group">
						<label for="comment"
class="control-label"><?php echo
JText::_('COM_REDIRECT_FIELD_COMMENT_LABEL'); ?></label>
						<div class="controls">
							<input type="text" name="comment"
id="comment" value="" size="50"
title="<?php echo
JText::_('COM_REDIRECT_FIELD_COMMENT_DESC'); ?>" />
						</div>
					</div>
					<button class="btn btn-primary" type="button"
onclick="this.form.task.value='links.duplicateUrls';this.form.submit();"><?php
echo JText::_('COM_REDIRECT_BUTTON_UPDATE_LINKS');
?></button>
				</fieldset>
			</div>
		</div>
	</div>
</div>
links/tmpl/default_batch_body.php000064400000001357151162427640013171
0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_redirect
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */
defined('_JEXEC') or die;
$published = $this->state->get('filter.published');
$params    = $this->params;
$separator = $params->get('separator', '|');
?>

<div class="container-fluid">
	<div class="row-fluid">
		<div class="control-group span12">
			<p><?php echo
JText::sprintf('COM_REDIRECT_BATCH_TIP', $separator);
?></p>
			<div class="controls">
				<textarea class="span12" rows="10"
aria-required="true" value="" id="batch_urls"
name="batch_urls"></textarea>
			</div>
		</div>
	</div>
</div>
links/tmpl/default_batch_footer.php000064400000001137151162427640013526
0ustar00links/tmpl/default.xml000064400000000254151162427640011017
0ustar00ton('links.batch');return false;">
	<?php echo JText::_('JGLOBAL_BATCH_PROCESS'); ?>
</button>
links/tmpl/default_addform.php000064400000003154151162427640012504
0ustar00links/tmpl/default.xml000064400000000254151162427640011017
0ustar00rotected $pagination;

	protected $state;

	public $filterForm;

	public $activeFilters;

	/**
	 * Display the view.
	 *
	 * @param   string  $tpl  The name of the
templatelinks/tmpl/default_addform.php000064400000003154151162427640012504
0ustar00rors = $this->get('Errors')))
		{
			throw new Exception(implode("\n", $errors), 500);
		}

		// Show
messaglinks/tmpl/default_batch_body.php000064400000001357151162427640013171
0ustar00enabled)
			{
				$app->enqueueMessage(JText::sprintf('COM_REDIRECT_COLLECT_MODAL_URLS_DISABLED',
JText::_('COM_REDIRECT_PLUGIN_ENABLED'), $link),
'notice');
			}
			else
			{
				$app->enqueueMessage(JText::sprintf('COM_REDIRECT_PLUGIN_MODAL_DISABLED',
$link), 'error');
			}
		}

		$this->addToolbar();

		return parent::display($tpl);
	}

	/**
	 * Add the page title and toolbar.
	 *
	 * @return  void
	 *
	 * @since   1.6
	 */
	protected function addToolbar()
	{
		$state = $this->get('State');
		$canDo = JHelperContent::getActions('com_redirect');

		JToolbarHelper::title(JText::_('COM_REDIRECT_MANAGER_LINKS'),
'links/tmpl/default_batch_footer.php000064400000001137151162427640013526
0ustar00= JText::_('JTOOLBAR_BULK_IMPORT');

			JHtml::_('bootstrap.modal', 'collapseModal');

			// Instantiate a new JLayoutFile instance and render the batch button
			$layout = new JLayoutFile('toolbar.batch');

			$dhtml = $layout->render(array('title' => $title));
			$bar->appendButton('Custom', $dhtml, 'batch');
		}

		if ($state->get('filter.state') == -2 &&
$canDo->get('core.delete'))
		{
			JToolbarHelper::deleteList('JGLOBAL_CONFIRM_DELETE',
'links.delete', 'JTOOLBAR_EMPTY_TRASH');
			JToolbarHelper::divider();
		}
		elseif ($canDo->get('core.edit.state'))
		{
			JToolbarHelper::custom('links.purglinks/view.html.php000064400000011702151162427640010323
0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_cpanel
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

use Joomla\Registry\Registry;

$user = JFactory::getUser();
?>
<div class="row-fluid">
	<?php $iconmodules = JModuleHelper::getModules('icon');
	if ($iconmodules) : ?>
		<div class="span3">
			<div class="cpanel-links">
				<?php
				// Display the submenu position modules
				foreach ($iconmodules as $iconmodule)
				{
					echlinks/view.html.php000064400000011702151162427640010323
0ustar00egistry($module->params);
				$bootstrapSize = $params->get('bootstrap_size');
				if (!$bootstrapSize)
				{
					$bootstrapSize = 12;
				}
				$spans += $bootstrapSize;
				if ($spans > 12)
				{
					echo '</div><div class="row-fluid">';
					$spans = $bootstrapSize;
				}
				echo JModuleHelper::renderModule($module, array('style' =>
'well'));
			}
			?>
		</div>
	</div>
</div>
cpanel/tmpl/default.xml000064400000000322151163007130011122
0ustar00<?xml version="1.0" encoding="utf-8"?>
<metadata>
	<layout title="COM_CPANEL_CPANEL_VIEW_DEFAULT_TITLE">
		<message>
			<![CDATA[COM_CPANEL_CPANEL_VIEW_DEFAULT_TITLE_DESC]]>
		</message>
	</layout>
</metadata>
cpanel/view.html.php000064400000003136151163007130010434 0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_cpanel
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

/**
 * HTML View class for the Cpanel component
 *
 * @since  1.0
 */
class CpanelViewCpanel extends JViewLegacy
{
	/**
	 * Array of cpanel modules
	 *
	 * @var  array
	 */
	protected $modules = null;

	/**
	 * Execute and display a template script.
	 *
	 * @param   string  $tpl  The name of the template file to parse;
automatically searches through the template paths.
	 *
	 * @return  mixed  A string if successful, otherwise an Error object.
	 */
	public function display($tpl = null)
	{
		// Set toolbar items for the page
		JToolbarHelper::title(JText::_('COM_CPANEL'), 'home-2
cpanel');
		JToolbarHelper::help('screen.cpanel');

		$input = JFactory::getApplication()->input;

		/*
		 * Set the template - this will display cpanel.php
		 * from the selected admin template.
		 */
		$input->set('tmpl', 'cpanel');

		// Display the cpanel modules
		$this->modules = JModuleHelper::getModules('cpanel');

		try
		{
			$messages_model = FOFModel::getTmpInstance('Messages',
'PostinstallModel')->eid(700);
			$messages       = $messages_model->getItemList();
		}
		catch (RuntimeException $e)
		{
			$messages = array();

			// Still render the error message from the Exception object
			JFactocpanel/tmpl/default.php000064400000003602151163007130011115
0ustar00cpanel/tmpl/default.php000064400000003602151163007130011115
0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_cpanel
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

use Joomla\Registry\Registry;

$user = JFactory::getUser();
?>
<div class="row-fluid">
	<?php $iconmodules =
blank/index.html000064400000000054151163627050007635 0ustar00echo
JText::_('COM_CPANEL_MESSAGES_BODY_NOCLblank/tmpl/default.php000064400000003606151163627050010757
0ustar00blank/index.html000064400000000054151163627050007635
0ustar00<html><body
bgcolor="#FFFFFF"></body></html>blank/tmpl/default.php000064400000003606151163627050010757
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				Lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.0
	@build			10th April, 2021
	@created		10th April, 2021
	@package		Blank
	@subpackage		default.php
	@author			Mojtaba Taheri
<http://lmskaranblank/tmpl/default_main.php000064400000003653151163627050011765
0ustar00----------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

JHtml::_('behavior.tooltip');

?>
<div id="j-main-container">
	<div class="span9">
		<?php echo JHtml::_('bootstrap.startAccordion',
'dashboard_left', array('active' =>
'main')); ?>
			<?php echo JHtml::_('bootstrap.addSlide',
'dashboard_left', 'cPanel', 'main'); ?>
				<?php echo $this->loadTemplate('main');?>
			<?php echo JHtml::_('bootstrap.endSlide'); ?>
		<?php echo JHtml::_('bootstrap.endAccordion'); ?>
	</div>
	<div class="span3">
		<?php echo JHtml::_('bootstrap.startAccordion',
'dashboard_right', array('active' =>
'vdm')); ?>
			<?php echo JHtml::_('bootstrap.addSlide',
'dashboard_right', 'Lmskaran', 'vdm'); ?>
				<?php echo $this->loadTemplate('vdm');?>
			<?php echo JHtml::_('bootstrap.endSlide'); ?>
		<?php echo JHtml::_('bootstrap.endAccordion'); ?>
	</div>
</div>blank/tmpl/default_main.php000064400000003653151163627050011765
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				Lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.0
	@build			10th April, 2021
	@created		10th April, 2021
	@package		Blank
	@subpackage		default_main.php
	@author			Mojtaba Taheri <http://lmskaran.com/>	
	@copyright		Copyright
(blank/tmpl/default_vdm.php000064400000005027151163627050011624
0ustar00---------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

?>
<?php if(isset($this->icons['main']) &&
is_array($this->icons['main'])) :?>
	<?php foreach($this->icons['main'] as $icon): ?>
		<div class="dashboard-wraper">
			<div class="dashboard-content"> 
				<a class="icon" href="<?php echo $icon->url;
?>">
					<img alt="<?php echo $icon->alt; ?>"
src="components/com_blank/assets/images/icons/<?php  echo
$icon->image; ?>">
					<span class="dashboard-title"><?php echo
JText::_($icon->name); ?></span>
				</a>
			 </div>
		</div>
	<?php endforeach; ?>
	<div class="clearfix"></div>
<?php else: ?>
	<div class="alert alert-error"><h4
class="alert-heading"><?php echo JText::_("Permission
denied, or not correctly set"); ?></h4><div
class="alert-message"><?php echo JText::_("Please
notify your System Administrator if result is unexpected.");
?></div></div>
<?php endif;
?>blank/tmpl/default_vdm.php000064400000005027151163627050011624
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				Lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.0
	@build			10th April, 2021
	@created		10th April, 2021
	@package		Blank
	@subpackage		default_vdm.php
	@author			Mojtaba Taheri <http://lmskaran.com/>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/---------------------------------------------------------------------------------------------blank/tmpl/index.html000064400000000054151163627050010611
0ustar00 class="clearfix"></div>
<?php
if(BlankHelpeblank/view.html.php000064400000005454151163627050010277
0ustar00blank/tmpl/index.html000064400000000054151163627050010611
0ustar00<html><body
bgcolor="#FFFFFF"></body></html>blank/view.html.php000064400000005454151163627050010277
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				Lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.0
	@build			10th April, 2021
	@created		10th April, 2021
	@package		Blank
	@subpackage		view.html.php
	@author			Mojtaba Taheri <http://lmskaran.com/>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

/**
 * Blank View class
 */
class BlankViewBlank extends JViewLegacy
{
	/**
	 * View display method
	 * @return void
	 */
	function display($tpl = null)
	{
		// Assign data to the view
blankadmin/submitbutton.js000064400000002756151163627050011761
0ustar00::getHelpUrl('blank');
		if (BlankHelper::checkString($help_url))
		{
			JToolbarHelper::help('COM_BLANK_HELP_MANAGER', false,
$help_url);
		}

		if ($canDo->get('core.admin') ||
$canDo->get('core.options'))
		{
			JToolBarHelper::preferences('com_blank');
		}
	}

	/**
	 * Method to set up the document properties
	 *
	 * @return void
	 */
	protected function setDocument()
	{
		$document = JFactory::getDocument();
		
		// add dashboard style sheets
		$document->addStyleSheet(JURI::root() .
"administrator/components/com_blank/assets/css/dashboard.css");
		
		// set page title
		$document->setTitle(JText::_('COM_BLANK_DASHBOARD'));
		
		// add manifest to page JavaScript
		$document->addScriptDeclaration("var manifest =
jQuery.parseJSON('" . json_encode($this->manifest) .
"');", "text/javascript");
	}
}
blankadmin/submitbutton.js000064400000002756151163627050011761
0ustar00blankadmin/tmpl/edit.php000064400000005004151163627050011263
0ustar00nses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

Joomla.submitbutton = function(task)
{
	if (task == ''){
		return false;
	} else { 
		var action = task.split('.');
		if (action[1] == 'cancel' || action[1] == 'close' ||
document.formvalidator.isValid(document.getElementById("adminForm"))){
			Joomla.submitform(task, document.getElementById("adminForm"));
			return true;
		} else {
			alert(Joomla.JText._('blankadmin, some values are not
acceptable.','Some values are unacceptable'));
			return false;
		}
	}
}blankadmin/tmpl/edit.php000064400000005004151163627050011263
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				Lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.0
	@build			10th April, 2021
	@created		10th April, 2021
	@package		Blank
	@subpackage		edit.php
	@author			Mojtaba Taheri <http://lmskaran.com/>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/---------------------------------------------------------------------------------blankadmin/tmpl/index.html000064400000000054151163627050011622
0ustar00isplay", "none")
		.appendTo(outerDiv);
	jQublankadmin/view.html.php000064400000014655151163627050011313
0ustar00blankadmin/tmpl/index.html000064400000000054151163627050011622
0ustar00<html><body
bgcolor="#FFFFFF"></body></html>blankadmin/view.html.php000064400000014655151163627050011313
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				Lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.0
	@build			10th April, 2021
	@created		10th April, 2021
	@package		Blank
	@subpackage		view.html.php
	@author			Mojtaba Taheri <http://lmskaran.com/>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

/**
 * Blankadmin View class
 */
class BlankViewBlankadmin extends JViewLegacy
{
	/**
	 * display method of View
	 * @return void
	 */
	public function display($tpl = null)
	{
		// set params
		$this->params = JComponentHelper::getParams('com_blank');
		// Assign the variables
		$this->form = $this->get('Form');
		$this->item = $this->get('Item');
		$this->script = $this->get('Script');
		$this->state = $this->get('State');
		// get action permissions
		$this->canDo = BlankHelper::getActions('blankadmin',
$this->item);
		// get input
		$jinput = JFactory::getApplication()->input;
		$this->ref = $jinput->get('ref', 0, 'word');
		$this->refid = $jinput->get('refid', 0, 'int');
		$return = $jinput->get('return', null, 'base64');
		// set the referral string
		$this->referral = '';
		if ($this->refid && $this->ref)
		{
			// return to the item that referred to this item
			$this->referral = '&ref=' . (string)$this->ref .
'&refid=' . (int)$this->refid;
		}
		elseif($this->ref)
		{
			// return to the list view that referred to this item
			$this->referral = '&ref=' . (string)$this->ref;
		}
		// check return value
		if (!is_null($return))
		{
			// add the return value
			$this->referral .= '&return=' . (string)$return;
		}

		// Set the toolbar
		$this->addToolBar();
		
		// Check for errors.
		if (count($errors = $this->get('Errors')))
		{
			throw new Exception(implode("\n", $errors), 500);
		}

		// Display the template
		parent::display($tpl);

		// Set the document
		$this->setDocument();
	}


	/**
	 * Setting the toolbar
	 */
	protected function addToolBar()
	{
		JFactory::getApplication()->input->set('hidemainmenu',
true);
		$user = JFactory::getUser();
		$userId	= $user->id;
		$isNew = $this->item->id == 0;

		JToolbarHelper::title( JText::_($isNew ?
'COM_BLANK_BLANKADMIN_NEW' :
'COM_BLANK_BLANKADMIN_EDIT'), 'pencil-2 article-add');
		// Built the actions for new and existing records.
		if (BlankHelper::checkString($this->referral))
		{
			if ($this->canDo->get('core.create') && $isNew)
			{
				// We can create the record.
				JToolBarHelper::save('blankadmin.save',
'JTOOLBAR_SAVE');
			}
			elseif ($this->canDo->get('core.edit'))
			{
				// We can save the record.
				JToolBarHelper::save('blankadmin.save',
'JTOOLBAR_SAVE');
			}
			if ($isNew)
			{
				// Do not creat but cancel.
				JToolBarHelper::cancel('blankadmin.cancel',
'JTOOLBAR_CANCEL');
			}
			else
			{
				// We can close it.
				JToolBarHelper::cancel('blankadmin.cancel',
'JTOOLBAR_CLOSE');
			}
		}
		else
		{
			if ($isNew)
			{
				// For new records, check the create permission.
				if ($this->canDo->get('core.create'))
				{
					JToolBarHelper::apply('blankadmin.apply',
'JTOOLBAR_APPLY');
					JToolBarHelper::save('blankadmin.save',
'JTOOLBAR_SAVE');
					JToolBarHelper::custom('blankadmin.save2new',
'save-new.png', 'save-new_f2.png',
'JTOOLBAR_SAVE_AND_NEW', false);
				};
				JToolBarHelper::cancel('blankadmin.cancel',
'JTOOLBAR_CANCEL');
			}
			else
			{
				if ($this->canDo->get('core.edit'))
				{
					// We can save the new record
					JToolBarHelper::apply('blankadmin.apply',
'JTOOLBAR_APPLY');
					JToolBarHelper::save('blankadmin.save',
'JTOOLBAR_SAVE');
					// We can save this record, but check the create permission to see
					// if we can return to make a new one.
					if ($this->canDo->get('core.create'))
					{
						JToolBarHelper::custom('blankadmin.save2new',
'save-new.png', 'save-new_f2.png',
'JTOOLBAR_SAVE_AND_NEW', false);
					}
				}
				if ($this->canDo->get('core.create'))
				{
					JToolBarHelper::custom('blankadmin.save2copy',
'save-copy.png', 'save-copy_f2.png',
'JTOOLBAR_SAVE_AS_COPY', false);
				}
				JToolBarHelper::cancel('blankadmin.cancel',
'JTOOLBAR_CLOSE');
			}
		}
		JToolbarHelper::divider();
		// set help url for this view if found
		$help_url = BlankHelper::getHelpUrl('blankadmin');
		if
(BlankHelper::checkStblankadmins/index.html000064400000000054151163627050011031
0ustar00 document properties
	 *
	 * @return void
	 blankadmins/tmpl/default.php000064400000005545151163627050012157
0ustar00blankadmins/index.html000064400000000054151163627050011031
0ustar00<html><body
bgcolor="#FFFFFF"></body></html>blankadmins/tmpl/default.php000064400000005545151163627050012157
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				Lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.0
	@build			10th April, 2021
	@created		10th April, 2021
	@package		Blank
	@subpackage		default.php
	@author			Mojtaba Taheri <http://lmskaran.com/>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

JHtml::_('behavior.tooltip');
JHtml::_('behavior.multiselect');
JHtml::_('dropdown.init');
JHtml::_('formbehavior.chosen', 'select');
if ($this->saveOrder)
{
	$saveOrderingUrl =
'index.php?option=com_blank&task=blankadmins.saveOrderAjax&tmpl=coblankadmins/tmpl/default_batch_body.php000064400000002344151163627050014327
0ustar00-no-items">
		<?php echo JText::_('JGLOBAL_NO_MATCHING_RESULTS'); ?>
	</div>
<?php else : ?>
	<table class="table table-striped"
id="blankadminList">
		<thead><?php echo
$this->loadTemplate('head');?></thead>
		<tfoot><?php echo
$this->loadTemplate('foot');?></tfoot>
		<tbody><?php echo
$this->loadTemplate('body');?></tbody>
	</table>
	<?php // Load the batch processing form. ?>
	<?php if ($this->canCreate && $this->canEdit) : ?>
		<?php echo JHtml::_(
			'bootstrap.renderModal',
			'collapseModal',
			array(
				'title' =>
JText::_('COM_BLANK_BLANKADMINS_BATCH_OPTIONS'),
				'footer' =>
$this->loadTemplate('batch_footer')
			),
			$this->loadTemplate('batch_body')
		); ?>
	<?php endif; ?>
	<input type="hidden" name="boxchecked"
value="0" />
	</div>
<?php endif; ?>
	<input type="hidden" name="task" value=""
/>
	<?php echo JHtml::_('form.token'); ?>
</form>
blankadmins/tmpl/default_batch_body.php000064400000002344151163627050014327
0blankadmins/tmpl/default_batch_footer.php000064400000002743151163627050014673
0ustar00.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

?>

<p><?php echo
JText::_('COM_BLANK_BLANKADMINS_BATCH_TIP'); ?></p>
<?php echo $this->batchDisplay;
?>blankadmins/tmpl/default_batch_footer.php000064400000002743151163627050014673
0ustar00blankadmins/tmpl/default_body.php000064400000002306151163627050013164
0ustar00ww.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

?>
<!-- clear the batch values if cancel -->
<button class="btn" type="button"
onclick="" data-dismiss="modal">
	<?php echo JText::_('JCANCEL'); ?>
</button>
<!-- post the batch values if process -->
<button class="btn btn-success" type="submit"
onclick="Joomla.submitbutton('blankadmin.batch');">
	<?php echo JText::_('JGLOBAL_BATCH_PROCESS'); ?>
</button>blankadmins/tmpl/default_body.php000064400000002306151163627050013164
0blankadmins/tmpl/default_foot.php000064400000002312151163627050013173
0ustar00rg/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

$edit =
"index.php?option=com_blank&view=blankadmins&task=blankadmin.edit";

?>
blankadmins/tmpl/default_foot.php000064400000002312151163627050013173
0blankadmins/tmpl/default_head.php000064400000002171151163627050013130
0ustar00rg/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

?>
<tr>
	<td colspan=""><?php echo
$this->pagination->getListFooter(); ?></td>
</tr>blankadmins/tmpl/default_head.php0000644blankadmins/tmpl/default_toolbar.php000064400000007065151163627060013701
0ustar00rg/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

?>
blankadmins/tmpl/default_toolbar.php000064400000007065151163627060013701
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				Lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.0
	@build			10th April, 2021
	@created		10th April, 2021
	@package		Blank
	@subpackage		default_toolbar.php
	@author			Mojtaba Taheri <http://lmskaran.com/>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

?>
<div id="filter-bar" class="btn-toolbar">
        <div class="filter-search btn-group pull-left">
            <label for="filter_search"
class="element-invisible"><?php echo
JText::_('Search');?></label>
            <input type="text" name="filter_search"
id="filter_search" placeholder="<?php echo
JText::_('JSEARCH_FILTER'); ?>" value="<?php echo
$this->escape($this->state->get('filter.search'));
?>" class="hasTooltip" title="<?php echo
JHtml::tooltipText('Search Blankadmins'); ?>" />
        </div>
        <div class="btn-group pull-left">
            <button type="submit" class="btn
hasTooltip" title="<?php echo
JHtml::tooltipText('JSEARCH_FILTER_SUBMIT'); ?>"><i
class="icon-search"></i></button>
            <button type="button" class="btn
hasTooltip" title="<?php echo
JHtml::tooltipText('JSEARCH_FILTER_CLEAR'); ?>"
onclick="document.id('filter_search').value='';this.form.submit();"><i
class="icon-remove"></i></button>
        </div>
  blankadmins/tmpl/index.html000064400000000054151163627060012006 0ustar00 
  </select>
        </div>
        <div
clblankadmins/view.html.php000064400000015204151163627060011466
0ustar00blankadmins/tmpl/index.html000064400000000054151163627060012006
0ustar00<html><body
bgcolor="#FFFFFF"></body></html>blankadmins/view.html.php000064400000015204151163627060011466
0ustar00<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				Lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.0
	@build			10th April, 2021
	@created		10th April, 2021
	@package		Blank
	@subpackage		view.html.php
	@author			Mojtaba Taheri <http://lmskaran.com/>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

/**
 * Blank View class for the Blankadmins
 */
class BlankViewBlankadmins extends JViewLegacy
{
	/**
	 * Blankadmins view display method
	 * @return void
	 */
	function display($tpl = null)
	{
		if ($this->getLayout() !== 'modal')
		{
			// Include helper submenu
			BlankHelper::addSubmenu('blankadmins');
		}

		// Assign data to the view
		$this->items = $this->get('Items');
		$this->pagination = $this->get('Pagination');
		$this->state = $this->get('State');
		$this->user = JFactory::getUser();
		// Load the filter form from xml.
		$this->filterForm = $this->get('FilterForm');
		// Load the active filters.
		$this->activeFilters = $this->get('ActiveFilters');
		// Add the list ordering clause.
		$this->listOrder =
$this->escape($this->state->get('list.ordering',
'a.id'));
		$this->listDirn =
$this->escape($this->state->get('list.direction',
'DESC'));
		$this->saveOrder = $this->listOrder == 'a.ordering';
		// set the return here value
		$this->return_here = urlencode(base64_encode((string)
JUri::getInstance()));
		// get global action permissions
		$this->canDo = BlankHelper::getActions('blankadmin');
		$this->canEdit = $this->canDo->get('core.edit');
		$this->canState =
$this->canDo->get('core.edit.state');
		$this->canCreate = $this->canDo->get('core.create');
		$this->canDelete = $this->canDo->get('core.delete');
		$this->canBatch = $this->canDo->get('core.batch');

		// We don't need toolbar in the modal window.
		if ($this->getLayout() !== 'modal')
		{
			$this->addToolbar();
			$this->sidebar = JHtmlSidebar::render();
			// load the batch html
			if ($this->canCreate && $this->canEdit &&
$this->canState)
			{
				$this->batchDisplay = JHtmlBatch_::render();
			}
		}
		
		// Check for errors.
		if (count($errors = $this->get('Errors')))
		{
			throw new Exception(implode("\n", $errors), 500);
		}

		// Display the template
		parent::display($tpl);

		// Set the document
		$this->setDocument();
	}

	/**
	 * Setting the toolbar
	 */
	protected function addToolBar()
	{
		JToolBarHelper::title(JText::_('COM_BLANK_BLANKADMINS'),
'joomla');
		JHtmlSidebar::setAction('index.php?option=com_blank&view=blankadmins');
		JFormHelper::addFieldPath(JPATH_COMPONENT . '/models/fields');

		if ($this->canCreate)
		{
			JToolBarHelper::addNew('blankadmin.add');
		}

		// Only load if there are items
		if (BlankHelper::checkArray($this->items))
		{
			if ($this->canEdit)
			{
				JToolBarHelper::editList('blankadmin.edit');
			}

			if ($this->canState)
			{
				JToolBarHelper::publishList('blankadmins.publish');
				JToolBarHelper::unpublishList('blankadmins.unpublish');
				JToolBarHelper::archiveList('blankadmins.archive');

				if ($this->canDo->get('core.admin'))
				{
					JToolBarHelper::checkin('blankadmins.checkin');
				}
			}

			// Add a batch button
			if ($this->canBatch && $this->canCreate &&
$this->canEdit && $this->canState)
			{
				// Get the toolbar object instance
				$bar = JToolBar::getInstance('toolbar');
				// set the batch button name
				$title = JText::_('JTOOLBAR_BATCH');
				// Instantiate a new JLayoutFile instance and render the batch button
				$layout = new JLayoutFile('joomla.toolbar.batch');
				// add the button to the page
				$dhtml = $layout->render(array('title' => $title));
				$bar->appendButton('Custom', $dhtml, 'batch');
			}

			if ($this->state->get('filter.published') == -2
&& ($this->canState && $this->canDelete))
			{
				JToolbarHelper::deleteList('',
'blankadmins.delete', 'JTOOLBAR_EMPTY_TRASH');
			}
			elseif ($this->canState && $this->canDelete)
			{
				JToolbarHelper::trash('blankadmins.trash');
			}
		}

		// set help url for this view if found
		$help_url = BlankHelper::getHelpUrl('blankadmins');
		if (BlankHelper::checkString($help_url))
		{
				JToolbarHelper::help('COM_BLANK_HELP_MANAGER', false,
$help_url);
		}

		// add the options comp button
		if ($this->canDo->get('core.admin') ||
$this->canDo->get('core.options'))
		{
			JToolBarHelper::preferences('com_blank');
		}

		// Only load published batch if state and batch is allowed
		if ($this->canState && $this->canBatch)
		{
			JHtmlplugin/tmpl/edit.php000064400000012570151163630750010470
0ustar00strlen($var) > 50)
		{
			// use the helper htmlEscape method instead and shorten the string
			return BlankHelper::htmlEscape($var, $this->_charset, true);
		}
		// use the helper htmlEscape method instead.
		return BlankHelper::htmlEscape($var, $this->_charset);
	}

	/**
	 * Returns an array of fields the table can be sorted by
	 *
	 * @return  array  Array containing the field name to sort by as the key
and display text as value
	 */
	protected function getSortFields()
	{
		return array(
			'a.ordering' =>
JText::_('JGRID_HEADING_ORDERING'),
			'a.published' => JText::_('JSTATUS'),
			'a.id' => JText::_('JGRID_HEADING_ID')
		);
	}
}
plugin/tmpl/edit.php000064400000012570151163630750010470 0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_plugins
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html');

JHtml::_('behavior.formvalidator');
JHtml::_('behavior.keepalive');
JHtml::_('formbehavior.chosen', 'select');
JHtml::_('bootstrap.tooltip');
$this->fieldsets = $this->form->getFieldsets('params');

$input = JFactory::getApplication()->input;

// In case of modal
$isModal  = $input->get('layout') === 'modal' ? true
: false;
$layout   = $isModal ? 'modal' : 'edit';
$tmpl     = $isModal || $input->get('tmpl', '',
'cmd') === 'component' ?
'&tmpl=component' : '';

JFactory::getDocument()->addScriptDeclaration("
	Joomla.submitbutton = function(task) {
		if (task === 'plugin.cancel' ||
document.formvalidator.isValid(document.getElementById('style-form')))
{
			Joomla.submitform(task,
document.getElementById('style-form'));

			if (task !== 'plugin.apply') {
				if (self !== top ) {
					window.top.setTimeout('window.parent.location =
window.top.location.href', 1000);
					window.parent.jQuery('#plugin" .
$this->item->extension_id .
"Modal').modal('hide');
				}
			}
		}
	};
");
?>

<form action="<?php echo
JRoute::_('index.php?option=com_plugins&view=plugin&layout='
. $layout . $tmpl . '&extension_id=' . (int)
$this->item->extension_id); ?>" method="post"
name="adminForm" id="style-form"
class="form-validate">
	<div class="form-horizontal">

		<?php echo JHtml::_('bootstrap.startTabSet',
'myTab', array('active' => 'general'));
?>

		<?php echo JHtml::_('bootstrap.addTab', 'myTab',
'general', JText::_('COM_PLUGINS_PLUGIN')); ?>

		<div class="row-fluid">
			<div class="span9">
				<?php if ($this->item->xml) : ?>
					<?php if ($this->item->xml->description) : ?>
						<h2>
							<?php
							if ($this->item->xml)
							{
								echo ($text = (string) $this->item->xml->name) ?
JText::_($text) : $this->item->name;
							}
							else
							{
								echo JText::_('COM_PLUGINS_XML_ERR');
							}
							?>
						</h2>
						<div class="info-labels">
							<span class="label hasTooltip" title="<?php
echo JHtml::_('tooltipText',
'COM_PLUGINS_FIELD_FOLDER_LABEL',
'COM_PLUGINS_FIELD_FOLDER_DESC'); ?>">
								<?php echo $this->form->getValue('folder');
?>
							</span> /
							<span class="label hasTooltip" title="<?php
echo JHtml::_('tooltipText',
'COM_PLUGINS_FIELD_ELEMENT_LABEL',
'COM_PLUGINS_FIELD_ELEMENT_DESC'); ?>">
								<?php echo $this->form->getValue('element');
?>
							</span>
						</div>
						<div>
							<?php
							$short_description =
JText::_($this->item->xml->description);
							$this->fieldset = 'description';
							$long_description =
JLayoutHelper::render('joomla.edit.fieldset', $this);
							if (!$long_description) {
								$truncated = JHtml::_('string.truncate',
$short_description, 550, true, false);
								if (strlen($truncated) > 500) {
									$long_description = $short_description;
									$short_description = JHtml::_('string.truncate',
$truncated, 250);
									if ($short_description == $long_description) {
										$long_description = '';
									}
								}
							}
							?>
							<p><?php echo $short_description; ?></p>
							<?php if ($long_description) : ?>
								<p class="readmore">
									<a href="#" onclick="jQuery('.nav-tabs
a[href=\'#description\']').tab('show');">
										<?php echo
JText::_('JGLOBAL_SHOW_FULL_DESCRIPTION'); ?>
									</a>
								</p>
							<?php endif; ?>
						</div>
					<?php endif; ?>
				<?php else : ?>
					<div class="alert alert-error"><?php echo
JText::_('COM_PLUGINS_XML_ERR'); ?></div>
				<?php endif; ?>

				<?php
				$this->fieldset = 'basic';
				$html = JLayoutHelper::render('joomla.edit.fieldset', $this);
				echo $html ? '<hr />' . $html : '';
				?>
			</diplugin/tmpl/edit_options.php000064400000002417151163630750012242
0ustar00
						<div class="control-label">
							<?php echo $this->form->getLabel('element');
?>
						</div>
						<div class="controls">
							<?php echo $this->form->getInput('element');
?>
						</div>
					</div>
				</div>
			</div>
		</div>
		<?php echo JHtml::_('bootstrap.endTab'); ?>

		<?php if (isset($long_description) && $long_description !=
'') : ?>
			<?php echo JHtml::_('bootstrap.addTab', 'myTab',
'description',
JText::_('JGLOBAL_FIELDSET_DESCRIPTION')); ?>
			<?php echo $long_description; ?>
			<?php echo JHtml::_('bootstrap.endTab'); ?>
		<?php endif; ?>

		<?php
		$this->fieldsets = array();
		$this->ignore_fieldsets = array('basic',
'description');
		echo JLayoutHelper::render('joomla.edit.params', $this);
		?>

		<?php echo JHtml::_('bootstrap.endTabSet'); ?>
	</div>

	<input type="hidden" name="task" value=""
/>
	<?php echo JHtml::_('form.token'); ?>
</form>

plugin/tmpl/edit_options.php000064400000002417151163630750012242
0ustar00plugin/tmpl/modal.php000064400000002206151163630750010632 0ustar00
. $fieldset->name . '_FIELDSET_LABEL', true);
		$optionsname = 'options-' . $fieldset->name;
		echo JHtml::_('bootstrap.addTab', 'myTab',
$optionsname,  $label);

		if (isset($fieldset->description) &&
trim($fieldset->description))
		{
			echo '<p class="tip">' .
$this->escape(JText::_($fieldset->description)) .
'</p>';
		}

		$hidden_fields = '';

		foreach ($this->form->getFieldset($name) as $field)
		{
			if (!$field->hidden)
			{
				?>
				<div class="control-group">
					<div class="control-label">
						<?php echo $field->label; ?>
					</div>
					<div class="controls">
						<?php echo $field->input; ?>
					</div>
				</div>
			<?php
			}
			else
			{
				$hidden_fields .= $field->input;
			}
		}
		echo $hidden_fields;

		echo JHtml::_('bootstrap.endTab');
	}
}
plugin/tmpl/modal.php00006440000000220plugin/view.html.php000064400000003655151163630750010510
0ustar00tension_id . 'Modal
iframe").contents().find("#closeBtn") !==
"undefined") {
		window.parent.jQuery("#plugin' .
$this->item->extension_id . 'Modal
iframe").contents().find("#closeBtn").click();
		}
	});
');
?>
<button id="applyBtn" type="button"
class="hidden"
onclick="Joomla.submitbutton('plugin.apply');"></button>
<button id="saveBtn" type="button"
class="hidden"
onclick="Joomla.submitbutton('plugin.save');"></button>
<button id="closeBtn" type="button"
class="hidden"
onclick="Joomla.submitbutton('plugin.cancel');"></button>

<div class="container-popup">
	<?php $this->setLayout('edit'); ?>
	<?php echo $this->loadTemplate(); ?>
</div>

plugin/view.html.php000064400000003655151163630750010510 0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_plugins
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

/**
 * View to edit a plugin.
 *
 * @since  1.5
 */
class PluginsViewPlugin extends JViewLegacy
{
	protected $item;

	protected $form;

	protected $staplugins/tmpl/default.php000064400000013213151163630750011345
0ustar00le and toolbar.
	 *
	 * @return  void
	 *
	 * @since   1.6
	 */
	protected function addToolbar()
	{
		JFactory::getApplication()->input->set('hidemainmenu',
true);

		$canDo = JHelperContent::getActions('com_plugins');

		JToolbarHelper::title(JText::sprintf('COM_PLUGINS_MANAGER_PLUGIN',
JText::_($this->item->name)), 'power-cord plugin');

		// If not checked out, can save the item.
		if ($canDo->get('core.edit'))
		{
			JToolbarHelper::apply('plugin.apply');
			JToolbarHelper::save('plugin.save');
		}

		JToolbarHelper::cancel('plugin.cancel',
'JTOOLBAR_CLOSE');
		JToolbarHelper::divider();

		// Get the help information for the plugin item.
		$lang = JFactory::getLanguage();

		$help = $this->get('Help');

		if ($lang->hasKey($help->url))
		{
			$debug = $lang->setDebug(false);
			$url = JText::_($help->url);
			$lang->setDebug($debug);
		}
		else
		{
			$url = null;
		}

		JToolbarHelper::help($help->key, false, $url);
	}
}
plugins/tmpl/default.php000064400000013213151163630750011345
0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_plugins
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

// Include the component HTML helpers.
JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html');

JHtml::_('bootstrap.tooltip');
JHtml::_('behavior.multiselect');
JHtml::_('formbehavior.chosen', 'select');

$user      = JFactory::getUser();
$listOrder =
$this->escape($this->state->get('list.ordering'));
$listDirn  =
$this->escape($this->state->get('list.direction'));
$saveOrder = $listOrder == 'ordering';

if ($saveOrder)
{
	$saveOrderingUrl =
'index.php?option=com_plugins&task=plugins.saveOrderAjax&tmpl=component';
	JHtml::_('sortablelist.sortable', 'pluginList',
'adminForm', strtolower($listDirn), $saveOrderingUrl);
}
?>
<form action="<?php echo
JRoute::_('index.php?option=com_plugins&view=plugins');
?>" method="post" name="adminForm"
id="adminForm">
<?php if (!empty( $this->sidebar)) : ?>
	<div id="j-sidebar-container" class="span2">
		<?php echo $this->sidebar; ?>
	</div>
	<div id="j-main-container" class="span10">
<?php else : ?>
	<div id="j-main-container">
<?php endif; ?>
		<?php echo
JLayoutHelper::render('joomla.searchtools.default',
array('view' => $this)); ?>
		<div class="clearfix"> </div>
		<?php if (empty($this->items)) : ?>
			<div class="alert alert-no-items">
				<?php echo JText::_('COM_PLUGINS_MSG_MANAGE_NO_PLUGINS');
?>
			</div>
		<?php else : ?>
			<table class="table table-striped"
id="pluginList">
				<thead>
					<tr>
						<th width="1%" class="nowrap center
hidden-phone">
							<?php echo JHtml::_('searchtools.sort', '',
'ordering', $listDirn, $listOrder, null, 'asc',
'JGRID_HEADING_ORDERING', 'icon-menu-2'); ?>
						</th>
						<th width="1%" class="nowrap center">
							<?php echo JHtml::_('grid.checkall'); ?>
						</th>
						<th width="1%" class="nowrap center">
							<?php echo JHtml::_('searchtools.sort',
'JSTATUS', 'enabled', $listDirn, $listOrder); ?>
						</th>
						<th class="title">
							<?php echo JHtml::_('searchtools.sort',
'COM_PLUGINS_NAME_HEADING', 'name', $listDirn,
$listOrder); ?>
						</th>
						<th width="10%" class="nowrap
hidden-phone">
							<?php echo JHtml::_('searchtools.sort',
'COM_PLUGINS_FOLDER_HEADING', 'folder', $listDirn,
$listOrder); ?>
						</th>
						<th width="10%" class="nowrap
hidden-phone">
							<?php echo JHtml::_('searchtools.sort',
'COM_PLUGINS_ELEMENT_HEADING', 'element', $listDirn,
$listOrder); ?>
						</th>
						<th width="5%" class="hidden-phone">
							<?php echo JHtml::_('searchtools.sort',
'JGRID_HEADING_ACCESS', 'access', $listDirn,
$listOrder); ?>
						</th>
						<th width="1%" class="nowrap hidden-phone">
							<?php echo JHtml::_('searchtools.sort',
'JGRID_HEADING_ID', 'extension_id', $listDirn,
$listOrder); ?>
						</th>
					</tr>
				</thead>
				<tfoot>
					<tr>
						<td colspan="8">
							<?php echo $this->pagination->getListFooter(); ?>
						</td>
					</tr>
				</tfoot>
				<tbody>
				<?php foreach ($this->items as $i => $item) :
					$ordering   = ($listOrder == 'ordering');
					$canEdit    = $user->authorise('core.edit',      
'com_plugins');
					$canCheckin = $user->authorise('core.manage',    
'com_checkin') || $item->checked_out ==
$user->get('id') || $item->checked_out == 0;
					$canChange  = $user->authorise('core.edit.state',
'com_plugins') && $canCheckin;
					?>
					<tr class="row<?php echo $i % 2; ?>"
sortable-group-id="<?php echo $item->folder; ?>">
						<td class="order nowrap center hidden-phone">
							<?php
							$iconClass = '';
							if (!$canChange)
							{
								$iconClass = ' inactive';
							}
							elseif (!$saveOrder)
							{
								$iconClass = ' inactive tip-top hasTooltip"
title="' . JHtml::_('tooltipText',
'JORDERINGDISABLED');
							}
							?>
							<span class="sortable-handler<?php echo $iconClass;
?>">
								<span class="icon-menu"
aria-hidden="true"></span>
							</span>
							<?php if ($canChange && $saveOrder) : ?>
								<input type="text" style="display:none"
name="order[]" size="5" value="<?php echo
$item->ordeplugins/tmpl/default.xml000064400000000320151163630750011351
0ustar00				<td class="nowrap small hidden-phone">
							<?php echo $this->escape($item->folder); ?>
						</td>
						<td class="nowrap small hidden-phone">
							<?php echo $this->escape($item->element); ?>
					cpanel/tmpl/default.xml000064400000000322151164035070011127
0ustar00plugins/tmpl/default.xml000064400000000320151163630750011351
0cpanel/view.html.php000064400000003136151164035070010441
0ustar00cpanel/tmpl/default.xml000064400000000322151164035070011127
0ustar00<?xml version="1.0" encoding="utf-8"?>
<metadata>
	<layout title="COM_CPANEL_CPANEL_VIEW_DEFAULT_TITLE">
		<message>
			<![CDATA[COM_CPANEL_CPANEL_VIEW_DEFAULT_TITLE_DESC]]>
		</message>
	</layout>
</metadata>
cpanel/view.html.php000064400000003136151164035070010441 0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_cpanel
 *
 * @copyright   Carticle/tmpl/edit.php000064400000013100151164302620010574
0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_content
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

use Joomla\Registry\Registry;

// Include the component HTML helpers.
JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html');

JHtml::_('behavior.formvalidator');
JHtml::_('behavior.keepalive');
JHtml::_('formbehavior.chosen', '#jform_catid', null,
array('disable_search_threshold' => 0 ));
JHtml::_('formbehavior.chosen', '#jform_tags', null,
array('placeholder_text_multiple' =>
JText::_('JGLOBAL_TYPE_OR_SELECT_SOME_TAGS')));
JHtml::_('formbehavior.chosen', 'select');

$this->configFieldsets  = array('editorConfig');
$this->hiddenFieldsets  = array('basic-limited');
$this->ignore_fieldsets = array('jmetadata',
'item_associations');

// Create shortcut to parameters.
$params = clone $this->state->get('params');
$params->merge(new Registry($this->item->attribs));

$app = JFactory::getApplication();
$input = $app->input;

$assoc = JLanguageAssociations::isEnabled();

JFactory::getDocument()->addScriptDeclaration('
	Joomla.submitbutton = function(task)
	{
		if (task == "article.cancel" ||
document.formvalidator.isValid(document.getElementById("item-form")))
		{
			jQuery("#permissions-sliders
select").attr("disabled", "disabled");
			' . $this->form->getField('articletext')->save()
. '
			Joomla.submitform(task, document.getElementById("item-form"));

			// @deprecated 4.0  The following js is not needed since 3.7.0.
			if (task !== "article.apply")
			{
				window.parent.jQuery("#articleEdit' . (int)
$this->item->id . 'Modal").modal("hide");
			}
		}
	};
');

// In case of modal
$isModal = $input->get('layout') == 'modal' ? true :
false;
$layout  = $isModal ? 'modal' : 'edit';
$tmpl    = $isModal || $input->get('tmpl', '',
'cmd') === 'component' ?
'&tmpl=component' : '';
?>

<form action="<?php echo
JRoute::_('index.php?option=com_content&layout=' . $layout .
$tmpl . '&id=' . (int) $this->item->id); ?>"
method="post" name="adminForm" id="item-form"
class="form-validate">

	<?php echo JLayoutHelper::render('joomla.edit.title_alias',
$this); ?>

	<div class="form-horizontal">
		<?php echo JHtml::_('bootstrap.startTabSet',
'myTab', array('active' => 'general'));
?>

		<?php echo JHtml::_('bootstrap.addTab', 'myTab',
'general', JText::_('COM_CONTENT_ARTICLE_CONTENT'));
?>
		<div class="row-fluid">
			<div class="span9">
				<fieldset class="adminform">
					<?php echo $this->form->getInput('articletext');
?>
				</fieldset>
			</div>
			<div class="span3">
				<?php echo JLayoutHelper::render('joomla.edit.global',
$this); ?>
			</div>
		</div>
		<?php echo JHtml::_('bootstrap.endTab'); ?>

		<?php // Do not show the images and links options if the edit form is
configured not to. ?>
		<?php if ($params->get('show_urls_images_backend') == 1)
: ?>
			<?php echo JHtml::_('bootstrap.addTab', 'myTab',
'images',
JText::_('COM_CONTENT_FIELDSET_URLS_AND_IMAGES')); ?>
			<div class="row-fluid form-horizontal-desktop">
				<div class="span6">
					<?php echo $this->form->renderField('images');
?>
					<?php foreach ($this->form->getGroup('images') as
$field) : ?>
						<?php echo $field->renderField(); ?>
					<?php endforeach; ?>
				</div>
				<div class="span6">
					<?php foreach ($this->form->getGroup('urls') as
$field) : ?>
						<?php echo $field->renderField(); ?>
					<?php endforeach; ?>
				</div>
			</div>
			<?php echo JHtml::_('bootstrap.endTab'); ?>
		<?php endif; ?>

		<?php $this->show_options =
$params->get('show_article_options', 1); ?>
		<?php echo JLayoutHelper::render('joomla.edit.params',
$this); ?>

		<?php // Do not show the publishing options if the edit form is
configured not to. ?>
		<?php if ($params->get('show_publishing_options', 1) ==
1) : ?>
			<?php echo JHtml::_('bootstrap.addTab', 'myTab',
'publishing',
JText::_('COM_CONTENT_FIELDSET_PUBLISHING')); ?>
			<div class="row-fluid form-horizontal-desktop">
				<div class="span6">
					<?php echo
JLayoutHelper::render('joomla.edit.publishingdata', $this); ?>
				</div>
				<div class="span6">
					<?php echo JLayoutHelper::render('joomla.edit.metadata',
$this); ?>
				</div>
			</div>
			<?php echo JHtml::_('bootstrap.endTab'); ?>
		<?php endif; ?>


		<?php if ( ! $isModal && $assoc) : ?>
			<?php echo JHtml::_('bootstrap.addTab', 'myTab',
'associations',
JText::_('JGLOBAL_FIELDSET_ASSOCIATIONS')); ?>
			<?php echo $this->loadTemplate('associations'); ?>
			<?php echo JHtml::_('bootstrap.endTab'); ?>
		<?php elseif ($isModal && $assoc) : ?>
			<div class="hidden"><?php echo
$this->loadTemplate('associations'); ?></div>
		<?php endif; ?>

		<?php if ($this->canDo->get('core.admin')) : ?>
			<?php echo JHtml::_('bootstrap.addTab', 'myTab',
'editor',
JText::_('COM_CONTENT_SLIDER_EDITOR_CONFIG')); ?>
			<?php echo
$this->form->renderFieldset('editorConfig'); ?>
			<?php echo JHtml::_('bootstrap.endTab'); ?>
		<?php endif; ?>

		<?php if ($this->canDo->get('core.admin')) : ?>
			<?php echo JHtml::_('bootstrap.addTab', 'myTab',
'permissions', JText::_('COM_CONTENT_FIELDSET_RULES'));
?>
				<?php echo $this->form->getInput('rules'); ?>
			<?php echo JHtml::_('bootstrap.endTab'); ?>
		<?php endif; ?>

		<?php echo JHtml::_('bootstrap.endTabSet'); ?>

		<input type="hidden" name="task"
value="" />
		<input type="hidden" name="return"
value="<?php echo $input->get('return', null,
'BASE64'); ?>" />
		<input type="hidden" name="forcedLanguage"
value="<?php echo $input->get('forcedLanguage',
'', 'cmd'); ?>" />
		<?php echo JHtml::_('form.token'); ?>
	</div>
</form>
article/tmpl/edit.xml000064400000000530151164302620010610 0ustar00<?xml
version="1.0" encoding="utf-8"?>
<metadata>
	<layout title="COM_CONTENT_ARTICLE_VIEW_EDIT_TITLE">
		<message>
			<![CDATA[COM_CONTENT_ARTICLE_VIEW_EDIT_DESC]]>
		</message>
	</layout>
	<fieldset name="request">
		<fields name="request">
			<field
				name="id"
				type="hidden"
				default="0"
			/>
		</fields>
	</fieldset>
</metadata>
article/tmpl/edit_associations.php000064400000000525151164302620013362
0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_content
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

echo JLayoutHelper::render('joomla.edit.associations', $this);
article/tmpl/edit_metadata.php000064400000000521151164302660012443
0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_content
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

echo JLayoutHelper::render('joomla.edit.metadata', $this);
article/tmpl/modal.php000064400000002554151164302700010755 0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_content
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

JHtml::_('bootstrap.tooltip', '.hasTooltip',
array('placement' => 'bottom'));

// @deprecated 4.0 the function parameter, the inline js and the buttons
are not needed since 3.7.0.
$function  =
JFactory::getApplication()->input->getCmd('function',
'jEditArticle_' . (int) $this->item->id);

// Function to update input title when changed
JFactory::getDocument()->addScriptDeclaration('
	function jEditArticleModal() {
		if (window.parent &&
document.formvalidator.isValid(document.getElementById("item-form")))
{
			return window.parent.' . $this->escape($function) .
'(document.getElementById("jform_title").value);
		}
	}
');
?>
<button id="applyBtn" type="button"
class="hidden"
onclick="Joomla.submitbutton('article.apply');
jEditArticleModal();"></button>
<button id="saveBtn" type="button"
class="hidden"
onclick="Joomla.submitbutton('article.save');
jEditArticleModal();"></button>
<button id="closeBtn" type="button"
class="hidden"
onclick="Joomla.submitbutton('article.cancel');"></button>

<div class="container-popup">
	<?php $this->setLayout('edit'); ?>
	<?php echo $this->loadTemplate(); ?>
</div>
article/tmpl/modal_associations.php000064400000000525151164302700013530
0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_content
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

echo JLayoutHelper::render('joomla.edit.associations', $this);
article/tmpl/modal_metadata.php000064400000000521151164302700012605
0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_content
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

echo JLayoutHelper::render('joomla.edit.metadata', $this);
article/tmpl/pagebreak.php000064400000002633151164302750011605
0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_content
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

JHtml::_('behavior.core');
JHtml::_('behavior.polyfill', array('event'), 'lt
IE 9');
JHtml::_('script',
'com_content/admin-article-pagebreak.min.js',
array('version' => 'auto', 'relative'
=> true));

$document    = JFactory::getDocument();
$this->eName =
JFactory::getApplication()->input->getCmd('e_name',
'');
$this->eName = preg_replace('#[^A-Z0-9\-\_\[\]]#i',
'', $this->eName);

$document->setTitle(JText::_('COM_CONTENT_PAGEBREAK_DOC_TITLE'));
?>
<div class="container-popup">
	<form class="form-horizontal">

		<div class="control-group">
			<label for="title"
class="control-label"><?php echo
JText::_('COM_CONTENT_PAGEBREAK_TITLE'); ?></label>
			<div class="controls"><input type="text"
id="title" name="title" /></div>
		</div>

		<div class="control-group">
			<label for="alias"
class="control-label"><?php echo
JText::_('COM_CONTENT_PAGEBREAK_TOC'); ?></label>
			<div class="controls"><input type="text"
id="alt" name="alt" /></div>
		</div>

		<button onclick="insertPagebreak('<?php echo
$this->eName; ?>');" class="btn btn-success
pull-right">
			<?php echo JText::_('COM_CONTENT_PAGEBREAK_INSERT_BUTTON');
?>
		</button>

	</form>
</div>
article/view.html.php000064400000010666151164302770010634 0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_content
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

/**
 * View to edit an article.
 *
 * @since  1.6
 */
class ContentViewArticle extends JViewLegacy
{
	/**
	 * The JForm object
	 *
	 * @var  JForm
	 */
	protected $form;

	/**
	 * The active item
	 *
	 * @var  object
	 */
	protected $item;

	/**
	 * The model state
	 *
	 * @var  object
	 */
	protected $state;

	/**
	 * The actions the user is authorised to perform
	 *
	 * @var  JObject
	 */
	protected $canDo;

	/**
	 * Execute and display a template script.
	 *
	 * @param   string  $tpl  The name of the template file to parse;
automatically searches through the template paths.
	 *
	 * @return  mixed  A string if successful, otherwise an Error object.
	 *
	 * @since   1.6
	 */
	public function display($tpl = null)
	{
		if ($this->getLayout() == 'pagebreak')
		{
			return parent::display($tpl);
		}

		$this->form  = $this->get('Form');
		$this->item  = $this->get('Item');
		$this->state = $this->get('State');
		$this->canDo = JHelperContent::getActions('com_content',
'article', $this->item->id);

		// Check for errors.
		if (count($errors = $this->get('Errors')))
		{
			throw new Exception(implode("\n", $errors), 500);
		}

		// If we are forcing a language in modal (used for associations).
		if ($this->getLayout() === 'modal' &&
$forcedLanguage =
JFactory::getApplication()->input->get('forcedLanguage',
'', 'cmd'))
		{
			// Set the language field to the forcedLanguage and disable changing it.
			$this->form->setValue('language', null,
$forcedLanguage);
			$this->form->setFieldAttribute('language',
'readonly', 'true');

			// Only allow to select categories with All language or with the forced
language.
			$this->form->setFieldAttribute('catid',
'language', '*,' . $forcedLanguage);

			// Only allow to select tags with All language or with the forced
language.
			$this->form->setFieldAttribute('tags',
'language', '*,' . $forcedLanguage);
		}

		$this->addToolbar();

		return parent::display($tpl);
	}

	/**
	 * Add the page title and toolbar.
	 *
	 * @return  void
	 *
	 * @since   1.6
	 */
	protected function addToolbar()
	{
		JFactory::getApplication()->input->set('hidemainmenu',
true);
		$user       = JFactory::getUser();
		$userId     = $user->id;
		$isNew      = ($this->item->id == 0);
		$checkedOut = !($this->item->checked_out == 0 ||
$this->item->checked_out == $userId);

		// Built the actions for new and existing records.
		$canDo = $this->canDo;

		JToolbarHelper::title(
			JText::_('COM_CONTENT_PAGE_' . ($checkedOut ?
'VIEW_ARTICLE' : ($isNew ? 'ADD_ARTICLE' :
'EDIT_ARTICLE'))),
			'pencil-2 article-add'
		);

		// For new records, check the create permission.
		if ($isNew &&
(count($user->getAuthorisedCategories('com_content',
'core.create')) > 0))
		{
			JToolbarHelper::apply('article.apply');
			JToolbarHelper::save('article.save');
			JToolbarHelper::save2new('article.save2new');
			JToolbarHelper::cancel('article.cancel');
		}
		else
		{
			// Since it's an existing record, check the edit permission, or
fall back to edit own if the owner.
			$itemEditable = $canDo->get('core.edit') ||
($canDo->get('core.edit.own') &&
$this->item->created_by == $userId);

			// Can't save the record if it's checked out and editable
			if (!$checkedOut && $itemEditable)
			{
				JToolbarHelper::apply('article.apply');
				JToolbarHelper::save('article.save');

				// We can save this record, but check the create permission to see if
we can return to make a new one.
				if ($canDo->get('core.create'))
				{
					JToolbarHelper::save2new('article.save2new');
				}
			}

			// If checked out, we can still save
			if ($canDo->get('core.create'))
			{
				JToolbarHelper::save2copy('article.save2copy');
			}

			if (JComponentHelper::isEnabled('com_contenthistory')
&& $this->state->params->get('save_history', 0)
&& $itemEditable)
			{
				JToolbarHelper::versions('com_content.article',
$this->item->id);
			}

			if (JLanguageAssociations::isEnabled() &&
JComponentHelper::isEnabled('com_associations'))
			{
				JToolbarHelper::custom('article.editAssociations',
'contract', 'contract',
'JTOOLBAR_ASSOCIATIONS', false, false);
			}

			JToolbarHelper::cancel('article.cancel',
'JTOOLBAR_CLOSE');
		}

		JToolbarHelper::divider();
		JToolbarHelper::help('JHELP_CONTENT_ARTICLE_MANAGER_EDIT');
	}
}
articles/tmpl/default.php000064400000034327151164303020011467
0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_content
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html');

JHtml::_('bootstrap.tooltip');
JHtml::_('behavior.multiselect');
JHtml::_('formbehavior.chosen', '.multipleTags', null,
array('placeholder_text_multiple' =>
JText::_('JOPTION_SELECT_TAG')));
JHtml::_('formbehavior.chosen', '.multipleCategories',
null, array('placeholder_text_multiple' =>
JText::_('JOPTION_SELECT_CATEGORY')));
JHtml::_('formbehavior.chosen',
'.multipleAccessLevels', null,
array('placeholder_text_multiple' =>
JText::_('JOPTION_SELECT_ACCESS')));
JHtml::_('formbehavior.chosen', '.multipleAuthors',
null, array('placeholder_text_multiple' =>
JText::_('JOPTION_SELECT_AUTHOR')));
JHtml::_('formbehavior.chosen', 'select');

$app       = JFactory::getApplication();
$user      = JFactory::getUser();
$userId    = $user->get('id');
$listOrder =
$this->escape($this->state->get('list.ordering'));
$listDirn  =
$this->escape($this->state->get('list.direction'));
$saveOrder = $listOrder == 'a.ordering';
$columns   = 10;

if (strpos($listOrder, 'publish_up') !== false)
{
	$orderingColumn = 'publish_up';
}
elseif (strpos($listOrder, 'publish_down') !== false)
{
	$orderingColumn = 'publish_down';
}
elseif (strpos($listOrder, 'modified') !== false)
{
	$orderingColumn = 'modified';
}
else
{
	$orderingColumn = 'created';
}

if ($saveOrder)
{
	$saveOrderingUrl =
'index.php?option=com_content&task=articles.saveOrderAjax&tmpl=component';
	JHtml::_('sortablelist.sortable', 'articleList',
'adminForm', strtolower($listDirn), $saveOrderingUrl);
}

$assoc = JLanguageAssociations::isEnabled();
?>

<form action="<?php echo
JRoute::_('index.php?option=com_content&view=articles');
?>" method="post" name="adminForm"
id="adminForm">
<?php if (!empty( $this->sidebar)) : ?>
	<div id="j-sidebar-container" class="span2">
		<?php echo $this->sidebar; ?>
	</div>
	<div id="j-main-container" class="span10">
<?php else : ?>
	<div id="j-main-container">
<?php endif; ?>
		<?php
		// Search tools bar
		echo JLayoutHelper::render('joomla.searchtools.default',
array('view' => $this));
		?>
		<?php if (empty($this->items)) : ?>
			<div class="alert alert-no-items">
				<?php echo JText::_('JGLOBAL_NO_MATCHING_RESULTS'); ?>
			</div>
		<?php else : ?>
			<table class="table table-striped"
id="articleList">
				<thead>
					<tr>
						<th width="1%" class="nowrap center
hidden-phone">
							<?php echo JHtml::_('searchtools.sort', '',
'a.ordering', $listDirn, $listOrder, null, 'asc',
'JGRID_HEADING_ORDERING', 'icon-menu-2'); ?>
						</th>
						<th width="1%" class="center">
							<?php echo JHtml::_('grid.checkall'); ?>
						</th>
						<th width="1%" class="nowrap center">
							<?php echo JHtml::_('searchtools.sort',
'JSTATUS', 'a.state', $listDirn, $listOrder); ?>
						</th>
						<th style="min-width:100px" class="nowrap">
							<?php echo JHtml::_('searchtools.sort',
'JGLOBAL_TITLE', 'a.title', $listDirn, $listOrder);
?>
						</th>
						<th width="10%" class="nowrap
hidden-phone">
							<?php echo JHtml::_('searchtools.sort', 
'JGRID_HEADING_ACCESS', 'a.access', $listDirn,
$listOrder); ?>
						</th>
						<?php if ($assoc) : ?>
							<?php $columns++; ?>
							<th width="5%" class="nowrap
hidden-phone">
								<?php echo JHtml::_('searchtools.sort',
'COM_CONTENT_HEADING_ASSOCIATION', 'association',
$listDirn, $listOrder); ?>
							</th>
						<?php endif; ?>
						<th width="10%" class="nowrap
hidden-phone">
							<?php echo JHtml::_('searchtools.sort', 
'JAUTHOR', 'a.created_by', $listDirn, $listOrder);
?>
						</th>
						<th width="10%" class="nowrap
hidden-phone">
							<?php echo JHtml::_('searchtools.sort',
'JGRID_HEADING_LANGUAGE', 'language', $listDirn,
$listOrder); ?>
						</th>
						<th width="10%" class="nowrap
hidden-phone">
							<?php echo JHtml::_('searchtools.sort',
'COM_CONTENT_HEADING_DATE_' . strtoupper($orderingColumn),
'a.' . $orderingColumn, $listDirn, $listOrder); ?>
						</th>
						<th width="1%" class="nowrap hidden-phone">
							<?php echo JHtml::_('searchtools.sort',
'JGLOBAL_HITS', 'a.hits', $listDirn, $listOrder); ?>
						</th>
						<?php if ($this->vote) : ?>
							<?php $columns++; ?>
							<th width="1%" class="nowrap
hidden-phone">
								<?php echo JHtml::_('searchtools.sort',
'JGLOBAL_VOTES', 'rating_count', $listDirn,
$listOrder); ?>
							</th>
							<?php $columns++; ?>
							<th width="1%" class="nowrap
hidden-phone">
								<?php echo JHtml::_('searchtools.sort',
'JGLOBAL_RATINGS', 'rating', $listDirn, $listOrder);
?>
							</th>
						<?php endif; ?>
						<th width="1%" class="nowrap hidden-phone">
							<?php echo JHtml::_('searchtools.sort',
'JGRID_HEADING_ID', 'a.id', $listDirn, $listOrder);
?>
						</th>
					</tr>
				</thead>
				<tfoot>
					<tr>
						<td colspan="<?php echo $columns; ?>">
						</td>
					</tr>
				</tfoot>
				<tbody>
				<?php foreach ($this->items as $i => $item) :
					$item->max_ordering = 0;
					$ordering   = ($listOrder == 'a.ordering');
					$canCreate  = $user->authorise('core.create',    
'com_content.category.' . $item->catid);
					$canEdit    = $user->authorise('core.edit',      
'com_content.article.' . $item->id);
					$canCheckin = $user->authorise('core.manage',    
'com_checkin') || $item->checked_out == $userId ||
$item->checked_out == 0;
					$canEditOwn = $user->authorise('core.edit.own',  
'com_content.article.' . $item->id) &&
$item->created_by == $userId;
					$canChange  = $user->authorise('core.edit.state',
'com_content.article.' . $item->id) && $canCheckin;
					$canEditCat    = $user->authorise('core.edit',      
'com_content.category.' . $item->catid);
					$canEditOwnCat = $user->authorise('core.edit.own',  
'com_content.category.' . $item->catid) &&
$item->category_uid == $userId;
					$canEditParCat    = $user->authorise('core.edit',      
'com_content.category.' . $item->parent_category_id);
					$canEditOwnParCat = $user->authorise('core.edit.own',  
'com_content.category.' . $item->parent_category_id)
&& $item->parent_category_uid == $userId;
					?>
					<tr class="row<?php echo $i % 2; ?>"
sortable-group-id="<?php echo $item->catid; ?>">
						<td class="order nowrap center hidden-phone">
							<?php
							$iconClass = '';
							if (!$canChange)
							{
								$iconClass = ' inactive';
							}
							elseif (!$saveOrder)
							{
								$iconClass = ' inactive tip-top hasTooltip"
title="' . JHtml::_('tooltipText',
'JORDERINGDISABLED');
							}
							?>
							<span class="sortable-handler<?php echo $iconClass
?>">
								<span class="icon-menu"
aria-hidden="true"></span>
							</span>
							<?php if ($canChange && $saveOrder) : ?>
								<input type="text" style="display:none"
name="order[]" size="5" value="<?php echo
$item->ordering; ?>" class="width-20 text-area-order"
/>
							<?php endif; ?>
						</td>
						<td class="center">
							<?php echo JHtml::_('grid.id', $i, $item->id); ?>
						</td>
						<td class="center">
							<div class="btn-group">
								<?php echo JHtml::_('jgrid.published',
$item->state, $i, 'articles.', $canChange, 'cb',
$item->publish_up, $item->publish_down); ?>
								<?php echo JHtml::_('contentadministrator.featured',
$item->featured, $i, $canChange); ?>
								<?php // Create dropdown items and render the dropdown list.
								if ($canChange)
								{
									JHtml::_('actionsdropdown.' . ((int) $item->state ===
2 ? 'un' : '') . 'archive', 'cb' .
$i, 'articles');
									JHtml::_('actionsdropdown.' . ((int) $item->state ===
-2 ? 'un' : '') . 'trash', 'cb' .
$i, 'articles');
									echo JHtml::_('actionsdropdown.render',
$this->escape($item->title));
								}
								?>
							</div>
						</td>
						<td class="has-context">
							<div class="pull-left break-word">
								<?php if ($item->checked_out) : ?>
									<?php echo JHtml::_('jgrid.checkedout', $i,
$item->editor, $item->checked_out_time, 'articles.',
$canCheckin); ?>
								<?php endif; ?>
								<?php if ($canEdit || $canEditOwn) : ?>
									<a class="hasTooltip" href="<?php echo
JRoute::_('index.php?option=com_content&task=article.edit&id='
. $item->id); ?>" title="<?php echo
JText::_('JACTION_EDIT'); ?>">
										<?php echo $this->escape($item->title); ?></a>
								<?php else : ?>
									<span title="<?php echo
JText::sprintf('JFIELD_ALIAS_LABEL',
$this->escape($item->alias)); ?>"><?php echo
$this->escape($item->title); ?></span>
								<?php endif; ?>
								<span class="small break-word">
									<?php if (empty($item->note)) : ?>
										<?php echo JText::sprintf('JGLOBAL_LIST_ALIAS',
$this->escape($item->alias)); ?>
									<?php else : ?>
										<?php echo JText::sprintf('JGLOBAL_LIST_ALIAS_NOTE',
$this->escape($item->alias), $this->escape($item->note)); ?>
									<?php endif; ?>
								</span>
								<div class="small">
									<?php
									$ParentCatUrl =
JRoute::_('index.php?option=com_categories&task=category.edit&id='
. $item->parent_category_id . '&extension=com_content');
									$CurrentCatUrl =
JRoute::_('index.php?option=com_categories&task=category.edit&id='
. $item->catid . '&extension=com_content');
									$EditCatTxt = JText::_('COM_CONTENT_EDIT_CATEGORY');

										echo JText::_('JCATEGORY') . ': ';

										if ($item->category_level != '1') :
											if ($item->parent_category_level != '1') :
												echo ' &#187; ';
											endif;
										endif;

										if (JFactory::getLanguage()->isRtl())
										{
											if ($canEditCat || $canEditOwnCat) :
												echo '<a class="hasTooltip" href="'
. $CurrentCatUrl . '" title="' . $EditCatTxt .
'">';
											endif;
											echo $this->escape($item->category_title);
											if ($canEditCat || $canEditOwnCat) :
												echo '</a>';
											endif;

											if ($item->category_level != '1') :
												echo ' &#171; ';
												if ($canEditParCat || $canEditOwnParCat) :
													echo '<a class="hasTooltip"
href="' . $ParentCatUrl . '" title="' .
$EditCatTxt . '">';
												endif;
												echo $this->escape($item->parent_category_title);
												if ($canEditParCat || $canEditOwnParCat) :
													echo '</a>';
												endif;
											endif;
										}
										else
										{
											if ($item->category_level != '1') :
												if ($canEditParCat || $canEditOwnParCat) :
													echo '<a class="hasTooltip"
href="' . $ParentCatUrl . '" title="' .
$EditCatTxt . '">';
												endif;
												echo $this->escape($item->parent_category_title);
												if ($canEditParCat || $canEditOwnParCat) :
													echo '</a>';
												endif;
												echo ' &#187; ';
											endif;
											if ($canEditCat || $canEditOwnCat) :
												echo '<a class="hasTooltip" href="'
. $CurrentCatUrl . '" title="' . $EditCatTxt .
'">';
											endif;
											echo $this->escape($item->category_title);
											if ($canEditCat || $canEditOwnCat) :
												echo '</a>';
											endif;
										}
									?>
								</div>
							</div>
						</td>
						<td class="small hidden-phone">
							<?php echo $this->escape($item->access_level); ?>
						</td>
						<?php if ($assoc) : ?>
						<td class="hidden-phone">
							<?php if ($item->association) : ?>
								<?php echo
JHtml::_('contentadministrator.association', $item->id); ?>
							<?php endif; ?>
						</td>
						<?php endif; ?>
						<td class="small hidden-phone">
							<?php if ((int) $item->created_by != 0) : ?>
								<?php if ($item->created_by_alias) : ?>
									<a class="hasTooltip" href="<?php echo
JRoute::_('index.php?option=com_users&task=user.edit&id='
. (int) $item->created_by); ?>" title="<?php echo
JText::_('JAUTHOR'); ?>">
									<?php echo $this->escape($item->author_name);
?></a>
									<div class="smallsub"><?php echo
JText::sprintf('JGLOBAL_LIST_ALIAS',
$this->escape($item->created_by_alias)); ?></div>
								<?php else : ?>
									<a class="hasTooltip" href="<?php echo
JRoute::_('index.php?option=com_users&task=user.edit&id='
. (int) $item->created_by); ?>" title="<?php echo
JText::_('JAUTHOR'); ?>">
									<?php echo $this->escape($item->author_name);
?></a>
								<?php endif; ?>
							<?php else : ?>
								<?php if ($item->created_by_alias) : ?>
									<?php echo JText::_('JNONE'); ?>
									<div class="smallsub"><?php echo
JText::sprintf('JGLOBAL_LIST_ALIAS',
$this->escape($item->created_by_alias)); ?></div>
								<?php else : ?>
									<?php echo JText::_('JNONE'); ?>
								<?php endif; ?>
							<?php endif; ?>
						</td>
						<td class="small hidden-phone">
							<?php echo
JLayoutHelper::render('joomla.content.language', $item); ?>
						</td>
						<td class="nowrap small hidden-phone">
							<?php
							$date = $item->{$orderingColumn};
							echo $date > 0 ? JHtml::_('date', $date,
JText::_('DATE_FORMAT_LC4')) : '-';
							?>
						</td>
						<td class="hidden-phone center">
							<span class="badge badge-info">
								<?php echo (int) $item->hits; ?>
							</span>
						</td>
						<?php if ($this->vote) : ?>
							<td class="hidden-phone center">
								<span class="badge badge-success" >
								<?php echo (int) $item->rating_count; ?>
								</span>
							</td>
							<td class="hidden-phone center">
								<span class="badge badge-warning" >
								<?php echo (int) $item->rating; ?>
								</span>
							</td>
						<?php endif; ?>
						<td class="hidden-phone">
							<?php echo (int) $item->id; ?>
						</td>
					</tr>
					<?php endforeach; ?>
				</tbody>
			</table>
			<?php // Load the batch processing form. ?>
			<?php if ($user->authorise('core.create',
'com_content')
				&& $user->authorise('core.edit',
'com_content')
				&& $user->authorise('core.edit.state',
'com_content')) : ?>
				<?php echo JHtml::_(
					'bootstrap.renderModal',
					'collapseModal',
					array(
						'title'  =>
JText::_('COM_CONTENT_BATCH_OPTIONS'),
						'footer' =>
$this->loadTemplate('batch_footer'),
					),
					$this->loadTemplate('batch_body')
				); ?>
			<?php endif; ?>
		<?php endif; ?>

		<?php echo $this->pagination->getListFooter(); ?>

		<input type="hidden" name="task"
value="" />
		<input type="hidden" name="boxchecked"
value="0" />
		<?php echo JHtml::_('form.token'); ?>
	</div>
</form>
articles/tmpl/default.xml000064400000003607151164303040011477
0ustar00<?xml version="1.0" encoding="utf-8"?>
<metadata>
	<layout title="COM_CONTENT_ARTICLES_VIEW_DEFAULT_TITLE">
		<message>
			<![CDATA[COM_CONTENT_ARTICLES_VIEW_DEFAULT_DESC]]>
		</message>
	</layout>
		<!-- Add fields to the request variables for the layout. -->
	<fields name="request">
		<fieldset name="request"
			addfieldpath="/administrator/components/com_categories/models/fields"
		>
			<field
				name="filter_category_id"
				type="modal_category"
				label="COM_MENUS_ADMIN_CATEGORY_LABEL"
				description="COM_MENUS_ADMIN_CATEGORY_DESC"
				extension="com_content"
				select="true"
				new="true"
				edit="true"
				clear="true"
				filter="integer"
			/>

			<field
				name="filter_level"
				type="integer"
				label="COM_MENUS_ADMIN_LEVEL_LABEL"
				description="COM_MENUS_ADMIN_LEVEL_DESC"
				first="1"
				last="10"
				step="1"
				languages="*"
				filter="integer"
				>
				<option
value="">JOPTION_SELECT_MAX_LEVELS</option>
			</field>

			<field
				name="filter_author_id"
				type="author"
				label="COM_MENUS_ADMIN_AUTHOR_LABEL"
				description="COM_MENUS_ADMIN_AUTHOR_DESC"
				multiple="true"
				class="multipleAuthors"
				filter="int_array"
				>
				<option value="0">JNONE</option>
			</field>

			<field
				name="filter_tag"
				type="tag"
				label="COM_MENUS_ADMIN_TAGS_LABEL"
				description="COM_MENUS_ADMIN_TAGS_DESC"
				multiple="true"
				filter="int_array"
				mode="nested"
			/>

			<field
				name="filter_access"
				type="accesslevel"
				label="COM_MENUS_ADMIN_ACCESS_LABEL"
				description="COM_MENUS_ADMIN_ACCESS_DESC"
				multiple="true"
				filter="int_array"
			/>

			<field
				name="filter_language"
				type="contentlanguage"
				label="COM_MENUS_ADMIN_LANGUAGE_LABEL"
				description="COM_MENUS_ADMIN_LANGUAGE_DESC"
				>
				<option value="">JOPTION_SELECT_LANGUAGE</option>
				<option value="*">JALL</option>
			</field>

		</fieldset>
	</fields>

</metadata>
articles/tmpl/default_batch_body.php000064400000001762151164303050013645
0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_content
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */
defined('_JEXEC') or die;
$published = (int) $this->state->get('filter.published');
?>

<div class="container-fluid">
	<div class="row-fluid">
		<div class="control-group span6">
			<div class="controls">
				<?php echo JHtml::_('batch.language'); ?>
			</div>
		</div>
		<div class="control-group span6">
			<div class="controls">
				<?php echo JHtml::_('batch.access'); ?>
			</div>
		</div>
	</div>
	<div class="row-fluid">
		<?php if ($published >= 0) : ?>
			<div class="control-group span6">
				<div class="controls">
					<?php echo JHtml::_('batch.item',
'com_content'); ?>
				</div>
			</div>
		<?php endif; ?>
		<div class="control-group span6">
			<div class="controls">
				<?php echo JHtml::_('batch.tag'); ?>
			</div>
		</div>
	</div>
</div>
articles/tmpl/default_batch_footer.php000064400000001460151164303050014201
0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_content
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */
defined('_JEXEC') or die;

?>
<button type="button" class="btn"
onclick="document.getElementById('batch-category-id').value='';document.getElementById('batch-access').value='';document.getElementById('batch-language-id').value='';document.getElementById('batch-user-id').value='';document.getElementById('batch-tag-id').value=''"
data-dismiss="modal">
	<?php echo JText::_('JCANCEL'); ?>
</button>
<button type="submit" class="btn btn-success"
onclick="Joomla.submitbutton('article.batch');return
false;">
	<?php echo JText::_('JGLOBAL_BATCH_PROCESS'); ?>
</button>
articles/tmpl/modal.php000064400000015273151164303070011143
0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_content
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

$app = JFactory::getApplication();

if ($app->isClient('site'))
{
	JSession::checkToken('get') or
die(JText::_('JINVALID_TOKEN'));
}

JLoader::register('ContentHelperRoute', JPATH_ROOT .
'/components/com_content/helpers/route.php');

// Include the component HTML helpers.
JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html');

JHtml::_('behavior.core');
JHtml::_('behavior.polyfill', array('event'), 'lt
IE 9');
JHtml::_('script',
'com_content/admin-articles-modal.min.js',
array('version' => 'auto', 'relative'
=> true));
JHtml::_('bootstrap.tooltip', '.hasTooltip',
array('placement' => 'bottom'));
JHtml::_('bootstrap.popover', '.hasPopover',
array('placement' => 'bottom'));
JHtml::_('behavior.multiselect');
JHtml::_('formbehavior.chosen', '.multipleTags', null,
array('placeholder_text_multiple' =>
JText::_('JOPTION_SELECT_TAG')));
JHtml::_('formbehavior.chosen', '.multipleCategories',
null, array('placeholder_text_multiple' =>
JText::_('JOPTION_SELECT_CATEGORY')));
JHtml::_('formbehavior.chosen',
'.multipleAccessLevels', null,
array('placeholder_text_multiple' =>
JText::_('JOPTION_SELECT_ACCESS')));
JHtml::_('formbehavior.chosen', '.multipleAuthors',
null, array('placeholder_text_multiple' =>
JText::_('JOPTION_SELECT_AUTHOR')));
JHtml::_('formbehavior.chosen', 'select');

// Special case for the search field tooltip.
$searchFilterDesc =
$this->filterForm->getFieldAttribute('search',
'description', null, 'filter');
JHtml::_('bootstrap.tooltip', '#filter_search',
array('title' => JText::_($searchFilterDesc),
'placement' => 'bottom'));

$function  = $app->input->getCmd('function',
'jSelectArticle');
$editor    = $app->input->getCmd('editor', '');
$listOrder =
$this->escape($this->state->get('list.ordering'));
$listDirn  =
$this->escape($this->state->get('list.direction'));
$onclick   = $this->escape($function);

if (!empty($editor))
{
	// This view is used also in com_menus. Load the xtd script only if the
editor is set!
	JFactory::getDocument()->addScriptOptions('xtd-articles',
array('editor' => $editor));
	$onclick = "jSelectArticle";
}
?>
<div class="container-popup">

	<form action="<?php echo
JRoute::_('index.php?option=com_content&view=articles&layout=modal&tmpl=component&function='
. $function . '&' . JSession::getFormToken() .
'=1&editor=' . $editor); ?>" method="post"
name="adminForm" id="adminForm"
class="form-inline">

		<?php echo
JLayoutHelper::render('joomla.searchtools.default',
array('view' => $this)); ?>

		<div class="clearfix"></div>

		<?php if (empty($this->items)) : ?>
			<div class="alert alert-no-items">
				<?php echo JText::_('JGLOBAL_NO_MATCHING_RESULTS'); ?>
			</div>
		<?php else : ?>
			<table class="table table-striped table-condensed">
				<thead>
					<tr>
						<th width="1%" class="center nowrap">
							<?php echo JHtml::_('searchtools.sort',
'JSTATUS', 'a.state', $listDirn, $listOrder); ?>
						</th>
						<th class="title">
							<?php echo JHtml::_('searchtools.sort',
'JGLOBAL_TITLE', 'a.title', $listDirn, $listOrder);
?>
						</th>
						<th width="10%" class="nowrap
hidden-phone">
							<?php echo JHtml::_('searchtools.sort',
'JGRID_HEADING_ACCESS', 'a.access', $listDirn,
$listOrder); ?>
						</th>
						<th width="15%" class="nowrap">
							<?php echo JHtml::_('searchtools.sort',
'JGRID_HEADING_LANGUAGE', 'language', $listDirn,
$listOrder); ?>
						</th>
						<th width="5%" class="nowrap hidden-phone">
							<?php echo JHtml::_('searchtools.sort',
'JDATE', 'a.created', $listDirn, $listOrder); ?>
						</th>
						<th width="1%" class="nowrap hidden-phone">
						<?php echo JHtml::_('searchtools.sort',
'JGRID_HEADING_ID', 'a.id', $listDirn, $listOrder);
?>
						</th>
					</tr>
				</thead>
				<tfoot>
					<tr>
						<td colspan="6">
							<?php echo $this->pagination->getListFooter(); ?>
						</td>
					</tr>
				</tfoot>
				<tbody>
				<?php
				$iconStates = array(
					-2 => 'icon-trash',
					0  => 'icon-unpublish',
					1  => 'icon-publish',
					2  => 'icon-archive',
				);
				?>
				<?php foreach ($this->items as $i => $item) : ?>
					<?php if ($item->language &&
JLanguageMultilang::isEnabled())
					{
						$tag = strlen($item->language);
						if ($tag == 5)
						{
							$lang = substr($item->language, 0, 2);
						}
						elseif ($tag == 6)
						{
							$lang = substr($item->language, 0, 3);
						}
						else {
							$lang = '';
						}
					}
					elseif (!JLanguageMultilang::isEnabled())
					{
						$lang = '';
					}
					?>
					<tr class="row<?php echo $i % 2; ?>">
						<td class="center">
							<span class="<?php echo
$iconStates[$this->escape($item->state)]; ?>"
aria-hidden="true"></span>
						</td>
						<td>
							<?php $attribs = 'data-function="' .
$this->escape($onclick) . '"'
								. ' data-id="' . $item->id . '"'
								. ' data-title="' .
$this->escape($item->title) . '"'
								. ' data-cat-id="' .
$this->escape($item->catid) . '"'
								. ' data-uri="' .
$this->escape(ContentHelperRoute::getArticleRoute($item->id,
$item->catid, $item->language)) . '"'
								. ' data-language="' . $this->escape($lang) .
'"';
							?>
							<a class="select-link"
href="javascript:void(0)" <?php echo $attribs; ?>>
								<?php echo $this->escape($item->title); ?></a>
							<span class="small break-word">
								<?php if (empty($item->note)) : ?>
									<?php echo JText::sprintf('JGLOBAL_LIST_ALIAS',
$this->escape($item->alias)); ?>
								<?php else : ?>
									<?php echo JText::sprintf('JGLOBAL_LIST_ALIAS_NOTE',
$this->escape($item->alias), $this->escape($item->note)); ?>
								<?php endif; ?>
 							</span>
							<div class="small">
								<?php echo JText::_('JCATEGORY') . ': ' .
$this->escape($item->category_title); ?>
							</div>
						</td>
						<td class="small hidden-phone">
							<?php echo $this->escape($item->access_level); ?>
						</td>
						<td class="small">
							<?php echo
JLayoutHelper::render('joomla.content.language', $item); ?>
						</td>
						<td class="nowrap small hidden-phone">
							<?php echo JHtml::_('date', $item->created,
JText::_('DATE_FORMAT_LC4')); ?>
						</td>
						<td class="nowrap small hidden-phone">
							<?php echo (int) $item->id; ?>
						</td>
					</tr>
				<?php endforeach; ?>
				</tbody>
			</table>
		<?php endif; ?>

		<input type="hidden" name="task"
value="" />
		<input type="hidden" name="boxchecked"
value="0" />
		<input type="hidden" name="forcedLanguage"
value="<?php echo
$app->input->get('forcedLanguage', '',
'CMD'); ?>" />
		<?php echo JHtml::_('form.token'); ?>

	</form>
</div>
articles/view.html.php000064400000014775151164303100011010 0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_content
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

/**
 * View class for a list of articles.
 *
 * @since  1.6
 */
class ContentViewArticles extends JViewLegacy
{
	/**
	 * The item authors
	 *
	 * @var  stdClass
	 *
	 * @deprecated  4.0  To be removed with Hathor
	 */
	protected $authors;

	/**
	 * An array of items
	 *
	 * @var  array
	 */
	protected $items;

	/**
	 * The pagination object
	 *
	 * @var  JPagination
	 */
	protected $pagination;

	/**
	 * The model state
	 *
	 * @var  object
	 */
	protected $state;

	/**
	 * Form object for search filters
	 *
	 * @var  JForm
	 */
	public $filterForm;

	/**
	 * The active search filters
	 *
	 * @var  array
	 */
	public $activeFilters;

	/**
	 * The sidebar markup
	 *
	 * @var  string
	 */
	protected $sidebar;

	/**
	 * Display the view
	 *
	 * @param   string  $tpl  The name of the template file to parse;
automatically searches through the template paths.
	 *
	 * @return  mixed  A string if successful, otherwise an Error object.
	 */
	public function display($tpl = null)
	{
		if ($this->getLayout() !== 'modal')
		{
			ContentHelper::addSubmenu('articles');
		}

		$this->items         = $this->get('Items');
		$this->pagination    = $this->get('Pagination');
		$this->state         = $this->get('State');
		$this->authors       = $this->get('Authors');
		$this->filterForm    = $this->get('FilterForm');
		$this->activeFilters = $this->get('ActiveFilters');
		$this->vote          = JPluginHelper::isEnabled('content',
'vote');

		// Check for errors.
		if (count($errors = $this->get('Errors')))
		{
			throw new Exception(implode("\n", $errors), 500);
		}

		// Levels filter - Used in Hathor.
		// @deprecated  4.0 To be removed with Hathor
		$this->f_levels = array(
			JHtml::_('select.option', '1',
JText::_('J1')),
			JHtml::_('select.option', '2',
JText::_('J2')),
			JHtml::_('select.option', '3',
JText::_('J3')),
			JHtml::_('select.option', '4',
JText::_('J4')),
			JHtml::_('select.option', '5',
JText::_('J5')),
			JHtml::_('select.option', '6',
JText::_('J6')),
			JHtml::_('select.option', '7',
JText::_('J7')),
			JHtml::_('select.option', '8',
JText::_('J8')),
			JHtml::_('select.option', '9',
JText::_('J9')),
			JHtml::_('select.option', '10',
JText::_('J10')),
		);

		// We don't need toolbar in the modal window.
		if ($this->getLayout() !== 'modal')
		{
			$this->addToolbar();
			$this->sidebar = JHtmlSidebar::render();
		}
		else
		{
			// In article associations modal we need to remove language filter if
forcing a language.
			// We also need to change the category filter to show show categories
with All or the forced language.
			if ($forcedLanguage =
JFactory::getApplication()->input->get('forcedLanguage',
'', 'CMD'))
			{
				// If the language is forced we can't allow to select the
language, so transform the language selector filter into a hidden field.
				$languageXml = new SimpleXMLElement('<field
name="language" type="hidden" default="' .
$forcedLanguage . '" />');
				$this->filterForm->setField($languageXml, 'filter',
true);

				// Also, unset the active language filter so the search tools is not
open by default with this filter.
				unset($this->activeFilters['language']);

				// One last changes needed is to change the category filter to just
show categories with All language or with the forced language.
				$this->filterForm->setFieldAttribute('category_id',
'language', '*,' . $forcedLanguage,
'filter');
			}
		}

		return parent::display($tpl);
	}

	/**
	 * Add the page title and toolbar.
	 *
	 * @return  void
	 *
	 * @since   1.6
	 */
	protected function addToolbar()
	{
		$canDo = JHelperContent::getActions('com_content',
'category',
$this->state->get('filter.category_id'));
		$user  = JFactory::getUser();

		// Get the toolbar object instance
		$bar = JToolbar::getInstance('toolbar');

		JToolbarHelper::title(JText::_('COM_CONTENT_ARTICLES_TITLE'),
'stack article');

		if ($canDo->get('core.create') ||
count($user->getAuthorisedCategories('com_content',
'core.create')) > 0)
		{
			JToolbarHelper::addNew('article.add');
		}

		if ($canDo->get('core.edit') ||
$canDo->get('core.edit.own'))
		{
			JToolbarHelper::editList('article.edit');
		}

		if ($canDo->get('core.edit.state'))
		{
			JToolbarHelper::publish('articles.publish',
'JTOOLBAR_PUBLISH', true);
			JToolbarHelper::unpublish('articles.unpublish',
'JTOOLBAR_UNPUBLISH', true);
			JToolbarHelper::custom('articles.featured',
'featured.png', 'featured_f2.png',
'JFEATURE', true);
			JToolbarHelper::custom('articles.unfeatured',
'unfeatured.png', 'featured_f2.png',
'JUNFEATURE', true);
			JToolbarHelper::archiveList('articles.archive');
			JToolbarHelper::checkin('articles.checkin');
		}

		// Add a batch button
		if ($user->authorise('core.create', 'com_content')
			&& $user->authorise('core.edit',
'com_content')
			&& $user->authorise('core.edit.state',
'com_content'))
		{
			$title = JText::_('JTOOLBAR_BATCH');

			// Instantiate a new JLayoutFile instance and render the batch button
			$layout = new JLayoutFile('joomla.toolbar.batch');

			$dhtml = $layout->render(array('title' => $title));
			$bar->appendButton('Custom', $dhtml, 'batch');
		}

		if ($this->state->get('filter.published') == -2
&& $canDo->get('core.delete'))
		{
			JToolbarHelper::deleteList('JGLOBAL_CONFIRM_DELETE',
'articles.delete', 'JTOOLBAR_EMPTY_TRASH');
		}
		elseif ($canDo->get('core.edit.state'))
		{
			JToolbarHelper::trash('articles.trash');
		}

		if ($user->authorise('core.admin', 'com_content')
|| $user->authorise('core.options', 'com_content'))
		{
			JToolbarHelper::preferences('com_content');
		}

		JToolbarHelper::help('JHELP_CONTENT_ARTICLE_MANAGER');
	}

	/**
	 * Returns an array of fields the table can be sorted by
	 *
	 * @return  array  Array containing the field name to sort by as the key
and display text as value
	 *
	 * @since   3.0
	 */
	protected function getSortFields()
	{
		return array(
			'a.ordering'     =>
JText::_('JGRID_HEADING_ORDERING'),
			'a.state'        => JText::_('JSTATUS'),
			'a.title'        => JText::_('JGLOBAL_TITLE'),
			'category_title' => JText::_('JCATEGORY'),
			'access_level'   =>
JText::_('JGRID_HEADING_ACCESS'),
			'a.created_by'   => JText::_('JAUTHOR'),
			'language'       =>
JText::_('JGRID_HEADING_LANGUAGE'),
			'a.created'      => JText::_('JDATE'),
			'a.id'           => JText::_('JGRID_HEADING_ID'),
			'a.featured'     => JText::_('JFEATURED')
		);
	}
}
featured/tmpl/default.php000064400000032312151164303110011450
0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_content
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html');

JHtml::_('bootstrap.tooltip');
JHtml::_('behavior.multiselect');
JHtml::_('formbehavior.chosen',
'.multipleAccessLevels', null,
array('placeholder_text_multiple' =>
JText::_('JOPTION_SELECT_ACCESS')));
JHtml::_('formbehavior.chosen', '.multipleAuthors',
null, array('placeholder_text_multiple' =>
JText::_('JOPTION_SELECT_AUTHOR')));
JHtml::_('formbehavior.chosen', '.multipleCategories',
null, array('placeholder_text_multiple' =>
JText::_('JOPTION_SELECT_CATEGORY')));
JHtml::_('formbehavior.chosen', '.multipleTags', null,
array('placeholder_text_multiple' =>
JText::_('JOPTION_SELECT_TAG')));
JHtml::_('formbehavior.chosen', 'select');

$user      = JFactory::getUser();
$userId    = $user->get('id');
$listOrder =
$this->escape($this->state->get('list.ordering'));
$listDirn  =
$this->escape($this->state->get('list.direction'));
$saveOrder = $listOrder == 'fp.ordering';
$columns   = 10;

if (strpos($listOrder, 'publish_up') !== false)
{
	$orderingColumn = 'publish_up';
}
elseif (strpos($listOrder, 'publish_down') !== false)
{
	$orderingColumn = 'publish_down';
}
else
{
	$orderingColumn = 'created';
}

if ($saveOrder)
{
	$saveOrderingUrl =
'index.php?option=com_content&task=featured.saveOrderAjax&tmpl=component';
	JHtml::_('sortablelist.sortable', 'articleList',
'adminForm', strtolower($listDirn), $saveOrderingUrl);
}
?>

<form action="<?php echo
JRoute::_('index.php?option=com_content&view=featured');
?>" method="post" name="adminForm"
id="adminForm">
	<?php if (!empty( $this->sidebar)) : ?>
	<div id="j-sidebar-container" class="span2">
		<?php echo $this->sidebar; ?>
	</div>
	<div id="j-main-container" class="span10">
		<?php else : ?>
		<div id="j-main-container">
			<?php endif; ?>
			<?php
			// Search tools bar
			echo JLayoutHelper::render('joomla.searchtools.default',
array('view' => $this));
			?>
			<?php if (empty($this->items)) : ?>
				<div class="alert alert-no-items">
					<?php echo JText::_('JGLOBAL_NO_MATCHING_RESULTS'); ?>
				</div>
			<?php else : ?>
				<table class="table table-striped"
id="articleList">
					<thead>
					<tr>
						<th width="1%" class="nowrap center
hidden-phone">
							<?php echo JHtml::_('searchtools.sort', '',
'fp.ordering', $listDirn, $listOrder, null, 'asc',
'JGRID_HEADING_ORDERING', 'icon-menu-2'); ?>
						</th>
						<th width="1%" class="center">
							<?php echo JHtml::_('grid.checkall'); ?>
						</th>
						<th width="1%" style="min-width:55px"
class="nowrap center">
							<?php echo JHtml::_('searchtools.sort',
'JSTATUS', 'a.state', $listDirn, $listOrder); ?>
						</th>
						<th>
							<?php echo JHtml::_('searchtools.sort',
'JGLOBAL_TITLE', 'a.title', $listDirn, $listOrder);
?>
						</th>
						<th width="10%" class="nowrap
hidden-phone">
							<?php echo JHtml::_('searchtools.sort',
'JGRID_HEADING_ACCESS', 'a.access', $listDirn,
$listOrder); ?>
						</th>
						<th width="10%" class="nowrap
hidden-phone">
							<?php echo JHtml::_('searchtools.sort',
'JAUTHOR', 'a.created_by', $listDirn, $listOrder);
?>
						</th>
						<th width="10%" class="nowrap
hidden-phone">
							<?php echo JHtml::_('searchtools.sort',
'JGRID_HEADING_LANGUAGE', 'language', $listDirn,
$listOrder); ?>
						</th>
						<th width="10%" class="nowrap
hidden-phone">
							<?php echo JHtml::_('searchtools.sort',
'COM_CONTENT_HEADING_DATE_' . strtoupper($orderingColumn),
'a.' . $orderingColumn, $listDirn, $listOrder); ?>
						</th>
						<th width="1%" class="nowrap hidden-phone">
							<?php echo JHtml::_('searchtools.sort',
'JGLOBAL_HITS', 'a.hits', $listDirn, $listOrder); ?>
						</th>
						<?php if ($this->vote) : ?>
							<?php $columns++; ?>
							<th width="1%" class="nowrap
hidden-phone">
								<?php echo JHtml::_('searchtools.sort',
'JGLOBAL_VOTES', 'rating_count', $listDirn,
$listOrder); ?>
							</th>
							<?php $columns++; ?>
							<th width="1%" class="nowrap
hidden-phone">
								<?php echo JHtml::_('searchtools.sort',
'JGLOBAL_RATINGS', 'rating', $listDirn, $listOrder);
?>
							</th>
						<?php endif; ?>
						<th width="1%" class="nowrap hidden-phone">
							<?php echo JHtml::_('searchtools.sort',
'JGRID_HEADING_ID', 'a.id', $listDirn, $listOrder);
?>
						</th>
					</tr>
					</thead>
					<tfoot>
					<tr>
						<td colspan="<?php echo $columns; ?>">
							<?php echo $this->pagination->getListFooter(); ?>
						</td>
					</tr>
					</tfoot>
					<tbody>
					<?php $count = count($this->items); ?>
					<?php foreach ($this->items as $i => $item) :
						$item->max_ordering = 0;
						$ordering         = ($listOrder == 'fp.ordering');
						$assetId          = 'com_content.article.' . $item->id;
						$canCreate        = $user->authorise('core.create',
'com_content.category.' . $item->catid);
						$canEdit          = $user->authorise('core.edit',
'com_content.article.' . $item->id);
						$canCheckin       = $user->authorise('core.manage',
'com_checkin') || $item->checked_out == $userId ||
$item->checked_out == 0;
						$canChange        = $user->authorise('core.edit.state',
'com_content.article.' . $item->id) && $canCheckin;
						$canEditCat       = $user->authorise('core.edit',      
'com_content.category.' . $item->catid);
						$canEditOwnCat    = $user->authorise('core.edit.own',  
'com_content.category.' . $item->catid) &&
$item->category_uid == $userId;
						$canEditParCat    = $user->authorise('core.edit',      
'com_content.category.' . $item->parent_category_id);
						$canEditOwnParCat = $user->authorise('core.edit.own',  
'com_content.category.' . $item->parent_category_id)
&& $item->parent_category_uid == $userId;
						?>
						<tr class="row<?php echo $i % 2; ?>">
							<td class="order nowrap center hidden-phone">
								<?php
								$iconClass = '';

								if (!$canChange)
								{
									$iconClass = ' inactive';
								}
								elseif (!$saveOrder)
								{
									$iconClass = ' inactive tip-top hasTooltip"
title="' . JHtml::_('tooltipText',
'JORDERINGDISABLED');
								}
								?>
								<span class="sortable-handler<?php echo $iconClass
?>">
								<span class="icon-menu"
aria-hidden="true"></span>
							</span>
								<?php if ($canChange && $saveOrder) : ?>
									<input type="text" style="display:none"
name="order[]" size="5" value="<?php echo
$item->ordering; ?>" class="width-20 text-area-order"
/>
								<?php endif; ?>
							</td>
							<td class="center">
								<?php echo JHtml::_('grid.id', $i, $item->id);
?>
							</td>
							<td class="center">
								<div class="btn-group">
									<?php echo JHtml::_('jgrid.published',
$item->state, $i, 'articles.', $canChange, 'cb',
$item->publish_up, $item->publish_down); ?>
									<?php echo JHtml::_('contentadministrator.featured',
$item->featured, $i, $canChange); ?>
									<?php // Create dropdown items and render the dropdown list.
									if ($canChange)
									{
										JHtml::_('actionsdropdown.' . ((int) $item->state
=== 2 ? 'un' : '') . 'archive',
'cb' . $i, 'articles');
										JHtml::_('actionsdropdown.' . ((int) $item->state
=== -2 ? 'un' : '') . 'trash', 'cb'
. $i, 'articles');
										echo JHtml::_('actionsdropdown.render',
$this->escape($item->title));
									}
									?>
								</div>
							</td>
							<td class="has-context">
								<div class="pull-left break-word">
									<?php if ($item->checked_out) : ?>
										<?php echo JHtml::_('jgrid.checkedout', $i,
$item->editor, $item->checked_out_time, 'articles.',
$canCheckin); ?>
									<?php endif; ?>
									<?php if ($canEdit) : ?>
										<a class="hasTooltip" href="<?php echo
JRoute::_('index.php?option=com_content&task=article.edit&return=featured&id='
. $item->id); ?>" title="<?php echo
JText::_('JACTION_EDIT'); ?>">
											<?php echo $this->escape($item->title); ?></a>
									<?php else : ?>
										<span title="<?php echo
JText::sprintf('JFIELD_ALIAS_LABEL',
$this->escape($item->alias)); ?>"><?php echo
$this->escape($item->title); ?></span>
									<?php endif; ?>
									<span class="small break-word">
									<?php if (empty($item->note)) : ?>
										<?php echo JText::sprintf('JGLOBAL_LIST_ALIAS',
$this->escape($item->alias)); ?>
									<?php else : ?>
										<?php echo JText::sprintf('JGLOBAL_LIST_ALIAS_NOTE',
$this->escape($item->alias), $this->escape($item->note)); ?>
									<?php endif; ?>
									</span>
									<div class="small">
										<?php
										$ParentCatUrl =
JRoute::_('index.php?option=com_categories&task=category.edit&id='
. $item->parent_category_id . '&extension=com_content');
										$CurrentCatUrl =
JRoute::_('index.php?option=com_categories&task=category.edit&id='
. $item->catid . '&extension=com_content');
										$EditCatTxt = JText::_('COM_CONTENT_EDIT_CATEGORY');

										echo JText::_('JCATEGORY') . ': ';

										if ($item->category_level != '1') :
											if ($item->parent_category_level != '1') :
												echo ' &#187; ';
											endif;
										endif;

										if (JFactory::getLanguage()->isRtl())
										{
											if ($canEditCat || $canEditOwnCat) :
												echo '<a class="hasTooltip" href="'
. $CurrentCatUrl . '" title="' . $EditCatTxt .
'">';
											endif;
											echo $this->escape($item->category_title);
											if ($canEditCat || $canEditOwnCat) :
												echo '</a>';
											endif;

											if ($item->category_level != '1') :
												echo ' &#171; ';
												if ($canEditParCat || $canEditOwnParCat) :
													echo '<a class="hasTooltip"
href="' . $ParentCatUrl . '" title="' .
$EditCatTxt . '">';
												endif;
												echo $this->escape($item->parent_category_title);
												if ($canEditParCat || $canEditOwnParCat) :
													echo '</a>';
												endif;
											endif;
										}
										else
										{
											if ($item->category_level != '1') :
												if ($canEditParCat || $canEditOwnParCat) :
													echo '<a class="hasTooltip"
href="' . $ParentCatUrl . '" title="' .
$EditCatTxt . '">';
												endif;
												echo $this->escape($item->parent_category_title);
												if ($canEditParCat || $canEditOwnParCat) :
													echo '</a>';
												endif;
												echo ' &#187; ';
											endif;
											if ($canEditCat || $canEditOwnCat) :
												echo '<a class="hasTooltip" href="'
. $CurrentCatUrl . '" title="' . $EditCatTxt .
'">';
											endif;
											echo $this->escape($item->category_title);
											if ($canEditCat || $canEditOwnCat) :
												echo '</a>';
											endif;
										}
										?>
									</div>
								</div>
							</td>
							<td class="small hidden-phone">
								<?php echo $this->escape($item->access_level); ?>
							</td>
							<td class="small hidden-phone">
								<?php if ((int) $item->created_by != 0) : ?>
									<?php if ($item->created_by_alias) : ?>
										<a class="hasTooltip" href="<?php echo
JRoute::_('index.php?option=com_users&task=user.edit&id='
. (int) $item->created_by); ?>" title="<?php echo
JText::_('JAUTHOR'); ?>">
										<?php echo $this->escape($item->author_name);
?></a>
										<div class="smallsub"><?php echo
JText::sprintf('JGLOBAL_LIST_ALIAS',
$this->escape($item->created_by_alias)); ?></div>
									<?php else : ?>
										<a class="hasTooltip" href="<?php echo
JRoute::_('index.php?option=com_users&task=user.edit&id='
. (int) $item->created_by); ?>" title="<?php echo
JText::_('JAUTHOR'); ?>">
										<?php echo $this->escape($item->author_name);
?></a>
									<?php endif; ?>
								<?php else : ?>
									<?php if ($item->created_by_alias) : ?>
										<?php echo JText::_('JNONE'); ?>
										<div class="smallsub"><?php echo
JText::sprintf('JGLOBAL_LIST_ALIAS',
$this->escape($item->created_by_alias)); ?></div>
									<?php else : ?>
										<?php echo JText::_('JNONE'); ?>
									<?php endif; ?>
								<?php endif; ?>
							</td>
							<td class="small hidden-phone">
								<?php echo
JLayoutHelper::render('joomla.content.language', $item); ?>
							</td>
							<td class="nowrap small hidden-phone">
								<?php
								$date = $item->{$orderingColumn};
								echo $date > 0 ? JHtml::_('date', $date,
JText::_('DATE_FORMAT_LC4')) : '-';
								?>
							</td>
							<td class="center hidden-phone">
								<span class="badge badge-info">
								<?php echo (int) $item->hits; ?>
								</span>
							</td>
							<?php if ($this->vote) : ?>
								<td class="hidden-phone">
									<span class="badge badge-success" >
									<?php echo (int) $item->rating_count; ?>
									</span>
								</td>
								<td class="hidden-phone">
									<span class="badge badge-warning" >
									<?php echo (int) $item->rating; ?>
									</span>
								</td>
							<?php endif; ?>
							<td class="center hidden-phone">
								<?php echo (int) $item->id; ?>
							</td>
						</tr>
					<?php endforeach; ?>
					</tbody>
				</table>
			<?php endif; ?>

			<input type="hidden" name="task"
value="" />
			<input type="hidden" name="featured"
value="1" />
			<input type="hidden" name="boxchecked"
value="0" />
			<?php echo JHtml::_('form.token'); ?>
		</div>
</form>
featured/tmpl/default.xml000064400000000322151164303120011456
0ustar00<?xml version="1.0" encoding="utf-8"?>
<metadata>
	<layout title="COM_CONTENT_FEATURED_VIEW_DEFAULT_TITLE">
		<message>
			<![CDATA[COM_CONTENT_FEATURED_VIEW_DEFAULT_DESC]]>
		</message>
	</layout>
</metadata>
featured/view.html.php000064400000011046151164303120010767 0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_content
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

/**
 * View class for a list of featured articles.
 *
 * @since  1.6
 */
class ContentViewFeatured extends JViewLegacy
{
	/**
	 * The item authors
	 *
	 * @var  stdClass
	 *
	 * @deprecated  4.0  To be removed with Hathor
	 */
	protected $authors;

	/**
	 * An array of items
	 *
	 * @var  array
	 */
	protected $items;

	/**
	 * The pagination object
	 *
	 * @var  JPagination
	 */
	protected $pagination;

	/**
	 * The model state
	 *
	 * @var  object
	 */
	protected $state;

	/**
	 * Form object for search filters
	 *
	 * @var  JForm
	 */
	public $filterForm;

	/**
	 * The active search filters
	 *
	 * @var  array
	 */
	public $activeFilters;

	/**
	 * The sidebar markup
	 *
	 * @var  string
	 */
	protected $sidebar;

	/**
	 * Display the view
	 *
	 * @param   string  $tpl  The name of the template file to parse;
automatically searches through the template paths.
	 *
	 * @return  mixed  A string if successful, otherwise an Error object.
	 */
	public function display($tpl = null)
	{
		ContentHelper::addSubmenu('featured');

		$this->items         = $this->get('Items');
		$this->pagination    = $this->get('Pagination');
		$this->state         = $this->get('State');
		$this->authors       = $this->get('Authors');
		$this->filterForm    = $this->get('FilterForm');
		$this->activeFilters = $this->get('ActiveFilters');
		$this->vote          = JPluginHelper::isEnabled('content',
'vote');

		// Check for errors.
		if (count($errors = $this->get('Errors')))
		{
			throw new Exception(implode("\n", $errors), 500);
		}

		// Levels filter - Used in Hathor.
		// @deprecated  4.0 To be removed with Hathor
		$this->f_levels = array(
			JHtml::_('select.option', '1',
JText::_('J1')),
			JHtml::_('select.option', '2',
JText::_('J2')),
			JHtml::_('select.option', '3',
JText::_('J3')),
			JHtml::_('select.option', '4',
JText::_('J4')),
			JHtml::_('select.option', '5',
JText::_('J5')),
			JHtml::_('select.option', '6',
JText::_('J6')),
			JHtml::_('select.option', '7',
JText::_('J7')),
			JHtml::_('select.option', '8',
JText::_('J8')),
			JHtml::_('select.option', '9',
JText::_('J9')),
			JHtml::_('select.option', '10',
JText::_('J10')),
		);

		$this->addToolbar();
		$this->sidebar = JHtmlSidebar::render();

		return parent::display($tpl);
	}

	/**
	 * Add the page title and toolbar.
	 *
	 * @return  void
	 *
	 * @since   1.6
	 */
	protected function addToolbar()
	{
		$state = $this->get('State');
		$canDo = JHelperContent::getActions('com_content',
'category',
$this->state->get('filter.category_id'));

		JToolbarHelper::title(JText::_('COM_CONTENT_FEATURED_TITLE'),
'star featured');

		if ($canDo->get('core.create'))
		{
			JToolbarHelper::addNew('article.add');
		}

		if ($canDo->get('core.edit'))
		{
			JToolbarHelper::editList('article.edit');
		}

		if ($canDo->get('core.edit.state'))
		{
			JToolbarHelper::publish('articles.publish',
'JTOOLBAR_PUBLISH', true);
			JToolbarHelper::unpublish('articles.unpublish',
'JTOOLBAR_UNPUBLISH', true);
			JToolbarHelper::custom('articles.unfeatured',
'unfeatured.png', 'featured_f2.png',
'JUNFEATURE', true);
			JToolbarHelper::archiveList('articles.archive');
			JToolbarHelper::checkin('articles.checkin');
		}

		if ($state->get('filter.published') == -2 &&
$canDo->get('core.delete'))
		{
			JToolbarHelper::deleteList('JGLOBAL_CONFIRM_DELETE',
'articles.delete', 'JTOOLBAR_EMPTY_TRASH');
		}
		elseif ($canDo->get('core.edit.state'))
		{
			JToolbarHelper::trash('articles.trash');
		}

		if ($canDo->get('core.admin') ||
$canDo->get('core.options'))
		{
			JToolbarHelper::preferences('com_content');
		}

		JToolbarHelper::help('JHELP_CONTENT_FEATURED_ARTICLES');
	}

	/**
	 * Returns an array of fields the table can be sorted by
	 *
	 * @return  array  Array containing the field name to sort by as the key
and display text as value
	 *
	 * @since   3.0
	 */
	protected function getSortFields()
	{
		return array(
			'fp.ordering'    =>
JText::_('JGRID_HEADING_ORDERING'),
			'a.state'        => JText::_('JSTATUS'),
			'a.title'        => JText::_('JGLOBAL_TITLE'),
			'category_title' => JText::_('JCATEGORY'),
			'access_level'   =>
JText::_('JGRID_HEADING_ACCESS'),
			'a.created_by'   => JText::_('JAUTHOR'),
			'language'       =>
JText::_('JGRID_HEADING_LANGUAGE'),
			'a.created'      => JText::_('JDATE'),
			'a.id'           => JText::_('JGRID_HEADING_ID'),
		);
	}
}