header('Content-Type: application/gpx+xml;');
             header('Content-disposition: filename="bcmtn-export-gpx-' . date('Y-m-d') . '.gpx"');
             include_once 'lib/GpxWriter.php';
             $gpxWriter = new GpxWriter();
             echo $gpxWriter->writeGpx($sitesArray);
         }
     }
     return;
 }
 include_once 'lib/AjaxRequest.php';
 if (UrlVar('task') == 'list_sites') {
     AjaxRequest::ListSites();
     return;
 }
 if (UrlVar('task') == 'count_sites') {
     AjaxRequest::CountSites();
     return;
 }
 if (UrlVar('task') == 'site_articles') {
     AjaxRequest::ArticlesForSites();
     return;
 }
 if (UrlVar('task') == 'unit_test') {
     if (Core::Client()->isAdmin()) {
         // TODO: make a phpunit.xml and better unit tests
         // then phpunit --configuration phpunit.xml
         print_r(htmlspecialchars(shell_exec('/usr/local/bin/phpunit ' . escapeshellarg(__DIR__ . DS . 'lib' . DS . 'UtilTest') . ' 2>&1')));
     }
     return;
 }
 /*