anguilla_660_1.cif 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <?php
  2. function anguilla_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' => 660,
  8. 'country_name' => 'Anguilla',
  9. 'country_iso_code_2' => 'AI',
  10. 'country_iso_code_3' => 'AIA',
  11. 'version' => 1,
  12. ))
  13. ->execute();
  14. // Make the entries in the zones table.
  15. $zones = array(
  16. array(660, 'BP', 'Blowing Point'),
  17. array(660, 'EE', 'East End'),
  18. array(660, 'GH', 'George Hill'),
  19. array(660, 'IH', 'Island Harbour'),
  20. array(660, 'NH', 'North Hill'),
  21. array(660, 'NS', 'North Side'),
  22. array(660, 'SG', 'Sandy Ground'),
  23. array(660, 'SH', 'Sandy Hill'),
  24. array(660, 'SO', 'South Hill'),
  25. array(660, 'ST', 'Stoney Ground'),
  26. array(660, 'TF', 'The Farrington'),
  27. array(660, 'TQ', 'The Quarter (including Rey Hill)'),
  28. array(660, 'TV', 'The Valley (including Upper & South Valley)'),
  29. array(660, 'WE', 'West End (including Long Bay)'),
  30. );
  31. $query = db_insert('uc_zones')->fields(array('zone_country_id', 'zone_code', 'zone_name'));
  32. foreach ($zones as $zone) {
  33. $query->values($zone);
  34. }
  35. $query->execute();
  36. // Set address format
  37. uc_set_address_format(
  38. 660,
  39. "!company\r\n".
  40. "!first_name !last_name\r\n".
  41. "!street1\r\n".
  42. "!street2\r\n".
  43. "!city, !zone_code !postal_code\r\n".
  44. "!country_name_if"
  45. );
  46. }