PluginProbe ʕ •ᴥ•ʔ
WP Content Copy Protection & No Right Click / 1.7.3
WP Content Copy Protection & No Right Click v1.7.3
trunk 1.0 1.2 1.3 1.5.0.3 1.5.0.4 1.6 1.7 1.7.3 1.9 2.3 2.6 2.8.1 2.9 3.1 3.1.5 3.4 3.4.1 3.4.2 3.4.3 3.4.4 3.4.5 3.4.6 3.4.7 3.4.9 3.5.1 3.5.2 3.5.3 3.5.4 3.5.5 3.5.6 3.5.7 3.5.8 3.5.9 3.6.1 3.6.2 3.6.3 3.6.4 3.6.5 3.6.6 3.6.7 3.6.8 3.6.9 3.7
wp-content-copy-protector / admin-core.php
wp-content-copy-protector Last commit date
css 6 years ago images 6 years ago js 6 years ago languages 6 years ago admin-core.php 6 years ago preventer-index.php 6 years ago readme.txt 6 years ago right-click-protection.jpg 6 years ago the_globals.php 6 years ago watermark-adv.jpg 6 years ago watermarking-adv-examples.png 6 years ago
admin-core.php
513 lines
1 <?php
2 if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
3 if ( !current_user_can('edit_others_pages') ) { //protection for admin content
4 exit(0);
5 } ?>
6 <?php
7 //define all variables the needed alot
8 include 'the_globals.php';
9 $post_action = '';
10 if(isset($_POST["action"])) $post_action = sanitize_text_field($_POST["action"]);
11 if($post_action == 'update')
12 {
13 //----------------------------------------------------list the options array values
14 //----------------------------------------------------list the options array values
15 $single_posts_protection = '';
16 if(isset($_POST["single_posts_protection"])) $single_posts_protection = sanitize_text_field($_POST["single_posts_protection"]);
17 $home_page_protection = '';
18 if(isset($_POST["home_page_protection"])) $home_page_protection = sanitize_text_field($_POST["home_page_protection"]);
19 $page_protection = '';
20 if(isset($_POST["page_protection"])) $page_protection = sanitize_text_field($_POST["page_protection"]);
21
22 $exclude_admin_from_protection = '';
23 if(isset($_POST["exclude_admin_from_protection"])) $exclude_admin_from_protection = sanitize_text_field($_POST["exclude_admin_from_protection"]);
24
25 $home_css_protection = '';
26 if(isset($_POST["home_css_protection"])) $home_css_protection = sanitize_text_field($_POST["home_css_protection"]);
27 $posts_css_protection = '';
28 if(isset($_POST["posts_css_protection"])) $posts_css_protection = sanitize_text_field($_POST["posts_css_protection"]);
29 $pages_css_protection = '';
30 if(isset($_POST["pages_css_protection"])) $pages_css_protection = sanitize_text_field($_POST["pages_css_protection"]);
31
32 $right_click_protection_posts = '';
33 if(isset($_POST["right_click_protection_posts"])) $right_click_protection_posts = sanitize_text_field($_POST["right_click_protection_posts"]);
34 $right_click_protection_homepage = '';
35 if(isset($_POST["right_click_protection_homepage"])) $right_click_protection_homepage = sanitize_text_field($_POST["right_click_protection_homepage"]);
36 $right_click_protection_pages = '';
37 if(isset($_POST["right_click_protection_pages"])) $right_click_protection_pages = sanitize_text_field($_POST["right_click_protection_pages"]);
38
39 $img = '';
40 if(isset($_POST["img"])) $img = sanitize_text_field($_POST["img"]);
41 $a = '';
42 if(isset($_POST["a"])) $a = sanitize_text_field($_POST["a"]);
43 $pb = '';
44 if(isset($_POST["pb"])) $pb = sanitize_text_field($_POST["pb"]);
45 $input = '';
46 if(isset($_POST["input"])) $input = sanitize_text_field($_POST["input"]);
47 $h = '';
48 if(isset($_POST["h"])) $h = sanitize_text_field($_POST["h"]);
49 $textarea = '';
50 if(isset($_POST["textarea"])) $textarea = sanitize_text_field($_POST["textarea"]);
51 $emptyspaces = '';
52 if(isset($_POST["emptyspaces"])) $emptyspaces = sanitize_text_field($_POST["emptyspaces"]);
53
54 $smessage = '';
55 if(isset($_POST["smessage"])) $smessage = sanitize_text_field($_POST["smessage"]);
56 $alert_msg_img = '';
57 if(isset($_POST["alert_msg_img"])) $alert_msg_img = sanitize_text_field($_POST["alert_msg_img"]);
58 $alert_msg_a = '';
59 if(isset($_POST["alert_msg_a"])) $alert_msg_a = sanitize_text_field($_POST["alert_msg_a"]);
60 $alert_msg_pb = '';
61 if(isset($_POST["alert_msg_pb"])) $alert_msg_pb = sanitize_text_field($_POST["alert_msg_pb"]);
62 $alert_msg_input = '';
63 if(isset($_POST["alert_msg_input"])) $alert_msg_input = sanitize_text_field($_POST["alert_msg_input"]);
64 $alert_msg_h = '';
65 if(isset($_POST["alert_msg_h"])) $alert_msg_h = sanitize_text_field($_POST["alert_msg_h"]);
66 $alert_msg_textarea = '';
67 if(isset($_POST["alert_msg_textarea"])) $alert_msg_textarea = sanitize_text_field($_POST["alert_msg_textarea"]);
68 $alert_msg_emptyspaces = '';
69 if(isset($_POST["alert_msg_emptyspaces"])) $alert_msg_emptyspaces = sanitize_text_field($_POST["alert_msg_emptyspaces"]);
70 $prnt_scr_msg = '';
71 if(isset($_POST["prnt_scr_msg"])) $prnt_scr_msg = sanitize_text_field($_POST["prnt_scr_msg"]);
72
73 //----------------------------------------------------Get the options array values
74 $wccp_settings =
75 Array (
76 'single_posts_protection' => $single_posts_protection, // prevent content copy, take 2 parameters
77 'home_page_protection' => $home_page_protection, // PROTECT THE HOME PAGE OR NOT
78 'page_protection' => $page_protection, // protect pages by javascript
79 'right_click_protection_posts' => $right_click_protection_posts, //
80 'right_click_protection_homepage' => $right_click_protection_homepage, //
81 'right_click_protection_pages' => $right_click_protection_pages, //
82 'home_css_protection' => $home_css_protection, // premium option
83 'posts_css_protection' => 'No', // premium option
84 'pages_css_protection' => 'No', // premium option
85 'exclude_admin_from_protection' => 'No', // premium option
86 'img' => '', // premium option
87 'a' => '', // premium option
88 'pb' => '', // premium option
89 'input' => '', // premium option
90 'h' => '', // premium option
91 'textarea' => '', // premium option
92 'emptyspaces' => '', // premium option
93 'smessage' => $smessage,
94 'alert_msg_img' => $alert_msg_img,
95 'alert_msg_a' => $alert_msg_a,
96 'alert_msg_pb' => $alert_msg_pb,
97 'alert_msg_input' => $alert_msg_input,
98 'alert_msg_h' => $alert_msg_h,
99 'alert_msg_textarea' => $alert_msg_textarea,
100 'alert_msg_emptyspaces' => $alert_msg_emptyspaces,
101 'prnt_scr_msg' => $prnt_scr_msg
102 );
103
104 if ($wccp_settings != '' ) {
105 update_option( 'wccp_settings' , $wccp_settings );
106 } else {
107 $deprecated = ' ';
108 $autoload = 'no';
109 add_option( 'wccp_settings', $wccp_settings, $deprecated, $autoload );
110 }
111 }else //no update action
112 {
113 $wccp_settings = wccp_read_options();
114 }
115
116 ?>
117 <style>
118 #aio_admin_main {
119 text-align:left;
120 direction:ltr;
121 padding:10px;
122 margin: 10px;
123 background-color: #ffffff;
124 border:1px solid #EBDDE2;
125 display: relative;
126 overflow: auto;
127 }
128 .inner_block{
129 height: 370px;
130 display: inline;
131 min-width:770px;
132 }
133 #donate{
134 background-color: #EEFFEE;
135 border: 1px solid #66DD66;
136 border-radius: 10px 10px 10px 10px;
137 height: 58px;
138 padding: 10px;
139 margin: 15px;
140 }
141 .text-font {
142 color: #1ABC9C;
143 font-size: 14px;
144 line-height: 1.5;
145 padding-left: 3px;
146 transition: color 0.25s linear 0s;
147 }
148 .text-font:hover {
149 opacity: 1;
150 transition: color 0.25s linear 0s;
151 }
152 .simpleTabsContent{
153 border: 1px solid #E9E9E9;
154 padding: 4px;
155 }
156 div.simpleTabsContent{
157 margin-top:0;
158 border: 1px solid #E0E0E0;
159 display: none;
160 height: 100%;
161 min-height: 400px;
162 padding: 5px 15px 15px;
163 }
164 html {
165 background: #FFFFFF;
166 }
167 .size-full {
168 height: auto;
169 max-width: 100%;
170 }
171 </style>
172 <div id="wpccp_subscribe" class="notice notice-info is-dismissible">
173 <?php $admin_email_wccp = get_bloginfo("admin_email"); ?>
174 <table style="background-image:url(<?php echo $pluginsurl ?>/images/ad.png);background-repeat:no-repeat;" border="0" width="100%" cellspacing="0" cellpadding="0">
175 <tr>
176 <td><h2 style="background-color:#FFFFFF;padding:3px;" class="alert-heading"><?php _e("WP Content Protection Plugin Group", 'wccp_free_translation_lang') ?></h2></td>
177 <td rowspan="2">
178 <p align="center"><a href="#" onclick="wpccp_dismiss_notice()"><?php _e('Dismiss', 'wccp_free_translation_lang'); ?> </a></td>
179 </tr>
180 <tr>
181 <td style="padding-left: 77px;">
182 <h4>
183 <?php echo __("Begin your adventure to improve your WordPress website, Also you will win a ", 'wccp_free_translation_lang') . ' <b style="color:red">' . __("discount codes" , 'wccp_free_translation_lang') . '</b>'; ?>
184 <button type="button" class="btn btn-primary wpccp_subscribe_btn" onclick='wpccp_open_subscribe_page();'> <?php _e("Start it!", 'wccp_free_translation_lang'); ?> </button>
185 </h4>
186 </td>
187 </tr>
188 </table>
189 </div>
190 <script>
191 function wpccp_dismiss_notice()
192 {
193 localStorage.setItem('wpccp_subscribed', 'wpccp_subsbc_user');
194 document.getElementById("wpccp_subscribe").style.display="none";
195 }
196
197 function wpccp_open_subscribe_page()
198 {
199 if(localStorage.getItem('wpccp_subscribed') !='wpccp_subsbc_user')
200 {
201 window.open('https://www.wp-buy.com/wpccp-subscribe/?email=<?php echo $admin_email_wccp; ?>','_blank');
202 }
203 }
204
205 if(localStorage.getItem('wpccp_subscribed') =='wpccp_subsbc_user')
206 {
207 document.getElementById("wpccp_subscribe").style.display="none";
208 }
209 </script>
210 <div id="aio_admin_main">
211 <form method="POST">
212 <input type="hidden" value="update" name="action">
213 <div class="simpleTabs">
214 <ul class="simpleTabsNavigation">
215 <li><a href="#">Main Settings</a></li>
216 <li><a href="#">Premium RightClick Protection</a></li>
217 <li><a href="#">Premium Protection by CSS</a></li>
218 <li><a href="#">More with pro</a></li>
219 </ul>
220 <div class="simpleTabsContent">
221 <table border="0" width="100%" cellspacing="0" cellpadding="0">
222 <tr>
223 <td width="77%">
224 <h4>Copy Protection using JavaScript (<font color="#008000">Basic Layer</font>):</h4>
225 <p><font face="Tahoma" size="2">This is the basic protection layer that uses
226 <u>JavaScript</u> to protect the posts, home page content from being copied by any other
227 web site author.</font></p>
228 <table border="0" width="100%" cellspacing="0" cellpadding="0">
229 <tr>
230 <td width="60%">
231 <div style="float: left;padding: 4px" id="layer3">
232 <table border="0" width="100%" height="320" cellspacing="0" cellpadding="0">
233 <tr>
234 <td width="221" height="33"><font face="Tahoma" size="2">Posts protection
235 by
236 <u>JavaScript</u></font></td>
237 <td>
238 <select size="1" name="single_posts_protection">
239 <?php
240 if ($wccp_settings['single_posts_protection'] == 'Enabled')
241 {
242 echo '<option selected>Enabled</option>';
243 echo '<option>Disabled</option>';
244 }
245 else
246 {
247 echo '<option>Enabled</option>';
248 echo '<option selected>Disabled</option>';
249 }
250 ?>
251 </select>
252 </td>
253 <td align="left">
254 <p><font face="Tahoma" size="2">&nbsp;For single posts content</font></p></td>
255 </tr>
256 <tr>
257 <td width="221" height="33"><font face="Tahoma" size="2">Homepage
258 protection
259 by
260 <u>JavaScript</u></font></td>
261 <td>
262 <select size="1" name="home_page_protection">
263 <?php
264 if ($wccp_settings['home_page_protection'] == 'Enabled')
265 {
266 echo '<option selected>Enabled</option>';
267 echo '<option>Disabled</option>';
268 }
269 else
270 {
271 echo '<option>Enabled</option>';
272 echo '<option selected>Disabled</option>';
273 }
274 ?>
275 </select>
276 </td>
277 <td align="left">
278 <p><font face="Tahoma" size="2">&nbsp;Don't copy any thing!
279 even from my homepage</font></td>
280 </tr>
281 <tr>
282 <td width="221" height="33"><font face="Tahoma" size="2">Static page's protection</font></td>
283 <td>
284 <select size="1" name="page_protection">
285 <?php
286 if ($wccp_settings['page_protection'] == 'Enabled')
287 {
288 echo '<option selected>Enabled</option>';
289 echo '<option>Disabled</option>';
290 }
291 else
292 {
293 echo '<option selected>Disabled</option>';
294 echo '<option>Enabled</option>';
295 }
296 ?>
297 </select></td>
298 <td align="left">
299 <p><font face="Tahoma" size="2">&nbsp;Use Premium Settings tab to customize more options</font></td>
300 </tr>
301 <tr>
302 <td width="221" height="33"><font face="Tahoma" size="2">Exclude <u>Admin</u> from protection</font></td>
303 <td>
304 <p align="center"><font color="#FF0000">Premium</font></td>
305 <td align="left">
306 <font face="Tahoma" size="2">&nbsp;If <u>Yes</u>, The protection functions will be inactive for the admin when he is logged in</font></td>
307 </tr>
308 <tr>
309 <td width="221" height="33"><font face="Tahoma" size="2">Selection disabled message</font></td>
310 <td colspan="2">
311 <table border="0" width="59%" cellspacing="0" cellpadding="0">
312 <tr>
313 <td>
314 <input type="text" style="width: 100%;" placeholder="Enter something" class="form-control" name="smessage" value="<?php echo $wccp_settings['smessage']; ?>"></td>
315 </tr>
316 </table>
317 </td>
318 </tr>
319 <tr>
320 <td width="221" height="33"><font face="Tahoma" size="2">Print preview message</font></td>
321 <td colspan="2">
322 <table border="0" width="99%" cellspacing="0" cellpadding="0">
323 <tr>
324 <td>
325 <textarea placeholder="Enter something" style="height: 110px; width: 100%;" class="form-control" name="prnt_scr_msg"><?php echo $wccp_settings['prnt_scr_msg']; ?></textarea></td>
326 </tr>
327 </table>
328 </td>
329 </tr>
330 </table></div>
331 </td>
332 </tr>
333 </table>
334 </td>
335 </tr>
336 </table></div>
337 <div class="simpleTabsContent">
338 <h4>Copy Protection on RightClick (<font color="#008000">Premium Layer 2</font>):</h4>
339 <p><font face="Tahoma" size="2">In this protection layer your visitors will
340 be able to <u>right click</u> on a specific page elements only (such as
341 Links as an example)</font></p>
342 <div id="layer4">
343 <table border="0" width="100%" height="361" cellspacing="0" cellpadding="0">
344 <tr>
345 <td height="53" width="21%"><font face="Tahoma" size="2">Disable <u>RightClick</u> on</font></td>
346 <td height="53">
347 <table border="0" width="521" height="100%" cellspacing="1" cellpadding="0">
348 <tr>
349 <td width="161" height="46">
350 <label class="checkbox" for="checkbox1">
351 <font face="Tahoma">
352 <input data-toggle="checkbox" type="checkbox" name="right_click_protection_posts" value="checked" <?php echo $wccp_settings['right_click_protection_posts']; ?>><font size="2">Posts
353 </font></font>
354 </label>
355 </td>
356 <td width="161" height="46">
357 <label class="checkbox" for="checkbox1">
358 <font face="Tahoma">
359 <input data-toggle="checkbox" type="checkbox" name="right_click_protection_homepage" value="checked" <?php echo $wccp_settings['right_click_protection_homepage']; ?>><font size="2">HomePage
360 </font></font>
361 </label>
362 </td>
363 <td width="185" height="46">
364 <label class="checkbox" for="checkbox1">
365 <font face="Tahoma">
366 <input data-toggle="checkbox" type="checkbox" name="right_click_protection_pages" value="checked" <?php echo $wccp_settings['right_click_protection_pages']; ?>><font size="2">Static
367 pages
368 </font></font>
369 </label>
370 </td>
371 </tr>
372 </table>
373 </td>
374 </tr>
375 <tr>
376 <td height="44" colspan="2">
377 <p align="left"><font color="#FF0000" face="Tahoma" size="2">
378 Remaining premium options preview image </font>
379 <img src="<?php echo $pluginsurl ?>/images/click-here-arrow.png" id="irc_mi">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
380 <b><font color="#0909FF"><u>
381 <a href="http://www.wp-buy.com/product/wp-content-copy-protection-pro/">
382 <font color="#0909FF">Preview &amp; Pricing</font></a></u></font></b>
383 </td>
384 </tr>
385 <tr>
386 <td height="264" colspan="2">
387 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
388 <a href="http://www.wp-buy.com/product/wp-content-copy-protection-pro/">
389 <img class="size-full" border="1" src="<?php echo $pluginsurl ?>/images/right-click-protection.jpg" style="border: 1px dotted #C0C0C0"></a><p>&nbsp;</td>
390 </tr>
391 </table></div>
392 </div>
393 <div class="simpleTabsContent">
394 <h4>Protection by CSS Techniques (<font color="#008000">Premium Layer 3</font>):</h4>
395 <p><font face="Tahoma" size="2">In this protection layer your website will
396 be protected by some <u>CSS</u> tricks that will word even if <u>JavaScript</u>
397 is disabled from the browser settings</font></p>
398 <table border="0" width="100%" cellspacing="0" cellpadding="0">
399 <tr>
400 <td width="60%">
401 <div style="float: left;padding: 4px" id="layer5">
402 <table border="0" width="100%" height="232" cellspacing="0" cellpadding="0">
403 <tr>
404 <td width="221" height="74"><font face="Tahoma" size="2"><b>Home Page</b> Protection by CSS</font></td>
405 <td height="74">
406 <select size="1" name="home_css_protection">
407 <?php
408 if ($wccp_settings['home_css_protection'] == 'Enabled')
409 {
410 echo '<option selected>Enabled</option>';
411 echo '<option>Disabled</option>';
412 }
413 else
414 {
415 echo '<option>Enabled</option>';
416 echo '<option selected>Disabled</option>';
417 }
418 ?>
419 </select>
420 </td>
421 <td align="left" height="74">
422 <font face="Tahoma" size="2">Protect your Homepage by CSS tricks</font></td>
423 </tr>
424 <tr>
425 <td width="221" height="77"><font face="Tahoma" size="2"><b>Posts</b> Protection by CSS</font></td>
426 <td align="center">
427 <font color="#FF0000">Premium </font>
428 </td>
429 <td align="left">
430 <font face="Tahoma" size="2">Protect your single posts by CSS tricks</font></td>
431 </tr>
432 <tr>
433 <td width="221"><font face="Tahoma" size="2"><b>Pages</b> Protection by CSS</font></td>
434 <td align="center">
435 <font color="#FF0000">Premium&nbsp;
436
437 </font>
438 </td>
439 <td align="left"><font face="Tahoma" size="2">Protect your static pages by CSS tricks</font></td>
440 </tr>
441 </table></div>
442 </td>
443 </tr>
444 </table>
445
446 </div>
447 <div class="simpleTabsContent" id="layer1">
448 <a href="http://www.wp-buy.com/product/wp-content-copy-protection-pro/">
449 <img class="size-full" border="1" src="<?php echo $pluginsurl ?>/images/smart-phones-protection.png" style="border: 1px dotted #C0C0C0">
450 </a>
451 <p></p>
452 <a href="http://www.wp-buy.com/product/wp-content-copy-protection-pro/">
453 <img class="size-full" border="1" src="<?php echo $pluginsurl ?>/images/watermark-adv.jpg" style="border: 1px dotted #C0C0C0">
454 </a>
455 <p></p>
456 <a href="http://www.wp-buy.com/product/wp-content-copy-protection-pro/">
457 <img class="size-full" border="1" src="<?php echo $pluginsurl ?>/images/watermarking-adv-examples.png" style="border: 1px dotted #C0C0C0">
458 </a>
459 <p></p>
460 <p><b><font face="Tahoma" size="2" color="#FFFFFF">
461 <span style="background-color: #008000">Basic features:</span></font></b></p>
462 <ul>
463 <li><font style="font-size: 10pt" face="Tahoma">Protect your content
464 from selection and copy. this plugin makes protecting your posts
465 extremely simple without yelling at your readers</font></li>
466 <li><font style="font-size: 10pt" face="Tahoma">No one can save
467 images from your site.</font></li>
468 <li><font style="font-size: 10pt" face="Tahoma">No right click or
469 context menu.</font></li>
470 <li><font style="font-size: 10pt" face="Tahoma">Show alert message,
471 Image Ad or HTML Ad on save images or right click.</font></li>
472 <li><font style="font-size: 10pt" face="Tahoma">Disable the
473 following keys&nbsp; CTRL+A, CTRL+C, CTRL+X,CTRL+S or CTRL+V.</font></li>
474 <li><font style="font-size: 10pt" face="Tahoma">Advanced and easy to
475 use control panel.</font></li>
476 <li><font style="font-size: 10pt" face="Tahoma">No one can right
477 click images on your site if you want</font></li>
478 </ul>
479 <p><b><font face="Tahoma" size="2" color="#FFFFFF">
480 <span style="background-color: #5B2473">Premium features:</span></font></b></p>
481 <ul>
482 <li><font style="font-size: 10pt" face="Tahoma">Get full Control on
483 Right click or context menu</font></li>
484 <li><font style="font-size: 10pt" face="Tahoma">Full watermarking</font></li>
485 <li><font style="font-size: 10pt" face="Tahoma">Show alert messages,
486 when user made right click on images, text boxes, links, plain
487 text.. etc</font></li>
488 <li><font style="font-size: 10pt" face="Tahoma">Admin can exclude
489 Home page Or Single posts from being copy protected </font></li>
490 <li><font style="font-size: 10pt" face="Tahoma">Admin can disable
491 copy protection for admin users.</font></li>
492 <li><font face="Tahoma" size="2">3 protection layers (JavaScript
493 protection, RightClick protection, CSS protection)</font></li>
494 <li><font style="font-size: 10pt" face="Tahoma">Aggressive image
495 protection (its near impossible for expert users to steal
496 your images !!)</font></li>
497 <li><font style="font-size: 10pt" face="Tahoma">compatible with all
498 major theme frameworks</font></li>
499 <li><font style="font-size: 10pt" face="Tahoma">compatible with all major browsers</font></li>
500 <li><font style="font-size: 10pt" face="Tahoma">Tested in IE9, IE10,
501 Firefox, Google Chrome, Opera</font></li>
502 <li><font style="font-size: 10pt" face="Tahoma">Disables image drag
503 and drop function</font></li>
504 <li><font style="font-size: 10pt" face="Tahoma">Works on smart
505 phones.</font></li>
506 <li><font style="font-size: 10pt" face="Tahoma">Ability to set
507 varying levels of protection per page or post.</font></li>
508 </ul>
509 </div>
510 </div><!-- simple tabs div end -->
511 <p align="right"><input class="btn btn-success" type="submit" value=" Save Settings " name="B4" style="width: 193; height: 29;">&nbsp;&nbsp;</p>
512 </form>
513 </div>