<?php include_once '../config/symbini.php'; include_once $serverRoot . '/classes/OccurrenceListManager.php'; header("Content-Type: text/html; charset=" . $charset); $tabIndex = array_key_exists("tabindex", $_REQUEST) ? $_REQUEST["tabindex"] : 1; $taxonFilter = array_key_exists("taxonfilter", $_REQUEST) ? $_REQUEST["taxonfilter"] : 0; $cntPerPage = array_key_exists("cntperpage", $_REQUEST) ? $_REQUEST["cntperpage"] : 100; $pageNumber = array_key_exists("page", $_REQUEST) ? $_REQUEST["page"] : 1; $collManager = new OccurrenceListManager(); $specimenArray = $collManager->getSpecimenMap($pageNumber, $cntPerPage); //Array(IID,Array(fieldName,value)) $occFieldArr = array('occurrenceid', 'family', 'scientificname', 'sciname', 'tidinterpreted', 'scientificnameauthorship', 'identifiedby', 'dateidentified', 'identificationreferences', 'identificationremarks', 'taxonremarks', 'identificationqualifier', 'typestatus', 'recordedby', 'recordnumber', 'associatedcollectors', 'eventdate', 'year', 'month', 'day', 'startdayofyear', 'enddayofyear', 'verbatimeventdate', 'habitat', 'substrate', 'fieldnumber', 'occurrenceremarks', 'associatedtaxa', 'verbatimattributes', 'dynamicproperties', 'reproductivecondition', 'cultivationstatus', 'establishmentmeans', 'lifestage', 'sex', 'individualcount', 'samplingprotocol', 'preparations', 'country', 'stateprovince', 'county', 'municipality', 'locality', 'previous_determinations', 'decimallatitude', 'decimallongitude', 'geodeticdatum', 'coordinateuncertaintyinmeters', 'locationremarks', 'verbatimcoordinates', 'georeferencedby', 'georeferenceprotocol', 'georeferencesources', 'georeferenceverificationstatus', 'georeferenceremarks', 'minimumelevationinmeters', 'maximumelevationinmeters', 'verbatimelevation', 'language', 'labelproject', 'basisofrecord'); ?> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=<?php echo $charset; ?> "> <title><?php echo $defaultTitle; ?> Collections Search Results</title> <link href="../css/base.css?<?php echo $CSS_VERSION; ?> " type="text/css" rel="stylesheet" /> <link href="../css/main.css?<?php echo $CSS_VERSION;
header("Content-Type: text/html; charset=" . $charset); $taxonFilter = array_key_exists("taxonfilter", $_REQUEST) ? $_REQUEST["taxonfilter"] : 0; $occIndex = array_key_exists('occindex', $_REQUEST) ? $_REQUEST['occindex'] : 0; $sortField1 = array_key_exists('sortfield1', $_REQUEST) ? $_REQUEST['sortfield1'] : 'collection'; $sortField2 = array_key_exists('sortfield2', $_REQUEST) ? $_REQUEST['sortfield2'] : ''; $sortOrder = array_key_exists('sortorder', $_REQUEST) ? $_REQUEST['sortorder'] : ''; $stArrCollJson = array_key_exists("jsoncollstarr", $_REQUEST) ? $_REQUEST["jsoncollstarr"] : ''; $stArrSearchJson = array_key_exists("starr", $_REQUEST) ? $_REQUEST["starr"] : ''; //Sanitation if (!is_numeric($taxonFilter)) { $taxonFilter = 1; } if (!is_numeric($occIndex)) { $occIndex = 100; } $collManager = new OccurrenceListManager(); $stArr = array(); $specOccJson = ''; $navStr = ''; $sortFields = array('collection' => 'Collection', 'o.CatalogNumber' => 'Catalog Number', 'o.family' => 'Family', 'o.sciname' => 'Scientific Name', 'o.recordedBy' => 'Collector', 'o.recordNumber' => 'Number', 'o.eventDate' => 'Event Date', 'o.country' => 'Country', 'o.StateProvince' => 'State/Province', 'o.county' => 'County', 'CAST(elev AS UNSIGNED)' => 'Elevation'); if ($stArrCollJson && $stArrSearchJson) { $stArrSearchJson = str_replace("%apos;", "'", $stArrSearchJson); $collStArr = json_decode($stArrCollJson, true); $searchStArr = json_decode($stArrSearchJson, true); $stArr = array_merge($searchStArr, $collStArr); } elseif ($stArrCollJson && !$stArrSearchJson) { $collArray = $collManager->getSearchTerms(); $collStArr = json_decode($stArrCollJson, true); $stArr = array_merge($collArray, $collStArr); $stArrSearchJson = json_encode($collArray); } else {
include_once $SERVER_ROOT . '/classes/OccurrenceListManager.php'; header("Content-Type: text/html; charset=" . $CHARSET); $tabIndex = array_key_exists("tabindex", $_REQUEST) ? $_REQUEST["tabindex"] : 1; $taxonFilter = array_key_exists("taxonfilter", $_REQUEST) ? $_REQUEST["taxonfilter"] : 0; $cntPerPage = array_key_exists("cntperpage", $_REQUEST) ? $_REQUEST["cntperpage"] : 100; $stArrCollJson = array_key_exists("jsoncollstarr", $_REQUEST) ? $_REQUEST["jsoncollstarr"] : ''; $stArrSearchJson = array_key_exists("starr", $_REQUEST) ? $_REQUEST["starr"] : ''; //Sanitation if (!is_numeric($taxonFilter)) { $taxonFilter = 1; } if (!is_numeric($cntPerPage)) { $cntPerPage = 100; } $pageNumber = array_key_exists("page", $_REQUEST) ? $_REQUEST["page"] : 1; $collManager = new OccurrenceListManager(); $stArr = array(); $specOccJson = ''; if ($stArrCollJson && $stArrSearchJson) { $stArrSearchJson = str_replace("%apos;", "'", $stArrSearchJson); $collStArr = json_decode($stArrCollJson, true); $searchStArr = json_decode($stArrSearchJson, true); $stArr = array_merge($searchStArr, $collStArr); } elseif ($stArrCollJson && !$stArrSearchJson) { $collArray = $collManager->getSearchTerms(); $collStArr = json_decode($stArrCollJson, true); $stArr = array_merge($collArray, $collStArr); $stArrSearchJson = json_encode($collArray); } else { $collArray = $collManager->getSearchTerms(); $collStArr = $collManager->getSearchTerms();