PluginProbe ʕ •ᴥ•ʔ
WP Content Copy Protection & No Right Click / 1.6
WP Content Copy Protection & No Right Click v1.6
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 9 years ago images 9 years ago js 9 years ago admin-core.php 9 years ago preventer-index.php 9 years ago readme.txt 9 years ago right-click-protection.jpg 9 years ago the_globals.php 9 years ago watermark-adv.jpg 9 years ago watermarking-adv-examples.png 9 years ago
admin-core.php
468 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
71 //----------------------------------------------------Get the options array values
72 $wccp_settings =
73 Array (
74 'single_posts_protection' => $single_posts_protection, // prevent content copy, take 2 parameters
75 'home_page_protection' => $home_page_protection, // PROTECT THE HOME PAGE OR NOT
76 'page_protection' => $page_protection, // protect pages by javascript
77 'right_click_protection_posts' => $right_click_protection_posts, //
78 'right_click_protection_homepage' => $right_click_protection_homepage, //
79 'right_click_protection_pages' => $right_click_protection_pages, //
80 'home_css_protection' => $home_css_protection, // premium option
81 'posts_css_protection' => 'No', // premium option
82 'pages_css_protection' => 'No', // premium option
83 'exclude_admin_from_protection' => 'No', // premium option
84 'img' => '', // premium option
85 'a' => '', // premium option
86 'pb' => '', // premium option
87 'input' => '', // premium option
88 'h' => '', // premium option
89 'textarea' => '', // premium option
90 'emptyspaces' => '', // premium option
91 'smessage' => $smessage,
92 'alert_msg_img' => $alert_msg_img,
93 'alert_msg_a' => $alert_msg_a,
94 'alert_msg_pb' => $alert_msg_pb,
95 'alert_msg_input' => $alert_msg_input,
96 'alert_msg_h' => $alert_msg_h,
97 'alert_msg_textarea' => $alert_msg_textarea,
98 'alert_msg_emptyspaces' => $alert_msg_emptyspaces
99 );
100
101 if ($wccp_settings != '' ) {
102 update_option( 'wccp_settings' , $wccp_settings );
103 } else {
104 $deprecated = ' ';
105 $autoload = 'no';
106 add_option( 'wccp_settings', $wccp_settings, $deprecated, $autoload );
107 }
108 }else //no update action
109 {
110 $wccp_settings = wccp_read_options();
111 }
112
113 ?>
114 <style>
115 #aio_admin_main {
116 text-align:left;
117 direction:ltr;
118 padding:10px;
119 margin: 10px;
120 background-color: #ffffff;
121 border:1px solid #EBDDE2;
122 display: relative;
123 overflow: auto;
124 }
125 .inner_block{
126 height: 370px;
127 display: inline;
128 min-width:770px;
129 }
130 #donate{
131 background-color: #EEFFEE;
132 border: 1px solid #66DD66;
133 border-radius: 10px 10px 10px 10px;
134 height: 58px;
135 padding: 10px;
136 margin: 15px;
137 }
138 .text-font {
139 color: #1ABC9C;
140 font-size: 14px;
141 line-height: 1.5;
142 padding-left: 3px;
143 transition: color 0.25s linear 0s;
144 }
145 .text-font:hover {
146 opacity: 1;
147 transition: color 0.25s linear 0s;
148 }
149 .simpleTabsContent{
150 border: 1px solid #E9E9E9;
151 padding: 4px;
152 }
153 div.simpleTabsContent{
154 margin-top:0;
155 border: 1px solid #E0E0E0;
156 display: none;
157 height: 100%;
158 min-height: 400px;
159 padding: 5px 15px 15px;
160 }
161 html {
162 background: #FFFFFF;
163 }
164 .size-full {
165 height: auto;
166 max-width: 100%;
167 }
168 </style>
169 <div id="aio_admin_main">
170 <form method="POST">
171 <input type="hidden" value="update" name="action">
172 <div class="simpleTabs">
173 <ul class="simpleTabsNavigation">
174 <li><a href="#">Main Settings</a></li>
175 <li><a href="#">Premium RightClick Protection</a></li>
176 <li><a href="#">Premium Protection by CSS</a></li>
177 <li><a href="#">More with pro</a></li>
178 </ul>
179 <div class="simpleTabsContent">
180 <table border="0" width="100%" cellspacing="0" cellpadding="0">
181 <tr>
182 <td width="77%">
183 <h4>Copy Protection using JavaScript (<font color="#008000">Basic Layer</font>):</h4>
184 <p><font face="Tahoma" size="2">This is the basic protection layer that uses
185 <u>JavaScript</u> to protect the posts, home page content from being copied by any other
186 web site author.</font></p>
187 <table border="0" width="100%" cellspacing="0" cellpadding="0">
188 <tr>
189 <td width="60%">
190 <div style="float: left;padding: 4px" id="layer3">
191 <table border="0" width="100%" height="320" cellspacing="0" cellpadding="0">
192 <tr>
193 <td width="221" height="33"><font face="Tahoma" size="2">Posts protection
194 by
195 <u>JavaScript</u></font></td>
196 <td>
197 <select size="1" name="single_posts_protection">
198 <?php
199 if ($wccp_settings['single_posts_protection'] == 'Enabled')
200 {
201 echo '<option selected>Enabled</option>';
202 echo '<option>Disabled</option>';
203 }
204 else
205 {
206 echo '<option>Enabled</option>';
207 echo '<option selected>Disabled</option>';
208 }
209 ?>
210 </select>
211 </td>
212 <td align="left">
213 <p><font face="Tahoma" size="2">&nbsp;For single posts content</font></p></td>
214 </tr>
215 <tr>
216 <td width="221" height="33"><font face="Tahoma" size="2">Homepage
217 protection
218 by
219 <u>JavaScript</u></font></td>
220 <td>
221 <select size="1" name="home_page_protection">
222 <?php
223 if ($wccp_settings['home_page_protection'] == 'Enabled')
224 {
225 echo '<option selected>Enabled</option>';
226 echo '<option>Disabled</option>';
227 }
228 else
229 {
230 echo '<option>Enabled</option>';
231 echo '<option selected>Disabled</option>';
232 }
233 ?>
234 </select>
235 </td>
236 <td align="left">
237 <p><font face="Tahoma" size="2">&nbsp;Don't copy any thing!
238 even from my homepage</font></td>
239 </tr>
240 <tr>
241 <td width="221" height="33"><font face="Tahoma" size="2">Static page's protection</font></td>
242 <td>
243 <select size="1" name="page_protection">
244 <?php
245 if ($wccp_settings['page_protection'] == 'Enabled')
246 {
247 echo '<option selected>Enabled</option>';
248 echo '<option>Disabled</option>';
249 }
250 else
251 {
252 echo '<option selected>Disabled</option>';
253 echo '<option>Enabled</option>';
254 }
255 ?>
256 </select></td>
257 <td align="left">
258 <p><font face="Tahoma" size="2">&nbsp;Use Premium Settings tab to customize more options</font></td>
259 </tr>
260 <tr>
261 <td width="221" height="33"><font face="Tahoma" size="2">Exclude
262 <u>Admin</u> from protection</font></td>
263 <td>
264 <p align="center"><font color="#FF0000">Premium</font></td>
265 <td align="left">
266 <font face="Tahoma" size="2">&nbsp;If <u>Yes</u>, The protection
267 functions will be inactive for the admin when he is logged in</font></td>
268 </tr>
269 <tr>
270 <td width="221" height="33"><font face="Tahoma" size="2">Selection disabled message</font></td>
271 <td colspan="2">
272 <table border="0" width="49%" cellspacing="0" cellpadding="0">
273 <tr>
274 <td>
275 <input type="text" placeholder="Enter something" class="form-control" name="smessage" value="<?php echo $wccp_settings['smessage']; ?>"></td>
276 </tr>
277 </table>
278 </td>
279 </tr>
280 </table></div>
281 </td>
282 </tr>
283 </table>
284 </td>
285 </tr>
286 </table></div>
287 <div class="simpleTabsContent">
288 <h4>Copy Protection on RightClick (<font color="#008000">Premium Layer 2</font>):</h4>
289 <p><font face="Tahoma" size="2">In this protection layer your visitors will
290 be able to <u>right click</u> on a specific page elements only (such as
291 Links as an example)</font></p>
292 <div id="layer4">
293 <table border="0" width="100%" height="361" cellspacing="0" cellpadding="0">
294 <tr>
295 <td height="53" width="21%"><font face="Tahoma" size="2">Disable <u>RightClick</u> on</font></td>
296 <td height="53">
297 <table border="0" width="521" height="100%" cellspacing="1" cellpadding="0">
298 <tr>
299 <td width="161" height="46">
300 <label class="checkbox" for="checkbox1">
301 <font face="Tahoma">
302 <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
303 </font></font>
304 </label>
305 </td>
306 <td width="161" height="46">
307 <label class="checkbox" for="checkbox1">
308 <font face="Tahoma">
309 <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
310 </font></font>
311 </label>
312 </td>
313 <td width="185" height="46">
314 <label class="checkbox" for="checkbox1">
315 <font face="Tahoma">
316 <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
317 pages
318 </font></font>
319 </label>
320 </td>
321 </tr>
322 </table>
323 </td>
324 </tr>
325 <tr>
326 <td height="44" colspan="2">
327 <p align="left"><font color="#FF0000" face="Tahoma" size="2">
328 Remaining premium options preview image </font>
329 <img src="<?php echo $pluginsurl ?>/images/click-here-arrow.png" id="irc_mi">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
330 <b><font color="#0909FF"><u>
331 <a href="http://www.wp-buy.com/product/wp-content-copy-protection-pro/">
332 <font color="#0909FF">Preview &amp; Pricing</font></a></u></font></b>
333 </td>
334 </tr>
335 <tr>
336 <td height="264" colspan="2">
337 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
338 <a href="http://www.wp-buy.com/product/wp-content-copy-protection-pro/">
339 <img class="size-full" border="1" src="<?php echo $pluginsurl ?>/images/right-click-protection.jpg" style="border: 1px dotted #C0C0C0"></a><p>&nbsp;</td>
340 </tr>
341 </table></div>
342 </div>
343 <div class="simpleTabsContent">
344 <h4>Protection by CSS Techniques (<font color="#008000">Premium Layer 3</font>):</h4>
345 <p><font face="Tahoma" size="2">In this protection layer your website will
346 be protected by some <u>CSS</u> tricks that will word even if <u>JavaScript</u>
347 is disabled from the browser settings</font></p>
348 <table border="0" width="100%" cellspacing="0" cellpadding="0">
349 <tr>
350 <td width="60%">
351 <div style="float: left;padding: 4px" id="layer5">
352 <table border="0" width="100%" height="232" cellspacing="0" cellpadding="0">
353 <tr>
354 <td width="221" height="74"><font face="Tahoma" size="2"><b>Home Page</b> Protection by CSS</font></td>
355 <td height="74">
356 <select size="1" name="home_css_protection">
357 <?php
358 if ($wccp_settings['home_css_protection'] == 'Enabled')
359 {
360 echo '<option selected>Enabled</option>';
361 echo '<option>Disabled</option>';
362 }
363 else
364 {
365 echo '<option>Enabled</option>';
366 echo '<option selected>Disabled</option>';
367 }
368 ?>
369 </select>
370 </td>
371 <td align="left" height="74">
372 <font face="Tahoma" size="2">Protect your Homepage by CSS tricks</font></td>
373 </tr>
374 <tr>
375 <td width="221" height="77"><font face="Tahoma" size="2"><b>Posts</b> Protection by CSS</font></td>
376 <td align="center">
377 <font color="#FF0000">Premium </font>
378 </td>
379 <td align="left">
380 <font face="Tahoma" size="2">Protect your single posts by CSS tricks</font></td>
381 </tr>
382 <tr>
383 <td width="221"><font face="Tahoma" size="2"><b>Pages</b> Protection by CSS</font></td>
384 <td align="center">
385 <font color="#FF0000">Premium&nbsp;
386 <script>$("select").selectpicker({style: 'btn-hg btn-primary', menuStyle: 'dropdown-inverse'});</script>
387 </font>
388 </td>
389 <td align="left"><font face="Tahoma" size="2">Protect your static pages by CSS tricks</font></td>
390 </tr>
391 </table></div>
392 </td>
393 </tr>
394 </table>
395
396 </div>
397 <div class="simpleTabsContent" id="layer1">
398 <a href="http://www.wp-buy.com/product/wp-content-copy-protection-pro/">
399 <img class="size-full" border="1" src="<?php echo $pluginsurl ?>/images/smart-phones-protection.png" style="border: 1px dotted #C0C0C0">
400 </a>
401 <p></p>
402 <a href="http://www.wp-buy.com/product/wp-content-copy-protection-pro/">
403 <img class="size-full" border="1" src="<?php echo $pluginsurl ?>/images/watermark-adv.jpg" style="border: 1px dotted #C0C0C0">
404 </a>
405 <p></p>
406 <a href="http://www.wp-buy.com/product/wp-content-copy-protection-pro/">
407 <img class="size-full" border="1" src="<?php echo $pluginsurl ?>/images/watermarking-adv-examples.png" style="border: 1px dotted #C0C0C0">
408 </a>
409 <p></p>
410 <p><b><font face="Tahoma" size="2" color="#FFFFFF">
411 <span style="background-color: #008000">Basic features:</span></font></b></p>
412 <ul>
413 <li><font style="font-size: 10pt" face="Tahoma">Protect your content
414 from selection and copy. this plugin makes protecting your posts
415 extremely simple without yelling at your readers</font></li>
416 <li><font style="font-size: 10pt" face="Tahoma">No one can save
417 images from your site.</font></li>
418 <li><font style="font-size: 10pt" face="Tahoma">No right click or
419 context menu.</font></li>
420 <li><font style="font-size: 10pt" face="Tahoma">Show alert message,
421 Image Ad or HTML Ad on save images or right click.</font></li>
422 <li><font style="font-size: 10pt" face="Tahoma">Disable the
423 following keys&nbsp; CTRL+A, CTRL+C, CTRL+X,CTRL+S or CTRL+V.</font></li>
424 <li><font style="font-size: 10pt" face="Tahoma">Advanced and easy to
425 use control panel.</font></li>
426 <li><font style="font-size: 10pt" face="Tahoma">No one can right
427 click images on your site if you want</font></li>
428 </ul>
429 <p><b><font face="Tahoma" size="2" color="#FFFFFF">
430 <span style="background-color: #5B2473">Premium features:</span></font></b></p>
431 <ul>
432 <li><font style="font-size: 10pt" face="Tahoma">Get full Control on
433 Right click or context menu</font></li>
434 <li><font style="font-size: 10pt" face="Tahoma">Full watermarking</font></li>
435 <li><font style="font-size: 10pt" face="Tahoma">Show alert messages,
436 when user made right click on images, text boxes, links, plain
437 text.. etc</font></li>
438 <li><font style="font-size: 10pt" face="Tahoma">Admin can exclude
439 Home page Or Single posts from being copy protected </font></li>
440 <li><font style="font-size: 10pt" face="Tahoma">Admin can disable
441 copy protection for admin users.</font></li>
442 <li><font face="Tahoma" size="2">3 protection layers (JavaScript
443 protection, RightClick protection, CSS protection)</font></li>
444 <li><font style="font-size: 10pt" face="Tahoma">Aggressive image
445 protection (its near impossible for expert users to steal
446 your images !!)</font></li>
447 <li><font style="font-size: 10pt" face="Tahoma">compatible with all
448 major theme frameworks</font></li>
449 <li><font style="font-size: 10pt" face="Tahoma">compatible with all major browsers</font></li>
450 <li><font style="font-size: 10pt" face="Tahoma">Tested in IE9, IE10,
451 Firefox, Google Chrome, Opera</font></li>
452 <li><font style="font-size: 10pt" face="Tahoma">Disables image drag
453 and drop function</font></li>
454 <li><font style="font-size: 10pt" face="Tahoma">Works on smart
455 phones.</font></li>
456 <li><font style="font-size: 10pt" face="Tahoma">Ability to set
457 varying levels of protection per page or post.</font></li>
458 </ul>
459 <p class="text-font">&nbsp;
460 <?php
461 echo 'nnnnnnnnnnnnnnnn';
462 echo current_user_can('edit_others_pages');
463
464 ?>
465 </div>
466 </div><!-- simple tabs div end -->
467 <p align="right"><input class="btn btn-success" type="submit" value=" Save Settings " name="B4" style="width: 193; height: 29;">&nbsp;&nbsp;</p>
468 </form></div>