$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_value_sql($sql); if($only_count) { unset($maps); } } else { $totalMaps = 0; } } ?>