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

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

GMarker title is broken. Save commit.

  • Property svn:eol-style set to native
File size: 2.0 KB
RevLine 
[7767]1<?php
[7770]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{
[7770]47$markers = get_node_array($config['root']."/map/inc/example.kml");
48
[7782]49printf($markers[5]['description']);
50
[7735]51 if($view == "beheerder")//Display part for beheerder view of a single node
[7734]52 {
[7769]53 echo <<<EOF
54 <div id="nodeinfo">
55
56 </div>
57 <div id="timestamp">
58 Laatste update: 15:42 <br/>
59 Do 25 maart
60 </div>
61EOF;
[7734]62 }
[7735]63 elseif($view == "gebruiker")//Display part for gebruiker view of a single node
[7734]64 {
[7769]65 echo <<<EOF
66 <div id="nodeinfo">
67 <h1>Nodenaam</h1>
68 <h2>
69 Locatie: Oude Adeweg Leiderdorp <br/>
70 Meer info: <br/>
71 >>>>>>: <br/>
72 >>>>>>: <br/>
73 >>>>>>: <br/>
74 >>>>>>: <br/>
75
76 GEBRUIKERSVIEW
77 </h2>
78 </div>
79 <div id="timestamp">
80 Laatste update: 15:42 <br/>
81 Do 25 maart
82 </div>
83EOF;
[7734]84 }
85}
86elseif($_GET['type'] == "cluster")
87{
[7738]88 $markerTitles = unserialize($_GET['markers']);
89
90 echo <<<EOF
91 <div id="nodeinfo">
92 <h1>Nodes:</h1>
93 <h2>
94 Lijst met nodes in deze cluster<br/>
[7756]95 <div id="clusterlist$selected">
[7738]96 <select multiple>
97EOF;
98 foreach($markerTitles as $marker)
[7734]99 {
[7738]100 echo "<option value='".$marker."'>".$marker."</option>";
[7734]101 }
[7738]102
103 echo <<<EOF
104 </select><br/>
[7734]105 </div>
[7738]106 </h2>
107 </div>
108 <div id="timestamp">
109 Laatste update: 15:42 <br/>
110 Do 25 maart
111 </div>
[7734]112EOF;
113}
[7756]114?>
Note: See TracBrowser for help on using the repository browser.