//
// Alternatively, the contents of this file may be used under the terms of
// either the GNU General Public License Version 2 or later (the "GPL"), or
// the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
// in which case the provisions of the GPL or the LGPL are applicable instead
// of those above. If you wish to allow use of your version of this file only
// under the terms of either the GPL or the LGPL, and not to allow others to
// use your version of this file under the terms of the MPL, indicate your
// decision by deleting the provisions above and replace them with the notice
// and other provisions required by the GPL or the LGPL. If you do not delete
// the provisions above, a recipient may use your version of this file under
// the terms of any one of the MPL, the GPL or the LGPL.
//
// ***** END LICENSE BLOCK *****
?>
"Extensions","T"=>"Themes","U"=>"Updates");
$typename = $types["$type"];
//RSS Autodiscovery Link Stuff
switch ($_SESSION["category"]) {
case "Newest":
$rsslist = "newest";
break;
case "Popular":
$rsslist = "popular";
break;
case "Top Rated":
$rsslist = "rated";
break;
}
$rssfeed = "rss/?application=" . $application . "&type=" . $type . "&list=" . $rsslist;
if (!$category) {$categoryname = "All $typename"; } else {$categoryname = $category; }
?>
Mozilla Update :: Extensions - List -
";
}
?>
= '".strtolower($app_version)."' ";}
if ($OS) { $sql .=" AND (TOS.OSName = '$OS' OR TOS.OSName = 'All') "; }
if ($catname == "Popular") { $sql .=" AND TM.downloadcount > '5'"; }
$sql .="GROUP BY `Name` ";
if ($orderby) {
$sql .="ORDER BY $orderby";
} else {
$sql .="ORDER BY `Name` , `Version` DESC ";
}
$resultsquery = $sql;
unset($sql);
//Get Total Results from Result Query & Populate Page Control Vars.
$sql_result = mysql_query($resultsquery, $connection) or trigger_error("MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_NOTICE);
$totalresults = mysql_num_rows($sql_result);
$num_pages = ceil($totalresults/$items_per_page); //Total # of Pages
if ($pageid>$num_pages) {$pageid=$num_pages;} //Check PageId for Validity
$startpoint = ($pageid-1)*$items_per_page;
if ($startpoint<0) {$startpoint=0; $startitem=0;}
$startitem = $startpoint+1;
$enditem = $startpoint+$items_per_page;
if ($totalresults=="0") {$startitem = "0"; }
if ($enditem>$totalresults) {$enditem=$totalresults;} //Verify EndItem
if ($_GET[nextnum]) {$startpoint = $_GET["nextnum"]; }
//$resultsquery = str_replace("GROUP BY `Name` ", "", $resultsquery);
$resultsquery .= " LIMIT $startpoint , $items_per_page"; //Append LIMIT clause to result query
if ($category=="%") {$category = $catname; unset($catname); }
//Now Showing Box
if (!$category) {$categoryname="All"; } else {$categoryname = $category;}
echo"