common_cadline_libraries (CRM hardlock/db/users classes; upstream cadline_web/cadcommonlib), maintenance/ (ARCHLine.XP license backend; upstream cadline_web/maintenance), maintenance2/. Vetted live files (byte-truth); upstream repos in PROVENANCE.md. NOTE: could be git submodules — kept as live files for byte-fidelity. Signed-off-by: LÁZÁR Imre <imre@illusion.hu> Assisted-by: claude-code@claude-opus-4-8
58 lines
1.2 KiB
PHP
58 lines
1.2 KiB
PHP
<?php
|
|
header('Content-Type: text/xml; charset=utf-8');
|
|
header('Content-Disposition: inline; filename=response.xml');
|
|
|
|
if (!class_exists('crm_hardlock')) require_once("common_cadline_libraries/crm_hardlock.class.php");
|
|
|
|
$year = (int)$_GET['year'];
|
|
$npID = $_GET['compid'];
|
|
$se = $_GET['se'];
|
|
$lang = $_GET['lang'];
|
|
$url = '';
|
|
$prefAzure = '';
|
|
$prefAws = '';
|
|
|
|
$ltString = $se != '' ? '_' . $se : '';
|
|
|
|
if ($year < 2023) {
|
|
$year = 2024;
|
|
}
|
|
|
|
if ($lang == 'kor') {
|
|
$prefAzure = '<Preferred>true</Preferred>';
|
|
}
|
|
|
|
if ($lang == 'us') {
|
|
$prefAws = '<Preferred>true</Preferred>';
|
|
}
|
|
|
|
$resultXml = '';
|
|
|
|
$mirrorLinks = crm_hardlock::getMirrorLinks();
|
|
|
|
$resultXml .= "<MirrorDownloads>";
|
|
foreach ($mirrorLinks as $mirrorLink) {
|
|
$url = crm_hardlock::generateDownloadUrl($mirrorLink['link'], $year, $ltString);
|
|
|
|
$resultXml .= "<Mirror>";
|
|
|
|
if ($mirrorLink['id'] == 2) {
|
|
$resultXml .= $prefAws;
|
|
}
|
|
|
|
if ($mirrorLink['id'] == 3) {
|
|
$resultXml .= $prefAzure;
|
|
}
|
|
|
|
$resultXml .= "<Link>{$url}</Link>";
|
|
|
|
if ($mirrorLink['comment'] != '') {
|
|
$resultXml .= "<Comment>" . $mirrorLink['comment'] . "</Comment>";
|
|
}
|
|
|
|
$resultXml .= "</Mirror>";
|
|
}
|
|
$resultXml .= "</MirrorDownloads>";
|
|
|
|
echo $resultXml;
|