CMXX - Improved menu handling
This commit is contained in:
@@ -14,7 +14,7 @@ $post_content = json_decode(decode_payload($input),true);
|
|||||||
if (empty($partner->soldto) || $partner->soldto == ''){$soldto_search = '%';} else {$soldto_search = '-%';}
|
if (empty($partner->soldto) || $partner->soldto == ''){$soldto_search = '%';} else {$soldto_search = '-%';}
|
||||||
|
|
||||||
//default whereclause to check if data is owned by user
|
//default whereclause to check if data is owned by user
|
||||||
$whereclause = getWhereclauselvl2('partners',$permission,$partner);
|
list($whereclause,$condition) = getWhereclauselvl2('partners',$permission,$partner);
|
||||||
|
|
||||||
//SET PARAMETERS FOR QUERY
|
//SET PARAMETERS FOR QUERY
|
||||||
$id = $post_content['partnerID'] ?? ''; //check for rowID
|
$id = $post_content['partnerID'] ?? ''; //check for rowID
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ $pdo = dbConnect($dbname);
|
|||||||
if (empty($partner->soldto) || $partner->soldto == ''){$soldto_search = '%';} else {$soldto_search = '-%';}
|
if (empty($partner->soldto) || $partner->soldto == ''){$soldto_search = '%';} else {$soldto_search = '-%';}
|
||||||
|
|
||||||
//default whereclause
|
//default whereclause
|
||||||
$whereclause = getWhereclauselvl2("discounts",$permission,$partner);
|
list($whereclause,$condition) = getWhereclauselvl2("discounts",$permission,$partner);
|
||||||
|
|
||||||
//NEW ARRAY
|
//NEW ARRAY
|
||||||
$criterias = [];
|
$criterias = [];
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ $pdo = dbConnect($dbname);
|
|||||||
if (empty($partner->soldto) || $partner->soldto == ''){$soldto_search = '%';} else {$soldto_search = '-%';}
|
if (empty($partner->soldto) || $partner->soldto == ''){$soldto_search = '%';} else {$soldto_search = '-%';}
|
||||||
|
|
||||||
//default whereclause
|
//default whereclause
|
||||||
$whereclause = getWhereclauselvl2("invoice",$permission,$partner);
|
list($whereclause,$condition) = getWhereclauselvl2("invoice",$permission,$partner);
|
||||||
|
|
||||||
//NEW ARRAY
|
//NEW ARRAY
|
||||||
$criterias = [];
|
$criterias = [];
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ $pdo = dbConnect($dbname);
|
|||||||
if (empty($partner->soldto) || $partner->soldto == ''){$soldto_search = '%';} else {$soldto_search = '-%';}
|
if (empty($partner->soldto) || $partner->soldto == ''){$soldto_search = '%';} else {$soldto_search = '-%';}
|
||||||
|
|
||||||
//default whereclause
|
//default whereclause
|
||||||
$whereclause = getWhereclauselvl2("attributes",$permission,$partner);
|
list($whereclause,$condition) = getWhereclauselvl2("attributes",$permission,$partner);
|
||||||
|
|
||||||
//NEW ARRAY
|
//NEW ARRAY
|
||||||
$criterias = [];
|
$criterias = [];
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ $pdo = dbConnect($dbname);
|
|||||||
if (empty($partner->soldto) || $partner->soldto == ''){$soldto_search = '%';} else {$soldto_search = '-%';}
|
if (empty($partner->soldto) || $partner->soldto == ''){$soldto_search = '%';} else {$soldto_search = '-%';}
|
||||||
|
|
||||||
//default whereclause
|
//default whereclause
|
||||||
$whereclause = getWhereclauselvl2("config",$permission,$partner);
|
list($whereclause,$condition) = getWhereclauselvl2("config",$permission,$partner);
|
||||||
|
|
||||||
//NEW ARRAY
|
//NEW ARRAY
|
||||||
$criterias = [];
|
$criterias = [];
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ $pdo = dbConnect($dbname);
|
|||||||
if (empty($partner->soldto) || $partner->soldto == ''){$soldto_search = '%';} else {$soldto_search = '-%';}
|
if (empty($partner->soldto) || $partner->soldto == ''){$soldto_search = '%';} else {$soldto_search = '-%';}
|
||||||
|
|
||||||
//default whereclause
|
//default whereclause
|
||||||
$whereclause = getWhereclauselvl2("software",$permission,$partner);
|
list($whereclause,$condition) = getWhereclauselvl2("software",$permission,$partner);
|
||||||
|
|
||||||
//NEW ARRAY
|
//NEW ARRAY
|
||||||
$criterias = [];
|
$criterias = [];
|
||||||
|
|||||||
@@ -12,12 +12,14 @@ $pdo = dbConnect($dbname);
|
|||||||
if (empty($partner->soldto) || $partner->soldto == ''){$soldto_search = '%';} else {$soldto_search = '-%';}
|
if (empty($partner->soldto) || $partner->soldto == ''){$soldto_search = '%';} else {$soldto_search = '-%';}
|
||||||
|
|
||||||
//default whereclause
|
//default whereclause
|
||||||
$whereclause = getWhereclauselvl2("transactions",$permission,$partner);
|
list($whereclause,$condition) = getWhereclauselvl2("transactions",$permission,$partner);
|
||||||
|
|
||||||
//NEW ARRAY
|
//NEW ARRAY
|
||||||
$criterias = [];
|
$criterias = [];
|
||||||
$clause = '';
|
$clause = '';
|
||||||
|
|
||||||
|
var_dump($w)
|
||||||
|
|
||||||
//Check for $_GET variables and build up clause
|
//Check for $_GET variables and build up clause
|
||||||
if(isset($get_content) && $get_content!=''){
|
if(isset($get_content) && $get_content!=''){
|
||||||
//GET VARIABLES FROM URL
|
//GET VARIABLES FROM URL
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ $post_content = json_decode($input,true);
|
|||||||
if (empty($partner->soldto) || $partner->soldto == ''){$soldto_search = '%';} else {$soldto_search = '-%';}
|
if (empty($partner->soldto) || $partner->soldto == ''){$soldto_search = '%';} else {$soldto_search = '-%';}
|
||||||
|
|
||||||
//default whereclause
|
//default whereclause
|
||||||
$whereclause = getWhereclauselvl2("categories",$permission,$partner);
|
list($whereclause,$condition) = getWhereclauselvl2("categories",$permission,$partner);
|
||||||
|
|
||||||
|
|
||||||
//BUILD UP PARTNERHIERARCHY FROM USER
|
//BUILD UP PARTNERHIERARCHY FROM USER
|
||||||
|
|||||||
@@ -146,6 +146,51 @@ function routes($urls) {
|
|||||||
//------------------------------------------
|
//------------------------------------------
|
||||||
// Menu Builder
|
// Menu Builder
|
||||||
//------------------------------------------
|
//------------------------------------------
|
||||||
|
function filterMenuByProfile($menu, $profileString) {
|
||||||
|
// Convert profile string to array
|
||||||
|
$profileArray = explode(',', $profileString);
|
||||||
|
|
||||||
|
// Initialize result array
|
||||||
|
$filteredMenu = [];
|
||||||
|
|
||||||
|
// Loop through main menu sections
|
||||||
|
foreach ($menu as $sectionKey => $section) {
|
||||||
|
$sectionIncluded = in_array($sectionKey, $profileArray);
|
||||||
|
$submenuFound = false;
|
||||||
|
$firstSubmenuItem = null;
|
||||||
|
|
||||||
|
// First check if any submenu items are in profile
|
||||||
|
foreach ($section as $itemKey => $item) {
|
||||||
|
if ($itemKey !== 'main_menu' && in_array($itemKey, $profileArray)) {
|
||||||
|
$submenuFound = true;
|
||||||
|
if ($firstSubmenuItem === null) {
|
||||||
|
$firstSubmenuItem = $item;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Include this section if either section key or any submenu is in profile
|
||||||
|
if ($sectionIncluded || $submenuFound) {
|
||||||
|
$filteredMenu[$sectionKey] = [];
|
||||||
|
|
||||||
|
// Add main_menu - if section not in profile but submenu found, use first submenu as main_menu
|
||||||
|
if (!$sectionIncluded && $submenuFound && $firstSubmenuItem !== null) {
|
||||||
|
$filteredMenu[$sectionKey]['main_menu'] = $firstSubmenuItem;
|
||||||
|
} else {
|
||||||
|
$filteredMenu[$sectionKey]['main_menu'] = $section['main_menu'];
|
||||||
|
}
|
||||||
|
|
||||||
|
// Add allowed submenu items
|
||||||
|
foreach ($section as $itemKey => $item) {
|
||||||
|
if ($itemKey !== 'main_menu' && in_array($itemKey, $profileArray)) {
|
||||||
|
$filteredMenu[$sectionKey][$itemKey] = $item;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $filteredMenu;
|
||||||
|
}
|
||||||
function menu($selected,$selected_child){
|
function menu($selected,$selected_child){
|
||||||
|
|
||||||
include dirname(__FILE__,2).'/settings/settings.php';
|
include dirname(__FILE__,2).'/settings/settings.php';
|
||||||
@@ -153,43 +198,42 @@ function menu($selected,$selected_child){
|
|||||||
if(isset($_SESSION['country_code'])){
|
if(isset($_SESSION['country_code'])){
|
||||||
$api_file_language = dirname(__FILE__,2).'/settings/translations/translations_'.strtoupper($_SESSION['country_code']).'.php';
|
$api_file_language = dirname(__FILE__,2).'/settings/translations/translations_'.strtoupper($_SESSION['country_code']).'.php';
|
||||||
if (file_exists($api_file_language)){
|
if (file_exists($api_file_language)){
|
||||||
include $api_file_language; //Include the code
|
include $api_file_language; //Include the code
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
include dirname(__FILE__,2).'/settings/translations/translations_US.php';
|
include dirname(__FILE__,2).'/settings/translations/translations_US.php';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
include dirname(__FILE__,2).'/settings/translations/translations_US.php';
|
include dirname(__FILE__,2).'/settings/translations/translations_US.php';
|
||||||
}
|
}
|
||||||
|
|
||||||
$profile = explode(',',$_SESSION['profile']);
|
|
||||||
|
|
||||||
//Define Menu
|
//Define Menu
|
||||||
$menu = '';
|
$menu = '';
|
||||||
foreach ($main_menu as $menu_item){
|
|
||||||
if (in_array($item = $menu_item, $profile,)){
|
|
||||||
//Main URL
|
|
||||||
$menu .= '<a href="index.php?page='.$urls[$item]['url'].'"' . ($selected == $urls[$item]['selected'] ? ' class="selected"' : '') . '><i class="'.$urls[$item]['icon'].'"></i>'.ucfirst((${$urls[$item]['name']}?? 'not specified')).'</a>';
|
|
||||||
|
|
||||||
//DEFINE SUBMENU
|
//filter the main_menu array based on profile
|
||||||
$sub_menu = $item.'_sub' ?? '';
|
$filteredMenu = filterMenuByProfile($main_menu, $_SESSION['profile']);
|
||||||
$sub_menu = (isset($$sub_menu) && $$sub_menu !='')? $$sub_menu : 0;
|
|
||||||
//CHECK IF SUBMENU EXIST
|
foreach ($filteredMenu as $menu_item){
|
||||||
if ($sub_menu !=0){
|
//Main Item
|
||||||
$menu .= '<div class="sub" ' . ($selected == $urls[$item]['selected'] ? ' class="selected"' : '') . '>';
|
$menu .= '<a href="index.php?page='.$menu_item['main_menu']['url'].'"' . ($selected == $menu_item['main_menu']['selected'] ? ' class="selected"' : '') . '><i class="'.$menu_item['main_menu']['icon'].'"></i>'.ucfirst((${$menu_item['main_menu']['name']} ?? 'not specified')).'</a>';
|
||||||
foreach($sub_menu as $key){
|
|
||||||
//CHECK IF USER IS ALLOWED
|
if (count($menu_item) > 1){
|
||||||
if (in_array($key,$profile)){
|
//SUBMENU
|
||||||
$menu .= '<a href="index.php?page='.$urls[$key]['url'].'"' . ($selected == $urls[$key]['selected'] && $selected_child == 'view' ? ' class="selected"' : '') . '><span>◼</span>'.ucfirst((${$urls[$key]['name']}?? 'not specified')).'</a>';
|
$menu .= '<div class="sub" ' . ($selected == $menu_item['main_menu']['selected'] ? ' class="selected"' : '') . '>';
|
||||||
}
|
|
||||||
}
|
foreach ($menu_item as $key => $item){
|
||||||
$menu .= '</div>';
|
//filter out main_menu
|
||||||
}
|
if($key !='main_menu'){
|
||||||
|
$menu .= '<a href="index.php?page='.$item['url'].'"' . ($selected == $item['selected'] ? ' class="selected"' : '') . '><span>◼</span>'.ucfirst((${$item['name']}?? 'not specified')).'</a>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$menu .= '</div>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return $menu;
|
return $menu;
|
||||||
}
|
}
|
||||||
|
|
||||||
//------------------------------------------
|
//------------------------------------------
|
||||||
// Template Header
|
// Template Header
|
||||||
@@ -669,15 +713,15 @@ function getWhereclause($table_name,$permission,$partner){
|
|||||||
break;
|
break;
|
||||||
case '3':
|
case '3':
|
||||||
$condition = '__salesid___'.$partner->salesid.'___soldto___%';
|
$condition = '__salesid___'.$partner->salesid.'___soldto___%';
|
||||||
$whereclause = 'WHERE '.$table.' like :condition ';
|
$whereclause = 'WHERE '.$table.' like "'.$condition.'"';
|
||||||
break;
|
break;
|
||||||
case '2':
|
case '2':
|
||||||
$condition = '__salesid___'.$partner->salesid.'___soldto___'.substr($partner->soldto, 0, strpos($partner->soldto, "-")).$soldto_search;
|
$condition = '__salesid___'.$partner->salesid.'___soldto___'.substr($partner->soldto, 0, strpos($partner->soldto, "-")).$soldto_search;
|
||||||
$whereclause = 'WHERE '.$table.' like :condition ';
|
$whereclause = 'WHERE '.$table.' like "'.$condition.'"';
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
$condition = '__salesid___'.$partner->salesid.'___soldto___'.substr($partner->soldto, 0, strpos($partner->soldto, "-")).$soldto_search.'___shipto___'.substr($partner->shipto, 0, strpos($partner->shipto, "-")).'%___location___'.substr($partner->location, 0, strpos($partner->location, "-")).'%';
|
$condition = '__salesid___'.$partner->salesid.'___soldto___'.substr($partner->soldto, 0, strpos($partner->soldto, "-")).$soldto_search.'___shipto___'.substr($partner->shipto, 0, strpos($partner->shipto, "-")).'%___location___'.substr($partner->location, 0, strpos($partner->location, "-")).'%';
|
||||||
$whereclause = 'WHERE '.$table.' like :condition ';
|
$whereclause = 'WHERE '.$table.' like "'.$condition.'"';
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -717,7 +761,7 @@ function getWhereclauselvl2($table_name,$permission,$partner){
|
|||||||
break;
|
break;
|
||||||
case '3':
|
case '3':
|
||||||
$condition = '__salesid___'.$partner->salesid.'___soldto___%';
|
$condition = '__salesid___'.$partner->salesid.'___soldto___%';
|
||||||
$whereclause = 'WHERE '.$table.' like :condition ';
|
$whereclause = 'WHERE '.$table.' like "'.$condition.'" ';
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
$condition = '__salesid___'.$partner->salesid.'___soldto___'.substr($partner->soldto, 0, strpos($partner->soldto, "-")).$soldto_search;
|
$condition = '__salesid___'.$partner->salesid.'___soldto___'.substr($partner->soldto, 0, strpos($partner->soldto, "-")).$soldto_search;
|
||||||
|
|||||||
@@ -7,242 +7,268 @@
|
|||||||
// Each Menu name in urls array requires reference
|
// Each Menu name in urls array requires reference
|
||||||
// into translation files and corresponding profile
|
// into translation files and corresponding profile
|
||||||
//------------------------------------------
|
//------------------------------------------
|
||||||
//Menu Setup
|
$main_menu = [
|
||||||
$main_menu = array ('dashboard','sales','buildtool','cartests','marketing','equipments','products','reporting','admin','settings');
|
"dashboard" => [
|
||||||
|
"main_menu" => [
|
||||||
//Sub menus
|
"url" => "dashboard",
|
||||||
$equipments_sub = array('equipments','servicereports','rmas','histories','firmwaretool','equipments_mass_update');
|
"selected" => "dashboard",
|
||||||
$sales_sub = array('accounts','contracts','catalog','orders');
|
"icon" => "fas fa-tachometer-alt",
|
||||||
$products_sub = array('products','products_attributes','pricelists');
|
"name" => "menu_dashboard"
|
||||||
$admin_sub = array('users','categories','discounts','shipping','communications','partners','media');
|
]
|
||||||
$reporting_sub = array('report_build','report_contracts_billing','report_healthindex','report_usage');
|
],
|
||||||
$settings_sub = array('config','translations','logfile','maintenance','profiles');
|
"sales" => [
|
||||||
|
"main_menu" => [
|
||||||
//URLS
|
"url" => "contracts",
|
||||||
$urls = array(
|
"selected" => "contracts",
|
||||||
"dashboard" => array(
|
"icon" => "fa-solid fa-bars",
|
||||||
"url" => "dashboard",
|
"name" => "menu_sales"
|
||||||
"selected" => "dashboard",
|
],
|
||||||
"icon" => "fas fa-tachometer-alt",
|
"accounts" => [
|
||||||
"name" => "menu_dashboard"
|
"url" => "accounts",
|
||||||
),
|
"selected" => "accounts",
|
||||||
"equipments" => array(
|
"icon" => "fas fa-tachometer-alt",
|
||||||
"url" => "equipments",
|
"name" => "menu_sales_accounts"
|
||||||
"selected" => "assets",
|
],
|
||||||
"icon" => "fa-solid fa-database",
|
"catalog" => [
|
||||||
"name" => "menu_assets"
|
"url" => "catalog",
|
||||||
),
|
"selected" => "catalog",
|
||||||
"servicereports" => array(
|
"icon" => "fa-solid fa-photo-film",
|
||||||
"url" => "servicereports",
|
"name" => "menu_catalog"
|
||||||
"selected" => "servicereports",
|
],
|
||||||
"icon" => "fas fa-tachometer-alt",
|
"contracts" => [
|
||||||
"name" => "menu_service_reports"
|
"url" => "contracts",
|
||||||
),
|
"selected" => "contracts",
|
||||||
"rmas" => array(
|
"icon" => "fas fa-tachometer-alt",
|
||||||
"url" => "rmas",
|
"name" => "menu_sales_contracts"
|
||||||
"selected" => "rmas",
|
],
|
||||||
"icon" => "fas fa-tachometer-alt",
|
"orders" => [
|
||||||
"name" => "menu_rmas"
|
"url" => "orders",
|
||||||
),
|
"selected" => "orders",
|
||||||
"histories" => array(
|
"icon" => "fas fa-tachometer-alt",
|
||||||
"url" => "histories",
|
"name" => "menu_sales_orders"
|
||||||
"selected" => "histories",
|
]
|
||||||
"icon" => "fas fa-tachometer-alt",
|
],
|
||||||
"name" => "menu_history"
|
"buildtool" => [
|
||||||
),
|
"main_menu" => [
|
||||||
"firmwaretool" => array(
|
"url" => "buildtool",
|
||||||
"url" => "firmwaretool",
|
"selected" => "buildtool",
|
||||||
"selected" => "firmwaretool",
|
"icon" => "fas fa-tachometer-alt",
|
||||||
"icon" => "fas fa-tachometer-alt",
|
"name" => "menu_build"
|
||||||
"name" => "menu_firmwaretool"
|
]
|
||||||
),
|
],
|
||||||
"equipments_mass_update" => array(
|
"cartests" => [
|
||||||
"url" => "equipments_mass_update",
|
"main_menu" => [
|
||||||
"selected" => "equipments_mass_update",
|
"url" => "cartests",
|
||||||
"icon" => "fas fa-tachometer-alt",
|
"selected" => "cartests",
|
||||||
"name" => "menu_equipments_mass_update"
|
"icon" => "fa-solid fa-car",
|
||||||
),
|
"name" => "menu_cartest"
|
||||||
"products" => array(
|
]
|
||||||
"url" => "products&status=1",
|
],
|
||||||
"selected" => "products",
|
"marketing" => [
|
||||||
"icon" => "fas fa-box-open",
|
"main_menu" => [
|
||||||
"name" => "menu_products"
|
"url" => "marketing&product_group=Emergency_Plug&product_content=Images",
|
||||||
),
|
"selected" => "marketing",
|
||||||
"products_attributes" => array(
|
"icon" => "fas fa-tachometer-alt",
|
||||||
"url" => "products_attributes",
|
"name" => "menu_marketing"
|
||||||
"selected" => "products_attributes",
|
]
|
||||||
"icon" => "fas fa-box-open",
|
],
|
||||||
"name" => "menu_products_attributes"
|
"equipments" => [
|
||||||
),
|
"main_menu" => [
|
||||||
"pricelists" => array(
|
"url" => "equipments",
|
||||||
"url" => "pricelists",
|
"selected" => "assets",
|
||||||
"selected" => "pricelists",
|
"icon" => "fa-solid fa-database",
|
||||||
"icon" => "fa-solid fa-coins",
|
"name" => "menu_assets"
|
||||||
"name" => "menu_pricelists"
|
],
|
||||||
),
|
"equipments" =>[
|
||||||
"sales" => array(
|
"url" => "equipments",
|
||||||
"url" => "contracts",
|
"selected" => "assets",
|
||||||
"selected" => "contracts",
|
"icon" => "fa-solid fa-database",
|
||||||
"icon" => "fa-solid fa-bars",
|
"name" => "menu_assets"
|
||||||
"name" => "menu_sales"
|
],
|
||||||
),
|
"servicereports" => [
|
||||||
"accounts" => array(
|
"url" => "servicereports",
|
||||||
"url" => "accounts",
|
"selected" => "servicereports",
|
||||||
"selected" => "accounts",
|
"icon" => "fas fa-tachometer-alt",
|
||||||
"icon" => "fas fa-tachometer-alt",
|
"name" => "menu_service_reports"
|
||||||
"name" => "menu_sales_accounts"
|
],
|
||||||
),
|
"rmas" => [
|
||||||
"contracts" => array(
|
"url" => "rmas",
|
||||||
"url" => "contracts",
|
"selected" => "rmas",
|
||||||
"selected" => "contracts",
|
"icon" => "fas fa-tachometer-alt",
|
||||||
"icon" => "fas fa-tachometer-alt",
|
"name" => "menu_rmas"
|
||||||
"name" => "menu_sales_contracts"
|
],
|
||||||
),
|
"histories" => [
|
||||||
"orders" => array(
|
"url" => "histories",
|
||||||
"url" => "orders",
|
"selected" => "histories",
|
||||||
"selected" => "orders",
|
"icon" => "fas fa-tachometer-alt",
|
||||||
"icon" => "fas fa-tachometer-alt",
|
"name" => "menu_history"
|
||||||
"name" => "menu_sales_orders"
|
],
|
||||||
),
|
"firmwaretool" => [
|
||||||
"admin" => array(
|
"url" => "firmwaretool",
|
||||||
"url" => "partners",
|
"selected" => "firmwaretool",
|
||||||
"selected" => "partners",
|
"icon" => "fas fa-tachometer-alt",
|
||||||
"icon" => "fa-solid fa-bars",
|
"name" => "menu_firmwaretool"
|
||||||
"name" => "menu_admin"
|
] ,
|
||||||
),
|
"equipments_mass_update" => [
|
||||||
"users" => array(
|
"url" => "equipments_mass_update",
|
||||||
"url" => "users",
|
"selected" => "equipments_mass_update",
|
||||||
"selected" => "users",
|
"icon" => "fas fa-tachometer-alt",
|
||||||
"icon" => "fas fa-tachometer-alt",
|
"name" => "menu_equipments_mass_update"
|
||||||
"name" => "menu_admin_users"
|
]
|
||||||
),
|
],
|
||||||
"communications" => array(
|
"products" => [
|
||||||
"url" => "communications",
|
"main_menu" => [
|
||||||
"selected" => "communications",
|
"url" => "products&status=1",
|
||||||
"icon" => "fas fa-tachometer-alt",
|
"selected" => "products",
|
||||||
"name" => "menu_admin_communications"
|
"icon" => "fas fa-box-open",
|
||||||
),
|
"name" => "menu_products"
|
||||||
"media" => array(
|
],
|
||||||
"url" => "media",
|
"products" => [
|
||||||
"selected" => "media",
|
"url" => "products&status=1",
|
||||||
"icon" => "fa-solid fa-photo-film",
|
"selected" => "products",
|
||||||
"name" => "menu_media"
|
"icon" => "fas fa-box-open",
|
||||||
),
|
"name" => "menu_products"
|
||||||
"categories" => array(
|
],
|
||||||
"url" => "categories",
|
"products_attributes" => [
|
||||||
"selected" => "categories",
|
"url" => "products_attributes",
|
||||||
"icon" => "fa-solid fa-photo-film",
|
"selected" => "products_attributes",
|
||||||
"name" => "menu_categories"
|
"icon" => "fas fa-box-open",
|
||||||
),
|
"name" => "menu_products_attributes"
|
||||||
"discounts" => array(
|
],
|
||||||
"url" => "discounts",
|
"pricelists" => [
|
||||||
"selected" => "discounts",
|
"url" => "pricelists",
|
||||||
"icon" => "fa-solid fa-photo-film",
|
"selected" => "pricelists",
|
||||||
"name" => "menu_discounts"
|
"icon" => "fa-solid fa-coins",
|
||||||
),
|
"name" => "menu_pricelists"
|
||||||
"shipping" => array(
|
]
|
||||||
"url" => "shipping",
|
],
|
||||||
"selected" => "shipping",
|
"reporting" => [
|
||||||
"icon" => "fa-solid fa-truck-fast",
|
"main_menu" => [
|
||||||
"name" => "menu_shipping"
|
"url" => "report_build",
|
||||||
),
|
"selected" => "report_build",
|
||||||
"catalog" => array(
|
"icon" => "fa-solid fa-magnifying-glass-chart",
|
||||||
"url" => "catalog",
|
"name" => "menu_report_main"
|
||||||
"selected" => "catalog",
|
],
|
||||||
"icon" => "fa-solid fa-photo-film",
|
"report_build" => [
|
||||||
"name" => "menu_catalog"
|
"url" => "report_build",
|
||||||
),
|
"selected" => "report_build",
|
||||||
"partners" => array(
|
"icon" => "fa-solid fa-magnifying-glass-chart",
|
||||||
"url" => "partners",
|
"name" => "menu_report_build"
|
||||||
"selected" => "partners",
|
],
|
||||||
"icon" => "fas fa-tachometer-alt",
|
"report_contracts_billing" => [
|
||||||
"name" => "menu_admin_partners"
|
"url" => "report_contracts_billing",
|
||||||
),
|
"selected" => "report_contracts_billing",
|
||||||
"settings" => array(
|
"icon" => "fa-solid fa-magnifying-glass-chart",
|
||||||
"url" => "settings",
|
"name" => "menu_report_contracts_billing"
|
||||||
"selected" => "settings",
|
],
|
||||||
"icon" => "fas fa-tools",
|
"report_healthindex" => [
|
||||||
"name" => "menu_settings"
|
"url" => "report_healthindex",
|
||||||
),
|
"selected" => "report_healthindex",
|
||||||
"config" => array(
|
"icon" => "fa-solid fa-magnifying-glass-chart",
|
||||||
"url" => "settings",
|
"name" => "menu_report_healthindex"
|
||||||
"selected" => "settings",
|
],
|
||||||
"icon" => "fas fa-tools",
|
"report_usage" => [
|
||||||
"name" => "menu_config"
|
"url" => "report_usage",
|
||||||
),
|
"selected" => "report_usage",
|
||||||
"translations" => array(
|
"icon" => "fa-solid fa-magnifying-glass-chart",
|
||||||
"url" => "translations",
|
"name" => "menu_report_usage"
|
||||||
"selected" => "translations",
|
]
|
||||||
"icon" => "fas fa-tachometer-alt",
|
],
|
||||||
"name" => "menu_translations"
|
"admin" =>[
|
||||||
),
|
"main_menu" => [
|
||||||
"logfile" => array(
|
"url" => "partners",
|
||||||
"url" => "logfile",
|
"selected" => "partners",
|
||||||
"selected" => "logfile",
|
"icon" => "fa-solid fa-bars",
|
||||||
"icon" => "fas fa-tachometer-alt",
|
"name" => "menu_admin"
|
||||||
"name" => "menu_logfile"
|
],
|
||||||
),
|
"partners" => [
|
||||||
"maintenance" => array(
|
"url" => "partners",
|
||||||
"url" => "maintenance",
|
"selected" => "partners",
|
||||||
"selected" => "maintenance",
|
"icon" => "fa-solid fa-bars",
|
||||||
"icon" => "fas fa-tachometer-alt",
|
"name" => "menu_admin"
|
||||||
"name" => "menu_maintenance"
|
],
|
||||||
),
|
"users" => [
|
||||||
"profiles" => array(
|
"url" => "users",
|
||||||
"url" => "profiles",
|
"selected" => "users",
|
||||||
"selected" => "profiles",
|
"icon" => "fas fa-tachometer-alt",
|
||||||
"icon" => "fas fa-tachometer-alt",
|
"name" => "menu_admin_users"
|
||||||
"name" => "menu_profiles"
|
],
|
||||||
),
|
"communications" => [
|
||||||
"marketing" => array(
|
"url" => "communications",
|
||||||
"url" => "marketing&product_group=Emergency_Plug&product_content=Images",
|
"selected" => "communications",
|
||||||
"selected" => "marketing",
|
"icon" => "fas fa-tachometer-alt",
|
||||||
"icon" => "fas fa-tachometer-alt",
|
"name" => "menu_admin_communications"
|
||||||
"name" => "menu_marketing"
|
],
|
||||||
),
|
"media" => [
|
||||||
"buildtool" => array(
|
"url" => "media",
|
||||||
"url" => "buildtool",
|
"selected" => "media",
|
||||||
"selected" => "buildtool",
|
"icon" => "fa-solid fa-photo-film",
|
||||||
"icon" => "fas fa-tachometer-alt",
|
"name" => "menu_media"
|
||||||
"name" => "menu_build"
|
],
|
||||||
),
|
"categories" => [
|
||||||
"cartests" => array(
|
"url" => "categories",
|
||||||
"url" => "cartests",
|
"selected" => "categories",
|
||||||
"selected" => "cartests",
|
"icon" => "fa-solid fa-photo-film",
|
||||||
"icon" => "fa-solid fa-car",
|
"name" => "menu_categories"
|
||||||
"name" => "menu_cartest"
|
],
|
||||||
),
|
"discounts" => [
|
||||||
"reporting" => array(
|
"url" => "discounts",
|
||||||
"url" => "report_build",
|
"selected" => "discounts",
|
||||||
"selected" => "report_build",
|
"icon" => "fa-solid fa-photo-film",
|
||||||
"icon" => "fa-solid fa-magnifying-glass-chart",
|
"name" => "menu_discounts"
|
||||||
"name" => "menu_report_main"
|
],
|
||||||
),
|
"shipping" => [
|
||||||
"report_build" => array(
|
"url" => "shipping",
|
||||||
"url" => "report_build",
|
"selected" => "shipping",
|
||||||
"selected" => "report_build",
|
"icon" => "fa-solid fa-truck-fast",
|
||||||
"icon" => "fa-solid fa-magnifying-glass-chart",
|
"name" => "menu_shipping"
|
||||||
"name" => "menu_report_build"
|
]
|
||||||
),
|
],
|
||||||
"report_contracts_billing" => array(
|
"settings" => [
|
||||||
"url" => "report_contracts_billing",
|
"main_menu" => [
|
||||||
"selected" => "report_contracts_billing",
|
"url" => "settings",
|
||||||
"icon" => "fa-solid fa-magnifying-glass-chart",
|
"selected" => "settings",
|
||||||
"name" => "menu_report_contracts_billing"
|
"icon" => "fas fa-tools",
|
||||||
),
|
"name" => "menu_settings"
|
||||||
"report_healthindex" => array(
|
],
|
||||||
"url" => "report_healthindex",
|
"settings" => [
|
||||||
"selected" => "report_healthindex",
|
"url" => "settings",
|
||||||
"icon" => "fa-solid fa-magnifying-glass-chart",
|
"selected" => "settings",
|
||||||
"name" => "menu_report_healthindex"
|
"icon" => "fas fa-tools",
|
||||||
),
|
"name" => "menu_settings"
|
||||||
"report_usage" => array(
|
],
|
||||||
"url" => "report_usage",
|
"config" => [
|
||||||
"selected" => "report_usage",
|
"url" => "settings",
|
||||||
"icon" => "fa-solid fa-magnifying-glass-chart",
|
"selected" => "settings",
|
||||||
"name" => "menu_report_usage"
|
"icon" => "fas fa-tools",
|
||||||
)
|
"name" => "menu_config"
|
||||||
);
|
],
|
||||||
|
"translations" => [
|
||||||
|
"url" => "translations",
|
||||||
|
"selected" => "translations",
|
||||||
|
"icon" => "fas fa-tachometer-alt",
|
||||||
|
"name" => "menu_translations"
|
||||||
|
],
|
||||||
|
"logfile" => [
|
||||||
|
"url" => "logfile",
|
||||||
|
"selected" => "logfile",
|
||||||
|
"icon" => "fas fa-tachometer-alt",
|
||||||
|
"name" => "menu_logfile"
|
||||||
|
],
|
||||||
|
"maintenance" => [
|
||||||
|
"url" => "maintenance",
|
||||||
|
"selected" => "maintenance",
|
||||||
|
"icon" => "fas fa-tachometer-alt",
|
||||||
|
"name" => "menu_maintenance"
|
||||||
|
],
|
||||||
|
"profiles" => [
|
||||||
|
"url" => "profiles",
|
||||||
|
"selected" => "profiles",
|
||||||
|
"icon" => "fas fa-tachometer-alt",
|
||||||
|
"name" => "menu_profiles"
|
||||||
|
]
|
||||||
|
]
|
||||||
|
];
|
||||||
|
|
||||||
$routes = array(
|
$routes = array(
|
||||||
'/' => 'equipments.php',
|
'/' => 'equipments.php',
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ define('adminplus_profile','dashboard,profile,buildtool,sales,accounts,account,c
|
|||||||
/*Build*/
|
/*Build*/
|
||||||
define('build','dashboard,profile,buildtool,firmwaretool,buildtool,products_software,application');
|
define('build','dashboard,profile,buildtool,firmwaretool,buildtool,products_software,application');
|
||||||
/*Commerce*/
|
/*Commerce*/
|
||||||
define('commerce','dashboard,profile,assets,equipments,equipment,equipment_manage,equipment_manage_edit,equipments_mass_update,histories,history,history_manage,firmwaretool,products,products_versions,products_software,product,product_manage,servicereports,servicereport,admin,partners,partner,users,user,user_manage,marketing,application');
|
define('commerce','dashboard,profile,products,products_versions,products_software,products_attributes,products_attributes_items,products_attributes_manage,products_configurations,products_categories,products_media,product,product_manage,pricelists,pricelists_items,pricelists_manage,catalog,categories,category,discounts,discount,shipping,shipping_manage,admin,users,user,user_manage,translations,translations_details,translation_manage,media,media_manage,application,profiles,shopping_cart,checkout,placeorder,taxes,transactions,transactions_items,invoice,order,orders');
|
||||||
/*Distribution*/
|
/*Distribution*/
|
||||||
define('distribution','dashboard,profile,assets,equipments,equipment,equipment_manage,equipment_manage_edit,equipments_mass_update,histories,history,history_manage,firmwaretool,products,products_versions,products_software,product,product_manage,servicereports,servicereport,admin,partners,partner,users,user,user_manage,marketing,application');
|
define('distribution','dashboard,profile,assets,equipments,equipment,equipment_manage,equipment_manage_edit,equipments_mass_update,histories,history,history_manage,firmwaretool,products,products_versions,products_software,product,product_manage,servicereports,servicereport,admin,partners,partner,users,user,user_manage,marketing,application');
|
||||||
/*Firmware*/
|
/*Firmware*/
|
||||||
|
|||||||
Reference in New Issue
Block a user