<?php
// $Id: tunisia_788_1.cif,v 1.1.2.3 2010/04/14 05:18:19 tr Exp $ 1.0.0

/**
 * First implement hook_install() using the name of the country as the base of
 * the function name.
 */
function tunisia_install() {
  db_query("INSERT INTO {uc_countries} (country_id, country_name, country_iso_code_2, country_iso_code_3, version) VALUES (788, 'Tunisia', 'TN', 'TUN', 1)");

  // Make the entries in the zones table.
  $zones = array(
    array(788, '31', 'Beja'),
    array(788, '13', 'Ben Arous'),
    array(788, '23', 'Bizerte'),
    array(788, '81', 'Gabes'),
    array(788, '71', 'Gafsa'),
    array(788, '32', 'Jendouba'),
    array(788, '41', 'Kairouan'),
    array(788, '42', 'Kasserine'),
    array(788, '73', 'Kebili'),
    array(788, '14', 'La Manouba'),
    array(788, '12', "L'Ariana"),
    array(788, '33', 'Le Kef'),
    array(788, '53', 'Mahdia'),
    array(788, '82', 'Medenine'),
    array(788, '52', 'Monastir'),
    array(788, '21', 'Nabeul'),
    array(788, '61', 'Sfax'),
    array(788, '43', 'Sidi Bouzid'),
    array(788, '34', 'Siliana'),
    array(788, '51', 'Sousse'),
    array(788, '83', 'Tataouine'),
    array(788, '72', 'Tozeur'),
    array(788, '11', 'Tunis'),
    array(788, '22', 'Zaghouan'),
  );

  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(788,
    "!company\r\n!first_name !last_name\r\n!street1\r\n!street2"
   ."\r\n!city !zone_code !postal_code\r\n!country_name_if");
}
