From f9aa414de22480e1e4684d85344c1e4ca09e66e3 Mon Sep 17 00:00:00 2001 From: "Leigh B. Stoller" Date: Mon, 11 Feb 2002 21:05:19 +0000 Subject: [PATCH] Add creator/created slots to images and osids for tracking purposes. Update pages appropriately. Also cleanup up a few more sub menus. --- www/newimageid.php3 | 6 +++--- www/newimageid_ez.php3 | 10 ++++++---- www/newosid.php3 | 5 +++-- www/showimageid_list.php3 | 20 ++++++++++++-------- www/showosid_list.php3 | 15 +++++++++++---- www/showstuff.php3 | 28 ++++++++++++++++++++++++++++ 6 files changed, 63 insertions(+), 21 deletions(-) diff --git a/www/newimageid.php3 b/www/newimageid.php3 index 50013a8bb..737c8d9d3 100644 --- a/www/newimageid.php3 +++ b/www/newimageid.php3 @@ -715,13 +715,13 @@ $query_result = DBQueryFatal("INSERT INTO images ". "(imagename, imageid, description, loadpart, loadlength, ". " part1_osid, part2_osid, part3_osid, part4_osid, ". - " default_osid, path, pid, shared) ". + " default_osid, path, pid, shared, creator, created) ". "VALUES ". " ('$imagename', '$imageid', '$description', $loadpart, ". " $loadlength, ". " $part1_osid, $part2_osid, $part3_osid, $part4_osid, ". - " '$default_osid', '$path', '$pid', $shared)"); - + " '$default_osid', '$path', '$pid', $shared, ". + " '$uid', now())"); if (!$isadmin || $makedefault) { for ($i = 0; $i < count($mtypes_array); $i++) { diff --git a/www/newimageid_ez.php3 b/www/newimageid_ez.php3 index bd5ffd1ab..81c0b4970 100644 --- a/www/newimageid_ez.php3 +++ b/www/newimageid_ez.php3 @@ -571,17 +571,19 @@ if (TBValidImageID($imageid) || TBValidOSID($imageid)) { DBQueryFatal("INSERT INTO images ". "(imagename, imageid, ezid, description, loadpart, loadlength, ". " part" . "$loadpart" . "_osid, ". - " default_osid, path, pid, shared) ". + " default_osid, path, pid, shared, creator, created) ". "VALUES ". " ('$imagename', '$imageid', 1, '$description', $loadpart, 1, ". - " '$imageid', '$imageid', '$path', '$pid', $shared)"); + " '$imageid', '$imageid', '$path', '$pid', $shared, ". + " '$uid', now())"); DBQueryFatal("INSERT INTO os_info ". "(osname, osid, ezid, description, OS, version, path, magic, ". - " osfeatures, pid) ". + " osfeatures, pid, creator, created) ". "VALUES ". " ('$imagename', '$imageid', 1, '$description', '$os_name', ". - " '$os_version', NULL, NULL, '$os_features', '$pid')"); + " '$os_version', NULL, NULL, '$os_features', '$pid', ". + " '$uid', now())"); for ($i = 0; $i < count($mtypes_array); $i++) { DBQueryFatal("REPLACE INTO osidtoimageid ". diff --git a/www/newosid.php3 b/www/newosid.php3 index 71433ea05..21e0e2ffe 100644 --- a/www/newosid.php3 +++ b/www/newosid.php3 @@ -169,10 +169,11 @@ if (TBValidOSID($osid)) { $query_result = DBQueryFatal("INSERT INTO os_info ". "(osname, osid, description, OS, version, path, magic, ". - " osfeatures, pid, shared) ". + " osfeatures, pid, shared, creator, created) ". "VALUES ('$osname', '$osid', '$description', '$OS', ". " '$os_version', $os_path, '$os_magic', ". - " '$os_features', '$pid', $os_shared)"); + " '$os_features', '$pid', $os_shared, ". + " '$uid', now())"); DBQueryFatal("unlock tables"); diff --git a/www/showimageid_list.php3 b/www/showimageid_list.php3 index 408b02978..4fec1dda6 100644 --- a/www/showimageid_list.php3 +++ b/www/showimageid_list.php3 @@ -41,7 +41,18 @@ if (mysql_num_rows($query_result) == 0) { } } -echo "\n"; echo " @@ -66,13 +77,6 @@ while ($row = mysql_fetch_array($query_result)) { } echo "
\n"; -# Create option. -echo "
- Create a new Image Descriptor? -
\n"; - -echo "

\n"; - # # Standard Testbed Footer # diff --git a/www/showosid_list.php3 b/www/showosid_list.php3 index 05b06c9da..8a6b5d64d 100644 --- a/www/showosid_list.php3 +++ b/www/showosid_list.php3 @@ -43,6 +43,17 @@ if (mysql_num_rows($query_result) == 0) { } } +SUBPAGESTART(); +SUBMENUSTART("More Options"); +WRITESUBMENUBUTTON("Create an Image Descriptor", + "newimageid_explain.php3"); +WRITESUBMENUBUTTON("Create an OS Descriptor", + "newosid_form.php3"); +WRITESUBMENUBUTTON("Back to Image Descriptor list", + "showimageid_list.php3"); +SUBMENUEND(); +SUBPAGEEND(); + echo "\n"; @@ -66,10 +77,6 @@ while ($row = mysql_fetch_array($query_result)) { } echo "
\n"; -echo "
- Create a new OS Descriptor. -
\n"; - # # Standard Testbed Footer # diff --git a/www/showstuff.php3 b/www/showstuff.php3 index 2078b4d5f..b60aa2161 100644 --- a/www/showstuff.php3 +++ b/www/showstuff.php3 @@ -683,6 +683,8 @@ function SHOWOSINFO($osid) { $os_pid = $osrow[pid]; $os_shared = $osrow[shared]; $os_osname = $osrow[osname]; + $creator = $osrow[creator]; + $created = $osrow[created]; if (!$os_description) $os_description = " "; @@ -694,6 +696,8 @@ function SHOWOSINFO($osid) { $os_magic = " "; if (!$os_osfeatures) $os_osfeatures = " "; + if (!$created) + $created = "N/A"; # # Generate the table. @@ -710,6 +714,16 @@ function SHOWOSINFO($osid) { $os_pid \n"; + echo " + Creator: + $creator + \n"; + + echo " + Created: + $created + \n"; + echo " Description: $os_description @@ -784,6 +798,8 @@ function SHOWIMAGEID($imageid, $edit) { $path = $row[path]; $loadaddr = $row[load_address]; $shared = $row[shared]; + $creator = $row[creator]; + $created = $row[created]; if ($edit) { if (!$description) @@ -800,6 +816,8 @@ function SHOWIMAGEID($imageid, $edit) { $path = " "; if (!$loadaddr) $loadaddr = " "; + if (!$created) + $created = "N/A"; } # @@ -824,6 +842,16 @@ function SHOWIMAGEID($imageid, $edit) { $pid \n"; + echo " + Creator: + $creator + \n"; + + echo " + Created: + $created + \n"; + echo " Description: \n"; -- GitLab