<?php
/**
 * @package	HikaShop
 * @version	6.4.0
 * @author	hikashop.com
 * @copyright	(C) 2010-2026 HIKARI SOFTWARE. All rights reserved.
 * @license	GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 */
defined('_JEXEC') or defined('ABSPATH') or die('Restricted access');
// phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped
?><?php
class TaxController extends hikashopController{
	var $type='tax';
	var $namekey = 'tax_namekey';
	var $table = 'tax';

	function __construct($config = array()) {
		parent::__construct($config);
		$this->display = array_merge($this->display, array('export'));
	}

	function cancel(){
		$return = hikaInput::get()->getString('return');
		if(!empty($return)){
			if(strpos($return,HIKASHOP_LIVE)===false && preg_match('#^https?://.*#',$return)) return false;
			$this->setRedirect(hikashop_completeLink(urldecode($return),false,true));
		}else{
			return $this->listing();
		}
		return true;
	}

	function export(){
		hikaInput::get()->set('layout', 'export');
		return parent::display();
	}

}
