%PDF- %PDF-
Direktori : /home/alliance/domains/congress-intercultural.eu/public_html/ |
Current File : /home/alliance/domains/congress-intercultural.eu/public_html/p-section.php |
<?php include_once("inc/config.php"); include_once("inc/functions.php"); include_once("inc/init.php"); include_once("inc/session.php"); if(!estco()) { header("Location:".$url_site.$_GET['lang']."/connexion.html"); } elseif(!estvalide()){ header("Location:".$url_site."admin/"); } $db = new BaseOps; verif_get($_GET['id']); $actu = new Actu; $sec = $section->getSection($_GET['id'],$lang->getlangid()); if($sec == null) { header("Location: 404.html"); exit(0); } $this_edition=$edition->getCurrentEdition("front",$lang->getlangid()); $query="SELECT c.*,cl.name FROM `country` c LEFT JOIN `country_lang` cl ON c.`id`=cl.`country` WHERE cl.lang=".$lang->getlangid()." AND c.`id`=".$sec['pays']; $country = $db->select_array($query); $affsec = true; $pagesec = $lang->getlang()."/".$sec['id']."-".$sec['permalien']."/"; if($_GET['permalien'] != $sec['permalien']) { header("Location:".$url_site.$pagesec); exit(0); } $facebookapi = true; $main2 = true; //affichage du html include("theme/html.php"); //affichage des metas include("theme/meta.php"); echo "\n<title>".$sec['titre']." - ".$info_titresite."</title>\n"; ?> <meta property="og:titre" content="<?php echo $sec['titre']; ?>"/> <?php if ($sec['photo1'] != null) { ?> <meta property="og:image" content="<?php echo $url_site."uploads/".$sec['photo1'] ?>"/> <?php } else { ?> <meta property="og:image" content="<?php echo $url_site."images/noimg.jpg" ?>"/> <?php } ?> <meta property="og:type" content="non_profit"/> <meta property="fb:app_id" content="166400090179579"/> <meta property="og:url" content="<?php echo $url_site.$pagesec; ?>"/> <meta property="og:site_name" content="<?php echo $info_titresite; ?>"/> <script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?key=AIzaSyCNqrscFrr-2YFpDfVFZkYoQNkR87AjRwI&sensor=true&language=<?php echo $lang->getlang(); ?>"></script> <script type="text/javascript"> var strasbourg = new google.maps.LatLng(48.562451,7.738556); var marker; var centre; var map; var geocoder; var markersArray = []; var styles = [ { stylers: [ { hue: "#0E99D3" }, { saturation: 30 } ] },{ featureType: "road", elementType: "geometry.fill", stylers: [ { hue: "#000000" }, { lightness: 30 }, { saturation: -100 } ] },{ featureType: "road", elementType: "geometry.stroke", stylers: [ { hue: "#000000" }, { lightness: 0 }, { saturation: -100 } ] },{ featureType: "landscape.man_made", elementType: "geometry", stylers: [ { hue: "#f7d4a8" } ] },{ featureType: "poi.park", elementType: "geometry", stylers: [ { color: "#e2f7a8" } ] },{ featureType: "road", elementType: "labels", stylers: [ { visibility: "off" } ] } ]; $(document).ready(function() { geocoder = new google.maps.Geocoder(); var styledMap = new google.maps.StyledMapType(styles, {name: "<?=lang("titresite");?>"}); var address = "<?php if($sec['type'] != 3) { echo utf8_encode(html_entity_decode($sec['ville'])).", ".utf8_encode(html_entity_decode($country['name'])); } else { echo utf8_encode(html_entity_decode($country['name'])); } ?>"; geocoder.geocode( { 'address': address}, function(results, status) { if (status == google.maps.GeocoderStatus.OK) { centre = results[0].geometry.location; //Création de la map var mapOptions = { zoom: 5, center: centre, mapTypeControlOptions: { mapTypeIds: [google.maps.MapTypeId.HYBRID, 'map_style'] } }; map = new google.maps.Map(document.getElementById('gmap'), mapOptions); map.mapTypes.set('map_style', styledMap); map.setMapTypeId('map_style'); // Création du marker var marker = new google.maps.Marker({ map: map, animation: google.maps.Animation.DROP, position: results[0].geometry.location }); } else { address = "<?php echo utf8_encode(html_entity_decode($country['name'])); ?>"; geocoder.geocode( { 'address': address}, function(results, status) { if (status == google.maps.GeocoderStatus.OK) { centre = results[0].geometry.location; //Création de la map var mapOptions = { zoom: 5, center: centre, mapTypeControlOptions: { mapTypeIds: [google.maps.MapTypeId.HYBRID, 'map_style'] } }; map = new google.maps.Map(document.getElementById('gmap'), mapOptions); map.mapTypes.set('map_style', styledMap); map.setMapTypeId('map_style'); // Création du marker var marker = new google.maps.Marker({ map: map, animation: google.maps.Animation.DROP, position: results[0].geometry.location }); } else { alert('Geocode was not successful for the following reason: ' + status); } }); } }); }); </script> <?php //affichage du header include("theme/header.php"); if($sec['elu'] == 1) { $queryelu = "SELECT * FROM `user` WHERE section = ".$sec['id']." ORDER BY id ASC LIMIT 1"; $dataelu = $db->select_array($queryelu); } ?> <div class="ariane"><a href="<?=$lang->getlang()?>/<?=$country['id'];?>-pays.html"><img src="images/icons/<?=strtolower($country['code_iso']);?>.png" alt="<?=$country['name'];?>"/> <span class="pays_lib"><?=$country['name'] ?></span></a> <span class="section_lib"><?=$sec['titre'] ?></span></div> <div class="page_section"> <div class="gauche"> <h1 class="bg_profil_<?=$sec['profil']?>"><?=$sec['titre']?></h1> <div class="bloctexte"> <p class="surtitre"><strong>« <?=$sec['titre']?> »</strong> <?if ($sec['elu'] == 1) : ?><?=$admtext->getText("mentionelu",$lang->getlangid());?> <strong><?=$dataelu['prenom'];?> <?=$dataelu['nom'];?></strong> <? endif; ?> <?=$admtext->getText("mentionactivite",$lang->getlangid());?> « <?=lang("profil_".$sec['profil'])?> »</p> <?php $query= "SELECT * FROM `response_champ` r LEFT JOIN `response_champ_lang` rl ON r.id=rl.response WHERE r.section=".$sec['id']." AND rl.lang=".$lang->getlangid()." AND edition=".$this_edition['id']; $response=$db->select_array($query); if($response['valide'] == '1' && $response['texte'] != null) { ?> <div class="texte questions"><?=html_entity_decode($response['texte'],ENT_QUOTES, 'UTF-8');?></div> <?php } ?> <?if($sec['texte'] != null):?> <div class="texteaffiche"> <div class="texte"><?=texte_resume(html_entity_decode($sec['texte'],ENT_QUOTES, 'UTF-8'),700) ?></div> <?php if(strlen(strip_tags(html_entity_decode($sec['texte'],ENT_QUOTES, 'UTF-8'))) > 700): ?> <p><span class="affsuite"><?=lang("seemore")?></span></p> </div> <div class="textecache"> <div class="texte"><?=html_entity_decode($sec['texte'],ENT_QUOTES, 'UTF-8') ?></div> <p><span class="affsuite"><?=lang("seeless")?></span></p> </div> <?else:?> </div> <?endif;?> <?endif;?> </div> <?if ($sec['projet']!=""): ?> <div class="bloctexte bloctexte_bas"> <h3><?=lang("projet"); ?></h3> <div class="texte"><?=html_entity_decode($sec['projet'],ENT_QUOTES, 'UTF-8') ?></div> </div> <? endif;?> <?$categories=$edition->liste_categories($lang->getlangid()); foreach($categories as $cat){ $activites=$obj_activite->getListActivite($sec['id'],$cat['id'],$lang->getlangid(),$this_edition['id'],"front"); if($activites!=""){ echo '<h3 class="acttitre bg_profil_'.$sec['profil'].'">'.$cat['titre'].'</h3> <div class="bloctexte2">'; echo $activites.' </div>'; } } ?> </div> <div class="droite"> <!--galery--> <div class="options"> </div> <div class="etiquette bg_profil_<?=$sec['profil']?>"> <?=$profil->getLibelle($sec['profil']) ?> </div> <div style="clear:both"></div> <div class="imagessection"> <?php if ($sec['photo1'] != null) { ?> <a href="uploads/<?php echo $sec['photo1']; ?>" class="fgalerie" rel="gal"><img src="<?php echo thumb($sec['photo1'], 380,260, true) ?>" class="photo1" alt="Image du partenaire" /></a> <?php if ($sec['photo2'] != null && $sec['photo3'] != null && $sec['photo3'] != null) { ?> <div class="miniatures"> <?php if ($sec['photo2'] != null) echo "<a href=\"uploads/".$sec['photo2']."\" class=\"fgalerie\" rel=\"gal\"><img src=\"".thumb($sec['photo2'], 120,90, true)."\" class=\"minimargin1\" /></a>"; if ($sec['photo3'] != null) echo "<a href=\"uploads/".$sec['photo3']."\" class=\"fgalerie\" rel=\"gal\"><img src=\"".thumb($sec['photo3'], 120,90, true)."\" class=\"minimargin2\" /></a>"; if ($sec['photo4'] != null) echo "<a href=\"uploads/".$sec['photo4']."\" class=\"fgalerie\" rel=\"gal\"><img src=\"".thumb($sec['photo4'], 120,90, true)."\" class=\"minimargin3\" /></a>"; ?> </div> <?php } } else { ?> <div><img src="images/noimg.jpg" class="photo1" alt="SEDL" style="margin-bottom: 3px;" /></div> <?php } ?> </div> <?if($sec['profil']!=3 && $sec['population']!=""):?> <div class="info_bas"> <div class="titre"><?=$admtext->getText("population",$lang->getlangid())?></div> <div class="value"><?=$sec['population']?> <?=$admtext->getText("citizens",$lang->getlangid())?></div> </div> <? endif; ?> <? if($sec['site']!=""): ?> <div class="info_bas"> <div class="titre"><?=$admtext->getText("website",$lang->getlangid())?></div> <div class="value"><a href="<? if(!preg_match('@http:\/\/@', $sec['site'])) echo "http://"; ?><?=$sec['site']?>"><?=substr2($sec['site'],40)?></a></div> </div> <? endif; ?> <div id="gmap"></div> </div> </div> <div class="partager"> <div class="icons"> <div><a href="#partager_mail" class="inline"><img src="images/mail.png" alt="Mail" /> <?php echo lang("mail"); ?></a></div> <div><a href="<?php echo $lang->getlang()."/print/".$sec['id']."-".$sec['permalien']."/"; ?>"><img src="images/print.png" alt="Print" /> <?php echo lang("print"); ?></a></div> </div> <div style="display: none;"> <div id="partager_mail"> <form action="<?php echo $lang->getlang(); ?>/partager/section.html" method="post" class="form"> <table> <tr> <td class="label"><?php echo lang("email"); ?> <span class="etoile">*</span></td> <td class="field"><input type="text" name="email" value="<?php echo $_POST['email']; ?>" /></td> </tr> </table> <div class="form_bouton"> <input type="hidden" name="post" value="1" /> <input type="hidden" name="id" value="<?php echo $sec['id']; ?>" /> <input type="submit" class="bouton" id="maj_bouton" value="<?php echo lang("mail"); ?>" /> </div> </form> </div> </div> <div style="position: absolute;"> <div class="fb-like" data-href="<?php echo $url_site.$pagesec; ?>" data-send="false" data-width="400" data-show-faces="false"></div> </div> </div> <?php //affichage du footer include("theme/footer.php"); ?>