mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-28 16:24:54 +02:00
minor changes in integria integration
This commit is contained in:
parent
637700422e
commit
f73cd80336
@ -28,6 +28,8 @@ if (! check_acl($config['id_user'], 0, 'PM') && ! is_user_admin($config['id_user
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
require_once $config['homedir'].'/include/functions_integriaims.php';
|
||||||
|
|
||||||
if (is_ajax()) {
|
if (is_ajax()) {
|
||||||
$integria_user = get_parameter('integria_user', '');
|
$integria_user = get_parameter('integria_user', '');
|
||||||
$integria_pass = get_parameter('integria_pass', '');
|
$integria_pass = get_parameter('integria_pass', '');
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
if (check_login()) {
|
if (check_login()) {
|
||||||
global $config;
|
global $config;
|
||||||
|
|
||||||
include_once $config['homedir'].'/include/functions.php';
|
include_once $config['homedir'].'/include/functions_integriaims.php';
|
||||||
|
|
||||||
$get_users = get_parameter('get_users');
|
$get_users = get_parameter('get_users');
|
||||||
$search_term = get_parameter('search_term', '');
|
$search_term = get_parameter('search_term', '');
|
||||||
|
@ -5438,263 +5438,3 @@ if (!function_exists('getallheaders')) {
|
|||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Perform an API call to Integria IMS.
|
|
||||||
*
|
|
||||||
* @param string API host URL.
|
|
||||||
* @param string User name.
|
|
||||||
* @param string User password.
|
|
||||||
* @param string API password.
|
|
||||||
* @param string API Operation.
|
|
||||||
* @param array Array with parameters required by the API function.
|
|
||||||
*
|
|
||||||
* @return boolean True if API request succeeded, false if API request failed.
|
|
||||||
*/
|
|
||||||
function integria_api_call($api_hostname, $user, $user_pass, $api_pass, $operation, $params_array=[], $show_credentials_error_msg=false)
|
|
||||||
{
|
|
||||||
$params_string = implode(',', $params_array);
|
|
||||||
|
|
||||||
$url_data = [
|
|
||||||
'user' => $user,
|
|
||||||
'user_pass' => $user_pass,
|
|
||||||
'pass' => $api_pass,
|
|
||||||
'op' => $operation,
|
|
||||||
'params' => html_entity_decode($params_string),
|
|
||||||
];
|
|
||||||
|
|
||||||
// Build URL for API request.
|
|
||||||
$url = $api_hostname.'/integria/include/api.php';
|
|
||||||
|
|
||||||
// ob_start();
|
|
||||||
// $out = fopen('php://output', 'w');
|
|
||||||
$ch = curl_init();
|
|
||||||
curl_setopt($ch, CURLOPT_URL, $url);
|
|
||||||
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
|
|
||||||
curl_setopt($ch, CURLOPT_POST, true);
|
|
||||||
curl_setopt($ch, CURLOPT_POSTFIELDS, $url_data);
|
|
||||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
|
||||||
curl_setopt($ch, CURLOPT_VERBOSE, true);
|
|
||||||
curl_setopt($ch, CURLOPT_STDERR, $out);
|
|
||||||
$result = curl_exec($ch);
|
|
||||||
|
|
||||||
// fclose($out);
|
|
||||||
// $debug = ob_get_clean();
|
|
||||||
$http_status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
|
|
||||||
|
|
||||||
$error = false;
|
|
||||||
|
|
||||||
if ($result === false) {
|
|
||||||
$error = curl_error($ch);
|
|
||||||
}
|
|
||||||
|
|
||||||
curl_close($ch);
|
|
||||||
|
|
||||||
if ($error === true || $http_status !== 200) {
|
|
||||||
if ($show_credentials_error_msg === true) {
|
|
||||||
ui_print_error_message(__('API request failed. Please check Integria IMS\' access credentials in Pandora setup.'));
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
} else {
|
|
||||||
return $result;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Parse CSV consisting of one or more lines of the form key-value pair into an array.
|
|
||||||
function get_array_from_csv_data_pair($csv_data, &$array_values)
|
|
||||||
{
|
|
||||||
$csv_array = explode("\n", $csv_data);
|
|
||||||
|
|
||||||
foreach ($csv_array as $csv_value) {
|
|
||||||
if (empty($csv_value)) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
$new_csv_value = str_getcsv($csv_value);
|
|
||||||
|
|
||||||
$array_values[$new_csv_value[0]] = $new_csv_value[1];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Parse CSV consisting of one or more lines of the form key-value pair into an array.
|
|
||||||
*
|
|
||||||
* @param string $csv_data Data returned of csv api call.
|
|
||||||
* @param string $array_values Returned array.
|
|
||||||
* @param array $index Array to create an associative index (opcional).
|
|
||||||
*/
|
|
||||||
function get_array_from_csv_data_all($csv_data, &$array_values, $index=false)
|
|
||||||
{
|
|
||||||
$csv_array = explode("\n", $csv_data);
|
|
||||||
|
|
||||||
foreach ($csv_array as $csv_value) {
|
|
||||||
if (empty($csv_value)) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
$new_csv_value = str_getcsv($csv_value);
|
|
||||||
|
|
||||||
if ($index !== false) {
|
|
||||||
foreach ($new_csv_value as $key => $value) {
|
|
||||||
$new_csv_value_index[$index[$key]] = $value;
|
|
||||||
}
|
|
||||||
|
|
||||||
$array_values[$new_csv_value[0]] = $new_csv_value_index;
|
|
||||||
} else {
|
|
||||||
$array_values[$new_csv_value[0]] = $new_csv_value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Print priority for Integria IMS with colors.
|
|
||||||
*
|
|
||||||
* @param string $priority value of priority in Integria IMS.
|
|
||||||
* @param string $priority_label text shown in color box.
|
|
||||||
*
|
|
||||||
* @return HTML code to print the color box.
|
|
||||||
*/
|
|
||||||
function ui_print_integria_incident_priority($priority, $priority_label)
|
|
||||||
{
|
|
||||||
global $config;
|
|
||||||
|
|
||||||
$output = '';
|
|
||||||
switch ($priority) {
|
|
||||||
case 0:
|
|
||||||
$color = COL_UNKNOWN;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 1:
|
|
||||||
$color = COL_NORMAL;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 10:
|
|
||||||
$color = COL_NOTINIT;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 2:
|
|
||||||
$color = COL_WARNING;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 3:
|
|
||||||
$color = COL_ALERTFIRED;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 4:
|
|
||||||
$color = COL_CRITICAL;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
$output = '<div class="priority" style="background: '.$color.'">';
|
|
||||||
$output .= $priority_label;
|
|
||||||
$output .= '</div>';
|
|
||||||
|
|
||||||
return $output;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Get tickets from Integria IMS.
|
|
||||||
*
|
|
||||||
* @param array $tickets_filters Filters to send to API.
|
|
||||||
*
|
|
||||||
* @return array Tickets returned by API call.
|
|
||||||
*/
|
|
||||||
function get_tickets_integriaims($tickets_filters)
|
|
||||||
{
|
|
||||||
global $config;
|
|
||||||
|
|
||||||
// Filters.
|
|
||||||
$incident_text = $tickets_filters['incident_text'];
|
|
||||||
$incident_status = $tickets_filters['incident_status'];
|
|
||||||
$incident_group = $tickets_filters['incident_group'];
|
|
||||||
$incident_owner = $tickets_filters['incident_owner'];
|
|
||||||
$incident_creator = $tickets_filters['incident_creator'];
|
|
||||||
$incident_priority = $tickets_filters['incident_priority'];
|
|
||||||
$incident_resolution = $tickets_filters['incident_resolution'];
|
|
||||||
$created_from = $tickets_filters['created_from'];
|
|
||||||
$created_to = $tickets_filters['created_to'];
|
|
||||||
|
|
||||||
// API call.
|
|
||||||
$result_api_call_list = integria_api_call(
|
|
||||||
$config['integria_hostname'],
|
|
||||||
$config['integria_user'],
|
|
||||||
$config['integria_pass'],
|
|
||||||
$config['integria_api_pass'],
|
|
||||||
'get_incidents',
|
|
||||||
[
|
|
||||||
$incident_text,
|
|
||||||
$incident_status,
|
|
||||||
$incident_group,
|
|
||||||
$incident_priority,
|
|
||||||
'0',
|
|
||||||
$incident_owner,
|
|
||||||
$incident_creator,
|
|
||||||
]
|
|
||||||
);
|
|
||||||
|
|
||||||
// Return array of api call 'get_incidents'.
|
|
||||||
$array_get_incidents = [];
|
|
||||||
get_array_from_csv_data_all($result_api_call_list, $array_get_incidents);
|
|
||||||
|
|
||||||
// Modify $array_get_incidents if filter for resolution exists.
|
|
||||||
$filter_resolution = [];
|
|
||||||
foreach ($array_get_incidents as $key => $value) {
|
|
||||||
if ($incident_resolution !== '' && ($array_get_incidents[$key][12] == $incident_resolution)) {
|
|
||||||
$filter_resolution[$key] = $array_get_incidents[$key];
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($incident_resolution !== '') {
|
|
||||||
$array_get_incidents = $filter_resolution;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Modify $array_get_incidents if filter for date is selected.
|
|
||||||
if ($created_from !== '' && $created_to !== '') {
|
|
||||||
$date = [];
|
|
||||||
$date_utimestamp = [];
|
|
||||||
foreach ($array_get_incidents as $key => $value) {
|
|
||||||
// Change format date / to -.
|
|
||||||
$date[$key] = date('Y-m-d', strtotime($array_get_incidents[$key][9]));
|
|
||||||
// Covert date to utimestamp.
|
|
||||||
$date_utimestamp[$key] = strtotime($date[$key]);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Change format date / to -.
|
|
||||||
$created_from_date = date('Y-m-d', strtotime($created_from));
|
|
||||||
$created_to_date = date('Y-m-d', strtotime($created_to));
|
|
||||||
|
|
||||||
// Covert date to utimestamp.
|
|
||||||
$created_from_timestamp = strtotime($created_from_date);
|
|
||||||
$created_to_timestamp = strtotime($created_to_date);
|
|
||||||
|
|
||||||
// Dates within the selected period.
|
|
||||||
$selected_period = array_filter(
|
|
||||||
$date_utimestamp,
|
|
||||||
function ($value) use ($created_from_timestamp, $created_to_timestamp) {
|
|
||||||
return ($value >= $created_from_timestamp && $value <= $created_to_timestamp);
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
// Return incidents with the correct dates.
|
|
||||||
$filter_date = [];
|
|
||||||
foreach ($array_get_incidents as $key => $value) {
|
|
||||||
foreach ($selected_period as $index => $value) {
|
|
||||||
if ($array_get_incidents[$key][0] == $index) {
|
|
||||||
$filter_date[$key] = $array_get_incidents[$key];
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$array_get_incidents = $filter_date;
|
|
||||||
}
|
|
||||||
|
|
||||||
return $array_get_incidents;
|
|
||||||
}
|
|
||||||
|
@ -143,3 +143,263 @@ function integriaims_get_details($details, $detail_index=false)
|
|||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Perform an API call to Integria IMS.
|
||||||
|
*
|
||||||
|
* @param string API host URL.
|
||||||
|
* @param string User name.
|
||||||
|
* @param string User password.
|
||||||
|
* @param string API password.
|
||||||
|
* @param string API Operation.
|
||||||
|
* @param array Array with parameters required by the API function.
|
||||||
|
*
|
||||||
|
* @return boolean True if API request succeeded, false if API request failed.
|
||||||
|
*/
|
||||||
|
function integria_api_call($api_hostname, $user, $user_pass, $api_pass, $operation, $params_array=[], $show_credentials_error_msg=false)
|
||||||
|
{
|
||||||
|
$params_string = implode(',', $params_array);
|
||||||
|
|
||||||
|
$url_data = [
|
||||||
|
'user' => $user,
|
||||||
|
'user_pass' => $user_pass,
|
||||||
|
'pass' => $api_pass,
|
||||||
|
'op' => $operation,
|
||||||
|
'params' => html_entity_decode($params_string),
|
||||||
|
];
|
||||||
|
|
||||||
|
// Build URL for API request.
|
||||||
|
$url = $api_hostname.'/integria/include/api.php';
|
||||||
|
|
||||||
|
// ob_start();
|
||||||
|
// $out = fopen('php://output', 'w');
|
||||||
|
$ch = curl_init();
|
||||||
|
curl_setopt($ch, CURLOPT_URL, $url);
|
||||||
|
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
|
||||||
|
curl_setopt($ch, CURLOPT_POST, true);
|
||||||
|
curl_setopt($ch, CURLOPT_POSTFIELDS, $url_data);
|
||||||
|
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
||||||
|
curl_setopt($ch, CURLOPT_VERBOSE, true);
|
||||||
|
curl_setopt($ch, CURLOPT_STDERR, $out);
|
||||||
|
$result = curl_exec($ch);
|
||||||
|
|
||||||
|
// fclose($out);
|
||||||
|
// $debug = ob_get_clean();
|
||||||
|
$http_status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
|
||||||
|
|
||||||
|
$error = false;
|
||||||
|
|
||||||
|
if ($result === false) {
|
||||||
|
$error = curl_error($ch);
|
||||||
|
}
|
||||||
|
|
||||||
|
curl_close($ch);
|
||||||
|
|
||||||
|
if ($error === true || $http_status !== 200) {
|
||||||
|
if ($show_credentials_error_msg === true) {
|
||||||
|
ui_print_error_message(__('API request failed. Please check Integria IMS\' access credentials in Pandora setup.'));
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
} else {
|
||||||
|
return $result;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Parse CSV consisting of one or more lines of the form key-value pair into an array.
|
||||||
|
function get_array_from_csv_data_pair($csv_data, &$array_values)
|
||||||
|
{
|
||||||
|
$csv_array = explode("\n", $csv_data);
|
||||||
|
|
||||||
|
foreach ($csv_array as $csv_value) {
|
||||||
|
if (empty($csv_value)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
$new_csv_value = str_getcsv($csv_value);
|
||||||
|
|
||||||
|
$array_values[$new_csv_value[0]] = $new_csv_value[1];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Parse CSV consisting of one or more lines of the form key-value pair into an array.
|
||||||
|
*
|
||||||
|
* @param string $csv_data Data returned of csv api call.
|
||||||
|
* @param string $array_values Returned array.
|
||||||
|
* @param array $index Array to create an associative index (opcional).
|
||||||
|
*/
|
||||||
|
function get_array_from_csv_data_all($csv_data, &$array_values, $index=false)
|
||||||
|
{
|
||||||
|
$csv_array = explode("\n", $csv_data);
|
||||||
|
|
||||||
|
foreach ($csv_array as $csv_value) {
|
||||||
|
if (empty($csv_value)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
$new_csv_value = str_getcsv($csv_value);
|
||||||
|
|
||||||
|
if ($index !== false) {
|
||||||
|
foreach ($new_csv_value as $key => $value) {
|
||||||
|
$new_csv_value_index[$index[$key]] = $value;
|
||||||
|
}
|
||||||
|
|
||||||
|
$array_values[$new_csv_value[0]] = $new_csv_value_index;
|
||||||
|
} else {
|
||||||
|
$array_values[$new_csv_value[0]] = $new_csv_value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Print priority for Integria IMS with colors.
|
||||||
|
*
|
||||||
|
* @param string $priority value of priority in Integria IMS.
|
||||||
|
* @param string $priority_label text shown in color box.
|
||||||
|
*
|
||||||
|
* @return HTML code to print the color box.
|
||||||
|
*/
|
||||||
|
function ui_print_integria_incident_priority($priority, $priority_label)
|
||||||
|
{
|
||||||
|
global $config;
|
||||||
|
|
||||||
|
$output = '';
|
||||||
|
switch ($priority) {
|
||||||
|
case 0:
|
||||||
|
$color = COL_UNKNOWN;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 1:
|
||||||
|
$color = COL_NORMAL;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 10:
|
||||||
|
$color = COL_NOTINIT;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 2:
|
||||||
|
$color = COL_WARNING;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 3:
|
||||||
|
$color = COL_ALERTFIRED;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 4:
|
||||||
|
$color = COL_CRITICAL;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
$output = '<div class="priority" style="background: '.$color.'">';
|
||||||
|
$output .= $priority_label;
|
||||||
|
$output .= '</div>';
|
||||||
|
|
||||||
|
return $output;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get tickets from Integria IMS.
|
||||||
|
*
|
||||||
|
* @param array $tickets_filters Filters to send to API.
|
||||||
|
*
|
||||||
|
* @return array Tickets returned by API call.
|
||||||
|
*/
|
||||||
|
function get_tickets_integriaims($tickets_filters)
|
||||||
|
{
|
||||||
|
global $config;
|
||||||
|
|
||||||
|
// Filters.
|
||||||
|
$incident_text = $tickets_filters['incident_text'];
|
||||||
|
$incident_status = $tickets_filters['incident_status'];
|
||||||
|
$incident_group = $tickets_filters['incident_group'];
|
||||||
|
$incident_owner = $tickets_filters['incident_owner'];
|
||||||
|
$incident_creator = $tickets_filters['incident_creator'];
|
||||||
|
$incident_priority = $tickets_filters['incident_priority'];
|
||||||
|
$incident_resolution = $tickets_filters['incident_resolution'];
|
||||||
|
$created_from = $tickets_filters['created_from'];
|
||||||
|
$created_to = $tickets_filters['created_to'];
|
||||||
|
|
||||||
|
// API call.
|
||||||
|
$result_api_call_list = integria_api_call(
|
||||||
|
$config['integria_hostname'],
|
||||||
|
$config['integria_user'],
|
||||||
|
$config['integria_pass'],
|
||||||
|
$config['integria_api_pass'],
|
||||||
|
'get_incidents',
|
||||||
|
[
|
||||||
|
$incident_text,
|
||||||
|
$incident_status,
|
||||||
|
$incident_group,
|
||||||
|
$incident_priority,
|
||||||
|
'0',
|
||||||
|
$incident_owner,
|
||||||
|
$incident_creator,
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
// Return array of api call 'get_incidents'.
|
||||||
|
$array_get_incidents = [];
|
||||||
|
get_array_from_csv_data_all($result_api_call_list, $array_get_incidents);
|
||||||
|
|
||||||
|
// Modify $array_get_incidents if filter for resolution exists.
|
||||||
|
$filter_resolution = [];
|
||||||
|
foreach ($array_get_incidents as $key => $value) {
|
||||||
|
if ($incident_resolution !== '' && ($array_get_incidents[$key][12] == $incident_resolution)) {
|
||||||
|
$filter_resolution[$key] = $array_get_incidents[$key];
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($incident_resolution !== '') {
|
||||||
|
$array_get_incidents = $filter_resolution;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Modify $array_get_incidents if filter for date is selected.
|
||||||
|
if ($created_from !== '' && $created_to !== '') {
|
||||||
|
$date = [];
|
||||||
|
$date_utimestamp = [];
|
||||||
|
foreach ($array_get_incidents as $key => $value) {
|
||||||
|
// Change format date / to -.
|
||||||
|
$date[$key] = date('Y-m-d', strtotime($array_get_incidents[$key][9]));
|
||||||
|
// Covert date to utimestamp.
|
||||||
|
$date_utimestamp[$key] = strtotime($date[$key]);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Change format date / to -.
|
||||||
|
$created_from_date = date('Y-m-d', strtotime($created_from));
|
||||||
|
$created_to_date = date('Y-m-d', strtotime($created_to));
|
||||||
|
|
||||||
|
// Covert date to utimestamp.
|
||||||
|
$created_from_timestamp = strtotime($created_from_date);
|
||||||
|
$created_to_timestamp = strtotime($created_to_date);
|
||||||
|
|
||||||
|
// Dates within the selected period.
|
||||||
|
$selected_period = array_filter(
|
||||||
|
$date_utimestamp,
|
||||||
|
function ($value) use ($created_from_timestamp, $created_to_timestamp) {
|
||||||
|
return ($value >= $created_from_timestamp && $value <= $created_to_timestamp);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
// Return incidents with the correct dates.
|
||||||
|
$filter_date = [];
|
||||||
|
foreach ($array_get_incidents as $key => $value) {
|
||||||
|
foreach ($selected_period as $index => $value) {
|
||||||
|
if ($array_get_incidents[$key][0] == $index) {
|
||||||
|
$filter_date[$key] = $array_get_incidents[$key];
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$array_get_incidents = $filter_date;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $array_get_incidents;
|
||||||
|
}
|
||||||
|
@ -14,8 +14,6 @@
|
|||||||
// Load global vars
|
// Load global vars
|
||||||
global $config;
|
global $config;
|
||||||
|
|
||||||
require_once 'include/functions_integriaims.php';
|
|
||||||
|
|
||||||
check_login();
|
check_login();
|
||||||
|
|
||||||
if (!(check_acl($config['id_user'], 0, 'IW') && check_acl($config['id_user'], 0, 'IR'))) {
|
if (!(check_acl($config['id_user'], 0, 'IW') && check_acl($config['id_user'], 0, 'IR'))) {
|
||||||
@ -25,6 +23,8 @@ if (!(check_acl($config['id_user'], 0, 'IW') && check_acl($config['id_user'], 0,
|
|||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
require_once $config['homedir'].'/include/functions_integriaims.php';
|
||||||
|
|
||||||
$update = (isset($_GET['incident_id']) === true);
|
$update = (isset($_GET['incident_id']) === true);
|
||||||
|
|
||||||
$onheader = integriaims_tabs('create_tab');
|
$onheader = integriaims_tabs('create_tab');
|
||||||
|
@ -479,7 +479,6 @@ if (check_acl($config['id_user'], 0, 'IR')
|
|||||||
$sub2 = [];
|
$sub2 = [];
|
||||||
$sub2['operation/incidents/incident']['text'] = __('List of Incidents');
|
$sub2['operation/incidents/incident']['text'] = __('List of Incidents');
|
||||||
$sub2[$sec2sub]['text'] = __('Statistics');
|
$sub2[$sec2sub]['text'] = __('Statistics');
|
||||||
$sub2['operation/incidents/configure_integriaims_incident']['text'] = __('Create Integria IMS Incident');
|
|
||||||
$sub2['operation/incidents/list_integriaims_incidents']['text'] = __('Integria IMS Incidents');
|
$sub2['operation/incidents/list_integriaims_incidents']['text'] = __('Integria IMS Incidents');
|
||||||
|
|
||||||
$sub[$sec2]['sub2'] = $sub2;
|
$sub[$sec2]['sub2'] = $sub2;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user