File';
// If $config is defined, we were called from the Cacti plugin, so auth
// has taken place. In that situation, let them off.
if(true === isset($config)) {
$ENABLED = true;
$fromplug = true;
$myname = 'weathermap-cacti-plugin-editor.php';
$cacti_found = true;
$file_button_text = 'Back To
Cacti';
}
if(false === $ENABLED)
{
print '
The editor has not been enabled yet. You need to set ENABLED=true at the top of editor.php
'; print 'Before you do that, you should consider using <Files> (in Apache) or similar to limit who can access the editor.
'; print "There is more information in the install guide section of the manual.
"; exit(); } // sensible defaults $mapdir='configs'; $cacti_base = '../../'; $cacti_url = '/'; $ignore_cacti=false; $configerror = ''; // these are all set via the Editor Settings dialog, in the editor, now. $use_overlay = false; // set to true to enable experimental overlay showing VIAs $use_relative_overlay = false; // set to true to enable experimental overlay showing relative-positioning $grid_snap_value = 0; // set non-zero to snap to a grid of that spacing if( isset($_COOKIE['wmeditor'])) { $parts = split(":",$_COOKIE['wmeditor']); if( (isset($parts[0])) && (intval($parts[0]) == 1) ) { $use_overlay = true; } if( (isset($parts[1])) && (intval($parts[1]) == 1) ) { $use_relative_overlay = true; } if( (isset($parts[2])) && (intval($parts[2]) != 0) ) { $grid_snap_value = intval($parts[2]); } } chdir(dirname(__FILE__)); if(false === is_writable($mapdir)) { $configerror = 'The map config directory is not writable by the web server user. You will not be able to edit any files until this is corrected. [WMEDIT01]'; } $action = ''; $mapname = ''; $selected = ''; $newaction = ''; $param = ''; $param2 = ''; $log = ''; if(!WM_module_checks()) { print "Required PHP extensions are not present in your mod_php/ISAPI "; print "PHP module. Please check your PHP setup to ensure you have the "; print "GD extension installed and enabled.If you find that the "; print "weathermap tool itself is working, from the command-line or "; print "Cacti poller, then it is possible that you have two different "; print "PHP installations. The Editor uses the same PHP that webpages "; print "on your server use, but the main weathermap tool uses the "; print "command-line PHP interpreter.
"; print "
You should also run check.php to "; print "help make sure that there are no problems.