return; } $acceptEncoding = isset($_SERVER['HTTP_ACCEPT_ENCODING']) ? $_SERVER['HTTP_ACCEPT_ENCODING'] : ""; if (strstr($acceptEncoding, "gzip") === FALSE) { header("HTTP/1.0 403 Forbidden"); return; } $timestamp = util_getRequestIntParameter('timestamp'); $version = util_getRequestParameterWithDefault('version', '1.0'); if ($timestamp !== null && util_isDesktopBrowser() && !session_getUser()) { SmartyWrap::display('bits/updateError.tpl'); exit; } header('Content-type: text/xml'); $defDbResult = db_execute("select * from Definition where status = " . Definition::ST_ACTIVE . " and sourceId in (select id from Source where canDistribute) " . "and modDate >= '{$timestamp}' order by modDate, id"); $lexemDbResult = Lexem::loadNamesByMinModDate($timestamp); $sourceMap = createSourceMap(); userCache_init(); $currentLexem = array(0, ''); // Force loading a lexem on the next comparison. print "<!DOCTYPE dict [\n"; print " <!ENTITY diams \"♦\">\n"; print " <!ENTITY loz \"◊\">\n"; print " <!ENTITY rsquo \"’\">\n"; print "]>\n"; print "<Dictionary>\n"; print " <Timestamp>" . time() . "</Timestamp>\n"; if ($version == '1.0') { print " <NumResults>" . $defDbResult->rowCount() . "</NumResults>\n"; } foreach ($defDbResult as $row) {