/[drupal]/contributions/modules/ubercart/uc_store/countries/algeria_12_1.cif
ViewVC logotype

Diff of /contributions/modules/ubercart/uc_store/countries/algeria_12_1.cif

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.1 by islandusurper, Fri Nov 20 15:57:03 2009 UTC revision 1.1.2.1 by islandusurper, Fri Nov 20 15:57:03 2009 UTC
# Line 0  Line 1 
1    <?php
2    // $Id: algeria_12_1_1.cif,v 1.3.2.5 2009/10/20 112:51:20 fpcreator2000 Exp $
3    
4    /**
5     * First implement hook_install() using the name of the country as the base of
6     * the function name.
7     */
8    function algeria_install() {
9      // Make the entry in the country table.
10      // VALUES = Country ID, Country Name, 2-digit Code, 3-digit Code, File Version
11      db_query("INSERT INTO {uc_countries} VALUES ('12', 'Algeria', 'DZ', 'DZA', 1)");
12    
13      // Make the entries in the zones table.  Use %d for the zone_id and the
14      // VALUES = Parent Country ID, Zone Abbreviation, Zone Name
15      $zones = array(
16        array(12, 'ADRAR', 'Adrar'),
17        array(12, 'AIN TEMOUCHENT', 'Ain Temouchent'),
18        array(12, 'ALGIERS', 'Algiers'),
19        array(12, 'ANNABA', 'Annaba'),
20        array(12, 'LAGHOUAT', 'Laghouat'),
21        array(12, 'BATNA', 'Batna'),
22        array(12, 'BEJAIA', 'Bejaia'),
23        array(12, 'BISKRA', 'Biskra'),
24        array(12, 'BECHAR', 'Bechar'),
25        array(12, 'BLIDA', 'Blida'),
26        array(12, 'BOUIRA', 'Bouira'),
27        array(12, 'CHLEF', 'Chlef'),
28        array(12, 'CONSTANTINE', 'Constantine'),
29        array(12, 'DJELFA', 'Djelfa'),
30        array(12, 'TAMANGHASSET', 'Tamanghasset'),
31        array(12, 'TEBESSA', 'Tebessa'),
32        array(12, 'TLEMCEN', 'Tlemcen'),
33        array(12, 'TIZI OUZOU', 'Tizi Ouzou'),
34        array(12, 'JIJEL', 'Jijel'),
35        array(12, 'SETIF', 'Setif'),
36        array(12, 'SAIDA', 'Saida'),
37        array(12, 'SKIKDA', 'Skikda'),
38        array(12, 'SIDI BEL ABBES', 'Sidi Bel Abbes'),
39        array(12, 'GUELMA', 'Guelma'),
40        array(12, 'MEDEA', 'Medea'),
41        array(12, 'MOSTAGANEM', 'Mostaganem'),
42        array(12, 'MSILA', 'MSila'),
43        array(12, 'ORAN', 'Oran'),
44        array(12, 'OUARGLA', 'Ouargla'),
45        array(12, 'OUM EL-BOUAGHI', 'Oum el-Bouaghi'),
46        array(12, 'EL BAYADH', 'El Bayadh'),
47        array(12, 'ILLIZI', 'Illizi'),
48        array(12, 'BORDJ BOU ARRERIDJ', 'Bordj Bou Arreridj'),
49        array(12, 'BOUMERDES', 'Boumerdes'),
50        array(12, 'EL TARF', 'El Tarf'),
51        array(12, 'TINDDOUF', 'Tindouf'),
52        array(12, 'TISSEMSILT', 'Tissemsilt'),
53        array(12, 'EL OUED', 'El Oued'),
54        array(12, 'KHENCHELA', 'Khenchela'),
55        array(12, 'SOUK AHRAS', 'Souk Ahras'),
56        array(12, 'MILA', 'Mila'),
57        array(12, 'AIN DEFLA', 'Ain Defla'),
58        array(12, 'NAAMA', 'Naama'),
59        array(12, 'GHARDAIA', 'Ghardaia'),
60        array(12, 'RELIZANE', 'Relizane'),
61      );
62    
63      foreach ($zones as $zone) {
64        db_query("INSERT INTO {uc_zones} (zone_country_id, zone_code, zone_name) VALUES (%d, '%s', '%s')", $zone);
65      }
66    
67      // Use uc_set_address_format() with the country ID as the first argument and
68      // an address format string as the second.  Documentation on address formats
69      // is available at:
70      // http://www.ubercart.org/ubercart_users_guide/country_settings#address_format_docs
71      uc_set_address_format(12,
72        "!company\r\n!first_name !last_name\r\n!street1\r\n!street2"
73       ."\r\n!city\r\b!postal_code !zone_code\r\n!country_name_if");
74    }
75    
76    /**
77     * If necessary, implement hook_update() with $version being the only argument.
78     * Add a new case for each version update, and be sure to always include the
79     * latest changes in the install function.
80     */
81    function algeria_update($version) {
82    }
83    
84    /**
85     * If necessary, implement hook_uninstall().  This requires no argument.  The
86     * store module automatically removes rows from the country and zones tables
87     * related to the country, and it unsets the address format.  This function is
88     * only necessary for other things you may have included in your country's
89     * installation process.
90     */
91    function algeria_uninstall() {
92    }

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.1.2.1

  ViewVC Help
Powered by ViewVC 1.1.3