I have a problem with loading images in a project that uses CakePHP 1.3.15. The link below shows what is happening. link
Here is the code for the error:
<a href="<?php echo URL; ?>">
<img src="<?php echo URL; ?>img/logos/<?php echo $siteConfig['Configuration']['logo_path_color'] ?>/headerLogo.png" alt="" title="" />
</a>
The code of my app_controller
<?php
class AppController extends Controller
{
var $uses = array(
'Administrator',
'AdminMenu',
'ArticleInterview',
'ArticleInterviewListType',
'ArticleInterviewTag',
'Author',
'BitlyLink',
'City',
'Comment',
'Church',
'Configuration',
'Contact',
'Country',
'ErrorPage',
'Event',
'EventType',
'EventListType',
'EventTag',
'Feature',
'FeatureConfiguration',
'Gallery',
'GalleryImage',
'MediaLibrary',
'Member',
'News',
'NewsListType',
'NewsTag',
'Page',
'PageCategory',
'PageTag',
'PostMedia',
'Revision',
'State',
'Saint',
'SaintTag',
'Tag',
'User',
'Utility',
'ViewClick',
'PostCategory',
'PostCategoryTag',
'Bishop',
'EventBishop',
'Birthday',
'SatisfactionSurvey',
'DailyLiturgy',
'Music',
'MusicsListType',
'MusicsTag'
);
var $helpers = array(
'Excel',
'Facebook',
'Form',
'Html',
'ImageCache',
'ImageFn',
'Javascript',
'Menu',
'NumberFn',
'Session',
'Text',
'TextFn',
'Time',
'TimeFn',
'Translate',
'ViewFn',
'Youtube',
'Xml',
);
var $components = array(
'Bitly',
'Cep',
'PaymentReturns',
'Auth',
'Checkout',
'ControllerList',
'Email',
'Facebook',
'Notifications',
'Paypal',
'RequestHandler',
'Session',
'Twitter',
'Upload',
'Utility',
);
function beforeFilter()
{
parent::beforeFilter();
// Remove www da URL para não dar problema de sessão
if (!(strpos($_SERVER['SERVER_NAME'], 'www') === false)) {
$this->redirect(URL . $_SERVER['REQUEST_URI']);
}
Security::SetHash('md5');
$this->_setCookie();
Configure::write('UseCdnHost', false);
if ($this->_isAdmin())
{
$this->set('site_config', $this->Configuration->findById(1));
$this->layout = 'admin_default';
//Criando variaveis globais e arquivos nescessarios
if( isset( $this->params['form'] ) && !empty( $this->params['form'] ) )
{
$form_data = $this->processAjaxFormData( $this->params['form'] );
if( !empty( $form_data ) )
{
$this->data = $form_data;
}
}
if ( !isset( $this->bound_actions ) )
{
$this->bound_actions = array();
}
$this->_createDefaultArchives( $this->params['controller'] );
$this->Auth->loginError = __("Login inválido.", true);
$this->Auth->authError = __("Por favor faça o login.", true);
$this->Auth->loginRedirect = array('admin' => true, 'controller' => 'dashboard', 'action' => 'index');
$this->Auth->logoutRedirect = array('admin' => true, 'controller' => 'users', 'action' => 'login');
$this->Auth->loginAction = array('admin' => true, 'controller' => 'users', 'action' => 'login');
// Configurações do usuario logado
if ( $this->Auth->user() )
{
$userConditions = array('conditions' => array('User.id' => $this->Auth->user('id')));
$user = $this->User->find('first', $userConditions);
$this->set( 'userType', $user['User']['user_type'] );
if( !$this->Session->check('Admin.last_access') )
{
$last_access = date('Y-m-d h:i:s');
$this->User->create(false);
$this->User->id = $user['User']['id'];
$this->User->save(array('last_access' => $last_access));
$this->Session->write('Admin.last_access', $last_access);
}
if( !$this->_checkUserPermission( $this->params['controller'], $user, $this->User->blockedControllers ) && $this->params['action'] != 'admin_logout' )
{
$this->redirect(URL_ADMIN . '/deny');
}
$this->set('user', $user);
if(isset($this->params['pass'][0])) $this->set('edit_id', $this->params['pass'][0]);
Configure::write('AdminUserId', $user['User']['id']);
}
else
{
if ($this->params['action'] != 'admin_login')
{
$this->redirect(URL_ADMIN . 'users/login');
}
}
$this->set('utilities', $this->Utility->getAvaliablePlugins($this->params['controller'], $this->params['action']));
}
else
{
$this->Auth->allow('*');
$this->_setDefaultContent();
$this->set('siteConfig', $this->Configuration->findById(1));
$this->set( 'menuCategories', $this->PostCategory->getCategoriesBySession() );
$this->set( 'menuPages', $this->Page->getMenuNavigation() );
// Combinações possíveis para cada categoria nas homes de notícias, formação e agenda. Também em suas categorias.
$boxCombinationsForHomes = array(
array(
array('startLine' => 1, 'startColumn' => 1, 'boxType' => 2),
array('startLine' => 1, 'startColumn' => 3, 'boxType' => 1),
array('startLine' => 2, 'startColumn' => 3, 'boxType' => 1),
array('startLine' => 1, 'startColumn' => 5, 'boxType' => 0),
array('startLine' => 2, 'startColumn' => 5, 'boxType' => 0)
),
array(
array('startLine' => 1, 'startColumn' => 1, 'boxType' => 1),
array('startLine' => 2, 'startColumn' => 1, 'boxType' => 1),
array('startLine' => 1, 'startColumn' => 3, 'boxType' => 0),
array('startLine' => 1, 'startColumn' => 4, 'boxType' => 0),
array('startLine' => 2, 'startColumn' => 3, 'boxType' => 0),
array('startLine' => 2, 'startColumn' => 4, 'boxType' => 0),
array('startLine' => 1, 'startColumn' => 5, 'boxType' => 0),
array('startLine' => 2, 'startColumn' => 5, 'boxType' => 0)
)
);
$this->set('boxCombinationsForHomes', $boxCombinationsForHomes);
}
}
/**
* Pagina de erro
*/
function cakeError ($type, $options = array())
{
$this->set('page_name', 'error_page');
$this->set('title', __('Página não encontrada', true));
parent::cakeError($type, $options = array());
}
/**
* Seta dados padroes para ser utilizados no beforeFilter e paginas de erros
*/
function _setDefaultContent ()
{
}
function beforeRender()
{
parent::beforeRender();
if ($this->_isAdmin())
{
$userConditions = array('conditions' => array('User.id' => $this->Auth->user('id')));
$user = $this->User->find('first', $userConditions);
$this->set( 'menu', $this->AdminMenu->getMenu( $user ) );
$submenu = ( $this->Session->check(' Admin.Submenu' ) ) ? $this->Session->read(' Admin.Submenu' ) : $this->AdminMenu->submenu;
$this->set( 'submenu', $submenu );
$json_form = array();
if(!empty($this->data)){
if(isset($this->data[$this->modelClass])){
$json_form = $this->data[$this->modelClass];
}else{
$json_form = $this->data;
}
if(isset($this->data['MediaLibrary'])){
$json_form['media'] = $this->data['MediaLibrary'];
}
$blocked_inputs = array('password');
foreach ($json_form as $key => $value) {
if(in_array($key, $blocked_inputs)){
unset($json_form[$key]);
}
}
$this->set('json_form', $json_form);
}
}else{
$allowed_models = array('Page', 'News', 'Event');
$view_data = array();
if (isset($this->viewVars['data']) && !empty($this->viewVars['data'])) {
foreach ($allowed_models as $key => $model) {
if(isset($this->viewVars['data'][$model])){
$view_data[$key]['data'] = $this->viewVars['data'][$model];
}
if(isset($this->viewVars['data'][$model.'Tag'])){
$view_data[$key]['tags'] = $this->viewVars['data'][$model.'Tag'];
}
}
}
$this->set('view_data', $view_data);
}
}
/**
* _isAdmin() : Função usada para verificar se o usuario esta navegando na area de administracao
* @return bool
**/
function _isAdmin()
{
if (isset($this->params['prefix']) && $this->params['prefix'] == 'admin') {
return TRUE;
}
else
{
return FALSE;
}
}
/**
* _checkUserPermission() : Função usada para verificar se o usuario esta navegando em uma area permitida
* @return bool
**/
function _checkUserPermission( $controller, $user, $blockedControllers )
{
$allow = false;
$permissions = explode( ',', $user['User']['permissions'] );
if ( in_array( $controller, $permissions ) ) {
$allow = true;
}
if ( in_array( Inflector::classify( $controller ), $blockedControllers ) ) {
$allow = true;
}
return $allow;
}
/**
* _createDefaultArchives() : Função usada para criar arquivos nescessarios caso haja um novo controller;
* @return bool
**/
function _createDefaultArchives($controller)
{
$file_paths = array('js', 'css');
$file_types = array('js', 'css');
foreach ($file_types as $key => $type) {
$path = APP . WEBROOT_DIR . '/' . ADMIN_CONTENT . '/' . $file_paths[$key] . '/controllers/' . $controller . '.' . $type;
$file = new File($path, true, 0777);
$file->close();
}
return true;
}
/**
* processAjaxFormData() : Retira os campos vazios do form enviado por ajax
* @return $form
**/
function processAjaxFormData($form)
{
foreach($form as $key => $input){
if($input == ''){
unset($form[$key]);
}
}
return $form;
}
/**
* Esta função decide qual o Cookie da sessao utilizar.
* Deve ser utilizada caso tenha uma area de site e outra de administracao
* para nao misturar dados.
* @return void
*/
function _setCookie() {
if ($this->_isAdmin()) {
// admin
Configure::write('Session.cookie', Configure::read("Session.admin_cookie"));
}
else {
// site
Configure::write('Session.cookie', Configure::read("Session.site_cookie"));
}
// inicia a sessao e ativa ela
$this->Session->activate();
}
/**
* Função que faz a contabilização do historico de vizualizações de conteudo
*/
function _setNewViewClick($source_id, $source_table) {
// Resgato de onde o usuario acessou o post
$source = (isset($this->params['named']['source'])) ? $this->params['named']['source'] : 'normal';
// Defino as datas para a busca do registro recente de cliques ( 1 registro novo por hora )
$dates = array(
'now' => date('Y-m-d H:i:s', time()),
'prev' => date('Y-m-d H:i:s', (time() - 3600)),
);
// Condições para a busca do registro atual de clicks
$find_options = array(
'conditions' => array(
'ViewClick.source' => $source,
'ViewClick.source_id' => $source_id,
'ViewClick.source_table' => $source_table,
'ViewClick.created BETWEEN "' . $dates['prev'] . '" AND "' . $dates['now'] .'"'
));
// Variaveis default para serem salvos
$new_views = 1;
$data = array();
// Caso haja um registro atual, atualizo este registro somando + 1 click ou crio um novo registro com 1 click computado
if ($actual = $this->ViewClick->find('first', $find_options)){
$new_views = $actual['ViewClick']['views'] + 1;
$this->ViewClick->create(false);
$this->ViewClick->id = $actual['ViewClick']['id'];
} else {
$data['source'] = $source;
$data['source_id'] = $source_id;
$data['source_table'] = $source_table;
}
// Salvo os dados na base
$data['views'] = $new_views;
$this->ViewClick->save($data);
}
/**
* Função que resgata os dados nescessarios para o funcionamento do elemento last_posts
*/
public function _setLastPostsElementData($used_ids = array())
{
// Resgato Ultimas Noticias
$last_news_conditions = array('News.status' => 1);
if(isset($used_ids['News'])) $last_news_conditions[] = 'News.id NOT IN (' . implode(',', array_unique($used_ids['News'])) . ')';
$last_news = $this->News->find( 'all', array(
'limit' => 9,
'order' => 'News.date DESC',
'conditions' => $last_news_conditions
)
);
// Restado ultimos Artigo e Entrevista
$last_articles_conditions = array('ArticleInterview.status' => 1);
if(isset($used_ids['ArticleInterview'])) $last_articles_conditions[] = 'ArticleInterview.id NOT IN (' . implode(',', array_unique($used_ids['ArticleInterview'])) . ')';
$last_articles = $this->ArticleInterview->find( 'all', array(
'limit' => 9,
'order' => 'ArticleInterview.date DESC',
'conditions' => $last_articles_conditions
)
);
// Proximos Eventos
$next_events = $this->Event->find( 'all', array(
'limit' => 9,
'order' => 'Event.date ASC',
'conditions' => array(
'Event.status' => 1,
'Event.date >= CURDATE()',
))
);
// Seto as variaves para a view
$this->set('last_news', $last_news);
$this->set('last_articles', $last_articles);
$this->set('next_events', $next_events);
}
/**
* Função que resgata as infos nescessarias para o elemento de noticias
*/
public function _setNewsElementData($used_ids = array())
{
$news = array();
// Datas para as condiçoes das buscas de cada periodo
$dates = array(
'now' => date('Y-m-d H:i:s', time()),
'today' => date('Y-m-d H:i:s', (time() - 86400)),
'week' => date('Y-m-d H:i:s', (time() - 602280)),
'month' => date('Y-m-d H:i:s', (time() - 18068400)),
);
// Ligo o modelo de historico de clicks com a tabela de noticias
$bind = array('belongsTo' => array('News' => array('foreignKey' => 'source_id', 'className' => 'News')));
$this->ViewClick->bindModel($bind, false);
// Condições para o periodo de 24h <-> Agora
$today_options = array(
'conditions' => array(
'ViewClick.source' => 'normal',
'ViewClick.source_table' => 'News',
'ViewClick.created BETWEEN "' . $dates['today'] . '" AND "' . $dates['now'] .'"'
), 'order' => array('ViewClick.views DESC')
);
$news['today'] = $this->ViewClick->find('all', $today_options);
// Condições para o periodo de 1 Semana <-> Agora
$week_options = array(
'conditions' => array(
'ViewClick.source' => 'normal',
'ViewClick.source_table' => 'News',
'ViewClick.created BETWEEN "' . $dates['week'] . '" AND "' . $dates['now'] .'"'
), 'order' => array('ViewClick.views DESC')
);
$news['week'] = $this->ViewClick->find('all', $week_options);
// Condições para o periodo de 1 Mês <-> Agora
$month_options = array(
'conditions' => array(
'ViewClick.source' => 'normal',
'ViewClick.source_table' => 'News',
'ViewClick.created BETWEEN "' . $dates['month'] . '" AND "' . $dates['now'] .'"'
), 'order' => array('ViewClick.views DESC')
);
$news['month'] = $this->ViewClick->find('all', $month_options);
// Condições para ultimas noticias, eliminando noticias que ja sejam destaques
$last_news_conditions = array('News.status' => 1);
if(isset($used_ids['News'])) $last_news_conditions[] = 'News.id NOT IN (' . implode(',', array_unique($used_ids['News'])) . ')';
// Resgato as Ultimas noticias
$last_news = $this->News->find( 'all', array(
'limit' => 9,
'order' => 'News.date DESC',
'conditions' => $last_news_conditions
)
);
// Seto variaveis para view
$this->set('news', $news);
$this->set('last_news', $last_news);
}
public function _setArticlesInterviewsElementData($used_ids = array())
{
$articles = array();
// Datas para as condiçoes das buscas de cada periodo
$dates = array(
'now' => date('Y-m-d H:i:s', time()),
'today' => date('Y-m-d H:i:s', (time() - 86400)),
'week' => date('Y-m-d H:i:s', (time() - 602280)),
'month' => date('Y-m-d H:i:s', (time() - 18068400)),
);
// Ligo o modelo de historico de clicks com a tabela de artigos
$bind = array('belongsTo' => array('ArticleInterview' => array('foreignKey' => 'source_id', 'className' => 'ArticleInterview')));
$this->ViewClick->bindModel($bind, false);
// Condições para o periodo de 24h <-> Agora
$today_options = array(
'conditions' => array(
'ViewClick.source' => 'normal',
'ViewClick.source_table' => 'ArticleInterview',
'ViewClick.created BETWEEN "' . $dates['today'] . '" AND "' . $dates['now'] .'"'
), 'order' => array('ViewClick.views DESC')
);
$articles['today'] = $this->ViewClick->find('all', $today_options);
// Condições para o periodo de 1 Semana <-> Agora
$week_options = array(
'conditions' => array(
'ViewClick.source' => 'normal',
'ViewClick.source_table' => 'ArticleInterview',
'ViewClick.created BETWEEN "' . $dates['week'] . '" AND "' . $dates['now'] .'"'
), 'order' => array('ViewClick.views DESC')
);
$articles['week'] = $this->ViewClick->find('all', $week_options);
// Condições para o periodo de 1 Mês <-> Agora
$month_options = array(
'conditions' => array(
'ViewClick.source' => 'normal',
'ViewClick.source_table' => 'ArticleInterview',
'ViewClick.created BETWEEN "' . $dates['month'] . '" AND "' . $dates['now'] .'"'
), 'order' => array('ViewClick.views DESC')
);
$articles['month'] = $this->ViewClick->find('all', $month_options);
// Condições para ultimos artigos, eliminando artigos que ja sejam destaques
$last_articles_conditions = array('ArticleInterview.status' => 1, 'ArticleInterview.author_id' => 0);
if(isset($used_ids['ArticleInterview'])) $last_articles_conditions[] = 'ArticleInterview.id NOT IN (' . implode(',', array_unique($used_ids['ArticleInterview'])) . ')';
// Resgato as Ultimos Artigos
$last_articles = $this->ArticleInterview->find( 'all', array(
'limit' => 4,
'order' => 'ArticleInterview.date DESC',
'conditions' => $last_articles_conditions
)
);
// Seto variaveis para view
$this->set('articles', $articles);
$this->set('last_articles', $last_articles);
}
/**
* Retorna ultimo tweet
*/
function get_last_tweet ()
{
$this->autoRender = false;
Cache::set(array('duration' => '+20 minutes'));
if (Cache::read('last_tweet'))
{
Cache::set(array('duration' => '+20 minutes'));
echo Cache::read('last_tweet');
}
else
{
$site_config = $this->Configuration->findById(1);
$data = $this->Twitter->getLastTweet('juventudeomi');
if (isset($data[0]) && !empty($data[0]))
{
Cache::write('last_tweet', ($data[0]['text']));
echo ($data[0]['text']);
}
}
}
/**
* Resgata cep
*/
public function cep ($cep = null)
{
$this->autoRender = false;
$data = $this->Cep->getDataCep($cep);
echo json_encode($data);
}
}
And my view I think is this:
<div class="container center">
<div class="group index">
<?php
if ( isset( $features ) ) {
foreach ( $features as $key => $feature ) {
$featureClasses = 'tile ';
$featureClasses .= ( isset( $feature['Feature']['classes'] ) ) ? $feature['Feature']['classes'] . ' ' : ' ';
$featureClasses .= ( isset( $feature['Feature']['source_table'] ) ) ? $translate->sourceClass( $feature['Feature']['source_table'] ) . ' ' : ' ';
?>
<div class="<?php echo $featureClasses ?>" data-start-column="<?php echo $feature['Feature']['start_column'] ?>" data-start-line="<?php echo $feature['Feature']['start_line'] ?>" data-position="<?php echo $feature['Feature']['position'] ?>">
<?php if ( $feature['Feature']['source_table'] != 'Widget' ) { ?>
<a target="<?php echo ( $feature['Feature']['source_table'] != 'link' ) ? '_self' : '_blank'; ?>" href="<?php echo ( $feature['Feature']['source_table'] != 'link' ) ? $this->base : '' ?><?php echo $feature['Feature']['link'] ?>">
<?php
if ( !empty( $feature['Feature']['image_id'] ) ) {
$title = $viewFn->getImageTitle( $feature['MediaLibrary']['html_title'], $feature['Feature']['title'] );
?>
<img src="<?php echo $this->base . '/' . $feature['Feature']['image_path'] ?>" alt="<?php echo $title ?>" title="<?php echo $title ?>" />
<?php } ?>
<div class="text">
<h3>
<strong><?php echo $feature['Feature']['title'] ?></strong>
<?php
echo ( !empty( $feature['Feature']['sub_title'] ) ) ? '<span class="subtitle">' . $feature['Feature']['sub_title'] . '</span>' : '';
?>
</h3>
</div>
<?php if ( isset( $feature['Feature']['comments_number'] ) ) : ?>
<p class="comments"><?php echo $feature['Feature']['comments_number'] ?> comentário<?php echo ( $feature['Feature']['comments_number'] > 1 ) ? 's' : ''; ?>
</p>
<?php endif ?>
<span class="icon"></span>
</a>
<?php
} else {
if ( !empty( $feature['Feature']['video_id'] ) ) {
$dataWidget['widget_video'] = $feature;
}
echo $this->element( $feature['Feature']['widget'], array( 'dataWidget' => $dataWidget ) );
}
?>
</div>
<?php
if ( in_array( ($key+1), $painelConfig ) ) {
echo '</div> <div class="group index">';
}
}
}
?>
</div>
<div class="group index">
<?php
$startColumn = 1;
// notícias
if ( count( $featuresNewsList ) ) {
?>
<div class="tile col3 row4 customPosts" data-start-column="<?php echo $startColumn; ?>" data-start-line="1">
<div class="posts news">
<div class="title">
<h3>Notícias</h3>
<div class="bar"></div>
<span class="icon"></span>
</div>
<?php
for ( $i = 1; $i <= 3; $i++ ) {
if ( isset( $featuresNewsList[$i] ) ) {
$feature = $featuresNewsList[$i]['Feature'];
$featureNews = $featuresNewsList[$i]['News'];
?>
<div class="item <?php if ( $i == 1 ) { ?>first<?php } ?>">
<?php
$link = substr( URL , 0, -1) . $feature['link'];
if ( $feature['image_path'] ) {
?>
<div class="image">
<a href="<?php echo $link; ?>"><img src="<?php echo $feature['image_path']; ?>" alt="<?php echo $feature['title']; ?>" title="<?php echo $feature['title']; ?>" /></a>
</div>
<?php
}
?>
<h4><a href="<?php echo $link; ?>"><?php echo $feature['title']; ?></a></h4>
<p><?php echo $time->format( 'd/m/Y', $featureNews['created'] ) ?> - Atualizado em <?php echo $time->format( 'd/m/Y H:i', $featureNews['modified'] ) ?></p>
</div>
<?php
} else {
?>
<div class="item"></div>
<?php
}
}
?>
</div>
</div>
<?php
$startColumn = $startColumn + 3;
}
?>
<?php
//formação
if ( count( $featuresArticleInterviewList ) ) {
?>
<div class="tile col3 row4 customPosts" data-start-column="<?php echo $startColumn; ?>" data-start-line="1">
<div class="posts formation">
<div class="title">
<h3>Formação</h3>
<div class="bar"></div>
<span class="icon"></span>
</div>
<?php
for ( $i = 1; $i <= 3; $i++ ) {
if ( isset( $featuresArticleInterviewList[$i] ) ) {
$feature = $featuresArticleInterviewList[$i]['Feature'];
$featureArticleInterview = $featuresArticleInterviewList[$i]['ArticleInterview'];
?>
<div class="item <?php if ( $i == 1 ) { ?>first<?php } ?>">
<?php
$link = substr( URL , 0, -1) . $feature['link'];
if ( $feature['image_path'] ) {
?>
<div class="image">
<a href="<?php echo $link; ?>"><img src="<?php echo $feature['image_path']; ?>" alt="<?php echo $feature['title']; ?>" title="<?php echo $feature['title']; ?>" /></a>
</div>
<?php
}
?>
<h4><a href="<?php echo $link; ?>"><?php echo $feature['title']; ?></a></h4>
<p><?php echo $time->format( 'd/m/Y', $featureArticleInterview['date'] ); ?></p>
</div>
<?php
} else {
?>
<div class="item"></div>
<?php
}
}
?>
</div>
</div>
<?php
$startColumn = $startColumn + 3;
}
?>
<?php
// agenda
if ( count( $featuresEventList ) ) {
?>
<div class="tile col2 row4 customPosts" data-start-column="<?php echo $startColumn; ?>" data-start-line="1">
<div class="posts agenda">
<div class="title">
<h3>Agenda</h3>
<div class="bar"></div>
<span class="icon"></span>
</div>
<?php
for ( $i = 1; $i <= 2; $i++ ) {
if ( isset( $featuresEventList[$i] ) ) {
$feature = $featuresEventList[$i]['Feature'];
$featureEvent = $featuresEventList[$i]['Event'];
?>
<div class="item <?php if ( $i == 1 ) { ?>first<?php } ?>">
<?php
$link = substr( URL , 0, -1) . $feature['link'];
if ( $feature['image_path'] ) {
?>
<div class="image">
<a href="<?php echo $link; ?>"><img src="<?php echo $feature['image_path']; ?>" alt="<?php echo $feature['title']; ?>" title="<?php echo $feature['title']; ?>" /></a>
</div>
<?php
}
?>
<h4><a href="<?php echo $link; ?>"><?php echo $feature['title']; ?></a></h4>
<p><?php echo $time->format( 'd', $featureEvent['date'] ); ?> de <?php echo $timeFn->getFullMonth( $featureEvent['date'] ); ?> de <?php echo $time->format( 'Y', $featureEvent['date'] ); ?></p>
</div>
<?php
} /*else {
?>
<div class="item"></div>
<?php
}*/
}
?>
</div>
</div>
<?php
}
?>
</div>
</div>