<?php
/* Smarty version 4.5.2, created on 2024-04-15 09:45:42
  from '/Users/nikolaimv/Sites/admin.panel.11.loc/admin/templates/views/stats/visitors.tpl' */

/* @var Smarty_Internal_Template $_smarty_tpl */
if ($_smarty_tpl->_decodeProperties($_smarty_tpl, array (
  'version' => '4.5.2',
  'unifunc' => 'content_661cb0f672ecb3_61256141',
  'has_nocache_code' => false,
  'file_dependency' => 
  array (
    'fe8d603775bab1e75e1cea5ff22809252c0a3370' => 
    array (
      0 => '/Users/nikolaimv/Sites/admin.panel.11.loc/admin/templates/views/stats/visitors.tpl',
      1 => 1711430770,
      2 => 'file',
    ),
  ),
  'includes' => 
  array (
    'file:module/show-by.tpl' => 1,
    'file:components/page-header.tpl' => 1,
    'file:components/selectors.tpl' => 1,
    'file:module/pagination.tpl' => 1,
  ),
),false)) {
function content_661cb0f672ecb3_61256141 (Smarty_Internal_Template $_smarty_tpl) {
$_smarty_tpl->_checkPlugins(array(0=>array('file'=>'/Users/nikolaimv/Sites/admin.panel.11.loc/includes/composer/vendor/smarty/smarty/libs/plugins/modifier.truncate.php','function'=>'smarty_modifier_truncate',),));
?>

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

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

	<?php $_smarty_tpl->smarty->ext->_capture->open($_smarty_tpl, "showBy", null, null);?>
	    <?php $_smarty_tpl->_subTemplateRender("file:module/show-by.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array('url'=>((string)$_smarty_tpl->tpl_vars['adminUrl']->value)."/visitors"), 0, false);
?>
	<?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 -->

	<div class="content">
	    <div class="row">
	        <div class="col-md-12">
		        <div class="card border shadow-sm">
			        <?php $_smarty_tpl->_subTemplateRender("file:components/selectors.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array('action'=>((string)$_smarty_tpl->tpl_vars['adminUrl']->value)."/visitors",'select'=>''), 0, false);
?>
		        </div>

	            <div class="card border shadow-sm">
		            <div class="card-header d-flex flex-wrap">
			            <h6 class="mb-0"><?php echo htmlspecialchars((string)$_smarty_tpl->tpl_vars['title']->value, ENT_QUOTES, 'UTF-8', true);?>
</h6>
			            <div class="d-inline-flex ms-auto">
				            <a class="text-body" data-card-action="collapse"><i class="ph-caret-down"></i></a>
			            </div>
		            </div>
		            <div class="collapse show">
	                    <table class="table table-xs table-striped table-actions table-hover">
	                    <thead>
	                        <tr>
	                            <th class="text-center">Первый визит</th>
	                            <th class="text-left">Источник</th>
	                            <th class="text-center">Просмотры</th>
	                        </tr>
	                    </thead>
	                    <?php if ((isset($_smarty_tpl->tpl_vars['visitors']->value)) && !empty($_smarty_tpl->tpl_vars['visitors']->value)) {?>
	                        <tbody>
	                            <?php
$_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['visitors']->value, 'visitor');
$_smarty_tpl->tpl_vars['visitor']->do_else = true;
if ($_from !== null) foreach ($_from as $_smarty_tpl->tpl_vars['visitor']->value) {
$_smarty_tpl->tpl_vars['visitor']->do_else = false;
?>
	                                <tr class="">
	                                    <td class="text-nowrap"><?php echo htmlspecialchars((string)$_smarty_tpl->tpl_vars['visitor']->value['firstVisitOn'], ENT_QUOTES, 'UTF-8', true);?>
</td>
	                                    <td class="text-left" width="100%">
	                                        <?php if ((isset($_smarty_tpl->tpl_vars['visitor']->value['refererWebsite']))) {?>
	                                            <a href="<?php echo htmlspecialchars((string)$_smarty_tpl->tpl_vars['visitor']->value['referer'], ENT_QUOTES, 'UTF-8', true);?>
" target="_blank"><?php echo htmlspecialchars((string)smarty_modifier_truncate($_smarty_tpl->tpl_vars['visitor']->value['refererWebsite'],30), ENT_QUOTES, 'UTF-8', true);?>
</a>
	                                            <?php if ((isset($_smarty_tpl->tpl_vars['visitor']->value['searchPhrase']))) {?> (<?php echo htmlspecialchars((string)smarty_modifier_truncate($_smarty_tpl->tpl_vars['visitor']->value['searchPhrase'],50), ENT_QUOTES, 'UTF-8', true);?>
)<?php }?>
	                                        <?php } elseif ((isset($_smarty_tpl->tpl_vars['visitor']->value['refererUrl']))) {?>
	                                            <a href="<?php echo htmlspecialchars((string)$_smarty_tpl->tpl_vars['visitor']->value['refererUrl'], ENT_QUOTES, 'UTF-8', true);?>
" target="_blank"><?php echo htmlspecialchars((string)smarty_modifier_truncate($_smarty_tpl->tpl_vars['visitor']->value['refererUrl'],80), ENT_QUOTES, 'UTF-8', true);?>
</a>
	                                        <?php }?>
	                                    </td>
	                                    <td class="text-center">
	                                        <a href="<?php echo htmlspecialchars((string)$_smarty_tpl->tpl_vars['adminUrl']->value, ENT_QUOTES, 'UTF-8', true);?>
/visitor?visitorId=<?php echo htmlspecialchars((string)$_smarty_tpl->tpl_vars['visitor']->value['visitorId'], ENT_QUOTES, 'UTF-8', true);
if ((isset($_smarty_tpl->tpl_vars['filterTypeId']->value))) {?>&filterTypeId=<?php echo htmlspecialchars((string)$_smarty_tpl->tpl_vars['filterTypeId']->value, ENT_QUOTES, 'UTF-8', true);
}?>"><?php echo htmlspecialchars((string)$_smarty_tpl->tpl_vars['visitor']->value['totalVisits'], ENT_QUOTES, 'UTF-8', true);?>
</a>
	                                    </td>

	                                </tr>
	                            <?php
}
$_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl, 1);?>
	                        </tbody>
	                        <?php } else { ?>
	                            <tbody><tr class="odd"><td class="text-center" colspan="4">- Не найдено -</td></tr></tbody>
	                        <?php }?>

	                </table>
		            </div>
	                <?php ob_start();
if ((isset($_smarty_tpl->tpl_vars['filterTypeId']->value))) {
echo "&filterTypeId=";
echo (string)$_smarty_tpl->tpl_vars['filterTypeId']->value;
}
$_prefixVariable1=ob_get_clean();
ob_start();
if ((isset($_smarty_tpl->tpl_vars['domain']->value))) {
echo "&domain=";
echo (string)$_smarty_tpl->tpl_vars['domain']->value;
}
$_prefixVariable2=ob_get_clean();
$_smarty_tpl->_subTemplateRender("file:module/pagination.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array('url'=>((string)$_smarty_tpl->tpl_vars['adminUrl']->value)."/visitors",'params'=>$_prefixVariable1.$_prefixVariable2), 0, false);
?>
	            </div>
	        </div>
	    </div>
	</div>
	<!-- /content area -->
<?php }
}
