const parentSelectors = [ '.maplabels', '#map' ];
const activeClass = 'active';
$(document).on('click', parentSelectors.map(n => `${n} >`).join(','), e => {
const index = $(e.currentTarget).index();
parentSelectors.forEach(n => $(n)
.children()
.removeClass(activeClass)
.eq(index)
.addClass(activeClass)
);
});
const parents = parentSelectors.map(n => document.querySelector(n));
document.addEventListener('click', ({ target: t }) => {
const parent = parents.find(n => n !== t && n.contains(t));
if (parent) {
const index = [...parent.children].findIndex(n => n.contains(t));
for (const { children } of parents) {
for (let i = 0; i < children.length; i++) {
children[i].classList.toggle(activeClass, i === index);
}
}
}
});
$orderObj = Sale\Order::load($order['ORDER']['ID']);
$paymentCollection = $orderObj->getPaymentCollection();
$payment = $paymentCollection[0];
$service = Sale\PaySystem\Manager::getObjectById($payment->getPaymentSystemId());
$context = \Bitrix\Main\Application::getInstance()->getContext();
$service->initiatePay($payment, $context->getRequest());
<?$APPLICATION->IncludeComponent(
"bitrix:sale.order.payment",
"",
Array(
)
);?>
<?
require($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/main/include/prolog_before.php");
$APPLICATION->SetTitle("Оплата заказа");
ob_start();
?>
<?$APPLICATION->IncludeComponent(
"bitrix:sale.order.payment",
"",
Array(
)
);?>
<?
$formPay = ob_get_contents();
ob_end_clean();
require($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/main/include/prolog_after.php");
$APPLICATION->SetTitle("Оплата заказа");
?>
<div class="formPayment">
<?
echo $formPay;
?>
</div>
<?require($_SERVER["DOCUMENT_ROOT"]."/bitrix/footer.php");?>
print preg_replace( '/^(\d{3})(\d+)$/iu', '+7($1)$2', '921123456789' ); // +7(921)123456789
class AjaxController
{
publc function actionSave()
{
return .....;
}
}
$controller = new AjaxController();
if (method_exists($controller, "action".ucfirst($_POST['method'])))
{
return $controller->"action".ucfirst($_POST['method'])();
}
server {
listen 80;
server_name "~^(www\.)?(.*)$" ;
return 301 https://$2$request_uri ;
}
server {
listen 443 ssl;
server_name "~^www\.(.*)$" ;
return 301 https://$1$request_uri ;
}
server {
listen 443 ssl;
server_name domain.ru domain.com;
# основная секция
}
server {
listen 80;
listen 443 ssl;
server_name server_name "~^(www\.)?(.*)$";
if($scheme = https) {
if($1 = www) {
return 301 http://$2$request_uri;
}
}
if($scheme = http) {
return 301 http://$2$request_uri;
}
# основная секция
}
server {
listen 80;
server_name www.domain.com domain.com;
return 301 https://domain.com$request_uri ;
}
server {
listen 80;
server_name www.domain.ru domain.ru;
return 301 https://domain.ru$request_uri ;
}
server {
listen 443 ssl;
server_name www.domain.ru;
return 301 https://domain.ru$request_uri ;
}
server {
listen 443 ssl;
server_name www.domain.com;
return 301 https://domain.com$request_uri ;
}
server {
listen 443 ssl;
server_name domain.ru domain.com;
# основная секция
}