hasPriv("admin")) { errorpage("Insufficient privileges."); exit; } apidb_header("Admin Maintainers"); echo '
',"\n"; if ($_REQUEST['sub']) { if($_REQUEST['sub'] == 'delete') { $sQuery = "DELETE FROM appMaintainers WHERE maintainerId = ".$_REQUEST['maintainerId'].";"; $hResult = query_appdb($sQuery); echo html_frame_start("Delete maintainer: ".$_REQUEST['maintainerId'],400,"",0); if($hResult) { // success echo "

Maintainer was successfully deleted

\n"; } echo html_frame_end(" "); echo html_back_link(1,'adminMaintainers.php'); } } else { // get available maintainers $sQuery = "SELECT * FROM appMaintainers, user_list where appMaintainers.userId = user_list.userid"; $sQuery.= " ORDER BY realname;"; $hResult = query_appdb($sQuery); if(!$hResult || !mysql_num_rows($hResult)) { // no apps 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\n"; $c = 1; $oldUserId = 0; while($ob = mysql_fetch_object($hResult)) { $oUser = new User($ob->userId); if ($c % 2 == 1) { $bgcolor = 'color0'; } else { $bgcolor = 'color1'; } /* if this is a new user we should print a header that has the aggregate of the applications */ /* the user super maintains and versions they maintain */ if($ob->userId != $oldUserId) { $style = "border-top:thin solid;border-bottom:thin solid"; echo "\n"; echo " \n"; if($oUser->sRealname == "") echo " \n"; else echo " \n"; $count = $oUser->getMaintainerCount(true); if($count == 0) echo " \n"; else if($count <= 1) echo " \n"; else echo " \n"; $count = $oUser->getMaintainerCount(false); if($count == 0) echo " \n"; else if($count <= 1) echo " \n"; else echo " \n"; echo " \n"; echo "\n\n"; $oldUserId = $ob->userId; } echo "\n"; echo " \n"; echo " \n"; if($ob->superMaintainer) { echo " \n"; echo " \n"; } else { echo " \n"; echo " \n"; } echo " \n"; echo "\n\n"; $c++; } echo "
Submission DateMaintainerApplicationVersionAction
Maintainer summarysEmail."\"> sEmail."\">".$oUser->sRealname." ".$count." app".$count." apps ".$count." version".$count." versions 
".print_date(mysqldatetime_to_unixtimestamp($ob->submitTime))."  sEmail."\">".$oUser->sRealname."".lookup_app_name($ob->appId)."*".lookup_app_name($ob->appId)."".lookup_version_name($ob->versionId)." [delete]
\n\n"; echo html_frame_end(" "); } } echo "
"; apidb_footer(); ?>