antigua_barbuda_28_1.cif 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <?php
  2. function antigua_barbuda_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' => 28,
  8. 'country_name' => 'Antigua and Barbuda',
  9. 'country_iso_code_2' => 'AG',
  10. 'country_iso_code_3' => 'ATG',
  11. 'version' => 1,
  12. ))
  13. ->execute();
  14. $zones = array(
  15. array(28, 'GE', 'St. George'),
  16. array(28, 'JO', 'St. John'),
  17. array(28, 'MA', 'St. Mary'),
  18. array(28, 'PA', 'St. Paul'),
  19. array(28, 'PE', 'St. Peter'),
  20. array(28, 'BB', 'Barbuda'),
  21. array(28, 'RD', 'Redonda'),
  22. array(28, 'PH', 'St. Philip'),
  23. );
  24. $query = db_insert('uc_zones')->fields(array('zone_country_id', 'zone_code', 'zone_name'));
  25. foreach ($zones as $zone) {
  26. $query->values($zone);
  27. }
  28. $query->execute();
  29. // Set address format
  30. uc_set_address_format(
  31. 28,
  32. "!company\r\n".
  33. "!first_name !last_name\r\n".
  34. "!street1\r\n".
  35. "!street2\r\n".
  36. "!city, !zone_code !postal_code\r\n".
  37. "!country_name_if"
  38. );
  39. }