[7767] | 1 | <?php
|
---|
[7769] | 2 | require_once("inc/kmlHandler.php");
|
---|
[7767] | 3 | require_once("../config.php");
|
---|
[7769] | 4 | require_once("inc/node_info_start.php");
|
---|
[7725] | 5 |
|
---|
[7769] | 6 | #getting array from kmlHandler
|
---|
[7784] | 7 | $markers = get_node_array($config['kml_file']);
|
---|
[7767] | 8 |
|
---|
[7725] | 9 | # Key is defined to be the domain name if exists
|
---|
| 10 | $apikey = $config['googlekey']['default'];
|
---|
| 11 | $servername = $_SERVER['SERVER_NAME'];
|
---|
| 12 |
|
---|
| 13 | # Little hack, does not work with foo.co.uk domains
|
---|
| 14 | $servername = implode('.',array_slice(explode('.',$servername),-2));
|
---|
| 15 | if (array_key_exists($servername,$config['googlekey'])) {
|
---|
| 16 | $apikey = $config['googlekey'][$servername];
|
---|
| 17 | }
|
---|
| 18 | ?>
|
---|
| 19 |
|
---|
| 20 | <html>
|
---|
| 21 | <head>
|
---|
| 22 | <title>Nodemap Wireless Leiden</title>
|
---|
| 23 | <!-- External stylesheet for all browsers -->
|
---|
| 24 | <link href="style/stylesheet.css" rel="stylesheet" type="text/css">
|
---|
| 25 | <!-- Using stylesheet2.css when browser is any version of Microsoft Internet Explorer -->
|
---|
| 26 | <!--[if IE]>
|
---|
| 27 | <link href="style/stylesheet2.css" rel="stylesheet" type="text/css">
|
---|
| 28 | <![endif]-->
|
---|
| 29 |
|
---|
[7731] | 30 | <!-- Make our $marker[] array from kmlHandler available to javascript in JSON (No idea on how to this another less ugle way)-->
|
---|
[7725] | 31 | <script>
|
---|
| 32 | var markers = <?php echo json_encode($markers); ?>;
|
---|
| 33 | </script>
|
---|
| 34 |
|
---|
| 35 | <!-- Loading in the google-api -->
|
---|
| 36 | <script src="http://maps.google.com/maps?file=api&v=2&key=<?php print $apikey;?>" type="text/javascript"></script>
|
---|
[7731] | 37 | <!-- Loading in the markerClusterer that will handle the clustering of markers. -->
|
---|
| 38 | <script type="text/javascript" src="inc/markerClusterer.js"></script>
|
---|
[7725] | 39 | <!-- Loading in the javascript that will add the map into #mapcanvas -->
|
---|
| 40 | <script type="text/javascript" src="inc/nodemapWL.js"></script>
|
---|
| 41 | <script type="text/javascript" src="inc/overlay.js"></script>
|
---|
[7779] | 42 | <script type="text/javascript" src="inc/iconStyles.js"></script>
|
---|
[7725] | 43 |
|
---|
| 44 | <!-- Loading in the javascript that handles the switching between gebruiker and beheerder -->
|
---|
| 45 | <script type="text/javascript" src="inc/gebruiker_beheerder_switch.js"></script>
|
---|
| 46 | </head>
|
---|
| 47 | <body>
|
---|
| 48 | <!-- Mainwrapper contains all content on the page -->
|
---|
| 49 | <div id="mainwrapper">
|
---|
| 50 | <!-- Mapcanvas is the container where the map will be put in. Height and width of map is specified by size of the div -->
|
---|
| 51 | <div id="mapcanvas">
|
---|
| 52 | <!-- Create the map using the intitialize_map() function from nodemapWL.js -->
|
---|
| 53 | <script type="text/javascript">initialize_map();</script>
|
---|
| 54 | <!--<script type="text/javascript">nodeAdd();</script>-->
|
---|
| 55 | </div>
|
---|
| 56 | <div id="infowrapper">
|
---|
| 57 | <!-- Top information space -->
|
---|
| 58 | <div id="infotop">
|
---|
[7756] | 59 | <!-- Calling on the node information from an external php file. inc/node_info.php -->
|
---|
[7769] | 60 | <?php node_info_start(); ?>
|
---|
[7756] | 61 | </div>
|
---|
[7725] | 62 |
|
---|
| 63 | <!-- Bottom information space -->
|
---|
| 64 | <div id="infobottom">
|
---|
| 65 | <!-- This contains the searchbox of the searchtool, and the send button for it -->
|
---|
| 66 | <div id="searchbox">
|
---|
| 67 | <form>
|
---|
| 68 | <input type="text" name="naam" size="18" maxlength="30"><input type="button" name="knop" value=" > ">
|
---|
| 69 | </form>
|
---|
| 70 | </div>
|
---|
| 71 | <!-- This contains the list of nodes, in future the searchbox will make it possible to filter this list -->
|
---|
| 72 | <div id="searchlist">
|
---|
| 73 | <select multiple>
|
---|
| 74 | <option value="node1">Node 1 Leiden</option>
|
---|
| 75 | <option value="node2">Node 2 Leiden</option>
|
---|
| 76 | <option value="node3">Node 3 Leiden</option>
|
---|
| 77 | <option value="node4">Node 4 Leiden</option>
|
---|
| 78 | <option value="node5">Node 5 Leiden</option>
|
---|
| 79 | <option value="node6">Node 6 Leiden</option>
|
---|
| 80 | <option value="node7">Node 7 Leiden</option>
|
---|
| 81 | <option value="node8">Node 8 Leiden</option>
|
---|
| 82 | <option value="node9">Node 9 Leiden</option>
|
---|
| 83 | <option value="node10">Node 10 Leiden</option>
|
---|
| 84 | </select>
|
---|
| 85 | </div>
|
---|
| 86 | </div>
|
---|
| 87 | <!-- The buttons under the searchframe. In a table for positioning. -->
|
---|
| 88 | <div id="userpick">
|
---|
| 89 | <table>
|
---|
| 90 | <tr><!-- onclick events activate functions from within inc/gebruiker_beheerder_switch.js which load in the selected view with node_info.php -->
|
---|
| 91 | <td><input type="button" value="Gebruiker" onclick="switchGebruiker();"></td>
|
---|
| 92 | <td><input type="button" value="Beheerder" onclick="switchBeheerder();"></td>
|
---|
| 93 | </tr>
|
---|
| 94 | </table>
|
---|
| 95 | </div>
|
---|
| 96 | </div>
|
---|
| 97 |
|
---|
| 98 | <!-- General functions under the map -->
|
---|
| 99 | <div id="navigation">
|
---|
| 100 | <form>
|
---|
| 101 | <table>
|
---|
| 102 | <tr>
|
---|
| 103 | <!-- First colum -->
|
---|
| 104 | <td>
|
---|
| 105 | <input type="checkbox" value="shownodes" onclick="toggleMyKml();" checked="checked">Toon nodes
|
---|
| 106 | </td>
|
---|
| 107 | <!-- Second colum -->
|
---|
| 108 | <td>
|
---|
| 109 | <input type="checkbox" value="showrange">Toon dekking <br/>
|
---|
| 110 | <input type="checkbox" value="showtraffic">Toon dataverkeer
|
---|
| 111 | </td>
|
---|
| 112 | </tr>
|
---|
| 113 | </table>
|
---|
| 114 | </form>
|
---|
| 115 | </div>
|
---|
| 116 | </div>
|
---|
| 117 | </body>
|
---|
| 118 | </html>
|
---|