diff --git a/pandora_console/general/header.php b/pandora_console/general/header.php index ac18da48d1..c26bed8762 100644 --- a/pandora_console/general/header.php +++ b/pandora_console/general/header.php @@ -72,38 +72,49 @@ config_check(); $table->width = "100%"; $table->styleTable = 'margin: auto; margin-top: 0px;'; $table->rowclass[0] = ''; - $table->data[0][11] = ui_print_help_tip (__("Blank characters are used as AND conditions"), true); - // Search bar - $search_bar = '
'; - if (!isset($config['search_keywords'])) { - $search_bar .= ''; + + $acl_head_search = true; + if ($config["acl_enterprise"] == 1 && !users_is_admin()) { + $acl_head_search = db_get_sql("SELECT sec FROM tusuario + INNER JOIN tusuario_perfil ON tusuario.id_user = tusuario_perfil.id_usuario + INNER JOIN tprofile_view ON tprofile_view.id_profile = tusuario_perfil.id_perfil + WHERE tusuario.id_user = '".$config['id_user']."' AND (sec = '*' OR sec = 'head_search')"); } - else { - if (strlen($config['search_keywords']) == 0) + if ($acl_head_search) { + $table->data[0][11] = ui_print_help_tip (__("Blank characters are used as AND conditions"), true); + + // Search bar + $search_bar = ''; + if (!isset($config['search_keywords'])) { $search_bar .= ''; + } + else { + if (strlen($config['search_keywords']) == 0) + $search_bar .= ''; + else + $search_bar .= ''; + } + + $search_bar .= ''; + + //$search_bar .= 'onClick="javascript: document.quicksearch.submit()"'; + + $search_bar .= ""; + $search_bar .= '
'; + + $table->data[0]['searchbar'] = $search_bar; } - $search_bar .= ''; - - //$search_bar .= 'onClick="javascript: document.quicksearch.submit()"'; - - $search_bar .= ""; - $search_bar .= ''; - - $table->data[0]['searchbar'] = $search_bar; - // Servers check $servers = array(); $servers["all"] = (int) db_get_value ('COUNT(id_server)','tserver');