diff options
author | Othmar Gsenger <otti@ffgraz.net> | 2013-11-12 20:21:09 +0000 |
---|---|---|
committer | Othmar Gsenger <otti@ffgraz.net> | 2013-11-12 20:21:09 +0000 |
commit | 9f28da4440bfcea17490dc2f3a6ac900c762cfbd (patch) | |
tree | 757d27b26a3f58f7fe155bd0ed5cebf0123d685a /index3.php | |
parent | a47c4eecff79c1d57650b46c437b628d873705b2 (diff) |
added alternative version with google maps api v3. very basic support without the possibility to add new nodes
Diffstat (limited to 'index3.php')
-rw-r--r-- | index3.php | 172 |
1 files changed, 172 insertions, 0 deletions
diff --git a/index3.php b/index3.php new file mode 100644 index 0000000..03c4577 --- /dev/null +++ b/index3.php @@ -0,0 +1,172 @@ +<?php +session_start(); + +if(isset($_REQUEST['lat'])) $lat = mysql_escape_string($_REQUEST['lat']); +if(isset($_REQUEST['lng'])) $lng = mysql_escape_string($_REQUEST['lng']); +if(isset($_REQUEST['res'])) $res = $_REQUEST['res']; + +//default values +if(empty($lat)) $lat=47.07102; +if(empty($lng)) $lng=15.440; +if(empty($res)) $res=15; + +$apikey = 'unknownhost'; +if($_SERVER['HTTP_HOST'] == 'dev-karte.ffgraz.net') { + $apikey = 'ABQIAAAAZRu0cBQNp9TOBJp1i-DhohS9pf3riiZoWFmOpEuQ19If-UHZjhRHIGQIC00eY1H5H71yDqx-QzdyJA'; +} elseif($_SERVER['HTTP_HOST'] == 'dev-karte.graz.funkfeuer.at') { + $apikey = 'ABQIAAAAZRu0cBQNp9TOBJp1i-DhohSbKGG4yPVU7VmuBMuIIaQfSNuMAxRrbvJwWee4f-0iW-LpRZkkrl531Q'; +} +?> + +<html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml"> + <head> + <meta http-equiv="content-type" content="text/html; charset=utf-8"/> + <title>Funkfeuer Graz: Map</title> + <link rel="stylesheet" href="map.css" type="text/css" /> + <script type="text/javascript" src="//maps.googleapis.com/maps/api/js?v=3.exp&sensor=false&key=AIzaSyBKP7K8iE-9pZlRukwox82QSfz404Yranc&language=de"></script> + <script src="jquery-1.10.2.min.js" type="text/javascript"></script> + <script src="map3.js" type="text/javascript"></script> + <script type="text/javascript"> + function onLoad() { +<?php + printf(" initialize(" . $lat . ", " . $lng . ", " . $res . ");\n"); +?> + } + </script> + </head> + + <body onload="onLoad()"> + <div id="map" style="width:100%; height:100%;"></div> + <div id="outerheader"><div id="header"> + <h1 align="center">..:: 0xFF FunkFeuer Freenet Graz ::..</h1> + </div></div> + <div id="northeastcontainer" style="padding-top: 3em;"> + <div id="legendbox" class="box"> + <b>Legende:</b> + <table class="legend"> + <tr><td align="center"><img src="./img/marker_online.png" /></td><td> </td><td>Online</td></tr> + <tr><td align="center"><img src="./img/marker_offline.png" /></td><td> </td><td>Offline</td></tr> + <tr><td align="center"><img src="./img/marker_tunnel.png" /></td><td> </td><td>Tunnel</td></tr> + <tr><td align="center"><img src="./img/link_green.png" /></td><td> </td><td>Gut</td></tr> + <tr><td align="center"><img src="./img/link_yellow.png" /></td><td> </td><td>Mittel</td></tr> + <tr><td align="center"><img src="./img/link_grey.png" /></td><td> </td><td>Schlecht</td></tr> + <tr><td align="center"><img src="./img/link_blue.png" /></td><td> </td><td>Tunnel</td></tr> + </table> + </div> + <div id="countbox" class="box"> + </div> + <div id="visibox" class="box"> + <b>Elemente<br />aus-/einblenden</b> + <form name="visibleform" action="#" onsubmit="return false"> + <table class="legend"> + <tr> + <td><input type="checkbox" name="defaultroute" value="true" onclick="javascript:toggleVisible('defaultroute')"></td> + <td> </td><td>!Default</td> + </tr> + <tr> + <td><input type="checkbox" name="offline" value="true" onclick="javascript:toggleVisible('offline')"></td> + <td> </td><td align="center"><img src="./img/marker_offline.png" /></td> + </tr> + <tr> + <td><input type="checkbox" name="online" value="true" onclick="javascript:toggleVisible('online')");></td> + <td> </td><td align="center"><img src="./img/marker_online.png" /> <img src="./img/marker_tunnel.png" /></td> + </tr> + <tr> + <td><input type="checkbox" name="bad" value="true" onclick="javascript:toggleVisible('bad')" checked="checked"></td> + <td> </td><td align="center"><img src="./img/link_grey.png" /></td> + </tr> + <tr> + <td><input type="checkbox" name="middle" value="true" onclick="javascript:toggleVisible('middle')"></td> + <td> </td><td align="center"><img src="./img/link_yellow.png" /></td> + </tr> + <tr> + <td><input type="checkbox" name="good" value="true" onclick="javascript:toggleVisible('good')"></td> + <td> </td><td align="center"><img src="./img/link_green.png" /></td> + </tr> + <tr> + <td><input type="checkbox" name="tunnel" value="true" onclick="javascript:toggleVisible('tunnel')"></td> + <td> </td><td align="center"><img src="./img/link_blue.png" /></td> + </tr> + </table> + <table class="undef"> + <td><input type="checkbox" name="undef" value="true" onclick="javascript:toggleVisible('undef')"></td> + <td> </td><td>Kanaele undef.</td> + </table> + <table class="5channel"> + <tr> + <td><input type="checkbox" name="5channel" value="true" onclick="javascript:toggleVisible('5channel')"></td> + <td> </td><td>Alle 5GHz Kanaele</td> + </tr> + </table> + <table class="2.4channel"> + <tr> + <td><input type="checkbox" name="2.4channel" value="true" onclick="javascript:toggleVisible('2.4channel')"></td> + <td> </td><td>Alle 2.4GHz Kanaele</td> + </tr> + </table> + <table class="channel"> + <tr> + <td><input type="checkbox" name="channel1" value="true" onclick="javascript:toggleVisible('channel1')"></td> + <td> </td><td>1</td> + <td><input type="checkbox" name="channel2" value="true" onclick="javascript:toggleVisible('channel2')"></td> + <td> </td><td>2</td> + <td><input type="checkbox" name="channel3" value="true" onclick="javascript:toggleVisible('channel3')"></td> + <td> </td><td>3</td> + </tr> + <tr> + + <td><input type="checkbox" name="channel4" value="true" onclick="javascript:toggleVisible('channel4')"></td> + <td> </td><td>4</td> + <td><input type="checkbox" name="channel5" value="true" onclick="javascript:toggleVisible('channel5')"></td> + <td> </td><td>5</td> + <td><input type="checkbox" name="channel6" value="true" onclick="javascript:toggleVisible('channel6')"></td> + <td> </td><td>6</td> + </tr> + <tr> + <td><input type="checkbox" name="channel7" value="true" onclick="javascript:toggleVisible('channel7')"></td> + <td> </td><td>7</td> + <td><input type="checkbox" name="channel8" value="true" onclick="javascript:toggleVisible('channel8')"></td> + <td> </td><td>8</td> + <td><input type="checkbox" name="channel9" value="true" onclick="javascript:toggleVisible('channel9')"></td> + <td> </td><td>9</td> + </tr> + <tr> + <td><input type="checkbox" name="channel10" value="true" onclick="javascript:toggleVisible('channel10')"></td> + <td> </td><td>10</td> + <td><input type="checkbox" name="channel11" value="true" onclick="javascript:toggleVisible('channel11')"></td> + <td> </td><td>11</td> + <td><input type="checkbox" name="channel12" value="true" onclick="javascript:toggleVisible('channel12')"></td> + <td> </td><td>12</td> + </tr> + <tr> + <td><input type="checkbox" name="channel13" value="true" onclick="javascript:toggleVisible('channel13')"></td> + <td> </td><td>13</td> + </tr> + </table> + </form> + </div> + </div> + <div id="southeastcontainer"> + <div id="loginbox" class="box"> + <script type="text/javascript"> + <?php + if (!isset($_SESSION['logged_in']) || !$_SESSION['logged_in']) { + echo 'showFFLogin();'; + } else { + echo 'showFFLogout("'.$_SESSION['username'].'");'; + } + ?>11 + </script> + </div> + <div id="addressbox" class="box"> + <b>Adresse suchen (Strassenname Nr. <, Ort>):</b> + <form action="#" onsubmit="showAddress(this.address.value); return false"> + <p> + <input type="text" size="35" name="address" value="Lendkai 1" /> + <input type="submit" value="Suchen" /> + </p> + </form> + </div> + </div> + </body> +</html> |