9 $image = "./Germany_Map.jpg" ;
11 if ( isset ( $_GET['coords'] ) ) $coords = $_GET['coords'] ;
15 foreach ( $_GET AS $k => $v )
17 $a = explode ( "," , str_replace ( "?" , "" , $k ) ) ;
18 if ( $v == "" AND count ( $a ) == 2 )
20 $x = array_shift ( $a ) ;
21 $y = array_shift ( $a ) ;
25 if ( $coords != "" ) $coords = explode ( ";" , $coords ) ;
26 else $coords = array () ;
28 if ( $x != -1 AND $y != -1 ) # Adding coordinates
30 $coords[] = "{$x},{$y}" ;
34 if ( count ( $c2 ) > 0 ) array_pop ( $c2 ) ;
35 $c2 = implode ( ";" , $c2 ) ;
37 $coords = implode ( ";" , $coords ) ;
40 <a href='./geomaker.php?coords={$coords}&'><image src='{$image}' ismap/></a>
43 print "<br/><a href='geomaker.php?coords={$c2}'>Remove last coordinates</a>" ;
44 print " | <a href='geomaker.php'>Reset</a>" ;
46 print "<br/>Coordinates so far:<br>\n" ;
47 print str_replace ( ";" , " " , $coords ) ;