PluginProbe
WP Directory Kit / 1.2.3
WP Directory Kit v1.2.3
1.5.6 1.5.5 1.5.4 1.5.3 trunk 1.1.0 1.1.6 1.1.8 1.2.3 1.2.4 1.2.5 1.2.6 1.2.7 1.2.8 1.2.9 1.3.0 1.3.1 1.3.2 1.3.3 1.3.4 1.3.5 1.3.6 1.3.8 1.4.0 1.4.1 All 35 releases
wpdirectorykit / application / controllers / Wdk_frontendajax.php

Wdk_frontendajax.php in WP Directory Kit 1.2.3, at application/controllers/Wdk_frontendajax.php

1,141 lines 44.9 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly;
3
4 class Wdk_frontendajax extends Winter_MVC_Controller {
5
6 public function __construct(){
7 if(defined( 'WP_DEBUG' ) && WP_DEBUG) {
8 ini_set('display_errors',1);
9 ini_set('display_startup_errors',1);
10 error_reporting(-1);
11 }
12
13 parent::__construct();
14
15 $this->data['is_ajax'] = true;
16
17 }
18
19 public function index(&$output=NULL, $atts=array())
20 {
21
22 }
23
24 public function map_infowindow() {
25 $this->load->load_helper('listing');
26 $this->load->model('listing_m');
27 $this->load->model('listingfield_m');
28
29 $data = array();
30 $data['message'] = '';
31 $listing_post_id = NULL;
32 if(isset($_POST['listing_post_id']))
33 $listing_post_id = sanitize_text_field($_POST['listing_post_id']);
34
35 $listing = $this->load->listing_m->get($listing_post_id, TRUE);
36
37 if(!empty($listing)) {
38 $data['popup_content'] = wdk_listing_card($listing, array('infobox' => true), false, '<div class="infobox map-box">%1$s<div>');
39 } else {
40 $data['popup_content'] = __( 'Listing is missing', 'wpdirectorykit' );
41 }
42
43 $data['success'] = true;
44
45 $this->output($data);
46 }
47
48 public function map_infowindow_dash() {
49 $this->load->load_helper('listing');
50 $this->load->model('listing_m');
51 $this->load->model('listingfield_m');
52
53 $data = array();
54 $data['message'] = '';
55 $listing_post_id = NULL;
56 if(isset($_POST['listing_post_id']))
57 $listing_post_id = sanitize_text_field($_POST['listing_post_id']);
58
59 $listing = $this->load->listing_m->get($listing_post_id, TRUE);
60
61 if(!empty($listing)) {
62 $data['popup_content'] = wdk_listing_card($listing, [], false, '<div class="infobox map-box">%1$s<div>', 'result_item_card_dash_edit');
63 } else {
64 $data['popup_content'] = __( 'Listing is missing', 'wpdirectorykit' );
65 }
66
67 $data['success'] = true;
68
69 $this->output($data);
70 }
71
72 public function treefieldid($output="", $atts=array(), $instance=NULL)
73 {
74 $this->load->load_helper('listing');
75 $this->load->model('listing_m');
76 $this->load->model('listingfield_m');
77
78 $data = array();
79 $data['message'] = __('No message returned!', 'wpdirectorykit');
80 $results = array();
81
82 $parameters = array();
83
84 foreach ($_POST as $key => $value) {
85 $parameters[$key] = sanitize_text_field($value);
86 }
87
88 $table_name = $table = $parameters['table'];
89
90 if(empty($parameters['empty_value']))
91 $parameters['empty_value'] = ' - ';
92
93 if(empty($parameters['limit']))
94 $parameters['limit'] = 10;
95
96 if(empty($parameters['attribute_id']))
97 $parameters['attribute_id'] = 'id';
98
99 if(empty($parameters['attribute_value']))
100 $parameters['attribute_value'] = 'address';
101
102 if(empty($parameters['offset']))
103 $parameters['offset'] = 0;
104
105 $start_id = '';
106 if(isset($parameters['start_id']))
107 $start_id = $parameters['start_id'];
108
109 if($parameters['offset'] == 0) // currently don't have load_more functionality'
110
111 if(!empty($parameters['empty_value']))
112 {
113 $results[0]['key'] = '';
114 $results[0]['value'] = sanitize_text_field($parameters['empty_value']);
115 }
116
117 // it's model
118
119 if($table == 'calendar_listing_m')
120 $table = 'listing_m';
121
122 $table_name = substr($table,0, -2);
123 $attr_id = sanitize_text_field($parameters['attribute_id']);
124 $attr_val = sanitize_text_field($parameters['attribute_value']);
125 $attr_search = sanitize_text_field($parameters['search_term']);
126 $skip_id = intval($parameters['skip_id']);
127 $language_id = intval($parameters['language_id']);
128
129 if(empty($language_id))
130 $language_id = NULL;
131
132 $id_part="";
133 if(is_numeric($attr_search))
134 $id_part = "$attr_id=$attr_search OR ";
135
136 if($table == 'icons_list') {
137 $icons = $this->get_fa_icons();
138
139 $tree_results = array();
140
141 if(empty($attr_search)) {
142 $tree_results = $icons;
143 } else {
144 foreach ($icons as $c){
145 if (stripos($c, $attr_search) !== FALSE){
146 //if $c starts with $input, add to matches list
147 $tree_results[] = $c;
148 } else if (strcmp($attr_search, $c) < 0){
149 //$input comes after $c in alpha order
150 //since $colors is sorted, we know that we won't find any more matches
151 continue;
152 }
153 }
154 }
155 $tree_results = array_slice($tree_results,intval($parameters['offset']), intval($parameters['limit']));
156 // limit
157
158 } else {
159 $this->load->model($table);
160
161 $where = array();
162 if(!empty($attr_search))
163 $where["($id_part $attr_val LIKE '%$attr_search%')"] = NULL;
164
165 if(!empty($parameters['attr_search']))
166 $where[$parameters['attr_search']] = NULL;
167
168 if(isset($parameters['user_check']) && ($parameters['user_check'] == 'true' || $parameters['user_check'] == '1')) {
169 if($table == 'listing_m') {
170 if($parameters['table'] == 'calendar_listing_m') {
171 global $Winter_MVC_wdk_bookings;
172 $Winter_MVC_wdk_bookings->model('calendar_m');
173 $this->db->join($Winter_MVC_wdk_bookings->calendar_m->_table_name.' ON '.$this->$table->_table_name.'.post_id = '.$Winter_MVC_wdk_bookings->calendar_m->_table_name.'.post_id');
174 }
175
176 $tree_results = $this->$table->get_pagination(intval($parameters['limit']),intval($parameters['offset']), $where, TRUE, get_current_user_id());
177 } else {
178
179 if(!empty($parameters['filter_ids'])){
180 $this->db->where(array( esc_sql($this->$table->_primary_key).' IN ('.esc_sql($parameters['filter_ids']).')' => NULL));
181 }
182
183 $tree_results = $this->$table->get_pagination(intval($parameters['limit']),intval($parameters['offset']), $where );
184 }
185 } else {
186 if($parameters['table'] == 'calendar_listing_m') {
187 global $Winter_MVC_wdk_bookings;
188 $Winter_MVC_wdk_bookings->model('calendar_m');
189 $this->db->join($Winter_MVC_wdk_bookings->calendar_m->_table_name.' ON '.$this->$table->_table_name.'.post_id = '.$Winter_MVC_wdk_bookings->calendar_m->_table_name.'.post_id');
190 }
191
192 if(!empty($parameters['filter_ids'])){
193 $this->db->where(array( esc_sql($this->$table->_primary_key).' IN ('.esc_sql($parameters['filter_ids']).')' => NULL));
194 }
195
196 if($table == 'user_m') {
197 $like = "(meta_value LIKE '%wdk_%' )";
198 $tree_results = $this->$table->get_pagination(intval($parameters['limit']),intval($parameters['offset']), $where, NULL, $like);
199
200 } else {
201 $tree_results = $this->$table->get_pagination(intval($parameters['limit']),intval($parameters['offset']), $where);
202 }
203
204 }
205 }
206
207 $ind_order=1;
208 foreach ($tree_results as $key=>$row)
209 {
210 $level_gen='';
211 if(empty($attr_search) && isset($row->level))
212 $level_gen = str_pad('', $row->level*12, '&nbsp;').'';
213
214 $results[$ind_order]['key'] = wmvc_show_data($attr_id, $row);
215 if($table == 'listing_m') {
216 $results[$ind_order]['value'] = $level_gen
217 .'#'.wmvc_show_data($attr_id, $row).', '.wmvc_show_data($attr_val, $row);
218 } elseif($table == 'user_m') {
219 $results[$ind_order]['value'] = $level_gen
220 .'#'.wmvc_show_data($attr_id, $row).', '.wmvc_show_data($attr_val, $row).' ('.wmvc_show_data('user_email', $row).')';
221 } elseif($table == 'icons_list') {
222 $results[$ind_order]['key'] = $row;
223 if(defined('ELEMENTOR_ASSETS_URL')){
224 $results[$ind_order]['value'] = '<i class="'. $row.'"></i>&nbsp;&nbsp;'.$row;
225 } else {
226 $results[$ind_order]['value'] = $row;
227 }
228 } else {
229 $results[$ind_order]['value'] = $level_gen
230 .esc_html__(wmvc_show_data($attr_val, $row), 'wpdirectorykit');
231 }
232 $ind_order++;
233 }
234
235
236 // get current value by ID
237 $row=NULL;
238 if($table == 'icons_list') {
239 if(!empty($parameters['curr_id'])) {
240 $row = '<i class="'. $parameters['curr_id'].'"></i>&nbsp;&nbsp;'.$parameters['curr_id'];
241 }
242 } else {
243 if(!empty($parameters['curr_id']))
244 $row = $this->$table->get(intval($parameters['curr_id']), TRUE);
245 }
246
247 if($table == 'icons_list') {
248 $data['curr_val'] = $row;
249 }elseif(is_object($row))
250 {
251 $level_gen='';
252 if(isset($row->level))
253 $level_gen = str_pad('', $row->level*12, '&nbsp;').'';
254
255 if($table == 'user_m') {
256 $data['curr_val'] = $level_gen
257 .wmvc_show_data(wmvc_show_data('attribute_value', $parameters), $row).' ('.wmvc_show_data('user_email', $row).')'.' #'.wmvc_show_data($attr_id, $row);
258 } else {
259 $data['curr_val'] = $level_gen
260 .esc_html__(wmvc_show_data(wmvc_show_data('attribute_value', $parameters), $row), 'wpdirectorykit');
261 }
262
263
264 //if(!empty($start_id) && $start_id == $parameters['curr_id'] && isset($parameters['sub_empty_value']) && !empty($parameters['sub_empty_value'])) $this->data['curr_val'] = wmvc_show_data('sub_empty_value', $parameters);
265 //elseif(!empty($start_id) && $start_id == $parameters['curr_id']) $this->data['curr_val'] = $parameters['empty_value'];
266 }
267 else
268 {
269 $data['curr_val'] = $parameters['empty_value'];
270 }
271
272 $this->data['success'] = true;
273
274 $data['results'] = $results;
275 //$data['sql'] = $this->db->last_query();
276 $this->output($data);
277 }
278
279 public function treefieldid_checkboxes($output="", $atts=array(), $instance=NULL)
280 {
281 $this->load->load_helper('listing');
282 $this->load->model('listing_m');
283 $this->load->model('listingfield_m');
284
285 $data = array();
286 $data['message'] = __('No message returned!', 'wpdirectorykit');
287 $results = array();
288
289 $parameters = array();
290
291 foreach ($_POST as $key => $value) {
292 $parameters[$key] = sanitize_text_field($value);
293 }
294
295 $table_name = $table = $parameters['table'];
296
297 if(empty($parameters['empty_value']))
298 $parameters['empty_value'] = ' - ';
299
300 if(empty($parameters['limit']))
301 $parameters['limit'] = 10;
302
303 if(empty($parameters['attribute_id']))
304 $parameters['attribute_id'] = 'id';
305
306 if(empty($parameters['attribute_value']))
307 $parameters['attribute_value'] = 'address';
308
309 if(empty($parameters['offset']))
310 $parameters['offset'] = 0;
311
312 $start_id = '';
313 if(isset($parameters['start_id']))
314 $start_id = $parameters['start_id'];
315
316 if($parameters['offset'] == 0) // currently don't have load_more functionality'
317
318 if(!empty($parameters['empty_value']))
319 {
320 $results[0]['key'] = '';
321 $results[0]['value'] = sanitize_text_field($parameters['empty_value']);
322 }
323
324 // it's model
325
326 if($table == 'calendar_listing_m')
327 $table = 'listing_m';
328
329 $table_name = substr($table,0, -2);
330 $attr_id = sanitize_text_field($parameters['attribute_id']);
331 $attr_val = sanitize_text_field($parameters['attribute_value']);
332 $attr_search = sanitize_text_field($parameters['search_term']);
333 $skip_id = intval($parameters['skip_id']);
334 $language_id = intval($parameters['language_id']);
335
336 if(empty($language_id))
337 $language_id = NULL;
338
339 $id_part="";
340 if(is_numeric($attr_search))
341 $id_part = "$attr_id=$attr_search OR ";
342
343 $this->load->model($table);
344
345 $where = array();
346 if(!empty($attr_search))
347 $where["($id_part $attr_val LIKE '%$attr_search%')"] = NULL;
348
349 if(isset($parameters['selected']) && !empty($parameters['selected'])) {
350
351 if(is_string($parameters['selected']) && strpos($parameters['selected'], ',') !== FALSE){
352 $selected = explode(',', $parameters['selected']);
353 } elseif(is_string($parameters['selected'])){
354 $selected = array($parameters['selected']);
355 }
356
357 $ids = array();
358 foreach($selected as $selected_item) {
359 if(!empty($selected_item) && is_intval($selected_item)) {
360 $ids [] = $selected_item;
361 }
362 }
363
364 /* where in */
365 if(!empty($ids)){
366 $this->db->order_by('FIELD('.$this->$table->_table_name.'.'.$this->$table->_primary_key.', '. implode(',', array_reverse($ids)) . ') DESC');
367 if(intval($parameters['limit']) < count($ids)) {
368 $parameters['limit'] = count($ids);
369 }
370 }
371 }
372
373 if(!empty($parameters['filter_ids'])){
374 $this->db->where(array( esc_sql($this->$table->_primary_key).' IN ('.esc_sql($parameters['filter_ids']).')' => NULL));
375 }
376
377 $tree_results = $this->$table->get_pagination(intval($parameters['limit']),intval($parameters['offset']), $where);
378
379 $ind_order=1;
380 foreach ($tree_results as $key=>$row)
381 {
382 $level_gen='';
383 if(empty($attr_search) && isset($row->level))
384 $level_gen = str_pad('', $row->level*12, '&nbsp;').'';
385
386 $results[$ind_order]['key'] = wmvc_show_data($attr_id, $row);
387 $results[$ind_order]['value'] = $level_gen
388 .esc_html__(wmvc_show_data($attr_val, $row), 'wpdirectorykit');
389 $ind_order++;
390 }
391
392 // get current value by ID
393 $row=NULL;
394 if(!empty($parameters['curr_id']))
395 $row = $this->$table->get(intval($parameters['curr_id']), TRUE);
396
397 if(is_object($row))
398 {
399 $level_gen='';
400 if(isset($row->level))
401 $level_gen = str_pad('', $row->level*12, '&nbsp;').'';
402
403 $data['curr_val'] = $level_gen
404 .esc_html__(wmvc_show_data(wmvc_show_data('attribute_value', $parameters), $row), 'wpdirectorykit');
405
406 }
407 else
408 {
409 $data['curr_val'] = $parameters['empty_value'];
410 }
411
412 $this->data['success'] = true;
413
414 $data['results'] = $results;
415 //$data['sql'] = $this->db->last_query();
416 $this->output($data);
417 }
418
419 private function output($data, $print = TRUE) {
420 if($print) {
421 header('Pragma: no-cache');
422 header('Cache-Control: no-store, no-cache');
423 header('Content-Type: application/json; charset=utf8');
424 //header('Content-Length: '.$length); // special characters causing troubles
425 echo (wp_json_encode($data));
426 exit();
427 } else {
428 return $data;
429 }
430 }
431
432
433 public function select_2_ajax($output="", $atts=array(), $instance=NULL)
434 {
435 $this->load->load_helper('listing');
436 $this->load->model('listing_m');
437 $this->load->model('listingfield_m');
438
439 $data = array();
440 $data['message'] = __('No message returned!', 'wpdirectorykit');
441 $results = array();
442 $data['pagination'] = true;
443 $parameters = array();
444
445 foreach ($_POST as $key => $value) {
446 $parameters[$key] = sanitize_text_field($value);
447 }
448
449 if(empty($parameters['table'])) return false;
450
451 $model_name = $parameters['table'];
452
453 $key_column = '';
454 $print_column = '';
455
456 $search_column = '';
457 if(empty($parameters['columns_search'])) {
458 switch ($model_name) {
459 case 'category_m':
460 $search_column = 'idcategory,category_title';
461 break;
462 case 'location_m':
463 $search_column = 'idlocation,location_title';
464 break;
465
466 default:
467 # code...
468 break;
469 }
470 } else {
471 $search_column = $parameters['columns_search'];
472 }
473
474 if(empty($parameters['key_column'])) {
475 switch ($model_name) {
476 case 'category_m':
477 $key_column = 'idcategory';
478 break;
479 case 'location_m':
480 $key_column = 'idlocation';
481 break;
482
483 default:
484 # code...
485 break;
486 }
487 } else {
488 $key_column = $parameters['key_column'];
489 }
490
491 if(empty($parameters['print_column'])) {
492 switch ($model_name) {
493 case 'category_m':
494 $print_column = 'category_title';
495 break;
496 case 'location_m':
497 $print_column = 'location_title';
498 break;
499
500 default:
501 # code...
502 break;
503 }
504 } else {
505 $print_column = $parameters['print_column'];
506 }
507
508 $limit = 20;
509 if(!empty($parameters['limit'])) {
510 $limit = intval($parameters['limit']);
511 }
512
513 $offset = NULL;
514 if(!empty($parameters['page_result']) && $parameters['page_result'] > 1) {
515 $offset = (intval($parameters['page_result']) - 1) * $limit;
516 }
517
518 $this->load->model($model_name);
519
520 $where = array();
521 if(!empty($_POST['q']['term']) && !empty($search_column)) {
522 $sql_search = '';
523 foreach (explode(',', $search_column) as $column) {
524 if(empty($column)) continue;
525
526 if(!empty($sql_search))
527 $sql_search .= " OR ";
528
529 $sql_search .= " ".esc_sql($column)." LIKE '%".esc_sql($_POST['q']['term'])."%'";
530 }
531
532 $where ["($sql_search)"] = NULL;
533 }
534
535 $db_results_total = $this->$model_name->total($where);
536 $db_results = $this->$model_name->get_pagination($limit,$offset, $where);
537 $data['output'] = $db_results;
538
539 if (!$db_results) {
540 $data['errors'] = '';
541 } else {
542 foreach($db_results as $row) {
543
544 $level_gen='';
545 if(empty($attr_search) && isset($row->level))
546 $level_gen = str_pad('', $row->level*12, '&nbsp;').'';
547
548 $results[] = [
549 'id'=> wmvc_show_data($key_column, $row),
550 'text'=> $level_gen.esc_html__(trim(wmvc_show_data($print_column, $row)), 'wpdirectorykit'),
551 ];
552 }
553
554 }
555
556 $data['success'] = true;
557
558 $data['results'] = $results;
559
560
561 if($db_results_total >= $limit + $offset) {
562 $data['pagination'] =[
563 "more"=> true
564 ];
565 }
566
567 //$data['sql'] = $this->db->last_query();
568 $this->output($data);
569 }
570
571 public function select_2_ajax_user($output="", $atts=array(), $instance=NULL)
572 {
573 $this->load->load_helper('listing');
574
575 $data = array();
576 $data['message'] = __('No message returned!', 'wpdirectorykit');
577 $results = array();
578 $data['pagination'] = true;
579 $parameters = array();
580
581 foreach ($_POST as $key => $value) {
582 $parameters[$key] = sanitize_text_field($value);
583 }
584
585 $model_name = 'user_m';
586
587 $key_column = '';
588 $print_column = '';
589
590 $limit = 20;
591 if(!empty($parameters['limit'])) {
592 $limit = intval($parameters['limit']);
593 }
594
595 $offset = NULL;
596 if(!empty($parameters['page_result']) && $parameters['page_result'] > 1) {
597 $offset = (intval($parameters['page_result']) - 1) * $limit;
598 }
599
600 $this->load->model($model_name);
601 $search_column = 'display_name,user_email,user_login,ID';
602 $where = array();
603 if(!empty($_POST['q']['term']) && !empty($search_column)) {
604 $sql_search = '';
605 foreach (explode(',', $search_column) as $column) {
606 if(empty($column)) continue;
607
608 if(!empty($sql_search))
609 $sql_search .= " OR ";
610
611 $sql_search .= " ".esc_sql($column)." LIKE '%".esc_sql($_POST['q']['term'])."%'";
612 }
613
614 $where ["($sql_search)"] = NULL;
615 }
616
617 $like = "(meta_value LIKE '%wdk_%' )";
618 $db_results_total = $this->$model_name->total($where, NULL, $like);
619
620 $db_results = $this->$model_name->get_pagination($limit,$offset, $where, NULL, $like);
621 $data['output'] = $db_results;
622
623 if (!$db_results) {
624 $data['errors'] = '';
625 } else {
626 foreach($db_results as $row) {
627
628 $level_gen='';
629 //if(empty($attr_search) && isset($row->level))
630 // $level_gen = str_pad('', $row->level*12, '&nbsp;').'';
631
632 $results[] = [
633 'id'=> wmvc_show_data('ID', $row),
634 'text'=> $level_gen.trim(wmvc_show_data('display_name', $row)),
635 ];
636 }
637
638 }
639
640 $data['success'] = true;
641
642 $data['results'] = $results;
643 if($db_results_total >= $limit + $offset) {
644 $data['pagination'] =[
645 "more"=> true
646 ];
647 }
648
649 //$data['sql'] = $this->db->last_query();
650 $this->output($data);
651 }
652
653
654 public function wdk_tree_dropdowns($output="", $atts=array(), $instance=NULL)
655 {
656 $this->load->load_helper('listing');
657
658 $data = array();
659 $data['message'] = __('No message returned!', 'wpdirectorykit');
660 $results = array();
661 $parameters = array();
662
663 foreach ($_POST as $key => $value) {
664 $parameters[$key] = sanitize_text_field($value);
665 }
666
667 if(empty($parameters['table'])) return false;
668
669 switch ($parameters['table']) {
670 case 'search_category':
671 $model_name = 'category_m';
672 break;
673 case 'search_location':
674 $model_name = 'location_m';
675 break;
676 default:
677 # code...
678 break;
679 }
680
681 $key_column = '';
682 $print_column = '';
683 $current_id = '0';
684
685 if(!empty($parameters['id'])) {
686 $current_id = intval($parameters['id']);
687 }
688
689 if(empty($parameters['key_column'])) {
690 switch ($model_name) {
691 case 'category_m':
692 $key_column = 'idcategory';
693 break;
694 case 'location_m':
695 $key_column = 'idlocation';
696 break;
697
698 default:
699 # code...
700 break;
701 }
702 } else {
703 $key_column = $parameters['key_column'];
704 }
705
706 if(empty($parameters['print_column'])) {
707 switch ($model_name) {
708 case 'category_m':
709 $print_column = 'category_title';
710 break;
711 case 'location_m':
712 $print_column = 'location_title';
713 break;
714
715 default:
716 # code...
717 break;
718 }
719 } else {
720 $print_column = $parameters['print_column'];
721 }
722
723 $this->load->model($model_name);
724
725 $db_results = $this->$model_name->get_by(array('parent_id = '.$current_id => NULL));
726 $level = 5;
727
728 if(isset($db_results[0]->level)) {
729 $level = $db_results[0]->level;
730 }
731
732 $data['output'] = $db_results;
733
734 if (!$db_results) {
735 $data['errors'] = '';
736 } else {
737
738 if($model_name == 'category_m') {
739 $placeholder_texts = [
740 0 => esc_html__('Select Categories','wpdirectorykit'),
741 1 => esc_html__('Select Sub Categories','wpdirectorykit'),
742 2 => esc_html__('Select Sub Categories','wpdirectorykit'),
743 3 => esc_html__('Select Sub Categories','wpdirectorykit'),
744 4 => esc_html__('Select Sub Categories','wpdirectorykit'),
745 5 => esc_html__('Select Sub Categories','wpdirectorykit'),
746 ];
747 } else {
748 $placeholder_texts = [
749 0 => esc_html__('Select Country','wpdirectorykit'),
750 1 => esc_html__('Select City','wpdirectorykit'),
751 2 => esc_html__('Select Neighborhood','wpdirectorykit'),
752 3 => esc_html__('Select Sub Area','wpdirectorykit'),
753 4 => esc_html__('Select Sub Area','wpdirectorykit'),
754 5 => esc_html__('Select Sub Area','wpdirectorykit'),
755 ];
756 }
757
758 if(isset($placeholder_texts[$level])) {
759 $placeholder = $placeholder_texts[$level];
760 } else {
761 $placeholder = esc_html__('Select Sub Categories','wpdirectorykit');
762 }
763
764 $results[] = [
765 'id'=> '',
766 'text'=> $placeholder
767 ];
768
769 foreach($db_results as $row) {
770 $results[] = [
771 'id'=> wmvc_show_data($key_column, $row),
772 'text'=> esc_html__(trim(wmvc_show_data($print_column, $row)),'wpdirectorykit'),
773 ];
774 }
775
776 }
777
778 $data['success'] = true;
779 $data['results'] = $results;
780
781 //$data['sql'] = $this->db->last_query();
782 $this->output($data);
783 }
784
785
786 public function search_suggestion($output="", $atts=array(), $instance=NULL)
787 {
788 $this->load->load_helper('listing');
789 $this->load->model('category_m');
790 $this->load->model('location_m');
791 $this->load->model('listing_m');
792
793 $data = array();
794 $categories_limit = 10;
795 $categories_search_column = array('idcategory','category_title');
796 $locations_limit = 10;
797 $locations_search_column = array('idlocation','location_title');
798
799 $results = array();
800 /*
801 [
802 'field_key' => 'string',
803 'value' => 'string',
804 'print' => [
805 'html' => 'string',
806 'parsed_html' => [
807 'left_column' => 'string',
808 'middle_column' => 'string',
809 'right_column' => 'string',
810 ],
811 'parsed_content' => [
812 'icon_class' => 'string',
813 'title' => 'string',
814 'sub_title' => 'string',
815 'right_text' => 'string',
816 ]
817 ]
818 ]
819
820 */
821
822 $data['message'] = __('No message returned!', 'wpdirectorykit');
823
824 $parameters = array();
825 foreach ($_POST as $key => $value) {
826 $parameters[$key] = sanitize_text_field($value);
827 }
828
829 $search_text = '';
830 if(!empty($parameters['search']))
831 $search_text = trim($parameters['search']);
832
833 /* Categories */
834 $where = array();
835 if($search_text) {
836 $sql_search = '';
837 foreach ($categories_search_column as $column) {
838 if(!empty($sql_search))
839 $sql_search .= " OR ";
840
841 $sql_search .= " ".esc_sql($column)." LIKE '%".esc_sql($search_text)."%'";
842 }
843 $where ["($sql_search)"] = NULL;
844 $db_results = $this->category_m->get_pagination($categories_limit, NULL, $where);
845 } else {
846 $db_results = $this->category_m->get_pagination($categories_limit, NULL, array('parent_id = 0' => NULL));
847 }
848
849 if($db_results) foreach($db_results as $row) {
850 $results[] = [
851 'field_key' => 'search_category',
852 'value' => $row->category_title,
853 'print' => [
854 'parsed_content' => [
855 'icon_class' => (!empty(wmvc_show_data('font_icon_code', $row, false))) ? wmvc_show_data('font_icon_code', $row) : 'fa fa-tag',
856 'title' => esc_html__($row->category_title, 'wpdirectorykit'),
857 'sub_title' => '',
858 'right_text' => __('Category', 'wpdirectorykit')
859 ]
860 ]
861 ];
862 }
863
864 /* END Categories */
865
866 /* Locations */
867 $where = array();
868 if($search_text) {
869 $sql_search = '';
870 foreach ($locations_search_column as $column) {
871 if(!empty($sql_search))
872 $sql_search .= " OR ";
873
874 $sql_search .= " ".$this->db->prefix."wdk_locations.".esc_sql($column)." LIKE '%".esc_sql($search_text)."%'";
875 }
876 $where ["($sql_search)"] = NULL;
877
878 $select = $this->db->prefix.'wdk_locations.idlocation, '.$this->db->prefix.'wdk_locations.location_title';
879 $select .= ',location_1.location_title AS location_title_1';
880
881 $this->db->join($this->db->prefix.'wdk_locations AS location_1 ON '.$this->db->prefix.'wdk_locations.parent_id = location_1.idlocation', NULL, 'LEFT');
882 for($i = 2 ; $i <= 2; $i++) {
883 $select .= ',location_'.$i.'.location_title AS location_title_'.$i.'';
884 $this->db->join($this->db->prefix.'wdk_locations AS location_'.$i.' ON location_'.($i-1).'.parent_id = location_'.$i.'.idlocation', NULL, 'LEFT');
885 }
886 $this->db->select($select);
887 $db_results = $this->location_m->get_pagination($locations_limit, NULL, $where);
888 } else {
889 $db_results = $this->location_m->get_pagination($locations_limit, NULL, array('parent_id = 0' => NULL));
890 }
891
892 if($db_results) foreach($db_results as $row) {
893 $subtitle = '';
894
895 for($i = 1 ; $i <= 2; $i++) {
896 if(wmvc_show_data('location_title_'.$i, $row, false)){
897 $subtitle .= wmvc_show_data('location_title_'.$i, $row, false).', ';
898 }
899 }
900
901 $subtitle = substr($subtitle,0,-2);
902
903 $results[] = [
904 'field_key' => 'search_location',
905 'value' => $row->location_title,
906 'print' => [
907 'parsed_content' => [
908 'icon_class' => (!empty(wmvc_show_data('font_icon_code', $row, false))) ? wmvc_show_data('font_icon_code', $row) : 'fa fa-map-marker',
909 'title' => esc_html__($row->location_title, 'wpdirectorykit'),
910 'sub_title' => esc_html__($subtitle, 'wpdirectorykit'),
911 'right_text' => __('Location', 'wpdirectorykit')
912 ]
913 ]
914 ];
915 }
916
917 /* END Locations */
918
919 /* address suggestion if empty other */
920 if(empty($results)) {
921 $this->db->select('address');
922 $db_results = $this->db->where(array("address LIKE '%".esc_sql($search_text)."%'" => NULL));
923 $this->db->from($this->listing_m->_table_name);
924 $this->db->group_by('address');
925
926 $query = $this->db->get();
927 if ($this->db->num_rows() > 0) {
928 $db_results = $this->db->results();
929 } else {
930 $db_results = array();
931 }
932
933 if($db_results) foreach($db_results as $row) {
934 $results[] = [
935 'field_key' => 'address',
936 'value' => $row->address,
937 'print' => [
938 'parsed_content' => [
939 'icon_class' => 'fa fa-map-marker',
940 'title' => $row->address,
941 'sub_title' => '',
942 'right_text' => __('Address', 'wpdirectorykit')
943 ]
944 ]
945 ];
946 }
947 }
948
949 if(empty($results)) {
950
951 $name_part = str_replace(' ','+',$search_text);
952
953 //$url = 'http://photon.komoot.de/api/?q='.$name_part;
954 $url = 'https://api.teleport.org/api/cities/?limit=1&search='.$name_part;
955
956 $request = wp_remote_get( $url );
957 $response = '';
958
959 // request failed
960 if ( is_wp_error( $request ) ) {
961 $response = $request;
962 }
963 $code = (int) wp_remote_retrieve_response_code( $request );
964
965 // make sure the fetch was successful
966 if (empty($response) && $code == 200 ) {
967 $response = wp_remote_retrieve_body( $request );
968
969 // Decode the json
970 $resp = json_decode( $response,true );
971 if(!empty($resp) && isset($resp['_embedded']) && isset($resp["_embedded"]["city:search-results"]) && !empty($resp["_embedded"]["city:search-results"])) {
972 foreach($resp["_embedded"]["city:search-results"] as $prediction)
973 {
974 if(isset($prediction["matching_full_name"])){
975 $results[] = [
976 'field_key' => 'search_location',
977 'value' => $prediction["matching_full_name"],
978 'print' => [
979 'parsed_content' => [
980 'icon_class' => 'fa fa-map-marker',
981 'title' => $prediction["matching_full_name"],
982 'sub_title' => '',
983 'right_text' => ''
984 ]
985 ]
986 ];
987
988 }
989 break;
990 }
991 }
992 }
993 }
994
995 $data['success'] = true;
996 $data['results'] = $results;
997
998 //$data['sql'] = $this->db->last_query();
999 $this->output($data);
1000 }
1001
1002 public function booking_price_calculate() {
1003 $data = array();
1004 $data['success'] = false;
1005
1006 $this->load->load_helper('listing');
1007 global $Winter_MVC_wdk_bookings;
1008
1009 $Winter_MVC_wdk_bookings->model('reservation_m');
1010 $Winter_MVC_wdk_bookings->model('calendar_m');
1011
1012 $results = array();
1013 $parameters = array();
1014 foreach ($_POST as $key => $value) {
1015 $parameters[sanitize_text_field($key)] = sanitize_text_field($value);
1016 }
1017
1018 $post_id = NULL;
1019 $date_from = NULL;
1020 $date_to = NULL;
1021
1022 if(isset($parameters['post_id'])) {
1023 $post_id = $parameters['post_id'];
1024 }
1025
1026 if(isset($parameters['date_from'])) {
1027 $date_from = wdk_normalize_date_db($parameters['date_from']);
1028 }
1029
1030 if(isset($parameters['date_to'])) {
1031 $date_to = wdk_normalize_date_db($parameters['date_to']);
1032 }
1033
1034 if($post_id && $date_from && $date_to) {
1035 $price = $Winter_MVC_wdk_bookings->reservation_m->calculate_price($post_id, $date_from, $date_to);
1036
1037 $calendar = $Winter_MVC_wdk_bookings->calendar_m->get_by(array('post_id'=>$post_id), TRUE); // date_package_expire package_id
1038 $calendar_fees = array();
1039 if($calendar && !empty($calendar->json_data_fees))
1040 $calendar_fees = json_decode($calendar->json_data_fees );
1041
1042 $results['symbol'] = '';
1043 if(function_exists('wdk_booking_currency_symbol'))
1044 $results['symbol'] = wdk_booking_currency_symbol();
1045
1046 if($price) {
1047 $results['price'] = $price['price'];
1048 $results['total'] = $price['price'];
1049 $results['fees'] = array();
1050 foreach ($calendar_fees as $fee) {
1051 if(!wmvc_show_data('is_activated', $fee, false,TRUE,TRUE)) continue;
1052 if(is_intval(wmvc_show_data('value', $fee,'',TRUE,TRUE))) {
1053 $field = str_replace(' ','_',strtolower(esc_html(wmvc_show_data('title', $fee,'-',TRUE,TRUE))));
1054 if(!wmvc_show_data('is_required', $fee, false,TRUE,TRUE) && isset($parameters['fee_'.$field]) && $parameters['fee_'.$field] == 0) {
1055
1056 } else {
1057 $price = 0;
1058 if(wmvc_show_data('calculation_base', $fee,'',TRUE,TRUE) == 'per_night') {
1059 $nights = (int)abs(strtotime($date_from) - strtotime($date_to))/(60*60*24);
1060 $price += intval(wmvc_show_data('value', $fee,'',TRUE,TRUE)) * $nights;
1061 } else if(wmvc_show_data('calculation_base', $fee,'',TRUE,TRUE) == 'per_person') {
1062 $price += intval(wmvc_show_data('value', $fee,'',TRUE,TRUE)) * intval(wmvc_show_data('guests', $_POST, 0,TRUE,TRUE));
1063 } else {
1064 $price += intval(wmvc_show_data('value', $fee,'',TRUE,TRUE));
1065 }
1066 $results['fees'][wmvc_show_data('title', $fee,'',TRUE,TRUE)] = $price;
1067 $results['total'] += $price;
1068 }
1069 }
1070 }
1071 $data['success'] = true;
1072 } else {
1073 $data['popup_text_error'] = __('Those dates are not available', 'wpdirectorykit');
1074 }
1075 }
1076
1077
1078 $data['results'] = $results;
1079
1080 //$data['sql'] = $this->db->last_query();
1081 $this->output($data);
1082 }
1083
1084 private function get_fa_icons() {
1085 return array("fa fa-500px","fa fa-address-book","fa fa-address-book-o","fa fa-address-card","fa fa-address-card-o","fa fa-adjust","fa fa-adn","fa fa-align-center","fa fa-align-justify","fa fa-align-left","fa fa-align-right",
1086 "fa fa-amazon","fa fa-ambulance","fa fa-american-sign-language-interpreting","fa fa-anchor","fa fa-android","fa fa-angellist","fa fa-angle-double-down","fa fa-angle-double-left","fa fa-angle-double-right","fa fa-angle-double-up",
1087 "fa fa-angle-down","fa fa-angle-left","fa fa-angle-right","fa fa-angle-up","fa fa-apple","fa fa-archive","fa fa-area-chart","fa fa-arrow-circle-down","fa fa-arrow-circle-left","fa fa-arrow-circle-o-down","fa fa-arrow-circle-o-left",
1088 "fa fa-arrow-circle-o-right","fa fa-arrow-circle-o-up","fa fa-arrow-circle-right","fa fa-arrow-circle-up","fa fa-arrow-down","fa fa-arrow-left","fa fa-arrow-right","fa fa-arrow-up","fa fa-arrows","fa fa-arrows-alt","fa fa-arrows-h",
1089 "fa fa-arrows-v","fa fa-assistive-listening-systems","fa fa-asterisk","fa fa-at","fa fa-audio-description","fa fa-backward","fa fa-balance-scale","fa fa-ban","fa fa-bandcamp","fa fa-bar-chart","fa fa-barcode","fa fa-bars","fa fa-bath",
1090 "fa fa-battery-empty","fa fa-battery-full","fa fa-battery-half","fa fa-battery-quarter","fa fa-battery-three-quarters","fa fa-bed","fa fa-beer","fa fa-behance","fa fa-behance-square","fa fa-bell","fa fa-bell-o","fa fa-bell-slash",
1091 "fa fa-bell-slash-o","fa fa-bicycle","fa fa-binoculars","fa fa-birthday-cake","fa fa-bitbucket","fa fa-bitbucket-square","fa fa-black-tie","fa fa-blind","fa fa-bluetooth","fa fa-bluetooth-b","fa fa-bold","fa fa-bolt","fa fa-bomb","fa fa-book",
1092 "fa fa-bookmark","fa fa-bookmark-o","fa fa-braille","fa fa-briefcase","fa fa-btc","fa fa-bug","fa fa-building","fa fa-building-o","fa fa-bullhorn","fa fa-bullseye","fa fa-bus","fa fa-buysellads","fa fa-calculator","fa fa-calendar",
1093 "fa fa-calendar-check-o","fa fa-calendar-minus-o","fa fa-calendar-o","fa fa-calendar-plus-o","fa fa-calendar-times-o","fa fa-camera","fa fa-camera-retro","fa fa-car","fa fa-caret-down","fa fa-caret-left","fa fa-caret-right",
1094 "fa fa-caret-square-o-down","fa fa-caret-square-o-left","fa fa-caret-square-o-right","fa fa-caret-square-o-up","fa fa-caret-up","fa fa-cart-arrow-down","fa fa-cart-plus","fa fa-cc","fa fa-cc-amex","fa fa-cc-diners-club",
1095 "fa fa-cc-discover","fa fa-cc-jcb","fa fa-cc-mastercard","fa fa-cc-paypal","fa fa-cc-stripe","fa fa-cc-visa","fa fa-certificate","fa fa-chain-broken","fa fa-check","fa fa-check-circle","fa fa-check-circle-o","fa fa-check-square",
1096 "fa fa-check-square-o","fa fa-chevron-circle-down","fa fa-chevron-circle-left","fa fa-chevron-circle-right","fa fa-chevron-circle-up","fa fa-chevron-down","fa fa-chevron-left","fa fa-chevron-right","fa fa-chevron-up","fa fa-child",
1097 "fa fa-chrome","fa fa-circle","fa fa-circle-o","fa fa-circle-o-notch","fa fa-circle-thin","fa fa-clipboard","fa fa-clock-o","fa fa-clone","fa fa-cloud","fa fa-cloud-download","fa fa-cloud-upload","fa fa-code","fa fa-code-fork","fa fa-codepen",
1098 "fa fa-codiepie","fa fa-coffee","fa fa-cog","fa fa-cogs","fa fa-columns","fa fa-comment","fa fa-comment-o","fa fa-commenting","fa fa-commenting-o","fa fa-comments","fa fa-comments-o","fa fa-compass","fa fa-compress","fa fa-connectdevelop",
1099 "fa fa-contao","fa fa-copyright","fa fa-creative-commons","fa fa-credit-card","fa fa-credit-card-alt","fa fa-crop","fa fa-crosshairs","fa fa-css3","fa fa-cube","fa fa-cubes","fa fa-cutlery","fa fa-dashcube","fa fa-database","fa fa-deaf",
1100 "fa fa-delicious","fa fa-desktop","fa fa-deviantart","fa fa-diamond","fa fa-digg","fa fa-dot-circle-o","fa fa-download","fa fa-dribbble","fa fa-dropbox","fa fa-drupal","fa fa-edge","fa fa-eercast","fa fa-eject","fa fa-ellipsis-h","fa fa-ellipsis-v",
1101 "fa fa-empire","fa fa-envelope","fa fa-envelope-o","fa fa-envelope-open","fa fa-envelope-open-o","fa fa-envelope-square","fa fa-envira","fa fa-eraser","fa fa-etsy","fa fa-eur","fa fa-exchange","fa fa-exclamation","fa fa-exclamation-circle",
1102 "fa fa-exclamation-triangle","fa fa-expand","fa fa-expeditedssl","fa fa-external-link","fa fa-external-link-square","fa fa-eye","fa fa-eye-slash","fa fa-eyedropper","fa fa-facebook","fa fa-facebook-official","fa fa-facebook-square",
1103 "fa fa-fast-backward","fa fa-fast-forward","fa fa-fax","fa fa-female","fa fa-fighter-jet","fa fa-file","fa fa-file-archive-o","fa fa-file-audio-o","fa fa-file-code-o","fa fa-file-excel-o","fa fa-file-image-o","fa fa-file-o","fa fa-file-pdf-o",
1104 "fa fa-file-powerpoint-o","fa fa-file-text","fa fa-file-text-o","fa fa-file-video-o","fa fa-file-word-o","fa fa-files-o","fa fa-film","fa fa-filter","fa fa-fire","fa fa-fire-extinguisher","fa fa-firefox","fa fa-first-order","fa fa-flag",
1105 "fa fa-flag-checkered","fa fa-flag-o","fa fa-flask","fa fa-flickr","fa fa-floppy-o","fa fa-folder","fa fa-folder-o","fa fa-folder-open","fa fa-folder-open-o","fa fa-font","fa fa-font-awesome","fa fa-fonticons","fa fa-fort-awesome","fa fa-forumbee",
1106 "fa fa-forward","fa fa-foursquare","fa fa-free-code-camp","fa fa-frown-o","fa fa-futbol-o","fa fa-gamepad","fa fa-gavel","fa fa-gbp","fa fa-genderless","fa fa-get-pocket","fa fa-gg","fa fa-gg-circle","fa fa-gift","fa fa-git","fa fa-git-square",
1107 "fa fa-github","fa fa-github-alt","fa fa-github-square","fa fa-gitlab","fa fa-glass","fa fa-glide","fa fa-glide-g","fa fa-globe","fa fa-google","fa fa-google-plus","fa fa-google-plus-official","fa fa-google-plus-square","fa fa-google-wallet",
1108 "fa fa-graduation-cap","fa fa-gratipay","fa fa-grav","fa fa-h-square","fa fa-hacker-news","fa fa-hand-lizard-o","fa fa-hand-o-down","fa fa-hand-o-left","fa fa-hand-o-right","fa fa-hand-o-up","fa fa-hand-paper-o","fa fa-hand-peace-o",
1109 "fa fa-hand-pointer-o","fa fa-hand-rock-o","fa fa-hand-scissors-o","fa fa-hand-spock-o","fa fa-handshake-o","fa fa-hashtag","fa fa-hdd-o","fa fa-header","fa fa-headphones","fa fa-heart","fa fa-heart-o","fa fa-heartbeat","fa fa-history",
1110 "fa fa-home","fa fa-hospital-o","fa fa-hourglass","fa fa-hourglass-end","fa fa-hourglass-half","fa fa-hourglass-o","fa fa-hourglass-start","fa fa-houzz","fa fa-html5","fa fa-i-cursor","fa fa-id-badge","fa fa-id-card","fa fa-id-card-o",
1111 "fa fa-ils","fa fa-imdb","fa fa-inbox","fa fa-indent","fa fa-industry","fa fa-info","fa fa-info-circle","fa fa-inr","fa fa-instagram","fa fa-internet-explorer","fa fa-ioxhost","fa fa-italic","fa fa-joomla","fa fa-jpy","fa fa-jsfiddle","fa fa-key",
1112 "fa fa-keyboard-o","fa fa-krw","fa fa-language","fa fa-laptop","fa fa-lastfm","fa fa-lastfm-square","fa fa-leaf","fa fa-leanpub","fa fa-lemon-o","fa fa-level-down","fa fa-level-up","fa fa-life-ring","fa fa-lightbulb-o","fa fa-line-chart",
1113 "fa fa-link","fa fa-linkedin","fa fa-linkedin-square","fa fa-linode","fa fa-linux","fa fa-list","fa fa-list-alt","fa fa-list-ol","fa fa-list-ul","fa fa-location-arrow","fa fa-lock","fa fa-long-arrow-down","fa fa-long-arrow-left",
1114 "fa fa-long-arrow-right","fa fa-long-arrow-up","fa fa-low-vision","fa fa-magic","fa fa-magnet","fa fa-male","fa fa-map","fa fa-map-marker","fa fa-map-o","fa fa-map-pin","fa fa-map-signs","fa fa-mars","fa fa-mars-double","fa fa-mars-stroke",
1115 "fa fa-mars-stroke-h","fa fa-mars-stroke-v","fa fa-maxcdn","fa fa-meanpath","fa fa-medium","fa fa-medkit","fa fa-meetup","fa fa-meh-o","fa fa-mercury","fa fa-microchip","fa fa-microphone","fa fa-microphone-slash","fa fa-minus",
1116 "fa fa-minus-circle","fa fa-minus-square","fa fa-minus-square-o","fa fa-mixcloud","fa fa-mobile","fa fa-modx","fa fa-money","fa fa-moon-o","fa fa-motorcycle","fa fa-mouse-pointer","fa fa-music","fa fa-neuter","fa fa-newspaper-o",
1117 "fa fa-object-group","fa fa-object-ungroup","fa fa-odnoklassniki","fa fa-odnoklassniki-square","fa fa-opencart","fa fa-openid","fa fa-opera","fa fa-optin-monster","fa fa-outdent","fa fa-pagelines","fa fa-paint-brush","fa fa-paper-plane",
1118 "fa fa-paper-plane-o","fa fa-paperclip","fa fa-paragraph","fa fa-pause","fa fa-pause-circle","fa fa-pause-circle-o","fa fa-paw","fa fa-paypal","fa fa-pencil","fa fa-pencil-square","fa fa-pencil-square-o","fa fa-percent","fa fa-phone",
1119 "fa fa-phone-square","fa fa-picture-o","fa fa-pie-chart","fa fa-pied-piper","fa fa-pied-piper-alt","fa fa-pied-piper-pp","fa fa-pinterest","fa fa-pinterest-p","fa fa-pinterest-square","fa fa-plane","fa fa-play","fa fa-play-circle",
1120 "fa fa-play-circle-o","fa fa-plug","fa fa-plus","fa fa-plus-circle","fa fa-plus-square","fa fa-plus-square-o","fa fa-podcast","fa fa-power-off","fa fa-print","fa fa-product-hunt","fa fa-puzzle-piece","fa fa-qq","fa fa-qrcode","fa fa-question",
1121 "fa fa-question-circle","fa fa-question-circle-o","fa fa-quora","fa fa-quote-left","fa fa-quote-right","fa fa-random","fa fa-ravelry","fa fa-rebel","fa fa-recycle","fa fa-reddit","fa fa-reddit-alien","fa fa-reddit-square","fa fa-refresh",
1122 "fa fa-registered","fa fa-renren","fa fa-repeat","fa fa-reply","fa fa-reply-all","fa fa-retweet","fa fa-road","fa fa-rocket","fa fa-rss","fa fa-rss-square","fa fa-rub","fa fa-safari","fa fa-scissors","fa fa-scribd","fa fa-search","fa fa-search-minus",
1123 "fa fa-search-plus","fa fa-sellsy","fa fa-server","fa fa-share","fa fa-share-alt","fa fa-share-alt-square","fa fa-share-square","fa fa-share-square-o","fa fa-shield","fa fa-ship","fa fa-shirtsinbulk","fa fa-shopping-bag","fa fa-shopping-basket",
1124 "fa fa-shopping-cart","fa fa-shower","fa fa-sign-in","fa fa-sign-language","fa fa-sign-out","fa fa-signal","fa fa-simplybuilt","fa fa-sitemap","fa fa-skyatlas","fa fa-skype","fa fa-slack","fa fa-sliders","fa fa-slideshare","fa fa-smile-o",
1125 "fa fa-snapchat","fa fa-snapchat-ghost","fa fa-snapchat-square","fa fa-snowflake-o","fa fa-sort","fa fa-sort-alpha-asc","fa fa-sort-alpha-desc","fa fa-sort-amount-asc","fa fa-sort-amount-desc","fa fa-sort-asc","fa fa-sort-desc",
1126 "fa fa-sort-numeric-asc","fa fa-sort-numeric-desc","fa fa-soundcloud","fa fa-space-shuttle","fa fa-spinner","fa fa-spoon","fa fa-spotify","fa fa-square","fa fa-square-o","fa fa-stack-exchange","fa fa-stack-overflow","fa fa-star",
1127 "fa fa-star-half","fa fa-star-half-o","fa fa-star-o","fa fa-steam","fa fa-steam-square","fa fa-step-backward","fa fa-step-forward","fa fa-stethoscope","fa fa-sticky-note","fa fa-sticky-note-o","fa fa-stop","fa fa-stop-circle",
1128 "fa fa-stop-circle-o","fa fa-street-view","fa fa-strikethrough","fa fa-stumbleupon","fa fa-stumbleupon-circle","fa fa-subscript","fa fa-subway","fa fa-suitcase","fa fa-sun-o","fa fa-superpowers","fa fa-superscript","fa fa-table",
1129 "fa fa-tablet","fa fa-tachometer","fa fa-tag","fa fa-tags","fa fa-tasks","fa fa-taxi","fa fa-telegram","fa fa-television","fa fa-tencent-weibo","fa fa-terminal","fa fa-text-height","fa fa-text-width","fa fa-th","fa fa-th-large","fa fa-th-list",
1130 "fa fa-themeisle","fa fa-thermometer-empty","fa fa-thermometer-full","fa fa-thermometer-half","fa fa-thermometer-quarter","fa fa-thermometer-three-quarters","fa fa-thumb-tack","fa fa-thumbs-down","fa fa-thumbs-o-down",
1131 "fa fa-thumbs-o-up","fa fa-thumbs-up","fa fa-ticket","fa fa-times","fa fa-times-circle","fa fa-times-circle-o","fa fa-tint","fa fa-toggle-off","fa fa-toggle-on","fa fa-trademark","fa fa-train","fa fa-transgender","fa fa-transgender-alt",
1132 "fa fa-trash","fa fa-trash-o","fa fa-tree","fa fa-trello","fa fa-tripadvisor","fa fa-trophy","fa fa-truck","fa fa-try","fa fa-tty","fa fa-tumblr","fa fa-tumblr-square","fa fa-twitch","fa fa-twitter","fa fa-twitter-square","fa fa-umbrella",
1133 "fa fa-underline","fa fa-undo","fa fa-universal-access","fa fa-university","fa fa-unlock","fa fa-unlock-alt","fa fa-upload","fa fa-usb","fa fa-usd","fa fa-user","fa fa-user-circle","fa fa-user-circle-o","fa fa-user-md","fa fa-user-o",
1134 "fa fa-user-plus","fa fa-user-secret","fa fa-user-times","fa fa-users","fa fa-venus","fa fa-venus-double","fa fa-venus-mars","fa fa-viacoin","fa fa-viadeo","fa fa-viadeo-square","fa fa-video-camera","fa fa-vimeo","fa fa-vimeo-square","fa fa-vine",
1135 "fa fa-vk","fa fa-volume-control-phone","fa fa-volume-down","fa fa-volume-off","fa fa-volume-up","fa fa-weibo","fa fa-weixin","fa fa-whatsapp","fa fa-wheelchair","fa fa-wheelchair-alt","fa fa-wifi","fa fa-wikipedia-w","fa fa-window-close",
1136 "fa fa-window-close-o","fa fa-window-maximize","fa fa-window-minimize","fa fa-window-restore","fa fa-windows","fa fa-wordpress","fa fa-wpbeginner","fa fa-wpexplorer","fa fa-wpforms","fa fa-wrench","fa fa-xing","fa fa-xing-square",
1137 "fa fa-y-combinator","fa fa-yahoo","fa fa-yelp","fa fa-yoast","fa fa-youtube","fa fa-youtube-play","fa fa-youtube-square");
1138 }
1139
1140 }
1141