<?php
// $Id: malaysia_458_1.cif,v 1.1.4.7 2010/04/14 05:18:19 tr Exp $

function malaysia_install() {
  // VALUES = Country ID, Country Name, 2-digit Code, 3-digit Code, File Version
  db_query("INSERT INTO {uc_countries} (country_id, country_name, country_iso_code_2, country_iso_code_3, version) VALUES (458, 'Malaysia', 'MY', 'MYS', 1)");

  // Make the entries in the zones table.
  $zones = array(
    array(458, 'JHR', 'Johor'),
    array(458, 'KDH', 'Kedah'),
    array(458, 'KTN', 'Kelantan'),
    array(458, 'MLK', 'Melaka'),
    array(458, 'NSN', 'Negeri Sembilan'),
    array(458, 'PHG', 'Pahang'),
    array(458, 'PNG', 'Pulau Pinang'),
    array(458, 'PRK', 'Perak'),
    array(458, 'PLS', 'Perlis'),
    array(458, 'SGR', 'Selangor'),
    array(458, 'TRG', 'Terengganu'),
    array(458, 'SBH', 'Sabah'),
    array(458, 'SRW', 'Sarawak'),
    array(458, 'KUL', 'Kuala Lumpur'),
    array(458, 'LBN', 'Labuan'),
    array(458, 'PJY', 'Putrajaya'),
  );

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