} include_once dirname(__FILE__) . '/app/classes/Planet.class.php'; include_once dirname(__FILE__) . '/app/lib/Cache.php'; //Load configuration if (is_file(dirname(__FILE__) . '/custom/config.yml')) { $conf = Spyc::YAMLLoad(dirname(__FILE__) . '/custom/config.yml'); $PlanetConfig = new PlanetConfig($conf); } else { die('Config file (custom/config.yml) is missing.'); } //Instantiate app $Planet = new Planet($PlanetConfig); $bench['codeloaded'] = microtime(true); //Load from cache $items = array(); if (0 < $Planet->loadOpml(dirname(__FILE__) . '/custom/people.opml')) { $Planet->loadFeeds(); $items = $Planet->getItems(); } $bench['contentloaded'] = microtime(true); //Prepare output cache Cache::$enabled = false; $cache_key = count($items) ? $items[0]->get_id() : ''; $last_modified = count($items) ? $items[0]->get_date() : ''; $cache_duration = $PlanetConfig->getOutputTimeout() * 60; Cache::setStore(dirname(__FILE__) . '/' . $conf['cachedir']); //Go display if (!isset($_GET['type']) || !is_file(dirname(__FILE__) . '/custom/views/' . $_GET['type'] . '/index.tpl.php') || strpos($_GET['type'], DIRECTORY_SEPARATOR)) { $_GET['type'] = 'default'; } if (!OutputCache::Start($_GET['type'], $cache_key, $cache_duration)) {
<?php require_once __DIR__ . '/../app/app.php'; require_once __DIR__ . '/inc/auth.inc.php'; //Load configuration $config_file = __DIR__ . '/../custom/config.yml'; if (is_file($config_file)) { $conf = Spyc::YAMLLoad($config_file); $PlanetConfig = new PlanetConfig($conf); } else { die('Config file (custom/config.yml) is missing.'); } //Instantiate app $Planet = new Planet($PlanetConfig); //Load if (0 < $Planet->loadOpml(__DIR__ . '/../custom/people.opml')) { $Planet->loadFeeds(); $items = $Planet->getItems(); } $everyone = $Planet->getPeople(); $count_feeds = count($everyone); $page_id = 'admin-feed'; $footer_extra = <<<FRAGMENT <script> var allCheckboxes = function(status){ var form = document.getElementById('feedmanage'); var selectboxes = form.getElementsByTagName('input'); for (var i=0; i<selectboxes.length; i++){ if ('checkbox' == selectboxes[i].type){ selectboxes[i].checked = status; }