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'); switch ($action) { case 'delete_map': $idMap = get_parameter('map_id'); deleteMap($idMap); break; } print_page_header (__('GIS Maps builder'), "images/server_web.png", false, "gis_map_builder", true); $table->width = '500px'; $table->head[0] = __('Map name'); $table->head[1] = __('Group'); $table->head[2] = __('View'); $table->head[3] = __('Default'); $table->head[4] = __('Delete'); $table->align[1] = 'center'; $table->align[2] = 'center'; $table->align[3] = 'center'; $table->align[4] = 'center'; $maps = get_db_all_rows_in_table ('tgis_map','map_name'); $table->data = array(); $defaultMapId = null; if ($maps !== false) { foreach ($maps as $map) { $checked = false; if ($map['default_map']) { $checked = true; $defaultMapId = $map['id_tgis_map']; } $table->data[] = array('' . $map['map_name'] . '', print_group_icon ($map['group_id'], true), '' . print_image ("images/eye.png", true).'', print_radio_button_extended('default_map', $map['id_tgis_map'], '', $checked, false, "setDefault(" . $map['id_tgis_map'] . ");", '', true), '' . print_image ("images/cross.png", true).''); } } print_table($table); echo '
'; echo '
'; print_input_hidden ('action','new_map'); print_submit_button (__('Create'), '', false, 'class="sub next"'); echo '
'; echo '
'; ?>