本文整理汇总了PHP中professions::getLastModifiedSpec方法的典型用法代码示例。如果您正苦于以下问题:PHP professions::getLastModifiedSpec方法的具体用法?PHP professions::getLastModifiedSpec怎么用?PHP professions::getLastModifiedSpec使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类professions
的用法示例。
在下文中一共展示了professions::getLastModifiedSpec方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: count
<div class="b-pager">
<ul class="b-pager__list">
<li class="b-pager__item">
<a class="b-pager__link" href="/projects/">Все проекты</a>
</li>
</ul>
</div>
</div>
<?php
}
//Выходим, далее шаблон не выводим
return;
}
//$is_send_offers = projects_offers::offerSpecIsAllowed($project['id']);
if (!is_pro()) {
$spec_modified = professions::getLastModifiedSpec($_SESSION['uid']);
}
$count_hidden_offers = 0;
?>
<a name="offers"></a>
<?php
$notHiddenOffersCount = count($offers) + (int) $user_offer_exist;
// сколько ответов будет показано
$count_hidden_offers = $real_offers_count - $notHiddenOffersCount;
?>
<?php
示例2: setlocale
exit;
}
require_once $_SERVER['DOCUMENT_ROOT'] . "/classes/professions.php";
require_once $_SERVER['DOCUMENT_ROOT'] . "/classes/portfolio.php";
require_once $_SERVER['DOCUMENT_ROOT'] . "/classes/kwords.php";
setlocale(LC_ALL, 'ru_RU.CP1251');
$portf = new portfolio();
$prjs = $portf->GetPortf($user->uid, 'NULL', true);
$prfs = new professions();
$profs = $prfs->GetAllProfessionsPortfWithoutMirrored($user->uid, "AND t.user_id IS NOT NULL");
$is_not_spec = sizeof($profs) <= 0;
$first_profs = current($profs);
$html_keyword_js = '<a href="/freelancers/?word=$1" class="inherit">$2</a>';
$html_keyword = preg_replace('/\\$\\d/', '%s', $html_keyword_js);
if ($user->uid == $_SESSION['uid']) {
$spec_modified = professions::getLastModifiedSpec($user->uid);
}
?>
<?php
if ((int) $user->spec == 0 && $user->uid == $_SESSION['uid']) {
?>
<div class="b-fon b-fon_pad_20">
<div class="b-fon__body b-fon__body_pad_10 b-fon__body_padleft_30 b-fon__body_fontsize_13 b-fon__body_bg_ffeeeb">
<span class="b-icon b-icon_sbr_rattent b-icon_margleft_-25"></span><a class="b-layout__link" href="/users/<?php
echo $user->login;
?>
/setup/specsetup/">Выберите специализацию</a>. Это небходимо, чтобы попасть в каталог фрилансеров, в котором вас найдут заказчики
</div>
</div>
<?php
示例3: actionSaveInfoMobile
/**
* Заполнение обязательных полей после регистрации через API мобильного приложения.
*
* @param array $aParams массив входящих данных
* @return bool true - успех, false - провал
*/
public function actionSaveInfoMobile($aParams = array())
{
$this->setFieldInfo('uname', __paramValue('string', iconv('utf-8', 'cp1251', $aParams['first_name'])));
$this->setFieldInfo('usurname', __paramValue('string', iconv('utf-8', 'cp1251', $aParams['last_name'])));
$this->setFieldInfo('birthday', __paramValue('string', $aParams['birthday']));
$this->setFieldInfo('country', __paramValue('int', $aParams['country_id']));
$this->setFieldInfo('city', __paramValue('int', $aParams['city_id']));
$this->setFieldInfo('info_for_reg', array('birthday' => 0, 'sex' => 0, 'country' => 0, 'city' => 0));
$gender = __paramValue('int', $aParams['gender']);
$this->setFieldInfo('sex', $gender == 1 ? 't' : ($gender == 2 ? 'f' : NULL));
$this->checkedFields();
if (date('Y-m-d', strtotime($aParams['birthday'])) != $aParams['birthday']) {
$this->error['birthday'] = 'Укажите некорректную дату дня рождения';
$this->errno['birthday'] = 2;
}
if (empty($this->error)) {
if (!is_emp()) {
require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/freelancer.php';
$user = new freelancer();
} else {
require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/employer.php';
$user = new employer();
}
$user->info_for_reg = serialize($this->info_for_reg);
$user->uname = $this->uname;
$user->usurname = $this->usurname;
$user->sex = $this->sex;
$user->birthday = $this->birthday;
$user->country = $this->country;
$user->city = $this->city;
if (!is_emp()) {
$spec = intvalPgSql($aParams['prof_id']);
if ($spec) {
require_once $_SERVER['DOCUMENT_ROOT'] . "/classes/professions.php";
$or_spec = professions::GetProfessionOrigin($spec);
$spec_mod = professions::getLastModifiedSpec($_SESSION['uid']);
if (!is_pro() && $spec_mod['days'] > 0) {
$this->error['spec'] = 'Не прошло 30 дней с момента последней смены специализации';
$this->errno['spec'] = 2;
} else {
$user->spec = $spec;
$user->spec_orig = $or_spec;
professions::setLastModifiedSpec($_SESSION['uid'], $spec);
}
} else {
$this->error['spec'] = 'Не указан параметр ID профессии';
$this->errno['spec'] = 1;
}
}
if (empty($this->error)) {
if ($sError = $user->Update($_SESSION['uid'], $res)) {
$this->error['save'] = $sError;
} else {
if (!is_emp()) {
$_SESSION['specs'] = $user->GetAllSpecs($_SESSION['uid']);
}
}
}
if (empty($this->error['save'])) {
$_SESSION['check_user_access'] = true;
}
}
return empty($this->error);
}