diff --git a/.gitignore b/.gitignore index 5fb3fc28e1..7d1b0c58cd 100644 --- a/.gitignore +++ b/.gitignore @@ -3,4 +3,4 @@ .project .settings/org.eclipse.core.resources.prefs content/lang/header.fr.php -.settings/org.eclipse.php.ui.prefs +.settings/org.eclipse.php.ui.prefs \ No newline at end of file diff --git a/checklists/checklist.php b/checklists/checklist.php index da66edf0ea..3a5eff67ce 100644 --- a/checklists/checklist.php +++ b/checklists/checklist.php @@ -3,26 +3,27 @@ include_once($SERVER_ROOT.'/classes/ChecklistManager.php'); include_once($SERVER_ROOT.'/classes/MapSupport.php'); include_once($SERVER_ROOT.'/content/lang/checklists/checklist.'.$LANG_TAG.'.php'); -header("Content-Type: text/html; charset=".$CHARSET); +header('Content-Type: text/html; charset='.$CHARSET); -$action = array_key_exists("submitaction",$_REQUEST)?$_REQUEST["submitaction"]:""; -$clid = array_key_exists("clid",$_REQUEST)?$_REQUEST["clid"]:0; -if(!$clid && array_key_exists("cl",$_REQUEST)) $clid = $_REQUEST["cl"]; -$dynClid = array_key_exists("dynclid",$_REQUEST)?$_REQUEST["dynclid"]:0; -$pageNumber = array_key_exists("pagenumber",$_REQUEST)?$_REQUEST["pagenumber"]:1; -$pid = array_key_exists("pid",$_REQUEST)?$_REQUEST["pid"]:""; -$thesFilter = array_key_exists("thesfilter",$_REQUEST)?$_REQUEST["thesfilter"]:0; -$taxonFilter = array_key_exists("taxonfilter",$_REQUEST)?$_REQUEST["taxonfilter"]:""; -$showAuthors = array_key_exists("showauthors",$_REQUEST)?$_REQUEST["showauthors"]:0; -$showSynonyms = array_key_exists("showsynonyms",$_REQUEST)?$_REQUEST["showsynonyms"]:0; -$showCommon = array_key_exists("showcommon",$_REQUEST)?$_REQUEST["showcommon"]:0; -$showImages = array_key_exists("showimages",$_REQUEST)?$_REQUEST["showimages"]:0; -$showVouchers = array_key_exists("showvouchers",$_REQUEST)?$_REQUEST["showvouchers"]:0; -$showAlphaTaxa = array_key_exists("showalphataxa",$_REQUEST)?$_REQUEST["showalphataxa"]:0; -$searchCommon = array_key_exists("searchcommon",$_REQUEST)?$_REQUEST["searchcommon"]:0; -$searchSynonyms = array_key_exists("searchsynonyms",$_REQUEST)?$_REQUEST["searchsynonyms"]:0; -$defaultOverride = array_key_exists("defaultoverride",$_REQUEST)?$_REQUEST["defaultoverride"]:0; -$printMode = array_key_exists("printmode",$_REQUEST)?$_REQUEST["printmode"]:0; +$action = array_key_exists('submitaction',$_REQUEST)?$_REQUEST['submitaction']:''; +$clid = array_key_exists('clid',$_REQUEST)?$_REQUEST['clid']:0; +if(!$clid && array_key_exists('cl',$_REQUEST)) $clid = $_REQUEST['cl']; +$dynClid = array_key_exists('dynclid',$_REQUEST)?$_REQUEST['dynclid']:0; +$pageNumber = array_key_exists('pagenumber',$_REQUEST)?$_REQUEST['pagenumber']:1; +$pid = array_key_exists('pid',$_REQUEST)?$_REQUEST['pid']:''; +$thesFilter = array_key_exists('thesfilter',$_REQUEST)?$_REQUEST['thesfilter']:0; +$taxonFilter = array_key_exists('taxonfilter',$_REQUEST)?$_REQUEST['taxonfilter']:''; +$showAuthors = array_key_exists('showauthors',$_REQUEST)?$_REQUEST['showauthors']:0; +$showSynonyms = array_key_exists('showsynonyms',$_REQUEST)?$_REQUEST['showsynonyms']:0; +$showCommon = array_key_exists('showcommon',$_REQUEST)?$_REQUEST['showcommon']:0; +$showImages = array_key_exists('showimages',$_REQUEST)?$_REQUEST['showimages']:0; +$limitImagesToVouchers = array_key_exists('voucherimages',$_REQUEST)?$_REQUEST['voucherimages']:0; +$showVouchers = array_key_exists('showvouchers',$_REQUEST)?$_REQUEST['showvouchers']:0; +$showAlphaTaxa = array_key_exists('showalphataxa',$_REQUEST)?$_REQUEST['showalphataxa']:0; +$searchCommon = array_key_exists('searchcommon',$_REQUEST)?$_REQUEST['searchcommon']:0; +$searchSynonyms = array_key_exists('searchsynonyms',$_REQUEST)?$_REQUEST['searchsynonyms']:0; +$defaultOverride = array_key_exists('defaultoverride',$_REQUEST)?$_REQUEST['defaultoverride']:0; +$printMode = array_key_exists('printmode',$_REQUEST)?$_REQUEST['printmode']:0; //Sanitation if(!is_numeric($clid)) $clid = 0; @@ -35,6 +36,7 @@ if(!is_numeric($showSynonyms)) $showSynonyms = 0; if(!is_numeric($showCommon)) $showCommon = 0; if(!is_numeric($showImages)) $showImages = 0; +if(!is_numeric($limitImagesToVouchers)) $limitImagesToVouchers = 0; if(!is_numeric($showVouchers)) $showVouchers = 0; if(!is_numeric($showAlphaTaxa)) $showAlphaTaxa = 0; if(!is_numeric($searchCommon)) $searchCommon = 0; @@ -45,8 +47,8 @@ $statusStr=''; //Search Synonyms is default -if($action != "Rebuild List" && !array_key_exists('dllist_x',$_POST)) $searchSynonyms = 1; -if($action == "Rebuild List") $defaultOverride = 1; +if($action != 'Rebuild List' && !array_key_exists('dllist_x',$_POST)) $searchSynonyms = 1; +if($action == 'Rebuild List') $defaultOverride = 1; $clManager = new ChecklistManager(); if($clid) $clManager->setClid($clid); @@ -54,21 +56,22 @@ $clArray = $clManager->getClMetaData(); $activateKey = $KEY_MOD_IS_ACTIVE; $showDetails = 0; -if($clid && $clArray["defaultSettings"]){ - $defaultArr = json_decode($clArray["defaultSettings"], true); - $showDetails = $defaultArr["ddetails"]; +if($clid && $clArray['defaultSettings']){ + $defaultArr = json_decode($clArray['defaultSettings'], true); + $showDetails = $defaultArr['ddetails']; if(!$defaultOverride){ - if(array_key_exists('dsynonyms',$defaultArr)){$showSynonyms = $defaultArr["dsynonyms"];} - if(array_key_exists('dcommon',$defaultArr)){$showCommon = $defaultArr["dcommon"];} - if(array_key_exists('dimages',$defaultArr)){$showImages = $defaultArr["dimages"];} - if(array_key_exists('dvouchers',$defaultArr)){$showVouchers = $defaultArr["dvouchers"];} - if(array_key_exists('dauthors',$defaultArr)){$showAuthors = $defaultArr["dauthors"];} - if(array_key_exists('dalpha',$defaultArr)){$showAlphaTaxa = $defaultArr["dalpha"];} + if(array_key_exists('dsynonyms',$defaultArr)) $showSynonyms = $defaultArr['dsynonyms']; + if(array_key_exists('dcommon',$defaultArr)) $showCommon = $defaultArr['dcommon']; + if(array_key_exists('dimages',$defaultArr)) $showImages = $defaultArr['dimages']; + if(array_key_exists('dvoucherimages',$defaultArr)) $limitImagesToVouchers = $defaultArr['dvoucherimages']; + if(array_key_exists('dvouchers',$defaultArr)) $showVouchers = $defaultArr['dvouchers']; + if(array_key_exists('dauthors',$defaultArr)) $showAuthors = $defaultArr['dauthors']; + if(array_key_exists('dalpha',$defaultArr)) $showAlphaTaxa = $defaultArr['dalpha']; } if(isset($defaultArr['activatekey'])) $activateKey = $defaultArr['activatekey']; } if($pid) $clManager->setProj($pid); -elseif(array_key_exists("proj",$_REQUEST) && $_REQUEST['proj']) $pid = $clManager->setProj($_REQUEST['proj']); +elseif(array_key_exists('proj',$_REQUEST) && $_REQUEST['proj']) $pid = $clManager->setProj($_REQUEST['proj']); if($thesFilter) $clManager->setThesFilter($thesFilter); if($taxonFilter) $clManager->setTaxonFilter($taxonFilter); $clManager->setLanguage($LANG_TAG); @@ -81,6 +84,7 @@ if($showSynonyms) $clManager->setShowSynonyms(true); if($showCommon) $clManager->setShowCommon(true); if($showImages) $clManager->setShowImages(true); +if($limitImagesToVouchers) $clManager->setLimitImagesToVouchers(true); if($showVouchers) $clManager->setShowVouchers(true); if($showAlphaTaxa) $clManager->setShowAlphaTaxa(true); $clid = $clManager->getClid(); @@ -95,7 +99,7 @@ } $isEditor = false; -if($IS_ADMIN || (array_key_exists("ClAdmin",$USER_RIGHTS) && in_array($clid,$USER_RIGHTS["ClAdmin"]))){ +if($IS_ADMIN || (array_key_exists('ClAdmin',$USER_RIGHTS) && in_array($clid,$USER_RIGHTS['ClAdmin']))){ $isEditor = true; } if($isEditor && array_key_exists('formsubmit',$_POST)){ @@ -126,6 +130,12 @@ $( document ).tooltip(); } ); + function changeImageSource(elem){ + let f = document.optionform; + if(elem.id == "vi_voucher") f.voucherimages.value = "1"; + else f.voucherimages.value = "0"; + f.submit(); + } @@ -564,7 +565,7 @@ function requestImage(){ - >> + >>
@@ -858,10 +858,6 @@ function requestImage(){ -
-
- : - -
/css/jquery-ui.css" type="text/css" rel="stylesheet"> + + + @@ -146,7 +164,7 @@ - + @@ -266,7 +284,7 @@ - >> + >> - - - - $v){ - echo ''; - } - ?> - +
$occArr){ - if($occArr['sciname']){ - $occArr['sciname'] = ''.$occArr['sciname'].' '; - } - echo "
\n"; - echo ''."\n"; - foreach($headerMap as $k => $v){ - $displayStr = $occArr[$k]; - if(strlen($displayStr) > 60){ - $displayStr = substr($displayStr,0,60).'...'; - } - if(!$displayStr) $displayStr = ' '; - echo ''."\n"; - } - echo "\n"; - $recCnt++; + $tableId = 'defaulttable'; + $tableClass = 'styledtable'; + if($dynamicTable){ + $tableId = 'dynamictable'; + $tableClass = 'stripe hover order-column compact nowrap cell-border'; } ?> -
'.$v.'
'; - $url = 'occurrenceeditor.php?csmode='.$crowdSourceMode.'&occindex='.($recCnt+$recStart).'&occid='.$id.'&collid='.$collId; - echo ''.$id.' '; - echo ''; - echo ''; - echo ''; - echo ''.$displayStr.'
+ + + + + $v){ + echo ''; + } + ?> + + + + $occArr){ + if($occArr['sciname']){ + $occArr['sciname'] = ''.$occArr['sciname'].' '; + } + echo "\n"; + echo ''."\n"; + foreach($headerMap as $k => $v){ + $displayStr = $occArr[$k]; + if(strlen($displayStr) > 60){ + $displayStr = substr($displayStr,0,60).'...'; + } + if(!$displayStr) $displayStr = ' '; + echo ''."\n"; + } + echo "\n"; + $recCnt++; + } + ?> + +
'.$v.'
'; + $url = 'occurrenceeditor.php?csmode='.$crowdSourceMode.'&occindex='.($recCnt+$recStart).'&occid='.$id.'&collid='.$collId; + echo ''.$id.' '; + echo ''; + echo ''; + echo ''; + echo ''.$displayStr.'
+
diff --git a/collections/exsiccati/index.php b/collections/exsiccati/index.php index de84ff49a7..afa6b46da5 100644 --- a/collections/exsiccati/index.php +++ b/collections/exsiccati/index.php @@ -91,18 +91,12 @@ <?php echo $DEFAULT_TITLE; ?> Exsiccatae '; - echo ''; - echo ''; - } + include_once($SERVER_ROOT.'/includes/head.php'); include_once($SERVER_ROOT.'/includes/googleanalytics.php'); ?> - + + - + + diff --git a/collections/index.php b/collections/index.php index 89597ea08d..760362e41d 100644 --- a/collections/index.php +++ b/collections/index.php @@ -28,7 +28,8 @@ ?> - + + - + + - + +
-
+ + -