text;
if (!$txtad && !$adr->phones() && !count($adr->phones())) {
return "";
}
$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 = "";
$comment = "";
if ($adr->comment != "")
{
$commentHtml = str_replace(array('&', '"'), array('&', '"'), $adr->comment);
$commentJs = str_replace(array('\\', '\''), array('\\\\', '\\\''), $commentHtml);
$comment = "";
}
if ($restore) {
array_unshift($lines, $idt);
}
if ($param['titre'])
{
if ($param['titre_div'])
$txthtml .= "
".pl_entity_decode($param['titre'])." ".$map.$comment."
\n";
else
$txthtml .= "".pl_entity_decode($param['titre'])." ".$map.$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 ($param['phones'] != null) {
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 enc=utf-8:
?>