2004-08-30 00:55:50 +04:00
< ? php
// ***** BEGIN LICENSE BLOCK *****
// Version: MPL 1.1/GPL 2.0/LGPL 2.1
//
// The contents of this file are subject to the Mozilla Public License Version
// 1.1 (the "License"); you may not use this file except in compliance with
// the License. You may obtain a copy of the License at
// http://www.mozilla.org/MPL/
//
// Software distributed under the License is distributed on an "AS IS" basis,
// WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
// for the specific language governing rights and limitations under the
// License.
//
// The Original Code is Mozilla Update.
//
// The Initial Developer of the Original Code is
// Chris "Wolf" Crews.
// Portions created by the Initial Developer are Copyright (C) 2004
// the Initial Developer. All Rights Reserved.
//
// Contributor(s):
// Chris "Wolf" Crews <psychoticwolf@carolina.rr.com>
//
// 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 *****
?>
< ? php
require " ../core/config.php " ;
?>
2004-12-09 09:34:53 +03:00
<! DOCTYPE HTML PUBLIC " -//W3C//DTD HTML 4.01//EN " " http://www.w3.org/TR/html4/strict.dtd " >
< html lang = " en " >
2004-08-30 00:55:50 +04:00
< head >
< ? php
//----------------------------
2004-12-09 09:34:53 +03:00
//Global $_GET variables
2004-08-30 00:55:50 +04:00
//----------------------------
2004-12-09 09:34:53 +03:00
if ( $_GET [ " numpg " ]) { $items_per_page = escape_string ( $_GET [ " numpg " ]); } else { $items_per_page = " 10 " ;} //Default Num per Page is 10
if ( $_GET [ " category " ]) { $category = escape_string ( $_GET [ " category " ]); }
2004-08-30 00:55:50 +04:00
if ( $category == " All " ) { $category = " " ;}
2004-12-09 09:34:53 +03:00
if ( ! $_GET [ " pageid " ]) { $pageid = " 1 " ; } else { $pageid = escape_string ( $_GET [ " pageid " ]); } //Default PageID is 1
2004-08-30 00:55:50 +04:00
$type = " T " ; //Default Type is T
unset ( $typename );
$types = array ( " E " => " Extensions " , " T " => " Themes " , " U " => " Updates " );
$typename = $types [ " $type " ];
2004-10-07 10:36:17 +04:00
//RSS Autodiscovery Link Stuff
2004-08-30 00:55:50 +04:00
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 ; }
?>
< TITLE > Mozilla Update :: Themes - List - < ? php echo " $categoryname " ; if ( $pageid ) { echo " - Page $pageid " ; } ?> </TITLE>
< ? php
if ( $rsslist ) {
echo " <link rel= \" alternate \" type= \" application/rss+xml \" title= \" RSS \" href= \" http:// $_SERVER[HTTP_HOST] / $rssfeed\ " > " ;
}
?>
2004-10-07 10:36:17 +04:00
2004-08-30 00:55:50 +04:00
< ? php
2004-12-01 01:54:24 +03:00
installtrigger ( " themes " );
2004-08-30 00:55:50 +04:00
include " $page_header " ;
2004-12-09 09:34:53 +03:00
?>
< div id = " mBody " >
< ? php
include " inc_sidebar.php " ;
?>
< div id = " mainContent " >
2004-08-30 00:55:50 +04:00
2004-12-09 09:34:53 +03:00
< ? php
2004-08-30 00:55:50 +04:00
//Query for List Creation
$s = " 0 " ;
$startpoint = ( $pageid - 1 ) * $items_per_page ;
if ( $category == " Editors Pick " or $category == " Newest " or $category == " Popular " or $category == " Top Rated " ) {
if ( $category == " Editors Pick " ) {
$editorpick = " true " ;
} else if ( $category == " Newest " ) {
$orderby = " TV.DateAdded DESC, `Name` ASC " ;
} else if ( $category == " Popular " ) {
2004-10-07 10:36:17 +04:00
$orderby = " TM.downloadcount DESC, `Name` ASC " ;
2004-08-30 00:55:50 +04:00
} else if ( $category == " Top Rated " ) {
$orderby = " TM.Rating DESC, `Name` ASC " ;
}
$catname = $category ;
$category = " % " ;
}
2004-12-09 09:34:53 +03:00
2004-10-07 10:36:17 +04:00
$sql = " SELECT TM.ID, TM.Name, TM.DateAdded, TM.DateUpdated, TM.Homepage, TM.Description, TM.Rating, TM.TotalDownloads, TM.downloadcount, TV.vID,
2004-08-30 00:55:50 +04:00
SUBSTRING ( MAX ( CONCAT ( LPAD ( TV . Version , 6 , '0' ), TV . vID )), 7 ) AS MAXvID ,
MAX ( TV . Version ) AS Version ,
TA . AppName , TOS . OSName
2004-12-09 09:34:53 +03:00
FROM `main` TM
INNER JOIN version TV ON TM . ID = TV . ID
INNER JOIN applications TA ON TV . AppID = TA . AppID
INNER JOIN os TOS ON TV . OSID = TOS . OSID " ;
if ( $category && $category !== " % " ) { $sql .= " INNER JOIN categoryxref TCX ON TM.ID = TCX.ID
INNER JOIN categories TC ON TCX . CategoryID = TC . CategoryID " ; }
if ( $editorpick == " true " ) { $sql .= " INNER JOIN reviews TR ON TM.ID = TR.ID " ; }
2004-08-30 00:55:50 +04:00
$sql .= " WHERE Type = ' $type ' AND AppName = ' $application ' AND `approved` = 'YES' " ;
if ( $editorpick == " true " ) { $sql .= " AND TR.Pick = 'YES' " ; }
if ( $category && $category !== " % " ) { $sql .= " AND CatName LIKE ' $category ' " ;}
if ( $app_version ) { $sql .= " AND TV.MinAppVer_int <= ' " . strtolower ( $app_version ) . " ' AND TV.MaxAppVer_int >= ' " . strtolower ( $app_version ) . " ' " ;}
2004-12-09 09:34:53 +03:00
if ( $OS ) { $sql .= " AND (TOS.OSName = ' $OS ' OR TOS.OSName = 'All') " ; }
2004-10-07 10:36:17 +04:00
if ( $catname == " Popular " ) { $sql .= " AND TM.downloadcount > '5' " ; }
2004-08-30 00:55:50 +04:00
$sql .= " GROUP BY `Name` " ;
if ( $orderby ) {
$sql .= " ORDER BY $orderby " ;
} else {
$sql .= " ORDER BY `Name` , `Version` DESC " ;
}
2004-10-07 10:36:17 +04:00
2004-08-30 00:55:50 +04:00
$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
2005-01-17 05:45:01 +03:00
if ( $_GET [ nextnum ]) { $startpoint = escape_string ( $_GET [ " nextnum " ]); }
2004-08-30 00:55:50 +04:00
//$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
2004-10-07 10:36:17 +04:00
if ( ! $category ) { $categoryname = " All " ; } else { $categoryname = $category ;}
2004-12-09 09:34:53 +03:00
echo " <H2> " . ucwords ( " $application $typename » $categoryname " ) . " </H2> \n " ;
2004-10-07 10:36:17 +04:00
2004-08-30 00:55:50 +04:00
if ( ! $OS ) { $OS = " all " ;}
if ( ! $category ) { $categoryname = " All " ; } else { $categoryname = $category ;}
2004-10-07 10:36:17 +04:00
echo " " . ucwords ( " $typename " ) . " $startitem - $enditem of $totalresults | " ;
2004-08-30 00:55:50 +04:00
$previd = $pageid - 1 ;
if ( $previd > " 0 " ) {
2004-12-09 09:34:53 +03:00
echo " <a href= \" ? " . uriparams () . " &pageid= $previd\ " >& #171; Previous</A> • ";
2004-08-30 00:55:50 +04:00
}
echo " Page $pageid of $num_pages " ;
$nextid = $pageid + 1 ;
if ( $pageid < $num_pages ) {
2004-12-09 09:34:53 +03:00
echo " • <a href= \" ? " . uriparams () . " &pageid= $nextid\ " > Next & #187;</a>";
2004-08-30 00:55:50 +04:00
}
2004-12-09 09:34:53 +03:00
echo " <br> \n " ;
$sql = " SELECT `CatDesc` FROM `categories` WHERE `CatName`=' $category ' and `CatType`=' $type ' LIMIT 1 " ;
$sql_result = mysql_query ( $sql , $connection ) or trigger_error ( " MySQL Error " . mysql_errno () . " : " . mysql_error () . " " , E_USER_NOTICE );
$row = mysql_fetch_array ( $sql_result );
$categorydescription = $row [ " CatDesc " ];
if ( $category == " All " ) { $categorydescription = " All listed themes for $application " ;}
if ( $categorydescription ) { echo " $categorydescription <br> \n " ;}
2004-08-30 00:55:50 +04:00
// Modify List Form
2004-10-07 10:36:17 +04:00
echo " <DIV class= \" key-point \" > " ;
2004-08-30 00:55:50 +04:00
echo " <FORM NAME= \" listviews \" METHOD= \" GET \" ACTION= \" showlist.php \" > \n " ;
2004-12-09 09:34:53 +03:00
echo " <div> " ;
echo " <INPUT NAME= \" application \" TYPE= \" hidden \" VALUE= \" $application\ " > \n " ;
2004-11-27 21:55:27 +03:00
echo " <INPUT NAME= \" category \" TYPE= \" hidden \" VALUE= \" $category\ " > \n " ;
2004-08-30 00:55:50 +04:00
//Items-Per-Page
echo " Show/Page: " ;
$perpage = array ( " 5 " , " 10 " , " 20 " , " 50 " );
echo " <SELECT name= \" numpg \" > " ;
foreach ( $perpage as $value ) {
echo " <OPTION value= \" $value\ " " ;
if ( $items_per_page == $value ) { echo " SELECTED " ; }
echo " > $value </OPTION> " ;
}
echo " </SELECT> \n " ;
2004-10-07 10:36:17 +04:00
2004-08-30 00:55:50 +04:00
// Operating Systems
echo " OS: " ;
echo " <SELECT name= \" os \" > \n " ;
2004-12-09 09:34:53 +03:00
$sql = " SELECT `OSName` FROM `os` ORDER BY `OSName` " ;
2004-08-30 00:55:50 +04:00
$sql_result = mysql_query ( $sql , $connection ) or trigger_error ( " MySQL Error " . mysql_errno () . " : " . mysql_error () . " " , E_USER_NOTICE );
while ( $row = mysql_fetch_array ( $sql_result )) {
$osname = $row [ " OSName " ];
echo " <OPTION value= \" " . strtolower ( $osname ) . " \" " ;
if ( strtolower ( $OS ) == strtolower ( $osname )) { echo " SELECTED " ;}
echo " > $osname </OPTION> " ;
}
echo " </SELECT> \n " ;
//Versions of Application
echo " Versions: " ;
echo " <SELECT name= \" version \" > " ;
if ( $application != " thunderbird " ) { echo " <OPTION value= \" auto-detect \" >Auto-Detect</OPTION> " ;}
$app_orig = $application ; //Store original to protect against possible corruption
2004-12-09 09:34:53 +03:00
$sql = " SELECT `Version`, `major`, `minor`, `release`, `SubVer` FROM `applications` WHERE `AppName` = ' $application ' AND `public_ver` = 'YES' ORDER BY `major` DESC, `minor` DESC, `release` DESC, `SubVer` DESC " ;
2004-08-30 00:55:50 +04:00
$sql_result = mysql_query ( $sql , $connection ) or trigger_error ( " MySQL Error " . mysql_errno () . " : " . mysql_error () . " " , E_USER_NOTICE );
while ( $row = mysql_fetch_array ( $sql_result )) {
$version = $row [ " Version " ];
$subver = $row [ " SubVer " ];
$release = " $row[major] . $row[minor] " ;
if ( $row [ " release " ]) { $release = " . $release $row[release] " ;}
if ( $app_version == " 0.95 " ) { $app_version = " 0.10 " ; }
//Firesomething Support
if ( $application == " firefox " ) { if ( $release == " 0.7 " ) { $application = " firebird " ;} else { $application = " firefox " ;} }
if ( $subver !== " final " ) { $release = " $release $subver " ;}
echo " <OPTION value= \" $release\ " " ;
if ( $app_version == $release ) { echo " SELECTED " ; }
echo " > " . ucwords ( $application ) . " $version </OPTION> " ;
if ( $app_version == " 0.10 " ) { $app_version = " 0.95 " ; }
}
$application = $app_orig ; unset ( $app_orig );
2004-10-07 10:36:17 +04:00
2004-08-30 00:55:50 +04:00
echo " </SELECT> \n " ;
echo " <INPUT NAME= \" submit \" TYPE= \" SUBMIT \" VALUE= \" Update \" > " ;
2004-12-09 09:34:53 +03:00
echo " </div></FORM> " ;
2004-08-30 00:55:50 +04:00
echo " </DIV> \n " ;
2004-12-09 09:34:53 +03:00
echo " <br> \n " ;
2004-08-30 00:55:50 +04:00
//---------------------------------
// Begin List
//---------------------------------
//Get Author Data and Create $authorarray and $authorids
2004-12-09 09:34:53 +03:00
$sql = " SELECT TM.Name, TU.UserName, TU.UserID, TU.UserEmail FROM `main` TM
LEFT JOIN authorxref TAX ON TM . ID = TAX . ID
INNER JOIN userprofiles TU ON TAX . UserID = TU . UserID
ORDER BY `Type` , `Name` ASC " ;
2004-08-30 00:55:50 +04:00
$sql_result = mysql_query ( $sql , $connection ) or trigger_error ( " MySQL Error " . mysql_errno () . " : " . mysql_error () . " " , E_USER_NOTICE );
while ( $row = mysql_fetch_array ( $sql_result )) {
$authorarray [ $row [ Name ]][] = $row [ " UserName " ];
$authorids [ $row [ UserName ]] = $row [ " UserID " ];
}
//Assemble a display application version array
2004-12-09 09:34:53 +03:00
$sql = " SELECT `Version`, `major`, `minor`, `release`, `SubVer` FROM `applications` WHERE `AppName`=' $application ' ORDER BY `major`,`minor` " ;
2004-08-30 00:55:50 +04:00
$sql_result = mysql_query ( $sql , $connection ) or trigger_error ( " MySQL Error " . mysql_errno () . " : " . mysql_error () . " " , E_USER_NOTICE );
while ( $row = mysql_fetch_array ( $sql_result )) {
$version = $row [ " Version " ];
$subver = $row [ " SubVer " ];
$release = " $row[major] . $row[minor] " ;
if ( $row [ " release " ]) { $release = " . $release $row[release] " ;}
if ( $subver !== " final " ) { $release = " $release $subver " ;}
$appvernames [ $release ] = $version ;
}
//Query to Generate List..
$sql = " $resultsquery " ;
$sql_result = mysql_query ( $sql , $connection ) or trigger_error ( " MySQL Error " . mysql_errno () . " : " . mysql_error () . " " , E_USER_NOTICE );
while ( $row = mysql_fetch_array ( $sql_result )) {
$id = $row [ " ID " ];
$type = $row [ " Type " ];
$name = $row [ " Name " ];
$dateadded = $row [ " DateAdded " ];
$dateupdated = $row [ " DateUpdated " ];
$homepage = $row [ " Homepage " ];
2004-12-09 09:34:53 +03:00
$description = nl2br ( $row [ " Description " ]);
2004-08-30 00:55:50 +04:00
$rating = $row [ " Rating " ];
$authors = $authorarray [ $name ];
$osname = $row [ " OSName " ];
$appname = $row [ " AppName " ];
$downloadcount = $row [ " TotalDownloads " ];
2004-10-07 10:36:17 +04:00
$populardownloads = $row [ " downloadcount " ];
2004-08-30 00:55:50 +04:00
//Get Version Record for Referenced MAXvID from list query
2004-12-09 09:34:53 +03:00
$sql2 = " SELECT TV.vID, TV.Version, TV.MinAppVer, TV.MaxAppVer, TV.Size, TV.DateAdded AS VerDateAdded, TV.DateUpdated AS VerDateUpdated, TV.URI, TV.Notes FROM `version` TV
INNER JOIN applications TA ON TV . AppID = TA . AppID
INNER JOIN os TOS ON TV . OSID = TOS . OSID
2004-08-30 00:55:50 +04:00
WHERE TV . ID = '$id' AND TV . Version = '$row[Version]' AND TA . AppName = '$appname' AND TOS . OSName = '$osname' LIMIT 1 " ;
$sql_result2 = mysql_query ( $sql2 , $connection ) or trigger_error ( " MySQL Error " . mysql_errno () . " : " . mysql_error () . " " , E_USER_NOTICE );
2004-12-09 09:34:53 +03:00
$vid = $row [ MAXvID ];
2004-08-30 00:55:50 +04:00
$row = mysql_fetch_array ( $sql_result2 );
$vid = $row [ " vID " ];
if ( $appvernames [ $row [ " MinAppVer " ]]) { $minappver = $appvernames [ $row [ " MinAppVer " ]]; } else { $minappver = $row [ " MinAppVer " ]; }
if ( $appvernames [ $row [ " MaxAppVer " ]]) { $maxappver = $appvernames [ $row [ " MaxAppVer " ]]; } else { $maxappver = $row [ " MaxAppVer " ]; }
$VerDateAdded = $row [ " VerDateAdded " ];
$VerDateUpdated = $row [ " VerDateUpdated " ];
$filesize = $row [ " Size " ];
$notes = $row [ " Notes " ];
$version = $row [ " Version " ];
$uri = $row [ " URI " ];
2004-10-07 10:36:17 +04:00
$filename = basename ( $uri );
2004-08-30 00:55:50 +04:00
2004-12-09 09:34:53 +03:00
$sql3 = " SELECT `PreviewURI`, `caption` from `previews` WHERE `ID` = ' $id ' AND `preview`='YES' LIMIT 1 " ;
2004-10-07 10:36:17 +04:00
$sql_result3 = mysql_query ( $sql3 , $connection ) or trigger_error ( " MySQL Error " . mysql_errno () . " : " . mysql_error () . " " , E_USER_NOTICE );
$row3 = mysql_fetch_array ( $sql_result3 );
$previewuri = $row3 [ " PreviewURI " ];
$caption = $row3 [ " caption " ];
2004-08-30 00:55:50 +04:00
2004-12-09 09:34:53 +03:00
2004-08-30 00:55:50 +04:00
if ( $VerDateAdded > $dateadded ) { $dateadded = $VerDateAdded ; }
if ( $VerDateUpdated > $dateupdated ) { $dateupdated = $VerDateUpdated ; }
//Turn Authors Array into readable string...
$authorcount = count ( $authors );
foreach ( $authors as $author ) {
$userid = $authorids [ $author ];
$n ++ ;
2004-12-09 09:34:53 +03:00
$authorstring .= " <A HREF= \" authorprofiles.php? " . uriparams () . " &id= $userid\ " > $author </ A > " ;
2004-08-30 00:55:50 +04:00
if ( $authorcount != $n ) { $authorstring .= " , " ; }
}
$authors = $authorstring ;
unset ( $authorstring , $n ); // Clear used Vars..
2004-10-07 10:36:17 +04:00
if ( $dateupdated > $dateadded ) {
$timestamp = $dateupdated ;
$datetitle = " Last Update: " ;
} else {
$timestamp = $dateadded ;
$datetitle = " Added on: " ;
}
2004-08-30 00:55:50 +04:00
2004-10-07 10:36:17 +04:00
$date = date ( " F d, Y g:i:sa " , strtotime ( " $timestamp " ));
2004-08-30 00:55:50 +04:00
2004-10-07 10:36:17 +04:00
$datestring = " $datetitle $date " ;
2004-08-30 00:55:50 +04:00
2004-12-09 09:34:53 +03:00
echo " <DIV class= \" item \" > \n " ;
2004-08-30 00:55:50 +04:00
2004-12-20 16:38:30 +03:00
if ( $rating != NULL ) {
echo " <div class= \" rating \" title= \" $rating Stars out of 5 \" >Rating: " ;
for ( $i = 1 ; $i <= floor ( $rating ); $i ++ ) {
echo " <IMG SRC= \" /images/stars/star_icon.png \" width= \" 17 \" height= \" 20 \" ALT= \" " ; if ( $i == 1 ) { echo " $rating stars out of 5 " ;} echo " \" > " ;
}
if ( $rating > floor ( $rating )) {
$val = ( $rating - floor ( $rating )) * 10 ;
echo " <IMG SRC= \" /images/stars/star_0 $val .png \" width= \" 17 \" height= \" 20 \" ALT= \" \" > " ;
$i ++ ;
}
for ( $i = $i ; $i <= 5 ; $i ++ ) {
echo " <IMG SRC= \" /images/stars/graystar_icon.png \" width= \" 17 \" height= \" 20 \" ALT= \" " ; if ( $i == 1 ) { echo " $rating stars out of 5 " ;} echo " \" > " ;
}
echo " </div> \n " ;
}
2004-12-09 09:34:53 +03:00
echo " <h2 class= \" first \" ><A HREF= \" moreinfo.php? " . uriparams () . " &id= $id\ " > $name $version </ A ></ h2 > " ;
if ( $previewuri ) {
echo " <p class= \" screenshot \" > \n " ;
list ( $width , $height , $attr ) = getimagesize ( " $websitepath " . " $previewuri " );
2004-12-24 01:58:15 +03:00
echo " <a href= \" moreinfo.php? " . uriparams () . " &id= $id\ " >< img src = \ " $previewuri\ " height = $height width = $width alt = \ " $name preview - $caption\ " title = \ " $caption\ " ></ a > \n " ;
2004-12-09 09:34:53 +03:00
echo " </p> \n " ;
$preview_minheight = $height - 50 ;
}
echo " <P class= \" first \" >By $authors </P> " ;
2004-08-30 00:55:50 +04:00
//Description & Version Notes
2004-12-09 09:34:53 +03:00
if ( $previewuri AND $preview_minheight ) {
echo " <p class= \" first \" style= \" min-height: 80px \" > " ;
} else {
echo " <p class= \" first \" > " ;
}
2004-08-30 00:55:50 +04:00
echo " $description <BR> " ;
2004-10-07 10:36:17 +04:00
if ( $notes ) { echo " <BR> $notes " ; }
2004-12-09 09:34:53 +03:00
echo " </p> " ;
2004-08-30 00:55:50 +04:00
//Icon Bar Modules
2004-10-07 10:36:17 +04:00
echo " <DIV style= \" margin-top: 30px; height: 34px \" > " ;
echo " <DIV class= \" iconbar \" > " ;
2004-08-30 00:55:50 +04:00
if ( $appname == " Thunderbird " ) {
2004-12-09 09:34:53 +03:00
echo " <A HREF= \" moreinfo.php? " . uriparams () . " &id= $id\ " >< IMG SRC = \ " /images/download.png \" HEIGHT=32 WIDTH=32 TITLE= \" More Info about $name\ " ALT = \ " \" >More Info</A> " ;
2004-08-30 00:55:50 +04:00
} else {
2004-12-09 09:34:53 +03:00
echo " <a href= \" $uri\ " onclick = \ " return installTheme(event,' $name $version '); \" ><IMG SRC= \" /images/download.png \" HEIGHT=32 WIDTH=32 TITLE= \" Install $name\ " ALT = \ " \" >Install</A> " ;
2004-08-30 00:55:50 +04:00
}
2004-10-07 10:36:17 +04:00
echo " <BR><SPAN class= \" filesize \" > $filesize kb</SPAN></DIV> " ;
2004-12-09 09:34:53 +03:00
echo " <DIV class= \" iconbar \" ><IMG SRC= \" /images/ " . strtolower ( $appname ) . " _icon.png \" HEIGHT=34 WIDTH=34 ALT= \" \" > For $appname :<BR> $minappver - $maxappver </DIV> " ;
if ( $osname !== " ALL " ) { echo " <DIV class= \" iconbar \" ><IMG SRC= \" /images/ " . strtolower ( $osname ) . " _icon.png \" HEIGHT=34 WIDTH=34 ALT= \" \" >For $osname <BR>only</DIV> " ; }
//if ($homepage) {echo"<DIV class=\"iconbar\"><A HREF=\"$homepage\"><IMG SRC=\"/images/home.png\" HEIGHT=34 WIDTH=34 TITLE=\"$name Homepage\" ALT=\"\">Homepage</A></DIV>";}
2004-08-30 00:55:50 +04:00
echo " </DIV> " ;
2004-11-28 20:29:04 +03:00
echo " <DIV class= \" baseline \" > $datestring " ;
if ( $populardownloads > 5 ) { echo " | Downloads Last 7 Days: $populardownloads " ;}
if ( $downloadcount ) { echo " | Total Downloads: $downloadcount " ; }
2004-10-07 10:36:17 +04:00
echo " </DIV> \n " ;
2004-08-30 00:55:50 +04:00
echo " </DIV> \n " ;
} //End While Loop
if ( $totalresults == " 0 " ) {
2004-12-11 02:21:05 +03:00
echo " <DIV class= \" item noitems \" > \n " ;
2004-12-09 09:34:53 +03:00
echo " <P>No themes found in this category for " . ucwords ( $application ) . " .</P> \n " ;
2004-08-30 00:55:50 +04:00
echo " </DIV> \n " ;
}
?>
< ? php
2004-12-09 09:34:53 +03:00
echo " <H2> " . ucwords ( " $application $typename » $categoryname " ) . " </H2> " ;
2004-10-07 10:36:17 +04:00
echo " " . ucwords ( " $typename " ) . " $startitem - $enditem of $totalresults " ;
echo " | " ;
// Begin Code for Dynamic Navbars
2004-08-30 00:55:50 +04:00
if ( $pageid <= $num_pages ) {
$previd = $pageid - 1 ;
if ( $previd > " 0 " ) {
2004-12-09 09:34:53 +03:00
echo " <a href= \" ? " . uriparams () . " &pageid= $previd\ " >& #171; Previous</A> • ";
2004-08-30 00:55:50 +04:00
}
echo " Page $pageid of $num_pages " ;
$nextid = $pageid + 1 ;
if ( $pageid < $num_pages ) {
2004-12-09 09:34:53 +03:00
echo " • <a href= \" ? " . uriparams () . " &pageid= $nextid\ " > Next & #187;</a>";
2004-08-30 00:55:50 +04:00
}
echo " <BR> \n " ;
//Skip to Page...
if ( $num_pages > 1 ) {
2004-10-07 10:36:17 +04:00
echo " Jump to Page: " ;
2004-08-30 00:55:50 +04:00
$pagesperpage = 9 ; //Plus 1 by default..
$i = 01 ;
//Dynamic Starting Point
if ( $pageid > 11 ) {
$nextpage = $pageid - 10 ;
}
$i = $nextpage ;
//Dynamic Ending Point
$maxpagesonpage = $pageid + $pagesperpage ;
//Page #s
while ( $i <= $maxpagesonpage && $i <= $num_pages ) {
if ( $i == $pageid ) {
echo " <SPAN style= \" color: #FF0000 \" > $i </SPAN> " ;
} else {
2004-12-09 09:34:53 +03:00
echo " <A HREF= \" ? " . uriparams () . " &pageid= $i\ " > $i </ A >& nbsp ; " ;
2004-08-30 00:55:50 +04:00
}
$i ++ ;
}
}
}
?>
2004-12-09 09:34:53 +03:00
</ div >
2004-08-30 00:55:50 +04:00
< ? php
include " $page_footer " ;
?>
2004-12-09 09:34:53 +03:00
</ div >
2004-08-30 00:55:50 +04:00
</ BODY >
2004-08-24 23:39:49 +04:00
</ HTML >