<?php
// $Id: serbia_688_1.cif,v 1.1.2.3 2010-04-14 05:18:19 tr Exp $ 1.0.0

/**
 * First implement hook_install() using the name of the country as the base of
 * the function name.
 */
function serbia_install() {
  db_query("INSERT INTO {uc_countries} (country_id, country_name, country_iso_code_2, country_iso_code_3, version) VALUES (688, 'Serbia', 'RS', 'SRB', 1)");

  // Make the entries in the zones table.
  $zones = array(
    array(688, '00', 'Beograd'),
    array(688, '14', 'Bor'),
    array(688, '11', 'Barnicevo'),
    array(688, '23', 'Jablanica'),
    array(688, '09', 'Kolubara'),
    array(688, 'KM', 'Kosovo-Metohija'),
    array(688, '08', 'Macva'),
    array(688, '17', 'Moravica'),
    array(688, '20', 'Nisava'),
    array(688, '24', 'Pcinja'),
    array(688, '22', 'Pirot'),
    array(688, '10', 'Podunavlje'),
    array(688, '13', 'Pomoravlje'),
    array(688, '19', 'Rasina'),
    array(688, '18', 'Raska'),
    array(688, '12', 'Sumadija'),
    array(688, '21', 'Toplica'),
    array(688, 'VO', 'Vojvodina'),
    array(688, '15', 'Zajecar'),
    array(688, '16', 'Zlatibor'),
    array(688, '25', 'Kosovo'),
    array(688, '29', 'Kosovo-Pomoravlje'),
    array(688, '28', 'Kosovska Mitrovica'),
    array(688, '26', 'Pec'),
    array(688, '27', 'Prizren'),
    array(688, '06', 'Juzna Backa'),
    array(688, '04', 'Juzni Banat'),
    array(688, '01', 'Severna Backa'),
    array(688, '03', 'Severni Banat'),
    array(688, '02', 'Srednji Banat'),
    array(688, '07', 'Srem'),
    array(688, '05', 'Zapadna Backa'),
  );

  foreach ($zones as $zone) {
    db_query("INSERT INTO {uc_zones} (zone_country_id, zone_code, zone_name) VALUES (%d, '%s', '%s')", $zone);
  }

  uc_set_address_format(688,
    "!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");
}
