Re-added, now the right ones
[mailer.git] / inc / extensions / ext-iso3166.php
1 <?php
2 /************************************************************************
3  * MXChange v0.2.1                                    Start: 12/08/2008 *
4  * ================                             Last change: 12/08/2008 *
5  *                                                                      *
6  * -------------------------------------------------------------------- *
7  * File              : ext-iso3166.php                                  *
8  * -------------------------------------------------------------------- *
9  * Short description : Country code list ISO3166                        *
10  * -------------------------------------------------------------------- *
11  * Kurzbeschreibung  : Laendercode-Liste ISO3166                        *
12  * -------------------------------------------------------------------- *
13  * $Revision:: 856                                                    $ *
14  * $Date::                                                            $ *
15  * $Tag:: 0.2.1-FINAL                                                 $ *
16  * $Author::                                                          $ *
17  * Needs to be in all Files and every File needs "svn propset           *
18  * svn:keywords Date Revision" (autoprobset!) at least!!!!!!            *
19  * -------------------------------------------------------------------- *
20  * Copyright (c) 2008 by Wolfgang Stelzhammer                           *
21  * Copyright (c) 2003 - 2008 by Roland Haeder                           *
22  * For more information visit: http://www.mxchange.org                  *
23  *                                                                      *
24  * This program is free software; you can redistribute it and/or modify *
25  * it under the terms of the GNU General Public License as published by *
26  * the Free Software Foundation; either version 2 of the License, or    *
27  * (at your option) any later version.                                  *
28  *                                                                      *
29  * This program is distributed in the hope that it will be useful,      *
30  * but WITHOUT ANY WARRANTY; without even the implied warranty of       *
31  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the        *
32  * GNU General Public License for more details.                         *
33  *                                                                      *
34  * You should have received a copy of the GNU General Public License    *
35  * along with this program; if not, write to the Free Software          *
36  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,               *
37  * MA  02110-1301  USA                                                  *
38  ************************************************************************/
39
40 // Some security stuff...
41 if (!defined('__SECURITY')) {
42         $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
43         require($INC);
44 }
45
46 // Version number
47 EXT_SET_VERSION("0.0.1");
48
49 // Version history array (add more with , "0.1" and so on)
50 EXT_SET_VER_HISTORY(array("0.0", "0.0.1"));
51
52 switch ($EXT_LOAD_MODE)
53 {
54 case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
55         // SQL commands to run
56         ADD_SQL("");
57         break;
58
59 case "remove": // Do stuff when removing extension
60         // SQL commands to run
61         ADD_SQL("DELETE FROM `{!_MYSQL_PREFIX!}_countries` WHERE provider = 'ext-iso3166';");
62         ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_countries` DROP `provider`;");
63         break;
64
65 case "activate": // Do stuff when admin activates this extension
66         // SQL commands to run
67         ADD_SQL("UPDATE `{!_MYSQL_PREFIX!}_countries` SET is_active = 'Y' WHERE provider = 'ext-iso3166';");
68         break;
69
70 case "deactivate": // Do stuff when admin deactivates this extension
71         // SQL commands to run
72         ADD_SQL("UPDATE `{!_MYSQL_PREFIX!}_countries` SET is_active='N' WHERE provider = 'ext-iso3166';");
73         break;
74
75 case "update": // Update an extension
76         switch ($EXT_VER)
77         {
78         case "0.0.1": // SQL queries for v0.0.2
79                 ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_countries` ADD `provider` ENUM( 'user', 'ext-iso3166' ) NOT NULL DEFAULT 'user';");
80                 ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_countries` (`code` , `descr`, `provider`)
81 VALUES ('AD', 'Andorra', 'ext-iso3166'),
82 ('AE', 'Vereinigte Arabische Emirate', 'ext-iso3166'),
83 ('AF', 'Afghanistan', 'ext-iso3166'),
84 ('AG', 'Antigua und Barbuda', 'ext-iso3166'),
85 ('AI', 'Anguilla', 'ext-iso3166'),
86 ('AL', 'Albanien', 'ext-iso3166'),
87 ('AM', 'Armenien', 'ext-iso3166'),
88 ('AN', 'Niederl&auml;ndische Antillen', 'ext-iso3166'),
89 ('AO', 'Angola', 'ext-iso3166'),
90 ('AQ', 'Antarktis', 'ext-iso3166'),
91 ('AR', 'Argentinien', 'ext-iso3166'),
92 ('AS', 'Samoa', 'ext-iso3166'),
93 ('AT', '&Ouml;sterreich', 'ext-iso3166'),
94 ('AU', 'Australien', 'ext-iso3166'),
95 ('AW', 'Aruba', 'ext-iso3166'),
96 ('AZ', 'Aserbaidschan', 'ext-iso3166'),
97 ('BA', 'Bosnien-Herzegowina', 'ext-iso3166'),
98 ('BB', 'Barbados', 'ext-iso3166'),
99 ('BD', 'Bangladesh', 'ext-iso3166'),
100 ('BE', 'Belgien', 'ext-iso3166'),
101 ('BF', 'Burkina Faso', 'ext-iso3166'),
102 ('BG', 'Bulgarien', 'ext-iso3166'),
103 ('BH', 'Bahrain', 'ext-iso3166'),
104 ('BI', 'Burundi', 'ext-iso3166'),
105 ('BJ', 'Benin', 'ext-iso3166'),
106 ('BM', 'Bermudas', 'ext-iso3166'),
107 ('BN', 'Brunei', 'ext-iso3166'),
108 ('BO', 'Bolivien', 'ext-iso3166'),
109 ('BR', 'Brasilien', 'ext-iso3166'),
110 ('BS', 'Bahamas', 'ext-iso3166'),
111 ('BT', 'Bhutan', 'ext-iso3166'),
112 ('BV', 'Bouvet-Inseln', 'ext-iso3166'),
113 ('BW', 'Botswana', 'ext-iso3166'),
114 ('BY', 'Wei&szlig;russland', 'ext-iso3166'),
115 ('BZ', 'Belize', 'ext-iso3166'),
116 ('CA', 'Kanada', 'ext-iso3166'),
117 ('CC', 'Kokosinseln', 'ext-iso3166'),
118 ('CD', 'Demokratische Republik Kongo (ehemals ZR: Zaire)', 'ext-iso3166'),
119 ('CF', 'Zentralafrikanische Republik', 'ext-iso3166'),
120 ('CG', 'Kongo', 'ext-iso3166'),
121 ('CH', 'Schweiz', 'ext-iso3166'),
122 ('CI', 'Elfenbeink&uuml;ste', 'ext-iso3166'),
123 ('CK', 'Cook-Inseln', 'ext-iso3166'),
124 ('CL', 'Chile', 'ext-iso3166'),
125 ('CM', 'Kamerun', 'ext-iso3166'),
126 ('CN', 'China', 'ext-iso3166'),
127 ('CO', 'Kolumbien', 'ext-iso3166'),
128 ('CR', 'Costa Rica', 'ext-iso3166'),
129 ('CS', 'Serbien und Montenegro (fr&uuml;her Tschechoslowakei)', 'ext-iso3166'),
130 ('CU', 'Kuba', 'ext-iso3166'),
131 ('CV', 'Kap Verde', 'ext-iso3166'),
132 ('CX', 'Christmas Island', 'ext-iso3166'),
133 ('CY', 'Zypern', 'ext-iso3166'),
134 ('CZ', 'Tschechische Republik', 'ext-iso3166'),
135 ('DJ', 'Djibuti', 'ext-iso3166'),
136 ('DE', 'Deutschland', 'ext-iso3166'),
137 ('DK', 'D&auml;nemark', 'ext-iso3166'),
138 ('DM', 'Dominika', 'ext-iso3166'),
139 ('DO', 'Dominikanische Republik', 'ext-iso3166'),
140 ('DZ', 'Algerien', 'ext-iso3166'),
141 ('EC', 'Ecuador', 'ext-iso3166'),
142 ('EE', 'Estland', 'ext-iso3166'),
143 ('EG', '&Auml;gypten', 'ext-iso3166'),
144 ('EH', 'Westsahara', 'ext-iso3166'),
145 ('ER', 'Eritrea', 'ext-iso3166'),
146 ('ES', 'Spanien', 'ext-iso3166'),
147 ('ET', '&Auml;thiopien', 'ext-iso3166'),
148 ('FI', 'Finnland', 'ext-iso3166'),
149 ('FJ', 'Fidschi-Inseln', 'ext-iso3166'),
150 ('FK', 'Falkland-Inseln', 'ext-iso3166'),
151 ('FM', 'Mikronesien', 'ext-iso3166'),
152 ('FO', 'F&auml;r&ouml;er Inseln', 'ext-iso3166'),
153 ('FR', 'Frankreich', 'ext-iso3166'),
154 ('FX', 'Frankreich (nur Europa)', 'ext-iso3166'),
155 ('GA', 'Gabun', 'ext-iso3166'),
156 ('GB', 'Gro&szlig;britannien (UK)', 'ext-iso3166'),
157 ('GD', 'Grenada', 'ext-iso3166'),
158 ('GE', 'Georgien', 'ext-iso3166'),
159 ('GF', 'franz&ouml;sisch Guyana', 'ext-iso3166'),
160 ('GH', 'Ghana', 'ext-iso3166'),
161 ('GI', 'Gibraltar', 'ext-iso3166'),
162 ('GL', 'Gr&ouml;nland', 'ext-iso3166'),
163 ('GM', 'Gambia', 'ext-iso3166'),
164 ('GN', 'Guinea', 'ext-iso3166'),
165 ('GP', 'Guadeloupe', 'ext-iso3166'),
166 ('GQ', '&Auml;quatorial Guinea', 'ext-iso3166'),
167 ('GR', 'Griechenland', 'ext-iso3166'),
168 ('GS', 'South Georgia und South Sandwich Islands', 'ext-iso3166'),
169 ('GT', 'Guatemala', 'ext-iso3166'),
170 ('GU', 'Guam', 'ext-iso3166'),
171 ('GW', 'Guinea Bissau', 'ext-iso3166'),
172 ('GY', 'Guyana', 'ext-iso3166'),
173 ('HK', 'Hong Kong', 'ext-iso3166'),
174 ('HM', 'Heard und McDonald Islands', 'ext-iso3166'),
175 ('HN', 'Honduras', 'ext-iso3166'),
176 ('HR', 'Kroatien', 'ext-iso3166'),
177 ('HT', 'Haiti', 'ext-iso3166'),
178 ('HU', 'Ungarn', 'ext-iso3166'),
179 ('ID', 'Indonesien', 'ext-iso3166'),
180 ('IE', 'Irland', 'ext-iso3166'),
181 ('IL', 'Israel', 'ext-iso3166'),
182 ('IN', 'Indien', 'ext-iso3166'),
183 ('IO', 'Britisch-Indischer Ozean', 'ext-iso3166'),
184 ('IQ', 'Irak', 'ext-iso3166'),
185 ('IR', 'Iran', 'ext-iso3166'),
186 ('IS', 'Island', 'ext-iso3166'),
187 ('IT', 'Italien', 'ext-iso3166'),
188 ('JM', 'Jamaika', 'ext-iso3166'),
189 ('JO', 'Jordanien', 'ext-iso3166'),
190 ('JP', 'Japan', 'ext-iso3166'),
191 ('KE', 'Kenia', 'ext-iso3166'),
192 ('KG', 'Kirgisistan', 'ext-iso3166'),
193 ('KH', 'Kambodscha', 'ext-iso3166'),
194 ('KI', 'Kiribati', 'ext-iso3166'),
195 ('KM', 'Komoren', 'ext-iso3166'),
196 ('KN', 'St. Kitts Nevis Anguilla', 'ext-iso3166'),
197 ('KP', 'Nordkorea', 'ext-iso3166'),
198 ('KR', 'S&uuml;dkorea', 'ext-iso3166'),
199 ('KW', 'Kuwait', 'ext-iso3166'),
200 ('KY', 'Kaiman-Inseln', 'ext-iso3166'),
201 ('KZ', 'Kasachstan', 'ext-iso3166'),
202 ('LA', 'Laos', 'ext-iso3166'),
203 ('LB', 'Libanon', 'ext-iso3166'),
204 ('LC', 'Saint Lucia', 'ext-iso3166'),
205 ('LI', 'Liechtenstein', 'ext-iso3166'),
206 ('LK', 'Sri Lanka', 'ext-iso3166'),
207 ('LR', 'Liberia', 'ext-iso3166'),
208 ('LS', 'Lesotho', 'ext-iso3166'),
209 ('LT', 'Litauen', 'ext-iso3166'),
210 ('LU', 'Luxemburg', 'ext-iso3166'),
211 ('LV', 'Lettland', 'ext-iso3166'),
212 ('LY', 'Libyen', 'ext-iso3166'),
213 ('MA', 'Marokko', 'ext-iso3166'),
214 ('MC', 'Monaco', 'ext-iso3166'),
215 ('MD', 'Moldavien', 'ext-iso3166'),
216 ('MG', 'Madagaskar', 'ext-iso3166'),
217 ('MH', 'Marshall-Inseln', 'ext-iso3166'),
218 ('MK', 'Mazedonien', 'ext-iso3166'),
219 ('ML', 'Mali', 'ext-iso3166'),
220 ('MM', 'Myanmar', 'ext-iso3166'),
221 ('MN', 'Mongolei', 'ext-iso3166'),
222 ('MO', 'Macao', 'ext-iso3166'),
223 ('MP', 'Marianen', 'ext-iso3166'),
224 ('MQ', 'Martinique', 'ext-iso3166'),
225 ('MR', 'Mauretanien', 'ext-iso3166'),
226 ('MS', 'Montserrat', 'ext-iso3166'),
227 ('MT', 'Malta', 'ext-iso3166'),
228 ('MU', 'Mauritius', 'ext-iso3166'),
229 ('MV', 'Malediven', 'ext-iso3166'),
230 ('MW', 'Malawi', 'ext-iso3166'),
231 ('MX', 'Mexiko', 'ext-iso3166'),
232 ('MY', 'Malaysia', 'ext-iso3166'),
233 ('MZ', 'Mocambique', 'ext-iso3166'),
234 ('NA', 'Namibia', 'ext-iso3166'),
235 ('NC', 'Neukaledonien', 'ext-iso3166'),
236 ('NE', 'Niger', 'ext-iso3166'),
237 ('NF', 'Norfolk-Inseln', 'ext-iso3166'),
238 ('NG', 'Nigeria', 'ext-iso3166'),
239 ('NI', 'Nicaragua', 'ext-iso3166'),
240 ('NL', 'Niederlande', 'ext-iso3166'),
241 ('NO', 'Norwegen', 'ext-iso3166'),
242 ('NP', 'Nepal', 'ext-iso3166'),
243 ('NR', 'Nauru', 'ext-iso3166'),
244 ('NU', 'Niue', 'ext-iso3166'),
245 ('NZ', 'Neuseeland', 'ext-iso3166'),
246 ('OM', 'Oman', 'ext-iso3166'),
247 ('PA', 'Panama', 'ext-iso3166'),
248 ('PE', 'Peru', 'ext-iso3166'),
249 ('PF', 'Franz&ouml;sisch-Polynesien', 'ext-iso3166'),
250 ('PG', 'Papua Neuguinea', 'ext-iso3166'),
251 ('PH', 'Philippinen', 'ext-iso3166'),
252 ('PK', 'Pakistan', 'ext-iso3166'),
253 ('PL', 'Polen', 'ext-iso3166'),
254 ('PM', 'St. Pierre und Miquelon', 'ext-iso3166'),
255 ('PN', 'Pitcairn', 'ext-iso3166'),
256 ('PR', 'Puerto Rico', 'ext-iso3166'),
257 ('PS', 'Pal&auml;stinensische Selbstverwaltungsgebiete', 'ext-iso3166'),
258 ('PT', 'Portugal', 'ext-iso3166'),
259 ('PW', 'Palau', 'ext-iso3166'),
260 ('PY', 'Paraguay', 'ext-iso3166'),
261 ('QA', 'Qatar', 'ext-iso3166'),
262 ('RE', 'Reunion', 'ext-iso3166'),
263 ('RO', 'Rum&auml;nien', 'ext-iso3166'),
264 ('RU', 'Russland', 'ext-iso3166'),
265 ('RW', 'Ruanda', 'ext-iso3166'),
266 ('SA', 'Saudi-Arabien', 'ext-iso3166'),
267 ('SB', 'Solomon-Inseln', 'ext-iso3166'),
268 ('SC', 'Seychellen', 'ext-iso3166'),
269 ('SD', 'Sudan', 'ext-iso3166'),
270 ('SE', 'Schweden', 'ext-iso3166'),
271 ('SG', 'Singapur', 'ext-iso3166'),
272 ('SH', 'St. Helena', 'ext-iso3166'),
273 ('SI', 'Slowenien', 'ext-iso3166'),
274 ('SJ', 'Svalbard und Jan Mayen Islands', 'ext-iso3166'),
275 ('SK', 'Slowakei (Slowakische Republik)', 'ext-iso3166'),
276 ('SL', 'Sierra Leone', 'ext-iso3166'),
277 ('SM', 'San Marino', 'ext-iso3166'),
278 ('SN', 'Senegal', 'ext-iso3166'),
279 ('SO', 'Somalia', 'ext-iso3166'),
280 ('SR', 'Surinam', 'ext-iso3166'),
281 ('ST', 'Sao Tome', 'ext-iso3166'),
282 ('SU', 'Sowjetunion (obsolet)', 'ext-iso3166'),
283 ('SV', 'El Salvador', 'ext-iso3166'),
284 ('SY', 'Syrien', 'ext-iso3166'),
285 ('SZ', 'Swasiland', 'ext-iso3166'),
286 ('TC', 'Turks- und Kaikos-Inseln', 'ext-iso3166'),
287 ('TD', 'Tschad', 'ext-iso3166'),
288 ('TF', 'Franz&ouml;sisches S&uuml;d-Territorium', 'ext-iso3166'),
289 ('TG', 'Togo', 'ext-iso3166'),
290 ('TH', 'Thailand', 'ext-iso3166'),
291 ('TJ', 'Tadschikistan', 'ext-iso3166'),
292 ('TK', 'Tokelau', 'ext-iso3166'),
293 ('TL', 'Ost-Timor', 'ext-iso3166'),
294 ('TM', 'Turkmenistan', 'ext-iso3166'),
295 ('TN', 'Tunesien', 'ext-iso3166'),
296 ('TO', 'Tonga', 'ext-iso3166'),
297 ('TR', 'T&uuml;rkei', 'ext-iso3166'),
298 ('TT', 'Trinidad Tobago', 'ext-iso3166'),
299 ('TV', 'Tuvalu', 'ext-iso3166'),
300 ('TW', 'Taiwan', 'ext-iso3166'),
301 ('TZ', 'Tansania', 'ext-iso3166'),
302 ('UA', 'Ukraine', 'ext-iso3166'),
303 ('UG', 'Uganda', 'ext-iso3166'),
304 ('UK', 'Gro&szlig;britannien', 'ext-iso3166'),
305 ('UM', 'US- kleinere Inseln au&szlig;erhalb', 'ext-iso3166'),
306 ('US', 'Vereinigte Staaten von Amerika', 'ext-iso3166'),
307 ('UY', 'Uruguay', 'ext-iso3166'),
308 ('UZ', 'Usbekistan', 'ext-iso3166'),
309 ('VA', 'Vatikan', 'ext-iso3166'),
310 ('VC', 'St. Vincent', 'ext-iso3166'),
311 ('VE', 'Venezuela', 'ext-iso3166'),
312 ('VG', 'Virgin Island (Brit.)', 'ext-iso3166'),
313 ('VI', 'Virgin Island (USA)', 'ext-iso3166'),
314 ('VN', 'Vietnam', 'ext-iso3166'),
315 ('VU', 'Vanuatu', 'ext-iso3166'),
316 ('WF', 'Wallis et Futuna', 'ext-iso3166'),
317 ('WS', 'Samoa', 'ext-iso3166'),
318 ('YE', 'Jemen', 'ext-iso3166'),
319 ('YT', 'Mayotte', 'ext-iso3166'),
320 ('YU', 'Jugoslawien (obsolet)', 'ext-iso3166'),
321 ('ZA', 'S&uuml;dafrika', 'ext-iso3166'),
322 ('ZM', 'Sambia', 'ext-iso3166'),
323 ('ZW', 'Zimbabwe', 'ext-iso3166');");
324
325                 // This extension depends on the country extension
326                 EXT_SET_UPDATE_DEPENDS("country");
327
328                 // Update notes (these will be set as task text!)
329                 EXT_SET_UPDATE_NOTES("Erste Liste von 243 L&auml;ndercodes nach ISO 3166. (Quelle: Selfhtml)<br />Alle L&auml;nder sind zuerst deaktiviert. Achtung DE k&ouml;nnte doppelt vorkommen.<br />Ein Aktivieren/Deaktivieren l&auml;sst alle L&auml;nder beim Registrieren anzeigen oder nicht Anzeigen.");
330                 break;
331
332         }
333         break;
334
335 case "modify": // When the extension got modified
336         break;
337
338 case "test": // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
339         break;
340
341 default: // Do stuff when extension is loaded
342         break;
343 }
344
345 // [EOF]
346 ?>