source: trunk/src/map/inc/node_info.php@ 7767

Last change on this file since 7767 was 7767, checked in by janveeden, 15 years ago
  • Property svn:eol-style set to native
File size: 1.6 KB
RevLine 
[7767]1<?php
2require_once("../../config.php");
3require_once($config['root']."/map/inc/kmlHandler.php");
[7756]4
[7725]5if(isset($_GET['view']))
6{
[7734]7 setcookie("view", $_GET['view']);
[7725]8 $view = $_GET['view'];
9}
10else
11{
[7734]12 if(isset($_COOKIE['view']))
13 {
14 $view = $_COOKIE['view'];
15 }
16 else
17 $view = "gebruiker";
[7725]18}
19
[7756]20if(isset($_GET['sel']))
21{
22 $selected = $_GET['sel'];
23}
24else
25{
26 $selected = "";
27}
28
[7735]29//TYPES of nodes. 'cluster' is a cluster node. 'single' is an individual node.
30if(!isset($_GET['type']))//
[7725]31{
32 echo <<<EOF
[7734]33 <div id="nodeinfo">
34 <b>Mouse over</b> een node voor meer informatie.<br/><br/>
35 <b>Klik</b> op een node om deze te selecteren.<br/><br/>
36 Gebruik de <b>zoekfunctie</b> om de een specifieke node te zoeken.
37 </div>
38 <div id="timestamp">
39 Laatste update: 15:42 <br/>
40 Do 25 maart
41 </div>
[7725]42EOF;
[7734]43
[7725]44}
[7735]45elseif($_GET['type'] == "single") //Info for single nodes is stored here
[7725]46{
[7767]47$markers = getArrayFromKML();
48
[7735]49 if($view == "beheerder")//Display part for beheerder view of a single node
[7734]50 {
[7767]51 print $markers[$_GET['name']]['description'];
52
53
[7734]54 }
[7735]55 elseif($view == "gebruiker")//Display part for gebruiker view of a single node
[7734]56 {
[7767]57
[7734]58 }
59}
60elseif($_GET['type'] == "cluster")
61{
[7738]62 $markerTitles = unserialize($_GET['markers']);
63
64 echo <<<EOF
65 <div id="nodeinfo">
66 <h1>Nodes:</h1>
67 <h2>
68 Lijst met nodes in deze cluster<br/>
[7756]69 <div id="clusterlist$selected">
[7738]70 <select multiple>
71EOF;
72 foreach($markerTitles as $marker)
[7734]73 {
[7738]74 echo "<option value='".$marker."'>".$marker."</option>";
[7734]75 }
[7738]76
77 echo <<<EOF
78 </select><br/>
[7734]79 </div>
[7738]80 </h2>
81 </div>
82 <div id="timestamp">
83 Laatste update: 15:42 <br/>
84 Do 25 maart
85 </div>
[7734]86EOF;
87}
[7756]88?>
Note: See TracBrowser for help on using the repository browser.