本文整理汇总了PHP中rating::get_work_rating方法的典型用法代码示例。如果您正苦于以下问题:PHP rating::get_work_rating方法的具体用法?PHP rating::get_work_rating怎么用?PHP rating::get_work_rating使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类rating
的用法示例。
在下文中一共展示了rating::get_work_rating方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: rating
$renderObj = new rating();
$user_id = $_SESSION['userinfo']->id != '' ? $_SESSION['userinfo']->id : 0;
require_once 'header.php';
$record = $renderObj->get_profile($user_id);
if ($record != 0) {
$name = $record['google_name'] != '' ? $record['google_name'] : 'NA';
$email = $record['google_email'] != '' ? $record['google_email'] : 'NA';
$designation = $record['designation'] != '' ? $record['designation'] : 'NA';
$profile_pic = $record['google_picture_link'] != '' ? $record['google_picture_link'] . "?sz=100" : 'https://lh5.googleusercontent.com/-b0-k99FZlyE/AAAAAAAAAAI/AAAAAAAAAAA/eu7opA4byxI/photo.jpg?sz=100';
}
$ranking_user_list = $renderObj->get_ranking_list($user_id);
$cnt = $renderObj->get_all_members_cnt();
$rank = $renderObj->get_my_rank_position();
$login_user_rank_position = array_search($user_id, array_column($rank, 'user_id'));
$most_recent_ratings = $renderObj->get_recent_ratings();
$get_work_rating = $renderObj->get_work_rating($user_id);
$plus_rating = 0;
$minus_rating = 0;
foreach (@$get_work_rating as $key => $val) {
if ($val['rating'] == 1) {
$plus_rating++;
} else {
if ($val['rating'] == 0) {
$minus_rating++;
}
}
}
?>
<script src="js/highchart.js"></script>
<script>