本文整理汇总了PHP中rating::round方法的典型用法代码示例。如果您正苦于以下问题:PHP rating::round方法的具体用法?PHP rating::round怎么用?PHP rating::round使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类rating
的用法示例。
在下文中一共展示了rating::round方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: view_pro
echo view_pro();
?>
</td>
</tr>
<?php
}
//if
?>
<?php
if ($user->is_verify != 't') {
?>
<tr class="b-layout__one_bordbot_cec">
<td class="b-layout__one_padtb_6 b-layout__txt b-layout__one_valign_middle">Верификация <span class="b-icon b-icon__ver b-icon_top_2"></span> x 1.2</td>
<td class="b-layout__one_padtb_6 b-layout__one_valign_middle b-layout__txt b-text__bold b-layout__txt_color_6db335">
<?php
echo abs(rating::round(abs($feature_total_after_pro_verify * rating::VERIFY_FACTOR) - abs($feature_total_after_pro_verify)));
?>
</td>
<td class="b-layout__one_padtb_6 b-layout__one_right b-layout__one_valign_middle"><a href="/promo/verification/" target="_blank" class="b-layout__link">Пройти верификацию</a></td>
</tr>
<?php
}
//if
?>
<?php
if ($feature_portf != 0) {
?>
<tr class="b-layout__one_bordbot_cec">
<td class="b-layout__one_padtb_6 b-layout__txt b-layout__one_valign_middle">Работы в портфолио</td>
<td class="b-layout__one_padtb_6 b-layout__one_valign_middle b-layout__txt b-text__bold b-layout__txt_color_6db335">
示例2: teams
}
require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/stop_words.php';
require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/country.php';
require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/city.php';
require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/teams.php';
require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/notes.php';
require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/commune.php';
require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/rating.php';
require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/user_langs.php';
$recoms = new teams();
$additinfo = $user->GetAdditInfo($user->login, $error);
$languages = users::GetUserLangs($user->uid);
if ($rating && $rating instanceof rating && $rating->data['user_id'] == $user->uid) {
$rating_total = rating::round($rating->data['total']);
} else {
$rating_total = rating::round($additinfo['rating']);
}
$info_for_reg = unserialize($user->info_for_reg);
$reg_string = 'только для <A class="blue" href="/registration/">зарегистрированных</A>';
if ($_SESSION['uid']) {
$note = notes::GetNotes($_SESSION['uid'], null, $error);
if (count($note) > 0) {
foreach ($note as $key => $value) {
$notes[$value['to_id']] = $value;
}
}
}
$stop_words = new stop_words(hasPermissions('users'));
?>
<!-- NEW -->
示例3:
</span>
<?php
if ($frl['status_type'] != -1) {
echo freelancer::viewStatus($frl['status_type'], true);
?>
<?php
}
?>
</div>
</td>
<td><?php
echo rating::round($frl['t_rating']);
?>
</td>
<td style="width:65px;">
<?php
seo_start();
?>
<span class="review-type">+</span><span class="review-plus"><a href="/users/<?php
echo $frl['login'];
?>
/opinions/?from=sbr&sort=1&f=<?php
echo stat_collector::REFID_CATALOG;
?>
&stamp=<?php
echo $_SESSION['stamp'];
echo $kw_param;
示例4: echo
echo $value['login'];
?>
/opinions/?sort=1#op_head" target="_blank">+ <?php
echo (int) $value['opinions_plus'];
?>
</a></span>
<span class="b-layout__txt b-layout__txt_fontsize_11 b-layout__txt_color_c10600"><a class="b-layout__link b-layout__link_color_c10600" href="/users/<?php
echo $value['login'];
?>
/opinions/?sort=3#op_head" target="_blank">- <?php
echo (int) $value['opinions_minus'];
?>
</a></span>
</div>
<div class="b-layout__txt b-layout__txt_fontsize_11">Рейтинг: <?php
echo rating::round($value['rating']);
?>
</div>
<?php
}
?>
</td>
<td class="b-layout__td b-layout__td_padtop_10 b-layout__td_padbot_5 b-layout__td_width_280 b-layout__td_padright_20">
<?php
$contacts = unserialize($value['offer_contacts']) ? unserialize($value['offer_contacts']) : '';
if (is_array($contacts)) {
$empty_contacts_freelancer = 0;
foreach ($contacts as $name => $contact) {
if (trim($contact['value']) == '') {
$empty_contacts_freelancer++;
}
示例5:
if ($access_contacts) {
include $_SERVER['DOCUMENT_ROOT'] . '/user/contacts_info.php';
}
?>
</td>
<?php
}
?>
<td class="b-layout__td b-layout__td_padleft_10 b-layout__td_bordleft_e6 b-layout__td_padright_20 b-layout__td_width_270 b-layout__td_width_150_ipad b-layout__td_ipad b-layout__td_block_iphone b-layout__td_width_full_iphone b-layout__td_pad_null_iphone b-layout__td_bord_null_iphone">
<div class="b-layout b-layout__hover_bg_f0ffdf b-layout_pad_3 b-layout_padleft_10 b-layout_margbot_3 b-page__desktop b-page__ipad">
<div class="b-layout__txt b-layout__txt_padleft_25 b-page__desktop b-layout__txt_lineheight_1 b-layout__txt_bold b-layout__txt_padtop_1"><span class="b-icon b-icon__cont b-icon__cont_rate b-icon_top_-2 b-icon_margleft_-25"></span> Рейтинг<span class="b-layout__txt b-layout__txt_float_right b-layout__txt_float_none_ipad b-layout__txt_bold b-layout__txt_lineheight_1"><?php
echo rating::round($r_data['total']);
?>
</span></div>
<div class="b-layout__txt b-page__ipad b-layout__txt_nowrap b-layout__txt_bold b-layout__txt_lineheight_1"><span class="b-icon b-icon__cont b-icon__cont_rate b-icon_top_-2 b-icon_margleft_-15"></span> <?php
echo rating::round($r_data['total']);
?>
</div>
</div>
<div class="b-layout b-layout__hover_bg_f0ffdf b-layout_pad_3 b-layout_padleft_10 b-page__desktop b-page__ipad">
<div class="b-layout__txt b-layout__txt_padleft_25 b-page__desktop b-layout__txt_lineheight_1 b-layout__txt_bold b-layout__txt_padtop_1"><span class="b-icon b-icon__bs_small b-icon_top_-2 b-icon_margleft_-25"></span><span class="b-layout__txt b-layout__txt_float_right b-layout__txt_float_none_ipad b-layout__txt_bold b-layout__txt_lineheight_1"><?php
echo (int) $sbr_info['completed_cnt'];
?>
</span><a href="/promo/<?php
echo sbr::NEW_TEMPLATE_SBR;
?>
/" class="b-layout__link b-layout__link_color_000 b-layout__link_no-decorat b-layout__link_bold" target="_blank">Безопасные сделки</a> </div>
<div class="b-layout__txt b-page__ipad b-layout__txt_nowrap b-layout__txt_bold"><span class="b-icon b-icon__bs_small b-icon_margleft_-15 b-layout__txt_bold"></span> <?php
echo (int) $sbr_info['completed_cnt'];
?>
</div>
示例6: echo
</div>
</div>
<?php
}
//if
?>
</td>
<td class="b-layout__right b-layout__right_width_240"><div class="b-freelancer__txt b-freelancer__txt_fontsize_11 b-freelancer__txt_padbot_10">
<!--
<div class="b-freelancer__txt b-freelancer__txt_float_right">Отношение <span class="b-freelancer__txt ">-96</span></div>
-->
<div class="b-freelancer__txt">Рейтинг <span class="b-freelancer__txt <?php
echo $offer['rating'] < 0 ? "b-freelancer__txt_color_c10600" : "b-freelancer__txt_color_6db335";
?>
"><?php
echo ($offer['rating'] < 0 ? "−" : "") . abs(rating::round($offer['rating']));
?>
</span></div>
</div>
<div class="b-freelancer__txt b-freelancer__txt_fontsize_11 b-layout">
<table class="b-layout__table b-layout__table_width_full" cellpadding="0" cellspacing="0" border="0">
<tr class="b-layout__tr">
<td class="b-layout__left b-layout__left_padbot_5">
<a class="b-freelancer__link" href="/users/<?php
echo $offer['login'];
?>
/opinions/?from=norisk#op_head" target="_blank"><?php
echo $offer['sf'];
?>
<?php
echo ending($offer['sf'], "рекомендация", "рекомендации", "рекомендаций");
示例7: _getUserData
/**
* Возвращает часть ответа с информацией о пользователе
*
* @param array $aData информация о пользователе из базы
* @param bool $bShowEmail включить пользователя Email в ответ
* @param bool $bExtended получить расширенную информацию (аналог профиля на сайте)
* @return array
*/
private function _getUserData($aData = array(), $bShowEmail = false, $bExtended = false)
{
$this->_oSession->view_online_status($aData['login'], false);
$u = new users();
if (!is_emp($aData['role'])) {
require_once ABS_PATH . '/classes/professions.php';
$prof_id = $aData['spec'] ? $aData['spec'] : 0;
$prof_group_id = $aData['spec'] ? professions::GetProfField($aData['spec'], 'prof_group') : 0;
} else {
$prof_id = 0;
$prof_group_id = 0;
}
$aReturn = array('id' => $aData['uid'], 'status' => $aData['self_deleted'] == 't' ? 2 : 1, 'username' => $aData['login'] ? iconv('cp1251', 'utf-8', $aData['login']) : '', 'firstname' => $aData['uname'] ? iconv('cp1251', 'utf-8', $aData['uname']) : '', 'lastname' => $aData['usurname'] ? iconv('cp1251', 'utf-8', $aData['usurname']) : '', 'role' => is_emp($aData['role']) ? 2 : 1, 'pro' => $aData['is_pro'] == 't' ? 1 : 0, 'verified' => $aData['is_verify'] == 't' ? 1 : 0, 'online' => $this->_oSession->is_active ? 1 : 0, 'spec' => $aData['spec'] ? $aData['spec'] : 0, 'avatar' => array('url' => $aData['photo'] ? WDCPREFIX . '/users/' . $aData['login'] . '/foto/' : '', 'file' => $aData['photo'] ? substr($aData['photo'], 2) . '?' . strtotime($aData['photo_modified_time']) : ''), 'gender' => $aData['sex'] == 't' ? 1 : ($aData['sex'] == 'f' ? 2 : 0), 'country_id' => intval($aData['country']), 'city_id' => intval($aData['city']), 'age' => ElapsedYears(strtotime($u->GetField($aData['uid'], $e, 'birthday'))), 'birthday' => $u->GetField($aData['uid'], $e, 'birthday'), 'prof_id' => $prof_id, 'prof_group_id' => $prof_group_id, 'create_time' => strtotime($aData['reg_date']), 'update_time' => $aData['modified_time'] ? strtotime($aData['modified_time']) : 0);
if ($bShowEmail) {
$aReturn['email'] = $aData['email'] ? iconv('cp1251', 'utf-8', $aData['email']) : '';
}
if ($bExtended) {
require_once ABS_PATH . '/classes/rating.php';
require_once ABS_PATH . '/classes/teams.php';
$rating = new rating($aData['uid'], $aData['is_pro'], $aData['is_verify'], @$aData['is_profi'], 1);
$team = new teams();
$aReturn['rating'] = rating::round($rating->data['total']);
$aReturn['favorite'] = $team->teamsIsInFavorites($_SESSION['uid'], $aData['uid']);
$aReturn['contacts'] = is_view_contacts(get_uid(false)) ? $this->_getUserContactsData($aData) : array();
$aReturn['reviews'] = $this->_getUserOpinionsData($aData);
}
return $aReturn;
}