Subversion Repositories cheapmusic

Rev

Rev 65 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 65 Rev 91
Line 255... Line 255...
255
    if (array_key_exists($code, $countries)) {
255
    if (array_key_exists($code, $countries)) {
256
        return ($countries[$code]);
256
        return ($countries[$code]);
257
    }
257
    }
258
 
258
 
259
    return ("Unknown");
259
    return ("Unknown");
-
 
260
}
-
 
261
 
-
 
262
function getCountryCode($country) {
-
 
263
    $countries = array(
-
 
264
        "Afghanistan" => "AF",
-
 
265
        "Åland Islands" => "AX",
-
 
266
        "Albania" => "AL",
-
 
267
        "Algeria" => "DZ",
-
 
268
        "American Samoa" => "AS",
-
 
269
        "Andorra" => "AD",
-
 
270
        "Angola" => "AO",
-
 
271
        "Anguilla" => "AI",
-
 
272
        "Antarctica" => "AQ",
-
 
273
        "Antigua and Barbuda" => "AG",
-
 
274
        "Argentina" => "AR",
-
 
275
        "Armenia" => "AM",
-
 
276
        "Aruba" => "AW",
-
 
277
        "Australia" => "AU",
-
 
278
        "Austria" => "AT",
-
 
279
        "Azerbaijan" => "AZ",
-
 
280
        "Bahamas" => "BS",
-
 
281
        "Bahrain" => "BH",
-
 
282
        "Bangladesh" => "BD",
-
 
283
        "Barbados" => "BB",
-
 
284
        "Belarus" => "BY",
-
 
285
        "Belgium" => "BE",
-
 
286
        "Belize" => "BZ",
-
 
287
        "Benin" => "BJ",
-
 
288
        "Bermuda" => "BM",
-
 
289
        "Bhutan" => "BT",
-
 
290
        "Bolivia" => "BO",
-
 
291
        "Bonaire, Sint Eustatius and Saba" => "BQ",
-
 
292
        "Bosnia and Herzegovina" => "BA",
-
 
293
        "Botswana" => "BW",
-
 
294
        "Bouvet Island" => "BV",
-
 
295
        "Brazil" => "BR",
-
 
296
        "British Indian Ocean Territory" => "IO",
-
 
297
        "Brunei Darussalam" => "BN",
-
 
298
        "Bulgaria" => "BG",
-
 
299
        "Burkina Faso" => "BF",
-
 
300
        "Burundi" => "BI",
-
 
301
        "Cabo Verde" => "CV",
-
 
302
        "Cambodia" => "KH",
-
 
303
        "Cameroon" => "CM",
-
 
304
        "Canada" => "CA",
-
 
305
        "Cayman Islands" => "KY",
-
 
306
        "Central African Republic" => "CF",
-
 
307
        "Chad" => "TD",
-
 
308
        "Chile" => "CL",
-
 
309
        "China" => "CN",
-
 
310
        "Christmas Island" => "CX",
-
 
311
        "Cocos (Keeling) Islands" => "CC",
-
 
312
        "Colombia" => "CO",
-
 
313
        "Comoros" => "KM",
-
 
314
        "Congo" => "CD",
-
 
315
        "Congo" => "CG",
-
 
316
        "Cook Islands" => "CK",
-
 
317
        "Costa Rica" => "CR",
-
 
318
        "Côte d'Ivoire" => "CI",
-
 
319
        "Croatia" => "HR",
-
 
320
        "Cuba" => "CU",
-
 
321
        "Curaçao" => "CW",
-
 
322
        "Cyprus" => "CY",
-
 
323
        "Czechia" => "CZ",
-
 
324
        "Denmark" => "DK",
-
 
325
        "Djibouti" => "DJ",
-
 
326
        "Dominica" => "DM",
-
 
327
        "Dominican Republic" => "DO",
-
 
328
        "Ecuador" => "EC",
-
 
329
        "Egypt" => "EG",
-
 
330
        "El Salvador" => "SV",
-
 
331
        "Equatorial Guinea" => "GQ",
-
 
332
        "Eritrea" => "ER",
-
 
333
        "Estonia" => "EE",
-
 
334
        "Eswatini" => "SZ",
-
 
335
        "Ethiopia" => "ET",
-
 
336
        "Falkland Islands [Malvinas]" => "FK",
-
 
337
        "Faroe Islands" => "FO",
-
 
338
        "Fiji" => "FJ",
-
 
339
        "Finland" => "FI",
-
 
340
        "France" => "FR",
-
 
341
        "French Guiana" => "GF",
-
 
342
        "French Polynesia" => "PF",
-
 
343
        "French Southern Territories" => "TF",
-
 
344
        "Gabon" => "GA",
-
 
345
        "Gambia" => "GM",
-
 
346
        "Georgia" => "GE",
-
 
347
        "Germany" => "DE",
-
 
348
        "Ghana" => "GH",
-
 
349
        "Gibraltar" => "GI",
-
 
350
        "Greece" => "GR",
-
 
351
        "Greenland" => "GL",
-
 
352
        "Grenada" => "GD",
-
 
353
        "Guadeloupe" => "GP",
-
 
354
        "Guam" => "GU",
-
 
355
        "Guatemala" => "GT",
-
 
356
        "Guernsey" => "GG",
-
 
357
        "Guinea-Bissau" => "GW",
-
 
358
        "Guinea" => "GN",
-
 
359
        "Guyana" => "GY",
-
 
360
        "Haiti" => "HT",
-
 
361
        "Heard Island and McDonald Islands" => "HM",
-
 
362
        "Holy See" => "VA",
-
 
363
        "Honduras" => "HN",
-
 
364
        "Hong Kong" => "HK",
-
 
365
        "Hungary" => "HU",
-
 
366
        "Iceland" => "IS",
-
 
367
        "India" => "IN",
-
 
368
        "Indonesia" => "ID",
-
 
369
        "Iran" => "IR",
-
 
370
        "Iraq" => "IQ",
-
 
371
        "Ireland" => "IE",
-
 
372
        "Isle of Man" => "IM",
-
 
373
        "Israel" => "IL",
-
 
374
        "Italy" => "IT",
-
 
375
        "Jamaica" => "JM",
-
 
376
        "Japan" => "JP",
-
 
377
        "Jersey" => "JE",
-
 
378
        "Jordan" => "JO",
-
 
379
        "Kazakhstan" => "KZ",
-
 
380
        "Kenya" => "KE",
-
 
381
        "Kiribati" => "KI",
-
 
382
        "Kuwait" => "KW",
-
 
383
        "Kyrgyzstan" => "KG",
-
 
384
        "Lao People's Democratic Republic" => "LA",
-
 
385
        "Latvia" => "LV",
-
 
386
        "Lebanon" => "LB",
-
 
387
        "Lesotho" => "LS",
-
 
388
        "Liberia" => "LR",
-
 
389
        "Libya" => "LY",
-
 
390
        "Liechtenstein" => "LI",
-
 
391
        "Lithuania" => "LT",
-
 
392
        "Luxembourg" => "LU",
-
 
393
        "Macao" => "MO",
-
 
394
        "Madagascar" => "MG",
-
 
395
        "Malawi" => "MW",
-
 
396
        "Malaysia" => "MY",
-
 
397
        "Maldives" => "MV",
-
 
398
        "Mali" => "ML",
-
 
399
        "Malta" => "MT",
-
 
400
        "Marshall Islands" => "MH",
-
 
401
        "Martinique" => "MQ",
-
 
402
        "Mauritania" => "MR",
-
 
403
        "Mauritius" => "MU",
-
 
404
        "Mayotte" => "YT",
-
 
405
        "Mexico" => "MX",
-
 
406
        "Micronesia" => "FM",
-
 
407
        "Moldova" => "MD",
-
 
408
        "Monaco" => "MC",
-
 
409
        "Mongolia" => "MN",
-
 
410
        "Montenegro" => "ME",
-
 
411
        "Montserrat" => "MS",
-
 
412
        "Morocco" => "MA",
-
 
413
        "Mozambique" => "MZ",
-
 
414
        "Myanmar" => "MM",
-
 
415
        "Namibia" => "NA",
-
 
416
        "Nauru" => "NR",
-
 
417
        "Nepal" => "NP",
-
 
418
        "Netherlands" => "NL",
-
 
419
        "New Caledonia" => "NC",
-
 
420
        "New Zealand" => "NZ",
-
 
421
        "Nicaragua" => "NI",
-
 
422
        "Nigeria" => "NG",
-
 
423
        "Niger" => "NE",
-
 
424
        "Niue" => "NU",
-
 
425
        "Norfolk Island" => "NF",
-
 
426
        "Northern Mariana Islands" => "MP",
-
 
427
        "North Korea" => "KP",
-
 
428
        "North Macedonia" => "MK",
-
 
429
        "Norway" => "NO",
-
 
430
        "Oman" => "OM",
-
 
431
        "Pakistan" => "PK",
-
 
432
        "Palau" => "PW",
-
 
433
        "Palestine" => "PS",
-
 
434
        "Panama" => "PA",
-
 
435
        "Papua New Guinea" => "PG",
-
 
436
        "Paraguay" => "PY",
-
 
437
        "Peru" => "PE",
-
 
438
        "Philippines" => "PH",
-
 
439
        "Pitcairn" => "PN",
-
 
440
        "Poland" => "PL",
-
 
441
        "Portugal" => "PT",
-
 
442
        "Puerto Rico" => "PR",
-
 
443
        "Qatar" => "QA",
-
 
444
        "Réunion" => "RE",
-
 
445
        "Romania" => "RO",
-
 
446
        "Russian Federation" => "RU",
-
 
447
        "Rwanda" => "RW",
-
 
448
        "Saint Barthélemy" => "BL",
-
 
449
        "Saint Helena, Ascension and Tristan da Cunha" => "SH",
-
 
450
        "Saint Kitts and Nevis" => "KN",
-
 
451
        "Saint Lucia" => "LC",
-
 
452
        "Saint Martin (French)" => "MF",
-
 
453
        "Saint Pierre and Miquelon" => "PM",
-
 
454
        "Saint Vincent and the Grenadines" => "VC",
-
 
455
        "Samoa" => "WS",
-
 
456
        "San Marino" => "SM",
-
 
457
        "Sao Tome and Principe" => "ST",
-
 
458
        "Saudi Arabia" => "SA",
-
 
459
        "Senegal" => "SN",
-
 
460
        "Serbia" => "RS",
-
 
461
        "Seychelles" => "SC",
-
 
462
        "Sierra Leone" => "SL",
-
 
463
        "Singapore" => "SG",
-
 
464
        "Sint Maarten (Dutch)" => "SX",
-
 
465
        "Slovakia" => "SK",
-
 
466
        "Slovenia" => "SI",
-
 
467
        "Solomon Islands" => "SB",
-
 
468
        "Somalia" => "SO",
-
 
469
        "South Africa" => "ZA",
-
 
470
        "South Georgia and South Sandwich Islands" => "GS",
-
 
471
        "South Korea" => "KR",
-
 
472
        "South Sudan" => "SS",
-
 
473
        "Spain" => "ES",
-
 
474
        "Sri Lanka" => "LK",
-
 
475
        "Sudan" => "SD",
-
 
476
        "Suriname" => "SR",
-
 
477
        "Svalbard and Jan Mayen" => "SJ",
-
 
478
        "Sweden" => "SE",
-
 
479
        "Switzerland" => "CH",
-
 
480
        "Syrian Arab Republic" => "SY",
-
 
481
        "Taiwan" => "TW",
-
 
482
        "Tajikistan" => "TJ",
-
 
483
        "Tanzania" => "TZ",
-
 
484
        "Thailand" => "TH",
-
 
485
        "Timor-Leste" => "TL",
-
 
486
        "Togo" => "TG",
-
 
487
        "Tokelau" => "TK",
-
 
488
        "Tonga" => "TO",
-
 
489
        "Trinidad and Tobago" => "TT",
-
 
490
        "Tunisia" => "TN",
-
 
491
        "Turkey" => "TR",
-
 
492
        "Turkmenistan" => "TM",
-
 
493
        "Turks and Caicos Islands" => "TC",
-
 
494
        "Tuvalu" => "TV",
-
 
495
        "Uganda" => "UG",
-
 
496
        "Ukraine" => "UA",
-
 
497
        "United Arab Emirates" => "AE",
-
 
498
        "United Kingdom" => "GB",
-
 
499
        "United States Minor Outlying Islands" => "UM",
-
 
500
        "United States of America" => "US",
-
 
501
        "Uruguay" => "UY",
-
 
502
        "Uzbekistan" => "UZ",
-
 
503
        "Vanuatu" => "VU",
-
 
504
        "Venezuela" => "VE",
-
 
505
        "Viet Nam" => "VN",
-
 
506
        "Virgin Islands (British)" => "VG",
-
 
507
        "Virgin Islands (U.S.)" => "VI",
-
 
508
        "Wallis and Futuna" => "WF",
-
 
509
        "Western Sahara*" => "EH",
-
 
510
        "Yemen" => "YE",
-
 
511
        "Zambia" => "ZM",
-
 
512
        "Zimbabwe" => "ZW"
-
 
513
    );
-
 
514
 
-
 
515
    if (array_key_exists($country, $countries)) {
-
 
516
        return ($countries[$country]);
-
 
517
    }
-
 
518
 
-
 
519
    return ("US");
260
}
520
}
261
?>
521
?>