当前位置: 首页>>代码示例>>PHP>>正文


PHP EntryManager::fetchEntries方法代码示例

本文整理汇总了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>' : "";
开发者ID:symphonycms,项目名称:symphony-1.7,代码行数:31,代码来源:sym_publish_comments.php


注:本文中的EntryManager::fetchEntries方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。