Last change
on this file since 7786 was 7765, checked in by Pieter Naber, 15 years ago |
Fixed loghandler so index.php outputs a KML valid file. Also added the possibility to add lines.
|
-
Property svn:eol-style
set to
native
|
File size:
972 bytes
|
Line | |
---|
1 | <?php
|
---|
2 | /*
|
---|
3 | * Project: NodeMap2.0
|
---|
4 | * File: index.php
|
---|
5 | * Purpose: Main index file of application
|
---|
6 | */
|
---|
7 |
|
---|
8 | require_once('config.php');
|
---|
9 | require_once($config['file_init']);
|
---|
10 |
|
---|
11 | // Make it parse properly within Firefox so that it will display a DOM tree
|
---|
12 | header('Content-Type: text/xml');
|
---|
13 | echo '<?xml version="1.0" encoding="UTF-8"?>';
|
---|
14 |
|
---|
15 | // Let's try reading from files and parsing the data in the files.
|
---|
16 | // First off, we create a new KMLFile object
|
---|
17 | $kmlFile = new KMLFile();
|
---|
18 |
|
---|
19 | // Let's try to read the node location file
|
---|
20 | $nodeLocation = new FileHandler($config['node_location_file'], 'r');
|
---|
21 | $kmlFile->parseLocationFile($nodeLocation->read());
|
---|
22 |
|
---|
23 | // Let's try to read the node status file
|
---|
24 | $nodeStatus = new FileHandler($config['node_status_file'], 'r');
|
---|
25 | $kmlFile->parseStatusFile($nodeStatus->read());
|
---|
26 |
|
---|
27 | if (isset($_GET['write']) && $_GET['write'] == true) {
|
---|
28 | // TODO: David: Write the KML file to a folder with date stamp
|
---|
29 | }
|
---|
30 |
|
---|
31 | // And echo the result to the screen
|
---|
32 | echo $kmlFile->toString();
|
---|
33 | ?>
|
---|
Note:
See
TracBrowser
for help on using the repository browser.