forked from PhocaCz/PhocaCart
-
Notifications
You must be signed in to change notification settings - Fork 0
/
controller.php
86 lines (77 loc) · 3.64 KB
/
controller.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
<?php
/* @package Joomla
* @copyright Copyright (C) Open Source Matters. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
* @extension Phoca Extension
* @copyright Copyright (C) Jan Pavelka www.phoca.cz
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
*/
defined('_JEXEC') or die;
jimport('joomla.application.component.controller');
$app = JFactory::getApplication();
$option = $app->input->get('option');
$l['cp'] = array('COM_PHOCACART_CONTROL_PANEL', '');
$l['ps'] = array('COM_PHOCACART_PRODUCTS', 'phocacartitems');
$l['cs'] = array('COM_PHOCACART_CATEGORIES', 'phocacartcategories');
$l['sp'] = array('COM_PHOCACART_SPECIFICATIONS', 'phocacartspecifications');
$l['mn'] = array('COM_PHOCACART_MANUFACTURERS', 'phocacartmanufacturers');
$l['os'] = array('COM_PHOCACART_ORDERS', 'phocacartorders');
$l['st'] = array('COM_PHOCACART_ORDER_STATUSES', 'phocacartstatuses');
$l['sk'] = array('COM_PHOCACART_STOCK_STATUSES', 'phocacartstockstatuses');
$l['sh'] = array('COM_PHOCACART_SHIPPING', 'phocacartshippings');
$l['ct'] = array('COM_PHOCACART_COUNTRIES', 'phocacartcountries');
$l['re'] = array('COM_PHOCACART_REGIONS', 'phocacartregions');
$l['zo'] = array('COM_PHOCACART_ZONES', 'phocacartzones');
$l['pa'] = array('COM_PHOCACART_PAYMENT', 'phocacartpayments');
$l['cu'] = array('COM_PHOCACART_CURRENCIES', 'phocacartcurrencies');
$l['tx'] = array('COM_PHOCACART_TAXES', 'phocacarttaxes');
$l['us'] = array('COM_PHOCACART_CUSTOMERS', 'phocacartusers');
$l['gr'] = array('COM_PHOCACART_CUSTOMER_GROUPS', 'phocacartgroups');
$l['rp'] = array('COM_PHOCACART_REWARD_POINTS', 'phocacartrewards');
$l['ff'] = array('COM_PHOCACART_FORM_FIELDS', 'phocacartformfields');
$l['rw'] = array('COM_PHOCACART_REVIEWS', 'phocacartreviews');
//$l['vo'] = array('COM_PHOCACART_VOUCHERS', 'phocacartvouchers');
$l['co'] = array('COM_PHOCACART_COUPONS', 'phocacartcoupons');
$l['di'] = array('COM_PHOCACART_DISCOUNTS', 'phocacartdiscounts');
$l['do'] = array('COM_PHOCACART_DOWNLOADS', 'phocacartdownloads');
$l['tg'] = array('COM_PHOCACART_TAGS', 'phocacarttags');
$l['fd'] = array('COM_PHOCACART_XML_FEEDS', 'phocacartfeeds');
$l['wl'] = array('COM_PHOCACART_WISH_LISTS', 'phocacartwishlists');
$l['qu'] = array('COM_PHOCACART_QUESTIONS', 'phocacartquestions');
$l['ot'] = array('COM_PHOCACART_OPENING_TIMES', 'phocacarttimes');
$l['sc'] = array('COM_PHOCACART_STATISTICS', 'phocacartstatistics');
$l['rt'] = array('COM_PHOCACART_REPORTS', 'phocacartreports');
$l['hi'] = array('COM_PHOCACART_HITS', 'phocacarthits');
$l['im'] = array('COM_PHOCACART_IMPORT', 'phocacartimports');
$l['ex'] = array('COM_PHOCACART_EXPORT', 'phocacartexports');
$l['lo'] = array('COM_PHOCACART_SYSTEM_LOG', 'phocacartlogs');
$l['in'] = array('COM_PHOCACART_INFO', 'phocacartinfo');
$l['et'] = array('COM_PHOCACART_EXTENSIONS', 'phocacartextensions');
$l['ve'] = array('COM_PHOCACART_VENDORS', 'phocacartvendors');
$l['se'] = array('COM_PHOCACART_SECTIONS', 'phocacartsections');
$l['un'] = array('COM_PHOCACART_UNITS', 'phocacartunits');
// Submenu view
$view = JFactory::getApplication()->input->get('view');
$layout = JFactory::getApplication()->input->get('layout');
if ($layout == 'edit') {
} else {
foreach ($l as $k => $v) {
if ($v[1] == '') {
$link = 'index.php?option='.$option;
} else {
$link = 'index.php?option='.$option.'&view=';
}
if ($view == $v[1]) {
JHtmlSidebar::addEntry(JText::_($v[0]), $link.$v[1], true );
} else {
JHtmlSidebar::addEntry(JText::_($v[0]), $link.$v[1]);
}
}
}
class phocaCartCpController extends JControllerLegacy
{
function display($cachable = false, $urlparams = array()) {
parent::display($cachable, $urlparams);
}
}
?>