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

function nigeria_install() {
  db_query("INSERT INTO {uc_countries} (country_id, country_name, country_iso_code_2, country_iso_code_3, version) VALUES ('566', 'Nigeria', 'NG', 'NGA', 1)");

  // Make the entries in the zones table.
  $zones = array(
    array(566, 'AB', 'Abia'),
    array(566, 'AD', 'Adamawa'),
    array(566, 'AK', 'Akwa Ibom'),
    array(566, 'AN', 'Anambra'),
    array(566, 'BA', 'Bauchi'),
    array(566, 'BY', 'Bayelsa'),
    array(566, 'BN', 'Benue'),
    array(566, 'BO', 'Borno'),
    array(566, 'CR', 'Cross River'),
    array(566, 'DT', 'Delta'),
    array(566, 'EB', 'Ebonyi'),
    array(566, 'ED', 'Edo'),
    array(566, 'EK', 'Ekiti'),
    array(566, 'EN', 'Enugu'),
    array(566, 'FC', 'FCT - Abuja'),
    array(566, 'GB', 'Gombe'),
    array(566, 'IM', 'Imo'),
    array(566, 'JG', 'Jigawa'),
    array(566, 'KD', 'Kaduna'),
    array(566, 'KN', 'Kano'),
    array(566, 'KT', 'Katsina'),
    array(566, 'KB', 'Kebbi'),
    array(566, 'KG', 'Kogi'),
    array(566, 'KW', 'Kwara'),
    array(566, 'LA', 'Lagos'),
    array(566, 'NS', 'Nassarawa'),
    array(566, 'NG', 'Niger'),
    array(566, 'OG', 'Ogun'),
    array(566, 'ON', 'Ondo'),
    array(566, 'OS', 'Osun'),
    array(566, 'OY', 'Oyo'),
    array(566, 'PL', 'Plateau'),
    array(566, 'RV', 'Rivers'),
    array(566, 'SO', 'Sokoto'),
    array(566, 'TB', 'Taraba'),
    array(566, 'YB', 'Yobe'),
    array(566, 'ZM', 'Zamfara'),
  );

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

   variable_set('uc_address_format_566',
    "!company\r\n!first_name !last_name\r\n!street1\r\n!street2"
   ."\r\n!city - !postal_code\r\n!zone_code\r\n!country_name_if");
}
