hasPriv("admin")) { util_show_error_page("Insufficient privileges."); exit; } if($aClean['sub'] == 'delete') { $oDistribution = new distribution($aClean['iDistributionId']); $oDistribution->delete(); redirect($_SERVER['PHP_SELF']); } } $oDistribution = new distribution($aClean['iDistributionId']); //exit with error if no vendor if(!$oDistribution->iDistributionId) { apidb_header("View Distributions"); //get available Distributions $hResult = query_parameters("SELECT distributionId FROM distributions ORDER BY name, distributionId;"); // show Distribution list echo html_frame_start("","90%","",0); echo "\n\n"; echo "\n"; echo " \n"; echo " \n"; echo " \n"; if ($_SESSION['current']->hasPriv("admin")) echo " \n"; echo "\n\n"; $c = 1; while($oRow = mysql_fetch_object($hResult)) { if ($c % 2 == 1) { $bgcolor = 'color0'; } else { $bgcolor = 'color1'; } $oDistribution = new distribution($oRow->distributionId); echo "\n"; echo " \n"; echo " \n"; echo " \n"; if ($_SESSION['current']->hasPriv("admin")) { echo " \n"; } echo "\n"; $c++; } echo "
Distribution nameDistribution urlLinked TestsAction
iDistributionId."\">","\n"; echo $oDistribution->sName."sUrl."\">".$oDistribution->sUrl."".sizeof($oDistribution->aTestingIds).""; echo "[edit]"; if(!sizeof($oDistribution->aTestingIds)) echo "   [iDistributionId."'>delete]"; 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(); } ?>