本文整理汇总了PHP中is_release函数的典型用法代码示例。如果您正苦于以下问题:PHP is_release函数的具体用法?PHP is_release怎么用?PHP is_release使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了is_release函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: is_release
<tbody>
<tr class="b-layout__tr">
<td class="b-layout__td b-layout__td_padright_20">
<div class="b-fon b-fon_bg_fff9bf b-fon_pad_10 b-fon_padleft_35">
<div class="b-layout__txt b-layout__txt_fontsize_11 b-layout__txt_bold"><span class="b-icon b-icon_sbr_oattent b-icon_margleft_-20"></span>Обратите внимание</div>
<div class="b-layout__txt b-layout__txt_fontsize_11">— Оплата услуг производится в течение 2-3 минут.</div>
<div class="b-layout__txt b-layout__txt_fontsize_11">— После нажатия на кнопку Оплатить вы будете перенаправлены в платежную систему WebMoney.</div>
</div>
<form id="<?php
echo $type_payment;
?>
" name="<?php
echo $type_payment;
?>
" method="post" action="<?php
echo is_release() ? 'https://paymaster.ru/Payment/Init' : '/bill/test/wmpay.php';
?>
">
<input type="hidden" name="LMI_MERCHANT_ID" value="<?php
echo $bill->pm->merchants[pmpay::MERCHANT_BILL];
?>
" />
<input type="hidden" name="LMI_PAYMENT_AMOUNT" id="ammount" value="<?php
echo $payment_sum;
?>
" />
<input type="hidden" name="LMI_CURRENCY" value="RUB" />
<input type="hidden" name="LMI_PAYMENT_DESC_BASE64" value="<?php
echo base64_encode(iconv('CP1251', 'UTF-8', 'Оплата за услуги сайта www.free-lance.ru, в том числе НДС - 18%. Счет #' . $bill->acc['id'] . ', логин ' . $bill->user['login']));
?>
" />
示例2: getList
/**
* ¬озвращает список публичных типовых услуг по заданным услови¤м и пагинацией
*
* @return array
*/
public function getList($excluded_ids = array())
{
$criteria = array($this->category_id, $this->city_id, $this->country_id, $this->keywords, $this->limit, $this->offset, $this->price_ranges, $this->price_max, $this->order, $excluded_ids, $this->user_id);
$membuf = new memBuff();
$memkey = __METHOD__ . '#' . md5(serialize($criteria));
if (false !== ($result = $membuf->get($memkey)) && is_release()) {
return $result;
}
$sort = $this->getSort();
# @see http://sphinxsearch.com/forum/view.html?id=11538 about city = x or country = y
$sphinxClient = new SphinxClient();
$sphinxClient->SetServer(SEARCHHOST, SEARCHPORT);
$sphinxClient->SetLimits($this->offset, $this->limit, 20000);
$sphinxClient->SetSortMode(SPH_SORT_EXTENDED, $sort);
$sphinxClient->SetFieldWeights(array('title' => 2, 'extra_title' => 1));
//$sphinxClient->SetRankingMode(SPH_RANK_PROXIMITY_BM25);
$selectExpression = '*';
// все колонки
if ($this->user_id) {
$selectExpression .= ", IF(user_id = {$this->user_id}, 1, 0) as match_user";
$sphinxClient->setFilter('match_user', array(1));
}
if ($this->category_id) {
$selectExpression .= ", IF(category_id = {$this->category_id} or category_parent_id = {$this->category_id}, 1, 0) as match_category";
$sphinxClient->setFilter('match_category', array(1));
}
if ($this->country_id) {
$selectExpression .= ", IF(user_country_id = {$this->country_id} or country_id = {$this->country_id}, 1, 0) as match_country";
$sphinxClient->setFilter('match_country', array(1));
}
if ($this->city_id) {
$selectExpression .= ", IF(user_city_id = {$this->city_id} or city_id = {$this->city_id}, 1, 0) as match_city";
$sphinxClient->setFilter('match_city', array(1));
}
if (count($this->price_ranges)) {
$match_price_exprs = array();
foreach ($this->getPriceRanges() as $i => $price_range) {
if (!isset($this->price_ranges[$i])) {
continue;
}
$match_price_exprs[] = "price_{$i} = 1";
}
$match_price_exprs = implode(' or ', $match_price_exprs);
$selectExpression .= ", IF({$match_price_exprs}, 1, 0) as match_price";
$sphinxClient->setFilter('match_price', array(1));
}
if ($this->price_max > 0) {
$selectExpression .= ", IF(price <= {$this->price_max}, 1, 0) as match_price_max";
$sphinxClient->setFilter('match_price_max', array(1));
}
$searchString = '';
if (!empty($this->keywords)) {
$keywords = implode(' ', array_filter(preg_split('/\\s*,\\s*/', $this->keywords)));
$searchString = trim($keywords);
//$searchString = $this->GetSphinxKeyword($searchString);
$sphinxClient->SetMatchMode(SPH_MATCH_ANY);
//SPH_MATCH_EXTENDED2);
}
if (count($excluded_ids)) {
$sphinxClient->setFilter('tservice_id', $excluded_ids, true);
}
$sphinxClient->SetSelect($selectExpression);
$queryResult = $sphinxClient->query($searchString, "tservices;delta_tservices");
//echo '<pre>error: ', $sphinxClient->GetLastError(), '</pre>';
//echo '<pre>warn : ', $sphinxClient->GetLastWarning(), '</pre>';
$list = array();
$total = 0;
if (isset($queryResult['matches'])) {
foreach ($queryResult['matches'] as $id => $row) {
$row['attrs']['id'] = $id;
$list[] = $row['attrs'];
}
$total = $queryResult['total_found'] < $queryResult['total'] ? $queryResult['total_found'] : $queryResult['total'];
}
$result = array('list' => $list, 'total' => $total);
if ($this->_ttl) {
$membuf->set($memkey, $result, $this->_ttl);
}
return $result;
}
示例3: date
<?php
/**
* Эмуляция ответа от ЯД при запросах на выплату.
*/
require_once __DIR__ . '/../../classes/stdf.php';
require_once ABS_PATH . '/classes/YandexMoney3/Utils/Array2XML.php';
use YandexMoney3\Utils\Array2XML;
if (is_release()) {
exit;
}
$method = __paramInit('string', 'm', null, null);
$bodyRaw = file_get_contents('php://input');
if (empty($bodyRaw)) {
exit;
}
$xml = simplexml_load_string($bodyRaw);
$json = json_encode($xml);
$decodedArray = json_decode($json, true);
$is_fail = false;
$clientOrderId = @$decodedArray['@attributes']['clientOrderId'];
if (!$clientOrderId) {
$is_fail = true;
}
$converter = new Array2XML();
$converter->setConvertFromEncoding('windows-1251');
$converter->setTopNodeName($method . 'Response');
if ($is_fail) {
$converter->importArray(array('clientOrderId' => $clientOrderId, 'status' => 3, 'error' => 41, 'processedDT' => date('c')));
echo $converter->saveXml();
}
示例4: validate
//.........这里部分代码省略.........
case 'sex':
if ($value === null) {
// $this->error[$name] = 'Выберите пол';
}
break;
case 'uname':
case 'usurname':
if (!$value) {
$this->error[$name] = "Поле заполнено некорректно";
$this->errno[$name] = 1;
}
if (!preg_match("/^[-a-zA-Zа-яёА-ЯЁ]+\$/i", $value)) {
$this->error[$name] = "Поле заполнено некорректно";
$this->errno[$name] = 2;
}
break;
case 'password':
if ($value == '') {
$this->error[$name] = 'Введите пароль';
$this->errno[$name] = 1;
} else {
if (strlen($value) > 24) {
$this->error[$name] = 'Максимальная длина пароля 24 символа';
$this->errno[$name] = 2;
} else {
if (strlen($value) < 6) {
$this->error[$name] = 'Минимальная длина пароля 6 символов';
$this->errno[$name] = 3;
} else {
if (strlen(preg_replace("#[a-zA-Z\\d\\!\\@\\#\$\\%\\^\\&\\*\\(\\)\\_\\+\\-\\=\\;\\,\\.\\/\\?\\[\\]\\{\\}]#", "", $value)) != 0) {
$this->error[$name] = 'Поле заполнено некорректно';
$this->errno[$name] = 4;
}
}
}
}
break;
case 'login':
if (!preg_match("/^[a-zA-Z0-9]+[-a-zA-Z0-9_]{2,}\$/", $value)) {
$this->error[$name] = 'От 3 до 15 символов. Может содержать латинские буквы, цифры, подчёркивание (_) и дефис (-)';
$this->errno[$name] = 1;
}
if (in_array(strtolower($value), $GLOBALS['disallowUserLogins'])) {
$this->error[$name] = 'Извините, такой логин использовать нельзя';
$this->errno[$name] = 2;
}
if (empty($this->error[$name])) {
$sql = "SELECT uid FROM users WHERE lower(login) = ?";
if ($DB->val($sql, strtolower($value))) {
$this->error[$name] = 'Извините, этот логин занят. Придумайте другой.';
$this->errno[$name] = 3;
}
}
break;
case 'email':
if (!is_email($value)) {
$this->error[$name] = 'Поле заполнено некорректно';
$this->errno[$name] = 1;
}
if (empty($this->error[$name])) {
require_once $_SERVER['DOCUMENT_ROOT'] . "/classes/temp_email.php";
if (temp_email::isTempEmail($value)) {
$this->error[$name] = 'К сожалению, регистрация аккаунта на указанный адрес электронной почты невозможна. Пожалуйста, для регистрации воспользуйтесь почтовым адресом другого домена';
$this->errno[$name] = 2;
} else {
if ($DB->val("SELECT uid FROM users WHERE lower(email) = ?", strtolower($value))) {
if ($this->_disable_email_redirect) {
$this->error[$name] = 'Email занят';
$this->errno[$name] = 3;
} else {
require_once $_SERVER['DOCUMENT_ROOT'] . "/classes/smail.php";
$smail = new smail();
$smail->reRegisterToYourMail(strtolower($value));
unset($_SESSION["regform_captcha_entered"]);
unset($_SESSION["reg_phone"]);
unset($_SESSION['send_sms_time']);
header_location_exit("/reg_complete.php");
}
}
}
}
break;
case 'smscode':
if ($_SESSION['smsCode'] != $value && !($value == 7777 && $_SESSION["reg_phone"] == 71111112222 && !is_release())) {
$this->error[$name] = 'Неверный код';
}
break;
case 'phone':
if (!$phone_is_set && $_SESSION["reg_phone"] != $value) {
$this->error[$name] = 'Вы подтвердили не этот номер';
$this->errno[$name] = 1;
}
$sPhone = $phone_is_set ? $value : $_SESSION['reg_phone'];
if (trim(preg_replace("#[\\D]#", "", $sPhone)) == '') {
$this->error[$name] = 'Необходимо ввести номер';
$this->errno[$name] = 2;
}
break;
}
}
示例5: __construct
public function __construct()
{
$this->isTest = !is_release() || is_local();
}
示例6: is_release
<h2 class="b-layout__title b-layout__title_padbot_30">Оплата через Okpay</h2>
<table class="b-layout__table b-layout__table_width_full">
<tbody>
<tr class="b-layout__tr">
<td class="b-layout__td b-layout__td_padright_20">
<form method="POST" action="<?php
echo is_release() ? "https://www.okpay.com/process.html" : "/bill/test/okpay.php";
?>
" id="<?php
echo $type_payment;
?>
" name="<?php
echo $type_payment;
?>
">
<div class="b-layout__txt b-layout__txt_inline-block b-layout__txt_padtop_5 b-page__desktop b-page__ipad">Мобильный телефон</div>
<div class="b-combo b-combo_inline-block b-combo_padbot_20">
<div class="b-combo__input <?php
echo $bill->error['phone'] ? "b-combo__input_error" : "";
?>
b-combo__input_width_170 b-combo__input_tel
b-combo__input_phone_countries_dropdown b-combo__input_visible_items_5 use_scroll show_all_records
b-combo__input_init_countryPhoneCodes">
<input type="text" maxlength="15" id="reg_phone" class="b-combo__input-text payment-system js-payform_input" name="phone" size="80" value="7">
<span class="b-combo__tel"><span class="b-combo__flag" style="background-position:0 -660px"></span></span>
</div>
</div>
<div class="i-shadow">
<div id="error_phone" class="b-shadow b-shadow_zindex_3 b-shadow_m <?php
示例7: _send
/**
* Отправка пакета сообщения через СМС-Шлюз.
*
* @param type $params
*
* @return bool
*/
protected function _send($params)
{
$ch = curl_init();
if (is_array($params)) {
foreach ($params as $k => $v) {
if ($v === null) {
continue;
}
$params[$k] = $this->_enc($v);
}
$build_query = http_build_query($params);
} else {
ob_start();
var_dump($params);
$out = ob_get_clean();
$this->_log->writeln($this->_enc($out, true));
$this->_log->writeln('Ошибка параметров для запроса');
$this->_setError('Ошибка параметров для запроса');
return false;
}
if (!SMS_GATE_DEBUG) {
curl_setopt($ch, CURLOPT_USERPWD, SMS_GATE_AUTH);
curl_setopt($ch, CURLOPT_URL, (is_release() ? $this->_request_url : 'localhost') . '?' . $build_query);
if ($this->_request_port) {
curl_setopt($ch, CURLOPT_PORT, $this->_request_port);
}
} else {
if (defined('BASIC_AUTH')) {
curl_setopt($ch, CURLOPT_USERPWD, BASIC_AUTH);
}
curl_setopt($ch, CURLOPT_URL, $this->_request_url . '?' . $build_query);
}
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 30);
curl_setopt($ch, CURLOPT_TIMEOUT, 30);
$res = curl_exec($ch);
$this->_http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
ob_start();
var_dump($this->_request_url . '?' . $build_query);
var_dump($params);
var_dump($res);
var_dump($this->_http_code);
$out = ob_get_clean();
$this->_log->writeln($this->_enc($out, true));
return $res;
}
示例8: getRedirectURI
/**
* Возвращает адрес редиректа приложения
*
* @return string
*/
public static function getRedirectURI()
{
return is_release() ? API_Yandex::REDIRECT_URI : API_Yandex::REDIRECT_BETA_URI;
}
示例9: getSecret
function getSecret()
{
if (is_release()) {
return false;
}
return $this->_secret;
}
示例10: getWmPaymentInfo
/**
* Возвращает информацию о выплате ЯД
*
* @param int $user_id UID пользователя
* @return object yd_payments
*/
function getWmPaymentInfo($user_id)
{
if (!$this->sbr->isAdmin()) {
return;
}
require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/wm_payments.php';
if (!$this->getPayouts($user_id)) {
return NULL;
}
$payout = $this->payouts[$user_id];
$wm = new wm_payments($payout['id'], wm_payments::SRC_SBR);
if (!is_release()) {
$wm->DEBUG = array('address' => $GLOBALS['host'] . '/norisk2/admin/wm-server-test.php');
if (defined('BASIC_AUTH')) {
$wm->DEBUG['headers'] = 'Authorization: Basic ' . base64_encode(BASIC_AUTH) . "\r\n";
}
}
$pmt = $wm->getPayment();
$reqvs = sbr_meta::getUserReqvs($user_id);
if ($pmt) {
$tr = $wm->getTr($pmt['ltr_id']);
$pmt['dstacnt_nr'] = $tr ? $tr['purse'] : $reqvs[sbr::FT_PHYS]['el_wmr'];
$pmt['performed_dt'] = $tr['dateupd'];
} else {
$pmt = array('src_id' => $payout['id'], 'src_type' => wm_payments::SRC_SBR, 'in_amt' => $payout['credit_sum'], 'dstacnt_nr' => $reqvs[sbr::FT_PHYS]['el_wmr']);
}
// $pmt['balance'] = $wm->balance();
$pmt['errors'] = $wm->errors;
$pmt['amt_sys'] = exrates::WMR;
return $pmt;
}
示例11: getAccessData
public function getAccessData($type = null)
{
switch ($type) {
case 'bind':
$this->userName = API_AlphaBank::LOGIN_BINDING;
$this->password = is_release() ? API_AlphaBank::PASSWD_BINDING : API_AlphaBank::PASSWD_TEST_BINDING;
break;
case 'autopay':
$this->userName = API_AlphaBank::LOGIN_AUTOPAY;
$this->password = is_release() ? API_AlphaBank::PASSWD_AUTOPAY : API_AlphaBank::PASSWD_TEST_AUTOPAY;
break;
default:
$this->userName = API_AlphaBank::LOGIN;
$this->password = is_release() ? API_AlphaBank::PASSWD : API_AlphaBank::PASSWD_TEST;
break;
}
}
示例12:
</tr>
<?php
}
?>
</tbody>
</table>
<?php
}
$payout_list = $payouts['list'];
if ($payout_list) {
?>
<br/>
<h3><i>Запросы к ЯД на Выплату</i></h3>
<?php
if (!is_release()) {
?>
<p>* на тесте статусы выплат не меняются они всегда "новый"</p>
<?php
}
?>
<table class="nr-a-tbl" cellspacing="5">
<thead>
<tr>
<th>ID</th>
<th>Сумма</th>
<th>Статус</th>
<th>Ошибка</th>
<th>Создание</th>
<th>Обновление</th>
<th>Попыток</th>
示例13: is_release
<tbody>
<tr class="b-layout__tr">
<td class="b-layout__td b-layout__td_padright_20">
<div class="b-fon b-fon_bg_fff9bf b-fon_pad_10 b-fon_padleft_35">
<div class="b-layout__txt b-layout__txt_fontsize_11 b-layout__txt_bold"><span class="b-icon b-icon_sbr_oattent b-icon_margleft_-20"></span>Обратите внимание</div>
<div class="b-layout__txt b-layout__txt_fontsize_11">— Оплата услуг производится в течение 2-3 минут.</div>
<div class="b-layout__txt b-layout__txt_fontsize_11">— После нажатия на кнопку Оплатить вы будете перенаправлены на сайт Яндекс.Деньги.</div>
</div>
<form id="<?php
echo $type_payment;
?>
" name="<?php
echo $type_payment;
?>
" method="post" action="<?php
echo is_release() ? "https://money.yandex.ru/eshop.xml" : "/bill/test/ydpay.php";
?>
">
<input class="wide" name="scid" value="2200" type="hidden" />
<input type="hidden" name="ShopID" value="4551" />
<input type="hidden" name="Sum" value="<?php
echo $payment_sum;
?>
" />
<input type="hidden" name="CustomerNumber" value="<?php
echo $bill->acc['id'];
?>
" />
</form>
<? include ( $_SERVER['DOCUMENT_ROOT'] . "/bill/payment/paysystems/tpl.button_buy.php");?>
</td>
示例14: round
?>
]</a><br>
Номер счета: <?php
echo $account->id;
?>
<h3 style="margin-bottom:0px;">На счету <?php
echo round($account->sum, 2);
?>
руб.</h3>
<strong>на бонусном счету - <?php
echo zin(round($account->bonus_sum, 2));
?>
руб.</strong><br /><br />
<?php
if (!is_release() || in_array($_SESSION['login'], $GLOBALS['balanceCanChangeAdmins'])) {
?>
<form action="." method="post">
Изменить счет пользователя
<table cellspacing="2" cellpadding="2" border="0">
<tr>
<td>на сумму(руб):</td>
<td><input type="text" name="val"></td>
</tr>
<tr>
<td>комментарий (для пользователя)</td>
<td><textarea cols="50" rows="" name="ucomment"></textarea></td>
</tr>
<tr>
<td>комментарий (для системы)</td>
<td><textarea cols="50" rows="" name="scomment"></textarea></td>
示例15: is_release
<h2 class="b-layout__title b-layout__title_padbot_30">Оплата через Веб-кошелек</h2>
<table class="b-layout__table b-layout__table_width_full">
<tbody>
<tr class="b-layout__tr">
<td class="b-layout__td b-layout__td_padright_20">
<div class="b-fon b-fon_bg_fff9bf b-fon_pad_10 b-fon_padleft_35">
<div class="b-layout__txt b-layout__txt_fontsize_11 b-layout__txt_bold"><span class="b-icon b-icon_sbr_oattent b-icon_margleft_-20"></span>Обратите внимание</div>
<div class="b-layout__txt b-layout__txt_fontsize_11">— Оплата услуг производится в течение 2-3 минут.</div>
<div class="b-layout__txt b-layout__txt_fontsize_11">— Платежи суммой более 15 000 не производятся.</div>
</div>
<form action="<?php
echo is_release() ? 'http://www.onlinedengi.ru/wmpaycheck.php' : '/bill/test/webpay.php';
?>
" method="post" id="<?php
echo $type_payment;
?>
" name="<?php
echo $type_payment;
?>
">
<input type="hidden" name="project" value="3097" />
<input type="hidden" name="mode_type" value="204" />
<input type="hidden" name="nickname" value="<?php
echo $bill->user['login'];
?>
" />
<input type="hidden" name="nick_extra" value="<?php
echo $bill->user['login'];
?>
" />
<input type="hidden" name="amount" value="<?php