function create_special_feed($db, $type) { require 'CPoem.php'; $cPoem = new CPoem($db, $_SESSION); if ($type == 'newest') { $poems = $cPoem->getNewestPoems(10); create_rss($poems, 'Uusimmat runot', 'http://www.runosydan.net/rss.php?special=newest'); } }
$rss->addImage($imageUrl, $title, $link); $query = BookQuery::searchQuery($search); $query .= ' order by created desc'; if ($limit > 0) { $query .= ' limit ' . $limit; } $mysqlResult = mysql_query($query); while ($book = Book::fromMySql($mysqlResult)) { $title = $book->get('title'); $desc = 'Neues Buchangebot:' . "\n" . $book->asText(); $desc = nl2br(Parser::text2html($desc)); $id = $link = WEBDIR . 'book.php?id=' . $book->get('id'); $author = 'ubook@asta-bielefeld.de (uBook-Team)'; $date = $book->get('created'); $rss->addItem($id, $title, $desc, $link, $author, $date); } return $rss; } /* Cleaning old books before searching */ require_once 'books/Cleaner.php'; Cleaner::checkOld(); $search = ''; $limit = 100; if (isset($_GET['search'])) { $search = $_GET['search']; } if (isset($_GET['limit'])) { $limit = (int) $_GET['limit']; } $rss = create_rss($search, $limit); $rss->send();
$content[] = '</a>'; $content[] = ' (<a href="'; $content[] = SHAARLI_RIVER_URL; $content[] = 'discussion.php?url='; $content[] = urlencode($link->permalink); $content[] = '">Discussion</a>)'; $content[] = '</li>'; } $content[] = '</ul>'; $content = implode($content); $feed_entry->title = 'Top du ' . date('d/m/Y', strtotime($data->date)); $feed_entry->content = $content; $feed_entry->date = $data->date; } $feed = array($feed_entry); create_rss($feed, array('title' => 'Shaarli River - Les liens les plus partagés')); exit; } /** * Top shared links - Page */ $intervals = array('12h' => 'Last 12h', '24h' => 'Last 24h', '48h' => 'Last 48h', '1month' => 'Last month', '3month' => 'Last 3 months', 'alltime' => 'Alltime'); $interval = isset($_GET['interval']) && isset($intervals[$_GET['interval']]) ? $_GET['interval'] : '24h'; $api = new ShaarliApiClient(SHAARLI_API_URL); $entries = $api->top(array('interval' => $interval)); $header_rss = './top.php?do=rss'; include __DIR__ . '/includes/header.php'; include __DIR__ . '/includes/menu.php'; ?> <div class="menu"> <?php