Changeset 247 for trunk/client


Ignore:
Timestamp:
Jan 30, 2016, 11:38:54 PM (9 years ago)
Author:
luc
Message:

Aggiornato Google Maps e sistemato in amministrazione la scelta del tema.
Solo per l'upgrade temete conto del file di aggirnamento del databalse presente nella dir sql con il nome aggiornamento-2.0_2016-01-30.sql.

Location:
trunk/client
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/client/header.php

    r241 r247  
    6060        # rotazione per tema tour
    6161        if (isset($_SESSION['ruota'])){$csv=1; echo "<body onload=\"loadpage()\"";}
    62         else echo "<body";
     62        else echo "<body  onload=\"maps()\"";
    6363        if (!$csv) echo " style=\"background-image: url(temi/$tema/images/sfondo.jpg); background-repeat:repeat-x;\"";
    6464        echo " >\n";
  • trunk/client/inc/javascript.php

    r210 r247  
    4949
    5050
     51
     52
     53
     54
     55
    5156function googlemaps(){
    5257global $dbi,$prefix,$id_comune,$googlemaps,$op,$gkey,$lang;
     
    5762    $sql = mysql_query("select indirizzo from ".$prefix."_ele_sede where id_sede='$id_sede'", $dbi);
    5863    list($indirizzo)=mysql_fetch_row($sql);
    59     $address="$indirizzo  $comune";
     64    $address=rawurlencode("$indirizzo,$comune,58047");
     65
     66        $resultGeoCode=file_get_contents('http://maps.google.com/maps/api/geocode/json?address='.$address.'&amp;sensor=false');
     67
     68        $output= json_decode($resultGeoCode);
     69       
     70        if($output->status == 'OK'){
     71                $latitude       = $output->results[0]->geometry->location->lat; //Returns Latitude
     72                $longitude      = $output->results[0]->geometry->location->lng; // Returns Longitude
     73                $location       = $output->results[0]->formatted_address;
     74        }
     75
     76
     77        $coords['lat'] = $latitude;
     78        $coords['long'] = $longitude;
     79
     80
     81
     82
     83
     84/*
     85
     86
     87
    6088       
    6189        $url = sprintf('http://maps.google.com/maps?output=js&q=%s',rawurlencode($address));
     
    75103        }
    76104
     105*/
     106
     107
     108
     109
     110
     111
     112
    77113echo '
    78114<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=true&language=it"></script>
    79115   <script type="text/javascript">
    80       function initialize() {
     116      function maps() {
    81117         var latlng = new google.maps.LatLng('.$coords['lat'].','.$coords['long'].'); // centro della mappa
    82118         var myLatlng = new google.maps.LatLng('.$coords['lat'].','.$coords['long'].'); // segnapunto
     
    99135   </script>
    100136';
     137
    101138}
    102139?>
  • trunk/client/versione.php

    r243 r247  
    11<?php
    22
    3 $versione = "2.0 rev 243";
     3$versione = "2.0 rev 247";
    44$version_number = $versione;
    5 $version = "Eleonline $version_number (<i>Data Release: 08 luglio 2015</i>)";
     5$version = "Eleonline $version_number (<i>Data Release: 31 gennaio 2016</i>)";
     6
    67
    78?>
Note: See TracChangeset for help on using the changeset viewer.