X-Git-Url: https://git.jankratochvil.net/?a=blobdiff_plain;f=common.php;h=461fb6af4146e37eaafd6cd77378e7dd2425fafb;hb=2683f83007a2ac18a7793636c1d09eff6733e549;hp=b75599142a5ea4373988cb614327534b6c9765bb;hpb=8813e85bed53692b0167b15be93edf5e54fbfdaa;p=www.energie.vellum.cz.git diff --git a/common.php b/common.php index b755991..461fb6a 100644 --- a/common.php +++ b/common.php @@ -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=false) +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("\n"); if ($title) - print("

" + print("

" .img("img/eap-title.".(image_supported("image/png") ? "png" : "gif"),"Energie & Peníze") - ."

\n"); + ."\n"); } ?>