Commit 48413ae3 authored by Leigh B. Stoller's avatar Leigh B. Stoller
Browse files

Add back in free count as per Jay's request.

parent a8ed2cf3
...@@ -87,8 +87,22 @@ if (mysql_num_rows($query_result) == 0) { ...@@ -87,8 +87,22 @@ if (mysql_num_rows($query_result) == 0) {
PAGEFOOTER(); PAGEFOOTER();
} }
#
# First count up free nodes.
#
$free = 0;
while ($row = mysql_fetch_array($query_result)) {
$pid = $row[pid];
$status = $row[status];
if (!$pid && $status == "up") {
$free++;
}
}
mysql_data_seek($query_result, 0);
echo "<center><b> echo "<center><b>
View: $view\n"; View: $view<br>($free Free)\n";
if (! strcmp($showtype, "widearea")) { if (! strcmp($showtype, "widearea")) {
echo "<br> echo "<br>
...@@ -115,7 +129,7 @@ else { ...@@ -115,7 +129,7 @@ else {
echo "<th align=center>Free?</th>\n"; echo "<th align=center>Free?</th>\n";
} }
echo "</tr>\n"; echo "</tr>\n";
while ($row = mysql_fetch_array($query_result)) { while ($row = mysql_fetch_array($query_result)) {
$node_id = $row[node_id]; $node_id = $row[node_id];
$phys_nodeid = $row[phys_nodeid]; $phys_nodeid = $row[phys_nodeid];
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment