diff --git a/utils/getconstants.php b/utils/getconstants.php deleted file mode 100644 index 5e439dd..0000000 --- a/utils/getconstants.php +++ /dev/null @@ -1,75 +0,0 @@ -. - */ - -require_once(dirname(__DIR__) . "/helpers/auth.php"); -require_once(ROOT_DIR . "/helpers/config.php"); -require_once(ROOT_DIR . "/helpers/lang.php"); - -$auth = new uAuth(); -$langStrings = (new uLang(uConfig::$lang))->getStrings(); - -header("Content-type: text/xml"); -$xml = new XMLWriter(); -$xml->openURI("php://output"); -$xml->startDocument("1.0"); -$xml->setIndent(true); -$xml->startElement('root'); - - -$xml->startElement("auth"); - $xml->writeElement("isAdmin", $auth->isAdmin()); - $xml->writeElement("isAuthenticated", $auth->isAuthenticated()); - if ($auth->isAuthenticated()) { - $xml->writeElement("userId", $auth->user->id); - $xml->writeElement("userLogin", $auth->user->login); - } -$xml->endElement(); - -$xml->startElement("config"); - $xml->writeElement("interval", uConfig::$interval); - $xml->writeElement("units", uConfig::$units); - $xml->writeElement("mapapi", uConfig::$mapapi); - $xml->writeElement("gkey", uConfig::$gkey); - $xml->startElement("ol_layers"); - foreach (uConfig::$ol_layers as $key => $val) { - $xml->writeElement($key, $val); - } - $xml->endElement(); - $xml->writeElement("init_latitude", uConfig::$init_latitude); - $xml->writeElement("init_longitude", uConfig::$init_longitude); - $xml->writeElement("pass_regex", uConfig::passRegex()); - $xml->writeElement("strokeWeight", uConfig::$strokeWeight); - $xml->writeElement("strokeColor", uConfig::$strokeColor); - $xml->writeElement("strokeOpacity", uConfig::$strokeOpacity); -$xml->endElement(); - -$xml->startElement("lang"); - $xml->startElement("strings"); - foreach ($langStrings as $key => $val) { - $xml->writeElement($key, $val); - } - $xml->endElement(); -$xml->endElement(); - - -$xml->endElement(); -$xml->endDocument(); -$xml->flush(); - -?>