<?php require_once "../../phplib/util.php"; set_time_limit(0); // If no GET arguments are set, print usage and return. if (count($_GET) == 0) { SmartyWrap::addCss('polar'); SmartyWrap::displayWithoutSkin('update3Instructions.tpl'); return; } util_enforceGzipEncoding(); header('Content-type: text/xml'); $export = util_getRequestParameter('export'); $timestamp = util_getRequestIntParameter('timestamp'); $version = util_getRequestParameterWithDefault('version', '3.0'); if ($export && util_isDesktopBrowser() && !session_getUser()) { SmartyWrap::display('bits/updateError.tpl'); exit; } if ($export == 'sources') { SmartyWrap::assign('sources', Model::factory('Source')->find_many()); SmartyWrap::displayWithoutSkin('xml/update3Sources.tpl'); } else { if ($export == 'inflections') { SmartyWrap::assign('inflections', Model::factory('Inflection')->order_by_asc('id')->find_many()); SmartyWrap::displayWithoutSkin('xml/update3Inflections.tpl'); } else { if ($export == 'abbrev') { SmartyWrap::assign('abbrev', AdminStringUtil::loadRawAbbreviations()); SmartyWrap::displayWithoutSkin('xml/update3Abbrev.tpl'); } else {
require_once "../../phplib/util.php"; // Allow this script to run indefinitely long set_time_limit(0); // If no GET arguments are set, print usage and return. if (count($_GET) == 0) { SmartyWrap::displayWithoutSkin('updateInstructions.tpl'); 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";