if (isset($_GET['user'])) { $area = 'user'; $areaName = 'Users'; if (ae_UserModel::isValidStatus($status)) { $filter['WHERE'] = 'u_status = "' . $status . '"'; } $list = new ae_UserList($filter); } else { $area = 'comment'; $areaName = 'Comments'; if (ae_CommentModel::isValidStatus($status)) { $filter['WHERE'] = 'co_status = "' . $status . '"'; } else { $filter['WHERE'] = 'co_status != "trash" AND co_status != "spam"'; } $list = new ae_CommentList($filter); } } } } $urlBasis = '?area=manage&offset=' . $pageOffset . '&' . $area; // pagination $numPages = ceil($list->getTotalNumItems() / $itemsPerPage); $queryStr = preg_replace('/[?&]offset=?[0-9]*/i', '', $_SERVER['QUERY_STRING']); $linkBase = 'admin.php?' . htmlspecialchars($queryStr) . '&offset='; ?> <h1>Manage: <?php echo $areaName; ?> </h1>
<?php $post->loadCategories(); $filter = array('WHERE' => 'co_post = :postId AND co_status = :status', 'ORDER BY' => 'co_datetime ASC', 'LIMIT' => FALSE); $params = array(':postId' => $post->getId(), ':status' => ae_CommentModel::STATUS_APPROVED); $coList = new ae_CommentList($filter, $params); $class = 'post single-post post-' . $post->getStatus(); $class .= $post->getDatetime('YmdHis') > date('YmdHis') ? ' post-future' : ''; ?> <article class="<?php echo $class; ?> " id="post-<?php echo $post->getId(); ?> "> <header class="post-header"> <h2><a href="<?php echo $post->getLink(); ?> "><?php echo $post->getTitle(); ?> </a></h2> <time class="published icon-add-before icon-before-clock" datetime="<?php echo $post->getDatetime('Y-m-d'); ?> "> <span><?php echo $post->getDatetime('d.m.Y');
<?php define('IS_RSS', TRUE); require_once '../core/autoload.php'; require_once '../core/config.php'; $filterPosts = array('LIMIT' => '0, 25', 'ODER BY' => 'po_datetime DESC', 'WHERE' => 'po_status = "' . ae_PostModel::STATUS_PUBLISHED . '"'); $filterComments = array('LIMIT' => '0, 25', 'ORDER BY' => 'co_datetime DESC', 'WHERE' => 'co_status = "' . ae_CommentModel::STATUS_APPROVED . '"'); $postList = new ae_PostList($filterPosts); $commentList = new ae_CommentList($filterComments); $rssLink = URL . 'feed/'; $image = FALSE; if (file_exists('../themes/' . THEME . '/img/favicon.png')) { $image = URL . 'themes/' . THEME . '/img/favicon.png'; } echo '<?xml version="1.0" encoding="utf-8"?>' . PHP_EOL; ?> <rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"> <channel> <title><?php echo ae_Settings::get('blog_title'); ?> </title> <description><?php echo ae_Settings::get('blog_description'); ?> </description> <?php if ($image !== FALSE) { ?> <image> <url><?php
<?php // Recent comments $filter = array('LIMIT' => '0, 5', 'ORDER BY' => 'co_datetime DESC', 'WHERE' => ' co_status = :coStatus AND ( ( SELECT po_status FROM `' . ae_PostModel::TABLE . '` WHERE po_id = co_post AND po_datetime <= :date ) = :poStatus ) '); $params = array(':coStatus' => ae_CommentModel::STATUS_APPROVED, ':poStatus' => ae_PostModel::STATUS_PUBLISHED, ':date' => date('Y-m-d H:i:s')); $coList = new ae_CommentList($filter, $params, FALSE); // Posts of the recent comments $filter = array('LIMIT' => FALSE, 'WHERE' => '( '); $params = array(); $i = 0; while ($co = $coList->next()) { $filter['WHERE'] .= 'po_id = :id' . $i . ' OR '; $params[':id' . $i] = $co->getPostId(); $i++; } $filter['WHERE'] = mb_substr($filter['WHERE'], 0, -4) . ' )'; $poList = new ae_PostList($filter, $params, FALSE); $coList->reset(); ?> <aside class="recent-comments icon-add-before icon-before-comment"> <h6>Neue Kommentare</h6> <?php while ($co = $coList->next()) {