add filter years

This commit is contained in:
Andrey Kuvshinov
2020-05-16 14:53:38 +03:00
parent 7c840c1388
commit 9fcca9efbe
6 changed files with 108 additions and 23 deletions

View File

@@ -4,6 +4,19 @@
<!--<p>Всего покупок: <?=$items['count']?></p>-->
<?endif?>
<div>
фильтр: <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>
</div>
<div class="lib_container">
<?foreach ($items['books'] as $book):?>