geo_data_admin_submit

geo/modules/geo_data/geo_data.admin.inc, line 83

Versions
6
geo_data_admin_submit($form, &$form_state)

Code

<?php
function geo_data_admin_submit($form, &$form_state) {
  if (isset($_FILES['files']['name']['import'])) {
    module_load_include('inc', 'geo', 'includes/shp2sql');
    $file = $_FILES['files']['tmp_name']['import']; 
    $table_name = 'geo_data_'. $form_state['values']['import']['table_name'];
    $create = 'geo_data_'. $form_state['values']['import']['table_name'];
    $srid = $form_state['values']['import']['srid'];
    geo_shp2sql($file, $table_name, $create, $srid);
  }
/*
  $views_fields = _views_get_fields();
  
  foreach ($values['tables'] as $table => $fields) {
    foreach ($fields as $col => $data) {
      if ($link_field = $views_fields[$data['view_field']]) {
        // get the "column" we will join on and the table where that column exists.
        $link_column = substr($data['view_field'], strpos($data['view_field'], '.') + 1);
        $link_table = $link_field['table'];
        $additional_columns = array();
        // now we iterate through this table again, to find all the "exposed" fields
        foreach ($fields as $ecol => $edata) {
          if ($edata['exposed']) {
            $additional_columns[$ecol] = array(
              'label' => $edata['desc'],
              'type' => $edata['type_hidden'],
            );
          }
        }
      }
    } 
  }
*/
}
?>