From d6648b65f2c15a1cb5f1a18b55786d70e132f779 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 7 Jan 2009 12:39:40 +0000 Subject: [PATCH] New: EMails links are show with function dol_print_email --- htdocs/adherents/fiche.php | 8 +- htdocs/adherents/liste.php | 4 +- htdocs/categories/categorie.php | 4 +- htdocs/comm/adresse_livraison.php | 4 +- htdocs/comm/contact.php | 4 +- htdocs/comm/fiche.php | 4 +- htdocs/comm/prospect/fiche.php | 2 +- htdocs/compta/fiche.php | 3 +- htdocs/contact/fiche.php | 19 +-- htdocs/contact/index.php | 19 +-- htdocs/fourn/fiche.php | 3 +- htdocs/lib/company.lib.php | 14 +-- htdocs/lib/functions.lib.php | 187 +++++++++++++++--------------- htdocs/soc.php | 4 +- htdocs/societe/commerciaux.php | 4 +- htdocs/societe/lien.php | 4 +- 16 files changed, 134 insertions(+), 153 deletions(-) diff --git a/htdocs/adherents/fiche.php b/htdocs/adherents/fiche.php index 9d98d7618f4..f4e6dd1509f 100644 --- a/htdocs/adherents/fiche.php +++ b/htdocs/adherents/fiche.php @@ -932,16 +932,16 @@ if ($rowid && $action != 'edit') print ''.$langs->trans("Country").''.getCountryLabel($adh->pays_id).''; // Tel pro. - print ''.$langs->trans("PhonePro").''.$adh->phone.''; + print ''.$langs->trans("PhonePro").''.dol_print_phone($adh->phone,$adh->pays_code).''; // Tel perso - print ''.$langs->trans("PhonePerso").''.$adh->phone_perso.''; + print ''.$langs->trans("PhonePerso").''.dol_print_phone($adh->phone_perso,$adh->pays_code).''; // Tel mobile - print ''.$langs->trans("PhoneMobile").''.$adh->phone_mobile.''; + print ''.$langs->trans("PhoneMobile").''.dol_print_phone($adh->phone_mobile,$adh->pays_code).''; // EMail - print ''.$langs->trans("EMail").''.dol_print_email($adh->email).' '; + print ''.$langs->trans("EMail").''.dol_print_email($adh->email,0,0,1).' '; // Date naissance print ''.$langs->trans("Birthday").''.dolibarr_print_date($adh->naiss,'day').' '; diff --git a/htdocs/adherents/liste.php b/htdocs/adherents/liste.php index 53ffc1bd6ba..5cecd50e72f 100644 --- a/htdocs/adherents/liste.php +++ b/htdocs/adherents/liste.php @@ -227,7 +227,7 @@ if ($resql) } else { - print "rowid\">".img_object($langs->trans("ShowAdherent"),"user").' '.stripslashes($objp->prenom)." ".stripslashes($objp->nom)."\n"; + print "rowid\">".img_object($langs->trans("ShowAdherent"),"user").' '.$objp->prenom." ".$objp->nom."\n"; } // Login @@ -244,7 +244,7 @@ if ($resql) print "".$adh->getmorphylib($objp->morphy)."\n"; // EMail - print "".dol_print_email($objp->email)."\n"; + print "".dol_print_email($objp->email,0,0,1)."\n"; // Statut print ""; diff --git a/htdocs/categories/categorie.php b/htdocs/categories/categorie.php index 681b7fe36bc..60ede623502 100644 --- a/htdocs/categories/categorie.php +++ b/htdocs/categories/categorie.php @@ -172,8 +172,8 @@ if ($_GET["socid"]) print ''.$langs->trans('Country').''.$soc->pays.''; } - print ''.$langs->trans('Phone').''.dol_print_phone($soc->tel,$soc->pays_code,0,$soc->id).''; - print ''.$langs->trans('Fax').''.dol_print_phone($soc->fax,$soc->pays_code,0,$soc->id).''; + print ''.$langs->trans('Phone').''.dol_print_phone($soc->tel,$soc->pays_code,0,$soc->id,'AC_TEL').''; + print ''.$langs->trans('Fax').''.dol_print_phone($soc->fax,$soc->pays_code,0,$soc->id,'AC_FAX').''; print ''.$langs->trans("Web")."url\" target=\"_blank\">".$soc->url." "; diff --git a/htdocs/comm/adresse_livraison.php b/htdocs/comm/adresse_livraison.php index aa76f6409e9..d0774841ee5 100644 --- a/htdocs/comm/adresse_livraison.php +++ b/htdocs/comm/adresse_livraison.php @@ -413,9 +413,9 @@ else print ''.$langs->trans('Country').''.$livraison->lignes[$i]->pays.''; - print ''.$langs->trans('Phone').''.dol_print_phone($livraison->lignes[$i]->tel,$livraison->lignes[$i]->pays_code,0,$livraison->socid).''; + print ''.$langs->trans('Phone').''.dol_print_phone($livraison->lignes[$i]->tel,$livraison->lignes[$i]->pays_code,0,$livraison->socid,'AC_TEL').''; - print ''.$langs->trans('Fax').''.dol_print_phone($livraison->lignes[$i]->fax,$livraison->lignes[$i]->pays_code,0,$livraison->socid).''; + print ''.$langs->trans('Fax').''.dol_print_phone($livraison->lignes[$i]->fax,$livraison->lignes[$i]->pays_code,0,$livraison->socid,'AC_FAX').''; print ''; diff --git a/htdocs/comm/contact.php b/htdocs/comm/contact.php index 63cfc8ce359..6795874c783 100644 --- a/htdocs/comm/contact.php +++ b/htdocs/comm/contact.php @@ -167,9 +167,9 @@ if ($resql) print ''.img_object($langs->trans("ShowCompany"),"company").' '; print "rowid."\">$obj->nom\n"; - print ''.$obj->email.' '; + print ''.dol_print_phone($obj->email,$obj->cidp,$obj->rowid,'AC_EMAIL').''; - print ''.dol_print_phone($obj->phone,$obj->pays_code,$obj->cidp,$obj->rowid).' '; + print ''.dol_print_phone($obj->phone,$obj->pays_code,$obj->cidp,$obj->rowid,'AC_TEL').' '; print "\n"; $i++; diff --git a/htdocs/comm/fiche.php b/htdocs/comm/fiche.php index a7b65e5ffeb..f0ef4bf6c5c 100644 --- a/htdocs/comm/fiche.php +++ b/htdocs/comm/fiche.php @@ -189,10 +189,10 @@ if ($socid > 0) print ''; // Phone - print ''.$langs->trans('Phone').''.dol_print_phone($objsoc->tel,$objsoc->pays_code,0,$objsoc->id).''; + print ''.$langs->trans('Phone').''.dol_print_phone($objsoc->tel,$objsoc->pays_code,0,$objsoc->id,'AC_TEL').''; // Fax - print ''.$langs->trans('Fax').''.dol_print_phone($objsoc->fax,$objsoc->pays_code,0,$objsoc->id).''; + print ''.$langs->trans('Fax').''.dol_print_phone($objsoc->fax,$objsoc->pays_code,0,$objsoc->id,'AC_FAX').''; print ''.$langs->trans("Web")."url\" target=\"_blank\">".$objsoc->url." "; diff --git a/htdocs/comm/prospect/fiche.php b/htdocs/comm/prospect/fiche.php index 998beab22e2..37bd45e7b2b 100644 --- a/htdocs/comm/prospect/fiche.php +++ b/htdocs/comm/prospect/fiche.php @@ -110,7 +110,7 @@ if ($socid > 0) else print $societe->pays; print ''; - print ''.$langs->trans("Phone").''.dol_print_phone($societe->tel,$societe->pays_code,0,$societe->id).'Fax'.dol_print_phone($societe->fax,$societe->pays_code).''; + print ''.$langs->trans("Phone").''.dol_print_phone($societe->tel,$societe->pays_code,0,$societe->id,'AC_TEL').'Fax'.dol_print_phone($societe->fax,$societe->pays_code).''; print ''.$langs->trans("Web")."url\">$societe->url"; if ($societe->rubrique) diff --git a/htdocs/compta/fiche.php b/htdocs/compta/fiche.php index 240bea47a0e..891f8458fc5 100644 --- a/htdocs/compta/fiche.php +++ b/htdocs/compta/fiche.php @@ -140,7 +140,8 @@ if ($socid > 0) else print $societe->pays; print ''; - print ''.$langs->trans("Phone").''.dol_print_phone($societe->tel,$societe->pays_code,0,$societe->id).''.$langs->trans("Fax").''.dol_print_phone($societe->fax,$societe->pays_code,0,$societe->id).''; + print ''.$langs->trans("Phone").''.dol_print_phone($societe->tel,$societe->pays_code,0,$societe->id,'AC_TEL').''; + print ''.$langs->trans("Fax").''.dol_print_phone($societe->fax,$societe->pays_code,0,$societe->id,'AC_FAX').''; print ''.$langs->trans("Web")."url\" target=\"_blank\">$societe->url "; // Assujeti a TVA ou pas diff --git a/htdocs/contact/fiche.php b/htdocs/contact/fiche.php index 4da7f403ba8..384dd7e3c9e 100644 --- a/htdocs/contact/fiche.php +++ b/htdocs/contact/fiche.php @@ -533,22 +533,13 @@ if ($_GET["id"] && $_GET["action"] != 'edit') print $contact->pays; print ''; - print ''.$langs->trans("PhonePro").''.dol_print_phone($contact->phone_pro,$contact->pays_code,$contact->id,$contact->socid).''; - print ''.$langs->trans("PhonePerso").''.dol_print_phone($contact->phone_perso,$contact->pays_code,$contact->id,$contact->socid).''; + print ''.$langs->trans("PhonePro").''.dol_print_phone($contact->phone_pro,$contact->pays_code,$contact->id,$contact->socid,'AC_TEL').''; + print ''.$langs->trans("PhonePerso").''.dol_print_phone($contact->phone_perso,$contact->pays_code,$contact->id,$contact->socid,'AC_TEL').''; - print ''.$langs->trans("PhoneMobile").''.dol_print_phone($contact->phone_mobile,$contact->pays_code,$contact->id,$contact->socid).''; - print ''.$langs->trans("Fax").''.dol_print_phone($contact->fax,$contact->pays_code,$contact->id,$contact->socid).''; + print ''.$langs->trans("PhoneMobile").''.dol_print_phone($contact->phone_mobile,$contact->pays_code,$contact->id,$contact->socid,'AC_TEL').''; + print ''.$langs->trans("Fax").''.dol_print_phone($contact->fax,$contact->pays_code,$contact->id,$contact->socid,'AC_FAX').''; - print ''.$langs->trans("EMail").''; - if ($contact->email && ! ValidEmail($contact->email)) - { - print ''.$langs->trans("ErrorBadEMail",$contact->email).""; - } - else - { - print dol_print_email($contact->email); - } - print ''; + print ''.$langs->trans("EMail").''.dol_print_email($contact->email,$contact->id,$contact->socid,'AC_EMAIL').''; if ($conf->mailing->enabled) { $langs->load("mails"); diff --git a/htdocs/contact/index.php b/htdocs/contact/index.php index 29964a40794..b02af14c8ec 100644 --- a/htdocs/contact/index.php +++ b/htdocs/contact/index.php @@ -314,29 +314,18 @@ if ($result) // Phone print ''; - print dol_print_phone($obj->phone,$obj->pays_code,$obj->cidp,$obj->socid); + print dol_print_phone($obj->phone,$obj->pays_code,$obj->cidp,$obj->socid,'AC_TEL'); print ''; if ($_GET["view"] == 'phone') { - print ''.dol_print_phone($obj->phone_mobile,$obj->pays_code,$obj->cidp,$obj->socid).' '; + print ''.dol_print_phone($obj->phone_mobile,$obj->pays_code,$obj->cidp,$obj->socid,'AC_TEL').''; - print ''.dol_print_phone($obj->fax,$obj->pays_code,$obj->cidp,$obj->socid).' '; + print ''.dol_print_phone($obj->fax,$obj->pays_code,$obj->cidp,$obj->socid,'AC_TEL').''; } else { - print ''; - if (! $obj->email) { - print ' '; - } - elseif (! ValidEmail($obj->email)) - { - print "Bad email"; - } - else { - print dol_print_email($obj->email); - } - print ''; + print ''.dol_print_email($obj->email,$obj->cidp,$obj->socid,'AC_EMAIL').''; } // Date diff --git a/htdocs/fourn/fiche.php b/htdocs/fourn/fiche.php index 1cfc5ca818e..1916f4c3c8f 100644 --- a/htdocs/fourn/fiche.php +++ b/htdocs/fourn/fiche.php @@ -94,7 +94,8 @@ if ( $societe->fetch($socid) ) else print $societe->pays; print ''; - print ''.$langs->trans("Phone").''.dol_print_phone($societe->tel,$societe->pays_code,0,$societe->id).''.$langs->trans("Fax").''.dol_print_phone($societe->fax,$societe->pays_code,0,$societe->id).''; + print ''.$langs->trans("Phone").''.dol_print_phone($societe->tel,$societe->pays_code,0,$societe->id,'AC_TEL').''; + print ''.$langs->trans("Fax").''.dol_print_phone($societe->fax,$societe->pays_code,0,$societe->id,'AC_FAX').''; print ''.$langs->trans("Web")."url\">$societe->url "; // Assujetti a TVA ou pas diff --git a/htdocs/lib/company.lib.php b/htdocs/lib/company.lib.php index 75733317001..c91a725e7c4 100644 --- a/htdocs/lib/company.lib.php +++ b/htdocs/lib/company.lib.php @@ -298,20 +298,14 @@ function show_contacts($conf,$langs,$db,$objsoc) // Lien click to dial print ''; - print dol_print_phone($obj->phone,$obj->pays_code,$obj->rowid,$objsoc->id); + print dol_print_phone($obj->phone,$obj->pays_code,$obj->rowid,$objsoc->id,'AC_TEL'); print ''; print ''; - print dol_print_phone($obj->fax,$obj->pays_code,$obj->rowid,$objsoc->id); + print dol_print_phone($obj->fax,$obj->pays_code,$obj->rowid,$objsoc->id,'AC_FAX'); print ''; print ''; - if ($conf->agenda->enabled && $user->rights->agenda->myactions->create) - print ''; - print $obj->email; - if ($conf->agenda->enabled && $user->rights->agenda->myactions->create) - print ''; - // \TODO - if ($obj->email) print dol_email_link($obj->email); - print ' '; + print dol_print_email($obj->email,$obj->rowid,$objsoc->id,'AC_EMAIL'); + print ''; print ''; print ''; diff --git a/htdocs/lib/functions.lib.php b/htdocs/lib/functions.lib.php index 778a41f6350..7e19f1685dc 100644 --- a/htdocs/lib/functions.lib.php +++ b/htdocs/lib/functions.lib.php @@ -38,9 +38,9 @@ if (! defined('ADODB_DATE_VERSION')) include_once(DOL_DOCUMENT_ROOT."/includes/a /** - * \brief Renvoi vrai si l'email est syntaxiquement valide - * \param address adresse email (Ex: "toto@titi.com", "John Do ") - * \return boolean true si email valide, false sinon + * \brief Return true if email syntax is ok + * \param address email (Ex: "toto@titi.com", "John Do ") + * \return boolean true if email ok, false if ko */ function ValidEmail($address) { @@ -650,71 +650,6 @@ function dol_print_object_info($object) } -/* For backward compatibility */ -function dolibarr_print_phone($phone,$country="FR",$cid=0,$socid=0,$nolinks=false,$separ=" ") -{ - return dol_print_phone($phone,$country,$cid,$socid,$nolinks,$separ); -} - -/** - * \brief Format phone numbers according to country - * \param phone Phone number to format - * \param country Country to use for formatting - * \param cid Id of contact if known - * \param socid Id of third party if known - * \param nolinks true means no HTML links is added - * \param separ separation between numbers for a better visibility example : xx.xx.xx.xx.xx - * \return string Formated phone number - */ -function dol_print_phone($phone,$country="FR",$cid=0,$socid=0,$nolinks=false,$separ=" ") -{ - global $conf,$user; - - $phone = ereg_replace("[ .-]","",trim($phone)); - if (empty($phone)) { return ''; } - - $newphone=$phone; - if (strtoupper($country) == "FR") - { - // France - if (strlen($phone) == 10) { - $newphone=substr($newphone,0,2).$separ.substr($newphone,2,2).$separ.substr($newphone,4,2).$separ.substr($newphone,6,2).$separ.substr($newphone,8,2); - } - elseif (strlen($newphone) == 7) - { - $newphone=substr($newphone,0,3).$separ.substr($newphone,3,2).$separ.substr($newphone,5,2); - } - elseif (strlen($newphone) == 9) - { - $newphone=substr($newphone,0,2).$separ.substr($newphone,2,3).$separ.substr($newphone,5,2).$separ.substr($newphone,7,2); - } - elseif (strlen($newphone) == 11) - { - $newphone=substr($newphone,0,3).$separ.substr($newphone,3,2).$separ.substr($newphone,5,2).$separ.substr($newphone,7,2).$separ.substr($newphone,9,2); - } - elseif (strlen($newphone) == 12) - { - $newphone=substr($newphone,0,4).$separ.substr($newphone,4,2).$separ.substr($newphone,6,2).$separ.substr($newphone,8,2).$separ.substr($newphone,10,2); - } - } - - if (empty($nolinks)) - { - if (($cid || $socid) && $conf->agenda->enabled && $user->rights->agenda->myactions->create) - { - $newphone=''.$newphone.''; - } - $clicktodiallink=dol_print_phone_link($phone); - if ($clicktodiallink) - { - $newphone='
'.$newphone.' '.$clicktodiallink.'
'; - } - } - - return $newphone; -} - - /** * \brief Return string with formated size * \param size Size to print @@ -751,41 +686,111 @@ function dol_print_url($url,$target='_blank',$max=32) /** * \brief Show EMail link * \param email EMail to show + * \param cid Id of contact if known + * \param socid Id of third party if known + * \param addlink 0=no link to create action * \param max Max number of characters to show * \return string HTML Link */ -function dol_print_email($email,$max=32) +function dol_print_email($email,$cid=0,$socid=0,$addlink=0,$max=64) { - $link=''; - $link.=dolibarr_trunc($email,$max); - $link.=''; - return $link; + global $conf,$user,$langs; + + $newemail=$email; + + if (empty($email)) return ' '; + + if (! ValidEmail($email)) return "Bad email"; + + if (! empty($addlink)) + { + $newemail=''; + $newemail.=dol_trunc($email,$max); + $newemail.=''; + + if (($cid || $socid) && $conf->agenda->enabled && $user->rights->agenda->myactions->create) + { + $type='AC_EMAIL'; + $link=''.img_object($langs->trans("AddAction"),"calendar").''; + $newemail='
'.$newemail.'  '.$link.'
'; + } + } + + return $newemail; +} + +/* For backward compatibility */ +function dolibarr_print_phone($phone,$country="FR",$cid=0,$socid=0,$addlink=0,$separ=" ") +{ + return dol_print_phone($phone,$country,$cid,$socid,$addlink,$separ); } /** - * \brief Show click to dial link - * \param phone Phone to call - * \param option Type of picto - * \return string Link + * \brief Format phone numbers according to country + * \param phone Phone number to format + * \param country Country to use for formatting + * \param cid Id of contact if known + * \param socid Id of third party if known + * \param addlink 0=no link to create action + * \param separ separation between numbers for a better visibility example : xx.xx.xx.xx.xx + * \return string Formated phone number */ -function dol_print_phone_link($phone,$option=0) +function dol_print_phone($phone,$country="FR",$cid=0,$socid=0,$addlink=0,$separ=" ") { - global $conf,$user; + global $conf,$user,$langs; - $link=''; - //if (! empty($conf->global->CLICKTODIAL_URL)) - if ($conf->clicktodial->enabled) + // Clean phone parameter + $phone = ereg_replace("[ .-]","",trim($phone)); + if (empty($phone)) { return ''; } + + $newphone=$phone; + if (strtoupper($country) == "FR") { - // Cleaning phone number - $phone = ereg_replace("[ .-]","",trim($phone)); - - $url = sprintf($conf->global->CLICKTODIAL_URL, urlencode($phone), urlencode($user->clicktodial_poste), urlencode($user->clicktodial_login), urlencode($user->clicktodial_password)); - $link.=''.img_phone("default",0).''; + // France + if (strlen($phone) == 10) { + $newphone=substr($newphone,0,2).$separ.substr($newphone,2,2).$separ.substr($newphone,4,2).$separ.substr($newphone,6,2).$separ.substr($newphone,8,2); + } + elseif (strlen($newphone) == 7) + { + $newphone=substr($newphone,0,3).$separ.substr($newphone,3,2).$separ.substr($newphone,5,2); + } + elseif (strlen($newphone) == 9) + { + $newphone=substr($newphone,0,2).$separ.substr($newphone,2,3).$separ.substr($newphone,5,2).$separ.substr($newphone,7,2); + } + elseif (strlen($newphone) == 11) + { + $newphone=substr($newphone,0,3).$separ.substr($newphone,3,2).$separ.substr($newphone,5,2).$separ.substr($newphone,7,2).$separ.substr($newphone,9,2); + } + elseif (strlen($newphone) == 12) + { + $newphone=substr($newphone,0,4).$separ.substr($newphone,4,2).$separ.substr($newphone,6,2).$separ.substr($newphone,8,2).$separ.substr($newphone,10,2); + } } - return $link; + + if (! empty($addlink)) + { + if ($conf->clicktodial->enabled) + { + if (empty($conf->global->CLICKTODIAL_URL)) $urlmask='ErrorClickToDialModuleNotConfigured'; + else $urlmask=$conf->global->CLICKTODIAL_URL; + $url = sprintf($urlmask, urlencode($phone), urlencode($user->clicktodial_poste), urlencode($user->clicktodial_login), urlencode($user->clicktodial_password)); + $newphone=''.$newphone.''; + } + + if (($cid || $socid) && $conf->agenda->enabled && $user->rights->agenda->myactions->create) + { + $type='AC_TEL'; + if ($addlink == 'AC_FAX') $type='AC_FAX'; + $link=''.img_object($langs->trans("AddAction"),"calendar").''; + $newphone='
'.$newphone.'  '.$link.'
'; + } + } + + return $newphone; } diff --git a/htdocs/soc.php b/htdocs/soc.php index 53e914f6ba5..e119bb52ea1 100644 --- a/htdocs/soc.php +++ b/htdocs/soc.php @@ -1025,8 +1025,8 @@ else print ''.$langs->trans('State').''.$soc->departement.''; - print ''.$langs->trans('Phone').''.dol_print_phone($soc->tel,$soc->pays_code,0,$soc->id).''; - print ''.$langs->trans('Fax').''.dol_print_phone($soc->fax,$soc->pays_code,0,$soc->id).''; + print ''.$langs->trans('Phone').''.dol_print_phone($soc->tel,$soc->pays_code,0,$soc->id,'AC_TEL').''; + print ''.$langs->trans('Fax').''.dol_print_phone($soc->fax,$soc->pays_code,0,$soc->id,'AC_FAX').''; print ''.$langs->trans('EMail').''; if ($soc->email) { print ''.$soc->email.''; } diff --git a/htdocs/societe/commerciaux.php b/htdocs/societe/commerciaux.php index e005a6da261..dd2070224d1 100644 --- a/htdocs/societe/commerciaux.php +++ b/htdocs/societe/commerciaux.php @@ -116,8 +116,8 @@ if ($_GET["socid"]) print ''.$langs->trans('Country').''.$soc->pays.''; - print ''.$langs->trans('Phone').''.dol_print_phone($soc->tel,$soc->pays_code,0,$soc->id).''; - print ''.$langs->trans('Fax').''.dol_print_phone($soc->fax,$soc->pays_code,0,$soc->id).''; + print ''.$langs->trans('Phone').''.dol_print_phone($soc->tel,$soc->pays_code,0,$soc->id,'AC_TEL').''; + print ''.$langs->trans('Fax').''.dol_print_phone($soc->fax,$soc->pays_code,0,$soc->id,'AC_FAX').''; print ''.$langs->trans('Web').''; if ($soc->url) { print 'http://'.$soc->url.''; } diff --git a/htdocs/societe/lien.php b/htdocs/societe/lien.php index 452ca601cf7..7b6f478045f 100644 --- a/htdocs/societe/lien.php +++ b/htdocs/societe/lien.php @@ -118,8 +118,8 @@ if($_GET["socid"]) print "".$langs->trans('Country')."".$soc->pays.""; - print ''.$langs->trans('Phone').''.dol_print_phone($soc->tel,$soc->pays_code,0,$soc->id).''; - print ''.$langs->trans('Fax').''.dol_print_phone($soc->fax,$soc->pays_code,0,$soc->id).''; + print ''.$langs->trans('Phone').''.dol_print_phone($soc->tel,$soc->pays_code,0,$soc->id,'AC_TEL').''; + print ''.$langs->trans('Fax').''.dol_print_phone($soc->fax,$soc->pays_code,0,$soc->id,'AC_FAX').''; print ''.$langs->trans('Web').''; if ($soc->url) { print 'http://'.$soc->url.''; }