X-Git-Url: http://git.jankratochvil.net/?a=blobdiff_plain;f=obsah.php;h=4aa257e2ccabebff0a52d7c2e925375bed1a5158;hb=88cc154b7931f010c1efbb886bc62195457e73ec;hp=eb262e13fdfe5900c74f5125954f7f577bd62008;hpb=2f422c6ef946eb94deec0c14e0218951a22a3f0f;p=www.energie.vellum.cz.git diff --git a/obsah.php b/obsah.php index eb262e1..4aa257e 100644 --- a/obsah.php +++ b/obsah.php @@ -28,9 +28,9 @@ print("

$title_tail

\n"); - $result=db_query("select year,month,month_last,contents from $tb_obsah" - .($year ? " where year=$year" : "") - .($month ? " and month=$month" : "") + $result=db_query("select year,month,month_last,contents from $tb_obsah where contents is not null" + .($year ? " and year=$year" : "") + .($month ? " and month=$month" : "") ." order by year,month" ); if (!mysql_num_rows($result)) @@ -47,11 +47,13 @@ . " 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", + $contents=ereg_replace("$sep_obsah_contents(" + .quotemeta(ereg_replace("\\|.*\$","",$article_row["name"])) + .")([\n$page_obsah_contents])", "$sep_obsah_contents" ."" ."\\1" - ."$page_obsah_contents",$contents); + ."\\2",$contents); mysql_free_result($article_result); $contents=ereg_replace("http://[^[:space:]$page_obsah_contents$sep_obsah_contents]+",