X-Git-Url: https://git.jankratochvil.net/?a=blobdiff_plain;f=common.php;h=1d666bdd993c94faa957a729117b0a43d898ec5f;hb=72b1770f8084920760b4978498706ada644ebc05;hp=8a7b6edec50282cc1ee4c3e812eab3c76c3ffc6c;hpb=2a93affb8ee9043eceb39e57f6663d3b8e002728;p=www.energie.vellum.cz.git diff --git a/common.php b/common.php index 8a7b6ed..1d666bd 100644 --- a/common.php +++ b/common.php @@ -14,7 +14,7 @@ ."" .$cvs_id_split[2].""; $cvs_id_split[1]="".$cvs_id_split[1].""; - $cvs_id_split[5]="".$cvs_id_split[5].""; + $cvs_id_split[5]="".$cvs_id_split[5].""; } $cvs_id_html=join(" ",$cvs_id_split); @@ -67,7 +67,7 @@ function fatal($msg="UNKNOWN") { global $admin_mail; - heading(false/*title*/); // it is always safe + heading(false/*title*/,false/*indexme*/); // notitle is always safe, don't index the error message print("\n

 
 


Nastala chyba pøi zpracování: $msg!

\n" ."

Mù¾ete tento problém nahlásit správci tohoto webu.

\n"); footer(); @@ -245,7 +245,7 @@ function title_month($year,$month) ); } -function title_icons_table_month($year,$month,$month_last,$sequential) +function title_icons_table_month($year,$month,$month_last,$sequential,$has_contents) { global $tb_clanek; @@ -256,11 +256,13 @@ function title_icons_table_month($year,$month,$month_last,$sequential) .img($month_a["icon"],"titulní stránka ".$month_a["name_full"])."\n" ."\n" ."• titulní strana
\n" - ."• obsah
\n"); + ); + if ($has_contents) + print("• obsah
\n"); $result=db_query("select name,id from $tb_clanek where year=$year and month=$month order by id"); while ($row=mysql_fetch_array($result)) print("• " - .htmlspecialchars($row["name"])."
\n"); + .htmlspecialchars(ereg_replace("^.*\\|","",$row["name"]))."
\n"); mysql_free_result($result); print(""); } @@ -275,7 +277,7 @@ function title_icons($year,$month) .(isset($year) ? "" : "") ."\n"); - $result=db_query("select year,month,month_last,sequential from $tb_obsah" + $result=db_query("select year,month,month_last,sequential,contents is not null as has_contents from $tb_obsah" .(isset($year) || isset($month) ? " where" : "") .(isset($year ) ? " year=$year" : "") .(isset($year) && isset($month) ? " and" : "") @@ -321,7 +323,7 @@ function title_icons($year,$month) print(""); - title_icons_table_month($year,$row["month"]+1,$row["month_last"]+1,$row["sequential"]); + title_icons_table_month($year,$row["month"]+1,$row["month_last"]+1,$row["sequential"],$row["has_contents"]); print("\n"); $month=$row["month_last"]; } @@ -710,7 +712,7 @@ function no_cache() header("Pragma: no-cache"); // HTTP/1.0 } -function heading($title=true) +function heading($title=true,$indexme=true) { global $msie_major,$mozilla_major,$title_tail,$head_css,$have_css,$head,$heading_done,$title_prefix,$force_charset; @@ -755,6 +757,7 @@ h1,h2 { color: yellow; background-color: transparent; } print(trim($head_css)."\n"); print("-->\n"); } + print(''."\n"); if (isset($head)) print($head); print("