include_once '../config/symbini.php';
include_once $SERVER_ROOT . '/classes/ChecklistAdmin.php';
header("Content-Type: text/html; charset=" . $charset);
if (!$SYMB_UID) {
    header('Location: ../profile/index.php?refurl=../checklists/checklistadmin.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;
$action = array_key_exists("submitaction", $_REQUEST) ? $_REQUEST["submitaction"] : "";
$clManager = new ChecklistAdmin();
if (!$clid && isset($_POST['delclid'])) {
    $clid = $_POST['delclid'];
}
$clManager->setClid($clid);
$statusStr = "";
$isEditor = 0;
if ($IS_ADMIN || array_key_exists("ClAdmin", $USER_RIGHTS) && in_array($clid, $USER_RIGHTS["ClAdmin"])) {
    $isEditor = 1;
    //Submit checklist MetaData edits
    if ($action == "Submit Changes") {
        $editArr = array();
        $defaultViewArr = array();
        $defaultViewArr["ddetails"] = array_key_exists("ddetails", $_REQUEST) ? 1 : 0;
        $defaultViewArr["dcommon"] = array_key_exists("dcommon", $_REQUEST) ? 1 : 0;
        $defaultViewArr["dimages"] = array_key_exists("dimages", $_REQUEST) ? 1 : 0;
        $defaultViewArr["dvouchers"] = array_key_exists("dvouchers", $_REQUEST) ? 1 : 0;
        $defaultViewArr["dauthors"] = array_key_exists("dauthors", $_REQUEST) ? 1 : 0;
        $defaultView = json_encode($defaultViewArr);
        foreach ($_REQUEST as $k => $v) {
Exemple #2
0
        }
        if ($_POST["notes"]) {
            $dataArr["notes"] = $_POST["notes"];
        }
        if ($_POST["source"]) {
            $dataArr["source"] = $_POST["source"];
        }
        if ($_POST["internalnotes"]) {
            $dataArr["internalnotes"] = $_POST["internalnotes"];
        }
        $setRareSpp = false;
        if ($_POST["cltype"] == 'rarespp') {
            $setRareSpp = true;
        }
        $clAdmin = new ChecklistAdmin();
        $clAdmin->setClid($clid);
        $statusStr = $clAdmin->addNewSpecies($dataArr, $setRareSpp);
    }
}
$taxaArray = array();
if ($clValue || $dynClid) {
    $taxaArray = $clManager->getTaxaList($pageNumber, $printMode ? 0 : 500);
}
?>
<html>
<head>
	<meta charset="<?php 
echo $CHARSET;
?>
">
	<title><?php