oman_512_1.cif 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <?php
  2. function oman_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' => 512,
  8. 'country_name' => 'Oman',
  9. 'country_iso_code_2' => 'OM',
  10. 'country_iso_code_3' => 'OMN',
  11. 'version' => 1,
  12. ))
  13. ->execute();
  14. $zones = array(
  15. array(512, 'BA', 'Al Batinah'),
  16. array(512, 'DA', 'Ad Dakhiliyah'),
  17. array(512, 'JA', 'Al Janubiyah'),
  18. array(512, 'MA', 'Masqat'),
  19. array(512, 'MU', 'Musandam'),
  20. array(512, 'SH', 'Ash Sharqiyah'),
  21. array(512, 'WU', 'Al Wusta'),
  22. array(512, 'ZA', 'Az Zahirah'),
  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. 512,
  32. "!company\r\n".
  33. "!first_name !last_name\r\n".
  34. "!street1\r\n".
  35. "!street2\r\n".
  36. "!city\r\n".
  37. "!zone_name, !country_name_if"
  38. );
  39. }