$map) { if (!check_acl ($config["id_user"], $map["id_group"], "AR")) { unset($maps[$key]); } else { $maps_id[] = $map['id']; } } if(!$maps_id) { $maps_condition = ""; } else { // Condition with the visible agents $maps_condition = " AND id IN (\"".implode('","',$maps_id)."\")"; } $sql = "SELECT COUNT(id) AS count FROM tlayout WHERE name LIKE '%" . $stringSearchSQL . "%'".$maps_condition; $totalMaps = db_get_row_sql($sql); $totalMaps = $totalMaps['count']; } } if ($maps === false) { echo "
" . __("Zero results found") . "
\n"; } else { $table->cellpadding = 4; $table->cellspacing = 4; $table->width = "98%"; $table->class = "databox"; $table->head = array (); $table->head[0] = __('Name'); $table->head[1] = __('Group'); $table->head[2] = __('Elements'); $table->align = array (); $table->align[1] = "center"; $table->align[2] = "center"; $table->data = array (); foreach ($maps as $map) { array_push($table->data, array( "" . $map['name'] . "", ui_print_group_icon ($map["id_group"], true), $map['count'] )); } echo "
";ui_pagination ($totalMaps); html_print_table ($table); unset($table); ui_pagination ($totalMaps); } ?>