home | career | drupal | java | mac | mysql | perl | php | scala | uml | unix

Drupal example source code file (france_250_1.cif)

This example Drupal source code file (france_250_1.cif) is included in the DevDaily.com "Drupal Source Code Warehouse" project. The intent of this project is to help you "Learn Drupal by Example".

PHP - Drupal tags/keywords

and, array, foreach, function, into, me, ne, php, pyr, re, zone

The france_250_1.cif Drupal example source code

<?php
// $Id: france_250_1.cif,v 1.5.2.4 2010/04/14 05:18:19 tr Exp $

function france_install() {
  db_query("INSERT INTO {uc_countries} (country_id, country_name, country_iso_code_2, country_iso_code_3, version) VALUES ('250', 'France', 'FR', 'FRA', 1)");

  // Make the entries in the zones table.
  $zones = array(
    array(250, 'FR-01', 'Ain'),
    array(250, 'FR-02', 'Aisne'),
    array(250, 'FR-03', 'Allier'),
    array(250, 'FR-04', 'Alpes-de-Haute-Provence'),
    array(250, 'FR-05', 'Hautes-Alpes'),
    array(250, 'FR-06', 'Alpes-Maritimes'),
    array(250, 'FR-07', 'Ardèche'),
    array(250, 'FR-08', 'Ardennes'),
    array(250, 'FR-09', 'Ariège'),
    array(250, 'FR-10', 'Aube'),
    array(250, 'FR-11', 'Aude'),
    array(250, 'FR-12', 'Aveyron'),
    array(250, 'FR-13', 'Bouches-du-Rhône'),
    array(250, 'FR-14', 'Calvados'),
    array(250, 'FR-15', 'Cantal'),
    array(250, 'FR-16', 'Charente'),
    array(250, 'FR-17', 'Charente-Maritime'),
    array(250, 'FR-18', 'Cher'),
    array(250, 'FR-19', 'Corrèze'),
    array(250, 'FR-21', 'Côte-d\'Or'),
    array(250, 'FR-22', 'Côtes-d\'Armor'),
    array(250, 'FR-23', 'Creuse'),
    array(250, 'FR-24', 'Dordogne'),
    array(250, 'FR-25', 'Doubs'),
    array(250, 'FR-26', 'Drôme'),
    array(250, 'FR-27', 'Eure'),
    array(250, 'FR-28', 'Eure-et-Loir'),
    array(250, 'FR-29', 'Finistère'),
    array(250, 'FR-2A', 'Corse-du-Sud'),
    array(250, 'FR-2B', 'Haute-Corse'),
    array(250, 'FR-30', 'Gard'),
    array(250, 'FR-31', 'Haute-Garonne'),
    array(250, 'FR-32', 'Gers'),
    array(250, 'FR-33', 'Gironde'),
    array(250, 'FR-34', 'Hérault'),
    array(250, 'FR-35', 'Ille-et-Vilaine'),
    array(250, 'FR-36', 'Indre'),
    array(250, 'FR-37', 'Indre-et-Loire'),
    array(250, 'FR-38', 'Isère'),
    array(250, 'FR-39', 'Jura'),
    array(250, 'FR-40', 'Landes'),
    array(250, 'FR-41', 'Loir-et-Cher'),
    array(250, 'FR-42', 'Loire'),
    array(250, 'FR-43', 'Haute-Loire'),
    array(250, 'FR-44', 'Loire-Atlantique'),
    array(250, 'FR-45', 'Loiret'),
    array(250, 'FR-46', 'Lot'),
    array(250, 'FR-47', 'Lot-et-Garonne'),
    array(250, 'FR-48', 'Lozère'),
    array(250, 'FR-49', 'Maine-et-Loire'),
    array(250, 'FR-50', 'Manche'),
    array(250, 'FR-51', 'Marne'),
    array(250, 'FR-52', 'Haute-Marne'),
    array(250, 'FR-53', 'Mayenne'),
    array(250, 'FR-54', 'Meurthe-et-Moselle'),
    array(250, 'FR-55', 'Meuse'),
    array(250, 'FR-56', 'Morbihan'),
    array(250, 'FR-57', 'Moselle'),
    array(250, 'FR-58', 'Nièvre'),
    array(250, 'FR-59', 'Nord'),
    array(250, 'FR-60', 'Oise'),
    array(250, 'FR-61', 'Orne'),
    array(250, 'FR-62', 'Pas-de-Calais'),
    array(250, 'FR-63', 'Puy-de-Dôme'),
    array(250, 'FR-64', 'Pyrénées-Atlantiques'),
    array(250, 'FR-65', 'Hautes-Pyrénées'),
    array(250, 'FR-66', 'Pyrénées-Orientales'),
    array(250, 'FR-67', 'Bas-Rhin'),
    array(250, 'FR-68', 'Haut-Rhin'),
    array(250, 'FR-69', 'Rhône'),
    array(250, 'FR-70', 'Haute-Saône'),
    array(250, 'FR-71', 'Saône-et-Loire'),
    array(250, 'FR-72', 'Sarthe'),
    array(250, 'FR-73', 'Savoie'),
    array(250, 'FR-74', 'Haute-Savoie'),
    array(250, 'FR-75', 'Paris'),
    array(250, 'FR-76', 'Seine-Maritime'),
    array(250, 'FR-77', 'Seine-et-Marne'),
    array(250, 'FR-78', 'Yvelines'),
    array(250, 'FR-79', 'Deux-Sèvres'),
    array(250, 'FR-80', 'Somme'),
    array(250, 'FR-81', 'Tarn'),
    array(250, 'FR-82', 'Tarn-et-Garonne'),
    array(250, 'FR-83', 'Var'),
    array(250, 'FR-84', 'Vaucluse'),
    array(250, 'FR-85', 'Vendée'),
    array(250, 'FR-86', 'Vienne'),
    array(250, 'FR-87', 'Haute-Vienne'),
    array(250, 'FR-88', 'Vosges'),
    array(250, 'FR-89', 'Yonne'),
    array(250, 'FR-90', 'Territoire de Belfort'),
    array(250, 'FR-91', 'Essonne'),
    array(250, 'FR-92', 'Hauts-de-Seine'),
    array(250, 'FR-93', 'Seine-Saint-Denis'),
    array(250, 'FR-94', 'Val-de-Marne'),
    array(250, 'FR-95', 'Val-d\'Oise'),
    array(250, 'FR-NC', 'New Caledonia'),
    array(250, 'FR-PF', 'French Polynesia'),
    array(250, 'FR-PM', 'Saint-Pierre and Miquelon'),
    array(250, 'FR-TF', 'French Southern Territories'),
    array(250, 'FR-YT', 'Mayotte'),
    array(250, 'FR-WF', 'Wallis and Futuna'),
  );

  foreach ($zones as $zone) {
    db_query("INSERT INTO {uc_zones} (zone_country_id, zone_code, zone_name) VALUES (%d, '%s', '%s')", $zone);
  }

  uc_set_address_format(250, "!company\n!first_name !last_name\n!street1\n!street2\n!postal_code !city\n!country_name_if");
}

Other Drupal examples (source code examples)

Here is a short list of links related to this Drupal france_250_1.cif source code file:

new blog posts

"Drupal" is a registered trademark of Dries Buytaert.

my drupal tutorials and examples  

Copyright 1998-2016 Alvin Alexander, alvinalexander.com
All Rights Reserved.

Beginning in 2016, a portion of the proceeds from pages under the '/drupal-code-examples/' URI will be donated to charity.