.
*/
if (!class_exists('EzAdmin')) {
class EzAdmin {
var $plgURL, $plgFile, $plg, $slug, $name;
var $killAuthor = false;
function __construct($plg, $slug, $plgURL) {
$this->plg = $plg;
$this->slug = $slug;
$this->plgURL = $plgURL;
}
function __destruct() {
}
function EzAdmin($plg, $slug, $plgURL) {
if (version_compare(PHP_VERSION, "5.0.0", "<")) {
$this->__construct($plg, $slug, $plgURL);
register_shutdown_function(array($this, "__destruct"));
}
}
function renderNags(&$options) {
if (empty($options['kill_rating'])) {
$this->renderRating();
}
else {
echo "";
}
if (empty($options['kill_invites'])) {
$this->renderInvite();
}
else {
echo "";
}
}
function renderInvite() {
if ($this->killAuthor) {
return;
}
$plg = $this->plg;
$slug = $this->slug;
$plgLongName = $plg['value'];
$plgPrice = $plg['price'];
$yesTip = sprintf(__('Buy %s Pro for $%s. PayPal payment. Instant download.', 'easy-common'), $plgLongName, $plgPrice);
$yesTitle = __('Get the Pro version now!', 'easy-common');
$noTip = __('Continue using the Lite version, and hide this message. After clicking this button, please remember to save your options to hide this box for good.', 'easy-common');
$noTitle = __('Stay Lite', 'easy-common');
$plgKey = $this->getPlgKey();
$onClick = addslashes("onclick=\"popupwindow('http://www.thulasidas.com/promo.php?key=$plgKey','Get Pro', 1024, 768);return false;\"");
$hideTip = htmlspecialchars(__('Click the link to hide this box. After clicking this link, please remember to save your options to hide this box for good.', 'easy-common') . " " . __("Limited Time Offer. Get the Pro version for less than a dollar!", 'easy-common') . "");
if (empty($plg['benefits'])) {
return;
}
$benefits = $plg['benefits'];
$s1 = __("Want More Features?", 'easy-common');
$s2 = __("The Pro version of this plugin gives you more features and benefits.", 'easy-common');
$s3 = __("For instance", 'easy-common');
$s4 = __("And much more.", 'easy-common');
$s5 = __("New features and bug fixes will first appear in the Pro version before being ported to this freely distributed Lite edition.", 'easy-common');
$s6 = __("Go Pro!", 'easy-common');
$s7 = __("No thanks", 'easy-common');
$s8 = __("Do not show this anymore", 'easy-common');
$s9 = sprintf(__("Thank you for using %s!", 'easy-common'), $plgLongName);
$s10 = __("Please Save Options to hide this box forever", 'easy-common');
echo <<
ENDINVITE;
}
function getPlgKey() {
$plgKey = basename($this->plgFile, '.php');
if (in_array($plgKey, array('easy-ads', 'google-adsense', 'theme-tweaker'))) {
$plgKey .= '-lite';
}
if ($plgKey == 'easy-paypal-lite') {
$plgKey = 'easy-paypal-lte';
}
return $plgKey;
}
function renderRating($killable = true) {
if ($this->killAuthor) {
return;
}
$plgFile = $this->plgFile;
$plg = $this->plg;
$plgCTime = filemtime($plgFile);
$plgLongName = $plg['value'];
$plgKey = $this->getPlgKey();
$onClick = addslashes("onclick=\"popupwindow('http://www.thulasidas.com/promo.php?key=$plgKey','Get Pro', 1024, 768);return false;\"");
$hideTip = htmlspecialchars(__('Click the link to hide this box. After clicking this link, please remember to save your options to hide this box for good.', 'easy-common') . " " . __("Limited Time Offer. Get the Pro version for less than a dollar!", 'easy-common') . "");
if (time() > $plgCTime + (60 * 60 * 24 * 30)) {
$msg = __("You've installed this plugin over a month ago.", 'easy-common');
}
else {
$msg = __("You will find it feature-rich and robust.", 'easy-common');
}
$display = '';
if (!$killable) {
$display = "style='display:none'";
}
$s1 = __("If you are satisfied with how well it works, why not rate it and recommend it to others?", 'easy-common');
$s2 = __("Click here", 'easy-common');
$s3 = __("Do not show this anymore", 'easy-common');
$s4 = __("Please Save Options to hide this box forever", 'easy-common');
echo <<
ENDRATING;
}
function renderHeadText() {
$plgURL = $this->plgURL;
$plg = $this->plg;
$slug = $this->slug;
$value = '' . $plg['value'] . '';
$toolTip = $plg['title'];
$price = $plg['price'];
$onclick = "onclick=\"popupwindow('http://buy.thulasidas.com/$slug','Get Pro', 1024, 768);return false;\"";
$s2 = __('Lite Version', 'easy-common');
$s3 = sprintf(__('Buy the Pro version of %s for $%.2f', 'easy-common'), $plg['value'], $price);
$s4 = __('Instant download link.', 'easy-common');
$s5 = __('Pro Version', 'easy-common');
$moreInfo = "$s2 and $s5";
$toolTip .= addslashes(' ' . $moreInfo);
$why = addslashes($plg['pro']);
$version = 'Lite';
$s6 = sprintf(__('You are using the %s version of %s, which is available in two versions:', 'easy-common'), $version, $value);
$s7 = sprintf(__('And it costs only $%.2f!', 'easy-common'), $price);
$s8 = __('Get the Pro version now!', 'easy-common');
$plgKey = $this->getPlgKey();
$promoClick = "onclick=\"popupwindow('http://www.thulasidas.com/promo.php?key=$plgKey','Get Pro', 1024, 768);return false;\"";
$promoTip = "" . __("Limited Time Offer. Get the Pro version for less than a dollar!", 'easy-common') . "";
echo "$s8
$s6
$moreInfo
$why $s7
$promoTip";
}
function renderProText() {
echo "
";
$this->renderHeadText();
echo "
";
if ($this->killAuthor) {
return;
}
$plg = $this->plg;
$slug = $this->slug;
$value = '' . $plg['value'] . '';
$filter = '';
if (stripos($slug, 'adsense') !== FALSE) {
$filter = __("e.g., a filter to ensure AdSense policy compliance.", 'easy-common');
}
$toolTip = $plg['title'];
$price = $plg['price'];
$onclick = "onclick=\"popupwindow('http://buy.thulasidas.com/$slug','Get Pro', 1024, 768);return false;\"";
$s1 = sprintf(__('Download the Lite version of %s', 'easy-common'), $plg['value']);
$s2 = __('Lite Version', 'easy-common');
$s3 = sprintf(__('Buy the Pro version of %s for $%.2f', 'easy-common'), $plg['value'], $price);
$s4 = __('Pro Version', 'easy-common');
$s5 = __('Buy the Pro Version', 'easy-common');
$moreInfo = " $s2 $s4";
$toolTip .= addslashes(' ' . $moreInfo);
echo "
$s4
";
$s8 = sprintf(__('It costs only $%.2f!', 'easy-common'), $price);
$s9 = __('Instant download link.', 'easy-common');
$value .= ' Lite';
$s10 = sprintf(__('Thank you for using %s. The "Pro" version gives you more options.', 'easy-common'), $value);
$s11 = __("Consider buying it.", 'easy-common');
$plgKey = $this->getPlgKey();
$promoClick = addslashes("onclick=\"popupwindow('http://www.thulasidas.com/promo.php?key=$plgKey','Get Pro', 1024, 768);return false;\"");
$promoTip = htmlspecialchars("$s3. $s9 " . __("Limited Time Offer. Get the Pro version for less than a dollar!", 'easy-common') . "");
echo "$s10 $filter $s11 $s8";
echo "
";
}
function renderAffiliate() {
if ($this->killAuthor) {
return;
}
$plgURL = $this->plgURL;
$select = rand(0, 2);
switch ($select) {
case 0:
echo "
";
break;
case 1:
echo "
";
break;
case 2:
default:
echo "
ezAffiliates: The most affiliate-centric revenue sharing model on the Web. Finally, you can make some serious returns on your web presence. Generous 50% Commission: perhaps the highest rate of revenue sharing on the web. With just a couple of sales of this plugin, you will have recovered your purchase price! $10 Minimum Payout so that you will not be waiting forever before you qualify for payment. Lifetime Tracking: ezAffiliates uses cookie-less tracking technology to attribute every purchase of your lead to your account. Whatever your leads buy from us, whenever they do, will earn you commission. No cookie expiry! High Quality Products such as this plugin, and other premium plugins and PHP packages. Diverse Markets: Bloggers who blog about plugins, PayPal integration, affiliate marketing, MacOS apps and even eBooks will find ezAffiliates attractive and more effective that their current ad campaigns.', WIDTH, 295, TITLE, 'ezAffiliates', FIX, [this, 0, 0])\" onmouseout=\"UnTip()\" >
Support $value. Go Pro!";
if ($long) {
$longText = "Speed up your blog: ";
}
else {
$longText = '';
}
$supportText .= " $longTextUse MaxCDN!";
if ($long) {
$longText = "WordPress Hosting for ";
}
else {
$longText = 'Hosting for ';
}
$supportText .= " $longTextjust $4/month. ";
if ($long) {
$longText = "My books on ";
}
else {
$longText = 'Books: ';
}
$supportText .= " $longTextPhysics & Philosophy or ";
$supportText .= "Money & Finance.
";
echo $supportText;
}
function renderTipDivs() {
$plgURL = $this->plgURL;
echo <<Arvixe is my favorite hosting provider. Friendly service, extremely competitive rates, and of course a great affiliate program. My own WordPress blog and a dozen websites are hosted on their VPS. If you are looking for a new hosting provider, do check them out!
MaxCDN is a professional content delivery network. Easiest and most effective way to optimize your blog performance. Compatible with caching plugins, 24x7 professional support. Faster than most CDN providers in the continental US. Cheaper and better than most. Check it out now!
Dropbox! gives you 2GB of network (cloud) storage for free, which I find quite adequate for any normal user. (That sounds like the famous last words by Bill Gates, doesn’t it? “64KB of memory should be enough for anyone!”) And, you can get 250MB extra for every successful referral you make. That brings me to my ulterior motive – please use this link to sign up. When you do, I get 500MB extra. Don’t worry, you get 500MB extra as well. So I can grow my online storage up to 18GB, which should keep me happy for a long time. Thank you!
';
$plgURL = $this->plgURL;
$plg = $this->plg;
$slug = $this->slug;
$value = $plg['value'];
$url = 'http://www.thulasidas.com/plugins/' . $slug . '#faq';
$link = '' . $value . '';
echo " ";
printf(__("If you need help with %s, please read the FAQ section on the %s page. It may answer all your questions.", 'easy-common'), $value, $link);
echo " ";
_e("Or, if you still need help, you can raise a support ticket.", 'easy-common');
echo " ";
_e("[Request Paid Support]", 'easy-common');
$info = $this->getPlgInfo();
echo "[";
_e('Using our ezSupport Ticket System.', 'easy-common');
echo "]";
echo "[";
printf(__('You are using %s (V%s)', 'easy-common'), $value, $info[0]['Version']);
echo "]";
$_SESSION['ezSupport'] = $info[0]['Info'];
echo "
";
}
function renderWhyPro($short = false) {
if ($this->killAuthor && !$short) {
return;
}
$plgURL = $this->plgURL;
$plg = $this->plg;
$slug = $this->slug;
$value = $plg['value'];
$toolTip = $plg['title'];
$price = $plg['price'];
$buyURL = "http://buy.thulasidas.com/$slug";
$infoURL = "http://www.thulasidas.com/plugins/$slug";
$s1 = sprintf(__('Get %s', 'easy-common'), $value);
$s2 = sprintf(__('More info about %s', 'easy-common'), $value);
$s3 = sprintf(__('Buy the Pro version of %s for $%.2f', 'easy-common'), $value, $price);
$s4 = __('More Info', 'easy-common');
$onclick = "onclick=\"popupwindow('$buyURL','$s1', 1024, 768);return false;\"";
$moreInfo = " $s4 Get Pro Version";
$toolTip .= addslashes(' ' . $moreInfo);
$why = addslashes($plg['pro']);
echo '
';
if ($short) {
$s5 = __('Buy the Pro Version', 'easy-common');
$s6 = __('More features, more power!', 'easy-common');
echo "$s5 $s6";
}
else {
$s7 = sprintf(__('You are using the Lite version of %s, which is available in two versions: Lite and Pro.', 'easy-common'), $value);
echo "Get Pro Version!
$s7