コード例 #1
0
        $dwcaHandler->setCharSetOut('UTF-8');
        $dwcaHandler->setSchemaType('coge');
        $dwcaHandler->setExtended(false);
        $dwcaHandler->setDelimiter('csv');
        $dwcaHandler->setVerbose(0);
        $dwcaHandler->setRedactLocalities(0);
        $dwcaHandler->setIncludeDets(0);
        $dwcaHandler->setIncludeImgs(0);
        $dwcaHandler->addCondition('decimallatitude', 'NULL');
        $dwcaHandler->addCondition('decimallongitude', 'NULL');
        $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']);
        }
        $tPath = $SERVER_ROOT;
        if (substr($tPath, -1) != '/' && substr($tPath, -1) != '\\') {
            $tPath .= '/';
        }
        $tPath .= "temp/data/geolocate/";
        $dwcaHandler->setTargetPath($tPath);
        $retArr['cnt'] = $dwcaHandler->getOccurrenceCnt();
        $retArr['path'] = $dwcaHandler->createDwcArchive('CoGeCommunityFile' . '_' . time());
    }
}
echo json_encode($retArr);
コード例 #2
0
ファイル: coge_getCount.php プロジェクト: Symbiota/Symbiota
$collid = $_REQUEST["collid"];
$cntStr = '';
if ($collid && is_numeric($collid)) {
    $isEditor = false;
    if ($IS_ADMIN || array_key_exists("CollAdmin", $USER_RIGHTS) && in_array($collid, $USER_RIGHTS["CollAdmin"])) {
        $isEditor = true;
    }
    if ($isEditor) {
        $processingStatus = array_key_exists('ps', $_REQUEST) ? $_REQUEST['ps'] : '';
        $customField1 = array_key_exists('cf1', $_POST) ? $_POST['cf1'] : '';
        $customField2 = array_key_exists('cf2', $_POST) ? $_POST['cf2'] : '';
        $dwcaHandler = new DwcArchiverOccurrence();
        $dwcaHandler->setCollArr($collid);
        $dwcaHandler->setVerbose(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']);
        }
        $cntStr = $dwcaHandler->getOccurrenceCnt();
    }
}
echo json_encode($cntStr);
コード例 #3
0
ファイル: exporter.php プロジェクト: Symbiota/Symbiota
									</tr>
									<tr>
										<td colspan="2">
											<fieldset style="margin:10px;padding:20px;">
												<legend><b>CoGe Status</b></legend>
												<div>
													<b>Match Count:</b> 
													<?php 
            $dwcaHandler = new DwcArchiverOccurrence();
            $dwcaHandler->setCollArr($collid);
            $dwcaHandler->setVerbose(0);
            $dwcaHandler->addCondition('decimallatitude', 'NULL');
            $dwcaHandler->addCondition('decimallongitude', 'NULL');
            $dwcaHandler->addCondition('locality', 'NOTNULL');
            $dwcaHandler->addCondition('catalognumber', 'NOTNULL');
            echo '<span id="countdiv">' . $dwcaHandler->getOccurrenceCnt() . '</span> records';
            ?>
													<span id="recalspan" style="color:orange;display:none;">recalculating... <img src="../../images/workingcircle.gif" style="width:13px;" /></span>
												</div>
												<div>
													<b>CoGe Authentication:</b>
													<span id="coge-status" style="width:150px;color:red;">Disconnected</span>
													<span style="margin-left:40px"><input type="button" name="cogeCheckStatusButton" value="Check Status" onclick="cogeCheckAuthentication()" /></span>
													<span style="margin-left:40px"><a href="https://www.museum.tulane.edu/coge/" target="_blank" onclick="startAuthMonitoring()">Login to CoGe</a></span>
												</div>
											</fieldset>
											<fieldset id="coge-communities" style="margin:10px;padding:10px;">
												<legend style="font-weight:bold">Available Communities</legend>
												<div style="margin:10px;">
													To import data into an existing geoLocate community, login to GeoLocate (see above), select the target community, 
													provide a required identifier, an optional descriptive name, and then click the Push Data to GeoLocate button.