guyana_328_1.cif 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <?php
  2. function guyana_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' => 328,
  8. 'country_name' => 'Guyana',
  9. 'country_iso_code_2' => 'GY',
  10. 'country_iso_code_3' => 'GUY',
  11. 'version' => 1,
  12. ))
  13. ->execute();
  14. // Make the entries in the zones table.
  15. $zones = array(
  16. array(328, 'GY-BA', 'Barima-Waini'),
  17. array(328, 'GY-CU', 'Cuyuni-Mazaruni'),
  18. array(328, 'GY-DE', 'Demerara-Mahaica'),
  19. array(328, 'GY-EB', 'East Berbice-Corentyne'),
  20. array(328, 'GY-ES', 'Essequibo Islands-West Demerara'),
  21. array(328, 'GY-MA', 'Mahaica-Berbice'),
  22. array(328, 'GY-PM', 'Pomeroon-Supenaam'),
  23. array(328, 'GY-PT', 'Potaro-Siparuni'),
  24. array(328, 'GY-UD', 'Upper Demerara-Berbice'),
  25. array(328, 'GY-UT', 'Upper Takutu-Upper Essequibo'),
  26. );
  27. $query = db_insert('uc_zones')->fields(array('zone_country_id', 'zone_code', 'zone_name'));
  28. foreach ($zones as $zone) {
  29. $query->values($zone);
  30. }
  31. $query->execute();
  32. // Set address format
  33. uc_set_address_format(
  34. 328,
  35. "!company\r\n".
  36. "!first_name !last_name\r\n".
  37. "!street1\r\n".
  38. "!street2\r\n".
  39. "!city, !zone_name !postal_code\r\n".
  40. "!country_name_if"
  41. );
  42. }