$arrayResponse = sendRequest($rpc_server, '/', $xmlRequest, $rpc_port); echo json_encode($arrayResponse); } else { if ($posttype == "processInfiniumDataset") { $file_id = $_POST['file_id']; $software = $_POST['software']; $referenceDataset = $_POST['reference_dataset']; $name = $_POST['name']; $scoresIndex = $_POST['scores_index']; $hypoIndex = $_POST['hypo_index']; $hyperIndex = $_POST['hyper_index']; $rankIndex = $_POST['rank_index']; $email = $_POST['email']; $moreInfoLink = $_POST['more_info_link']; $description = $_POST['description']; $logxmlRequest = xmlrpc_encode_request('log_me', array(anonimizedUser() . " processing " . $name . " from software " . $software)); sendRequest($rpc_server, '/', $logxmlRequest, $rpc_port); $xmlRequest = xmlrpc_encode_request('processInfiniumDataset', array($file_id, $software, $referenceDataset, $name, $scoresIndex, $hypoIndex, $hyperIndex, $rankIndex, $email, $moreInfoLink, $description)); $arrayResponse = sendRequest($rpc_server, '/', $xmlRequest, $rpc_port); echo json_encode($arrayResponse); } else { echo "POST incorrect" . $posttype; } } } } } } } else { echo "Nothing selected. You must specify the 'type' parameter"; }
require_once "grab_globals.lib.php"; include "xmlrpc_submit.php"; include "settings.php"; include "utils.php"; // This part send a request for basic information for the regions supported by the current started server ob_start(); $xmlRequest = xmlrpc_encode_request('getStatus', array($_SERVER['SERVER_NAME'], "upload")); $arrayResponse = sendRequest($rpc_server, '/', $xmlRequest, $rpc_port); ob_end_clean(); if ($arrayResponse === "OK") { //header('Content-Type: text/html'); // plain html file } else { //echo "not ok $arrayResponse"; if (strlen(strstr($_SERVER['SERVER_NAME'], 'moebius')) == 0) { $subject = "EpiExplorer XMLRPC Server is not working! (" . date("H:i:s d.m.y") . " , " . anonimizedUser() . ")"; $body = "On " . date("H:i:s d.m.y") . " requested by " . $_SERVER["REMOTE_ADDR"] . " (" . gethostbyaddr($_SERVER["REMOTE_ADDR"]) . "\n" . "Status:'" . $arrayResponse . "'\n" . "More info: \n" . "Server name: " . $_SERVER['SERVER_NAME'] . "\n" . "Request URI: " . $_SERVER['REQUEST_URI'] . "\n" . "Http referer: " . $_SERVER['HTTP_REFERER'] . "\n"; if (mail($contact_email, $subject, $body)) { header('Location: maintenance.php'); } else { header('Location: maintenance.php'); } } else { header('Location: maintenance.php'); } } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<?php require_once "grab_globals.lib.php"; include "xmlrpc_submit.php"; include "settings.php"; include "utils.php"; require_once 'phpJSON/JSON.php'; header('Content-Type: text/html'); // plain html file if (isset($_GET['datasetID'])) { $datasetID = $_GET['datasetID']; // This part send a request for basic information for the regions supported by the current started server $logxmlRequest = xmlrpc_encode_request('log_me', array(anonimizedUser() . " requests the status for dataset:'{$datasetID}' ")); sendRequest($rpc_server, '/', $logxmlRequest, $rpc_port); $xmlRequest = xmlrpc_encode_request('getDatasetStatus', array($datasetID)); $arrayResponse = sendRequest($rpc_server, '/', $xmlRequest, $rpc_port); if ($arrayResponse[0] == 0) { echo "Your dataset was successfully processed and is ready to use! <br/><br/>You can access it directly <a href='index.php?userdatasets={$datasetID}' target='_blank'>here</a> or load it from the <a href=\"index.php\" target='_blank'>EpiExplorer</a> menu using its unique identifier <b>{$datasetID}</b>"; } else { if ($arrayResponse[0] == 1) { echo "Your dataset is annotated by EpiExplorer at the moment! <br/><b>" . $arrayResponse[1] . "</b><br/> Please check again later.<br/> <i>We recommend providing your email for dataset computation as you will receive an automatic notification as soon as your dataset is processed.</i>"; } else { if ($arrayResponse[0] == 2) { if (count($arrayResponse) > 1) { echo "Your dataset is still in the waiting queue.<br/> There are " . $arrayResponse[1] . " computations scheduled before it.<br/><br/> Please check again later. <br/><i>We recommend providing your email for dataset computation as you will receive an automatic notification as soon as your dataset is processed.</i>'"; } else { echo "Your dataset is still in the waiting queue.<br/><br/> Please check again later. <br/><i>We recommend providing your email for dataset computation as you will receive an automatic notification as soon as your dataset is processed.</i>'"; } } else { if ($arrayResponse[0] == 3) { echo "There was an error when processing your dataset.<br/><br/> The error message was '" . $arrayResponse[1] . "'<br/><br/> If the error message is unclear please contact us for more information at " . $contact_email;
<?php require_once "grab_globals.lib.php"; include "xmlrpc_submit.php"; include "settings.php"; include "utils.php"; // This part send a request for basic information for the regions supported by the current started server ob_start(); $xmlRequest = xmlrpc_encode_request('getStatus', array()); $arrayResponse = sendRequest($rpc_server, '/', $xmlRequest, $rpc_port); ob_end_clean(); if ($arrayResponse === "OK") { } else { //echo "not ok $arrayResponse"; $subject = "CGS XMLRPC Server is not working! (" . date("H:i:s d.m.y") . " , " . anonimizedUser() . ")"; $body = "On " . date("H:i:s d.m.y") . " requested by " . anonimizedUser() . "\nStatus:'" . $arrayResponse . "'"; if (mail($contact_email, $subject, $body)) { header('Location: maintenance.php'); } else { header('Location: maintenance.php'); } } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link href="menu/menu.css" rel="stylesheet" type="text/css" /> <!-- Global var for commonExploreCGS.js -->
<?php require_once "grab_globals.lib.php"; include "xmlrpc_submit.php"; $rpc_server = 'infao3806'; $rpc_dataset_port = '51525'; $rpc_query_port = '51515'; if (isset($_GET["id"])) { $exportID = $_GET["id"]; $logxmlRequest = xmlrpc_encode_request('log_me', array(anonimizedUser() . " requested the exported dataset " . $exportID)); sendRequest($rpc_server, '/', $logxmlRequest, $rpc_dataset_port); $dir = "/TL/www/cosgen/www/pub/Datasets/"; $file = $dir . $exportID . ".zip"; if (file_exists($file)) { // Generate the server headers header('Content-type: application/x-compressed' . "\n"); header('Content-type: application/zip' . "\n"); header('Content-Disposition: filename="' . basename($file) . '"'); header("Content-Transfer-Encoding: binary"); header('Accept-Ranges: bytes'); header('Content-length: ' . filesize($file) . "\n"); /* The three lines below basically make the download non-cacheable */ header("Cache-control: private"); header('Pragma: private'); header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); @readfile($file); die; } else { echo "No file corresponding to id " . $exportID; }