$collid = 0; } if (!is_numeric($uspid)) { $uspid = 0; } if ($action && !preg_match('/^[a-zA-Z0-9\\s_]+$/', $action)) { $action = ''; } $DIRECTUPLOAD = 1; $DIGIRUPLOAD = 2; $FILEUPLOAD = 3; $STOREDPROCEDURE = 4; $SCRIPTUPLOAD = 5; $DWCAUPLOAD = 6; $SKELETAL = 7; $duManager = new SpecUpload(); $duManager->setCollId($collid); $duManager->setUspid($uspid); $statusStr = ''; $isEditor = 0; if ($IS_ADMIN || array_key_exists("CollAdmin", $USER_RIGHTS) && in_array($collid, $USER_RIGHTS["CollAdmin"])) { $isEditor = 1; } if ($isEditor) { if ($action == "Save Edits") { $statusStr = $duManager->editUploadProfile(); $action = ""; } elseif ($action == "Create Profile") { $statusStr = $duManager->addUploadProfile(); $action = ""; } elseif ($action == "Delete Profile") {
<?php include_once '../../config/symbini.php'; include_once $serverRoot . '/classes/SpecUpload.php'; header("Content-Type: text/html; charset=" . $charset); $collid = array_key_exists('collid', $_REQUEST) ? $_REQUEST['collid'] : 0; $recLimit = array_key_exists('reclimit', $_REQUEST) ? $_REQUEST['reclimit'] : 1000; $pageIndex = array_key_exists('pageindex', $_REQUEST) ? $_REQUEST['pageindex'] : 0; $searchVar = array_key_exists('searchvar', $_REQUEST) ? $_REQUEST['searchvar'] : ''; $uploadManager = new SpecUpload(); $uploadManager->setCollId($collid); $collMap = $uploadManager->getCollInfo(); $isEditor = 0; if ($SYMB_UID) { //Set variables if ($isAdmin || array_key_exists("CollAdmin", $userRights) && in_array($collid, $userRights["CollAdmin"])) { $isEditor = 1; } } $recArr = $uploadManager->getUploadMap($recLimit * $pageIndex, $recLimit, $searchVar); if (!$searchVar) { $searchVar = 'TOTAL_TRANSFER'; } $fileName = $searchVar . '_' . $collid . '_' . 'upload.csv'; header('Content-Type: text/csv'); header("Content-Disposition: attachment; filename=\"{$fileName}\""); //Write column names out to file if ($recArr) { $headerMap = array_keys($recArr[0]); $outstream = fopen("php://output", "w"); fputcsv($outstream, $headerMap);
<?php include_once '../../config/symbini.php'; include_once $serverRoot . '/classes/SpecUpload.php'; header("Content-Type: text/html; charset=" . $charset); $collid = array_key_exists('collid', $_REQUEST) ? $_REQUEST['collid'] : 0; $recLimit = array_key_exists('reclimit', $_REQUEST) ? $_REQUEST['reclimit'] : 1000; $pageIndex = array_key_exists('pageindex', $_REQUEST) ? $_REQUEST['pageindex'] : 0; $uploadManager = new SpecUpload(); $uploadManager->setCollId($collid); $collMap = $uploadManager->getCollInfo(); $headerMapBase = array('catalognumber' => 'Catalog Number', 'occurrenceid' => 'Occurrence ID', 'othercatalognumbers' => 'Other Catalog #', 'family' => 'Family', 'identificationqualifier' => 'ID Qualifier', 'sciname' => 'Scientific name', 'scientificnameauthorship' => 'Author', 'recordedby' => 'Collector', 'recordnumber' => 'Number', 'associatedcollectors' => 'Associated Collectors', 'eventdate' => 'Event Date', 'verbatimeventdate' => 'Verbatim Date', 'identificationremarks' => 'Identification Remarks', 'taxonremarks' => 'Taxon Remarks', 'identifiedby' => 'Identified By', 'dateidentified' => 'Date Identified', 'identificationreferences' => 'Identification References', 'country' => 'Country', 'stateprovince' => 'State/Province', 'county' => 'county', 'municipality' => 'municipality', 'locality' => 'locality', 'decimallatitude' => 'Latitude', 'decimallongitude' => 'Longitude', 'geodeticdatum' => 'Datum', 'coordinateuncertaintyinmeters' => 'Uncertainty In Meters', 'verbatimcoordinates' => 'Verbatim Coordinates', 'georeferencedby' => 'Georeferenced By', 'georeferenceprotocol' => 'Georeference Protocol', 'georeferencesources' => 'Georeference Sources', 'georeferenceverificationstatus' => 'Georef Verification Status', 'georeferenceremarks' => 'Georef Remarks', 'minimumelevationinmeters' => 'Min. Elev. (m)', 'maximumelevationinmeters' => 'Max. Elev. (m)', 'verbatimelevation' => 'Verbatim Elev.', 'habitat' => 'Habitat', 'substrate' => 'Substrate', 'occurrenceremarks' => 'Notes', 'associatedtaxa' => 'Associated Taxa', 'verbatimattributes' => 'Description', 'lifestage' => 'Life Stage', 'sex' => 'Sex', 'individualcount' => 'Individual Count', 'samplingprotocol' => 'Sampling Protocol', 'preparations' => 'Preparations', 'reproductivecondition' => 'Reproductive Condition', 'typestatus' => 'Type Status', 'cultivationstatus' => 'Cultivation Status', 'establishmentmeans' => 'Establishment Means', 'disposition' => 'disposition', 'duplicatequantity' => 'Duplicate Qty', 'datelastmodified' => 'Date Last Modified', 'processingstatus' => 'Processing Status', 'recordenteredby' => 'Entered By', 'basisofrecord' => 'Basis Of Record'); if ($collMap['managementtype'] == 'Snapshot') { $headerMapBase['dbpk'] = 'Source Identifier'; } $recCnt = $uploadManager->getUploadCount(); $isEditor = 0; //$navStr = '<div style="float:right;">'; if ($SYMB_UID) { //Set variables if ($isAdmin || array_key_exists("CollAdmin", $userRights) && in_array($collid, $userRights["CollAdmin"])) { $isEditor = 1; } /* if(($pageIndex) >= $recLimit){ $navStr .= '<a href="uploadviewer.php?collid='.$collid.'&reclimit='.$reclimit.'&pageindex=0" title="First page">|<<</a> | '; $navStr .= '<a href="uploadviewer.php?collid='.$collid.'&reclimit='.$reclimit.'&pageindex='.($pageIndex-1).'" title="Previous '.$recLimit.' record"><<</a>'; } else{ $navStr .= '|<<</a> | <<'; }
function __destruct() { parent::__destruct(); }