'."\n"; echo ''."\n"; echo ''; global $vc_public_view; global $config; $vc_public_view = true; $config['public_view'] = true; // This starts the page head. In the call back function, // things from $page['head'] array will be processed into the head. ob_start('ui_process_page_head'); // Enterprise main. enterprise_include('index.php'); $url_css = ui_get_full_url('include/styles/visual_maps.css', false, false, false); echo ''; require_once 'include/functions_visual_map.php'; $hash = (string) get_parameter('hash'); $visualConsoleId = (int) get_parameter('id_layout'); $config['id_user'] = (string) get_parameter('id_user'); $refr = (int) get_parameter('refr', $config['refr']); if (!isset($config['pure'])) { $config['pure'] = 0; } // Check input hash. if (User::validatePublicHash($hash) !== true) { db_pandora_audit( 'Invalid public visual console', 'Trying to access public visual console' ); include 'general/noaccess.php'; exit; } // Load Visual Console. use Models\VisualConsole\Container as VisualConsole; $visualConsole = null; try { $visualConsole = VisualConsole::fromDB(['id' => $visualConsoleId]); } catch (Throwable $e) { db_pandora_audit( AUDIT_LOG_ACL_VIOLATION, 'Trying to access visual console without Id' ); include $config['homedir'].'/general/noaccess.php'; exit; } $visualConsoleData = $visualConsole->toArray(); $visualConsoleName = $visualConsoleData['name']; $bg_color = ''; if ($config['style'] === 'pandora_black') { $bg_color = 'style="background-color: #222"'; } echo '
'; // Floating menu - Start. echo '
'; echo ''; echo '
'; // QR code dialog. echo ''; // Check groups can access user. $aclUserGroups = []; if (!users_can_manage_group_all('AR')) { $aclUserGroups = array_keys(users_get_groups(false, 'AR')); } $ignored_params['refr'] = ''; ui_require_javascript_file('pandora_visual_console', 'include/javascript/', true); include_javascript_d3(); visual_map_load_client_resources(); // Load Visual Console Items. $visualConsoleItems = VisualConsole::getItemsFromDB( $visualConsoleId, $aclUserGroups ); ?>