guinea_bissau_624_1.cif 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <?php
  2. function guinea_bissau_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' => 624,
  8. 'country_name' => 'Guinea-Bissau',
  9. 'country_iso_code_2' => 'GW',
  10. 'country_iso_code_3' => 'GNB',
  11. 'version' => 1,
  12. ))
  13. ->execute();
  14. // Make the entries in the zones table.
  15. $zones = array(
  16. array(624, 'GW-BS', 'Bissau'),
  17. array(624, 'GW-BA', 'Bafatá'),
  18. array(624, 'GW-BM', 'Biombo'),
  19. array(624, 'GW-BL', 'Bolama'),
  20. array(624, 'GW-CA', 'Cacheu'),
  21. array(624, 'GW-GA', 'Gabú'),
  22. array(624, 'GW-OI', 'Oio'),
  23. array(624, 'GW-QU', 'Quinara'),
  24. array(624, 'GW-TO', 'Tombali'),
  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. 624,
  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. }