Example #1
0
                    $(".nav_event").addClass("fixNavigation"); //on ajoute la classe "fixNavigation" à <div id="navigation">

                } else {
                    $('.nav_event').removeClass("fixNavigation");//sinon on retire la classe "fixNavigation" à <div id="navigation">
                }
            }
        );
    });
</script>


<script type="text/javascript">
    var geocoder;
    var map;
    var adresse_event = '<?php 
echo show_adr($mon_event[12], $mon_event[11], $mon_event[10]);
?>
';
    // alert(adresse_event);
    var tab_adresse = <?php 
echo json_encode($tab_adr);
?>
;
    // alert(tab_adresse[1]);
    var Paris = "89 rue gay lussac, 78800, Houilles"

    if (navigator.geolocation) {
        navigator.geolocation.getCurrentPosition(function (position) {
            //   alert("Latitude : " + position.coords.latitude + ", longitude : " + position.coords.longitude);
        });
    }
Example #2
0
include dirname(__FILE__) . '/../modeles/evenement/rating.php';
include dirname(__FILE__) . '/../modeles/evenement/evenement.php';
$mon_event = show_event();
//var_dump($mon_event);
/*déclaration variables !!!*/
$rating = show_rating($_GET['id']);
$sum = $rating['0']['SUM(valeur)'];
$count = $rating['0']['COUNT(valeur)'];
function show_adr($adr, $dep, $ville)
{
    $mon_adresse = $adr . ", " . $dep . ", " . $ville;
    return $mon_adresse;
}
$resultat_adr = recuperer_adr();
foreach ($resultat_adr as $n) {
    $tab_adr[] = show_adr($n[12], $n[11], $n[10]);
}
print_r($tab_adr);
//show_adr($mon_event[12], $mon_event[11], $mon_event[10]);
$verif_user_vote = verif_user($_SESSION['prenom'], $_GET['id']);
//print_r($verif_user_vote[0]);
/* calcul de la moyenne du rating*/
if ($count == 0) {
    $rating_star = 0;
} else {
    $arrondi = round($sum / $count);
    $rating_star = intval($arrondi);
}
/*verification + ajout d'un vote */
if (isset($_POST['id']) && isset($_POST['prenom']) && isset($_POST['valeur'])) {
    if ($verif_user_vote > 0) {