include_once $serverRoot . '/classes/SpecProcessorManager.php'; include_once $serverRoot . '/classes/ImageBatchProcessor.php'; include_once $serverRoot . '/classes/ImageProcessor.php'; include_once $serverRoot . '/classes/SpecProcessorOcr.php'; header("Content-Type: text/html; charset=" . $charset); if (!$SYMB_UID) { header('Location: ../../profile/index.php?refurl=../collections/specprocessor/processor.php?' . $_SERVER['QUERY_STRING']); } $action = array_key_exists('submitaction', $_REQUEST) ? $_REQUEST['submitaction'] : ''; $collid = array_key_exists('collid', $_REQUEST) ? $_REQUEST['collid'] : 0; $spprid = array_key_exists('spprid', $_REQUEST) ? $_REQUEST['spprid'] : 0; $tabIndex = array_key_exists("tabindex", $_REQUEST) ? $_REQUEST["tabindex"] : 0; //NLP and OCR variables $spNlpId = array_key_exists('spnlpid', $_REQUEST) ? $_REQUEST['spnlpid'] : 0; $procStatus = array_key_exists('procstatus', $_REQUEST) ? $_REQUEST['procstatus'] : 'unprocessed'; $specManager = new SpecProcessorManager(); $specManager->setCollId($collid); $isEditor = false; if ($isAdmin || array_key_exists("CollAdmin", $userRights) && in_array($collid, $userRights["CollAdmin"])) { $isEditor = true; } $statusStr = ""; ?> <html> <head> <title>Specimen Processor Control Panel</title> <link href="<?php echo $clientRoot; ?> /css/base.css?<?php echo $CSS_VERSION;
<?php include_once '../../config/symbini.php'; include_once $serverRoot . '/classes/SpecProcessorManager.php'; include_once $serverRoot . '/classes/SpecProcNlpBryophyte.php'; include_once $serverRoot . '/classes/SpecProcNlpLichen.php'; include_once $serverRoot . '/classes/SpecProcNlpSalix.php'; header("Content-Type: text/html; charset=" . $charset); if (!$SYMB_UID) { header('Location: ../../profile/index.php?refurl=../collections/specprocessor/index.php?' . $_SERVER['QUERY_STRING']); } $collid = $_REQUEST['collid']; $parserTarget = $_REQUEST['parser']; $action = array_key_exists('formsubmit', $_REQUEST) ? $_REQUEST['formsubmit'] : ''; $procManager = new SpecProcessorManager(); $procManager->setCollId($collid); $nlpManager = null; if ($parserTarget == 'lbcc') { $nlpManager = new SpecProcNlpLbcc(); } else { $nlpManager = new SpecProcNlpSalix(); } //$nlpManager->setCollId($collid); $isEditor = false; if ($isAdmin || array_key_exists("CollAdmin", $userRights) && in_array($collid, $userRights["CollAdmin"])) { $isEditor = true; } $status = ""; if ($isEditor) { if ($action == '') { //$status = $nlpManager->addProfile($_REQUEST);
<?php include_once '../../config/symbini.php'; include_once $serverRoot . '/classes/SpecProcessorManager.php'; header("Content-Type: text/html; charset=" . $charset); if (!$SYMB_UID) { header('Location: ../../profile/index.php?refurl=../collections/specprocessor/index.php?' . $_SERVER['QUERY_STRING']); } $collid = $_REQUEST['collid']; $menu = array_key_exists('menu', $_REQUEST) ? $_REQUEST['menu'] : ''; $tabIndex = 4; $procManager = new SpecProcessorManager(); $procManager->setCollId($collid); $isEditor = false; if ($IS_ADMIN || array_key_exists("CollAdmin", $userRights) && in_array($collid, $userRights["CollAdmin"])) { $isEditor = true; } ?> <div id="innertext"> <div style="float:right;width:165px;"> <fieldset> <legend><b>Sub-Menu</b></legend> <ul> <li><a href="index.php?tabindex=<?php echo $tabIndex . '&collid=' . $collid; ?> ">General Stats</a><br/></li> <li><a href="index.php?menu=user&tabindex=<?php echo $tabIndex . '&collid=' . $collid; ?> ">User Stats</a><br/></li>
if (!is_numeric($spprId)) { $spprId = 0; } if (!is_numeric($spNlpId)) { $spNlpId = 0; } if ($procStatus && !preg_match('/^[a-zA-Z]+$/', $procStatus)) { $procStatus = ''; } if (!is_numeric($displayMode)) { $displayMode = 0; } if (!is_numeric($tabIndex)) { $tabIndex = 0; } $specManager = new SpecProcessorManager(); $specManager->setCollId($collid); $isEditor = false; if ($isAdmin || array_key_exists("CollAdmin", $userRights) && in_array($collid, $userRights["CollAdmin"])) { $isEditor = true; } $statusStr = ""; if ($isEditor) { if ($action == 'Add New Profile') { $specManager->addProject($_POST); } elseif ($action == 'Save Profile') { $specManager->editProject($_POST); } elseif ($action == 'Delete Profile') { $specManager->deleteProject($_POST['sppriddel']); } elseif ($action == 'Add to Queue') { $csManager = new OccurrenceCrowdSource();
<?php include_once '../../config/symbini.php'; include_once $serverRoot . '/classes/SpecProcessorManager.php'; header("Content-Type: text/html; charset=" . $charset); $collid = array_key_exists('collid', $_REQUEST) ? $_REQUEST['collid'] : 0; $spprid = array_key_exists('spprid', $_REQUEST) ? $_REQUEST['spprid'] : 0; $procStatus = array_key_exists('procstatus', $_REQUEST) ? $_REQUEST['procstatus'] : 'unprocessed'; $procManager = new SpecProcessorManager(); $procManager->setCollId($collid); $procManager->setProjVariables('OCR Harvest'); ?> <script> $(function() { var dialogArr = new Array("speckeypattern","sourcepath","ocrfile","ocrsource"); var dialogStr = ""; for(i=0;i<dialogArr.length;i++){ dialogStr = dialogArr[i]+"info"; $( "#"+dialogStr+"dialog" ).dialog({ autoOpen: false, modal: true, position: { my: "left top", at: "right bottom", of: "#"+dialogStr } }); $( "#"+dialogStr ).click(function() { $( "#"+this.id+"dialog" ).dialog( "open" ); }); } });
<?php include_once '../../config/symbini.php'; include_once $SERVER_ROOT . '/classes/SpecProcessorManager.php'; header("Content-Type: text/html; charset=" . $CHARSET); if (!$SYMB_UID) { header('Location: ../../profile/index.php?refurl=' . $CLIENT_ROOT . '/collections/specprocessor/index.php?' . $_SERVER['QUERY_STRING']); } $action = array_key_exists('submitaction', $_REQUEST) ? $_REQUEST['submitaction'] : ''; $collId = array_key_exists('collid', $_REQUEST) ? $_REQUEST['collid'] : 0; $spprId = array_key_exists('spprid', $_REQUEST) ? $_REQUEST['spprid'] : 0; $specManager = new SpecProcessorManager(); $specManager->setCollId($collId); $editable = false; if ($IS_ADMIN || array_key_exists("CollAdmin", $userRights) && in_array($collId, $userRights["CollAdmin"])) { $editable = true; } $specProjects = array(); if (!$spprId && $action != 'addmode') { //If there is one image loading profile, and only one, linked to the collection, pull that up as the default project $specProjects = $specManager->getProjects(); if (count($specProjects) == 1) { $arrayKeys = array_keys($specProjects); $spprId = array_shift($arrayKeys); } } if ($spprId) { $specManager->setProjVariables($spprId); } ?> <html>
<?php require_once "TcnImageConfig.php"; require_once "DbConnection.php"; //-------------------------------------------------------------------------------------------// //End of variable assignment. Don't modify code below. date_default_timezone_set('America/Phoenix'); $specManager = new SpecProcessorManager($dbMetadata); //Set variables $specManager->setCollArr($collArr); $specManager->setDbMetadata($dbMetadata); $specManager->setSourcePathBase($sourcePathBase); $specManager->setTargetPathBase($targetPathBase); $specManager->setImgUrlBase($imgUrlBase); $specManager->setWebPixWidth($webPixWidth); $specManager->setTnPixWidth($tnPixWidth); $specManager->setLgPixWidth($lgPixWidth); $specManager->setJpgCompression($jpgCompression); $specManager->setUseImageMagick($useImageMagick); $specManager->setCreateTnImg($createTnImg); $specManager->setCreateLgImg($createLgImg); $specManager->setKeepOrig($keepOrig); $specManager->setCreateNewRec($createNewRec); $specManager->setCopyOverImg($copyOverImg); $specManager->setLogPath($logPath); $specManager->setSilent($silent); //Run process $specManager->batchLoadImages(); class SpecProcessorManager { private $conn;