liechtenstein_438_1.cif 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <?php
  2. function liechtenstein_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' => 438,
  8. 'country_name' => 'Liechtenstein',
  9. 'country_iso_code_2' => 'LI',
  10. 'country_iso_code_3' => 'LIE',
  11. 'version' => 1,
  12. ))
  13. ->execute();
  14. // Make the entries in the zones table.
  15. $zones = array(
  16. array(438, 'LI-01', 'Balzers'),
  17. array(438, 'LI-02', 'Eschen'),
  18. array(438, 'LI-03', 'Gamprin'),
  19. array(438, 'LI-04', 'Mauren'),
  20. array(438, 'LI-05', 'Planken'),
  21. array(438, 'LI-06', 'Ruggell'),
  22. array(438, 'LI-07', 'Schaan'),
  23. array(438, 'LI-08', 'Schellenberg'),
  24. array(438, 'LI-09', 'Triesen'),
  25. array(438, 'LI-10', 'Triesenberg'),
  26. array(438, 'LI-11', 'Vaduz'),
  27. );
  28. $query = db_insert('uc_zones')->fields(array('zone_country_id', 'zone_code', 'zone_name'));
  29. foreach ($zones as $zone) {
  30. $query->values($zone);
  31. }
  32. $query->execute();
  33. // Set address format
  34. uc_set_address_format(
  35. 438,
  36. "!company\r\n".
  37. "!first_name !last_name\r\n".
  38. "!street1\r\n".
  39. "!street2\r\n".
  40. "!city, !zone_name !postal_code\r\n".
  41. "!country_name_if"
  42. );
  43. }