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 | |
$template = <<<HTML | |
<!doctype html> | |
<html lang="ru"> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<title>ChiefSlider</title> |
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 () { | |
// функция для создания элемента, который в дальнейшем будет использоваться сервисами AdSense и РСЯ для размещения в нём рекламы | |
function createAd(id, className) { | |
var hasYandex = className === 'adsbyyandex'; | |
var tag = hasYandex ? 'div' : 'ins'; | |
var $element = document.createElement(tag); | |
$element.className = className; | |
if (hasYandex) { | |
$element.id = id; | |
} else { |
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 | |
/* | |
* Форма обратной связи (https://itchief.ru/lessons/php/feedback-form-for-website) | |
* Copyright 2016-2020 Alexander Maltsev | |
* Licensed under MIT (https://github.com/itchief/feedback-form/blob/master/LICENSE) | |
*/ | |
header('Content-Type: application/json'); |
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 | |
// id опроосов | |
$polls = array('pool-1'); | |
// Если запрос не AJAX (XMLHttpRequest), то завершить работу | |
if (empty($_SERVER['HTTP_X_REQUESTED_WITH']) || $_SERVER['HTTP_X_REQUESTED_WITH'] != 'XMLHttpRequest') {return;} | |
if (empty($_POST['id'])) {exit();} | |
// удаляем теги и кодируем специальные символы |
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 | |
// Загрузим PHP клиентскую библиотеку для Google API. | |
require_once __DIR__ . '/vendor/autoload.php'; | |
$analytics = initializeAnalytics(); | |
$response = getReport($analytics); | |
//printResults($response); | |
printResultInFile($response); |
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 | |
// Загрузим PHP клиентскую библиотеку для Google API. | |
require_once __DIR__ . '/vendor/autoload.php'; | |
$analytics = initializeAnalytics(); | |
$response = getReport($analytics); | |
printResults($response); | |
/** |
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 | |
// Загрузим PHP клиентскую библиотеку для Google API. | |
require_once __DIR__ . '/vendor/autoload.php'; | |
$analytics = initializeAnalytics(); | |
$response = getReport($analytics); | |
printResults($response); | |
//printResultsAsJson($response); |
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
@font-face { | |
font-family: "Glyphicons Halflings"; | |
src: url("../fonts/glyphicons-halflings-regular.eot"); | |
src: url("../fonts/glyphicons-halflings-regular.eot?#iefix") format("embedded-opentype"), url("../fonts/glyphicons-halflings-regular.woff2") format("woff2"), url("../fonts/glyphicons-halflings-regular.woff") format("woff"), url("../fonts/glyphicons-halflings-regular.ttf") format("truetype"), url("../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular") format("svg"); | |
} | |
.glyphicon { | |
position: relative; | |
top: 1px; | |
display: inline-block; | |
font-family: "Glyphicons Halflings"; |
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
$('.circle-slider').find('.slider-arrow.next').on('click', function () { | |
$this = $(this).closest('.circle-slider'); | |
var index = parseInt($this.attr('data-state')) + 1; | |
if (index <= $this.find('.item').length) { | |
$this.attr('data-state', index); | |
} else { | |
$this.attr('data-state', 1); | |
} | |
}); |