error_reporting(E_ALL);
setlocale(LC_ALL,"cs_CZ.iso-8859-2");
- fixampvars();
include("config.php");
}
$cvs_id_html=join(" ",$cvs_id_split);
+ if (!isset($head))
+ $head="";
+
+ unset($have_ent);
+ if (isset($HTTP_GET_VARS[ "have_ent"]))
+ $have_ent=true;
+ if (isset($HTTP_GET_VARS["amp;have_ent"]))
+ $have_ent=false;
+ if ((!isset($detect_ent) || $detect_ent) && !isset($have_ent) && $HTTP_SERVER_VARS["REQUEST_METHOD"]=="GET")
+ $head.='<meta http-equiv="Refresh" content="0; URL='
+ .htmlspecialchars("http://".$HTTP_SERVER_VARS["HTTP_HOST"].$HTTP_SERVER_VARS["PHP_SELF"]
+ ."?".(strlen($HTTP_SERVER_VARS["QUERY_STRING"]) ? $HTTP_SERVER_VARS["QUERY_STRING"] : "detect_ent_glue=1")
+ ."&have_ent=detect")
+ .'">'."\n";
+ fixampvars();
+
$have_js=(isset($HTTP_GET_VARS["have_js"]) || isset($HTTP_POST_VARS["have_js"])
? "?have_js=1" : "");
if (isset($detect_js) && !$have_js)
- $head.='<script type="text/javascript" src="have_js.js"></script>'."\n";
+ $head.='<script type="text/javascript" src="'.(!isset($energie_base) ? "" : $energie_base).'have_js.js"></script>'."\n";
$user_agent=(!isset($HTTP_SERVER_VARS["HTTP_USER_AGENT"]) ? "" : $HTTP_SERVER_VARS["HTTP_USER_AGENT"]);
if (ereg("[[:<:]]MSIE ([0-9]+)\\.",$user_agent,$msie_major_a))
}
}
-function addpercents($url)
-{
- $r=$c="";
- foreach(preg_split('//', $url, -1, PREG_SPLIT_NO_EMPTY) as $c)
- if (ereg("[a-zA-Z0-9]",$c))
- $r.=$c;
- else
- $r.=sprintf("%%%02X",ord($c));
- return($r);
-}
-
function fatal($msg="UNKNOWN")
{
global $admin_mail;
function img($file,$alt,$attrs="")
{
- list($width,$height)=getimagesize($file);
+ list($width,$height)=getimagesize(ereg_replace("\\.mng\$",".gif",$file));
$alt=htmlspecialchars($alt);
return("<img src=\"$file\" alt=\"$alt\" title=\"$alt\" ".img_size($width,$height)
.($attrs=="" ? "" : " ".$attrs)." />");
function gsm_banking()
{
- return(img("img/sluzby_bankovni_pggsm.gif","Paegas GSM banking","class=\"img-align\""));
+ return(img("img/sluzby_bankovni_pggsm.".(image_supported("video/x-mng") ? "mng" : "gif"),
+ "Paegas GSM banking","class=\"img-align\""));
}
function price_a()
<li>
<table border="0">
-<tr><td><?php print("<a href=\"$base.pdf\">".img("img/adobe-pdficon-alpha.gif","Adobe PDF")."</a>"); ?></td>
+<tr><td><?php print("<a href=\"$base.pdf\">".img("img/adobe-pdficon-alpha.".(image_supported("image/png") ? "png" : "gif"),
+ "Adobe PDF")."</a>"); ?></td>
<td><?php print(data_href("$base.pdf","Dokument PDF")); ?></td>
</tr>
</table>
<blockquote>
<table border="0">
<tr><td><a href="http://www.adobe.com/products/acrobat/readstep.html"><?php
- print(img("img/adobe-getacro.gif","Get Adobe Acrobat Reader"));
+ print(img("img/adobe-getacro.".(image_supported("image/png") ? "png" : "gif"),"Get Adobe Acrobat Reader"));
?></a></td>
<td class="smaller">Soubor je ve formátu <span class="italic">Adobe Acrobat</span>,
pro jeho pøeètení si prosím nainstalujte
{
global $footer_LOCAL;
if (!isset($footer_LOCAL))
- return("<img src=\"$url\" $size alt=\"$text\" />");
+ return("<img src=\"$url\" $size alt=\"$text\" title=\"$text\" />");
else
return($text);
}
+function a_href($url,$contents)
+{
+ global $have_ent;
+
+ print("<a href=\"");
+ if (ereg("^[a-z]+://",$url) && !$have_ent)
+ $url="redirect.php?location=".urlencode($url);
+ print(htmlspecialchars($url)."\">$contents</a>");
+}
+
function footer($delimit=true)
{
// deadlock prevention:
global $cvs_id_html,$viewcvs,$viewcvs,$HTTP_SERVER_VARS;
if ($delimit)
print("<p> </p>\n");
- $uri="uri=".addpercents("http://".$HTTP_SERVER_VARS["HTTP_HOST"].$HTTP_SERVER_VARS["REQUEST_URI"]);
+ $uri="uri=".urlencode("http://".$HTTP_SERVER_VARS["HTTP_HOST"].$HTTP_SERVER_VARS["REQUEST_URI"]);
?>
<hr />
<table border="0" width="100%">
-<tr><td align="left"><span class="cvs-id"><?php print($cvs_id_html); ?></span></td><td align="right"><a
- href="http://validator.w3.org/check?<?php
- print($uri); ?>"><?php
- print footer_img("http://www.w3.org/Icons/valid-xhtml11","Valid XHTML 1.1!",img_size(88,31));
- ?></a><a href="http://jigsaw.w3.org/css-validator/validator?warning=2&profile=css2&<?php
- print($uri); ?>"><?php
- print footer_img("http://jigsaw.w3.org/css-validator/images/vcss","Valid CSS!",img_size(88,31));
- ?></a></td></tr>
+<tr><td align="left"><span class="cvs-id"><?php print($cvs_id_html); ?></span></td><td align="right"><?php
+ print(""
+ .a_href("http://validator.w3.org/check?$uri",
+ img("img/valid-xhtml11.".(image_supported("image/png") ? "png" : "gif"),"Valid XHTML 1.1!"))
+ .a_href("http://jigsaw.w3.org/css-validator/validator?warning=2&profile=css2&$uri",
+ img("img/vcss." .(image_supported("image/png") ? "png" : "gif"),"Valid CSS!"))
+ );
+ ?></td></tr>
</table>
</body></html>
<?php
if (isset($heading_done))
return;
- $heading_done=1;
+ $heading_done=true;
if (isset($force_charset))
$client_charset=$force_charset;