Changeset 7842
- Timestamp:
- Apr 18, 2010, 10:56:54 PM (15 years ago)
- Location:
- trunk/src
- Files:
-
- 7 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/config.php
r7838 r7842 29 29 */ 30 30 $config['root'] = dirname(__FILE__); 31 $config['root_class'] = $config['root'] . '/inc/'; 31 $config['url'] = $_SERVER['HTTP_HOST']; 32 $config['uri'] = $_SERVER['REQUEST_URI']; 32 33 $config['file_init'] = 'init.php'; 33 34 … … 35 36 * Placemark settings. Which icons do you want to use 36 37 */ 37 $config['node_green'] = 'http:// dellphi.wirelessleiden.nl/nodemap/img/sleutelGroen.png';38 $config['node_orange'] = 'http:// dellphi.wirelessleiden.nl/nodemap/img/sleutelOranje.png';39 $config['node_red'] = 'http:// dellphi.wirelessleiden.nl/nodemap/img/sleutelRood.png';38 $config['node_green'] = 'http://' . $config['url'] . $config['uri'] . '/img/sleutelGroen.png'; 39 $config['node_orange'] = 'http://' . $config['url'] . $config['uri'] . '/img/sleutelOranje.png'; 40 $config['node_red'] = 'http://' . $config['url'] . $config['uri'] . '/img/sleutelRood.png'; 40 41 $config['line_black'] = '#66000000'; 41 42 … … 45 46 */ 46 47 $config['require'] = array(); 47 $config['require'][] = $config['root _class'] . 'ErrorHandler.php';48 $config['require'][] = $config['root _class'] . 'LogHandler.class.php';49 $config['require'][] = $config['root _class'] . 'FileHandler.class.php';50 $config['require'][] = $config['root _class'] . 'KMLFile.class.php';51 $config['require'][] = $config['root _class'] . 'KMLNode.class.php';52 $config['require'][] = $config['root _class'] . 'KMLLine.class.php';53 $config['require'][] = $config['root _class'] . 'Network.class.php';54 $config['require'][] = $config['root _class'] . 'NetworkList.class.php';48 $config['require'][] = $config['root'] . '/inc/ErrorHandler.php'; 49 $config['require'][] = $config['root'] . '/inc/LogHandler.class.php'; 50 $config['require'][] = $config['root'] . '/inc/FileHandler.class.php'; 51 $config['require'][] = $config['root'] . '/inc/KMLFile.class.php'; 52 $config['require'][] = $config['root'] . '/inc/KMLNode.class.php'; 53 $config['require'][] = $config['root'] . '/inc/KMLLine.class.php'; 54 $config['require'][] = $config['root'] . '/inc/Network.class.php'; 55 $config['require'][] = $config['root'] . '/inc/NetworkList.class.php'; 55 56 56 57 $config['googlekey'] = array(); … … 62 63 */ 63 64 $time = mktime() - (mktime() % 300); 64 $config['kml_file'] = ' kml.php?time=' . $time;65 $config['kml_file'] = 'http://' . $config['url'] . $config['uri'] . '/kml.php?time=' . $time; 65 66 // Should be something like: 66 67 // $config['kml_file'] = $config['root'] . '/kml.php?time=%TIMESTAMP%'; -
trunk/src/inc/LogHandler.class.php
r7803 r7842 118 118 if ($logno <= LOG_LEVEL_MAIL) { 119 119 global $config; 120 mail($config['mail'], 'Nodemap error', $errorString);120 @mail($config['mail'], 'Nodemap error', $errorString); 121 121 } 122 122 } -
trunk/src/map/inc/kmlHandler.php
r7827 r7842 4 4 { 5 5 //Check if the file exists, if it does we load it. If it doesn't we exit and return an error message 6 if (file_exists($file)) 7 { 8 $xml = simplexml_load_file($file); 9 } 10 else 11 { 12 exit('Failed to open'.$file); 6 try { 7 $xml = simplexml_load_file(rawurlencode($file)); 8 } catch (Exception $e) { 9 trigger_error(SYSLOG_CRIT, 'Failed to open KML file: ' . $file, __FILE__, __LINE__); 13 10 } 14 11
Note:
See TracChangeset
for help on using the changeset viewer.