Find this useful? Enter your email to receive occasional updates for securing PHP code.
Signing you up...
Thank you for signing up!
PHP Decode
eval(gzinflate(base64_decode(' FZrHDoNYFkR/ZXbTLRZgMprQImdMTpsROefM14974YVt2Ub31a2qY/HXf/..
Decoded Output download
?><?php
if (!defined('MY_SCRIPT_NAME')) {
define('MY_SCRIPT_NAME', 'wp-affiliate-pro.php');
}
if (!defined('AP_KWD_TABLE')) {
define('AP_KWD_TABLE', 'affiliatepro_links');
}
if (!defined('AP_TRK_TABLE')) {
define('AP_TRK_TABLE', 'affiliatepro_track');
}
// Do the tracker first. To simplify the installation and maintenance we have included the tracker in the same file as the plugin. Everything is self-contained in this file, and we auto-detect the way we were called based on the presence of a global define.
if (!defined('ABSPATH')) {
require_once('../../wp-config.php');
// We use the blog home page as a redirect if we can't find the link ID in the database or if the given link ID looks fishy.
$securityRedirect = get_option('siteurl');
if (isset($_GET['id'])) {
$kwd_id = $_GET['id'];
} else {
// No ID set is a security breach. Someone is playing with our redirector.
header("Location: $securityRedirect");
exit();
}
// Trick to force convert to integer.
$kwd_id = 0 + $kwd_id;
// Record the click if the user hasn't disabled link tracking in Options.
if (get_option('ap_link_tracking') == 'Yes') {
if (isset($_SERVER['HTTP_REFERER'])) {
$referer = $_SERVER['HTTP_REFERER'];
} else {
$referer = '(direct request)';
}
// Sanitize the input
$referer = addslashes($referer);
$refererid = md5($referer);
// Do the advanced tracker
$table_name = $table_prefix . AP_TRK_TABLE;
$sql = "UPDATE $table_name SET clickcount=clickcount+1 WHERE keywordid=$kwd_id AND refererid='$refererid'";
if ($wpdb->query($sql) == 0) {
// No previous clicks from this referer/keyword combination. Add our data.
$sql = "INSERT INTO $table_name (id, keywordid, refererid, referer, clickcount) VALUES (NULL, $kwd_id, '$refererid', '$referer', 1)";
$wpdb->query($sql);
}
// Do the regular tracker
$table_name = $table_prefix . AP_KWD_TABLE;
$sql = "UPDATE $table_name SET clickcount=clickcount+1 WHERE id=$kwd_id";
$wpdb->query($sql);
}
// Get the affiliate link specified for this keyword
$table_name = $table_prefix . AP_KWD_TABLE;
$sql = "SELECT url FROM $table_name WHERE id=$kwd_id";
$url = $wpdb->get_var($sql);
if ($url == NULL) {
// We didn't find the ID in the database. It may have been deleted or it may be an attempt to play with our redirector. Show the blog home page instead.
header("Location: $securityRedirect");
} else {
header("Location: $url");
}
exit();
} // Tracker ends here
// Add a new menu under Options:, visible for all users with access levels 8+ (administrator role).
if (!function_exists('ap_add_pages')) {
function ap_add_pages() {
if (function_exists('add_options_page')) {
add_options_page('Configure WordPress Affiliate Pro', 'WordPress Affiliate Pro', 8, MY_SCRIPT_NAME, 'ap_options_page');
}
if (function_exists('add_management_page')) {
add_management_page('Manage WordPress Affiliate Pro', 'WordPress Affiliate Pro', 8, MY_SCRIPT_NAME, 'ap_manage_page');
}
}
}
if (!function_exists('print_affiliate_blurb')) {
function print_affiliate_blurb() {
?>
<div class=wrap>
<p><strong><font color="#FF0000">Earn $72.75 Per Sale Promoting WP Affiliate Pro :</font></strong><br />
<strong>Become an Affiliate:</strong></p>
<p>Becoming an affiliate for WP Affiliate Pro is easy, the affiliate program is managed<br />
through Clickbank, the largest provider of digital goods online.</p>
<p><strong>It's as easy as this:</strong></p>
<p><strong>Step 1:</strong></p>
<p>Get your clickbank ID (if you haven't got one, sign up at <a href="http://www.clickbank.com">http://www.clickbank.com</a>)<br />
it should look like:</p>
<p>http://Your-ClickBank-ID-Here.wpaffpro.hop.clickbank.net/</p>
<p>Or Automatically have your affiliate link created by <a href="http://www.clickbank.com/info/jmap.htm?vendor=WPAFFPRO">Clicking Here </a></p>
<p><strong>Step 2:</strong></p>
<p>Decide which method you would like to promote (if you already have a list, you can<br />
contact [email protected] and organize a customized page to promote to), be it PPC,<br />
SEO, list promotion, blogging, leads etc.</p>
<p><strong>Step 3:</strong></p>
<p>Promote!</p>
<p>You earn a whopping $72.75 per sale, which hands down beats any other affiliate<br />
program for a similar piece of software on the market.</p>
<p>Enjoy the sales you're going to make ;)</p>
<p>Wealth and Abundance,</p>
<p>The team at IM Alliance</p>
</div>
<?
}
}
if (!function_exists('print_complementary_copy')) {
function print_complementary_copy() {
if (!defined('COMPLEMENTARY_COPY')) {
return ;
}
?>
<div class=wrap align='right'><p><strong><font color="#FF0000">NOT FOR RESALE OR DISTRIBUTION. THIS IS A COMPLEMENTARY COPY FOR <?=COMPLEMENTARY_COPY;?>.</font></strong></p></div>
<?
}
}
if (!function_exists('ap_install_plugin')) {
function ap_install_plugin() {
global $table_prefix, $wpdb;
// Create the Keywords table if not already present
$table_name = $table_prefix . AP_KWD_TABLE;
// Is the table already installed?
if ($wpdb->get_var("show tables like '$table_name'") != $table_name) {
$sql = "CREATE TABLE ".$table_name." (
id mediumint(9) NOT NULL AUTO_INCREMENT,
keyword tinytext NOT NULL,
wordcount smallint(3) NOT NULL default '0',
caption tinytext,
url tinytext NOT NULL,
clickcount mediumint(9) NOT NULL default '0',
replacecount smallint(3) NOT NULL default '0',
weight smallint(1) unsigned NOT NULL default '5',
UNIQUE KEY id(id)
);";
require_once(ABSPATH . 'wp-admin/upgrade-functions.php');
dbDelta($sql);
// Mark update as complete
update_option('ap_db_upgrade', 'Ver20');
}
// Create the click tracker table if not already present
$table_name = $table_prefix . AP_TRK_TABLE;
// Is the table already installed?
if ($wpdb->get_var("SHOW tables LIKE '$table_name'") != $table_name) {
$sql = "CREATE TABLE ".$table_name." (
id mediumint(9) NOT NULL AUTO_INCREMENT,
keywordid mediumint(9) NOT NULL default '0',
refererid varchar(32) NOT NULL default '',
referer tinytext NOT NULL,
clickcount mediumint(9) NOT NULL default '0',
UNIQUE KEY id(id),
KEY refererid(refererid)
);";
require_once(ABSPATH . 'wp-admin/upgrade-functions.php');
dbDelta($sql);
// Mark update as complete
update_option('ap_db_upgrade', 'Ver20');
}
if (get_option('ap_db_upgrade') != 'Ver18') {
// Upgrade to DB version 1.8
$table_name = $table_prefix . AP_TRK_TABLE;
$sql = "ALTER TABLE ".$table_name." DROP INDEX refererid, ADD INDEX refererid (refererid)";
$wpdb->query($sql);
}
if (get_option('ap_db_upgrade') < 'Ver20') {
// Upgrade to DB version 1.9
$table_name = $table_prefix . AP_KWD_TABLE;
$sql = "ALTER TABLE ".$table_name." ADD replacecount SMALLINT(3) DEFAULT '0' NOT NULL";
$wpdb->query($sql);
$sql = "ALTER TABLE ".$table_name." ADD weight SMALLINT(1) UNSIGNED DEFAULT '5' NOT NULL";
$wpdb->query($sql);
}
// Preset our options to default (all enabled)
update_option('ap_enable', 'Yes');
update_option('ap_new_window', 'Yes');
update_option('ap_link_tracking', 'Yes');
update_option('ap_replace_count', '0');
update_option('ap_replace_count_global', '0');
// Possible options are R for random or W for weighted random.
update_option('ap_replace_count_method', 'W');
update_option('ap_link_class', '');
}
}
// The function that renders the WordPress Affiliate Pro options page
if (!function_exists('ap_options_page')) {
function ap_options_page() {
if (isset($_POST['ap_submit'])) {
if (isset($_POST['ap_enable'])) {
update_option('ap_enable', 'Yes');
} else {
update_option('ap_enable', 'No');
}
if (isset($_POST['ap_new_window'])) {
update_option('ap_new_window', 'Yes');
} else {
update_option('ap_new_window', 'No');
}
if (isset($_POST['ap_link_tracking'])) {
update_option('ap_link_tracking', 'Yes');
} else {
update_option('ap_link_tracking', 'No');
}
if (isset($_POST['ap_replace_count'])) {
$repl_count = 0 + $_POST['ap_replace_count'];
update_option('ap_replace_count', $repl_count);
} else {
update_option('ap_replace_count', 0);
}
if (isset($_POST['ap_replace_count_global'])) {
$repl_count_global = 0 + $_POST['ap_replace_count_global'];
update_option('ap_replace_count_global', $repl_count_global);
} else {
update_option('ap_replace_count_global', 0);
}
if (isset($_POST['ap_replace_count_method'])) {
update_option('ap_replace_count_method', $_POST['ap_replace_count_method']);
} else {
update_option('ap_replace_count_method', 'W');
}
if (isset($_POST['ap_link_class'])) {
update_option('ap_link_class', $_POST['ap_link_class']);
}
?><div id="message" class="updated fade"><p><strong>Your options have been saved.</strong></p></div>
<? }
$my_plugin_url = $_SERVER['REQUEST_URI'];
// Strip parameters in the plugin URL
if (strpos($my_plugin_url, '&') !== FALSE) {
$my_plugin_url = substr($my_plugin_url, 0, strpos($my_plugin_url, '&'));
}
print_complementary_copy();
?>
<div class=wrap>
<form method="post" action="<?=$my_plugin_url;?>">
<h2>Configure WordPress Affiliate Pro</h2>
<? if (get_option('ap_enable')=='No') { ?>
<p align="center"><font color="#FF0000"><b>WordPress Affiliate Pro is currently DISABLED. To enable, see options below.</b></font></p>
<? } ?>
<p>Thank you for purchasing <a href="http://www.wordpressaffiliatepro.com/" target="_blank">WordPress Affiliate Pro</a>.</p>
<p>This is the place where you configure all global settings that affect how WordPress Affiliate Pro works. For additional information please consult the tutorials that came with your purchase or open a support ticket if you need any help.</p>
<p><label><input type="checkbox" name="ap_enable" value="1" <?=(get_option('ap_enable')=='Yes'?"checked":"");?> /> <b>Globally Enable WordPress Affiliate Pro</b>. <br />If disabled, your keywords will not be automatically replaced by affiliate links on your blog.</label></p>
<p><label><b>Maximum Replacements For Each Keyword Per Page</b><br /><input type="text" name="ap_replace_count" value="<?=(get_option('ap_replace_count')==''?"0":get_option('ap_replace_count'));?>" /><br />This option controls how many occurences of each keywords are replaced by affiliate links in any single page. Set to 0 to replace all occurences of each keyword. If there are too many affiliate links on a single page you can set this e.g. to 1 to replace only the first occurence of each keyword by the affiliate link. You can override this global limit and set a different limit on a keyword from the WordPress Affiliate Pro sub-menu in the Manage menu.</label></p>
<p><label><b>Maximum Affiliate Links (Total) Per Page</b><br /><input type="text" name="ap_replace_count_global" value="<?=(get_option('ap_replace_count_global')==''?"0":get_option('ap_replace_count_global'));?>" /><br />This number controls how many affiliate links are added to a page. Set to 0 for unlimited affiliate links, but if you find there are too many on a single page you can set this e.g. to 3 to insert up to 3 affiliate links per page.</label></p>
<p><label><b>Selection Method For Affiliate Links</b><br /><select name="ap_replace_count_method"><option value="W"<?=(get_option('ap_replace_count_method')=='W'?' selected':'')?>>Weighted Random</option><option value="R"<?=(get_option('ap_replace_count_method')=='R'?' selected':'')?>>Random</option></select><br />If you have limited the total number of affiliate links per page and have entered more affiliate links than this limit, this option controls how the links that show up are selected. Weighted Random takes into account the weight you have specified for each keyword giving those keywords with a higher weight a slightly better chance to show up. Random picks which affiliate links show up completely at random.</label></p>
<p><label><input type="checkbox" name="ap_new_window" value="1" <?=(get_option('ap_new_window')=='Yes'?"checked":"");?> /> <b>All Affiliate Links Should Open In New Window</b>. <br />Enable if you want all affiliate links to open up in a new window when clicked (recommended), disable to open them in the same browser window thus taking your visitors away from your blog.</label></p>
<p><label><b>Affiliate Links CSS Class Name</b><br /><input type="text" name="ap_link_class" value="<?=get_option('ap_link_class');?>" /><br />You can give all your affiliate links a different look than other regular links on your blog. You can make them red for instance for a slightly higher chance to be clicked. Here you specify the CSS class name to be used for all affiliate links, then go and set it up in your theme CSS file (Presentation -> Theme Editor then click on edit Stylesheet). Leave this empty to make affiliate links "blend" in to your blog theme by looking like regular links.</label></p>
<p><label><input type="checkbox" name="ap_link_tracking" value="1" <?=(get_option('ap_link_tracking')=='Yes'?"checked":"");?> /> <b>Enable Affiliate Links Click Tracking</b>. <br />You should enable this option if you want to automatically track the number of clicks made by your visitors through any of your affiliate links.</label></p>
<p class="submit">
<input type="submit" name="ap_submit" value="Update Options »" />
</p>
</form>
<p align="center">WordPress Affiliate Pro is Copyright © 2007 An IM Alliance Production All rights reserved.</p>
</div>
<?
print_affiliate_blurb();
}
}
// The function that renders the WordPress Affiliate Pro management page
if (!function_exists('ap_manage_page')) {
function smart_short_text($text, $len) {
if (strlen($text)>$len) {
$result = substr($text, 0, $len) . '...';
} else {
$result = $text;
}
return $result;
}
function ap_manage_page() {
global $table_prefix, $wpdb;
$show_keyword_list = TRUE;
$show_add_keyword = TRUE;
$my_plugin_url = $_SERVER['REQUEST_URI'];
// Strip parameters in the plugin URL
if (strpos($my_plugin_url, '&') !== FALSE) {
$my_plugin_url = substr($my_plugin_url, 0, strpos($my_plugin_url, '&'));
}
// Do we have a sort preference for the keyword list?
$sortsql = '';
$sort_txt = 'unsorted';
$sort_url = '';
if (isset($_GET['sort'])) {
if ($_GET['sort'] == 'id') {
$sortsql = " ORDER BY id";
$sort_txt = 'ID';
$sort_url = '&sort=id';
} elseif ($_GET['sort'] == 'kwd') {
$sortsql = " ORDER BY keyword";
$sort_txt = 'Keyword';
$sort_url = '&sort=kwd';
} elseif ($_GET['sort'] == 'lnk') {
$sortsql = " ORDER BY url";
$sort_txt = 'Affiliate Link';
$sort_url = '&sort=lnk';
} elseif ($_GET['sort'] == 'clk') {
$sortsql = " ORDER BY clickcount DESC";
$sort_txt = 'Click Counts';
$sort_url = '&sort=clk';
}
}
// Detailed report for keyword
if (isset($_GET['op']) && ($_GET['op'] == 'dt') && isset($_GET['id'])) {
$kwd_id = $_GET['id'];
// force convert to integer trick
$kwd_id = 0 + $kwd_id;
$table_name = $table_prefix . AP_KWD_TABLE;
$sql = "SELECT keyword FROM $table_name WHERE id=$kwd_id";
$keyword = $wpdb->get_var($sql);
$dt_sort_txt = 'unsorted';
$dt_sort_sql = '';
if (isset($_GET['dt_sort'])) {
if ($_GET['dt_sort'] == 'id') {
$dt_sort_sql = " ORDER BY keywordid";
$dt_sort_txt = 'ID';
} elseif ($_GET['dt_sort'] == 'ref') {
$dt_sort_sql = " ORDER BY referer";
$dt_sort_txt = 'Referer page';
} elseif ($_GET['dt_sort'] == 'clk') {
$dt_sort_sql = " ORDER BY clickcount DESC";
$dt_sort_txt = 'Click Counts';
}
}
print_complementary_copy();
?>
<div class=wrap>
<h2>Detailed Keyword Report For «<?=$keyword;?>»</h2>
<p>Clicking on hyperlinked column headers will sort the list by that column. Currently the list is <?=($dt_sort_txt=='unsorted')?'<strong>unsorted</strong>':"sorted by <strong>$dt_sort_txt</strong>"?>.</p>
<table id="the-list-x" width="100%" cellpadding="3" cellspacing="3">
<tr><th scope="col"><a href="<?=$my_plugin_url;?>&dt_sort=id&id=<?=$kwd_id?>&op=dt<?=$sort_url?>" title="Click to sort by ID">ID</a></th><th scope="col"><a href="<?=$my_plugin_url;?>&dt_sort=ref&id=<?=$kwd_id?>&op=dt<?=$sort_url?>" title="Click to sort by Referer">Referer page</a></th><th scope="col"><a href="<?=$my_plugin_url;?>&dt_sort=clk&id=<?=$kwd_id?>&op=dt<?=$sort_url?>" title="Click to sort by Click Count">Clicks</a></th></tr>
<?
// Retrieve and display the keyword data from our database
$table_name = $table_prefix . AP_TRK_TABLE;
$sql = "SELECT * FROM $table_name WHERE keywordid=$kwd_id$dt_sort_sql";
$keywords = $wpdb->get_results($sql, ARRAY_A);
if (isset($keywords) && (count($keywords) > 0)) {
foreach ($keywords as $key=>$keyword) {
echo "<tr class='alternate'><th scope='row'>".$keyword['id']."</th><td>".$keyword['referer']."</td><td>".$keyword['clickcount']."</td></tr>";
}
} else {
echo "<tr style='background-color: '><td colspan='3'>No tracking data is currently available for the selected keyword.</td></tr>";
}
?>
</table>
<p><a href="<?=$my_plugin_url.$sort_url;?>">« Return to keyword list</a></p>
</div>
<?
$show_keyword_list = FALSE;
$show_add_keyword = FALSE;
} // detailed report for keyword ends here
// Reset click counts
if (isset($_POST['reset'])) {
$table_name = $table_prefix . AP_KWD_TABLE;
$sql = "UPDATE $table_name SET clickcount=0";
if ($wpdb->query($sql) === FALSE) { ?>
<div class="error"><p><strong>There was an error while reseting click counts.</strong></p></div>
<? } else { ?>
<div id="message" class="updated fade"><p><strong>You have successfully reset all click counts to 0.</strong></p></div>
<?
$table_name = $table_prefix . AP_TRK_TABLE;
$sql = "UPDATE $table_name SET clickcount=0";
$wpdb->query($sql);
}
} // click count reset ends here
// Add new/Edit existing keyword into the database
if (isset($_POST['action'])) {
if ($_POST['action'] == 'addkeyword') {
$edit_kwd = FALSE;
} else {
$edit_kwd = TRUE;
}
$err_msg = '';
$kwd = '';
$url = '';
$caption = '';
$repl_count = 0;
if (isset($_POST['url']) && (trim($_POST['url']) != '')) {
$url = trim($_POST['url']);
} else {
$err_msg = "The affiliate link was empty. You must type in the affiliate link.";
}
if (isset($_POST['keyword']) && (trim($_POST['keyword']) != '')) {
$kwd = trim($_POST['keyword']);
} else {
$err_msg = 'The keyword was empty. You need to type in the keyword that will be replaced by the affiliate link.';
}
if (isset($_POST['caption'])) {
$caption = trim($_POST['caption']);
}
if (isset($_POST['repl_count'])) {
$repl_count = 0 + $_POST['repl_count'];
}
if (isset($_POST['weight'])) {
$weight = 0 + $_POST['weight'];
if ($weight > 9) {
$weight = 9;
} elseif ($weight < 0) {
$weight = 0;
}
} else {
$weight = 5;
}
if ($edit_kwd) {
if (isset($_POST['id'])) {
$kwd_id = $_POST['id'];
$kwd_id = 0 + $kwd_id;
} else {
$err_msg = 'There was an error while retrieving the keyword id. This should not happen under regular usage. Are you messing with the data?';
}
}
$table_name = $table_prefix . AP_KWD_TABLE;
if ($edit_kwd == FALSE) {
// First make sure our keyword is unique in the database
$sql = "SELECT COUNT(*) FROM $table_name WHERE UPPER(keyword)=UPPER('$kwd')";
if ($wpdb->get_var($sql) != 0) {
$err_msg = 'This keyword is already defined and points to a different affiliate link.';
}
}
if ($err_msg != '') {?>
<div class="error"><p><strong><?=$err_msg;?></strong></p></div>
<? } else {
// All seems ok. Compute the number of individual words in the keyword and do some sanity checks.
$word_cnt = substr_count($kwd, ' ') + 1;
if ($edit_kwd) {
$sql = "UPDATE $table_name SET keyword='$kwd', wordcount=$word_cnt, caption='$caption', url='$url', replacecount=$repl_count, weight=$weight WHERE id=$kwd_id";
} else {
$sql = "INSERT INTO $table_name (id, keyword, wordcount, caption, url, clickcount, replacecount, weight) VALUES (NULL, '$kwd', $word_cnt, '$caption', '$url', 0, $repl_count, $weight)";
}
if ($wpdb->query($sql) === FALSE) { ?>
<div class="error"><p><strong>There was an error while saving to the database. Your keyword was NOT saved.</strong></p></div>
<? } else { ?>
<div id="message" class="updated fade"><p><strong>The keyword was successfully saved and it will be replaced automatically by the affiliate link you have defined.</strong></p></div>
<? }
}
} // Keyword addition ends here
// Edit existing keyword
if (isset($_GET['op']) && ($_GET['op'] == 'ed') && (isset($_GET['id']))) {
$kwd_id = $_GET['id'];
// force convert to integer trick
$kwd_id = 0 + $kwd_id;
$table_name = $table_prefix . AP_KWD_TABLE;
$sql = "SELECT * FROM $table_name WHERE id=$kwd_id";
$keyword = $wpdb->get_results($sql, ARRAY_A);
if (is_array($keyword)) {
$kwd = $keyword[0]['keyword'];
$caption = $keyword[0]['caption'];
$url = $keyword[0]['url'];
$repl_count = $keyword[0]['replacecount'];
$weight = $keyword[0]['weight'];
print_complementary_copy();
?>
<div class=wrap>
<h2>Edit Keyword</h2>
<form method="post" action="<?=$my_plugin_url.$sort_url;?>">
<p><strong>Keyword</strong> that will be replaced by the affiliate link:<br />
<input type="text" name="keyword" value="<?=$kwd?>" style="width: 40%;" /></p>
<p><strong>Affiliate Link</strong> (enter the complete affiliate link here, including the http:// part):<br />
<input type="text" name="url" value="<?=$url?>" style="width: 80%;" /></p>
<p><strong>Statusbar Text</strong> (leave empty to show the click tracker URL, your affiliate link is always hidden):<br />
<input type="text" name="caption" value="<?=$caption?>" style="width: 40%;" /></p>
<p><strong>Maximum Replacement Count</strong> (how many occurences of this keyword will be replaced on a page, 0 means replace all. If not 0, this will be used instead of the global setting):<br />
<input type="text" name="repl_count" value="<?=$repl_count?>" style="width: 40%;" /></p>
<p><strong>Keyword Weight</strong> for the weighted random link selection. This should be between 0 and 9 (leave unchanged if you don't know what this means):<br />
<input type="text" name="weight" value="<?=$weight?>" style="width: 40%;" /></p>
<p class="submit"><input type="hidden" name="action" value="editkeyword" /><input type="hidden" name="id" value="<?=$kwd_id?>" /><input type="submit" name="submit" value="Save Changes »" /></p>
</form>
<p><a href="<?=$my_plugin_url.$sort_url;?>">« Return to keyword list</a></p>
</div>
<?
$show_keyword_list = FALSE;
$show_add_keyword = FALSE;
}
} // Keyword editing ends here
// Deleting existing keyword
if (isset($_GET['op']) && ($_GET['op'] == 'del') && (isset($_GET['id']))) {
$kwd_id = $_GET['id'];
// force convert to integer trick
$kwd_id = 0 + $kwd_id;
$table_name = $table_prefix . AP_KWD_TABLE;
$sql = "DELETE FROM $table_name WHERE id=$kwd_id";
if ($wpdb->query($sql) === FALSE) { ?>
<div class="error"><p><strong>There was an error while deleting from the database. Your keyword was NOT deleted.</strong></p></div>
<? } else { ?>
<div id="message" class="updated fade"><p><strong>The keyword was successfully deleted from the database.</strong></p></div>
<?
// Delete any associated click-through data
$table_name = $table_prefix . AP_TRK_TABLE;
$sql = "DELETE FROM $table_name WHERE keywordid=$kwd_id";
$wpdb->query($sql);
}
} // Keyword deletion ends here
// Show keyword click count details
if (isset($_GET['op']) && ($_GET['op'] == 'dt') && (isset($_GET['id']))) {
$kwd_id = $_GET['id'];
// force convert to integer trick
$kwd_id = 0 + $kwd_id;
$table_name = $table_prefix . AP_TRK_TABLE;
} // click count details ends here
if ($show_keyword_list) {
print_complementary_copy();
?>
<div class=wrap>
<h2>Manage WordPress Affiliate Pro Links (<a href="#addkwd">add new</a>)</h2>
<? if (get_option('ap_enable')=='No') { ?>
<p align="center"><font color="#FF0000"><b>WordPress Affiliate Pro is currently DISABLED. To enable go to Options, WordPress Affiliate Pro.</b></font></p>
<? } ?>
<? if (get_option('ap_link_tracking')=='No') { ?>
<p align="center"><font color="#FF0000"><b>Link click tracking is currently DISABLED. To enable go to Options, WordPress Affiliate Pro.</b></font></p>
<? } ?>
<p>Thank you for purchasing <a href="http://www.wordpressaffiliatepro.com" target="_blank">WordPress Affiliate Pro</a>.</p>
<p>This is the place where you configure your keywords and affiliate links. For additional information please consult the tutorials that came with your purchase or open a support ticket if you need any help.</p>
<p>Clicking on hyperlinked column headers will sort the list by that column. Currently the list is <?=($sort_txt=='unsorted')?'<strong>unsorted</strong>':"sorted by <strong>$sort_txt</strong>"?>.</p>
<table id="the-list-x" width="100%" cellpadding="3" cellspacing="3">
<tr><th scope="col"><a href="<?=$my_plugin_url;?>&sort=id" title="Click to sort by ID">ID</a></th><th scope="col"><a href="<?=$my_plugin_url;?>&sort=kwd" title="Click to sort by Keyword">Keyword</a></th><th scope="col">Weight</th><th scope="col">Replace Count</th><th scope="col"><a href="<?=$my_plugin_url;?>&sort=lnk" title="Click to sort by Affiliate Link">Affiliate Link</a></th><th scope="col">Statusbar Text</th><th scope="col"><a href="<?=$my_plugin_url;?>&sort=clk" title="Click to sort by Click Count">Clicks</a></th><th colspan="2">Action</th></tr>
<?
// Retrieve and display the keywords from our database
$table_name = $table_prefix . AP_KWD_TABLE;
$sql = "SELECT * FROM $table_name$sortsql";
$keywords = $wpdb->get_results($sql, ARRAY_A);
if (isset($keywords) && (count($keywords) > 0)) {
foreach ($keywords as $key=>$keyword) {
echo "<tr class='alternate'><th scope='row'>".$keyword['id']."</th><td>".$keyword['keyword']."</td><td align='center'>".$keyword['weight']."</td><td align='center'>".($keyword['replacecount']==0?'ALL':$keyword['replacecount'])."</td><td>".smart_short_text($keyword['url'], 40)."</td><td>".$keyword['caption']."</td><td align='center'>".$keyword['clickcount']." (<a href='$my_plugin_url&id=".$keyword['id']."&op=dt$sort_url' title='Click to show a detailed click through report for this keyword'>details</a>)</td><td><a href='$my_plugin_url&id=".$keyword['id']."&op=ed$sort_url'>Edit</a></td><td><a href='$my_plugin_url&id=".$keyword['id']."&op=del$sort_url'>Delete</a></td></tr>";
}
} else {
echo "<tr style='background-color: '><td colspan='7'>No affiliate links are defined. To add one or more affiliate links and their associated keywords please use the form below.</td></tr>";
}
?>
</table>
<form method="post" action="<?=$my_plugin_url.$sort_url;?>">
<p class="submit"><input type="hidden" name="reset" value="resetcounts" /><input type="submit" name="submit" value="Reset Click Counts »" /></p>
</form>
<p align="center">WordPress Affiliate Pro is Copyright © 2007 An IM Alliance Production</a>. All rights reserved.</p>
</div>
<?
} // if show keyword list
if ($show_add_keyword) {
?>
<div class=wrap>
<h2>Add New Keyword</h2>
<form method="post" id="addkwd" name="addkwd" action="<?=$my_plugin_url.$sort_url;?>">
<p><strong>Keyword</strong> that will be replaced by the affiliate link:<br />
<input type="text" name="keyword" value="<?=(isset($kwd)&&($err_msg!=''))?$kwd:''?>" style="width: 40%;" /></p>
<p><strong>Affiliate Link</strong> (enter the complete affiliate link here, including the http:// part):<br />
<input type="text" name="url" value="<?=(isset($url)&&($err_msg!=''))?$url:''?>" style="width: 80%;" /></p>
<p><strong>Statusbar Text</strong> (leave empty to show the click tracker URL, your affiliate link is always hidden):<br />
<input type="text" name="caption" value="<?=(isset($caption)&&($err_msg!=''))?$caption:''?>" style="width: 40%;" /></p>
<p><strong>Maximum Replacement Count</strong> (how many occurences of this keyword will be replaced on a page, 0 means replace all. If not 0, this will be used instead of the global setting):<br />
<input type="text" name="repl_count" value="<?=(isset($repl_count)&&($err_msg!=''))?$repl_count:'0'?>" style="width: 40%;" /></p>
<p><strong>Keyword Weight</strong> for the weighted random link selection. This should be between 0 and 9 (leave unchanged if you don't know what this means):<br />
<input type="text" name="weight" value="<?=(isset($weight)&&($err_msg!=''))?$weight:'5'?>" style="width: 40%;" /></p>
<p class="submit"><input type="hidden" name="action" value="addkeyword" /><input type="submit" name="submit" value="Add Keyword »" /></p>
</form>
</div>
<?
} // if show add keyword box
print_affiliate_blurb();
}
}
if (!function_exists('inHTMLTag')) {
function inHTMLTag($haystack, $offset) {
$haylen = strlen($haystack);
// Run some sanity checks first. If the offset is negative, the string length is is larger than the string length, return FALSE
if (($offset < 0) || ($offset > $haylen) || ($haylen == 0)) {
return FALSE;
}
// Search up to 250 characters to the left for the open HTML tag
$max_len = $offset - 250;
if ($max_len < 0) {
$max_len = 0;
}
$left = -1;
for ($i=$offset; $i>=$max_len; $i--) {
switch ($haystack{$i}) {
case '<':
$left = $i;
$i = $max_len;
break;
case '>':
$i = $max_len;
break;
}
}
// Search up to 250 characters to the right for the close HTML tag
$right = -1;
if ($left != -1) {
$max_len = $offset + 250;
if ($max_len > $haylen) {
$max_len = $haylen;
}
for ($i=$offset; $i < $max_len; $i++) {
switch ($haystack{$i}) {
case '>':
$right = $i;
$i = $max_len;
break;
case '<':
$i = $max_len;
break;
}
}
}
$result = (($left != -1) && ($right != -1) && ($left < $offset) && ($right > $offset));
return $result;
}
}
// PHP 5 compatibility function: stripos
if (!function_exists('stripos')) {
function stripos($haystack, $needle, $offset = null)
{
// Manipulate the string if there is an offset
$fix = 0;
if (!is_null($offset)) {
if ($offset > 0) {
$haystack = substr($haystack, $offset, strlen($haystack) - $offset);
$fix = $offset;
}
}
$segments = explode(strtolower($needle), strtolower($haystack), 2);
// Check there was a match
if (count($segments) === 1) {
return false;
}
$position = strlen($segments[0]) + $fix;
return $position;
}
}
if (!function_exists('ap_add_affiliate_links')) {
function ap_add_affiliate_links($content = '') {
global $table_prefix, $wpdb;
// If the processing is disabled via the Options menu then return the text unchanged
if (get_option('ap_enable')=='No') {
return $content;
}
if (get_option('ap_replace_count_method') == 'W') {
$weighted_random = TRUE;
} else {
$weighted_random = FALSE;
}
// Pull the list of keywords from the DB. If the link insertion method is Weighted Random then take that into account.
$table_name = $table_prefix . AP_KWD_TABLE;
if ($weighted_random) {
$weight_txt = 'ORDER BY weight DESC';
} else {
$weight_txt = '';
}
$sql = "SELECT * FROM $table_name $weight_txt";
$keywords = $wpdb->get_results($sql, ARRAY_A);
if (is_array($keywords)) {
// Retrieve the global options
$new_window = (get_option('ap_new_window') == 'Yes')?' target="_blank"':'';
$link_class = trim(get_option('ap_link_class'));
if ($link_class != '') {
$link_class = " class='$link_class'";
}
$replace_limit_global = get_option('ap_replace_count_global');
if ($replace_limit_global == 0) {
// Set "unlimited" to some arbitrary high value unlikely to be reached.
$replace_limit_global = 9999;
}
$replace_limit_keyword_global = get_option('ap_replace_count');
if ($replace_limit_keyword_global == 0) {
$replace_limit_keyword_global = 9999;
}
$base_url = get_option('siteurl') . '/wp-content/plugins/';
$tracker_url = $base_url . MY_SCRIPT_NAME;
// ******************************* STEP 1 ********************************
// **** Build a (weighted) random list of available keywords. ****
// ***********************************************************************
$keyword_count = count($keywords);
// Initialize the Mersenne Twister random number generator (done automatically only on PHP > 4.2 so we take care of it here.)
list($usec, $sec) = explode(' ', microtime());
mt_srand((float) $sec + ((float) $usec * 100000));
// Add the random (weighted) priority to each keyword. Also create the column arrays, to prepare for array_multisort and create the temporary keyword replacements.
$idx = 1;
foreach ($keywords as $key=>$val) {
$rand_prio = mt_rand(1, $keyword_count);
if ($weighted_random) {
// Keyword weight is 0 based, and we need it 1 based.
$rand_prio = $rand_prio * ($keywords[$key]['weight'] + 1);
}
$kwd_id[] = $val['id'];
$kwd_keyword[] = $val['keyword'];
$kwd_caption[] = $val['caption'];
if ($val['replacecount'] == 0) {
// Take into account the global option if no per-keyword setting is available.
$rc = $replace_limit_keyword_global;
} else {
$rc = $val['replacecount'];
}
$kwd_replacecount[] = $rc;
$kwd_priority[] = $rand_prio;
$kwd_searchpos[] = 0;
$kwd_tmprepl[] = "!!TMPAP$idx!!";
$idx++;
}
// Sort the array based on the keyword priority.
arsort($kwd_priority);
// Perform the first stage of replacements.
$keep_going = TRUE;
while ($keep_going) {
// We use done_work to keep track if at least one replacement occured per loop. If no replacements were done on the last loop, bail out. This is to prevent endless loops where user allows unlimited number of affiliate links per page and all keywords have unlimited replacements too.
$done_work = FALSE;
foreach ($kwd_priority as $key=>$val) {
if ($kwd_replacecount[$key] > 0) {
$kwdpos = stripos($content, $kwd_keyword[$key], $kwd_searchpos[$key]);
if ($kwdpos !== FALSE) {
// TODO: Add a global flag to allow the user to enable/disable replacement of keywords found within HTML tags.
if (! inHTMLTag($content, $kwdpos)) {
$content = substr($content, 0, $kwdpos) . $kwd_tmprepl[$key] . substr($content, $kwdpos + strlen($kwd_keyword[$key]));
$done_work = TRUE;
$replace_limit_global--;
$kwd_replacecount[$key]--;
}
// Next time we search only on the remaining text, not from the beginning again...
$kwd_searchpos[$key] = $kwdpos + strlen($kwd_keyword[$key]);
} else {
// If we haven't found any occurences of this keyword in this step, don't search for it in subsequent steps.
$kwd_replacecount[$key] = 0;
}
}
// If we've reached the maximum links per page, bail out...
if ($replace_limit_global == 0) {
$keep_going = FALSE;
break;
}
}
// No replacements on last loop? Bail out.
if ($done_work == FALSE) {
$keep_going = FALSE;
}
}
// Perform the second stage of replacements, where the temporary placeholder is exchanged with the final HTML.
$source = array();
$dest = array();
foreach ($kwd_priority as $key=>$val) {
$source[] = '/'.$kwd_tmprepl[$key].'/i';
if (trim($kwd_caption[$key]) != '') {
$caption = " onmouseover=\"top.window.status='".$kwd_caption[$key]."'; return true\" onmouseout=\"top.window.status=''; return true\"";
} else {
$caption = '';
}
$dest[] = "<a href='$tracker_url?id=".$kwd_id[$key]."'$caption$new_window$link_class>".$kwd_keyword[$key]."</a>";
}
if (count($source) > 0) {
$content = preg_replace($source, $dest, $content);
}
}
return $content;
}
}
// Make sure our installer gets called when the user activates the plugin. This in turn creates our data tables and sets the options to their default values.
add_action('activate_'.MY_SCRIPT_NAME, 'ap_install_plugin');
// Insert the ap_add_pages() sink into the plugin hook list for 'admin_menu'
add_action('admin_menu', 'ap_add_pages');
// Insert the content rewriter sink into the filter hook list for the post display
add_filter('the_content', 'ap_add_affiliate_links', 1);
// TODO for next release: Allow the user to turn links into comments on and off
// Insert the content rewriter sink into the filter hook list for the comment display
add_filter('comment_text', 'ap_add_affiliate_links', 1);
?><?
Did this file decode correctly?
Original Code
eval(gzinflate(base64_decode('
FZrHDoNYFkR/ZXbTLRZgMprQImdMTpsROefM14974YVt2Ub31a2qY/HXf//
91z+KM+n/qN5mLPtkL/5Ik63A0f/lRTblxR//FOJW4jZtEiK/VNJTf+gTmb
vryQ6AKm49zqmbKMrJEuo4kiXs+BYZAZpweYIEYCP9ANrgB0YxfwSQXsKoT
b3G7YSC2IVC7H6pW/pgbzEXuGg1IYmJhi5ARFg75cg0+DrgWvvMZKRTfujX
WfZwkPmobi4S2ndYv5tBAH61RRMWGiebBkuBBuYt4trWBk9j6PCLefLcf1z
Z12nHEHiaDiFnEEcwljbfraxefMR6S4BK7XwBHPMrs319JjdzpeXwgWqgHp
+IBzGYDxMFggfGdlQPVUdQW8vPk9HTHoVdv0xeEenLFtrkCTwHHH555ORiy
HRDmycfhUW31UfMJOLUFAp6dUIW4oLMqSdVeuSce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