This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require_once "Crest/crest.php"; | |
$phone = $_REQUEST['phone']; | |
$name = $_REQUEST['name']; | |
$email = $_REQUEST['email']; | |
$contactListPhone = CRest::call("crm.duplicate.findbycomm",[ | |
"entity_type" => "CONTACT", | |
"type" => "PHONE", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$_monthsList = array(".01." => "январь", ".02." => "февраль", | |
".03." => "март", ".04." => "апрель", ".05." => "май", ".06." => "июнь", | |
".07." => "июль", ".08." => "август", ".09." => "сентябрь", | |
".10." => "октябрь", ".11." => "ноябрь", ".12." => "декабрь"); | |
$_mD = date(".m."); //для замены | |
echo $_monthsList[$_mD]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class CsvReader{ | |
protected $file; | |
public function __construct($filePath) { | |
$this->file = fopen($filePath, 'r'); | |
} | |
public function rows() | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AddEventHandler('sale', 'OnOrderAdd', "bx24AddDeal"); | |
function bx24AddDeal($orderID, &$arFields){ | |
$arOrder = CSaleOrder::GetByID($orderID); | |
//-- получаем телефоны и адрес | |
$order_props = CSaleOrderPropsValue::GetOrderProps($orderID); | |
$phone=""; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
<title>Document</title> | |
</head> | |
<body> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
define('B24_WEBHOOK','https://crm.b/rest/1/7v3c3wrjmtu2obfu/'); | |
function save_utm(){ | |
if( isset( $_GET['utm_source'] ) ) { | |
setcookie('utm_source',$_GET['utm_source'], time()+ (90*86400)); | |
if($_GET['utm_source'] === 'googleads'){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Plugin Name: B24IntegrationForm | |
Author: @bobmv & @xxxnonsense & @padilo300 | |
Description: Интеграция ContactForm7 и CRM Bitrix24. Генерация лидов с привязкой UTM-меток | |
Version: 1.0.1 | |
Author URI: http://padilo.pro | |
*/ | |
define('B24_WEBHOOK','https://bitrix24.ua/rest/1/4yuq0m4u3h3eq73g/'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$img = file_get_contents('https://3dwarehouse.sketchup.com/warehouse/v1.0/publiccontent/3b855d94-6ed8-4f88-a69c-d9a4fcfc052f'); | |
$res = CRest::call('crm.product.add',[ | |
'fields' => [ | |
"NAME" => "1С-Битрикс: Управление сайтом - Старт", | |
'PREVIEW_PICTURE' => [ | |
"fileData" => ['file.png', base64_encode($img)] | |
] | |
] | |
]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function saveUtm(){ | |
let params = (new URL(document.location)).searchParams; | |
if(params.get('utm_source') !== null){ | |
document.cookie = "utm_source="+params.get('utm_source'); | |
} | |
if(params.get('utm_campaign') !== null){ | |
document.cookie = "utm_campaign="+params.get('utm_campaign'); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$link = 'https://padilo.bitrix24.ru/bitrix/components/bitrix/crm.deal.show/show_file.php?auth=9fda3b5f0000071b003ea674000000010000032e4b9b99d6daca9cdb7447656f005971&ownerId=12&fieldName=UF_CRM_1597745815052&dynamic=Y&fileId=150'; | |
$file = file_get_contents($link); | |
$f = finfo_open(); | |
$mime_type = finfo_buffer($f, $file, FILEINFO_MIME_TYPE); | |
echo "<pre>"; | |
var_dump($mime_type); | |
echo "</pre>"; |