X-Git-Url: http://git.jankratochvil.net/?p=www.energie.vellum.cz.git;a=blobdiff_plain;f=common.php;h=2a3db70a572396391ec58ecf59f43a33a2627d08;hp=b75599142a5ea4373988cb614327534b6c9765bb;hb=HEAD;hpb=8813e85bed53692b0167b15be93edf5e54fbfdaa diff --git a/common.php b/common.php index b755991..2a3db70 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(); @@ -197,14 +197,6 @@ function img($file,$alt,$attrs="") .($attrs=="" ? "" : " ".$attrs)." />"); } -function gsm_banking() -{ - global $energie_base; - - return(img($energie_base."img/sluzby_bankovni_pggsm.".(image_supported("video/x-mng") ? "mng" : "gif"), - "Paegas GSM banking","class=\"img-align\"")); -} - function price_a() { if (!($f=fopen("objednavka.js","r"))) @@ -245,7 +237,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 +248,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 +269,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 +315,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"]; } @@ -530,7 +524,7 @@ function gsm_row($name,$value) { return("$name" ."".($value=="" ? "neuvádìjte" : $value)."" - ."".strtr($value,"/.","#*")."\n"); + ."\n"); } function gsm_table($total,$varsym) @@ -538,7 +532,7 @@ function gsm_table($total,$varsym) global $firma_ucet,$firma_konstsym,$firma_specsym; return("
\n" - ."\n" + ."\n" .gsm_row("Èíslo úètu",$firma_ucet) .gsm_row("Èástka",sprintf("%.2f",$total)) .gsm_row("Konstantní symbol",$firma_konstsym) @@ -710,7 +704,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 +749,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"); } ?>
polo¾kabankovní pøíkaz".gsm_banking()."
polo¾kabankovní pøíkaz