Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
emulab
emulab-devel
Commits
dd40626a
Commit
dd40626a
authored
Apr 14, 2003
by
Leigh B. Stoller
Browse files
Add reminder to remove the image file (if there is a path defined).
parent
9bfe0066
Changes
1
Hide whitespace changes
Inline
Side-by-side
www/deleteimageid.php3
View file @
dd40626a
<?php
#
# EMULAB-COPYRIGHT
# Copyright (c) 2000-200
2
University of Utah and the Flux Group.
# Copyright (c) 2000-200
3
University of Utah and the Flux Group.
# All rights reserved.
#
include
(
"defs.php3"
);
...
...
@@ -119,28 +119,38 @@ DBQueryFatal("lock tables images write, os_info write, osidtoimageid write");
# If this is an EZ imageid, then delete the corresponding OSID too.
#
$query_result
=
DBQueryFatal
(
"select ezid from images "
.
"where imageid='
$imageid
' and ezid=1"
);
DBQueryFatal
(
"select ezid,path from images where imageid='
$imageid
'"
);
$row
=
mysql_fetch_row
(
$query_result
);
$ezid
=
$row
[
0
];
$path
=
$row
[
1
];
#
# Delete the record(s).
#
DBQueryFatal
(
"DELETE FROM images WHERE imageid='
$imageid
'"
);
DBQueryFatal
(
"DELETE FROM osidtoimageid where imageid='
$imageid
'"
);
if
(
mysql_num_rows
(
$query_result
))
{
if
(
$ezid
)
{
DBQueryFatal
(
"DELETE FROM os_info WHERE osid='
$imageid
'"
);
}
DBQueryFatal
(
"unlock tables"
);
echo
"<p>
<center><h3>
Image '
$imageid
' in project
$pid
has been deleted!
</h3></center>
\n
"
;
echo
"<br>
<h3>
Image '
$imageid
' in project
$pid
has been deleted!
\n
"
;
if
(
$path
)
{
echo
"<br>
<br>
<font color=red>Please remember to delete
$path
!</font>
\n
"
;
}
echo
"</h3>
\n
"
;
echo
"<br>
<a href='showimageid_list.php3'>Back to Image Descriptor list</a>
\n
"
;
<center>
<a href='showimageid_list.php3'>Back to Image Descriptor list</a>
</center>
<br><br>
\n
"
;
#
# Standard Testbed Footer
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment