include("path.php"); require(BASE."include/"."incl.php"); require(BASE."include/"."tableve.php"); require(BASE."include/"."category.php"); if(!loggedin()) { errorpage("You need to be logged in to apply to be a maintainer."); exit; } opendb(); $appId = strip_tags($_POST['appId']); $versionId = strip_tags($_POST['versionId']); $confirmed = strip_tags($_POST['confirmed']); $superMaintainer = strip_tags($_POST['superMaintainer']); // header if($superMaintainer) apidb_header("Confirm supermaintainer resignation of ".appIdToName($appId)); else apidb_header("Confirm maintainer resignation of ".appIdToName($appId).versionIdToName($versionId)); if($confirmed) { global $current; echo html_frame_start("Removing",400,"",0); if($superMaintainer) $query = "DELETE FROM appMaintainers WHERE userId = '$current->userid' AND appId = '$appId' AND superMaintainer = '$superMaintainer';"; else $query = "DELETE FROM appMaintainers WHERE userId = '$current->userid' AND appId = '$appId' AND versionId = '$versionId' AND superMaintainer = '$superMaintainer';"; echo "$query"; $result = mysql_query($query); if($result) { if($superMaintainer) echo "You were removed as a supermaintainer of ".appIdToName($appId); else echo "You were removed as a maintainer of ".appIdToName($appId).versionIdToName($versionId); } else { //error echo "
Database Error!
".mysql_error()."