本文整理汇总了PHP中payed::IsUserWasPro方法的典型用法代码示例。如果您正苦于以下问题:PHP payed::IsUserWasPro方法的具体用法?PHP payed::IsUserWasPro怎么用?PHP payed::IsUserWasPro使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类payed
的用法示例。
在下文中一共展示了payed::IsUserWasPro方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: IsUserWasPro
public function IsUserWasPro($status = self::STATUS_RESERVE)
{
$use_reserve_pro = $this->search(self::$frl_default_service['pro'], $status);
return payed::IsUserWasPro($this->user['uid']) || !empty($use_reserve_pro);
}
示例2: elseif
$teasers = $teasersEmp;
} else {
$teasers = $teasersFrl;
}
} else {
$teasers = $teasersEmp;
}
// для про пользователей не показвыаем рекламу ПРО аккаунта
if (is_pro()) {
if ($_SESSION['pro_test'] === 'f') {
// тизер ПРО показываем если куплен тестовый ПРО
$teasersExclude[] = 'pro';
}
$teasersExclude[] = 'test-pro';
$teasersExclude[] = 'offers';
} elseif (!payed::IsUserWasPro($uid)) {
$teasersExclude[] = 'test-pro';
}
// формируем массив из прошедших фильтрацию тизеров
foreach ($teasers as $key => $teaser) {
$ok = true;
foreach ($teaser['exclude'] as $filter) {
if (isset($teasersExclude) && in_array($filter, $teasersExclude)) {
$ok = false;
break;
}
}
if ($ok) {
$filteredTeasers[] = $teaser;
}
}
示例3: users
$_SESSION['payed_to'] = $_SESSION['pro_last']['cnt'];
}
$_SESSION['pro_last'] = $_SESSION['pro_last']['is_freezed'] ? false : $_SESSION['pro_last']['cnt'];
$userdata = new users();
$_SESSION['pro_test'] = $userdata->GetField($user_id, $error2, 'is_pro_test', false);
// цены на PRO
$prices = $prof->GetProPrice(true);
// текущая сумма оплаты
$cost = $prices[$oppro] * $mnth;
if ($ok) {
$account = new account();
$account->GetInfo($uid, true);
$payed_list = payed::getPayedPROList(is_emp() ? 'emp' : 'frl');
$is_not_enough = array('' => 'default');
foreach ($payed_list as $value) {
if ($value['is_test'] && payed::IsUserWasPro($uid)) {
continue;
}
$dcost = $value['cost'] - $account->sum;
if ($dcost <= 0) {
continue;
}
$is_not_enough[$value['opcode']] = $dcost;
}
payed::UpdateProUsers();
$result['success'] = true;
$result['opcode'] = $oppro;
$result['transaction'] = $account->start_transaction($uid, $tr_id);
$result['acc_sum'] = $account->sum;
$result['pro_last'] = date('d.m.Y', strtotime($is_freezed ? $_SESSION['payed_to'] : $_SESSION['pro_last']));
$result['date_max_limit'] = 'date_max_limit_' . date('Y_m_d', strtotime($is_freezed ? $_SESSION['payed_to'] : $_SESSION['pro_last']));