Marketplace ToC
//
// Copyright (C) 2005-2006 Achim Fischer
// All rights reserved.
//
// This file is part of the TOC Module for Marketplace,
// the Joomla! Classifieds Component by Achim Fischer
//
// http://www.joomster.com
//
//
//
// Dont allow direct linking
defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );
$database->setQuery( "SELECT count(*) FROM #__marketplace_ads WHERE published='1'");
$count_ads = $database->loadResult();
$database->setQuery("SELECT id, name, (select count(*) from #__marketplace_ads where category=#__marketplace_categories.id) AS adcount FROM #__marketplace_categories WHERE published='1' AND has_entries>'0'");
$meslist = $database->loadObjectList();
$content ="
";
$content.="Category | # Ads |
";
$content.="
|
";
foreach ($meslist as $mes){
$linkTarget = $mosConfig_live_site."/index.php?option=com_marketplace&page=show_category&catid=".$mes->id."&Itemid=31";
if ( $mes->adcount > 0) { // list only categories with entries
$content.="".$mes->name." | (".$mes->adcount.")
|
";
}
}
//$content.="
|
Ads in Marketplace: (".$count_ads.")
|
|
";
$content.="
|
";
$content.="Ads in Marketplace: | (".$count_ads.")
|
";
$content.=" |
";
$content.="
";
?>