Example #1
0
// HTTP 1.0.
header('Expires: 0');
// Proxies.
ini_set('max_execution_time', 180);
//180 seconds = 3 minutes
$taxonValue = array_key_exists('taxon', $_REQUEST) ? $_REQUEST['taxon'] : 0;
$clid = array_key_exists('clid', $_REQUEST) ? $_REQUEST['clid'] : 0;
$mapType = array_key_exists('maptype', $_REQUEST) ? $_REQUEST['maptype'] : 0;
$taxonAuthorityId = array_key_exists('taxonfilter', $_REQUEST) ? $_REQUEST['taxonfilter'] : 1;
$stArrJson = array_key_exists("starr", $_REQUEST) ? $_REQUEST["starr"] : '';
$catId = array_key_exists("catid", $_REQUEST) ? $_REQUEST["catid"] : 0;
if (!$catId && isset($DEFAULTCATID) && $DEFAULTCATID) {
    $catId = $DEFAULTCATID;
}
$tabIndex = array_key_exists("tabindex", $_REQUEST) ? $_REQUEST["tabindex"] : 1;
$mapManager = new MapInterfaceManager();
$queryShape = '';
$showTaxaBut = 1;
$collList = $mapManager->getFullCollectionList($catId);
$specArr = isset($collList['spec']) ? $collList['spec'] : null;
$obsArr = isset($collList['obs']) ? $collList['obs'] : null;
$mapManager->setFieldArr(0);
$mapWhere = '';
$genObs = $mapManager->getGenObsInfo();
$tArr = array();
$coordExist = false;
$spatial = false;
$iconKeys = array();
$coordArr = array();
$stArr = array();
$previousCriteria = array();
Example #2
0
include_once $serverRoot . '/classes/MapInterfaceManager.php';
header("Content-Type: text/html; charset=" . $charset);
header('Cache-Control: no-cache, no-store, must-revalidate');
// HTTP 1.1.
header('Pragma: no-cache');
// HTTP 1.0.
header('Expires: 0');
// Proxies.
$type = array_key_exists("kmltype", $_POST) ? $_POST["kmltype"] : '';
$selections = array_key_exists('selectionskml', $_POST) ? $_POST['selectionskml'] : 0;
$stArrJson = array_key_exists("starrkml", $_POST) ? $_POST["starrkml"] : '';
$limit = array_key_exists("kmlreclimit", $_POST) ? $_POST["kmlreclimit"] : '';
$stArr = array();
if ($stArrJson) {
    $stArr = json_decode($stArrJson, true);
}
$mapManager = new MapInterfaceManager();
$fullCollList = $mapManager->getFullCollArr($stArr);
if ($type == 'selection' || $type == 'dsselectionquery') {
    $coordArr = $mapManager->getSelectionGeoCoords($selections);
}
if ($type == 'fullquery') {
    $mapManager->setSearchTermsArr($stArr);
    $mapWhere = $mapManager->getSqlWhere();
    $coordArr = $mapManager->getCollGeoCoords(0, false, $mapWhere, $limit);
}
$kmlFilePath = $mapManager->writeKMLFile($coordArr);
?>


   
include_once $serverRoot . '/classes/MapInterfaceManager.php';
header("Content-Type: text/html; charset=" . $charset);
$cntPerPage = array_key_exists("cntperpage", $_REQUEST) ? $_REQUEST["cntperpage"] : 100;
$pageNumber = array_key_exists("page", $_REQUEST) ? $_REQUEST["page"] : 1;
$stArrJson = array_key_exists("starr", $_REQUEST) ? $_REQUEST["starr"] : '';
$selArrJson = array_key_exists("selected", $_REQUEST) ? $_REQUEST["selected"] : '';
$stArr = array();
$selections = array();
$allSelected = false;
if ($stArrJson) {
    $stArr = json_decode($stArrJson, true);
}
if ($selArrJson) {
    $selections = json_decode($selArrJson, true);
}
$mapManager = new MapInterfaceManager();
$mapManager->setSearchTermsArr($stArr);
$mapWhere = $mapManager->getSqlWhere();
$occArr = $mapManager->getMapSpecimenArr($pageNumber, $cntPerPage, $mapWhere);
$recordCnt = $mapManager->getRecordCnt();
$pageOccids = array_keys($occArr);
if ($selections) {
    if (!array_diff($pageOccids, $selections)) {
        $allSelected = true;
    }
}
$recordListHtml = '';
$lastPage = (int) ($recordCnt / $cntPerPage) + 1;
$startPage = $pageNumber > 4 ? $pageNumber - 4 : 1;
if ($lastPage > $startPage) {
    $endPage = $lastPage > $startPage + 9 ? $startPage + 9 : $lastPage;
<?php

include_once '../../../config/symbini.php';
include_once $serverRoot . '/classes/MapInterfaceManager.php';
include_once $serverRoot . '/classes/OccurrenceDataset.php';
header("Content-Type: text/html; charset=" . $charset);
$uid = array_key_exists("uid", $_REQUEST) ? $_REQUEST["uid"] : '';
$action = array_key_exists("action", $_REQUEST) ? $_REQUEST["action"] : '';
$newName = array_key_exists("newname", $_REQUEST) ? $_REQUEST["newname"] : '';
$newNotes = array_key_exists("newnotes", $_REQUEST) ? $_REQUEST["newnotes"] : '';
$dsId = array_key_exists("dsid", $_REQUEST) ? $_REQUEST["dsid"] : '';
$selections = array_key_exists('selections', $_REQUEST) ? $_REQUEST['selections'] : 0;
$selset = array_key_exists('selset', $_REQUEST) ? $_REQUEST['selset'] : 0;
$mapManager = new MapInterfaceManager();
$datasetManager = new OccurrenceDataset();
if ($action == "loadlist") {
    $recordsetlist = $mapManager->getPersonalRecordsets($uid);
    $listHtml = '';
    if ($recordsetlist) {
        foreach ($recordsetlist as $recList => $recSet) {
            $roleStr = "'" . $recSet['role'] . "'";
            $listHtml .= '<input data-role="none" type="radio" name="dsid" value="' . $recSet['datasetid'] . '" onchange="loadRecordset(' . $recSet['datasetid'] . ',' . $roleStr . ');" ' . ($recSet['datasetid'] == $selset ? 'checked' : '') . '> <a href="../datasets/index.php" target="_blank" onclick="">' . $recSet['name'] . ($recSet['role'] == "DatasetReader" ? " (read-only)" : "") . '</a><br />';
        }
    }
    echo $listHtml;
}
if ($action == "createset") {
    $newId = '';
    $datasetManager->createDataset($newName, $newNotes, $uid);
    $newId = $datasetManager->getDsId();
    echo $newId;
Example #5
0
<?php

include_once '../../config/symbini.php';
header("Content-Type: text/html; charset=" . $charset);
include_once $serverRoot . '/classes/MapInterfaceManager.php';
header("Content-Type: text/html; charset=" . $charset);
header('Cache-Control: no-cache, no-store, must-revalidate');
// HTTP 1.1.
header('Pragma: no-cache');
// HTTP 1.0.
header('Expires: 0');
// Proxies.
$selections = array_key_exists('selections', $_REQUEST) ? $_REQUEST['selections'] : 0;
$mapManager = new MapInterfaceManager();
$gpxText = $mapManager->getGpxText($selections);
$fileName = time();
?>

<html>
	<head>
		<title><?php 
echo $defaultTitle;
?>
 - Garmin Downloader</title>
		<link type="text/css" href="../../css/base.css?<?php 
echo $CSS_VERSION;
?>
" rel="stylesheet" />
		<link type="text/css" href="../../css/main.css?<?php 
echo $CSS_VERSION;
?>
Example #6
0
    if (array_key_exists('RareSppReader', $userRights)) {
        $rareReaderArr = array_unique(array_merge($rareReaderArr, $userRights['RareSppReader']));
    }
}
//Is an occurrence download
$dwcaHandler = new DwcArchiverOccurrence();
$dwcaHandler->setCharSetOut($cSet);
$dwcaHandler->setSchemaType($schema);
$dwcaHandler->setExtended($extended);
$dwcaHandler->setDelimiter($format);
$dwcaHandler->setVerbose(0);
$dwcaHandler->setRedactLocalities($redactLocalities);
if ($rareReaderArr) {
    $dwcaHandler->setRareReaderArr($rareReaderArr);
}
$mapManager = new MapInterfaceManager();
if ($type == 'selection' || $type == 'dsselectionquery') {
    $selections = preg_match('#\\[(.*?)\\]#', $selections, $match);
    $selections = $match[1];
    $mapWhere = 'WHERE o.occid IN(' . $selections . ') ';
}
if ($type == 'fullquery') {
    $mapManager->setSearchTermsArr($stArr);
    $mapWhere = $mapManager->getSqlWhere();
}
$dwcaHandler->setCustomWhereSql($mapWhere);
$outputFile = null;
if ($zip) {
    //Ouput file is a zip file
    $includeIdent = array_key_exists('identifications', $_POST) ? 1 : 0;
    $dwcaHandler->setIncludeDets($includeIdent);