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)
}
}
-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;
{
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;