| 1 |
<?php |
| 2 |
if ( ! defined( 'ABSPATH' ) ) { |
| 3 |
exit; // Exit if accessed directly |
| 4 |
} |
| 5 |
|
| 6 |
wp_enqueue_script('jquery'); |
| 7 |
wp_enqueue_script('jquery-ui-core'); |
| 8 |
wp_enqueue_script('jquery-ui-autocomplete', '', array('jquery-ui-widget', 'jquery-ui-position'), '1.8.6'); |
| 9 |
wp_enqueue_script( 'jquery-ui-datepicker' ); |
| 10 |
wp_enqueue_editor(); |
| 11 |
|
| 12 |
wp_enqueue_style('wpsc-iso-css'); |
| 13 |
wp_enqueue_style('wpsc-fa-css'); |
| 14 |
wp_enqueue_style('wpsc-jquery-ui'); |
| 15 |
wp_enqueue_style('wpsc-public-css'); |
| 16 |
wp_enqueue_style('wpsc-admin-css'); |
| 17 |
wp_enqueue_style('wpsc-modal-css'); |
| 18 |
|
| 19 |
wp_enqueue_script('wpsc-dtp-js'); |
| 20 |
wp_enqueue_style('wpsc-dtp-css'); |
| 21 |
wp_enqueue_script( 'jquery-ui-slider' ); |
| 22 |
|
| 23 |
wp_enqueue_script('wpsc-admin'); |
| 24 |
wp_enqueue_script('wpsc-public'); |
| 25 |
wp_enqueue_script('wpsc-modal'); |
| 26 |
|
| 27 |
wp_enqueue_script('wpsc-ui-touch-punch'); |
| 28 |
|
| 29 |
$wpsc_appearance_modal_window = get_option('wpsc_modal_window'); |
| 30 |
?> |
| 31 |
|
| 32 |
<div class="wpsc-iso"> |
| 33 |
<div id="wpsc_tickets_container" class="row" style="border:none;"></div> |
| 34 |
</div> |
| 35 |
|
| 36 |
<!-- Pop-up snippet start --> |
| 37 |
<div id="wpsc_popup_background" style="display:none;"></div> |
| 38 |
<div id="wpsc_popup_container" style="display:none;"> |
| 39 |
<div class="wpsc-iso"> |
| 40 |
<div class="row"> |
| 41 |
<div id="wpsc_popup" class="col-xs-10 col-xs-offset-1 col-sm-10 col-sm-offset-1 col-md-8 col-md-offset-2 col-lg-6 col-lg-offset-3"> |
| 42 |
<div id="wpsc_popup_title" class="row" style="background-color:<?php echo esc_attr($wpsc_appearance_modal_window['wpsc_header_bg_color'])?> !important;color:<?php echo esc_attr($wpsc_appearance_modal_window['wpsc_header_text_color'])?> !important;" ><h3><?php _e('Modal Title','supportcandy');?></h3></div> |
| 43 |
<div id="wpsc_popup_body" class="row"><?php _e('I am body!','supportcandy');?></div> |
| 44 |
<div id="wpsc_popup_footer" class="row" style="background-color:<?php echo esc_attr($wpsc_appearance_modal_window['wpsc_footer_bg_color'])?> !important;"> |
| 45 |
<button type="button" class="btn wpsc_popup_close"><?php _e('Close','supportcandy');?></button> |
| 46 |
<button type="button" class="btn wpsc_popup_action"><?php _e('Save Changes','supportcandy');?></button> |
| 47 |
</div> |
| 48 |
</div> |
| 49 |
</div> |
| 50 |
</div> |
| 51 |
</div> |
| 52 |
<!-- Pop-up snippet end --> |
| 53 |
|
| 54 |
<?php |
| 55 |
add_action('wp_footer', 'wpsc_page_inline_script', 99999999999999999999); |
| 56 |
global $attrs;?> |
| 57 |
|
| 58 |
<script> |
| 59 |
var wpsc_setting_action = 'create_ticket'; |
| 60 |
</script> |
| 61 |
|
| 62 |
<?php |
| 63 |
do_action('wpsc_after_wpsc_create_ticket_shortcode_loaded'); |
| 64 |
if(!function_exists('wpsc_page_inline_script')) { |
| 65 |
function wpsc_page_inline_script() {?> |
| 66 |
<script> |
| 67 |
<?php |
| 68 |
$url_attrs = array(); |
| 69 |
foreach ($_GET as $key => $value) { |
| 70 |
$key = sanitize_text_field($key); |
| 71 |
$value = sanitize_text_field($value); |
| 72 |
$url_attrs[$key] = $value; |
| 73 |
} |
| 74 |
$url_attrs = apply_filters('wpsc_create_ticket_short_para',$url_attrs); |
| 75 |
?> |
| 76 |
var attrs = <?php echo wp_json_encode($url_attrs)?>; |
| 77 |
jQuery(document).ready(function(){ |
| 78 |
wpsc_create_ticket_init(wpsc_setting_action,attrs); |
| 79 |
}); |
| 80 |
</script> |
| 81 |
<?php |
| 82 |
} |
| 83 |
} |
| 84 |
?> |