- require_once('geoloc.inc.php');
- $txtad = $param['adr']['text'];
- if (!$txtad && !$param['adr']['tels'] && !count($param['adr']['tels'])) {
- return "";
+ $adr = $param['adr'];
+ $txtad = $adr->text;
+ if (!$txtad) {
+ $txthtml = '';
+ if ($adr->phones() && count($adr->phones())) {
+ require_once 'function.display_phones.php';
+ $txthtml .= smarty_function_display_phones(array('tels' => $adr->phones()), $smarty);
+ } elseif (isset($param['phones']) && count($param['phones'])) {
+ require_once 'function.display_phones.php';
+ $txthtml .= smarty_function_display_phones(array('tels' => $param['phones']), $smarty);
+ }
+ if (!isset($param['nodiv']) && $txthtml != '' && isset($param['pos'])) {
+ $txthtml = '<div class="adresse" style="float: ' . $param['pos'] . '">' . $txthtml . '</div>';
+ }
+ return $txthtml;