Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emulab
emulab-devel
Commits
831eb875
Commit
831eb875
authored
Mar 07, 2003
by
Leigh B. Stoller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix for Mike; don't barf up a mess of kibble mixed with carrots when
there are no osid/images to list.
parent
5de15b7c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
54 additions
and
66 deletions
+54
-66
www/showimageid_list.php3
www/showimageid_list.php3
+28
-33
www/showosid_list.php3
www/showosid_list.php3
+26
-33
No files found.
www/showimageid_list.php3
View file @
831eb875
<?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"
);
...
...
@@ -50,15 +50,6 @@ else {
"where g.uid='
$uid
' or i.shared order by
$order
"
);
}
if
(
mysql_num_rows
(
$query_result
)
==
0
)
{
if
(
$isadmin
)
{
USERERROR
(
"There are no ImageIDs!"
,
1
);
}
else
{
USERERROR
(
"There are no ImageIDs in any of your projects!"
,
1
);
}
}
SUBPAGESTART
();
SUBMENUSTART
(
"More Options"
);
WRITESUBMENUBUTTON
(
"Create an Image Descriptor"
,
...
...
@@ -70,33 +61,37 @@ WRITESUBMENUBUTTON("OS Descriptor list",
SUBMENUEND
();
SUBPAGEEND
();
echo
"<table border=2 cellpadding=0 cellspacing=2
align='center'>
\n
"
;
if
(
mysql_num_rows
(
$query_result
))
{
echo
"<table border=2 cellpadding=0 cellspacing=2
align='center'>
\n
"
;
echo
"<tr>
<td><a href='showimageid_list.php3?&sortby=name'>
Image</td>
<td><a href='showimageid_list.php3?&sortby=pid'>
PID</td>
<td><a href='showimageid_list.php3?&sortby=desc'>
Description</td>
</tr>
\n
"
;
echo
"<tr>
<td><a href='showimageid_list.php3?&sortby=name'>
Image</td>
<td><a href='showimageid_list.php3?&sortby=pid'>
PID</td>
<td><a href='showimageid_list.php3?&sortby=desc'>
Description</td>
</tr>
\n
"
;
while
(
$row
=
mysql_fetch_array
(
$query_result
))
{
$imageid
=
$row
[
imageid
];
# Must encode the imageid since Rob started using plus signs in the names.
$url
=
rawurlencode
(
$imageid
);
$descrip
=
stripslashes
(
$row
[
description
]);
$imagename
=
$row
[
imagename
];
$pid
=
$row
[
pid
];
while
(
$row
=
mysql_fetch_array
(
$query_result
))
{
$imageid
=
$row
[
imageid
];
# Must encode the imageid since Rob started using plus signs in
# the names.
$url
=
rawurlencode
(
$imageid
);
$descrip
=
stripslashes
(
$row
[
description
]);
$imagename
=
$row
[
imagename
];
$pid
=
$row
[
pid
];
echo
"<tr>
<td><A href='showimageid.php3?imageid=
$url
'>
$imagename
</A></td>
<td>
$pid
</td>
<td>
$descrip
</td>
\n
"
;
echo
"</tr>
\n
"
;
echo
"<tr>
<td><A href='showimageid.php3?imageid=
$url
'>
$imagename
</A></td>
<td>
$pid
</td>
<td>
$descrip
</td>
\n
"
;
echo
"</tr>
\n
"
;
}
echo
"</table>
\n
"
;
}
echo
"</table>
\n
"
;
#
# Standard Testbed Footer
...
...
www/showosid_list.php3
View file @
831eb875
<?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"
);
...
...
@@ -52,15 +52,6 @@ else {
"order by
$order
"
);
}
if
(
mysql_num_rows
(
$query_result
)
==
0
)
{
if
(
$isadmin
)
{
USERERROR
(
"There are no OSIDs!"
,
1
);
}
else
{
USERERROR
(
"There are no OSIDs in any of your projects!"
,
1
);
}
}
SUBPAGESTART
();
SUBMENUSTART
(
"More Options"
);
WRITESUBMENUBUTTON
(
"Create an Image Descriptor"
,
...
...
@@ -84,31 +75,33 @@ echo "<p>
SUBPAGEEND
();
echo
"<br>
<table border=2 cellpadding=0 cellspacing=2 align='center'>
\n
"
;
echo
"<tr>
<th><a href='showosid_list.php3?&sortby=name'>
Name</th>
<th><a href='showosid_list.php3?&sortby=pid'>
PID</th>
<th><a href='showosid_list.php3?&sortby=desc'>
Description</th>
</tr>
\n
"
;
while
(
$row
=
mysql_fetch_array
(
$query_result
))
{
$osname
=
$row
[
osname
];
$osid
=
$row
[
osid
];
$descrip
=
stripslashes
(
$row
[
description
]);
$pid
=
$row
[
pid
];
if
(
mysql_num_rows
(
$query_result
))
{
echo
"<br>
<table border=2 cellpadding=0 cellspacing=2 align='center'>
\n
"
;
echo
"<tr>
<td><A href='showosinfo.php3?osid=
$osid
'>
$osname
</A></td>
<td>
$pid
</td>
<td>
$descrip
</td>
\n
"
;
echo
"</tr>
\n
"
;
<th><a href='showosid_list.php3?&sortby=name'>
Name</th>
<th><a href='showosid_list.php3?&sortby=pid'>
PID</th>
<th><a href='showosid_list.php3?&sortby=desc'>
Description</th>
</tr>
\n
"
;
while
(
$row
=
mysql_fetch_array
(
$query_result
))
{
$osname
=
$row
[
osname
];
$osid
=
$row
[
osid
];
$descrip
=
stripslashes
(
$row
[
description
]);
$pid
=
$row
[
pid
];
echo
"<tr>
<td><A href='showosinfo.php3?osid=
$osid
'>
$osname
</A></td>
<td>
$pid
</td>
<td>
$descrip
</td>
\n
"
;
echo
"</tr>
\n
"
;
}
echo
"</table>
\n
"
;
}
echo
"</table>
\n
"
;
#
# Standard Testbed Footer
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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