Пример #1
0
<?php

require_once PLUGINS . 'autoreader/autoreader.php';
$arObj = new Autoreader($h);
$arObj->getSettings($h);
$campaigns = $arObj->getCampaigns($h);
$action = $h->cage->post->testAlnumLines('action');
switch ($action) {
    case "fetch":
        $fetched = $arObj->adminForcefetch($h);
        $array = array('fetched' => $fetched);
        echo json_encode($array);
        exit;
    case "delete":
        $result = $arObj->adminDelete($h);
        echo $result;
        exit;
    case "reset":
        $result = $arObj->adminReset($h);
        echo $result;
        exit;
    default:
        //print "default";
}
?>

  <div class="wrap">
    <h2>Campaigns</h2>     
  
    <table class="widefat"> 
      <thead>
<?php

require_once PLUGINS . 'autoreader/autoreader.php';
$arObj = new Autoreader($h);
$arObj->getSettings($h);
$logs = $arObj->getLogs($h);
$autoreader_settings = $arObj->getOptionSettings($h);
//$logging = get_option('wpo_log');
$logs = $arObj->getLogs($h, 'limit=7');
$nextcampaigns = $arObj->getCampaigns($h, 'fields=id,title,lastactive,frequency&limit=5' . '&where=active=1&orderby=UNIX_TIMESTAMP(lastactive)%2Bfrequency&ordertype=ASC');
$lastcampaigns = $arObj->getCampaigns($h, 'fields=id,title,lastactive,frequency&limit=5&where=UNIX_TIMESTAMP(lastactive)>0&orderby=lastactive');
$campaigns = $arObj->getCampaigns($h, 'fields=id,title,count&limit=5&orderby=count');
?>


        
  <div class="wrap">
    <h2>Dashboard</h2>

    <div id="sidebar">
      <div id="sidebar_logging">
         <?php 
if ($autoreader_settings['wpo_help']) {
    ?>
<a href="<?php 
    echo $this->helpurl;
    ?>
logging" class="help_link">Help</a><?php 
}
?>
        <h3>Latest log entries  <?php