elseif($rightType == 'editor'){ $userRight = 'CollEditor-'.$collId; } elseif($rightType == 'rare'){ $userRight = 'RareSppReader-'.$collId; } $permManager->addPermission($_POST['uid'],$userRight); */ } elseif ($action == 'Add Identification Editor') { $identEditor = $_POST['identeditor']; $pTokens = explode(':', $identEditor); $permManager->addPermission($pTokens[0], 'CollTaxon', $collId, $pTokens[1]); //$permManager->addPermission($pTokens[0],'CollTaxon-'.$collId.':'.$pTokens[1]); } } $collMetadata = current($permManager->getCollectionMetadata($collId)); $isGenObs = 0; if ($collMetadata['colltype'] == 'General Observations') { $isGenObs = 1; } ?> <html> <head> <title><?php echo $collMetadata['collectionname']; ?> Collection Permissions</title> <link href="../../css/base.css?<?php echo $CSS_VERSION; ?> " type="text/css" rel="stylesheet" />
<?php } else { $showRareSppOption = false; } if (!array_key_exists("RareSppReadAll", $userPermissions)) { ?> <div style="margin-left:5px;"> <input type='checkbox' name='p[]' value='RareSppReadAll' /> Can read Rare Species data for all collections </div> <?php } else { $showRareSppOption = false; } //Collection projects $collArr = $userManager->getCollectionMetadata(0, 'specimens'); $obserArr = $userManager->getCollectionMetadata(0, 'observations'); if (array_key_exists("CollAdmin", $userPermissions)) { $collArr = array_diff_key($collArr, $userPermissions["CollAdmin"]); $obserArr = array_diff_key($obserArr, $userPermissions["CollAdmin"]); } if ($collArr) { ?> <div style="float:right;margin:10px;"> <input type='submit' name='apsubmit' value='Add Permission' /> </div> <h3>Specimen Collections</h3> <table> <tr> <th>Admin</th> <th>Editor</th>