Beispiel #1
0
<h4>Need Support?</h4>
<ul>
  <?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 
<?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);
<?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;
Beispiel #4
0
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) {
        ?>
                  &nbsp;<span class="badge red">Pro</span>
                  <?php 
    }
    ?>
              </span>
            </a>&nbsp;
          </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;
}