',"\n"; if ($sub) { if($sub == 'delete') { $query = "DELETE FROM appMaintainers WHERE maintainerId = $maintainerId;"; echo "$query"; $result = mysql_query($query); echo html_frame_start("Delete maintainer: $maintainerId",400,"",0); if(!$result) { //error echo "

Internal Error: unable to delete selected maintainer!

\n"; } else { //success echo "

Maintainer was successfully deleted

\n"; } echo html_frame_end(" "); echo html_back_link(1,'adminMaintainers.php'); } } else { //get available maintainers $query = "SELECT maintainerId, appId, versionId,". "userId, UNIX_TIMESTAMP(submitTime) as submitTime ". "from appMaintainers;"; $result = mysql_query($query); if(!$result || !mysql_num_rows($result)) { //no apps in queue echo html_frame_start("","90%"); echo '

There are no application maintainers.

',"\n"; echo html_frame_end(" "); } else { //show applist echo html_frame_start("","90%","",0); echo "\n\n"; echo "\n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo "\n\n"; $c = 1; while($ob = mysql_fetch_object($result)) { if ($c % 2 == 1) { $bgcolor = 'color0'; } else { $bgcolor = 'color1'; } echo "\n"; echo " \n"; echo " \n"; if(isSuperMaintainer($ob->appId)) { echo " \n"; echo " \n"; } else { echo " \n"; echo " \n"; } echo " \n"; echo " \n"; echo " \n\n"; $c++; } echo "
Submission DateUsernameApplication NameVersionSuper maintainer? 
".date("Y-n-t h:i:sa", $ob->submitTime)."  ".lookupUsername($ob->userId)."".appIdToName($ob->appId)."".versionIdToName($ob->versionId)." ".appIdToName($ob->appId)."".versionIdToName($ob->versionId)." ".lookupEmail($ob->userId)."  [delete] echo "
\n\n"; echo html_frame_end(" "); } } echo ""; apidb_footer(); ?>