From 50d996f755eed792d842e011ae634798fd0ceebd Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Wed, 19 Sep 2007 05:40:59 +0000 Subject: [PATCH] =?UTF-8?q?D=E9but=20finalisation=20mod=E8le=20tigre?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/societe/mod_codeclient_tigre.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/htdocs/includes/modules/societe/mod_codeclient_tigre.php b/htdocs/includes/modules/societe/mod_codeclient_tigre.php index 6f486b7d45f..7e56c255a77 100644 --- a/htdocs/includes/modules/societe/mod_codeclient_tigre.php +++ b/htdocs/includes/modules/societe/mod_codeclient_tigre.php @@ -193,6 +193,7 @@ class mod_codeclient_tigre extends ModeleThirdPartyCode $substrEnd = 0; $maskRebuild = ''; $error = 0; + $this->searchcode = ''; for ($i = 0; $i < count($maskElement); $i++) { @@ -200,6 +201,7 @@ class mod_codeclient_tigre extends ModeleThirdPartyCode if ($maskElement[$i] == '{dd}') { $maskRebuild .= strftime("%d",time()); + $this->searchcode .= strftime("%d",time()); if ($foundCounter==0) { $substrBegin += 2; @@ -218,6 +220,7 @@ class mod_codeclient_tigre extends ModeleThirdPartyCode if ($maskElement[$i] == '{mm}') { $maskRebuild .= strftime("%m",time()); + $this->searchcode .= strftime("%m",time()); if ($foundCounter==0) { $substrBegin += 2; @@ -236,6 +239,7 @@ class mod_codeclient_tigre extends ModeleThirdPartyCode if ($maskElement[$i] == '{aa}') { $maskRebuild .= substr(strftime("%Y",time()),2); + $this->searchcode .= substr(strftime("%Y",time()),2); if ($foundCounter==0) { $substrBegin += 2; @@ -248,6 +252,7 @@ class mod_codeclient_tigre extends ModeleThirdPartyCode else if ($maskElement[$i] == '{aaaa}') { $maskRebuild .= strftime("%Y",time()); + $this->searchcode .= strftime("%Y",time()); if ($foundCounter==0) { $substrBegin += 4; @@ -266,6 +271,7 @@ class mod_codeclient_tigre extends ModeleThirdPartyCode if (is_object($objsoc) && $objsoc->prefix_comm && $maskElement[$i] == '{pre}') { $maskRebuild .= strtoupper($objsoc->prefix_comm); + $this->searchcode .= strtoupper($objsoc->prefix_comm); $prefixLength = strlen($objsoc->prefix_comm); if ($foundCounter==0) { @@ -297,6 +303,7 @@ class mod_codeclient_tigre extends ModeleThirdPartyCode if (eregi('[\/-]{1}',$maskElement[$i])) { $maskRebuild .= $maskElement[$i]; + $this->searchcode .= $maskElement[$i]; if ($foundCounter==0) { $substrBegin++; @@ -315,6 +322,7 @@ class mod_codeclient_tigre extends ModeleThirdPartyCode if (eregi('^[0-9A-Z]+$',$maskElement[$i])) { $maskRebuild .= strtoupper($maskElement[$i]); + $this->searchcode .= strtoupper($maskElement[$i]); $MaskElementLength = strlen($maskElement[$i]); if ($foundCounter==0) { @@ -332,7 +340,7 @@ class mod_codeclient_tigre extends ModeleThirdPartyCode // Défini le nombre de chiffres du compteur $this->numbitcounter = strlen(substr($maskElement[$i],1,-1)); // Permettra d'effectuer une recherche dans la table - $this->searchcode = $maskRebuild . '([0-9]{'.$this->numbitcounter.'})'; + $this->searchcode .= '([0-9]{'.$this->numbitcounter.'})'; $maskRebuild .= $maskElement[$i]; $foundCounter = 1; @@ -341,11 +349,13 @@ class mod_codeclient_tigre extends ModeleThirdPartyCode { $error++; } + //print 'searchcodeTemp='.$this->searchcode.'
'; } $this->substrBegin = $substrBegin; $this->substrEnd = $substrEnd; //print 'begin='.$this->substrBegin.'
'; //print 'end='.$this->substrEnd.'
'; + //print 'searchcode='.$this->searchcode.'
'; return $maskRebuild; }