\n\n"; echo "\n"; echo " Application Name\n"; echo " Description\n"; echo "\n\n"; $c = 0; while($ob = query_fetch_object($hResult)) { $oApp = new application($ob->appId); //set row color $bgcolor = ($c % 2 == 0) ? "color0" : "color1"; //display row echo "\n"; echo " ".$oApp->objectMakeLink()."\n"; echo " ".util_trim_description($oApp->sDescription)."\n"; echo "\n\n"; $c++; } echo "\n\n"; echo html_frame_end(); } // if both iAppId and iVersionId are empty we have a problem if(empty($aClean['iAppId']) && empty($aClean['iVersionId'])) util_show_error_page_and_exit("Something went wrong with the application or version id"); if (isset($aClean['sSub'])) { // create the version object if iVersionId is set // we use this version object in many of the below cases if(isset($aClean['iVersionId'])) $oVersion = new Version($aClean['iVersionId']); if(($aClean['sSub'] == 'delete' ) && ($aClean['iBuglinkId'])) { if(($_SESSION['current']->hasPriv("admin") || $_SESSION['current']->isMaintainer($oVersion->iVersionId) || $_SESSION['current']->isSuperMaintainer($oVersion->iAppId))) { $oBuglink = new Bug($aClean['iBuglinkId']); $oBuglink->delete(); util_redirect_and_exit($oVersion->objectMakeUrl()); } } if(($aClean['sSub'] == 'unqueue' ) && ($aClean['iBuglinkId'])) { if(($_SESSION['current']->hasPriv("admin") || $_SESSION['current']->isMaintainer($oVersion->iVersionId) || $_SESSION['current']->isSuperMaintainer($oVersion->iAppId))) { $oBuglink = new Bug($aClean['iBuglinkId']); $oBuglink->unqueue(); util_redirect_and_exit($oVersion->objectMakeUrl()); } } } /** * We want to see an application family (=no version). */ if( isset($aClean['iAppId']) ) { $oApp = new Application($aClean['iAppId']); $oApp->display(); } else if( isset($aClean['iVersionId']) ) // We want to see a particular version. { $oVersion = new Version($aClean['iVersionId']); $iTestingId = isset($aClean['iTestingId']) ? $aClean['iTestingId'] : null; $oVersion->display($iTestingId); } else { // Oops! Called with no params, bad llamah! util_show_error_page_and_exit('Page Called with No Params!'); } apidb_footer(); ?>