';
-if ($create_allowed ===1){
- $view .= '
'.$button_create_partner.'';
-}
-$view .= '
-
+
-
'.($button_create_pricelist ?? 'Create pricelist').'
-
+
';
diff --git a/products.php b/products.php
index 129b453..cda7274 100644
--- a/products.php
+++ b/products.php
@@ -19,6 +19,11 @@ if (isAllowed($page,$_SESSION['profile'],$_SESSION['permission'],'R') === 0){
header('location: index.php');
exit;
}
+//PAGE Security
+$page_manage = 'product_manage';
+$update_allowed = isAllowed($page_manage ,$_SESSION['profile'],$_SESSION['permission'],'U');
+$delete_allowed = isAllowed($page_manage ,$_SESSION['profile'],$_SESSION['permission'],'D');
+$create_allowed = isAllowed($page_manage ,$_SESSION['profile'],$_SESSION['permission'],'C');
//GET PARAMETERS
$pagination_page = isset($_GET['p']) ? $_GET['p'] : 1;
@@ -65,6 +70,16 @@ $view = '
'.$products_p.'
+
-
'.($button_create_products_attribute ?? 'Create attribute').'
-
+
';
diff --git a/products_software_versions.php b/products_software_versions.php
index b533b2e..012e28c 100644
--- a/products_software_versions.php
+++ b/products_software_versions.php
@@ -29,6 +29,11 @@ if (isAllowed($page,$_SESSION['profile'],$_SESSION['permission'],'R') === 0){
header('location: index.php');
exit;
}
+//PAGE Security
+$page_manage = 'products_software_version_manage';
+$update_allowed = isAllowed($page_manage ,$_SESSION['profile'],$_SESSION['permission'],'U');
+$delete_allowed = isAllowed($page_manage ,$_SESSION['profile'],$_SESSION['permission'],'D');
+$create_allowed = isAllowed($page_manage ,$_SESSION['profile'],$_SESSION['permission'],'C');
//GET PARAMETERS
$pagination_page = isset($_GET['p']) ? $_GET['p'] : 1;
@@ -75,6 +80,16 @@ $view = '
'.$software_versions_p.'
+
-
'.$button_create_software_version.'
-
';
-if ($create_allowed ===1){
- $view .= '
'.($button_create_rma ?? 'Create RMA').'';
-}
-$view .= '
-
-
-
-
'.$general_filters.'
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
- ';
+
+
+
+
'.$general_filters_clear.'';
+
//SHOW DOWNLOAD TO EXCELL OPTION ONLY TO ADMIN USERS
if ($_SESSION['permission'] == 3 || $_SESSION['permission'] == 4){
- $view .='
';
-}
-$view .= '
-
-
-
+ $view .= '
+ Download
+ ';
+}
+
+$view .= '
+
+
';
diff --git a/servicereport.php b/servicereport.php
index af91735..426803e 100644
--- a/servicereport.php
+++ b/servicereport.php
@@ -27,11 +27,11 @@ if (isAllowed($page,$_SESSION['profile'],$_SESSION['permission'],'R') === 0){
//GET Details from URL
$GET_VALUES = urlGETdetails($_GET) ?? '';
//CALL TO API FOR History
-$api_url = '/v1/history/'.$GET_VALUES;
+$api_url = '/v2/history/'.$GET_VALUES;
$history = ioServer($api_url,'');
//Decode Payload
-if (!empty($history)){$history = decode_payload($history);}else{$history = null;}
+if (!empty($history)){$history = json_decode($history);}else{$history = null;}
template_header('Servicereport', 'servicereport','view');
$view = '
@@ -60,7 +60,6 @@ if (empty($history)){
$view .= '
'.$service_events.'
diff --git a/servicereports.php b/servicereports.php
index 2dbf311..287b25b 100644
--- a/servicereports.php
+++ b/servicereports.php
@@ -35,16 +35,16 @@ $url = 'index.php?page=servicereports'.$status.$search.$equipmentid;
//GET Details from URL
$GET_VALUES = urlGETdetails($_GET) ?? '';
//CALL TO API FOR History
-$api_url = '/v1/history/type=ServiceReport&'.$GET_VALUES.'';
+$api_url = '/v2/history/type=ServiceReport&'.$GET_VALUES.'';
$history = ioServer($api_url,'');
//Decode Payload
-if (!empty($history)){$history = decode_payload($history);}else{$history = null;}
+if (!empty($history)){$history = json_decode($history);}else{$history = null;}
//Return QueryTotal from API
-$api_url = '/v1/history/type=ServiceReport&'.$GET_VALUES.'&totals=';
+$api_url = '/v2/history/type=ServiceReport&'.$GET_VALUES.'&totals=';
$query_total = ioServer($api_url,'');
//Decode Payload
-if (!empty($query_total)){$query_total = decode_payload($query_total);}else{$query_total = null;}
+if (!empty($query_total)){$query_total = json_decode($query_total);}else{$query_total = null;}
template_header('Servicereports', 'servicereports','view');
$view = '
@@ -56,22 +56,33 @@ $view = '
'.$servicereports_p.'
- '.$back_btn_orgin.'
+
-
'.($button_create_text_variable ?? '').'
-
-
-
-
-
-
+
+
';
diff --git a/users.php b/users.php
index 589d9be..025e91c 100644
--- a/users.php
+++ b/users.php
@@ -72,7 +72,17 @@ $view = '
'.$users_p.'
- '.$back_btn_orgin.'
+ ';
-if ($create_allowed ===1){
- $view .= '
'.$button_create_user.'';
-}
-$view .= '
-
-
-
-
'.$general_filters.'
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
+
+
+
+
';