X-Git-Url: http://git.jankratochvil.net/?a=blobdiff_plain;f=obsah.php;h=eb262e13fdfe5900c74f5125954f7f577bd62008;hb=2f422c6ef946eb94deec0c14e0218951a22a3f0f;hp=922cd36e36ed0ffd64e1897a3309ea6d0d5fbc82;hpb=bd56395ee65abff6e9a778eee76e39e586084497;p=www.energie.vellum.cz.git diff --git a/obsah.php b/obsah.php index 922cd36..eb262e1 100644 --- a/obsah.php +++ b/obsah.php @@ -15,13 +15,17 @@ $title_tail="Obsahy èísel roku $year"; else { $month_a=month_a($year,$month); - $title_tail="Obsah èísla ".$month_a["name"]; + $title_tail="Obsah èísla ".$month_a["name_full"]; } $head_css=" .page { font-style: italic; } "; - heading(); + + // Prevent indexing of pages with multiple months of the content, any + // websearch robot should get indexed the right one specific page anyway. + heading(true/*title*/,($year && $month)/*indexme*/); + print("

$title_tail

\n"); $result=db_query("select year,month,month_last,contents from $tb_obsah" @@ -34,15 +38,30 @@ while ($row=mysql_fetch_array($result)) { if (!$month) { $month_a=month_a($row["year"],$row["month"],$row["month_last"]); - print("

Èíslo ".$month_a["name"]."

\n"); + print("

Èíslo ".$month_a["name_full"]."

\n"); } - $contents=htmlspecialchars($sep_obsah_contents.$row["contents"]); + $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($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]+)", - "
strana ... \\1
",$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]*)","\t
  • \\1
  • \n",$contents); + $contents=ereg_replace("$sep_obsah_contents([^$sep_obsah_contents$appendix_obsah_contents]*)","\t
  • \\1
  • \n",$contents); + if (1Pøílohy:\n"; print("\n"); } mysql_free_result($result);