This file contains hidden or 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
let documentsSlider = document.querySelectorAll('.documents-slider'); | |
let documentsPrevItem = document.querySelectorAll('.documents-prev__item'); | |
let close = document.querySelectorAll('.close'); | |
let jsSl = document.querySelectorAll('.js-sl'); | |
var sliderRefresh = false; | |
jQuery(document).ready(function() { | |
$(documentsSlider).hide(); | |
$(documentsPrevItem).on('click', function() { | |
$(this).children(documentsSlider).css("display", "flex"); |
This file contains hidden or 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() { | |
// 'use strict'; | |
// let offset = $('.header').offset(); | |
// $(window).scroll(function() { | |
// if ($(window).scrollTop() > offset.top) { | |
// $('.header').addClass('fixedHeader'); | |
// } else { |
This file contains hidden or 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
$.ajax({ | |
url: "../../get-documents.php", | |
type: "GET", | |
dataType: "json", | |
success: function (data) { | |
var diplomas = data.key1; | |
var certificates = data.key2; | |
var licenses = data.key3; | |
$.each(diplomas, function(i, filename) { | |
$('.js-sl-diplomas').prepend("<div class='sl__slide'><div class='sl__img'><img src='"+ filename +"'></div></div>"); |
This file contains hidden or 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 | |
use PHPMailer\PHPMailer\PHPMailer; | |
use PHPMailer\PHPMailer\Exception; | |
require 'PHPMailer/src/PHPMailer.php'; | |
require 'PHPMailer/src/Exception.php'; | |
require 'PHPMailer/src/SMTP.php'; | |
require_once "recaptchalib.php"; // recaptcha обработчик |
This file contains hidden or 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
<script> | |
// Google docs (documents viewer) | |
function showDocs(oLink) { | |
var oBlock = oLink.getElementsByTagName('div')[0]; | |
var oIframe = oLink.getElementsByTagName('iframe')[0]; | |
var oIframeUrl = oLink.getAttribute('url-show'); | |
if(oBlock.style.height == 0+'px') { | |
oBlock.style.height = 980+'px'; | |
if(oIframe.src != oIframeUrl) {oIframe.src = oIframeUrl}; | |
} else { |
This file contains hidden or 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 | |
$args = array( | |
'post_type' => 'page', | |
'name__like' => $_GET['s'], | |
); | |
$query = new WP_Query( $args ); ?> | |
<?php if ( have_posts() ): ?> | |
<h2>Search Results for '<?php echo get_search_query(); ?>'</h2> | |
<ol> |
This file contains hidden or 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 true_apply_categories_for_pages(){ | |
add_meta_box( 'categorydiv', 'Категории', 'post_categories_meta_box', 'page', 'side', 'normal'); // добавляем метабокс категорий для страниц | |
register_taxonomy_for_object_type('category', 'page'); // регистрируем рубрики для страниц | |
} | |
// обязательно вешаем на admin_init | |
add_action('admin_init','true_apply_categories_for_pages'); | |
function true_expanded_request_category($q) { | |
if (isset($q['category_name'])) // если в запросе присутствует параметр рубрики |
This file contains hidden or 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 | |
// Подключение в init.php вашего сайта | |
use Bitrix\Main\Loader; | |
use Bitrix\Main\SystemException; | |
class AllProductDiscount{ | |
/** | |
* @return XML_ID|array | |
* @throws SystemException | |
* @throws \Bitrix\Main\LoaderException |
OlderNewer