-
Notifications
You must be signed in to change notification settings - Fork 12
/
admin_config.php
178 lines (136 loc) · 5.2 KB
/
admin_config.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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
<?php
// Generated e107 Plugin Admin Area
require_once('../../class2.php');
if (!getperms('P'))
{
header('location:'.e_BASE.'index.php');
exit;
}
e107::css('inline',"
img.level-1 { margin:0 5px 0 15px; }
item-inventory { font-weight: bold }
#custom-css{ font-family: monospace; }
");
e107::lan('vstore', true, true);
require_once('vstore.class.php');
class vstore_admin extends e_admin_dispatcher
{
protected $modes = array(
'main' => array(
'controller' => 'vstore_pref_ui',
'path' => 'inc/admin_config_pref.php',
'ui' => 'vstore_pref_form_ui',
'uipath' => 'inc/admin_config_pref.php'
),
// 'cart' => array(
// 'controller' => 'vstore_cart_ui',
// 'path' => 'inc/admin_config_cart.php',
// 'ui' => 'vstore_cart_form_ui',
// 'uipath' => 'inc/admin_config_cart.php'
// ),
'email' => array(
'controller' => 'vstore_email_templates_ui',
'path' => 'inc/admin_config_email_templates.php',
'ui' => 'vstore_email_templates_form_ui',
'uipath' => 'inc/admin_config_email_templates.php'
),
'invoice' => array(
'controller' => 'vstore_invoice_pref_ui',
'path' => 'inc/admin_config_invoice.php',
'ui' => 'vstore_invoice_pref_form_ui',
'uipath' => 'inc/admin_config_invoice.php'
),
'gateways' => array(
'controller' => 'vstore_gateways_ui',
'path' => 'inc/admin_config_gateways.php',
'ui' => 'vstore_gateways_form_ui',
'uipath' => 'inc/admin_config_gateways.php'
),
'orders' => array(
'controller' => 'vstore_order_ui',
'path' => 'inc/admin_config_orders.php',
'ui' => 'vstore_order_form_ui',
'uipath' => 'inc/admin_config_orders.php'
),
'cat' => array(
'controller' => 'vstore_cat_ui',
'path' => 'inc/admin_config_cat.php',
'ui' => 'vstore_cat_form_ui',
'uipath' => 'inc/admin_config_cat.php'
),
'products' => array(
'controller' => 'vstore_items_ui',
'path' => 'inc/admin_config_items.php',
'ui' => 'vstore_items_form_ui',
'uipath' => 'inc/admin_config_items.php'
),
'vars' => array(
'controller' => 'vstore_items_vars_ui',
'path' => 'inc/admin_config_item_vars.php',
'ui' => 'vstore_items_vars_form_ui',
'uipath' => 'inc/admin_config_item_vars.php'
),
'coupons' => array(
'controller' => 'vstore_coupons_ui',
'path' => 'inc/admin_config_coupons.php',
'ui' => 'vstore_coupons_form_ui',
'uipath' => 'inc/admin_config_coupons.php'
),
'statistics' => array(
'controller' => 'vstore_statistics_ui',
'path' => 'inc/admin_config_statistics.php',
'ui' => 'vstore_statistics_form_ui',
'uipath' => 'inc/admin_config_statistics.php'
),
'customer' => array(
'controller' => 'vstore_customer_ui',
'path' => 'inc/admin_config_customer.php',
'ui' => 'vstore_customer_form_ui',
'uipath' => 'inc/admin_config_customer.php'
),
);
protected $adminMenu = array(
'statistics/custom' => array('caption'=> LAN_VSTORE_ADMIN_000, 'perm' => 'P', 'icon'=>'fas-tachometer-alt'),
'orders/list' => array('caption'=> LAN_VSTORE_ADMIN_001, 'perm' => 'P', 'icon'=>'fas-shopping-cart'), // "Sales"
'orders/div' => array('divider'=>true),
'products/list' => array('caption'=> LAN_VSTORE_ADMIN_002, 'perm' => 'P'),
'products/create' => array('caption'=> LAN_VSTORE_ADMIN_003, 'perm' => 'P'),
'products/div' => array('divider'=>true),
'vars/list' => array('caption'=> LAN_VSTORE_ADMIN_004, 'perm' => 'P', 'icon'=>'fas-gifts'), // Product Variations
'vars/create' => array('caption'=> LAN_VSTORE_ADMIN_005, 'perm' => 'P', 'icon'=>'fas-gift'),
'vars/div' => array('divider'=>true),
'cat/list' => array('caption'=> LAN_CATEGORIES, 'perm' => 'P'),
'cat/create' => array('caption'=> LAN_CREATE_CATEGORY, 'perm' => 'P'),
'cat/div' => array('divider'=>true),
'coupons/list' => array('caption'=> LAN_VSTORE_ADMIN_006, 'perm' => 'P', 'icon'=>'fas-tags'),
'coupons/create' => array('caption'=> LAN_VSTORE_ADMIN_007, 'perm' => 'P', 'icon'=>'fas-tag'),
'coupons/div' => array('divider'=>true),
'customer/list' => array('caption'=> LAN_VSTORE_ADMIN_008, 'perm' => 'P', 'icon'=>'fas-user-tag'),
'main/prefs' => array('caption'=> LAN_PREFS, 'perm' => '0'),
'email/prefs' => array('caption'=> LAN_VSTORE_ADMIN_009, 'perm' => '0', 'icon'=>'fas-envelope'),
'invoice/prefs' => array('caption'=> LAN_VSTORE_ADMIN_010, 'perm' => '0', 'icon'=>'fas-file-invoice'),
'gateways/prefs' => array('caption'=> LAN_VSTORE_ADMIN_011, 'perm' => '0', 'icon'=>'fas-dollar-sign'),
);
protected $adminMenuAliases = array(
'products/edit' => 'products/list',
'vars/edit' => 'vars/list',
'products/grid' => 'products/list',
'orders/edit' => 'orders/list',
'coupons/edit' => 'coupons/list',
'statistics/view' => 'statistics/custom'
);
protected $menuTitle = 'Vstore';
function init()
{
if(deftrue('e_DEBUG'))
{
// $this->adminMenu['products/grid'] = array('caption'=> "Products (Grid)", 'perm' => 'P');
}
parent::init();
}
}
new vstore_admin();
require_once(e_ADMIN."auth.php");
e107::getAdminUI()->runPage();
require_once(e_ADMIN."footer.php");
exit;