$title_tail\n");
$result=db_query("select year,month,month_last,contents from $tb_obsah"
.($year ? " where year=$year" : "")
.($month ? " and month=$month" : "")
." order by year,month"
);
if (!mysql_num_rows($result))
fatal("Obsah požadovan".($month ? "ého čísla" : "ých čísel")." bohužel není uložen");
while ($row=mysql_fetch_array($result)) {
if (!$month) {
$month_a=month_a($row["year"],$row["month"],$row["month_last"]);
print("
Číslo ".$month_a["name_full"]."
\n");
}
$contents=$sep_obsah_contents.$row["contents"];
$contents=htmlspecialchars($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($article_row["name"]).")$page_obsah_contents",
"$sep_obsah_contents"
.""
."\\1"
."$page_obsah_contents",$contents);
mysql_free_result($article_result);
$contents=ereg_replace("http://[^[:space:]$page_obsah_contents$sep_obsah_contents]+",
"\\0",$contents);
$contents=ereg_replace("$page_obsah_contents([^$sep_obsah_contents$appendix_obsah_contents]+)",
"
strana ... \\1",$contents);
$contents=ereg_replace("\n","
\n\t\t",$contents);
$contents=ereg_replace("$sep_obsah_contents([^$sep_obsah_contents$appendix_obsah_contents]*)","\t\\1\n",$contents);
if (1Přílohy:\n".ereg_replace("\t","\t\t",$contents_a[1])."\t
\n";
print("\n");
}
mysql_free_result($result);
footer();
?>