Beispiel #1
0
        UploadDICOM($uuid, $seriesnotes, $altuids, $anonymize, $dataformat, $equipmentid, $siteid, $projectid, $instanceid, $matchidonly, $transactionid);
        break;
    case 'getUID':
        GetUIDFromAltUID($altuid);
        break;
    case 'getInstanceList':
        GetInstanceList($u);
        break;
    case 'getProjectList':
        GetProjectList($u, $instance);
        break;
    case 'getSiteList':
        GetSiteList($u, $instance);
        break;
    case 'getEquipmentList':
        GetEquipmentList();
        break;
    case 'startTransaction':
        StartTransaction($u);
        break;
    case 'endTransaction':
        EndTransaction($transactionid);
        break;
    default:
        echo "Welcome to NiDB v" . $GLOBALS['cfg']['version'];
}
/* -------------------------------------------- */
/* ------- Authenticate ----------------------- */
/* -------------------------------------------- */
function Authenticate($username, $password)
{
Beispiel #2
0
	$projectid = GetVariable("projectid");
	$instanceid = GetVariable("instanceid");
	$transactionid = GetVariable("transactionid");
	$altuid = GetVariable("altuid");
	$instance = GetVariable("instance");
	$dataformat = GetVariable("dataformat");
	$matchidonly = GetVariable("matchidonly");
	
	switch($action) {
		case 'UploadNonDICOM': UploadDICOM($uuid, $anonymize, $dataformat, $equipmentid, $siteid, $projectid, $instanceid, $matchidonly,$transactionid); break;
		case 'UploadDICOM': UploadDICOM($uuid, $anonymize, $dataformat, $equipmentid, $siteid, $projectid, $instanceid, $matchidonly,$transactionid); break;
		case 'getUID': GetUIDFromAltUID($altuid); break;
		case 'getInstanceList': GetInstanceList($u); break;
		case 'getProjectList': GetProjectList($u, $instance); break;
		case 'getSiteList': GetSiteList($u, $instance); break;
		case 'getEquipmentList': GetEquipmentList(); break;
		case 'startTransaction': StartTransaction($u); break;
		case 'endTransaction': EndTransaction($transactionid); break;
		default: echo "Welcome to NiDB v" . $GLOBALS['cfg']['version'];
	}
	
	/* -------------------------------------------- */
	/* ------- Authenticate ----------------------- */
	/* -------------------------------------------- */
	function Authenticate($username, $password) {
		$username = mysql_real_escape_string($username);
		$password = mysql_real_escape_string($password);
		
		if ((AuthenticateUnixUser($username, $password)) && (!$GLOBALS['ispublic'])) {
			$sqlstring = "insert into remote_logins (username, ip, login_date, login_result) values ('$username', '" . $_SERVER['REMOTE_ADDR'] . "', now(), 'success')";
			$result = mysql_query($sqlstring) or die("Query failed: " . mysql_error() . "<br><i>$sqlstring</i><br>");