예제 #1
0
<?php

include_once '../../config/symbini.php';
include_once $serverRoot . '/classes/CollectionProfileManager.php';
header("Content-Type: text/html; charset=" . $charset);
ini_set('max_execution_time', 1200);
//1200 seconds = 20 minutes
$catId = array_key_exists("catid", $_REQUEST) ? $_REQUEST["catid"] : 0;
if (!$catId && isset($DEFAULTCATID) && $DEFAULTCATID) {
    $catId = $DEFAULTCATID;
}
$collId = array_key_exists("collid", $_REQUEST) ? $_REQUEST["collid"] : 0;
$collManager = new CollectionProfileManager();
if ($collId) {
    $dateArr = $collManager->getYearStatsHeaderArr($collId);
    $statArr = $collManager->getYearStatsDataArr($collId);
}
?>
<html>
	<head>
		<meta name="keywords" content="Natural history collections yearly statistics" />
		<title><?php 
echo $defaultTitle;
?>
 Year Statistics</title>
		<link rel="stylesheet" href="../../css/base.css?<?php 
echo $CSS_VERSION;
?>
" type="text/css" />
		<link rel="stylesheet" href="../../css/main.css?<?php 
echo $CSS_VERSION;
예제 #2
0
<?php

//error_reporting(E_ALL);
ini_set('max_execution_time', 1200);
//1200 seconds = 20 minutes
include_once '../../config/symbini.php';
include_once $serverRoot . '/classes/CollectionProfileManager.php';
include_once $serverRoot . '/classes/OccurrenceManager.php';
$action = array_key_exists("action", $_REQUEST) ? $_REQUEST["action"] : '';
$famArrJson = array_key_exists("famarrjson", $_REQUEST) ? $_REQUEST["famarrjson"] : '';
$geoArrJson = array_key_exists("geoarrjson", $_REQUEST) ? $_REQUEST["geoarrjson"] : '';
$collId = array_key_exists("collids", $_REQUEST) ? $_REQUEST["collids"] : '';
$collManager = new CollectionProfileManager();
$fileName = '';
$outputArr = array();
if ($action == 'Download Family Dist' || $action == 'Download Geo Dist') {
    $header = array('Names', 'SpecimenCount', 'GeorefCount', 'IDCount', 'IDGeorefCount', 'GeorefPercent', 'IDPercent', 'IDGeorefPercent');
    if ($action == 'Download Family Dist') {
        $fileName = 'stats_family.csv';
        $famArr = json_decode($famArrJson, true);
        if (is_array($famArr)) {
            foreach ($famArr as $name => $data) {
                $specCnt = $data['SpecimensPerFamily'];
                $geoRefCnt = $data['GeorefSpecimensPerFamily'];
                $IDCnt = $data['IDSpecimensPerFamily'];
                $IDGeoRefCnt = $data['IDGeorefSpecimensPerFamily'];
                $geoRefPerc = $data['GeorefSpecimensPerFamily'] ? round(100 * ($data['GeorefSpecimensPerFamily'] / $data['SpecimensPerFamily'])) : 0;
                $IDPerc = $data['IDSpecimensPerFamily'] ? round(100 * ($data['IDSpecimensPerFamily'] / $data['SpecimensPerFamily'])) : 0;
                $IDgeoRefPerc = $data['IDGeorefSpecimensPerFamily'] ? round(100 * ($data['IDGeorefSpecimensPerFamily'] / $data['SpecimensPerFamily'])) : 0;
                array_push($outputArr, array($name, $specCnt, $geoRefCnt, $IDCnt, $IDGeoRefCnt, $geoRefPerc, $IDPerc, $IDgeoRefPerc));
            }
예제 #3
0
<?php

include_once '../../config/symbini.php';
include_once $serverRoot . '/classes/CollectionProfileManager.php';
header("Content-Type: text/html; charset=" . $charset);
if (!$SYMB_UID) {
    header('Location: ../../profile/index.php?refurl=../collections/misc/collmetadata.php?' . $_SERVER['QUERY_STRING']);
}
$action = array_key_exists("action", $_REQUEST) ? $_REQUEST["action"] : "";
$collid = array_key_exists("collid", $_REQUEST) ? $_REQUEST["collid"] : 0;
$statusStr = '';
$collManager = new CollectionProfileManager();
if (!$collManager->setCollid($collid)) {
    $collid = '';
}
$isEditor = 0;
if ($IS_ADMIN) {
    $isEditor = 1;
} elseif ($collid) {
    if (array_key_exists("CollAdmin", $userRights) && in_array($collid, $userRights["CollAdmin"])) {
        $isEditor = 1;
    } elseif (array_key_exists("CollEditor", $userRights) && in_array($collid, $userRights["CollEditor"])) {
        $isEditor = 1;
    }
}
if ($isEditor) {
    if ($action == 'Save Edits') {
        $statusStr = $collManager->submitCollEdits($_POST);
        if ($statusStr == true) {
            header('Location: collprofiles.php?collid=' . $collid);
        }
예제 #4
0
<?php

include_once '../../config/symbini.php';
include_once $serverRoot . '/classes/CollectionProfileManager.php';
header("Content-Type: text/html; charset=" . $charset);
ini_set('max_execution_time', 1200);
//1200 seconds = 20 minutes
$catId = array_key_exists("catid", $_REQUEST) ? $_REQUEST["catid"] : 0;
if (!$catId && isset($DEFAULTCATID) && $DEFAULTCATID) {
    $catId = $DEFAULTCATID;
}
$collId = array_key_exists("collid", $_REQUEST) ? $_REQUEST["collid"] : 0;
$action = array_key_exists('submitaction', $_REQUEST) ? $_REQUEST['submitaction'] : '';
$collManager = new CollectionProfileManager();
//if($collId) $collManager->setCollectionId($collId);
$collList = $collManager->getStatCollectionList($catId);
$specArr = isset($collList['spec']) ? $collList['spec'] : null;
$obsArr = isset($collList['obs']) ? $collList['obs'] : null;
$collIdArr = array();
$collectionArr = array();
$familyArr = array();
$countryArr = array();
$results = array();
$collStr = '';
if ($collId) {
    $collIdArr = explode(",", $collId);
    if ($action == "Run Statistics") {
        $resultsTemp = $collManager->runStatistics($collId);
        $results['FamilyCount'] = $resultsTemp['familycnt'];
        $results['GeneraCount'] = $resultsTemp['genuscnt'];
        $results['SpeciesCount'] = $resultsTemp['speciescnt'];
예제 #5
0
<?php

include_once '../../config/symbini.php';
include_once $SERVER_ROOT . '/classes/CollectionProfileManager.php';
header("Content-Type: text/html; charset=" . $charset);
$collid = array_key_exists("collid", $_REQUEST) && is_numeric($_REQUEST["collid"]) ? $_REQUEST["collid"] : 0;
$action = array_key_exists("action", $_REQUEST) ? htmlspecialchars($_REQUEST["action"]) : "";
$eMode = array_key_exists('emode', $_REQUEST) ? htmlspecialchars($_REQUEST['emode']) : 0;
if ($eMode && !$SYMB_UID) {
    header('Location: ../../profile/index.php?refurl=../collections/misc/collprofiles.php?' . $_SERVER['QUERY_STRING']);
}
$countryDist = array_key_exists('country', $_REQUEST) ? htmlspecialchars($_REQUEST['country']) : '';
$stateDist = array_key_exists('state', $_REQUEST) ? htmlspecialchars($_REQUEST['state']) : '';
$collManager = new CollectionProfileManager();
if (!$collManager->setCollid($collid)) {
    $collid = '';
}
$collData = $collManager->getCollectionData();
$editCode = 0;
//0 = no permissions; 1 = CollEditor; 2 = CollAdmin; 3 = SuperAdmin
if ($SYMB_UID) {
    if ($IS_ADMIN) {
        $editCode = 3;
    } else {
        if ($collid) {
            if (array_key_exists("CollAdmin", $USER_RIGHTS) && in_array($collid, $USER_RIGHTS["CollAdmin"])) {
                $editCode = 2;
            } elseif (array_key_exists("CollEditor", $USER_RIGHTS) && in_array($collid, $USER_RIGHTS["CollEditor"])) {
                $editCode = 1;
            }
        }
예제 #6
0
<?php

include_once '../../config/symbini.php';
include_once $serverRoot . '/classes/DwcArchiverOccurrence.php';
include_once $serverRoot . '/classes/CollectionProfileManager.php';
header('Content-Type: text/html; charset=' . $charset);
$collId = array_key_exists('collid', $_REQUEST) ? $_REQUEST['collid'] : 0;
$emode = array_key_exists('emode', $_REQUEST) ? $_REQUEST['emode'] : 0;
$action = array_key_exists('formsubmit', $_REQUEST) ? $_REQUEST['formsubmit'] : '';
$cSet = array_key_exists('cset', $_REQUEST) ? $_REQUEST['cset'] : '';
$schema = array_key_exists('schema', $_REQUEST) ? $_REQUEST['schema'] : 1;
$dwcaManager = new DwcArchiverOccurrence();
$collManager = new CollectionProfileManager();
$includeDets = 1;
$includeImgs = 1;
$redactLocalities = 1;
$recFlagArr = array();
$collPubArr = array();
$publishGBIF = false;
$publishIDIGBIO = false;
$organizationKey = '';
$installationKey = '';
$datasetKey = '';
$endpointKey = '';
$idigbioKey = '';
if (isset($GBIF_USERNAME) && isset($GBIF_PASSWORD) && isset($GBIF_ORG_KEY)) {
    $collPubArr = $collManager->getCollPubArr($collId);
    if ($collPubArr[$collId]['publishToGbif']) {
        $publishGBIF = true;
    }
    if ($collPubArr[$collId]['publishToIdigbio']) {
예제 #7
0
<?php

include_once '../../config/symbini.php';
include_once $serverRoot . '/classes/CollectionProfileManager.php';
header("Content-Type: text/html; charset=" . $charset);
$action = array_key_exists("action", $_REQUEST) ? $_REQUEST["action"] : "";
$collId = array_key_exists("collid", $_REQUEST) ? $_REQUEST["collid"] : 0;
$start = array_key_exists("start", $_REQUEST) ? $_REQUEST["start"] : '';
$limit = array_key_exists("limit", $_REQUEST) ? $_REQUEST["limit"] : 1000;
$collManager = new CollectionProfileManager();
if (!$collManager->setCollid($collId)) {
    $collId = '';
}
$collData = array();
if ($collId) {
    $collData = $collManager->getCollectionData();
}
?>
<html>
<head>
	<title><?php 
echo $defaultTitle . " " . ($collId ? $collData["collectionname"] : "");
?>
 Collection Index</title>
	<link href="../../css/base.css?<?php 
echo $CSS_VERSION;
?>
" type="text/css" rel="stylesheet" />
	<link href="../../css/main.css?<?php 
echo $CSS_VERSION;
?>
예제 #8
0
<?php

include_once '../../config/symbini.php';
include_once $serverRoot . '/classes/CollectionProfileManager.php';
header("Content-Type: text/html; charset=" . $charset);
ini_set('max_execution_time', 1200);
//1200 seconds = 20 minutes
$catId = array_key_exists("catid", $_REQUEST) ? $_REQUEST["catid"] : 0;
if (!$catId && isset($DEFAULTCATID) && $DEFAULTCATID) {
    $catId = $DEFAULTCATID;
}
$collId = array_key_exists("collid", $_REQUEST) ? $_REQUEST["collid"] : 0;
$totalCnt = array_key_exists("totalcnt", $_REQUEST) ? $_REQUEST["totalcnt"] : 0;
$collManager = new CollectionProfileManager();
$orderArr = array();
if ($collId) {
    $orderArr = $collManager->getOrderStatsDataArr($collId);
    ksort($orderArr, SORT_STRING | SORT_FLAG_CASE);
}
?>
<html>
	<head>
		<meta name="keywords" content="Natural history collections yearly statistics" />
		<title><?php 
echo $defaultTitle;
?>
 Order Distribution</title>
		<link rel="stylesheet" href="../../css/base.css?<?php 
echo $CSS_VERSION;
?>
" type="text/css" />
예제 #9
0
<?php

include_once '../../../config/symbini.php';
include_once $serverRoot . '/classes/CollectionProfileManager.php';
$collManager = new CollectionProfileManager();
$GBIFInstKey = $collManager->getGbifInstKey();
echo $GBIFInstKey;