You can subscribe to this list here.
2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(49) |
Sep
(25) |
Oct
(2) |
Nov
|
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(24) |
Nov
(50) |
Dec
(4) |
2004 |
Jan
(2) |
Feb
(2) |
Mar
(5) |
Apr
|
May
(10) |
Jun
|
Jul
(10) |
Aug
(22) |
Sep
(10) |
Oct
|
Nov
(57) |
Dec
(5) |
2005 |
Jan
(24) |
Feb
(12) |
Mar
|
Apr
|
May
(3) |
Jun
(2) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2006 |
Jan
|
Feb
|
Mar
|
Apr
(9) |
May
(5) |
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
(1) |
From: <ma...@pr...> - 2004-08-01 11:17:13
|
Update of /cvsroot/meshdb/www/ipdb In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2281/ipdb Log Message: Directory /cvsroot/meshdb/www/ipdb added to the repository |
From: <il...@pr...> - 2004-07-28 07:43:10
|
Update of /cvsroot/meshdb/www/db2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25509 Modified Files: index.php Log Message: Reduced the maximum range of the overview maps from 600km to 200km in an effort to make them a bit more usable. This change cuts off two distant nodes but zooms the rest of the map in ~2x. Index: index.php =================================================================== RCS file: /cvsroot/meshdb/www/db2/index.php,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- index.php 11 May 2004 07:05:38 -0000 1.10 +++ index.php 28 Jul 2004 07:43:01 -0000 1.11 @@ -93,8 +93,8 @@ ." max(e) as maxe," ." max(n) as maxn" ." FROM physloc, admin" - /* limit to a 600km radius about UQ */ - ." WHERE (e-501372)*(e-501372)+(n-6958178)*(n-6958178) < 600000*600000" + /* limit to a 200km radius about UQ */ + ." WHERE (e-501372)*(e-501372)+(n-6958178)*(n-6958178) < 200000*200000" ." AND admin.nodeid = physloc.nodeid" ." AND to_days(now()) - to_days(admin.updated) <= ".$PREF["maxnodeage"], $db) |
From: <il...@pr...> - 2004-07-28 07:29:03
|
Update of /cvsroot/meshdb/www/db2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23840 Modified Files: view.php Log Message: Omit node name labels from zoomed out maps as they just obliterate the whole map with black text on top of everything. Index: view.php =================================================================== RCS file: /cvsroot/meshdb/www/db2/view.php,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- view.php 11 May 2004 07:06:06 -0000 1.15 +++ view.php 28 Jul 2004 07:28:53 -0000 1.16 @@ -349,6 +349,7 @@ $paramb .= "&t[$nodeid]=X"; if ($peerid) $paramb .= "&t[$peerid]=o"; $paramb .= "&maxage=".$PREF["maxnodeage"]; + if ($s < 0.008) $paramb .= "&nonumbers=1"; $param = htmlspecialchars($param); $paramb = htmlspecialchars($paramb); |
From: <il...@pr...> - 2004-07-27 08:12:36
|
Update of /cvsroot/meshdb/www/db2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6395/www/db2 Modified Files: view-netloc.inc.php Log Message: Added a help note on what the polarisation field is for. Index: view-netloc.inc.php =================================================================== RCS file: /cvsroot/meshdb/www/db2/view-netloc.inc.php,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- view-netloc.inc.php 27 Jul 2004 08:09:33 -0000 1.2 +++ view-netloc.inc.php 27 Jul 2004 08:12:27 -0000 1.3 @@ -100,7 +100,7 @@ "cw" => "Clockwise", "ccw" => "Counter clockwise", ))?></td> - <?=edithelp("")?> + <?=edithelp("polarisation of the radiation emitted")?> </tr> <tr> |
From: <il...@pr...> - 2004-07-27 08:09:41
|
Update of /cvsroot/meshdb/www/db2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5828/www/db2 Modified Files: submit.php view-netloc.inc.php Log Message: Added a field for antenna polarisation (#988849). Index: submit.php =================================================================== RCS file: /cvsroot/meshdb/www/db2/submit.php,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- submit.php 26 Jul 2004 12:45:22 -0000 1.9 +++ submit.php 27 Jul 2004 08:09:33 -0000 1.10 @@ -402,7 +402,7 @@ $newvals = $config; $s = setexp($newvals, $oldconfig, $changes, $strs = "carddesc cardurl antdesc anturl" - ." imageurl protocol", + ." imageurl protocol polarisation", $ints = "channel", $dbls = "estgain antspread direction", $pfx = $ifname."."); Index: view-netloc.inc.php =================================================================== RCS file: /cvsroot/meshdb/www/db2/view-netloc.inc.php,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- view-netloc.inc.php 10 Aug 2002 03:33:55 -0000 1.1.1.1 +++ view-netloc.inc.php 27 Jul 2004 08:09:33 -0000 1.2 @@ -91,6 +91,19 @@ </tr> <tr> + <th>Polarisation:</th> + <td><?=selectval("config[$ifname.polarisation]", + array( + NULL => "Unspecified", + "horiz" => "Horizontal", + "vert" => "Vertical", + "cw" => "Clockwise", + "ccw" => "Counter clockwise", + ))?></td> + <?=edithelp("")?> +</tr> + +<tr> <th>Comment:</th> <td><?=valtext("netloc[$ifname.comment]")?></td> <?=edithelp("")?> |
From: <il...@pr...> - 2004-07-27 08:09:41
|
Update of /cvsroot/meshdb/src/geo/dist In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5828/src/geo/dist Modified Files: create.sql Log Message: Added a field for antenna polarisation (#988849). Index: create.sql =================================================================== RCS file: /cvsroot/meshdb/src/geo/dist/create.sql,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- create.sql 10 Aug 2002 10:04:17 -0000 1.1 +++ create.sql 27 Jul 2004 08:09:33 -0000 1.2 @@ -41,6 +41,7 @@ channel tinyint(4) default NULL, ifname varchar(16) NOT NULL default '', direction double default NULL, + polarisation tinytext, PRIMARY KEY (nodeid,ifname) ) TYPE=MyISAM; |
From: <il...@pr...> - 2004-07-27 07:58:42
|
Update of /cvsroot/meshdb/src/geo/rf In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4143/src/geo/rf Modified Files: main.c Log Message: Trivial comment tyop. Index: main.c =================================================================== RCS file: /cvsroot/meshdb/src/geo/rf/main.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- main.c 24 Nov 2003 07:04:51 -0000 1.5 +++ main.c 27 Jul 2004 07:58:31 -0000 1.6 @@ -1,5 +1,5 @@ /* - * Rdefearn's formula: converts UTM grid coords into geodesic lat/long. + * Redfearn's formula: converts UTM grid coords into geodesic lat/long. * * David Leonard, 2001. Public domain. */ |
From: <il...@pr...> - 2004-07-26 12:45:30
|
Update of /cvsroot/meshdb/www/db2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30040 Modified Files: submit.php Log Message: Check the new name of any interface that is being renamed to ensure it's being renamed to something sensible (bug #998004). Index: submit.php =================================================================== RCS file: /cvsroot/meshdb/www/db2/submit.php,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- submit.php 11 Jul 2004 07:49:15 -0000 1.8 +++ submit.php 26 Jul 2004 12:45:22 -0000 1.9 @@ -355,6 +355,13 @@ /* Update interfaces */ foreach ($ifnames as $ifname) { $where = "nodeid=$nodeid AND ifname=".quote($ifname); + if ($netloc[$ifname.".ifname"] == "NEW") + die("Interface name NEW is reserved!!"); + if ($netloc[$ifname.".ifname"] == "") + die("Interface must have a name"); + if ($ifname != $netloc[$ifname.".ifname"] && + in_array($netloc[$ifname.".ifname"], $ifnames)) + die("Interface ".$netloc[$ifname.".ifname"]." already exists"); $setifname = "ifname=".quote($netloc[$ifname.".ifname"]); $peerid = $netloc["$ifname.peerid"]; |
From: <il...@pr...> - 2004-07-11 09:24:09
|
Update of /cvsroot/meshdb/www/db2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5656 Modified Files: edit.php Log Message: Make sure that people are notified of what is considered acceptable use and what constitutes unauthorised modification. Not explicitly required by any relevant laws, but makes any case a bit stronger. Index: edit.php =================================================================== RCS file: /cvsroot/meshdb/www/db2/edit.php,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- edit.php 2 Nov 2003 02:07:00 -0000 1.2 +++ edit.php 11 Jul 2004 09:23:58 -0000 1.3 @@ -27,6 +27,19 @@ you can update the entries later. </p> +<p> +<font size="-1"><b>Note:</b></font> +<font size="-2"> +alteration of the information in the node database is +permitted in order to publish, update and maintain accurate +information for purposes supporting the objectives of +Brismesh. Modification or deletion of data published by other people +is not permitted unless in good faith. Publication of spurious data is +not permitted. Unauthorised use is a crime under the Cybercrime Act +2001. +</font> +</p> + <form action="submit.php" method="post"> <input type="hidden" name="operation" value="replace"> <input type="hidden" name="nodeid" value="<?=$nodeid?>"> |
From: <il...@pr...> - 2004-07-11 07:49:23
|
Update of /cvsroot/meshdb/www/db2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24165 Modified Files: submit.php Log Message: Include a diff of the changes in the mail that gets sent to the admin (possibly in the future we will send this to the node owner, too). Fixed a long standing bug where only the new setting of mail-on-update would be taken notice of (silly PHP and its low precedence for `or' as opposed to ||). Index: submit.php =================================================================== RCS file: /cvsroot/meshdb/www/db2/submit.php,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- submit.php 8 Dec 2003 13:44:46 -0000 1.7 +++ submit.php 11 Jul 2004 07:49:15 -0000 1.8 @@ -5,18 +5,34 @@ if ($READONLY) die("database has been marked read only"); +/* Looks up the mail-on-update related information that's currently + * stored for this node so we can send mail (if desired) after we've + * made the changes. */ +function notify_lookup($db, $nodeid) { + global $VAR; + + /* Look up the current mail-on-update information. */ + $result = mysql_query("SELECT contactemail,mailonupdate,updatedip" + ." FROM contact,admin" + ." WHERE contact.nodeid = $nodeid" + ." AND admin.nodeid = $nodeid", $db) + or die(mysql_error($db)); + $row = mysql_fetch_assoc($result); + + /* Put the information away for later use. */ + $notify_info = array(); + $notify_info["mailto"] = + ($row["mailonupdate"] && $row["contactemail"]) + ? $row["contactemail"] : $VAR["contact"]["contactemail"]; + $notify_info["domail"] = + $VAR["admin"]["mailonupdate"] || $row["mailonupdate"]; + $notify_info["updatedip"] = $row["updatedip"]; + return $notify_info; +} + /* send mail to the OLD contactemail if the entry changes */ -function notify($db, $verb, $nodeid) { - global $admin, $DBADMIN, $PREF; - $result = mysql_query("SELECT contactemail,mailonupdate,updatedip" - ." FROM contact,admin" - ." WHERE contact.nodeid = $nodeid" - ." AND admin.nodeid = $nodeid", $db) - or die(mysql_error($db)); - $row = mysql_fetch_row($result); - $to = $row[0]; - $send = intquote($admin["mailonupdate"]) or $row[1]; - $updatedip = $row[2]; +function notify($notify_info, $verb, $nodeid, $changes = "") { + global $DBADMIN, $PREF; /* Take note of the remote host. */ $who = $_SERVER["REMOTE_ADDR"]; @@ -24,7 +40,7 @@ $who .= " [" . $_SERVER["REMOTE_HOST"] . "]"; /* Take note of whether the remote host matches the last update. */ - if ($updatedip != $_SERVER["REMOTE_ADDR"]) + if ($notify_info["updatedip"] != $_SERVER["REMOTE_ADDR"]) $ipchangedstring = "\nLast updated from different address: $updatedip\n"; else $ipchangedstring = ""; @@ -37,27 +53,31 @@ $pageloc = $_SERVER["SCRIPT_URI"]; $dbloc = substr($pageloc, 0, strrpos($pageloc, "/")); + + /* All changes get sent to the DB admin (if there is one). */ if ($DBADMIN != "") mail($DBADMIN, "Mesh DB: Node $nodeid $verb", "Node entry $nodeid has been $verb by $who$idstring\n\n". " $dbloc/view.php?nodeid=$nodeid\n". - $ipchangedstring, + $ipchangedstring. + "\n". + ($changes ? "Changes:\n".$changes : "No changes.\n"), "From: Brisbane Mesh Database <own...@it...>\n". "Return-Path: own...@it...\n" ); - if (!$send || $to == "") - return; - mail($to, - "Mesh DB: Node $nodeid $verb", - "Node entry $nodeid has been $verb by $who\n\n". - " $dbloc/view.php?nodeid=$nodeid\n\n\n". - "Note: If you believe this change was malicious please contact\n". - "$DBADMIN with the details in this mail.\n", - "From: Brisbane Mesh Database <own...@it...>\n". - "Return-Path: own...@it...\n" + + /* Changes get sent to the node's owner if they asked for it. */ + if ($notify_info["domail"] && $notify_info["mailto"]) + mail($notify_info["mailto"], + "Mesh DB: Node $nodeid $verb", + "Node entry $nodeid has been $verb by $who\n\n". + " $dbloc/view.php?nodeid=$nodeid\n\n\n". + "Note: If you believe this change was malicious please contact\n". + "$DBADMIN with the details in this mail.\n", + "From: Brisbane Mesh Database <own...@it...>\n". + "Return-Path: own...@it...\n" ); - /* XXX - should generate a difference to show what changed */ } /* Used to escape strings for mysql statements */ @@ -163,13 +183,34 @@ die(mysql_error($db)); } - if ($operation == "replace") - notify($db, "updated", $nodeid); + if ($operation == "replace" || $operation == "delete") + $notify_info = notify_lookup($db, $nodeid); if ($operation == "insert" || $operation == "replace") { if (!isset($nodeid)) die("nodeid missing"); + $changes = ""; + + if ($operation == "replace") { + /* Look up the old values. */ + include("lookup.inc.php"); + $oldadmin = $admin; + $oldcontact = $contact; + $oldphysaddr = $physaddr; + $oldphysloc = $physloc; + $oldnetloc = $netloc; + $oldconfig = $config; + } else { + /* No old values. */ + $oldarray = array(); + $oldcontact = array(); + $oldphysaddr = array(); + $oldphysloc = array(); + $oldnetloc = array(); + $oldconfig = array(); + } + $admin = $VAR["admin"]; $contact = $VAR["contact"]; $physaddr = $VAR["physaddr"]; @@ -187,32 +228,65 @@ cvteastnorth($physloc["lat"], $physloc["lon"]); } + function addchange($name, $old, $new, &$changes) + { + if (!isset($changes)) return; + $newval = $new[$name] != "" ? stripslashes($new[$name]) : "(blank)"; + $oldval = $old[$name] != "" ? $old[$name] : "(blank)"; + if (strlen($newval) > 26 || strlen($oldval) > 26) { + /* Long values; put on separate lines. */ + $changes .= "$name:\n"; + $changes .= "$oldval\n"; + $changes .= "\t->\n"; + $changes .= "$newval\n"; + } else { + /* Short values; same line. */ + $changeline = str_pad("$name: ", 16); + $changeline = str_pad($changeline . "$oldval", 42); + $changeline .= " -> $newval\n"; + $changes .= $changeline; + } + } + + function needsupdate($name, $array, $old) + { + return stripslashes($array[$name]) != $old[$name]; + } + /* return set expressions prefixed with comma */ - function setexp($array = null, $strs = "", $ints="", $dbls="", $pfx="") + function setexp($array = null, $old = null, &$changes, + $strs = "", $ints = "", $dbls = "", + $pfx = "") { $ret = ""; foreach(explode(" ",$strs) as $k) - if (isset($array[$pfx.$k])) + if (needsupdate($pfx.$k, $array, $old)) { $ret .= ",$k=".quote($array[$pfx.$k]); + addchange($pfx.$k, $old, $array, $changes); + } else if ($operation == "insert") die("$k: required field"); foreach(explode(" ",$ints) as $k) - if (isset($array[$pfx.$k])) + if (needsupdate($pfx.$k, $array, $old)) { $ret .= ",$k=".intquote($array[$pfx.$k]); + addchange($pfx.$k, $old, $array, $changes); + } else if ($operation == "insert") die("$k: required field"); foreach(explode(" ",$dbls) as $k) - if (isset($array[$pfx.$k])) + if (needsupdate($pfx.$k, $array, $old)) { $ret .= ",$k=".dblquote($array[$pfx.$k]); + addchange($pfx.$k, $old, $array, $changes); + } else if ($operation == "insert") die("$k: required field"); return $ret; } /* admin */ - $s = setexp($admin, - $strs = "nodename url comment policy status", - $ints = "mailonupdate"); + $s = setexp($admin, $oldadmin, $changes, + $strs = "nodename url comment policy status", + $ints = "mailonupdate"); $result = mysql_query("UPDATE admin SET " . " updated = NOW()" . ",updatedip = ".quote($_SERVER["REMOTE_ADDR"]) @@ -222,8 +296,8 @@ or die("UPDATE admin: ".mysql_error($db)); /* contact */ - $s = setexp($contact, - $strs = "contactname contactemail contactphone"); + $s = setexp($contact, $oldcontact, $changes, + $strs = "contactname contactemail contactphone"); if ($s) $result = mysql_query("UPDATE contact SET " . substr($s,1) @@ -232,8 +306,8 @@ or die("UPDATE contact s={$s}: ".mysql_error($db)); /* physaddr */ - $s = setexp($physaddr, - $strs = "streetno suburb state country postcode imageurl"); + $s = setexp($physaddr, $oldphysaddr, $changes, + $strs = "streetno suburb state country postcode imageurl"); if ($s) $result = mysql_query("UPDATE physaddr SET " . substr($s,1) @@ -242,8 +316,8 @@ or die("UPDATE physaddr: ".mysql_error($db)); /* physloc */ - $s = setexp($physloc, - $dbls = "e n h error"); + $s = setexp($physloc, $oldphysloc, $changes, + $dbls = "e n h error"); if ($s) $result = mysql_query("UPDATE physloc SET " . substr($s,1) @@ -266,6 +340,7 @@ die("Interface name NEW is reserved!!"); if (in_array($ifname, $ifnames)) die("Interface $ifname already exists"); + $changes .= "New interface $ifname\n"; /* clean up any old data */ $where = "nodeid=$nodeid AND ifname=".quote("NEW"); $set = "nodeid=$nodeid , ifname=".quote("NEW"); @@ -298,34 +373,43 @@ $netloc["$ifname.peerid"] = strval($row[0]); } - if (isset($deletenetloc[$ifname])) + $delete = isset($deletenetloc[$ifname]); + if ($delete) { + $changes .= "Deleted interface $ifname:\n"; + $newvals = array(); + } else + $newvals = $netloc; + $s = setexp($newvals, $oldnetloc, $changes, + $strs = "mac family address comment", + $ints = "peerid active", + $dbls = "", + $pfx = "$ifname."); + if ($delete) $q = "DELETE FROM netloc"; - else { - $s = setexp($netloc, - $strs = "mac family address comment", - $ints = "peerid active", - $dbls = "", - $pfx = "$ifname."); + else $q = "UPDATE netloc SET $setifname".$s; - } $result = mysql_query("$q WHERE $where", $db) or die(mysql_error($db)); - if (isset($deletenetloc[$ifname])) + if (!$delete) + $newvals = $config; + $s = setexp($newvals, $oldconfig, $changes, + $strs = "carddesc cardurl antdesc anturl" + ." imageurl protocol", + $ints = "channel", + $dbls = "estgain antspread direction", + $pfx = $ifname."."); + if ($delete) $q = "DELETE FROM config"; - else { - $s = setexp($config, - $strs = "carddesc cardurl antdesc anturl" - ." imageurl protocol", - $ints = "channel", - $dbls = "estgain antspread direction", - $pfx = $ifname."."); - $q = "UPDATE config SET $setifname $s"; - } + else + $q = "UPDATE config SET $setifname".$s; $result = mysql_query("$q WHERE $where", $db) or die(mysql_error($db)); } + if ($operation == "replace") + notify($notify_info, "updated", $nodeid, $changes); + $result = mysql_query("COMMIT") or die(mysql_error($db)); @@ -340,7 +424,7 @@ if (!isset($nodeid)) die("nodeid missing"); - notify($db, "deleted", $nodeid); + notify($notify_info, "deleted", $nodeid); $result = mysql_query("DELETE FROM admin WHERE nodeid=".$nodeid, $db) or die(mysql_error($db)); @@ -367,4 +451,3 @@ header("Location: $location"); ?> - |
From: <il...@pr...> - 2004-07-10 03:06:00
|
Update of /cvsroot/meshdb/www/db2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3442 Modified Files: lookup.inc.php Log Message: Initialise $config to empty. Index: lookup.inc.php =================================================================== RCS file: /cvsroot/meshdb/www/db2/lookup.inc.php,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- lookup.inc.php 9 May 2004 03:32:30 -0000 1.5 +++ lookup.inc.php 10 Jul 2004 03:05:52 -0000 1.6 @@ -37,6 +37,8 @@ foreach($res as $k=>$v) $GLOBALS["netloc"][$ifname.".".$k] = $v; } + + $GLOBALS["config"] = array(); foreach($GLOBALS["netloc"]["ifnames"] as $ifname) { $result = mysql_query("SELECT * FROM config where nodeid = $nodeid AND ifname = \"".mysql_escape_string($ifname)."\""); if ($res = mysql_fetch_assoc($result)) { |
From: <il...@pr...> - 2004-05-11 07:06:15
|
Update of /cvsroot/meshdb/www/db2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14595 Modified Files: view.php Log Message: Fixed a bug where all links were showing up as old (silly PHP :-). Index: view.php =================================================================== RCS file: /cvsroot/meshdb/www/db2/view.php,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- view.php 9 May 2004 03:32:30 -0000 1.14 +++ view.php 11 May 2004 07:06:06 -0000 1.15 @@ -66,6 +66,7 @@ function valnodeid($name, $attr = "") { global $db; + global $PREF; $v = valof($name); if ($v == "") return "<i>none</i>"; |
From: <il...@pr...> - 2004-05-11 07:05:59
|
Update of /cvsroot/meshdb/www/db2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14515 Modified Files: index.php Log Message: Added a total interface count to the front page, mostly just for interest's sake. Index: index.php =================================================================== RCS file: /cvsroot/meshdb/www/db2/index.php,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- index.php 9 May 2004 03:32:30 -0000 1.9 +++ index.php 11 May 2004 07:05:38 -0000 1.10 @@ -58,7 +58,7 @@ printf("is 1 lonely node"); else printf("are $nentries nodes"); -?>, and <? +?> and <? $result = mysql_query("SELECT count(*) from netloc where active", $db) or die(mysql_error($db)); $row = mysql_fetch_row($result); @@ -67,7 +67,12 @@ printf("1 active interface"); else printf("$nentries active interfaces"); -?>. +?> (<? + $result = mysql_query("SELECT count(*) from netloc", $db) + or die(mysql_error($db)); + $row = mysql_fetch_row($result); + printf(strval($row[0])." total"); +?>). <form method=get action="search.php"> Node search: <input name="q"> |
From: <il...@pr...> - 2004-05-09 03:45:33
|
Update of /cvsroot/meshdb/www/db2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13714 Modified Files: cookies.php Log Message: Corrected comment. Index: cookies.php =================================================================== RCS file: /cvsroot/meshdb/www/db2/cookies.php,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- cookies.php 9 May 2004 03:32:30 -0000 1.9 +++ cookies.php 9 May 2004 03:45:24 -0000 1.10 @@ -68,7 +68,7 @@ "select", "Omit nodes without line of sight from the list on the node page", $yesno), "maxnodeage" => array("Maximum node age", - "text", "Ignore nodes that haven't been touched in this number of days (0 = show all)"), + "text", "Ignore nodes that haven't been touched in this number of days"), "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>"), |
Update of /cvsroot/meshdb/www/db2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11468 Modified Files: cookies.inc cookies.php index.php lookup.inc.php map2b.php map3b.php map4b.php search.php touchgraph.php view.php vrml3b.php Log Message: Added an option to omit nodes older than a given number of days (stored in the cookie and defaulting to 1000). Index: cookies.inc =================================================================== RCS file: /cvsroot/meshdb/www/db2/cookies.inc,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- cookies.inc 9 May 2004 01:52:05 -0000 1.4 +++ cookies.inc 9 May 2004 03:32:30 -0000 1.5 @@ -14,6 +14,7 @@ "viewpeermenulimit" => "200", "viewpeertablelimit" => "10", "viewlosonly" => "0", + "maxnodeage" => "1000", "_moddate" => "0", "viewmaplist" => "net loc ter elev", Index: cookies.php =================================================================== RCS file: /cvsroot/meshdb/www/db2/cookies.php,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- cookies.php 9 May 2004 01:58:38 -0000 1.8 +++ cookies.php 9 May 2004 03:32:30 -0000 1.9 @@ -67,6 +67,8 @@ "viewlosonly" => array("List peers with LOS only", "select", "Omit nodes without line of sight from the list on the node page", $yesno), + "maxnodeage" => array("Maximum node age", + "text", "Ignore nodes that haven't been touched in this number of days (0 = show all)"), "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.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- index.php 2 Nov 2003 02:07:00 -0000 1.8 +++ index.php 9 May 2004 03:32:30 -0000 1.9 @@ -82,19 +82,36 @@ <map name="summarymap"> <? /* figure out the limits of the map */ -$result = mysql_query("SELECT min(e) as mine, min(n) as minn, max(e) as maxe, max(n) as maxn from physloc" - /* limit to a 600km radius about UQ */ - ." WHERE (e-501372)*(e-501372)+(n-6958178)*(n-6958178) < 600000*600000" - , $db) +$result = mysql_query("SELECT" + ." min(e) as mine," + ." min(n) as minn," + ." max(e) as maxe," + ." max(n) as maxn" + ." FROM physloc, admin" + /* limit to a 600km radius about UQ */ + ." WHERE (e-501372)*(e-501372)+(n-6958178)*(n-6958178) < 600000*600000" + ." AND admin.nodeid = physloc.nodeid" + ." AND to_days(now()) - to_days(admin.updated) <= ".$PREF["maxnodeage"], + $db) or die(mysql_error($db)); $row = mysql_fetch_assoc($result); $mwid = max(max( $row["maxn"]-$row["minn"] , $row["maxe"]-$row["mine"] ), 1); $mapscale = $len/$mwid/1.1; $mapn = ($row["minn"]+$row["maxn"])/2; $mape = ($row["mine"]+$row["maxe"])/2; -$mapargb = "w=${len}&h=${len}&s=${mapscale}&n=${mapn}&e=${mape}&updated=${updated}"; +$mapargb = "w=${len}&h=${len}&s=${mapscale}&n=${mapn}&e=${mape}&updated=${updated}&maxage=".$PREF["maxnodeage"]; -$result = mysql_query("SELECT admin.nodeid,nodename,n,e from admin,physloc where admin.nodeid = physloc.nodeid and n is not null and e is not null", $db) +$result = mysql_query("SELECT" + ." admin.nodeid," + ." nodename," + ." n," + ." e" + ." FROM admin, physloc" + ." WHERE admin.nodeid = physloc.nodeid" + ." AND n is not null" + ." AND e is not null" + ." AND to_days(now()) - to_days(admin.updated) <= ".$PREF["maxnodeage"], + $db) or die(mysql_error($db)); while ($row = mysql_fetch_assoc($result)) { if ($row["n"] && $row["e"]) { @@ -112,7 +129,18 @@ <map name="networkmap"> <? -$result = mysql_query("SELECT admin.nodeid AS nodeid, nodename, e, n FROM admin, netloc, physloc WHERE (netloc.nodeid = admin.nodeid OR netloc.peerid = admin.nodeid) AND physloc.nodeid = admin.nodeid GROUP BY nodeid", $db) +$result = mysql_query("SELECT" + ." admin.nodeid AS nodeid," + ." nodename," + ." e," + ." n" + ." FROM admin, netloc, physloc" + ." WHERE (netloc.nodeid = admin.nodeid" + ." OR netloc.peerid = admin.nodeid)" + ." AND physloc.nodeid = admin.nodeid" + ." AND to_days(now()) - to_days(admin.updated) <= ".$PREF["maxnodeage"] + ." GROUP BY nodeid", + $db) or die(mysql_error($db)); while ($row = mysql_fetch_assoc($result)) { if ($row["n"] && $row["e"]) { @@ -186,6 +214,7 @@ } ?> </tr> +<!-- <?=print_r($PREF)?> <?=$PREF["maxnodeage"]?> --> <? $infinite = 100000000; $result = mysql_query("SELECT" @@ -203,6 +232,7 @@ ." LEFT JOIN netloc ON admin.nodeid=netloc.nodeid" ." WHERE physaddr.nodeid = admin.nodeid" ." AND physloc.nodeid = admin.nodeid" + ." AND to_days(now()) - to_days(admin.updated) <= " . $PREF["maxnodeage"] ." GROUP BY admin.nodeid" ." ORDER BY $orderkey $orderdir" .($PREF["indexlimit"] > 0 ? " LIMIT ".$PREF["indexlimit"] : "") @@ -334,5 +364,3 @@ </body> </html> - - Index: lookup.inc.php =================================================================== RCS file: /cvsroot/meshdb/www/db2/lookup.inc.php,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- lookup.inc.php 12 Jan 2004 08:07:27 -0000 1.4 +++ lookup.inc.php 9 May 2004 03:32:30 -0000 1.5 @@ -59,7 +59,11 @@ $res = mysql_fetch_assoc($result); $GLOBALS["updated"] = intval($res["updated"]); - $result = mysql_query("SELECT max(unix_timestamp(updated)) AS maxupdated FROM admin", $db) + $result = mysql_query("SELECT" + ." max(unix_timestamp(updated)) AS maxupdated" + ." FROM admin" + ." WHERE to_days(now()) - to_days(updated) <= ".$PREF["maxnodeage"], + $db) or die(mysql_error($db)); $res = mysql_fetch_assoc($result); $GLOBALS["maxupdated"] = max(intval($res["maxupdated"]), Index: map2b.php =================================================================== RCS file: /cvsroot/meshdb/www/db2/map2b.php,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- map2b.php 9 May 2004 02:45:42 -0000 1.5 +++ map2b.php 9 May 2004 03:32:30 -0000 1.6 @@ -13,6 +13,9 @@ $s = doubleval($_GET["s"]); $e = doubleval($_GET["e"]); $n = doubleval($_GET["n"]); +$maxage = intval($_GET["maxage"]); +if (!$maxage) + $maxage = $PREF["maxnodeage"]; /* convert an e/n to an x/y coord in the image */ function coord($ep, $np) { @@ -47,9 +50,18 @@ /* Find all the visible nodes */ $De = $w / $s / 2; $Dn = $h / $s / 2; -$q = "SELECT nodename, admin.nodeid AS nodeid, e, n FROM admin,physloc WHERE admin.nodeid -= physloc.nodeid AND n>".($n-$Dn)." AND n<".($n+$Dn)." AND e>".($e-$De)." AND e< -".($e+$De); +$q = "SELECT" + ." nodename," + ." admin.nodeid AS nodeid," + ." e," + ." n" + ." FROM admin,physloc" + ." WHERE admin.nodeid = physloc.nodeid" + ." AND n > ".($n-$Dn) + ." AND n < ".($n+$Dn) + ." AND e > ".($e-$De) + ." AND e < ".($e+$De) + ." AND to_days(now()) - to_days(admin.updated) <= $maxage"; $BLACK = imagecolorresolve($im, 0, 0, 0); $RED = imagecolorresolve($im, 255, 0, 0); Index: map3b.php =================================================================== RCS file: /cvsroot/meshdb/www/db2/map3b.php,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- map3b.php 10 Aug 2002 11:42:39 -0000 1.3 +++ map3b.php 9 May 2004 03:32:30 -0000 1.4 @@ -18,6 +18,9 @@ $h = intval($h); $s = doubleval($s); $vrml = intval($vrml); +$maxage = intval($_GET["maxage"]); +if (!$maxage) + $maxage = $PREF["maxnodeage"]; $db = mysql_connect($MYSQLHOST, $MYSQLUSER, $MYSQLPASS); mysql_select_db($MYSQLDB, $db) @@ -40,7 +43,17 @@ $De = $w / $s / 2; $Dn = $h / $s / 2; -$q = "SELECT admin.nodeid AS nodeid, e, n FROM admin,physloc WHERE admin.nodeid = physloc.nodeid AND n>".($n-$Dn)." AND n<".($n+$Dn)." AND e>".($e-$De)." AND e<".($e+$De); +$q = "SELECT" + ." admin.nodeid AS nodeid," + ." e," + ." n" + ." FROM admin,physloc" + ." WHERE admin.nodeid = physloc.nodeid" + ." AND n>".($n-$Dn) + ." AND n<".($n+$Dn) + ." AND e>".($e-$De) + ." AND e<".($e+$De) + ." AND to_days(now()) - to_days(admin.updated) <= $maxage"; $c = ""; $result = mysql_query($q, $db); Index: map4b.php =================================================================== RCS file: /cvsroot/meshdb/www/db2/map4b.php,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- map4b.php 10 Aug 2002 11:42:39 -0000 1.3 +++ map4b.php 9 May 2004 03:32:30 -0000 1.4 @@ -14,6 +14,9 @@ $w = intval($_GET["w"]); $h = intval($_GET["h"]); $s = doubleval($_GET["s"]); +$maxage = intval($_GET["maxage"]); +if (!$maxage) + $maxage = $PREF["maxnodeage"]; $db = mysql_connect($MYSQLHOST, $MYSQLUSER, $MYSQLPASS); mysql_select_db($MYSQLDB, $db) @@ -100,7 +103,8 @@ ." n>".($n-$Dn)." AND n<".($n+$Dn) ." AND" ." e>".($e-$De)." AND e<".($e+$De) -; + ." AND" + ." to_days(now()) - to_days(admin.updated) <= $maxage"; $result = mysql_query($q, $db) or die(mysql_error($db)); @@ -140,6 +144,10 @@ ."(p2.n>".($n-$Dn)." AND p2.n<".($n+$Dn) ." AND p2.e>".($e-$De)." AND p2.e<".($e+$De).")" .")" + ." AND" + ." to_days(now()) - to_days(a1.updated) <= ".$PREF["maxnodeage"] + ." AND" + ." to_days(now()) - to_days(a2.updated) <= ".$PREF["maxnodeage"] ; /* First, plot red crosses */ Index: search.php =================================================================== RCS file: /cvsroot/meshdb/www/db2/search.php,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- search.php 2 Nov 2003 02:07:00 -0000 1.3 +++ search.php 9 May 2004 03:32:30 -0000 1.4 @@ -27,7 +27,8 @@ $result = mysql_query( "SELECT nodeid" ." FROM admin" - ." WHERE nodename LIKE $like", + ." WHERE nodename LIKE $like" + ." AND to_days(now()) - to_days(admin.updated) <= ".$PREF["maxnodeage"], $db) or die(mysql_error($db)." (nodename like=$like)"); if (mysql_num_rows($result) > 0) { @@ -41,7 +42,8 @@ "SELECT admin.nodeid" ." FROM admin, contact" ." WHERE contactname LIKE $like" - ." AND admin.nodeid = contact.nodeid", + ." AND admin.nodeid = contact.nodeid" + ." AND to_days(now()) - to_days(admin.updated) <= ".$PREF["maxnodeage"], $db) or die(mysql_error($db)." (contactname like=$like)"); if (mysql_num_rows($result) > 0) { @@ -54,7 +56,8 @@ $result = mysql_query( "SELECT nodeid" ." FROM admin" - ." WHERE comment LIKE $like", + ." WHERE comment LIKE $like" + ." AND to_days(now()) - to_days(admin.updated) <= ".$PREF["maxnodeage"], $db) or die(mysql_error($db)." (comment like=$like)"); if (mysql_num_rows($result) > 0) { @@ -68,7 +71,8 @@ "SELECT admin.nodeid" ." FROM admin, physaddr" ." WHERE (streetno LIKE $like OR suburb LIKE $like)" - ." AND admin.nodeid = physaddr.nodeid", + ." AND admin.nodeid = physaddr.nodeid" + ." AND to_days(now()) - to_days(admin.updated) <= ".$PREF["maxnodeage"], $db) or die(mysql_error($db)." (streetno like=$like)"); if (mysql_num_rows($result) > 0) { Index: touchgraph.php =================================================================== RCS file: /cvsroot/meshdb/www/db2/touchgraph.php,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- touchgraph.php 2 Nov 2003 02:07:00 -0000 1.3 +++ touchgraph.php 9 May 2004 03:32:30 -0000 1.4 @@ -39,6 +39,7 @@ $q = "SELECT admin.nodeid AS nodeid, admin.nodename AS name" ." FROM admin, netloc" ." WHERE admin.nodeid = netloc.nodeid" + ." AND to_days(now()) - to_days(admin.updated) <= ".$PREF["maxnodeage"] ." GROUP BY admin.nodeid"; $comma = ""; $result = mysql_query($q, $db) @@ -55,7 +56,8 @@ .", netloc.nodeid AS nn1" .", netloc.peerid AS nn2" ." FROM admin, netloc" - ." WHERE admin.nodeid = netloc.peerid"; + ." WHERE admin.nodeid = netloc.peerid" + ." AND to_days(now()) - to_days(admin.updated) <= ".$PREF["maxnodeage"]; $comma = ""; $result = mysql_query($q, $db) Index: view.php =================================================================== RCS file: /cvsroot/meshdb/www/db2/view.php,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- view.php 9 May 2004 01:47:27 -0000 1.13 +++ view.php 9 May 2004 03:32:30 -0000 1.14 @@ -70,11 +70,18 @@ if ($v == "") return "<i>none</i>"; $v = intval($v); - $result = mysql_query("SELECT nodename FROM admin WHERE nodeid=$v", $db) or die(mysql_error($db)); + $result = mysql_query("SELECT" + ." nodename," + ." to_days(now()) - to_days(admin.updated) AS age" + ." FROM admin" + ." WHERE nodeid=$v", + $db) or die(mysql_error($db)); $row = mysql_fetch_row($result); - if ($row) + if ($row) { $v .= " <i>(<a href=\"view.php?nodeid=$v\">".htmlspecialchars($row[0])."</a>)</i>"; - else + if ($row[1] > $PREF["maxnodeage"]) + $v .= " <strong>(old)</strong>"; + } else $v .= " <strong>(invalid)</strong>"; return $v; } @@ -298,7 +305,21 @@ $De = $w / $s / 2; $Dn = $h / $s / 2; - $q = "SELECT admin.nodeid AS nodeid, e, n, nodename, ((e-$e)*(e-$e)+(n-$n)*(n-$n)) AS distance FROM admin,physloc WHERE admin.nodeid = physloc.nodeid AND n>".($n-$Dn)." AND n<".($n+$Dn)." AND e>".($e-$De)." AND e<".($e+$De)." AND admin.nodeid != $nodeid ORDER BY distance DESC"; + $q = "SELECT" + ." admin.nodeid AS nodeid," + ." e," + ." n," + ." nodename," + ." ((e-$e)*(e-$e) + (n-$n)*(n-$n)) AS distance" + ." FROM admin, physloc" + ." WHERE admin.nodeid = physloc.nodeid" + ." AND n>".($n-$Dn) + ." AND n<".($n+$Dn) + ." AND e>".($e-$De) + ." AND e<".($e+$De) + ." AND admin.nodeid != $nodeid" + ." AND to_days(now()) - to_days(admin.updated) <= ".$PREF["maxnodeage"] + ." ORDER BY distance DESC"; $result = mysql_query($q, $db); $i = 0; $mapdef = ""; @@ -326,6 +347,7 @@ $paramb .= "&t[$nodeid]=X"; if ($peerid) $paramb .= "&t[$peerid]=o"; + $paramb .= "&maxage=".$PREF["maxnodeage"]; $param = htmlspecialchars($param); $paramb = htmlspecialchars($paramb); @@ -418,7 +440,18 @@ $limit = "LIMIT ".intval($PREF["viewpeermenulimit"]); } else $sort = "admin.nodeid"; - $result = mysql_query("SELECT admin.nodeid, nodename, sqrt(pow($n - n, 2) + pow($e - e, 2)) AS dist FROM admin,physloc WHERE admin.nodeid = physloc.nodeid AND n IS NOT NULL AND e IS NOT NULL ORDER BY $sort $limit", $db) + $result = mysql_query("SELECT" + ." admin.nodeid," + ." nodename," + ." sqrt(pow($n - n, 2) + pow($e - e, 2)) AS dist" + ." FROM admin,physloc" + ." WHERE admin.nodeid = physloc.nodeid" + ." AND n IS NOT NULL" + ." AND e IS NOT NULL" + ." AND to_days(now()) - to_days(admin.updated) <= ".$PREF["maxnodeage"] + ." ORDER BY $sort" + ." $limit", + $db) or die(mysql_error($db)); while ($row = mysql_fetch_assoc($result)) { if (intval($row["nodeid"]) == $nodeid) @@ -565,6 +598,7 @@ ." WHERE admin.nodeid = physloc.nodeid" ." AND admin.nodeid = physaddr.nodeid" ." AND admin.nodeid != $nodeid" + ." AND to_days(now()) - to_days(admin.updated) <= ".$PREF["maxnodeage"] ." ORDER BY distance" ." LIMIT $peerlimit") or die(mysql_error($db)); Index: vrml3b.php =================================================================== RCS file: /cvsroot/meshdb/www/db2/vrml3b.php,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- vrml3b.php 10 Aug 2002 11:42:39 -0000 1.3 +++ vrml3b.php 9 May 2004 03:32:30 -0000 1.4 @@ -39,7 +39,18 @@ $c = ""; /* -$q = "SELECT admin.nodeid AS nodeid, e, n FROM admin,physloc WHERE admin.nodeid = physloc.nodeid AND n>".($n-$Dn)." AND n<".($n+$Dn)." AND e>".($e-$De)." AND e<".($e+$De); +$q = "SELECT" + ." admin.nodeid AS nodeid," + ." e," + ." n" + ." FROM admin, physloc" + ." WHERE admin.nodeid = physloc.nodeid" + ." AND n>".($n-$Dn) + ." AND n<".($n+$Dn) + ." AND e>".($e-$De) + ." AND e<".($e+$De) + ." AND to_days(now()) - to_days(admin.updated) <= ".$PREF["maxnodeage"] +; $result = mysql_query($q, $db); while ($row = mysql_fetch_assoc($result)) { |
From: <il...@pr...> - 2004-05-09 02:45:51
|
Update of /cvsroot/meshdb/www/db2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5503 Modified Files: map2b.php Log Message: Added a temporary hack to make the location map line up with reality until we can figure out what's going wrong with the shift files. Index: map2b.php =================================================================== RCS file: /cvsroot/meshdb/www/db2/map2b.php,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- map2b.php 7 Oct 2002 11:06:02 -0000 1.4 +++ map2b.php 9 May 2004 02:45:42 -0000 1.5 @@ -80,7 +80,7 @@ else $type = "x"; - list($x, $y) = coord($row["e"], $row["n"]); + list($x, $y) = coord($row["e"] + 100, $row["n"] + 300); /* echo "x=$x y=$y type=$type\n"; */ |
From: <il...@pr...> - 2004-05-09 01:58:47
|
Update of /cvsroot/meshdb/www/db2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30816 Modified Files: cookies.php Log Message: Added a slightly more descriptive page title. Index: cookies.php =================================================================== RCS file: /cvsroot/meshdb/www/db2/cookies.php,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- cookies.php 9 May 2004 01:52:05 -0000 1.7 +++ cookies.php 9 May 2004 01:58:38 -0000 1.8 @@ -78,7 +78,7 @@ <head> <link rel="stylesheet" href="<?=$PREF["stylesheet"]?>" type="text/css"> <link rel="icon" href="favicon.ico"> -<title>Brisbane Mesh node database</title> +<title>Brisbane Mesh node database preferences</title> </head> <body> |
From: <il...@pr...> - 2004-05-09 01:52:18
|
Update of /cvsroot/meshdb/www/db2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30019 Modified Files: cookies.inc cookies.php Log Message: Added some knobs to control the table and menu of nearby nodes. Index: cookies.inc =================================================================== RCS file: /cvsroot/meshdb/www/db2/cookies.inc,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- cookies.inc 26 Aug 2002 04:46:51 -0000 1.3 +++ cookies.inc 9 May 2004 01:52:05 -0000 1.4 @@ -11,13 +11,16 @@ "wantgps" => "0", "viewzoom" => "1", "viewpeersortdist" => "1", + "viewpeermenulimit" => "200", + "viewpeertablelimit" => "10", + "viewlosonly" => "0", "_moddate" => "0", "viewmaplist" => "net loc ter elev", ); $PREF_integers = array("imgsz", "myid", "indexlimit", - "viewpeersortdist"); + "viewpeersortdist", "viewpeermenulimit", "viewpeertablelimit"); /* pull out from the cookie only those keys set in $PREF */ if (isset($_COOKIE["preferences"])) { Index: cookies.php =================================================================== RCS file: /cvsroot/meshdb/www/db2/cookies.php,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- cookies.php 27 Nov 2003 02:01:51 -0000 1.6 +++ cookies.php 9 May 2004 01:52:05 -0000 1.7 @@ -54,12 +54,19 @@ $yesno), "viewzoom" => array("View zoom", "text", "Default zoom factor used on view page"), - "viewpeersortdist" => array("Peer list sorting", + "viewpeersortdist" => array("Peer list menu sorting", "select", "Sort that drop down box when viewing elevation plots" ,array( "0" => "sort by NodeID", "1" => "sort by distance" )), + "viewpeermenulimit" => array("Peer list menu limit", + "text", "Number of entries to list in drop down box (0 = no limit)"), + "viewpeertablelimit" => array("Peer list table limit", + "text", "Number of nearby nodes to list at the bottom of the node page (0 = default limit)"), + "viewlosonly" => array("List peers with LOS only", + "select", "Omit nodes without line of sight from the list on the node page", + $yesno), "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>"), |
From: <il...@pr...> - 2004-05-09 01:49:54
|
Update of /cvsroot/meshdb/www/db2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29606 Modified Files: style.css Log Message: Added some rules for the nearby nodes table. Index: style.css =================================================================== RCS file: /cvsroot/meshdb/www/db2/style.css,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- style.css 13 Aug 2002 14:51:13 -0000 1.3 +++ style.css 9 May 2004 01:49:46 -0000 1.4 @@ -1,10 +1,11 @@ - h1 { font-family: Helvetica; } h2 { font-family: Helvetica; } body { background-color: white; } table { border-style: hidden } td { vertical-align: top; text-align: left; } + table.nearby td { vertical-align: middle; } + td.number { text-align: right; } td.figure { text-align: center; } td.caption { font-size: smaller; font-family: Helvetica; @@ -22,6 +23,8 @@ font-family: Helvetica; font-size: smaller; background-color: silver; } + + /* Node status text. */ td.full { color: green; } td.test { color: lime; } td.build { color: maroon; } @@ -29,6 +32,6 @@ td.waiting { color: black; } td.interest { color: gray; } + /* Form buttons. */ input.delete { background: #ffc0c0; } input.update { background: #c0ffc0; } - |
From: <il...@pr...> - 2004-05-09 01:47:35
|
Update of /cvsroot/meshdb/www/db2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29349 Modified Files: view.php Log Message: Added a link from the small elevation diagrams to the page showing the full sized version. Index: view.php =================================================================== RCS file: /cvsroot/meshdb/www/db2/view.php,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- view.php 9 May 2004 01:32:25 -0000 1.12 +++ view.php 9 May 2004 01:47:27 -0000 1.13 @@ -615,7 +615,9 @@ $elevarg = htmlspecialchars($elevarg); ?> <td class="peerelev"> - <img width="<?=$w?>" height="<?=$hh?>" src="<?=elevurl($physloc, $row, $w, $hh)?>"> + <a href="<?=selfurl(array("nodeid"=>$nodeid, "peerid"=>$row["nodeid"]))?>"> + <img width="<?=$w?>" height="<?=$hh?>" src="<?=elevurl($physloc, $row, $w, $hh)?>"> + </a> </td> </tr> <? |
From: <il...@pr...> - 2004-05-09 01:32:33
|
Update of /cvsroot/meshdb/www/db2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27507 Modified Files: view.php Log Message: Added a list of nearby nodes to the bottom of the page. Factored out common elevation calculations. Added class attributes to existing tables. Index: view.php =================================================================== RCS file: /cvsroot/meshdb/www/db2/view.php,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- view.php 18 Mar 2004 10:07:50 -0000 1.11 +++ view.php 9 May 2004 01:32:25 -0000 1.12 @@ -96,6 +96,59 @@ return ("x".strtolower($s) == "xnan"); } + function elev($loc1, $loc2) { + global $ZONE; + + $e1 = doubleval($loc1["e"]); + $n1 = doubleval($loc1["n"]); + $h1 = doubleval($loc1["h"]); + + $e2 = doubleval($loc2["e"]); + $n2 = doubleval($loc2["n"]); + $h2 = doubleval($loc2["h"]); + + $info = split(" ", + mybacktick("bin/elev -z ${ZONE} -a $e1 $n1 $h1" + ." -b $e2 $n2 $h2")); + + $distance = $info[0]; + $bearing1 = doubleval($info[1]) * 180 / M_PI; + if ($bearing1 < 0) $bearing1 += 360; + $bearing2 = doubleval($info[2]) * 180 / M_PI; + if ($bearing2 < 0) $bearing2 += 360; + $alt1 = doubleval($info[3]); + $alt2 = doubleval($info[4]); + $altmin = doubleval($info[5]); + $altmax = doubleval($info[6]); + $incl1 = $info[7]; + $incl2 = $info[8]; + $isclear = intval($info[9]); + + return array("distance" => $distance, + "bearing1" => $bearing1, + "bearing2" => $bearing2, + "alt1" => $alt1, + "alt2" => $alt2, + "altmin" => $altmin, + "altmax" => $altmax, + "incl1" => $incl1, + "incl2" => $incl2, + "isclear" => $isclear); + } + + function elevurl($loc1, $loc2, $w, $h) { + $e1 = doubleval($loc1["e"]); + $n1 = doubleval($loc1["n"]); + $h1 = doubleval($loc1["h"]); + + $e2 = doubleval($loc2["e"]); + $n2 = doubleval($loc2["n"]); + $h2 = doubleval($loc2["h"]); + + $elevarg = "e1=$e1&n1=$n1&h1=$h1&e2=$e2&n2=$n2&h2=$h2&w=$w&h=$h"; + return "elev.php?" . htmlspecialchars($elevarg); + } + include("lookup.inc.php"); header("Last-Modified: " . gmdate("D, d M Y H:i:s", $maxupdated) . " GMT"); @@ -124,11 +177,11 @@ if ($hasloc && $peerid) { $result = mysql_query("SELECT n,e,h from physloc where nodeid=$peerid", $db) or die(mysql_error($db)); - $row = mysql_fetch_row($result); - if ($row) { - $n2 = doubleval($row[0]); - $e2 = doubleval($row[1]); - $h2 = doubleval($row[2]); + $peerloc = mysql_fetch_assoc($result); + if ($peerloc) { + $n2 = doubleval($peerloc["n"]); + $e2 = doubleval($peerloc["e"]); + $h2 = doubleval($peerloc["h"]); } else { $peermsg = "Nodeid $peerid doesn't exist"; $peerid = false; @@ -164,13 +217,13 @@ <table> <tr valign=top> - <td><table> + <td><table class="node"> <tr><th colspan=3 class="major">Node information (site)</th></tr> <? include("view.inc.php"); ?> </table> <? if ($netloc["ifnames"]) { ?> - <table> + <table class="interfaces"> <tr><th colspan=3 class="major">Network interfaces (cards + antennas)</th></tr> <? include("view-netloc.inc.php"); ?> </table> @@ -182,7 +235,7 @@ $result = mysql_query($q, $db) or die(mysql_error($db)); if (mysql_num_rows($result)) { ?> - <table> + <table class="incoming"> <tr><th colspan=4 class="major">Incoming links</th></tr> <tr><th class="minor">Node</th> <th class="minor">Name</th> @@ -278,7 +331,7 @@ $paramb = htmlspecialchars($paramb); ?> <td> - <table> + <table class="maps"> <tr><th class="major">Maps</th></tr> <? foreach ($maps as $maptype) { @@ -361,8 +414,8 @@ echo "<option value=\"\" selected>(none)</option>\n"; if ($PREF["viewpeersortdist"]) { $sort = "dist"; - if (intval($PREF["indexlimit"]) > 0) - $limit = "LIMIT ".intval($PREF["indexlimit"]); + if (intval($PREF["viewpeermenulimit"]) > 0) + $limit = "LIMIT ".intval($PREF["viewpeermenulimit"]); } else $sort = "admin.nodeid"; $result = mysql_query("SELECT admin.nodeid, nodename, sqrt(pow($n - n, 2) + pow($e - e, 2)) AS dist FROM admin,physloc WHERE admin.nodeid = physloc.nodeid AND n IS NOT NULL AND e IS NOT NULL ORDER BY $sort $limit", $db) @@ -390,23 +443,13 @@ <?=$peermsg?> </td></tr> <? - if ($peerid) { - $n1 = doubleval($physloc["n"]); - $e1 = doubleval($physloc["e"]); - $h1 = doubleval($physloc["h"]); - - $e2 = doubleval($e2); /* paranoia */ - $n2 = doubleval($n2); - $h2 = doubleval($h2); - - $w = $IMGWIDTH; - $hh = $IMGHEIGHT / 2; - $elevarg = "e1=$e1&n1=$n1&h1=$h1&e2=$e2&n2=$n2&h2=$h2&w=$w&h=$hh"; - $elevarg = htmlspecialchars($elevarg); + if ($peerid) { + $w = $IMGWIDTH; + $hh = $IMGHEIGHT / 2; - $info = split(" ", mybacktick("bin/elev -z ${ZONE} -a $e1 $n1 $h1 -b $e2 $n2 $h2")); + $info = elev($physloc, $peerloc); - if (isnan($info[0])) { + if (isnan($info["distance"])) { $distance = "unknown"; $pathloss24 = 0; $pathloss58 = 0; @@ -417,52 +460,44 @@ * = 20*log10(R) + 40.17 @ f=2.431e9 * = 20*log10(R) + 47.72 @ f=5.8e9 */ - $distance = doubleval($info[0]); + $distance = doubleval($info["distance"]); $pathloss24 = 20*log10($distance) + 40.1652687; $pathloss58 = 20*log10($distance) + 47.7163430931; $distance = sprintf("%.2fm", $distance); } - $bearing1 = doubleval($info[1]) * 180 / M_PI; - if ($bearing1 < 0) $bearing1 += 360; - $bearing2 = doubleval($info[2]) * 180 / M_PI; - if ($bearing2 < 0) $bearing2 += 360; - $alt1 = doubleval($info[3]); - $alt2 = doubleval($info[4]); - $altmin = doubleval($info[5]); - $altmax = doubleval($info[6]); - if (isnan($info[7]) || isnan($info[8])) { - $incl1 = $incl2 = "?"; + if (isnan($info["incl1"]) || isnan($info["incl2"])) { + $incl1 = $incl2 = "?"; } else { - $incl1 = sprintf("%.2f",doubleval($info[7]) * 180 / M_PI); - $incl2 = sprintf("%.2f",doubleval($info[8]) * 180 / M_PI); + $incl1 = sprintf("%.2f", doubleval($info["incl1"]) * 180 / M_PI); + $incl2 = sprintf("%.2f", doubleval($info["incl2"]) * 180 / M_PI); } ?> <tr><td><table> - <tr><td valign=top><?printf("%.0f", $altmax)?>m</td> + <tr><td valign=top><?printf("%.0f", $info["altmax"])?>m</td> <td class="figure" colspan=2 rowspan=2><img width="<?=$w?>" height="<?=$hh?>" - src="elev.php?<?=$elevarg?>"></td></tr> - <tr><td valign=bottom> <?printf("%.0f", $altmin)?>m</td></tr> + src="<?=elevurl($physloc, $peerloc, $w, $hh)?>"></td></tr> + <tr><td valign=bottom> <?printf("%.0f", $info["altmin"])?>m</td></tr> <tr><td></td> <td colspan=2 class="caption" align=center><?=$distance?></td></tr> <tr><td></td> <td class="caption"> <strong><?=$nodename?></strong> <br> - Altitude: <? printf("%.2f", $alt1 + $h1); ?>m + Altitude: <? printf("%.2f", $info["alt1"] + $h1); ?>m <br> - Azimuth: <? printf("%.2f", $bearing1); ?>° + Azimuth: <? printf("%.2f", $info["bearing1"]); ?>° <br> Inclination: <?=$incl1?>° </td> <td class="caption"> <strong><a href="view.php?nodeid=<?=$peerid?>&peerid=<?=$nodeid?>"><?=$peername?></a></strong> <br> - Altitude: <? printf("%.2f", $alt2 + $h2); ?>m + Altitude: <? printf("%.2f", $info["alt2"] + $h2); ?>m <br> - Azimuth: <? printf("%.2f", $bearing2); ?>° + Azimuth: <? printf("%.2f", $info["bearing2"]); ?>° <br> Inclination: <?=$incl2?>° </td> @@ -505,6 +540,91 @@ </tr></table> +<? +if ($hasloc) { + if (isset($nodes)) + $peerlimit = intval($nodes); + else + $peerlimit = intval($PREF["viewpeertablelimit"]); + if ($peerlimit == 0 || $peerlimit > 100) + $peerlimit = 100; + $infinite = 100000000; + $result = mysql_query("SELECT" + ." admin.nodeid as nodeid," + ." nodename," + ." suburb," + ." to_days(now())-to_days(admin.updated) as age," + ." e," + ." n," + ." h," + ." ifnull(sqrt(pow(e - ".$physloc["e"].", 2) +" + ." pow(n - ".$physloc["n"].", 2))," + ." $infinite) as distance," + ." admin.status as status" + ." FROM admin, physloc, physaddr" + ." WHERE admin.nodeid = physloc.nodeid" + ." AND admin.nodeid = physaddr.nodeid" + ." AND admin.nodeid != $nodeid" + ." ORDER BY distance" + ." LIMIT $peerlimit") + or die(mysql_error($db)); + +?> + <table class="nearby"> + <tr><th class="major" colspan="8">Nearby nodes</th></tr> + <tr> + <th class="minor">ID</th> + <th class="minor">Name</th> + <th class="minor">Suburb</th> + <th class="minor">Status</th> + <th class="minor">Age</th> + <th class="minor">Distance</th> + <th class="minor">Bearing</th> + <th class="minor">Elevation diagram</th> + </tr> +<? + $w = 100; + $hh = 32; + + while ($row = mysql_fetch_assoc($result)) { + $info = elev($physloc, $row); + + /* Format the distance as a whole number of metres. */ + if (isnan($info["distance"])) { + $distance = "unknown"; + } else { + $distance = sprintf("%.0fm", doubleval($info["distance"])); + } + + if ($info["isclear"] || !$PREF["viewlosonly"]) { +?> + <tr> + <td class="peerid number"><?=$row["nodeid"]?></td> + <td class="peername"><a href="<?=selfurl(array("nodeid"=>$row["nodeid"], "peerid"=>$nodeid))?>"><?=$row["nodename"]?></a></td> + <td class="peersuburb"><?=$row["suburb"]?></td> + <td class="peerstatus <?=$row["status"]?>"><?=$row["status"]?></td> + <? if ($row["age"] > 0) { ?> + <td class="peerage number"><?=$row["age"]?>d</td> + <? } else { ?> + <td class="peerage number"> </td> + <? } ?> + <td class="peerdistance number"><?=$distance?></td> + <td class="peerbearing number"><?=intval($info["bearing1"])?>°</td> + <? + $elevarg = "e1=$e1&n1=$n1&h1=$h1&e2=$e2&n2=$n2&h2=$h2&w=$w&h=$hh"; + $elevarg = htmlspecialchars($elevarg); + ?> + <td class="peerelev"> + <img width="<?=$w?>" height="<?=$hh?>" src="<?=elevurl($physloc, $row, $w, $hh)?>"> + </td> + </tr> +<? + } /* isclear || !viewlosonly */ + } /* while row */ +} /* if $hasloc */ +?> +</table> + <ul> <li><a href="edit.php?nodeid=<?=$nodeid?>">Edit this node entry</a> <li><a href="index.php">Return to index</a> |
From: <il...@pr...> - 2004-03-18 10:57:37
|
Update of /cvsroot/meshdb/src/geo/elev In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28371 Modified Files: elev.c Log Message: Interpret NaN heights at the endpoints as sea level (same as we do along the path between the nodes). This fixes broken elevation diagrams with nodes that claim to be in water. Index: elev.c =================================================================== RCS file: /cvsroot/meshdb/src/geo/elev/elev.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- elev.c 24 Nov 2003 07:19:22 -0000 1.5 +++ elev.c 18 Mar 2004 10:47:56 -0000 1.6 @@ -170,6 +170,8 @@ lata += shft.lat_shift; } alta = alt_atgeo(&alt, lata, lona); + if (isnanf(alta)) + alta = 0.0; geodesy_grid2geo(&geo, eb, nb, &latb, &lonb, NULL, NULL); if (ntv2_lookup(alt.nt, latb, lonb, &shft) != -1) { @@ -177,6 +179,8 @@ latb += shft.lat_shift; } altb = alt_atgeo(&alt, latb, lonb); + if (isnanf(altb)) + altb = 0.0; /* Convert geo to cartesian */ geodesy_init(&geo94); |
From: <il...@pr...> - 2004-03-18 10:17:26
|
Update of /cvsroot/meshdb/www/db2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20772 Modified Files: view.php Log Message: Cope with systems that print NaN in lower case. Index: view.php =================================================================== RCS file: /cvsroot/meshdb/www/db2/view.php,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- view.php 18 Mar 2004 10:05:06 -0000 1.10 +++ view.php 18 Mar 2004 10:07:50 -0000 1.11 @@ -93,7 +93,7 @@ } function isnan($s) { - return ("x".$s == "xNaN"); + return ("x".strtolower($s) == "xnan"); } include("lookup.inc.php"); |
From: <il...@pr...> - 2004-03-18 10:14:41
|
Update of /cvsroot/meshdb/www/db2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20171 Modified Files: view.php Log Message: Aesthetic improvement when the height at site is unknown. Index: view.php =================================================================== RCS file: /cvsroot/meshdb/www/db2/view.php,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- view.php 24 Feb 2004 09:07:43 -0000 1.9 +++ view.php 18 Mar 2004 10:05:06 -0000 1.10 @@ -239,7 +239,7 @@ if (isnan($altinfo[0])) $localt = "unknown"; else - $localt = sprintf("%.2f", $altinfo[0]); + $localt = sprintf("%.2fm", $altinfo[0]); $minalt = sprintf("%.2f", $altinfo[1]); $maxalt = sprintf("%.2f", $altinfo[2]); @@ -342,7 +342,7 @@ <?=zoomlinks($zoom)?> <br> Ground height at site: - <strong><?=$localt?></strong>m AHD est.<br> + <strong><?=$localt?></strong> AHD est.<br> Map range: low <font color=blue><?=$minalt?></font>m, high <font color=green><?=$maxalt?></font>m </td></tr> |
From: <ma...@pr...> - 2004-03-12 12:01:01
|
Update of /cvsroot/meshdb/src/geo/compat In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22451/geo/compat Modified Files: compat.h err.h Log Message: minor changes to compile cleanly on FreeBSD Index: compat.h =================================================================== RCS file: /cvsroot/meshdb/src/geo/compat/compat.h,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- compat.h 27 Nov 2003 01:21:16 -0000 1.6 +++ compat.h 12 Mar 2004 11:33:37 -0000 1.7 @@ -12,12 +12,14 @@ #define isnanf(x) isnan(x) #endif -#if defined(__svr4__) || defined(__sun__) +#if defined(__svr4__) || defined(__sun__) || defined(__FreeBSD__) #include <ieeefp.h> #define floorf(x) floor(x) #define ceilf(x) ceil(x) #define rintf(x) rint(x) +#if !defined(__FreeBSD__) #include <sys/int_types.h> +#endif #define u_int8_t uint8_t #define u_int16_t uint16_t #define u_int32_t uint32_t Index: err.h =================================================================== RCS file: /cvsroot/meshdb/src/geo/compat/err.h,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- err.h 24 Nov 2003 07:23:58 -0000 1.4 +++ err.h 12 Mar 2004 11:33:37 -0000 1.5 @@ -15,7 +15,7 @@ #define _progname basename((char *)getexecname()) #endif -#if defined(linux) || defined(__OpenBSD__) +#if defined(linux) || defined(__OpenBSD__) || defined(__FreeBSD__) extern char *__progname; #define _progname __progname #endif |