| @@ -1,37 +1,122 @@ | ||
| 1 | +<?php | |
| 2 | +if ( ! defined( 'ABSPATH' ) ) | |
| 3 | + exit; | |
| 4 | +?> | |
| 1 | 5 | <style> |
| 2 | - a.xyz_header_link:hover{text-decoration:underline;} | |
| 3 | - .xyz_header_link{text-decoration:none;} | |
| 6 | + a.xyz_header_link:hover{text-decoration:underline;} | |
| 7 | + .xyz_header_link{text-decoration:none;} | |
| 4 | 8 | </style> |
| 5 | 9 | |
| 6 | -<?php | |
| 10 | +<?php | |
| 11 | +if(isset($_POST['xyz_ips_pre_ads'])){ | |
| 12 | + $xyz_ips_pre_ads = intval($_POST['xyz_ips_pre_ads']); | |
| 13 | + update_option('xyz_ips_premium_version_ads',$xyz_ips_pre_ads); | |
| 14 | +} | |
| 7 | 15 | |
| 8 | -if(get_option('xyz_credit_link')=="0"){ | |
| 16 | +/* | |
| 17 | +if(get_option('xyz_ips_premium_version_ads')==1){ | |
| 18 | + | |
| 9 | 19 | ?> |
| 10 | -<div style="float:left;background-color: #FFECB3;border-radius:5px;padding: 0px 5px;margin-top: 10px;border: 1px solid #E0AB1B" id="xyz_backlink_div"> | |
| 11 | - | |
| 12 | - Please do a favour by enabling backlink to our site. <a id="xyz_ips_backlink" style="cursor: pointer;" >Okay, Enable</a>. | |
| 20 | +<div id="xyz-ips-premium"> | |
| 21 | + | |
| 22 | + <div style="float: left; padding: 0 5px"> | |
| 23 | + <h2 style="vertical-align: middle;"> | |
| 24 | + <a target="_blank" href="https://xyzscripts.com/wordpress-plugins/xyz-wp-insert-code-snippet/details">Fully Featured XYZ WP Insert Code Snippet Premium Plugin</a> - Just 19 USD | |
| 25 | + </h2> | |
| 26 | + </div> | |
| 27 | + <div style="float: left; margin-top: 3px"> | |
| 28 | + <a target="_blank" | |
| 29 | + href="https://xyzscripts.com/members/product/purchase/XYZWPICSPRE"><img | |
| 30 | + src="<?php echo plugins_url("images/orange_buynow.png",XYZ_INSERT_PHP_PLUGIN_FILE); ?>"> | |
| 31 | + </a> | |
| 32 | + </div> | |
| 33 | + <div style="float: left; padding: 0 5px"> | |
| 34 | + <h2 style="vertical-align: middle;text-shadow: 1px 1px 1px #686868"> | |
| 35 | + ( <a href="<?php echo admin_url('admin.php?page=insert-php-code-snippet-about');?>">Compare Features</a> ) | |
| 36 | + </h2> | |
| 37 | + </div> | |
| 38 | +</div> | |
| 39 | +<?php | |
| 40 | +} | |
| 41 | +*/ | |
| 42 | + | |
| 43 | +if($_POST && isset($_POST['xyz_ips_credit'])) | |
| 44 | +{ | |
| 45 | + if (! isset( $_REQUEST['_wpnonce'] )|| ! wp_verify_nonce( $_REQUEST['_wpnonce'],'ips-psetting_')){ | |
| 46 | + wp_nonce_ays( 'ips-psetting_' ); | |
| 47 | + exit; | |
| 48 | + } | |
| 49 | + $xyz_ips_credit_link=sanitize_text_field($_POST['xyz_ips_credit']); | |
| 50 | + update_option('xyz_credit_link', $xyz_ips_credit_link); | |
| 51 | +} | |
| 52 | + | |
| 53 | + | |
| 54 | +if(!$_POST && isset($_GET['ips_blink'])&&isset($_GET['ips_blink'])=='en'){ | |
| 55 | + if (! isset( $_REQUEST['_wpnonce'] ) || ! wp_verify_nonce( $_REQUEST['_wpnonce'],'ips-blk')){ | |
| 56 | + wp_nonce_ays( 'ips-blk'); | |
| 57 | + exit; | |
| 58 | + } | |
| 59 | + update_option('xyz_credit_link',"ips"); | |
| 60 | +?> | |
| 61 | +<div class="xyz_ips_system_notice_area_style1" id="xyz_ips_system_notice_area"> | |
| 62 | +Thank you for enabling backlink. | |
| 63 | + <span id="xyz_ips_system_notice_area_dismiss">Dismiss</span> | |
| 64 | +</div> | |
| 65 | + | |
| 66 | +<style type="text/css"> | |
| 67 | + .xyz_blink{ | |
| 68 | + display:none !important; | |
| 69 | + } | |
| 70 | +</style> | |
| 71 | +<?php | |
| 72 | +} | |
| 73 | + | |
| 74 | +if((get_option('xyz_credit_link')=="0")&&(get_option('xyz_ips_credit_dismiss')=="0")){ | |
| 75 | + ?> | |
| 76 | +<div style="float:left;background-color: #FFECB3;border-radius:5px;padding: 0px 5px;margin-top: 10px;border: 1px solid #E0AB1B" id="xyz_ips_backlink_div"> | |
| 77 | + | |
| 78 | + Please do a favour by enabling backlink to our site. <a id="xyz_ips_backlink" style="cursor: pointer;" >Okay, Enable</a>. <a id="xyz_ips_dismiss" style="cursor: pointer;" >Dismiss</a>. | |
| 13 | 79 | <script type="text/javascript"> |
| 80 | + jQuery(document).ready(function() { | |
| 81 | + jQuery('#xyz_ips_backlink').click(function(){ | |
| 82 | + xyz_filter_blink(1) | |
| 83 | + }); | |
| 14 | 84 | |
| 15 | - jQuery(document).ready(function() { | |
| 85 | + jQuery('#xyz_ips_dismiss').click(function(){ | |
| 86 | + xyz_filter_blink(-1) | |
| 87 | + }); | |
| 16 | 88 | |
| 17 | - jQuery('#xyz_ips_backlink').click(function() { | |
| 18 | - var dataString = { | |
| 19 | - action: 'ajax_backlink', | |
| 20 | - enable: 1 | |
| 21 | - }; | |
| 89 | + function xyz_filter_blink(stat){ | |
| 22 | 90 | |
| 23 | - jQuery.post(ajaxurl, dataString, function(response) { | |
| 24 | - jQuery("#xyz_backlink_div").html('Thank you for enabling backlink !'); | |
| 25 | - jQuery("#xyz_backlink_div").css('background-color', '#D8E8DA'); | |
| 26 | - jQuery("#xyz_backlink_div").css('border', '1px solid #0F801C'); | |
| 27 | - }); | |
| 28 | - }); | |
| 29 | -}); | |
| 91 | + <?php $ajax_fltr_nonce = wp_create_nonce( "xyz-ips-blink" );?> | |
| 92 | + var dataString = { | |
| 93 | + action: 'ips_backlink', | |
| 94 | + security:'<?php echo $ajax_fltr_nonce; ?>', | |
| 95 | + enable: stat | |
| 96 | + }; | |
| 30 | 97 | |
| 98 | + jQuery.post(ajaxurl, dataString, function(response) { | |
| 99 | + | |
| 100 | + if(response==1){ | |
| 101 | + jQuery("#xyz_ips_backlink_div").html('Thank you for enabling backlink!'); | |
| 102 | + jQuery("#xyz_ips_backlink_div").css('background-color', '#D8E8DA'); | |
| 103 | + jQuery("#xyz_ips_backlink_div").css('border', '1px solid #0F801C'); | |
| 104 | + jQuery("select[id=xyz_ips_credit] option[value=ips]").attr("selected", true); | |
| 105 | + } | |
| 106 | + | |
| 107 | + if(response==-1){ | |
| 108 | + jQuery("#xyz_ips_backlink_div").remove(); | |
| 109 | + | |
| 110 | + } | |
| 111 | + | |
| 112 | + }); | |
| 113 | + } | |
| 114 | + }); | |
| 115 | + | |
| 31 | 116 | </script> |
| 32 | 117 | </div> |
| 33 | - <?php | |
| 118 | + <?php | |
| 34 | 119 | } |
| 35 | 120 | ?> |
| 36 | 121 | |
| 37 | 122 | <style> |
| @@ -51,21 +136,21 @@ | ||
| 51 | 136 | <div style="margin-top: 10px"> |
| 52 | 137 | <table style="float:right; "> |
| 53 | 138 | <tr> |
| 54 | 139 | <td style="float:right;" > |
| 55 | - <a onmouseover="tooltip.show('Please help us to keep this plugin free forever by donating a dollar');" onmouseout="tooltip.hide();" class="xyz_header_link" style="margin-left:8px;margin-right:12px;" target="_blank" href="http://xyzscripts.com/donate/1">Donate</a> | |
| 140 | + <a class="xyz_header_link" style="margin-left:8px;margin-right:12px;" target="_blank" href="http://xyzscripts.com/donate/5">Donate</a> | |
| 56 | 141 | </td> |
| 57 | 142 | <td style="float:right;"> |
| 58 | - <a class="xyz_header_link" style="margin-left:8px;" target="_blank" href="http://kb.xyzscripts.com/category/insert-php-code-snippet/">FAQ</a> | |
| 143 | + <a class="xyz_header_link" style="margin-left:8px;" target="_blank" href="http://help.xyzscripts.com/docs/insert-php-code-snippet/faq/">FAQ</a> | |
| 59 | 144 | </td> |
| 60 | 145 | <td style="float:right;"> |
| 61 | - <a class="xyz_header_link" style="margin-left:8px;" target="_blank" href="http://docs.xyzscripts.com/category/insert-php-code-snippet/">Docs</a> | |
| 146 | + <a class="xyz_header_link" style="margin-left:8px;" target="_blank" href="http://help.xyzscripts.com/docs/insert-php-code-snippet/">Readme</a> | |
| 62 | 147 | </td> |
| 63 | 148 | <td style="float:right;"> |
| 64 | - <a class="xyz_header_link" style="margin-left:8px;" target="_blank" href="http://xyzscripts.com/wordpress-plugins/insert-php-code-snippet/details">About</a> | |
| 149 | + <a class="xyz_header_link" style="margin-left:8px;" target="_blank" href="https://xyzscripts.com/wordpress-plugins/insert-php-code-snippet/details">About</a> | |
| 65 | 150 | </td> |
| 66 | 151 | <td style="float:right;"> |
| 67 | - <a class="xyz_header_link" target="_blank" href="http://xyzscripts.com">XYZScripts</a> | |
| 152 | + <a class="xyz_header_link" target="_blank" href="https://xyzscripts.com">XYZScripts</a> | |
| 68 | 153 | </td> |
| 69 | 154 | |
| 70 | 155 | </tr> |
| 71 | 156 | </table> |
| @@ -70,5 +155,5 @@ | ||
| 70 | 155 | </tr> |
| 71 | 156 | </table> |
| 72 | 157 | </div> |
| 73 | 158 | |
| 74 | -<div style="clear: both"></div> | |
| 159 | +<div style="clear: both"></div> | |