" ", "."=>"", "-"=>"", "*"=>"", "+"=>"", "°"=>"", "="=>"", ")"=>"", "]"=>"", "["=>"", "("=>"", "{"=>"", "}"=>"", "#"=>"", "~"=>"", "&"=>"", "²"=>"", "$"=>"", "¤"=>"", "¨"=>"", "^"=>"", "%"=>"", "!"=>"", ":"=>"", ";"=>"", ","=>"", "<"=>"", ">"=>"", "£"=>"", "µ"=>"", "@"=>"", "'"=>" ", "/"=>"")); } function replacechars($string){ return strtr($string, array( " cedex"=>"", " CEDEX"=>"", " Cedex"=>"", "cedex"=>"", "CEDEX"=>"", "Cedex"=>"", " "=>"+", "."=>"", "-"=>"", "*"=>"", "°"=>"", "="=>"", ")"=>"", "]"=>"", "["=>"", "("=>"", "{"=>"", "}"=>"", "#"=>"", "~"=>"", "&"=>"", "²"=>"", "$"=>"", "¤"=>"", "¨"=>"", "^"=>"", "%"=>"", "!"=>"", ":"=>"", ";"=>"", ","=>"", "<"=>"", ">"=>"", "£"=>"", "µ"=>"", "@"=>"", "'"=>" ", "/"=>"")); } $cnn = mssql_connect("127.0.0.1,1433", "WEB", "WEBABACOM2011"); if (mssql_select_db("ROUTAGEFOL")){ $reqtiers = "Select Nom, IsNull(Service, '-'), Tel, IsNull(Fax, '-'), IsNull(Email, '-') From Contacts Where ClientABACOM = '$code'"; $restiers = mssql_query($reqtiers, $cnn); if ($restiers){ $rowtiers = mssql_fetch_row($restiers); $contact = $rowtiers[0]; $fonction = $rowtiers[1]; if (mb_strlen(trim($fonction))==0) $fonction = "-"; $tel = strtr($rowtiers[2], array(" "=>"", "."=>"", "-"=>"", "/"=>"")); $tel = mb_strcut($tel, 0, mb_strlen($tel)-8)." ".mb_strcut($tel, mb_strlen($tel)-8, 2)." ".mb_strcut($tel, mb_strlen($tel)-6, 2)." ".mb_strcut($tel, mb_strlen($tel)-4, 2)." ".mb_strcut($tel, mb_strlen($tel)-2, 2); $fax = strtr($rowtiers[3], array(" "=>"", "."=>"", "-"=>"", "/"=>"")); ; $fax = mb_strcut($fax, 0, mb_strlen($fax)-8)." ".mb_strcut($fax, mb_strlen($fax)-8, 2)." ".mb_strcut($fax, mb_strlen($fax)-6, 2)." ".mb_strcut($fax, mb_strlen($fax)-4, 2)." ".mb_strcut($fax, mb_strlen($fax)-2, 2); $email = $rowtiers[4]; mssql_free_result($restiers); } if ($_SESSION["CodeTiers"]=="ABACO93VIL"){ $reqcount= "Select Count(Distinct(Dossier)) From [ROUTAGEFOL].[dbo].[APPELOFFRE] Where CodeTra = '$code'"; $rescount = mssql_query($reqcount, $cnn); $rowcount = mssql_fetch_row($rescount); if ($rowcount[0]=="0"){ $CountOffre = "$rowcount[0]"; } else{ $CountOffre = "$rowcount[0]"; } @mssql_free_result($rescount); } } if (mssql_select_db("FRETONLINE")){ $reqvoirplus = "Select Nom, IsNull(Adresse1, '-'), IsNull(Adresse2, '-'), CP, Ville, Pays, IsNull(Siren, '-'), IsNull(HTTP ,'-'), IsNull(Memo1, 'Aucune information n''est disponible') From Tiers Where Code = '$code'"; $resvoirplus = mssql_query($reqvoirplus, $cnn); if ($resvoirplus){ $rowvoirplus = mssql_fetch_row($resvoirplus); $nom = $rowvoirplus[0]; $adresse1 = $rowvoirplus[1]; $adresse2 = $rowvoirplus[2]; $cp = $rowvoirplus[3]; $ville = $rowvoirplus[4]; $pays = $rowvoirplus[5]; $tva = mb_strtoupper($rowvoirplus[6]); if ((strlen(trim($tva))>=9)&&($pays=="FRANCE")){ $lientva = "$tva"; }else $lientva ="$tva"; $web = $rowvoirplus[7]; $activite = $rowvoirplus[8]; mssql_free_result($resvoirplus); } } mssql_close($cnn); ?> Transporteur