gp.pays AS countrytxt,a.region, a.regiontxt,
FIND_IN_SET('active', a.statut) AS active, a.adrid,
FIND_IN_SET('res-secondaire', a.statut) AS secondaire,
- a.pub, gp.display
+ a.pub, gp.display, a.comment
FROM adresses AS a
LEFT JOIN geoloc_pays AS gp ON (gp.a2=a.country)
WHERE uid= {?} AND NOT FIND_IN_SET('pro',a.statut)
postcode, city, cityid,
country, region, regiontxt,
pub, datemaj, statut,
- uid, adrid, glat, glng)
+ uid, adrid, glat, glng, comment)
VALUES ({?}, {?}, {?},
{?}, {?}, {?},
{?}, {?}, {?},
{?}, FROM_UNIXTIME({?}), {?},
- {?}, {?}, {?}, {?})",
+ {?}, {?}, {?}, {?}, {?})",
$address['adr1'], $address['adr2'], $address['adr3'],
$address['postcode'], $address['city'], $address['cityid'],
$address['country'], $address['region'], $address['regiontxt'],
$address['pub'], $address['datemaj'], $flags,
- S::i('uid'), $adrid, $address['precise_lat'], $address['precise_lon']);
+ S::i('uid'), $adrid, $address['precise_lat'], $address['precise_lon'], $address['comment']);
foreach ($address['tel'] as $telid=>&$tel) {
$this->saveTel($adrid, $telid, $tel);
}
FIND_IN_SET('courrier', a.statut) AS mail,
FIND_IN_SET('temporaire', a.statut) AS temporary,
FIND_IN_SET('active', a.statut) AS current,
- a.glat AS precise_lat, a.glng AS precise_lon
+ a.glat AS precise_lat, a.glng AS precise_lon,
+ a.comment
FROM adresses AS a
INNER JOIN geoloc_pays AS gp ON(gp.a2 = a.country)
WHERE uid = {?} AND NOT FIND_IN_SET('pro', statut)
$map = "<a href=\"http://maps.google.fr/?q="
. urlencode(implode(", ", $lines) . " ($idt)")
. "\"><img src=\"images/icons/map.gif\" alt=\"Google Maps\" title=\"Carte\"/></a>";
+ $comment = "";
+ if ($param['adr']['comment'] != "")
+ {
+ $commentHtml = str_replace(array('&', '"'), array('&', '"'), $param['adr']['comment']);
+ $commentJs = str_replace(array('\\', '\''), array('\\\\', '\\\''), $commentHtml);
+ $comment = "<img style=\"margin-left: 5px;\" src=\"images/icons/comments.gif\""
+ . " onmouseover=\"return overlib('"
+ . $commentJs
+ . "',WIDTH,250);\""
+ . " onmouseout=\"nd();\""
+ . " alt=\"Commentaire\" title=\""
+ . $commentHtml
+ . "\"/>";
+ }
if ($restore) {
array_unshift($lines, $idt);
}
if ($param['titre'])
{
if ($param['titre_div'])
- $txthtml .= "<div class='titre'>".pl_entity_decode($param['titre'])." ".$map."</div>\n";
+ $txthtml .= "<div class='titre'>".pl_entity_decode($param['titre'])." ".$map.$comment."</div>\n";
else
- $txthtml .= "<em>".pl_entity_decode($param['titre'])." </em>".$map."<br />\n";
+ $txthtml .= "<em>".pl_entity_decode($param['titre'])." </em>".$map.$comment."<br />\n";
}
foreach ($lines as $line)
{