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

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

Edited location of the kml file in config. kmlHandler.php now also gets the data from <data> tags in kml. the markerArray still has to be filled with data. Demo is on map showing name and location. Text size etc still has to fixed.

  • Property svn:eol-style set to native
File size: 2.2 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['name'] == $_GET['name'])
53 {
54 $name = $marker['name'];
55 $location = $marker['location'];
56 }
57}
58
59 if($view == "beheerder")//Display part for beheerder view of a single node
60 {
61 echo <<<EOF
62 <div id='nodeinfo'>
63 {$name}<br/>
64 Locatie: {$location}
65 </div>
66 <div id="timestamp">
67 Laatste update: 15:42 <br/>
68 Do 25 maart
69 </div>
70EOF;
71 }
72 elseif($view == "gebruiker")//Display part for gebruiker view of a single node
73 {
74 echo <<<EOF
75 <div id="nodeinfo">
76 <h1>Nodenaam</h1>
77 <h2>
78 Locatie: Oude Adeweg Leiderdorp <br/>
79 Meer info: <br/>
80 >>>>>>: <br/>
81 >>>>>>: <br/>
82 >>>>>>: <br/>
83 >>>>>>: <br/>
84
85 GEBRUIKERSVIEW
86 </h2>
87 </div>
88 <div id="timestamp">
89 Laatste update: 15:42 <br/>
90 Do 25 maart
91 </div>
92EOF;
93 }
94}
95elseif($_GET['type'] == "cluster")
96{
97 $markerTitles = unserialize($_GET['markers']);
98
99 echo <<<EOF
100 <div id="nodeinfo">
101 <h1>Nodes:</h1>
102 <h2>
103 Lijst met nodes in deze cluster<br/>
104 <div id="clusterlist$selected">
105 <select multiple>
106EOF;
107 foreach($markerTitles as $marker)
108 {
109 echo "<option value='".$marker."'>".$marker."</option>";
110 }
111
112 echo <<<EOF
113 </select><br/>
114 </div>
115 </h2>
116 </div>
117 <div id="timestamp">
118 Laatste update: 15:42 <br/>
119 Do 25 maart
120 </div>
121EOF;
122}
123?>
Note: See TracBrowser for help on using the repository browser.