initial commit of code
This commit is contained in:
parent
9b00433142
commit
17d2c64f66
13 changed files with 1928 additions and 0 deletions
51
templates/bazar/trajets-proposes.tpl.html
Normal file
51
templates/bazar/trajets-proposes.tpl.html
Normal file
|
@ -0,0 +1,51 @@
|
|||
<?php
|
||||
setlocale(LC_ALL, 'fr_FR.UTF8', 'fr_FR','fr','fr','fra','fr_FR@euro');
|
||||
setlocale(LC_TIME, "fr_FR");
|
||||
if (count($fiches) > 0) : ?>
|
||||
<?php echo $info_res; ?>
|
||||
<?php
|
||||
foreach ($fiches as $fiche): ?>
|
||||
<?php
|
||||
$dateFermeture = date(DATE_W3C, strtotime("-1 days", strtotime($fiche['date_du_trajet'])));
|
||||
$dateDisparition = date(DATE_W3C, strtotime("+2 days", strtotime($fiche['date_du_trajet'])));
|
||||
$dateJour = date(DATE_W3C);
|
||||
if ($dateJour<$dateFermeture) {
|
||||
$statut = 'Ouvert';
|
||||
} elseif ($dateJour<$dateDisparition) {
|
||||
$statut = 'Fermé';
|
||||
} else {
|
||||
$statut = 'Fini';
|
||||
}
|
||||
if ($statut== 'Ouvert' ) {
|
||||
// récuperer la fiche producteur
|
||||
$producteur = baz_valeurs_fiche($fiche['listefiche8producteur']);
|
||||
$dateTimeObj = new DateTime($fiche['date_du_trajet'], new DateTimeZone('Europe/Paris'));
|
||||
$date =
|
||||
str_replace(' à 0:00', '', IntlDateFormatter::formatObject(
|
||||
$dateTimeObj,
|
||||
'eeee d MMMM y à HH:mm',
|
||||
'fr'
|
||||
));
|
||||
//$date = str_replace(' à 0:00', '', strftime("%A %d %B %Y à %k:%M", strtotime($fiche['date_du_trajet'])));
|
||||
echo '<div class="bazar-entry panel panel-default collapsed" '.$fiche['html_data'].'>
|
||||
<div class="panel-heading collapsed"
|
||||
data-target="#collapse'.$fiche['id_fiche'].'"
|
||||
data-toggle="collapse">
|
||||
<h4 class="panel-title">
|
||||
Trajet proposé pour '.$producteur['bf_titre'].'<br /><span style="color:#222">le '.$date.'</span>
|
||||
</h4>
|
||||
</div>
|
||||
<div id="collapse'.$fiche['id_fiche'].'" class="panel-collapse collapse" role="tabpanel" aria-labelledby="heading'.$fiche['id_fiche'].'">
|
||||
<div class="panel-body">
|
||||
'.baz_voir_fiche(true, $fiche).'
|
||||
</div>
|
||||
</div>
|
||||
</div>';
|
||||
// echo '<p class="places">Nombres de places disponibles : '.$fiche['capacite_de_transport'].'</p>';
|
||||
|
||||
|
||||
?>
|
||||
<?php }
|
||||
endforeach; ?>
|
||||
<?php echo $pager_links; ?>
|
||||
<?php endif; ?>
|
Loading…
Add table
Add a link
Reference in a new issue