本文整理汇总了PHP中freelancer::GetUser方法的典型用法代码示例。如果您正苦于以下问题:PHP freelancer::GetUser方法的具体用法?PHP freelancer::GetUser怎么用?PHP freelancer::GetUser使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类freelancer
的用法示例。
在下文中一共展示了freelancer::GetUser方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: changeEmpRezType
function changeEmpRezType($frl_login, $rez_type)
{
$objResponse = new xajaxResponse();
$sbr = sbr_meta::getInstance();
if ($frl_login) {
$frl = new freelancer();
$frl->GetUser($frl_login);
if ($frl->uid) {
$frl_reqvs = sbr_meta::getUserReqvs($frl->uid);
}
}
$sbr->emp_reqvs = $sbr->getUserReqvs();
$sbr->emp_reqvs['rez_type'] = $rez_type;
$js_schemes = sbr_meta::jsSchemeTaxes($sbr->getSchemes(), $frl_reqvs, $sbr->emp_reqvs);
$objResponse->script("SBR.SCHEMES = {$js_schemes};");
$objResponse->call('SBR.changeEmpRezType', $rez_type, 1);
return $objResponse;
}
示例2: getContactsInfo
/**
* Вернуть контактные данные фрилансера если есть доступ их смотреть
*
* @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': '{$freelancer->login}'}"));
$objResponse->assign('contacts_info_block', 'innerHTML', $html);
}
}
return $objResponse;
}
示例3: intval
$page = intval(trim($_GET['page']));
$from = intval(trim($_GET['from']));
$from = 0;
//а нафига вообще тут это нужно?
if (!$page) {
$page = 1;
}
if ($login) {
// Ћичный блог пользовател¤
$login = pg_escape_string($login);
$user = new users();
$user->GetUser($login);
if ($user->uid && !$user->is_banned) {
if (!is_emp($user->role)) {
$user = new freelancer();
$user->GetUser($login);
$is_visible = substr($user->tabs, 3, 1);
} else {
$user = new employer();
$user->GetUser($login);
$is_visible = substr($user->tabs, 2, 1);
}
$user->GetUser($login);
if ($is_visible) {
$themes = $blog->GetMsgs($user->uid, $page, $num_msgs, $error, 1);
}
}
$rss_title = "Ћичные блоги на FL.ru ({$user->login})";
$rss_link = $host . "/rss/blogs.php?user={$user->login}";
$rss_description = "Ћичные блоги на сайте www.fl.ru ({$user->login})";
$gr_name = "Ћичные блоги";
示例4: actionNewPersonalOrder
/**
* Создание персонального заказа.
*/
public function actionNewPersonalOrder()
{
//@todo: на период разработки резерва заказов
if (!tservices_helper::isAllowOrderReserve()) {
$this->missingAction(null);
}
$login = __paramInit('string', 'user', 'user', null);
$freelancer = new freelancer();
$freelancer->GetUser($login);
if ($freelancer->uid <= 0) {
$this->missingAction(null);
}
$form = new NewOrderForm();
if (isset($_POST) && sizeof($_POST) > 0 && $form->isValid($_POST)) {
$data = $form->getValues();
$data['frl_id'] = $freelancer->uid;
$data['emp_id'] = $this->uid;
if ($order = $this->order_model->createPersonal($data)) {
$tservices_smail = new tservices_smail();
$tservices_smail->newOrder($order);
$this->redirect(sprintf(tservices_helper::url('order_card_url'), $order['id']));
}
}
//Выводим в сайдбар виджет индикатор статуса заказа
$this->getClips()->add('sidebar', $this->widget('OrderStatusIndicator', array(), true));
$this->render('new-order-form', array('title' => 'Новый заказ', 'submit_title' => 'Предложить заказ', 'cansel_url' => '/', 'form' => $form, 'freelancer' => $freelancer));
}
示例5: freelancer
<?php
require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/freelancer.php';
$user = new freelancer();
$user->GetUser($_SESSION['login']);
if (strtotime($_SESSION['pro_last']) > time() && $_SESSION['pro_test'] == 't') {
$is_pro_test = true;
} else {
$is_pro_test = false;
}
?>
<style>
.tarif {
color: #333333;
font-size: 13px;
}
</style>
<h1>Услуги</h1>
<?php
if ($profs) {
?>
<table width="100%" border="0" cellspacing="0" cellpadding="19">
<tr valign="top">
<td height="400" valign="top" bgcolor="#FFFFFF" class="box2" style="color: #333333;">
<div style="color: #000000; font-size: 35px; margin-bottom: 25px;">Предоставленные услуги</div>
<table width="290" border="0" cellspacing="0" cellpadding="0" style="background-image: url(/images/bg_pro.gif); background-repeat: no-repeat;">
<tr valign="top">
<td width="50" rowspan="2" style="height: 112; padding-top:35px; padding-left:8px;padding-right:3px;"><?php
echo view_avatar($user->login, $user->photo);
?>
</td>
示例6: freelancer
///////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////
$role = $user->role;
$rpath = '../';
// Статус присутсвия.
$online_status = $user->getOnlineStatus4Profile();
if (is_emp($role)) {
$fpath = 'employer/';
include $fpath . 'index.php';
exit;
}
require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/payed.php';
$is_pro = payed::CheckPro($user->login);
$no_banner = !!$is_pro;
$user = new freelancer();
$user->GetUser($name);
if (!$page && !$user->tabs[0] && $user->tabs[7]) {
$page = $_GET['p'] = 'tu';
} elseif (!$page && !$user->tabs[0] && (!$user->tabs[3] && !hasPermissions('users')) && !$user->tabs[5] && !$user->tabs[6]) {
$page = $_GET['p'] = 'opinions';
}
//------------------------------------------------------------------------------
// Проверяем блокировку ТУ в профиле за не погашенный долг в ЛС
require_once $_SERVER['DOCUMENT_ROOT'] . '/tu/models/TServiceOrderModel.php';
$hide_tu_for_others = FALSE;
$_debt_info = TServiceOrderModel::model()->isDebt($user->uid);
if ($_debt_info && $user->uid != $uid && $_debt_info['is_blocked'] == 't') {
$hide_tu_for_others = TRUE;
}
//------------------------------------------------------------------------------
$action = __paramInit('string', NULL, 'action');
示例7: rtrim
<?php
//ini_set('display_errors',1);
//error_reporting(E_ALL ^ E_NOTICE);
ini_set('max_execution_time', 0);
ini_set('memory_limit', '512M');
if (!isset($_SERVER['DOCUMENT_ROOT']) || !strlen($_SERVER['DOCUMENT_ROOT'])) {
$_SERVER['DOCUMENT_ROOT'] = rtrim(realpath(pathinfo(__FILE__, PATHINFO_DIRNAME) . '/../../'), '/');
}
require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/stdf.php';
require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/freelancer.php';
if (count($argv) > 1) {
parse_str(implode('&', array_slice($argv, 1)), $_GET);
}
$login = $_GET['login'];
$freelancer = new freelancer();
$freelancer->GetUser($login);
if ($freelancer->uid > 0) {
$DB->query("\n UPDATE projects_offers_answers SET\n last_offer = last_offer - interval '1 day'\n WHERE uid = ?i\n ", $freelancer->uid);
$data = $DB->row('SELECT * FROM projects_offers_answers WHERE uid = ?i', $freelancer->uid);
print_r($data);
} else {
print_r('Фрилансер не найден!');
}
exit;
示例8: header
// Публикация проектов доступна только для работодателя
header('Location: ' . $user_action);
exit;
}
//Проверка перехода с лендинга публикации проекта
if ($name = isLandingProject()) {
$tmpPrj->setProjectField('name', $name);
}
ref_uri();
//Сохраняем ref_uri страницы
$is_personal = false;
if ($exec || $project['exec_id']) {
$freelancer = new freelancer();
if ($exec) {
//Добавление проекта
$freelancer->GetUser($exec);
} else {
$freelancer->GetUserByUID($project['exec_id']);
}
if ($freelancer->uid && ($project['kind'] == projects::KIND_PERSONAL || $kind == projects::KIND_PERSONAL)) {
$is_personal = true;
}
}
if (!$kind) {
$kind = $project['kind'];
}
//#0026326
//Лимит на кол-во публикаций проектов для неPRO за 24 часа
if ($kind == 1 && !$proj_id && ($last_prj_date = $tmpPrj->isProjectsLimit($uid))) {
//и есть лимит
$last_prj_date = ago_pub($last_prj_date, 'G:i');
示例9: actionPersonalOrder
/**
* Создание персонального заказа
*/
public function actionPersonalOrder()
{
$login = __paramInit('string', 'user', 'user', NULL);
$freelancer = new freelancer();
$freelancer->GetUser($login);
if ($freelancer->uid <= 0) {
$this->missingAction(NULL);
}
$subform = new GuestNewOrderForm();
$subform->freelancer = $freelancer;
$form = new NewDataForm($subform);
if (isset($_POST) && sizeof($_POST) > 0 && $form->isValid($_POST)) {
$userValidator = $form->getElement('email')->getValidator('NoUserExists');
$user = $userValidator->getUser();
$data = $form->getValues();
$data['user_id'] = $user->uid;
$data['type'] = GuestConst::TYPE_PERSONAL_ORDER;
$data['dataForm']['frl_id'] = intval($freelancer->uid);
$code = GuestActivationModel::model()->newActivation($data);
if ($code) {
$guestSmail = new GuestSmail();
$guestSmail->sendActivation($data['email'], $code, $user, $data['type']);
require_once $_SERVER['DOCUMENT_ROOT'] . "/classes/Helpers/PopupAfterPageLoaded.php";
PopupAfterPageLoaded::getInstance()->showAfterLoad(GuestConst::getMessage($user->uid > 0 ? GuestConst::MSG_AL_EXIST : GuestConst::MSG_AL, $data['type']));
$ref_uri = empty($_SESSION['ref_uri']) ? sprintf('/users/%s/', $freelancer->login) : urldecode($_SESSION['ref_uri']);
$this->redirect($ref_uri);
}
}
//Выводим в сайдбар виджет индикатор статуса заказа
require_once $_SERVER['DOCUMENT_ROOT'] . '/tu/widgets/OrderStatusIndicator.php';
$this->getClips()->add('sidebar', $this->widget('OrderStatusIndicator', array(), TRUE));
$this->render('index', array('title' => 'Новый заказ', 'form' => $form->render()));
}
示例10: getInstance
/**
* Выдает объект sbr в зависимости от роли пользователя и запрошенной страницы.
* Админ может выступать от роли фрилансера/работодателя чужой сделки, админа или обычного участника сделки.
*
* @return object экземпляр класса sbr_emp|sbr_frl|sbr_adm.
*/
static function getInstance($access = NULL, $U = NULL, $is_emp = NULL)
{
$req =& $_REQUEST;
$sess =& $_SESSION;
$site = $req['site'];
$sbr = NULL;
if (!$sess['uid'] && !$U) {
return NULL;
}
if (($is_adm = hasPermissions('sbr', $sess['uid'])) || hasPermissions('sbr_finance', $sess['uid'])) {
if (isset($req['access'])) {
if ($req['access'] == self::USER_ACCESS) {
unset($sess['F']);
unset($sess['E']);
unset($sess['access']);
} else {
$sess['access'] = $req['access'];
if ($req['F']) {
$sess['F'] = $req['F'];
unset($sess['E']);
} else {
if ($req['E']) {
$sess['E'] = $req['E'];
unset($sess['F']);
} else {
unset($sess['F']);
unset($sess['E']);
}
}
}
}
if (!$access) {
$access = $sess['access'];
}
}
if (hasPermissions('sbr_finance', $sess['uid'])) {
$is_adm_sbr = true;
}
if ($is_adm && $site == 'admin') {
// доступ А.
$sbr = new sbr_adm($sess['uid'], $sess['login']);
} else {
if ($is_adm_sbr && $site == 'admin') {
$sbr = new sbr_adm_finance($sess['uid'], $sess['login']);
} else {
if ($access == self::ADMIN_ACCESS) {
if ($U && $is_emp !== NULL) {
if ($is_emp) {
$E = $U;
} else {
$F = $U;
}
} else {
$E = $sess['E'];
$F = $sess['F'];
}
if ($E) {
$cls = 'sbr_emp';
if ($E instanceof users) {
$u = $E;
} else {
$u = new employer();
$u->GetUser($E);
}
} else {
if ($F) {
$cls = 'sbr_frl';
if ($F instanceof users) {
$u = $F;
} else {
$u = new freelancer();
$u->GetUser($F);
}
}
}
if ($u && !$err) {
// отдаем доступ Ф или Р.
$sbr = new $cls($u->uid, $u->login, $sess['uid']);
}
}
}
}
if (!$sbr && $sess['uid']) {
$cls = $access == self::ADMIN_ACCESS && $is_adm ? 'sbr_adm' : ($access == self::ADMIN_ACCESS && $is_adm_sbr ? 'sbr_adm_finance' : (is_emp($sess['role']) ? 'sbr_emp' : 'sbr_frl'));
$sbr = new $cls($sess['uid'], $sess['login']);
}
return $sbr;
}