<?php
// $Id: greece_300_1.cif,v 1.2.4.3 2010-11-02 06:42:17 tr Exp $

/**
* First implement hook_install() using the name of the country as the base of
* the function name.
*/
function greece_install() {
  // Make the entry in the country table.
  // VALUES = Country ID, Country Name, 2-digit Code, 3-digit Code, File Version
  db_query("INSERT INTO {uc_countries} VALUES (300, 'Ελλάδα', 'GR', 'GRC', 1)");

  // Make the entries in the zones table.  Use %d for the zone_id and the
  // function uc_get_zone_ids($num) as the second argument for db_query() where
  // $num is the number of zones in the INSERT query.
  // VALUES = %d for ID, Parent Country ID, Zone Abbreviation, Zone Name
  db_query("INSERT INTO {uc_zones} VALUES "
          ."(%d, 300, 'ATT', 'Αττική'),"
          ."(%d, 300, 'AIT', 'Αιτωλοακαρνανία'),"
          ."(%d, 300, 'ARG', 'Αργολίδα'),"
          ."(%d, 300, 'ARK', 'Αρκαδία'),"
          ."(%d, 300, 'ART', 'Άρτα'),"
          ."(%d, 300, 'AHA', 'Αχαϊα'),"
          ."(%d, 300, 'BOI', 'Βοιωτία'),"
          ."(%d, 300, 'GRE', 'Γρεβενά'),"
          ."(%d, 300, 'DRA', 'Δράμα'),"
          ."(%d, 300, 'DOD', 'Δωδεκάνησα'),"
          ."(%d, 300, 'EVR', 'Έβρος'),"
          ."(%d, 300, 'EVI', 'Εύβοια'),"
          ."(%d, 300, 'EVT', 'Ευρυτανία'),"
          ."(%d, 300, 'ZAK', 'Ζάκυνθος'),"
          ."(%d, 300, 'ILI', 'Ηλεία'),"
          ."(%d, 300, 'HMA', 'Ημαθία'),"
          ."(%d, 300, 'HRA', 'Ηράκλειο'),"
          ."(%d, 300, 'THP', 'Θεσπρωτία'),"
          ."(%d, 300, 'THE', 'Θεσσαλονίκη'),"
          ."(%d, 300, 'IOA', 'Ιωάννινα'),"
          ."(%d, 300, 'KAV', 'Καβάλα'),"
          ."(%d, 300, 'KAR', 'Καρδίτσα'),"
          ."(%d, 300, 'KAS', 'Καστοριά'),"
          ."(%d, 300, 'KER', 'Κέρκυρα'),"
          ."(%d, 300, 'KEF', 'Κεφαλληνία'),"
          ."(%d, 300, 'KIL', 'Κιλκίς'),"
          ."(%d, 300, 'KOZ', 'Κοζάνη'),"
          ."(%d, 300, 'KOR', 'Κορινθία'),"
          ."(%d, 300, 'KYK', 'Κυκλάδες'),"
          ."(%d, 300, 'LAK', 'Λακωνία'),"
          ."(%d, 300, 'LAR', 'Λάρισα'),"
          ."(%d, 300, 'LAS', 'Λασίθι'),"
          ."(%d, 300, 'LES', 'Λέσβος'),"
          ."(%d, 300, 'LEF', 'Λευκάδα'),"
          ."(%d, 300, 'MAG', 'Μαγνησία'),"
          ."(%d, 300, 'ΜES', 'Μεσσηνία'),"
          ."(%d, 300, 'XAN', 'Ξάνθη'),"
          ."(%d, 300, 'PEL', 'Πέλλα'),"
          ."(%d, 300, 'PIE', 'Πιερία'),"
          ."(%d, 300, 'PRE', 'Πρέβεζα'),"
          ."(%d, 300, 'RET', 'Ρέθυμνο'),"
          ."(%d, 300, 'ROD', 'Ροδόπη'),"
          ."(%d, 300, 'SAM', 'Σάμος'),"
          ."(%d, 300, 'SER', 'Σέρρες'),"
          ."(%d, 300, 'TRI', 'Τρίκαλα'),"
          ."(%d, 300, 'FTH', 'Φθιώτιδα'),"
          ."(%d, 300, 'FLO', 'Φλώρινα'),"
          ."(%d, 300, 'FOK', 'Φωκίδα'),"
          ."(%d, 300, 'HAL', 'Χαλκιδική'),"
          ."(%d, 300, 'HAN', 'Χανιά'),"
          ."(%d, 300, 'HIO', 'Χίος')",
           uc_get_zone_ids(51));

  // Use uc_set_address_format() with the country ID as the first argument and
  // an address format string as the second.
  uc_set_address_format(300,
    "!company\r\n!first_name !last_name\r\n!street1\r\n!street2"
   ."\r\n!postal_code, !city\r\n!country_name_if");
}
