- if (!$month)
- print("<h2>Èíslo ".$row["year"]."/".month_full($row["year"],$row["month"],$row["month_last"])."</h2>\n");
- $contents=htmlspecialchars($sep_obsah_contents.$row["contents"]);
+ if (!$month) {
+ $month_a=month_a($row["year"],$row["month"],$row["month_last"]);
+ print("<h2>Èíslo ".$month_a["name_full"]."</h2>\n");
+ }
+ $contents=$sep_obsah_contents.$row["contents"];
+
+ $article_result=db_query("select name,id from $tb_clanek"
+ ." where year=".$row[ "year"]
+ . " and month=".$row["month"]
+ );
+ while ($article_row=mysql_fetch_array($article_result))
+ $contents=ereg_replace("$sep_obsah_contents("
+ .quotemeta(ereg_replace("\\|.*\$","",$article_row["name"]))
+ .")([\n$page_obsah_contents])",
+ "$sep_obsah_contents"
+ ."<a href=\"clanek.php?year=".$row["year"]."&month=".$row["month"]."&id=".$article_row["id"]."\">"
+ ."\\1</a>"
+ ."\\2",$contents);
+ mysql_free_result($article_result);
+