db_select($query); $node[0]['node_mac'] = write_mac($node[0]['node_mac']); $smarty->assign("node", $node[0]); // nat $query = "SELECT asset_ext.asset_id AS asset_id_ext, asset_int.asset_id AS asset_id_int, asset_ext.asset_name AS asset_name_ext, asset_int.asset_name AS asset_name_int, nat.nat_id AS nat_id, nat.nat_type AS nat_type, nat.nat_ext AS nat_ext, nat.nat_int AS nat_int, node_ext.node_ip AS node_ip_ext, node_int.node_ip AS node_ip_int, node_int.node_id AS node_id_int, node_ext.node_id AS node_id_ext FROM asset AS asset_ext, asset AS asset_int, nat, node AS node_ext, node AS node_int WHERE (nat.nat_ext=" . $node_id . " OR nat.nat_int=" . $node_id . ") AND node_ext.node_id=nat.nat_ext AND node_int.node_id=nat.nat_int AND asset_ext.asset_id=node_ext.asset_id AND asset_int.asset_id=node_int.asset_id ORDER BY INET_ATON(node_ext.node_ip), INET_ATON(node_int.node_ip)"; $natrules = $db->db_select($query); $smarty->assign("natrules", $natrules); $smarty->display("nodeview.tpl"); include("footer.php"); ?>