Exemplo n.º 1
0
}
$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;
$sqlFrag = array_key_exists("sqlfrag", $_REQUEST) ? $_REQUEST["sqlfrag"] : "";
$action = array_key_exists("submitaction", $_REQUEST) ? $_REQUEST["submitaction"] : "";
$displayMode = array_key_exists('displaymode', $_REQUEST) ? $_REQUEST['displaymode'] : 0;
$clManager = new ChecklistVoucherAdmin();
$clManager->setClid($clid);
$statusStr = "";
$isEditor = 0;
if ($isAdmin || array_key_exists("ClAdmin", $userRights) && in_array($clid, $userRights["ClAdmin"])) {
    $isEditor = 1;
    if ($action == "Save Search Terms") {
        $statusStr = $clManager->saveSql($_POST);
    } elseif ($action == 'Delete SQL Fragment') {
        $statusStr = $clManager->deleteSql();
    } elseif ($action == 'Add Vouchers') {
        $clManager->linkVouchers($_POST['occids']);
    } elseif ($action == 'Add Taxa and Vouchers') {
        $clManager->linkTaxaVouchers($_POST['occids'], array_key_exists('usecurrent', $_POST) ? $_POST['usecurrent'] : 0);
    }
}
?>

<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=<?php 
echo $charset;
?>