';
$plugins = array();
$fname = $splittestpx_filepath;
$p = strpos ($fname, '/wp-content/plugins/');
if (! $p) $p = strpos ($fname, '\\wp-content\\plugins\\');
if ($p) $fname = substr ($fname, $p + 20);
$plugins[0] = $fname;
deactivate_plugins ($plugins);
echo 'The ' . $pname . ' plugin has been deactivated';
die ('
Once the problem has been resolved, go to the Plugins menu and re-activate the plugin
Click "Refresh" on your browser to continue');
}
function SplitTestPxPluginDeactivate ()
{
delete_option ('splittestpx1717_status');
}
function SplitTestPxPluginEditSettings ()
{
global $splittestpx_levels, $splittestpx_maxitems, $splittestpx_linkfolder, $splittestpx_codethanks, $splittestpx_autolock,
$splittestpx_code1, $splittestpx_code2, $splittestpx_code3;
echo '
";
echo 'Send people to the following URL instead of the thank you page. This URL will record the sale and then redirect the person to your thank you page: ' . $salecodelink . '
';
}
}
$active = get_option('splittestpx1717_active');
if ($active)
{
$numitems = get_option ('splittestpx1717_numitems');
if (! $numitems || $numitems > $splittestpx_maxitems) $numitems = $splittestpx_maxitems;
$cycles = intval (get_option ('splittestpx1717_cycles'));
$hnum = intval (get_option ('splittestpx1717_hnum'));
$maxsales = 0;
for ($c = 1; $c <= $numitems; $c ++)
{
$salev = get_option ("splittestpx1717_sale$c");
if ($salev > $maxsales) $maxsales = $salev;
}
$plock = get_option ('splittestpx1717_locked');
if ($plock)
{
$autostr = '';
if ($splittestpx_autolock && $maxsales >= $splittestpx_autolock) $autostr = " (due to reaching $splittestpx_autolock sales)";
echo "System Is Locked To Option $plock$autostr
';
}
}
echo " \n";
if (function_exists ('home_url')) $prepend = home_url ($splittestpx_linkfolder);
else $prepend = get_bloginfo ('url') . $splittestpx_linkfolder;
$testpageurl = get_option('splittestpx1717_testpageurl');
echo 'Current Stats';
if ($testpageurl) echo ' (use the links to view the test page with the different headlines)';
echo '
';
echo ' ';
echo '';
if (! $plock)
{
echo ' ';
}
echo ' ';
if (! $testpageurl) echo 'Note: This URL should get set automatically the first time you visit the page that contains ' . $splittestpx_code1 . ' ';
echo "
\n";
}
echo 'Enter the headlines to be tested in the boxes below. In your blog page, put the text ' . $splittestpx_code1 . ' where the Headline should appear. ';
if ($splittestpx_levels >= 2) echo ' Put the text ' . $splittestpx_code2 . ' where the SubHeadline should appear. ';
if ($splittestpx_levels >= 3) echo 'Put the text ' . $splittestpx_code3 . ' where the SubSubHeadline should appear.';
echo "
\n";
echo '\n";
echo '
';
echo 'The plugin needs to keep track every time someone visits your thank you page
';
echo 'If your thank you page is on this blog, just include the text ' . $splittestpx_codethanks . ' somewhere in the page (it doesn\'t matter where)
';
echo 'If your thank you page is not on this blog, enter the URL of the thank you page in the box below';
if (! $salecodelink) echo ' and the plugin will give you a new URL to send people to instead. The new URL will record the sale and then redirect the person to your thank you page.';
echo "
\n";
$saleurl = get_option ('splittestpx1717_saleurl');
echo ' ';
if ($salecodelink) echo 'Send people to the following URL instead of the thank you page. This URL will record the sale and then redirect the person to your thank you page: ' . $salecodelink;
}
function SplitTestPxPluginMenu ()
{
global $splittestpx_filepath;
add_options_page ('Headline Tester', 'Headline Tester', 'activate_plugins', $splittestpx_filepath, 'SplitTestPxPluginEditSettings');
}
function SplitTestPxPluginContent ($content)
{
if (is_feed()) return $content;
global $splittestpx_codebase;
if (strpos ($content, $splittestpx_codebase) === false) return $content;
global $splittestpx_levels, $splittestpx_maxitems, $splittestpx_hnum, $splittestpx_linkfolder, $splittestpx_cookie,
$splittestpx_code1, $splittestpx_code2, $splittestpx_code3, $splittestpx_codethanks;
if (strpos ($content, $splittestpx_codethanks) !== false)
{
if (function_exists ('home_url')) $prepend = home_url ($splittestpx_linkfolder);
else $prepend = get_bloginfo ('url') . $splittestpx_linkfolder;
$salelink = $prepend . 'sale';
$inscode = '';
$content = str_replace ($splittestpx_codethanks, $inscode, $content);
return $content;
}
$pageurl = get_option('splittestpx1717_testpageurl');
if (! $pageurl) update_option ('splittestpx1717_testpageurl', get_permalink());
if (! get_option ('splittestpx1717_active'))
{
$content = str_replace ($splittestpx_code1, 'ERROR - no headlines have been set up. Enter your Headlines using the "Headline Tester" option in the admin "Settings" menu', $content);
$content = str_replace ($splittestpx_code2, '', $content);
$content = str_replace ($splittestpx_code3, '', $content);
return $content;
}
$scriptcode = '';
$hnum = $splittestpx_hnum;
if (! $hnum) $hnum = get_option ('splittestpx1717_locked');
if (! $hnum)
{
if (isset ($_COOKIE[$splittestpx_cookie])) $hnum = intval($_COOKIE[$splittestpx_cookie]);
if ($hnum < 0 || $hnum > $splittestpx_maxitems) $hnum = 0;
if (! $hnum)
{
$hnum = get_option ('splittestpx1717_hnum') + 1;
$numitems = get_option ('splittestpx1717_numitems');
if (! $numitems || $numitems >= $splittestpx_maxitems) $numitems = $splittestpx_maxitem;
if ($hnum < 0 || $hnum > $numitems)
{
$hnum = 1;
$cycles = get_option ('splittestpx1717_cycles') + 1;
update_option ('splittestpx1717_cycles', $cycles);
}
update_option ('splittestpx1717_hnum', $hnum);
$scriptcode = '';
}
}
{
$headline = explode ('|', get_option ('splittestpx1717_headline'));
$str = '';
if (isset ($headline[$hnum - 1])) $str = $headline[$hnum - 1];
$content = str_replace ($splittestpx_code1, $scriptcode . $str, $content);
$scriptcode = '';
}
if ($splittestpx_levels >= 2)
{
$headline = explode ('|', get_option ('splittestpx1717_subheadline'));
$str = '';
if (isset ($headline[$hnum - 1])) $str = $headline[$hnum - 1];
$content = str_replace ($splittestpx_code2, $scriptcode . $str, $content);
$scriptcode = '';
}
if ($splittestpx_levels >= 3)
{
$headline = explode ('|', get_option ('splittestpx1717_subsubheadline'));
$str = '';
if (isset ($headline[$hnum - 1])) $str = $headline[$hnum - 1];
$content = str_replace ($splittestpx_code3, $scriptcode . $str, $content);
$scriptcode = '';
}
return $content;
}
function SplitTestPxPluginLinkHandler ()
{
global $splittestpx_linkfolder;
if (strpos ($_SERVER['REQUEST_URI'], '/' . $splittestpx_linkfolder) === false) return;
if (function_exists ('home_url')) $prepend = home_url ($splittestpx_linkfolder);
else $prepend = get_bloginfo ('url') . $splittestpx_linkfolder;
$p = strpos ($prepend, '/', 9);
$prepend = substr ($prepend, $p);
if (strncmp ($_SERVER['REQUEST_URI'], $prepend, strlen($prepend)) != 0) return;
global $splittestpx_cookie, $splittestpx_hnum, $splittestpx_maxitems, $splittestpx_autolock;
$option = substr ($_SERVER['REQUEST_URI'], strlen($prepend));
if (substr ($option, 0, 4) == 'sale')
{
if (! get_option ('splittestpx1717_locked') && isset ($_COOKIE[$splittestpx_cookie]))
{
$hnum = intval($_COOKIE[$splittestpx_cookie]);
if ($_COOKIE[$splittestpx_cookie] != $hnum . 'S')
{
setcookie ($splittestpx_cookie, $hnum . 'S', time()+365*86400, '/');
if ($hnum < 0 || $hnum > $splittestpx_maxitems) $hnum = 0;
if ($hnum)
{
$optname = 'splittestpx1717_sale' . $hnum;
$numsales = get_option ($optname) + 1;
update_option ($optname, $numsales);
if ($splittestpx_autolock && $numsales >= $splittestpx_autolock)
{
update_option ('splittestpx1717_locked', $hnum);
}
}
}
}
$saleurl = get_option ('splittestpx1717_saleurl');
if ($saleurl)
{
$hnum = intval (substr ($option, 4));
if ($hnum == get_option ('splittestpx1717_salecode')) header ("Location: $saleurl");
}
exit ();
}
elseif (substr ($option, 0, 6) == 'option')
{
$hnum = intval (substr ($option, 6));
if ($hnum < 0 || $hnum > $splittestpx_maxitems) $hnum = 0;
$pageurl = get_option('splittestpx1717_testpageurl');
if (! $hnum)
{
die ('Invalid option number in URL');
}
elseif ($pageurl)
{
$p = strpos ($pageurl, '/', 9);
$_SERVER['REQUEST_URI'] = substr ($pageurl, $p);
$splittestpx_hnum = $hnum;
return;
}
else
{
die ('Please set the sales page URL in the blog admin Settings menu');
}
}
}
add_action ('init', 'SplitTestPxPluginLinkHandler');
add_action ('admin_head', 'SplitTestPxPluginAdmin');
if (function_exists ('register_deactivation_hook')) register_deactivation_hook ($splittestpx_filepath, 'SplitTestPxPluginDeactivate');
add_filter ('the_content', 'SplitTestPxPluginContent');
add_action ('admin_menu', 'SplitTestPxPluginMenu');
?>
Lifestyle | The Morning Letter
Extraordinary solutions to everyday situations delivered every morning to over 12,700 subscribers!
If any of you have trouble sleeping like I do, then you’ve seen the infomercials … Make millions from investing in real estate with no money down!!!! Too good to be true? Not at all! Save yourself the $399 and … Continue reading →
Just about everyone worries about their facial skin. Let’s face it (yes, pun is intended) . The first thing that people notice is a person’s face – is there skin glowing, is there jaw line chiseled or do they have … Continue reading →
You’ve got your eyes on one particular girl, and you don’t have the guts to ask her out. You’ve thought about the tough guy approach (even if you are the farthest thing from a tough guy!), and you’ve thought about … Continue reading →
Since the days of the old ‘Wild West’ horse traders, modes of transportation have been bought, sold, traded and yes, even stolen! The need for mobility has and always will, involve the buying and selling of ‘modes’! Have you ever … Continue reading →
They aren’t QUITE as ELUSIVE as they can seem! Nikki is single, she appears to be available and she is fine fine super fine! …As she so daintily sips her Daiquiri. She and Ken accidently brushed shoulders earlier. They both … Continue reading →
Imagine always getting what you want in life: the best jobs, the most attractive lovers and, most of all, the respect you deserve. Gain a clear-cut advantage over everyone around you, from your co-workers to your sworn enemies, by mastering … Continue reading →
Are you ever surfing happily on the internet and come across one of those ads that will “make you rich” in an some ridiculously short amount of time? “Make four million dollars in five minutes, guaranteed!” “I made seventeen thousand … Continue reading →
I was driving down the street today and stopped at a red light (always a good thing to do). I looked over to the right of me, and there, on the corner, was a man with a big sign in … Continue reading →
So you want to flip cars. Well, you can either be in London, England the next time there’s a big “football” game, or you can attend an auto auction. And I only say England because they have riots. That choice … Continue reading →
Do you suffer from any of the following? Tenderness of the jaw muscles, neck or upper back? Grinding your teeth, including in your sleep? Headaches, often when you wake up? Pain or difficulty in chewing, yawning or opening wide? Jaws … Continue reading →
Every morning we make it our business to deliver actionable, "out of the box" solutions & ideas to your inbox - how to do everything in life... only MUCH smarter!
Join over 12,700 subscribers today!
* Spam free zone! Your email is 100% safe and secure and of course will never be sold, shared or rented.