[2] | 1 | <?php
|
---|
| 2 | /************************************************************************/
|
---|
| 3 | /* Eleonline - Raccolta e diffusione dei dati elettorali */
|
---|
| 4 | /* by Luciano Apolito & Roberto Gigli */
|
---|
| 5 | /* http://www.eleonline.it */
|
---|
| 6 | /* info@eleonline.it luciano@aniene.net rgigli@libero.it */
|
---|
| 7 | /************************************************************************/
|
---|
| 8 |
|
---|
| 9 | if (stristr(htmlentities($_SERVER['PHP_SELF']), "javascript.php")) {
|
---|
| 10 | Header("Location: ../index.php");
|
---|
| 11 | die();
|
---|
| 12 | }
|
---|
| 13 |
|
---|
| 14 | ##################################################
|
---|
| 15 | # Include funzioni javascript #
|
---|
| 16 | ##################################################
|
---|
| 17 |
|
---|
| 18 | # inizio rotazione
|
---|
| 19 | if (isset($_SESSION['ruota']))
|
---|
| 20 | {
|
---|
| 21 | ?>
|
---|
| 22 | <script type="text/javascript" language="javascript">
|
---|
| 23 | <!--
|
---|
| 24 | function loadpage() {
|
---|
| 25 |
|
---|
| 26 | thetimer = setTimeout("changepage()", 8000);
|
---|
| 27 |
|
---|
| 28 |
|
---|
| 29 | }
|
---|
| 30 |
|
---|
| 31 | function changepage() {
|
---|
| 32 |
|
---|
| 33 | newlocation = "<?php echo "modules.php?csv=1&block=0&id_cons_gen=".$_GET['id_cons_gen']."&id_comune=".$_GET['id_comune']; ?>"
|
---|
| 34 | location = newlocation
|
---|
| 35 | }
|
---|
| 36 | // --></script>
|
---|
| 37 |
|
---|
| 38 | <?php
|
---|
| 39 | }
|
---|
| 40 | # fine rotazione
|
---|
| 41 | # googlemaps per sezioni
|
---|
| 42 | # variabili nel config.php
|
---|
| 43 | # gkey= chiave google reperibile per il proprio sito qui
|
---|
| 44 | # http://code.google.com/intl/it/apis/maps/signup.html
|
---|
| 45 | # googlemaps 1=attivo 2: disattivo
|
---|
| 46 | # funzione by eleonline.it
|
---|
| 47 | #########################################################
|
---|
| 48 |
|
---|
| 49 | function googlemaps(){
|
---|
[34] | 50 | global $dbi,$prefix,$id_comune,$googlemaps,$op,$gkey,$lang;
|
---|
[2] | 51 | # recupera gli inidirizzi
|
---|
| 52 | $id_sede=$_GET['id_sede'];
|
---|
| 53 | $sql = mysql_query("SELECT descrizione FROM ".$prefix."_ele_comuni where id_comune='$id_comune' ", $dbi);
|
---|
| 54 | list($comune) = mysql_fetch_row($sql);
|
---|
| 55 | $sql = mysql_query("select indirizzo from ".$prefix."_ele_sede where id_sede='$id_sede'", $dbi);
|
---|
| 56 | list($indirizzo)=mysql_fetch_row($sql);
|
---|
[34] | 57 | $indirizzocomune="$indirizzo , $comune , $lang";
|
---|
[2] | 58 | # javascript per mappa
|
---|
| 59 | $jsmaps ="
|
---|
| 60 | <div id=\"mapsearch\" style=\"margin:0 auto 0;\">
|
---|
| 61 | <span style=\"color:#676767;font-size:11px;margin:10px;padding:4px;\">Loading...</span>
|
---|
| 62 | </div>
|
---|
| 63 |
|
---|
| 64 |
|
---|
[34] | 65 | <script src=\"http://maps.google.com/maps?file=api&v=2&key=$gkey\"
|
---|
[2] | 66 | type=\"text/javascript\"></script>
|
---|
| 67 | <script src=\"http://www.google.com/uds/api?file=uds.js&v=1.0&source=uds-msw&key=$gkey\"
|
---|
| 68 | type=\"text/javascript\"></script>
|
---|
| 69 | <style type=\"text/css\">
|
---|
| 70 | @import url(\"http://www.google.com/uds/css/gsearch.css\");
|
---|
| 71 | </style>
|
---|
| 72 | <script type=\"text/javascript\">
|
---|
| 73 | window._uds_msw_donotrepair = true;
|
---|
| 74 | </script>
|
---|
| 75 | <script src=\"http://www.google.com/uds/solutions/mapsearch/gsmapsearch.js?mode=new\"
|
---|
| 76 | type=\"text/javascript\"></script>
|
---|
| 77 | <style type=\"text/css\">
|
---|
| 78 | @import url(\"http://www.google.com/uds/solutions/mapsearch/gsmapsearch.css\");
|
---|
| 79 | </style>
|
---|
| 80 |
|
---|
| 81 | <style type=\"text/css\">
|
---|
| 82 | .gsmsc-mapDiv {
|
---|
| 83 | height : 350px;
|
---|
| 84 | }
|
---|
| 85 |
|
---|
| 86 | .gsmsc-idleMapDiv {
|
---|
| 87 | height : 350px;
|
---|
| 88 | }
|
---|
| 89 |
|
---|
| 90 | #mapsearch {
|
---|
| 91 | width : 450px;
|
---|
| 92 | margin: 10px;
|
---|
| 93 | padding: 4px;
|
---|
| 94 | }
|
---|
| 95 | </style>
|
---|
| 96 | <script type=\"text/javascript\">
|
---|
| 97 | function LoadMapSearchControl() {
|
---|
| 98 |
|
---|
| 99 | var options = {
|
---|
| 100 | zoomControl : GSmapSearchControl.ZOOM_CONTROL_ENABLE_ALL,
|
---|
| 101 | title : \"$indirizzo\",
|
---|
| 102 | url : \"http://www.eleonline.it\",
|
---|
| 103 | idleMapZoom : GSmapSearchControl.ACTIVE_MAP_ZOOM+1,
|
---|
| 104 | activeMapZoom : GSmapSearchControl.ACTIVE_MAP_ZOOM+1
|
---|
| 105 | }
|
---|
| 106 |
|
---|
| 107 | new GSmapSearchControl(
|
---|
| 108 | document.getElementById(\"mapsearch\"),
|
---|
| 109 | \"$indirizzocomune\",
|
---|
| 110 | options
|
---|
| 111 | );
|
---|
| 112 |
|
---|
| 113 | }
|
---|
| 114 |
|
---|
| 115 | GSearch.setOnLoadCallback(LoadMapSearchControl);
|
---|
| 116 | </script>
|
---|
| 117 |
|
---|
| 118 | <center>";
|
---|
| 119 |
|
---|
| 120 | return $jsmaps;
|
---|
| 121 | }
|
---|
| 122 |
|
---|
| 123 |
|
---|
| 124 | ?>
|
---|