From: x2001corpet Date: Mon, 24 Jul 2006 22:05:47 +0000 (+0000) Subject: bug fixes pour geodesix sur https et internet explorer : il faut aussi reprendre... X-Git-Tag: xorg/0.9.10~7 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=6ddc1d39b54fd2fd27b857323e532a0e3092eb74;p=platal.git bug fixes pour geodesix sur https et internet explorer : il faut aussi reprendre les nouveaux swf git-svn-id: svn+ssh://murphy/home/svn/platal/branches/platal-0.9.10@632 839d8a87-29fc-0310-9880-83ba4fa771e5 --- diff --git a/htdocs/geoloc/dynamap.php b/htdocs/geoloc/dynamap.php index b2925c4..971b12e 100644 --- a/htdocs/geoloc/dynamap.php +++ b/htdocs/geoloc/dynamap.php @@ -24,21 +24,13 @@ require_once('xorg.inc.php'); new_nonhtml_page('', AUTH_COOKIE); -$querystring = ""; -foreach ($_GET as $v => $a) - if ($v != 'initfile') - $querystring .= '&'.urlencode($v).'='.urlencode($a); -$initfile = urlencode('geolocInit.php?'.$querystring); - -if (urlencode(Env::get('initfile')) != $initfile) -{ - header("Location: dynamap.php?initfile=$initfile{$querystring}"); - die(); -} - header("Content-type: application/x-shockwave-flash"); -if ($globals->geoloc->use_map()) - readfile($globals->geoloc->dynamap_path); +if (1 || $globals->geoloc->use_map()) { + $s = file_get_contents($globals->geoloc->dynamap_path); + header("Content-length: ".strlen($s)); + header("Pragma:"); + echo $s; +} ?> diff --git a/htdocs/geoloc/geolocInit.php b/htdocs/geoloc/geolocInit.php index 6ecc2ca..c55992a 100644 --- a/htdocs/geoloc/geolocInit.php +++ b/htdocs/geoloc/geolocInit.php @@ -3,6 +3,7 @@ require_once('xorg.inc.php'); header("Content-type: text/xml"); new_nonhtml_page('geoloc/geolocInit.tpl', AUTH_COOKIE); +header("Pragma:"); $querystring = ""; foreach ($_GET as $v => $a) diff --git a/htdocs/geoloc/getData.php b/htdocs/geoloc/getData.php index d358631..e1b7373 100644 --- a/htdocs/geoloc/getData.php +++ b/htdocs/geoloc/getData.php @@ -28,7 +28,8 @@ if (Env::has('debug')) else { header("Content-type: text/xml"); - new_nonhtml_page('geoloc/getData.tpl', AUTH_COOKIE); + new_nonhtml_page('geoloc/getData.tpl', AUTH_COOKIE); + header("Pragma:"); } require_once('geoloc.inc.php'); diff --git a/htdocs/geoloc/icon.php b/htdocs/geoloc/icon.php index 07bd17c..fb75e0e 100644 --- a/htdocs/geoloc/icon.php +++ b/htdocs/geoloc/icon.php @@ -25,6 +25,7 @@ require_once('xorg.inc.php'); new_nonhtml_page('', AUTH_COOKIE); header("Content-type: application/x-shockwave-flash"); +header("Pragma:"); if ($globals->geoloc->use_map()) readfile($globals->geoloc->icon_path); diff --git a/htdocs/geoloc/index.php b/htdocs/geoloc/index.php index 8f13d57..9a1b8d5 100644 --- a/htdocs/geoloc/index.php +++ b/htdocs/geoloc/index.php @@ -22,16 +22,26 @@ require_once('xorg.inc.php'); new_skinned_page('geoloc/index.tpl', AUTH_COOKIE); -$res = $globals->xdb->query('SELECT COUNT(DISTINCT uid) FROM adresses WHERE cityid IS NOT NULL'); -$page->assign('localises', $res->fetchOneCell()); - - require_once('search.inc.php'); +require_once('search.inc.php'); $fields = new SFieldGroup(true, advancedSearchFromInput()); $search = $fields->get_url(); -if (Env::has('only_current') && Env::get('only_current') != 'on') $search .= '&only_current='; +if (!Env::has('only_current')) + $search .= '&only_current=on'; +elseif (Env::get('only_current') != 'on') + $search .= '&only_current='; +// don't limit search to map $search = preg_replace('/(^|&)mapid=([0-9]+)(&|$)/','\1\3', $search); -if ($search) - $page->assign('dynamap_vars', $search); + +if ($search) $search = '?'.$search; +$initfile = urlencode('geolocInit.php'.$querystring); +$page->assign('flashvars', 'initfile='.$initfile); + +$page->assign('protocole',substr($globals->baseurl, 0, strpos($globals->baseurl,':'))); + +if (!$search) { + $res = $globals->xdb->query('SELECT COUNT(DISTINCT uid) FROM adresses WHERE cityid IS NOT NULL'); + $page->assign('localises', $res->fetchOneCell()); +} $page->assign('use_map', $globals->geoloc->use_map()); $page->run(); diff --git a/plugins/function.display_address.php b/plugins/function.display_address.php index 1a12d4b..713d5f9 100644 --- a/plugins/function.display_address.php +++ b/plugins/function.display_address.php @@ -31,7 +31,7 @@ function smarty_function_display_address($param, &$smarty) { $lines = explode("\n",$txtad); $txthtml = ""; - $map = "\"Carte\""; + $map = "\"Carte\""; if ($param['titre']) { if ($param['titre_div']) diff --git a/templates/geoloc/getData.tpl b/templates/geoloc/getData.tpl index 81a1918..d884cd3 100644 --- a/templates/geoloc/getData.tpl +++ b/templates/geoloc/getData.tpl @@ -29,7 +29,7 @@ {if $country.nbPop > 0 or $country.id eq 0} - + {/if} @@ -38,7 +38,7 @@ {foreach from=$cities item="city"} - + {/foreach} diff --git a/templates/geoloc/index.tpl b/templates/geoloc/index.tpl index 00a10c4..cd04939 100644 --- a/templates/geoloc/index.tpl +++ b/templates/geoloc/index.tpl @@ -57,20 +57,28 @@ function searchMapId(f) {/if} -{if !$dynamap_vars and $localises} +{if $localises}

Aujourd'hui {$localises} de nos camarades sont localisés grâce à leurs adresses personnelles.

{/if} {if $use_map}

- - - - - - - +

Carte fournie gracieusement par Geodesix.

{if !$no_annu}