Орла
Области
Компаний
Пользователи
Галерея
Фиксированные новости
Орла
Отзывы о фирмах
Тарифы
Пользователи
Области
Банкоматы
Торговые точки
Доска объявлений
Курсы валют
Скидки
организации Орла
организации области
товары
сайты
сайты Орел
Данные
Разделы
Поиск
Поиск запросы
Статистика
Показы каталога организаций
Статистика клиенты
Пользователи
Сайты
Управление сайтом
Анкета
Аптеки
Афиша
Афиша новая
Баннеры
Бизнес >
Викторина
Голосование
Гость на сайте
Истории
Календарь событий
Каталоги >
Конкурс красоты
Конкурс аудио
Консультации
Меню
Новое на сайте
Новости >
Организации >
Программа ТВ
Публикации
Разделы сайта
Рассылка
Рестораны
Секрет фирмы >
Сервисы >
Ссылки
Тесты
Файловый менеджер
Форум
Фотогалерея
Обратная связь
Недвижимость
Новый год
Тексты
Пользователи
Юридический рейтинг
Отзывы на товары
Бан пользователей
Жалобы
Новые тесты
Коронавирус
Файловый менеджер
Имя файла
index.php
Содержимое
<?php /** * Р’РёРґ для СЃРїРёСЃРєР° баннеров */ use app\core\helpers\StringHelper; use app\core\helpers\RuDate; ?> <?php /** * Просмотр информации РѕР± организации */ ?> <script type="text/javascript" src="/library/js/ckeditor/ckeditor.js"></script> <div class="uk-container uk-container-center"> <div class="uk-grid"> <div class="uk-width-xlarge-4-5 uk-width-large-7-10 uk-width-medium-7-10 uk-width-small-1-1"> <div class="page-header"> <h1> <a href="#"> <span class="orange">РЎРїРёСЃРѕРє </span> баннеров </a> </h1> </div> <section> <?php if (count($banners) > 0) { ?> <table class="uk-table table-bordered uk-margin-top"> <thead> <tr> <th></th> <th>Дата</th> <th>Название баннера</th> <th>Alt</th> <th>Баланс</th> <th>Места</th> <th>Статистика</th> </tr> </thead> <tbody> <?php foreach ($banners as $banner) { ?> <?php $locations = \app\organizations\banners\BannersLocation::getLocationsStringArray($banner['id']); ?> <tr> <td> <?php if (StringHelper::mbStrPosArray($banner['file'], ['.gif', '.jpg', '.png', '.bmp'])) { echo '<img src="/' . $banner['file'] . '" style="max-width: 100px; max-height:100px">'; } else { if ($banner['file2'] != null) { echo '<img src="/' . $banner['file2'] . '" style="max-width: 100px; max-height:100px">'; } } ?> </td> <td> <?=date('d.m.Y', strtotime($banner['data']));?> - <?=date('d.m.Y', strtotime($banner['data_end']));?> </td> <td> <?=$banner['name'];?> </td> <td> <?=$banner['alt'];?> </td> <td> <?=$banner['balance'];?> </td> <td> <?php if (count($locations) > 4) { ?> <a href="#locations-modal-<?=$banner['id'];?>" data-uk-modal> <button type="button" class="uk-button btn-gray"> Показать (<?=count($locations);?>) </button> </a> <?php } else { ?> <?=implode(', ', $locations);?> <?php } ?> <div id="locations-modal-<?=$banner['id'];?>" class="uk-modal"> <div class="uk-modal-dialog <?php if (count($locations) > 10) { echo 'uk-modal-dialog-large'; } ?>"> <button type="button" class="uk-modal-close uk-close"></button> <div class="uk-padding"> <p style="text-align: center"> <?=implode(', ', $locations);?> </p> </div> </div> </div> </td> <td> <button type="button" class="uk-button btn-gray banner-stat-button" data-banner-id="<?=$banner['id'];?>"> Статистика </button> </td> </tr> <?php } ?> </tbody> </table> <?php } ?> </section> </div> <?php App::$view->render('user/organizations/sidebar'); ?> </div> </div> <div id="statistics-modal" class="uk-modal"> <div class="uk-modal-dialog uk-modal-dialog-large"> <button type="button" class="uk-modal-close uk-close"></button> <div class="uk-padding uk-grid"> <div class="uk-width-4-10 banner-statistic-toolbar"> <form class="uk-form uk-form-horizontal jq-banner-stat-form"> <div class="uk-form-row"> <input type="text" name="date_start" placeholder="Начало" style="width: 120px" data-uk-datepicker="{format:'YYYY-MM-DD', pos: 'bottom'}"> - <input type="text" name="date_end" placeholder="Окончание" style="width: 120px" data-uk-datepicker="{format:'YYYY-MM-DD', pos: 'bottom'}"> <button type="submit" name="send_statistic_query" class="uk-button btn-orange">Показать</button> </div> </form> </div> <div class="uk-width-6-10 banner-statistic-toolbar"> <button type="button" data-date-start="<?=date('Y-m-d', strtotime('first day of this month'));?>" data-date-end="<?=date('Y-m-d');?>" class="jq-month-stat uk-button btn-gray"> Ртот месяц </button> <?php for ($i = 1; $i <= 3; $i++) { $monthTime = strtotime('-' . $i . ' months'); $month = date('m', $monthTime); $year = date('Y', $monthTime); $firstDate = date('Y-m-d', strtotime('first day of -' . $i . ' months')); $lastDate = date('Y-m-d', strtotime('last day of -' . $i . ' months')); echo' <button type="button" data-date-start="'.$firstDate.'" data-date-end="'.$lastDate.'" class="jq-month-stat uk-button btn-gray"> '.RuDate::getRuMonth($month).' ' . $year . ' </button> '; } ?> </div> </div> <ul class="uk-tab jq-stat-tabs" data-uk-switcher="{connect:'#statistics-container'}"> <li><a href="">Статистика</a></li> <li><a href="">Просмотры</a></li> <li><a href="">Клики</a></li> </ul> <!-- This is the container of the content items --> <ul id="statistics-container" class="uk-switcher"> <li> <div class="banner-statistic-chart" style="height: 290px"> <div id="curve_chart" style="height: 100%;width:100%"></div> </div> <div class="banner-statistic-chart" style="height: 290px"> <div id="curve_chart_clicks" style="height: 100%;width:100%"></div> </div> </li> <li> <div class="jq-stat-views-component"> <div style="height:500px; overflow-y: scroll"> <table class="uk-table table-bordered"> <thead> <tr> <th>Дата</th> <th>Время</th> <th>IP-адрес</th> </tr> </thead> <tbody class="jq-tbody-stat"></tbody> </table> </div> <div class="jq-stat-pagination uk-padding"></div> </div> </li> <li> <div class="jq-stat-clicks-component"> <div style="height:500px; overflow-y: scroll"> <table class="uk-table table-bordered"> <thead> <tr> <th>Дата</th> <th>Время</th> <th>IP-адрес</th> </tr> </thead> <tbody class="jq-tbody-stat"></tbody> </table> </div> <div class="jq-stat-pagination uk-padding"></div> </div> </li> </ul> </div> </div> <script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script> <script type="text/javascript" src="/js/2.0/banners/statistic.js"></script> <script type="text/javascript"> $(function() { var activeBannerId = null; var modal = UIkit.modal("#statistics-modal"); google.charts.load('current', {'packages':['corechart']}); google.charts.setOnLoadCallback( function() { function drawChart(data, deleteDate) { if (typeof deleteDate == "undefined" || deleteDate == true) { $('input[name=date_start]').val(''); $('input[name=date_end]').val(''); } modal.show(); var options = { title: 'Статистика просмотров СЃ ' + data.date_start + ' РїРѕ ' + data.date_end + ', всего просмотров: ' + data.total_views, pointSize: 6, annotations: { style: 'line', alwaysOutside: true }, backgroundColor: { fill:'transparent' }, focusTarget: 'category', pointShape: 'circle', pointsVisible: true, vAxis: { gridlines: { count: 12 } }, hAxis: { textStyle : { fontSize: 12 } } //width: 900, //height: 400 }; var dataView = google.visualization.arrayToDataTable(data.views); var chart = new google.visualization.ColumnChart(document.getElementById('curve_chart')); chart.draw(dataView, options); var optionsClicks = { title: 'Статистика кликов СЃ ' + data.date_start + ' РїРѕ ' + data.date_end + ', всего кликов: ' + data.total_clicks, pointSize: 6, annotations: { style: 'line', alwaysOutside: true }, backgroundColor: { fill:'transparent' }, focusTarget: 'category', pointShape: 'circle', pointsVisible: true, legend: { position: 'labeled', labeledValueText: 'both', textStyle: { fontSize: 14 } }, vAxis: { gridlines: { count: 12 } }, hAxis: { textStyle : { fontSize: 12 } } //width: 900, //height: 400 }; var dataClicks = google.visualization.arrayToDataTable(data.clicks); dataClicks.addColumn({type: 'number', role: 'annotation'}); var chartClicks = new google.visualization.ColumnChart(document.getElementById('curve_chart_clicks')); chartClicks.draw(dataClicks, optionsClicks); } $('.banner-stat-button').on('click', function() { var $scope = $(this); var oldText = $scope.text(); $scope.text('Загружаем...'); var bannerId = $scope.data('banner-id'); activeBannerId = bannerId; $('.jq-stat-tabs').find('li').removeClass('uk-active').attr('aria-expanded', false); $('.jq-stat-tabs li:first-child').addClass('uk-active').attr('aria-expanded', true); // показываем контентную область активной var $tabsContentItems = $('#statistics-container li'); $tabsContentItems.attr('aria-expanded', false); $tabsContentItems.removeClass('uk-active'); var $tabsContent = $('#statistics-container').find('li:first-child'); $tabsContent.attr('aria-expanded', true); $tabsContent.addClass('uk-active'); BannerStatistic.loadStatistic(bannerId, null, null, function(response) { drawChart(response); $scope.text(oldText); }); new BannerViewsStatistic('/ajax/users/banners/views.php', $('.jq-stat-views-component'), bannerId, null, null); new BannerViewsStatistic('/ajax/users/banners/clicks.php', $('.jq-stat-clicks-component'), bannerId, null, null); }); $('.jq-month-stat').on('click', function() { var $scope = $(this); var oldText = $scope.text(); $scope.text('Загружаем...'); BannerStatistic.loadStatistic(activeBannerId, $scope.data('date-start'), $scope.data('date-end'), function(response) { drawChart(response); $scope.text(oldText); }); new BannerViewsStatistic('/ajax/users/banners/views.php', $('.jq-stat-views-component'), activeBannerId, $scope.data('date-start'), $scope.data('date-end')); new BannerViewsStatistic('/ajax/users/banners/clicks.php', $('.jq-stat-clicks-component'), activeBannerId, $scope.data('date-start'), $scope.data('date-end')); }); $('.jq-banner-stat-form').on('submit', function(e) { e.preventDefault(); var $scope = $(this); var $button = $scope.find('button'); var oldText = $button.text(); $button.text('Загружаем...'); BannerStatistic.loadStatistic(activeBannerId, $scope.find('input[name=date_start]').val(), $scope.find('input[name=date_end]').val(), function(response) { drawChart(response, false); $button.text(oldText); }); new BannerViewsStatistic('/ajax/users/banners/views.php', $('.jq-stat-views-component'), activeBannerId, $scope.find('input[name=date_start]').val(), $scope.find('input[name=date_end]').val()); new BannerViewsStatistic('/ajax/users/banners/clicks.php', $('.jq-stat-clicks-component'), activeBannerId, $scope.find('input[name=date_start]').val(), $scope.find('input[name=date_end]').val()); }) } ); }); </script>
/template/2.0/user/organizations/banners/
Имя
Дата
Размер
..
2020-04-06
index.php
2017-03-21
17 кб.
/template/2.0/user/organizations/banners
Загрузить файлы
Файл 1
Файл 2
Файл 3