3 error_reporting(E_ALL);
5 $admin_mail="short@ucw.cz";
6 $viewcvs=ereg_replace("^/~short/","\\0cgi-bin/viewcvs/",$HTTP_SERVER_VARS["SCRIPT_NAME"]);
7 if ($viewcvs==$HTTP_SERVER_VARS["SCRIPT_NAME"])
9 $cvs_id_split=split(" ",$cvs_id);
10 if (count($cvs_id_split)==8) {
11 $cvs_id_split[1]="<a href=\"$viewcvs\">".$cvs_id_split[1]."</a>";
12 $cvs_id_split[5]="<a href=\"mailto:".$cvs_id_split[5]."@".$HTTP_SERVER_VARS["HTTP_HOST"]."\">".$cvs_id_split[5]."</a>";
14 $cvs_id_html=join(" ",$cvs_id_split);
16 $have_js=(isset($HTTP_GET_VARS["have_js"]) || isset($HTTP_POST_VARS["have_js"])
18 if (isset($detect_js) && !$have_js)
19 $head.='<script type="text/javascript" src="have_js.js"></script>'."\n";
21 if (ereg("[[:<:]]MSIE ([0-9]+)\\.",$HTTP_SERVER_VARS["HTTP_USER_AGENT"],$msie_major_a))
22 $msie_major=$msie_major_a[1];
24 function addpercents($url)
27 foreach(preg_split('//', $url, -1, PREG_SPLIT_NO_EMPTY) as $c)
28 if (ereg("[a-zA-Z0-9]",$c))
31 $r.=sprintf("%%%02X",ord($c));
35 function fatal($msg="UNKNOWN")
39 print("\n<br /><h1 class=\"error\">Nastala chyba pøi zpracování: $msg!</h1>\n"
40 ."<p>Mù¾ete tento problém nahlásit <a href=\"mailto:$admin_mail\">správci tohoto webu</a>.</p>\n");
46 // deadlock prevention:
47 global $footer_passed;
48 if (isset($footer_passed))
52 global $cvs_id_html,$viewcvs,$viewcvs,$HTTP_SERVER_VARS;
55 <table border="0" width="100%">
56 <tr><td align="left"><span class="cvs-id"><?php print($cvs_id_html); ?></span></td><td align="right"><a
57 href="http://validator.w3.org/check/referer"><img src="http://www.w3.org/Icons/valid-xhtml10"
58 style="border:0;width:88px;height:31px" width="88" height="31" alt="Valid XHTML 1.0!" /></a><a
59 href="http://jigsaw.w3.org/css-validator/validator?warning=2&profile=css2&uri=<?php
60 print(addpercents("http://".$HTTP_SERVER_VARS["HTTP_HOST"].$HTTP_SERVER_VARS["REQUEST_URI"]));
61 ?>"><img src="http://jigsaw.w3.org/css-validator/images/vcss"
62 style="border:0;width:88px;height:31px" width="88" height="31" alt="Valid CSS!" /></a></td></tr>
69 header("Content-type: text/html; charset=iso-8859-2");
70 if (!isset($msie_major) || $msie_major>=4)
71 print('<?xml version="1.0" encoding="iso-8859-2"?>'."\n");
73 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
74 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="cs" lang="cs">
75 <head><title>Energie & peníze<?php
76 if (isset($title_tail))
77 print(": $title_tail");
79 <style type="text/css"><!--
80 .cvs-id { font-family: monospace; }
81 .error { color: red; }<?php
84 print("--></style>\n");