function printForm() { $table = ''; if (self::isNeeded($this->_dir)) { if ($this->_loggedIn) { $display = "style='display:none'"; $table = "<div><h4 style='display:inline'>FTP is in Use</h4> <a id='showFtp' class='btn-sm btn-primary' title='See FTP Details' data-trigger='hover' data-placement='top' data-toggle='popover' data-content='<p>FTP is needed to update your application. Your credentials and serer details are already stored, and are being used. If you would like to inspect or modify them, please click here.</p>'><i class='glyphicon glyphicon-zoom-in icon-white'></i> See FTP Details</a></div>"; } else { $display = ''; } if (empty($this->status)) { $btn = "<a href='' class='btn-sm btn-success' title='Your FTP credentials look fine and are saved in your database. If you modify them below, click on this button to check again.' data-toggle='tooltip'><i class='glyphicon glyphicon-thumbs-up'></i> All Okay</a>"; } else { $btn = "<a href='' class='btn-sm btn-warning' title='Your FTP credentials do not look right. Please re-enter them and click on this button to check again.' data-toggle='tooltip'><i class='glyphicon glyphicon-thumbs-down'></i> Check Again</a>"; } $options = array(); $options['ftp_server'] = array('name' => __('FTP Server', 'easy-paypal'), 'value' => 'localhost', 'validator' => 'notNull', 'help' => __('Enter your FPT server name.', 'easy-paypal'), 'dataTpl' => 'none', 'dataMode' => ''); if (defined('FTP_HOST')) { $options['ftp_server']['value'] = FTP_HOST; } $options['ftp_user'] = array('name' => __('FTP User Name', 'easy-paypal'), 'value' => '', 'validator' => 'notNull', 'help' => __('Enter your FPT user name.', 'easy-paypal'), 'dataTpl' => 'none', 'dataMode' => ''); if (defined('FTP_USER')) { $options['ftp_user']['value'] = FTP_USER; } $options['ftp_password'] = array('name' => __('FTP Password', 'easy-paypal'), 'value' => '', 'validator' => 'notNull', 'help' => __('Enter your FPT password.', 'easy-paypal'), 'dataTpl' => 'none', 'dataMode' => ''); if (defined('FTP_PASS')) { $options['ftp_password']['value'] = FTP_PASS; if (!$this->isReady) { $this->status .= " (Click on Check Again to verify.)"; } } if ($this->_showRootDir) { $options['ftp_rootdir'] = array('name' => __('FTP Root Directory', 'easy-paypal'), 'value' => '', 'help' => __('When you logon to your server using FTP, it puts you in a folder. In most cases, we can discover this folder automatically. So you can start by leaving this option empty, but may have to come back and enter the value if prompted later.', 'easy-paypal'), 'dataTpl' => 'none', 'dataMode' => ''); } $table .= "<div id='ftp' {$display}><h4>FTP Details</h4><p>Looks like FTP is needed to update your application. Please provide or verify the FTP details below. Note that FTP details will be stored in your database in plain text.</p><p class='red'><strong>{$this->status}</strong> {$btn}</p><table class='table table-striped table-bordered responsive'><tbody>"; foreach ($options as $pk => $option) { $dbVal = EzGA::getGenOption($pk); if (empty($dbVal)) { EzGA::putGenOption($pk, $option['value']); } $table .= EzGA::renderOption($pk, $option); } $table .= "</tbody></table></div>"; $table .= "<script>var xeditHanlder = 'ajax/options.php'; var xparams ={}; \$('#showFtp').click(function() { \$(this).parent().hide();\$('#ftp').fadeIn();});</script>"; } return $table; }
<?php $plgSlug = EzGA::getSlug(); if (empty($hideTour)) { ?> <li>Take a <a href="tour.php" title='Please take a tour to understand the features and capabilities of this plugin' data-toggle='tooltip'>tour</a> to familiarize yourself with the plugin interface.</li> <?php } ?> <li>Please check the <a href="http://www.thulasidas.com/plugins/<?php echo $plgSlug; ?> #faq" class="popup" title='Your question or issue may be already answered or resolved in the FAQ' data-toggle='tooltip'> Plugin FAQ</a> for answers.</li> <li>For the lite version, you may be able to get support from the <a href='https://wordpress.org/support/plugin/<?php echo $plgSlug; ?> -lite' class='popup' title='WordPress forums have community support for this plugin' data-toggle='tooltip'>WordPress support forum</a>.</li> <li>For preferential support and free updates, you can purchase a <a href='http://buy.thulasidas.com/support' class='popup' title='Support contract is only $2.95 a month, and you can cancel anytime.' data-toggle='tooltip'>support contract</a>.</li> <li>From one-off support issues, you can raise a one-time paid <a href='http://buy.thulasidas.com/ezsupport' class='popup' title='Support ticket costs $0.95 and lasts for 72 hours' data-toggle='tooltip'>support ticket</a> for prompt support.</li> </ul> <h4>Happy with this plugin?</h4> <ul> <li>Please leave a short review and rate it at <a href=https://wordpress.org/plugins/<?php echo $plgSlug; ?> -lite/" class="popup" title='Please help the author and other users by leaving a short review for this plugin and by rating it' data-toggle='tooltip'>WordPress</a>. Thanks!</li> </ul> <h4>Need Custom Services?</h4> <?php EzGA::showService();
<?php require_once '../../EzGA.php'; if (!EzGA::isLoggedIn()) { http_response_code(400); die("Please login before doing this!"); } $selected = EzGA::getTaxonomyList($_REQUEST); include ABSPATH . '/wp-admin/includes/template.php'; http_response_code(200); ob_start(); echo "<style>ul{list-style:none}</style><ul>"; $args['checked_ontop'] = false; $args['selected_cats'] = $selected; wp_terms_checklist(0, $args); echo "</ul>"; $html = ob_get_clean(); $html = str_replace("<input", "<input class='selectit'", $html); if (!EzGA::$isPro) { $slug = EzGA::getSlug(); $html .= "<p class='red'><strong>This feature is implemented only in the <a href='#' class='goPro' data-product='{$slug}'>Pro Version</a> of this plugin.<//strong></p>"; } echo $html; exit;
</div> <div>Your version is up-to-date</div> </a> </div> <?php } } else { $allow_updates = array('name' => 'Allow Update Check', 'value' => 0, 'help' => __("Enable this option to allow automatic update checks. Note that checking for updates requires your server to connect to that of the author. No data is collected from your server during update check; it is a read-only process. If you are okay with connecting to an extenral server, please enable this option to opt in. <b>Click on the Updates button again to reload the page</b>", 'easy-common'), 'type' => 'checkbox'); $updateBox = '<div id="updateBox" class="col-md-3 col-sm-3 col-xs-6" style="display:none"><table class="table table-striped table-bordered responsive"> <thead> <tr> <th style="width:50%;min-width:150px">Option</th> <th style="width:55%;min-width:80px">Value</th> <th class="center-text" style="width:15%;min-width:50px">Help</th> </tr> </thead>' . EzGA::renderOption('allow_updates', $allow_updates) . '</tbody> </table> </div>'; ?> <div class="col-md-3 col-sm-3 col-xs-6"> <a data-toggle="tooltip" title="Click to enable update check so that you can connect to the author server to get the current version." class="well top-block" href="#" id='allowUpdates'> <i class="glyphicon glyphicon-exclamation-sign red"></i> <div>Update Check is Disabled</div> <div>Enable it</div> </a> </div> <?php } if (EzGA::$isPro) { ?> <div class="col-md-3 col-sm-3 col-xs-6">
function getHeader() { ob_start(); $plgName = EzGA::getPlgName(); $plgSlug = EzGA::getSlug(); $plgModeName = EzGA::$pluginModes[$plgSlug]; $isPro = EzGA::$isPro; $plgPrice = EzGA::$plgPrice; if (!empty(EzGA::$options['eztheme'])) { $themeCSS = "css/bootstrap-" . strtolower(EzGA::$options['eztheme']) . ".min.css"; } else { $themeCSS = "css/bootstrap-cerulean.min.css"; } ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title><?php echo $plgName; ?> </title> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="description" content="Ads EZ Plugin for Google AdSense"> <meta name="author" content="Manoj Thulasidas"> <!-- The styles --> <link id="bs-css" href="<?php echo $themeCSS; ?> " rel="stylesheet"> <link href="css/bootstrap-editable.css" rel="stylesheet"> <link href="css/charisma-app.css" rel="stylesheet"> <link href='css/bootstrap-tour.min.css' rel='stylesheet'> <link href="css/font-awesome.min.css" rel="stylesheet"> <link href="css/fileinput.min.css" rel="stylesheet"> <link href="css/bootstrap-colorpicker.min.css" rel="stylesheet"> <link href="css/ez-admin.css" rel="stylesheet"> <style type="text/css"> .popover{width:600px;} <?php if (empty(EzGA::$options['breadcrumbs'])) { ?> .breadcrumb {display:none;} <?php } ?> </style> <!-- jQuery --> <script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <!-- The HTML5 shim, for IE6-8 support of HTML5 elements --> <!--[if lt IE 9]> <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script> <![endif]--> <!-- The fav icon --> <link rel="shortcut icon" href="img/favicon.ico"> </head> <body> <!-- topbar starts --> <div class="navbar navbar-default" role="navigation"> <div class="navbar-inner"> <a id="index" class="navbar-brand" href="index.php"> <img alt="Ads EZ Logo" src="img/ads-ez.png" class="hidden-xs"/> <span><?php echo $plgName; ?> </span></a> <div class="btn-group pull-right"> <?php $standaloneURL = plugins_url('index.php', __FILE__); ?> <a id="standAloneMode" href="<?php echo $standaloneURL; ?> " target="_blank" data-content="Open <?php echo $plgName; ?> admin apge in a new window independent of WordPress admin interface. The standalone mode still uses WP authentication, and cannot be accessed unless logged in." data-toggle="popover" data-trigger="hover" data-placement="left" title='Standalone Admin Screen'><span class="btn btn-info"><i class="glyphicon glyphicon-resize-full"></i> Standalone Mode</span></a> <a id="update" href="update.php" data-content="If you would like to check for regular updates, or install a purchased module or Pro upgrade, visit the Updates page." data-toggle="popover" data-trigger="hover" data-placement="left" title='Updates Page'><span class="btn btn-info" ><i class="fa fa-cog fa-spin"></i> Updates <?php if (!$isPro) { ?> <span class="badge red">Pro</span> <?php } ?> </span> </a> </div> </div> </div> <!-- topbar ends --> <div class="ch-container"> <div class="row"> <!-- left menu starts --> <div class="col-sm-2 col-lg-2"> <div class="sidebar-nav"> <div class="nav-canvas"> <div class="nav-sm nav nav-stacked"> </div> <ul class="nav nav-pills nav-stacked main-menu"> <li id="dashboard"><a href="index.php"><i class="glyphicon glyphicon-home"></i><span> Dashboard</span></a> </li> <li id='tour'><a href="tour.php"><i class="glyphicon glyphicon-road"></i><span> Tour and Help</span></a></li> <?php if ($isPro) { $optionSets = EzGA::getOptionSets(); echo <<<EOF <li class="accordion"> <a id='{$plgSlug}' href="#"><i class="glyphicon glyphicon-plus"></i><span> {$plgModeName}</span></a> <ul class="nav nav-pills nav-stacked"> <li id='{$plgSlug}-admin'><a href="{$plgSlug}-admin.php"><i class="glyphicon glyphicon-check"></i><span> Settings</span></a></li> EOF; foreach ($optionSets as $o) { if (in_array($o, EzGA::$unSettable)) { $verb = 'Edit '; } else { $verb = 'Switch to '; } echo <<<EOF <li id="{$plgSlug}-{$o}"><a href="{$plgSlug}-admin.php?optionset={$o}"><i class="glyphicon glyphicon-export red"></i><span> {$verb} <code>{$o}</code></span></a></li> EOF; } echo <<<EOF <li id="{$plgSlug}-add"><a href="optionset.php"><i class="glyphicon glyphicon-export red"></i><span> Manage Option Sets</span></a></li> </ul> </li> EOF; ?> <li id='pro'><a href="pro.php" class="red"><i class="glyphicon glyphicon-cog"></i><span><b> Pro Features</b></span></a></li> <?php } else { echo <<<EOF <li id='{$plgSlug}-admin'><a href="{$plgSlug}-admin.php"><i class="glyphicon glyphicon-check"></i><span> {$plgModeName}</span></a></li> EOF; ?> <li id='goPro'><a href="pro.php" class="red goPro" data-toggle="popover" data-trigger="hover" data-content="Get the Pro version of <?php echo $plgModeName; ?> for <i>only</i> $<?php echo $plgPrice[$plgSlug]; ?> . Tons of extra features. Instant download." data-placement="right" title="Upgrade to Pro" data-product="<?php echo $plgSlug; ?> "><i class="glyphicon glyphicon-shopping-cart"></i><span><b> Go Pro!</b></span></a></li> <?php } ?> <li id="options"><a href="options.php"><i class="glyphicon glyphicon-cog"></i><span> Options</span></a></li> <li id="i18n"><a href="i18n.php"><i class="glyphicon glyphicon-globe"></i><span> Languages</span></a></li> </div> </div> </div> <!--/span--> <!-- left menu ends --> <noscript> <div class="alert alert-block col-md-12"> <h4 class="alert-heading">Warning!</h4> <p>You need to have <a href="http://en.wikipedia.org/wiki/JavaScript" target="_blank">JavaScript</a> enabled to use this site.</p> </div> </noscript> <div id="content" class="col-lg-10 col-sm-10"> <!-- content starts --> <?php $header = ob_get_clean(); return $header; }
<?php $keys = array($top, $middle, $bottom); openBox(__("Ad Alignment", 'easy-ads')); ?> <p>Ads can be placed in three different slots on each page or post - Top (Lead-in), Middle (Mid-Post) and Bottom (Lead-out). Each slot will be aligned (or suppressed) as you specify below.</p> <table class="table borderless"> <thead> <tr> <th></th> <th class="center-text">Left</th> <th class="center-text">Left<br>(Wrap)</th> <th class="center-text">Center</th> <th class="center-text">Right</th> <th class="center-text">Right<br>(Wrap)</th> <th class="center-text">Suppress</th> </tr> </thead> <tbody> <?php foreach ($keys as $pk) { echo EzGA::renderOptionCell($pk, $ezOptions[$pk]); } ?> </tbody> </table> <?php closeBox();
<?php require 'header.php'; ?> <div> <ul class="breadcrumb"> <li> <a href="#">Home</a> </li> <li> <a href="#">Dashboard</a> </li> </ul> </div> <?php insertAlerts(); openRow(); openCell("Introduction", "home", 8); $plgName = EzGA::getPlgName(); $plgMode = EzGA::getPlgMode(); require_once "{$plgMode}-intro.php"; closeCell(); openCell("Contact Author", 'envelope', 4, "", 260); require_once 'support.php'; closeCell(); closeRow(); include 'promo.php'; require 'footer.php';
static function mkBorder() { if (!empty(self::$options['show_borders']) && empty(self::$border)) { self::$border = 'border:#' . self::$options['border_normal'] . ' solid ' . self::$options['border_width'] . 'px;" ' . ' onmouseover="this.style.border=\'#' . self::$options['border_color'] . ' solid ' . self::$options['border_width'] . 'px\'" ' . 'onmouseout="this.style.border=\'#' . self::$options['border_normal'] . ' solid ' . self::$options['border_width'] . 'px\''; } return self::$border; }
<?php require '../EzGA.php'; if (EzGA::isLoggedIn()) { if (!EzGA::isActive()) { $pluginsPage = admin_url('plugins.php'); wp_die("<h3>Plugin Not Active</h3><strong>Ads EZ Plugin for Google AdSense</strong> is not active.<br/ >Please activate it from your <a href='{$pluginsPage}'>plugin admin page</a> before accessing this page."); } return; } else { header("location: " . wp_login_url($_SERVER['PHP_SELF'])); exit; }
<?php if (EzGA::getSlug() == 'google-adsense') { $top = 'show_top'; $middle = 'show_middle'; $bottom = 'show_bottom'; $floatLeft = 'floatLeft'; $left = 'left'; $center = 'center'; $floatRight = 'floatRight'; $right = 'right'; } else { $top = 'show_leadin'; $middle = 'show_midtext'; $bottom = 'show_leadout'; $floatLeft = 'float:left'; $left = 'text-align:left'; $center = 'text-align:center'; $floatRight = 'float:right'; $right = 'text-align:right'; } $no = 'no'; $choices = compact('left', 'floatLeft', 'center', 'right', 'floatRight', 'no'); $ezOptions[$top] = array('name' => __("Top", 'easy-ads'), 'help' => __("Where to show the top ad block? Select Left, Center, Right, or suppress this ad block. Select the <b>Wrap</b> Left, Center or Right option to wrap (or flow) the text around the ad block.", 'easy-ads'), 'value' => $floatLeft, 'type' => 'radio', 'options' => $choices); $ezOptions[$middle] = array('name' => __("Middle1", 'easy-ads'), 'help' => __("Where to show the mid-text ad block? Select left, center, right, or suppress this ad block.", 'easy-ads'), 'value' => $floatRight, 'type' => 'radio', 'options' => $choices); $ezOptions[$bottom] = array('name' => __("Bottom", 'easy-ads'), 'help' => __("Where to show the bottom ad block? Select left, center, right, or suppress this ad block.", 'easy-ads'), 'value' => $floatRight, 'type' => 'radio', 'options' => $choices);
echo EzGA::renderOptionCell('title_gsearch', $ezOptions['title_gsearch']); ?> </div> <div class="col-md-7 col-sm-12"> <?php echo EzGA::renderOptionCell('title_gsearch_custom', $ezOptions['title_gsearch_custom']); ?> </div> <div class="col-md-3 col-sm-12"> <?php echo EzGA::renderOptionCell('kill_gsearch_title', $ezOptions['kill_gsearch_title']); ?> </div> <div class="col-md-2 col-sm-12"> <?php echo EzGA::renderOptionCell('margin_gsearch', $ezOptions['margin_gsearch']); ?> </div> <div class="clearfix"></div> <?php closeBox(); require 'box-suppressing-ads.php'; require 'box-more-info.php'; ?> </div> <script> var xeditHanlder = 'ajax/options.php'; var xparams = {}; xparams.plugin_slug = '<?php echo $options['plugin_slug']; ?>
function filterHeader($arg) { if (is_admin()) { return $arg; } // is_feed() is not ready, because the WP query may not be run yet. if (strpos($_SERVER['REQUEST_URI'], 'feed') !== false) { return $arg; } if (EzGA::isKilled()) { return $arg; } $show_leadin = $this->options['show_leadin']; if ($show_leadin != 'no') { $metaOptions = EzGA::getMetaOptions(); if (empty($metaOptions['adsense']) || !empty($metaOptions['adsense']) && $metaOptions['adsense'] != 'no') { EzGA::$metaOptions['show_leadin'] = ''; echo $this->mkAdBlock("leadin"); EzGA::$metaOptions = array(); } } return $arg; }
$plgName = EzGA::getPlgName(); $plgSlug = EzGA::getSlug(); $plgPrice = EzGA::$plgPrice; if ($plgName == 'Google AdSense Ultra') { ?> <div class="col-md-3 col-sm-3 col-xs-6 goPro"> <a data-toggle="tooltip" title="Start your own ad server for only $14.95. Instant download." class="well top-block goPro" href="http://buy.thulasidas.com/ads-ez" data-product='ads-ez'> <i class="glyphicon glyphicon-shopping-cart red center-text"></i> <div>Get Ads EZ Pro <span class='label label-info moreInfo'>More Info</span></div> <div>$14.95. Instant Download</div> </a> </div> <?php } else { if (EzGA::isPro()) { ?> <div class="clearfix"> </div> <div class="col-md-3 col-sm-3 col-xs-6 goPro" data-product='google-adsense'> <a data-toggle="tooltip" title="Get Google AdSense Ultra for only $9.45. This flagship AdSense plugin can operate in basic (Now! Plugin for AdSense), advanced (Ads EZ Plugin for Google AdSense) and expert (Easy Plugin for AdSense) modes. Instant download." class="well top-block goPro" href="http://buy.thulasidas.com/google-adsense" data-product='google-adsense'> <i class="glyphicon glyphicon-shopping-cart red"></i> <div>Get Google AdSense Ultra <span class='label label-info moreInfo'>More Info</span></div> <div>$9.45. Instant Download</div> </a> </div> <?php } else { $basePlgName = str_replace(" Lite", "", $plgName); ?> <div class="col-md-3 col-sm-3 col-xs-6 goPro" data-product="<?php echo $plgSlug;
<?php require_once '../../EzGA.php'; if (!EzGA::isLoggedIn()) { http_response_code(400); die("Please login before messing with this!"); } extract($_REQUEST, EXTR_PREFIX_ALL, 'posted'); if ($posted_validator) { // a server-side validator is specified $fun = "validate_{$posted_validator}"; if (method_exists('EzGA', $fun)) { $valid = EzGA::$fun($posted_value); } else { http_response_code(400); die("Unknown validator ({$posted_validator}) specified"); } if ($valid !== true) { http_response_code(400); die("{$valid}"); } } http_response_code(200);
function getAdText() { $plg = self::$plg; EzGA::preFilter("", true); if (EzGA::$noAds) { return; } $plg->options['text_lu'] = EzGA::handleDefaultText($plg->options['text_lu'], '160x600'); $metaOptions = EzGA::getMetaOptions(); if (isset($metaOptions['adsense']) && $metaOptions['adsense'] == 'no') { return; } $show_lu = $metaOptions['show_lu']; if ($show_lu == 'no') { return; } return $plg->mkAdBlock("lu"); }
if (!empty($liteName)) { $ezActive[$lite] = $liteName; } } if (count($ezActive) > 1) { $ezAdminNotice = '<ul>'; foreach ($ezActive as $k => $p) { $ezAdminNotice .= "<li><code>{$k}</code>: <b>{$p}</b></li>\n"; } $ezAdminNotice .= "</ul>"; EzKillLite::$adminNotice .= '<div class="error"><p><b><em>Ads EZ Family of Plugins</em></b>: Please have only one of these plugins active.</p>' . $ezAdminNotice . 'Otherwise they will interfere with each other and work as the last one.</div>'; add_action('admin_notices', array('EzKillLite', 'admin_notices')); } } if (class_exists("GoogleAdSense")) { $gAd = new GoogleAdSense(); if (isset($gAd)) { if (method_exists($gAd, 'verifyDB')) { $gAd->verifyDB(); } add_action('admin_menu', array($gAd, 'addAdminPage')); $gAd->addWidgets(); $file = dirname(__FILE__) . '/google-adsense.php'; register_activation_hook($file, array("GoogleAdSense", 'install')); add_action('switch_theme', array("GoogleAdSense", 'switchTheme')); } } } else { require plugin_dir_path(__FILE__) . 'EzGA.php'; EzGA::doPluginActions(); }
<?php require 'header.php'; $plgName = EzGA::getPlgName(); $plgSlug = EzGA::getSlug(); ?> <div> <ul class="breadcrumb"> <li> <a href="#">Home</a> </li> <li> <a href="#">Tour</a> </li> </ul> </div> <h3>Take a Tour of <?php echo $plgName; ?> Features</h3> <?php openBox("Tour and Help", "globe", 8); ?> <h4>Quick Start</h4> <p>Welcome to <?php echo $plgName; ?> , on of the most popular AdSense plugin ever. </p> <ul> <li>Go to the <a href='<?php echo $plgSlug;
<?php require_once '../../EzGA.php'; EzGA::update();
"> <i class="glyphicon glyphicon-shopping-cart red"></i> <div><?php echo $plgName; ?> </div> <div>Get additional licenses at $<?php echo $plgPrice[$plgSlug]; ?> .</div> <span class="notification red">Pro</span> </a> </div> <?php } else { $proName = EzGA::getProName(); ?> <div class="col-sm-6 col-xs-12 goPro" data-product="<?php echo $plgSlug; ?> "> <a data-toggle="tooltip" title="Get <?php echo $proName; ?> for only $<?php echo $plgPrice[$plgSlug]; ?> . Tons of extra features. Instant download." class="well top-block goPro" href="http://buy.thulasidas.com/<?php echo $plgSlug; ?> ">