hasPriv("admin")) util_show_error_page_and_exit("Insufficient privileges."); if($aClean['sSub'] == 'delete') { $oDistribution = new distribution($aClean['iDistributionId']); $oDistribution->delete(); util_redirect_and_exit($_SERVER['PHP_SELF']); } } $oDistribution = new distribution($aClean['iDistributionId']); /* Display distribution list if no id given */ if(!$oDistribution->iDistributionId) { apidb_header("View Distributions"); //get available Distributions $hResult = distribution::ObjectGetEntries(false); // show Distribution list echo html_frame_start("","90%","",0); echo "\n\n"; distribution::ObjectOutputHeader("color4"); for($c = 1; $oRow = mysql_fetch_object($hResult); $c++) { $oDistribution = distribution::ObjectGetInstanceFromRow($oRow); $oDistribution->display(($c % 2) ? "color0" : "color1"); } echo "
\n\n"; echo html_frame_end(" "); if ($_SESSION['current']->hasPriv("admin")) echo "[Add New Distribution]"; apidb_footer(); } else { //display page apidb_header("View Distribution"); echo html_frame_start("Distribution Information",500); echo "Distribution Name:"; if($oDistribution->sUrl) echo ""; echo $oDistribution->sName; if ($oDistribution->sUrl) { echo " (".$oDistribution->sUrl.")"; echo "
\n"; } else { echo "
\n"; } if($oDistribution->aTestingIds) { echo '

Testing Results for '.$oDistribution->sName.'
',"\n"; echo '',"\n"; echo '',"\n"; echo '',"\n"; echo '',"\n"; echo '',"\n"; echo '',"\n"; echo '',"\n"; echo '',"\n"; echo '',"\n"; echo '',"\n"; echo '',"\n"; foreach($oDistribution->aTestingIds as $iTestingId) { $oTest = new testData($iTestingId); $oVersion = new Version($oTest->iVersionId); $oApp = new Application($oVersion->iAppId); $oSubmitter = new User($oTest->iSubmitterId); $bgcolor = $oTest->sTestedRating; /* make sure the user can view the versions we list in the table */ /* otherwise skip over displaying the entries in this table */ if(!$_SESSION[current]->canViewApplication($oApp)) continue; if(!$_SESSION[current]->canViewVersion($oVersion)) continue; echo '',"\n"; echo '',"\n"; echo '',"\n"; echo '',"\n"; echo '',"\n"; echo '',"\n"; echo '',"\n"; echo '',"\n"; if ($_SESSION['current']->hasAppVersionModifyPermission($oVersion)) { echo '',"\n"; } echo '',"\n"; } echo '
Application VersionSubmitterDate SubmittedWine versionInstalls?Runs?Rating
',"\n"; echo $oApp->sName.' '.$oVersion->sName.'',"\n"; if($_SESSION['current']->isLoggedIn()) { echo $oSubmitter->sEmail ? "sEmail."\">":""; echo $oSubmitter->sRealname; echo $oSubmitter->sEmail ? "":""; } else echo $oSubmitter->sRealname; echo ''.date("M d Y", mysqltimestamp_to_unixtimestamp($oTest->sSubmitTime)).''.$oTest->sTestedRelease.' '.$oTest->sInstalls.' '.$oTest->sRuns.' '.$oTest->sTestedRating.' ',"\n"; echo 'Edit
',"\n"; } echo html_frame_end(); echo html_back_link(1); apidb_footer(); } ?>