b2evolution PHP Cross Reference Blogging Systems

Source: /inc/regional/views/_city_import.form.php - 61 lines - 2755 bytes - Text - Print

Description: This file is part of the evoCore framework - {@link http://evocore.net/} See also {@link http://sourceforge.net/projects/evocms/}.

   1  <?php
   2  /**

   3   * This file is part of the evoCore framework - {@link http://evocore.net/}

   4   * See also {@link http://sourceforge.net/projects/evocms/}.

   5   *

   6   * @copyright (c)2009-2014 by Francois PLANQUE - {@link http://fplanque.net/}

   7   * Parts of this file are copyright (c)2009 by The Evo Factory - {@link http://www.evofactory.com/}.

   8   *

   9   * {@internal License choice

  10   * - If you have received this file as part of a package, please find the license.txt file in

  11   *   the same folder or the closest folder above for complete license terms.

  12   * - If you have received this file individually (e-g: from http://evocms.cvs.sourceforge.net/)

  13   *   then you must choose one of the following licenses before using the file:

  14   *   - GNU General Public License 2 (GPL) - http://www.opensource.org/licenses/gpl-license.php

  15   *   - Mozilla Public License 1.1 (MPL) - http://www.opensource.org/licenses/mozilla1.1.php

  16   * }}

  17   *

  18   * {@internal Open Source relicensing agreement:

  19   * The Evo Factory grants Francois PLANQUE the right to license

  20   * The Evo Factory's contributions to this file and the b2evolution project

  21   * under any OSI approved OSS license (http://www.opensource.org/licenses/).

  22   * }}

  23   *

  24   * @package evocore

  25   *

  26   * {@internal Below is a list of authors who have contributed to design/coding of this file: }}

  27   * @author efy-maxim: Evo Factory / Maxim.

  28   * @author fplanque: Francois Planque.

  29   *

  30   * @version $Id: _city_import.form.php 9 2011-10-24 22:32:00Z fplanque $

  31   */
  32  
  33  if( !defined('EVO_MAIN_INIT') ) die( 'Please, do not access this page directly.' );
  34  
  35  load_class( 'regional/model/_country.class.php', 'Country' );
  36  
  37  $Form = new Form( NULL, 'city_checkchanges', 'post', 'compact', 'multipart/form-data' );
  38  
  39  $Form->global_icon( T_('Cancel importing!'), 'close', regenerate_url( 'action' ) );
  40  
  41  $Form->begin_form( 'fform', T_('Import cities') );
  42  
  43      echo T_('Select a country and upload a CSV file with the following columns:');
  44      echo '<div style="padding:10px 0 10px 40px">';
  45      echo T_('1. Postcode').'<br />';
  46      echo T_('2. City name').'<br />';
  47      echo T_('3. Optional: sub region code');
  48      echo '</div>';
  49  
  50      $Form->add_crumb( 'city' );
  51      $Form->hiddens_by_key( get_memorized( 'action' ) ); // (this allows to come back to the right list order & page)

  52  
  53      $CountryCache = & get_CountryCache();
  54      $Form->select_country( 'ctry_ID', get_param( 'ctry_ID' ), $CountryCache, T_('Country'), array( 'allow_none' => true, 'required' => true ) );
  55  
  56      $Form->input_field( array( 'label' => T_('CSV File'), 'name' => 'csv', 'type' => 'file', 'required' => true ) );
  57  
  58  $Form->end_form( array( array( 'submit', 'actionArray[import]', T_('Import'), 'SaveButton' ),
  59                                                  array( 'reset', '', T_('Reset'), 'ResetButton' ) ) );
  60  
  61  ?>

title

Description

title

Description

title

Description

title

title

Body