Skip to content
GitLab
Menu
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
5aa39cb9
Commit
5aa39cb9
authored
Nov 07, 2005
by
Leigh B. Stoller
Browse files
Deal with having <= 3 types of pcs (as in ElabinElab), which messes up
the table.
parent
a4048a5d
Changes
1
Hide whitespace changes
Inline
Side-by-side
www/currentusage.php3
View file @
5aa39cb9
...
...
@@ -118,11 +118,12 @@ function SHOWFREENODES()
bgcolor='#E1EAEA' align=center>
<font size=-1>Free PCs</font></td></tr>
\n
"
;
$newrow
=
1
;
$pccount
=
count
(
$freecounts
);
$newrow
=
1
;
foreach
(
$freecounts
as
$key
=>
$value
)
{
$freecount
=
$freecounts
[
$key
];
if
(
$newrow
)
if
(
$newrow
||
$pccount
<=
3
)
echo
"<tr>
\n
"
;
$newrow
=
(
$newrow
?
0
:
1
);
...
...
@@ -131,13 +132,20 @@ function SHOWFREENODES()
$key
</a></td>
<td class=menuoptusage align=left>${freecount}</td>
\n
"
;
if
(
$newrow
)
{
if
(
$newrow
||
$pccount
<=
3
)
{
echo
"</tr>
\n
"
;
}
}
if
(
!
$newrow
)
{
if
(
!
$newrow
&&
$pccount
>
3
)
{
echo
"<td></td><td></td></tr>
\n
"
;
}
# Fill in up to 3 rows.
if
(
$pccount
<
3
)
{
for
(
$i
=
$pccount
+
1
;
$i
<=
3
;
$i
++
)
{
echo
"<tr><td class=menuoptusage> </td>
<td class=menuoptusage> </td></tr>
\n
"
;
}
}
$freepcs
=
TBFreePCs
();
echo
"<tr>
<td class=menuoptusage colspan=4 align=center>
...
...
Write
Preview
Supports
Markdown
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