0), array('default_map' => 1)); // Set default the new default map $returnOperationDB = db_process_sql_update('tgis_map', array('default_map' => 1), array('id_tgis_map' => $id_map)); if ($returnOperationDB === false) $data['correct'] = false; else $data['correct'] = true; echo json_encode($data); return; } $action = get_parameter('action'); $own_info = get_user_info($config['id_user']); if ($own_info['is_admin'] || check_acl ($config['id_user'], 0, "PM")) $display_default_column = true; else $display_default_column = false; switch ($action) { case 'delete_map': $idMap = get_parameter('map_id'); gis_delete_map($idMap); break; } ui_print_page_header (__('GIS Maps builder'), "images/server_web.png", false, "gis_map_builder", true); $table->width = '98%'; $table->head[0] = __('Map name'); $table->head[1] = __('Group'); $table->head[2] = __('View'); if ($display_default_column) $table->head[3] = __('Default'); $table->head[4] = '' . __('Op.') . ''; $table->align[1] = 'center'; $table->align[2] = 'center'; $table->align[3] = 'center'; $table->align[4] = 'center'; $table->size = array(); $table->size[4] = '60px'; $maps = db_get_all_rows_in_table ('tgis_map','map_name'); $table->data = array(); $defaultMapId = null; if (!$maps) { echo '