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

Last change on this file since 7823 was 7823, checked in by janveeden, 15 years ago

The famous markers placed in the sea were giving problems on giving info. Fixed now.

  • Property svn:eol-style set to native
File size: 2.1 KB
Line 
1<?php
2require_once("../../config.php");
3require_once($config['root']."/map/inc/kmlHandler.php");
4if(isset($_GET['view']))
5{
6 setcookie("view", $_GET['view']);
7 $view = $_GET['view'];
8}
9else
10{
11 if(isset($_COOKIE['view']))
12 {
13 $view = $_COOKIE['view'];
14 }
15 else
16 $view = "gebruiker";
17}
18
19if(isset($_GET['sel']))
20{
21 $selected = $_GET['sel'];
22}
23else
24{
25 $selected = "";
26}
27
28//TYPES of nodes. 'cluster' is a cluster node. 'single' is an individual node.
29if(!isset($_GET['type']))//
30{
31 echo <<<EOF
32 <div id="nodeinfo">
33 <b>Mouse over</b> een node voor meer informatie.<br/><br/>
34 <b>Klik</b> op een node om deze te selecteren.<br/><br/>
35 Gebruik de <b>zoekfunctie</b> om de een specifieke node te zoeken.
36 </div>
37 <div id="timestamp">
38 Laatste update: 15:42 <br/>
39 Do 25 maart
40 </div>
41EOF;
42
43}
44elseif($_GET['type'] == "single") //Info for single nodes is stored here
45{
46$markers = get_node_array($config['kml_file']);
47
48$description;
49
50foreach($markers as $marker)
51{
52 if(!$marker['location'] == null)
53 {
54 if($marker['name'] == $_GET['name'])
55 {
56 $name = $marker['name'];
57 $location = $marker['location'];
58 }
59 }
60}
61
62 if($view == "beheerder")//Display part for beheerder view of a single node
63 {
64 echo <<<EOF
65 <div id='nodeinfo'>
66 {$name}<br/>
67 Locatie: {$location}
68 </div>
69 <div id="timestamp">
70 Laatste update: 15:42 <br/>
71 Do 25 maart
72 </div>
73EOF;
74 }
75 elseif($view == "gebruiker")//Display part for gebruiker view of a single node
76 {
77 echo <<<EOF
78 <div id='nodeinfo'>
79 {$name}<br/>
80 Locatie: {$location}
81 </div>
82 <div id="timestamp">
83 Laatste update: 15:42 <br/>
84 Do 25 maart
85 </div>
86EOF;
87 }
88}
89elseif($_GET['type'] == "cluster")
90{
91 $markerTitles = unserialize($_GET['markers']);
92
93 echo <<<EOF
94 <div id="nodeinfo">
95 <h1>Nodes:</h1>
96 <h2>
97 Lijst met nodes in deze cluster<br/>
98 <div id="clusterlist$selected" >
99 <select multiple onchange='goToMarker(this.options[this.selectedIndex].text)'>
100EOF;
101 foreach($markerTitles as $marker)
102 {
103 echo "<option value='".$marker."'>".$marker."</option>";
104 }
105
106 echo <<<EOF
107 </select><br/>
108 </div>
109 </h2>
110 </div>
111 <div id="timestamp">
112 Laatste update: 15:42 <br/>
113 Do 25 maart
114 </div>
115EOF;
116}
117?>
Note: See TracBrowser for help on using the repository browser.