$ifileServer = $GLOBALS["conf"]->rawDataSrc["lucas"]->user . "@" . $GLOBALS["conf"]->rawDataSrc["lucas"]->host; $src = $GLOBALS["conf"]->rawDataSrc[$scanner]; if (!isset($_REQUEST["examNum"])) { $examNum = $_REQUEST["examNum"]; } if (isset($examNum) && $examNum != "") { // Note that for this to work, you must have an ssh private // key stored in the specified place (/var/www/.ssh/id_dsa). // The public component of this key needs to be entered into // the /home/wandell/.shh/authorized_hosts file on lucas. // ("ssh-keygen -t rsa -f /var/www/.ssh/id_dsa" will make the keys.) $series = `ssh -i /var/www/.ssh/id_dsa -o "StrictHostKeyChecking no" {$ifileServer} listseries -r {$src->name} {$examNum}`; echo "<p>Scan series from exam <strong>{$examNum}</strong> on <strong>{$src->name}</strong>:</p>\n"; echo "<pre>{$series}</pre>\n"; } $pfileTree = listPfiles($src); if (!$pfileTree) { echo "<p class=msg>No P-files found.</p>\n"; } else { echo "<p>Files currently in <i>{$src->dataDir}</i> on <strong>{$scanner}</strong> ({$src->host}):</p>\n"; echo "<table border=1 cellspacing=1 cellpadding=4>\n"; foreach ($pfileTree as $pfileName => $files) { $filesStr = ""; $totalSize = 0; foreach ($files->name as $num => $f) { $size = getFileSizeString($files->size[$num]); $time = $files->time[$num]; $filesStr .= basename($f) . "({$size}, {$time}) "; $totalSize += $files->size[$num]; } echo "<tr>\n<td>{$pfileName} (" . getFileSizeString($totalSize) . "</td>\n";
if (isset($_REQUEST["examNumber"])) { $examNumber = $_REQUEST["examNumber"]; } else { $examNumber = 0; } if ($examNumber != 0) { // Note that for this to work, you must have an ssh private // key stored in the specified place (/var/www/.ssh/id_dsa). // The public component of this key needs to be entered into // the /home/wandell/.shh/authorized_hosts file on lucas. // ("ssh-keygen -t rsa -f /var/www/.ssh/id_dsa" will make the keys.) $series = `ssh -i /var/www/.ssh/id_dsa -o "StrictHostKeyChecking no" {$ifileServer} listseries -r {$dataSramc->name} {$examNum}`; echo "<p>Scan series from exam <strong>{$examNum}</strong> on <strong>{$scanner}</strong> ({$dataSrc->name}):</p>\n"; echo "<pre>{$series}</pre>\n"; } $pfileTree = listPfiles($dataSrc); if (!$pfileTree) { echo "<p class=msg>No P-files found on <strong>{$scanner}</strong> ({$dataSrc->name}).</p>\n"; } else { echo "<p>Files currently in <i>{$ftpDataDir}</i> on <strong>{$scanner}</strong> ({$dataSrc->name}):</p>\n"; echo "<table border=1 cellspacing=1 cellpadding=4>\n"; foreach ($pfileTree as $pfileName => $files) { $filesStr = ""; $totalSize = 0; foreach ($files->name as $num => $f) { $size = getFileSizeString($files->size[$num]); $time = $files->time[$num]; $filesStr .= basename($f) . "({$size}, {$time}) "; $totalSize += $files->size[$num]; } echo "<tr>\n<td>{$pfileName} (" . getFileSizeString($totalSize) . "</td>\n";