<?php
/* Smarty version 4.5.3, created on 2024-10-07 22:05:15
  from '/home/w/wmaster77/corp.site-77.ru/public_html/admin/design/html/pagination.tpl' */

/* @var Smarty_Internal_Template $_smarty_tpl */
if ($_smarty_tpl->_decodeProperties($_smarty_tpl, array (
  'version' => '4.5.3',
  'unifunc' => 'content_670430eb903fb8_12002493',
  'has_nocache_code' => false,
  'file_dependency' => 
  array (
    'b9385b9f5f4443eef420b15ce8cef4efaa5bf607' => 
    array (
      0 => '/home/w/wmaster77/corp.site-77.ru/public_html/admin/design/html/pagination.tpl',
      1 => 1716650267,
      2 => 'file',
    ),
  ),
  'includes' => 
  array (
  ),
),false)) {
function content_670430eb903fb8_12002493 (Smarty_Internal_Template $_smarty_tpl) {
if ($_smarty_tpl->tpl_vars['pages_count']->value > 1) {?>
<div>
	<ul class="pagination-goto d-flex justify-content-center justify-content-md-start">

				<?php $_smarty_tpl->_assignInScope('visible_pages', 6);?>

				<?php $_smarty_tpl->_assignInScope('page_from', 1);?>
		
				<?php if ($_smarty_tpl->tpl_vars['current_page']->value > floor($_smarty_tpl->tpl_vars['visible_pages']->value/2)) {?>
			<?php $_smarty_tpl->_assignInScope('page_from', max(1,$_smarty_tpl->tpl_vars['current_page']->value-floor($_smarty_tpl->tpl_vars['visible_pages']->value/2)-1));?>
		<?php }?>	
		
				<?php if ($_smarty_tpl->tpl_vars['current_page']->value > $_smarty_tpl->tpl_vars['pages_count']->value-ceil($_smarty_tpl->tpl_vars['visible_pages']->value/2)) {?>
			<?php $_smarty_tpl->_assignInScope('page_from', max(1,$_smarty_tpl->tpl_vars['pages_count']->value-$_smarty_tpl->tpl_vars['visible_pages']->value-1));?>
		<?php }?>
		
				<?php $_smarty_tpl->_assignInScope('page_to', min($_smarty_tpl->tpl_vars['page_from']->value+$_smarty_tpl->tpl_vars['visible_pages']->value,$_smarty_tpl->tpl_vars['pages_count']->value-1));?>

		<?php if ($_smarty_tpl->tpl_vars['current_page']->value > 1) {?>
		<li class="page-item">
			<a class="page-link" href="<?php echo call_user_func_array( $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['url'][0], array( array('module'=>$_smarty_tpl->tpl_vars['module']->value,'category_id'=>$_GET['category_id'],'filter'=>$_GET['filter'],'brand_id'=>$_GET['brand_id'],'page'=>$_smarty_tpl->tpl_vars['current_page']->value-1),$_smarty_tpl ) );?>
">
				<span aria-hidden="true">&laquo;</span>
			</a>
		</li>
		<?php }?>

				<li class="page-item <?php if ($_smarty_tpl->tpl_vars['current_page']->value == 1) {?>active<?php }?>">
			<a class="page-link" href="<?php echo call_user_func_array( $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['url'][0], array( array('module'=>$_smarty_tpl->tpl_vars['module']->value,'category_id'=>$_GET['category_id'],'filter'=>$_GET['filter'],'brand_id'=>$_GET['brand_id'],'page'=>1),$_smarty_tpl ) );?>
">1</a>
		</li>
		
			
		<?php
$__section_pages_0_loop = (is_array(@$_loop=$_smarty_tpl->tpl_vars['page_to']->value) ? count($_loop) : max(0, (int) $_loop));
$__section_pages_0_start = (int)@$_smarty_tpl->tpl_vars['page_from']->value < 0 ? max(0, (int)@$_smarty_tpl->tpl_vars['page_from']->value + $__section_pages_0_loop) : min((int)@$_smarty_tpl->tpl_vars['page_from']->value, $__section_pages_0_loop);
$__section_pages_0_total = min(($__section_pages_0_loop - $__section_pages_0_start), $__section_pages_0_loop);
$_smarty_tpl->tpl_vars['__smarty_section_pages'] = new Smarty_Variable(array());
if ($__section_pages_0_total !== 0) {
for ($__section_pages_0_iteration = 1, $_smarty_tpl->tpl_vars['__smarty_section_pages']->value['index'] = $__section_pages_0_start; $__section_pages_0_iteration <= $__section_pages_0_total; $__section_pages_0_iteration++, $_smarty_tpl->tpl_vars['__smarty_section_pages']->value['index']++){
?>
				
			<?php $_smarty_tpl->_assignInScope('p', (isset($_smarty_tpl->tpl_vars['__smarty_section_pages']->value['index']) ? $_smarty_tpl->tpl_vars['__smarty_section_pages']->value['index'] : null)+1);?>	
				
			<?php if (($_smarty_tpl->tpl_vars['p']->value == $_smarty_tpl->tpl_vars['page_from']->value+1 && $_smarty_tpl->tpl_vars['p']->value != 2) || ($_smarty_tpl->tpl_vars['p']->value == $_smarty_tpl->tpl_vars['page_to']->value && $_smarty_tpl->tpl_vars['p']->value != $_smarty_tpl->tpl_vars['pages_count']->value-1)) {?>	
			<li class="page-item <?php if ($_smarty_tpl->tpl_vars['p']->value == $_smarty_tpl->tpl_vars['current_page']->value) {?>active<?php }?>">
				<a class="page-link" href="<?php echo call_user_func_array( $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['url'][0], array( array('module'=>$_smarty_tpl->tpl_vars['module']->value,'category_id'=>$_GET['category_id'],'filter'=>$_GET['filter'],'brand_id'=>$_GET['brand_id'],'page'=>$_smarty_tpl->tpl_vars['p']->value),$_smarty_tpl ) );?>
">...</a>
			</li>
			<?php } else { ?>
			<li class="page-item <?php if ($_smarty_tpl->tpl_vars['p']->value == $_smarty_tpl->tpl_vars['current_page']->value) {?>active<?php }?>">
				<a class="page-link" href="<?php echo call_user_func_array( $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['url'][0], array( array('module'=>$_smarty_tpl->tpl_vars['module']->value,'category_id'=>$_GET['category_id'],'filter'=>$_GET['filter'],'brand_id'=>$_GET['brand_id'],'page'=>$_smarty_tpl->tpl_vars['p']->value),$_smarty_tpl ) );?>
"><?php echo $_smarty_tpl->tpl_vars['p']->value;?>
</a>
			</li>
			<?php }?>
		<?php
}
}
?>

				<li class="page-item <?php if ($_smarty_tpl->tpl_vars['current_page']->value == $_smarty_tpl->tpl_vars['pages_count']->value) {?>active<?php }?>">
			<a class="page-link" href="<?php echo call_user_func_array( $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['url'][0], array( array('module'=>$_smarty_tpl->tpl_vars['module']->value,'category_id'=>$_GET['category_id'],'filter'=>$_GET['filter'],'brand_id'=>$_GET['brand_id'],'page'=>$_smarty_tpl->tpl_vars['pages_count']->value),$_smarty_tpl ) );?>
"><?php echo $_smarty_tpl->tpl_vars['pages_count']->value;?>
</a>
		</li>
		
		
		<?php if ($_smarty_tpl->tpl_vars['current_page']->value < $_smarty_tpl->tpl_vars['pages_count']->value) {?>
		<li class="page-item">
			<a class="page-link" href="<?php echo call_user_func_array( $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['url'][0], array( array('module'=>$_smarty_tpl->tpl_vars['module']->value,'category_id'=>$_GET['category_id'],'filter'=>$_GET['filter'],'brand_id'=>$_GET['brand_id'],'page'=>$_smarty_tpl->tpl_vars['current_page']->value+1),$_smarty_tpl ) );?>
"><span aria-hidden="true">&raquo;</span></a>
		</li>
		<?php }?>	
	
	</ul>
</div>
<?php }
}
}
