Added head search in acl enterprise

This commit is contained in:
danielmaya 2018-09-24 10:25:10 +02:00
parent 010207e6ad
commit 329622d53c
1 changed files with 38 additions and 27 deletions

View File

@ -72,7 +72,17 @@ config_check();
$table->width = "100%";
$table->styleTable = 'margin: auto; margin-top: 0px;';
$table->rowclass[0] = '';
$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')");
}
if ($acl_head_search) {
$table->data[0][11] = ui_print_help_tip (__("Blank characters are used as AND conditions"), true);
// Search bar
$search_bar = '<form method="get" style="display: inline;" name="quicksearch" action="">';
if (!isset($config['search_keywords'])) {
@ -103,6 +113,7 @@ config_check();
$search_bar .= '</form>';
$table->data[0]['searchbar'] = $search_bar;
}
// Servers check
$servers = array();