Changeset 7702


Ignore:
Timestamp:
Apr 8, 2010, 12:18:53 PM (13 years ago)
Author:
Pieter Naber
Message:

Moved pointer images to config file as example.

Location:
trunk/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/config.php

    r7661 r7702  
    1111$config['node_location_file']   =       'http://watch.wirelessleiden.nl/nagios/export/genesis-nodes.conf';
    1212
     13
    1314/*
    1415 * Global settings
     
    1718$config['folder_class']         = 'inc/';
    1819$config['file_init']            = 'init.php';
     20
     21/*
     22 * Placemark settings. Which icons do you want to use
     23 */
     24$config['placemark_green']      = 'http://www.google.com/intl/en_us/mapfiles/ms/micons/green-dot.png';
     25$config['placemark_orange']     = 'http://www.google.com/intl/en_us/mapfiles/ms/micons/orange-dot.png';
     26$config['placemark_red']        = 'http://www.google.com/intl/en_us/mapfiles/ms/micons/red-dot.png';
    1927
    2028/*
  • trunk/src/inc/KMLFile.class.php

    r7700 r7702  
    55 * Purpose: Creating of editing KML files
    66 */
    7 
    8 define('PLACEMARK_GREEN', 'http://www.google.com/intl/en_us/mapfiles/ms/micons/green-dot.png');
    9 define('PLACEMARK_ORANGE', 'http://www.google.com/intl/en_us/mapfiles/ms/micons/orange-dot.png');
    10 define('PLACEMARK_RED', 'http://www.google.com/intl/en_us/mapfiles/ms/micons/red-dot.png');
    117
    128class KMLFile {
     
    8278                }
    8379
    84                 $toString = str_replace('%PLACEMARK_GREEN%', PLACEMARK_GREEN, $toString);
    85                 $toString = str_replace('%PLACEMARK_ORANGE%', PLACEMARK_ORANGE, $toString);
    86                 $toString = str_replace('%PLACEMARK_RED%', PLACEMARK_RED, $toString);
     80                $toString = str_replace('%PLACEMARK_GREEN%', $config['placemark_green'], $toString);
     81                $toString = str_replace('%PLACEMARK_ORANGE%', $config['placemark_orange'], $toString);
     82                $toString = str_replace('%PLACEMARK_RED%', $config['placemark_red'], $toString);
    8783                $toString = str_replace('%CONTENT%', $placemarkString, $toString);
    8884
  • trunk/src/index.php

    r7692 r7702  
    5353$nodeStatus = new FileHandler($config['node_status_file']);
    5454$kmlFile->parseStatusFile($nodeStatus->getFile());
     55
     56// And echo the result to the screen
    5557echo $kmlFile->toString();
    5658?>
Note: See TracChangeset for help on using the changeset viewer.