<div id="lk-menu">
    <div id="menu_category">
        <ul>
            <?if ($category == 'gazeta'):?>
                <li class="active">Газета</li>
                <li><a href="<?=SITE?>mybooks/books/all/1">Книги</a></li>
            <?else:?>
                <li><a href="<?=SITE?>mybooks/gazeta/all/1">Газета</a></li>
                <li class="active">Книги</li>
            <?endif?>
        </ul>        
    </div>   

    <?if ($items['subscript'] == true):?>
        <div class="small-mob-hidden"><p>Вам доступен весь архив</p></div>
    <?else:?>
        <div class="small-mob-hidden"><p>Всего покупок: <?=$items['count']?></p></div>
    <?endif?>

    <?if ($category == 'gazeta'):?>
    <div id="years">
        <p>
            <select id="year_filter" onchange="changeyear()">
            <option value="all"<?=$selected?>>Все года</option>
            <?for ($y = date('Y'); $y >= 2006; $y--):?>
                <?$selected = ($filter == $y) ? ' selected' : ''?>
                <option value="<?=$y?>"<?=$selected?>><?=$y?> год</option>
            <?endfor?>  
            </select>
            <i class="fas fa-chevron-down"></i>
        </p>
    </div>
    <?endif?>
    <div>
        <a href="<?=SITE?>payments">Мои покупки</a>  
    </div>
</div>



<div class="lib_container">
<?foreach ($items['books'] as $book):?>
    <div class="book_skeleton">
        <div class="book_mini">
            <a href="<?=$book['link']?>">
                <img src="<?=$book['pic']?>">
                <p class="book_mini_title"><?=$book['pricename']?></p>
                <p>Читать</p>
            </a>    
        </div>
    </div>
<?endforeach?>

</div>

<?include 'blocks/pagenav.phtml'?>