palau_585_1.cif 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. <?php
  2. function palau_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' => 585,
  8. 'country_name' => 'Palau',
  9. 'country_iso_code_2' => 'PW',
  10. 'country_iso_code_3' => 'PLW',
  11. 'version' => 1,
  12. ))
  13. ->execute();
  14. // Make the entries in the zones table.
  15. $zones = array(
  16. array(585, 'PW-002', 'Aimeliik'),
  17. array(585, 'PW-004', 'Airai'),
  18. array(585, 'PW-010', 'Angaur'),
  19. array(585, 'PW-050', 'Hatobohei'),
  20. array(585, 'PW-100', 'Kayangel'),
  21. array(585, 'PW-150', 'Koror'),
  22. array(585, 'PW-212', 'Melekeok'),
  23. array(585, 'PW-214', 'Ngaraard'),
  24. array(585, 'PW-218', 'Ngarchelong'),
  25. array(585, 'PW-222', 'Ngardmau'),
  26. array(585, 'PW-224', 'Ngatpang'),
  27. array(585, 'PW-226', 'Ngchesar'),
  28. array(585, 'PW-227', 'Ngeremlengui'),
  29. array(585, 'PW-228', 'Ngiwal'),
  30. array(585, 'PW-350', 'Peleliu'),
  31. array(585, 'PW-370', 'Sonsorol'),
  32. );
  33. $query = db_insert('uc_zones')->fields(array('zone_country_id', 'zone_code', 'zone_name'));
  34. foreach ($zones as $zone) {
  35. $query->values($zone);
  36. }
  37. $query->execute();
  38. // Set address format
  39. uc_set_address_format(
  40. 585,
  41. "!company\r\n".
  42. "!first_name !last_name\r\n".
  43. "!street1\r\n".
  44. "!street2\r\n".
  45. "!city, !zone_name !postal_code\r\n".
  46. "!country_name_if"
  47. );
  48. }