Merge branch 'master' of https://github.com/Evolyuciya/evoleasing-public
This commit is contained in:
commit
d6af72a4d4
2
.gitignore
vendored
2
.gitignore
vendored
@ -7,4 +7,4 @@ sitemap*
|
||||
.xml
|
||||
.htsecure
|
||||
cron/yasprav.log
|
||||
local/yasprav.log
|
||||
vizitka/tmp/
|
||||
@ -2002,6 +2002,29 @@ switch($PARAM_1)
|
||||
}
|
||||
break;
|
||||
|
||||
case "vizitka":
|
||||
{
|
||||
//define("LOG_FILENAME", $_SERVER["DOCUMENT_ROOT"]."/vizitka/tmp/log.txt");
|
||||
//AddMessage2Log("_REQUEST['guid'] => ".$_REQUEST['guid'], "my_module_id");
|
||||
|
||||
$c = curl_init();
|
||||
curl_setopt($c, CURLOPT_URL, API_HOST."/site/GetUserBusinessCard/?guid=".$_REQUEST['guid']);
|
||||
curl_setopt($c, CURLOPT_CONNECTTIMEOUT, 30);
|
||||
curl_setopt($c, CURLOPT_TIMEOUT, 30);
|
||||
curl_setopt($c, CURLOPT_RETURNTRANSFER, 1);
|
||||
curl_setopt($c, CURLOPT_SSL_VERIFYPEER, 0);
|
||||
curl_setopt($c, CURLOPT_SSL_VERIFYHOST, 0);
|
||||
curl_setopt($c, CURLOPT_HTTPHEADER, array('Content-Type:application/json'));
|
||||
|
||||
$response = curl_exec($c) or die(curl_error($c));
|
||||
|
||||
curl_close($c);
|
||||
print $response;
|
||||
|
||||
die();
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
{
|
||||
print json_encode([]);
|
||||
|
||||
@ -5,9 +5,9 @@ $APPLICATION->SetTitle("Эволюция автолизинга: Вместе с
|
||||
<div class="container">
|
||||
<h1 class="section_title">Вместе с МКБ</h1>
|
||||
<article>
|
||||
<h2><img width="500" alt="mkblogo500v2.png" src="/upload/medialibrary/33a/sd4iqi4n21vfqg00k5dhpolto24gmqro.png" height="210" title="mkblogo500v2.png" style="max-width:100%"><br>
|
||||
<h2><img alt="mkb500.png" src="/upload/medialibrary/a73/c7qhj78kedljpx74jkcbsr5zylm6qd8d.png" title="mkb500.png" style="max-width:100%"><br>
|
||||
</h2>
|
||||
<h2><span style="color: #e81c62;">2% - субсидия на авансовый платёж для клиентов МКБ</span></h2>
|
||||
<h2><span style="color: #e81c62;">Специальные условия по лизингу для клиентов МКБ</span></h2>
|
||||
<h2>Лучшие условия финансирования среди лизинговых компаний за счет собственного фондирования</h2>
|
||||
<ul class="special_desc list-column">
|
||||
<li>Рассмотрение заявки по 2-м документам (анкета и паспорт).</li>
|
||||
|
||||
@ -1 +1 @@
|
||||
<pre>1 => MO1</pre><pre>2 => SP1</pre><pre>3 => BN1</pre><pre>4 => BG1</pre><pre>5 => VL1</pre><pre>6 => VR1</pre><pre>7 => EK1</pre><pre>8 => IR1</pre><pre>9 => KZ1</pre><pre>10 => KG1</pre><pre>11 => KL1</pre><pre>12 => KM1</pre><pre>13 => KR1</pre><pre>14 => KS2</pre><pre>15 => KS1</pre><pre>16 => LP1</pre><pre>17 => NC1</pre><pre>18 => NN1</pre><pre>19 => NV1</pre><pre>20 => NR1</pre><pre>21 => NS1</pre><pre>22 => OM1</pre><pre>23 => OR1</pre><pre>24 => PR1</pre><pre>25 => RD1</pre><pre>26 => RZ1</pre><pre>27 => SM1</pre><pre>28 => SR1</pre><pre>29 => SC1</pre><pre>30 => SK1</pre><pre>31 => ST1</pre><pre>32 => SG1</pre><pre>33 => TL1</pre><pre>34 => TM1</pre><pre>35 => UF1</pre><pre>36 => CB1</pre><pre>37 => CL1</pre><pre>38 => YR1</pre><pre></pre><pre></pre>Ok! Сохранено по <a href='https://www.evoleasing.ru/upload/docs/yasprav.xml'>ссылке!</a> 24.06.2022
|
||||
<pre>1 => MO1</pre><pre>2 => SP1</pre><pre>3 => BN1</pre><pre>4 => BG1</pre><pre>5 => VL1</pre><pre>6 => VR1</pre><pre>7 => EK1</pre><pre>8 => IR1</pre><pre>9 => KZ1</pre><pre>10 => KG1</pre><pre>11 => KL1</pre><pre>12 => KM1</pre><pre>13 => KR1</pre><pre>14 => KS2</pre><pre>15 => KS1</pre><pre>16 => LP1</pre><pre>17 => NC1</pre><pre>18 => NN1</pre><pre>19 => NV1</pre><pre>20 => NR1</pre><pre>21 => NS1</pre><pre>22 => OM1</pre><pre>23 => OR1</pre><pre>24 => PR1</pre><pre>25 => RD1</pre><pre>26 => RZ1</pre><pre>27 => SM1</pre><pre>28 => SR1</pre><pre>29 => SC1</pre><pre>30 => SK1</pre><pre>31 => ST1</pre><pre>32 => SG1</pre><pre>33 => TL1</pre><pre>34 => TU1</pre><pre>35 => TM1</pre><pre>36 => UF1</pre><pre>37 => CB1</pre><pre>38 => CL1</pre><pre>39 => YR1</pre><pre></pre><pre></pre>Ok! Сохранено по <a href='https://www.evoleasing.ru/upload/docs/yasprav.xml'>ссылке!</a> 08.09.2022
|
||||
@ -74,8 +74,17 @@ function form_leasing_request_submit()
|
||||
|
||||
$("#send_button_text").css("display", "block");
|
||||
$("#send_button_spinner").css("display", "none");
|
||||
|
||||
|
||||
leasing_form_submitting = false;
|
||||
|
||||
try
|
||||
{
|
||||
ym(66905533,'reachGoal','leasingform')
|
||||
}
|
||||
catch(e)
|
||||
{
|
||||
console.error(e);
|
||||
}
|
||||
}
|
||||
else if(response.status === "error")
|
||||
{
|
||||
|
||||
@ -76,6 +76,15 @@ function form_leasing_request_submit()
|
||||
$("#send_button_spinner").css("display", "none");
|
||||
|
||||
leasing_form_submitting = false;
|
||||
|
||||
try
|
||||
{
|
||||
ym(66905533,'reachGoal','leasingform')
|
||||
}
|
||||
catch(e)
|
||||
{
|
||||
console.error(e);
|
||||
}
|
||||
}
|
||||
else if(response.status === "error")
|
||||
{
|
||||
|
||||
116
local/components/evolution/vizitka/component.php
Normal file
116
local/components/evolution/vizitka/component.php
Normal file
@ -0,0 +1,116 @@
|
||||
<?
|
||||
if(!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true) die();
|
||||
/** @var CBitrixComponent $this */
|
||||
/** @var array $arParams */
|
||||
/** @var array $arResult */
|
||||
/** @var string $componentPath */
|
||||
/** @var string $componentName */
|
||||
/** @var string $componentTemplate */
|
||||
/** @global CDatabase $DB */
|
||||
/** @global CUser $USER */
|
||||
/** @global CMain $APPLICATION */
|
||||
|
||||
use Bitrix\Main\Context,
|
||||
Bitrix\Main\Type\DateTime,
|
||||
Bitrix\Main\Loader,
|
||||
Bitrix\Iblock;
|
||||
|
||||
require_once($_SERVER["DOCUMENT_ROOT"].'/bitrix/php_interface/phpqrcode/qrlib.php');
|
||||
|
||||
|
||||
$object = json_decode(file_get_contents("https://evoleasing.ru/api/vizitka/?guid=".$arParams['guid']));
|
||||
|
||||
//define("LOG_FILENAME", $_SERVER["DOCUMENT_ROOT"]."/vizitka/tmp/log2.txt");
|
||||
//AddMessage2Log("object => ".print_r($object, true)."\narParams => ".print_r($arParams, true), "my_module_id");
|
||||
|
||||
//$ourData = file_get_contents($_SERVER["DOCUMENT_ROOT"]."/vizitka/data.json");
|
||||
//$object = json_decode($ourData);
|
||||
|
||||
//Очищаем временную директорию от файлоы старше 2 дней
|
||||
$tmpfolders = $_SERVER["DOCUMENT_ROOT"].'/vizitka/tmp/';
|
||||
$fileSystemIterator = new FilesystemIterator($tmpfolders);
|
||||
$now = time();
|
||||
foreach ($fileSystemIterator as $file) {
|
||||
if ($now - $file->getCTime() >= 60 * 60 * 24 * 2) // 2 days
|
||||
unlink($tmpfolders.$file->getFilename());
|
||||
}
|
||||
|
||||
//Разбираем данные из json
|
||||
//if ($arParams["guid"] & $object->firstName) {
|
||||
if ($object->firstName) {
|
||||
$arParams["name"] = $object->firstName;
|
||||
$arParams["family"] = $object->secondName;
|
||||
$arParams["post"] = $object->post;
|
||||
$arParams["dept"] = $object->department;
|
||||
$arParams["company"] = "Эволюция Автолизинга";
|
||||
$arParams["mob"] = $object->mobilePhone;
|
||||
$arParams["mobcl"] = preg_replace('/[^0-9]/', '', $arParams["mob"]);
|
||||
$arParams["tel"] = $object->workPhone;
|
||||
$arParams["telcl"] = preg_replace('/[^0-9]/', '', $arParams["tel"]);
|
||||
$arParams["teladd"] = $object->workPhoneCode;
|
||||
$arParams["mail"] = $object->email;
|
||||
$arParams["address"] = $object->address;
|
||||
$arParams["whatsapp"] = $object->whatsAppOn;
|
||||
$arParams["telegram"] = $object->telegram;
|
||||
$arParams["www"] = "https://www.evoleasing.ru";
|
||||
$arParams["image"] = $object->image;
|
||||
|
||||
//VCF для QR кода
|
||||
$qrtext = 'BEGIN:VCARD
|
||||
VERSION:4.0
|
||||
N;CHARSET=UTF-8:'.$arParams["family"].';'.$arParams["name"].';;;
|
||||
FN;CHARSET=UTF-8:'.$arParams["name"].' '.$arParams["family"].'
|
||||
TITLE;CHARSET=UTF-8:'.$arParams["post"].'
|
||||
EMAIL:'.$arParams["mail"].'
|
||||
ORG;CHARSET=UTF-8:'.$arParams["company"].';'.$arParams["dept"].'
|
||||
TEL;type=CELL:'.$arParams["mob"].'
|
||||
URL;type=PREF:'.$arParams["www"].'
|
||||
LANG:ru-RU
|
||||
END:VCARD';
|
||||
|
||||
$qrimg = QRcode::png($qrtext, $_SERVER["DOCUMENT_ROOT"].'/vizitka/tmp/'.$arParams["guid"].'.png', 'L', 3, 2);
|
||||
//$im = imagecreatefrompng($_SERVER["DOCUMENT_ROOT"].'/vizitka/tmp/'.$arParams["guid"].'.png');
|
||||
|
||||
//Формируем vcf файл визитки для телефонов
|
||||
$arParams["vcarddata"] = 'BEGIN:VCARD
|
||||
VERSION:4.0
|
||||
N;CHARSET=UTF-8:'.$arParams["family"].';'.$arParams["name"].';;;
|
||||
FN;CHARSET=UTF-8:'.$arParams["name"].' '.$arParams["family"].'
|
||||
TITLE;CHARSET=UTF-8:'.$arParams["post"].'
|
||||
EMAIL:'.$arParams["mail"].'
|
||||
ORG;CHARSET=UTF-8:'.$arParams["company"].';'.$arParams["dept"].'
|
||||
TEL;type=CELL:'.$arParams["mob"].'
|
||||
URL;type=PREF:'.$arParams["www"].'
|
||||
PHOTO;ENCODING=BASE64;TYPE=JPEG:'.$arParams["image"].'
|
||||
LANG:ru-RU
|
||||
END:VCARD';
|
||||
$arParams["vcarddata"] = mb_convert_encoding($arParams["vcarddata"], "UTF-8");
|
||||
|
||||
$arParams["vcffile"] = './tmp/'.$arParams["guid"].'.vcf';
|
||||
$fp = fopen($arParams["vcffile"], "w");
|
||||
fwrite($fp, $arParams["vcarddata"]);
|
||||
fclose($fp);
|
||||
|
||||
//Формируем vcf файл визитки для компьютера
|
||||
$arParams["vcarddatawin"] = 'BEGIN:VCARD
|
||||
VERSION:4.0
|
||||
N;CHARSET=windows-1252:'.$arParams["family"].';'.$arParams["name"].';;;
|
||||
FN;CHARSET=windows-1252:'.$arParams["name"].' '.$arParams["family"].'
|
||||
TITLE;CHARSET=windows-1252:'.$arParams["post"].'
|
||||
EMAIL:'.$arParams["mail"].'
|
||||
ORG;CHARSET=windows-1252:'.$arParams["company"].';'.$arParams["dept"].'
|
||||
TEL;type=CELL:'.$arParams["mob"].'
|
||||
URL;type=PREF:'.$arParams["www"].'
|
||||
PHOTO;ENCODING=BASE64;TYPE=JPEG:'.$arParams["image"] .'
|
||||
LANG:ru-RU
|
||||
END:VCARD';
|
||||
|
||||
$arParams["vcarddatawin"] = iconv("utf-8", "windows-1251", $arParams["vcarddatawin"]);
|
||||
|
||||
$arParams["vcffilewin"] = './tmp/'.$arParams["guid"].'-win.vcf';
|
||||
$fp = fopen($arParams["vcffilewin"], "w");
|
||||
fwrite($fp, $arParams["vcarddatawin"]);
|
||||
fclose($fp);
|
||||
|
||||
}
|
||||
$this->IncludeComponentTemplate();
|
||||
186
local/components/evolution/vizitka/templates/.default/script.js
Normal file
186
local/components/evolution/vizitka/templates/.default/script.js
Normal file
@ -0,0 +1,186 @@
|
||||
var calculation = { car_price: 0, CAR_PRICE_MIN: 0, CAR_PRICE_MAX:0, initial_payment: 0, lease_period: 0, monthly_payment: 0, redemption_payment: 0, tax_savings: 0, vat_reimbursement: 0 };
|
||||
|
||||
function calculator(props)
|
||||
{
|
||||
for(let i in calculation)
|
||||
{
|
||||
calculation[i] = parseInt(props[i], 10);
|
||||
}
|
||||
|
||||
$("#FORM_FIELD_PRICE").val(calculation.car_price);
|
||||
$("#FORM_FIELD_PREPAID").val(calculation.initial_payment);
|
||||
$("#FORM_FIELD_TERM").val(calculation.lease_period);
|
||||
$("#FORM_FIELD_REDEMPTION").val(calculation.redemption_payment);
|
||||
}
|
||||
|
||||
function calculate(param, value)
|
||||
{
|
||||
if(param !== undefined)
|
||||
{
|
||||
calculation[param] = value;
|
||||
}
|
||||
|
||||
$("#FORM_FIELD_PRICE").val(calculation.car_price);
|
||||
$("#FORM_FIELD_PREPAID").val(calculation.initial_payment);
|
||||
$("#FORM_FIELD_TERM").val(calculation.lease_period);
|
||||
$("#FORM_FIELD_REDEMPTION").val(calculation.redemption_payment);
|
||||
|
||||
$.post("/api/calculation/",
|
||||
{
|
||||
car_price: calculation.car_price,
|
||||
initial_payment: calculation.initial_payment,
|
||||
lease_period: calculation.lease_period,
|
||||
redemption_payment: calculation.redemption_payment,
|
||||
}, function(response)
|
||||
{
|
||||
for(let i in response)
|
||||
{ calculation[i] = parseInt(response[i], 10); }
|
||||
|
||||
$("#calculator_monthly_payment_value").text(calculation['monthly_payment'].toLocaleString());
|
||||
$("#calculator_tax_savings_value").text((calculation['tax_savings'] + calculation['vat_reimbursement']).toLocaleString());
|
||||
$("#calculator_tax_savings_percent").text(Math.round((calculation['tax_savings']+calculation['vat_reimbursement']) / (calculation['car_price'] / 100)));
|
||||
}, "json");
|
||||
}
|
||||
|
||||
function calculator_car_price_save()
|
||||
{
|
||||
var v = parseInt($("#calculator_car_price_input").val(), 10);
|
||||
console.log(v, calculation['CAR_PRICE_MIN'], calculation['CAR_PRICE_MAX']);
|
||||
if(v >= calculation['CAR_PRICE_MIN'] && v <= calculation['CAR_PRICE_MAX'])
|
||||
{
|
||||
var $input_range_car_price = $(`#calculation_car_price`);
|
||||
$input_range_car_price.val(v).change();
|
||||
calculate('car_price', v);
|
||||
|
||||
$("#calculator_car_price_text").show();
|
||||
$("#calculator_car_price_editor").hide();
|
||||
}
|
||||
else
|
||||
{
|
||||
$("#calculator_car_price_text").show();
|
||||
$("#calculator_car_price_editor").hide();
|
||||
}
|
||||
}
|
||||
|
||||
$(function()
|
||||
{
|
||||
var $document = $(document);
|
||||
var selector = '[data-rangeslider]';
|
||||
var $element = $(selector);
|
||||
|
||||
// For ie8 support
|
||||
var textContent = ('textContent' in document) ? 'textContent' : 'innerText';
|
||||
|
||||
// Example functionality to demonstrate a value feedback
|
||||
function valueOutput(element)
|
||||
{
|
||||
var value = element.value;
|
||||
var output = element.parentNode.getElementsByTagName('output')[0] || element.parentNode.parentNode.getElementsByTagName('output')[0];
|
||||
if($(element).data('slider-name') === "car_price")
|
||||
{
|
||||
output[textContent] = parseInt(value, 10).toLocaleString();
|
||||
}
|
||||
else
|
||||
{
|
||||
output[textContent] = value;
|
||||
}
|
||||
}
|
||||
|
||||
$document.on('input', 'input[type="range"], ' + selector, function(e)
|
||||
{
|
||||
valueOutput(e.target);
|
||||
});
|
||||
|
||||
// Example functionality to demonstrate disabled functionality
|
||||
$document.on('click', '#js-example-disabled button[data-behaviour="toggle"]', function(e)
|
||||
{
|
||||
var $inputRange = $(selector, e.target.parentNode);
|
||||
|
||||
if ($inputRange[0].disabled) {
|
||||
$inputRange.prop("disabled", false);
|
||||
}
|
||||
else {
|
||||
$inputRange.prop("disabled", true);
|
||||
}
|
||||
$inputRange.rangeslider('update');
|
||||
});
|
||||
|
||||
// Example functionality to demonstrate programmatic value changes
|
||||
$document.on('click', '#js-example-change-value button', function(e) {
|
||||
var $inputRange = $(selector, e.target.parentNode);
|
||||
var value = $('input[type="number"]', e.target.parentNode)[0].value;
|
||||
|
||||
$inputRange.val(value).change();
|
||||
});
|
||||
|
||||
// Example functionality to demonstrate programmatic attribute changes
|
||||
$document.on('click', '#js-example-change-attributes button', function(e)
|
||||
{
|
||||
var $inputRange = $(selector, e.target.parentNode);
|
||||
var attributes = {
|
||||
min: $('input[name="min"]', e.target.parentNode)[0].value,
|
||||
max: $('input[name="max"]', e.target.parentNode)[0].value,
|
||||
step: $('input[name="step"]', e.target.parentNode)[0].value
|
||||
};
|
||||
|
||||
$inputRange.attr(attributes);
|
||||
$inputRange.rangeslider('update', true);
|
||||
});
|
||||
|
||||
// Example functionality to demonstrate destroy functionality
|
||||
$document
|
||||
.on('click', '#js-example-destroy button[data-behaviour="destroy"]', function(e) {
|
||||
$(selector, e.target.parentNode).rangeslider('destroy');
|
||||
})
|
||||
.on('click', '#js-example-destroy button[data-behaviour="initialize"]', function(e) {
|
||||
$(selector, e.target.parentNode).rangeslider({ polyfill: false });
|
||||
});
|
||||
|
||||
// Example functionality to test initialisation on hidden elements
|
||||
$document.on('click', '#js-example-hidden button[data-behaviour="toggle"]', function(e) {
|
||||
var $container = $(e.target.previousElementSibling);
|
||||
$container.toggle();
|
||||
});
|
||||
|
||||
// Basic rangeslider initialization
|
||||
$element.rangeslider({
|
||||
// Deactivate the feature detection
|
||||
polyfill: false,
|
||||
// Callback function
|
||||
onInit: function() {
|
||||
valueOutput(this.$element[0]);
|
||||
},
|
||||
// Callback function
|
||||
onSlide: function(position, value) {
|
||||
//console.log('onSlide');
|
||||
//console.log('position: ' + position, 'value: ' + value);
|
||||
},
|
||||
// Callback function
|
||||
onSlideEnd: function(position, value)
|
||||
{
|
||||
calculate(this.$element.attr('data-slider-name'), value);
|
||||
//console.log('position: ' + position, 'value: ' + value);
|
||||
}
|
||||
});
|
||||
|
||||
$("#calculator_car_price_text").on("click", function()
|
||||
{
|
||||
$("#calculator_car_price_input").val(parseInt(calculation.car_price, 10));
|
||||
$("#calculator_car_price_text").hide();
|
||||
$("#calculator_car_price_editor").show();
|
||||
});
|
||||
|
||||
$("#calculator_car_price_save").on("click", function()
|
||||
{
|
||||
calculator_car_price_save();
|
||||
});
|
||||
|
||||
$("#calculator_car_price_input").on("keydown", function(event)
|
||||
{
|
||||
if(event.keyCode === 13)
|
||||
{
|
||||
event.preventDefault();
|
||||
calculator_car_price_save();
|
||||
}
|
||||
});
|
||||
});
|
||||
@ -0,0 +1,37 @@
|
||||
.offer_item_boston {
|
||||
width: auto !important;
|
||||
padding-bottom: 30px;
|
||||
position: relative;
|
||||
}
|
||||
.offer_item_boston img{
|
||||
border-radius: 50%;
|
||||
}
|
||||
.offer_item {
|
||||
width: auto !important;
|
||||
padding-left: 0 !important;
|
||||
padding-right: 20px;
|
||||
}
|
||||
.leasing_offers_list {
|
||||
margin-top: 30px !important;
|
||||
}
|
||||
.offer_item .qrimage {
|
||||
position: relative !important;
|
||||
width: auto !important;
|
||||
height: auto !important;
|
||||
}
|
||||
.offer_item .vcfbutton {
|
||||
background-color: #1c01a9;
|
||||
color: #fff;
|
||||
padding: 5px 15px;
|
||||
width: fit-content;
|
||||
font-weight: bold;
|
||||
}
|
||||
.messenger {
|
||||
position: relative !important;
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
vertical-align: bottom;
|
||||
}
|
||||
.withoutform {
|
||||
margin-top: 40px;
|
||||
}
|
||||
@ -0,0 +1,84 @@
|
||||
<?if(!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true)die();
|
||||
/** @var array $arParams */
|
||||
/** @var array $arResult */
|
||||
/** @global CMain $APPLICATION */
|
||||
/** @global CUser $USER */
|
||||
/** @global CDatabase $DB */
|
||||
/** @var CBitrixComponentTemplate $this */
|
||||
/** @var string $templateName */
|
||||
/** @var string $templateFile */
|
||||
/** @var string $templateFolder */
|
||||
/** @var string $componentPath */
|
||||
/** @var CBitrixComponent $component */
|
||||
$this->setFrameMode(true);
|
||||
?>
|
||||
<pre><?//print_r($arResult);?></pre>
|
||||
<pre><?//print_r($arParams);?></pre>
|
||||
<?if ($arParams["guid"] & $arParams["name"]) {?>
|
||||
<section class="gray">
|
||||
<div class="container">
|
||||
<h2><span style="color: #1c01a9;"><?=$arParams["name"]?> <?=$arParams["family"]?></span></h2>
|
||||
<p><b><?=$arParams["post"]?></b></p>
|
||||
<p><?=$arParams["dept"]?></p>
|
||||
<div class="leasing_offers_list">
|
||||
<div class="offer_item_boston">
|
||||
<?if($arParams["image"]){?>
|
||||
<img src="data:image/jpeg;base64,<?=$arParams["image"]?>" alt="" />
|
||||
<?}else{?>
|
||||
<img src="/vizitka/img/facelogo.png" alt="" />
|
||||
<?}?>
|
||||
</div>
|
||||
<div class="offer_item">
|
||||
|
||||
<p>
|
||||
<b>Свяжитесь со мной</b>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<?if($arParams["mob"]){?><a href="tel:+<?=$arParams["mobcl"];?>"><?=$arParams["mob"];?> </a><?}?>
|
||||
<?if(($arParams["whatsapp"]=true) && ($arParams["mob"])){?><a href="https://wa.me/<?=$arParams["mobcl"];?>" target="_blank"><img class="messenger" src="./img/WhatsApp.svg" /></a><?}?>
|
||||
<?if($arParams["telegram"]){?><a href="https://t.me/<?=$arParams["telegram"];?>" target="_blank"><img class="messenger" src="./img/Telegram.svg" /></a><?}?>
|
||||
</p>
|
||||
<?if($arParams["tel"]){?><p><a href="tel:+<?=$arParams["telcl"];?>"><?=$arParams["tel"];?></a> <?if($arParams["teladd"]){?>доб. <?=$arParams["teladd"];?></p><?}}?>
|
||||
<?if($arParams["mail"]){?><p><a href="mailto:<?=$arParams["mail"];?>"><?=$arParams["mail"];?></a></p><?}?>
|
||||
<?if($arParams["address"]){?><p><?=$arParams["address"];?></p><?}?>
|
||||
|
||||
<a href=<?=$arParams["vcffile"]?>>
|
||||
<p class="vcfbutton">Скачать визитку на телефон .vcf</p>
|
||||
</a>
|
||||
<a href=<?=$arParams["vcffilewin"]?>>
|
||||
<p class="vcfbutton">Скачать визитку на компьютер .vcf</p>
|
||||
</a>
|
||||
</div>
|
||||
<div class="offer_item">
|
||||
<p>
|
||||
<b>Сохраните контакт на телефон</b>
|
||||
</p>
|
||||
<img class="qrimage" src="./tmp/<?=$arParams["guid"]?>.png" />
|
||||
</div>
|
||||
</div></div>
|
||||
</section>
|
||||
<?} else {?>
|
||||
<section class="gray">
|
||||
<div class="container">
|
||||
<div class="leasing_offers_list">
|
||||
<div class="offer_item">
|
||||
<p style="font-size: 2rem; line-height: 2rem;">
|
||||
<b>Упс! Такой<br />визитки<br />не существует</b>
|
||||
</p>
|
||||
</div>
|
||||
<div class="offer_item">
|
||||
<p style="font-size: 2rem; line-height: 2rem;">
|
||||
<b>Просто позвоните<br />по номеру<br /><a href="tel:88003337575">8 800 333 75 75</a></b>
|
||||
</p>
|
||||
</div>
|
||||
<div class="offer_item">
|
||||
<p style="font-size: 2rem; line-height: 2rem;">
|
||||
<b>или отправьте<br />заявку на лизинг<br />из формы ниже</b>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<?}?>
|
||||
@ -20,7 +20,7 @@
|
||||
<? endif ?>
|
||||
</ul>
|
||||
</nav>
|
||||
<a href="tel:88003337575">8 800 333 75 75</a>
|
||||
<a id="comagic1" href="tel:88003337575">8 800 333 75 75</a>
|
||||
</div>
|
||||
<a href="https://lk.evoleasing.ru/" class="lk" title="Личный кабинет"></a>
|
||||
</div>
|
||||
@ -41,7 +41,7 @@
|
||||
<a href="mailto:buy@evoleasing.ru">buy@evoleasing.ru</a>
|
||||
</div>
|
||||
<div>
|
||||
<a href="tel:88003337575">8 800 333 75 75</a>
|
||||
<a id="comagic2" href="tel:88003337575">8 800 333 75 75</a>
|
||||
</div>
|
||||
<div class="socials">
|
||||
<!--<a href="https://www.instagram.com/evoleasing/" target="_blank" rel="nofollow noopener">
|
||||
|
||||
113
local/users_to_clients.php
Normal file
113
local/users_to_clients.php
Normal file
@ -0,0 +1,113 @@
|
||||
<?
|
||||
//$_SERVER["DOCUMENT_ROOT"] = __DIR__;
|
||||
define('STOP_STATISTICS', true);
|
||||
define('NO_KEEP_STATISTIC', 'Y');
|
||||
define('NO_AGENT_STATISTIC', 'Y');
|
||||
define('DisableEventsCheck', true);
|
||||
define('BX_SECURITY_SHOW_MESSAGE', true);
|
||||
define('NOT_CHECK_PERMISSIONS', true);
|
||||
|
||||
$_SERVER['DOCUMENT_ROOT'] = dirname(__DIR__, 1);
|
||||
require_once($_SERVER['DOCUMENT_ROOT'].'/bitrix/modules/main/include/prolog_before.php');
|
||||
CModule::IncludeModule('iblock');
|
||||
|
||||
$users_res = CUser::GetList([ 'sort' => 'asc' ], 'desc', [], [ "SELECT" => [ "UF_*" ] ]);
|
||||
while($user = $users_res->Fetch())
|
||||
{
|
||||
print "user_id = ".$user['ID']."\n";
|
||||
|
||||
if($user['ID'] != 1)
|
||||
{
|
||||
$user_properties = [
|
||||
'COMPANY' => $user['UF_ORG_TITLE'],
|
||||
'INN' => $user['UF_INN'],
|
||||
'KPP' => $user['UF_KPP'],
|
||||
'OGRN' => $user['UF_UF_OGRN'],
|
||||
'ADMINS' => [ $user['ID'] ],
|
||||
'USERS' => [ $user['ID'] ],
|
||||
];
|
||||
|
||||
$ar_new_client = [
|
||||
'IBLOCK_ID' => IBLOCK_ID_CLIENTS,
|
||||
'NAME' => $user['UF_ORG_TITLE'],
|
||||
'CODE' => $user['XML_ID'],
|
||||
'PROPERTY_VALUES' => $user_properties,
|
||||
'ACTIVE' => 'Y', // активен
|
||||
];
|
||||
|
||||
$new_client = new CIBlockElement;
|
||||
if($new_client_id = $new_client->Add($ar_new_client))
|
||||
{
|
||||
print "New ID: ".$new_client_id."\n\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
print "Error: ".$new_client->LAST_ERROR."\n\n";
|
||||
print "EXISTED USER: \n\n";
|
||||
|
||||
$existed_client_res = CIBlockElement::GetList([ 'id' => 'desc' ], [ 'IBLOCK_ID' => IBLOCK_ID_CLIENTS, 'CODE' => $user['XML_ID'] ], false, []);
|
||||
while ($existed_client_element = $existed_client_res->GetNextElement())
|
||||
{
|
||||
$existed_client_record = $existed_client_element->GetFields();
|
||||
$existed_client_record['PROPERTIES'] = $existed_client_element->GetProperties();
|
||||
|
||||
$admins = $existed_client_record['PROPERTIES']['ADMINS']['VALUE'];
|
||||
$users = $existed_client_record['PROPERTIES']['USERS']['VALUE'];
|
||||
|
||||
array_push($admins, $user['ID']);
|
||||
array_push($users, $user['ID']);
|
||||
|
||||
$admins = array_unique($admins);
|
||||
$users = array_unique($users);
|
||||
|
||||
$updated_fields = [
|
||||
'PROPERTY_VALUES' => [
|
||||
'ADMINS' => $admins,
|
||||
'USERS' => $users,
|
||||
]
|
||||
];
|
||||
|
||||
CIBlockElement::SetPropertyValuesEx($existed_client_record['ID'], IBLOCK_ID_CLIENTS, [ 'ADMINS' => $admins, 'USERS' => $users, ]);
|
||||
print $existed_client_record['CODE']." UPDATED\n\n";
|
||||
|
||||
/*
|
||||
if($ai = array_search(20, $admins))
|
||||
{
|
||||
array_splice($admins, $ai, 1);
|
||||
}
|
||||
|
||||
if($ai = array_search(20, $users))
|
||||
{
|
||||
array_splice($users, $ai, 1);
|
||||
}
|
||||
*/
|
||||
/*
|
||||
$updated_client = new CIBlockElement;
|
||||
if($updated_client_result = $updated_client->Update($existed_client_record['ID'], $updated_fields))
|
||||
{
|
||||
print "UPDATED\n\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
print "UPDATE ERROR: ".$updated_client->LAST_ERROR."\n\n";
|
||||
}
|
||||
*/
|
||||
|
||||
//print_r($existed_client_record);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
$rules_res = CIBlockElement::GetList([ 'id' => 'desc' ], [ 'PROPERTY_USER.' => '' ], false, $options);
|
||||
while ($rules_ob_element = $rules_res->GetNextElement())
|
||||
{
|
||||
$rules_ar_res = $rules_ob_element->GetFields();
|
||||
$rules_ar_res['PROPERTIES'] = $rules_ob_element->GetProperties();
|
||||
}
|
||||
*/
|
||||
}
|
||||
}
|
||||
|
||||
die();
|
||||
|
||||
?>
|
||||
@ -1 +0,0 @@
|
||||
PHP Fatal error: require(): Failed opening required '/bitrix/header.php' (include_path='.:/usr/share/pear:/usr/share/php') in /home/bitrix/www/local/yasprav.php on line 3
|
||||
1
mailru-domain4Ghb7ZTpPY5uXUCS.html
Normal file
1
mailru-domain4Ghb7ZTpPY5uXUCS.html
Normal file
@ -0,0 +1 @@
|
||||
mailru-domain: 4Ghb7ZTpPY5uXUCS
|
||||
3
vizitka/.section.php
Normal file
3
vizitka/.section.php
Normal file
@ -0,0 +1,3 @@
|
||||
<?
|
||||
$sSectionName="Boston Auto";
|
||||
?>
|
||||
3
vizitka/img/.section.php
Normal file
3
vizitka/img/.section.php
Normal file
@ -0,0 +1,3 @@
|
||||
<?
|
||||
$sSectionName="img";
|
||||
?>
|
||||
1
vizitka/img/Telegram.svg
Normal file
1
vizitka/img/Telegram.svg
Normal file
@ -0,0 +1 @@
|
||||
<svg id="Icons" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 215 215"><defs><style>.cls-1{fill:url(#Безымянный_градиент_2);}.cls-2{fill:#fff;fill-rule:evenodd;}</style><linearGradient id="Безымянный_градиент_2" y1="107.5" x2="215" y2="107.5" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#2aabee"/><stop offset="1" stop-color="#229ed9"/></linearGradient></defs><g id="Telegram"><circle id="Background" class="cls-1" cx="107.5" cy="107.5" r="107.5"/><path id="Telegram-2" data-name="Telegram" class="cls-2" d="M603.31,105.65q46.89-20.43,62.53-26.94c29.78-12.38,36-14.53,40-14.61A7.09,7.09,0,0,1,710,65.35a4.49,4.49,0,0,1,1.53,2.9,19.25,19.25,0,0,1,.18,4.23c-1.61,17-8.6,58.09-12.15,77.08-1.5,8-4.46,10.73-7.33,11-6.22.57-11-4.12-17-8.07-9.44-6.19-14.77-10-23.93-16.08-10.59-7-3.72-10.81,2.31-17.07,1.58-1.64,29-26.6,29.54-28.86a2.18,2.18,0,0,0-.5-1.9,2.49,2.49,0,0,0-2.22-.21q-1.41.31-45.22,29.89-6.42,4.41-11.63,4.3c-3.83-.09-11.19-2.17-16.67-4-6.71-2.18-12-3.33-11.58-7Q595.7,108.68,603.31,105.65Z" transform="translate(-554)"/></g></svg>
|
||||
|
After Width: | Height: | Size: 1.1 KiB |
1
vizitka/img/WhatsApp.svg
Normal file
1
vizitka/img/WhatsApp.svg
Normal file
@ -0,0 +1 @@
|
||||
<svg id="Icons" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 215 215"><defs><style>.cls-1{fill:#25d366;}.cls-2,.cls-3{fill:#fff;}.cls-3{fill-rule:evenodd;}</style></defs><g id="WhatsApp"><circle id="Background" class="cls-1" cx="107.5" cy="107.5" r="107.5"/><g id="WhatsApp-2" data-name="WhatsApp"><path id="WhatsApp-3" data-name="WhatsApp" class="cls-2" d="M885.91,161l7.55-27.56a53.18,53.18,0,1,1,46.09,26.64h0a53.18,53.18,0,0,1-25.41-6.48Zm29.5-17,1.62,1a44.21,44.21,0,0,0,22.5,6.17h0a44.22,44.22,0,1,0-37.45-20.72l1,1.67-4.47,16.31Z" transform="translate(-831)"/><path id="WhatsApp-4" data-name="WhatsApp" class="cls-3" d="M966.34,119.54c-.33-.56-1.22-.89-2.55-1.55s-7.86-3.88-9.08-4.33-2.1-.66-3,.67-3.43,4.32-4.2,5.21-1.56,1-2.88.33A36.31,36.31,0,0,1,934,113.28a40,40,0,0,1-7.39-9.21c-.78-1.33-.09-2,.58-2.71s1.33-1.56,2-2.33a8.84,8.84,0,0,0,1.33-2.22,2.47,2.47,0,0,0-.11-2.33c-.33-.66-3-7.2-4.1-9.86s-2.17-2.24-3-2.29-1.66,0-2.54,0A4.89,4.89,0,0,0,917.17,84,14.91,14.91,0,0,0,912.52,95c0,6.54,4.76,12.86,5.43,13.75s9.37,14.31,22.7,20.06a75.55,75.55,0,0,0,7.58,2.8,18.27,18.27,0,0,0,8.37.53c2.55-.38,7.86-3.22,9-6.32S966.67,120.09,966.34,119.54Z" transform="translate(-831)"/></g></g></svg>
|
||||
|
After Width: | Height: | Size: 1.2 KiB |
BIN
vizitka/img/facelogo.png
Normal file
BIN
vizitka/img/facelogo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 9.5 KiB |
32
vizitka/index.php
Normal file
32
vizitka/index.php
Normal file
@ -0,0 +1,32 @@
|
||||
<?
|
||||
require($_SERVER["DOCUMENT_ROOT"]."/bitrix/header.php");
|
||||
$APPLICATION->SetTitle("Эволюция автолизинга: Приятно познакомиться");
|
||||
?>
|
||||
<section data-page="about">
|
||||
<?
|
||||
$request = \Bitrix\Main\Context::getCurrent()->getRequest();
|
||||
$request->getQueryList()->toArray();
|
||||
$guid = $request->get("user");
|
||||
|
||||
$APPLICATION->IncludeComponent(
|
||||
"evolution:vizitka",
|
||||
"",
|
||||
Array(
|
||||
"guid" => $guid,
|
||||
)
|
||||
); ?>
|
||||
|
||||
<article>
|
||||
<!--
|
||||
<?$APPLICATION->IncludeComponent(
|
||||
"evolution:form.leasing.nomail",
|
||||
"",
|
||||
Array()
|
||||
);?>
|
||||
-->
|
||||
<div class="withoutform"><br /></div>
|
||||
</article>
|
||||
|
||||
</section>
|
||||
|
||||
<?require($_SERVER["DOCUMENT_ROOT"]."/bitrix/footer.php");?>
|
||||
BIN
vizitka/logo.png
Normal file
BIN
vizitka/logo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 7.8 KiB |
Loading…
x
Reference in New Issue
Block a user