.
#
# }}}
#
include("defs.php3");
#
# Only known and logged in users can end experiments.
#
$this_user = CheckLoginOrDie();
$uid = $this_user->uid();
$isadmin = ISADMIN();
#
# Verify page arguments.
#
$reqargs = RequiredPageArguments("experiment", PAGEARG_EXPERIMENT);
# Need these below.
$pid = $experiment->pid();
$eid = $experiment->eid();
$gid = $experiment->gid();
# Permission
if (!$isadmin &&
!$experiment->AccessCheck($this_user, $TB_PROJECT_READINFO)) {
USERERROR("You do not have permission to view missing files for ".
"archive in $pid/$eid!", 1);
}
#
# Move files requested.
#
if (isset($movesome)) {
#
# Go through the post list and find all the filenames.
#
$fileargs = "";
while (list ($var, $value) = each ($_POST)) {
if (preg_match('/^fn[\d]+$/', $var) &&
preg_match('/^([-\w\/\.\+\@,~]+)$/', $value)) {
$fileargs = "$fileargs " . escapeshellarg($value);
}
}
SUEXEC($uid, "$pid,$gid",
"webarchive_control addtoarchive $pid $eid $fileargs",
SUEXEC_ACTION_DUPDIE);
header("Location: " . CreateURL("archive_missing", $experiment));
return;
}
#
# Standard Testbed Header
#
PAGEHEADER("Add Missing Files");
echo "\n";
echo $experiment->PageHeader();
echo "
\n";
#
# We ask an external script for the list of missing files.
#
SUEXEC($uid, "$pid,$gid",
"webarchive_control missing $pid $eid",
SUEXEC_ACTION_DIE);
#
# Show the user the output.
#
if (count($suexec_output_array)) {
echo "
".
"These files have been referenced by your experiment, but ".
"are not contained within the experiments archive directory. ".
"Selecting these files will move them into the experiment archive ".
"directory, leaving symlinks behind.";
echo "
";
echo "