Commit 72f0134c authored by David Johnson's avatar David Johnson

A couple fixes for OptionalPageArguments and a couple other minor changes.

parent 9cbf7f6f
......@@ -21,11 +21,16 @@ function death($msg) {
#
# Verify page arguments
#
$reqargs = RequiredPageArguments("type", PAGEARG_STRING.
$reqargs = RequiredPageArguments("type", PAGEARG_STRING,
"dataset", PAGEARG_STRING);
$optargs = OptionalPageArguments("building", PAGEARG_STRING,
"floor", PAGEARG_INTEGER,
"scale", PAGEARG_INTEGER);
## we need a type and a dataset.
if (isset($type) && isset($dataset) && preg_match("/^[a-zA-Z0-9\-_]+$/", $dataset)) {
if (isset($type) && isset($dataset)
&& preg_match("/^[a-zA-Z0-9\-_]+$/", $dataset)) {
$dbq = DBQueryFatal("select * from wireless_stats where name='$dataset'");
if (mysql_num_rows($dbq)) {
......@@ -109,7 +114,7 @@ if (isset($type) && isset($dataset) && preg_match("/^[a-zA-Z0-9\-_]+$/", $datase
#header("Content-type: image/jpg");
#header("Content-Length: " . (filesize($tmpfile)));
if (($fp = fopen("$pushfile", "r"))) {
header("Content-type: image/jpg");
header("Content-type: image/jpeg");
fpassthru($fp);
}
else {
......
......@@ -11,7 +11,7 @@ $this_user = CheckLoginOrDie();
$uid = $this_user->uid();
$isadmin = ISADMIN();
PAGEHEADER("Wireless/WSN Testbed Connectivity Statistics");
PAGEHEADER("Wireless Testbeds Connectivity Statistics");
?>
......@@ -49,13 +49,10 @@ $namePPMs = array();
while ($row = mysql_fetch_array($dbq)) {
$name = $row["name"];
# if ($name == 'SensorNet-MEB') {
# continue;
# }
$floor = $row["floor"];
$building = $row["building"];
$scale = $row["scale"];
$factor = 0;
if ($scale == 1) {
$factor = 1;
......@@ -143,7 +140,7 @@ $positurl = "getdata.php3?type=posit";
echo "<applet name='wireless-stats' code='WirelessMapApplet.class'
archive='wireless-stats.jar'
width='1024' height='768'
width='900' height='700'
alt='You need java to run this applet'>
<param name='uid' value='$uid'>
<param name='auth' value='$auth'>
......
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