<?php
/**
* @package AdsManager
* @copyright Copyright (C) 2010-2014 Juloa.com. All rights reserved.
* @license GNU/GPL
*/
// Check to ensure this file is included in Joomla!
defined('_JEXEC') or die( 'Restricted access' );
?>
<div class="container-fluid">
<div class="adsmanager_table tableListAllAd table table-striped">
<?php
foreach($this->contents as $content)
{
$linkTarget = TRoute::_( "index.php?option=com_adsmanager&view=details&id=".$content->id."&catid=".$content->catid);
if (function_exists('getContentClass'))
$classcontent = getContentClass($content,"list");
else
$classcontent = "";
?>
<div class="adsmanager_table_description <?php echo $classcontent;?> trcategory_<?php echo $content->catid?>">
<!--<td>
<h4 class="no-margin-top">
<?php echo '<a href="'.$linkTarget.'">'.$content->ad_headline.'</a>'; ?>
<span class="adsmanager-cat"><?php echo "(".$content->parent." / ".$content->cat.")"; ?></span>
</h4>
<?php
if (isset($content->images[0])) {
echo "<a href='".$linkTarget."'><img class='ad-image' name='ad-image".$content->id."' src='".$this->baseurl."images/com_adsmanager/ads/".$content->images[0]->thumbnail."' alt=\"".htmlspecialchars($content->ad_headline)."\" /></a>";
} else if ($this->conf->nb_images > 0) {
echo "<a href='".$linkTarget."'><img class='ad-image' src='".ADSMANAGER_NOPIC_IMG."' alt='nopic' /></a>";
}
?>
<div>
<?php
$content->ad_text = str_replace ('<br />'," ",$content->ad_text);
$af_text = JString::substr($content->ad_text, 0, 100);
if (strlen($content->ad_text)>100) {
$af_text .= "[...]";
}
echo $af_text;
?>
</div>
</td>-->
<!-------------------------------------customColumn------------------------------------>
<div style="position:absolute; right:0px; color:#999; top:100px; margin-right:67px;">
Vedi dettagli
</div>
<div id="user">
<?php
global $_CB_framework, $mainframe;
if ( defined( 'JPATH_ADMINISTRATOR' ) ) {
if ( ! file_exists( JPATH_ADMINISTRATOR . '/components/com_comprofiler/plugin.foundation.php' ) ) {
echo 'CB not installed!';
return;
}
include_once( JPATH_ADMINISTRATOR . '/components/com_comprofiler/plugin.foundation.php' );
} else {
if ( ! file_exists( $mainframe->getCfg( 'absolute_path' ) . '/administrator/components/com_comprofiler/plugin.foundation.php' ) ) {
echo 'CB not installed!';
return;
}
include_once( $mainframe->getCfg( 'absolute_path' ) . '/administrator/components/com_comprofiler/plugin.foundation.php' );
}
$cbUser =& CBuser::getInstance($this->userid);
$avatar = $cbUser->getField( 'avatar', null, 'html', 'none', 'list' );
echo $avatar;
?>
</div>
<?php
if ($content->userid != 0)
{
/*echo JText::_('ADSMANAGER_FROM')." "; */
$target = TLink::getUserAdsLink($content->userid);
if ($this->conf->display_fullname == 1)
echo "<div class='nomeCliente'><a href='".$target."'>".$content->fullname."</a><br/></div>";
else
echo "<a href='".$target."'>".$content->user."</a><br/>";
}
?>
<a href="<?php echo $linkTarget; ?>"><img style="position:absolute; right:0px; bottom:0px;"src='http://www.fabiotoscano.it/tio/images/dettaglio.png'/></a>
<!--------------------------colonneDinamiche--------------------------->
<?php
foreach($this->columns as $col) {
echo '<div class="tdcenter column_'.$col->id.' hidden-phone">';
if (isset($this->fColumns[$col->id]))
foreach($this->fColumns[$col->id] as $field)
{
$c = $this->field->showFieldValue($content,$field);
if (($c !== "")&&($c !== null)) {
$title = $this->field->showFieldTitle(@$content->catid,$field);
if ($title != "")
echo "<b>".htmlspecialchars($title)."</b> ";
echo "<span>$c</span><br/>";
}
}
echo "</div>";
}
?>
<!----------------------------------------categorie---------------------------->
<div class="tdcenter column_13">
<div class="adsmanager_category"><?php echo $content->parent." / ".$content->cat; ?></div>
<img src="http://www.fabiotoscano.it/tio/images/<?php echo $content->cat; ?>.png" alt="Tioitalia" class="categoriaImg" />
</div>
<!-----------------------------------------ultima colonna--------------------------------------------------->
<div class="tdcenter column_date hidden-phone">
<?php
$iconflag = false;
if (($this->conf->show_new == true)&&($this->isNewcontent($content->date_created,$this->conf->nbdays_new))) {
echo "<div class='text-center'><img alt='new' src='".$this->baseurl."components/com_adsmanager/images/new.gif' /> ";
$iconflag = true;
}
if (($this->conf->show_hot == true)&&($content->views >= $this->conf->nbhits)) {
if ($iconflag == false)
echo "<div class='text-center'>";
echo "<img alt='hot' src='".$this->baseurl."components/com_adsmanager/images/hot.gif' />";
$iconflag = true;
}
if ($iconflag == true)
echo "</div>";
echo $this->reorderDate($content->date_created);
?>
<br />
<?php if(isset($this->conf->favorite_enabled) && $this->conf->favorite_enabled == 1 && ($this->conf->favorite_display == 'all' || $this->conf->favorite_display == 'list')): ?>
<br/>
<?php
$favoriteClass = '';
$favoriteLabel = addslashes(JText::_('ADSMANAGER_CONTENT_FAVORITE'));
if(array_search($content->id, $this->favorites) !== false){
$favoriteClass = ' like_active';
$favoriteLabel = addslashes(JText::_('ADSMANAGER_CONTENT_FAVORITE_DELETEMSG'));
}
?>
<button id="like_<?php echo $content->id; ?>" class="btn favorite_ads like_ad<?php echo $favoriteClass; ?>"><?php echo $favoriteLabel; ?></button>
<?php endif; ?>
</div>
</div>
<?php
}
?>
</div>
<div style="clear:both;"></div>