%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /home/alliance/domains/sedl.alnetis.fr/public_html/
Upload File :
Create Path :
Current File : /home/alliance/domains/sedl.alnetis.fr/public_html/p-section.php

<?php
include_once("inc/config.php");
include_once("inc/functions.php");
include_once("inc/init.php");

verif_get($_GET['id']);

if(isset($_GET['language'])){
	$sec = $section->getSection($_GET['id'],$_GET['language']);
}
else{
	$sec = $section->getSection($_GET['id'],$lang->getlangid());
}

if($sec == null) {
	header("Location: 404.html");
	exit(0);
}









$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);
if((!isset($_SESSION['edition_front']) && isset($_GET['edition'])) || (isset($_GET['edition']) && $_GET['edition']!=$_SESSION['edition_front'])){
	// verif 
	
	$query="SELECT * FROM edition WHERE id=".$_GET['edition'];
	if($db->isres($query)){
		$_SESSION['edition_front']=$_GET['edition'];
	}
}
$this_edition=$edition->getCurrentEdition("front",$lang->getlangid());
if(!$section->isValid($_GET['id'],$this_edition['id'])){
	header("Location: ../".$country['id']."-pays.html");
}

$affsec = true;
$pagesec = $lang->getlang()."/".$sec['id']."-".$sec['permalien']."/";
if($_GET['permalien'] != $sec['permalien'])
{
	header("Location:".$url_site.$pagesec);
	exit(0);
}

$facebookapi = 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="404527296278705"/>
<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=AIzaSyCPivdNX5TFi2D2NO41GnN9Q97Rd2hBHSo&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");?>"});
	
	
	<? if($sec['geo_x']!=""): ?>
	
	var centre=new google.maps.LatLng(<?=$sec['geo_x']?>,<?=$sec['geo_y']?>);
	//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: centre
		});
			
	<?else:?>
	 
	 
	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
			});
			
			$.post(
				"ajax.php",
				{action:"add_geo",id: <?=$sec['id']?>,geo_x:results[0].geometry.location.lat(),geo_y:results[0].geometry.location.lng()},
				function(data){
					if(data!=""){
						alert(data);
					}
				}
			);
			
		} 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);
				}
			});
		}
	});
	
	<? endif; ?>
});
</script>
<?php
//affichage du header
include("theme/header.php");


?>
	<div id="gauche" class="section">
		<div class="ariane"><a href="<?=$lang->getlang()?>/<?=$country['id'];?>-pays.html"><img src="images/icons/<?=strtolower($country['code_iso']);?>.png" alt="<?=$country['name'];?>"/></a> <span class="pays_lib"><a href="<?=$lang->getlang()?>/<?=$country['id'];?>-pays.html"><?=$country['name'] ?></a></span> <span class="section_lib"><?=$sec['titre'] ?></span></div>
		
		<div class="blanc padding2 mt10">
		<?$query="SELECT * FROM `section_lang` WHERE lang=".$sec['section_lang']." AND valide=1";
		if($db->isres($query) && !(isset($_GET['language']))):
			?>
			<?=$admtext->getText("partenaire_autrelang",$lang->getlangid());?> <a href="<?=$lang->getlang()?>/<?=$sec['id']?>-<?=$sec['permalien']?>/<?=$getedition?><?=($getedition!=""?"&language=".$sec['section_lang']:"?language=".$sec['section_lang'])?>"><?=$lang->getlangName($sec['section_lang'],$lang->getlangid())?></a>
		<? endif;
		if(isset($_GET['language'])):		?>

			<?=$admtext->getText("retourner_lang",$lang->getlangid());?> <a href="<?=$lang->getlang()?>/<?=$sec['id']?>-<?=$sec['permalien']?>/<?=$getedition?>"><?=$lang->getlangName($lang->getlangid(),$lang->getlangid())?></a>
		
		<? endif;?>
		<h1><?=$sec['titre']?></h1>
		
		
		
		<p class="surtitre"><strong>« <?=$sec['titre']?> »</strong> <?=$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['profil']==2):?>
		
		<? $query = "SELECT c.*,cl.texte FROM `campagne` c LEFT JOIN `campagne_lang` cl ON c.id=cl.campagne WHERE cl.lang=".$lang->getlangid()." AND section = ".$_GET['id']." AND edition=".$this_edition['id']; 
		$campagne=$db->select_array($query);
		if($campagne['valide'] == '1' && $campagne['texte'] != null) {
		?>
		<div class="blanc padding2 mt10">
			<h2><?=$admtext->getText("campagne",$lang->getlangid())?></h2>
			<div class="texte"><?=html_entity_decode($campagne['texte'],ENT_QUOTES, 'UTF-8');?></div>
		</div>
		<?
		}
		endif;
		?>
		
		<?if($sec['partenaire']!=""):?>
		<div class="blanc padding2 mt10">
			<h2><?=lang("colpartner") ?></h3>
			<p><?=$sec['partenaire']?></p>
		</div>
		<? endif; ?>
		
		
		<?$types_act=$obj_activite->getTypeActivite($sec['profil'],$lang->getlangid());
		if($getedition!="" && isset($_GET['language'])){
			$infoget=$getedition."&language=".$_GET['language'];
		}
		elseif(isset($_GET['language'])){
			$infoget="?language=".$_GET['language'];
		}
		else{
			$infoget="";
		}
		foreach($types_act as $type_act){
			$activites=$obj_activite->getListActivite($sec['id'],$type_act['id'],$lang->getlangid(),$this_edition['id'],"front","all",null,null,$infoget);
			$activites2=$obj_activite->getListActivite2($sec['id'],$type_act['id'],$lang->getlangid(),$this_edition['id'],"front","all",null,null,$infoget);
			if($activites!="" || $activites2!=""){
				echo '<h2 class="mt10">'.str_replace("[edition_titre]",$this_edition['titre'],$type_act['libelle']).'</h2>';
				if($activites!=""){
					echo $activites;
				}
				if($activites2!=""){
					echo $activites2;
				}
			}
			
			
		}
		?>
		<p class="mt10"><i><?=$admtext->getText("responsabilite_cont",$lang->getlangid());?> <?=$sec['titre']?> <? if($sec['site']!=""): ?><a href="<? if(!preg_match('@http:\/\/@', $sec['site'])) echo "http://"; ?><?=$sec['site']?>"><?=substr2($sec['site'],40)?></a><? endif;?></i></p>
	</div>
	<div id="droite" class="section">
	<div id="sticky">
		<!--galery-->
		<div class="etiquette mt10 bg_profil_<?=$sec['profil']?>">
			<h3><?=$profil->getLibelle($sec['profil']) ?></h3>
		</div>
		<div class="imagessection bg_profil_<?=$sec['profil']?>">
		<?php
		if ($sec['photo1'] != null)
		{
		?>
		<a href="uploads/<?php echo $sec['photo1']; ?>" class="fgalerie" rel="gal"><img src="<?php echo thumb($sec['photo1'], 500,350, true) ?>" class="photo1" alt="Image du partenaire" /></a>
		<div class="miniatures flexcontent">
		<?php
		if ($sec['photo2'] != null) echo "<a href=\"uploads/".$sec['photo2']."\" class=\"fgalerie\" rel=\"gal\"><img src=\"".thumb($sec['photo2'], 200,120, true)."\" class=\"minimargin1\" /></a>";
		if ($sec['photo3'] != null) echo "<a href=\"uploads/".$sec['photo3']."\" class=\"fgalerie\" rel=\"gal\"><img src=\"".thumb($sec['photo3'], 200,120, true)."\" class=\"minimargin2\" /></a>";
		if ($sec['photo4'] != null) echo "<a href=\"uploads/".$sec['photo4']."\" class=\"fgalerie\" rel=\"gal\"><img src=\"".thumb($sec['photo4'], 200,120, 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 bg_profil_<?=$sec['profil']?>"><?=$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 bg_profil_<?=$sec['profil']?>"><?=$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; ?>
		<? if($sec['site2']!=""): ?>
			<div class="info_bas">
				<div class="titre bg_profil_<?=$sec['profil']?>"><?=$admtext->getText("website",$lang->getlangid())?></div>
				<div class="value"><a href="<? if(!preg_match('@http:\/\/@', $sec['site2'])) echo "http://"; ?><?=$sec['site2']?>"><?=substr2($sec['site2'],40)?></a></div>
			</div>
		<? endif; ?>
		<? if($sec['site3']!=""): ?>
			<div class="info_bas">
				<div class="titre bg_profil_<?=$sec['profil']?>"><?=$admtext->getText("website",$lang->getlangid())?></div>
				<div class="value"><a href="<? if(!preg_match('@http:\/\/@', $sec['site3'])) echo "http://"; ?><?=$sec['site3']?>"><?=substr2($sec['site3'],40)?></a></div>
			</div>
		<? endif; ?>
		
		<div id="gmap"></div>
		
	</div>
	</div>

</section>
<section class="partager">
<div class="main">
	<div class="icons">
		<div><a href="#partager_mail" class="inline"><i class="far fa-envelope vert"></i> <?php echo lang("mail"); ?></a></div>
		<div><a href="<?php echo $lang->getlang()."/print/".$sec['id']."-".$sec['permalien']."/"; ?>"><i class="fas fa-print vert"></i> <?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 class="fb-like" data-href="<?php echo $url_site.$pagesec; ?>" data-send="false" data-width="400" data-show-faces="false"></div>
</div>

<?php

//affichage du footer
include("theme/footer.php");

?>

Zerion Mini Shell 1.0