From 091ed4e8a5d7c31ad73c208dbdd1d6c5463e91eb Mon Sep 17 00:00:00 2001 From: Rodolphe Quiedeville Date: Fri, 30 Jan 2004 16:44:19 +0000 Subject: [PATCH] =?UTF-8?q?Ajout=20fonction=20pour=20pr=E9senter=20les=20n?= =?UTF-8?q?um=E9ros=20de=20t=E9l=E9phone=20de=20facon=20plus=20lisible?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/lib/functions.inc.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/htdocs/lib/functions.inc.php b/htdocs/lib/functions.inc.php index 78ed6d4ec1d..2bebb622d88 100644 --- a/htdocs/lib/functions.inc.php +++ b/htdocs/lib/functions.inc.php @@ -25,6 +25,18 @@ $yn[0] = "non"; $yn[1] = "oui"; +Function dolibarr_print_phone($phone) +{ + if (strlen(trim($phone)) == 10) + { + return substr($phone,0,2)." ".substr($phone,2,2)." ".substr($phone,4,2)." ".substr($phone,6,2)." ".substr($phone,8,2); + } + else + { + return $phone; + } +} + Function img_file($alt = "Voir") { return ''.$alt.'';