示例#1
0
/**
 * Вернуть контактные данные фрилансера если есть доступ их смотреть
 * 
 * @param type $login
 * @param type $hash
 * @return \xajaxResponse
 */
function getContactsInfo($login, $hash)
{
    $objResponse = new xajaxResponse();
    if ($hash === paramsHash(array($login))) {
        $freelancer = new freelancer();
        $freelancer->GetUser($login);
        if ($freelancer->uid > 0 && !is_emp($freelancer->role) && is_view_contacts($freelancer->uid) && is_contacts_not_empty($freelancer)) {
            require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/template.php';
            require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/country.php';
            require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/city.php';
            require_once ABS_PATH . '/classes/statistic/StatisticFactory.php';
            require_once ABS_PATH . '/classes/users.php';
            $html = Template::render($_SERVER['DOCUMENT_ROOT'] . '/user/contacts_info.php', array('user' => $freelancer));
            $ga = StatisticFactory::getInstance('GA');
            $ga->queue('event', array('uid' => isset($_SESSION['uid']) ? $_SESSION['uid'] : 0, 'cid' => users::getCid(), 'category' => 'Freelancer', 'action' => 'show_contacts', 'label' => "{'login': '******'}"));
            $objResponse->assign('contacts_info_block', 'innerHTML', $html);
        }
    }
    return $objResponse;
}
示例#2
0
?>

</tbody>
</table>	
</td>
<td style="width:19px">&nbsp;</td>
</tr>
</tbody>
</table>

<!-- NEW -->

<!-- NEW -->

<?php 
if (is_view_contacts($user->uid) || $_SESSION['uid'] && hasPermissions('users') && $_SESSION['uid'] != $user->uid && !(hasGroupPermissions('administrator', $user->uid) || hasGroupPermissions('moderator', $user->uid))) {
    if ($user->resume || $user->resume_file) {
        $edit_date = strtotime($user->resume_edit_date);
        if ($edit_date) {
            $alt = 'Отредактировано ' . date('d.m.Y в H.i', $edit_date);
            $pen_ico = strtotime('+7 days', $edit_date) > time() ? '/images/ico-e-a.png' : '/images/ico-e-o.png';
            $pen_html = '<img src="' . $pen_ico . '" alt="' . $alt . '" title="' . $alt . '" />';
        } else {
            $pen_html = false;
        }
        ?>
<table width="100%"  cellspacing="0" cellpadding="0" class="b-information-clause-title" 	>
<tr>
	<td  style="width:19px; height:20px" class="brdtop">&nbsp;</td>
	<td class="brdtop">Резюме&nbsp;&nbsp;<?php 
        echo $pen_html;
示例#3
0
}
$r_data = $rating->data;
//$samerank = rating::CountByRank($r_data['rank']);
$banblog = $user->GetBan($user->uid, 1);
if ($user->birthday && $user->birthday > "1910-01-01") {
    $user_ago = ElapsedYears(strtotime($user->birthday));
}
$info_for_reg = @unserialize($user->info_for_reg);
$team = new teams();
// срок окончания ПРО - только для админов
if (hasPermissions('users') && $user->is_pro === 't') {
    $proLast = payed::ProLast($user->login);
    $proDate = date('d-m-Y в h:i', strtotime($proLast['cnt']));
}
$access_favorite = $_SESSION['login'] && $user->login != $_SESSION['login'];
$access_contacts = ($user->isCurrent() || is_view_contacts($user->uid) || hasPermissions('users')) && is_contacts_not_empty($user);
$show_contacts_col = $access_favorite || $access_contacts;
$is_allow_messages = true;
if ($uid > 0 && !is_emp() && is_emp($user->role)) {
    require_once ABS_PATH . "/classes/messages.php";
    $is_allow_messages = messages::isAllowed($user->uid, $uid);
}
?>





<div class="b-layout__txt b-layout__txt_fontsize_15 b-layout__txt_bold b-layout__txt_padbot_10 b-layout__txt_lineheight_1 b-layout__txt_color_6db335 b-page__ipad b-page__iphone"><?php 
if ($session->view_online_status($user->login)) {
    ?>
示例#4
0
 /**
  * Возвращает часть ответа с информацией о пользователе
  * 
  * @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;
 }