PluginProbe
WP Directory Kit / 1.1.8
WP Directory Kit v1.1.8
1.5.9 1.5.7 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 All 37 releases
wpdirectorykit / application / controllers / Wdk_frontendajax.php

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

1,135 lines 44.5 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 ini_set('display_errors',1);
8 ini_set('display_startup_errors',1);
9 error_reporting(-1);
10 parent::__construct();
11
12 $this->data['is_ajax'] = true;
13
14 }
15
16 public function index(&$output=NULL, $atts=array())
17 {
18
19 }
20
21 public function map_infowindow() {
22 $this->load->load_helper('listing');
23 $this->load->model('listing_m');
24 $this->load->model('listingfield_m');
25
26 $data = array();
27 $data['message'] = '';
28 $listing_post_id = NULL;
29 if(isset($_POST['listing_post_id']))
30 $listing_post_id = sanitize_text_field($_POST['listing_post_id']);
31
32 $listing = $this->load->listing_m->get($listing_post_id, TRUE);
33
34 if(!empty($listing)) {
35 $data['popup_content'] = wdk_listing_card($listing, array('infobox' => true), false, '<div class="infobox map-box">%1$s<div>');
36 } else {
37 $data['popup_content'] = __( 'Listing is missing', 'wpdirectorykit' );
38 }
39
40 $data['success'] = true;
41
42 $this->output($data);
43 }
44
45 public function map_infowindow_dash() {
46 $this->load->load_helper('listing');
47 $this->load->model('listing_m');
48 $this->load->model('listingfield_m');
49
50 $data = array();
51 $data['message'] = '';
52 $listing_post_id = NULL;
53 if(isset($_POST['listing_post_id']))
54 $listing_post_id = sanitize_text_field($_POST['listing_post_id']);
55
56 $listing = $this->load->listing_m->get($listing_post_id, TRUE);
57
58 if(!empty($listing)) {
59 $data['popup_content'] = wdk_listing_card($listing, [], false, '<div class="infobox map-box">%1$s<div>', 'result_item_card_dash_edit');
60 } else {
61 $data['popup_content'] = __( 'Listing is missing', 'wpdirectorykit' );
62 }
63
64 $data['success'] = true;
65
66 $this->output($data);
67 }
68
69 public function treefieldid($output="", $atts=array(), $instance=NULL)
70 {
71 $this->load->load_helper('listing');
72 $this->load->model('listing_m');
73 $this->load->model('listingfield_m');
74
75 $data = array();
76 $data['message'] = __('No message returned!', 'wpdirectorykit');
77 $results = array();
78
79 $parameters = array();
80
81 foreach ($_POST as $key => $value) {
82 $parameters[$key] = sanitize_text_field($value);
83 }
84
85 $table_name = $table = $parameters['table'];
86
87 if(empty($parameters['empty_value']))
88 $parameters['empty_value'] = ' - ';
89
90 if(empty($parameters['limit']))
91 $parameters['limit'] = 10;
92
93 if(empty($parameters['attribute_id']))
94 $parameters['attribute_id'] = 'id';
95
96 if(empty($parameters['attribute_value']))
97 $parameters['attribute_value'] = 'address';
98
99 if(empty($parameters['offset']))
100 $parameters['offset'] = 0;
101
102 $start_id = '';
103 if(isset($parameters['start_id']))
104 $start_id = $parameters['start_id'];
105
106 if($parameters['offset'] == 0) // currently don't have load_more functionality'
107
108 if(!empty($parameters['empty_value']))
109 {
110 $results[0]['key'] = '';
111 $results[0]['value'] = sanitize_text_field($parameters['empty_value']);
112 }
113
114 // it's model
115
116 if($table == 'calendar_listing_m')
117 $table = 'listing_m';
118
119 $table_name = substr($table,0, -2);
120 $attr_id = sanitize_text_field($parameters['attribute_id']);
121 $attr_val = sanitize_text_field($parameters['attribute_value']);
122 $attr_search = sanitize_text_field($parameters['search_term']);
123 $skip_id = intval($parameters['skip_id']);
124 $language_id = intval($parameters['language_id']);
125
126 if(empty($language_id))
127 $language_id = NULL;
128
129 $id_part="";
130 if(is_numeric($attr_search))
131 $id_part = "$attr_id=$attr_search OR ";
132
133 if($table == 'icons_list') {
134 $icons = $this->get_fa_icons();
135
136 $tree_results = array();
137
138 if(empty($attr_search)) {
139 $tree_results = $icons;
140 } else {
141 foreach ($icons as $c){
142 if (stripos($c, $attr_search) !== FALSE){
143 //if $c starts with $input, add to matches list
144 $tree_results[] = $c;
145 } else if (strcmp($attr_search, $c) < 0){
146 //$input comes after $c in alpha order
147 //since $colors is sorted, we know that we won't find any more matches
148 break;
149 }
150 }
151 }
152 $tree_results = array_slice($tree_results,intval($parameters['offset']), intval($parameters['limit']));
153 // limit
154
155 } else {
156 $this->load->model($table);
157
158 $where = array();
159 if(!empty($attr_search))
160 $where["($id_part $attr_val LIKE '%$attr_search%')"] = NULL;
161
162 if(isset($parameters['user_check']) && ($parameters['user_check'] == 'true' || $parameters['user_check'] == '1')) {
163 if($table == 'listing_m') {
164 if($parameters['table'] == 'calendar_listing_m') {
165 global $Winter_MVC_wdk_bookings;
166 $Winter_MVC_wdk_bookings->model('calendar_m');
167 $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');
168 }
169
170 $tree_results = $this->$table->get_pagination(intval($parameters['limit']),intval($parameters['offset']), $where, TRUE, get_current_user_id());
171 } else {
172
173 if(!empty($parameters['filter_ids'])){
174 $this->db->where(array( esc_sql($this->$table->_primary_key).' IN ('.esc_sql($parameters['filter_ids']).')' => NULL));
175 }
176
177 $tree_results = $this->$table->get_pagination(intval($parameters['limit']),intval($parameters['offset']), $where );
178 }
179 } else {
180 if($parameters['table'] == 'calendar_listing_m') {
181 global $Winter_MVC_wdk_bookings;
182 $Winter_MVC_wdk_bookings->model('calendar_m');
183 $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');
184 }
185
186 if(!empty($parameters['filter_ids'])){
187 $this->db->where(array( esc_sql($this->$table->_primary_key).' IN ('.esc_sql($parameters['filter_ids']).')' => NULL));
188 }
189
190 if($table == 'user_m') {
191 $like = "(meta_value LIKE '%wdk_%' )";
192 $tree_results = $this->$table->get_pagination(intval($parameters['limit']),intval($parameters['offset']), $where, NULL, $like);
193
194 } else {
195 $tree_results = $this->$table->get_pagination(intval($parameters['limit']),intval($parameters['offset']), $where);
196 }
197
198 }
199 }
200
201 $ind_order=1;
202 foreach ($tree_results as $key=>$row)
203 {
204 $level_gen='';
205 if(empty($attr_search) && isset($row->level))
206 $level_gen = str_pad('', $row->level*12, '&nbsp;').'';
207
208 $results[$ind_order]['key'] = wmvc_show_data($attr_id, $row);
209 if($table == 'listing_m') {
210 $results[$ind_order]['value'] = $level_gen
211 .'#'.wmvc_show_data($attr_id, $row).', '.wmvc_show_data($attr_val, $row);
212 } elseif($table == 'user_m') {
213 $results[$ind_order]['value'] = $level_gen
214 .'#'.wmvc_show_data($attr_id, $row).', '.wmvc_show_data($attr_val, $row).' ('.wmvc_show_data('user_email', $row).')';
215 } elseif($table == 'icons_list') {
216 $results[$ind_order]['key'] = $row;
217 if(defined('ELEMENTOR_ASSETS_URL')){
218 $results[$ind_order]['value'] = '<i class="'. $row.'"></i>&nbsp;&nbsp;'.$row;
219 } else {
220 $results[$ind_order]['value'] = $row;
221 }
222 } else {
223 $results[$ind_order]['value'] = $level_gen
224 .wmvc_show_data($attr_val, $row);
225 }
226 $ind_order++;
227 }
228
229
230 // get current value by ID
231 $row=NULL;
232 if($table == 'icons_list') {
233 if(!empty($parameters['curr_id'])) {
234 $row = '<i class="'. $parameters['curr_id'].'"></i>&nbsp;&nbsp;'.$parameters['curr_id'];
235 }
236 } else {
237 if(!empty($parameters['curr_id']))
238 $row = $this->$table->get(intval($parameters['curr_id']), TRUE);
239 }
240
241 if($table == 'icons_list') {
242 $data['curr_val'] = $row;
243 }elseif(is_object($row))
244 {
245 $level_gen='';
246 if(isset($row->level))
247 $level_gen = str_pad('', $row->level*12, '&nbsp;').'';
248
249 if($table == 'user_m') {
250 $data['curr_val'] = $level_gen
251 .wmvc_show_data(wmvc_show_data('attribute_value', $parameters), $row).' ('.wmvc_show_data('user_email', $row).')'.' #'.wmvc_show_data($attr_id, $row);
252 } else {
253 $data['curr_val'] = $level_gen
254 .wmvc_show_data(wmvc_show_data('attribute_value', $parameters), $row);
255 }
256
257
258 //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);
259 //elseif(!empty($start_id) && $start_id == $parameters['curr_id']) $this->data['curr_val'] = $parameters['empty_value'];
260 }
261 else
262 {
263 $data['curr_val'] = $parameters['empty_value'];
264 }
265
266 $this->data['success'] = true;
267
268 $data['results'] = $results;
269 //$data['sql'] = $this->db->last_query();
270 $this->output($data);
271 }
272
273 public function treefieldid_checkboxes($output="", $atts=array(), $instance=NULL)
274 {
275 $this->load->load_helper('listing');
276 $this->load->model('listing_m');
277 $this->load->model('listingfield_m');
278
279 $data = array();
280 $data['message'] = __('No message returned!', 'wpdirectorykit');
281 $results = array();
282
283 $parameters = array();
284
285 foreach ($_POST as $key => $value) {
286 $parameters[$key] = sanitize_text_field($value);
287 }
288
289 $table_name = $table = $parameters['table'];
290
291 if(empty($parameters['empty_value']))
292 $parameters['empty_value'] = ' - ';
293
294 if(empty($parameters['limit']))
295 $parameters['limit'] = 10;
296
297 if(empty($parameters['attribute_id']))
298 $parameters['attribute_id'] = 'id';
299
300 if(empty($parameters['attribute_value']))
301 $parameters['attribute_value'] = 'address';
302
303 if(empty($parameters['offset']))
304 $parameters['offset'] = 0;
305
306 $start_id = '';
307 if(isset($parameters['start_id']))
308 $start_id = $parameters['start_id'];
309
310 if($parameters['offset'] == 0) // currently don't have load_more functionality'
311
312 if(!empty($parameters['empty_value']))
313 {
314 $results[0]['key'] = '';
315 $results[0]['value'] = sanitize_text_field($parameters['empty_value']);
316 }
317
318 // it's model
319
320 if($table == 'calendar_listing_m')
321 $table = 'listing_m';
322
323 $table_name = substr($table,0, -2);
324 $attr_id = sanitize_text_field($parameters['attribute_id']);
325 $attr_val = sanitize_text_field($parameters['attribute_value']);
326 $attr_search = sanitize_text_field($parameters['search_term']);
327 $skip_id = intval($parameters['skip_id']);
328 $language_id = intval($parameters['language_id']);
329
330 if(empty($language_id))
331 $language_id = NULL;
332
333 $id_part="";
334 if(is_numeric($attr_search))
335 $id_part = "$attr_id=$attr_search OR ";
336
337 $this->load->model($table);
338
339 $where = array();
340 if(!empty($attr_search))
341 $where["($id_part $attr_val LIKE '%$attr_search%')"] = NULL;
342
343 if(isset($parameters['selected']) && !empty($parameters['selected'])) {
344
345 if(is_string($parameters['selected']) && strpos($parameters['selected'], ',') !== FALSE){
346 $selected = explode(',', $parameters['selected']);
347 } elseif(is_string($parameters['selected'])){
348 $selected = array($parameters['selected']);
349 }
350
351 $ids = array();
352 foreach($selected as $selected_item) {
353 if(!empty($selected_item) && is_intval($selected_item)) {
354 $ids [] = $selected_item;
355 }
356 }
357
358 /* where in */
359 if(!empty($ids)){
360 $this->db->order_by('FIELD('.$this->$table->_table_name.'.'.$this->$table->_primary_key.', '. implode(',', array_reverse($ids)) . ') DESC');
361 if(intval($parameters['limit']) < count($ids)) {
362 $parameters['limit'] = count($ids);
363 }
364 }
365 }
366
367 if(!empty($parameters['filter_ids'])){
368 $this->db->where(array( esc_sql($this->$table->_primary_key).' IN ('.esc_sql($parameters['filter_ids']).')' => NULL));
369 }
370
371 $tree_results = $this->$table->get_pagination(intval($parameters['limit']),intval($parameters['offset']), $where);
372
373 $ind_order=1;
374 foreach ($tree_results as $key=>$row)
375 {
376 $level_gen='';
377 if(empty($attr_search) && isset($row->level))
378 $level_gen = str_pad('', $row->level*12, '&nbsp;').'';
379
380 $results[$ind_order]['key'] = wmvc_show_data($attr_id, $row);
381 $results[$ind_order]['value'] = $level_gen
382 .wmvc_show_data($attr_val, $row);
383 $ind_order++;
384 }
385
386 // get current value by ID
387 $row=NULL;
388 if(!empty($parameters['curr_id']))
389 $row = $this->$table->get(intval($parameters['curr_id']), TRUE);
390
391 if(is_object($row))
392 {
393 $level_gen='';
394 if(isset($row->level))
395 $level_gen = str_pad('', $row->level*12, '&nbsp;').'';
396
397 $data['curr_val'] = $level_gen
398 .wmvc_show_data(wmvc_show_data('attribute_value', $parameters), $row);
399
400 }
401 else
402 {
403 $data['curr_val'] = $parameters['empty_value'];
404 }
405
406 $this->data['success'] = true;
407
408 $data['results'] = $results;
409 //$data['sql'] = $this->db->last_query();
410 $this->output($data);
411 }
412
413 private function output($data, $print = TRUE) {
414 if($print) {
415 header('Pragma: no-cache');
416 header('Cache-Control: no-store, no-cache');
417 header('Content-Type: application/json; charset=utf8');
418 //header('Content-Length: '.$length); // special characters causing troubles
419 echo (wp_json_encode($data));
420 exit();
421 } else {
422 return $data;
423 }
424 }
425
426
427 public function select_2_ajax($output="", $atts=array(), $instance=NULL)
428 {
429 $this->load->load_helper('listing');
430 $this->load->model('listing_m');
431 $this->load->model('listingfield_m');
432
433 $data = array();
434 $data['message'] = __('No message returned!', 'wpdirectorykit');
435 $results = array();
436 $data['pagination'] = true;
437 $parameters = array();
438
439 foreach ($_POST as $key => $value) {
440 $parameters[$key] = sanitize_text_field($value);
441 }
442
443 if(empty($parameters['table'])) return false;
444
445 $model_name = $parameters['table'];
446
447 $key_column = '';
448 $print_column = '';
449
450 $search_column = '';
451 if(empty($parameters['columns_search'])) {
452 switch ($model_name) {
453 case 'category_m':
454 $search_column = 'idcategory,category_title';
455 break;
456 case 'location_m':
457 $search_column = 'idlocation,location_title';
458 break;
459
460 default:
461 # code...
462 break;
463 }
464 } else {
465 $search_column = $parameters['columns_search'];
466 }
467
468 if(empty($parameters['key_column'])) {
469 switch ($model_name) {
470 case 'category_m':
471 $key_column = 'idcategory';
472 break;
473 case 'location_m':
474 $key_column = 'idlocation';
475 break;
476
477 default:
478 # code...
479 break;
480 }
481 } else {
482 $key_column = $parameters['key_column'];
483 }
484
485 if(empty($parameters['print_column'])) {
486 switch ($model_name) {
487 case 'category_m':
488 $print_column = 'category_title';
489 break;
490 case 'location_m':
491 $print_column = 'location_title';
492 break;
493
494 default:
495 # code...
496 break;
497 }
498 } else {
499 $print_column = $parameters['print_column'];
500 }
501
502 $limit = 20;
503 if(!empty($parameters['limit'])) {
504 $limit = intval($parameters['limit']);
505 }
506
507 $offset = NULL;
508 if(!empty($parameters['page_result']) && $parameters['page_result'] > 1) {
509 $offset = intval($parameters['page_result']) * $limit;
510 }
511
512 $this->load->model($model_name);
513
514 $where = array();
515 if(!empty($_POST['q']['term']) && !empty($search_column)) {
516 $sql_search = '';
517 foreach (explode(',', $search_column) as $column) {
518 if(empty($column)) continue;
519
520 if(!empty($sql_search))
521 $sql_search .= " OR ";
522
523 $sql_search .= " ".esc_sql($column)." LIKE '%".esc_sql($_POST['q']['term'])."%'";
524 }
525
526 $where ["($sql_search)"] = NULL;
527 }
528
529 $db_results_total = $this->$model_name->total($where);
530 $db_results = $this->$model_name->get_pagination($limit,$offset, $where);
531 $data['output'] = $db_results;
532
533 if (!$db_results) {
534 $data['errors'] = '';
535 } else {
536 foreach($db_results as $row) {
537
538 $level_gen='';
539 if(empty($attr_search) && isset($row->level))
540 $level_gen = str_pad('', $row->level*12, '&nbsp;').'';
541
542 $results[] = [
543 'id'=> wmvc_show_data($key_column, $row),
544 'text'=> $level_gen.trim(wmvc_show_data($print_column, $row)),
545 ];
546 }
547
548 }
549
550 $data['success'] = true;
551
552 $data['results'] = $results;
553
554
555 if($db_results_total >= $limit + $offset) {
556 $data['pagination'] =[
557 "more"=> true
558 ];
559 }
560
561 //$data['sql'] = $this->db->last_query();
562 $this->output($data);
563 }
564
565 public function select_2_ajax_user($output="", $atts=array(), $instance=NULL)
566 {
567 $this->load->load_helper('listing');
568
569 $data = array();
570 $data['message'] = __('No message returned!', 'wpdirectorykit');
571 $results = array();
572 $data['pagination'] = true;
573 $parameters = array();
574
575 foreach ($_POST as $key => $value) {
576 $parameters[$key] = sanitize_text_field($value);
577 }
578
579 $model_name = 'user_m';
580
581 $key_column = '';
582 $print_column = '';
583
584 $limit = 20;
585 if(!empty($parameters['limit'])) {
586 $limit = intval($parameters['limit']);
587 }
588
589 $offset = NULL;
590 if(!empty($parameters['page_result']) && $parameters['page_result'] > 1) {
591 $offset = intval($parameters['page_result']) * $limit;
592 }
593
594 $this->load->model($model_name);
595 $search_column = 'display_name,user_email,user_login,ID';
596 $where = array();
597 if(!empty($_POST['q']['term']) && !empty($search_column)) {
598 $sql_search = '';
599 foreach (explode(',', $search_column) as $column) {
600 if(empty($column)) continue;
601
602 if(!empty($sql_search))
603 $sql_search .= " OR ";
604
605 $sql_search .= " ".esc_sql($column)." LIKE '%".esc_sql($_POST['q']['term'])."%'";
606 }
607
608 $where ["($sql_search)"] = NULL;
609 }
610
611 $like = "(meta_value LIKE '%wdk_%' )";
612 $db_results_total = $this->$model_name->total($where, NULL, $like);
613
614 $db_results = $this->$model_name->get_pagination($limit,$offset, $where, NULL, $like);
615 $data['output'] = $db_results;
616
617 if (!$db_results) {
618 $data['errors'] = '';
619 } else {
620 foreach($db_results as $row) {
621
622 $level_gen='';
623 //if(empty($attr_search) && isset($row->level))
624 // $level_gen = str_pad('', $row->level*12, '&nbsp;').'';
625
626 $results[] = [
627 'id'=> wmvc_show_data('ID', $row),
628 'text'=> $level_gen.trim(wmvc_show_data('display_name', $row)),
629 ];
630 }
631
632 }
633
634 $data['success'] = true;
635
636 $data['results'] = $results;
637 if($db_results_total >= $limit + $offset) {
638 $data['pagination'] =[
639 "more"=> true
640 ];
641 }
642
643 //$data['sql'] = $this->db->last_query();
644 $this->output($data);
645 }
646
647
648 public function wdk_tree_dropdowns($output="", $atts=array(), $instance=NULL)
649 {
650 $this->load->load_helper('listing');
651
652 $data = array();
653 $data['message'] = __('No message returned!', 'wpdirectorykit');
654 $results = array();
655 $parameters = array();
656
657 foreach ($_POST as $key => $value) {
658 $parameters[$key] = sanitize_text_field($value);
659 }
660
661 if(empty($parameters['table'])) return false;
662
663 switch ($parameters['table']) {
664 case 'search_category':
665 $model_name = 'category_m';
666 break;
667 case 'search_location':
668 $model_name = 'location_m';
669 break;
670 default:
671 # code...
672 break;
673 }
674
675 $key_column = '';
676 $print_column = '';
677 $current_id = '0';
678
679 if(!empty($parameters['id'])) {
680 $current_id = intval($parameters['id']);
681 }
682
683 if(empty($parameters['key_column'])) {
684 switch ($model_name) {
685 case 'category_m':
686 $key_column = 'idcategory';
687 break;
688 case 'location_m':
689 $key_column = 'idlocation';
690 break;
691
692 default:
693 # code...
694 break;
695 }
696 } else {
697 $key_column = $parameters['key_column'];
698 }
699
700 if(empty($parameters['print_column'])) {
701 switch ($model_name) {
702 case 'category_m':
703 $print_column = 'category_title';
704 break;
705 case 'location_m':
706 $print_column = 'location_title';
707 break;
708
709 default:
710 # code...
711 break;
712 }
713 } else {
714 $print_column = $parameters['print_column'];
715 }
716
717 $this->load->model($model_name);
718
719 $db_results = $this->$model_name->get_by(array('parent_id = '.$current_id => NULL));
720 $level = 5;
721
722 if(isset($db_results[0]->level)) {
723 $level = $db_results[0]->level;
724 }
725
726 $data['output'] = $db_results;
727
728 if (!$db_results) {
729 $data['errors'] = '';
730 } else {
731
732 if($model_name == 'category_m') {
733 $placeholder_texts = [
734 0 => esc_html__('Select Categories','wpdirectorykit'),
735 1 => esc_html__('Select Sub Categories','wpdirectorykit'),
736 2 => esc_html__('Select Sub Categories','wpdirectorykit'),
737 3 => esc_html__('Select Sub Categories','wpdirectorykit'),
738 4 => esc_html__('Select Sub Categories','wpdirectorykit'),
739 5 => esc_html__('Select Sub Categories','wpdirectorykit'),
740 ];
741 } else {
742 $placeholder_texts = [
743 0 => esc_html__('Select Country','wpdirectorykit'),
744 1 => esc_html__('Select City','wpdirectorykit'),
745 2 => esc_html__('Select Neighborhood','wpdirectorykit'),
746 3 => esc_html__('Select Sub Area','wpdirectorykit'),
747 4 => esc_html__('Select Sub Area','wpdirectorykit'),
748 5 => esc_html__('Select Sub Area','wpdirectorykit'),
749 ];
750 }
751
752 if(isset($placeholder_texts[$level])) {
753 $placeholder = $placeholder_texts[$level];
754 } else {
755 $placeholder = esc_html__('Select Sub Categories','wpdirectorykit');
756 }
757
758 $results[] = [
759 'id'=> '',
760 'text'=> $placeholder
761 ];
762
763 foreach($db_results as $row) {
764 $results[] = [
765 'id'=> wmvc_show_data($key_column, $row),
766 'text'=> trim(wmvc_show_data($print_column, $row)),
767 ];
768 }
769
770 }
771
772 $data['success'] = true;
773 $data['results'] = $results;
774
775 //$data['sql'] = $this->db->last_query();
776 $this->output($data);
777 }
778
779
780 public function search_suggestion($output="", $atts=array(), $instance=NULL)
781 {
782 $this->load->load_helper('listing');
783 $this->load->model('category_m');
784 $this->load->model('location_m');
785 $this->load->model('listing_m');
786
787 $data = array();
788 $categories_limit = 10;
789 $categories_search_column = array('idcategory','category_title');
790 $locations_limit = 10;
791 $locations_search_column = array('idlocation','location_title');
792
793 $results = array();
794 /*
795 [
796 'field_key' => 'string',
797 'value' => 'string',
798 'print' => [
799 'html' => 'string',
800 'parsed_html' => [
801 'left_column' => 'string',
802 'middle_column' => 'string',
803 'right_column' => 'string',
804 ],
805 'parsed_content' => [
806 'icon_class' => 'string',
807 'title' => 'string',
808 'sub_title' => 'string',
809 'right_text' => 'string',
810 ]
811 ]
812 ]
813
814 */
815
816 $data['message'] = __('No message returned!', 'wpdirectorykit');
817
818 $parameters = array();
819 foreach ($_POST as $key => $value) {
820 $parameters[$key] = sanitize_text_field($value);
821 }
822
823 $search_text = '';
824 if(!empty($parameters['search']))
825 $search_text = trim($parameters['search']);
826
827 /* Categories */
828 $where = array();
829 if($search_text) {
830 $sql_search = '';
831 foreach ($categories_search_column as $column) {
832 if(!empty($sql_search))
833 $sql_search .= " OR ";
834
835 $sql_search .= " ".esc_sql($column)." LIKE '%".esc_sql($search_text)."%'";
836 }
837 $where ["($sql_search)"] = NULL;
838 $db_results = $this->category_m->get_pagination($categories_limit, NULL, $where);
839 } else {
840 $db_results = $this->category_m->get_pagination($categories_limit, NULL, array('parent_id = 0' => NULL));
841 }
842
843 if($db_results) foreach($db_results as $row) {
844 $results[] = [
845 'field_key' => 'search_category',
846 'value' => $row->category_title,
847 'print' => [
848 'parsed_content' => [
849 'icon_class' => (!empty(wmvc_show_data('font_icon_code', $row, false))) ? wmvc_show_data('font_icon_code', $row) : 'fa fa-tag',
850 'title' => $row->category_title,
851 'sub_title' => '',
852 'right_text' => __('Category', 'wpdirectorykit')
853 ]
854 ]
855 ];
856 }
857
858 /* END Categories */
859
860 /* Locations */
861 $where = array();
862 if($search_text) {
863 $sql_search = '';
864 foreach ($locations_search_column as $column) {
865 if(!empty($sql_search))
866 $sql_search .= " OR ";
867
868 $sql_search .= " ".$this->db->prefix."wdk_locations.".esc_sql($column)." LIKE '%".esc_sql($search_text)."%'";
869 }
870 $where ["($sql_search)"] = NULL;
871
872 $select = $this->db->prefix.'wdk_locations.idlocation, '.$this->db->prefix.'wdk_locations.location_title';
873 $select .= ',location_1.location_title AS location_title_1';
874
875 $this->db->join($this->db->prefix.'wdk_locations AS location_1 ON '.$this->db->prefix.'wdk_locations.parent_id = location_1.idlocation', NULL, 'LEFT');
876 for($i = 2 ; $i <= 2; $i++) {
877 $select .= ',location_'.$i.'.location_title AS location_title_'.$i.'';
878 $this->db->join($this->db->prefix.'wdk_locations AS location_'.$i.' ON location_'.($i-1).'.parent_id = location_'.$i.'.idlocation', NULL, 'LEFT');
879 }
880 $this->db->select($select);
881 $db_results = $this->location_m->get_pagination($locations_limit, NULL, $where);
882 } else {
883 $db_results = $this->location_m->get_pagination($locations_limit, NULL, array('parent_id = 0' => NULL));
884 }
885
886 if($db_results) foreach($db_results as $row) {
887 $subtitle = '';
888
889 for($i = 1 ; $i <= 2; $i++) {
890 if(wmvc_show_data('location_title_'.$i, $row, false)){
891 $subtitle .= wmvc_show_data('location_title_'.$i, $row, false).', ';
892 }
893 }
894
895 $subtitle = substr($subtitle,0,-2);
896
897 $results[] = [
898 'field_key' => 'search_location',
899 'value' => $row->location_title,
900 'print' => [
901 'parsed_content' => [
902 'icon_class' => (!empty(wmvc_show_data('font_icon_code', $row, false))) ? wmvc_show_data('font_icon_code', $row) : 'fa fa-map-marker',
903 'title' => $row->location_title,
904 'sub_title' => $subtitle,
905 'right_text' => __('Location', 'wpdirectorykit')
906 ]
907 ]
908 ];
909 }
910
911 /* END Locations */
912
913 /* address suggestion if empty other */
914 if(empty($results)) {
915 $this->db->select('address');
916 $db_results = $this->db->where(array("address LIKE '%".esc_sql($search_text)."%'" => NULL));
917 $this->db->from($this->listing_m->_table_name);
918 $this->db->group_by('address');
919
920 $query = $this->db->get();
921 if ($this->db->num_rows() > 0) {
922 $db_results = $this->db->results();
923 } else {
924 $db_results = array();
925 }
926
927 if($db_results) foreach($db_results as $row) {
928 $results[] = [
929 'field_key' => 'address',
930 'value' => $row->address,
931 'print' => [
932 'parsed_content' => [
933 'icon_class' => 'fa fa-map-marker',
934 'title' => $row->address,
935 'sub_title' => '',
936 'right_text' => __('Address', 'wpdirectorykit')
937 ]
938 ]
939 ];
940 }
941 }
942
943 if(empty($results)) {
944
945 $name_part = str_replace(' ','+',$search_text);
946
947 //$url = 'http://photon.komoot.de/api/?q='.$name_part;
948 $url = 'https://api.teleport.org/api/cities/?limit=1&search='.$name_part;
949
950 $request = wp_remote_get( $url );
951 $response = '';
952
953 // request failed
954 if ( is_wp_error( $request ) ) {
955 $response = $request;
956 }
957 $code = (int) wp_remote_retrieve_response_code( $request );
958
959 // make sure the fetch was successful
960 if (empty($response) && $code == 200 ) {
961 $response = wp_remote_retrieve_body( $request );
962
963 // Decode the json
964 $resp = json_decode( $response,true );
965 if(!empty($resp) && isset($resp['_embedded']) && isset($resp["_embedded"]["city:search-results"]) && !empty($resp["_embedded"]["city:search-results"])) {
966 foreach($resp["_embedded"]["city:search-results"] as $prediction)
967 {
968 if(isset($prediction["matching_full_name"])){
969 $results[] = [
970 'field_key' => 'search_location',
971 'value' => $prediction["matching_full_name"],
972 'print' => [
973 'parsed_content' => [
974 'icon_class' => 'fa fa-map-marker',
975 'title' => $prediction["matching_full_name"],
976 'sub_title' => '',
977 'right_text' => ''
978 ]
979 ]
980 ];
981
982 }
983 break;
984 }
985 }
986 }
987 }
988
989 $data['success'] = true;
990 $data['results'] = $results;
991
992 //$data['sql'] = $this->db->last_query();
993 $this->output($data);
994 }
995
996 public function booking_price_calculate() {
997 $data = array();
998 $data['success'] = false;
999
1000 $this->load->load_helper('listing');
1001 global $Winter_MVC_wdk_bookings;
1002
1003 $Winter_MVC_wdk_bookings->model('reservation_m');
1004 $Winter_MVC_wdk_bookings->model('calendar_m');
1005
1006 $results = array();
1007 $parameters = array();
1008 foreach ($_POST as $key => $value) {
1009 $parameters[sanitize_text_field($key)] = sanitize_text_field($value);
1010 }
1011
1012 $post_id = NULL;
1013 $date_from = NULL;
1014 $date_to = NULL;
1015
1016 if(isset($parameters['post_id'])) {
1017 $post_id = $parameters['post_id'];
1018 }
1019
1020 if(isset($parameters['date_from'])) {
1021 $date_from = wdk_normalize_date_db($parameters['date_from']);
1022 }
1023
1024 if(isset($parameters['date_to'])) {
1025 $date_to = wdk_normalize_date_db($parameters['date_to']);
1026 }
1027
1028 if($post_id && $date_from && $date_to) {
1029 $price = $Winter_MVC_wdk_bookings->reservation_m->calculate_price($post_id, $date_from, $date_to);
1030
1031 $calendar = $Winter_MVC_wdk_bookings->calendar_m->get_by(array('post_id'=>$post_id), TRUE); // date_package_expire package_id
1032 $calendar_fees = array();
1033 if($calendar && !empty($calendar->json_data_fees))
1034 $calendar_fees = json_decode($calendar->json_data_fees );
1035
1036 $results['symbol'] = '';
1037 if(function_exists('wdk_booking_currency_symbol'))
1038 $results['symbol'] = wdk_booking_currency_symbol();
1039
1040 if($price) {
1041 $results['price'] = $price['price'];
1042 $results['total'] = $price['price'];
1043 $results['fees'] = array();
1044 foreach ($calendar_fees as $fee) {
1045 if(!wmvc_show_data('is_activated', $fee, false,TRUE,TRUE)) continue;
1046 if(is_intval(wmvc_show_data('value', $fee,'',TRUE,TRUE))) {
1047 $field = str_replace(' ','_',strtolower(esc_html(wmvc_show_data('title', $fee,'-',TRUE,TRUE))));
1048 if(!wmvc_show_data('is_required', $fee, false,TRUE,TRUE) && isset($parameters['fee_'.$field]) && $parameters['fee_'.$field] == 0) {
1049
1050 } else {
1051 $price = 0;
1052 if(wmvc_show_data('calculation_base', $fee,'',TRUE,TRUE) == 'per_night') {
1053 $nights = (int)abs(strtotime($date_from) - strtotime($date_to))/(60*60*24);
1054 $price += intval(wmvc_show_data('value', $fee,'',TRUE,TRUE)) * $nights;
1055 } else if(wmvc_show_data('calculation_base', $fee,'',TRUE,TRUE) == 'per_person') {
1056 $price += intval(wmvc_show_data('value', $fee,'',TRUE,TRUE)) * intval(wmvc_show_data('guests', $_POST, 0,TRUE,TRUE));
1057 } else {
1058 $price += intval(wmvc_show_data('value', $fee,'',TRUE,TRUE));
1059 }
1060 $results['fees'][wmvc_show_data('title', $fee,'',TRUE,TRUE)] = $price;
1061 $results['total'] += $price;
1062 }
1063 }
1064 }
1065 $data['success'] = true;
1066 } else {
1067 $data['popup_text_error'] = __('Those dates are not available', 'wpdirectorykit');
1068 }
1069 }
1070
1071
1072 $data['results'] = $results;
1073
1074 //$data['sql'] = $this->db->last_query();
1075 $this->output($data);
1076 }
1077
1078 private function get_fa_icons() {
1079 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",
1080 "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",
1081 "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",
1082 "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",
1083 "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",
1084 "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",
1085 "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",
1086 "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",
1087 "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",
1088 "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",
1089 "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",
1090 "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",
1091 "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",
1092 "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",
1093 "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",
1094 "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",
1095 "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",
1096 "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",
1097 "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",
1098 "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",
1099 "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",
1100 "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",
1101 "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",
1102 "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",
1103 "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",
1104 "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",
1105 "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",
1106 "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",
1107 "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",
1108 "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",
1109 "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",
1110 "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",
1111 "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",
1112 "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",
1113 "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",
1114 "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",
1115 "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",
1116 "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",
1117 "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",
1118 "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",
1119 "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",
1120 "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",
1121 "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",
1122 "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",
1123 "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",
1124 "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",
1125 "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",
1126 "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",
1127 "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",
1128 "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",
1129 "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",
1130 "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",
1131 "fa fa-y-combinator","fa fa-yahoo","fa fa-yelp","fa fa-yoast","fa fa-youtube","fa fa-youtube-play","fa fa-youtube-square");
1132 }
1133
1134 }
1135