]> git.mxchange.org Git - friendica.git/blob - wip/countrylist.php
Initial checkin
[friendica.git] / wip / countrylist.php
1 class CountryListHelper extends FormHelper
2 {
3     
4     var $helpers = array('Form');
5     
6     function select($fieldname, $label, $default="  ", $attributes)
7     {
8         $list = '<div class="input">';
9         $list .= $this->Form->label($fieldname, $label);
10         $list .= $this->Form->select($fieldname , array(
11             '  ' =>    __('Please select a country', true),
12             '--' => __('None', true),
13             'AF' =>    __('Afganistan', true),
14             'AL' =>    __('Albania', true),
15             'DZ' =>    __('Algeria', true),
16             'AS' => __('American Samoa', true),
17             'AD' => __('Andorra', true), 
18             'AO' => __('Angola', true),
19             'AI' => __('Anguilla', true),
20             'AQ' => __('Antarctica', true),
21             'AG' => __('Antigua and Barbuda', true), 
22             'AR' => __('Argentina', true), 
23             'AM' => __('Armenia', true), 
24             'AW' => __('Aruba', true), 
25             'AU' => __('Australia', true), 
26             'AT' => __('Austria', true), 
27             'AZ' => __('Azerbaijan', true),
28             'BS' => __('Bahamas', true), 
29             'BH' => __('Bahrain', true), 
30             'BD' => __('Bangladesh', true),
31             'BB' => __('Barbados', true),
32             'BY' => __('Belarus', true), 
33             'BE' => __('Belgium', true), 
34             'BZ' => __('Belize', true),
35             'BJ' => __('Benin', true), 
36             'BM' => __('Bermuda', true), 
37             'BT' => __('Bhutan', true),
38             'BO' => __('Bolivia', true), 
39             'BA' => __('Bosnia and Herzegowina', true),
40             'BW' => __('Botswana', true),
41             'BV' => __('Bouvet Island', true), 
42             'BR' => __('Brazil', true),
43             'IO' => __('British Indian Ocean Territory', true),
44             'BN' => __('Brunei Darussalam', true), 
45             'BG' => __('Bulgaria', true),
46             'BF' => __('Burkina Faso', true),
47             'BI' => __('Burundi', true), 
48             'KH' => __('Cambodia', true),
49             'CM' => __('Cameroon', true),
50             'CA' => __('Canada', true),
51             'CV' => __('Cape Verde', true),
52             'KY' => __('Cayman Islands', true),
53             'CF' => __('Central African Republic', true),
54             'TD' => __('Chad', true),
55             'CL' => __('Chile', true), 
56             'CN' => __('China', true),
57             'CX' => __('Christmas Island', true),    
58             'CC' => __('Cocos (Keeling) Islands', true), 
59             'CO' => __('Colombia', true),
60             'KM' => __('Comoros', true), 
61             'CG' => __('Congo', true), 
62             'CD' => __('Congo, the Democratic Republic of the', true), 
63             'CK' => __('Cook Islands', true),
64             'CR' => __('Costa Rica', true),
65             'CI' => __('Cote d\'Ivoire', true), 
66             'HR' => __('Croatia (Hrvatska)', true),
67             'CU' => __('Cuba', true),
68             'CY' => __('Cyprus', true),
69             'CZ' => __('Czech Republic', true),
70             'DK' => __('Denmark', true), 
71             'DJ' => __('Djibouti', true),
72             'DM' => __('Dominica', true),
73             'DO' => __('Dominican Republic', true),
74             'TP' => __('East Timor', true),
75             'EC' => __('Ecuador', true), 
76             'EG' => __('Egypt', true), 
77             'SV' => __('El Salvador', true), 
78             'GQ' => __('Equatorial Guinea', true), 
79             'ER' => __('Eritrea', true), 
80             'EE' => __('Estonia', true), 
81             'ET' => __('Ethiopia', true),
82             'FK' => __('Falkland Islands (Malvinas)', true), 
83             'FO' => __('Faroe Islands', true), 
84             'FJ' => __('Fiji', true),
85             'FI' => __('Finland', true),
86             'FR' => __('France', true),
87             'FX' => __('France, Metropolitan', true),
88             'GF' => __('French Guiana', true), 
89             'PF' => __('French Polynesia', true),
90             'TF' => __('French Southern Territories', true), 
91             'GA' => __('Gabon', true), 
92             'GM' => __('Gambia', true),
93             'GE' => __('Georgia', true), 
94             'DE' => __('Germany', true), 
95             'GH' => __('Ghana', true), 
96             'GI' => __('Gibraltar', true), 
97             'GR' => __('Greece', true),
98             'GL' => __('Greenland', true), 
99             'GD' => __('Grenada', true), 
100             'GP' => __('Guadeloupe', true),
101             'GU' => __('Guam', true),
102             'GT' => __('Guatemala', true), 
103             'GN' => __('Guinea', true),
104             'GW' => __('Guinea-Bissau', true), 
105             'GY' => __('Guyana', true),
106             'HT' => __('Haiti', true), 
107             'HM' => __('Heard and Mc Donald Islands', true), 
108             'VA' => __('Holy See (Vatican City State)', true), 
109             'HN' => __('Honduras', true),
110             'HK' => __('Hong Kong', true), 
111             'HU' => __('Hungary', true), 
112             'IS' => __('Iceland', true), 
113             'IN' => __('India', true), 
114             'ID' => __('Indonesia', true), 
115             'IR' => __('Iran (Islamic Republic of)', true),
116             'IQ' => __('Iraq', true),
117             'IE' => __('Ireland', true), 
118             'IL' => __('Israel', true),
119             'IT' => __('Italy', true), 
120             'JM' => __('Jamaica', true), 
121             'JP' => __('Japan', true),
122             'JO' => __('Jordan', true),
123             'KZ' => __('Kazakhstan', true),
124             'KE' => __('Kenya', true), 
125             'KI' => __('Kiribati', true),
126             'KP' => __('Korea, Democratic People\'s Republic of', true),
127             'KR' => __('Korea, Republic of', true),
128             'KW' => __('Kuwait', true),
129             'KG' => __('Kyrgyzstan', true),
130             'LA' => __('Lao People\'s Democratic Republic', true),
131             'LV' => __('Latvia', true),
132             'LB' => __('Lebanon', true),
133             'LS' => __('Lesotho', true), 
134             'LR' => __('Liberia', true), 
135             'LY' => __('Libyan Arab Jamahiriya', true),
136             'LI' => __('Liechtenstein', true), 
137             'LT' => __('Lithuania', true),
138             'LU' => __('Luxembourg', true),
139             'MO' => __('Macau', true), 
140             'MK' => __('Macedonia, The Former Yugoslav Republic of', true),
141             'MG' => __('Madagascar', true),
142             'MW' => __('Malawi', true),
143             'MY' => __('Malaysia', true),
144             'MV' => __('Maldives', true),
145             'ML' => __('Mali', true),
146             'MT' => __('Malta', true),
147             'MH' => __('Marshall Islands', true),
148             'MQ' => __('Martinique', true),
149             'MR' => __('Mauritania', true),
150             'MU' => __('Mauritius', true),
151             'YT' => __('Mayotte', true), 
152             'MX' => __('Mexico', true),
153             'FM' => __('Micronesia, Federated States of', true),
154             'MD' => __('Moldova, Republic of', true),
155             'MC' => __('Monaco', true),
156             'MN' => __('Mongolia', true),
157             'MS' => __('Montserrat', true),
158             'MA' => __('Morocco', true),
159             'MZ' => __('Mozambique', true),
160             'MM' => __('Myanmar', true),
161             'NA' => __('Namibia', true),
162             'NR' => __('Nauru', true), 
163             'NP' => __('Nepal', true), 
164             'NL' => __('Netherlands', true),
165             'AN' => __('Netherlands Antilles', true),
166             'NC' => __('New Caledonia', true),
167             'NZ' => __('New Zealand', true), 
168             'NI' => __('Nicaragua', true), 
169             'NE' => __('Niger', true), 
170             'NG' => __('Nigeria', true), 
171             'NU' => __('Niue', true),
172             'NF' => __('Norfolk Island', true),
173             'MP' => __('Northern Mariana Islands', true),
174             'NO' => __('Norway', true),
175             'OM' => __('Oman', true),
176             'PK' => __('Pakistan', true),
177             'PW' => __('Palau', true),
178             'PA' => __('Panama', true),
179             'PG' => __('Papua New Guinea', true),
180             'PY' => __('Paraguay', true),
181             'PE' => __('Peru', true),
182             'PH' => __('Philippines', true),
183             'PN' => __('Pitcairn', true),
184             'PL' => __('Poland', true),
185             'PT' => __('Portugal', true),
186             'PR' => __('Puerto Rico', true),
187             'QA' => __('Qatar', true),
188             'RE' => __('Reunion', true),
189             'RO' => __('Romania', true),
190             'RU' => __('Russian Federation', true),
191             'RW' => __('Rwanda', true),
192             'KN' => __('Saint Kitts and Nevis', true), 
193             'LC' => __('Saint LUCIA', true), 
194             'VC' => __('Saint Vincent and the Grenadines', true),
195             'WS' => __('Samoa', true), 
196             'SM' => __('San Marino', true),
197             'ST' => __('Sao Tome and Principe', true),
198             'SA' => __('Saudi Arabia', true),
199             'SN' => __('Senegal', true),
200             'SC' => __('Seychelles', true),
201             'SL' => __('Sierra Leone', true),
202             'SG' => __('Singapore', true), 
203             'SK' => __('Slovakia (Slovak Republic)', true),
204             'SI' => __('Slovenia', true),
205             'SB' => __('Solomon Islands', true),
206             'SO' => __('Somalia', true), 
207             'ZA' => __('South Africa', true),
208             'GS' => __('South Georgia and the South Sandwich Islands', true),
209             'ES' => __('Spain', true),
210             'LK' => __('Sri Lanka', true),
211             'SH' => __('St. Helena', true),
212             'PM' => __('St. Pierre and Miquelon', true), 
213             'SD' => __('Sudan', true), 
214             'SR' => __('Suriname', true),
215             'SJ' => __('Svalbard and Jan Mayen Islands', true),
216             'SZ' => __('Swaziland', true), 
217             'SE' => __('Sweden', true),
218             'CH' => __('Switzerland', true), 
219             'SY' => __('Syrian Arab Republic', true),
220             'TW' => __('Taiwan, Province of China', true),
221             'TJ' => __('Tajikistan', true),
222             'TZ' => __('Tanzania, United Republic of', true),
223             'TH' => __('Thailand', true),
224             'TG' => __('Togo', true),
225             'TK' => __('Tokelau', true),
226             'TO' => __('Tonga', true), 
227             'TT' => __('Trinidad and Tobago', true), 
228             'TN' => __('Tunisia', true), 
229             'TR' => __('Turkey', true),
230             'TM' => __('Turkmenistan', true),
231             'TC' => __('Turks and Caicos Islands', true),
232             'TV' => __('Tuvalu', true),
233             'UG' => __('Uganda', true),
234             'UA' => __('Ukraine', true),
235             'AE' => __('United Arab Emirates', true),
236             'GB' => __('United Kingdom', true),
237             'US' => __('United States', true),
238             'UM' => __('United States Minor Outlying Islands', true),
239             'UY' => __('Uruguay', true), 
240             'UZ' => __('Uzbekistan', true),
241             'VU' => __('Vanuatu', true), 
242             'VE' => __('Venezuela', true),
243             'VN' => __('Viet Nam', true),
244             'VG' => __('Virgin Islands (British)', true),
245             'VI' => __('Virgin Islands (U.S.)', true), 
246             'WF' => __('Wallis and Futuna Islands', true), 
247             'EH' => __('Western Sahara', true),
248             'YE' => __('Yemen', true), 
249             'YU' => __('Yugoslavia', true),
250             'ZM' => __('Zambia', true),
251             'ZW' => __('Zimbabwe', true)            
252             ), $default, $attributes);
253         $list .= '</div>';
254         return $this->output($list);
255     }
256
257