$maj) return 1;
if ((getClientVerMaj() == $maj) && (getClientVerMin() >= $min)) return 1;
return 0;
}
function logXmlErr($str)
{
logXml($str, 1);
}
function logXml($str, $err = 0)
{
if (!defined("ZM_XML_DEBUG")) {
/* Check session variable */
if (isset($_SESSION['xml_debug'])) define("ZM_XML_DEBUG", $_SESSION['xml_debug']);
else define ("ZM_XML_DEBUG", "0");
}
if (!defined("ZM_XML_LOG_TO_FILE")) {
/* Check session variable */
if (isset($_SESSION['xml_log_to_file'])) define("ZM_XML_LOG_TO_FILE", $_SESSION['xml_log_to_file']);
else define ("ZM_XML_LOG_TO_FILE", "1");
}
if (!defined("ZM_XML_LOG_FILE")) {
/* Check session variable */
if (isset($_SESSION['xml_log_file'])) define("ZM_XML_LOG_FILE", $_SESSION['xml_log_file']);
else define ("ZM_XML_LOG_FILE", "/tmp/zm_xml.log");
}
/* Only log if debug is enabled */
if (ZM_XML_DEBUG == 0) return;
/* Logging is enabled, set log string */
$logstr = "XML_LOG (".($err?"ERROR":"NOTICE")."): ".$str.(ZM_XML_LOG_TO_FILE?"\n":"");
if (ZM_XML_LOG_TO_FILE) {
error_log("[".date("r")."] ".$logstr, 3, ZM_XML_LOG_FILE);
} else {
error_log($logstr);
}
}
/* Returns defval if varname is not set, otherwise return varname */
function getset($varname, $defval)
{
if (isset($_GET[$varname])) return $_GET[$varname];
return $defval;
}
function xml_header()
{
header ("content-type: text/xml");
echo "";
}
function xml_tag_val($tag, $val)
{
echo "<".$tag.">".$val."".$tag.">";
//echo "<".$tag.">".$val."</".$tag.">
";
}
function xml_tag_sec($tag, $open)
{
if ($open) $tok = "<";
else $tok = "";
echo $tok.$tag.">";
}
function xhtmlHeaders( $file, $title )
{
?>