Update of /cvsroot/meshdb/www/db2
In directory usw-pr-cvs1:/tmp/cvs-serv1417
Modified Files:
cookies.php index.php view.php
Log Message:
add the map choice thingy to the index page
Index: cookies.php
===================================================================
RCS file: /cvsroot/meshdb/www/db2/cookies.php,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- cookies.php 26 Aug 2002 04:46:51 -0000 1.3
+++ cookies.php 26 Aug 2002 14:21:02 -0000 1.4
@@ -58,7 +58,7 @@
"0" => "sort by NodeID",
"1" => "sort by distance"
)),
- "viewmaplist" => array("Order of maps to show in view page",
+ "viewmaplist" => array("Order of maps to show in index/view page",
"text", "Whitespace-separated list of map types<br>"
."Default: <code>net loc ter elev</code>"),
);
Index: index.php
===================================================================
RCS file: /cvsroot/meshdb/www/db2/index.php,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- index.php 10 Aug 2002 11:46:37 -0000 1.4
+++ index.php 26 Aug 2002 14:21:02 -0000 1.5
@@ -250,9 +250,16 @@
</td>
+<?
+ $maps = explode(" ", trim($PREF["viewmaplist"]));
+ if (count($maps)) {
+?>
<td>
<table>
+<? foreach ($maps as $maptype) {
+ if ($maptype == "net") { ?>
+
<tr><th class="major">Network connectivity view</th></tr>
<tr><td valign=top><img
width=<?=$len?> height=<?=$len?>
@@ -260,8 +267,9 @@
src="map4b.php?<?=$mapargb?>&nonumbers=1"
></td>
</tr>
+<? } else if ($maptype == "loc") { ?>
- <tr><th class="major">Topographic view</th></tr>
+ <tr><th class="major">Location view</th></tr>
<tr>
<td valign=top><img
width=<?=$len?> height=<?=$len?>
@@ -270,16 +278,25 @@
></td>
</tr>
- <tr><th class="major">Geographic view</th></tr>
+<? } else if ($maptype == "ter") { ?>
+
+ <tr><th class="major">Terrain view</th></tr>
<tr><td valign=top><img
width=<?=$len?> height=<?=$len?>
usemap="#summarymap"
src="map3b.php?<?=$mapargb?>"
></td>
</tr>
-
+<? } else if ($maptype == "elev") {
+ /* ignore elevation */
+ } else { ?>
+ <tr><th class="major">Unknown: <?=htmlspecialchars($maptype)?>
+ </th></tr>
+<? }
+ } /* foreach */ ?>
</table>
</td>
+<? } /* if maps */ ?>
</tr>
</table>
Index: view.php
===================================================================
RCS file: /cvsroot/meshdb/www/db2/view.php,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- view.php 26 Aug 2002 04:44:20 -0000 1.3
+++ view.php 26 Aug 2002 14:21:02 -0000 1.4
@@ -355,8 +355,8 @@
$h2 = doubleval($h2);
$w = $IMGWIDTH;
- $h = $IMGHEIGHT / 2;
- $elevarg = "e1=$e1&n1=$n1&h1=$h1&e2=$e2&n2=$n2&h2=$h2&w=$w&h=$h";
+ $hh = $IMGHEIGHT / 2;
+ $elevarg = "e1=$e1&n1=$n1&h1=$h1&e2=$e2&n2=$n2&h2=$h2&w=$w&h=$hh";
$elevarg = htmlspecialchars($elevarg);
$info = split(" ", mybacktick("bin/elev -z ${ZONE} -a $e1 $n1 $h1 -b $e2 $n2 $h2"));
@@ -397,7 +397,7 @@
<tr><td><table>
<tr><td valign=top><?printf("%.0f", $altmax)?>m</td>
<td class="figure" colspan=2 rowspan=2><img
- width="<?=$w?>" height="<?=$h?>"
+ width="<?=$w?>" height="<?=$hh?>"
src="elev.php?<?=$elevarg?>"></td></tr>
<tr><td valign=bottom> <?printf("%.0f", $altmin)?>m</td></tr>
<tr><td></td>
@@ -439,7 +439,10 @@
<?
} /* elevation diagram */
- } /* map == "elev" */
+ } else if ($maptype == "elev") { ?>
+ <tr><th class="minor">Unknown: <?=htmlspecialchars($maptype)?></th></tr>
+<?
+ }
} /* foreach maptype */
?>
</table>
|