本文整理汇总了PHP中rating::get_max_of方法的典型用法代码示例。如果您正苦于以下问题:PHP rating::get_max_of方法的具体用法?PHP rating::get_max_of怎么用?PHP rating::get_max_of使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类rating
的用法示例。
在下文中一共展示了rating::get_max_of方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: header
header("HTTP/1.0 404 Not Found");
exit;
}
require_once $_SERVER['DOCUMENT_ROOT'] . "/xajax/rating.common.php";
$xajax->printJavascript('/xajax/');
require_once $_SERVER['DOCUMENT_ROOT'] . "/classes/rating.php";
require_once $_SERVER['DOCUMENT_ROOT'] . "/classes/projects_offers.php";
require_once $_SERVER['DOCUMENT_ROOT'] . "/classes/sbr.php";
if (!$rating || !$rating instanceof rating || $rating->data['user_id'] != $user->uid) {
$rating = new rating($user->uid, $user->is_pro, $user->is_verify, $user->is_profi);
}
$r_data = $rating->data;
$r_data['kis'] = projects_offers::GetFrlOffersSummary($r_data['user_id']);
$r_data['kis']['refused_3'] = (int) $r_data['kis']['refused'] - (int) $r_data['kis']['refused_1'] - (int) $r_data['kis']['refused_0'] - (int) $r_data['kis']['refused_2'] - (int) $r_data['kis']['refused_4'];
if (!$r_data['max']) {
$r_data['max'] = $rating->get_max_of('total', false);
}
$sbr_ratings = sbr_meta::getUserRatings($user->uid, is_emp($user->role), 5, 0, $sbr_info['success_cnt']);
//$sbr_info['success_cnt'] = sbr_meta::getCountSuccessRatingSbr($user->uid, is_emp($user->role));
if (!($prjs = projects_offers::GetFrlOffers($r_data['user_id'], 'marked', NULL))) {
$prjs = array();
}
$kis_per_refused = round($r_data['kis']['total'] ? 100 * $r_data['kis']['refused'] / $r_data['kis']['total'] : 0, 2);
$kis_per_frl_refused = round($r_data['kis']['total'] ? 100 * $r_data['kis']['frl_refused'] / $r_data['kis']['total'] : 0, 2);
$kis_per_selected = round($r_data['kis']['total'] ? 100 * $r_data['kis']['selected'] / $r_data['kis']['total'] : 0, 2);
$kis_per_executor = round($r_data['kis']['total'] ? 100 * $r_data['kis']['executor'] / $r_data['kis']['total'] : 0, 2);
$kis_unknown = (int) $r_data['kis']['total'] - ((int) $r_data['kis']['refused'] + (int) $r_data['kis']['selected'] + (int) $r_data['kis']['executor']) - (int) $r_data['kis']['frl_refused'];
$kis_per_unknown = 100 - ($kis_per_refused + $kis_per_selected + $kis_per_executor + $kis_per_frl_refused);
$o_contest_rating = round($r_data['o_contest_1'] + $r_data['o_contest_2'] + $r_data['o_contest_3']);
$o_contest_ban_rating = round($r_data['o_contest_ban']);
$is_owner = $user->uid == $_SESSION['uid'];
示例2: trim
require_once $_SERVER['DOCUMENT_ROOT'] . "/classes/rating.php";
require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/sbr.php';
require_once $_SERVER['DOCUMENT_ROOT'] . "/classes/projects.php";
require_once $_SERVER['DOCUMENT_ROOT'] . "/classes/account.php";
$name = trim($_GET['user']);
$user = new users();
$user->GetUser($name);
if (!$rating || !$rating instanceof rating || $rating->data['user_id'] != $user->uid) {
$rating = new rating($user->uid, $user->is_pro, $user->is_verify, $user->is_profi, 1);
}
$r_data = $rating->data;
$r_data['o_oth_factor'] += $r_data['o_articles_factor'];
$r_data['o_oth_factor'] += $r_data['o_contest_ban'];
if (!$r_data['max']) {
$r_data['max'] = $rating->get_max_of('total', true);
}
$is_owner = $user->uid == $_SESSION['uid'];
?>
<div class="rating">
<div class="rate-page">
<?php
if ($user->uid == get_uid(false)) {
?>
<script>
window.addEvent('domready', function() {
xajax_GetRating('month', '<?php
echo $user->login;
?>