<?php include_once '../config/symbini.php'; include_once $serverRoot . '/classes/ChecklistVoucherAdmin.php'; $action = array_key_exists("submitaction", $_REQUEST) ? $_REQUEST["submitaction"] : ""; $clid = array_key_exists("clid", $_REQUEST) ? $_REQUEST["clid"] : 0; $pid = array_key_exists("pid", $_REQUEST) ? $_REQUEST["pid"] : ""; $displayMode = array_key_exists('displaymode', $_REQUEST) ? $_REQUEST['displaymode'] : 0; $startIndex = array_key_exists("start", $_REQUEST) ? $_REQUEST["start"] : 0; $vManager = new ChecklistVoucherAdmin(); $vManager->setClid($clid); $isEditor = false; if ($isAdmin || array_key_exists("ClAdmin", $userRights) && in_array($clid, $userRights["ClAdmin"])) { $isEditor = true; } //Get records $missingArr; if ($displayMode == 1) { $missingArr = $vManager->getMissingTaxaSpecimens($startIndex); } elseif ($displayMode == 2) { $missingArr = $vManager->getMissingProblemTaxa(); } else { $missingArr = $vManager->getMissingTaxa(); } ?> <div id="innertext" style="background-color:white;"> <div style='float:left;font-weight:bold;margin-left:5px'> <?php if ($displayMode == 2) {
<?php include_once '../config/symbini.php'; include_once $serverRoot . '/classes/ChecklistVoucherAdmin.php'; header("Content-Type: text/html; charset=" . $charset); if (!$SYMB_UID) { header('Location: ../profile/index.php?refurl=../checklists/voucheradmin.php?' . $_SERVER['QUERY_STRING']); } $clid = array_key_exists("clid", $_REQUEST) ? $_REQUEST["clid"] : 0; $pid = array_key_exists("pid", $_REQUEST) ? $_REQUEST["pid"] : ""; $startPos = array_key_exists('start', $_REQUEST) ? (int) $_REQUEST['start'] : 0; $tabIndex = array_key_exists("tabindex", $_REQUEST) ? $_REQUEST["tabindex"] : 0; $sqlFrag = array_key_exists("sqlfrag", $_REQUEST) ? $_REQUEST["sqlfrag"] : ""; $action = array_key_exists("submitaction", $_REQUEST) ? $_REQUEST["submitaction"] : ""; $displayMode = array_key_exists('displaymode', $_REQUEST) ? $_REQUEST['displaymode'] : 0; $clManager = new ChecklistVoucherAdmin(); $clManager->setClid($clid); $statusStr = ""; $isEditor = 0; if ($isAdmin || array_key_exists("ClAdmin", $userRights) && in_array($clid, $userRights["ClAdmin"])) { $isEditor = 1; if ($action == "Save Search Terms") { $statusStr = $clManager->saveSql($_POST); } elseif ($action == 'Delete SQL Fragment') { $statusStr = $clManager->deleteSql(); } elseif ($action == 'Add Vouchers') { $clManager->linkVouchers($_POST['occids']); } elseif ($action == 'Add Taxa and Vouchers') { $clManager->linkTaxaVouchers($_POST['occids'], array_key_exists('usecurrent', $_POST) ? $_POST['usecurrent'] : 0); } }
<?php include_once '../config/symbini.php'; include_once $serverRoot . '/classes/ChecklistVoucherAdmin.php'; $action = array_key_exists("submitaction", $_REQUEST) ? $_REQUEST["submitaction"] : ""; $clid = array_key_exists("clid", $_REQUEST) ? $_REQUEST["clid"] : 0; $pid = array_key_exists("pid", $_REQUEST) ? $_REQUEST["pid"] : ""; $startPos = array_key_exists('start', $_REQUEST) ? (int) $_REQUEST['start'] : 0; $vManager = new ChecklistVoucherAdmin(); $vManager->setClid($clid); $isEditor = false; if ($isAdmin || array_key_exists("ClAdmin", $userRights) && in_array($clid, $userRights["ClAdmin"])) { $isEditor = true; } ?> <div id="innertext" style="background-color:white;"> <h2>Possible Voucher Conflicts</h2> <div style="margin-bottom:10px;"> List of specimen vouchers where the current identifications conflict with the checklist. Voucher conflicts are typically due to recent annotations of specimens located within collection. Click on Checklist ID to open the editing pane for that record. </div> <?php if ($conflictArr = $vManager->getConflictVouchers()) { echo '<div style="font-weight:bold;">Conflict Count: ' . count($conflictArr) . '</div>'; ?> <table class="styledtable"> <tr><th><b>Checklist ID</b></th><th><b>Collector</b></th><th><b>Specimen ID</b></th><th><b>Identified By</b></th></tr> <?php foreach ($conflictArr as $id => $vArr) { ?>
include_once '../../config/symbini.php'; include_once $serverRoot . '/classes/ChecklistVoucherAdmin.php'; $clid = $_REQUEST["clid"]; $occArr = $_REQUEST["jsonOccArr"]; $tid = $_REQUEST["tid"]; if (!$clid || !is_numeric($clid)) { echo "ERROR: Checklist ID is null"; } elseif (!$occArr) { echo "ERROR: Specimen identifiers are missing"; } elseif (!$tid || !is_numeric($tid)) { echo "ERROR: Problem with taxon name (null tid), contact administrator"; } elseif (!($isAdmin || array_key_exists("ClAdmin", $userRights) && in_array($clid, $userRights["ClAdmin"]))) { echo "ERROR: Permissions Error"; } else { $clManager = new ChecklistVoucherAdmin(); $clManager->setClid($clid); //Method returns 1 on success and a string message upon failure $result = 0; foreach ($occArr as $occId) { if ($clManager->linkVoucher($tid, $occId, 1) != 1) { $result = 0; break; } else { $result = 1; } } if ($result) { echo 1; } else { echo "ERROR: Problem adding vouchers to checklist";
<?php include_once '../../config/symbini.php'; include_once $serverRoot . '/classes/ChecklistVoucherAdmin.php'; $clid = $_REQUEST["clid"]; $occid = $_REQUEST["occid"]; $tid = $_REQUEST["tid"]; if (!$clid || !is_numeric($clid)) { echo "ERROR: Checklist ID is null"; } elseif (!$occid || !is_numeric($occid)) { echo "ERROR: Occurrence ID is null"; } elseif (!$tid || !is_numeric($tid)) { echo "ERROR: Problem with taxon name (null tid), contact administrator"; } elseif (!($isAdmin || array_key_exists("ClAdmin", $userRights) && in_array($clid, $userRights["ClAdmin"]))) { echo "ERROR: Permissions Error"; } else { $clManager = new ChecklistVoucherAdmin(); $clManager->setClid($clid); //Method returns 1 on success and a string message upon failure echo $clManager->linkVoucher($tid, $occid, 1); }
<?php include_once '../config/symbini.php'; include_once $serverRoot . '/classes/ChecklistVoucherAdmin.php'; header("Cache-Control: no-cache, must-revalidate"); header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); $clid = $_REQUEST['clid']; $rType = $_REQUEST['rtype']; $vManager = new ChecklistVoucherAdmin(); $vManager->setClid($clid); if ($rType == 'missingoccurcsv') { $vManager->exportMissingOccurCsv(); } elseif ($rType == 'problemtaxacsv') { $vManager->exportProblemTaxaCsv(); } elseif ($rType == 'fullvoucherscsv') { $vManager->downloadDatasetCsv(); }
<?php include_once '../../config/symbini.php'; include_once $serverRoot . '/classes/ChecklistVoucherAdmin.php'; header("Content-Type: text/html; charset=" . $charset); $sciname = $_POST['sciname']; $occid = $_POST['occid']; $clid = $_POST['clid']; $status = 0; if ($sciname && is_numeric($occid) && is_numeric($clid)) { $clManager = new ChecklistVoucherAdmin(); $clManager->setClid($clid); $status = $clManager->linkVoucher($sciname, $occid); } echo $status;