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

/* @var Smarty_Internal_Template $_smarty_tpl */
if ($_smarty_tpl->_decodeProperties($_smarty_tpl, array (
  'version' => '4.5.2',
  'unifunc' => 'content_661cb0f80bdb80_51747083',
  'has_nocache_code' => false,
  'file_dependency' => 
  array (
    'f164860b83a05df896ce4169a2fd2628fae98691' => 
    array (
      0 => '/Users/nikolaimv/Sites/admin.panel.11.loc/admin/templates/views/stats/referer.tpl',
      1 => 1711430803,
      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_661cb0f80bdb80_51747083 (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);?>
/referer" 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)."/referer"), 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)."/referer",'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-center">Источник</th>
			                </tr>
			                </thead>
			                <?php if ((isset($_smarty_tpl->tpl_vars['referers']->value)) && !empty($_smarty_tpl->tpl_vars['referers']->value)) {?>
			                <tbody>
			                    <?php
$_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['referers']->value, 'referer', false, NULL, 'referers', array (
));
$_smarty_tpl->tpl_vars['referer']->do_else = true;
if ($_from !== null) foreach ($_from as $_smarty_tpl->tpl_vars['referer']->value) {
$_smarty_tpl->tpl_vars['referer']->do_else = false;
?>
			                        <tr>
			                            <td class="text-nowrap">
			                                <a href="<?php echo htmlspecialchars((string)$_smarty_tpl->tpl_vars['adminUrl']->value, ENT_QUOTES, 'UTF-8', true);?>
/visitors?domain=<?php echo htmlspecialchars((string)(($tmp = rawurlencode((string)$_smarty_tpl->tpl_vars['referer']->value['domain']) ?? null)===null||$tmp==='' ? 'unknown' ?? null : $tmp), 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['referer']->value['totalVisitors'], ENT_QUOTES, 'UTF-8', true);?>
</a>
			                            </td>
			                            <td class="text-left" width="100%"><?php echo htmlspecialchars((string)(($tmp = smarty_modifier_truncate($_smarty_tpl->tpl_vars['referer']->value['website'],40) ?? null)===null||$tmp==='' ? '(неизвестный)' ?? null : $tmp), ENT_QUOTES, 'UTF-8', true);?>
</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();
$_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)."/referer",'params'=>$_prefixVariable1), 0, false);
?>
			    </div>
			</div>
		</div>
	</div>
	<!-- /content area -->
<?php }
}
