本文整理汇总了PHP中rating::is_profile_access_allowed方法的典型用法代码示例。如果您正苦于以下问题:PHP rating::is_profile_access_allowed方法的具体用法?PHP rating::is_profile_access_allowed怎么用?PHP rating::is_profile_access_allowed使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类rating
的用法示例。
在下文中一共展示了rating::is_profile_access_allowed方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: rating
<?php
require_once 'config.php';
require_once 'class/rating.php';
$renderObj = new rating();
$user_id = $_SESSION['userinfo']->id != '' ? $_SESSION['userinfo']->id : 0;
$user_id = $_GET['id'] != '' ? $_GET['id'] : $user_id;
$chk = $_GET['chk'] != '' ? $_GET['chk'] : '0';
if (!empty($_REQUEST['edit_comment']) && $renderObj->is_profile_access_allowed($user_id, $_SESSION['userinfo']->id) === false) {
header('Location: rating_dashboard.php?chk=19');
}
$record = $renderObj->get_profile($user_id);
$get_work_rating = $renderObj->get_work_rating($user_id);
if ($record != 0) {
$name = $record['google_name'] != '' ? $record['google_name'] : 'NA';
$email = $record['google_email'] != '' ? $record['google_email'] : 'NA';
$mobile_number = $record['mobile_number'] != '' ? $record['mobile_number'] : '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';
}
require_once 'header.php';
$html_for_minus_one = $html_for_plus_one = '';
$plus_rating = 0;
$minus_rating = 0;
foreach (@$get_work_rating as $key => $val) {
$date = 'N/A';
if ($val['created_date']) {
$date = date("d-M-Y", strtotime($val['created_date']));
}
$val['title'] = $val['title'] != '' ? $val['title'] : 'N/A';
$val['given_by_name'] = $val['given_by_name'] != '' ? $val['given_by_name'] : 'N/A';