Example #1
0
        } else {
            echo 'не указан';
        }
    }
    ?>
                </td>
				<td>&nbsp;</td>
			</tr>
			<?php 
}
?>
                        
			<tr>
				<th>На сайте:</th>
				<td><?php 
echo ElapsedMnths(strtotime($user->reg_date));
?>
</td>
				<td></td>
			</tr>
			<tr>
				<th>Дата регистрации:</th>
				<td><?php 
echo date('d.m.Y', strtotime($user->reg_date));
?>
</td>
				<td></td>
			</tr>
			<?php 
if ($user->country) {
    ?>
Example #2
0
            ?>
                        <h4><a href="/users/<?php 
            echo $dContent['login'];
            ?>
/"><?php 
            echo $dContent['uname'] . " " . $dContent['usurname'] . " [{$dContent['login']}]";
            ?>
</a><?php 
            echo view_mark_user(array('login' => $dContent['login'], 'is_pro' => true, 'role' => $dContent['role'], 'is_team' => $dContent['is_team']));
            ?>
                        &#160;<?php 
            echo $dContent['completed_sbr_cnt'] ? view_sbr_shield() : '';
            ?>
</h4>
                        <p>На сайте: <?php 
            echo ElapsedMnths(strtotime($dContent['reg_date']));
            ?>
</p>
                        <p>
                        <?php 
            if (!$info_for_reg['country'] || get_uid(false)) {
                if (intval($dContent['country']) != 0) {
                    print country::GetCountryName($dContent['country']);
                    if ($dContent['city'] && !$info_for_reg['city'] || get_uid(false)) {
                        if (intval($dContent['city']) != 0) {
                            print ", " . city::GetCityName($dContent['city']);
                        }
                    }
                }
            }
            //else
Example #3
0
echo date('d.m.Y в H:i', strtotime($data['created_time']));
?>
        </div>
        <div class="b-post__avatar b-post__avatar_margright_10"> <a href="/users/<?php 
echo $data['author_login'];
?>
" class="b-post__link"><?php 
echo view_avatar_info($data['author_login'], $data['author_photo'], 1);
?>
</a> </div>
        <div class="b-post__content b-post__content_margleft_60">
            <div class="b-username b-username_bold b-username_padbot_10"> <?php 
echo view_user3($author_user);
?>
 <span class="b-layout__txt b-layout__txt_fontsize_11 b-layout__txt_weight_normal b-layout__txt_lowercase b-layout__txt_padright_10">на сайте <?php 
echo ElapsedMnths(strtotime($data['author_reg_date']));
?>
</span></div>
            <?php 
if ($this->enableRating && $data['deleted'] === NULL && $author_user['is_team'] != 't') {
    $rating_class = $msg['rating'] < 0 ? 'b-voting__mid_color_red' : ($msg['rating'] >= 1 ? 'b-voting__mid_color_green' : '');
    ?>
            <div class="b-voting b-voting_float_right" id="rate_<?php 
    echo $data['id'];
    ?>
"> 
                <?php 
    if ($data['author'] == get_uid(false) || $this->_options['readonly'] || $this->_options['deny_vote']) {
        ?>
                    <a href="javascript:void(0)" class="b-button b-button_poll_plus b-button_poll_nopointer b-button_disabled b-voiting__right"></a> 
                    <a href="javascript:void(0)" class="b-button b-button_poll_minus b-button_poll_nopointer b-button_disabled b-voiting__left"></a>
Example #4
0
        ?>
)</span>
                      <?php 
    }
    ?>
                  <?php 
}
//else
?>
    
              
              <?php 
$user = new users();
$user->GetUser($user->GetField($project['user_id'], $ee, 'login'));
setlocale(LC_ALL, 'ru_RU.CP1251');
$registered = strtolower(ElapsedMnths(strtotime($project['reg_date'])));
setlocale(LC_ALL, 'en_US.UTF-8');
?>
          <?php 
/*<?=$user->getOnlineStatus4Profile()?> */
?>
              <?php 
if (hasPermissions('projects') && ($project['ico_payed'] == 't' || $project['is_upped'] == 't')) {
    ?>
              <b class="pay-prj">Внимание! Это платный проект!</b>
              <?php 
}
//if
?>
          </div>
Example #5
0
 /**
  * Обрабатываем данные для ввывода информации по шагу 
  */
 public function actionProjects()
 {
     require_once $_SERVER['DOCUMENT_ROOT'] . "/classes/projects.php";
     require_once $_SERVER['DOCUMENT_ROOT'] . "/classes/professions.php";
     $prj_id = __paramInit('int', 'project', null, 0);
     if ($prj_id > 0) {
         $obj_project = new projects();
         $project = $obj_project->GetPrjCust($prj_id);
     }
     if ($project['id'] > 0) {
         require_once $_SERVER['DOCUMENT_ROOT'] . "/classes/users.php";
         require_once $_SERVER['DOCUMENT_ROOT'] . "/classes/opinions.php";
         // Загружаем данные по отзывам автора проекта
         $op_data = opinions::getCounts($project['user_id'], array('frl', 'norisk', 'all', 'total'));
         //$op_data['norisk']['a'] = ( (int)$op_data['norisk']['p'] + (int)$op_data['norisk']['n'] + (int)$op_data['norisk']['m'] );
         //$op_data['all']['a']    = ( (int)$op_data['all']['p']    + (int)$op_data['all']['n']    + (int)$op_data['all']['m'] );
         $op_data['total']['a'] = (int) $op_data['total']['p'] + (int) $op_data['total']['n'] + (int) $op_data['total']['m'];
         $user = new users();
         $user->GetUserByUID($project['user_id']);
         $registered = strtolower(ElapsedMnths(strtotime($project['reg_date'])));
         $is_offer = $this->isOfferProject($project['id']);
         $count_offer = $this->countOffers();
         $count_pay_offer = $this->countPayOffers();
         // Максимальное количество ответов для пользователя
         $max_offers = 3 + $count_pay_offer;
         // Обработка запросов на странице
         $action = __paramInit('string', null, 'action');
         if ($action && ($count_offer < $max_offers || $project['kind'] == 7 || $action == 'paid_offer')) {
             $error = $this->actionProcessingProjects($action, $project);
         }
         include $_SERVER['DOCUMENT_ROOT'] . "/wizard/registration/steps/tpl.step.answer.php";
     } else {
         $filter = array();
         $category = $_COOKIE[$this->parent->getCookieName('categories')];
         $subcategory = $_COOKIE[$this->parent->getCookieName('subcategories')];
         if ($category > 0) {
             $cat[] = professions::GetGroupName($category);
             $filter['active'] = 't';
             $filter['my_specs'] = 'f';
             $filter['categories'][0] = array($category => '0');
             if ($subcategory > 0) {
                 $cat[] = professions::GetProfName($subcategory);
                 unset($filter['categories'][0]);
                 $filter['categories'][1] = array($subcategory => '1');
             }
             $category_name = implode(": ", $cat);
         }
         $obj_project = new new_projects();
         $obj_project->page_size = step_freelancer::DEF_PROJECTS_PER_PAGE;
         $projects = $obj_project->getProjects($count, -1, 1, false, $filter, true, false, NULL, true);
         include $_SERVER['DOCUMENT_ROOT'] . "/wizard/registration/steps/tpl.step.search.php";
     }
 }
Example #6
0
/**
 * Дублирует view_avatar, только в ALT аватара добавляется специализация и время пребывания на сайте
 * 
 * @see view_avatar();
 * @see ElapsedMnths(strtotime($user->reg_date))
 * @see professions::GetProfName($user->spec)
 *
 * @param string  			$user    		Логин пользователя 
 * @param string  			$file			Имя файла аватарки
 * @param integer 			$size			Вид аватарки (1 - мелкая, 0 - большая)
 * @param integer|string 	$spec			Специализация, если 0 - то информация не выводится
 * @param integer|string 	$reg_date		Дата регистрации, если 0 - то информация не выводится 
 * @param string                $class                  Класс для тега img
 * @return string HTML code
 */
function view_avatar_info($user, $file, $size = 1, $spec = 0, $reg_date = 0, $class = false)
{
    if ($spec) {
        $alt_info = "Специализация: " . htmlspecialchars($spec, ENT_QUOTES, 'cp1251');
    }
    if ($reg_date) {
        if ($alt_info) {
            $alt_info .= ", на сайте " . ElapsedMnths(strtotime($reg_date));
        } else {
            $alt_info .= "На сайте " . ElapsedMnths(strtotime($reg_date));
        }
    }
    if ($class === false) {
        $class = "b-post__userpic";
    }
    if ($size) {
        if ($file) {
            return "<img src=\"" . WDCPREFIX . "/users/{$user}/foto/sm_{$file}\" alt=\"{$alt_info}\" title=\"{$alt_info}\" width=\"50\" height=\"50\" class=\"{$class}\" />";
        } else {
            return "<img src=\"/images/user-default-small.png\" alt=\"{$alt_info}\" title=\"{$alt_info}\" width=\"50\" height=\"50\" class=\"{$class}\" />";
        }
    } else {
        if ($file) {
            return "<img src=\"" . WDCPREFIX . "/users/{$user}/foto/{$file}\" alt=\"{$alt_info}\" title=\"{$alt_info}\" width=\"100\" height=\"100\" />";
        } else {
            return "<img src=\"/images/no_foto_b.png\" alt=\"{$alt_info}\" title=\"{$alt_info}\" width=\"100\" height=\"100\" />";
        }
    }
}
Example #7
0
    /**
     * Генерирует информацию про юзера, по его данным, в HTML-код для страницы отзывов (сдвоенный вывод)
     *
     * @global $session Сессия пользователя
     *
     * @param array   $user				Информация о юзере
     * @return string HTML-код
     */
    public static function printUserInfoMy($user, $direction = 'from')
    {
        global $session;
        $u_obj = $user;
        if (is_object($user)) {
            $user = get_object_vars($user);
        }
        $is_emp = is_emp($user['role']);
        $login = $user['login'];
        $uname = ucfirst($user['uname']);
        $usurname = ucfirst($user['usurname']);
        $photo = $user['photo'];
        $dir = $user['login'];
        $on_site = "";
        if (hasPermissions('users')) {
            $on_site = "На сайте " . ElapsedMnths(strtotime($user['reg_date']));
            $on_site = "<i>{$on_site}</i>";
        }
        if (!in_array($direction, array('from', 'to'))) {
            $direction = 'from';
        }
        $template = '<div class="ops-$direction">
		<a href="$href" class="$role-name">
                   <img src="$img" alt="" width="25" height="25" class="sav" />
		</a>$user_name ' . $on_site . '
	</div>';
        $role = $is_emp ? 'employer' : 'freelancer';
        $img = view_avatar($user['login'], $photo, 0, 0);
        if (!preg_match("/src\\=(\\'|\")([^\\'\"]+)(\\'|\")/i", $img, $res)) {
            $img = '/images/icons/f-pro.png';
        } else {
            $img = $res[2];
        }
        $href = "/users/{$login}/";
        $user_name = __prntUsrInfo($u_obj);
        // "{$uname} {$usurname} [{$login}]";
        $html = strtr($template, array('$direction' => $direction, '$role' => $role, '$img' => $img, '$href' => $href, '$user_name' => $user_name));
        return $html;
    }
Example #8
0
                <?php 
}
$user_data = commune::GetUserCommuneRel($top['commune_id'], $top['user_id']);
if ($is_moder) {
    if ($top['member_is_banned'] || $top['user_is_banned'] || $user_data['is_banned']) {
        ?>
                        <p><strong style="background: #F2A5A5; paddong: 4px">Пользователь забанен<?php 
        echo $user_data['is_banned'] ? ' в сообществе' : '';
        ?>
</strong></p>
                    <?php 
    }
}
?>
                <span class="b-layout__txt b-layout__txt_fontsize_11 b-layout__txt_weight_normal b-layout__txt_lowercase b-layout__txt_padright_10">на сайте <?php 
echo ElapsedMnths(strtotime($top['reg_date']));
?>
</span>
                <?php 
//= seo_end(false, $ajax_view);
?>
            </div>
            <div id="topicRate_<?php 
echo $top['id'];
?>
">
                <?php 
echo __commPrntTopicRating($top, $mod);
?>
            </div>
<?php 
Example #9
0
					<div class="b-freelancer__txt b-freelancer__txt_fontsize_11 b-freelancer__txt_padbot_5">
						<div class="b-freelancer__txt b-freelancer__txt_valign_top b-freelancer__txt_inline-block b-freelancer__txt_width_120 b-freelancer__txt_bordbot_dot_e5"> <span class="b-freelancer__txt b-freelancer__txt_top_3 b-freelancer__txt_bg_fff">Специализация</span> </div>
						<div class="b-freelancer__txt b-freelancer__txt_inline-block b-freelancer__txt_width_320 b-freelancer__txt_top_3">
						<?php 
    projects::getSpecsStr($offer['id'], ' / ', ', ');
    ?>
						<?php 
    echo $offer['cat_name'];
    echo $offer['profname'] != "Нет специализации" ? " &rarr; <a class='b-freelancer__link' href='/freelancers/{$offer['link']}/'>{$offer['profname']}</a>" : "";
    ?>
</div>
					</div>
					<div class="b-freelancer__txt b-freelancer__txt_fontsize_11 b-freelancer__txt_padbot_5">
						<div class="b-freelancer__txt b-freelancer__txt_valign_top b-freelancer__txt_inline-block b-freelancer__txt_width_120 b-freelancer__txt_bordbot_dot_e5"> <span class="b-freelancer__txt b-freelancer__txt_top_3 b-freelancer__txt_bg_fff">На сайте</span> </div>
						<div class="b-freelancer__txt b-freelancer__txt_inline-block b-freelancer__txt_width_320 b-freelancer__txt_top_3"><?php 
    echo ElapsedMnths(strtotime($offer['reg_date']));
    ?>
</div>
					</div>
					<?php 
    if ($offer['country'] && !($info_for_reg['country'] && !get_uid(false))) {
        ?>
					<div class="b-freelancer__txt b-freelancer__txt_fontsize_11 b-freelancer__txt_padbot_5">
						<div class="b-freelancer__txt b-freelancer__txt_valign_top b-freelancer__txt_inline-block b-freelancer__txt_width_120 b-freelancer__txt_bordbot_dot_e5"> <span class="b-freelancer__txt b-freelancer__txt_top_3 b-freelancer__txt_bg_fff">Местонахождение</span> </div>
						<div class="b-freelancer__txt b-freelancer__txt_inline-block b-freelancer__txt_width_320 b-freelancer__txt_top_3"><?php 
        echo country::GetCountryName($offer['country']);
        if ($offer['city'] && !($info_for_reg['city'] && !get_uid(false))) {
            print ", " . city::GetCityName($offer['city']);
        }
        ?>
</div>
Example #10
0
</a>]</font>
                        <?php 
} else {
    ?>
                        <?php 
    echo $session->view_online_status($project['login']);
    ?>
 Автор: <?php 
    if ($project['is_pro'] == 't') {
        echo is_emp($project['role']) ? view_pro_emp() : view_pro();
    }
    ?>
                        <?php 
    $emp_user = new users();
    $emp_user->GetUser($project['login']);
    echo "на сайте " . ElapsedMnths(strtotime($emp_user->reg_date)) . ", ";
    echo "<span class=\"r_positive\">+&nbsp;" . (int) $emp_user->ops_plus . "</span>&nbsp;/&nbsp;<span class=\"r_neutral\">" . (int) $emp_user->ops_null . "</span>&nbsp;/&nbsp;<span class=\"r_negative\">-&nbsp;" . (int) $emp_user->ops_minus . "</span>, ";
    require_once $_SERVER['DOCUMENT_ROOT'] . "/classes/sbr.php";
    $sbr_info = sbr_meta::getUserInfo($emp_user->uid);
    echo (int) $sbr_info['completed_cnt'] . " СБР";
    ?>
                        <?php 
}
?>
          <?php 
echo dateFormat("[d.m.Y | H:i]", $project['create_date']);
?>
          <?php 
echo $project['edit_date'] ? dateFormat("[внесены изменения: d.m.Y | H:i]", $project['edit_date']) : "";
?>
          <?php