本文整理汇总了PHP中EntryManager::fetchEntries方法的典型用法代码示例。如果您正苦于以下问题:PHP EntryManager::fetchEntries方法的具体用法?PHP EntryManager::fetchEntries怎么用?PHP EntryManager::fetchEntries使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类EntryManager
的用法示例。
在下文中一共展示了EntryManager::fetchEntries方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: count
$where[1] = " AND t4.section_id = '{$filter_identifier}' ";
break;
case 'spam':
$where[0] = " WHERE `spam` = 'yes' ";
$where[1] = " AND t1.`spam` = 'yes' ";
break;
}
}
$comment_count_total = $DB->fetchVar("count", 0, "SELECT count(tbl_comments.id) as `count` FROM `tbl_comments`" . $where[0]);
$comment_count_remaining = $comment_count_total - ($current_page - 1) * $Admin->getConfigVar('pagination_maximum_rows', 'symphony');
$sql = "SELECT t1.* " . "FROM tbl_comments as t1 " . "LEFT JOIN `tbl_entries` AS t3 ON t1.entry_id = t3.id " . "LEFT JOIN `tbl_entries2sections` as t4 ON t3.id = t4.entry_id " . "LEFT JOIN `tbl_sections` AS t5 ON t4.section_id = t5.id " . "LEFT JOIN `tbl_entries2customfields` AS t6 ON t6.field_id = t5.primary_field AND t4.entry_id = t6.entry_id " . "WHERE 1 " . $where[1] . "GROUP BY t1.`id` " . "ORDER BY t1.id DESC " . "LIMIT " . ($current_page - 1) * $Admin->getConfigVar('pagination_maximum_rows', 'symphony') . ", " . $Admin->getConfigVar('pagination_maximum_rows', 'symphony');
$comments = $DB->fetch($sql);
$date = $Admin->getDateObj();
include_once TOOLKIT . "/class.entrymanager.php";
$entryManager = new EntryManager($Admin);
$latest_entries = $entryManager->fetchEntries(5, true);
$sections = $DB->Fetch("SELECT * FROM `tbl_sections`");
if (isset($_GET['_f'])) {
switch ($_GET['_f']) {
case "complete-flag":
$Admin->pageAlert("selected-success", array("Comment(s)", "flagged as spam"));
break;
case "complete-unflag":
$Admin->pageAlert("selected-success", array("Comment(s)", "flagged as not spam"));
break;
case "complete-delete":
$Admin->pageAlert("selected-success", array("Comment(s)", "deleted"));
break;
}
}
$config_button = $Admin->authorIsSuper() ? '<a class="configure button" href="' . $Admin->getCurrentPageURL() . 'settings/" title="Configure comment settings">Configure</a>' : "";