* and also uses client auth groups (so changes to readAccess are not a problem) and no need to sql escape things becuase it uses * it's own syntax * - provide ajax list which will print items and allow specific site selections for output */ try { error_reporting(E_ALL ^ E_NOTICE); // report everything except notices ini_set('display_errors', 1); ini_set('log_errors', 1); ini_set('error_log', '../logs/siteSearch.log'); include_once __DIR__ . '/lib/GeoliveHelper.php'; if (GeoliveHelper::ScriptWasAccessedDirectlyFromCommandLine()) { // GeoliveHelper::LoadGeoliveFromCommandLine(); // could run this script from command line. or could // implement asynrounous functions using shell_exec('php '.__FILE__.' ') } elseif (GeoliveHelper::ScriptWasAccessedDirectlyFromUrl()) { if (UrlVar('task') == 'export') { /** * Actually render the kml or gpx file directly to client * this happens when they sumbit the form to a new tab - which directly accesses this file. * at this point joomla is gone which is great becuase I don't want to wait for all the eventhandlers * etc. (now relying on Geolive to provide database access) */ $paArray = UrlVar('paddlingAreas', array()); if (!empty($paArray)) { include_once 'lib/Util.php'; $sitesArray = array(); // I am working on another method called FilteredSiteListInAreas // which will work using Attribute filters - this will hopefully // be more robust and ignore minor spelling differences $siteList = json_decode(UrlVar('siteList', '[]'));