//-----------------------------ONE REC------------------//
//contents
if ($nb_req_page==1) {
echo '
';
//theme
if ($theme) { echo '
'.stripslashes(strip_tags($theme)).''; }
//category
if ($category) { echo '
'.stripslashes(strip_tags($category)).''; }
//titre
echo '
'.preg_replace('%\*%','✿',strip_tags($title)).'
';
if ($summary!='') { echo '
'.jolitext(strip_tags($summary)).'
'; }
if ($tarif!='') {
echo '
'._t('fromprice','common').' '.$data->tarif.'€ / '._t('night','reservation').'
';
}
//content + galleries
if (preg_match('%\[album%',$data->content)) {
require_once ("include/aff_gallery.php");
echo '
'.(preg_match('%\[album%',$data->content)? preg_replace_callback('%\[album=([0-9]+)\]%','aff_gallery',$data->content) : $data->content).'
';
} else {
echo '
'.$data->content.'
';
}
//aside
echo (trim(strip_tags($aside))!=''&&trim(strip_tags($aside))!=' ' ? '
'.strip_tags($aside, '
').'
' :'') ;
//semainier resalys & yelloh
if ($ref_booker!='' && $data_init->resa_site!='' && $data_init->date_min > 0 ) {
include('include/semainier_'.$data_init->resa_site.'.php');
}
//FILE--------------------------------------------------
if ($file) {
echo '
';
}
/*
echo '
';
include("include/addThis.php");
echo '
';
*/
echo '
';//fin 2colsLeft
//col right
echo '
';
//hot topics
if ($_GET['id_place'] <99) {
include('include/box_topics.php');
} else {
include("include/aff_places.php");
}
//related
include("include/related.php");
echo '
';//fin 1rowRight
//CAS PAS DE REPONSE
} elseif ($nb_tot==0){
echo $error;
}
//--------------------------------------------- LISTE
else {
//if ($_GET['accomodation']) { echo '
'.(_t('accomodation','common')).'
'; }
//if ($_GET['id_theme']) { echo '
'.($data_description->title?$data_description->title:$data->theme).'
'; }
//if ($_GET['id_category']) { echo '
'.($data_description->category?$data_description->category:$data->category).'
'; }
//description du thème ou de la catégorie
if (!$_GET['accomodation']) {
$array_description=array('titre','resume','content');
foreach($array_description as $desc) { echo ($data_description->$desc?'
'.$data_description->$desc.'
':''); }
}
//liste
echo '
';
//list different categories of this thema
_sql('cat',"SELECT DISTINCT n.id_category, c.category, n.lang, d.summary as category_description, n.rank
FROM $table AS n
LEFT OUTER JOIN annu_theme AS t ON (n.id_theme=t.id_unique)
LEFT OUTER JOIN annu_category AS c ON (n.id_category=c.id_unique)
LEFT OUTER JOIN news_description_ok AS d ON (n.id_category=d.id_category)
WHERE n.valid LIKE 'ok'
AND n.id_place=".($_GET['id_place']? $_GET['id_place']:0)."
".($_GET['id_category']? " AND (n.id_category ='".$_GET['id_category']."')" : '')."
AND n.lang LIKE '".safe($_GET['lang'])."'
GROUP BY n.id_category
ORDER BY n.rank",$debug);
if ($nb_req_cat>0) {
while ($data_cat=mysqli_fetch_object($req_cat)) {
echo '
'.preg_replace('%\*%','✿',strip_tags($data_cat->category)).'
';
echo '
'.$data_cat->category_description.'
';
//list different publications of this category and thema
_sql('perm',"SELECT DISTINCT n.*
FROM $table AS n
WHERE n.valid LIKE 'ok'
AND id_place=".($_GET['id_place']? $_GET['id_place']:0)
." AND n.lang LIKE '".safe($_GET['lang'])."'"
.(in_array("type_content",$array_rows)?" AND type_content NOT LIKE 'off'":'')."
AND n.id_category=".$data_cat->id_category."
ORDER BY n.rank",$debug);
if ($nb_req_perm>0) {
echo '
';
}
}
}
echo '
';
}
echo '