gabon_266_1.cif 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <?php
  2. function gabon_install() {
  3. // Make the entry in the country table.
  4. // VALUES = Country ID, Country Name, 2-digit Code, 3-digit Code, File Version
  5. db_insert('uc_countries')
  6. ->fields(array(
  7. 'country_id' => 266,
  8. 'country_name' => 'Gabon',
  9. 'country_iso_code_2' => 'GA',
  10. 'country_iso_code_3' => 'GAB',
  11. 'version' => 1,
  12. ))
  13. ->execute();
  14. // Make the entries in the zones table.
  15. $zones = array(
  16. array(266, '1', 'Estuaire'),
  17. array(266, '2', 'Haut-Ogooue'),
  18. array(266, '3', 'Moyen-Ogooue'),
  19. array(266, '4', 'Ngounie'),
  20. array(266, '5', 'Nyanga'),
  21. array(266, '6', 'Ogooue-Ivindo'),
  22. array(266, '7', 'OgoouE-Lolo'),
  23. array(266, '8', 'Ogooue-Maritime'),
  24. array(266, '9', 'Woleu-Ntem'),
  25. );
  26. $query = db_insert('uc_zones')->fields(array('zone_country_id', 'zone_code', 'zone_name'));
  27. foreach ($zones as $zone) {
  28. $query->values($zone);
  29. }
  30. $query->execute();
  31. // Set address format
  32. uc_set_address_format(
  33. 266,
  34. "!company\r\n".
  35. "!first_name !last_name\r\n".
  36. "!street1\r\n".
  37. "!street2\r\n".
  38. "!city, !zone_name !postal_code\r\n".
  39. "!country_name_if"
  40. );
  41. }