liberia_430_1.cif 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. <?php
  2. function liberia_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' => 430,
  8. 'country_name' => 'Liberia',
  9. 'country_iso_code_2' => 'LR',
  10. 'country_iso_code_3' => 'LBR',
  11. 'version' => 1,
  12. ))
  13. ->execute();
  14. // Make the entries in the zones table.
  15. $zones = array(
  16. array(430, 'LR-BM', 'Bomi'),
  17. array(430, 'LR-BG', 'Bong'),
  18. array(430, 'LR-GP', 'Gbarpolu'),
  19. array(430, 'LR-GB', 'Grand Bassa'),
  20. array(430, 'LR-CM', 'Grand Cape Mount'),
  21. array(430, 'LR-GG', 'Grand Gedeh'),
  22. array(430, 'LR-GK', 'Grand Kru'),
  23. array(430, 'LR-LO', 'Lofa'),
  24. array(430, 'LR-MG', 'Margibi'),
  25. array(430, 'LR-MY', 'Maryland'),
  26. array(430, 'LR-MO', 'Montserrado'),
  27. array(430, 'LR-NI', 'Nimba'),
  28. array(430, 'LR-RI', 'Rivercess'),
  29. array(430, 'LR-RG', 'RiverGee'),
  30. array(430, 'LR-SI', 'Sinoe'),
  31. );
  32. $query = db_insert('uc_zones')->fields(array('zone_country_id', 'zone_code', 'zone_name'));
  33. foreach ($zones as $zone) {
  34. $query->values($zone);
  35. }
  36. $query->execute();
  37. // Set address format
  38. uc_set_address_format(
  39. 430,
  40. "!company\r\n".
  41. "!first_name !last_name\r\n".
  42. "!street1\r\n".
  43. "!street2\r\n".
  44. "!city, !zone_name !postal_code\r\n".
  45. "!country_name_if"
  46. );
  47. }