showosinfo.php3 1.27 KB
Newer Older
1
<?php
Leigh B. Stoller's avatar
Leigh B. Stoller committed
2 3
#
# EMULAB-COPYRIGHT
4
# Copyright (c) 2000-2007 University of Utah and the Flux Group.
Leigh B. Stoller's avatar
Leigh B. Stoller committed
5 6
# All rights reserved.
#
7
include("defs.php3");
8
include_once("osinfo_defs.php");
9 10

#
11
# Only known and logged in users.
12
#
13 14 15
$this_user = CheckLoginOrDie();
$uid       = $this_user->uid();
$isadmin   = ISADMIN();
16 17

#
18 19 20
# Verify page arguments.
#
$reqargs = RequiredPageArguments("osinfo", PAGEARG_OSINFO);
21 22

#
Leigh B. Stoller's avatar
Leigh B. Stoller committed
23
# Verify permission.
24
#
25 26
if (!$osinfo->AccessCheck($this_user, $TB_OSID_READINFO)) {
    USERERROR("You do not have permission to access this OS Descriptor!", 1);
27
}
28
$osid = $osinfo->osid();
29 30 31 32 33 34
$osname = $osinfo->osname();

#
# Standard Testbed Header
#
PAGEHEADER("OSID $osname");
35

36
SUBPAGESTART();
37
SUBMENUSTART("OSID Options");
38
WRITESUBMENUBUTTON("Delete this OS Descriptor",
39
		   CreateURL("deleteosid", $osinfo));
40 41
if ($isadmin) {
     WRITESUBMENUBUTTON("Create a new OS Descriptor",
42
			"newosid.php3");
43
}
44
WRITESUBMENUBUTTON("Create a new Image Descriptor",
45
		   "newimageid_ez.php3");
Leigh B. Stoller's avatar
Leigh B. Stoller committed
46
WRITESUBMENUBUTTON("OS Descriptor list",
47
		   "showosid_list.php3");
Leigh B. Stoller's avatar
Leigh B. Stoller committed
48
WRITESUBMENUBUTTON("Image Descriptor list",
49 50
		   "showimageid_list.php3");
SUBMENUEND();
51
echo "<br><br>\n";
52

53 54 55
#
# Dump os_info record.
# 
56 57
$osinfo->Show();
$osinfo->ShowExperiments($this_user);
58
SUBPAGEEND();
59 60 61 62 63 64

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