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
72f0134c
Commit
72f0134c
authored
Mar 01, 2007
by
David Johnson
Browse files
A couple fixes for OptionalPageArguments and a couple other minor changes.
parent
9cbf7f6f
Changes
2
Hide whitespace changes
Inline
Side-by-side
www/wireless-stats/getdata.php3
View file @
72f0134c
...
...
@@ -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/jp
e
g"
);
fpassthru
(
$fp
);
}
else
{
...
...
www/wireless-stats/statsapp.php3
View file @
72f0134c
...
...
@@ -11,7 +11,7 @@ $this_user = CheckLoginOrDie();
$uid
=
$this_user
->
uid
();
$isadmin
=
ISADMIN
();
PAGEHEADER
(
"Wireless
/WSN
Testbed Connectivity Statistics"
);
PAGEHEADER
(
"Wireless Testbed
s
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='7
68
'
width='
900
' height='7
00
'
alt='You need java to run this applet'>
<param name='uid' value='
$uid
'>
<param name='auth' value='
$auth
'>
...
...
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