本文整理汇总了PHP中freelancer::UpdateSubscr方法的典型用法代码示例。如果您正苦于以下问题:PHP freelancer::UpdateSubscr方法的具体用法?PHP freelancer::UpdateSubscr怎么用?PHP freelancer::UpdateSubscr使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类freelancer
的用法示例。
在下文中一共展示了freelancer::UpdateSubscr方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: actionRegistration
//.........这里部分代码省略.........
}
}
$newuser->login = substr($this->login, 0, 15);
$newuser->email = substr($this->email, 0, 64);
$newuser->passwd = substr($this->password, 0, 24);
$newuser->subscr = '1111111' . (int) $this->subscr_news . '11111111';
$newuser->uid = $newuser->Create($rerror, $error);
if ($newuser->uid && !$error) {
$ok = $this->completedRegistration($newuser);
if ($ok) {
//require_once $_SERVER['DOCUMENT_ROOT']."/classes/sms_gate.php";
//$phone = '+' . preg_replace("#^\+#", "", $_SESSION["reg_phone"]);
unset($_SESSION["regform_captcha_entered"]);
unset($_SESSION["login_generated"]);
$tu_ref_uri = @$_SESSION['tu_ref_uri'];
//unset($_SESSION["reg_phone"]);
//unset($_SESSION['send_sms_time']);
//sms_gate::saveSmsInfo($phone, $_SESSION["reg_sms_isnn"], $_SESSION["smsCode"], $_SESION["reg_sms_date_send"], $newuser->uid);
$_SESSION['email'] = $newuser->email;
$_SESSION['rrole'] = $this->role;
// Если пришли сюда регистрироватся то после нажатия кнопки регистрации удаляем куки регистрации иначе после активации нас перекинет на мастер
$wizard = new wizard();
$wizard->clearCookiesById($newuser->role == 1 ? 1 : 2);
// В зависимоти от того кого регистрируем
// На всякий случай при новой регистрации удаляем переменную проверки
self::resetCheckAccess();
$_user_action = isset($_REQUEST['user_action']) && $_REQUEST['user_action'] ? substr(htmlspecialchars($_REQUEST['user_action']), 0, 25) : '';
$_user_action = trim($_user_action);
login($newuser->login, users::hashPasswd(trim(stripslashes($newuser->passwd))), 1, false);
if (is_emp($newuser->role)) {
$_SESSION['reg_role'] = 'Employer';
$ref_uri = isset($_SESSION['ref_uri'], $_SESSION['was_customer_wizard']) ? urldecode($_SESSION['ref_uri']) : null;
unset($_SESSION['was_customer_wizard']);
$redirect_to = $ref_uri ? $ref_uri : '/public/?step=1&kind=1';
//По умолчанию, при регистрации заказчика, перенаправляем его на публикацию проекта
if (strpos($_user_action, 'project_to_')) {
$login = str_replace('add_project_to_', '', $_user_action);
$redirect_to = '/public/?step=1&kind=9&exec=' . $login;
}
$redirect = __paramInit('link', NULL, 'redirect');
if ($redirect && !$ref_uri) {
$redirect_to = urldecode($redirect);
}
} else {
$_SESSION['reg_role'] = 'Freelancer';
$redirect_to = $redirect_to = "/registration/profession.php" . (!empty($user_action) ? "?user_action={$user_action}" : '');
//Очищаем чтобы далее небыло редиректа
//@todo: согласно https://beta.free-lance.ru/mantis/view.php?id=28862
$_user_action = '';
}
switch ($_user_action) {
case 'tu':
if ($tu_ref_uri) {
$redirect_to = HTTP_PFX . $_SERVER["HTTP_HOST"] . urldecode($tu_ref_uri);
}
break;
case 'new_tu':
if (!is_emp($newuser->role)) {
$redirect_to = HTTP_PFX . $_SERVER["HTTP_HOST"] . '/users/' . $newuser->login . '/tu/new/';
} else {
$redirect_to = HTTP_PFX . $_SERVER["HTTP_HOST"] . '/tu/';
}
break;
case 'promo_verification':
$redirect_to = '/promo/verification/';
break;
case 'buypro':
if (is_emp($newuser->role)) {
$redirect_to = '/payed-emp/';
} else {
$redirect_to = '/payed/';
}
break;
case 'add_order':
$url = __paramInit('link', NULL, 'redirect');
$redirect_to = HTTP_PFX . $_SERVER["HTTP_HOST"] . urldecode($url);
break;
}
if (!is_emp($newuser->role)) {
$_SESSION['activate_password'] = $newuser->passwd;
$_SESSION['subscr_news'] = (int) $this->subscr_news;
//Создаем новый экземпляр, т.к. нужно обновить только подписки
//Отписываем от всего, кроме личных сообщений
$freelancer = new freelancer();
$freelancer->UpdateSubscr($newuser->uid, 1, array(), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, false, 0);
}
//Обработать действия по событию успешной регистрации
$this->afterSuccessRegistation($newuser);
if ($is_preset) {
return array('success' => true, 'user_id' => $newuser->uid, 'redirect' => $redirect_to);
} else {
header("Location: " . $redirect_to);
exit;
}
}
}
} else {
return $this->error;
}
}
示例2: commune
}
}
// сообщества
$comm = !empty($_POST['comm']) ? array_map('intvalPgSql', $_POST['comm']) : false;
require_once $_SERVER['DOCUMENT_ROOT'] . "/classes/commune.php";
if (!empty($_POST['commune_topics'])) {
$cm = new commune();
$cm->clearSubscription($uid);
$cm->setCommunesSubscription($comm, $uid, true);
} else {
$cm = new commune();
$cm->clearSubscription($uid);
}
// сообщества
$frl = new freelancer();
$error .= $frl->UpdateSubscr($uid, $newmsgs, $vacan, $comments, $opin, $prcomments, $commune_subscr, $commune_top_subscr, __paramInit('bool', NULL, 'adm_subscr'), __paramInit('bool', NULL, 'contest'), __paramInit('bool', NULL, 'team'), 0, $articlescomments, $massending, 0, $daily_news, __paramInit('bool', NULL, 'vacan'), __paramInit('bool', NULL, 'payment'));
if (!$error) {
$membuff = new memBuff();
$membuff->flushGroup('massending_calc');
$info_msg = "Изменения внесены";
}
break;
case "inform_change":
foreach ($_POST as $key => $value) {
if (!is_array($value)) {
$_POST[$key] = stripslashes($value);
}
}
$frl = new freelancer();
if (($datey = trim($_POST['datey'])) && ($dated = trim($_POST['dated']))) {
if (!is_numeric($datey) || !is_numeric($dated) || !checkdate(intval(trim($_POST['datem'])), intval($dated), intval($datey))) {