testmap

[:fr] <style type= »text/css »>
html {
height: 100%
}
body {
height: 95%;
margin: 0;
padding: 0
}
#EmplacementDeMaCarte {
height: 100%
}
#cadre{
font-family: Arial, Helvetica, sans-serif;
font-size: 12px;
text-align:left;
border-top:1px solid #CCCCCC;
border-bottom:1px solid #CCCCCC;
margin:10px;
padding: 5px;
background-color:#FFF8E7;
}
</style>
<script type= »text/javascript » src= »http://maps.googleapis.com/maps/api/js?sensor=false »></script>
<script type= »text/javascript »>
var maCarte;
function initialisation(){
var centreInitial = new google.maps.LatLng(49.00383,1.904909);
var optionsCarte = {
zoom: 13,
center: centreInitial,
mapTypeId: google.maps.MapTypeId.ROADMAP
}
maCarte = new google.maps.Map(document.getElementById(« EmplacementDeMaCarte »), optionsCarte);
google.maps.event.addListenerOnce(maCarte, « tilesloaded », afficheCoordsCentre);
google.maps.event.addListener(maCarte, « center_changed », afficheCoordsCentre);
google.maps.event.addListener(maCarte, « click », function(evenement){maCarte.setCenter(evenement.latLng);});
var optionsMarqueur = {
position: centreInitial,
map: maCarte,
title: « Aviron de Meulan les Mureaux Hardricourt (AMMH) »
}
var marqueur = new google.maps.Marker(optionsMarqueur);
}

function afficheCoordsCentre(){
var centreCarte = maCarte.getCenter();
document.getElementById(« afficheCentreCarte »).innerHTML = « <strong>Lat</strong> :  » + centreCarte.lat() + « <br/><strong>Lng</strong> :  » + centreCarte.lng();
}

google.maps.event.addDomListener(window, ‘load’, initialisation);
</script>

[insert_php]
//page Expert plus
$myvar=7;
$noaffichecomment = true;

global $chemin;
global $wpdb;
global $wp_query;
if (isset($wp_query->query_vars[‘myvar’]))
{$myvar = $wp_query->query_vars[‘myvar’];}

if (!$noaffichecomment) {echo ‘<span style= »color:red »>myvar=’ . $myvar . ‘</span><br/>’;}

//on cherhe l’expert
$experts = $wpdb->get_results(« SELECT * FROM wp_cnideca_experts WHERE NE= $myvar « );
$numexpert = count($experts);
if (!$noaffichecomment) {echo ‘<span style= »color:red »>nombre expert=’ . $numexpert . ‘</span><br/>’;}
//as-t-on trouvé l’expert
if ($numexpert > 0){
//on affiche le nom
echo ‘<h5>’ . $experts[0]->Nom . ‘ ‘ . $experts[0]->Prenom . ‘</h5><br />’;
//on affiche retour
echo ‘<br /><a href= »‘ . $chemin . ‘experts » class= »retour-bouton »>RETOUR</a><br /><br />’;
//on affiche les cours d’appel
//cour d’appel
if (!$noaffichecomment) {echo ‘<span style= »color:red »>Cour appel=’ . $experts[0]->Cour_appel . ‘</span><br/>’;}
if ($experts[0]->Cour_appel >  » « ) {
if ($experts[0]->Annee_appel > 0) {
echo ‘<strong>’ . $experts[0]->Annee_appel . ‘ : </strong>’;
}
echo « <strong>Cour d’Appel de  » . $experts[0]->Cour_appel . ‘</strong><br />’;
}
//cour de cassation
if (!$noaffichecomment) {echo ‘<span style= »color:red »>Année cassation=’ . $experts[0]->Année_cassation . ‘</span><br/>’;}
if ($experts[0]->Cassation == 1) {
if ($experts[0]->Annee_cassation > 0) {
echo ‘<strong>’ . $experts[0]->Année_cassation . ‘ : </strong>’;
}
echo « <strong> Cour de cassation</strong><br /> »;
}
//cour administrative de Paris
if (!$noaffichecomment) {echo ‘<span style= »color:red »>Cour administrative de Paris=’ . $experts[0]->Cour_administrative_Paris . ‘</span><br/>’;}
if ($experts[0]->Cour_administrative_Paris == 1) {
if ($experts[0]->Annee_administrative_Paris > 0) {
echo ‘<strong>’ . $experts[0]->Annee_administrative_Paris . ‘ : </strong>’;
}
echo ‘<strong>Cour Administrative de Paris</strong><br />’;
}
//cour administrative de Marseille
if (!$noaffichecomment) {echo ‘<span style= »color:red »>Cour administrative de Marseille=’ . $experts[0]->Cour_administrative_Marseille . ‘</span><br/>’;}
if ($experts[0]->Cour_administrative_Marseille == 1) {
if ($experts[0]->Annee_administrative_Marseille > 0) {
echo ‘<strong>’ . $experts[0]->Annee_administrative_Marseille . ‘ : </strong>’;
}
echo ‘<strong>Cour Administrative de Marseille</strong><br />’;
}
//cour administrative de Douai
if (!$noaffichecomment) {echo ‘<span style= »color:red »>Cour administrative de Douai=’ . $experts[0]->Cour_administrative_Marseille . ‘</span><br/>’;}
if ($experts[0]->Cour_administrative_Douai == 1) {
if ($experts[0]->Annee_administrative_Marseille > 0) {
echo ‘<strong>’ . $experts[0]->Annee_administrative_Douai . ‘ : </strong>’;
}
echo ‘<strong>Cour Administrative de Douai</strong><br />’;
}
//expert
if (!$noaffichecomment) {echo ‘<span style= »color:red »>Expert=’ . $experts[0]->Expert . ‘</span><br/>’;}
if ($experts[0]->Expert >  » « ) {
echo ‘<strong>’ .$experts[0]->Expert . ‘</strong><br />’;
}
echo ‘<br /><br /><a href= »‘ . $chemin . ‘expert/?myvar=’ . $myvar . ‘ » class= »plusinfos-bouton »>-INFOS</a><br /><br />’;

//Plus d’infos DEBUT————————————————————–
echo ‘<strong>’ . $experts[0]->Adresse . ‘</strong><br />’;
if ($experts[0]->Adresse_2 > ‘ ‘) {
echo ‘<strong>’ . $experts[0]->Adresse_2 . ‘</strong><br />’;
}
if (!$noaffichecomment) {echo ‘<span style= »color:red »>Code postal gauche=’ . substr($experts[0]->Code_postal, 0, 2) . ‘</span><br/>’;}
if (substr($experts[0]->Code_postal, 0, 2) == « F « )
{$cp = substr($experts[0]->Code_postal, 2, strlen($experts[0]->Code_postal) – 2);}
else
{$cp = $experts[0]->Code_postal;}
echo ‘<strong>’ . $cp . ‘ ‘ . $experts[0]->Ville .'</strong><br />’;
if ($experts[0]->Bureau > ‘ ‘) {
echo ‘<strong>Tél : ‘ . $experts[0]->Bureau . ‘</strong><br />’;
}
if ($experts[0]->Mobile > ‘ ‘) {
echo ‘<strong>Mobile : ‘ . $experts[0]->Mobile . ‘</strong><br />’;
}
if ($experts[0]->Telecopie > ‘ ‘) {
echo ‘<strong>Fax : ‘ . $experts[0]->Telecopie . ‘</strong><br />’;
}
if ($expert->Couriel > ‘ ‘) {
echo ‘<strong>e-mail : ‘ . ‘<a href= »mailto:’ . $expert->couriel . ‘ »><span style= »color:blue »>’ . $experts[0]->Couriel . ‘</span></a></strong><br />’;
}
echo ‘<br />’;
if ($experts[0]->Diplomes > ‘ ‘) {
$text = preg_replace(« /(rn|n|r)/ »,  » « , $experts[0]->Diplomes );
echo ‘<strong>Diplômes : </strong>’ . $text . ‘<br />’;
}
if ($experts[0]->Langues > ‘ ‘) {
$text = preg_replace(« /(rn|n|r)/ »,  » « , $experts[0]->Langues);
if (!$noaffichecomment) {echo ‘<span style= »color:red »>Elimine retour chariot=’ . $text . ‘</span><br/>’;}
echo ‘<strong>Langues : </strong>’ . $text . ‘<br />’;
}
if ($experts[0]->Profession > ‘ ‘) {
echo ‘<strong>Profession : </strong>’ . $experts[0]->Profession . ‘<br />’;
}
if ($experts[0]->Expert > ‘ ‘) {
$text = preg_replace(« /(rn|n|r)/ »,  » « , $experts[0]->Expert);
echo ‘<strong>Expert : </strong>’ . $text . ‘<br />’;}
if ($experts[0]->Specialites > ‘ ‘) {
$text = preg_replace(« /(rn|n|r)/ »,  » « , $experts[0]->Specialites);
echo ‘<strong>Spécialités : </strong>’ . $text . ‘<br />’;}
if ($experts[0]->Specialites_complementaires > ‘ ‘) {
$text = preg_replace(« /(rn|n|r)/ »,  » « , $experts[0]->Specialites_complementaires);
echo ‘<strong>Spécialités complémentaires : </strong>’ . $text . ‘<br />’;}
if ($experts[0]->Enseignement > ‘ ‘) {
$text = preg_replace(« /(rn|n|r)/ »,  » « , $experts[0]->Enseignement );
echo ‘<strong>Enseignement : </strong>’ . $text . ‘<br />’;}
if ($experts[0]->Publications > ‘ ‘) {
$text = preg_replace(« /(rn|n|r)/ »,  » « , $experts[0]->Publications );
echo ‘<strong>Publications : </strong>’ . $text . ‘<br />’;}
if ($experts[0]->Conference > ‘ ‘) {
$text = preg_replace(« /(rn|n|r)/ »,  » « , $experts[0]->Conference );
echo ‘<strong>Conférences : </strong>’ . $text . ‘<br />’;}
if ($experts[0]->Brevets > ‘ ‘) {
$text = preg_replace(« /(rn|n|r)/ »,  » « , $experts[0]->Brevets );
echo ‘<strong>Brevets : </strong>’ . $text . ‘<br />’;}
if ($experts[0]->Carriere> ‘ ‘) {
$text = preg_replace(« /(rn|n|r)/ »,  » « , $experts[0]->Carriere);
echo ‘<strong>Carrière : </strong>’ . $text . ‘<br />’;}
echo ‘<br />’;
//Plus d’infos FIN————————————————————–
//on cherche les spécialités
$sql = ‘SELECT wp_cnideca_experts.NE, wp_cnideca_competences.CPF, wp_cnideca_niveaux.libelle ‘;
$sql = $sql . ‘FROM (wp_cnideca_experts INNER JOIN wp_cnideca_competences ON wp_cnideca_experts.NE = wp_cnideca_competences.NE) INNER JOIN ‘;
$sql = $sql . ‘wp_cnideca_niveaux ON wp_cnideca_competences.CPF = wp_cnideca_niveaux.CPF ‘;
$sql = $sql . ‘WHERE (((wp_cnideca_experts.NE)=’ . $myvar . ‘))’;
$competences = $wpdb->get_results($sql);
$numcompetences=count($competences);
if (!$noaffichecomment) {echo ‘<span style= »color:red »>nombre spécialités=’ . $numcompetences . ‘</span><br/>’;}
if ($numcompetences == 0)
{echo ‘<span style: »color:red »><strong>Aucune spécialité inscrite pour cet expert</strong></span><br />’;}
elseif ($numcompetences == 1)
{echo ‘<span style: »color:red »><strong>Inscrit(e) dans 1 spécialité</strong></span><be />’;}
else
{echo ‘<span style: »color:red »><strong>Inscrit(e) dans ‘ . $numcompetences . ‘ spécialités</strong></span><br /><br />’;}

if ($numcompetences > 0) {
echo ‘<table class= »tablecpf »>’;
foreach ($competences as $competence) {
echo ‘<tr>’;
echo ‘<td align= »left » class= »CPF »>’ . ‘<strong>’ . $competence->CPF . ‘</strong></a></td>’;
echo ‘<td align= »left » class= »liensCPF »><a href= »‘ . $chemin . ‘CPF?myvar=’ . $competence->CPF . ‘ »>’ . $competence->libelle . ‘</a></td>’;
echo ‘</tr>’;
}
echo ‘</table>’;
}
echo ‘<br /><a href= »‘ . $chemin . ‘experts » class= »retour-bouton »>RETOUR</a><br /><br />’;
}

[/insert_php]
<div id= »EmplacementDeMaCarte »></div>[:]