Main";
echo html_frame_start("", '98%', '', 2);
if (empty($aClean['sRating']))
{
echo "Rating: $sPathtrail";
echo html_frame_end();
echo html_frame_start("", '98%', '', 2);
echo "
\n";
echo " | Rating | \n";
echo " Description | \n";
echo " No. Apps | \n";
echo " \n";
html_tr_highlight_clickable("browse_by_rating.php?sRating=".PLATINUM_RATING, "platinum", "platinum", "platinum");
echo " Platinum | ";
echo " Applications that install and run out of the box | \n";
echo " ".Application::countWithRating(PLATINUM_RATING)." | \n";
echo " \n";
html_tr_highlight_clickable("browse_by_rating.php?sRating=".GOLD_RATING, "gold", "gold", "gold");
echo " Gold | ";
echo " Applications that work flawlessly with some DLL overrides or other settings, crack etc. | \n";
echo " ".Application::countWithRating(GOLD_RATING)." | \n";
echo " \n";
html_tr_highlight_clickable("browse_by_rating.php?sRating=".SILVER_RATING, "silver", "silver", "silver");
echo " Silver | ";
echo " Applications that work excellently for 'normal use' | \n";
echo " ".Application::countWithRating(SILVER_RATING)." | \n";
echo " \n";
html_tr_highlight_clickable("browse_by_rating.php?sRating=".BRONZE_RATING, "bronze", "bronze", "bronze");
echo " Bronze | ";
echo " Applications that work but have some issues, even for 'normal use' | \n";
echo " ".Application::countWithRating(BRONZE_RATING)." | \n";
echo " \n";
html_tr_highlight_clickable("browse_by_rating.php?sRating=".GARBAGE_RATING, "garbage", "garbage", "garbage");
echo " Garbage | ";
echo " Applications that don't work as intended, there should be at least one bug report if an app gets this rating | \n";
echo " ".Application::countWithRating(GARBAGE_RATING)." | \n";
echo " \n";
echo "
\n";
echo html_frame_end();
} else
{
/* display a range of 10 pages */
$iPageRange = 10;
$iItemsPerPage = 50;
$iCurrentPage = 1;
if($aClean['iItemsPerPage'])
$iItemsPerPage = $aClean['iItemsPerPage'];
if($aClean['iPage'])
$iCurrentPage = $aClean['iPage'];
$iItemsPerPage = min($iItemsPerPage,500);
switch($aClean['sRating'])
{
case PLATINUM_RATING:
$sPathtrail.=" > Platinum";
$iTotalPages = ceil(Application::countWithRating(PLATINUM_RATING)/$iItemsPerPage);
$sRating = PLATINUM_RATING;
break;
case GOLD_RATING:
$sPathtrail.=" > Gold";
$iTotalPages = ceil(Application::countWithRating(GOLD_RATING)/$iItemsPerPage);
$sRating = GOLD_RATING;
break;
case SILVER_RATING:
$sPathtrail.=" > Silver";
$iTotalPages = ceil(Application::countWithRating(SILVER_RATING)/$iItemsPerPage);
$sRating = SILVER_RATING;
break;
case BRONZE_RATING:
$sPathtrail.=" > Bronze";
$iTotalPages = ceil(Application::countWithRating(BRONZE_RATING)/$iItemsPerPage);
$sRating = BRONZE_RATING;
break;
case GARBAGE_RATING:
$sPathtrail.=" > Garbage";
$iTotalPages = ceil(Application::countWithRating(GARBAGE_RATING)/$iItemsPerPage);
$sRating=GARBAGE_RATING;
break;
}
$iCurrentPage = min($iCurrentPage,$iTotalPages);
$iOffset = (($iCurrentPage-1) * $iItemsPerPage);
$apps=Application::getWithRating($sRating, $iOffset, $iItemsPerPage);
echo "Rating: $sPathtrail";
echo html_frame_end();
/* display page selection links */
echo "
";
echo "Page $iCurrentPage of $iTotalPages
";
display_page_range($iCurrentPage, $iPageRange, $iTotalPages,
$_SERVER['PHP_SELF']."?sRating=".$aClean['sRating']."&iItemsPerPage=".$iItemsPerPage);
echo "
";
echo "
";
/* display the option to choose how many applications per-page to display */
echo '";
echo "";
echo html_frame_start("","98%","",0);
echo "\n\n";
echo "\n";
echo " | Application Name | \n";
echo " Description | \n";
echo " No. Versions | \n";
echo "
\n\n";
while(list($i, $iAppId) = each($apps))
{
$oApp = new Application($iAppId);
//set row color
$bgcolor = ($i % 2) ? "color0" : "color1";
//format desc
$desc = util_trim_description($oApp->sDescription);
//display row
echo "\n";
echo " | ".$oApp->sName." | \n";
echo " $desc | \n";
echo " ".sizeof($oApp->aVersionsIds)." | \n";
echo "
\n\n";
}
echo "
\n\n";
echo html_frame_end();
echo "";
display_page_range($iCurrentPage, $iPageRange, $iTotalPages,
$_SERVER['PHP_SELF']."?sRating=".$aClean['sRating']."&iItemsPerPage=".$iItemsPerPage);
echo "";
}
apidb_footer();
?>