$sql = "SELECT DISTINCT m.id, m.pagetitle FROM `table1` m
INNER JOIN
(SELECT DISTINCT `resource_id` FROM `filters`
WHERE `filter_id` IN(".$filters.")
GROUP BY `resource_id`
HAVING COUNT(`filter_id`) >= $count) f
ON m.id = f.resource_id
WHERE m.template='$template' AND m.published='1' AND m.deleted='0' AND m.isfolder='0'";
$lead = [
array(
'name' => $form['cfg']['subject'], // название сделки
'status_id' => 46799449, // этап
'pipeline_id' => 5200315, // воронка
'price' => 0, // цена
'responsible_user_id' => 7982008, // id ответственного
'custom_fields_values' => array( // доп поля
array(
'field_id' => 301273, // id поля, можно посмотреть нажав сделка->настройки->нужное поле
'values' => array(
array(
'value' => $_POST['radio1'] // добавили значение
)
),
),
array(
'field_id' => 301109,
'values' => array(
array(
'value' => $_POST['radio2']
)
),
),
array(
'field_id' => 301395,
'values' => array(
array(
'value' => $_POST['radio3']
)
),
),
),
'_embedded' => array(
'contacts' => array(
'0' => array(
'id' => $contact_id
)
),
'tags' => array(
'0' => array(
'id' => 14069
)
),
)
),
];
function inViewChangeOpacity(elem){
var windowScrollTop = $(window).scrollTop(),
windowHeight = $(window).outerHeight(),
elOffset = $(elem).offset().top,
elHeight = $(elem).outerHeight(),
elBottom = elOffset + elHeight,
bottom_of_screen = windowScrollTop + windowHeight - 100,
opacity = 1 - (windowScrollTop - elOffset + elHeight) / elHeight,
opacity2 = 1 + (bottom_of_screen - elBottom) / (elHeight / 2) ;
if(opacity >= 1) opacity = 1;
if(opacity2 >= 1) opacity2 = 1;
if(opacity <= 0) opacity = 0;
if(opacity2 <= 0) opacity2 = 0;
if(bottom_of_screen - elHeight > elOffset && windowScrollTop < elBottom + elHeight){
$(elem).css('opacity', opacity);
}
else{
$(elem).css('opacity', opacity2);
}
}
inViewChangeOpacity('.test');
$(window).on('scroll resize', function(event){
inViewChangeOpacity('.test');
});
input,button,textarea,select{-webkit-appearance:none;-moz-appearance:none;appearance:none;-webkit-border-radius:0px}input[type="checkbox"]{-webkit-appearance:checkbox;-moz-appearance:checkbox;appearance:checkbox}input[type="radio"]{-webkit-appearance:radio;-moz-appearance:radio;appearance:radio-button}
function changeSelected(){
if (window.getSelection() == '') {
return false;
}
var range = window.getSelection().getRangeAt(0);
var selectionContents = range.extractContents();
var span = document.createElement("span");
span.appendChild(selectionContents);
span.setAttribute("class", "selected");
span.style.backgroundColor = "yellow";
span.style.color = "green";
range.insertNode(span);
}
document.selection?
$(".fio").keyup(function(){
$(this).data('value', $(this).val() );
});
$(".shippingMethod").change(function(){
let v = $(this).val();
console.log(v);
if(v == 'pickup'){
$(".fio").val("самовывоз")
}
else {
$(".fio").each(function(){
$(this).val( $(this).data('value') );
});
}
});
// Version
define('VERSION', '3.0.3.3');
// Configuration
require_once($_SERVER['DOCUMENT_ROOT'].'/config.php');
// Startup
require_once(DIR_SYSTEM . 'startup.php');
// DB
$db = new DB(DB_DRIVER, DB_HOSTNAME, DB_USERNAME, DB_PASSWORD, DB_DATABASE, DB_PORT);
$query = $db->query("SELECT `value` FROM `" . DB_PREFIX . "setting` WHERE `key` = 'config_email' AND `store_id` = 0 LIMIT 1");
if ($query->num_rows) {
$email = $query->row['value'];
} else {
$email = 'не найдено';
}
echo 'Email магазина: ' . $email;
if ($this->user->hasPermission('access', 'catalog/product')) {
$catalog[] = array(
'name' => $this->language->get('text_product'),
'href' => $this->url->link('catalog/product', 'user_token=' . $this->session->data['user_token'], true),
'children' => array()
);
}
if ($this->user->hasPermission('access', 'extension/module/featured')) {
$catalog[] = array(
'name' => 'Название нашей ссылки, например Акционные товары',
'href' => $this->url->link('extension/module/featured', 'user_token=' . $this->session->data['user_token'].'&module_id=38', true),
'children' => array()
);
}