sao_tome_principe_678_1.cif 956 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. <?php
  2. function sao_tome_principe_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' => 678,
  8. 'country_name' => 'Sao Tome and Principe',
  9. 'country_iso_code_2' => 'ST',
  10. 'country_iso_code_3' => 'STP',
  11. 'version' => 1,
  12. ))
  13. ->execute();
  14. // Make the entries in the zones table.
  15. $zones = array(
  16. array(678, 'ST-P', 'Príncipe'),
  17. array(678, 'ST-S', 'São Tomé'),
  18. );
  19. $query = db_insert('uc_zones')->fields(array('zone_country_id', 'zone_code', 'zone_name'));
  20. foreach ($zones as $zone) {
  21. $query->values($zone);
  22. }
  23. $query->execute();
  24. // Set address format
  25. uc_set_address_format(
  26. 678,
  27. "!company\r\n".
  28. "!first_name !last_name\r\n".
  29. "!street1\r\n".
  30. "!street2\r\n".
  31. "!city, !zone_name !postal_code\r\n".
  32. "!country_name_if"
  33. );
  34. }