<li><a href="title.php">V¹echny roèníky</a></li>
<?php
- $getdate=getdate();
- $year=$getdate["year"];
+ // Current year may be different (higher) but when no such content exists
+ // yet, it is better to at least provide the last year.
+ $year=db_item("select max(year) from $tb_obsah");
$result=db_query("select distinct year from $tb_obsah order by year");
while (($row=mysql_fetch_array($result)))