Update of /cvsroot/meshdb/www/db2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28180 Modified Files: Tag: leonard-dev config-local.php-dist elev.php gawd.php gps.php map2d.inc map3b.php util.php view.php vrml3b.php Log Message: use local config var $BINDIR to indicate executables Index: config-local.php-dist =================================================================== RCS file: /cvsroot/meshdb/www/db2/config-local.php-dist,v retrieving revision 1.4 retrieving revision 1.4.2.1 diff -u -d -r1.4 -r1.4.2.1 --- config-local.php-dist 27 Nov 2003 04:52:28 -0000 1.4 +++ config-local.php-dist 7 Nov 2004 05:50:06 -0000 1.4.2.1 @@ -22,6 +22,7 @@ $ZONE = 56; /* UTM zone (56 for Brisbane) */ $SHIFTFILE = "lib/QLD_0900.gsb";/* Shift file */ + $BINDIR = "./bin"; /* Binary directory for meshdb-bin */ $ALTFILE = "lib/alt.desc"; /* Altitude file */ ?> Index: elev.php =================================================================== RCS file: /cvsroot/meshdb/www/db2/elev.php,v retrieving revision 1.1.1.1 retrieving revision 1.1.1.1.2.1 diff -u -d -r1.1.1.1 -r1.1.1.1.2.1 --- elev.php 10 Aug 2002 03:33:24 -0000 1.1.1.1 +++ elev.php 7 Nov 2004 05:50:06 -0000 1.1.1.1.2.1 @@ -21,7 +21,7 @@ header("Content-type: image/png"); /* if ($REQUEST_METHOD == "GET") */ - mypassthru("bin/elev" + mypassthru("$BINDIR/elev" ." -i -g ${w}x${h}" ." -z ${ZONE}" ." -S ${SHIFTFILE} -A ${ALTFILE}" Index: gawd.php =================================================================== RCS file: /cvsroot/meshdb/www/db2/gawd.php,v retrieving revision 1.3 retrieving revision 1.3.2.1 diff -u -d -r1.3 -r1.3.2.1 --- gawd.php 10 Aug 2002 11:42:39 -0000 1.3 +++ gawd.php 7 Nov 2004 05:50:06 -0000 1.3.2.1 @@ -32,8 +32,8 @@ global $SHIFTFILE, $ZONE; $E1 = doubleval($E); $N1 = doubleval($N); - $latlon = mybacktick("bin/rf -F \"%l %L\" -z $ZONE -g $E1 $N1 2>&1"); - $latlon = mybacktick("bin/shift -r -S ${SHIFTFILE} -- $latlon"); + $latlon = mybacktick("$BINDIR/rf -F \"%l %L\" -z $ZONE -g $E1 $N1 2>&1"); + $latlon = mybacktick("$BINDIR/shift -r -S ${SHIFTFILE} -- $latlon"); list($Lat,$Lon) = split(" ", $latlon, 2); $Lat = doubleval($Lat); $Lon = doubleval($Lon); Index: gps.php =================================================================== RCS file: /cvsroot/meshdb/www/db2/gps.php,v retrieving revision 1.3.2.1 retrieving revision 1.3.2.2 diff -u -d -r1.3.2.1 -r1.3.2.2 --- gps.php 7 Nov 2004 05:38:28 -0000 1.3.2.1 +++ gps.php 7 Nov 2004 05:50:06 -0000 1.3.2.2 @@ -44,14 +44,14 @@ } function geo_to_grid($lat,$lon) { - return execnum("bin/rf" + return execnum("$BINDIR/rf" ." -F ".shquote("%e %n %z") ." -l ".shquote($lat)." ".shquote($lon) , 3); } function grid_to_geo($e,$n,$z) { - return execnum("bin/rf" + return execnum("$BINDIR/rf" ." -z ".shquote($z) ." -F ".shquote("%l %L") ." -g ".shquote($e)." ".shquote($n) @@ -62,7 +62,7 @@ global $SHIFTFILE; if ($reverse == -1) return array($lat, $lon); - return execnum("bin/shift" + return execnum("$BINDIR/shift" ." -S ${SHIFTFILE}" .($reverse ? " -r" : "") ." --" Index: map2d.inc =================================================================== RCS file: /cvsroot/meshdb/www/db2/map2d.inc,v retrieving revision 1.4.2.1 retrieving revision 1.4.2.2 diff -u -d -r1.4.2.1 -r1.4.2.2 --- map2d.inc 7 Nov 2004 05:38:45 -0000 1.4.2.1 +++ map2d.inc 7 Nov 2004 05:50:06 -0000 1.4.2.2 @@ -48,7 +48,7 @@ list($lat,$lon) = cvtlatlon($e,$n,$noshift=1); $sc = intval(2820/doubleval($s)); $url = "http://www.mapblast.com/myblastd/MakeMap.d?CT=${lat}:${lon}:${sc}&IC=&W=${w}&H=${h}&FAM=myblast&DU=KM&LB="; - $postproc = "| bin/giftopnm | bin/pnmtopng"; + $postproc = "| giftopnm | pnmtopng"; } else if ($src == "terra") { /* Terraserver */ $tle = intval($e-$s*$w/2); @@ -56,13 +56,13 @@ $bre = intval($tle+$s*$w); $brn = intval($tln-$s*$h); $url = "http://64.132.109.116/ecwimage/ecw_img.dll?image?ecw=/image_data/orbimage/Orbimage_Brisbane_Australia.ecw&sizex=${w}&sizey=${h}&worldtlx=${tle}&worldtly=${tln}&worldbrx=${bre}&worldbry=${brn}"; - $postproc = "| djpeg | bin/pnmscale -xysize ${w} ${h} | bin/pnmtopng"; + $postproc = "| djpeg | pnmscale -xysize ${w} ${h} | pnmtopng"; } else if ($src == "local") { /* Local map stuff */ list($lat,$lon) = cvtlatlon($e,$n); $sc = intval(1.0/doubleval($s)); - $cmd = "(./bin/psplot -g${w}x${h} -- $lat $lon $sc < templ.ps" - ."| ./bin/gdps -g${w}x${h} > $tmpfile ) 2>$errfile"; + $cmd = "($BINDIR/psplot -g${w}x${h} -- $lat $lon $sc < templ.ps" + ."| $BINDIR/gdps -g${w}x${h} > $tmpfile ) 2>$errfile"; /* $cmd = "(echo 'lat=$lat'; echo 'lon=$lon'; echo 'sc=$sc') >$errfile"; */ exec("ulimit -c 0; ulimit -t 120; ".$cmd); $url = false; Index: map3b.php =================================================================== RCS file: /cvsroot/meshdb/www/db2/map3b.php,v retrieving revision 1.4 retrieving revision 1.4.2.1 diff -u -d -r1.4 -r1.4.2.1 --- map3b.php 9 May 2004 03:32:30 -0000 1.4 +++ map3b.php 7 Nov 2004 05:50:06 -0000 1.4.2.1 @@ -66,7 +66,7 @@ $c .= " -$x ".doubleval($row["e"])." ".doubleval($row["n"]); } -mypassthru("bin/alt" +mypassthru("$BINDIR/alt" ." -A ${ALTFILE} -S ${SHIFTFILE}" .($vrml ? " -v" : "") ." $c -- $e $n $w $h $s"); Index: util.php =================================================================== RCS file: /cvsroot/meshdb/www/db2/util.php,v retrieving revision 1.2 retrieving revision 1.2.2.1 diff -u -d -r1.2 -r1.2.2.1 --- util.php 16 Sep 2004 22:58:16 -0000 1.2 +++ util.php 7 Nov 2004 05:50:06 -0000 1.2.2.1 @@ -16,9 +16,9 @@ return array("",""); $E1 = doubleval($E); $N1 = doubleval($N); - $latlon = mybacktick("bin/rf -F \"%l %L\" -z $ZONE -g $E1 $N1 2>&1"); + $latlon = mybacktick("$BINDIR/rf -F \"%l %L\" -z $ZONE -g $E1 $N1 2>&1"); if (!$noshift) - $latlon = mybacktick("bin/shift -S ${SHIFTFILE} -- $latlon"); + $latlon = mybacktick("$BINDIR/shift -S ${SHIFTFILE} -- $latlon"); list($Lat,$Lon) = split(" ", $latlon, 2); $Lat = doubleval($Lat); $Lon = doubleval($Lon); @@ -31,8 +31,8 @@ return array("",""); $Lat = doubleval($Lat); $Lon = doubleval($Lon); - $latlon = mybacktick("bin/shift -r -S ${SHIFTFILE} -- $Lat $Lon"); - $enz = mybacktick("bin/rf -F \"%e %n %z\" -l $latlon 2>&1"); + $latlon = mybacktick("$BINDIR/shift -r -S ${SHIFTFILE} -- $Lat $Lon"); + $enz = mybacktick("$BINDIR/rf -F \"%e %n %z\" -l $latlon 2>&1"); list($E,$N,$Z) = split(" ", $enz, 3); if ($Z != $ZONE) die ("Lat/lon $Lat/$Lon is in zone $Z. should be in zone $ZONE"); Index: view.php =================================================================== RCS file: /cvsroot/meshdb/www/db2/view.php,v retrieving revision 1.16.2.1 retrieving revision 1.16.2.2 diff -u -d -r1.16.2.1 -r1.16.2.2 --- view.php 7 Nov 2004 05:39:28 -0000 1.16.2.1 +++ view.php 7 Nov 2004 05:50:06 -0000 1.16.2.2 @@ -119,7 +119,7 @@ $h2 = doubleval($loc2["h"]); $info = split(" ", - mybacktick("bin/elev -z ${ZONE} -a $e1 $n1 $h1" + mybacktick("$BINDIR/elev -z ${ZONE} -a $e1 $n1 $h1" ." -b $e2 $n2 $h2")); $distance = $info[0]; @@ -296,7 +296,7 @@ $w=doubleval($w); $h=doubleval($h); $s=doubleval($s); - $altinfo = split(" ", mybacktick("bin/alt -t" + $altinfo = split(" ", mybacktick("$BINDIR/alt -t" ." -S ${SHIFTFILE} -A ${ALTFILE}" ." $e $n $w $h $s")); Index: vrml3b.php =================================================================== RCS file: /cvsroot/meshdb/www/db2/vrml3b.php,v retrieving revision 1.4 retrieving revision 1.4.2.1 diff -u -d -r1.4 -r1.4.2.1 --- vrml3b.php 9 May 2004 03:32:30 -0000 1.4 +++ vrml3b.php 7 Nov 2004 05:50:06 -0000 1.4.2.1 @@ -63,7 +63,7 @@ } */ -mypassthru("bin/alt" +mypassthru("$BINDIR/alt" ." -A ${ALTFILE} -S ${SHIFTFILE}" ." -v" ." $c -- $e $n $w $h $s"); |