3 error_reporting(E_ALL);
4 setlocale(LC_ALL,"cs_CZ.iso-8859-2");
8 // $viewcvs prepared by "config.php"
9 if ($viewcvs==$HTTP_SERVER_VARS["SCRIPT_NAME"])
11 $cvs_id_split=split(" ",$cvs_id);
12 if (count($cvs_id_split)==8) {
14 ."<a href=\"".ereg_replace("/viewcvs/","\\0~checkout~/",$viewcvs)."?rev=".$cvs_id_split[2]."\">"
15 .$cvs_id_split[2]."</a>";
16 $cvs_id_split[1]="<a href=\"$viewcvs\">".$cvs_id_split[1]."</a>";
17 $cvs_id_split[5]="<a href=\"mailto:$admin_mail\">".$cvs_id_split[5]."</a>";
19 $cvs_id_html=join(" ",$cvs_id_split);
23 if (!isset($energie_base))
27 if (isset($HTTP_GET_VARS[ "have_ent"]))
29 if (isset($HTTP_GET_VARS["amp;have_ent"]))
31 if ((!isset($detect_ent) || $detect_ent) && !isset($have_ent) && $HTTP_SERVER_VARS["REQUEST_METHOD"]=="GET")
32 $head.='<meta http-equiv="Refresh" content="0; URL='
33 .htmlspecialchars("http://".$HTTP_SERVER_VARS["HTTP_HOST"].$HTTP_SERVER_VARS["PHP_SELF"]
34 ."?".(strlen($HTTP_SERVER_VARS["QUERY_STRING"]) ? $HTTP_SERVER_VARS["QUERY_STRING"] : "detect_ent_glue=1")
39 $have_js=(isset($HTTP_GET_VARS["have_js"]) || isset($HTTP_POST_VARS["have_js"])
41 if (isset($detect_js) && !$have_js)
42 $head.='<script type="text/javascript" src="'.$energie_base.'have_js.js"></script>'."\n";
44 $user_agent=(!isset($HTTP_SERVER_VARS["HTTP_USER_AGENT"]) ? "" : $HTTP_SERVER_VARS["HTTP_USER_AGENT"]);
45 if (ereg("[[:<:]]MSIE ([0-9]+)\\.",$user_agent,$msie_major_a))
46 $msie_major=$msie_major_a[1];
47 else if (ereg("[[:<:]]Mozilla/([0-9]+)\\.",$user_agent,$mozilla_major_a))
48 $mozilla_major=$mozilla_major_a[1];
50 $have_style=!isset($mozilla_major) || $mozilla_major!=4;
51 $have_css=true; // doesn't hurt anybody AFAIK
55 $ars=array("HTTP_GET_VARS","HTTP_POST_VARS");
56 foreach ($ars as $ar) {
57 foreach ($GLOBALS[$ar] as $key=>$val) {
58 if (substr($key,0,4)!="amp;")
60 unset($GLOBALS[$ar][$key]);
61 $GLOBALS[$ar][substr($key,4)]=$val;
66 function fatal($msg="UNKNOWN")
70 heading(false/*title*/,false/*indexme*/); // notitle is always safe, don't index the error message
71 print("\n<p> <br /> </p><hr /><h1 class=\"error\">Nastala chyba pøi zpracování: $msg!</h1>\n"
72 ."<p>Mù¾ete tento problém nahlásit <a href=\"mailto:$admin_mail\">správci tohoto webu</a>.</p>\n");
76 function prepvar($name,$regex=".*",$require=true)
78 global $HTTP_GET_VARS,$HTTP_POST_VARS;
80 if (isset($HTTP_GET_VARS[$name]))
81 $v=$HTTP_GET_VARS[$name];
82 else if (isset($HTTP_POST_VARS[$name]))
83 $v=$HTTP_POST_VARS[$name];
87 $name_html="Parametr <span class=\"quote\">".htmlspecialchars($name)."</span>";
90 if (isset($v) && !ereg($regex,$v))
91 fatal("$name_html nevyhovuje po¾adovanému regexu <span class=\"quote\">".htmlspecialchars($regex)."</span>");
92 if (!isset($v) && $require)
93 fatal("$name_html je vy¾adován");
102 function db_connect()
104 global $db_host,$db_user,$db_pwd,$db_name;
109 if (!($db_link=mysql_connect($db_host,$db_user,$db_pwd)))
110 fatal("MySQL connect: ".mysql_error());
111 if (!mysql_select_db($db_name,$db_link))
112 fatal("MySQL database select: ".mysql_error());
115 function db_query($query)
120 if (!($r=mysql_query($query,$db_link)))
121 fatal("MySQL query \"$query\": ".mysql_error());
125 function db_row($query) // pure indexes
128 $r=mysql_fetch_row($q);
129 mysql_free_result($q);
133 function db_array($query) // field-names associative
136 $r=mysql_fetch_array($q);
137 mysql_free_result($q);
141 function db_item($query)
147 function num2greg($num)
150 $vals=array(1=>"I",5=>"V",10=>"X",50=>"L",100=>"C",500=>"D",1000=>"M");
151 krsort($vals,SORT_NUMERIC);
152 foreach($vals as $val=>$sym) {
153 while ($num<0 && $num+$val<-$num) {
154 $r=substr($r,0,-1).$sym.substr($r,-1,1);
157 while (10*$num>=8*$val+(substr($val,0,1)=="1")) {
165 function month_a($year,$month,$month_last=0,$sequential=0)
167 global $tb_obsah,$obsah_year_base;
169 if (!$month_last || !$sequential)
170 list($month_last,$sequential)=db_row("select month_last,sequential from $tb_obsah where year='$year' and month='$month'");
171 $month_full=sprintf("%02d".($month==$month_last ? "" : "-%02d"),$month,$month_last);
173 $r=array("year"=>$year,"month"=>$month,"month_last"=>$month_last,"month_full"=>$month_full,
174 "name"=>"$month" .($month==$month_last ? "" : "-$month_last")."/$year",
175 "img" =>"img/eap-$year-${month_full}.jpeg",
176 "icon"=>"img/eap-$year-${month_full}s.jpeg",
178 $r["name_full"]=$r["name"]
179 ." ($sequential".($month==$month_last ? "" : "-".($sequential+$month_last-$month)).")"
180 ." - ".num2greg($year-$obsah_year_base+1).". roèník";
184 function img_size($width,$height)
188 return(($have_style ? "style=\"border:0;width:${width}px;height:${height}px\"" : "border=\"0\"")
189 ." width=\"$width\" height=\"$height\"");
192 function img($file,$alt,$attrs="")
194 list($width,$height)=getimagesize(ereg_replace("\\.mng\$",".gif",$file));
195 $alt=htmlspecialchars($alt);
196 return("<img src=\"$file\" alt=\"$alt\" title=\"$alt\" ".img_size($width,$height)
197 .($attrs=="" ? "" : " ".$attrs)." />");
200 function gsm_banking()
202 global $energie_base;
204 return(img($energie_base."img/sluzby_bankovni_pggsm.".(image_supported("video/x-mng") ? "mng" : "gif"),
205 "Paegas GSM banking","class=\"img-align\""));
210 if (!($f=fopen("objednavka.js","r")))
211 fatal("Nepodaøilo se naèíst seznam dostupného zbo¾í");
213 while (($s=fgets($f,0x1000))) {
216 if (!(ereg("^want_price\\[ *'([^']*)'\\]=([0-9]*);$",$s,$matched)))
218 $r[$matched[1]]=$matched[2];
224 function title_name($year,$month)
226 if (isset($year) && isset($month)) {
227 $month_a=month_a($year,$month);
228 return("Èíslo ".$month_a["name_full"]);
230 else if (isset($year))
231 return("Roèník $year");
233 return("V¹echny roèníky");
236 function title_month($year,$month)
238 $month_a=month_a($year,$month);
240 ."<table border=\"0\" width=\"100%\">\n"
241 ."<tr><td align=\"center\"><table border=\"1\" cellpadding=\"10\">\n"
242 ."<tr><td align=\"center\">".img($month_a["img"],"titulní stránka ".$month_a["name"])."</td></tr>\n"
243 ."</table></td></tr>\n"
248 function title_icons_table_month($year,$month,$month_last,$sequential,$has_contents)
252 $month_a=month_a($year,$month,$month_last,$sequential);
253 print("<table border=\"0\">"
254 ."<tr><th align=\"center\">".$month_a["name"]."</th></tr>\n"
255 ."<tr><td align=\"center\" valign=\"top\">"
256 .img($month_a["icon"],"titulní stránka ".$month_a["name_full"])."</td></tr>\n"
257 ."<tr><td align=\"left\" valign=\"top\" class=\"nowrap\">\n"
258 ."• <a href=\"title.php?year=$year&month=$month\">titulní strana</a><br />\n"
261 print("• <a href=\"obsah.php?year=$year&month=$month\">obsah</a><br />\n");
262 $result=db_query("select name,id from $tb_clanek where year=$year and month=$month order by id");
263 while ($row=mysql_fetch_array($result))
264 print("• <a href=\"clanek.php?year=$year&month=$month&id=".$row["id"]."\">"
265 .htmlspecialchars(ereg_replace("^.*\\|","",$row["name"]))."</a><br />\n");
266 mysql_free_result($result);
267 print("</td></tr></table>");
270 function title_icons($year,$month)
275 .(isset($year) ? "<a id=\"year_$year\">" : "")
276 .title_name(&$year,&$month)
277 .(isset($year) ? "</a>" : "")
280 $result=db_query("select year,month,month_last,sequential,contents is not null as has_contents from $tb_obsah"
281 .(isset($year) || isset($month) ? " where" : "")
282 .(isset($year ) ? " year=$year" : "")
283 .(isset($year) && isset($month) ? " and" : "")
284 .(isset($month) ? " month=$month" : "")
285 ." order by year,month");
288 // $year variable changes its meaning here!!!
295 while ($row=mysql_fetch_array($result)) {
297 $row["month_last"]--;
299 if ($row["year"]!=$year) {
300 print($fin_split.$fin_year);
304 .(!isset($wanted_year) ? "<p><a id=\"year_$year\"> </a></p>" : "")
305 ."<table border=\"0\" width=\"100%\"><tr><td align=\"center\"><table border=\"1\" cellpadding=\"5\">\n"
306 ."<tr><th colspan=\"$split\">Roèník $year (<a href=\"obsah.php?year=$year\">obsahy èísel</a>)</th></tr>\n"
308 $fin_year="</table></td></tr></table>\n";
313 while ($floor<floor($row["month"]/$split)) {
314 print($fin_split."<tr>");
315 $fin_split="</tr>\n";
317 $month=$floor*$split-1;
319 while ($month+1<$row["month"]) {
323 print("<td align=\"center\" valign=\"top\""
324 .($row["month_last"]!=$row["month"] ? " colspan=\"".($row["month_last"]+1-$row["month"])."\"" : "")
326 title_icons_table_month($year,$row["month"]+1,$row["month_last"]+1,$row["sequential"],$row["has_contents"]);
328 $month=$row["month_last"];
330 mysql_free_result($result);
331 print($fin_split.$fin_year);
334 function title($year,$month)
336 if (isset($year) && isset($month))
337 return(title_month( $year, $month));
339 return(title_icons(&$year,&$month));
342 function image_supported($mime)
344 global $HTTP_SERVER_VARS;
346 if (!isset($HTTP_SERVER_VARS["HTTP_ACCEPT"]))
348 $exp=explode(",",$HTTP_SERVER_VARS["HTTP_ACCEPT"]);
349 while (($s=array_shift($exp))) {
350 $s=trim(ereg_replace(";.*","",$s));
357 // PHP dirname() is broken: ("/1/2/3"=>"/1/2", "/1"->"/")
358 function dirnameslashed($filename)
360 $r=dirname($filename);
361 if (substr($r,-1)!="/")
366 function usersize($size)
368 $suffix_a=array("","k","M","G","T");
369 while ($size>=1000 && sizeof($suffix_a)>=2) {
371 array_shift($suffix_a);
373 return(round($size)." ".$suffix_a[0]."B");
376 function data_href($filename,$text,$details="")
378 return("<a href=\"$filename\">$text (".usersize(filesize($filename))."$details)</a>");
381 function img_href($filename,$text)
383 list($width,$height)=getimagesize($filename);
384 return(data_href($filename,$text,", ${width}x${height} bodù"));
387 function print_pdf_layout($name,$base)
389 global $energie_base;
391 $imgfmt=(image_supported("image/png") ? "png" : "gif");
393 <p>Shodný <?php print($name); ?> je dostupný ve dvou rùzných formátech souboru. V pøípadì,
394 ¾e nemáte/nechcete instalovat
395 <a href="http://www.adobe.com/products/acrobat/readstep.html">Adobe Acrobat Reader</a>,
396 zvolte prosím druhou mo¾nost:</p>
399 <tr><td><table border="0" cellpadding="1" style="border: ridge;">
400 <tr><td align="center"><?php
401 print(img("${base}s.$imgfmt",ucfirst($name)));
402 ?></td></tr></table></td>
403 <td valign="top"><ul>
407 <tr><td><?php print("<a href=\"$base.pdf\">".img($energie_base."img/adobe-pdficon-alpha.".(image_supported("image/png") ? "png" : "gif"),
408 "Adobe PDF")."</a>"); ?></td>
409 <td><?php print(data_href("$base.pdf","Dokument PDF")); ?></td>
414 <tr><td><a href="http://www.adobe.com/products/acrobat/readstep.html"><?php
415 print(img($energie_base."img/adobe-getacro.".(image_supported("image/png") ? "png" : "gif"),"Get Adobe Acrobat Reader"));
417 <td class="smaller">Soubor je ve formátu <span class="italic">Adobe Acrobat</span>,
418 pro jeho pøeètení si prosím nainstalujte
419 <a href="http://www.adobe.com/products/acrobat/readstep.html">Adobe Acrobat Reader</a>.</td>
426 <?php print(img_href("$base.$imgfmt","Obrázkový formát ".strtoupper($imgfmt))); ?>
429 </ul></td></tr></table>
433 function format_fields_to_text($title="",$pfx="")
435 global $HTTP_POST_VARS;
454 "Text inzerátu","text",
455 "Jiné sdìlení" ,"comments",
459 $tab=($title=="" ? "" : "\t");
461 $pretty=array_shift($fields);
462 $var=$pfx.array_shift($fields);
463 if (!isset($HTTP_POST_VARS[$var]))
465 if (""==($value=trim($HTTP_POST_VARS[$var])))
467 $r.="$tab$pretty:\t$value\n";
470 $pretty=array_shift($bools);
471 $var=$pfx.array_shift($bools);
472 if (!isset($HTTP_POST_VARS[$var]))
474 $r.="$tab$pretty:\t".($HTTP_POST_VARS[$var] ? "ANO" : "NE")."\n";
477 $pretty=array_shift($texts);
478 $var=$pfx.array_shift($texts);
479 if (!isset($HTTP_POST_VARS[$var]))
481 if (""==($value=trim(ereg_replace("[\r\n]+","\n",$HTTP_POST_VARS[$var]))))
483 $r.="$tab$pretty:".ereg_replace("\n","\\0\t","\n".$value)."\n";
485 if ($r!="" && $title!="")
490 function stamp_line()
492 return("stamp:\t".date("r")."\n");
495 function return_back($what)
500 .(!$have_js ? "" : "<input type=\"button\" value=\"")
502 .(!$have_js ? " (tlaèítkem "
503 .""<span class=\"quote\">Zpìt</span>" èi "
504 .""<span class=\"quote\">Back</span>" prohlí¾eèe)"
505 : "\" onclick=\"history.back()\" />")
509 // Data acquision error checking:
510 function datacheck_fail()
512 print("<p>Nyní se prosím ".return_back("vra»te zpìt")
513 ." na pøedchozí stránku a chybu zadaných dat opravte.</p>\n");
517 function mail_data($title,$data)
519 global $admin_mail,$mail_to;
521 // 5th mail argument is supported from PHP-4.0.5
522 return (!mail($mail_to,"EnergieWeb: $title",$data,
523 "From: EnergieWeb <$admin_mail>
525 Content-Type: text/plain; charset=iso-8859-2
526 Content-Disposition: inline
527 Content-Transfer-Encoding: 8bit
531 function gsm_row($name,$value)
533 return("<tr><td align=\"left\">$name</td>"
534 ."<td align=\"right\">".($value=="" ? "neuvádìjte" : $value)."</td>"
535 ."<td align=\"right\">".strtr($value,"/.","#*")."</td></tr>\n");
538 function gsm_table($total,$varsym)
540 global $firma_ucet,$firma_konstsym,$firma_specsym;
542 return("<blockquote><table border=\"1\" cellpadding=\"5\">\n"
543 ."<tr><th>polo¾ka</th><th>bankovní pøíkaz</th><th>".gsm_banking()."</th></tr>\n"
544 .gsm_row("Èíslo úètu",$firma_ucet)
545 .gsm_row("Èástka",sprintf("%.2f",$total))
546 .gsm_row("Konstantní symbol",$firma_konstsym)
547 .gsm_row("Variabilní symbol",$varsym)
548 .gsm_row("Specifický symbol",$firma_specsym)
549 ."</table></blockquote>\n"
553 function return_to_homepage()
555 global $HTTP_SERVER_VARS;
557 return("<p>Nyní se mù¾ete vrátit na <a href=\"".dirnameslashed($HTTP_SERVER_VARS["SCRIPT_NAME"])."\">úvodní stránku</a>.</p>\n");
560 function input_text($name,$size,$default_value="",$addons="")
562 $r="<input type=\"text\" name=\"$name\" size=\"$size\"";
563 $value=(isset($GLOBALS[$name]) ? $GLOBALS[$name] : $default_value);
565 $r.=" value=\"".htmlspecialchars($value)."\"";
570 function form_charset()
572 // CSacek-2.1.9+ required (mod_czech support dropped!)
573 // We MUST have input coded in "iso-8859-2" as we use
574 // "csacekRecodeInput Off", CSacek otherwise tries to recode input but CSacek
575 // _cannot_ know the encoding used by the client (moreover it IGNORES POST
576 // data MIME type, even if provided by Lynx 2.8.4dev.11, Mozilla 1.0.0
577 // doesn't provide anything).
578 // "iso-8859-2" should be replaced by $HTTP_SERVER_VARS["HTTP_X_CLIENT_CHARSET"]
579 // and "csacekRecodeInput On"(default) when CSacek fixes support of "utf-8"
580 // input-decoding, details in my mail <20020620134930.GA18761@short.ucw.cz>.
582 return('enctype="application/x-www-form-urlencoded" accept-charset="iso-8859-2"');
585 function print_form_radkova_inzerce($readonly,$total,$submit_name,$submit_value)
587 global $have_js,$text,$doklad;
589 $addons=(!$readonly ? "" : " readonly=\"readonly\"");
592 <form action="inzerat-submit.php<?php print($have_js); ?>" method="post" <?php print(form_charset()); ?>>
593 <table border="1" width="100%" cellpadding="5">
594 <tr><td align="center"><table border="0">
595 <tr><td align="left" class="tab-head">Text inzerátu</td></tr>
596 <tr><td align="center"><?php
597 print("<textarea name=\"text\" rows=\"7\" cols=\"60\""
598 .($readonly ? "" : " onkeyup=\"sum_total(this)\" onchange=\"sum_total(this)\"")
600 .(!isset($text) ? "" : htmlspecialchars(trim($text)))
604 if ($have_js || $total!="") {
606 <tr><td colspan="3"><hr /></td></tr>
607 <tr><td colspan="3" id="celkova_cena">Celková cena:
608 <input type="text" name="total" value="<?php
609 print(htmlspecialchars($total));
610 ?>" size="8" readonly="readonly" /></td></tr>
615 <tr><td align="left"><table border ="0" width="100%">
616 <tr><td>Název firmy / Jméno:</td ><td colspan="3"><?php print(input_text("name" ,60,"",$addons)); ?></td></tr>
617 <tr><td>Úplná adresa:</td ><td colspan="3"><?php print(input_text("adresa",60,"",$addons)); ?></td></tr>
618 <tr><td>Telefon:</td ><td colspan="3"><?php print(input_text("tel" ,25,"",$addons)); ?></td></tr>
619 <tr><td>IÈO:</td ><td ><?php print(input_text("ico" ,20,"",$addons)); ?></td>
620 <td>DIÈ</td ><td ><?php print(input_text("dic" ,20,"",$addons)); ?></td></tr>
621 <tr><td id="danovy_doklad"
622 >Zaslat daòový doklad?</td><td colspan="3"><input type="checkbox" name="doklad"<?php
624 // some hacks as "readonly" not supported for "checkbox"es (->"disabled" for them)
625 .(!($have_js || $readonly) ? "" : " onclick=\"sum_total(this)\"")
626 .(!($have_js || $readonly) ? "" : " disabled=\"disabled\"")
627 .(!isset($doklad) ? "" : " checked=\"checked\"")
628 .ereg_replace(" readonly=\"readonly\"","",$addons)." />");
630 <tr><td id="pocet_zverejneni"
631 >Poèet zveøejnìní:</td ><td ><?php print(input_text("pocet",5,1,
632 $addons." onkeyup=\"sum_total(this)\" onchange=\"sum_total(this)\"")); ?></td>
633 <td>e-mail:</td ><td ><?php print(input_text("mail",40,"",$addons)); ?></td></tr>
635 <tr><td align="center" id="submit_button"><?php
636 print("<input type=\"submit\" name=\"$submit_name\" value=\"".htmlspecialchars($submit_value)."\""
637 .(!($have_js || $readonly) ? "" : " onclick=\"return(validate(this.form))\"")
645 function footer_img($url,$text,$size)
647 global $footer_LOCAL;
648 if (!isset($footer_LOCAL))
649 return("<img src=\"$url\" $size alt=\"$text\" title=\"$text\" />");
654 function a_href($url,$contents)
656 global $have_ent,$energie_base;
659 $urlent=htmlspecialchars($url);
662 else if (!ereg("^[a-z]+://",$url)) // $url is our resource
664 else if (isset($have_ent) && !$have_ent) // non-ent client
666 else if ($have_ent) // ent client
668 else // unknown client, htmlspecialchars() should not be needed here
669 $r.=htmlspecialchars($energie_base."redirect.php?location=".urlencode($url));
670 $r.="\">$contents</a>";
674 function footer($delimit=true)
676 // deadlock prevention:
677 global $footer_passed;
678 if (isset($footer_passed))
682 global $cvs_id_html,$viewcvs,$viewcvs,$HTTP_SERVER_VARS,$energie_base;
684 print("<p> </p>\n");
685 $uri="uri=".urlencode("http://".$HTTP_SERVER_VARS["HTTP_HOST"].$HTTP_SERVER_VARS["REQUEST_URI"]);
688 <table border="0" width="100%">
689 <tr class="footer"><td align="left"><span class="cvs-id"><?php print($cvs_id_html); ?></span></td><td align="right"><?php
691 .a_href("http://validator.w3.org/check?$uri",
692 img($energie_base."img/valid-xhtml11.".(image_supported("image/png") ? "png" : "gif"),"Valid XHTML 1.1!"))
693 .a_href("http://jigsaw.w3.org/css-validator/validator?warning=2&profile=css2&$uri",
694 img($energie_base."img/vcss." .(image_supported("image/png") ? "png" : "gif"),"Valid CSS!"))
695 // missing trailing '/' is required by http://www.w3.org/Style/CSS/Buttons/Menu #<li> 4
696 .a_href("http://www.w3.org/Style/CSS/Buttons",'<span style="background-color: #ffcc66;">'
697 .img($energie_base."img/mwcts." .(image_supported("image/png") ? "png" : "gif"),"Made with CSS").'</span>')
706 // Stolen from: php-manual.html#function.header
709 header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // Date in the past
710 header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); // always modified
711 header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
712 header("Pragma: no-cache"); // HTTP/1.0
715 function heading($title=true,$indexme=true)
717 global $msie_major,$mozilla_major,$title_tail,$head_css,$have_css,$head,$heading_done,$title_prefix,$force_charset;
719 if (isset($heading_done))
723 // $HTTP_SERVER_VARS["CLIENT_CHARSET"] ignored (mod_czech support dropped!)
724 $client_charset=(isset($force_charset) ? $force_charset : "iso-8859-2");
725 header("Content-type: text/html; charset=$client_charset");
726 header("Content-Style-Type: text/css");
727 if (!isset($msie_major) || $msie_major>=4) {
728 print('<?xml version="1.0" encoding="'.$client_charset.'"?>'."\n");
731 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
732 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="cs">
734 print("<title>$title_prefix");
735 if (isset($title_tail))
736 print(": ".htmlspecialchars($title_tail));
739 ?><style type="text/css"><!--
740 .cvs-id { font-family: monospace; }
741 .error { color: red; background-color: transparent; }
742 .quote { font-family: monospace; }
743 .nowrap { white-space: nowrap; }
744 .centered { text-align: center; }
745 .tab-bold { font-weight: bold; }
746 .tab-head { font-weight: bold; color: yellow; background-color: transparent; }
748 background-color: black;
751 :link { color: aqua; background-color: transparent; }
752 :visited { color: teal; background-color: transparent; }
753 h1,h2 { color: yellow; background-color: transparent; }
754 .footer img { vertical-align: middle; }
756 if (isset($head_css))
757 print(trim($head_css)."\n");
758 print("--></style>\n");
760 print('<meta name="robots" content="'.($indexme ? "" : "no" ).'index,follow" />'."\n");
763 print("</head><body");
764 if (isset($mozilla_major) && $mozilla_major==4)
765 print(" bgcolor=\"black\" text=\"white\" link=\"aqua\" vlink=\"teal\"");
768 print("<h1 class=\"centered\"><a href=\"/\">"
769 .img("img/eap-title.".(image_supported("image/png") ? "png" : "gif"),"Energie & Peníze")