Set database

This commit is contained in:
Michael RICOIS 2014-04-09 08:34:27 +00:00
parent e5815d84f8
commit 49a2b41735

View File

@ -920,7 +920,8 @@ function dirigeantEntete($values)
function dirigeantData($siren, $nic, $values = false)
{
$iInsee = new MInsee();
global $iDb;
$iInsee = new MInsee($iDb);
$tmp = $iInsee->getDirigeants($siren, false);
$tabData['dirigeant1Nom'] = '';
$tabData['dirigeant1Fonction'] = '';
@ -1281,11 +1282,12 @@ function annoncesEntete($values)
}
function annoncesData($siren, $nic, $values = false)
{
global $iDb;
$tabData = array();
if ($values!==false) {
$tabDeja = array();
$tabTmp = explode(',', $values);
$iInsee = new MInsee();
$iInsee = new MInsee($iDb);
$tabEven = $iInsee->getAnnoncesLegales($siren, 0, $tabTmp);
foreach ($tabTmp as $even){
foreach ($tabEven as $tabAnn){
@ -1352,7 +1354,8 @@ function AdresseNormaliseEntete($values)
function AdresseNormaliseData($siren, $nic, $values = false)
{
$iInsee = new MInsee();
global $iDb;
$iInsee = new MInsee($iDb);
$output['AdresseL1_NOM'] ='';
$output['AdresseL2_NOM2'] ='';
$output['AdresseL3_ADRCOMP'] ='';
@ -1388,7 +1391,8 @@ function AdresseNormaliseInseeEntete($values)
function AdresseNormaliseInseeData($siren, $nic, $values = false)
{
$iInsee = new MInsee();
global $iDb;
$iInsee = new MInsee($iDb);
$output['L1_NOM'] ='';
$output['L2_NOM2'] ='';
$output['L3_ADRCOMP'] ='';
@ -1425,7 +1429,7 @@ function SiretSucEntete($values)
function SiretSucData($siren, $nic, $values = false)
{
global $iDb;
$iInsee = new MInsee();
$iInsee = new MInsee($iDb);
//Init
$tabData = array();
@ -1543,7 +1547,7 @@ function GPSData($siren, $nic, $values = false)
"e.adr_num, e.adr_btq, e.adr_typeVoie, e.adr_libVoie, e.adr_comp, e.adr_cp, e.adr_ville",
"siren=$siren AND nic=$nic", false, MYSQL_ASSOC);
if (count($result)>0) {
$MInsee = new MInsee();
$MInsee = new MInsee($iDb);
$etab = $result[0];
$mMap=new MMap(false);
$mMap->geoCodeAdresse(
@ -1802,10 +1806,11 @@ function annoncetxtEntete()
}
function annoncetxtMultiple($siren, $nic, $values = false)
{
global $iDb;
$tabData = array();
if ( $values!==false ) {
$tabTmp = explode(',', $values);
$iInsee = new MInsee();
$iInsee = new MInsee($iDb);
$response = $iInsee->getAnnoncesLegales($siren, 0, $tabTmp, false, true);
foreach ($response as $tabAnn){
foreach ($tabAnn['evenements'] as $codEve) {