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 = '
' . $txthtml . '
'; } return $txthtml; } $lines = explode("\n", $txtad); $idt = array_shift($lines); $restore = true; if (!display_address_isIdentity($param['for'], $idt)) { array_unshift($lines, $idt); $idt = $param['for']; $restore = false; } $txthtml = ""; $map = "\"Google"; if ($adr->flags->hasflag('mail')) { $mail = ' Adresse courier'; } else { $mail = ''; } $comment = ""; if ($adr->comment != "") { $commentHtml = str_replace(array('&', '"'), array('&', '"'), $adr->comment); $commentJs = str_replace(array('\\', '\''), array('\\\\', '\\\''), $commentHtml); $comment = "\"Commentaire\""; } if ($restore) { array_unshift($lines, $idt); } if ($param['titre']) { if ($param['titre_div']) $txthtml .= '
' . pl_entity_decode($param['titre']) . ' ' . $map . $mail . $comment . "
\n"; else $txthtml .= '' . pl_entity_decode($param['titre']) . ' ' . $map . $mail . $comment . "
\n"; } foreach ($lines as $line) { $txthtml .= "" . pl_entities($line) . "
\n"; } if ($adr->phones() != null) { require_once 'function.display_phones.php'; $txthtml .= smarty_function_display_phones(array('tels' => $adr->phones()),$smarty); } else if (isset($param['phones']) && count($param['phones'])) { require_once 'function.display_phones.php'; $txthtml .= smarty_function_display_phones(array('tels' => $param['phones']),$smarty); } if (!$param['nodiv']) { $pos = $param['pos'] ? " style='float: " . $param['pos'] . "'" : ''; $txthtml = "
\n".$txthtml."
\n"; } return $txthtml; } // vim:set et sw=4 sts=4 sws=4 foldmethod=marker fenc=utf-8: ?>