GetCD($cd_id); if (!IS_ADMIN) die('Foei!'); ?> OpenMath: Admin: Add CD support PrintClickPath(array('CDs' => 'omcds.php', $cdar['cd_name'] => 'omdefs.php?cd_id='.$cd_id, 'Add support' => '')); if (isset($_POST['ipt_cas_id'])) { $ipt_enc = ( @$_POST['ipt_enc'] == 'on' ? 1 : 0 ); $ipt_dec = ( @$_POST['ipt_dec'] == 'on' ? 1 : 0 ); $ipt_refurl = @$_POST['ipt_refurl']; foreach ($_POST['ipt_cas_id'] as $cas_id => $action) { if ($action == 'add') { $omdb->AddCDCas($cd_id, $cas_id, $ipt_enc, $ipt_dec, $ipt_refurl); } else if ($action == 'remv') { $omdb->RemvCDCas($cd_id, $cas_id); } else if ($action != 'inv') { die ('Unknown action -- '.$action); } } } if (!$cd_id) { echo "Something's wrong here."; } else { echo $omdb->PrintAddCasForm($cd_id); } ?>