Commit 495e3cee authored by Leigh B. Stoller's avatar Leigh B. Stoller

Add a "wireless" link from the Node Status page.

Remove isadmin() restriction from floormap pages; at some point I
assume we make the floormaps publically available.

Make MEB the default argument to the floormap page until such time
that we need something fancier.

Add a link to the wireless tutorial I am currently throwing up onto
paper.
parent f99a377a
...@@ -17,19 +17,17 @@ PAGEHEADER("Wireless Node Map"); ...@@ -17,19 +17,17 @@ PAGEHEADER("Wireless Node Map");
$uid = GETLOGIN(); $uid = GETLOGIN();
LOGGEDINORDIE($uid); LOGGEDINORDIE($uid);
$isadmin = ISADMIN($uid); $isadmin = ISADMIN($uid);
if (! $isadmin) {
USERERROR("You do not have permission to view this page!", 1);
}
# Careful with this local variable # Careful with this local variable
unset($prefix); unset($prefix);
# #
# Verify page arguments. # Verify page arguments. For now, just default to MEB since thats the only
# place we have wireless nodes!
# #
if (!isset($building) || if (!isset($building) ||
strcmp($building, "") == 0) { strcmp($building, "") == 0) {
PAGEARGERROR("Must provide a building and an optional floor!"); $building = "MEB";
} }
# Sanitize for the shell. # Sanitize for the shell.
if (!preg_match("/^[-\w]+$/", $building)) { if (!preg_match("/^[-\w]+$/", $building)) {
...@@ -93,9 +91,14 @@ if (! readfile("${prefix}.map")) { ...@@ -93,9 +91,14 @@ if (! readfile("${prefix}.map")) {
TBERROR("Could not read ${prefix}.map", 1); TBERROR("Could not read ${prefix}.map", 1);
} }
echo "<font size=+1>For more info on using wireless nodes, see the
<a href='tutorial/docwrapper.php3?docname=wireless.html'>
wireless tutorial.</a></font><br><br>\n";
# And the img ... # And the img ...
echo "<center> echo "<center>
<table class=nogrid align=center border=0 cellpadding=6 cellspacing=0> <table class=nogrid align=center border=0 vpsace=5
cellpadding=6 cellspacing=0>
<tr> <tr>
<td align=right>Free</td> <td align=right>Free</td>
<td align=left><img src='/autostatus-icons/greenball.gif' alt=Free> <td align=left><img src='/autostatus-icons/greenball.gif' alt=Free>
...@@ -112,10 +115,11 @@ echo "<center> ...@@ -112,10 +115,11 @@ echo "<center>
</td> </td>
</tr> </tr>
</table> </table>
<br><br> Click on the dots below to see information about the node
<img src=\"floormap_aux.php3?prefix=$uniqueid\" usemap=\"#floormap\"> <img src=\"floormap_aux.php3?prefix=$uniqueid\" usemap=\"#floormap\">
</center>\n"; </center>\n";
# #
# Standard Testbed Footer # Standard Testbed Footer
# #
......
...@@ -17,9 +17,6 @@ include("defs.php3"); ...@@ -17,9 +17,6 @@ include("defs.php3");
$uid = GETLOGIN(); $uid = GETLOGIN();
LOGGEDINORDIE($uid); LOGGEDINORDIE($uid);
$isadmin = ISADMIN($uid); $isadmin = ISADMIN($uid);
if (! $isadmin) {
USERERROR("You do not have permission to view this page!", 1);
}
# #
# Verify arguments. # Verify arguments.
......
...@@ -31,6 +31,7 @@ $isadmin = ISADMIN($uid); ...@@ -31,6 +31,7 @@ $isadmin = ISADMIN($uid);
echo "<b>Show: <a href='nodecontrol_list.php3?showtype=summary'>summary</a>, echo "<b>Show: <a href='nodecontrol_list.php3?showtype=summary'>summary</a>,
<a href='nodecontrol_list.php3?showtype=pcs'>pcs</a>, <a href='nodecontrol_list.php3?showtype=pcs'>pcs</a>,
<a href='floormap.php3?building=MEB'>wireless</a>,
<a href='nodecontrol_list.php3?showtype=widearea'>widearea</a>"; <a href='nodecontrol_list.php3?showtype=widearea'>widearea</a>";
if ($isadmin) { if ($isadmin) {
......
Markdown is supported
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