blob: e081a8ed8d057545a05e2c1f7f1fb197dc566d97 [file] [log] [blame]
<?php
/***
* Fetch various information from the RCMED query API. Serves as a workaround
* for cross-domain ajax calls.
*/
$action = $_REQUEST['action'];
switch (strtoupper($action)) {
case "DATASETS":
echo file_get_contents(
App::Get()->settings['rcmed_query_api_url_base'] . "/datasets.php");
break;
case "PARAMETERS":
$dataset = $_REQUEST['dataset'];
echo file_get_contents(
App::Get()->settings['rcmed_query_api_url_base'] . '/parameters.php?dataset=' . $dataset);
break;
default:
echo "{}";
}
exit;