* @file * Display network map. * @package net.rackmap.admin * @author Nicola Asuni * @since 2011-11-24 */ /** */ require_once '../config/tce_config.php'; $pagelevel = K_AUTH_VIEW_NETWORK_MAP; require_once '../../shared/code/tce_authorization.php'; require_once 'tce_functions_netgraph.php'; require_once 'tce_functions_objects.php'; $thispage_title = $l['t_view_network_map']; require_once 'tce_page_header.php'; //$user_id = intval($_SESSION['session_user_id']); //$userip = $_SESSION['session_user_ip']; $userlevel = intval($_SESSION['session_user_level']); if (isset($_REQUEST['cbt_id'])) { $cbt_id = intval($_REQUEST['cbt_id']); } else { $cbt_id = 0; } echo '<form action="' . $_SERVER['SCRIPT_NAME'] . '" method="post" enctype="multipart/form-data" id="form_editor">' . K_NEWLINE; echo F_select_connection_type($cbt_id, false, true); echo '</form>' . K_NEWLINE; echo F_get_network_svg_map($cbt_id); require_once 'tce_page_footer.php'; //============================================================+ // END OF FILE //============================================================+
/** * Get a link to open SVG network map on a separate borowser window. * @return string HTML code. */ function F_get_network_map_iframe() { global $l, $db; require_once '../config/tce_config.php'; $svg = F_get_network_svg_map(); if ($svg === false) { return ''; } $jsaction = 'selectWindow=window.open(\'' . K_PATH_URL_CACHE . $svg . '\', \'networkMap\', \'dependent, height=600, width=800, menubar=no, resizable=yes, scrollbars=yes, status=no, toolbar=no\');return false;'; $ret = '<iframe src="' . K_PATH_URL_CACHE . $svg . '" width="100%" height="800px">' . K_NEWLINE; $ret .= '<a href="' . K_PATH_URL_CACHE . $svg . '" onclick="' . $jsaction . '" title="' . $l['w_network_map'] . '">' . $l['w_network_map'] . '</a>' . K_NEWLINE; $ret .= '</iframe>' . K_NEWLINE; return $ret; }