本文整理汇总了PHP中MessageCache::set_select方法的典型用法代码示例。如果您正苦于以下问题:PHP MessageCache::set_select方法的具体用法?PHP MessageCache::set_select怎么用?PHP MessageCache::set_select使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MessageCache
的用法示例。
在下文中一共展示了MessageCache::set_select方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: MessageCache
$dbtype = get_database_type($dbh);
$cache = new MessageCache($cache_type, $dbh, $dbtype, $smarty);
if (isset($_POST["submit"])) {
$message = $cache->confirm_cache($euid);
$_SESSION["message"] = $message;
header("Location: list-cache.php" . $msid . "cache_type={$cache_type}");
exit;
}
//redirect if we are setting new search order
if (isset($_GET["sort"])) {
$cache->set_sort_order($_GET["sort"], $euid, $msid);
// function does not return - page redirects
}
$offset = $cache->get_offset();
/*notes about caches
spam and ham have opposite sort orders for score
attachment, virus, and headers do not show the score.
different named variables once existed, depending on action:
spam -> rescued/confirmed/deleted
ham -> confirmed/reported/deleted
attachment/virus/header -> rescue/delete
*/
$cache->get_sort_order($euid);
// Get a list of all the suspected (H)am items with this user's
// ID in the recipient list, and sort it in ascending
// order by spam score.
$cache->set_select();
$cache->render($euid);
//print_r($_POST);