%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-carte.php

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


//affichage du html
include("theme/html.php");
//affichage des metas
include("theme/meta.php");
echo "\n<title>".$admtext->getText("carte",$lang->getlangid())." - ".$info_titresite."</title>\n";
//affichage du header
include("theme/header.php");


$this_edition=$edition->getCurrentEdition("front",$lang->getlangid());


$sections=$section->liste_section_edition($this_edition['id'],$lang->getlangid(),"full",true);
$lespays=$pays->getPays($lang->getlangid());

$lespays_actifs=array();
$lespays_actifs_temp=$pays->getDrapeauEdition($this_edition['id'],$lang->getlangid());
foreach($lespays_actifs_temp as $un_pays){
	$lespays_actifs[$un_pays['id']]=$un_pays;
}
?>


<script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?key=AIzaSyCPivdNX5TFi2D2NO41GnN9Q97Rd2hBHSo&sensor=true&language=<?php echo $lang->getlang(); ?>"></script>
<?
foreach($sections as $sec):
	if($sec['geo_x']==""): 
?>
	
	<script type="text/javascript">
	$(document).ready(function() {
		geocoder = new google.maps.Geocoder();

			<?$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);?>
			 
			 
			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) {
					$.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);
							}
						}
					);
					
				} 
			});
			
		
	});
	</script>
<? 
	endif;
endforeach;
$sections=$section->liste_section_edition($this_edition['id'],$lang->getlangid(),"full",true);
?>
<!--<script src="https://www.amcharts.com/lib/3/ammap.js"></script>-->
<!--<script src="https://www.amcharts.com/lib/3/maps/js/worldLow.js"></script>-->
<link rel="stylesheet" href="css/ammap.css" type="text/css">
<script src="js/ammap.js"></script>
<script src="js/worldHigh.js"></script>


<script type="text/javascript">
	// svg path for target icon
var targetSVG = "M9,0C4.029,0,0,4.029,0,9s4.029,9,9,9s9-4.029,9-9S13.971,0,9,0z M9,15.93 c-3.83,0-6.93-3.1-6.93-6.93S5.17,2.07,9,2.07s6.93,3.1,6.93,6.93S12.83,15.93,9,15.93 M12.5,9c0,1.933-1.567,3.5-3.5,3.5S5.5,10.933,5.5,9S7.067,5.5,9,5.5 S12.5,7.067,12.5,9z";

window.map = AmCharts.makeChart( "mapdiv", {
  type: "map",
  backgroundColor:"#9CD1F7",
  "projection":"winkel3",
  "theme": "none",

  
  imagesSettings: {
    rollOverColor: "#FFAB03",
    rollOverScale: 3,
    selectedScale: 3,
    selectedColor: "#FFAB03",
    color: "#FFAB03"
  },
	dragMap: true,
	zoomOnDoubleClick: false,
	zoomControl: {
		zoomControlEnabled: true,
		panControlEnabled: true
	},

	areasSettings: {
		unlistedAreasColor: "#A5C0EC",
		outlineThickness:0.1,
		selectedColor:"#2B5AB3"
	},

  dataProvider: {
    map: "worldHigh",
	areas: [
<? foreach($lespays as $key=>$unpays):
	if(!isset($lespays_actifs[$unpays['id']])):?>
		{ "id": "<?=$unpays['code_iso']?>", 
			color:"#3c7196"
			}
	<? else:?>
		{ "id": "<?=$unpays['code_iso']?>", 
			color:"#123751",
			url:"<?=$lang->getlang()?>/<?=$unpays['id'];?>-pays.html",
			targetUrl:"_blank"}
	<? endif;?>
<? if($key+1<count($lespays)):?>
,
<? endif;?>
<? endforeach; ?>
	],
    images: [ 
<?foreach($sections as $key=>$sec):
if($sec['geo_x']!=""):?>
{
	svgPath: targetSVG,
	zoomLevel: 5,
	scale: 0.5,
	title: "<?=$sec['titre']?>",
	latitude: <?=$sec['geo_x']?>,
	longitude: <?=$sec['geo_y']?>,
	url:"<?=$lang->getlang()?>/<?=$sec['id']?>-<?=$sec['permalien']?>/",
	targetUrl:"_blank"
}
<? if($key+1<count($sections)):?>
,
<? endif;?>			
<? endif;?>			
<? endforeach;?>
     ]
  },
  "export": {
    "enabled": true
  },
  "legend": {
    "useGraphSettings": true,
	"backgroundAlpha":0.3,
	"backgroundColor":"#ffffff",
	"labelText":"Test"
  }
} );
map.addListener("init", function (event) {
    var zoomToAreasIds = ['AT', 'HR', 'FR', 'DE', 'GR', 'ID', 'MA', 'PT', 'ES', 'CH', 'TR', 'GB', 'CY', 'SE'];
    var zoomToAreas = [];
    var area;
    for(var i = 0; i < zoomToAreasIds.length; i++) {
        if (area = map.getObjectById(zoomToAreasIds[i]))
            zoomToAreas.push(area);
    }
    map.zoomToGroup(zoomToAreas);
});
</script>
<div class="page_carte blanc padding2 mt10 w100">
	<h1><?=$admtext->getText("carte",$lang->getlangid())?></h1>
	<p><?=$admtext->getText("carte_pres_carte",$lang->getlangid())?></p>
	<div style="clear:both"></div>
	<div id="mapdiv" style="width: 100%; background-color:#9CD1F7; height: 500px;"></div>
</div>

<?php

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

?>

Zerion Mini Shell 1.0