function printFeedEntries($blogid, $group = 0, $feed = 0, $unreadOnly = false, $starredOnly = false, $searchKeyword = null) { ?> <script type="text/javascript"> var scrapedPostText = "<?php echo _t('스크랩 포스트'); ?> "; var disscrapedPostText = "<?php echo _t('미스크랩 포스트'); ?> "; </script> <table cellpadding="0" cellspacing="0"> <tbody> <?php $count = 0; foreach (getFeedEntries($blogid, $group, $feed, $unreadOnly, $starredOnly, $searchKeyword) as $entry) { if ($count == 0) { $firstEntryId = $entry['id']; } $className = $entry['wasread'] ? 'read' : 'unread'; $className .= $count % 2 == 1 ? ' even-line' : ' odd-line'; $className .= $count == 0 ? ' active-class' : ' inactive-class'; $podcast = $entry['enclosure'] ? '<span class="podcast-icon bullet" title="' . _t('팟캐스트 포스트입니다.') . '"><span class="text">' . _t('팟캐스트') . '</span></span>' : ''; ?> <tr id="entrytitleList<?php echo $entry['id']; ?> " class="<?php echo $className; ?> " onmouseover="rolloverClass(this, 'over')" onmouseout="rolloverClass(this, 'out')" onclick="Reader.selectEntry(<?php echo $entry['id']; ?> )"> <td> <div class="icons"> <?php if ($entry['item']) { ?> <span id="star<?php echo $entry['id']; ?> " class="scrap-on-icon bullet" title="<?php echo _t('이 포스트를 스크랩 해제합니다.'); ?> " onclick="Reader.toggleStarred(<?php echo $entry['id']; ?> )"><span class="text"><?php echo _t('스크랩 포스트'); ?> </span></span> <?php } else { ?> <span id="star<?php echo $entry['id']; ?> " class="scrap-off-icon bullet" title="<?php echo _t('이 포스트를 스크랩합니다.'); ?> " onclick="Reader.toggleStarred(<?php echo $entry['id']; ?> )"><span class="text"><?php echo _t('미스크랩 포스트'); ?> </span></span> <?php } ?> <?php echo $podcast; ?> </div> <div class="content"> <div class="title"><span class="text"><?php echo htmlspecialchars($entry['entry_title']); ?> </span></div> <div class="blog"><?php echo htmlspecialchars($entry['blog_title']); ?> </div> </div> </td> </tr> <?php $count++; } ?> </tbody> </table> <div id="additionalFeedContainer"></div> <div id="feedLoadingIndicator" class="system-message" style="display: none;"> <?php echo _t('피드를 읽어오고 있습니다.'); ?> </div> <script type="text/javascript"> Reader.setShownEntries(<?php echo $count; ?> ); Reader.setTotalEntries(<?php echo getFeedEntriesTotalCount($blogid, $group, $feed, $unreadOnly, $starredOnly, $searchKeyword); ?> ); <?php if (isset($firstEntryId)) { ?> Reader.selectedEntryObject = document.getElementById("entrytitleList<?php echo $firstEntryId; ?> ").parentNode; <?php } ?> </script> <?php return $count; }
<?php /// Copyright (c) 2004-2016, Needlworks / Tatter Network Foundation /// All rights reserved. Licensed under the GPL. /// See the GNU General Public License for more details. (/documents/LICENSE, /documents/COPYRIGHT) $IV = array('POST' => array('group' => array('int', 'min' => 0, 'default' => 0), 'feed' => array('int', 'min' => 0, 'default' => 0), 'unread' => array(array('0', '1')), 'starred' => array(array('0', '1')), 'keyword' => array('string', 'mandatory' => false))); require ROOT . '/library/preprocessor.php'; $result = array('error' => '0'); ob_start(); $count = printFeedEntries($blogid, $_POST['group'], $_POST['feed'], $_POST['unread'] == '1', $_POST['starred'] == '1', $_POST['keyword'] == '' ? null : $_POST['keyword']); $result['view'] = escapeCData(ob_get_contents()); ob_end_clean(); $entry = getFeedEntry($blogid, $_POST['group'], $_POST['feed'], 0, $_POST['unread'] == '1', $_POST['starred'] == '1', $_POST['keyword'] == '' ? null : $_POST['keyword']); $result['firstEntryId'] = $entry['id']; $result['entriesShown'] = $count; $result['entriesTotal'] = getFeedEntriesTotalCount($blogid, $_POST['group'], $_POST['feed'], $_POST['unread'] == '1', $_POST['starred'] == '1', $_POST['keyword'] == '' ? null : $_POST['keyword']); Respond::PrintResult($result);