hasPriv("admin") && !$_SESSION['current']->isMaintainer($oNote->iVersionId) && !$_SESSION['current']->isSuperMaintainer($oNote->iAppId)) { errorpage("Insufficient Privileges!"); exit; } if(isset($_REQUEST['sub'])) { if ($_REQUEST['sub'] == 'Delete') { $oNote->delete(); } else if ($_REQUEST['sub'] == 'Update') { $oNote->update($_REQUEST['noteTitle'],$_REQUEST['noteDesc']); } redirect(apidb_fullurl("appview.php?versionId={$oNote->iVersionId}")); } else { if (!isset($_REQUEST['preview'])) { $_REQUEST['noteTitle'] = $oNote->sTitle; $_REQUEST['noteDesc'] = $oNote->sDescription; $_REQUEST['appId'] = $oNote->iAppId; $_REQUEST['versionId'] = $oNote->iVersionId; } HtmlAreaLoaderScript(array("editor")); // show form apidb_header("Edit Application Note"); echo "