Changeset 347 for trunk/client/inc
- Timestamp:
- May 14, 2021, 2:00:23 PM (4 years ago)
- Location:
- trunk/client/inc
- Files:
-
- 639 added
- 2 deleted
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/client/inc/csrf-magic/csrf-magic.php
r253 r347 157 157 $buffer = preg_replace('#(<form[^>]*method\s*=\s*["\']post["\'][^>]*>)#i', '$1' . $input, $buffer); 158 158 if ($GLOBALS['csrf']['frame-breaker']) { 159 $buffer = str_ireplace('</head>', '<script type="text/javascript">if (top != self) {top.location.href = self.location.href;}</script></head>', $buffer);159 $buffer = str_ireplace('</head>', '<script>if (top != self) {top.location.href = self.location.href;}</script></head>', $buffer); 160 160 } 161 161 if ($js = $GLOBALS['csrf']['rewrite-js']) { 162 162 $buffer = str_ireplace( 163 163 '</head>', 164 '<script type="text/javascript">'.164 '<script">'. 165 165 'var csrfMagicToken = "'.$tokens.'";'. 166 166 'var csrfMagicName = "'.$name.'";</script>'. … … 168 168 $buffer 169 169 ); 170 $script = '<script type="text/javascript">CsrfMagic.end();</script>';170 $script = '<script>CsrfMagic.end();</script>'; 171 171 $buffer = str_ireplace('</body>', $script . '</body>', $buffer, $count); 172 172 if (!$count) { -
trunk/client/inc/javascript.php
r247 r347 42 42 # googlemaps per sezioni 43 43 # variabili nel config.php 44 # gkey= chiave google reperibileper il proprio sito qui45 # http ://code.google.com/intl/it/apis/maps/signup.html44 # gkey= chiave google informazioni su come reperirla per il proprio sito qui 45 # https://cloud.google.com/maps-platform/user-guide/account-changes/#no-plan 46 46 # googlemaps 1=attivo 2: disattivo 47 47 # funzione by eleonline.it … … 58 58 # recupera gli inidirizzi 59 59 $id_sede=$_GET['id_sede']; 60 $sql = mysql_query("SELECT descrizione FROM ".$prefix."_ele_comuni where id_comune='$id_comune' ", $dbi); 61 list($comune) = mysql_fetch_row($sql); 62 $sql = mysql_query("select indirizzo from ".$prefix."_ele_sede where id_sede='$id_sede'", $dbi); 63 list($indirizzo)=mysql_fetch_row($sql); 60 $sql="SELECT descrizione FROM ".$prefix."_ele_comuni where id_comune='$id_comune' "; 61 $res = $dbi->prepare("$sql"); 62 $res->execute(); 63 list($comune) = $res->fetch(PDO::FETCH_NUM); 64 $sql="SELECT indirizzo from ".$prefix."_ele_sede where id_sede='$id_sede' "; 65 $res = $dbi->prepare("$sql"); 66 $res->execute(); 67 list($indirizzo) = $res->fetch(PDO::FETCH_NUM); 68 64 69 $address=rawurlencode("$indirizzo,$comune,58047"); 65 70 66 71 $resultGeoCode=file_get_contents('http://maps.google.com/maps/api/geocode/json?address='.$address.'&sensor=false'); 67 68 72 $output= json_decode($resultGeoCode); 69 73 … … 72 76 $longitude = $output->results[0]->geometry->location->lng; // Returns Longitude 73 77 $location = $output->results[0]->formatted_address; 78 }else{ 79 $latitude=0; 80 $longitude=0; 81 $location=''; 74 82 } 75 83 … … 108 116 109 117 110 118 # type="text/javascript" 111 119 112 120 113 121 echo ' 114 <script type="text/javascript"src="http://maps.google.com/maps/api/js?sensor=true&language=it"></script>115 <script type="text/javascript">122 <script src="http://maps.google.com/maps/api/js?sensor=true&language=it"></script> 123 <script> 116 124 function maps() { 117 125 var latlng = new google.maps.LatLng('.$coords['lat'].','.$coords['long'].'); // centro della mappa
Note:
See TracChangeset
for help on using the changeset viewer.