All new accounts created on Gitlab now require administrator approval. If you invite any collaborators, please let Flux staff know so they can approve the accounts.

archive_view.php3 1.85 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58
<?php
#
# EMULAB-COPYRIGHT
# Copyright (c) 2006 University of Utah and the Flux Group.
# All rights reserved.
#
include("defs.php3");
include("showstuff.php3");

#
# Only known and logged in users can look at experiments.
#
$uid = GETLOGIN();
LOGGEDINORDIE($uid);
$isadmin = ISADMIN($uid);

#
# Verify page arguments.
# 
if (!isset($pid) ||
    strcmp($pid, "") == 0) {
    USERERROR("You must provide a Project ID.", 1);
}
if (!isset($eid) ||
    strcmp($eid, "") == 0) {
    USERERROR("You must provide an Experiment ID.", 1);
}
if (!TBvalid_pid($pid)) {
    PAGEARGERROR("Invalid project ID.");
}
if (!TBvalid_eid($eid)) {
    PAGEARGERROR("Invalid experiment ID.");
}

#
# Standard Testbed Header now that we have the pid/eid okay.
#
PAGEHEADER("Experiment Archive ($pid/$eid)");

#
# Check to make sure this is a valid PID/EID tuple.
#
if (! TBValidExperiment($pid, $eid)) {
    USERERROR("The experiment $eid is not a valid experiment ".
	      "in project $pid.", 1);
}

#
# Verify Permission.
#
if (! TBExptAccessCheck($uid, $pid, $eid, $TB_EXPT_READINFO)) {
    USERERROR("You do not have permission to view experiment $eid!", 1);
}

$exptidx = TBExptIndex($pid, $eid);
if ($exptidx < 0) {
    TBERROR("Could not get experiment index for $pid/$eid!", 1);
}
59
$url = "cvsweb/cvsweb.php3/${exptidx}?exptidx=$exptidx";
60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80

echo "<center>\n";
echo "This is the Subversion archive for your experiment.<br>";
echo "<form action='archive_control.php3' method=get>\n";
echo "<b><input type=submit name=commit value='Force Commit'></b>\n";
echo "<input type=hidden name=pid value='$pid'>";
echo "<input type=hidden name=eid value='$eid'>";
echo "</form>\n";
if (isset($commit)) {
    echo "<b>Archive sucessfully committed.</b><br>";
}
echo "</center>\n";

echo "<iframe width=100% height=800 scrolling=yes src='$url' border=2>".
     "</iframe>\n";

#
# Standard Testbed Footer
# 
PAGEFOOTER();
?>