9e90ca86 by Marty Penner

Format HTML.php

1 parent 3f710487
1 <?php 1 <?php
2 namespace Tz\WordPress\Tools\HTML; 2 namespace Tz\WordPress\Tools\HTML;
3 3
4 function select_opts(Array $options, $selected = null, $echo = true) { 4 function select_opts(Array $options, $selected = null, $echo = true)
5 {
5 $return = ''; 6 $return = '';
6 7
7 foreach ($options as $val => &$label) { 8 foreach ($options as $val => &$label) {
8 $sel = ($val == $selected ? ' selected' : ''); 9 $sel = ($val == $selected ? ' selected' : '');
9 $string = '<option value="' . $val . '"' . $sel .'>' . $label . '</option>'; 10 $string = '<option value="'.$val.'"'.$sel.'>'.$label.'</option>';
10 11
11 if ($echo) { 12 if ($echo) {
12 echo $string; 13 echo $string;
...@@ -16,39 +17,43 @@ function select_opts(Array $options, $selected = null, $echo = true) { ...@@ -16,39 +17,43 @@ function select_opts(Array $options, $selected = null, $echo = true) {
16 } 17 }
17 18
18 if ($echo) { 19 if ($echo) {
19 echo $return; 20 echo $return;
20 } else { 21 } else {
21 return $return; 22 return $return;
22 } 23 }
23 } 24 }
24 25
25 function select_opts_provinces($selected = null, $echo = true) { 26 function select_opts_provinces($selected = null, $echo = true)
27 {
26 $return = "<option>Select a State/Province</option>"; 28 $return = "<option>Select a State/Province</option>";
27 29
28 $return .= '<optgroup label="Canada">'; 30 $return .= '<optgroup label="Canada">';
29 $return .= select_opts(Vars::$provinces['CA'], $selected, false); 31 $return .= select_opts(Vars::$provinces['CA'], $selected, false);
30 $return .= '</optgroup>'; 32 $return .= '</optgroup>';
31 33
32 $return .= '<optgroup label="United States">'; 34 $return .= '<optgroup label="United States">';
33 $return .= select_opts(Vars::$provinces['US'], $selected, false); 35 $return .= select_opts(Vars::$provinces['US'], $selected, false);
34 $return .= '</optgroup>'; 36 $return .= '</optgroup>';
35 37
36 $return .= '<optgroup label="Other">'; 38 $return .= '<optgroup label="Other">';
37 $return .= '<option value="other">Outside Canada/USA</option>'; 39 $return .= '<option value="other">Outside Canada/USA</option>';
38 $return .= '</optgroup>'; 40 $return .= '</optgroup>';
39 41
40 return $return; 42 return $return;
41 } 43 }
42 44
43 function select_opts_cards($selected = null, $echo = true) { 45 function select_opts_cards($selected = null, $echo = true)
46 {
44 return select_opts(Vars::$creditcards, $selected, $echo); 47 return select_opts(Vars::$creditcards, $selected, $echo);
45 } 48 }
46 49
47 function select_opts_states($selected = null, $echo = true) { 50 function select_opts_states($selected = null, $echo = true)
51 {
48 return select_opts(Vars::$states, $selected, $echo); 52 return select_opts(Vars::$states, $selected, $echo);
49 } 53 }
50 54
51 function select_opts_prefixes($selected = null, $echo = true) { 55 function select_opts_prefixes($selected = null, $echo = true)
56 {
52 return select_opts(Vars::$prefixes, $selected, $echo); 57 return select_opts(Vars::$prefixes, $selected, $echo);
53 } 58 }
54 59
...@@ -71,157 +76,158 @@ function selectOptsPrefixesNoBlank($selected = null) ...@@ -71,157 +76,158 @@ function selectOptsPrefixesNoBlank($selected = null)
71 return $return; 76 return $return;
72 } 77 }
73 78
74 function select_opts_countries($selected = null, $echo = true) { 79 function select_opts_countries($selected = null, $echo = true)
80 {
75 return select_opts(Vars::$countries, $selected, $echo); 81 return select_opts(Vars::$countries, $selected, $echo);
76 } 82 }
77 83
78 function select_opts_securities($selected = null, $echo = true) { 84 function select_opts_securities($selected = null, $echo = true)
85 {
79 return select_opts(Vars::$securities, $selected, $echo); 86 return select_opts(Vars::$securities, $selected, $echo);
80 } 87 }
81 88
82 function validateDate( $date, $format='YYYY-MM-DD') 89 function validateDate($date, $format = 'YYYY-MM-DD')
83 { 90 {
84 switch( $format ) 91 switch ($format) {
85 {
86 case 'YYYY/MM/DD': 92 case 'YYYY/MM/DD':
87 case 'YYYY-MM-DD': 93 case 'YYYY-MM-DD':
88 list( $y, $m, $d ) = preg_split( '/[-\.\/ ]/', $date ); 94 list($y, $m, $d) = preg_split('/[-\.\/ ]/', $date);
89 break; 95 break;
90 96
91 case 'YYYY/DD/MM': 97 case 'YYYY/DD/MM':
92 case 'YYYY-DD-MM': 98 case 'YYYY-DD-MM':
93 list( $y, $d, $m ) = preg_split( '/[-\.\/ ]/', $date ); 99 list($y, $d, $m) = preg_split('/[-\.\/ ]/', $date);
94 break; 100 break;
95 101
96 case 'DD-MM-YYYY': 102 case 'DD-MM-YYYY':
97 case 'DD/MM/YYYY': 103 case 'DD/MM/YYYY':
98 list( $d, $m, $y ) = preg_split( '/[-\.\/ ]/', $date ); 104 list($d, $m, $y) = preg_split('/[-\.\/ ]/', $date);
99 break; 105 break;
100 106
101 case 'MM-DD-YYYY': 107 case 'MM-DD-YYYY':
102 case 'MM/DD/YYYY': 108 case 'MM/DD/YYYY':
103 list( $m, $d, $y ) = preg_split( '/[-\.\/ ]/', $date ); 109 list($m, $d, $y) = preg_split('/[-\.\/ ]/', $date);
104 break; 110 break;
105 111
106 case 'YYYYMMDD': 112 case 'YYYYMMDD':
107 $y = substr( $date, 0, 4 ); 113 $y = substr($date, 0, 4);
108 $m = substr( $date, 4, 2 ); 114 $m = substr($date, 4, 2);
109 $d = substr( $date, 6, 2 ); 115 $d = substr($date, 6, 2);
110 break; 116 break;
111 117
112 case 'YYYYDDMM': 118 case 'YYYYDDMM':
113 $y = substr( $date, 0, 4 ); 119 $y = substr($date, 0, 4);
114 $d = substr( $date, 4, 2 ); 120 $d = substr($date, 4, 2);
115 $m = substr( $date, 6, 2 ); 121 $m = substr($date, 6, 2);
116 break; 122 break;
117 123
118 default: 124 default:
119 throw new Exception( "Invalid Date Format" ); 125 throw new Exception("Invalid Date Format");
120 } 126 }
121 127
122 return checkdate( $m, $d, $y ); 128 return checkdate($m, $d, $y);
123
124 129
125 130
126 } 131 }
127 132
128 function validate_creditcard($cc_num, $type) { 133 function validate_creditcard($cc_num, $type)
129 134 {
130 if($type == "amex") { 135
131 $pattern = "/^([34|37]{2})([0-9]{13})$/"; //American Express 136 if ($type == "amex") {
132 if (preg_match($pattern,$cc_num)) { 137 $pattern = "/^([34|37]{2})([0-9]{13})$/"; //American Express
133 $verified = true; 138 if (preg_match($pattern, $cc_num)) {
134 } else { 139 $verified = true;
135 $verified = false; 140 } else {
136 } 141 $verified = false;
137 } elseif ($type == "mc") { 142 }
138 $pattern = "/^([51|52|53|54|55]{2})([0-9]{14})$/"; //Mastercard 143 } elseif ($type == "mc") {
139 if (preg_match($pattern,$cc_num)) { 144 $pattern = "/^([51|52|53|54|55]{2})([0-9]{14})$/"; //Mastercard
140 $verified = true; 145 if (preg_match($pattern, $cc_num)) {
141 } else { 146 $verified = true;
142 $verified = false; 147 } else {
143 } 148 $verified = false;
144 } elseif ( $type == "visa" ) { 149 }
145 $pattern = "/^([4]{1})([0-9]{12,15})$/"; //Visa 150 } elseif ($type == "visa") {
146 if (preg_match($pattern,$cc_num)) { 151 $pattern = "/^([4]{1})([0-9]{12,15})$/"; //Visa
147 $verified = true; 152 if (preg_match($pattern, $cc_num)) {
148 } else { 153 $verified = true;
149 $verified = false; 154 } else {
150 } 155 $verified = false;
151 } 156 }
157 }
152 158
153 return $verified; 159 return $verified;
154 } 160 }
155 161
156 if ( ! function_exists('form_dropdown')) 162 if (!function_exists('form_dropdown')) {
157 { 163 function form_dropdown($name = '', $options = [], $selected = [], $extra = '', $blankFirstOption = true)
158 function form_dropdown($name = '', $options = array(), $selected = array(), $extra = '', $blankFirstOption = true) 164 {
159 { 165 if (!is_array($selected)) {
160 if ( ! is_array($selected)) 166 $selected = [$selected];
161 { 167 }
162 $selected = array($selected); 168
163 } 169 // If no selected state was submitted we will attempt to set it automatically
164 170 if (count($selected) === 0) {
165 // If no selected state was submitted we will attempt to set it automatically 171 // If the form name appears in the $_POST array we have a winner!
166 if (count($selected) === 0) 172 if (isset($_POST[$name])) {
167 { 173 $selected = [$_POST[$name]];
168 // If the form name appears in the $_POST array we have a winner! 174 }
169 if (isset($_POST[$name])) 175 }
170 { 176
171 $selected = array($_POST[$name]); 177 if ($extra != '') {
172 } 178 $extra = ' '.$extra;
173 } 179 }
174 180
175 if ($extra != '') $extra = ' '.$extra; 181 $multiple = (count($selected) > 1 && strpos($extra, 'multiple') === false) ? ' multiple="multiple"' : '';
176 182
177 $multiple = (count($selected) > 1 && strpos($extra, 'multiple') === false) ? ' multiple="multiple"' : ''; 183 $form = '<select name="'.$name.'"'.$extra.$multiple.">\n";
178
179 $form = '<select name="'.$name.'"'.$extra.$multiple.">\n";
180 if ($blankFirstOption) { 184 if ($blankFirstOption) {
181 $form .= '<option value="">Select...</option>'; 185 $form .= '<option value="">Select...</option>';
182 } 186 }
183 187
184 foreach ($options as $key => $val) 188 foreach ($options as $key => $val) {
185 { 189 $key = (string)$key;
186 $key = (string) $key;
187 190
188 if (is_array($val) && ! empty($val)) 191 if (is_array($val) && !empty($val)) {
189 { 192 $form .= '<optgroup label="'.$key.'">'."\n";
190 $form .= '<optgroup label="'.$key.'">'."\n";
191 193
192 foreach ($val as $optgroup_key => $optgroup_val) 194 foreach ($val as $optgroup_key => $optgroup_val) {
193 { 195 $sel = (in_array($optgroup_key, $selected)) ? ' selected="selected"' : '';
194 $sel = (in_array($optgroup_key, $selected)) ? ' selected="selected"' : '';
195 196
196 $form .= '<option value="'.$optgroup_key.'"'.$sel.'>'.(string) $optgroup_val."</option>\n"; 197 $form .= '<option value="'.$optgroup_key.'"'.$sel.'>'.(string)$optgroup_val."</option>\n";
197 } 198 }
198 199
199 $form .= '</optgroup>'."\n"; 200 $form .= '</optgroup>'."\n";
200 } 201 } else {
201 else 202 $sel = (in_array($key, $selected)) ? ' selected="selected"' : '';
202 {
203 $sel = (in_array($key, $selected)) ? ' selected="selected"' : '';
204 203
205 $form .= '<option value="'.$key.'"'.$sel.'>'.(string) $val."</option>\n"; 204 $form .= '<option value="'.$key.'"'.$sel.'>'.(string)$val."</option>\n";
206 } 205 }
207 } 206 }
208 207
209 $form .= '</select>'; 208 $form .= '</select>';
210 209
211 return $form; 210 return $form;
212 } 211 }
213 } 212 }
214 213
215 function form_linked_dropdown($name = '', $parent = '', $options = array(), $parent_selected = '', $selected = '', $extra = '', $provide_js = true) 214 function form_linked_dropdown(
216 { 215 $name = '',
217 if ($extra != '') $extra = ' '.$extra; 216 $parent = '',
217 $options = [],
218 $parent_selected = '',
219 $selected = '',
220 $extra = '',
221 $provide_js = true
222 ) {
223 if ($extra != '') {
224 $extra = ' '.$extra;
225 }
218 226
219 $form = '<select name="'.$name.'" id="'.$name.'"'.$extra.">\n"; 227 $form = '<select name="'.$name.'" id="'.$name.'"'.$extra.">\n";
220 228
221 if (isset($options[$parent_selected])) 229 if (isset($options[$parent_selected])) {
222 { 230 foreach ($options[$parent_selected] as $key => $val) {
223 foreach ($options[$parent_selected] as $key => $val)
224 {
225 $sel = ($selected != $key) ? '' : ' selected="selected"'; 231 $sel = ($selected != $key) ? '' : ' selected="selected"';
226 232
227 $form .= '<option value="'.$key.'"'.$sel.'>'.$val."</option>\n"; 233 $form .= '<option value="'.$key.'"'.$sel.'>'.$val."</option>\n";
...@@ -231,27 +237,27 @@ function form_linked_dropdown($name = '', $parent = '', $options = array(), $par ...@@ -231,27 +237,27 @@ function form_linked_dropdown($name = '', $parent = '', $options = array(), $par
231 if ($provide_js) { 237 if ($provide_js) {
232 $form .= '</select> 238 $form .= '</select>
233 <script> 239 <script>
234 function update_' . $name . '(value) { 240 function update_'.$name.'(value) {
235 241
236 if (value=="") { 242 if (value=="") {
237 return; 243 return;
238 } 244 }
239 245
240 jQuery("#' . $name . '_custom").attr("disabled","disabled").hide(); 246 jQuery("#'.$name.'_custom").attr("disabled","disabled").hide();
241 jQuery("#' . $name . '").show(); 247 jQuery("#'.$name.'").show();
242 248
243 249
244 var options = new Array(); 250 var options = new Array();
245 var select = document.getElementById("' . $name . '"); 251 var select = document.getElementById("'.$name.'");
246 select.disabled = false; 252 select.disabled = false;
247 while (select.firstChild) 253 while (select.firstChild)
248 select.removeChild(select.firstChild); 254 select.removeChild(select.firstChild);
249 switch (value.toString()) {'; 255 switch (value.toString()) {';
250 foreach ($options as $k => $v) { 256 foreach ($options as $k => $v) {
251 $form .= 'case "' . $k . '": 257 $form .= 'case "'.$k.'":
252 options = new Array('; 258 options = new Array(';
253 foreach ($v as $value => $content) { 259 foreach ($v as $value => $content) {
254 $form .= '"' . $value . '","' . $content . '",'; 260 $form .= '"'.$value.'","'.$content.'",';
255 } 261 }
256 $form = substr($form, 0, -1); 262 $form = substr($form, 0, -1);
257 $form .= '); 263 $form .= ');
...@@ -260,8 +266,9 @@ function form_linked_dropdown($name = '', $parent = '', $options = array(), $par ...@@ -260,8 +266,9 @@ function form_linked_dropdown($name = '', $parent = '', $options = array(), $par
260 $form .= 'default: 266 $form .= 'default:
261 select.disabled = true; 267 select.disabled = true;
262 268
263 jQuery("#' . $name . '").after("<input type=\'text\' name=\'' . $name . '\' id=\'' . $name . '_custom\' class=\'input-field-css input-large\' value=\'' . $selected . '\' />").removeAttr("disabled").show(); 269 jQuery("#'.$name.'").after("<input type=\'text\' name=\''.$name.'\' id=\''.$name
264 jQuery("#' . $name . '").hide(); 270 .'_custom\' class=\'input-field-css input-large\' value=\''.$selected.'\' />").removeAttr("disabled").show();
271 jQuery("#'.$name.'").hide();
265 //options = new Array("other","Other"); 272 //options = new Array("other","Other");
266 return; 273 return;
267 } 274 }
...@@ -277,15 +284,15 @@ function form_linked_dropdown($name = '', $parent = '', $options = array(), $par ...@@ -277,15 +284,15 @@ function form_linked_dropdown($name = '', $parent = '', $options = array(), $par
277 var val = options[i++]; 284 var val = options[i++];
278 option.value = val; 285 option.value = val;
279 option.innerHTML = options[i++]; 286 option.innerHTML = options[i++];
280 if (val == "' . $selected . '") { 287 if (val == "'.$selected.'") {
281 option.selected = true; 288 option.selected = true;
282 } 289 }
283 select.appendChild(option); 290 select.appendChild(option);
284 } 291 }
285 292
286 } 293 }
287 update_' . $name . '(document.getElementById("' . $parent . '").value); 294 update_'.$name.'(document.getElementById("'.$parent.'").value);
288 document.getElementById("' . $parent . '").onchange = function() { update_' . $name . '(this.value); } 295 document.getElementById("'.$parent.'").onchange = function() { update_'.$name.'(this.value); }
289 </script> 296 </script>
290 '; 297 ';
291 } else { 298 } else {
...@@ -293,7 +300,7 @@ function form_linked_dropdown($name = '', $parent = '', $options = array(), $par ...@@ -293,7 +300,7 @@ function form_linked_dropdown($name = '', $parent = '', $options = array(), $par
293 if (array_key_exists($parent_selected, $options)) { 300 if (array_key_exists($parent_selected, $options)) {
294 foreach ($options[$parent_selected] as $name => $option) { 301 foreach ($options[$parent_selected] as $name => $option) {
295 $sel = ($selected == $name) ? ' selected="selected"' : ''; 302 $sel = ($selected == $name) ? ' selected="selected"' : '';
296 $form .= '<option value="' . $name . '"' . $sel . '>' . $option . "</option>\n"; 303 $form .= '<option value="'.$name.'"'.$sel.'>'.$option."</option>\n";
297 } 304 }
298 } 305 }
299 } 306 }
...@@ -302,8 +309,17 @@ function form_linked_dropdown($name = '', $parent = '', $options = array(), $par ...@@ -302,8 +309,17 @@ function form_linked_dropdown($name = '', $parent = '', $options = array(), $par
302 } 309 }
303 310
304 if (!function_exists('formLinkedDropdownWithExtra')) { 311 if (!function_exists('formLinkedDropdownWithExtra')) {
305 function formLinkedDropdownWithExtra($name = '', $parent = '', $options = array(), $parent_selected = '', $selected = '', $extra = '', $provide_js = true, $blankFirstOption = true, $inputExtra = '') 312 function formLinkedDropdownWithExtra(
306 { 313 $name = '',
314 $parent = '',
315 $options = [],
316 $parent_selected = '',
317 $selected = '',
318 $extra = '',
319 $provide_js = true,
320 $blankFirstOption = true,
321 $inputExtra = ''
322 ) {
307 if ($extra != '') { 323 if ($extra != '') {
308 $extra = ' '.$extra; 324 $extra = ' '.$extra;
309 } 325 }
...@@ -378,7 +394,8 @@ if (!function_exists('formLinkedDropdownWithExtra')) { ...@@ -378,7 +394,8 @@ if (!function_exists('formLinkedDropdownWithExtra')) {
378 } 394 }
379 } 395 }
380 396
381 var elem = $("<input type=\'text\' name=\''.$name.'\' id=\''.$name.'_custom\' class=\'input-field-css input-large\' value=\''.$selected.'\' '.$inputExtra.'/>").hide(); 397 var elem = $("<input type=\'text\' name=\''.$name.'\' id=\''.$name
398 .'_custom\' class=\'input-field-css input-large\' value=\''.$selected.'\' '.$inputExtra.'/>").hide();
382 elem.insertAfter(jQuery("#'.$name.'")); 399 elem.insertAfter(jQuery("#'.$name.'"));
383 update_'.$name.'(document.getElementById("'.$parent.'").value); 400 update_'.$name.'(document.getElementById("'.$parent.'").value);
384 document.getElementById("'.$parent.'").onchange = function() { update_'.$name.'(this.value); } 401 document.getElementById("'.$parent.'").onchange = function() { update_'.$name.'(this.value); }
...@@ -398,462 +415,456 @@ if (!function_exists('formLinkedDropdownWithExtra')) { ...@@ -398,462 +415,456 @@ if (!function_exists('formLinkedDropdownWithExtra')) {
398 } 415 }
399 } 416 }
400 417
401 if ( ! function_exists('url_title')) 418 if (!function_exists('url_title')) {
402 { 419 function url_title($str, $separator = 'dash', $lowercase = false)
403 function url_title($str, $separator = 'dash', $lowercase = false) 420 {
404 { 421 if ($separator == 'dash') {
405 if ($separator == 'dash') 422 $search = '_';
406 { 423 $replace = '-';
407 $search = '_'; 424 } else {
408 $replace = '-'; 425 $search = '-';
409 } 426 $replace = '_';
410 else 427 }
411 { 428
412 $search = '-'; 429 $trans = [
413 $replace = '_'; 430 '&\#\d+?;' => '',
414 } 431 '&\S+?;' => '',
415 432 '\s+' => $replace,
416 $trans = array( 433 '[^a-z0-9\-\._]' => '',
417 '&\#\d+?;' => '', 434 $replace.'+' => $replace,
418 '&\S+?;' => '', 435 $replace.'$' => $replace,
419 '\s+' => $replace, 436 '^'.$replace => $replace,
420 '[^a-z0-9\-\._]' => '', 437 '\.+$' => ''
421 $replace.'+' => $replace, 438 ];
422 $replace.'$' => $replace, 439
423 '^'.$replace => $replace, 440 $str = strip_tags($str);
424 '\.+$' => '' 441
425 ); 442 foreach ($trans as $key => $val) {
426 443 $str = preg_replace("#".$key."#i", $val, $str);
427 $str = strip_tags($str); 444 }
428 445
429 foreach ($trans as $key => $val) 446 if ($lowercase === true) {
430 { 447 $str = strtolower($str);
431 $str = preg_replace("#".$key."#i", $val, $str); 448 }
432 } 449
433 450 return trim(stripslashes($str));
434 if ($lowercase === true) 451 }
435 {
436 $str = strtolower($str);
437 }
438
439 return trim(stripslashes($str));
440 }
441 } 452 }
442 453
443 class Vars { 454 class Vars
444 455 {
445 public static $prefixes = Array( 456
446 '' => '-- select --' 457 public static $prefixes = [
447 , 'Mr.' => 'Mr' 458 '' => '-- select --',
448 , 'Mrs.' => 'Mrs.' 459 'Mr.' => 'Mr',
449 , 'Ms.' => 'Ms.' 460 'Mrs.' => 'Mrs.',
450 , 'Miss' => 'Miss' 461 'Ms.' => 'Ms.',
451 , 'Master'=> 'Master' 462 'Miss' => 'Miss',
452 , 'Dr.' => 'Dr.' 463 'Master' => 'Master',
453 , 'Prof.' => 'Prof.' 464 'Dr.' => 'Dr.',
454 ); 465 'Prof.' => 'Prof.'
455 466 ];
456 public static $company_types = Array( 467
457 'advisory_firm' => "Advisory Firm" 468 public static $company_types = [
458 , 'litigation_firm' => "Litigation Firm" 469 'advisory_firm' => "Advisory Firm",
459 , 'venture_capital_firm' => "Venture Capital Firm" 470 'litigation_firm' => "Litigation Firm",
460 , 'public_practice' => "Public Practice" 471 'venture_capital_firm' => "Venture Capital Firm",
461 , 'government' => "Government" 472 'public_practice' => "Public Practice",
462 , '' => "None" 473 'government' => "Government",
463 , 'accounting_firm' => "Accounting Firm" 474 '' => "None",
464 , 'special_valuation' => "Special Valuation" 475 'accounting_firm' => "Accounting Firm",
465 , 'investment_bank' => "Investment Bank" 476 'special_valuation' => "Special Valuation",
466 , 'academia' => "Academia" 477 'investment_bank' => "Investment Bank",
467 , 'financial_institution' => "Financial Institution" 478 'academia' => "Academia",
468 , 'pension_fund_co' => "Pension Fund Management Company" 479 'financial_institution' => "Financial Institution",
469 , 'mutual_fund_co' => "Mutual Fund Management Company" 480 'pension_fund_co' => "Pension Fund Management Company",
470 , 'merchant_bank' => "Merchant Bank" 481 'mutual_fund_co' => "Mutual Fund Management Company",
471 ); 482 'merchant_bank' => "Merchant Bank"
472 483 ];
473 public static $countries = Array( 484
474 'CA' => 'Canada' 485 public static $countries = [
475 , 'US' => 'United States' 486 'CA' => 'Canada',
476 , 'MX' => 'Mexico' 487 'US' => 'United States',
477 , 'AF' => 'Afghanistan' 488 'MX' => 'Mexico',
478 , 'AR' => 'Argentina' 489 'AF' => 'Afghanistan',
479 , 'AX' => 'Åland Islands' 490 'AR' => 'Argentina',
480 , 'AL' => 'Albania' 491 'AX' => 'Åland Islands',
481 , 'DZ' => 'Algeria' 492 'AL' => 'Albania',
482 , 'AS' => 'American Samoa' 493 'DZ' => 'Algeria',
483 , 'AD' => 'Andorra' 494 'AS' => 'American Samoa',
484 , 'AO' => 'Angola' 495 'AD' => 'Andorra',
485 , 'AI' => 'Anguilla' 496 'AO' => 'Angola',
486 , 'AQ' => 'Antarctica' 497 'AI' => 'Anguilla',
487 , 'AG' => 'Antigua and Barbuda' 498 'AQ' => 'Antarctica',
488 , 'AM' => 'Armenia' 499 'AG' => 'Antigua and Barbuda',
489 , 'AW' => 'Aruba' 500 'AM' => 'Armenia',
490 , 'AU' => 'Australia' 501 'AW' => 'Aruba',
491 , 'AT' => 'Austria' 502 'AU' => 'Australia',
492 , 'AZ' => 'Azerbaijan' 503 'AT' => 'Austria',
493 , 'BS' => 'Bahamas' 504 'AZ' => 'Azerbaijan',
494 , 'BH' => 'Bahrain' 505 'BS' => 'Bahamas',
495 , 'BD' => 'Bangladesh' 506 'BH' => 'Bahrain',
496 , 'BB' => 'Barbados' 507 'BD' => 'Bangladesh',
497 , 'BY' => 'Belarus' 508 'BB' => 'Barbados',
498 , 'BE' => 'Belgium' 509 'BY' => 'Belarus',
499 , 'BZ' => 'Belize' 510 'BE' => 'Belgium',
500 , 'BJ' => 'Benin' 511 'BZ' => 'Belize',
501 , 'BM' => 'Bermuda' 512 'BJ' => 'Benin',
502 , 'BT' => 'Bhutan' 513 'BM' => 'Bermuda',
503 , 'BO' => 'Bolivia' 514 'BT' => 'Bhutan',
504 , 'BA' => 'Bosnia and Herzegovina' 515 'BO' => 'Bolivia',
505 , 'BW' => 'Botswana' 516 'BA' => 'Bosnia and Herzegovina',
506 , 'BV' => 'Bouvet Island' 517 'BW' => 'Botswana',
507 , 'BR' => 'Brazil' 518 'BV' => 'Bouvet Island',
508 , 'IO' => 'British Indian Ocean Territory' 519 'BR' => 'Brazil',
509 , 'BN' => 'Brunei Darussalam' 520 'IO' => 'British Indian Ocean Territory',
510 , 'BG' => 'Bulgaria' 521 'BN' => 'Brunei Darussalam',
511 , 'BF' => 'Burkina Faso' 522 'BG' => 'Bulgaria',
512 , 'BI' => 'Burundi' 523 'BF' => 'Burkina Faso',
513 , 'KH' => 'Cambodia' 524 'BI' => 'Burundi',
514 , 'CM' => 'Cameroon' 525 'KH' => 'Cambodia',
515 , 'CV' => 'Cape Verde' 526 'CM' => 'Cameroon',
516 , 'KY' => 'Cayman Islands' 527 'CV' => 'Cape Verde',
517 , 'CF' => 'Central African Republic' 528 'KY' => 'Cayman Islands',
518 , 'TD' => 'Chad' 529 'CF' => 'Central African Republic',
519 , 'CL' => 'Chile' 530 'TD' => 'Chad',
520 , 'CN' => 'China' 531 'CL' => 'Chile',
521 , 'CX' => 'Christmas Island' 532 'CN' => 'China',
522 , 'CC' => 'Cocos (Keeling) Islands' 533 'CX' => 'Christmas Island',
523 , 'CO' => 'Columbia' 534 'CC' => 'Cocos (Keeling) Islands',
524 , 'KM' => 'Comoros' 535 'CO' => 'Columbia',
525 , 'CG' => 'Congo' 536 'KM' => 'Comoros',
526 , 'CD' => 'Congo, The Democratic Republic' 537 'CG' => 'Congo',
527 , 'CK' => 'Cook Islands' 538 'CD' => 'Congo, The Democratic Republic',
528 , 'CR' => 'Costa Rica' 539 'CK' => 'Cook Islands',
529 , 'CI' => 'Cote d’Ivoire – Really Ivory Coast' 540 'CR' => 'Costa Rica',
530 , 'HR' => 'Croatia' 541 'CI' => 'Cote d’Ivoire – Really Ivory Coast',
531 , 'CU' => 'Cuba' 542 'HR' => 'Croatia',
532 , 'CY' => 'Cyprus' 543 'CU' => 'Cuba',
533 , 'CZ' => 'Czech Republic' 544 'CY' => 'Cyprus',
534 , 'DK' => 'Denmark' 545 'CZ' => 'Czech Republic',
535 , 'DJ' => 'Djibouti' 546 'DK' => 'Denmark',
536 , 'DM' => 'Dominica' 547 'DJ' => 'Djibouti',
537 , 'DO' => 'Dominican Republic' 548 'DM' => 'Dominica',
538 , 'TL' => 'East Timor' 549 'DO' => 'Dominican Republic',
539 , 'EC' => 'Ecuador' 550 'TL' => 'East Timor',
540 , 'EG' => 'Egypt' 551 'EC' => 'Ecuador',
541 , 'SV' => 'El Salvador' 552 'EG' => 'Egypt',
542 , 'GQ' => 'Equatorial Guinea' 553 'SV' => 'El Salvador',
543 , 'ER' => 'Eritrea' 554 'GQ' => 'Equatorial Guinea',
544 , 'EE' => 'Estonia' 555 'ER' => 'Eritrea',
545 , 'ET' => 'Ethiopia' 556 'EE' => 'Estonia',
546 , 'FK' => 'Falkland Islands' 557 'ET' => 'Ethiopia',
547 , 'FO' => 'Faroe Islands' 558 'FK' => 'Falkland Islands',
548 , 'FJ' => 'Fiji' 559 'FO' => 'Faroe Islands',
549 , 'FI' => 'Finland' 560 'FJ' => 'Fiji',
550 , 'FR' => 'France' 561 'FI' => 'Finland',
551 , 'GF' => 'French Guiana' 562 'FR' => 'France',
552 , 'PF' => 'French Polynesia' 563 'GF' => 'French Guiana',
553 , 'TF' => 'French Southern Territories' 564 'PF' => 'French Polynesia',
554 , 'GA' => 'Gabon' 565 'TF' => 'French Southern Territories',
555 , 'GM' => 'Gambia' 566 'GA' => 'Gabon',
556 , 'GE' => 'Georgia' 567 'GM' => 'Gambia',
557 , 'DE' => 'Germany' 568 'GE' => 'Georgia',
558 , 'GH' => 'Ghana' 569 'DE' => 'Germany',
559 , 'GI' => 'Gibraltar' 570 'GH' => 'Ghana',
560 , 'GB' => 'Great Britain' 571 'GI' => 'Gibraltar',
561 , 'GR' => 'Greece' 572 'GB' => 'Great Britain',
562 , 'GL' => 'Greenland' 573 'GR' => 'Greece',
563 , 'GD' => 'Grenada' 574 'GL' => 'Greenland',
564 , 'GP' => 'Guadeloupe' 575 'GD' => 'Grenada',
565 , 'GU' => 'Guam' 576 'GP' => 'Guadeloupe',
566 , 'GT' => 'Guatemala' 577 'GU' => 'Guam',
567 , 'GN' => 'Guinea' 578 'GT' => 'Guatemala',
568 , 'GW' => 'Guinea Bissau' 579 'GN' => 'Guinea',
569 , 'GY' => 'Guyana' 580 'GW' => 'Guinea Bissau',
570 , 'HT' => 'Haiti' 581 'GY' => 'Guyana',
571 , 'HM' => 'Heard and McDonald Islands' 582 'HT' => 'Haiti',
572 , 'HN' => 'Honduras' 583 'HM' => 'Heard and McDonald Islands',
573 , 'HK' => 'Hong Kong' 584 'HN' => 'Honduras',
574 , 'HU' => 'Hungary' 585 'HK' => 'Hong Kong',
575 , 'IS' => 'Iceland' 586 'HU' => 'Hungary',
576 , 'IN' => 'India' 587 'IS' => 'Iceland',
577 , 'ID' => 'Indonesia' 588 'IN' => 'India',
578 , 'IR' => 'Iran, Islamic Republic of' 589 'ID' => 'Indonesia',
579 , 'IQ' => 'Iraq' 590 'IR' => 'Iran, Islamic Republic of',
580 , 'IE' => 'Ireland' 591 'IQ' => 'Iraq',
581 , 'IL' => 'Israel' 592 'IE' => 'Ireland',
582 , 'IT' => 'Italy' 593 'IL' => 'Israel',
583 , 'JM' => 'Jamaica' 594 'IT' => 'Italy',
584 , 'JP' => 'Japan' 595 'JM' => 'Jamaica',
585 , 'JO' => 'Jordan' 596 'JP' => 'Japan',
586 , 'KZ' => 'Kazakhstan' 597 'JO' => 'Jordan',
587 , 'KE' => 'Kenya' 598 'KZ' => 'Kazakhstan',
588 , 'KI' => 'Kiribati' 599 'KE' => 'Kenya',
589 , 'KP' => "Korea, Democratic People's Republic" 600 'KI' => 'Kiribati',
590 , 'KR' => 'Korea, Republic of' 601 'KP' => "Korea, Democratic People's Republic",
591 , 'KW' => 'Kuwait' 602 'KR' => 'Korea, Republic of',
592 , 'KG' => 'Kyrgyzstan' 603 'KW' => 'Kuwait',
593 , 'LA' => "Lao People's Democratic Republic" 604 'KG' => 'Kyrgyzstan',
594 , 'LV' => 'Latvia' 605 'LA' => "Lao People's Democratic Republic",
595 , 'LB' => 'Lebanon' 606 'LV' => 'Latvia',
596 , 'LI' => 'Liechtenstein' 607 'LB' => 'Lebanon',
597 , 'LS' => 'Lesotho' 608 'LI' => 'Liechtenstein',
598 , 'LR' => 'Liberia' 609 'LS' => 'Lesotho',
599 , 'LY' => 'Libyan Arab Jamahiriya' 610 'LR' => 'Liberia',
600 , 'LT' => 'Lithuania' 611 'LY' => 'Libyan Arab Jamahiriya',
601 , 'LU' => 'Luxembourg' 612 'LT' => 'Lithuania',
602 , 'MO' => 'Macau' 613 'LU' => 'Luxembourg',
603 , 'MK' => 'Macedonia' 614 'MO' => 'Macau',
604 , 'MG' => 'Madagascar' 615 'MK' => 'Macedonia',
605 , 'MW' => 'Malawi' 616 'MG' => 'Madagascar',
606 , 'MY' => 'Malaysia' 617 'MW' => 'Malawi',
607 , 'MV' => 'Maldives' 618 'MY' => 'Malaysia',
608 , 'ML' => 'Mali' 619 'MV' => 'Maldives',
609 , 'MT' => 'Malta' 620 'ML' => 'Mali',
610 , 'MH' => 'Marshall Islands' 621 'MT' => 'Malta',
611 , 'MQ' => 'Martinique' 622 'MH' => 'Marshall Islands',
612 , 'MR' => 'Mauritania' 623 'MQ' => 'Martinique',
613 , 'MU' => 'Mauritius' 624 'MR' => 'Mauritania',
614 , 'YT' => 'Mayotte' 625 'MU' => 'Mauritius',
615 , 'FM' => "Micronesia, Federated States of" 626 'YT' => 'Mayotte',
616 , 'MD' => 'Moldova, Republic of' 627 'FM' => "Micronesia, Federated States of",
617 , 'MC' => 'Monaco' 628 'MD' => 'Moldova, Republic of',
618 , 'MN' => 'Mongolia' 629 'MC' => 'Monaco',
619 , 'MS' => 'Montserrat' 630 'MN' => 'Mongolia',
620 , 'MA' => 'Morocco' 631 'MS' => 'Montserrat',
621 , 'MZ' => "Mozambique" 632 'MA' => 'Morocco',
622 , 'MM' => 'Myanmar' 633 'MZ' => "Mozambique",
623 , 'NA' => 'Namibia' 634 'MM' => 'Myanmar',
624 , 'NR' => 'Nauru' 635 'NA' => 'Namibia',
625 , 'NP' => 'Nepal' 636 'NR' => 'Nauru',
626 , 'NL' => 'Netherlands' 637 'NP' => 'Nepal',
627 , 'AN' => 'Netherlands Antilles' 638 'NL' => 'Netherlands',
628 , 'NC' => 'New Caledonia' 639 'AN' => 'Netherlands Antilles',
629 , 'NZ' => 'New Zealand' 640 'NC' => 'New Caledonia',
630 , 'NI' => 'Nicaragua' 641 'NZ' => 'New Zealand',
631 , 'NE' => 'Niger' 642 'NI' => 'Nicaragua',
632 , 'NG' => 'Nigeria' 643 'NE' => 'Niger',
633 , 'NU' => 'Niue' 644 'NG' => 'Nigeria',
634 , 'NF' => 'Norfolk Island' 645 'NU' => 'Niue',
635 , 'MP' => 'Northern Mariana Islands' 646 'NF' => 'Norfolk Island',
636 , 'NO' => "Norway" 647 'MP' => 'Northern Mariana Islands',
637 , 'OM' => 'Oman' 648 'NO' => "Norway",
638 , 'PK' => 'Pakistan' 649 'OM' => 'Oman',
639 , 'PW' => 'Palau' 650 'PK' => 'Pakistan',
640 , 'PS' => 'Palestinian Territory, Occupied' 651 'PW' => 'Palau',
641 , 'PA' => 'Panama' 652 'PS' => 'Palestinian Territory, Occupied',
642 , 'PG' => 'Papua New Guinea' 653 'PA' => 'Panama',
643 , 'PY' => 'Paraguay' 654 'PG' => 'Papua New Guinea',
644 , 'PE' => 'Peru' 655 'PY' => 'Paraguay',
645 , 'PH' => 'Philippines' 656 'PE' => 'Peru',
646 , 'PN' => 'Pitcairn' 657 'PH' => 'Philippines',
647 , 'PL' => 'Poland' 658 'PN' => 'Pitcairn',
648 , 'PT' => 'Portugal' 659 'PL' => 'Poland',
649 , 'PR' => 'Puerto Rico' 660 'PT' => 'Portugal',
650 , 'QA' => 'Qatar' 661 'PR' => 'Puerto Rico',
651 , 'RE' => 'Reunion' 662 'QA' => 'Qatar',
652 , 'RO' => 'Romania' 663 'RE' => 'Reunion',
653 , 'RU' => 'Russian Federation' 664 'RO' => 'Romania',
654 , 'RW' => 'Rwanda' 665 'RU' => 'Russian Federation',
655 , 'KN' => 'Saint Kitts and Nevis' 666 'RW' => 'Rwanda',
656 , 'LC' => 'Saint Lucia' 667 'KN' => 'Saint Kitts and Nevis',
657 , 'VC' => 'Saint Vincent and the Grenadines' 668 'LC' => 'Saint Lucia',
658 , 'WS' => 'Samoa' 669 'VC' => 'Saint Vincent and the Grenadines',
659 , 'SM' => 'San Marino' 670 'WS' => 'Samoa',
660 , 'ST' => 'Sao Tome and Principe' 671 'SM' => 'San Marino',
661 , 'SA' => 'Saudi Arabia' 672 'ST' => 'Sao Tome and Principe',
662 , 'SN' => 'Senegal' 673 'SA' => 'Saudi Arabia',
663 , 'CS' => 'Serbia and Montenegro' 674 'SN' => 'Senegal',
664 , 'SC' => 'Seychelles' 675 'CS' => 'Serbia and Montenegro',
665 , 'SL' => 'Sierra Leone' 676 'SC' => 'Seychelles',
666 , 'SG' => 'Singapore' 677 'SL' => 'Sierra Leone',
667 , 'SK' => 'Slovakia' 678 'SG' => 'Singapore',
668 , 'SI' => 'Slovenia' 679 'SK' => 'Slovakia',
669 , 'SB' => 'Solomon Islands' 680 'SI' => 'Slovenia',
670 , 'SO' => 'Somalia' 681 'SB' => 'Solomon Islands',
671 , 'ZA' => 'South Africa' 682 'SO' => 'Somalia',
672 , 'GS' => 'South Georgia – South Sandwich Islands' 683 'ZA' => 'South Africa',
673 , 'ES' => 'Spain' 684 'GS' => 'South Georgia – South Sandwich Islands',
674 , 'LK' => 'Sri Lanka' 685 'ES' => 'Spain',
675 , 'SH' => 'St. Helena' 686 'LK' => 'Sri Lanka',
676 , 'PM' => 'St. Pierre and Miquelon' 687 'SH' => 'St. Helena',
677 , 'SD' => 'Sudan' 688 'PM' => 'St. Pierre and Miquelon',
678 , 'SR' => 'Suriname' 689 'SD' => 'Sudan',
679 , 'SJ' => 'Svalbard and Jan Mayen' 690 'SR' => 'Suriname',
680 , 'SZ' => 'Swaziland' 691 'SJ' => 'Svalbard and Jan Mayen',
681 , 'SE' => 'Sweden' 692 'SZ' => 'Swaziland',
682 , 'CH' => 'Switzerland' 693 'SE' => 'Sweden',
683 , 'SY' => 'Syrian Arab Republic' 694 'CH' => 'Switzerland',
684 , 'TW' => 'Taiwan' 695 'SY' => 'Syrian Arab Republic',
685 , 'TJ' => 'Tajikistan' 696 'TW' => 'Taiwan',
686 , 'TZ' => 'Tanzania, United Republic of' 697 'TJ' => 'Tajikistan',
687 , 'TH' => 'Thailand' 698 'TZ' => 'Tanzania, United Republic of',
688 , 'TG' => 'Togo' 699 'TH' => 'Thailand',
689 , 'TK' => 'Tokelau' 700 'TG' => 'Togo',
690 , 'TO' => 'Tonga' 701 'TK' => 'Tokelau',
691 , 'TT' => 'Trinidad and Tobago' 702 'TO' => 'Tonga',
692 , 'TN' => 'Tunisia' 703 'TT' => 'Trinidad and Tobago',
693 , 'TR' => 'Turkey' 704 'TN' => 'Tunisia',
694 , 'TM' => 'Turkmenistan' 705 'TR' => 'Turkey',
695 , 'TC' => 'Turks and Caicos Islands' 706 'TM' => 'Turkmenistan',
696 , 'TV' => 'Tuvalu' 707 'TC' => 'Turks and Caicos Islands',
697 , 'UG' => 'Uganda' 708 'TV' => 'Tuvalu',
698 , 'UA' => 'Ukraine' 709 'UG' => 'Uganda',
699 , 'AE' => 'United Arab Emirates' 710 'UA' => 'Ukraine',
700 , 'UM' => 'United States Minor Outlying Islands' 711 'AE' => 'United Arab Emirates',
701 , 'UY' => 'Uruguay' 712 'UM' => 'United States Minor Outlying Islands',
702 , 'UZ' => 'Uzbekistan' 713 'UY' => 'Uruguay',
703 , 'VU' => 'Vanuatu' 714 'UZ' => 'Uzbekistan',
704 , 'VA' => 'Vatican City state' 715 'VU' => 'Vanuatu',
705 , 'VE' => 'Venezuela' 716 'VA' => 'Vatican City state',
706 , 'VN' => 'Viet Nam' 717 'VE' => 'Venezuela',
707 , 'VG' => 'Virgin Islands (British)' 718 'VN' => 'Viet Nam',
708 , 'VI' => 'Virgin Islands (US)' 719 'VG' => 'Virgin Islands (British)',
709 , 'WF' => 'Wallis and Futuna' 720 'VI' => 'Virgin Islands (US)',
710 , 'EH' => 'Western Sahara' 721 'WF' => 'Wallis and Futuna',
711 , 'YE' => 'Yemen' 722 'EH' => 'Western Sahara',
712 , 'ZM' => 'Zambia' 723 'YE' => 'Yemen',
713 , 'ZW' => 'Zimbabwe' 724 'ZM' => 'Zambia',
714 ); 725 'ZW' => 'Zimbabwe'
715 726 ];
716 public static $provinces = Array( 727
717 'CA' => array( 728 public static $provinces = [
718 'AB' => 'Alberta' 729 'CA' => [
719 , 'BC' => 'British Columbia' 730 'AB' => 'Alberta',
720 , 'MB' => 'Manitoba' 731 'BC' => 'British Columbia',
721 , 'NB' => 'New Brunswick' 732 'MB' => 'Manitoba',
722 , 'NL' => 'Newfoundland and Labrador' 733 'NB' => 'New Brunswick',
723 , 'NT' => 'Northwest Territories' 734 'NL' => 'Newfoundland and Labrador',
724 , 'NS' => 'Nova Scotia' 735 'NT' => 'Northwest Territories',
725 , 'NU' => 'Nunavut' 736 'NS' => 'Nova Scotia',
726 , 'PE' => 'Prince Edward Island' 737 'NU' => 'Nunavut',
727 , 'SK' => 'Saskatchewan' 738 'PE' => 'Prince Edward Island',
728 , 'ON' => 'Ontario' 739 'SK' => 'Saskatchewan',
729 , 'QC' => 'Quebec' 740 'ON' => 'Ontario',
730 , 'YT' => 'Yukon' 741 'QC' => 'Quebec',
731 ) 742 'YT' => 'Yukon'
732 , 'US' => array( 743 ],
733 'AL' => 'Alabama' 744 'US' => [
734 , 'AK' => 'Alaska' 745 'AL' => 'Alabama',
735 , 'AZ' => 'Arizona' 746 'AK' => 'Alaska',
736 , 'AR' => 'Arkansas' 747 'AZ' => 'Arizona',
737 , 'CA' => 'California' 748 'AR' => 'Arkansas',
738 , 'CO' => 'Colorado' 749 'CA' => 'California',
739 , 'CT' => 'Connecticut' 750 'CO' => 'Colorado',
740 , 'DE' => 'Delaware' 751 'CT' => 'Connecticut',
741 , 'DC' => 'District of Columbia' 752 'DE' => 'Delaware',
742 , 'FL' => 'Florida' 753 'DC' => 'District of Columbia',
743 , 'GA' => 'Georgia' 754 'FL' => 'Florida',
744 , 'GU' => 'Guam' 755 'GA' => 'Georgia',
745 , 'HI' => 'Hawaii' 756 'GU' => 'Guam',
746 , 'ID' => 'Idaho' 757 'HI' => 'Hawaii',
747 , 'IL' => 'Illinois' 758 'ID' => 'Idaho',
748 , 'IN' => 'Indiana' 759 'IL' => 'Illinois',
749 , 'IA' => 'Iowa' 760 'IN' => 'Indiana',
750 , 'KS' => 'Kansas' 761 'IA' => 'Iowa',
751 , 'KY' => 'Kentucky' 762 'KS' => 'Kansas',
752 , 'LA' => 'Louisiana' 763 'KY' => 'Kentucky',
753 , 'ME' => 'Maine' 764 'LA' => 'Louisiana',
754 , 'MD' => 'Maryland' 765 'ME' => 'Maine',
755 , 'MA' => 'Massachusetts' 766 'MD' => 'Maryland',
756 , 'MI' => 'Michigan' 767 'MA' => 'Massachusetts',
757 , 'MN' => 'Minnesota' 768 'MI' => 'Michigan',
758 , 'MS' => 'Mississippi' 769 'MN' => 'Minnesota',
759 , 'MO' => 'Missouri' 770 'MS' => 'Mississippi',
760 , 'MT' => 'Montana' 771 'MO' => 'Missouri',
761 , 'NE' => 'Nebraska' 772 'MT' => 'Montana',
762 , 'NV' => 'Nevada' 773 'NE' => 'Nebraska',
763 , 'NH' => 'New Hampshire' 774 'NV' => 'Nevada',
764 , 'NJ' => 'New Jersey' 775 'NH' => 'New Hampshire',
765 , 'NM' => 'New Mexico' 776 'NJ' => 'New Jersey',
766 , 'NY' => 'New York' 777 'NM' => 'New Mexico',
767 , 'NC' => 'North Carolina' 778 'NY' => 'New York',
768 , 'ND' => 'North Dakota' 779 'NC' => 'North Carolina',
769 , 'OH' => 'Ohio' 780 'ND' => 'North Dakota',
770 , 'OK' => 'Oklahoma' 781 'OH' => 'Ohio',
771 , 'OR' => 'Oregon' 782 'OK' => 'Oklahoma',
772 , 'PA' => 'Pennsylvania' 783 'OR' => 'Oregon',
773 , 'PR' => 'Puerto Rico' 784 'PA' => 'Pennsylvania',
774 , 'RI' => 'Rhode Island' 785 'PR' => 'Puerto Rico',
775 , 'SC' => 'South Carolina' 786 'RI' => 'Rhode Island',
776 , 'SD' => 'South Dakota' 787 'SC' => 'South Carolina',
777 , 'TN' => 'Tennessee' 788 'SD' => 'South Dakota',
778 , 'TX' => 'Texas' 789 'TN' => 'Tennessee',
779 , 'UT' => 'Utah' 790 'TX' => 'Texas',
780 , 'VT' => 'Vermont' 791 'UT' => 'Utah',
781 , 'VA' => 'Virginia' 792 'VT' => 'Vermont',
782 , 'VI' => 'Virgin Islands' 793 'VA' => 'Virginia',
783 , 'WA' => 'Washington' 794 'VI' => 'Virgin Islands',
784 , 'WV' => 'West Virginia' 795 'WA' => 'Washington',
785 , 'WI' => 'Wisconsin' 796 'WV' => 'West Virginia',
786 , 'WY' => 'Wyoming' 797 'WI' => 'Wisconsin',
787 ) 798 'WY' => 'Wyoming'
788 ); 799 ]
789 800 ];
790 public static $securities = Array( 801
791 'S01' => "What is your Mother's maiden name?" 802 public static $securities = [
792 , 'S02' => "Who was you childhood hero?" 803 'S01' => "What is your Mother's maiden name?",
793 , 'S03' => "What is/was the name of your first pet?" 804 'S02' => "Who was you childhood hero?",
794 ); 805 'S03' => "What is/was the name of your first pet?"
795 806 ];
796 public static $creditcards = Array( 807
797 'visa' => "Visa" 808 public static $creditcards = [
798 , 'mc' => "MasterCard" 809 'visa' => "Visa",
799 , 'amex' => "American Express" 810 'mc' => "MasterCard",
800 ); 811 'amex' => "American Express"
801 812 ];
802 public static $states = Array( 813
803 'AL' => 'Alabama' 814 public static $states = [
804 , 'AK' => 'Alaska' 815 'AL' => 'Alabama',
805 , 'AZ' => 'Arizona' 816 'AK' => 'Alaska',
806 , 'AR' => 'Arkansas' 817 'AZ' => 'Arizona',
807 , 'CA' => 'California' 818 'AR' => 'Arkansas',
808 , 'CO' => 'Colorado' 819 'CA' => 'California',
809 , 'CT' => 'Connecticut' 820 'CO' => 'Colorado',
810 , 'DE' => 'Delaware' 821 'CT' => 'Connecticut',
811 , 'DC' => 'District of Columbia' 822 'DE' => 'Delaware',
812 , 'FL' => 'Florida' 823 'DC' => 'District of Columbia',
813 , 'GA' => 'Georgia' 824 'FL' => 'Florida',
814 , 'GU' => 'Guam' 825 'GA' => 'Georgia',
815 , 'HI' => 'Hawaii' 826 'GU' => 'Guam',
816 , 'ID' => 'Idaho' 827 'HI' => 'Hawaii',
817 , 'IL' => 'Illinois' 828 'ID' => 'Idaho',
818 , 'IN' => 'Indiana' 829 'IL' => 'Illinois',
819 , 'IA' => 'Iowa' 830 'IN' => 'Indiana',
820 , 'KS' => 'Kansas' 831 'IA' => 'Iowa',
821 , 'KY' => 'Kentucky' 832 'KS' => 'Kansas',
822 , 'LA' => 'Louisiana' 833 'KY' => 'Kentucky',
823 , 'ME' => 'Maine' 834 'LA' => 'Louisiana',
824 , 'MD' => 'Maryland' 835 'ME' => 'Maine',
825 , 'MA' => 'Massachusetts' 836 'MD' => 'Maryland',
826 , 'MI' => 'Michigan' 837 'MA' => 'Massachusetts',
827 , 'MN' => 'Minnesota' 838 'MI' => 'Michigan',
828 , 'MS' => 'Mississippi' 839 'MN' => 'Minnesota',
829 , 'MO' => 'Missouri' 840 'MS' => 'Mississippi',
830 , 'MT' => 'Montana' 841 'MO' => 'Missouri',
831 , 'NE' => 'Nebraska' 842 'MT' => 'Montana',
832 , 'NV' => 'Nevada' 843 'NE' => 'Nebraska',
833 , 'NH' => 'New Hampshire' 844 'NV' => 'Nevada',
834 , 'NJ' => 'New Jersey' 845 'NH' => 'New Hampshire',
835 , 'NM' => 'New Mexico' 846 'NJ' => 'New Jersey',
836 , 'NY' => 'New York' 847 'NM' => 'New Mexico',
837 , 'NC' => 'North Carolina' 848 'NY' => 'New York',
838 , 'ND' => 'North Dakota' 849 'NC' => 'North Carolina',
839 , 'OH' => 'Ohio' 850 'ND' => 'North Dakota',
840 , 'OK' => 'Oklahoma' 851 'OH' => 'Ohio',
841 , 'OR' => 'Oregon' 852 'OK' => 'Oklahoma',
842 , 'PA' => 'Pennyslvania' 853 'OR' => 'Oregon',
843 , 'PR' => 'Puerto Rico' 854 'PA' => 'Pennyslvania',
844 , 'RI' => 'Rhode Island' 855 'PR' => 'Puerto Rico',
845 , 'SC' => 'South Carolina' 856 'RI' => 'Rhode Island',
846 , 'SD' => 'South Dakota' 857 'SC' => 'South Carolina',
847 , 'TN' => 'Tennessee' 858 'SD' => 'South Dakota',
848 , 'TX' => 'Texas' 859 'TN' => 'Tennessee',
849 , 'UT' => 'Utah' 860 'TX' => 'Texas',
850 , 'VT' => 'Vermont' 861 'UT' => 'Utah',
851 , 'VA' => 'Virginia' 862 'VT' => 'Vermont',
852 , 'VI' => 'Virgin Islands' 863 'VA' => 'Virginia',
853 , 'WA' => 'Washington' 864 'VI' => 'Virgin Islands',
854 , 'WV' => 'West Virginia' 865 'WA' => 'Washington',
855 , 'WI' => 'Wisconsin' 866 'WV' => 'West Virginia',
856 , 'WY' => 'Wyoming' 867 'WI' => 'Wisconsin',
857 ); 868 'WY' => 'Wyoming'
869 ];
858 } 870 }
859 ?>
...\ No newline at end of file ...\ No newline at end of file
......