cyprus_196_1.cif 960 B

1234567891011121314151617181920212223242526272829303132333435
  1. <?php
  2. /**
  3. * Implements hook_install() using the name of the country as the base of
  4. * the function name.
  5. */
  6. function cyprus_install() {
  7. db_insert('uc_countries')
  8. ->fields(array(
  9. 'country_id' => '196',
  10. 'country_name' => 'Cyprus',
  11. 'country_iso_code_2' => 'CY',
  12. 'country_iso_code_3' => 'CYP',
  13. 'version' => 1,
  14. ))
  15. ->execute();
  16. // Make the entries in the zones table.
  17. $zones = array(
  18. array(196, '04', 'Famagusta'),
  19. array(196, '06', 'Kyrenia'),
  20. array(196, '03', 'Larnaca'),
  21. array(196, '02', 'Limassol'),
  22. array(196, '01', 'Nicosia'),
  23. array(196, '05', 'Paphos')
  24. );
  25. $query = db_insert('uc_zones')->fields(array('zone_country_id', 'zone_code', 'zone_name'));
  26. foreach ($zones as $zone) {
  27. $query->values($zone);
  28. }
  29. $query->execute();
  30. uc_set_address_format(196, "!company\r\n!first_name !last_name\r\n!street1\r\n!street2\r\n!city, !zone_code !postal_code\r\n!country_name_if");
  31. }