static function get_all_server_search_json() { $arr_server_objs = server_actions::get_all_server(); foreach ($arr_server_objs as $server) { $data[$server->server_id]['info_string'] = $server->hostname; } return json_encode($data); }
<?php #error_reporting(E_ALL); ini_set('display_errors', '1'); include "./includes/templates/header.php"; include "./includes/templates/top_header.php"; include_once "./includes/classes/class_server.php"; include_once "./includes/classes/class_server_actions.php"; include_once "./includes/classes/class_instance.php"; include_once "./includes/classes/class_instance_actions.php"; include_once "./includes/classes/class_parameter.php"; include_once "./includes/classes/class_parameter_actions.php"; # Generating instance objects $arr_server_objs = server_actions::get_all_server(); ?> <script type="text/javascript"> var instance_search_objs = <?php echo server_actions::get_all_server_search_json(); ?> ; </script> <div id="bottom-header"> <div class="container clearfix"> <h1 id="bh_h1">FRA monitor</h1> <div id="target_menu_div"> <ul id="target_menu"> </ul> </div> <input onkeyup="instant_search_instances(this.value);" class="prod_db_search" type="text" placeholder="Search all databases ..."> </div> <div style="clear: both;"></div> </div>