public
anonymous / gist:8965278
Created

  • Download Gist
gistfile1.txt
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257
<?php
$modx->getService('lexicon','modLexicon');
$modx->lexicon->load('[redacted]:continents');
 
// -------------
 
// Source: http://snipplr.com/view/36870/
 
$continent = '';
if ($code == 'AF') $continent = $modx->lexicon('continents.asia');
if ($code == 'AX') $continent = $modx->lexicon('continents.europe');
if ($code == 'AL') $continent = $modx->lexicon('continents.europe');
if ($code == 'DZ') $continent = $modx->lexicon('continents.africa');
if ($code == 'AS') $continent = $modx->lexicon('continents.oceania');
if ($code == 'AD') $continent = $modx->lexicon('continents.europe');
if ($code == 'AO') $continent = $modx->lexicon('continents.africa');
if ($code == 'AI') $continent = $modx->lexicon('continents.north_america');
if ($code == 'AQ') $continent = $modx->lexicon('continents.antarctica');
if ($code == 'AG') $continent = $modx->lexicon('continents.north_america');
if ($code == 'AR') $continent = $modx->lexicon('continents.south_america');
if ($code == 'AM') $continent = $modx->lexicon('continents.asia');
if ($code == 'AW') $continent = $modx->lexicon('continents.north_america');
if ($code == 'AU') $continent = $modx->lexicon('continents.oceania');
if ($code == 'AT') $continent = $modx->lexicon('continents.europe');
if ($code == 'AZ') $continent = $modx->lexicon('continents.asia');
if ($code == 'BS') $continent = $modx->lexicon('continents.north_america');
if ($code == 'BH') $continent = $modx->lexicon('continents.asia');
if ($code == 'BD') $continent = $modx->lexicon('continents.asia');
if ($code == 'BB') $continent = $modx->lexicon('continents.north_america');
if ($code == 'BY') $continent = $modx->lexicon('continents.europe');
if ($code == 'BE') $continent = $modx->lexicon('continents.europe');
if ($code == 'BZ') $continent = $modx->lexicon('continents.north_america');
if ($code == 'BJ') $continent = $modx->lexicon('continents.africa');
if ($code == 'BM') $continent = $modx->lexicon('continents.north_america');
if ($code == 'BT') $continent = $modx->lexicon('continents.asia');
if ($code == 'BO') $continent = $modx->lexicon('continents.south_america');
if ($code == 'BA') $continent = $modx->lexicon('continents.europe');
if ($code == 'BW') $continent = $modx->lexicon('continents.africa');
if ($code == 'BV') $continent = $modx->lexicon('continents.antarctica');
if ($code == 'BR') $continent = $modx->lexicon('continents.south_america');
if ($code == 'IO') $continent = $modx->lexicon('continents.asia');
if ($code == 'VG') $continent = $modx->lexicon('continents.north_america');
if ($code == 'BN') $continent = $modx->lexicon('continents.asia');
if ($code == 'BG') $continent = $modx->lexicon('continents.europe');
if ($code == 'BF') $continent = $modx->lexicon('continents.africa');
if ($code == 'BI') $continent = $modx->lexicon('continents.africa');
if ($code == 'KH') $continent = $modx->lexicon('continents.asia');
if ($code == 'CM') $continent = $modx->lexicon('continents.africa');
if ($code == 'CA') $continent = $modx->lexicon('continents.north_america');
if ($code == 'CV') $continent = $modx->lexicon('continents.africa');
if ($code == 'KY') $continent = $modx->lexicon('continents.north_america');
if ($code == 'CF') $continent = $modx->lexicon('continents.africa');
if ($code == 'TD') $continent = $modx->lexicon('continents.africa');
if ($code == 'CL') $continent = $modx->lexicon('continents.south_america');
if ($code == 'CN') $continent = $modx->lexicon('continents.asia');
if ($code == 'CX') $continent = $modx->lexicon('continents.asia');
if ($code == 'CC') $continent = $modx->lexicon('continents.asia');
if ($code == 'CO') $continent = $modx->lexicon('continents.south_america');
if ($code == 'KM') $continent = $modx->lexicon('continents.africa');
if ($code == 'CD') $continent = $modx->lexicon('continents.africa');
if ($code == 'CG') $continent = $modx->lexicon('continents.africa');
if ($code == 'CK') $continent = $modx->lexicon('continents.oceania');
if ($code == 'CR') $continent = $modx->lexicon('continents.north_america');
if ($code == 'CI') $continent = $modx->lexicon('continents.africa');
if ($code == 'HR') $continent = $modx->lexicon('continents.europe');
if ($code == 'CU') $continent = $modx->lexicon('continents.north_america');
if ($code == 'CY') $continent = $modx->lexicon('continents.asia');
if ($code == 'CZ') $continent = $modx->lexicon('continents.europe');
if ($code == 'DK') $continent = $modx->lexicon('continents.europe');
if ($code == 'DJ') $continent = $modx->lexicon('continents.africa');
if ($code == 'DM') $continent = $modx->lexicon('continents.north_america');
if ($code == 'DO') $continent = $modx->lexicon('continents.north_america');
if ($code == 'EC') $continent = $modx->lexicon('continents.south_america');
if ($code == 'EG') $continent = $modx->lexicon('continents.africa');
if ($code == 'SV') $continent = $modx->lexicon('continents.north_america');
if ($code == 'GQ') $continent = $modx->lexicon('continents.africa');
if ($code == 'ER') $continent = $modx->lexicon('continents.africa');
if ($code == 'EE') $continent = $modx->lexicon('continents.europe');
if ($code == 'ET') $continent = $modx->lexicon('continents.africa');
if ($code == 'FO') $continent = $modx->lexicon('continents.europe');
if ($code == 'FK') $continent = $modx->lexicon('continents.south_america');
if ($code == 'FJ') $continent = $modx->lexicon('continents.oceania');
if ($code == 'FI') $continent = $modx->lexicon('continents.europe');
if ($code == 'FR') $continent = $modx->lexicon('continents.europe');
if ($code == 'GF') $continent = $modx->lexicon('continents.south_america');
if ($code == 'PF') $continent = $modx->lexicon('continents.oceania');
if ($code == 'TF') $continent = $modx->lexicon('continents.antarctica');
if ($code == 'GA') $continent = $modx->lexicon('continents.africa');
if ($code == 'GM') $continent = $modx->lexicon('continents.africa');
if ($code == 'GE') $continent = $modx->lexicon('continents.asia');
if ($code == 'DE') $continent = $modx->lexicon('continents.europe');
if ($code == 'GH') $continent = $modx->lexicon('continents.africa');
if ($code == 'GI') $continent = $modx->lexicon('continents.europe');
if ($code == 'GR') $continent = $modx->lexicon('continents.europe');
if ($code == 'GL') $continent = $modx->lexicon('continents.north_america');
if ($code == 'GD') $continent = $modx->lexicon('continents.north_america');
if ($code == 'GP') $continent = $modx->lexicon('continents.north_america');
if ($code == 'GU') $continent = $modx->lexicon('continents.oceania');
if ($code == 'GT') $continent = $modx->lexicon('continents.north_america');
if ($code == 'GG') $continent = $modx->lexicon('continents.europe');
if ($code == 'GN') $continent = $modx->lexicon('continents.africa');
if ($code == 'GW') $continent = $modx->lexicon('continents.africa');
if ($code == 'GY') $continent = $modx->lexicon('continents.south_america');
if ($code == 'HT') $continent = $modx->lexicon('continents.north_america');
if ($code == 'HM') $continent = $modx->lexicon('continents.antarctica');
if ($code == 'VA') $continent = $modx->lexicon('continents.europe');
if ($code == 'HN') $continent = $modx->lexicon('continents.north_america');
if ($code == 'HK') $continent = $modx->lexicon('continents.asia');
if ($code == 'HU') $continent = $modx->lexicon('continents.europe');
if ($code == 'IS') $continent = $modx->lexicon('continents.europe');
if ($code == 'IN') $continent = $modx->lexicon('continents.asia');
if ($code == 'ID') $continent = $modx->lexicon('continents.asia');
if ($code == 'IR') $continent = $modx->lexicon('continents.asia');
if ($code == 'IQ') $continent = $modx->lexicon('continents.asia');
if ($code == 'IE') $continent = $modx->lexicon('continents.europe');
if ($code == 'IM') $continent = $modx->lexicon('continents.europe');
if ($code == 'IL') $continent = $modx->lexicon('continents.asia');
if ($code == 'IT') $continent = $modx->lexicon('continents.europe');
if ($code == 'JM') $continent = $modx->lexicon('continents.north_america');
if ($code == 'JP') $continent = $modx->lexicon('continents.asia');
if ($code == 'JE') $continent = $modx->lexicon('continents.europe');
if ($code == 'JO') $continent = $modx->lexicon('continents.asia');
if ($code == 'KZ') $continent = $modx->lexicon('continents.asia');
if ($code == 'KE') $continent = $modx->lexicon('continents.africa');
if ($code == 'KI') $continent = $modx->lexicon('continents.oceania');
if ($code == 'KP') $continent = $modx->lexicon('continents.asia');
if ($code == 'KR') $continent = $modx->lexicon('continents.asia');
if ($code == 'KW') $continent = $modx->lexicon('continents.asia');
if ($code == 'KG') $continent = $modx->lexicon('continents.asia');
if ($code == 'LA') $continent = $modx->lexicon('continents.asia');
if ($code == 'LV') $continent = $modx->lexicon('continents.europe');
if ($code == 'LB') $continent = $modx->lexicon('continents.asia');
if ($code == 'LS') $continent = $modx->lexicon('continents.africa');
if ($code == 'LR') $continent = $modx->lexicon('continents.africa');
if ($code == 'LY') $continent = $modx->lexicon('continents.africa');
if ($code == 'LI') $continent = $modx->lexicon('continents.europe');
if ($code == 'LT') $continent = $modx->lexicon('continents.europe');
if ($code == 'LU') $continent = $modx->lexicon('continents.europe');
if ($code == 'MO') $continent = $modx->lexicon('continents.asia');
if ($code == 'MK') $continent = $modx->lexicon('continents.europe');
if ($code == 'MG') $continent = $modx->lexicon('continents.africa');
if ($code == 'MW') $continent = $modx->lexicon('continents.africa');
if ($code == 'MY') $continent = $modx->lexicon('continents.asia');
if ($code == 'MV') $continent = $modx->lexicon('continents.asia');
if ($code == 'ML') $continent = $modx->lexicon('continents.africa');
if ($code == 'MT') $continent = $modx->lexicon('continents.europe');
if ($code == 'MH') $continent = $modx->lexicon('continents.oceania');
if ($code == 'MQ') $continent = $modx->lexicon('continents.north_america');
if ($code == 'MR') $continent = $modx->lexicon('continents.africa');
if ($code == 'MU') $continent = $modx->lexicon('continents.africa');
if ($code == 'YT') $continent = $modx->lexicon('continents.africa');
if ($code == 'MX') $continent = $modx->lexicon('continents.north_america');
if ($code == 'FM') $continent = $modx->lexicon('continents.oceania');
if ($code == 'MD') $continent = $modx->lexicon('continents.europe');
if ($code == 'MC') $continent = $modx->lexicon('continents.europe');
if ($code == 'MN') $continent = $modx->lexicon('continents.asia');
if ($code == 'ME') $continent = $modx->lexicon('continents.europe');
if ($code == 'MS') $continent = $modx->lexicon('continents.north_america');
if ($code == 'MA') $continent = $modx->lexicon('continents.africa');
if ($code == 'MZ') $continent = $modx->lexicon('continents.africa');
if ($code == 'MM') $continent = $modx->lexicon('continents.asia');
if ($code == 'NA') $continent = $modx->lexicon('continents.africa');
if ($code == 'NR') $continent = $modx->lexicon('continents.oceania');
if ($code == 'NP') $continent = $modx->lexicon('continents.asia');
if ($code == 'AN') $continent = $modx->lexicon('continents.north_america');
if ($code == 'NL') $continent = $modx->lexicon('continents.europe');
if ($code == 'NC') $continent = $modx->lexicon('continents.oceania');
if ($code == 'NZ') $continent = $modx->lexicon('continents.oceania');
if ($code == 'NI') $continent = $modx->lexicon('continents.north_america');
if ($code == 'NE') $continent = $modx->lexicon('continents.africa');
if ($code == 'NG') $continent = $modx->lexicon('continents.africa');
if ($code == 'NU') $continent = $modx->lexicon('continents.oceania');
if ($code == 'NF') $continent = $modx->lexicon('continents.oceania');
if ($code == 'MP') $continent = $modx->lexicon('continents.oceania');
if ($code == 'NO') $continent = $modx->lexicon('continents.europe');
if ($code == 'OM') $continent = $modx->lexicon('continents.asia');
if ($code == 'PK') $continent = $modx->lexicon('continents.asia');
if ($code == 'PW') $continent = $modx->lexicon('continents.oceania');
if ($code == 'PS') $continent = $modx->lexicon('continents.asia');
if ($code == 'PA') $continent = $modx->lexicon('continents.north_america');
if ($code == 'PG') $continent = $modx->lexicon('continents.oceania');
if ($code == 'PY') $continent = $modx->lexicon('continents.south_america');
if ($code == 'PE') $continent = $modx->lexicon('continents.south_america');
if ($code == 'PH') $continent = $modx->lexicon('continents.asia');
if ($code == 'PN') $continent = $modx->lexicon('continents.oceania');
if ($code == 'PL') $continent = $modx->lexicon('continents.europe');
if ($code == 'PT') $continent = $modx->lexicon('continents.europe');
if ($code == 'PR') $continent = $modx->lexicon('continents.north_america');
if ($code == 'QA') $continent = $modx->lexicon('continents.asia');
if ($code == 'RE') $continent = $modx->lexicon('continents.africa');
if ($code == 'RO') $continent = $modx->lexicon('continents.europe');
if ($code == 'RU') $continent = $modx->lexicon('continents.europe');
if ($code == 'RW') $continent = $modx->lexicon('continents.africa');
if ($code == 'BL') $continent = $modx->lexicon('continents.north_america');
if ($code == 'SH') $continent = $modx->lexicon('continents.africa');
if ($code == 'KN') $continent = $modx->lexicon('continents.north_america');
if ($code == 'LC') $continent = $modx->lexicon('continents.north_america');
if ($code == 'MF') $continent = $modx->lexicon('continents.north_america');
if ($code == 'PM') $continent = $modx->lexicon('continents.north_america');
if ($code == 'VC') $continent = $modx->lexicon('continents.north_america');
if ($code == 'WS') $continent = $modx->lexicon('continents.oceania');
if ($code == 'SM') $continent = $modx->lexicon('continents.europe');
if ($code == 'ST') $continent = $modx->lexicon('continents.africa');
if ($code == 'SA') $continent = $modx->lexicon('continents.asia');
if ($code == 'SN') $continent = $modx->lexicon('continents.africa');
if ($code == 'RS') $continent = $modx->lexicon('continents.europe');
if ($code == 'SC') $continent = $modx->lexicon('continents.africa');
if ($code == 'SL') $continent = $modx->lexicon('continents.africa');
if ($code == 'SG') $continent = $modx->lexicon('continents.asia');
if ($code == 'SK') $continent = $modx->lexicon('continents.europe');
if ($code == 'SI') $continent = $modx->lexicon('continents.europe');
if ($code == 'SB') $continent = $modx->lexicon('continents.oceania');
if ($code == 'SO') $continent = $modx->lexicon('continents.africa');
if ($code == 'ZA') $continent = $modx->lexicon('continents.africa');
if ($code == 'GS') $continent = $modx->lexicon('continents.antarctica');
if ($code == 'ES') $continent = $modx->lexicon('continents.europe');
if ($code == 'LK') $continent = $modx->lexicon('continents.asia');
if ($code == 'SD') $continent = $modx->lexicon('continents.africa');
if ($code == 'SR') $continent = $modx->lexicon('continents.south_america');
if ($code == 'SJ') $continent = $modx->lexicon('continents.europe');
if ($code == 'SZ') $continent = $modx->lexicon('continents.africa');
if ($code == 'SE') $continent = $modx->lexicon('continents.europe');
if ($code == 'CH') $continent = $modx->lexicon('continents.europe');
if ($code == 'SY') $continent = $modx->lexicon('continents.asia');
if ($code == 'TW') $continent = $modx->lexicon('continents.asia');
if ($code == 'TJ') $continent = $modx->lexicon('continents.asia');
if ($code == 'TZ') $continent = $modx->lexicon('continents.africa');
if ($code == 'TH') $continent = $modx->lexicon('continents.asia');
if ($code == 'TL') $continent = $modx->lexicon('continents.asia');
if ($code == 'TG') $continent = $modx->lexicon('continents.africa');
if ($code == 'TK') $continent = $modx->lexicon('continents.oceania');
if ($code == 'TO') $continent = $modx->lexicon('continents.oceania');
if ($code == 'TT') $continent = $modx->lexicon('continents.north_america');
if ($code == 'TN') $continent = $modx->lexicon('continents.africa');
if ($code == 'TR') $continent = $modx->lexicon('continents.asia');
if ($code == 'TM') $continent = $modx->lexicon('continents.asia');
if ($code == 'TC') $continent = $modx->lexicon('continents.north_america');
if ($code == 'TV') $continent = $modx->lexicon('continents.oceania');
if ($code == 'UG') $continent = $modx->lexicon('continents.africa');
if ($code == 'UA') $continent = $modx->lexicon('continents.europe');
if ($code == 'AE') $continent = $modx->lexicon('continents.asia');
if ($code == 'GB') $continent = $modx->lexicon('continents.europe');
if ($code == 'US') $continent = $modx->lexicon('continents.north_america');
if ($code == 'UM') $continent = $modx->lexicon('continents.oceania');
if ($code == 'VI') $continent = $modx->lexicon('continents.north_america');
if ($code == 'UY') $continent = $modx->lexicon('continents.south_america');
if ($code == 'UZ') $continent = $modx->lexicon('continents.asia');
if ($code == 'VU') $continent = $modx->lexicon('continents.oceania');
if ($code == 'VE') $continent = $modx->lexicon('continents.south_america');
if ($code == 'VN') $continent = $modx->lexicon('continents.asia');
if ($code == 'WF') $continent = $modx->lexicon('continents.oceania');
if ($code == 'EH') $continent = $modx->lexicon('continents.africa');
if ($code == 'YE') $continent = $modx->lexicon('continents.asia');
if ($code == 'ZM') $continent = $modx->lexicon('continents.africa');
if ($code == 'ZW') $continent = $modx->lexicon('continents.africa');
 
return $continent;

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.