$dwcaHandler->setIncludeImgs(0); $dwcaHandler->addCondition('decimallatitude', 'NULL'); $dwcaHandler->addCondition('decimallongitude', 'NULL'); $dwcaHandler->addCondition('catalognumber', 'NOTNULL'); $dwcaHandler->addCondition('locality', 'NOTNULL'); if ($processingStatus) { $dwcaHandler->addCondition('processingstatus', 'EQUALS', $processingStatus); } if ($customField1) { $dwcaHandler->addCondition($customField1, $_POST['ct1'], $_POST['cv1']); } if ($customField2) { $dwcaHandler->addCondition($customField2, $_POST['ct2'], $_POST['cv2']); } //Set GeoLocate CoGe variables $dwcaHandler->setGeolocateVariables(array('cogecomm' => $_POST['cogecomm'], 'cogename' => $_POST['cogename'], 'cogedescr' => $_POST['cogedescr'])); //Set direct path to file $tPath = $SERVER_ROOT; if (substr($tPath, -1) != '/' && substr($tPath, -1) != '\\') { $tPath .= '/'; } $pathFrag = 'temp/data/geolocate/'; $tPath .= $pathFrag; $dwcaHandler->setTargetPath($tPath); $cnt = $dwcaHandler->getOccurrenceCnt(); $fileName = 'CoGe' . '_' . time(); $path = $dwcaHandler->createDwcArchive($fileName); //Set URL path to file $urlPrefix = "http://"; if (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off' || $_SERVER['SERVER_PORT'] == 443) { $urlPrefix = "https://";