require_once 'geograph/image.inc.php'; if ($_SERVER['REMOTE_ADDR'] != $_SERVER['SERVER_ADDR'] && strpos($_SERVER['HTTP_X_FORWARDED_FOR'], $CONF['server_ip']) !== 0) { init_session(); $USER->hasPerm("mapmod") || $USER->mustHavePerm("admin"); } $smarty = new GeographPage(); if (isset($_GET['deleteInvalidateAll']) && $USER->hasPerm('admin')) { $mosaic = new GeographMapMosaic(); $mosaic->deleteAndInvalidateAll(); //redirect to prevent page refreshes of this url header("Location:http://{$_SERVER['HTTP_HOST']}/admin/recreatemaps.php"); exit; } if (isset($_GET['invalidateAll']) && $USER->hasPerm('admin')) { $mosaic = new GeographMapMosaic(); $mosaic->invalidateAll(); //redirect to prevent page refreshes of this url header("Location:http://{$_SERVER['HTTP_HOST']}/admin/recreatemaps.php"); exit; } if (isset($_GET['expireAll']) && $USER->hasPerm('admin')) { $mosaic = new GeographMapMosaic(); $mosaic->expireAll($_GET['expireAll'] ? true : false); $smarty->clear_cache(null, 'mapbrowse'); //redirect to prevent page refreshes of this url header("Location:http://{$_SERVER['HTTP_HOST']}/admin/recreatemaps.php"); exit; } $db = NewADOConnection($GLOBALS['DSN']); if (isset($_GET['coast_GB_40'])) { //invalidate coast'ish' GB squares at thumbnail level!