←':''; //Check if allowed if (isAllowed($page,$_SESSION['authorization']['profile'],$_SESSION['authorization']['permission'],'R') === 0){ header('location: index.php'); exit; } //PAGE Security $page_manage = 'communication'; $update_allowed = isAllowed($page_manage ,$_SESSION['authorization']['profile'],$_SESSION['authorization']['permission'],'U'); $delete_allowed = isAllowed($page_manage ,$_SESSION['authorization']['profile'],$_SESSION['authorization']['permission'],'D'); $create_allowed = isAllowed($page_manage ,$_SESSION['authorization']['profile'],$_SESSION['authorization']['permission'],'C'); //GET PARAMETERS $pagination_page = isset($_GET['p']) ? $_GET['p'] : 1; $status = isset($_GET['status']) ? '&status='.$_GET['status'] : ''; $search = isset($_GET['search']) ? '&search='.$_GET['search'] : ''; // Determine the URL $url = 'index.php?page=communications'.$status.$search; //GET Details from URL $GET_VALUES = urlGETdetails($_GET) ?? ''; //CALL TO API $api_url = '/v1/communications/'.$GET_VALUES; $responses = ioServer($api_url,''); //Decode Payload if (!empty($responses)){$responses = decode_payload($responses);}else{$responses = null;} //Return QueryTotal from API $api_url = '/v1/communications/'.$GET_VALUES.'&totals='; $query_total = ioServer($api_url,''); //Decode Payload if (!empty($query_total)){$query_total = decode_payload($query_total);}else{$query_total = null;} // Handle success messages if (isset($_GET['success_msg'])) { if ($_GET['success_msg'] == 1) { $success_msg = $message_comm_1; } if ($_GET['success_msg'] == 2) { $success_msg = $message_comm_2; } if ($_GET['success_msg'] == 3) { $success_msg = $message_comm_3; } if ($_GET['success_msg'] == 4) { $success_msg = $message_comm_4; } } template_header('Communications', 'communications','view'); $view = '
'.$communication_p.'
'.$success_msg.'
| '.$communication_status.' | '.$communication_type.' | '.$communication_partner.' | '.$communication_email.' | '.$communication_firmware.' | '.$communication_service.' | '.$communication_marketing.' | |
|---|---|---|---|---|---|---|---|
| '.$message_no_communication.' | |||||||
| '.(($response->status == 1)? ''.$$status:''.$$status).' | '.$$type.' | '.$response->partnerID.' | '.$response->email.' | type_1 == 1 ?' checked':'').'/> | type_2 == 1 ?' checked':'').'/> | type_3 == 1 ?' checked':'').'/> | |