本文整理匯總了PHP中rating::CountByRank方法的典型用法代碼示例。如果您正苦於以下問題:PHP rating::CountByRank方法的具體用法?PHP rating::CountByRank怎麽用?PHP rating::CountByRank使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類rating
的用法示例。
在下文中一共展示了rating::CountByRank方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: header
$rpath = '../';
$stretch_page = true;
header('Location: /404.php');
exit;
require_once $_SERVER['DOCUMENT_ROOT'] . "/classes/stdf.php";
require_once $_SERVER['DOCUMENT_ROOT'] . "/classes/rating.php";
session_start();
if (!($rank = __paramInit('int', 'rank')) || $rank > rating::MAX_RANK || $rank <= 0) {
header('Location: /404.php');
exit;
}
$page = __paramInit('int', 'page', NULL, 1);
if ($page < 1) {
$page = 1;
}
$COLCNT = 3;
$ROWCNT = 20;
$limit = $COLCNT * $ROWCNT;
$offset = ($page - 1) * $limit;
$count = rating::CountByRank($rank);
if ($count) {
if ($offset > $count) {
header_location_exit('/404.php');
}
$users = rating::GetByRank($rank, $limit, $offset);
}
$header = "../header.php";
$content = "content.php";
$content_bgcolor = '#ffffff';
$footer = "../footer.html";
include "../template.php";