'.html_print_image( 'images/visual_console.png', true, ['title' => __('Visual consoles list')] ).''; if ($aclWrite || $aclManage) { $url_base = 'index.php?sec=network&sec2=godmode/reporting/visual_console_builder&action='; $hash = md5($config['dbpass'].$visualConsoleId.$config['id_user']); $options['public_link']['text'] = ''.html_print_image( 'images/camera_mc.png', true, ['title' => __('Show link to public Visual Console')] ).''; $options['public_link']['active'] = false; $options['data']['text'] = ''.html_print_image( 'images/op_reporting.png', true, ['title' => __('Main data')] ).''; $options['list_elements']['text'] = ''.html_print_image( 'images/list.png', true, ['title' => __('List elements')] ).''; if (enterprise_installed()) { $options['wizard_services']['text'] = ''.html_print_image( 'images/wand_services.png', true, ['title' => __('Services wizard')] ).''; } $options['wizard']['text'] = ''.html_print_image( 'images/wand.png', true, ['title' => __('Wizard')] ).''; $options['editor']['text'] = ''.html_print_image( 'images/builder.png', true, ['title' => __('Builder')] ).''; } $options['view']['text'] = ''.html_print_image('images/operation.png', true, ['title' => __('View')]).''; $options['view']['active'] = true; if (!is_metaconsole()) { if (!$config['pure']) { $options['pure']['text'] = ''.html_print_image('images/full_screen.png', true, ['title' => __('Full screen mode')]).''; ui_print_page_header( $visualConsoleName, 'images/visual_console.png', false, '', false, $options ); } // Set the hidden value for the javascript. html_print_input_hidden('metaconsole', 0); } else { // Set the hidden value for the javascript. html_print_input_hidden('metaconsole', 1); } use Models\VisualConsole\Container as VisualConsole; // TODO: Show an error message when the models can't be loaded. $visualConsole = VisualConsole::fromArray($layout); $visualConsoleItems = VisualConsole::getItemsFromDB($visualConsoleId); // TODO: Extract to a function. $baseUrl = ui_get_full_url(false, false, false, false); $vcClientPath = 'include/visual-console-client'; $dir = $config['homedir'].'/'.$vcClientPath; if (is_dir($dir)) { $dh = opendir($dir); if ($dh) { while (($file = readdir($dh)) !== false) { if ($file === '.' || $file === '..') { continue; } preg_match('/.*.js$/', $file, $match, PREG_OFFSET_CAPTURE); if (empty($match) === false) { $url = $baseUrl.$vcClientPath.'/'.$match[0][0]; echo ''; continue; } preg_match('/.*.css$/', $file, $match, PREG_OFFSET_CAPTURE); if (empty($match) === false) { $url = $baseUrl.$vcClientPath.'/'.$match[0][0]; echo ''; } } closedir($dh); } } echo '
'; if ($pure === true) { // Floating menu - Start. echo '