Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /*
- * @ Pirate-Sky Crew :: PHP Decoder v2
- * @ Author: pLa$71k
- * @ Web: http://pirate-sky.com
- * @ Pirate-Sky Crew © 2008 - 2013
- */
- function pkalrp_get_cached_results($cache_key)
- {
- $license = get_option("transient_mods_d4f3cd42325105d8d24a5a77996b6d92");
- if ("10" != $license) {
- return get_transient($cache_key);
- }
- }
- function pkalrp_set_cached_results($cache_key, $output)
- {
- $license = get_option("transient_mods_d4f3cd42325105d8d24a5a77996b6d92");
- $options = get_option("alrp_gs_options");
- if ("10" != $license) {
- set_transient($cache_key, $output, 3600 * 24 * $options['expire']);
- }
- }
- function pkalrp_premium_slidebox_ads()
- {
- $license = get_option("transient_mods_d4f3cd42325105d8d24a5a77996b6d92");
- $options = get_option("alrp_sb_options");
- if ("22" == $license && 1 == $options['enableads']) {
- $output = "";
- if (!empty($options['azonaffid'])) {
- $xml = simplexml_load_file("http://pipes.yahoo.com/pipes/pipe.run?_id=9e055c6e7324317e950587170637f91d&_render=rss", "SimpleXMLElement", LIBXML_NOCDATA);
- $ads_url = str_replace("tempatwisataw-20", $options['azonaffid'], $xml->channel->item->link);
- $ads_title = $xml->channel->item->title;
- if (!empty($ads_url) && !empty($ads_title)) {
- $output .= pkalrp_premium_slidebox_adcontent($ads_title, $ads_url);
- }
- }
- if (!empty($options['customadstitle']) && !empty($options['customadslink'])) {
- $ads_url = $options['customadslink'];
- $ads_title = $options['customadstitle'];
- $output .= pkalrp_premium_slidebox_adcontent($ads_title, $ads_url);
- }
- if (!empty($options['customadstitle2']) && !empty($options['customadslink2'])) {
- $ads_url = $options['customadslink2'];
- $ads_title = $options['customadstitle2'];
- $output .= pkalrp_premium_slidebox_adcontent($ads_title, $ads_url);
- }
- return $output;
- }
- }
- function pkalrp_premium_slidebox_adcontent($ads_title, $ads_url)
- {
- $output = "<li>";
- $output .= "<span class=\"date\">" . date("l, d/m/Y g:i A") . "</span>";
- $output .= "<h5 class=\"blue\"><a href=\"" . $ads_url . "\" target=\"_blank\" rel=\"nofollow\">" . $ads_title . "</a></h5>";
- $output .= "<div class=\"clearfix\"></div>";
- $output .= "</li>";
- return $output;
- }
- function pkalrp_reg_premium_features()
- {
- include_once("loader.php");
- if (ALRP_PREMIUM) {
- update_option("transient_mods_d4f3cd42325105d8d24a5a77996b6d92", "22");
- update_option("alrp_status", "premium");
- pkalrp_reg_enable_features();
- }
- }
- function pkalrp_chk_prev_settings()
- {
- $prev_status = get_option("transient_mods_d4f3cd42325105d8d24a5a77996b6d92", "10");
- if ("10" == $prev_status) {
- delete_option("alrp_status");
- delete_option("transient_mods_d4f3cd42325105d8d24a5a77996b6d92");
- }
- }
- function pkalrp_admin_notices()
- {
- $alrp_admin_url = admin_url("admin.php?page=alrp");
- if ("00" == get_option("transient_mods_d4f3cd42325105d8d24a5a77996b6d92", "00")) {
- echo "<div class='updated'><p>" . sprintf(__("SEO Auto Links and Related Posts plugin is <strong>NOT ACTIVATED</strong> yet. <strong><a href=\"%s\">Click here to activate</a></strong>."), $alrp_admin_url) . "</p></div>";
- }
- }
- function pkalrp_admin_dashboard_page()
- {
- $license = get_option("transient_mods_d4f3cd42325105d8d24a5a77996b6d92", "00");
- $prev = !empty($_GET['prev']) ? $_GET['prev'] : "";
- if (!empty($prev) || "01" == $license || "11" == $license) {
- pkalrp_admin_registration();
- } else {
- pkalrp_admin_print_dashboard();
- }
- pkalrp_admin_print_current_license();
- }
- function pkalrp_admin_init_relatedposts_page()
- {
- $license = get_option("transient_mods_d4f3cd42325105d8d24a5a77996b6d92", "00");
- if ("12" != $license && "22" != $license && "10" != $license) {
- pkalrp_admin_print_not_activated_header("Related Posts Settings");
- } else {
- pkalrp_relatedposts_page();
- }
- }
- function pkalrp_admin_init_slideout_page()
- {
- $license = get_option("transient_mods_d4f3cd42325105d8d24a5a77996b6d92", "00");
- if ("12" != $license && "22" != $license && "10" != $license) {
- pkalrp_admin_print_not_activated_header("Slide Out Related Posts Settings");
- } else {
- pkalrp_slideout_page();
- }
- }
- function pkalrp_admin_init_autolinks_page()
- {
- $license = get_option("transient_mods_d4f3cd42325105d8d24a5a77996b6d92", "00");
- if ("12" != $license && "22" != $license && "10" != $license) {
- pkalrp_admin_print_not_activated_header("Auto Links Settings");
- } else {
- pkalrp_autolinks_page();
- }
- }
- function pkalrp_reg_enable_features()
- {
- $options = get_option("alrp_rp_options");
- $options['enable'] = 1;
- if ("free" == get_option("alrp_status")) {
- $options['timthumb'] = 0;
- }
- update_option("alrp_rp_options", $options);
- $options = get_option("alrp_al_options");
- $options['enable'] = 1;
- update_option("alrp_al_options", $options);
- $options = get_option("alrp_sb_options");
- $options['enable'] = 1;
- update_option("alrp_sb_options", $options);
- }
- function pkalrp_admin_registration()
- {
- $prev = !empty($_GET['prev']) ? $_GET['prev'] : "";
- $next = !empty($_GET['next']) ? $_GET['next'] : "";
- $email = !empty($_GET['email']) ? urldecode($_GET['email']) : "";
- $license = !empty($_GET['key']) ? urldecode($_GET['key']) : "";
- if ("new" == $prev && "two" == $next) {
- update_option("transient_mods_d4f3cd42325105d8d24a5a77996b6d92", "11");
- echo "\t\t\t<h3>STEP 2 - REGISTRATION</h3>\n\t\t\t<p>A confirmation email with subject \"Confirm your subscription for SEO ALRP plugin\" has been sent to you.</p><p>Please follow the following steps to finish your registration.</p>\n\t\t\t\t<ol>\n\t\t\t\t\t<li>Click the confirmation link inside the email, and you'll got another email with your license key in it.</li>\n\t\t\t\t\t<li>Fill in the form below with your email and license key.</l";
- echo "i>\n\t\t\t\t</ol>\n\t\t\t\t<p>Note: Some time, the email will took a few minutes to arrived, so please wait.</p>\n\t\t";
- pkalrp_reg_print_alreg_form();
- echo "<p><a href=\"" . admin_url("admin.php?page=alrp&next=two&prev=alreg") . "\">Register as New User</a></p>";
- } else if ("new" == $prev && "finish" == $next) {
- update_option("transient_mods_d4f3cd42325105d8d24a5a77996b6d92", "12");
- update_option("alrp_status", "registered");
- pkalrp_reg_enable_features();
- echo "\t\t\t<h3>REGISTRATION FINISH</h3>\n\t\t\t\t<p>Thank you! Your registration is finish.</p><p>You can start using the plugin by adjusting the <a href=\"";
- echo admin_url("admin.php?page=alrp-autolinks");
- echo "\">Auto Links</a>, <a href=\"";
- echo admin_url("admin.php?page=alrp-relatedposts");
- echo "\">Related Posts</a> and <a href=\"";
- echo admin_url("admin.php?page=alrp-slideout");
- echo "\">Slide Out Related Posts</a> settings to your needs.</p>\n\t\t";
- } else if ("alreg" == $prev && "finish" == $next) {
- if (pkalrp_reg_license_checker($email, $license)) {
- update_option("transient_mods_d4f3cd42325105d8d24a5a77996b6d92", "12");
- update_option("alrp_status", "registered");
- update_option("alrp_users", array(
- "email" => $email,
- "license key" => $license
- ));
- pkalrp_reg_enable_features();
- echo "\t\t\t<h3>REGISTRATION FINISH</h3>\n\t\t\t\t<p>Thank you! Your registration is finish.</p><p>You can start using the plugin by adjusting the <a href=\"";
- echo admin_url("admin.php?page=alrp-autolinks");
- echo "\">Auto Links</a>, <a href=\"";
- echo admin_url("admin.php?page=alrp-relatedposts");
- echo "\">Related Posts</a> and <a href=\"";
- echo admin_url("admin.php?page=alrp-slideout");
- echo "\">Slide Out Related Posts</a> settings to your needs.</p>\t\t\t\n\t\t";
- } else {
- update_option("transient_mods_d4f3cd42325105d8d24a5a77996b6d92", "11");
- echo "\t\t\t\t<h3>STEP 2 - REGISTRATION</h3>\n\t\t\t\t<p>The license key is invalid, please try again.</p>\n\t\t\t";
- pkalrp_reg_print_alreg_form($email);
- echo "<p><a href=\"" . admin_url("admin.php?page=alrp&next=two&prev=alreg") . "\">Register as New User</a></p>";
- }
- } else if ("free" == $prev && "finish" == $next) {
- update_option("transient_mods_d4f3cd42325105d8d24a5a77996b6d92", "10");
- update_option("alrp_status", "free");
- $options = pkalrp_get_admin_rp_options();
- $options['timthumb'] = 0;
- update_option("alrp_rp_options", $options);
- pkalrp_reg_enable_features();
- echo "\t\t<h3>REGISTRATION FINISH</h3>\n\t\t<p>Thank you! Your registration is finish.</p><p>You can start using the plugin by adjusting the <a href=\"";
- echo admin_url("admin.php?page=alrp-autolinks");
- echo "\">Auto Links</a>, <a href=\"";
- echo admin_url("admin.php?page=alrp-relatedposts");
- echo "\">Related Posts</a> and <a href=\"";
- echo admin_url("admin.php?page=alrp-slideout");
- echo "\">Slide Out Related Posts</a> settings to your needs.</p>\n\t\t";
- } else {
- update_option("transient_mods_d4f3cd42325105d8d24a5a77996b6d92", "01");
- echo "\t\t<h3>STEP 1 - REGISTRATION</h3>\n\t\t<p>Use form A if you already have the license key, and use form B to register as new user.</p>\n\t\t<h4>A. ALREADY REGISTERED BEFORE</h4>\n\t\t";
- pkalrp_reg_print_alreg_form();
- pkalrp_reg_print_aweber_form();
- }
- echo "\t ";
- echo "<s";
- echo "cript type=\"text/javascript\">\n\t\t\tjQuery(document).ready(function(\$) {\n\t\t\t\t\$(\"#aweberform\").submit(function (event) {\n\t\t\t\t\tvar \$email = \$(\"#email\").val();\n\t\t\t\t\t\$('#token').val(\$.md5(\$email));\n\t\t\t\t});\n\t\t\t\t\$(\"#aweberform\").validate();\n\t\t\t\t\$(\"#reguser\").validate();\n\t\t\t});\n\t\t</script>\n\t";
- }
- function pkalrp_reg_license_checker($email, $license)
- {
- if ("3d4" . md5($email) . "d8d24" === $license) {
- return true;
- }
- }
- function pkalrp_readonly_input($checkbox = false)
- {
- if ("22" != get_option("transient_mods_d4f3cd42325105d8d24a5a77996b6d92", "00")) {
- if ($checkbox) {
- echo "disabled=\"disabled\"";
- } else {
- echo "readonly=\"readonly\"";
- }
- }
- }
- function pkalrp_admin_print_current_license()
- {
- $license = get_option("transient_mods_d4f3cd42325105d8d24a5a77996b6d92", "00");
- switch ($license) {
- case "22":
- $ret = "<strong>PREMIUM USER</strong>. Thank you for your support!";
- break;
- case "12":
- $ret = "<strong>REGISTERED USER</strong>. Thank you!";
- break;
- case "11":
- $ret = "<strong>STEP 2 - REGISTRATION</strong>, please input your license key below.";
- break;
- case "01":
- $ret = "<strong>STEP 1 - REGISTRATION</strong>, please complete the form below.";
- break;
- case "10":
- $ret = "<strong>FREE USER</strong>.";
- break;
- case "00":
- $ret = "<strong>PLUGIN NOT ACTIVATED</strong>. Select the type of license that you want below, and <strong>click the Activate button</strong>.";
- }
- echo "<div id=\"message\" class=\"updated fade\"><p>Your current license: " . $ret . "</p></div>";
- }
- function pkalrp_admin_print_premium_auto_links($options)
- {
- echo "\t<tr>\n <th scope=\"row\">Manual auto links</th>\n <td>\n\t <label>";
- echo "<s";
- echo "pan style=\"color:#666666;margin-left:2px;\">Use this to promote ";
- echo "<s";
- echo "trong>affiliate product</strong> or auto create ";
- echo "<s";
- echo "trong>external link</strong> to trusted sites for SEO purpose.\n \t";
- pkalrp_print_manual_links($options['manuallinks']);
- echo " \tEdit below with format: ";
- echo "<s";
- echo "trong>Keyword,URL,nofollow</strong>. Use <i>comma</i> as delimiter; <i>one Keyword-URL per line</i>; use nofollow in affiliate link.</span><br />\n <textarea rows=\"4\" cols=\"100\" name=\"alrp_al_options[manuallinks]\" ";
- pkalrp_readonly_input();
- echo "/>";
- echo $options['manuallinks'];
- echo "</textarea>\n </label>\n </td>\n </tr>\n ";
- }
- function pkalrp_admin_print_premium_slideout($options)
- {
- echo "\t<tr>\n\t\t<th scope=\"row\" colspan=\"2\" class=\"rowtitle\">";
- echo "<s";
- echo "trong>PREMIUM FEATURES</strong></th>\n\t</tr>\n\t<tr>\n\t\t<th scope=\"row\">Enable slidebox Ads</th>\n\t\t<td><label>\n\t\t <input ";
- pkalrp_readonly_input(true);
- echo " name=\"alrp_sb_options[enableads]\" type=\"checkbox\" value=\"1\" ";
- checked($options['enableads'], 1);
- echo " />\n\t\t Yes<br/></label></td>\n\t</tr>\n\t<tr>\n\t\t<th scope=\"row\">Ad Slot #1</th>\n\t\t<td>\n\t\t\t<label>Amazon.com Affiliate Tracking ID<br/>\t\t\t\t \n\t\t\t\t<input ";
- pkalrp_readonly_input();
- echo " type=\"text\" size=\"35\" name=\"alrp_sb_options[azonaffid]\" value=\"";
- echo $options['azonaffid'];
- echo "\" />\n\t\t\t\t ";
- echo "<s";
- echo "pan>Needed to display Amazon Best Deal's of The Day</span></label>\n\t\t</td>\n\t</tr>\n\t<tr><th scope=\"row\">Ad Slot #2</th>\n\t\t<td>\n\t\t\t<table style=\"padding:0px;margin:-8px -10px;\">\n\t\t\t<tr>\n\t\t\t\t<td>\n\t\t\t\t\t<label>Ad Title:<br />\n\t\t\t\t\t<input ";
- pkalrp_readonly_input();
- echo " type=\"text\" size=\"35\" name=\"alrp_sb_options[customadstitle]\" value=\"";
- echo $options['customadstitle'];
- echo "\" /></label></td>\n\t\t\t\t\t<td><label>Ad URL:<br />\n\t\t\t\t\t<input ";
- pkalrp_readonly_input();
- echo " type=\"text\" size=\"75\" name=\"alrp_sb_options[customadslink]\" value=\"";
- echo $options['customadslink'];
- echo "\" />\n\t\t </label></td>\n\t\t\t</tr>\n\t\t\t</table>\n\t\t</td>\n\t</tr>\n\t<tr><th scope=\"row\">Ad Slot #3</th>\n\t\t<td>\n\t\t\t<table style=\"padding:0px;margin:-8px -10px;\">\n\t\t\t<tr>\n\t\t\t\t<td>\n\t\t\t\t\t<label>Ad Title:<br />\n\t\t\t\t\t<input ";
- pkalrp_readonly_input();
- echo " type=\"text\" size=\"35\" name=\"alrp_sb_options[customadstitle2]\" value=\"";
- echo $options['customadstitle2'];
- echo "\" /></label></td>\n\t\t\t\t\t<td><label>Ad URL:<br />\n\t\t\t\t\t<input ";
- pkalrp_readonly_input();
- echo " type=\"text\" size=\"75\" name=\"alrp_sb_options[customadslink2]\" value=\"";
- echo $options['customadslink2'];
- echo "\" />\n\t\t </label></td>\n\t\t\t</tr>\n\t\t\t</table>\n\t\t</td>\n\t</tr>\n\n ";
- }
- function pkalrp_admin_print_header_amazonaws()
- {
- $ret = get_transient("alrp_amazonaws");
- $default = "<a href=\"http://www.jvzoo.com/c/8090/1816\" target=\"_blank\" class=\"alrptip\"><strong>#1 Seo Fast Indexer</strong> - Index Your Links in Record Time - Special Price (\$4.97)</a>";
- if (empty($ret) && function_exists("curl_init")) {
- $url = "https://s3.amazonaws.com/poer/seo-alrp/seo-alrp.txt";
- $crl = curl_init();
- $timeout = 5;
- curl_setopt($crl, CURLOPT_URL, $url);
- curl_setopt($crl, CURLOPT_RETURNTRANSFER, 1);
- curl_setopt($crl, CURLOPT_CONNECTTIMEOUT, $timeout);
- $ret = curl_exec($crl);
- curl_close($crl);
- }
- if (empty($ret)) {
- $ret = $default;
- }
- set_transient("alrp_amazonaws", $ret, 3600 * 24);
- echo "<p style=\"padding-left: 10px;\">Check this out: " . $ret . "</p>";
- }
- add_action("admin_notices", "pkalrp_admin_notices");
- include_once("form.php");
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement