editimageid_form.php3 864 Bytes
Newer Older
1
<?php
Leigh Stoller's avatar
Leigh Stoller committed
2 3 4 5 6
#
# EMULAB-COPYRIGHT
# Copyright (c) 2000-2002 University of Utah and the Flux Group.
# All rights reserved.
#
7 8 9 10 11 12
include("defs.php3");
include("showstuff.php3");

#
# Standard Testbed Header
#
13
PAGEHEADER("Edit Image Descriptor");
14 15 16 17 18 19

#
# Only known and logged in users can end experiments.
#
$uid = GETLOGIN();
LOGGEDINORDIE($uid);
20
$isadmin = ISADMIN($uid);
21 22 23 24 25 26 27 28 29

#
# Verify form arguments.
# 
if (!isset($imageid) ||
    strcmp($imageid, "") == 0) {
    USERERROR("You must provide an ImageID.", 1);
}

30 31
if (! TBValidImageID($imageid)) {
    USERERROR("ImageID '$imageid' is not a valid ImageID $pid!", 1);
32 33 34
}

#
Leigh Stoller's avatar
Leigh Stoller committed
35 36 37
# Verify permission.
#
if (!TBImageIDAccessCheck($uid, $imageid, $TB_IMAGEID_MODIFYINFO)) {
38
    USERERROR("You do not have permission to access ImageID $imageid!", 1);
39 40
}

41
SHOWIMAGEID($imageid, 1, $isadmin);
42 43 44 45 46 47

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