| 1 |
<?php |
| 2 |
$plus_icon_svg = "<span class=''><img src='". SURVEY_MAKER_ADMIN_URL ."/images/icons/plus-icon.svg'></span>"; |
| 3 |
$youtube_icon_svg = "<span><img src='". esc_attr(SURVEY_MAKER_ADMIN_URL) ."/images/icons/youtube-video-icon.svg' ></span>"; |
| 4 |
|
| 5 |
$action = isset( $_GET["action"] ) ? sanitize_key( $_GET["action"] ) : ""; |
| 6 |
$id = isset( $_GET["id"] ) ? absint( sanitize_key( $_GET["id"] ) ) : null; |
| 7 |
|
| 8 |
if($action == 'unpublish' || $action == 'publish'){ |
| 9 |
// In our file that handles the request, verify the nonce. |
| 10 |
$nonce = esc_attr( $_REQUEST["_wpnonce"] ); |
| 11 |
|
| 12 |
if ( ! wp_verify_nonce( $nonce, $this->plugin_name . "-" . $action . "-popup-survey" ) ) { |
| 13 |
die( "Go get a life script kiddies" ); |
| 14 |
} |
| 15 |
|
| 16 |
$this->popup_surveys_obj->publish_unpublish_popup_survey($id,$action); |
| 17 |
} |
| 18 |
?> |
| 19 |
<div class="wrap"> |
| 20 |
<div class="ays-survey-heading-box"> |
| 21 |
<div class="ays-survey-wordpress-user-manual-box"> |
| 22 |
<a href="https://www.youtube.com/watch?v=gM6SQdOw3fA" target="_blank" style="text-decoration: none;font-size: 13px;"> |
| 23 |
<?php echo wp_kses($youtube_icon_svg, Survey_Maker_Data::get_allowed_tags_for_loader()); ?> |
| 24 |
<span style="margin-left: 3px;text-decoration: underline;"><?php echo esc_html__( "How to use popup surveys", "survey-maker" ); ?></span> |
| 25 |
</a> |
| 26 |
<a href="https://ays-pro.com/blog/how-to-make-a-survey-popup-for-your-wordpress" target="_blank" style="text-decoration: none;font-size: 13px;"> |
| 27 |
<i class="ays_fa ays_fa_file_text" ></i> |
| 28 |
<span style="margin-left: 3px;text-decoration: underline;"><?php echo esc_html__( "View Documentation", "survey-maker" ); ?></span> |
| 29 |
</a> |
| 30 |
<a href="https://ays-demo.com/wordpress-popup-survey/" target="_blank" style="text-decoration: none;font-size: 13px;"> |
| 31 |
<i class="ays_fa ays_fa_external_link" ></i> |
| 32 |
<span style="margin-left: 3px;text-decoration: underline;"><?php echo esc_html__( "Demo", "survey-maker" ); ?></span> |
| 33 |
</a> |
| 34 |
</div> |
| 35 |
</div> |
| 36 |
<h1 class="wp-heading-inline"> |
| 37 |
<?php |
| 38 |
echo esc_html__( get_admin_page_title(), "survey-maker" ); |
| 39 |
?> |
| 40 |
</h1> |
| 41 |
<div class="ays-survey-popup-survey-description ays_survey_small_hint_text ays_survey_small_hint_text_for_menu_items" style="max-width: 760px;margin: 0 0 14px;"> |
| 42 |
<p style="margin: 0"><?php echo esc_html__( "Create and manage popup surveys that display a selected survey in a popup window on your website.", "survey-maker" ); ?></p> |
| 43 |
<p style="margin: 0;"><?php echo esc_html__( "Set the popup trigger, display rules, size, position, and behavior for each survey popup.", "survey-maker" ); ?></p> |
| 44 |
</div> |
| 45 |
<?php do_action('ays_survey_sale_banner'); ?> |
| 46 |
<div class="ays-survey-maker-add-new-button-box"> |
| 47 |
<?php |
| 48 |
echo sprintf( '<a href="?page=%s&action=%s" class="page-title-action button-primary ays-survey-add-new-button-new-design" style="display: inline-block; margin-left: 0 !important;"> %s ' . esc_html__( 'Add New', "survey-maker" ) . '</a>', esc_attr( $_REQUEST['page'] ), 'add', wp_kses($plus_icon_svg, Survey_Maker_Data::get_allowed_tags_for_loader())); |
| 49 |
?> |
| 50 |
</div> |
| 51 |
|
| 52 |
<div id="poststuff"> |
| 53 |
<div id="post-body" class="metabox-holder"> |
| 54 |
<div id="post-body-content" style="margin-bottom: 10px;"> |
| 55 |
<div class="meta-box-sortables ui-sortable"> |
| 56 |
<?php |
| 57 |
$this->popup_surveys_obj->views(); |
| 58 |
?> |
| 59 |
<form method="post"> |
| 60 |
<?php |
| 61 |
$this->popup_surveys_obj->prepare_items(); |
| 62 |
$this->popup_surveys_obj->display(); |
| 63 |
?> |
| 64 |
</form> |
| 65 |
</div> |
| 66 |
</div> |
| 67 |
</div> |
| 68 |
<br class="clear"> |
| 69 |
</div> |
| 70 |
</div> |
| 71 |
|