<?php
/* Smarty version 4.5.2, created on 2024-08-14 11:29:32
  from '/home/life/public_html/teg.lifestyle.uz/admin/templates/views/main/index.tpl' */

/* @var Smarty_Internal_Template $_smarty_tpl */
if ($_smarty_tpl->_decodeProperties($_smarty_tpl, array (
  'version' => '4.5.2',
  'unifunc' => 'content_66bc951c72c239_67636493',
  'has_nocache_code' => false,
  'file_dependency' => 
  array (
    'cd8dfbad1979f4ccb563cff02c706a832bca861a' => 
    array (
      0 => '/home/life/public_html/teg.lifestyle.uz/admin/templates/views/main/index.tpl',
      1 => 1679630384,
      2 => 'file',
    ),
  ),
  'includes' => 
  array (
    'file:components/page-header.tpl' => 1,
  ),
),false)) {
function content_66bc951c72c239_67636493 (Smarty_Internal_Template $_smarty_tpl) {
$_smarty_tpl->_checkPlugins(array(0=>array('file'=>'/home/life/public_html/teg.lifestyle.uz/includes/composer/vendor/smarty/smarty/libs/plugins/modifier.replace.php','function'=>'smarty_modifier_replace',),));
?>

<?php echo '<script'; ?>
 src="/admin/assets/js/vendor/visualization/echarts/echarts.min.js"><?php echo '</script'; ?>
>

<!-- Page header -->
<?php $_smarty_tpl->smarty->ext->_capture->open($_smarty_tpl, "buttons", null, null);
$_smarty_tpl->smarty->ext->_capture->close($_smarty_tpl);?>

<?php $_smarty_tpl->smarty->ext->_capture->open($_smarty_tpl, "breadcrumb", null, null);?>
	<span class="breadcrumb-item active"><?php echo htmlspecialchars((string)$_smarty_tpl->tpl_vars['title']->value, ENT_QUOTES, 'UTF-8', true);?>
</span>
<?php $_smarty_tpl->smarty->ext->_capture->close($_smarty_tpl);?>

<?php $_smarty_tpl->smarty->ext->_capture->open($_smarty_tpl, "showBy", null, null);?>

<?php $_smarty_tpl->smarty->ext->_capture->close($_smarty_tpl);?>

<?php $_smarty_tpl->_subTemplateRender("file:components/page-header.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array('buttons'=>$_smarty_tpl->smarty->ext->_capture->getBuffer($_smarty_tpl, 'buttons'),'breadcrumb'=>$_smarty_tpl->smarty->ext->_capture->getBuffer($_smarty_tpl, 'breadcrumb'),'showBy'=>$_smarty_tpl->smarty->ext->_capture->getBuffer($_smarty_tpl, 'showBy')), 0, false);
?>
<!-- /page header -->

<?php if (empty($_smarty_tpl->tpl_vars['days']->value)) {?>
	<div class="content d-flex justify-content-center align-items-center">
		<div class="flex-fill">
			<div class="text-center mb-3">
				<h1 class="error-title offline-title">Statistics is empty </h1>
				<div class="row">
					<div class="col-md-6 offset-md-3">
						<div class="alert bg-info text-white alert-styled-left alert-dismissible">
							<span class="font-weight-semibold">Сбор статистики!</span> Нужно включить в настройках.
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
<?php }?>

<div class="content">
	<div class="row">
        <?php if (!empty($_smarty_tpl->tpl_vars['days']->value)) {?>
			<div class="col-xl-12">
				<div class="card border shadow-sm">
					<div class="card-body">
						<div class="chart-container">
							<div class="chart has-fixed-height" id="stats_users"></div>
						</div>
					</div>
				</div>
			</div>

			<div class="col-xl-12">
				<div class="card border shadow-sm">
					<div class="card-body">
						<div class="chart-container">
							<div class="chart has-fixed-height" id="stats_contents"></div>
						</div>
					</div>
				</div>
			</div>
        <?php }?>

		<div class="col-xl-12">
			<div class="card border shadow-sm">
				<div class="card-body p-0">
					<ul class="nav nav-tabs nav-tabs-solid border-0 mb-0">
						<li class="nav-item"><a href="#info" class="nav-link active" data-bs-toggle="tab"><span class="ph-gear me-2"></span>Автопроверка системы</a></li>
						<li class="nav-item"><a href="#notice" class="nav-link" data-bs-toggle="tab"><span class="ph-note-pencil me-2"></span>Заметки</a></li>

					</ul>

					<div class="tab-content">
						<div class="tab-pane fade show active" id="info">
							<div class="table-responsive">
								<table class="table table-striped table-xs">
									<tbody>
									<tr><td>Операционная система:</td>                      <td><?php echo htmlspecialchars((string)$_smarty_tpl->tpl_vars['os_version']->value, ENT_QUOTES, 'UTF-8', true);?>
</td></tr>
									<tr><td>Версия PHP:</td>                                <td><?php echo htmlspecialchars((string)$_smarty_tpl->tpl_vars['php_version']->value, ENT_QUOTES, 'UTF-8', true);?>
</td></tr>
									<tr><td>Версия MySQL:</td>                              <td><?php echo htmlspecialchars((string)$_smarty_tpl->tpl_vars['mysql_version']->value, ENT_QUOTES, 'UTF-8', true);?>
</td></tr>
									<tr><td>Размер базы данных:</td>                        <td><?php echo htmlspecialchars((string)$_smarty_tpl->tpl_vars['mysql_size']->value, ENT_QUOTES, 'UTF-8', true);?>
</td></tr>
									<tr><td>Обработчик изображений:</td>                    <td><?php echo htmlspecialchars((string)smarty_modifier_replace($_smarty_tpl->tpl_vars['gd_version']->value,"&nbsp;"," "), ENT_QUOTES, 'UTF-8', true);?>
</td></tr>
									<tr><td>Module mod_rewrite</td>                         <td><?php echo htmlspecialchars((string)$_smarty_tpl->tpl_vars['mod_rewrite']->value, ENT_QUOTES, 'UTF-8', true);?>
</td></tr>
									<tr><td>Выделено оперативной памяти:</td>               <td><?php echo htmlspecialchars((string)$_smarty_tpl->tpl_vars['max_memory']->value, ENT_QUOTES, 'UTF-8', true);?>
</td></tr>
									<tr><td>Отключенные функции:</td>                       <td><?php echo htmlspecialchars((string)$_smarty_tpl->tpl_vars['disabled_functions']->value, ENT_QUOTES, 'UTF-8', true);?>
</td></tr>
									<tr><td>Максимальный размер загружаемого файла:</td>    <td><?php echo htmlspecialchars((string)$_smarty_tpl->tpl_vars['upload_max_filesize']->value, ENT_QUOTES, 'UTF-8', true);?>
</td></tr>
									<tr><td>Размер свободного места на диске:</td>          <td><?php echo htmlspecialchars((string)$_smarty_tpl->tpl_vars['disk_free_space']->value, ENT_QUOTES, 'UTF-8', true);?>
</td></tr>
									</tbody>
								</table>
							</div>
						</div>

						<div class="tab-pane fade" id="notice">
							<textarea id="notice_text" name="notice" class="form-control p-2" style="width:100%;height:200px;" placeholder="Здесь вы можете сохранять собственные заметки и памятки."><?php echo htmlspecialchars((string)$_smarty_tpl->tpl_vars['notice']->value, ENT_QUOTES, 'UTF-8', true);?>
</textarea>
							<button id="send_notice" name="send_notice" class="btn btn-sm btn-success m-2"><i class="ph-floppy-disk me-2"></i> Сохранить</button>
						</div>
					</div>
				</div>
			</div>
		</div>

	</div>
</div>

<?php echo '<script'; ?>
>

    var EchartsLines = function() {

        var _notice = function () {
            $('#send_notice').on('click', function() {
                $('#send_notice').html('<i class="icon-spinner spinner mr-2"></i>  Сохраняется');
                var notice_text = $('#notice_text').val();
                console.log(notice_text);
                $.post("<?php echo htmlspecialchars((string)$_smarty_tpl->tpl_vars['adminUrl']->value, ENT_QUOTES, 'UTF-8', true);?>
/main?action=notice", { notice: notice_text } , function( response ) {
                    console.log(response);
                    $('#send_notice').html('<i class="ph-floppy-disk me-2"></i>  Сохранить');
                });
                return false;
            });
        }

        var _lineChartExamples = function() {
            if (typeof echarts == 'undefined') {
                console.warn('Warning - echarts.min.js is not loaded.');
                return;
            }

            var stats_users = document.getElementById('stats_users');
            var stats_contents = document.getElementById('stats_contents');

            <?php if ((isset($_smarty_tpl->tpl_vars['days']->value))) {?>

            if (stats_users) {
                // Initialize chart
                var line_zoom = echarts.init(stats_users, null, { renderer: 'svg', useDirtyRect: false });

                // Options
                line_zoom.setOption({
                    title: { text: 'Посетители' },
                    color: ['#80FFA5', '#00DDFF', '#ff9300'],
                    textStyle: { fontFamily: 'Roboto, Arial, Verdana, sans-serif', fontSize: 13 },
                    animationDuration: 750,
                    grid: { left: 0, right: 10, top: 35, bottom: 50, containLabel: true },
                    legend: { data: [ 'Новые посетители', 'Вернувшиеся посетители', 'Всего посетителей' ], itemHeight: 8, itemGap: 20 },
                    tooltip: { trigger: 'axis', axisPointer: { label: { backgroundColor: '#6a7985' } }, padding: [10, 15], textStyle: { fontSize: 13, fontFamily: 'Roboto, sans-serif' } },
                    // toolbox: { feature: { saveAsImage: { } } },

                    xAxis: [ { type: 'category', boundaryGap: false, data: [ <?php
$_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['days']->value, 'day', false, NULL, 'days', array (
  'last' => true,
  'iteration' => true,
  'total' => true,
));
$_smarty_tpl->tpl_vars['day']->do_else = true;
if ($_from !== null) foreach ($_from as $_smarty_tpl->tpl_vars['day']->value) {
$_smarty_tpl->tpl_vars['day']->do_else = false;
$_smarty_tpl->tpl_vars['__smarty_foreach_days']->value['iteration']++;
$_smarty_tpl->tpl_vars['__smarty_foreach_days']->value['last'] = $_smarty_tpl->tpl_vars['__smarty_foreach_days']->value['iteration'] === $_smarty_tpl->tpl_vars['__smarty_foreach_days']->value['total'];
?> '<?php echo htmlspecialchars((string)$_smarty_tpl->tpl_vars['day']->value['date'], ENT_QUOTES, 'UTF-8', true);?>
'<?php if (!(isset($_smarty_tpl->tpl_vars['__smarty_foreach_days']->value['last']) ? $_smarty_tpl->tpl_vars['__smarty_foreach_days']->value['last'] : null)) {?>,<?php }?> <?php
}
$_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl, 1);?> ] } ],
                    yAxis: [ { type: 'value',  axisLabel: { color: '#333' },
                        axisLine: { lineStyle: { color: '#999' } },
                        splitLine: { lineStyle: { color: ['#eee'] } },
                        splitArea: { show: true, areaStyle: { color: ['rgba(250,250,250,0.1)', 'rgba(0,0,0,0.01)'] }} } ],

                    dataZoom: [
                        { type: 'inside',  start: 92, end: 100 },
                        { show: true, type: 'slider', start: 92, end: 100, height: 40, bottom: 0, borderColor: '#26a69a', fillerColor: 'rgba(38,166,154,0.29)', handleStyle: { color: '#26a69a' }}
                    ],
                    series: [
                        {
                            name: 'Новые посетители', type: 'line', stack: 'Total', smooth: true, lineStyle: { width: 0 }, showSymbol: false,
                            areaStyle: { opacity: 0.8, color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [ { offset: 0, color: 'rgb(128, 255, 165)' }, { offset: 1, color: 'rgb(1, 191, 236)' } ]) },
                            emphasis: { focus: 'series' },
                            data: [<?php
$_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['days']->value, 'day', false, NULL, 'days', array (
  'last' => true,
  'iteration' => true,
  'total' => true,
));
$_smarty_tpl->tpl_vars['day']->do_else = true;
if ($_from !== null) foreach ($_from as $_smarty_tpl->tpl_vars['day']->value) {
$_smarty_tpl->tpl_vars['day']->do_else = false;
$_smarty_tpl->tpl_vars['__smarty_foreach_days']->value['iteration']++;
$_smarty_tpl->tpl_vars['__smarty_foreach_days']->value['last'] = $_smarty_tpl->tpl_vars['__smarty_foreach_days']->value['iteration'] === $_smarty_tpl->tpl_vars['__smarty_foreach_days']->value['total'];
?> <?php echo htmlspecialchars((string)$_smarty_tpl->tpl_vars['day']->value['newVisitors'], ENT_QUOTES, 'UTF-8', true);
if (!(isset($_smarty_tpl->tpl_vars['__smarty_foreach_days']->value['last']) ? $_smarty_tpl->tpl_vars['__smarty_foreach_days']->value['last'] : null)) {?>, <?php }
}
$_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl, 1);?>],
                        },
                        {
                            name: 'Вернувшиеся посетители', type: 'line', stack: 'Total', smooth: true, lineStyle: { width: 0 }, showSymbol: false,
                            areaStyle: { opacity: 0.8, color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [ { offset: 0, color: 'rgb(0, 221, 255)' }, { offset: 1, color: 'rgb(77, 119, 255)' } ]) },
                            emphasis: { focus: 'series' },
                            data: [<?php
$_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['days']->value, 'day', false, NULL, 'days', array (
  'last' => true,
  'iteration' => true,
  'total' => true,
));
$_smarty_tpl->tpl_vars['day']->do_else = true;
if ($_from !== null) foreach ($_from as $_smarty_tpl->tpl_vars['day']->value) {
$_smarty_tpl->tpl_vars['day']->do_else = false;
$_smarty_tpl->tpl_vars['__smarty_foreach_days']->value['iteration']++;
$_smarty_tpl->tpl_vars['__smarty_foreach_days']->value['last'] = $_smarty_tpl->tpl_vars['__smarty_foreach_days']->value['iteration'] === $_smarty_tpl->tpl_vars['__smarty_foreach_days']->value['total'];
?> <?php echo htmlspecialchars((string)$_smarty_tpl->tpl_vars['day']->value['retVisitors'], ENT_QUOTES, 'UTF-8', true);
if (!(isset($_smarty_tpl->tpl_vars['__smarty_foreach_days']->value['last']) ? $_smarty_tpl->tpl_vars['__smarty_foreach_days']->value['last'] : null)) {?>, <?php }
}
$_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl, 1);?>],
                        },
                        {
                            name: 'Всего посетителей', type: 'line', stack: 'Total', smooth: true, lineStyle: { width: 0 }, showSymbol: false,
                            areaStyle: { opacity: 0.8, color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [ { offset: 0, color: 'rgb(255, 191, 0)' }, { offset: 1, color: 'rgb(224, 62, 76)' } ]) },
                            emphasis: { focus: 'series' },

                            data: [<?php
$_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['days']->value, 'day', false, NULL, 'days', array (
  'last' => true,
  'iteration' => true,
  'total' => true,
));
$_smarty_tpl->tpl_vars['day']->do_else = true;
if ($_from !== null) foreach ($_from as $_smarty_tpl->tpl_vars['day']->value) {
$_smarty_tpl->tpl_vars['day']->do_else = false;
$_smarty_tpl->tpl_vars['__smarty_foreach_days']->value['iteration']++;
$_smarty_tpl->tpl_vars['__smarty_foreach_days']->value['last'] = $_smarty_tpl->tpl_vars['__smarty_foreach_days']->value['iteration'] === $_smarty_tpl->tpl_vars['__smarty_foreach_days']->value['total'];
?> <?php echo htmlspecialchars((string)$_smarty_tpl->tpl_vars['day']->value['newVisitors']+$_smarty_tpl->tpl_vars['day']->value['retVisitors'], ENT_QUOTES, 'UTF-8', true);
if (!(isset($_smarty_tpl->tpl_vars['__smarty_foreach_days']->value['last']) ? $_smarty_tpl->tpl_vars['__smarty_foreach_days']->value['last'] : null)) {?>, <?php }
}
$_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl, 1);?>]
                        }
                    ]
                });
            }

            if (stats_contents) {
                var content_element = echarts.init(stats_contents, null, { renderer: 'svg', useDirtyRect: false });
                content_element.setOption({
                    title: { text: 'Просмотры' },
                    color: [ '#80FFA5', '#37A2FF', '#FFBF00'],
                    textStyle: { fontFamily: 'Roboto, Arial, Verdana, sans-serif', fontSize: 13 },
                    animationDuration: 750,
                    grid: { left: 0, right: 10, top: 35, bottom: 50, containLabel: true },
                    legend: { data: [ 'Просмотр страниц', 'Просмотр контента', 'Всего просмотров' ], itemHeight: 8, itemGap: 10 },
                    tooltip: { trigger: 'axis', axisPointer: { type: 'cross',  label: { backgroundColor: '#6a7985' } }, padding: [10, 15], textStyle: { fontSize: 13, fontFamily: 'Roboto, sans-serif' } },
                    // toolbox: { feature: { saveAsImage: { } } },

                    xAxis: [{ type: 'category', boundaryGap: false, data: [<?php
$_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['days']->value, 'day', false, NULL, 'days', array (
  'last' => true,
  'iteration' => true,
  'total' => true,
));
$_smarty_tpl->tpl_vars['day']->do_else = true;
if ($_from !== null) foreach ($_from as $_smarty_tpl->tpl_vars['day']->value) {
$_smarty_tpl->tpl_vars['day']->do_else = false;
$_smarty_tpl->tpl_vars['__smarty_foreach_days']->value['iteration']++;
$_smarty_tpl->tpl_vars['__smarty_foreach_days']->value['last'] = $_smarty_tpl->tpl_vars['__smarty_foreach_days']->value['iteration'] === $_smarty_tpl->tpl_vars['__smarty_foreach_days']->value['total'];
?> '<?php echo htmlspecialchars((string)$_smarty_tpl->tpl_vars['day']->value['date'], ENT_QUOTES, 'UTF-8', true);?>
'<?php if (!(isset($_smarty_tpl->tpl_vars['__smarty_foreach_days']->value['last']) ? $_smarty_tpl->tpl_vars['__smarty_foreach_days']->value['last'] : null)) {?>,<?php }?> <?php
}
$_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl, 1);?>] }],
                    yAxis: [{ type: 'value' }],

                    dataZoom: [
                        { type: 'inside', start: 92, end: 100 },
                        { show: true, type: 'slider', start: 92, end: 100, height: 40, bottom: 0, borderColor: '#26a69a', fillerColor: 'rgba(38,166,154,0.29)', handleStyle: { color: '#26a69a' }}
                    ],
                    series: [
                        {
                            name: 'Просмотр страниц',  type: 'line', stack: 'Total', smooth: true, lineStyle: { width: 0 }, showSymbol: false,
                            areaStyle: { opacity: 0.8, color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [ { offset: 0,  color: 'rgb(128, 255, 165)' }, { offset: 1,  color: 'rgb(1, 191, 236)' } ]) },
                            emphasis: { focus: 'series' },
                            data: [<?php
$_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['days']->value, 'day', false, NULL, 'days', array (
  'last' => true,
  'iteration' => true,
  'total' => true,
));
$_smarty_tpl->tpl_vars['day']->do_else = true;
if ($_from !== null) foreach ($_from as $_smarty_tpl->tpl_vars['day']->value) {
$_smarty_tpl->tpl_vars['day']->do_else = false;
$_smarty_tpl->tpl_vars['__smarty_foreach_days']->value['iteration']++;
$_smarty_tpl->tpl_vars['__smarty_foreach_days']->value['last'] = $_smarty_tpl->tpl_vars['__smarty_foreach_days']->value['iteration'] === $_smarty_tpl->tpl_vars['__smarty_foreach_days']->value['total'];
?> <?php echo htmlspecialchars((string)$_smarty_tpl->tpl_vars['day']->value['sectionVisits'], ENT_QUOTES, 'UTF-8', true);
if (!(isset($_smarty_tpl->tpl_vars['__smarty_foreach_days']->value['last']) ? $_smarty_tpl->tpl_vars['__smarty_foreach_days']->value['last'] : null)) {?>,<?php }
}
$_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl, 1);?>],
                        },
                        {
                            name: 'Просмотр контента', type: 'line', stack: 'Total', smooth: true, lineStyle: { width: 0 }, showSymbol: false,
                            areaStyle: { opacity: 0.8, color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [ { offset: 0, color: 'rgb(55, 162, 255)' }, { offset: 1, color: 'rgb(116, 21, 219)' } ])},
                            emphasis: { focus: 'series' },
                            data: [<?php
$_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['days']->value, 'day', false, NULL, 'days', array (
  'last' => true,
  'iteration' => true,
  'total' => true,
));
$_smarty_tpl->tpl_vars['day']->do_else = true;
if ($_from !== null) foreach ($_from as $_smarty_tpl->tpl_vars['day']->value) {
$_smarty_tpl->tpl_vars['day']->do_else = false;
$_smarty_tpl->tpl_vars['__smarty_foreach_days']->value['iteration']++;
$_smarty_tpl->tpl_vars['__smarty_foreach_days']->value['last'] = $_smarty_tpl->tpl_vars['__smarty_foreach_days']->value['iteration'] === $_smarty_tpl->tpl_vars['__smarty_foreach_days']->value['total'];
?> <?php echo htmlspecialchars((string)$_smarty_tpl->tpl_vars['day']->value['articleVisits'], ENT_QUOTES, 'UTF-8', true);
if (!(isset($_smarty_tpl->tpl_vars['__smarty_foreach_days']->value['last']) ? $_smarty_tpl->tpl_vars['__smarty_foreach_days']->value['last'] : null)) {?>,<?php }
}
$_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl, 1);?>],
                        },
                        {
                            name: 'Всего просмотров', type: 'line', stack: 'Total', smooth: true, lineStyle: { width: 0 }, showSymbol: false,
                            areaStyle: { opacity: 0.8, color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [ { offset: 0, color: 'rgb(255, 191, 0)' }, { offset: 1, color: 'rgb(224, 62, 76)' } ]) },
                            emphasis: { focus: 'series' },
                            data: [<?php
$_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['days']->value, 'day', false, NULL, 'days', array (
  'last' => true,
  'iteration' => true,
  'total' => true,
));
$_smarty_tpl->tpl_vars['day']->do_else = true;
if ($_from !== null) foreach ($_from as $_smarty_tpl->tpl_vars['day']->value) {
$_smarty_tpl->tpl_vars['day']->do_else = false;
$_smarty_tpl->tpl_vars['__smarty_foreach_days']->value['iteration']++;
$_smarty_tpl->tpl_vars['__smarty_foreach_days']->value['last'] = $_smarty_tpl->tpl_vars['__smarty_foreach_days']->value['iteration'] === $_smarty_tpl->tpl_vars['__smarty_foreach_days']->value['total'];
?> <?php echo htmlspecialchars((string)$_smarty_tpl->tpl_vars['day']->value['articleVisits']+$_smarty_tpl->tpl_vars['day']->value['sectionVisits']+$_smarty_tpl->tpl_vars['day']->value['searchVisits'], ENT_QUOTES, 'UTF-8', true);
if (!(isset($_smarty_tpl->tpl_vars['__smarty_foreach_days']->value['last']) ? $_smarty_tpl->tpl_vars['__smarty_foreach_days']->value['last'] : null)) {?>,<?php }
}
$_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl, 1);?>],
                        }
                    ]
                });
            }


            // Resize function
            var triggerChartResize = function() {
                stats_users && line_zoom.resize();
                stats_contents && content_element.resize();
            };

            // On sidebar width change
            $(document).on('click', '.sidebar-control', function() {
                setTimeout(function () {
                    triggerChartResize();
                }, 0);
            });

            // On window resize
            var resizeCharts;
            window.onresize = function () {
                clearTimeout(resizeCharts);
                resizeCharts = setTimeout(function () {
                    triggerChartResize();
                }, 200);
            };

            <?php }?>
        };

        return {
            init: function() {
                _notice();
                _lineChartExamples();
            }
        }
    }();

    document.addEventListener('DOMContentLoaded', function() {
        EchartsLines.init();
    });
<?php echo '</script'; ?>
>
<?php }
}
