This project does not seem to handle request data directly as such no vulnerable execution paths were found.
include
, or for example
via PHP's auto-loading mechanism.
These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
1 | <?php |
||
0 ignored issues
–
show
|
|||
2 | /** |
||
3 | * SSI Test Suite |
||
4 | * |
||
5 | * @package PrintCenter\SSITest |
||
6 | * @since 1.0.0 |
||
7 | * @deprecated |
||
8 | */ |
||
9 | |||
10 | // Exit if accessed directly |
||
11 | if( ! defined( 'ABSPATH' ) ) { |
||
12 | exit; |
||
13 | } |
||
14 | |||
15 | |||
16 | /** |
||
17 | * Render the SSI Test page |
||
18 | * |
||
19 | * @since 1.0.0 |
||
20 | * @return void |
||
21 | * @deprecated |
||
22 | */ |
||
23 | function printcenter_render_settings_page() { |
||
24 | ?> |
||
25 | <div class="wrap"> |
||
26 | <h2>SSI API Test</h2> |
||
27 | <div class="metabox-holder"> |
||
28 | <div class="postbox"> |
||
29 | <h3>Test Framework</h3> |
||
30 | <div class="inside"> |
||
31 | <form method="post"> |
||
32 | <p> |
||
33 | <strong><label for="ssi_custid">Customer ID:</label></strong><br /> |
||
34 | <input type="text" id="ssi_custid" name="ssi_custid" class="small-text"> |
||
35 | </p> |
||
36 | <p> |
||
37 | <strong><label for="ssi_custzip">Customer Zip:</label></strong><br /> |
||
38 | <input type="text" id="ssi_custzip" name="ssi_custzip" class="small-text"> |
||
39 | </p> |
||
40 | <p> |
||
41 | <strong><label for="ssi_po">PO:</label></strong><br /> |
||
42 | <input type="text" id="ssi_po" name="ssi_po" class="small-text"> |
||
43 | </p> |
||
44 | <p> |
||
45 | <strong><label for="ssi_garmentpos">Garment POs:</label></strong><br /> |
||
46 | <input type="text" id="ssi_garmentpos" name="ssi_garmentpos" class="small-text"> |
||
47 | </p> |
||
48 | <hr /> |
||
49 | <p> |
||
50 | <strong><label for="ssi_firstname">First Name:</label></strong><br /> |
||
51 | <input type="text" id="ssi_firstname" name="ssi_firstname" class="regular-text"> |
||
52 | </p> |
||
53 | <p> |
||
54 | <strong><label for="ssi_lastname">Last Name:</label></strong><br /> |
||
55 | <input type="text" id="ssi_lastname" name="ssi_lastname" class="regular-text"> |
||
56 | </p> |
||
57 | <p> |
||
58 | <strong><label for="ssi_adrx1">Address:</label></strong><br /> |
||
59 | <input type="text" id="ssi_adrx1" name="ssi_adrx1" class="regular-text"> |
||
60 | </p> |
||
61 | <p> |
||
62 | <strong><label for="ssi_city">City:</label></strong><br /> |
||
63 | <input type="text" id="ssi_city" name="ssi_city" class="regular-text"> |
||
64 | </p> |
||
65 | <p> |
||
66 | <strong><label for="ssi_state">State:</label></strong><br /> |
||
67 | <select name="ssi_state" placeholder="Select a state"> |
||
68 | <option value="">-- Select a state --</option> |
||
69 | <?php |
||
70 | $states = printcenter_get_states(); |
||
0 ignored issues
–
show
|
|||
71 | |||
72 | foreach( $states as $abbr => $name ) { |
||
73 | echo '<option value="' . $abbr . '">' . $name . '</option>'; |
||
74 | } |
||
75 | ?> |
||
76 | </select> |
||
77 | </p> |
||
78 | <p> |
||
79 | <strong><label for="ssi_zip">Zip:</label></strong><br /> |
||
80 | <input type="text" id="ssi_zip" name="ssi_zip" class="small-text"> |
||
81 | </p> |
||
82 | <p> |
||
83 | <strong><label for="ssi_country">Country:</label></strong><br /> |
||
84 | <select name="ssi_country"> |
||
85 | <option value="">-- Select a country --</option> |
||
86 | <?php |
||
87 | $countries = printcenter_get_countries(); |
||
0 ignored issues
–
show
|
|||
88 | |||
89 | foreach( $countries as $abbr => $name ) { |
||
90 | echo '<option value="' . $abbr . '">' . $name . '</option>'; |
||
91 | } |
||
92 | ?> |
||
93 | </select> |
||
94 | </p> |
||
95 | <p> |
||
96 | <strong><label for="ssi_email">Email:</label></strong><br /> |
||
97 | <input type="text" id="ssi_email" name="ssi_email" class="regular-text"> |
||
98 | </p> |
||
99 | <p> |
||
100 | <strong><label for="ssi_phone">Phone:</label></strong><br /> |
||
101 | <input type="text" id="ssi_phone" name="ssi_phone" class="regular-text"> |
||
102 | </p> |
||
103 | <p> |
||
104 | <strong><label for="ssi_shipmethod">Shipping Method:</label></strong><br /> |
||
105 | <select name="ssi_shipmethod"> |
||
106 | <option value="">-- Select a shipping method --</option> |
||
107 | <?php |
||
108 | $methods = printcenter_get_shipping_methods(); |
||
0 ignored issues
–
show
|
|||
109 | |||
110 | foreach( $methods as $abbr => $name ) { |
||
111 | echo '<option value="' . $abbr . '">' . $name . '</option>'; |
||
112 | } |
||
113 | ?> |
||
114 | </select> |
||
115 | </p> |
||
116 | <hr /> |
||
117 | <p> |
||
118 | <strong><label for="ssi_custsku">Customer SKU:</label></strong><br /> |
||
119 | <input type="text" id="ssi_custsku" name="ssi_custsku" class="small-text"> |
||
120 | </p> |
||
121 | <p> |
||
122 | <strong><label for="ssi_sku">SKU:</label></strong><br /> |
||
123 | <input type="text" id="ssi_sku" name="ssi_sku" class="small-text"> |
||
124 | </p> |
||
125 | <p> |
||
126 | <strong><label for="ssi_descrip">Description:</label></strong><br /> |
||
127 | <input type="text" id="ssi_descrip" name="ssi_descrip" class="regular-text"> |
||
128 | </p> |
||
129 | <p> |
||
130 | <strong><label for="ssi_color">Color:</label></strong><br /> |
||
131 | <input type="text" id="ssi_color" name="ssi_color" class="regular-text"> |
||
132 | </p> |
||
133 | <p> |
||
134 | <strong><label for="ssi_designlocation">Design Location:</label></strong><br /> |
||
135 | <input type="text" id="ssi_designlocation" name="ssi_designlocation" class="regular-text"> |
||
136 | </p> |
||
137 | <p> |
||
138 | <strong><label for="ssi_designtype">Design Type:</label></strong><br /> |
||
139 | <select name="ssi_designtype"> |
||
140 | <option value="">-- Select a design type --</option> |
||
141 | <option value="1">Screen Printing</option> |
||
142 | <option value="2">Embroidery</option> |
||
143 | <option value="3">Direct On Garment</option> |
||
144 | </select> |
||
145 | </p> |
||
146 | <p> |
||
147 | <strong><label for="ssi_designart">Design Art:</label></strong><br /> |
||
148 | <input type="text" id="ssi_designart" name="ssi_designart" class="regular-text"> |
||
149 | </p> |
||
150 | <p> |
||
151 | <strong><label for="ssi_designthumb">Design Thumb:</label></strong><br /> |
||
152 | <input type="text" id="ssi_designthumb" name="ssi_designthumb" class="regular-text"> |
||
153 | </p> |
||
154 | <p> |
||
155 | <strong><label for="ssi_designcategory">Design Category:</label></strong><br /> |
||
156 | <select name="ssi_designcategory"> |
||
157 | <option value="">-- Select a design category --</option> |
||
158 | <option value="SM">Small</option> |
||
159 | <option value="REG">Regular</option> |
||
160 | <option value="LG">Large</option> |
||
161 | </select> |
||
162 | </p> |
||
163 | <p> |
||
164 | <strong><label for="ssi_qty">Quantity:</label></strong><br /> |
||
165 | <input type="text" id="ssi_qty" name="ssi_qty" class="small-text"> |
||
166 | </p> |
||
167 | <p> |
||
168 | <strong><label for="ssi_size">Size:</label></strong><br /> |
||
169 | <input type="text" id="ssi_size" name="ssi_size" class="small-text"> |
||
170 | </p> |
||
171 | <p> |
||
172 | <input type="hidden" name="printcenter-action" value="ssitest" /> |
||
173 | <input type="submit" /> |
||
174 | </p> |
||
175 | </form> |
||
176 | </div> |
||
177 | </div> |
||
178 | </div> |
||
179 | </div> |
||
180 | <?php |
||
181 | } |
||
182 | |||
183 | |||
184 | /** |
||
185 | * Process SSI test data |
||
186 | * |
||
187 | * @since 1.0.0 |
||
188 | * @return void |
||
189 | * @deprecated |
||
190 | */ |
||
191 | function printcenter_run_ssi_test() { |
||
192 | $array = array( |
||
193 | 'DocType' => 'Order', |
||
194 | 'GarmentsProvided' => 'No', |
||
195 | 'CustID' => $_POST['ssi_custid'], |
||
196 | 'CustZip' => $_POST['ssi_custzip'], |
||
197 | 'PO' => $_POST['ssi_po'], |
||
198 | 'GarmentPOs' => $_POST['ssi_garmentpos'], |
||
199 | 'ShipTo' => array( |
||
200 | 'FirstName' => $_POST['ssi_firstname'], |
||
201 | 'LastName' => $_POST['ssi_lastname'], |
||
202 | 'Adrx1' => $_POST['ssi_adrx1'], |
||
203 | 'City' => $_POST['ssi_city'], |
||
204 | 'State' => $_POST['ssi_state'], |
||
205 | 'Zip' => $_POST['ssi_zip'], |
||
206 | 'Country' => $_POST['ssi_country'], |
||
207 | 'Email' => $_POST['ssi_email'], |
||
208 | 'Phone' => $_POST['ssi_phone'] |
||
209 | ), |
||
210 | 'ShipMethod' => $_POST['ssi_shipmethod'], |
||
211 | 'ProductionPriority' => 'Express', |
||
212 | 'OrderNotes' => 'Test purchase', |
||
213 | 'Item' => array( |
||
214 | 'CustSKU' => $_POST['ssi_custsku'], |
||
215 | 'SKU' => $_POST['ssi_sku'], |
||
216 | 'Descrip' => $_POST['ssi_descrip'], |
||
217 | 'Color' => $_POST['ssi_color'], |
||
218 | 'DesignLocation' => $_POST['ssi_designlocation'], |
||
219 | 'DesignType' => $_POST['ssi_designtype'], |
||
220 | 'DesignArt' => $_POST['ssi_designart'], |
||
221 | 'DesignThumb' => $_POST['ssi_designthumb'], |
||
222 | 'DesignCategory' => $_POST['ssi_designcategory'], |
||
223 | 'Qty' => $_POST['ssi_qty'], |
||
224 | 'Size' => $_POST['ssi_size'] |
||
225 | ) |
||
226 | ); |
||
227 | |||
228 | $xml = Array2XML::createXML( 'Request', $array ); |
||
229 | |||
230 | echo '<textarea>' . $xml->saveXML() . '</textarea>'; exit; |
||
0 ignored issues
–
show
The function printcenter_run_ssi_test() contains an exit expression.
An exit expression should only be used in rare cases. For example, if you write a short command line script. In most cases however, using an ![]() |
|||
231 | } |
||
232 | add_action( 'printcenter_ssitest', 'printcenter_run_ssi_test' ); |
||
233 | |||
234 | |||
235 | /** |
||
236 | * Get an array of US states |
||
237 | * |
||
238 | * @since 1.0.0 |
||
239 | * @return array $state_list The array of states |
||
240 | * @deprecated |
||
241 | */ |
||
242 | function printcenter_get_states() { |
||
243 | $state_list = array( |
||
244 | 'AL' => "Alabama", |
||
245 | 'AK' => "Alaska", |
||
246 | 'AZ' => "Arizona", |
||
247 | 'AR' => "Arkansas", |
||
248 | 'CA' => "California", |
||
249 | 'CO' => "Colorado", |
||
250 | 'CT' => "Connecticut", |
||
251 | 'DE' => "Delaware", |
||
252 | 'DC' => "District Of Columbia", |
||
253 | 'FL' => "Florida", |
||
254 | 'GA' => "Georgia", |
||
255 | 'HI' => "Hawaii", |
||
256 | 'ID' => "Idaho", |
||
257 | 'IL' => "Illinois", |
||
258 | 'IN' => "Indiana", 'IA'=>"Iowa", |
||
259 | 'KS' => "Kansas", |
||
260 | 'KY' => "Kentucky", |
||
261 | 'LA' => "Louisiana", |
||
262 | 'ME' => "Maine", |
||
263 | 'MD' => "Maryland", |
||
264 | 'MA' => "Massachusetts", |
||
265 | 'MI' => "Michigan", |
||
266 | 'MN' => "Minnesota", |
||
267 | 'MS' => "Mississippi", |
||
268 | 'MO' => "Missouri", |
||
269 | 'MT' => "Montana", |
||
270 | 'NE' => "Nebraska", |
||
271 | 'NV' => "Nevada", |
||
272 | 'NH' => "New Hampshire", |
||
273 | 'NJ' => "New Jersey", |
||
274 | 'NM' => "New Mexico", |
||
275 | 'NY' => "New York", |
||
276 | 'NC' => "North Carolina", |
||
277 | 'ND' => "North Dakota", |
||
278 | 'OH' => "Ohio", |
||
279 | 'OK' => "Oklahoma", |
||
280 | 'OR' => "Oregon", |
||
281 | 'PA' => "Pennsylvania", |
||
282 | 'RI' => "Rhode Island", |
||
283 | 'SC' => "South Carolina", |
||
284 | 'SD' => "South Dakota", |
||
285 | 'TN' => "Tennessee", |
||
286 | 'TX' => "Texas", |
||
287 | 'UT' => "Utah", |
||
288 | 'VT' => "Vermont", |
||
289 | 'VA' => "Virginia", |
||
290 | 'WA' => "Washington", |
||
291 | 'WV' => "West Virginia", |
||
292 | 'WI' => "Wisconsin", |
||
293 | 'WY' => "Wyoming" |
||
294 | ); |
||
295 | |||
296 | return $state_list; |
||
297 | } |
||
298 | |||
299 | |||
300 | /** |
||
301 | * Get an array of countries |
||
302 | * |
||
303 | * @since 1.0.0 |
||
304 | * @return array $countries The array of countries |
||
305 | * @deprecated |
||
306 | */ |
||
307 | function printcenter_get_countries() { |
||
308 | $countries = array( |
||
309 | 'US' => 'United States', |
||
310 | 'CA' => 'Canada', |
||
311 | 'GB' => 'United Kingdom', |
||
312 | 'AF' => 'Afghanistan', |
||
313 | 'AX' => 'Åland Islands', |
||
314 | 'AL' => 'Albania', |
||
315 | 'DZ' => 'Algeria', |
||
316 | 'AS' => 'American Samoa', |
||
317 | 'AD' => 'Andorra', |
||
318 | 'AO' => 'Angola', |
||
319 | 'AI' => 'Anguilla', |
||
320 | 'AQ' => 'Antarctica', |
||
321 | 'AG' => 'Antigua and Barbuda', |
||
322 | 'AR' => 'Argentina', |
||
323 | 'AM' => 'Armenia', |
||
324 | 'AW' => 'Aruba', |
||
325 | 'AU' => 'Australia', |
||
326 | 'AT' => 'Austria', |
||
327 | 'AZ' => 'Azerbaijan', |
||
328 | 'BS' => 'Bahamas', |
||
329 | 'BH' => 'Bahrain', |
||
330 | 'BD' => 'Bangladesh', |
||
331 | 'BB' => 'Barbados', |
||
332 | 'BY' => 'Belarus', |
||
333 | 'BE' => 'Belgium', |
||
334 | 'BZ' => 'Belize', |
||
335 | 'BJ' => 'Benin', |
||
336 | 'BM' => 'Bermuda', |
||
337 | 'BT' => 'Bhutan', |
||
338 | 'BO' => 'Bolivia', |
||
339 | 'BQ' => 'Bonaire, Saint Eustatius and Saba', |
||
340 | 'BA' => 'Bosnia and Herzegovina', |
||
341 | 'BW' => 'Botswana', |
||
342 | 'BV' => 'Bouvet Island', |
||
343 | 'BR' => 'Brazil', |
||
344 | 'IO' => 'British Indian Ocean Territory', |
||
345 | 'BN' => 'Brunei Darrussalam', |
||
346 | 'BG' => 'Bulgaria', |
||
347 | 'BF' => 'Burkina Faso', |
||
348 | 'BI' => 'Burundi', |
||
349 | 'KH' => 'Cambodia', |
||
350 | 'CM' => 'Cameroon', |
||
351 | 'CV' => 'Cape Verde', |
||
352 | 'KY' => 'Cayman Islands', |
||
353 | 'CF' => 'Central African Republic', |
||
354 | 'TD' => 'Chad', |
||
355 | 'CL' => 'Chile', |
||
356 | 'CN' => 'China', |
||
357 | 'CX' => 'Christmas Island', |
||
358 | 'CC' => 'Cocos Islands', |
||
359 | 'CO' => 'Colombia', |
||
360 | 'KM' => 'Comoros', |
||
361 | 'CD' => 'Congo, Democratic People\'s Republic', |
||
362 | 'CG' => 'Congo, Republic of', |
||
363 | 'CK' => 'Cook Islands', |
||
364 | 'CR' => 'Costa Rica', |
||
365 | 'CI' => 'Cote d\'Ivoire', |
||
366 | 'HR' => 'Croatia/Hrvatska', |
||
367 | 'CU' => 'Cuba', |
||
368 | 'CW' => 'CuraÇao', |
||
369 | 'CY' => 'Cyprus', |
||
370 | 'CZ' => 'Czech Republic', |
||
371 | 'DK' => 'Denmark', |
||
372 | 'DJ' => 'Djibouti', |
||
373 | 'DM' => 'Dominica', |
||
374 | 'DO' => 'Dominican Republic', |
||
375 | 'TP' => 'East Timor', |
||
376 | 'EC' => 'Ecuador', |
||
377 | 'EG' => 'Egypt', |
||
378 | 'GQ' => 'Equatorial Guinea', |
||
379 | 'SV' => 'El Salvador', |
||
380 | 'ER' => 'Eritrea', |
||
381 | 'EE' => 'Estonia', |
||
382 | 'ET' => 'Ethiopia', |
||
383 | 'FK' => 'Falkland Islands', |
||
384 | 'FO' => 'Faroe Islands', |
||
385 | 'FJ' => 'Fiji', |
||
386 | 'FI' => 'Finland', |
||
387 | 'FR' => 'France', |
||
388 | 'GF' => 'French Guiana', |
||
389 | 'PF' => 'French Polynesia', |
||
390 | 'TF' => 'French Southern Territories', |
||
391 | 'GA' => 'Gabon', |
||
392 | 'GM' => 'Gambia', |
||
393 | 'GE' => 'Georgia', |
||
394 | 'DE' => 'Germany', |
||
395 | 'GR' => 'Greece', |
||
396 | 'GH' => 'Ghana', |
||
397 | 'GI' => 'Gibraltar', |
||
398 | 'GL' => 'Greenland', |
||
399 | 'GD' => 'Grenada', |
||
400 | 'GP' => 'Guadeloupe', |
||
401 | 'GU' => 'Guam', |
||
402 | 'GT' => 'Guatemala', |
||
403 | 'GG' => 'Guernsey', |
||
404 | 'GN' => 'Guinea', |
||
405 | 'GW' => 'Guinea-Bissau', |
||
406 | 'GY' => 'Guyana', |
||
407 | 'HT' => 'Haiti', |
||
408 | 'HM' => 'Heard and McDonald Islands', |
||
409 | 'VA' => 'Holy See (City Vatican State)', |
||
410 | 'HN' => 'Honduras', |
||
411 | 'HK' => 'Hong Kong', |
||
412 | 'HU' => 'Hungary', |
||
413 | 'IS' => 'Iceland', |
||
414 | 'IN' => 'India', |
||
415 | 'ID' => 'Indonesia', |
||
416 | 'IR' => 'Iran', |
||
417 | 'IQ' => 'Iraq', |
||
418 | 'IE' => 'Ireland', |
||
419 | 'IM' => 'Isle of Man', |
||
420 | 'IL' => 'Israel', |
||
421 | 'IT' => 'Italy', |
||
422 | 'JM' => 'Jamaica', |
||
423 | 'JP' => 'Japan', |
||
424 | 'JE' => 'Jersey', |
||
425 | 'JO' => 'Jordan', |
||
426 | 'KZ' => 'Kazakhstan', |
||
427 | 'KE' => 'Kenya', |
||
428 | 'KI' => 'Kiribati', |
||
429 | 'KW' => 'Kuwait', |
||
430 | 'KG' => 'Kyrgyzstan', |
||
431 | 'LA' => 'Lao People\'s Democratic Republic', |
||
432 | 'LV' => 'Latvia', |
||
433 | 'LB' => 'Lebanon', |
||
434 | 'LS' => 'Lesotho', |
||
435 | 'LR' => 'Liberia', |
||
436 | 'LY' => 'Libyan Arab Jamahiriya', |
||
437 | 'LI' => 'Liechtenstein', |
||
438 | 'LT' => 'Lithuania', |
||
439 | 'LU' => 'Luxembourg', |
||
440 | 'MO' => 'Macau', |
||
441 | 'MK' => 'Macedonia', |
||
442 | 'MG' => 'Madagascar', |
||
443 | 'MW' => 'Malawi', |
||
444 | 'MY' => 'Malaysia', |
||
445 | 'MV' => 'Maldives', |
||
446 | 'ML' => 'Mali', |
||
447 | 'MT' => 'Malta', |
||
448 | 'MH' => 'Marshall Islands', |
||
449 | 'MQ' => 'Martinique', |
||
450 | 'MR' => 'Mauritania', |
||
451 | 'MU' => 'Mauritius', |
||
452 | 'YT' => 'Mayotte', |
||
453 | 'MX' => 'Mexico', |
||
454 | 'FM' => 'Micronesia', |
||
455 | 'MD' => 'Moldova, Republic of', |
||
456 | 'MC' => 'Monaco', |
||
457 | 'MN' => 'Mongolia', |
||
458 | 'ME' => 'Montenegro', |
||
459 | 'MS' => 'Montserrat', |
||
460 | 'MA' => 'Morocco', |
||
461 | 'MZ' => 'Mozambique', |
||
462 | 'MM' => 'Myanmar', |
||
463 | 'NA' => 'Namibia', |
||
464 | 'NR' => 'Nauru', |
||
465 | 'NP' => 'Nepal', |
||
466 | 'NL' => 'Netherlands', |
||
467 | 'AN' => 'Netherlands Antilles', |
||
468 | 'NC' => 'New Caledonia', |
||
469 | 'NZ' => 'New Zealand', |
||
470 | 'NI' => 'Nicaragua', |
||
471 | 'NE' => 'Niger', |
||
472 | 'NG' => 'Nigeria', |
||
473 | 'NU' => 'Niue', |
||
474 | 'NF' => 'Norfolk Island', |
||
475 | 'KR' => 'North Korea', |
||
476 | 'MP' => 'Northern Mariana Islands', |
||
477 | 'NO' => 'Norway', |
||
478 | 'OM' => 'Oman', |
||
479 | 'PK' => 'Pakistan', |
||
480 | 'PW' => 'Palau', |
||
481 | 'PS' => 'Palestinian Territories', |
||
482 | 'PA' => 'Panama', |
||
483 | 'PG' => 'Papua New Guinea', |
||
484 | 'PY' => 'Paraguay', |
||
485 | 'PE' => 'Peru', |
||
486 | 'PH' => 'Phillipines', |
||
487 | 'PN' => 'Pitcairn Island', |
||
488 | 'PL' => 'Poland', |
||
489 | 'PT' => 'Portugal', |
||
490 | 'PR' => 'Puerto Rico', |
||
491 | 'QA' => 'Qatar', |
||
492 | 'XK' => 'Republic of Kosovo', |
||
493 | 'RE' => 'Reunion Island', |
||
494 | 'RO' => 'Romania', |
||
495 | 'RU' => 'Russian Federation', |
||
496 | 'RW' => 'Rwanda', |
||
497 | 'BL' => 'Saint Barthélemy', |
||
498 | 'SH' => 'Saint Helena', |
||
499 | 'KN' => 'Saint Kitts and Nevis', |
||
500 | 'LC' => 'Saint Lucia', |
||
501 | 'MF' => 'Saint Martin (French)', |
||
502 | 'SX' => 'Saint Martin (Dutch)', |
||
503 | 'PM' => 'Saint Pierre and Miquelon', |
||
504 | 'VC' => 'Saint Vincent and the Grenadines', |
||
505 | 'SM' => 'San Marino', |
||
506 | 'ST' => 'São Tomé and Príncipe', |
||
507 | 'SA' => 'Saudi Arabia', |
||
508 | 'SN' => 'Senegal', |
||
509 | 'RS' => 'Serbia', |
||
510 | 'SC' => 'Seychelles', |
||
511 | 'SL' => 'Sierra Leone', |
||
512 | 'SG' => 'Singapore', |
||
513 | 'SK' => 'Slovak Republic', |
||
514 | 'SI' => 'Slovenia', |
||
515 | 'SB' => 'Solomon Islands', |
||
516 | 'SO' => 'Somalia', |
||
517 | 'ZA' => 'South Africa', |
||
518 | 'GS' => 'South Georgia', |
||
519 | 'KP' => 'South Korea', |
||
520 | 'SS' => 'South Sudan', |
||
521 | 'ES' => 'Spain', |
||
522 | 'LK' => 'Sri Lanka', |
||
523 | 'SD' => 'Sudan', |
||
524 | 'SR' => 'Suriname', |
||
525 | 'SJ' => 'Svalbard and Jan Mayen Islands', |
||
526 | 'SZ' => 'Swaziland', |
||
527 | 'SE' => 'Sweden', |
||
528 | 'CH' => 'Switzerland', |
||
529 | 'SY' => 'Syrian Arab Republic', |
||
530 | 'TW' => 'Taiwan', |
||
531 | 'TJ' => 'Tajikistan', |
||
532 | 'TZ' => 'Tanzania', |
||
533 | 'TH' => 'Thailand', |
||
534 | 'TL' => 'Timor-Leste', |
||
535 | 'TG' => 'Togo', |
||
536 | 'TK' => 'Tokelau', |
||
537 | 'TO' => 'Tonga', |
||
538 | 'TT' => 'Trinidad and Tobago', |
||
539 | 'TN' => 'Tunisia', |
||
540 | 'TR' => 'Turkey', |
||
541 | 'TM' => 'Turkmenistan', |
||
542 | 'TC' => 'Turks and Caicos Islands', |
||
543 | 'TV' => 'Tuvalu', |
||
544 | 'UG' => 'Uganda', |
||
545 | 'UA' => 'Ukraine', |
||
546 | 'AE' => 'United Arab Emirates', |
||
547 | 'UY' => 'Uruguay', |
||
548 | 'UM' => 'US Minor Outlying Islands', |
||
549 | 'UZ' => 'Uzbekistan', |
||
550 | 'VU' => 'Vanuatu', |
||
551 | 'VE' => 'Venezuela', |
||
552 | 'VN' => 'Vietnam', |
||
553 | 'VG' => 'Virgin Islands (British)', |
||
554 | 'VI' => 'Virgin Islands (USA)', |
||
555 | 'WF' => 'Wallis and Futuna Islands', |
||
556 | 'EH' => 'Western Sahara', |
||
557 | 'WS' => 'Western Samoa', |
||
558 | 'YE' => 'Yemen', |
||
559 | 'ZM' => 'Zambia', |
||
560 | 'ZW' => 'Zimbabwe' |
||
561 | ); |
||
562 | |||
563 | return $countries; |
||
564 | } |
||
565 | |||
566 | |||
567 | /** |
||
568 | * Get an array of SSI shipping methods |
||
569 | * |
||
570 | * @since 1.0.0 |
||
571 | * @return array $methods The available shipping methods |
||
572 | * @deprecated |
||
573 | */ |
||
574 | function printcenter_get_shipping_methods() { |
||
575 | $methods = array( |
||
576 | 'UPS Ground' => 'UPS Ground', |
||
577 | 'UPSMIUS' => 'UPS MIUS', |
||
578 | 'UPSMIINT' => 'UPSMIINT', |
||
579 | 'Next Day 8:30' => 'UPS Next Day 8:30', |
||
580 | 'Next Day 10:30' => 'UPS Next Day 10:30', |
||
581 | 'Next Day 3:00' => 'UPS Next Day 3:00', |
||
582 | '2 Day Air' => 'UPS 2 Day Air', |
||
583 | '2 Day Air 12:00' => 'UPS 2 Day Air 12:00', |
||
584 | '3 Day Select' => 'UPS 3 Day Select', |
||
585 | 'Next Day Air Saturday 9:30' => 'UPS Next Day Air Saturday 9:30', |
||
586 | 'Next Day Air Saturday Noon' => 'UPS Next Day Air Saturday Noon', |
||
587 | 'US Mail' => 'US Mail', |
||
588 | 'US Priority Mail' => 'US Priority Mail', |
||
589 | 'First Class Mail' => 'First Class Mail', |
||
590 | 'Priority Mail' => 'Priority Mail', |
||
591 | 'Express Mail' => 'Express Mail', |
||
592 | 'First Class International' => 'First Class International', |
||
593 | 'Priority Mail International' => 'Priority Mail International', |
||
594 | 'Express Mail International' => 'Express Mail International', |
||
595 | 'Fedex Ground' => 'Fedex Ground', |
||
596 | 'Fedex Overnight' => 'Fedex Overnight', |
||
597 | 'AMS' => 'AMS' |
||
598 | ); |
||
599 | |||
600 | return $methods; |
||
601 | } |
||
602 |
The PSR-1: Basic Coding Standard recommends that a file should either introduce new symbols, that is classes, functions, constants or similar, or have side effects. Side effects are anything that executes logic, like for example printing output, changing ini settings or writing to a file.
The idea behind this recommendation is that merely auto-loading a class should not change the state of an application. It also promotes a cleaner style of programming and makes your code less prone to errors, because the logic is not spread out all over the place.
To learn more about the PSR-1, please see the PHP-FIG site on the PSR-1.