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