isLoggedIn()) { errorpage("You need to be logged in to resign from being a maintainer."); exit; } $appId = strip_tags($_POST['appId']); $versionId = strip_tags($_POST['versionId']); $confirmed = strip_tags($_POST['confirmed']); $superMaintainer = strip_tags($_POST['superMaintainer']); if($confirmed) { $oApp = new Application($appId); if($superMaintainer) { apidb_header("You have resigned as supermaintainer of ".$oApp->sName); $query = "DELETE FROM appMaintainers WHERE userId = ".$_SESSION['current']->iUserId. " AND appId = ".$oApp->iAppId." AND superMaintainer = ".$superMaintainer.";"; } else { $oVersion = new Version($versionId); apidb_header("You have resigned as maintainer of ".$oApp->sName." ".$oVersion->sName); $query = "DELETE FROM appMaintainers WHERE userId = ".$_SESSION['current']->iUserId. " AND appId = ".$oApp->iAppId." AND versionId = ".$oVersion->iVersionId." AND superMaintainer = ".$superMaintainer.";"; } /* echo html_frame_start("Removing",400,"",0); */ if($result = query_appdb($query)) { if($superMaintainer) echo "You were removed as a supermaintainer of ".$oApp->sName; else echo "You were removed as a maintainer of ".$oApp->sName." ".$oVersion->sName; } } else { if($superMaintainer) apidb_header("Confirm supermaintainer resignation of ".$oApp->sName); else apidb_header("Confirm maintainer resignation of ".$oApp->sName." ".$oVersion->sName); echo '