Compare commits
123 Commits
SD-32
...
release-1.
Author | SHA1 | Date | |
---|---|---|---|
|
4baebb8aa1 | ||
|
6914937f1b | ||
|
1b1bd63090 | ||
|
4428e5b75c | ||
|
0dddc8e23f | ||
|
4b21773785 | ||
|
a7f4653b90 | ||
|
8e952b5624 | ||
|
3eef3e913d | ||
|
45ad59da7b | ||
|
38eff375d5 | ||
|
f984202983 | ||
|
ae5bce498e | ||
|
e3311570fe | ||
|
3f2f37aaae | ||
|
4c0fc9677a | ||
|
24135227e4 | ||
|
1d90110f26 | ||
|
88af848eef | ||
|
ba10d12059 | ||
|
50e1d38273 | ||
|
5608237ffc | ||
|
46ac4aeff9 | ||
|
ab4dfdd578 | ||
|
abbc44385b | ||
|
287026c0c7 | ||
|
cb7c4ef319 | ||
|
dd10508407 | ||
|
43409f60e8 | ||
|
edd75d1a19 | ||
|
18e9a0b0a6 | ||
|
1a474bb34a | ||
|
72ceda50b8 | ||
|
c07ae3ad9f | ||
|
5eb3c5ae9a | ||
|
6d5f27a560 | ||
|
afbbba2058 | ||
|
1cac520382 | ||
|
7d7c80673d | ||
|
2ccb2193f3 | ||
|
33ede218e0 | ||
|
4d35935edd | ||
|
deff836ec8 | ||
|
28bf1507f3 | ||
|
461471154c | ||
|
20935922ec | ||
|
1e255f9178 | ||
|
90ee9f050a | ||
|
eac2dbff93 | ||
|
4b41ca7b11 | ||
|
3a628732bb | ||
|
e19dc58981 | ||
|
e875b61a83 | ||
|
25b96012fc | ||
|
3afc2b2b59 | ||
|
102f3b0998 | ||
|
cbd12d7103 | ||
|
f85aa7c6bb | ||
|
73387b0fa4 | ||
|
ef5237100a | ||
|
3fb790ef7b | ||
|
1c884ec9e2 | ||
|
02519ccff7 | ||
|
c81235002a | ||
|
e7d3ddd846 | ||
|
246b72091d | ||
|
93c2dc5283 | ||
|
49f15d84e0 | ||
|
5a6eef0925 | ||
|
1293c28fff | ||
|
9e977c01d5 | ||
|
e9bc772547 | ||
|
2ee2c49ce5 | ||
|
f983461724 | ||
|
2edc216c92 | ||
|
9a8e507808 | ||
|
c73858a265 | ||
|
97ae50bbfb | ||
|
fbcb00b21a | ||
|
93f3282127 | ||
|
133e5c8fc9 | ||
|
2f2345978b | ||
|
09bf822f6e | ||
|
4427b64310 | ||
|
097f26b77e | ||
|
9bb3d32607 | ||
|
760486d21e | ||
|
7d5c00eb43 | ||
|
9b44e1ee1c | ||
|
f35ea7b86e | ||
|
fdb6415c3e | ||
|
307ee3d035 | ||
|
5d5c50eac6 | ||
|
adbd0dab98 | ||
|
352bfb1692 | ||
|
131058a7c4 | ||
|
2e500ab810 | ||
|
a70220552f | ||
|
d0f45ddbd0 | ||
|
b89e254e91 | ||
|
a26bb42250 | ||
|
8237c63d15 | ||
|
19d68b6001 | ||
|
89ec82ccba | ||
|
1e14c216d1 | ||
|
999b226bae | ||
|
4cc09db792 | ||
|
5505eff6ef | ||
|
0e62b2b35a | ||
|
bf9e6796df | ||
|
9cbaec84b5 | ||
|
916d4ff49c | ||
|
401883461b | ||
|
5645081cdd | ||
|
e6bc9a8b60 | ||
|
9ceb02679a | ||
|
dd3b37540b | ||
|
ee72a9dea8 | ||
|
4d1b2b63e7 | ||
|
2dff8c5664 | ||
|
4d9a3edf47 | ||
|
575fe93dd1 | ||
|
7dd1312a4d |
@ -1,6 +1,6 @@
|
||||
# ----------------------------------------------------------------------------- #
|
||||
# ---------------------------------------------------------------------------- #
|
||||
# Makefile d'installation des batch
|
||||
# ----------------------------------------------------------------------------- #
|
||||
# ---------------------------------------------------------------------------- #
|
||||
include config.mk
|
||||
|
||||
.SUFFIXES:
|
||||
|
@ -1,6 +1,6 @@
|
||||
# ----------------------------------------------------------------------------- #
|
||||
# ---------------------------------------------------------------------------- #
|
||||
# config.mk
|
||||
# ----------------------------------------------------------------------------- #
|
||||
# ---------------------------------------------------------------------------- #
|
||||
|
||||
#MEL_FROM = supportdev@scores-decisions.com
|
||||
#MEL_TO = sbeaugrand@scores-decisions.com
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
// --------------------------------------------------------------------------- //
|
||||
// -------------------------------------------------------------------------- //
|
||||
// giant.php
|
||||
// --------------------------------------------------------------------------- //
|
||||
// -------------------------------------------------------------------------- //
|
||||
require_once '../config/config.inc';
|
||||
require_once '../includes/giant/config.php';
|
||||
require_once '../includes/giant/client.php';
|
||||
|
@ -141,9 +141,9 @@ if (isset($matchmethods) == true && $matchmethods === true) {
|
||||
}
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------------- //
|
||||
// -------------------------------------------------------------------------- //
|
||||
// Commandes
|
||||
// --------------------------------------------------------------------------- //
|
||||
// -------------------------------------------------------------------------- //
|
||||
if (isset($checkCommandes) == true && $checkCommandes === true) {
|
||||
$tabCommandes = Doctrine_Query::create()
|
||||
->select('*')
|
||||
|
@ -78,18 +78,9 @@ function listeCmd($statut){
|
||||
|
||||
function codeTribunal($siren)
|
||||
{
|
||||
//Connection au webservice
|
||||
$client = new SoapClient(null, array(
|
||||
'trace' => 1,
|
||||
'soap_version' => SOAP_1_1,
|
||||
'location' => WEBSERVICE_URL,
|
||||
'uri' => WEBSERVICE_URI,
|
||||
'login' => 'mricois',
|
||||
'password' => 'bj10sx',
|
||||
));
|
||||
$O = $client->getIdentite($siren, '', false);
|
||||
$tribunalCode = $O['result']['TribunalCode'];
|
||||
return $tribunalCode;
|
||||
require_once 'scoresws/scoresws.php';
|
||||
$etab = scoresws_identite($siren, $siren, 0);
|
||||
return $etab->TribunalCode;
|
||||
}
|
||||
|
||||
function infoPaiement($codeTribunal, $type)
|
||||
|
1
cache/etablissements-552144503-0.tpl
vendored
Normal file
1
cache/etablissements-552144503-0.tpl
vendored
Normal file
@ -0,0 +1 @@
|
||||
etabs = O:8:"stdClass":2:{s:10:"nbReponses";s:4:"OTQ=";s:6:"result";O:8:"stdClass":1:{s:4:"item";a:2:{i:0;O:8:"stdClass":15:{s:2:"id";s:12:"NjgzODMzMQ==";s:5:"Siege";s:4:"MQ==";s:8:"Enseigne";s:0:"";s:7:"Adresse";s:32:"MDA3NSBBViBMQSBHUkFOREUgQVJNRUU=";s:8:"Adresse2";s:0:"";s:2:"CP";s:8:"NzUxMTY=";s:5:"Ville";s:12:"UEFSSVMgMTY=";s:3:"Tel";s:20:"MDEuNDEuMTkuMzEuNTA=";s:3:"Fax";s:20:"MDEuNDAuNjYuNTQuMTQ=";s:3:"Nic";s:8:"MDAwMTg=";s:5:"Actif";s:4:"MQ==";s:7:"NafEtab";s:8:"MjkxMFo=";s:10:"NafEtabLib";s:52:"Q29uc3RydWN0aW9uIGRlIHbDqWhpY3VsZXMgYXV0b21vYmlsZXM=";s:7:"EffEtTr";s:4:"MA==";s:10:"EffEtTrLib";s:4:"Ti9D";}i:1;O:8:"stdClass":15:{s:2:"id";s:12:"MTEyNTI5ODU=";s:5:"Siege";s:4:"MQ==";s:8:"Enseigne";s:0:"";s:7:"Adresse";s:40:"MDA0NSBSVUUgSkVBTiBQSUVSUkUgVElNQkFVRA==";s:8:"Adresse2";s:0:"";s:2:"CP";s:8:"NzgzMDA=";s:5:"Ville";s:8:"UE9JU1NZ";s:3:"Tel";s:0:"";s:3:"Fax";s:0:"";s:3:"Nic";s:8:"MDA1MTM=";s:5:"Actif";s:4:"MA==";s:7:"NafEtab";s:8:"MzQxWg==";s:10:"NafEtabLib";s:52:"Q29uc3RydWN0aW9uIGRlIHbDqWhpY3VsZXMgYXV0b21vYmlsZXM=";s:7:"EffEtTr";s:4:"MA==";s:10:"EffEtTrLib";s:4:"Ti9D";}}}}
|
3
cache/etablissements-552144503.csv
vendored
Normal file
3
cache/etablissements-552144503.csv
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
id;Siege;Enseigne;Adresse;Adresse2;CP;Ville;Tel;Fax;Nic;Actif;NafEtab;NafEtabLib;EffEtTr;EffEtTrLib
|
||||
6838331;1;;"0075 AV LA GRANDE ARMEE";;75116;"PARIS 16";01.41.19.31.50;01.40.66.54.14;00018;1;2910Z;"Construction de véhicules automobiles";0;N/C
|
||||
11252985;1;;"0045 RUE JEAN PIERRE TIMBAUD";;78300;POISSY;;;00513;0;341Z;"Construction de véhicules automobiles";0;N/C
|
|
37
cache/etablissements-552144503.xml
vendored
Normal file
37
cache/etablissements-552144503.xml
vendored
Normal file
@ -0,0 +1,37 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<etablissements>
|
||||
<etablissement>
|
||||
<id>6838331</id>
|
||||
<Siege>1</Siege>
|
||||
<Enseigne />
|
||||
<Adresse>0075 AV LA GRANDE ARMEE</Adresse>
|
||||
<Adresse2 />
|
||||
<CP>75116</CP>
|
||||
<Ville>PARIS 16</Ville>
|
||||
<Tel>01.41.19.31.50</Tel>
|
||||
<Fax>01.40.66.54.14</Fax>
|
||||
<Nic>00018</Nic>
|
||||
<Actif>1</Actif>
|
||||
<NafEtab>2910Z</NafEtab>
|
||||
<NafEtabLib>Construction de véhicules automobiles</NafEtabLib>
|
||||
<EffEtTr>0</EffEtTr>
|
||||
<EffEtTrLib>N/C</EffEtTrLib>
|
||||
</etablissement>
|
||||
<etablissement>
|
||||
<id>11252985</id>
|
||||
<Siege>1</Siege>
|
||||
<Enseigne />
|
||||
<Adresse>0045 RUE JEAN PIERRE TIMBAUD</Adresse>
|
||||
<Adresse2 />
|
||||
<CP>78300</CP>
|
||||
<Ville>POISSY</Ville>
|
||||
<Tel />
|
||||
<Fax />
|
||||
<Nic>00513</Nic>
|
||||
<Actif>0</Actif>
|
||||
<NafEtab>341Z</NafEtab>
|
||||
<NafEtabLib>Construction de véhicules automobiles</NafEtabLib>
|
||||
<EffEtTr>0</EffEtTr>
|
||||
<EffEtTrLib>N/C</EffEtTrLib>
|
||||
</etablissement>
|
||||
</etablissements>
|
1
cache/evenements-341762573.tpl
vendored
Normal file
1
cache/evenements-341762573.tpl
vendored
Normal file
File diff suppressed because one or more lines are too long
2
cache/evenements-34176257300085.csv
vendored
Normal file
2
cache/evenements-34176257300085.csv
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
0|Nic;0|Siege;0|SiretAss;0|TypeSiretAss;0|EvenCode;0|EvenLib;0|EvenLibDet;0|EvenDate;0|DateInfo;1|Nic;1|Siege;1|SiretAss;1|TypeSiretAss;1|EvenCode;1|EvenLib;1|EvenLibDet;1|EvenDate;1|DateInfo;2|Nic;2|Siege;2|SiretAss;2|TypeSiretAss;2|EvenCode;2|EvenLib;2|EvenLibDet;2|EvenDate;2|DateInfo;3|Nic;3|Siege;3|SiretAss;3|TypeSiretAss;3|EvenCode;3|EvenLib;3|EvenLibDet;3|EvenDate;3|DateInfo;4|Nic;4|Siege;4|SiretAss;4|TypeSiretAss;4|EvenCode;4|EvenLib;4|EvenLibDet;4|EvenDate;4|DateInfo;5|Nic;5|Siege;5|SiretAss;5|TypeSiretAss;5|EvenCode;5|EvenLib;5|EvenLibDet;5|EvenDate;5|DateInfo;6|Nic;6|Siege;6|SiretAss;6|TypeSiretAss;6|EvenCode;6|EvenLib;6|EvenLibDet;6|EvenDate;6|DateInfo;7|Nic;7|Siege;7|SiretAss;7|TypeSiretAss;7|EvenCode;7|EvenLib;7|EvenLibDet;7|EvenDate;7|DateInfo;8|Nic;8|Siege;8|SiretAss;8|TypeSiretAss;8|EvenCode;8|EvenLib;8|EvenLibDet;8|EvenDate;8|DateInfo
|
||||
00085;1;00000000000000;"Prédécesseur ou Successeur";I780;"Modification de l'établissement";"Rappel des données de l'établissement du siège en cas de modification exclusive de l'entreprise";20100610;20100909051226;00085;1;00000000000000;"Prédécesseur ou Successeur";I780;"Modification de l'établissement";"Siège modifié (hors transfert) : autre modification de l'établissement";20100802;20100803085112;00085;1;00000000000000;"Prédécesseur ou Successeur";I631;"Modification d'activité du SIREN associé";"Modification de l'activité de l'entreprise : 2620Z - Fabrication d'ordinateurs et d'équipements périphériques (Précédent : 4651Z - Commerce de gros (commerce interentreprises) d'ordinateurs, d'équipements informatiques périphériques et de logiciels), Modification de l'activité de l'établissement : 2620Z - Fabrication d'ordinateurs et d'équipements périphériques (Précédent : 4651Z - Commerce de gros (commerce interentreprises) d'ordinateurs, d'équipements informatiques périphériques et de logiciels), Siège modifié (hors transfert) : modification de l'activité principale de l'établissement";20081231;20100319150907;00085;1;00000000000000;"Prédécesseur ou Successeur";I631;"Modification d'activité du SIREN associé";"Modification de l'activité de l'entreprise : 4651Z - Commerce de gros (commerce interentreprises) d'ordinateurs, d'équipements informatiques périphériques et de logiciels, Modification de l'activité de l'établissement : 4651Z - Commerce de gros (commerce interentreprises) d'ordinateurs, d'équipements informatiques périphériques et de logiciels, Siège modifié (hors transfert) : modification de l'activité principale de l'établissement";20081231;20091209015337;00085;1;00000000000000;"Prédécesseur ou Successeur";IM00;"Modification de l'établissement";"Modification de l'adresse : 43 AV DE L'EUROPE 95330 DOMONT , Modification de l'effectif : 000020 (Tranche 12), ";20090930;20090930000000;00069;0;34176257300051;"Prédécesseur ou Successeur";ITF;"Fermeture de l'établissement dans le cadre d'un transfert";"Modification du nic du siège : 00085, ";20071031;20071211110250;00085;1;00000000000000;"Prédécesseur ou Successeur";ITC;"Création de l'établissement dans le cadre d'un transfert";"Modification du nic du siège : 00085, ";20071031;20071211110250;00069;1;34176257300051;"Prédécesseur ou Successeur";I00;"Modification de l'établissement";;20070713;20070821065710;00069;1;00000000000000;"Prédécesseur ou Successeur";I00;"Modification de l'établissement";"Modification de l'activité de l'entreprise : 300C - Fabrication d'ordinateurs et d'autres équipements informatiques, Modification de l'activité de l'établissement : 300C - Fabrication d'ordinateurs et d'autres équipements informatiques, ";20051231;20060402223640
|
|
102
cache/evenements-34176257300085.xml
vendored
Normal file
102
cache/evenements-34176257300085.xml
vendored
Normal file
@ -0,0 +1,102 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<evenements>
|
||||
<evenement>
|
||||
<Nic>00085</Nic>
|
||||
<Siege>1</Siege>
|
||||
<SiretAss>00000000000000</SiretAss>
|
||||
<TypeSiretAss>Prédécesseur ou Successeur</TypeSiretAss>
|
||||
<EvenCode>I780</EvenCode>
|
||||
<EvenLib>Modification de l'établissement</EvenLib>
|
||||
<EvenLibDet>Rappel des données de l'établissement du siège en cas de modification exclusive de l'entreprise</EvenLibDet>
|
||||
<EvenDate>20100610</EvenDate>
|
||||
<DateInfo>20100909051226</DateInfo>
|
||||
</evenement>
|
||||
<evenement>
|
||||
<Nic>00085</Nic>
|
||||
<Siege>1</Siege>
|
||||
<SiretAss>00000000000000</SiretAss>
|
||||
<TypeSiretAss>Prédécesseur ou Successeur</TypeSiretAss>
|
||||
<EvenCode>I780</EvenCode>
|
||||
<EvenLib>Modification de l'établissement</EvenLib>
|
||||
<EvenLibDet>Siège modifié (hors transfert) : autre modification de l'établissement</EvenLibDet>
|
||||
<EvenDate>20100802</EvenDate>
|
||||
<DateInfo>20100803085112</DateInfo>
|
||||
</evenement>
|
||||
<evenement>
|
||||
<Nic>00085</Nic>
|
||||
<Siege>1</Siege>
|
||||
<SiretAss>00000000000000</SiretAss>
|
||||
<TypeSiretAss>Prédécesseur ou Successeur</TypeSiretAss>
|
||||
<EvenCode>I631</EvenCode>
|
||||
<EvenLib>Modification d'activité du SIREN associé</EvenLib>
|
||||
<EvenLibDet>Modification de l'activité de l'entreprise : 2620Z - Fabrication d'ordinateurs et d'équipements périphériques (Précédent : 4651Z - Commerce de gros (commerce interentreprises) d'ordinateurs, d'équipements informatiques périphériques et de logiciels), Modification de l'activité de l'établissement : 2620Z - Fabrication d'ordinateurs et d'équipements périphériques (Précédent : 4651Z - Commerce de gros (commerce interentreprises) d'ordinateurs, d'équipements informatiques périphériques et de logiciels), Siège modifié (hors transfert) : modification de l'activité principale de l'établissement</EvenLibDet>
|
||||
<EvenDate>20081231</EvenDate>
|
||||
<DateInfo>20100319150907</DateInfo>
|
||||
</evenement>
|
||||
<evenement>
|
||||
<Nic>00085</Nic>
|
||||
<Siege>1</Siege>
|
||||
<SiretAss>00000000000000</SiretAss>
|
||||
<TypeSiretAss>Prédécesseur ou Successeur</TypeSiretAss>
|
||||
<EvenCode>I631</EvenCode>
|
||||
<EvenLib>Modification d'activité du SIREN associé</EvenLib>
|
||||
<EvenLibDet>Modification de l'activité de l'entreprise : 4651Z - Commerce de gros (commerce interentreprises) d'ordinateurs, d'équipements informatiques périphériques et de logiciels, Modification de l'activité de l'établissement : 4651Z - Commerce de gros (commerce interentreprises) d'ordinateurs, d'équipements informatiques périphériques et de logiciels, Siège modifié (hors transfert) : modification de l'activité principale de l'établissement</EvenLibDet>
|
||||
<EvenDate>20081231</EvenDate>
|
||||
<DateInfo>20091209015337</DateInfo>
|
||||
</evenement>
|
||||
<evenement>
|
||||
<Nic>00085</Nic>
|
||||
<Siege>1</Siege>
|
||||
<SiretAss>00000000000000</SiretAss>
|
||||
<TypeSiretAss>Prédécesseur ou Successeur</TypeSiretAss>
|
||||
<EvenCode>IM00</EvenCode>
|
||||
<EvenLib>Modification de l'établissement</EvenLib>
|
||||
<EvenLibDet>Modification de l'adresse : 43 AV DE L'EUROPE 95330 DOMONT , Modification de l'effectif : 000020 (Tranche 12), </EvenLibDet>
|
||||
<EvenDate>20090930</EvenDate>
|
||||
<DateInfo>20090930000000</DateInfo>
|
||||
</evenement>
|
||||
<evenement>
|
||||
<Nic>00069</Nic>
|
||||
<Siege>0</Siege>
|
||||
<SiretAss>34176257300051</SiretAss>
|
||||
<TypeSiretAss>Prédécesseur ou Successeur</TypeSiretAss>
|
||||
<EvenCode>ITF</EvenCode>
|
||||
<EvenLib>Fermeture de l'établissement dans le cadre d'un transfert</EvenLib>
|
||||
<EvenLibDet>Modification du nic du siège : 00085, </EvenLibDet>
|
||||
<EvenDate>20071031</EvenDate>
|
||||
<DateInfo>20071211110250</DateInfo>
|
||||
</evenement>
|
||||
<evenement>
|
||||
<Nic>00085</Nic>
|
||||
<Siege>1</Siege>
|
||||
<SiretAss>00000000000000</SiretAss>
|
||||
<TypeSiretAss>Prédécesseur ou Successeur</TypeSiretAss>
|
||||
<EvenCode>ITC</EvenCode>
|
||||
<EvenLib>Création de l'établissement dans le cadre d'un transfert</EvenLib>
|
||||
<EvenLibDet>Modification du nic du siège : 00085, </EvenLibDet>
|
||||
<EvenDate>20071031</EvenDate>
|
||||
<DateInfo>20071211110250</DateInfo>
|
||||
</evenement>
|
||||
<evenement>
|
||||
<Nic>00069</Nic>
|
||||
<Siege>1</Siege>
|
||||
<SiretAss>34176257300051</SiretAss>
|
||||
<TypeSiretAss>Prédécesseur ou Successeur</TypeSiretAss>
|
||||
<EvenCode>I00</EvenCode>
|
||||
<EvenLib>Modification de l'établissement</EvenLib>
|
||||
<EvenLibDet />
|
||||
<EvenDate>20070713</EvenDate>
|
||||
<DateInfo>20070821065710</DateInfo>
|
||||
</evenement>
|
||||
<evenement>
|
||||
<Nic>00069</Nic>
|
||||
<Siege>1</Siege>
|
||||
<SiretAss>00000000000000</SiretAss>
|
||||
<TypeSiretAss>Prédécesseur ou Successeur</TypeSiretAss>
|
||||
<EvenCode>I00</EvenCode>
|
||||
<EvenLib>Modification de l'établissement</EvenLib>
|
||||
<EvenLibDet>Modification de l'activité de l'entreprise : 300C - Fabrication d'ordinateurs et d'autres équipements informatiques, Modification de l'activité de l'établissement : 300C - Fabrication d'ordinateurs et d'autres équipements informatiques, </EvenLibDet>
|
||||
<EvenDate>20051231</EvenDate>
|
||||
<DateInfo>20060402223640</DateInfo>
|
||||
</evenement>
|
||||
</evenements>
|
2
cache/identite-34176257300085.csv
vendored
Normal file
2
cache/identite-34176257300085.csv
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
id;Siret;SiretSiege;Siege;TribunalCode;TribunalLib;NumRC;Actif;EntActiveRCS;AutreId;Source;SourceId;Isin;Nom;Nom2;NomLong;NomCommercial;Sigle;SigleLong;Enseigne;EnseigneLong;Adresse;Adresse2;AdresseNum;AdresseBtq;AdresseVoie;AdresseRue;CP;Ville;Pays;PaysIso2;AdresseDom;AdresseDomNb;Civilite;NbEtab;Tel;Fax;Web;Mail;GeoLat;GeoLon;GeoPrecis;GeoInfos|CUCS;GeoInfos|ZRU;GeoInfos|ZFU;GeoInfos|ZUS;GeoInfos|AFR;GeoInfos|ZRR;TvaNumero;TvaAttribue;FJ;FJ_lib;FJ2;FJ2_Lib;Siren;Nic;NafEnt;NafEntLib;NafEtab;NafEtabLib;NaceEtab;NaceEnt;Nafa;NafaLib;NumRM;Activite;Capital;CapitalDev;CapitalLib;CapitalType;DateCreaEt;DateCreaEn;DateImmat;DateClotEt;DateRadiation;EffEnTr;EffEnTrLib;Effectif;EffEtTr;EffEtTrLib;EffectifEtab;Dept;codeCommune;AnneeEffEn;AnneeEffEt;AnneeTCA;TrancheCA;TrancheCALib;dir1Titre;dir1Code;dir1NomPrenom;dir1DateFct;dir1DateNaiss;dir1LieuNaiss;dir2Titre;dir2Code;dir2NomPrenom;dir2DateFct;dir2DateNaiss;dir2LieuNaiss;Rivoli;InfosIris|codIris;InfosIris|codComIris;InfosIris|libIris;InfosIris|typIris;InfosIris|evoIris;InfosIris|trIris;InfosIris|grdQuartier;NatureActivite;OrigineCreation;TypeExploitation;Auxiliaire;Saisonnalite;SituationJuridique;Bilan|Cloture;Bilan|Duree;Bilan|Devise;Bilan|Capital;Bilan|CA;Bilan|Resultat;Bilan|Effectif;Bourse|placeCotation;Bourse|capitalisation;Bourse|nombreTitres;Bourse|derCoursDate;Bourse|derCoursCloture;DateMajINSEE;DateMajRCS;DateMajBILAN;DateMajID;Naf4Ent;Naf4Etab;Naf4EntLib;Naf4EtabLib
|
||||
17553932;34176257300085;34176257300085;1;PONTOC;"TC PONTOISE";1987B01203;1;1;1987B01203;002;17577550;FR0000044943;"LOGIC INSTRUMENT";;;;;;;;"0043 AV DE L'EUROPE";;0043;;AV;"DE L'EUROPE";95330;DOMONT;;FR;;;0;1;01.34.28.35.24;01.34.28.00.50;http://www.logic-instrument.com;sales@logic-instrument.com;49.0275154;2.3446121;6;NON;NON;NON;NON;NON;NON;FR59341762573;1;5599;"Autre SA à conseil d'administration";5599;"Autre SA à conseil d'administration";341762573;00085;2620Z;"Fabrication d'ordinateurs et d'équipements périphériques";2620Z;"Fabrication d'ordinateurs et d'équipements périphériques";C2620;C2620;;;;" fabrication, distribution d'instrumentation scientifique et technique ";1149022;EUR;;S;2007-10-31;1987-07-01;1987-07-22;;0000-00-00;12;"de 20 à 49 salariés";0000020;12;"de 20 à 49 salariés";0000020;95;199;2008;2008;2007;5;"de 10 à 20 M€";"Président directeur Général";1301;"BAILLY Michel";;1952-03-10;"NEUILLY SUR SEINE";"Directeur général";0709;"GEBRAN JACQUES ";;1957-12-01;BEYROUTH(LIBAN);"0275 5";101;951990101;"Le Lycee";"IRIS d'habitat";0;950301;9519901;99;1;10;0;0;;20091231;12;EUR;957523;5732440;-1282149;;;0;;;;2010-09-30;2010-08-04;2010-09-22;2010-09-30;300C;300C;"Fabrication d'ordinateurs et d'autres équipements informatiques";"Fabrication d'ordinateurs et d'autres équipements informatiques"
|
|
1
cache/identite-34176257300085.tpl
vendored
Normal file
1
cache/identite-34176257300085.tpl
vendored
Normal file
File diff suppressed because one or more lines are too long
147
cache/identite-34176257300085.xml
vendored
Normal file
147
cache/identite-34176257300085.xml
vendored
Normal file
@ -0,0 +1,147 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<identite>
|
||||
<id>17553932</id>
|
||||
<Siret>34176257300085</Siret>
|
||||
<SiretSiege>34176257300085</SiretSiege>
|
||||
<Siege>1</Siege>
|
||||
<TribunalCode>PONTOC</TribunalCode>
|
||||
<TribunalLib>TC PONTOISE</TribunalLib>
|
||||
<NumRC>1987B01203</NumRC>
|
||||
<Actif>1</Actif>
|
||||
<EntActiveRCS>1</EntActiveRCS>
|
||||
<AutreId>1987B01203</AutreId>
|
||||
<Source>002</Source>
|
||||
<SourceId>17577550</SourceId>
|
||||
<Isin>FR0000044943</Isin>
|
||||
<Nom>LOGIC INSTRUMENT</Nom>
|
||||
<Nom2 />
|
||||
<NomLong />
|
||||
<NomCommercial />
|
||||
<Sigle />
|
||||
<SigleLong />
|
||||
<Enseigne />
|
||||
<EnseigneLong />
|
||||
<Adresse>0043 AV DE L'EUROPE</Adresse>
|
||||
<Adresse2 />
|
||||
<AdresseNum>0043</AdresseNum>
|
||||
<AdresseBtq />
|
||||
<AdresseVoie>AV</AdresseVoie>
|
||||
<AdresseRue>DE L'EUROPE</AdresseRue>
|
||||
<CP>95330</CP>
|
||||
<Ville>DOMONT</Ville>
|
||||
<Pays />
|
||||
<PaysIso2>FR</PaysIso2>
|
||||
<AdresseDom />
|
||||
<AdresseDomEnt />
|
||||
<AdresseDomNb />
|
||||
<Civilite>0</Civilite>
|
||||
<NbEtab>1</NbEtab>
|
||||
<Tel>01.34.28.35.24</Tel>
|
||||
<Fax>01.34.28.00.50</Fax>
|
||||
<Web>http://www.logic-instrument.com</Web>
|
||||
<Mail>sales@logic-instrument.com</Mail>
|
||||
<GeoLat>49.0275154</GeoLat>
|
||||
<GeoLon>2.3446121</GeoLon>
|
||||
<GeoPrecis>6</GeoPrecis>
|
||||
<GeoInfos>
|
||||
<CUCS>NON</CUCS>
|
||||
<ZRU>NON</ZRU>
|
||||
<ZFU>NON</ZFU>
|
||||
<ZUS>NON</ZUS>
|
||||
<AFR>NON</AFR>
|
||||
<ZRR>NON</ZRR>
|
||||
</GeoInfos>
|
||||
<TvaNumero>FR59341762573</TvaNumero>
|
||||
<TvaAttribue>1</TvaAttribue>
|
||||
<FJ>5599</FJ>
|
||||
<FJ_lib>Autre SA à conseil d'administration</FJ_lib>
|
||||
<FJ2>5599</FJ2>
|
||||
<FJ2_Lib>Autre SA à conseil d'administration</FJ2_Lib>
|
||||
<Siren>341762573</Siren>
|
||||
<Nic>00085</Nic>
|
||||
<NafEnt>2620Z</NafEnt>
|
||||
<NafEntLib>Fabrication d'ordinateurs et d'équipements périphériques</NafEntLib>
|
||||
<NafEtab>2620Z</NafEtab>
|
||||
<NafEtabLib>Fabrication d'ordinateurs et d'équipements périphériques</NafEtabLib>
|
||||
<NaceEtab>C2620</NaceEtab>
|
||||
<NaceEnt>C2620</NaceEnt>
|
||||
<Nafa />
|
||||
<NafaLib />
|
||||
<NumRM />
|
||||
<Activite> fabrication, distribution d'instrumentation scientifique et technique </Activite>
|
||||
<Capital>1149022</Capital>
|
||||
<CapitalDev>EUR</CapitalDev>
|
||||
<CapitalLib />
|
||||
<CapitalType>S</CapitalType>
|
||||
<DateCreaEt>2007-10-31</DateCreaEt>
|
||||
<DateCreaEn>1987-07-01</DateCreaEn>
|
||||
<DateImmat>1987-07-22</DateImmat>
|
||||
<DateClotEt />
|
||||
<DateRadiation>0000-00-00</DateRadiation>
|
||||
<EffEnTr>12</EffEnTr>
|
||||
<EffEnTrLib>de 20 à 49 salariés</EffEnTrLib>
|
||||
<Effectif>0000020</Effectif>
|
||||
<EffEtTr>12</EffEtTr>
|
||||
<EffEtTrLib>de 20 à 49 salariés</EffEtTrLib>
|
||||
<EffectifEtab>0000020</EffectifEtab>
|
||||
<Dept>95</Dept>
|
||||
<codeCommune>199</codeCommune>
|
||||
<AnneeEffEn>2008</AnneeEffEn>
|
||||
<AnneeEffEt>2008</AnneeEffEt>
|
||||
<AnneeTCA>2007</AnneeTCA>
|
||||
<TrancheCA>5</TrancheCA>
|
||||
<TrancheCALib>de 10 à 20 M€</TrancheCALib>
|
||||
<dir1Titre>Président directeur Général</dir1Titre>
|
||||
<dir1Code>1301</dir1Code>
|
||||
<dir1NomPrenom>BAILLY Michel</dir1NomPrenom>
|
||||
<dir1DateFct />
|
||||
<dir1DateNaiss>1952-03-10</dir1DateNaiss>
|
||||
<dir1LieuNaiss>NEUILLY SUR SEINE</dir1LieuNaiss>
|
||||
<dir2Titre>Directeur général</dir2Titre>
|
||||
<dir2Code>0709</dir2Code>
|
||||
<dir2NomPrenom>GEBRAN JACQUES </dir2NomPrenom>
|
||||
<dir2DateFct />
|
||||
<dir2DateNaiss>1957-12-01</dir2DateNaiss>
|
||||
<dir2LieuNaiss>BEYROUTH(LIBAN)</dir2LieuNaiss>
|
||||
<Rivoli>0275 5</Rivoli>
|
||||
<InfosIris>
|
||||
<codIris>101</codIris>
|
||||
<codComIris>951990101</codComIris>
|
||||
<libIris>Le Lycee</libIris>
|
||||
<typIris>IRIS d'habitat</typIris>
|
||||
<evoIris>0</evoIris>
|
||||
<trIris>950301</trIris>
|
||||
<grdQuartier>9519901</grdQuartier>
|
||||
</InfosIris>
|
||||
<NatureActivite>99</NatureActivite>
|
||||
<OrigineCreation>1</OrigineCreation>
|
||||
<TypeExploitation>10</TypeExploitation>
|
||||
<Auxiliaire>0</Auxiliaire>
|
||||
<Saisonnalite>0</Saisonnalite>
|
||||
<SituationJuridique />
|
||||
<Bilan>
|
||||
<Cloture>20091231</Cloture>
|
||||
<Duree>12</Duree>
|
||||
<Devise>EUR</Devise>
|
||||
<Capital>957523</Capital>
|
||||
<CA>5732440</CA>
|
||||
<Resultat>-1282149</Resultat>
|
||||
<Effectif />
|
||||
</Bilan>
|
||||
<Bourse>
|
||||
<placeCotation />
|
||||
<capitalisation>0</capitalisation>
|
||||
<nombreTitres />
|
||||
<derCoursDate />
|
||||
<derCoursCloture />
|
||||
</Bourse>
|
||||
<DateMajINSEE>2010-09-30</DateMajINSEE>
|
||||
<DateMajRCS>2010-08-04</DateMajRCS>
|
||||
<DateMajBILAN>2010-09-22</DateMajBILAN>
|
||||
<DateMajID>2010-09-30</DateMajID>
|
||||
<Naf4Ent>300C</Naf4Ent>
|
||||
<Naf4Etab>300C</Naf4Etab>
|
||||
<Naf4EntLib>Fabrication d'ordinateurs et d'autres équipements informatiques</Naf4EntLib>
|
||||
<Naf4EtabLib>Fabrication d'ordinateurs et d'autres équipements informatiques</Naf4EtabLib>
|
||||
<AutreSiren />
|
||||
</identite>
|
2
cache/identite-55214450300018.csv
vendored
Normal file
2
cache/identite-55214450300018.csv
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
id;Siret;SiretSiege;Siege;TribunalCode;TribunalLib;NumRC;Actif;EntActiveRCS;AutreId;Source;SourceId;Isin;Nom;Nom2;NomLong;NomCommercial;Sigle;SigleLong;Enseigne;EnseigneLong;Adresse;Adresse2;AdresseNum;AdresseBtq;AdresseVoie;AdresseRue;CP;Ville;Pays;PaysIso2;AdresseDom;AdresseDomNb;Civilite;NbEtab;Tel;Fax;Web;Mail;GeoLat;GeoLon;GeoPrecis;GeoInfos|CUCS;GeoInfos|ZRU;GeoInfos|ZFU;GeoInfos|ZUS;GeoInfos|AFR;GeoInfos|ZRR;TvaNumero;TvaAttribue;FJ;FJ_lib;FJ2;FJ2_Lib;Siren;Nic;NafEnt;NafEntLib;NafEtab;NafEtabLib;NaceEtab;NaceEnt;Nafa;NafaLib;NumRM;Activite;Capital;CapitalDev;CapitalLib;CapitalType;DateCreaEt;DateCreaEn;DateImmat;DateClotEt;DateRadiation;EffEnTr;EffEnTrLib;Effectif;EffEtTr;EffEtTrLib;EffectifEtab;Dept;codeCommune;AnneeEffEn;AnneeEffEt;AnneeTCA;TrancheCA;TrancheCALib;dir1Titre;dir1Code;dir1NomPrenom;dir1DateFct;dir1DateNaiss;dir1LieuNaiss;dir2Titre;dir2Code;dir2NomPrenom;dir2DateFct;dir2DateNaiss;dir2LieuNaiss;Rivoli;InfosIris|codIris;InfosIris|codComIris;InfosIris|libIris;InfosIris|typIris;InfosIris|evoIris;InfosIris|trIris;InfosIris|grdQuartier;NatureActivite;OrigineCreation;TypeExploitation;Auxiliaire;Saisonnalite;SituationJuridique;Bilan|Cloture;Bilan|Duree;Bilan|Devise;Bilan|Capital;Bilan|CA;Bilan|Resultat;Bilan|Effectif;Bourse|placeCotation;Bourse|capitalisation;Bourse|nombreTitres;Bourse|derCoursDate;Bourse|derCoursCloture;DateMajINSEE;DateMajRCS;DateMajBILAN;DateMajID;Naf4Ent;Naf4Etab;Naf4EntLib;Naf4EtabLib
|
||||
6838331;55214450300018;55214450300018;1;PARISC;"TC PARIS";1955B14450;1;1;1955B14450;002;6853244;;"AUTOMOBILES PEUGEOT";;;;;;;;"0075 AV LA GRANDE ARMEE";;0075;;AV;"LA GRANDE ARMEE";75116;"PARIS 16";;FR;;;0;23;01.41.19.31.50;01.40.66.54.14;http://www.peugeot.fr;wm@peugeot.com;48.8765259;2.2858214;8;NON;NON;NON;NON;NON;NON;FR23552144503;1;5599;"Autre SA à conseil d'administration";5599;"Autre SA à conseil d'administration";552144503;00018;2910Z;"Construction de véhicules automobiles";2910Z;"Construction de véhicules automobiles";C2910;C2910;;;;"Fabrication et vente de voitures et véhicules automobiles, moteurs et compresseurs, industrie mécanique, formation professionnelle continue";172711770;EUR;;S;1900-01-00;1955-01-01;1955-09-08;;0000-00-00;03;N/C;0000006;00;;0000000;75;116;0;0;0;0;N/C;"Président du conseil d'administration";1306;"GALES Jean-marc";;1962-08-16;"ESCH SUR ALZETTE(LUXEMBOURG)";"Directeur général";0709;"RAMBAUD Jacques";;1959-05-06;"PARIS (75016)";"4271 1";6413;751166413;"Chaillot 13";"IRIS d'activité";0;751761;7511664;4;9;0;0;0;;20081231;12;EUR;171285000;13069438000;87553000;8;;0;;;;2010-09-30;2010-08-19;2009-08-28;2010-09-30;341Z;741J;"Construction de véhicules automobiles";"Administration d'entreprises"
|
|
1
cache/identite-55214450300018.tpl
vendored
Normal file
1
cache/identite-55214450300018.tpl
vendored
Normal file
@ -0,0 +1 @@
|
||||
etab = O:8:"stdClass":115:{s:2:"id";s:12:"NjgzODMzMQ==";s:5:"Siret";s:20:"NTUyMTQ0NTAzMDAwMTg=";s:10:"SiretSiege";s:20:"NTUyMTQ0NTAzMDAwMTg=";s:5:"Siege";s:4:"MQ==";s:12:"TribunalCode";s:8:"UEFSSVND";s:11:"TribunalLib";s:12:"VEMgUEFSSVM=";s:5:"NumRC";s:16:"MTk1NUIxNDQ1MA==";s:5:"Actif";s:4:"MQ==";s:12:"EntActiveRCS";s:4:"MQ==";s:7:"AutreId";s:16:"MTk1NUIxNDQ1MA==";s:6:"Source";s:4:"MDAy";s:8:"SourceId";s:12:"Njg1MzI0NA==";s:4:"Isin";s:0:"";s:3:"Nom";s:28:"QVVUT01PQklMRVMgUEVVR0VPVA==";s:4:"Nom2";s:0:"";s:7:"NomLong";s:0:"";s:13:"NomCommercial";s:0:"";s:5:"Sigle";s:0:"";s:9:"SigleLong";s:0:"";s:8:"Enseigne";s:0:"";s:12:"EnseigneLong";s:0:"";s:7:"Adresse";s:32:"MDA3NSBBViBMQSBHUkFOREUgQVJNRUU=";s:8:"Adresse2";s:0:"";s:10:"AdresseNum";s:8:"MDA3NQ==";s:10:"AdresseBtq";s:0:"";s:11:"AdresseVoie";s:4:"QVY=";s:10:"AdresseRue";s:20:"TEEgR1JBTkRFIEFSTUVF";s:2:"CP";s:8:"NzUxMTY=";s:5:"Ville";s:12:"UEFSSVMgMTY=";s:4:"Pays";s:0:"";s:8:"PaysIso2";s:4:"RlI=";s:10:"AdresseDom";s:0:"";s:13:"AdresseDomEnt";O:8:"stdClass":0:{}s:12:"AdresseDomNb";s:0:"";s:8:"Civilite";s:4:"MA==";s:6:"NbEtab";s:4:"MjM=";s:3:"Tel";s:20:"MDEuNDEuMTkuMzEuNTA=";s:3:"Fax";s:20:"MDEuNDAuNjYuNTQuMTQ=";s:3:"Web";s:28:"aHR0cDovL3d3dy5wZXVnZW90LmZy";s:4:"Mail";s:20:"d21AcGV1Z2VvdC5jb20=";s:6:"GeoLat";s:16:"NDguODc2NTI1OQ==";s:6:"GeoLon";s:12:"Mi4yODU4MjE0";s:9:"GeoPrecis";s:4:"OA==";s:8:"GeoInfos";O:8:"stdClass":6:{s:4:"CUCS";s:4:"Tk9O";s:3:"ZRU";s:4:"Tk9O";s:3:"ZFU";s:4:"Tk9O";s:3:"ZUS";s:4:"Tk9O";s:3:"AFR";s:4:"Tk9O";s:3:"ZRR";s:4:"Tk9O";}s:9:"TvaNumero";s:20:"RlIyMzU1MjE0NDUwMw==";s:11:"TvaAttribue";s:4:"MQ==";s:2:"FJ";s:8:"NTU5OQ==";s:6:"FJ_lib";s:48:"QXV0cmUgU0Egw6AgY29uc2VpbCBkJ2FkbWluaXN0cmF0aW9u";s:3:"FJ2";s:8:"NTU5OQ==";s:7:"FJ2_Lib";s:48:"QXV0cmUgU0Egw6AgY29uc2VpbCBkJ2FkbWluaXN0cmF0aW9u";s:5:"Siren";s:12:"NTUyMTQ0NTAz";s:3:"Nic";s:8:"MDAwMTg=";s:6:"NafEnt";s:8:"MjkxMFo=";s:9:"NafEntLib";s:52:"Q29uc3RydWN0aW9uIGRlIHbDqWhpY3VsZXMgYXV0b21vYmlsZXM=";s:7:"NafEtab";s:8:"MjkxMFo=";s:10:"NafEtabLib";s:52:"Q29uc3RydWN0aW9uIGRlIHbDqWhpY3VsZXMgYXV0b21vYmlsZXM=";s:8:"NaceEtab";s:8:"QzI5MTA=";s:7:"NaceEnt";s:8:"QzI5MTA=";s:4:"Nafa";s:0:"";s:7:"NafaLib";s:0:"";s:5:"NumRM";s:0:"";s:8:"Activite";s:188:"RmFicmljYXRpb24gZXQgdmVudGUgZGUgdm9pdHVyZXMgZXQgdsOpaGljdWxlcyBhdXRvbW9iaWxlcywgbW90ZXVycyBldCBjb21wcmVzc2V1cnMsIGluZHVzdHJpZSBtw6ljYW5pcXVlLCBmb3JtYXRpb24gcHJvZmVzc2lvbm5lbGxlIGNvbnRpbnVl";s:7:"Capital";s:12:"MTcyNzExNzcw";s:10:"CapitalDev";s:4:"RVVS";s:10:"CapitalLib";s:0:"";s:11:"CapitalType";s:4:"Uw==";s:10:"DateCreaEt";s:16:"MTkwMC0wMS0wMA==";s:10:"DateCreaEn";s:16:"MTk1NS0wMS0wMQ==";s:9:"DateImmat";s:16:"MTk1NS0wOS0wOA==";s:10:"DateClotEt";s:0:"";s:13:"DateRadiation";s:16:"MDAwMC0wMC0wMA==";s:7:"EffEnTr";s:4:"MDM=";s:10:"EffEnTrLib";s:4:"Ti9D";s:8:"Effectif";s:12:"MDAwMDAwNg==";s:7:"EffEtTr";s:4:"MDA=";s:10:"EffEtTrLib";s:0:"";s:12:"EffectifEtab";s:12:"MDAwMDAwMA==";s:4:"Dept";s:4:"NzU=";s:11:"codeCommune";s:4:"MTE2";s:10:"AnneeEffEn";s:4:"MA==";s:10:"AnneeEffEt";s:4:"MA==";s:8:"AnneeTCA";s:4:"MA==";s:9:"TrancheCA";s:4:"MA==";s:12:"TrancheCALib";s:4:"Ti9D";s:9:"dir1Titre";s:52:"UHLDqXNpZGVudCBkdSBjb25zZWlsIGQnYWRtaW5pc3RyYXRpb24=";s:8:"dir1Code";s:8:"MTMwNg==";s:13:"dir1NomPrenom";s:20:"R0FMRVMgSmVhbi1tYXJj";s:11:"dir1DateFct";s:0:"";s:13:"dir1DateNaiss";s:16:"MTk2Mi0wOC0xNg==";s:13:"dir1LieuNaiss";s:40:"RVNDSCBTVVIgQUxaRVRURShMVVhFTUJPVVJHKQ==";s:9:"dir2Titre";s:28:"RGlyZWN0ZXVyIGfDqW7DqXJhbA==";s:8:"dir2Code";s:8:"MDcwOQ==";s:13:"dir2NomPrenom";s:20:"UkFNQkFVRCBKYWNxdWVz";s:11:"dir2DateFct";s:0:"";s:13:"dir2DateNaiss";s:16:"MTk1OS0wNS0wNg==";s:13:"dir2LieuNaiss";s:20:"UEFSSVMgKDc1MDE2KQ==";s:6:"Rivoli";s:8:"NDI3MSAx";s:9:"InfosIris";O:8:"stdClass":7:{s:7:"codIris";s:8:"NjQxMw==";s:10:"codComIris";s:12:"NzUxMTY2NDEz";s:7:"libIris";s:16:"Q2hhaWxsb3QgMTM=";s:7:"typIris";s:24:"SVJJUyBkJ2FjdGl2aXTDqQ==";s:7:"evoIris";s:4:"MA==";s:6:"trIris";s:8:"NzUxNzYx";s:11:"grdQuartier";s:12:"NzUxMTY2NA==";}s:14:"NatureActivite";s:4:"NA==";s:15:"OrigineCreation";s:4:"OQ==";s:16:"TypeExploitation";s:4:"MA==";s:10:"Auxiliaire";s:4:"MA==";s:12:"Saisonnalite";s:4:"MA==";s:18:"SituationJuridique";s:0:"";s:5:"Bilan";O:8:"stdClass":7:{s:7:"Cloture";s:12:"MjAwODEyMzE=";s:5:"Duree";s:4:"MTI=";s:6:"Devise";s:4:"RVVS";s:7:"Capital";s:12:"MTcxMjg1MDAw";s:2:"CA";s:16:"MTMwNjk0MzgwMDA=";s:8:"Resultat";s:12:"ODc1NTMwMDA=";s:8:"Effectif";s:4:"OA==";}s:6:"Bourse";O:8:"stdClass":5:{s:13:"placeCotation";s:0:"";s:14:"capitalisation";s:4:"MA==";s:12:"nombreTitres";s:0:"";s:12:"derCoursDate";s:0:"";s:15:"derCoursCloture";s:0:"";}s:12:"DateMajINSEE";s:16:"MjAxMC0wOS0zMA==";s:10:"DateMajRCS";s:16:"MjAxMC0wOC0xOQ==";s:12:"DateMajBILAN";s:16:"MjAwOS0wOC0yOA==";s:9:"DateMajID";s:16:"MjAxMC0wOS0zMA==";s:7:"Naf4Ent";s:8:"MzQxWg==";s:8:"Naf4Etab";s:8:"NzQxSg==";s:10:"Naf4EntLib";s:52:"Q29uc3RydWN0aW9uIGRlIHbDqWhpY3VsZXMgYXV0b21vYmlsZXM=";s:11:"Naf4EtabLib";s:40:"QWRtaW5pc3RyYXRpb24gZCdlbnRyZXByaXNlcw==";s:10:"AutreSiren";O:8:"stdClass":0:{}}
|
147
cache/identite-55214450300018.xml
vendored
Normal file
147
cache/identite-55214450300018.xml
vendored
Normal file
@ -0,0 +1,147 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<identite>
|
||||
<id>6838331</id>
|
||||
<Siret>55214450300018</Siret>
|
||||
<SiretSiege>55214450300018</SiretSiege>
|
||||
<Siege>1</Siege>
|
||||
<TribunalCode>PARISC</TribunalCode>
|
||||
<TribunalLib>TC PARIS</TribunalLib>
|
||||
<NumRC>1955B14450</NumRC>
|
||||
<Actif>1</Actif>
|
||||
<EntActiveRCS>1</EntActiveRCS>
|
||||
<AutreId>1955B14450</AutreId>
|
||||
<Source>002</Source>
|
||||
<SourceId>6853244</SourceId>
|
||||
<Isin />
|
||||
<Nom>AUTOMOBILES PEUGEOT</Nom>
|
||||
<Nom2 />
|
||||
<NomLong />
|
||||
<NomCommercial />
|
||||
<Sigle />
|
||||
<SigleLong />
|
||||
<Enseigne />
|
||||
<EnseigneLong />
|
||||
<Adresse>0075 AV LA GRANDE ARMEE</Adresse>
|
||||
<Adresse2 />
|
||||
<AdresseNum>0075</AdresseNum>
|
||||
<AdresseBtq />
|
||||
<AdresseVoie>AV</AdresseVoie>
|
||||
<AdresseRue>LA GRANDE ARMEE</AdresseRue>
|
||||
<CP>75116</CP>
|
||||
<Ville>PARIS 16</Ville>
|
||||
<Pays />
|
||||
<PaysIso2>FR</PaysIso2>
|
||||
<AdresseDom />
|
||||
<AdresseDomEnt />
|
||||
<AdresseDomNb />
|
||||
<Civilite>0</Civilite>
|
||||
<NbEtab>23</NbEtab>
|
||||
<Tel>01.41.19.31.50</Tel>
|
||||
<Fax>01.40.66.54.14</Fax>
|
||||
<Web>http://www.peugeot.fr</Web>
|
||||
<Mail>wm@peugeot.com</Mail>
|
||||
<GeoLat>48.8765259</GeoLat>
|
||||
<GeoLon>2.2858214</GeoLon>
|
||||
<GeoPrecis>8</GeoPrecis>
|
||||
<GeoInfos>
|
||||
<CUCS>NON</CUCS>
|
||||
<ZRU>NON</ZRU>
|
||||
<ZFU>NON</ZFU>
|
||||
<ZUS>NON</ZUS>
|
||||
<AFR>NON</AFR>
|
||||
<ZRR>NON</ZRR>
|
||||
</GeoInfos>
|
||||
<TvaNumero>FR23552144503</TvaNumero>
|
||||
<TvaAttribue>1</TvaAttribue>
|
||||
<FJ>5599</FJ>
|
||||
<FJ_lib>Autre SA à conseil d'administration</FJ_lib>
|
||||
<FJ2>5599</FJ2>
|
||||
<FJ2_Lib>Autre SA à conseil d'administration</FJ2_Lib>
|
||||
<Siren>552144503</Siren>
|
||||
<Nic>00018</Nic>
|
||||
<NafEnt>2910Z</NafEnt>
|
||||
<NafEntLib>Construction de véhicules automobiles</NafEntLib>
|
||||
<NafEtab>2910Z</NafEtab>
|
||||
<NafEtabLib>Construction de véhicules automobiles</NafEtabLib>
|
||||
<NaceEtab>C2910</NaceEtab>
|
||||
<NaceEnt>C2910</NaceEnt>
|
||||
<Nafa />
|
||||
<NafaLib />
|
||||
<NumRM />
|
||||
<Activite>Fabrication et vente de voitures et véhicules automobiles, moteurs et compresseurs, industrie mécanique, formation professionnelle continue</Activite>
|
||||
<Capital>172711770</Capital>
|
||||
<CapitalDev>EUR</CapitalDev>
|
||||
<CapitalLib />
|
||||
<CapitalType>S</CapitalType>
|
||||
<DateCreaEt>1900-01-00</DateCreaEt>
|
||||
<DateCreaEn>1955-01-01</DateCreaEn>
|
||||
<DateImmat>1955-09-08</DateImmat>
|
||||
<DateClotEt />
|
||||
<DateRadiation>0000-00-00</DateRadiation>
|
||||
<EffEnTr>03</EffEnTr>
|
||||
<EffEnTrLib>N/C</EffEnTrLib>
|
||||
<Effectif>0000006</Effectif>
|
||||
<EffEtTr>00</EffEtTr>
|
||||
<EffEtTrLib />
|
||||
<EffectifEtab>0000000</EffectifEtab>
|
||||
<Dept>75</Dept>
|
||||
<codeCommune>116</codeCommune>
|
||||
<AnneeEffEn>0</AnneeEffEn>
|
||||
<AnneeEffEt>0</AnneeEffEt>
|
||||
<AnneeTCA>0</AnneeTCA>
|
||||
<TrancheCA>0</TrancheCA>
|
||||
<TrancheCALib>N/C</TrancheCALib>
|
||||
<dir1Titre>Président du conseil d'administration</dir1Titre>
|
||||
<dir1Code>1306</dir1Code>
|
||||
<dir1NomPrenom>GALES Jean-marc</dir1NomPrenom>
|
||||
<dir1DateFct />
|
||||
<dir1DateNaiss>1962-08-16</dir1DateNaiss>
|
||||
<dir1LieuNaiss>ESCH SUR ALZETTE(LUXEMBOURG)</dir1LieuNaiss>
|
||||
<dir2Titre>Directeur général</dir2Titre>
|
||||
<dir2Code>0709</dir2Code>
|
||||
<dir2NomPrenom>RAMBAUD Jacques</dir2NomPrenom>
|
||||
<dir2DateFct />
|
||||
<dir2DateNaiss>1959-05-06</dir2DateNaiss>
|
||||
<dir2LieuNaiss>PARIS (75016)</dir2LieuNaiss>
|
||||
<Rivoli>4271 1</Rivoli>
|
||||
<InfosIris>
|
||||
<codIris>6413</codIris>
|
||||
<codComIris>751166413</codComIris>
|
||||
<libIris>Chaillot 13</libIris>
|
||||
<typIris>IRIS d'activité</typIris>
|
||||
<evoIris>0</evoIris>
|
||||
<trIris>751761</trIris>
|
||||
<grdQuartier>7511664</grdQuartier>
|
||||
</InfosIris>
|
||||
<NatureActivite>4</NatureActivite>
|
||||
<OrigineCreation>9</OrigineCreation>
|
||||
<TypeExploitation>0</TypeExploitation>
|
||||
<Auxiliaire>0</Auxiliaire>
|
||||
<Saisonnalite>0</Saisonnalite>
|
||||
<SituationJuridique />
|
||||
<Bilan>
|
||||
<Cloture>20081231</Cloture>
|
||||
<Duree>12</Duree>
|
||||
<Devise>EUR</Devise>
|
||||
<Capital>171285000</Capital>
|
||||
<CA>13069438000</CA>
|
||||
<Resultat>87553000</Resultat>
|
||||
<Effectif>8</Effectif>
|
||||
</Bilan>
|
||||
<Bourse>
|
||||
<placeCotation />
|
||||
<capitalisation>0</capitalisation>
|
||||
<nombreTitres />
|
||||
<derCoursDate />
|
||||
<derCoursCloture />
|
||||
</Bourse>
|
||||
<DateMajINSEE>2010-09-30</DateMajINSEE>
|
||||
<DateMajRCS>2010-08-19</DateMajRCS>
|
||||
<DateMajBILAN>2009-08-28</DateMajBILAN>
|
||||
<DateMajID>2010-09-30</DateMajID>
|
||||
<Naf4Ent>341Z</Naf4Ent>
|
||||
<Naf4Etab>741J</Naf4Etab>
|
||||
<Naf4EntLib>Construction de véhicules automobiles</Naf4EntLib>
|
||||
<Naf4EtabLib>Administration d'entreprises</Naf4EtabLib>
|
||||
<AutreSiren />
|
||||
</identite>
|
53
config/scoresws.ini
Normal file
53
config/scoresws.ini
Normal file
@ -0,0 +1,53 @@
|
||||
[PRD]
|
||||
webservices.interne.wsdl = "http://wse.scores-decisions.com:8081/sinterne?wsdl"
|
||||
webservices.interne.options.trace = 1
|
||||
webservices.interne.options.soap_version = SOAP_1_2
|
||||
webservices.interne.options.features = SOAP_USE_XSI_ARRAY_TYPE + SOAP_SINGLE_ELEMENT_ARRAYS
|
||||
|
||||
webservices.entreprise.wsdl = "http://wse.scores-decisions.com:8081/service?wsdl-auto"
|
||||
webservices.entreprise.options.trace = 1
|
||||
webservices.entreprise.options.soap_version = SOAP_1_2
|
||||
webservices.entreprise.options.features = SOAP_USE_XSI_ARRAY_TYPE + SOAP_SINGLE_ELEMENT_ARRAYS
|
||||
|
||||
webservices.oldentreprise.wsdl = null
|
||||
webservices.oldentreprise.location = "http://78.31.45.206/ws2/"
|
||||
webservices.oldentreprise.uri = "http://78.31.45.206/"
|
||||
webservices.oldentreprise.options.trace = 1
|
||||
webservices.oldentreprise.options.soap_version = SOAP_1_1
|
||||
webservices.oldentreprise.options.features =
|
||||
|
||||
[REC]
|
||||
webservices.interne.wsdl = "http://webservice.sd.lan/sinterne?wsdl"
|
||||
webservices.interne.options.trace = 1
|
||||
webservices.interne.options.soap_version = SOAP_1_2
|
||||
webservices.interne.options.features = SOAP_USE_XSI_ARRAY_TYPE + SOAP_SINGLE_ELEMENT_ARRAYS
|
||||
|
||||
webservices.entreprise.wsdl = "http://webservice.sd.lan/service?wsdl-auto"
|
||||
webservices.entreprise.options.trace = 1
|
||||
webservices.entreprise.options.soap_version = SOAP_1_2
|
||||
webservices.entreprise.options.features = SOAP_USE_XSI_ARRAY_TYPE + SOAP_SINGLE_ELEMENT_ARRAYS
|
||||
|
||||
webservices.oldentreprise.wsdl = null
|
||||
webservices.oldentreprise.location = "http://78.31.45.206/ws2/"
|
||||
webservices.oldentreprise.uri = "http://78.31.45.206/"
|
||||
webservices.oldentreprise.options.trace = 1
|
||||
webservices.oldentreprise.options.soap_version = SOAP_1_1
|
||||
webservices.oldentreprise.options.features =
|
||||
|
||||
[DEV]
|
||||
webservices.interne.wsdl = "http://webservice.sd.dev/sinterne?wsdl"
|
||||
webservices.interne.options.trace = 1
|
||||
webservices.interne.options.soap_version = SOAP_1_2
|
||||
webservices.interne.options.features = SOAP_USE_XSI_ARRAY_TYPE + SOAP_SINGLE_ELEMENT_ARRAYS
|
||||
|
||||
webservices.entreprise.wsdl = "http://webservice.sd.dev/service?wsdl-auto"
|
||||
webservices.entreprise.options.trace = 1
|
||||
webservices.entreprise.options.soap_version = SOAP_1_2
|
||||
webservices.entreprise.options.features = SOAP_USE_XSI_ARRAY_TYPE + SOAP_SINGLE_ELEMENT_ARRAYS
|
||||
|
||||
webservices.oldentreprise.wsdl = null
|
||||
webservices.oldentreprise.location = "http://78.31.45.206/ws2/"
|
||||
webservices.oldentreprise.uri = "http://78.31.45.206/"
|
||||
webservices.oldentreprise.options.trace = 1
|
||||
webservices.oldentreprise.options.soap_version = SOAP_1_1
|
||||
webservices.oldentreprise.options.features =
|
@ -1,224 +1,217 @@
|
||||
<?php
|
||||
// -------------------------------------------------------------------------- //
|
||||
// class Annonces
|
||||
// -------------------------------------------------------------------------- //
|
||||
function afficheListeAnnonces(&$annonces, $siret, $idEntreprise)
|
||||
{
|
||||
if (count($annonces) > 0) {
|
||||
$objAnnonces = new Annonces($annonces->item);
|
||||
$typeAnnonces =
|
||||
array('Bodacc' => 'EVÉNEMENTS LÉGAUX',
|
||||
'Balo' => 'BALO',
|
||||
'Bomp' => 'Marchés publics',
|
||||
'Asso' => 'Associations');
|
||||
|
||||
foreach ($typeAnnonces as $type => $titre) {
|
||||
$classType = 'annonces'.$type;
|
||||
if (count($objAnnonces->$classType) > 0) {
|
||||
print '<h2>'.$titre.'</h2>';
|
||||
print '<table>';
|
||||
foreach ($objAnnonces->$classType as $ann) {
|
||||
$resume = $objAnnonces->getAnnonceResume($ann);
|
||||
print '<tr>';
|
||||
print '<td width="30"> </td>';
|
||||
print '<td width="140" class="StyleInfoLib">';
|
||||
print '<span id="annoncesDate">Le '.$resume['date'].
|
||||
' </span>';
|
||||
print '<span id="annoncesImg">'.$resume['logo'].'</span>';
|
||||
print '</td>';
|
||||
print '<td width="450" colspan="2" class="StyleInfoData">';
|
||||
print '<a href="/?page=annonces&siret='.$siret.
|
||||
'&idEntreprise='.$idEntreprise.'&'.$resume['href'].'">';
|
||||
print $resume['lib'];
|
||||
print '</a>';
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
}
|
||||
print '</table>';
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// Aucune annonce bodacc pour cette entreprise
|
||||
print '<h2>Evénements légaux</h2>';
|
||||
print '<table>';
|
||||
print '<tr>';
|
||||
print '<td width="30"> </td>';
|
||||
print '<td width="100" class="StyleInfoLib"> </td>';
|
||||
print '<td width="450" colspan="2" class="StyleInfoData">'.
|
||||
'Néant</td>';
|
||||
print '</tr>';
|
||||
print '<tr>';
|
||||
print '<td colspan="4"> </td>';
|
||||
print '</tr>';
|
||||
print '</table>';
|
||||
}
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------- //
|
||||
// class Annonces
|
||||
// -------------------------------------------------------------------------- //
|
||||
class Annonces
|
||||
{
|
||||
public $annoncesBodacc = array();
|
||||
public $annoncesBalo = array();
|
||||
public $annoncesAsso = array();
|
||||
public $annoncesBomp = array();
|
||||
public $annoncesBodacc = array();
|
||||
public $annoncesBalo = array();
|
||||
public $annoncesAsso = array();
|
||||
public $annoncesBomp = array();
|
||||
|
||||
protected $annonces;
|
||||
protected $annonces;
|
||||
|
||||
public function __construct($annonces = array())
|
||||
{
|
||||
if (is_array($annonces) && count($annonces)>0){
|
||||
$this->annonces = $annonces;
|
||||
$this->triAnnonces();
|
||||
}
|
||||
}
|
||||
public function __construct($annonces = array())
|
||||
{
|
||||
if (is_array($annonces) && count($annonces) > 0) {
|
||||
$this->annonces = $annonces;
|
||||
$this->triAnnonces();
|
||||
}
|
||||
}
|
||||
|
||||
public function getAnnonceHead($ann)
|
||||
{
|
||||
if ($this->isBalo($ann['BodaccCode']))
|
||||
{
|
||||
public function getAnnonceResume($ann)
|
||||
{
|
||||
return
|
||||
array('date' => $this->dateAnnonce($ann->DateParution),
|
||||
'logo' => $this->logoAnnonce($ann),
|
||||
'href' => $this->hrefAnnonce($ann),
|
||||
'lib' => $this->libAnnonce($ann));
|
||||
}
|
||||
|
||||
protected function hrefAnnonce($ann)
|
||||
{
|
||||
$href = false;
|
||||
if ($this->isBodacc($ann->BodaccCode)){
|
||||
$href = 'idan='.$ann->id.'&vue=bodacc';
|
||||
} else if ($this->isBalo($ann->BodaccCode)) {
|
||||
$href = 'idan='.$ann->id.'&vue=balo';
|
||||
} else if ($this->isAsso($ann->BodaccCode)) {
|
||||
$href = 'idan='.$ann->id.'&vue=asso';
|
||||
} else if ($this->isBomp($ann->BodaccCode)) {
|
||||
$href = 'idan='.$ann->id.'&vue=bomp';
|
||||
} else {
|
||||
$href = 'idan='.$ann->id.'&vue=bodacc';
|
||||
}
|
||||
return $href;
|
||||
}
|
||||
|
||||
}
|
||||
elseif ($this->isAsso($ann['BodaccCode']))
|
||||
{
|
||||
protected function dateAnnonce($date)
|
||||
{
|
||||
$wdate = new WDate;
|
||||
return $wdate->dateT('Y-m-d', 'd/m/Y', $date);
|
||||
}
|
||||
|
||||
}
|
||||
elseif ($this->isBomp($ann['BodaccCode']))
|
||||
{
|
||||
|
||||
}
|
||||
elseif ($this->isBodacc($ann['BodaccCode']))
|
||||
{
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public function getAnnonceTexte($id)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public function getAnnonceResume($ann)
|
||||
{
|
||||
return array(
|
||||
'date' => $this->dateAnnonce($ann['DateParution']),
|
||||
'logo' => $this->logoAnnonce($ann),
|
||||
'href' => $this->hrefAnnonce($ann),
|
||||
'lib' => $this->libAnnonce($ann)
|
||||
);
|
||||
}
|
||||
|
||||
protected function hrefAnnonce($ann)
|
||||
{
|
||||
$href = false;
|
||||
if ($this->isBodacc($ann['BodaccCode'])){
|
||||
$href = 'idan='.$ann['id'].'&vue=bodacc';
|
||||
} elseif ($this->isBalo($ann['BodaccCode'])) {
|
||||
$href = 'idan='.$ann['id'].'&vue=balo';
|
||||
} elseif ($this->isAsso($ann['BodaccCode'])) {
|
||||
$href = 'idan='.$ann['id'].'&vue=asso';
|
||||
} elseif ($this->isBomp($ann['BodaccCode'])){
|
||||
$href = 'idan='.$ann['id'].'&vue=bomp';
|
||||
} else {
|
||||
$href = 'idan='.$ann['id'].'&vue=bodacc';
|
||||
}
|
||||
return $href;
|
||||
}
|
||||
|
||||
protected function dateAnnonce($date)
|
||||
{
|
||||
return WDate::dateT('Y-m-d', 'd/m/Y', $date);
|
||||
}
|
||||
|
||||
protected function logoAnnonce($ann)
|
||||
{
|
||||
$src = '';
|
||||
$title = '';
|
||||
if ($this->isBalo($ann['BodaccCode']))
|
||||
{
|
||||
$src = './img/logo_jo.png';
|
||||
$title = 'Source BALO n°'.$ann['BodaccNum'];
|
||||
}
|
||||
elseif ($this->isAsso($ann['BodaccCode']))
|
||||
{
|
||||
$src = './img/logo_jo.png';
|
||||
$title = 'Source JO ASSOCIATION n°'.$ann['BodaccNum'];
|
||||
}
|
||||
elseif ($this->isBomp($ann['BodaccCode']))
|
||||
{
|
||||
$src = './img/logo_jo.png';
|
||||
if ($ann['BodaccCode'] == 'MAPA' ){
|
||||
$title = 'Source '.$ann['BodaccCode'] . ' ' .
|
||||
($ann['BodaccNum']*1);
|
||||
}else {
|
||||
|
||||
$title = 'Source '.$ann['BodaccCode'] . ' ' .
|
||||
'n°' . ($ann['BodaccNum']*1) . ' de ' .
|
||||
substr($ann['DateParution'],0,4);
|
||||
protected function logoAnnonce($ann)
|
||||
{
|
||||
$src = '';
|
||||
$title = '';
|
||||
if ($this->isBalo($ann->BodaccCode)) {
|
||||
$src = './img/logo_jo.png';
|
||||
$title = 'Source BALO n°'.$ann->BodaccNum;
|
||||
} else if ($this->isAsso($ann->BodaccCode)) {
|
||||
$src = './img/logo_jo.png';
|
||||
$title = 'Source JO ASSOCIATION n°'.$ann['BodaccNum'];
|
||||
} else if ($this->isBomp($ann->BodaccCode)) {
|
||||
$src = './img/logo_jo.png';
|
||||
if ($ann->BodaccCode == 'MAPA') {
|
||||
$title = 'Source '.$ann->BodaccCode.' '.
|
||||
intval($ann->BodaccNum);
|
||||
} else {
|
||||
$title = 'Source '.$ann->BodaccCode.' '.
|
||||
'n°'.intval($ann->BodaccNum).' de '.
|
||||
substr($ann->DateParution, 0, 4);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$tabSource = explode('-', $ann['BodaccCode']);
|
||||
$source = $tabSource[0];
|
||||
$idSource = $tabSource[1];
|
||||
if ($source[0] == 'B')
|
||||
{
|
||||
$src = './img/logo_jo.png';
|
||||
$title = 'Source BODACC ' . $ann['BodaccNum'] . ' ' .
|
||||
substr($source,-1) . ' ' .
|
||||
'de ' . substr($ann['DateParution'],0,4);
|
||||
}
|
||||
else if ($source[0] == 'G' || $source[0] == 'T')
|
||||
{
|
||||
$src = './img/logo_greffe.png';
|
||||
$title = 'Source Collecte Greffe';
|
||||
}
|
||||
else if ($source[0] == 'P')
|
||||
{
|
||||
} else {
|
||||
$tabSource = explode('-', $ann->BodaccCode);
|
||||
$source = $tabSource[0];
|
||||
if ($source[0] == 'B') {
|
||||
$src = './img/logo_jo.png';
|
||||
$title = 'Source BODACC '.$ann->BodaccNum.' '.
|
||||
substr($source, -1).' de ' .
|
||||
substr($ann->DateParution, 0, 4);
|
||||
} else if ($source[0] == 'G' || $source[0] == 'T') {
|
||||
$src = './img/logo_greffe.png';
|
||||
$title = 'Source Collecte Greffe';
|
||||
} else if ($source[0] == 'P') {
|
||||
$src = './img/logo_inpi.png';
|
||||
$title = 'Source Collecte RNCS';
|
||||
} else {
|
||||
$src = './img/logo_jal.png';
|
||||
$title = 'Source Collecte JAL';
|
||||
if (isset($tabSource[1]) && $tabSource[1] > 0) {
|
||||
$title .= ' '.$tabSource[1];
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$src = './img/logo_jal.png';
|
||||
$title = 'Source Collecte JAL';
|
||||
if ($idSource>0) $title.= ' '.$idSource;
|
||||
}
|
||||
if ($src != '') {
|
||||
return '<img src="'.$src.'" title="'.$title.'">';
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
protected function libAnnonce($ann)
|
||||
{
|
||||
$wdate = new WDate;
|
||||
$lib = '';
|
||||
foreach ($ann->evenements->item as $even) {
|
||||
$lib .= $even->LibEven;
|
||||
$tabSource = explode('-', $ann->BodaccCode);
|
||||
$source = $tabSource[0];
|
||||
$numEven = intval($even->CodeEven);
|
||||
if ($numEven > 3000 && $numEven < 3999) {
|
||||
if (isset($ann->dateEffet)) {
|
||||
$lib .= ' (clôture au '.
|
||||
$wdate->dateT('Y-m-d','d/m/Y', $ann->dateEffet).')';
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($src != '') {
|
||||
return '<img src="'.$src.'" title="'.$title.'">';
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if (hasModeEdition() && substr($source, 0, 2) == 'JT') {
|
||||
$lib .= ' - <b>(Source TESSI)</b>';
|
||||
}
|
||||
$lib .= '<br/>';
|
||||
}
|
||||
return $lib;
|
||||
}
|
||||
|
||||
protected function libAnnonce($ann)
|
||||
{
|
||||
$lib = '';
|
||||
foreach ($ann['evenements'] as $i=>$even) {
|
||||
$lib.= $even['LibEven'];
|
||||
$tabSource = explode('-', $ann['BodaccCode']);
|
||||
$source = $tabSource[0];
|
||||
$idSource = $tabSource[1];
|
||||
$numEven = $even['CodeEven']*1;
|
||||
if ($numEven>3000 && $numEven<3999) {
|
||||
if (isset($ann['dateEffet'])){
|
||||
$lib.= ' (clôture au '.WDate::dateT('Y-m-d','d/m/Y',$ann['dateEffet']).')';
|
||||
}
|
||||
}
|
||||
if (hasModeEdition() &&
|
||||
(substr($source,0,2)=='JT' || $source=='ANTE')) {
|
||||
$lib.= ' - <b>(Source TESSI)</b>';
|
||||
}
|
||||
$lib.= '<br/>';
|
||||
}
|
||||
return $lib;
|
||||
}
|
||||
protected function triAnnonces()
|
||||
{
|
||||
foreach ($this->annonces as $ann) {
|
||||
if ($this->isBodacc($ann->BodaccCode)){
|
||||
$this->annoncesBodacc[] = $ann;
|
||||
} elseif ($this->isBalo($ann->BodaccCode)) {
|
||||
$this->annoncesBalo[] = $ann;
|
||||
} elseif ($this->isAsso($ann->BodaccCode)) {
|
||||
$this->annoncesAsso[] = $ann;
|
||||
} elseif ($this->isBomp($ann->BodaccCode)) {
|
||||
$this->annoncesBomp[] = $ann;
|
||||
} else {
|
||||
$this->annoncesBodacc[] = $ann;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected function triAnnonces()
|
||||
{
|
||||
foreach ($this->annonces as $i => $ann)
|
||||
{
|
||||
if ($this->isBodacc($ann['BodaccCode'])){
|
||||
$this->annoncesBodacc[] = $ann;
|
||||
} elseif ($this->isBalo($ann['BodaccCode'])) {
|
||||
$this->annoncesBalo[] = $ann;
|
||||
} elseif ($this->isAsso($ann['BodaccCode'])) {
|
||||
$this->annoncesAsso[] = $ann;
|
||||
} elseif ($this->isBomp($ann['BodaccCode'])){
|
||||
$this->annoncesBomp[] = $ann;
|
||||
} else {
|
||||
$this->annoncesBodacc[] = $ann;
|
||||
}
|
||||
}
|
||||
}
|
||||
protected function isBodacc($code)
|
||||
{
|
||||
return in_array($code, array('BODA', 'BODB', 'BODC'));
|
||||
}
|
||||
|
||||
protected function isBodacc($code)
|
||||
{
|
||||
if (in_array($code, array('BODA', 'BODB', 'BODC'))){
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
protected function isBalo($code)
|
||||
{
|
||||
return ($code == 'BALO');
|
||||
}
|
||||
|
||||
protected function isBalo($code)
|
||||
{
|
||||
if ($code == 'BALO'){
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
protected function isAsso($code)
|
||||
{
|
||||
return ($code == 'ASSO');
|
||||
}
|
||||
|
||||
protected function isAsso($code)
|
||||
{
|
||||
if ($code == 'ASSO'){
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
protected function isBomp($code)
|
||||
{
|
||||
if (in_array($code, array('BOMP A', 'BOMP B', 'BOMP C', 'MAPA'))){
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
protected function isBomp($code)
|
||||
{
|
||||
return in_array($code, array('BOMP A', 'BOMP B', 'BOMP C', 'MAPA'));
|
||||
}
|
||||
}
|
||||
|
@ -6,9 +6,9 @@ define('BDF_FILETIME', 8);
|
||||
|
||||
require_once 'common/curl.php';
|
||||
|
||||
// --------------------------------------------------------------------------- //
|
||||
// -------------------------------------------------------------------------- //
|
||||
// enleveLiens
|
||||
// --------------------------------------------------------------------------- //
|
||||
// -------------------------------------------------------------------------- //
|
||||
function enleveLiens($contenu, $discriminant)
|
||||
{
|
||||
$pos1 = 0;
|
||||
|
260
includes/cache/cache.php
vendored
260
includes/cache/cache.php
vendored
@ -9,14 +9,14 @@
|
||||
/*
|
||||
Dans une page, on définit des blocs
|
||||
Pour chaque bloc enregistrement d'un fichier (nom de la page avec paramètres)
|
||||
Nom du bloc = tableau sérialisé des variables
|
||||
...
|
||||
Nom du bloc = tableau sérialisé des variables
|
||||
...
|
||||
|
||||
Dans le tableau sérialisé
|
||||
Nom de la valeur utile => valeur
|
||||
...
|
||||
Nom de la valeur utile => valeur
|
||||
...
|
||||
|
||||
Suppression des valeurs inutiles
|
||||
Suppression des valeurs inutiles
|
||||
|
||||
*/
|
||||
|
||||
@ -26,156 +26,220 @@ define('CACHE_EXT','.tpl');
|
||||
|
||||
/**
|
||||
* Retourne le chemin du fichier avec son extension
|
||||
* Si en argument une chaine de caractère est envoyé alors on définit que c'est le nom du fichier
|
||||
* Si en argument une chaine de caractère est envoyé
|
||||
* alors on définit que c'est le nom du fichier
|
||||
* Sinon le nom du fichier est enregistré en mémoire pour chaque appel
|
||||
* @return string
|
||||
*/
|
||||
function cache_filename()
|
||||
{
|
||||
static $filename;
|
||||
$numargs = func_num_args();
|
||||
if($numargs != 0){
|
||||
//unset($filename);
|
||||
//static $filename;
|
||||
$args = func_get_args();
|
||||
static $filename;
|
||||
$numargs = func_num_args();
|
||||
if ($numargs != 0) {
|
||||
//unset($filename);
|
||||
//static $filename;
|
||||
$args = func_get_args();
|
||||
$filename = PATH_SITE.'/cache/pages/'.$args[0].CACHE_EXT;
|
||||
}
|
||||
return $filename;
|
||||
}
|
||||
return $filename;
|
||||
}
|
||||
|
||||
/**
|
||||
* Enregistre les données d'un bloc dans le cache
|
||||
* @param string $block
|
||||
* Le nom du bloc
|
||||
* Le nom du bloc
|
||||
* @param array $array
|
||||
* Le tableau de données (clé => valeur) à stocker sous forme sérialisé
|
||||
* Le tableau de données (clé => valeur) à stocker sous forme sérialisé
|
||||
* @return boolean
|
||||
*/
|
||||
function cache_add($block, $array){
|
||||
//Traitement
|
||||
$array = cache_htmlencode($array);
|
||||
//Ajout des blocs sérialisés
|
||||
$file = cache_filename();
|
||||
if($file != ''){
|
||||
$data = $block.' = '.serialize($array);
|
||||
if( cache_writefile($file,$data) !== FALSE ) return TRUE;
|
||||
else return FALSE;
|
||||
}else return FALSE;
|
||||
function cache_add($block, $array)
|
||||
{
|
||||
// Traitement
|
||||
$array = cache_htmlencode($array);
|
||||
// Ajout des blocs sérialisés
|
||||
$file = cache_filename();
|
||||
if ($file != '') {
|
||||
$data = $block.' = '.serialize($array);
|
||||
if (cache_writefile($file,$data) !== false) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Récupére les variables en cache depuis le fichier.
|
||||
* @return array ou FALSE
|
||||
* @return array ou false
|
||||
*/
|
||||
function cache_get($block){
|
||||
global $firephp;
|
||||
$file = cache_filename();
|
||||
$cache = cache_readfile($file);
|
||||
if(isset($cache[$block])){
|
||||
//Traitement
|
||||
$block = unserialize($cache[$block]);
|
||||
$block = cache_htmldecode($block);
|
||||
return $block;
|
||||
}else return FALSE;
|
||||
function cache_get($block)
|
||||
{
|
||||
global $firephp;
|
||||
$file = cache_filename();
|
||||
$cache = cache_readfile($file);
|
||||
if (isset($cache[$block])) {
|
||||
// Traitement
|
||||
$block = unserialize($cache[$block]);
|
||||
$block = cache_htmldecode($block);
|
||||
return $block;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Suppression du cache pour la page en cours.
|
||||
* @return boolean
|
||||
*/
|
||||
function cache_delete(){
|
||||
$file = cache_filename();
|
||||
if(file_exists($file)) return unlink($file);
|
||||
else return FALSE;
|
||||
function cache_delete()
|
||||
{
|
||||
$file = cache_filename();
|
||||
if (file_exists($file)) {
|
||||
return unlink($file);
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Vérifie que le fichier est disponible dans le cache
|
||||
* @param $file
|
||||
* Chemin vers le fichier que l'on veut vérifier
|
||||
* Chemin vers le fichier que l'on veut vérifier
|
||||
* @return boolean
|
||||
* Retourne TRUE ou FALSE
|
||||
* Retourne true ou false
|
||||
*/
|
||||
function cache_exist(){
|
||||
$file = cache_filename();
|
||||
if( file_exists($file) && !cache_timeover($file) ) return TRUE;
|
||||
else return FALSE;
|
||||
function cache_exist()
|
||||
{
|
||||
$file = cache_filename();
|
||||
if (file_exists($file) && !cache_timeover($file)) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Vérifie si la date de création du fichier de cache est toujours valide
|
||||
* @param $file
|
||||
* Chemin vers le fichier que l'on veut vérifier
|
||||
* Chemin vers le fichier que l'on veut vérifier
|
||||
* @return boolean
|
||||
* Retourne TRUE or FALSE
|
||||
* Retourne true or false
|
||||
*/
|
||||
function cache_timeover($file){
|
||||
$dateFile = filemtime($file);
|
||||
$now = mktime(date('G'), date('i'), date('s'), date("m") , date("d"), date("Y"));
|
||||
$maxTime = mktime(date('G',$dateFile)+CACHE_MAXTIME, date('i',$dateFile), date('s',$dateFile), date("m",$dateFile), date("d",$dateFile), date("Y",$dateFile));
|
||||
$refreshHour = mktime(CACHE_REFRESH_HOUR, 0, 0, date("m"), date("d"), date("Y"));
|
||||
if( ($now>$maxTime) || ($dateFile<$refreshHour && $now>$refreshHour) ) return TRUE;
|
||||
else return FALSE;
|
||||
function cache_timeover($file)
|
||||
{
|
||||
$dateFile = filemtime($file);
|
||||
$now = mktime(date('G'), date('i'), date('s'),
|
||||
date("m"), date("d"), date("Y"));
|
||||
$maxTime = mktime(date('G', $dateFile) + CACHE_MAXTIME,
|
||||
date('i', $dateFile), date('s', $dateFile),
|
||||
date("m", $dateFile), date("d", $dateFile),
|
||||
date("Y", $dateFile));
|
||||
$refreshHour = mktime(CACHE_REFRESH_HOUR, 0, 0,
|
||||
date("m"), date("d"), date("Y"));
|
||||
if (($now > $maxTime) ||
|
||||
($dateFile < $refreshHour && $now > $refreshHour)) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Ecrit une ligne dans un fichier
|
||||
* @param $file
|
||||
* Le chemin du ficher à écrire
|
||||
* Le chemin du ficher à écrire
|
||||
* @param $line
|
||||
* Une chaîne de caractère
|
||||
* Une chaîne de caractère
|
||||
* @return boolean ou le nombre d'octet écrit
|
||||
*/
|
||||
function cache_writefile($file, $line){
|
||||
$fp = fopen($file,'a');
|
||||
$result = fwrite($fp,$line."\n");
|
||||
fclose($fp);
|
||||
return $result;
|
||||
function cache_writefile($file, $line)
|
||||
{
|
||||
$fp = fopen($file, 'a');
|
||||
$result = fwrite($fp, $line."\n");
|
||||
fclose($fp);
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Lit le fichier de cache ligne par ligne
|
||||
* @param $file
|
||||
* Chemin du fichier à lire
|
||||
* Chemin du fichier à lire
|
||||
* @return array
|
||||
* Retourne un tableau de valeur ou FALSE si le fichier n'a pu être trouvé
|
||||
* Retourne un tableau de valeur ou false si le fichier n'a pu être trouvé
|
||||
*/
|
||||
function cache_readfile($file){
|
||||
global $firephp;
|
||||
static $cache_loaded = FALSE;
|
||||
static $file_loaded;
|
||||
static $cache = array();
|
||||
if ( ($file!=$file_loaded) ) {
|
||||
$file_loaded = $file;
|
||||
if (is_file($file)) {
|
||||
$lines = file($file);
|
||||
foreach ($lines as $line_num => $line) {
|
||||
list($key, $value) = explode(' = ', $line, 2);
|
||||
$cache[$key] = $value;
|
||||
}
|
||||
}
|
||||
$cache_loaded = TRUE;
|
||||
}
|
||||
return $cache;
|
||||
function cache_readfile($file)
|
||||
{
|
||||
global $firephp;
|
||||
static $cache_loaded = false;
|
||||
static $file_loaded;
|
||||
static $cache = array();
|
||||
if ($file != $file_loaded) {
|
||||
$file_loaded = $file;
|
||||
if (is_file($file)) {
|
||||
$lines = file($file);
|
||||
foreach ($lines as $line_num => $line) {
|
||||
list($key, $value) = explode(' = ', $line, 2);
|
||||
$cache[$key] = $value;
|
||||
}
|
||||
}
|
||||
$cache_loaded = true;
|
||||
}
|
||||
return $cache;
|
||||
}
|
||||
|
||||
function cache_graph($filename){
|
||||
if( hasModeEdition() ){
|
||||
return false;
|
||||
} elseif ( file_exists($filename) && !cache_timeover($filename) ) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
// -------------------------------------------------------------------------- //
|
||||
// cache_graph
|
||||
// -------------------------------------------------------------------------- //
|
||||
function cache_graph($filename)
|
||||
{
|
||||
if (hasModeEdition()) {
|
||||
return false;
|
||||
} else if (file_exists($filename) && !cache_timeover($filename)) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
function cache_htmldecode($value){
|
||||
$value = is_array($value) ? array_map('cache_htmldecode', $value) : base64_decode($value);
|
||||
return $value;
|
||||
// -------------------------------------------------------------------------- //
|
||||
// cache_htmldecode
|
||||
// -------------------------------------------------------------------------- //
|
||||
function cache_htmldecode($val)
|
||||
{
|
||||
if (is_object($val) == true) {
|
||||
$ret = new StdClass;
|
||||
foreach ($val as $i => $v) {
|
||||
$ret->$i = cache_htmldecode($v);
|
||||
}
|
||||
return $ret;
|
||||
} else if (is_array($val) == true) {
|
||||
$ret = array();
|
||||
foreach ($val as $i => $v) {
|
||||
$ret[$i] = cache_htmldecode($v);
|
||||
}
|
||||
return $ret;
|
||||
} else {
|
||||
return base64_decode($val);
|
||||
}
|
||||
}
|
||||
|
||||
function cache_htmlencode($value){
|
||||
$value = is_array($value) ? array_map('cache_htmlencode', $value) : base64_encode($value);
|
||||
return $value;
|
||||
// -------------------------------------------------------------------------- //
|
||||
// cache_htmlencode
|
||||
// -------------------------------------------------------------------------- //
|
||||
function cache_htmlencode($val)
|
||||
{
|
||||
if (is_object($val) == true) {
|
||||
$ret = new StdClass;
|
||||
foreach ($val as $i => $v) {
|
||||
$ret->$i = cache_htmlencode($v);
|
||||
}
|
||||
return $ret;
|
||||
} else if (is_array($val) == true) {
|
||||
$ret = array();
|
||||
foreach ($val as $i => $v) {
|
||||
$ret[$i] = cache_htmlencode($v);
|
||||
}
|
||||
return $ret;
|
||||
} else {
|
||||
return base64_encode($val);
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
?>
|
||||
|
508
includes/client/client.php
Normal file
508
includes/client/client.php
Normal file
@ -0,0 +1,508 @@
|
||||
<?php
|
||||
$idClient = (isset($_REQUEST['idclient'])) ? $_REQUEST['idclient'] : 0 ;
|
||||
$titre = 'CREATION NOUVEAU CLIENT';
|
||||
$submitValue = 'Créer le client';
|
||||
if ($idClient!=0){
|
||||
$ws = new WsScores();
|
||||
$reponse = $ws->getListeClients($idClient);
|
||||
$InfosClient = $reponse->result->item;
|
||||
FB::log($InfosClient,'InfosClient');
|
||||
$titre = 'EDITION CLIENT';
|
||||
$submitValue = 'Modifier le client';
|
||||
}
|
||||
$reponse = $ws->getListeDroits();
|
||||
$wsdroits = $reponse->item;
|
||||
?>
|
||||
<style type="text/css">
|
||||
.close {display:none;}
|
||||
.open {display:block;}
|
||||
.fieldgrp{clear:both; width:100%; margin-bottom:.5em; overflow:hidden;}
|
||||
.fieldgrp:after{content:"."; display:block; clear:both; visibility:hidden; line-height:0; height:0; }
|
||||
.fieldgrp label{font-weight:bold; margin-left:30px; width:180px; clear:both; padding:0 10px 0 0;line-height:22px;_padding-top:3px; float:left; display:block; font-size:108%;}
|
||||
.field {width:320px; float:left; padding:0 10px 0 0; line-height:22px; _padding-top:3px;}
|
||||
.field .longfield{width:215px;}
|
||||
.field .longfield-select{width:220px;}
|
||||
.field .smallfield{width:95px;}
|
||||
.field .medfield{width:110px;}
|
||||
.field input, .field select{ font-size:110%; margin:2px 0; }
|
||||
.field input[type="radio"] { margin:0 5px 0 5px; }
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
var droits = new Array();
|
||||
droits = {<?php
|
||||
foreach($wsdroits as $droit){
|
||||
echo '"'.$droit->code.'": "'.$droit->desc.'", ';
|
||||
}
|
||||
?>}
|
||||
|
||||
$(document).ready(function(){
|
||||
|
||||
$('.menu-close').click(function(){
|
||||
$('div.blockh2').css('display','none');
|
||||
$(this).next('div.blockh2').css('display','block');
|
||||
});
|
||||
|
||||
$('a#addIp').click(function(e){
|
||||
e.preventDefault();
|
||||
var text = $('div.formip').html();
|
||||
var title = $(this).html();
|
||||
var dialogOpts = {
|
||||
bgiframe: true,
|
||||
title: title,
|
||||
width: 250,
|
||||
height: 120,
|
||||
modal: true,
|
||||
open: function(event, ui) { $(this).html(text); },
|
||||
buttons: {
|
||||
'Ajouter' : function() {
|
||||
var select = $('#formip input[name=ip0]').val()+'.'+
|
||||
$('#formip input[name=ip1]').val()+'.'+
|
||||
$('#formip input[name=ip2]').val()+'.'+
|
||||
$('#formip input[name=ip3]').val();
|
||||
var txt = $('input[name=filtres_ip]').val();
|
||||
console.log(txt);
|
||||
(txt.length>0) ? txt = txt+';'+select : txt = select;
|
||||
var concat = '';
|
||||
var liste = txt.split(';');
|
||||
for (item in liste){
|
||||
concat = concat+liste[item]+' <a href="#" class="deleteIP" id="'+liste[item]+'">Supp</a><br/>';
|
||||
}
|
||||
console.log(txt);
|
||||
$('input[name=filtres_ip]').val(txt);
|
||||
$('#listeip').html(concat);
|
||||
$(this).dialog('close');
|
||||
},
|
||||
'Fermer': function() { $(this).dialog('close'); }
|
||||
},
|
||||
close: function() { $('div#formip').remove(); }
|
||||
};
|
||||
$('<div id="formip"></div>').dialog(dialogOpts);
|
||||
return false;
|
||||
});
|
||||
|
||||
|
||||
$('select[name=selectdroit]').change(function(){
|
||||
console.log('Selection');
|
||||
var select = $(this).val();
|
||||
if (select!=''){
|
||||
var txt = $('input[name=droits]').val();
|
||||
(txt.length>0) ? txt = txt+' '+select : txt = select;
|
||||
var concat = '';
|
||||
var liste = txt.split(' ');
|
||||
console.log('Affichage');
|
||||
for (item in liste){
|
||||
concat = concat+droits[liste[item]]+' <a href="#" class="deleteDroit" id="'+liste[item]+'">Supp</a><br/>';
|
||||
}
|
||||
$('input[name=droits]').val(txt);
|
||||
$('#listedroits').html(concat);
|
||||
}
|
||||
});
|
||||
|
||||
$('a.deleteDroit').live('click', function(){
|
||||
console.log('Suppression');
|
||||
var select = $(this).attr('id');
|
||||
var txt = '';
|
||||
var concat = '';
|
||||
var liste = $('input[name=droits]').val().split(' ');
|
||||
console.log(liste);
|
||||
for (item in liste){
|
||||
if (liste[item]!=select){
|
||||
(txt.length>0) ? txt = txt+' '+liste[item] : txt = liste[item];
|
||||
concat = concat+droits[liste[item]]+' <a href="#" class="deleteDroit" id="'+liste[item]+'">Supp</a><br/>';
|
||||
}
|
||||
}
|
||||
$('input[name=droits]').val(txt);
|
||||
$('#listedroits').html(concat);
|
||||
});
|
||||
|
||||
$('.deleteIP').live('click', function(){
|
||||
var select = $(this).attr('id');
|
||||
var txt = '';
|
||||
var concat = '';
|
||||
var liste = $('input[name=filtres_ip]').val().split(';');
|
||||
for (item in liste){
|
||||
if (liste[item]!=select){
|
||||
(txt.length>0) ? txt = txt+';'+liste[item] : txt = liste[item];
|
||||
concat = concat+liste[item]+' <a href="#" class="deleteIP" id="'+liste[item]+'">Supp</a><br/>';
|
||||
}
|
||||
}
|
||||
$('input[name=filtres_ip]').val(txt);
|
||||
$('#listeip').html(concat);
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
<div id="center">
|
||||
<h1><?php echo $titre?></h1>
|
||||
<?php
|
||||
if (isset($_REQUEST['submit'])){
|
||||
$Infos = $_REQUEST;
|
||||
|
||||
echo "<pre>";
|
||||
print_r($Infos);
|
||||
echo "</pre>";
|
||||
|
||||
/*
|
||||
$ws = new WsScores();
|
||||
$reponse = $ws->setClient($Infos);
|
||||
echo "<pre>";
|
||||
print_r($reponse);
|
||||
echo "</pre>";
|
||||
*/
|
||||
} else {
|
||||
?>
|
||||
<div class="formip" style="display:none;">
|
||||
<input type="text" maxlength="3" size="3" name="ip0" /> .
|
||||
<input type="text" maxlength="3" size="3" name="ip1" /> .
|
||||
<input type="text" maxlength="3" size="3" name="ip2" /> .
|
||||
<input type="text" maxlength="3" size="3" name="ip3" />
|
||||
</div>
|
||||
|
||||
<form name="client" method="post" action="./?page=administration_client">
|
||||
<input type="hidden" name="action" value="client" />
|
||||
<input type="hidden" name="idClient" value="<?php echo $idClient?>" />
|
||||
|
||||
<h2 class="menu-close">Identification</h2>
|
||||
|
||||
<div class="blockh2 close">
|
||||
<div class="fieldgrp">
|
||||
<label>Nom</label>
|
||||
<div class="field"><input name="nom" type="text" value="<?php echo isset($InfosClient) ? $InfosClient->nom : '';?>" /></div>
|
||||
</div>
|
||||
<div class="fieldgrp">
|
||||
<label>Siren</label>
|
||||
<div class="field"><input name="siren" type="text" value="<?php echo isset($InfosClient) ? $InfosClient->siren : '';?>" />
|
||||
<a href="#">Obtention Raison sociale</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="fieldgrp">
|
||||
<label>Nic du siège</label>
|
||||
<div class="field"><input name="nic" type="text" value="<?php echo isset($InfosClient) ? $InfosClient->nic : '';?>" /></div>
|
||||
</div>
|
||||
<div class="fieldgrp">
|
||||
<label>Racine des identifiants</label>
|
||||
<div class="field">
|
||||
<input name="racineLogin" type="text" value="<?php echo isset($InfosClient) ? $InfosClient->racineLogin: '';?>" /></div>
|
||||
</div>
|
||||
<div class="fieldgrp">
|
||||
<label>Test</label>
|
||||
<div class="field">
|
||||
<select name="test">
|
||||
<option value="Oui" <?php if ($InfosClient->test=='Oui') echo 'selected';?>>Oui</option>
|
||||
<option value="Non" <?php if ($InfosClient->test=='Non') echo 'selected';?>>Non</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="fieldgrp">
|
||||
<label>Actif</label>
|
||||
<div class="field">
|
||||
<select name="actif">
|
||||
<option value="Oui" <?php if ($InfosClient->actif=='Oui') echo 'selected';?>>Oui</option>
|
||||
<option value="Non" <?php if ($InfosClient->actif=='Non') echo 'selected';?>>Non</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="fieldgrp">
|
||||
<label>Date de signature</label>
|
||||
<div class="field">
|
||||
<input name="dateSignature" type="text" value="<?php echo isset($InfosClient) ? $InfosClient->dateSignature : '';?>" /> (AAAA-MM-YY)
|
||||
</div>
|
||||
</div>
|
||||
<div class="fieldgrp">
|
||||
<label>Type de contrat</label>
|
||||
<div class="field">
|
||||
<select name="typeContrat">
|
||||
<option value="Contrat" <?php if ($InfosClient->typeContrat=='Contrat') echo 'selected';?>>Contrat</option>
|
||||
<option value="Marché" <?php if ($InfosClient->typeContrat=='Marché') echo 'selected';?>>Marché</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="fieldgrp">
|
||||
<label>Commercial S&D</label>
|
||||
<div class="field"><input name="respComSD" type="text" value="<?php echo isset($InfosClient) ? $InfosClient->respComSD : '';?>" disabled/></div>
|
||||
</div>
|
||||
<div class="fieldgrp">
|
||||
<label>Nom de l'apporteur d'affaire</label>
|
||||
<div class="field"><input name="apporteurAffaire" type="text" value="<?php echo isset($InfosClient) ? $InfosClient->apporteurAffaire: '';?>" /></div>
|
||||
</div>
|
||||
<div class="fieldgrp">
|
||||
<label>Type d'accès</label>
|
||||
<div class="field">
|
||||
<select name="typeAcces">
|
||||
<option value="userPassword" <?php if ($InfosClient->typeAcces=='userPassword') echo 'selected';?>>userPassword</option>
|
||||
<option value="userPasswordIP" <?php if ($InfosClient->typeAcces=='userPasswordIP') echo 'selected';?>>userPasswordIP</option>
|
||||
<option value="IP" <?php if ($InfosClient->typeAcces=='IP') echo 'selected';?>>IP</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>Remarques / Observations</label>
|
||||
<div class="field"><textarea name="remarque"><?php echo isset($InfosClient) ? $InfosClient->remarque : '';?></textarea></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h2 class="menu-close">Facturation</h2>
|
||||
|
||||
<div class="blockh2 close">
|
||||
<div class="fieldgrp">
|
||||
<label>N° de TVA</label>
|
||||
<div class="field"><input name="tva" type="text" value="<?php echo isset($InfosClient) ? $InfosClient->tva : '';?>" /></div>
|
||||
</div>
|
||||
<div class="fieldgrp">
|
||||
<label>Compte client rattaché</label>
|
||||
<div class="field"><input name="xxxx" type="text" value="" /></div>
|
||||
</div>
|
||||
<div class="fieldgrp">
|
||||
<label>Editer la facture automatiquement</label>
|
||||
<div class="field">
|
||||
<select name="editerFacture">
|
||||
<option value="Oui" <?php if ($InfosClient->editerFacture=='Oui') echo 'selected';?>>Oui</option>
|
||||
<option value="Non" <?php if ($InfosClient->editerFacture=='Non') echo 'selected';?>>Non</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="fieldgrp">
|
||||
<label>Editer le détail de la facture</label>
|
||||
<div class="field">
|
||||
<select name="fact_detail">
|
||||
<option value="Oui" <?php if ($InfosClient->editerFacture=='Oui') echo 'selected';?>>Oui</option>
|
||||
<option value="Non" <?php if ($InfosClient->fact_detail=='Non') echo 'selected';?>>Non</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="fieldgrp">
|
||||
<label>Nom du destinataire de la facture</label>
|
||||
<div class="field"><input name="fac_dest" type="text" value="<?php echo isset($InfosClient) ? $InfosClient->fac_dest : '';?>" /></div>
|
||||
</div>
|
||||
<div class="fieldgrp">
|
||||
<label>Adresse1</label>
|
||||
<div class="field"><input name="fac_adr1" type="text" value="<?php echo isset($InfosClient) ? $InfosClient->fac_adr1 : '';?>" /></div>
|
||||
</div>
|
||||
<div class="fieldgrp">
|
||||
<label>Adresse2</label>
|
||||
<div class="field"><input name="fac_adr2" type="text" value="<?php echo isset($InfosClient) ? $InfosClient->fac_adr2 : '';?>" /></div>
|
||||
</div>
|
||||
<div class="fieldgrp">
|
||||
<label>Adresse3</label>
|
||||
<div class="field"><input name="fac_adr3" type="text" value="<?php echo isset($InfosClient) ? $InfosClient->fac_adr3 : '';?>" /></div>
|
||||
</div>
|
||||
<div class="fieldgrp">
|
||||
<label>Email</label>
|
||||
<div class="field"><input name="fac_email" type="text" value="<?php echo isset($InfosClient) ? $InfosClient->fac_email : '';?>" /></div>
|
||||
</div>
|
||||
<div class="fieldgrp">
|
||||
<label>Téléphone</label>
|
||||
<div class="field"><input name="fac_tel" type="text" value="<?php echo isset($InfosClient) ? $InfosClient->fac_tel : '';?>" /></div>
|
||||
</div>
|
||||
<div class="fieldgrp">
|
||||
<label>RIB joint à la facture</label>
|
||||
<div class="field">
|
||||
<select name="fact_rib">
|
||||
<option value="BPOSTALE" <?php if ($InfosClient->fact_rib=='BPOSTALE') echo 'selected';?>>BPOSTALE</option>
|
||||
<option value="CCOOP" <?php if ($InfosClient->fact_rib=='CCOOP') echo 'selected';?>>CCOOP</option>
|
||||
<option value="CDNORD" <?php if ($InfosClient->fact_rib=='CDNORD') echo 'selected';?>>CDNORD</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h2 class="menu-close">Livraison : Informations sur le destinatire de la livraison</h2>
|
||||
<div class="blockh2 close">
|
||||
<div class="fieldgrp">
|
||||
<label>Nom</label>
|
||||
<div class="field"><input name="liv_dest" type="text" value="<?php echo isset($InfosClient) ? $InfosClient->liv_dest : '';?>" /></div>
|
||||
</div>
|
||||
<div class="fieldgrp">
|
||||
<label>Adresse1</label>
|
||||
<div class="field"><input name="liv_adr1" type="text" value="<?php echo isset($InfosClient) ? $InfosClient->liv_adr1 : '';?>" /></div>
|
||||
</div>
|
||||
<div class="fieldgrp">
|
||||
<label>Adresse2</label>
|
||||
<div class="field"><input name="liv_adr2" type="text" value="<?php echo isset($InfosClient) ? $InfosClient->liv_adr2 : '';?>" /></div>
|
||||
</div>
|
||||
<div class="fieldgrp">
|
||||
<label>Adresse3</label>
|
||||
<div class="field"><input name="liv_adr3" type="text" value="<?php echo isset($InfosClient) ? $InfosClient->liv_adr3 : '';?>" /></div>
|
||||
</div>
|
||||
<div class="fieldgrp">
|
||||
<label>Email</label>
|
||||
<div class="field"><input name="liv_email" type="text" value="<?php echo isset($InfosClient) ? $InfosClient->liv_email : '';?>" /></div>
|
||||
</div>
|
||||
<div class="fieldgrp">
|
||||
<label>Téléphone</label>
|
||||
<div class="field"><input name="liv_tel" type="text" value="<?php echo isset($InfosClient) ? $InfosClient->liv_tel : '';?>" /></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h2 class="menu-close">Paramétrage</h2>
|
||||
<div class="blockh2 close">
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>IndiScore</label>
|
||||
<div class="field">
|
||||
<select name="typeScore">
|
||||
<option value="100" <?php if ($InfosClient->typeScore=='100') echo 'selected';?>>100</option>
|
||||
<option value="20" <?php if ($InfosClient->typeScore=='20') echo 'selected';?>>20</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="fieldgrp">
|
||||
<label>Liste des adresses IP</label>
|
||||
<div class="field">
|
||||
<?php
|
||||
$text_ip = '';
|
||||
$filtres_ip = '';
|
||||
if (isset($InfosClient) && !empty($InfosClient->filtres_ip)){
|
||||
$ips = explode(';',$InfosClient->filtres_ip);
|
||||
foreach ($ips as $ip){
|
||||
$filtres_ip.= $ip.';';
|
||||
$text_ip.= $ip.'<a href="#" class="deleteIP" id="'.$ip.'">Supp</a><br/>';
|
||||
}
|
||||
}
|
||||
?>
|
||||
<input type="hidden" name="filtres_ip" value="<?php echo $filtres_ip?>">
|
||||
<span id="listeip">
|
||||
<?php
|
||||
if (!empty($texte_ip)){
|
||||
echo $text_ip;
|
||||
} else {
|
||||
echo "Aucune IPs.";
|
||||
}
|
||||
?>
|
||||
</span>
|
||||
<br/>
|
||||
<a href="#" id="addIp">Ajouter une adresse IP</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="fieldgrp">
|
||||
<label>Listes des Droits</label>
|
||||
|
||||
<div class="field">
|
||||
<?php
|
||||
$text_droit = '';
|
||||
$joindroit = '';
|
||||
if (isset($InfosClient) && !empty($InfosClient->droits) ){
|
||||
$listedroits = explode(' ', $InfosClient->droits);
|
||||
foreach ($listedroits as $item){
|
||||
foreach($wsdroits as $droit){
|
||||
if (strtolower($item)==strtolower($droit->code)){
|
||||
$joindroit.= ' '.$droit->code;
|
||||
$text_droit.= $droit->desc.'<a href="#" class="deleteDroit" id="'.$droit->code.'" >Supp</a><br/>';
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
<input type="hidden" name="droits" value="<?php echo $joindroit?>" />
|
||||
<span id="listedroits">
|
||||
<?php
|
||||
if (!empty($text_droit)){
|
||||
echo $text_droit;
|
||||
} else {
|
||||
echo "Aucun droits.";
|
||||
}
|
||||
?>
|
||||
</span><br/>
|
||||
<select name="selectdroit">
|
||||
<option value="">-</option>
|
||||
<?php
|
||||
foreach($wsdroits as $droit){
|
||||
$value = $droit->code;
|
||||
$text = $droit->desc;
|
||||
?>
|
||||
<option value="<?php echo $value?>"><?php echo $text?></option>
|
||||
<?php }?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>Timeout</label>
|
||||
<div class="field">
|
||||
<input type="text" name="timeout" value="<?php echo isset($InfosClient) ? $InfosClient->timeout : '1600';?>"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h2 class="menu-close">Tarification</h2>
|
||||
<div class="blockh2 close">
|
||||
<div class="fieldgrp">
|
||||
<label>forfaitExtranetPeriode</label>
|
||||
<div class="field">
|
||||
<select name="forfaitExtranetPeriode">
|
||||
<option value="Mensuel" <?php if ($InfosClient->forfaitExtranetPeriode=='Mensuel') echo 'selected';?>>Mensuel</option>
|
||||
<option value="Trimestriel" <?php if ($InfosClient->forfaitExtranetPeriode=='Trimestriel') echo 'selected';?>>Trimestriel</option>
|
||||
<option value="Semestriel" <?php if ($InfosClient->forfaitExtranetPeriode=='Semestriel') echo 'selected';?>>Semestriel</option>
|
||||
<option value="Annuel" <?php if ($InfosClient->forfaitExtranetPeriode=='Annuel') echo 'selected';?>>Annuel</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="fieldgrp">
|
||||
<label>forfaitExtranetMontant</label>
|
||||
<div class="field"><input type="text" name="forfaitExtranetMontant" value="<?php echo isset($InfosClient) ? $InfosClient->forfaitExtranetMontant : '';?>"/></div>
|
||||
</div>
|
||||
<div class="fieldgrp">
|
||||
<label>reconductionAuto</label>
|
||||
<div class="field">
|
||||
<select name="reconductionAuto">
|
||||
<option value="Oui" <?php if ($InfosClient->reconductionAuto=='Oui') echo 'selected';?>>Oui</option>
|
||||
<option value="Non" <?php if ($InfosClient->reconductionAuto=='Non') echo 'selected';?>>Non</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="fieldgrp">
|
||||
<label>Nombre de pièces officielles inclues dans le forfait client</label>
|
||||
<div class="field"><input type="text" name="forfaitPiecesNb" value="<?php echo isset($InfosClient) ? $InfosClient->forfaitPiecesNb : '';?>"/></div>
|
||||
</div>
|
||||
<div class="fieldgrp">
|
||||
<label>Montant du forfait des pièces officielles</label>
|
||||
<div class="field"><input type="text" name="forfaitPiecesMt" value="<?php echo isset($InfosClient) ? $InfosClient->forfaitPiecesMt : '';?>"/></div>
|
||||
</div>
|
||||
<div class="fieldgrp">
|
||||
<label>Tarif unitaire en cas de dépassement</label>
|
||||
<div class="field"><input type="text" name="forfaitPiecesDep" value="<?php echo isset($InfosClient) ? $InfosClient->forfaitPiecesDep : '';?>"/></div>
|
||||
</div>
|
||||
<div class="fieldgrp">
|
||||
<label>Nombre d'investigations inclues dans le forfait client</label>
|
||||
<div class="field"><input type="text" name="forfaitInvestigNb" value="<?php echo isset($InfosClient) ? $InfosClient->forfaitInvestigNb : '';?>"/></div>
|
||||
</div>
|
||||
<div class="fieldgrp">
|
||||
<label>Montant du forfait des investigations</label>
|
||||
<div class="field"><input type="text" name="forfaitInvestigMt" value="<?php echo isset($InfosClient) ? $InfosClient->forfaitInvestigMt : '';?>"/></div>
|
||||
</div>
|
||||
<div class="fieldgrp">
|
||||
<label>Tarif unitaire pour les indiscore</label>
|
||||
<div class="field"><input type="text" name="tarifIndiscore" value="<?php echo isset($InfosClient) ? $InfosClient->tarifIndiscore : '';?>"/></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h2 class="menu-close">Divers</h2>
|
||||
<div class="blockh2 close">
|
||||
<div class="fieldgrp">
|
||||
<label>Accès Webservice</label>
|
||||
<div class="field"><input type="text" name="accesWS" value="<?php echo isset($InfosClient) ? $InfosClient->accesWS : '';?>"/></div>
|
||||
</div>
|
||||
<div class="fieldgrp">
|
||||
<label>Intersud - Login</label>
|
||||
<div class="field"><input type="text" name="InterSudLogin" value="<?php echo isset($InfosClient) ? $InfosClient->InterSudLogin : '';?>"/></div>
|
||||
</div>
|
||||
<div class="fieldgrp">
|
||||
<label>Intersud - Mot de passe</label>
|
||||
<div class="field"><input type="text" name="InterSudPass" value="<?php echo isset($InfosClient) ? $InfosClient->InterSudPass : '';?>"/></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="submit">
|
||||
<input class="button" type="submit" name="submit" value="<?php echo $submitValue?>" />
|
||||
</div>
|
||||
|
||||
</form>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</div>
|
@ -1,153 +0,0 @@
|
||||
<?php
|
||||
|
||||
|
||||
?>
|
||||
<h2 class="menu-close">Identification</h2>
|
||||
|
||||
<div class="blockh2 close">
|
||||
<div class="fieldgrp">
|
||||
<label>Nom</label>
|
||||
<div class="field"><input name="nom" type="text" value="" /></div>
|
||||
</div>
|
||||
<div class="fieldgrp">
|
||||
<label>Siren</label>
|
||||
<div class="field"><input name="siren" type="text" value="" />
|
||||
<a href="#">Obtention Raison sociale</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="fieldgrp">
|
||||
<label>Nic du siège</label>
|
||||
<div class="field"><input name="nic" type="text" value="" /></div>
|
||||
</div>
|
||||
<div class="fieldgrp">
|
||||
<label>Racine des identifiants</label>
|
||||
<div class="field">
|
||||
<input name="racineLogin" type="text" value="" /></div>
|
||||
</div>
|
||||
<div class="fieldgrp">
|
||||
<label>Test</label>
|
||||
<div class="field"><input name="test" type="checkbox" value="1" /></div>
|
||||
</div>
|
||||
<div class="fieldgrp">
|
||||
<label>Actif</label>
|
||||
<div class="field"><input name="actif" type="checkbox" value="1" /></div>
|
||||
</div>
|
||||
<div class="fieldgrp">
|
||||
<label>Date de signature</label>
|
||||
<div class="field"><input name="dateSignature" type="text" value="" /></div>
|
||||
</div>
|
||||
<div><span>Type de contrat</span></div>
|
||||
<div class="fieldgrp">
|
||||
<label>Contrat</label><input name="typeContrat" type="radio" value="Contrat" />
|
||||
<label>Marché</label><input name="typeContrat" type="radio" value="Marché" />
|
||||
</div>
|
||||
<div class="fieldgrp">
|
||||
<label>Commercial S&D</label>
|
||||
<div class="field"><input name="respComSD" type="text" value="" /></div>
|
||||
</div>
|
||||
<div class="fieldgrp">
|
||||
<label>Nom de l'apporteur d'affaire</label>
|
||||
<div class="field"><input name="apporteurAffaire" type="text" value="" /></div>
|
||||
</div>
|
||||
<div class="fieldgrp">
|
||||
<label>Prestations</label>
|
||||
<div class="field"><input name="prestations" type="text" value="" /></div>
|
||||
</div>
|
||||
<div class="fieldgrp">
|
||||
<label>Type d'accès</label>
|
||||
<div class="field"><input name="typeAcces" type="text" value="" /></div>
|
||||
</div>
|
||||
<div class="fieldgrp">
|
||||
<label>Remarques / Observations</label>
|
||||
<div class="field"><textarea name="remarque"></textarea></div>
|
||||
</div>
|
||||
<div class="fieldgrp">
|
||||
<label>Date de création de la fiche</label>
|
||||
<div class="field"><input name="dateInsert" type="text" value="" /></div>
|
||||
</div>
|
||||
<div class="fieldgrp">
|
||||
<label>Date de modification de la fiche</label>
|
||||
<div class="field"><input name="dateUpdate" type="text" value="" /></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h2 class="menu-close">Facturation</h2>
|
||||
|
||||
<div class="blockh2 close">
|
||||
<div><label>N° de TVA</label></div>
|
||||
<div><label>Compte client rattaché</label></div>
|
||||
<div><label>Editer la facture automatiquement</label></div>
|
||||
<div><label>Editer le détail de la facture</label></div>
|
||||
<div><label>Nom du destinataire de la facture</label></div>
|
||||
<div><label>Prénom</label></div>
|
||||
<div><label>Fonction</label></div>
|
||||
<div><label>Adresse1</label></div>
|
||||
<div><label>Adresse2</label></div>
|
||||
<div><label>Adresse3</label></div>
|
||||
<div><label>Code Postal</label></div>
|
||||
<div><label>Ville</label></div>
|
||||
<div><label>Email</label></div>
|
||||
<div><label>Téléphone</label></div>
|
||||
<div><label>Fax</label></div>
|
||||
<div><label>RIB joint à la facture</label></div>
|
||||
|
||||
</div>
|
||||
|
||||
<h2 class="menu-close">Contact : Information sur le contact / signataire</h2>
|
||||
<div class="blockh2 close">
|
||||
<div><label>Nom du destinataire de la livraison</label></div>
|
||||
<div><label>Prénom</label></div>
|
||||
<div><label>Fonction</label></div>
|
||||
<div><label>Adresse1</label></div>
|
||||
<div><label>Adresse2</label></div>
|
||||
<div><label>Adresse3</label></div>
|
||||
<div><label>Code Postal</label></div>
|
||||
<div><label>Ville</label></div>
|
||||
<div><label>Email</label></div>
|
||||
<div><label>Téléphone</label></div>
|
||||
<div><label>Fax</label></div>
|
||||
</div>
|
||||
|
||||
<h2 class="menu-close">Livraison : Informations sur le destinatire de la livraison</h2>
|
||||
<div class="blockh2 close">
|
||||
<div><label>Nom du destinaire de la livraison</label></div>
|
||||
<div><label>Prénom</label></div>
|
||||
<div><label>Fonction</label></div>
|
||||
<div><label>Adresse1</label></div>
|
||||
<div><label>Adresse2</label></div>
|
||||
<div><label>Adresse3</label></div>
|
||||
<div><label>Code Postal</label></div>
|
||||
<div><label>Ville</label></div>
|
||||
<div><label>Email</label></div>
|
||||
<div><label>Téléphone</label></div>
|
||||
<div><label>Fax</label></div>
|
||||
</div>
|
||||
|
||||
<h2 class="menu-close">Paramétrage</h2>
|
||||
<div class="blockh2 close">
|
||||
<div><label>IndiScore</label></div>
|
||||
<div><label>Liste des adresses IP (séparé par des ;)</label></div>
|
||||
<div><label>Droits</label></div>
|
||||
<div><label>Comptes administrateurs possibles</label></div>
|
||||
</div>
|
||||
|
||||
<h2 class="menu-close">Tarification</h2>
|
||||
<div class="blockh2 close">
|
||||
<div><label>forfaitExtranetPeriode</label></div>
|
||||
<div><label>forfaitExtranetMontant</label></div>
|
||||
<div><label>reconductionAuto</label></div>
|
||||
<div><label>remarque</label></div>
|
||||
<div><label>Nombre de pièces officielles includes dans le forfait client</label></div>
|
||||
<div><label>Montant du forfait des pièces officielles</label></div>
|
||||
<div><label>Tarif unitaire en cas de dépassement</label></div>
|
||||
<div><label>Nombre d'investigations inclues dans le forfait client</label></div>
|
||||
<div><label>Montant du forfait des investigations</label></div>
|
||||
<div><label>Tarif unitaire pour les indiscore 1</label></div>
|
||||
<div><label>Tarif unitaire pour les indiscore 2</label></div>
|
||||
<div><label>Tarif unitaire pour les indiscore 3</label></div>
|
||||
</div>
|
||||
<h2 class="menu-close">Divers</h2>
|
||||
<div class="blockh2 close">
|
||||
<div><label>Intersud - Login</label></div>
|
||||
<div><label>Intersud - Mot de passe</label></div>
|
||||
</div>
|
@ -1,21 +1,17 @@
|
||||
<?php
|
||||
$idClient = 0; // on veut tous les clients
|
||||
//Récupérer la liste des clients
|
||||
try {
|
||||
$O = $client->getListeClients( $idClient );
|
||||
$listeClients = $O['results'];
|
||||
} catch (SoapFault $fault) {
|
||||
$firephp->info('Erreur soap');
|
||||
require_once 'soaperror.php';
|
||||
processSoapFault($client,$fault,$tabInfo);
|
||||
}
|
||||
//Récupérer la liste des utilisateurs
|
||||
$idClient = 0; // On veut tous les clients
|
||||
$ws = new WsScores();
|
||||
$reponse = $ws->getListeClients($idClient);
|
||||
$listeClients = $reponse->result->item;
|
||||
|
||||
$reponse = $ws->getListeDroits();
|
||||
$wsdroits = $reponse->item;
|
||||
?>
|
||||
<style type="text/css">
|
||||
#utilisateur { border-collapse:collapse; width:100%;}
|
||||
#utilisateur tr.titre td { background-color: #D9EEF1; font-weight:bold; }
|
||||
#utilisateur tr.border td { border:1px dashed #939393; padding:5px; margin:0; vertical-align:top;}
|
||||
#utilisateur tr.border td {
|
||||
border:1px dashed #939393; padding:5px; margin:0; vertical-align:top; }
|
||||
#utilisateur tr.actif { background-color:#D9EEF1; }
|
||||
#utilisateur tr.noactif { background-color:#F0F0F6; }
|
||||
.cadreinfo {display:none;}
|
||||
@ -25,120 +21,89 @@ try {
|
||||
<h2>Liste des clients</h2>
|
||||
<div class="blockh2">
|
||||
<table id="utilisateur" >
|
||||
<?php
|
||||
/*
|
||||
['idClient'] =>
|
||||
['nom'] =>
|
||||
['actif'] =>
|
||||
['test'] =>
|
||||
['racineLogin'] =>
|
||||
['siren'] =>
|
||||
['nic'] =>
|
||||
['tva'] =>
|
||||
['editerFacture'] =>
|
||||
['fact_detail'] =>
|
||||
['fac_dest'] =>
|
||||
['fac_adr1'] =>
|
||||
['fac_adr2'] =>
|
||||
['fac_adr3'] =>
|
||||
['fac_email'] =>
|
||||
['fac_tel'] =>
|
||||
['fact_rib'] =>
|
||||
['liv_dest'] =>
|
||||
['liv_adr1'] =>
|
||||
['liv_adr2'] =>
|
||||
['liv_adr3'] =>
|
||||
['liv_email'] =>
|
||||
['liv_tel'] =>
|
||||
['droits'] =>
|
||||
['filtres_ip'] =>
|
||||
['dateInsert'] =>
|
||||
['dateUpdate'] =>
|
||||
['respComSD'] =>
|
||||
['typeContrat'] =>
|
||||
['dateSignature'] =>
|
||||
['typeAcces'] =>
|
||||
['typeScore'] =>
|
||||
['accesPieces'] =>
|
||||
['accesKbis'] =>
|
||||
['accesInvestigations'] =>
|
||||
['accesInternationnal'] =>
|
||||
['accesEnquetes'] =>
|
||||
['miseSousSurveillance'] =>
|
||||
['forfaitExtranetPeriode'] =>
|
||||
['forfaitExtranetMontant'] =>
|
||||
['reconductionAuto'] =>
|
||||
['remarque'] =>
|
||||
['forfaitPiecesNb'] =>
|
||||
['forfaitPiecesMt'] =>
|
||||
['forfaitPiecesDep'] =>
|
||||
['forfaitInvestigNb'] =>
|
||||
['forfaitInvestigMt'] =>
|
||||
['forfaitInvestigDep'] =>
|
||||
['tarifIndiscore'] =>
|
||||
*/
|
||||
?>
|
||||
<tr class="border titre">
|
||||
<td class="StyleInfoLib">Nom</td>
|
||||
<td class="StyleInfoLib">Informations</td>
|
||||
<td class="StyleInfoLib">Actions</td>
|
||||
<td class="StyleInfoLib">Nom</td>
|
||||
<td class="StyleInfoLib">Informations</td>
|
||||
<td class="StyleInfoLib">Actions</td>
|
||||
</tr>
|
||||
<?php
|
||||
if(is_array($listeClients) && count($listeClients)>0){
|
||||
foreach($listeClients as $client){
|
||||
if ($client['actif']=='Oui'){
|
||||
$class = 'actif';
|
||||
} else {
|
||||
$class = 'noactif';
|
||||
}
|
||||
?>
|
||||
<tr class="border <?=$class?>">
|
||||
<td><?=$client['nom']?></td>
|
||||
<td>
|
||||
if (count($listeClients) > 0) {
|
||||
foreach ($listeClients as $cl) {
|
||||
if ($cl->actif == 'Oui') {
|
||||
$class = 'actif';
|
||||
} else {
|
||||
$class = 'noactif';
|
||||
}
|
||||
?>
|
||||
<tr class="border <?=$class?>">
|
||||
<td><?=$cl->nom?></td>
|
||||
<td>
|
||||
|
||||
<div class="lien">
|
||||
<a title="Informations" href="#">Informations</a>
|
||||
<span class="cadreinfo">
|
||||
idClient : <?=$client['idClient']?><br/>
|
||||
Nom : <?=$client['nom']?><br/>
|
||||
SIREN : <?=$client['siren']?><br/>
|
||||
dateInsert : <?=$client['dateInsert']?><br/>
|
||||
dateUpdate : <?=$client['dateUpdate']?><br/>
|
||||
Actif : <?=$client['actif']?><br/>
|
||||
</span>
|
||||
</div>
|
||||
<div class="lien">
|
||||
<a title="Informations" href="#">Informations</a>
|
||||
<span class="cadreinfo">
|
||||
idClient : <?=$cl->idClient?><br/>
|
||||
Nom : <?=$cl->nom?><br/>
|
||||
SIREN : <?=$cl->siren?><br/>
|
||||
dateInsert : <?=$cl->dateInsert?><br/>
|
||||
dateUpdate : <?=$cl->dateUpdate?><br/>
|
||||
Actif : <?=$cl->actif?><br/>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="lien">
|
||||
<a title="Paramètres" href="#">Paramètres</a>
|
||||
<span class="cadreinfo">
|
||||
Filtre Ip : <?=$client['filtres_ip']?><br/>
|
||||
</span>
|
||||
</div>
|
||||
<div class="lien">
|
||||
<a title="Paramètres" href="#">Paramètres</a>
|
||||
<span class="cadreinfo">Filtre Ip :<br/>
|
||||
<?php
|
||||
$ips = explode(';', $cl->filtres_ip);
|
||||
foreach ($ips as $ip){
|
||||
echo $ip.'<br/>';
|
||||
}
|
||||
?>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="lien">
|
||||
<a title="Droits" href="">Droits</a>
|
||||
<span class="cadreinfo">
|
||||
|
||||
</span>
|
||||
</div>
|
||||
|
||||
</td>
|
||||
<td>
|
||||
<?php
|
||||
if ($client['actif']=='Oui'){
|
||||
?>
|
||||
<a href="">
|
||||
<img src="/img/pngtrans/editer.png" title="Editer" width="16" height="16"/>
|
||||
</a>
|
||||
<div class="lien">
|
||||
<a title="Droits" href="">Droits</a>
|
||||
<span class="cadreinfo">
|
||||
<?php
|
||||
$listedroits = explode(' ', $cl->droits);
|
||||
foreach($listedroits as $droit) {
|
||||
foreach($wsdroits as $item){
|
||||
if (strtolower($item->code)==$droit){
|
||||
echo $item->desc.'<br/>';
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
</span>
|
||||
</div>
|
||||
<a title="Liste des utiliateurs" href="./?page=administration&idClient=<?php echo $cl->idClient?>">
|
||||
Liste des utilisateurs
|
||||
</a>
|
||||
<div>
|
||||
|
||||
</div>
|
||||
|
||||
</td>
|
||||
<td>
|
||||
<?php
|
||||
if ($cl->actif == 'Oui') {
|
||||
?>
|
||||
<a href="/?page=administration_client&action=client&idclient=<?=$cl->idClient?>">
|
||||
<img src="/img/pngtrans/editer.png" title="Editer"
|
||||
width="16" height="16"/>
|
||||
</a>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1,29 +0,0 @@
|
||||
<style type="text/css">
|
||||
.close {display:none;}
|
||||
.open {display:block;}
|
||||
.fieldgrp{clear:both; width:100%; margin-bottom:.5em; overflow:hidden;}
|
||||
.fieldgrp:after{content:"."; display:block; clear:both; visibility:hidden; line-height:0; height:0; }
|
||||
.fieldgrp label{font-weight:bold; margin-left:30px; width:180px; clear:both; padding:0 10px 0 0;line-height:22px;_padding-top:3px; float:left; display:block; font-size:108%;}
|
||||
.field {width:320px; float:left; padding:0 10px 0 0; line-height:22px; _padding-top:3px;}
|
||||
.field .longfield{width:215px;}
|
||||
.field .longfield-select{width:220px;}
|
||||
.field .smallfield{width:95px;}
|
||||
.field .medfield{width:110px;}
|
||||
.field input, .field select{ font-size:110%; margin:2px 0; }
|
||||
.field input[type="radio"] { margin:0 5px 0 5px; }
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function(){
|
||||
$('.menu-close').click(function(){
|
||||
$('div.blockh2').css('display','none');
|
||||
$(this).next('div.blockh2').css('display','block');
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<div id="center">
|
||||
<h1>CREATION NOUVEAU CLIENT</h1>
|
||||
<?php
|
||||
require_once realpath(dirname(__FILE__)).'/form.php';
|
||||
?>
|
||||
</div>
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
// --------------------------------------------------------------------------- //
|
||||
// -------------------------------------------------------------------------- //
|
||||
// envoieCourriel
|
||||
// --------------------------------------------------------------------------- //
|
||||
// -------------------------------------------------------------------------- //
|
||||
function envoieCourriel($sujet, $texte)
|
||||
{
|
||||
require_once 'sendmail/mail.php';
|
||||
@ -14,9 +14,9 @@ function envoieCourriel($sujet, $texte)
|
||||
'name' => 'Support')));
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------------- //
|
||||
// -------------------------------------------------------------------------- //
|
||||
// getProviderId
|
||||
// --------------------------------------------------------------------------- //
|
||||
// -------------------------------------------------------------------------- //
|
||||
function getProviderId($pays)
|
||||
{
|
||||
switch ($pays) {
|
||||
@ -28,9 +28,9 @@ function getProviderId($pays)
|
||||
}
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------------- //
|
||||
// -------------------------------------------------------------------------- //
|
||||
// getClient
|
||||
// --------------------------------------------------------------------------- //
|
||||
// -------------------------------------------------------------------------- //
|
||||
function getClient($pays, $service)
|
||||
{
|
||||
$service_header = new StdClass;
|
||||
@ -50,51 +50,54 @@ function getClient($pays, $service)
|
||||
array('soap_version' => SOAP_1_1,
|
||||
'login' => '006',
|
||||
'password' => 'ClaudeMonet',
|
||||
'trace' => true));
|
||||
'trace' => true,
|
||||
'features' => SOAP_SINGLE_ELEMENT_ARRAYS));
|
||||
$soap_client->__setSoapHeaders($soap_header);
|
||||
|
||||
return $soap_client;
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------------- //
|
||||
// -------------------------------------------------------------------------- //
|
||||
// giantErreurSoap
|
||||
// --------------------------------------------------------------------------- //
|
||||
function giantErreurSoap(&$client, &$faute, $debug = false)
|
||||
// -------------------------------------------------------------------------- //
|
||||
function giantErreurSoap(&$gclient, &$faute, $debug = false)
|
||||
{
|
||||
if ($debug == true || DEBUG_SOAP) {
|
||||
print_r($faute);
|
||||
print '<br/><br/>';
|
||||
print 'Requete: '.htmlspecialchars($client->__getLastRequest());
|
||||
print 'Requete: '.htmlspecialchars($gclient->__getLastRequest());
|
||||
print '<br/><br/>';
|
||||
print 'Reponse: '.htmlspecialchars($client->__getLastResponse());
|
||||
print 'Reponse: '.htmlspecialchars($gclient->__getLastResponse());
|
||||
} else {
|
||||
envoieCourriel('SoapFault giantclient',
|
||||
print_r($faute, true).
|
||||
'\n\nRequete: '.
|
||||
htmlspecialchars($client->__getLastRequest()).
|
||||
'\n\nReponse: '.
|
||||
htmlspecialchars($client->__getLastResponse()));
|
||||
print 'Une erreur s\'est produite';
|
||||
print 'Un courriel a été envoyé à l\'administrateur.';
|
||||
print 'Veuillez essayer ultérieurement.';
|
||||
'login = '.$_SESSION['tabInfo']['login'].
|
||||
"\n\n".print_r($faute, true).
|
||||
"\n\nRequete: ".
|
||||
htmlspecialchars($gclient->__getLastRequest()).
|
||||
"\n\nReponse: ".
|
||||
htmlspecialchars($gclient->__getLastResponse()));
|
||||
print 'Une erreur s\'est produite.<br/>';
|
||||
print 'Un courriel a été envoyé à l\'administrateur.<br/>';
|
||||
print 'Veuillez essayer ultérieurement.<br/>';
|
||||
}
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------------- //
|
||||
// -------------------------------------------------------------------------- //
|
||||
// giantEtatDeCommande
|
||||
// --------------------------------------------------------------------------- //
|
||||
// -------------------------------------------------------------------------- //
|
||||
function giantEtatDeCommande(&$commande)
|
||||
{
|
||||
$client = getClient($commande->CountryCode, 'credit-data');
|
||||
$gclient = getClient($commande->CountryCode, 'credit-data');
|
||||
|
||||
$o = new StdClass;
|
||||
$o->ProviderOrderId = $commande->ProviderOrderId;
|
||||
$o->InternalOrderId = $commande->InternalOrderId;
|
||||
|
||||
try {
|
||||
$O = $client->__call('RetrieveOrderStatus', array($o));
|
||||
$O = $gclient->__call('RetrieveOrderStatus', array($o));
|
||||
} catch (SoapFault $f) {
|
||||
giantErreurSoap($client, $f, true);
|
||||
giantErreurSoap($gclient, $f, true);
|
||||
return $commande->OrderStatus;
|
||||
}
|
||||
|
||||
$status = $O->Order->OrderStatus;
|
||||
@ -104,9 +107,9 @@ function giantEtatDeCommande(&$commande)
|
||||
} else if ($status == 'Completed' &&
|
||||
$commande->OrderStatus == 'Pending') {
|
||||
try {
|
||||
$O = $client->__call('RetrieveDataSet', array($o));
|
||||
$O = $gclient->__call('RetrieveDataSet', array($o));
|
||||
} catch (SoapFault $f) {
|
||||
giantErreurSoap($client, $f, true);
|
||||
giantErreurSoap($gclient, $f, true);
|
||||
}
|
||||
|
||||
$r = new Rapports;
|
||||
|
901
includes/giant/rapport-html.php
Normal file
901
includes/giant/rapport-html.php
Normal file
@ -0,0 +1,901 @@
|
||||
<?php
|
||||
// -------------------------------------------------------------------------- //
|
||||
// giant_rapport.php
|
||||
// -------------------------------------------------------------------------- //
|
||||
abstract class AccountItem { }
|
||||
class AmountAccountItem extends AccountItem { }
|
||||
class AccountItemGroup extends AccountItem { }
|
||||
class AmountType { }
|
||||
|
||||
// -------------------------------------------------------------------------- //
|
||||
// dRow
|
||||
// -------------------------------------------------------------------------- //
|
||||
function dRow($lib, $data, $title = '')
|
||||
{
|
||||
$html = '<tr>'."\n";
|
||||
$html .= ' <td width="30"> </td>'."\n";
|
||||
$html .= ' <td width="200" class="StyleInfoLib">'.$lib.'</td>'."\n";
|
||||
|
||||
if ($title != '') {
|
||||
$title = ' title="'.$title.'"';
|
||||
}
|
||||
$html .= ' <td width="350" class="StyleInfoData"'.
|
||||
$title.'>'.$data.'</td>'."\n";
|
||||
$html .= '</tr>'."\n";
|
||||
print $html;
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------- //
|
||||
// dRow2
|
||||
// -------------------------------------------------------------------------- //
|
||||
function dRow2($lib, $data, $id)
|
||||
{
|
||||
$html = '<tr>'."\n";
|
||||
$html .= ' <td width="30"> </td>'."\n";
|
||||
$html .= ' <td width="100" class="StyleInfoLib" >'.$lib .'</td>'."\n";
|
||||
$html .= ' <td width="350" class="StyleInfoData">'.$data.'</td>'."\n";
|
||||
$html .= ' <td width="100" class="StyleInfoData">'.$id .'</td>'."\n";
|
||||
$html .= '</tr>'."\n";
|
||||
print $html;
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------- //
|
||||
// printObj
|
||||
// -------------------------------------------------------------------------- //
|
||||
function printObj($obj)
|
||||
{
|
||||
$ret = '';
|
||||
foreach ($obj as $val) {
|
||||
if (is_object($val) == true || is_array($val) == true) {
|
||||
$ret .= printObj($val);
|
||||
} else if ($val == 'OldValue' ||
|
||||
$val == 'NewValue') {
|
||||
$ret .= '('.$val.') ';
|
||||
} else if ($val != 'eq') {
|
||||
$ret .= $val.' ';
|
||||
}
|
||||
}
|
||||
return $ret;
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------- //
|
||||
// cmp
|
||||
// -------------------------------------------------------------------------- //
|
||||
function cmp($a, $b)
|
||||
{
|
||||
if ($a->Date->_ == $b->Date->_) {
|
||||
return 0;
|
||||
}
|
||||
return ($a->Date->_ < $b->Date->_) ? 1 : -1;
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------- //
|
||||
// pdate
|
||||
// -------------------------------------------------------------------------- //
|
||||
function pdate($d)
|
||||
{
|
||||
if (isset($d->format) == false) {
|
||||
if (isset($d->_) == true) {
|
||||
return $d->_;
|
||||
} else {
|
||||
return $d;
|
||||
}
|
||||
}
|
||||
$f = substr($d->format, 0, 1);
|
||||
$date = '';
|
||||
for ($i = 0; $i < strlen($d->format); ++$i) {
|
||||
if (substr($d->format, $i, 1) != $f) {
|
||||
$f = substr($d->format, $i, 1);
|
||||
$date .= ' / ';
|
||||
}
|
||||
$date .= substr($d->_, $i, 1);
|
||||
}
|
||||
return $date;
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------- //
|
||||
// arrayInsert
|
||||
// -------------------------------------------------------------------------- //
|
||||
function arrayInsert($array, $pos, $value)
|
||||
{
|
||||
return array_merge(array_slice($array, 0 , $pos),
|
||||
array($value),
|
||||
array_slice($array, $pos));
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------- //
|
||||
// fillAccountItem
|
||||
// -------------------------------------------------------------------------- //
|
||||
function fillAccountItem(&$tab, &$num, &$item, $year, $level = 0, $desPrec = '')
|
||||
{
|
||||
if (isset($item->AccountItem) == true ||
|
||||
isset($item->GroupTotalAmount) == true) {
|
||||
if (isset($item->AccountItem) == true) {
|
||||
foreach ($item->AccountItem as $it) {
|
||||
if (isset($item->Description->_) == true) {
|
||||
fillAccountItem($tab, $num, $it, $year,
|
||||
$level + 1, $desPrec.$item->Description->_);
|
||||
} else {
|
||||
fillAccountItem($tab, $num, $it, $year,
|
||||
$level + 1, $desPrec);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (isset($item->GroupTotalAmount) == true) {
|
||||
if (isset($tab[$num]) == true) {
|
||||
for ($i = $num; $i < count($tab); ++$i) {
|
||||
if (isset($item->Description->code) == true) {
|
||||
$code = $item->Description->code;
|
||||
} else {
|
||||
$code = $desPrec.$item->Description->_;
|
||||
}
|
||||
if ($tab[$i]->cde == $code) {
|
||||
$num = $i;
|
||||
$tab[$num]->val[$year] = $item->GroupTotalAmount->_;
|
||||
return;
|
||||
}
|
||||
}
|
||||
$obj = new StdClass;
|
||||
$obj->des = $item->Description->_;
|
||||
$obj->val[$year] = $item->GroupTotalAmount->_;
|
||||
if (isset($item->Description->code) == true) {
|
||||
$obj->cde = $item->Description->code;
|
||||
} else {
|
||||
$obj->cde = $desPrec.$item->Description->_;
|
||||
}
|
||||
$obj->niv = $level;
|
||||
$tab = arrayInsert($tab, $num, $obj);
|
||||
} else {
|
||||
$obj = new StdClass;
|
||||
$obj->des = $item->Description->_;
|
||||
$obj->val[$year] = $item->GroupTotalAmount->_;
|
||||
if (isset($item->Description->code) == true) {
|
||||
$obj->cde = $item->Description->code;
|
||||
} else {
|
||||
$obj->cde = $desPrec.$item->Description->_;
|
||||
}
|
||||
$obj->niv = $level;
|
||||
$tab[$num] = $obj;
|
||||
}
|
||||
++$num;
|
||||
}
|
||||
} else {
|
||||
if (isset($tab[$num]) == true) {
|
||||
for ($i = 0; $i < count($tab); ++$i) {
|
||||
if (isset($item->Description->code) == true) {
|
||||
$code = $item->Description->code;
|
||||
} else {
|
||||
$code = $desPrec.$item->Description->_;
|
||||
}
|
||||
if ($tab[$i]->cde == $code) {
|
||||
$num = $i;
|
||||
$tab[$num]->val[$year] = $item->Value->_;
|
||||
return;
|
||||
}
|
||||
}
|
||||
$obj = new StdClass;
|
||||
$obj->des = $item->Description->_;
|
||||
$obj->val[$year] = $item->Value->_;
|
||||
if (isset($item->Description->code) == true) {
|
||||
$obj->cde = $item->Description->code;
|
||||
} else {
|
||||
$obj->cde = $desPrec.$item->Description->_;
|
||||
}
|
||||
$obj->niv = $level;
|
||||
$tab = arrayInsert($tab, $num, $obj);
|
||||
} else {
|
||||
$obj = new StdClass;
|
||||
$obj->des = $item->Description->_;
|
||||
$obj->val[$year] = $item->Value->_;
|
||||
if (isset($item->Description->code) == true) {
|
||||
$obj->cde = $item->Description->code;
|
||||
} else {
|
||||
$obj->cde = $desPrec.$item->Description->_;
|
||||
}
|
||||
$obj->niv = $level;
|
||||
$tab[$num] = $obj;
|
||||
}
|
||||
++$num;
|
||||
}
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------- //
|
||||
// printAccountItem
|
||||
// -------------------------------------------------------------------------- //
|
||||
function printAccountItem(&$company, $title)
|
||||
{
|
||||
$tab = array();
|
||||
$years = array();
|
||||
foreach ($company->AnnualAccounts as $a) {
|
||||
switch ($title) {
|
||||
case 'ACTIF':
|
||||
$account = $a->OriginalAnnualAccounts->BalanceSheet->Assets[0];
|
||||
break;
|
||||
case 'PASSIF':
|
||||
$account = $a->OriginalAnnualAccounts->BalanceSheet->Liabilities[0];
|
||||
break;
|
||||
default:
|
||||
$account = $a->OriginalAnnualAccounts->ProfitAndLoss;
|
||||
}
|
||||
$num = 0;
|
||||
$year = substr($a->AccountsDate->_, 0, 4);
|
||||
$years[] = $year;
|
||||
fillAccountItem($tab, $num, $account, $year);
|
||||
}
|
||||
rsort($years);
|
||||
print '<tr>'.
|
||||
'<td style="background-color: #00008c; color: #ffffff;"><b>'.
|
||||
$title.'</b></td>';
|
||||
foreach ($years as $y) {
|
||||
print '<td style="background-color: #00008c; color: #ffffff;"'.
|
||||
' align="right"><b>'.$y.'</b></td>';
|
||||
}
|
||||
$level = 0;
|
||||
foreach ($tab as $line) {
|
||||
while ($line->niv < $level) {
|
||||
print '</tbody>';
|
||||
--$level;
|
||||
}
|
||||
$level = $line->niv;
|
||||
print '<tr>';
|
||||
print '<td>';
|
||||
for ($i = 0; $i < $line->niv; ++$i) {
|
||||
print ' ';
|
||||
}
|
||||
print $line->des;
|
||||
print '</td>';
|
||||
foreach ($years as $y) {
|
||||
print '<td align="right">';
|
||||
if (isset($line->val[$y]) == true) {
|
||||
print $line->val[$y];
|
||||
}
|
||||
print '</td>';
|
||||
}
|
||||
print '</tr>';
|
||||
}
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------- //
|
||||
// printLiensFinanciers
|
||||
// -------------------------------------------------------------------------- //
|
||||
function printLiensFinanciers(&$company, $type)
|
||||
{
|
||||
foreach ($company->Associated as $t) {
|
||||
if ($t->RelationShip == $type) {
|
||||
$libelle = '';
|
||||
if (isset($t->Shares) == true) {
|
||||
$libelle = $t->Shares->Percentage.' %';
|
||||
}
|
||||
$id = '';
|
||||
if (isset($t->Company->CompanyId) == true) {
|
||||
$id = $t->Company->CompanyId;
|
||||
} else if (isset($t->Company->CompanyAddress) == true &&
|
||||
isset($t->Company->CompanyAddress->Country) == true) {
|
||||
$id = '('.$t->Company->CompanyAddress->Country.')';
|
||||
}
|
||||
$name = '';
|
||||
if (isset($t->Company->CompanyName) == true) {
|
||||
foreach ($t->Company->CompanyName as $n) {
|
||||
$name .= ' '.$n->_;
|
||||
}
|
||||
}
|
||||
dRow2($libelle, $name, $id);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------- //
|
||||
// Type de rapport
|
||||
// -------------------------------------------------------------------------- //
|
||||
print '<div id="center">';
|
||||
switch ($r->DataSetType) {
|
||||
case 'Full':
|
||||
print '<h1>RAPPORT COMPLET</h1>';
|
||||
break;
|
||||
case 'Compact':
|
||||
print '<h1>RAPPORT DE SYNTHESE</h1>';
|
||||
break;
|
||||
case 'CreditRecommendation':
|
||||
print '<h1>RAPPORT DE SCORE</h1>';
|
||||
break;
|
||||
}
|
||||
$d = unserialize($r->DataSet);
|
||||
$c = $d->Company;
|
||||
print '<p id="rsynthese">SOCIÉTÉ : ';
|
||||
if (count($c->CompanyName) > 1) {
|
||||
foreach ($c->CompanyName as $name) {
|
||||
print '<br/>'.$name->_;
|
||||
}
|
||||
} else {
|
||||
print $c->CompanyName[0]->_;
|
||||
}
|
||||
print '</p>';
|
||||
|
||||
// -------------------------------------------------------------------------- //
|
||||
// Identite de l'entreprise
|
||||
// -------------------------------------------------------------------------- //
|
||||
print '<h1>IDENTITÉ DE L\'ENTREPRISE</h1>';
|
||||
print '<table>';
|
||||
dRow('Numéro identifiant', $c->CompanyId);
|
||||
if (isset($c->Vat->VatNumber) == true) {
|
||||
dRow('Numéro de TVA Intracom.', $c->Vat->VatNumber);
|
||||
}
|
||||
if (isset($c->SocialSecurityNumber) == true) {
|
||||
dRow('Numéro de Securité Sociale', $c->SocialSecurityNumber);
|
||||
}
|
||||
if (isset($c->CompanyStatus) == true) {
|
||||
dRow('Etablissement actif',
|
||||
($c->CompanyStatus == 'Active') ? 'Oui' : 'Non');
|
||||
}
|
||||
print '</table>';
|
||||
|
||||
// -------------------------------------------------------------------------- //
|
||||
// Raison sociale et coordonnees
|
||||
// -------------------------------------------------------------------------- //
|
||||
print '<h2>Raison sociale & Coordonnées</h2>';
|
||||
print '<table>';
|
||||
foreach ($c->CompanyName as $name) {
|
||||
dRow('Raison Sociale', $name->_);
|
||||
}
|
||||
if (isset($c->TradeName) == true) {
|
||||
$libelle = 'Enseigne(s)';
|
||||
foreach ($c->TradeName as $t) {
|
||||
dRow($libelle, $t->_);
|
||||
$libelle = '';
|
||||
}
|
||||
}
|
||||
if (isset($c->LegalForm->CountryLegalForm) == true) {
|
||||
dRow('Forme juridique',
|
||||
$c->LegalForm->CountryLegalForm->code.' : '.
|
||||
$c->LegalForm->CountryLegalForm->_);
|
||||
}
|
||||
foreach ($c->CompanyAddress as $address) {
|
||||
dRow('Adresse',
|
||||
$address->HouseNumber.' '.
|
||||
$address->Street.' '.
|
||||
$address->PostCode.' '.
|
||||
$address->City.' '.
|
||||
$address->Country);
|
||||
}
|
||||
if (isset($c->TelephoneNumber) == true) {
|
||||
$libelle = 'Téléphone(s)';
|
||||
foreach ($c->TelephoneNumber as $t) {
|
||||
$mobile = (isset($t->isMobile) == true &&
|
||||
$t->isMobile == 1) ? ' (mobile)' : '';
|
||||
dRow($libelle, $t->_.$mobile);
|
||||
$libelle = '';
|
||||
}
|
||||
}
|
||||
if (isset($c->Telefax) == true) {
|
||||
$libelle = 'Fax';
|
||||
foreach ($c->Telefax as $t) {
|
||||
dRow($libelle, $t);
|
||||
$libelle = '';
|
||||
}
|
||||
}
|
||||
if (isset($c->WebAddress) == true) {
|
||||
dRow('Site Internet',
|
||||
'<a href="'.$c->WebAddress.'" target="_blank">'.$c->WebAddress.'</a>');
|
||||
}
|
||||
if (isset($c->EmailAddress) == true) {
|
||||
dRow('Courriel',
|
||||
'<a href="mailto:'.$c->EmailAddress.'" target="_blank">'.
|
||||
$c->EmailAddress.'</a>');
|
||||
}
|
||||
print '</table>';
|
||||
|
||||
// -------------------------------------------------------------------------- //
|
||||
// Banques
|
||||
// -------------------------------------------------------------------------- //
|
||||
if (isset($c->Bank) == true) {
|
||||
print '<h2>Banques</h2>';
|
||||
print '<table>';
|
||||
foreach ($c->Bank as $t) {
|
||||
$libelle = $t->BankName;
|
||||
if (isset($t->BankIdentifierCode) == true) {
|
||||
dRow($libelle, 'BIC: '.$t->BankIdentifierCode);
|
||||
$libelle = '';
|
||||
}
|
||||
if (isset($t->BankAccount) == true) {
|
||||
foreach ($t->BankAccount as $ac) {
|
||||
dRow($libelle, $ac->AccountType.': '. $ac->AccountNumber);
|
||||
$libelle = '';
|
||||
}
|
||||
}
|
||||
if (isset($t->BankAddress) == true) {
|
||||
$adresse = '';
|
||||
if ( isset($t->BankAddress->HouseNumber) == true) {
|
||||
$adresse .= $t->BankAddress->HouseNumber.' ';
|
||||
}
|
||||
if ( isset($t->BankAddress->Street) == true) {
|
||||
$adresse .= $t->BankAddress->Street.' ';
|
||||
}
|
||||
if ( isset($t->BankAddress->PostCode) == true) {
|
||||
$adresse .= $t->BankAddress->PostCode.' ';
|
||||
}
|
||||
if ( isset($t->BankAddress->City) == true) {
|
||||
$adresse .= $t->BankAddress->City.' ';
|
||||
}
|
||||
if ( isset($t->BankAddress->Country) == true) {
|
||||
$adresse .= $t->BankAddress->Country.' ';
|
||||
}
|
||||
dRow($libelle, $adresse);
|
||||
}
|
||||
}
|
||||
print '</table>';
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------- //
|
||||
// Activite(s) et chiffre d'affaire
|
||||
// -------------------------------------------------------------------------- //
|
||||
if (isset($c->Operations->IndustryCode) == true ||
|
||||
isset($c->FinancialSummary) == true ||
|
||||
isset($capital) == true ||
|
||||
isset($c->Employees) == true) {
|
||||
print '<h2>Activité(s) & Chiffre d\'affaire</h2>';
|
||||
print '<table>';
|
||||
if (isset($c->Operations->IndustryCode) == true) {
|
||||
$libelle = 'Activité(s)';
|
||||
foreach ($c->Operations->IndustryCode as $t) {
|
||||
$desc = 'Nace '.$t->NaceCode;
|
||||
if ( isset($t->Description->_) == true) {
|
||||
$desc .= ' '.$t->Description->_;
|
||||
}
|
||||
dRow($libelle, $desc);
|
||||
$libelle = '';
|
||||
}
|
||||
}
|
||||
if (isset($c->FinancialSummary) == true) {
|
||||
$tab = $c->FinancialSummary;
|
||||
$date = 0;
|
||||
foreach ($tab as $t) {
|
||||
if ($t->SummaryDate->_ > $date &&
|
||||
isset($t->AuthorizedCapital) == true) {
|
||||
$capital = $t->AuthorizedCapital->_;
|
||||
$date = $t->SummaryDate->_;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (isset($capital) == false &&
|
||||
isset($c->ShareCapital->AuthorizedCapital->_) == true &&
|
||||
(isset($c->ShareCapital->AuthorizedCapital->currency) == false ||
|
||||
$c->ShareCapital->AuthorizedCapital->currency == 'EUR')) {
|
||||
$capital = $c->ShareCapital->AuthorizedCapital->_;
|
||||
}
|
||||
if (isset($capital) == true) {
|
||||
dRow('Capital', $capital.' €');
|
||||
}
|
||||
if (isset($c->Employees) == true) {
|
||||
$annee = 0;
|
||||
$total = 0;
|
||||
foreach ($c->Employees as $t) {
|
||||
if (isset($t->Period) == true) {
|
||||
if (isset($t->Period->StartDate->_) == true &&
|
||||
$t->Period->StartDate->_ > $annee) {
|
||||
$annee = $t->Period->StartDate->_;
|
||||
$total = intval($t->TotalStaffEmployed);
|
||||
} else if (isset($t->Period->EndDate->_) == true &&
|
||||
$t->Period->EndDate->_ > $annee) {
|
||||
$annee = $t->Period->EndDate->_;
|
||||
$total = intval($t->TotalStaffEmployed);
|
||||
}
|
||||
} else {
|
||||
$total = intval($t->TotalStaffEmployed);
|
||||
}
|
||||
}
|
||||
if ($total > 0) {
|
||||
if ($annee > 0) {
|
||||
dRow('Effectif de l\'entreprise',
|
||||
$total.' salarié(s) en '.substr($annee, 0, 4));
|
||||
} else {
|
||||
dRow('Effectif de l\'entreprise', $total.' salarié(s)');
|
||||
}
|
||||
}
|
||||
}
|
||||
print '</table>';
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------- //
|
||||
// Annonces legales
|
||||
// -------------------------------------------------------------------------- //
|
||||
if (isset($c->Event) == true) {
|
||||
print '<h1>ANNONCES LÉGALES</h1>';
|
||||
print '<table>';
|
||||
$tab = $c->Event;
|
||||
usort($tab, 'cmp');
|
||||
foreach ($tab as $t) {
|
||||
if (isset($t->Value) == true) {
|
||||
$desc = printObj($t->Value);
|
||||
if ( isset($t->Description->_) == true) {
|
||||
$desc = $t->Description->_.' '.$desc;
|
||||
}
|
||||
dRow(pdate($t->Date), $desc);
|
||||
} else if (isset($t->Description->_) == true) {
|
||||
dRow(pdate($t->Date), $t->Description->_);
|
||||
} else {
|
||||
dRow(pdate($t->Date), '('.$t->EventCode.')');
|
||||
}
|
||||
}
|
||||
print '</table>';
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------- //
|
||||
// Dirigeants
|
||||
// -------------------------------------------------------------------------- //
|
||||
if (isset($c->Position) == true) {
|
||||
print '<h1>DIRIGEANTS</h1>';
|
||||
print '<table>';
|
||||
foreach ($c->Position as $t) {
|
||||
if (isset($t->Person) == false) {
|
||||
continue;
|
||||
}
|
||||
$date = '';
|
||||
if (isset($t->Period->StartDate) == true) {
|
||||
$date .= pdate($t->Period->StartDate);
|
||||
}
|
||||
$date .= ' - ';
|
||||
if (isset($t->Period->EndDate) == true) {
|
||||
$date .= pdate($t->Period->EndDate);
|
||||
}
|
||||
$desc = $t->PositionTitle->_.' '.$t->Person->LastName;
|
||||
if (isset($t->Person->FirstName) == true) {
|
||||
$desc .= ' '.$t->Person->FirstName;
|
||||
}
|
||||
dRow($date, $desc);
|
||||
}
|
||||
print '</table>';
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------- //
|
||||
// Employés
|
||||
// -------------------------------------------------------------------------- //
|
||||
if (isset($c->Employees) == true) {
|
||||
print '<h1>EMPLOYÉS</h1>';
|
||||
print '<table>';
|
||||
foreach ($c->Employees as $t) {
|
||||
if (isset($t->Period) == true) {
|
||||
if (isset($t->Period->StartDate) == true) {
|
||||
dRow(pdate($t->Period->StartDate),
|
||||
intval($t->TotalStaffEmployed));
|
||||
} else if (isset($t->Period->EndDate) == true) {
|
||||
dRow(pdate($t->Period->EndDate),
|
||||
intval($t->TotalStaffEmployed));
|
||||
}
|
||||
} else {
|
||||
dRow('', intval($t->TotalStaffEmployed));
|
||||
}
|
||||
}
|
||||
print '</table>';
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------- //
|
||||
// Synthese
|
||||
// -------------------------------------------------------------------------- //
|
||||
if (isset($c->FinancialSummary) == true) {
|
||||
print '<h1>Synthèse</h1>';
|
||||
print '<center>';
|
||||
print '<table cellpadding="4">';
|
||||
$tab = $c->FinancialSummary;
|
||||
print '<tr><td></td>';
|
||||
foreach ($tab as $t) {
|
||||
print '<td align="right"><b>'.substr($t->SummaryDate->_, 0, 4).
|
||||
'</b></td>';
|
||||
}
|
||||
print '</tr>';
|
||||
foreach (array('Revenue',
|
||||
'TotalEquity',
|
||||
'ProfitLossBeforeTax',
|
||||
'ProfitLoss',
|
||||
'WorkingCapital',
|
||||
'AuthorizedCapital') as $n) {
|
||||
print '<tr>';
|
||||
print '<td>';
|
||||
print $n;
|
||||
print '</td>';
|
||||
foreach ($tab as $t) {
|
||||
print '<td align="right">';
|
||||
if (isset($t->$n) == true) {
|
||||
$val = $t->$n->_;
|
||||
if (is_numeric($val) == true) {
|
||||
print $val * $t->Unit;
|
||||
} else {
|
||||
print $val;
|
||||
}
|
||||
}
|
||||
print '</td>';
|
||||
}
|
||||
print '</tr>';
|
||||
}
|
||||
print '</table>';
|
||||
print '</center>';
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------- //
|
||||
// Bilans
|
||||
// -------------------------------------------------------------------------- //
|
||||
if (isset($c->AnnualAccounts) == true) {
|
||||
print '<h1>ÉLÉMENTS FINANCIERS - BILANS</h1>';
|
||||
print '<center>';
|
||||
print '<table rules="groups" cellpadding="4">';
|
||||
printAccountItem($c, 'ACTIF');
|
||||
printAccountItem($c, 'PASSIF');
|
||||
printAccountItem($c, 'COMPTE DE RÉSULTAT');
|
||||
print '</table>';
|
||||
print '</center>';
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------- //
|
||||
// Etablissements
|
||||
// -------------------------------------------------------------------------- //
|
||||
if (isset($c->Branch) == true) {
|
||||
print '<h1>Établissements</h1>';
|
||||
print '<table>';
|
||||
foreach ($c->Branch as $t) {
|
||||
if (isset($t->BranchName->_) == true) {
|
||||
$libelle = $t->BranchName->_;
|
||||
} else if (isset($t->BranchName) == true) {
|
||||
$libelle = $t->BranchName;
|
||||
} else if (isset($t->BranchId) == true) {
|
||||
$libelle = $t->BranchId;
|
||||
}
|
||||
foreach ($c->CompanyAddress as $address) {
|
||||
dRow($libelle,
|
||||
$address->HouseNumber.' '.
|
||||
$address->Street.' '.
|
||||
$address->PostCode.' '.
|
||||
$address->City.' '.
|
||||
$address->Country);
|
||||
}
|
||||
}
|
||||
print '</table>';
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------- //
|
||||
// Liens financiers
|
||||
// -------------------------------------------------------------------------- //
|
||||
if (isset($c->Associated) == true) {
|
||||
print '<h1>Liens financiers</h1>';
|
||||
print '<h2>Actionnariat</h2>';
|
||||
print '<table>';
|
||||
printLiensFinanciers($c, 'Shareholder');
|
||||
print '</table>';
|
||||
print '<h2>Participations</h2>';
|
||||
print '<table>';
|
||||
printLiensFinanciers($c, 'Participation');
|
||||
print '</table>';
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------- //
|
||||
// Paiements
|
||||
// -------------------------------------------------------------------------- //
|
||||
if (isset($c->PaymentBehaviour) == true) {
|
||||
$pb = $c->PaymentBehaviour[0];
|
||||
print '<h1>Paiements</h1>';
|
||||
print '<table>';
|
||||
$date = '';
|
||||
if (isset($pb->Period->StartDate) == true) {
|
||||
$date = pdate($pb->Period->StartDate);
|
||||
}
|
||||
if (isset($pb->Period->EndDate) == true) {
|
||||
$date .= ' -> '.pdate($pb->Period->EndDate);
|
||||
}
|
||||
if (empty($date) == false) {
|
||||
dRow('Date', $date);
|
||||
}
|
||||
if (isset($pb->DebtorDays) == true) {
|
||||
dRow('DebtorDays', $pb->DebtorDays);
|
||||
}
|
||||
if (isset($pb->CreditorDays) == true) {
|
||||
dRow('CreditorDays', $pb->CreditorDays);
|
||||
}
|
||||
if (isset($pb->LiquidityAssessment) == true) {
|
||||
$desc = $pb->LiquidityAssessment->Qualification;
|
||||
if (isset($pb->LiquidityAssessment->AdditionalQualification) == true) {
|
||||
$desc .= ', '.$pb->LiquidityAssessment->AdditionalQualification->_;
|
||||
}
|
||||
dRow('LiquidityAssessment', $desc);
|
||||
}
|
||||
if (isset($pb->PaymentQualification) == true) {
|
||||
$desc = $pb->PaymentQualification->Qualification;
|
||||
if (isset($pb->PaymentQualification->AdditionalQualification) == true) {
|
||||
$desc .= ', '.$pb->PaymentQualification->AdditionalQualification->_;
|
||||
}
|
||||
dRow('PaymentQualification', $desc);
|
||||
}
|
||||
print '</table>';
|
||||
if (isset($pb->AnalysisByPeriod) == true) {
|
||||
$ap = $pb->AnalysisByPeriod;
|
||||
$tab = array();
|
||||
foreach ($ap->Category as $cat) {
|
||||
$trim =
|
||||
pdate($cat->Period->StartDate).' - '.
|
||||
pdate($cat->Period->EndDate);
|
||||
$total = 0;
|
||||
if (isset($cat->DueDateExceeds) == true) {
|
||||
foreach ($cat->DueDateExceeds as $e) {
|
||||
if ($e->NrOfDaysExceeds->LowerLimit->_ >= 90) {
|
||||
$total += $e->Percentage;
|
||||
} else {
|
||||
$lab =
|
||||
$e->NrOfDaysExceeds->LowerLimit->_.' to '.
|
||||
$e->NrOfDaysExceeds->UpperLimit->_;
|
||||
$tab[$lab][$trim] = $e->Percentage;
|
||||
}
|
||||
}
|
||||
$tab['90-'][$trim] = $total;
|
||||
}
|
||||
}
|
||||
ksort($tab);
|
||||
print '<h2>'.$ap->Description->_.'</h2>';
|
||||
print '<table cellpadding="10">';
|
||||
print '<tr>';
|
||||
print '<td>Quarter</td>';
|
||||
print '<td>Within term</td>';
|
||||
foreach ($tab as $tranche => $valeurs) {
|
||||
print '<td>'.$tranche.'</td>';
|
||||
}
|
||||
print '</tr>';
|
||||
foreach ($ap->Category as $cat) {
|
||||
$trim =
|
||||
pdate($cat->Period->StartDate).' - '.
|
||||
pdate($cat->Period->EndDate);
|
||||
print '<tr align="right">'.
|
||||
'<td>'.$trim.'</td>'.
|
||||
'<td>'.$cat->PercentageWithinTerms.' %</td>';
|
||||
foreach ($tab as $tranche => $valeurs) {
|
||||
if (isset($tab[$tranche][$trim]) == true) {
|
||||
print '<td>'.$tab[$tranche][$trim].' %</td>';
|
||||
} else {
|
||||
print '<td>0 %</td>';
|
||||
}
|
||||
}
|
||||
print '</tr>';
|
||||
}
|
||||
print '</table>';
|
||||
}
|
||||
if (isset($pb->AnalysisByAmount) == true) {
|
||||
$ap = $pb->AnalysisByAmount;
|
||||
$tab = array();
|
||||
foreach ($ap->Category as $cat) {
|
||||
$amount = '';
|
||||
if ( isset($cat->AmountCategory->LowerLimit) == true) {
|
||||
$amount .= $cat->AmountCategory->LowerLimit->_;
|
||||
}
|
||||
$amount .= '-';
|
||||
if ( isset($cat->AmountCategory->HigherLimit) == true) {
|
||||
$amount .= $cat->AmountCategory->HigherLimit->_;
|
||||
}
|
||||
$total = 0;
|
||||
if (isset($cat->DueDateExceeds) == true) {
|
||||
foreach ($cat->DueDateExceeds as $e) {
|
||||
if ($e->NrOfDaysExceeds->LowerLimit->_ >= 90) {
|
||||
$total += $e->Percentage;
|
||||
} else {
|
||||
$lab =
|
||||
$e->NrOfDaysExceeds->LowerLimit->_.' to '.
|
||||
$e->NrOfDaysExceeds->UpperLimit->_;
|
||||
$tab[$lab][$amount] = $e->Percentage;
|
||||
}
|
||||
}
|
||||
$tab['90-'][$amount] = $total;
|
||||
}
|
||||
}
|
||||
ksort($tab);
|
||||
print '<h2>'.$ap->Description->_.'</h2>';
|
||||
print '<table cellpadding="10">';
|
||||
print '<tr>';
|
||||
print '<td>Amount</td>';
|
||||
print '<td>Within term</td>';
|
||||
foreach ($tab as $tranche => $valeurs) {
|
||||
print '<td>'.$tranche.'</td>';
|
||||
}
|
||||
print '</tr>';
|
||||
foreach ($ap->Category as $cat) {
|
||||
$amount = '';
|
||||
if ( isset($cat->AmountCategory->LowerLimit) == true) {
|
||||
$amount .= $cat->AmountCategory->LowerLimit->_;
|
||||
}
|
||||
$amount .= '-';
|
||||
if ( isset($cat->AmountCategory->HigherLimit) == true) {
|
||||
$amount .= $cat->AmountCategory->HigherLimit->_;
|
||||
}
|
||||
print '<tr>'.
|
||||
'<td>'.$amount.'</td>'.
|
||||
'<td>'.$cat->PercentageWithinTerms.' %</td>';
|
||||
foreach ($tab as $tranche => $valeurs) {
|
||||
if (isset($tab[$tranche][$amount]) == true) {
|
||||
print '<td>'.$tab[$tranche][$amount].' %</td>';
|
||||
} else {
|
||||
print '<td>0 %</td>';
|
||||
}
|
||||
}
|
||||
print '</tr>';
|
||||
}
|
||||
print '</table>';
|
||||
}
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------- //
|
||||
// Score
|
||||
// -------------------------------------------------------------------------- //
|
||||
print '<h1>Score</h1>';
|
||||
print '<table>';
|
||||
foreach ($c->CreditRecommendation as $cr) {
|
||||
if (isset($cr->Date) == true) {
|
||||
dRow('Date', pdate($cr->Date));
|
||||
}
|
||||
if (isset($cr->RiskClasses) == true) {
|
||||
foreach ($cr->RiskClasses->ProviderRiskClass as $t) {
|
||||
if (isset($t->Description->_) == true) {
|
||||
$desc = ' '.
|
||||
'<img src="img/info.gif"'.
|
||||
' style="vertical-align:middle;"'.
|
||||
' title="'.$t->Description->_.'"/>';
|
||||
} else {
|
||||
$desc = '';
|
||||
}
|
||||
dRow($t->RatingName->_.$desc, $t->RatingValue);
|
||||
}
|
||||
$t = $cr->RiskClasses->CommonRiskClass;
|
||||
if (isset($t->Description->_) == true) {
|
||||
$desc = ' '.
|
||||
'<img src="img/info.gif"'.
|
||||
' style="vertical-align:middle;"'.
|
||||
' title="'.$t->Description->_.'"/>';
|
||||
} else {
|
||||
$desc = '';
|
||||
}
|
||||
dRow($t->RatingName->_.$desc, $t->RatingValue);
|
||||
}
|
||||
dRow('AmountAdvised',
|
||||
$cr->AmountAdvised->_.' '.
|
||||
$cr->AmountAdvised->currency);
|
||||
}
|
||||
print '</table>';
|
||||
|
||||
// -------------------------------------------------------------------------- //
|
||||
// Ratios secteur
|
||||
// -------------------------------------------------------------------------- //
|
||||
if (isset($c->PeerGroup[0]->FlexibleComparisonItems
|
||||
->ComparisonItemsGroup[0]->FlexibleComparisonItem) == true) {
|
||||
print '<h1>Ratios secteur</h1>';
|
||||
print '<table>';
|
||||
print '<tr>';
|
||||
print '<td>';
|
||||
print '</td>';
|
||||
foreach ($c->PeerGroup[0]->FlexibleComparisonItems->ComparisonItemsGroup as
|
||||
$group) {
|
||||
print '<td align="right"><b>';
|
||||
print substr($group->Period->EndDate->_, 0, 4);
|
||||
print '</b></td>';
|
||||
print '<td align="right">';
|
||||
print 'secteur';
|
||||
print '</td>';
|
||||
}
|
||||
print '<tr>';
|
||||
foreach ($c->PeerGroup[0]->FlexibleComparisonItems
|
||||
->ComparisonItemsGroup[0]->FlexibleComparisonItem as $i => $item) {
|
||||
print '<tr>';
|
||||
print '<td>';
|
||||
print $item->ItemName->_;
|
||||
print '</td>';
|
||||
foreach ($c->PeerGroup[0]->FlexibleComparisonItems
|
||||
->ComparisonItemsGroup as $group) {
|
||||
print '<td align="right">';
|
||||
if (isset($group->FlexibleComparisonItem[$i]->SubjectValue)) {
|
||||
print $group->FlexibleComparisonItem[$i]->SubjectValue;
|
||||
}
|
||||
print '</td>';
|
||||
print '<td align="right">';
|
||||
if (isset($group->FlexibleComparisonItem[$i]->AverageValue)) {
|
||||
print $group->FlexibleComparisonItem[$i]->AverageValue;
|
||||
}
|
||||
print '</td>';
|
||||
}
|
||||
print '</tr>';
|
||||
}
|
||||
print '</table>';
|
||||
}
|
||||
|
||||
print '</div>';
|
||||
?>
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
// --------------------------------------------------------------------------- //
|
||||
// -------------------------------------------------------------------------- //
|
||||
// Recherche Giant
|
||||
// --------------------------------------------------------------------------- //
|
||||
// -------------------------------------------------------------------------- //
|
||||
$pays = $formR['pays'];
|
||||
|
||||
define('NUM_ROWS', 10);
|
||||
@ -36,9 +36,9 @@ try {
|
||||
giantErreurSoap($soap_client, $f);
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------------- //
|
||||
// -------------------------------------------------------------------------- //
|
||||
// afficheCompany
|
||||
// --------------------------------------------------------------------------- //
|
||||
// -------------------------------------------------------------------------- //
|
||||
function afficheCompany(&$c, $deb, $num, $pays)
|
||||
{
|
||||
print '<li class="StyleInfoData" type="1" value="'.($deb + $num + 1).'">';
|
||||
@ -66,9 +66,9 @@ function afficheCompany(&$c, $deb, $num, $pays)
|
||||
print '<br/>';
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------------- //
|
||||
// -------------------------------------------------------------------------- //
|
||||
// affichage
|
||||
// --------------------------------------------------------------------------- //
|
||||
// -------------------------------------------------------------------------- //
|
||||
if (isset($O->Results->Company) == true) {
|
||||
print '<ol>';
|
||||
if (is_array($O->Results->Company) == true) {
|
||||
@ -82,7 +82,8 @@ if (isset($O->Results->Company) == true) {
|
||||
print '<table><tr>';
|
||||
print '<td width="40%" align="right">';
|
||||
if ($O->StartRow >= NUM_ROWS) {
|
||||
print '<a href="./?page=recherche&vue=list&p='.($O->StartRow - NUM_ROWS).
|
||||
print '<a href="./?page=recherche&vue=list&p='.
|
||||
($O->StartRow - NUM_ROWS).
|
||||
'" title="Page précédente...">';
|
||||
print '<img src="./img/boutton_precedent_off.gif"'.
|
||||
' onmouseover="this.src=\'./img/boutton_precedent_on.gif\'"'.
|
||||
@ -100,7 +101,8 @@ if (isset($O->Results->Company) == true) {
|
||||
print '<td width="40%">';
|
||||
if ($O->NumberOfHits - $O->StartRow > NUM_ROWS &&
|
||||
$O->StartRow + NUM_ROWS < MAX_ROWS) {
|
||||
print '<a href="./?page=recherche&vue=list&p='.($O->StartRow + NUM_ROWS).
|
||||
print '<a href="./?page=recherche&vue=list&p='.
|
||||
($O->StartRow + NUM_ROWS).
|
||||
'" title="Page suivante...">';
|
||||
print '<img src="./img/boutton_suivant_off.gif"'.
|
||||
' onmouseover="this.src=\'./img/boutton_suivant_on.gif\'"'.
|
||||
|
@ -417,9 +417,9 @@ function getCompanyMatchMethods($pays)
|
||||
return $methods;
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------------- //
|
||||
// -------------------------------------------------------------------------- //
|
||||
// getIdentite
|
||||
// --------------------------------------------------------------------------- //
|
||||
// -------------------------------------------------------------------------- //
|
||||
function getIdentite($identifier, $CompanyProductIdentifier)
|
||||
{
|
||||
global $page, $graydon, $authentication;
|
||||
@ -499,14 +499,8 @@ function getIdentite($identifier, $CompanyProductIdentifier)
|
||||
$commandeDetail->save();
|
||||
|
||||
// setLog
|
||||
$client = new SoapClient(null, array(
|
||||
'trace' => 1,
|
||||
'soap_version' => SOAP_1_1,
|
||||
'location' => WEBSERVICE_URL,
|
||||
'uri' => WEBSERVICE_URI,
|
||||
'login' => $login,
|
||||
'password' => $_SESSION['tabInfo']['password']));
|
||||
$client->setLog('international_identite', $commande_id, 0, $prix);
|
||||
$ws = new WsScores();
|
||||
$ws->setLog('international_identite', $commande_id, 0, $prix);
|
||||
|
||||
// Enregistrement de l'action dans les logs
|
||||
$transactionIdentifier =
|
||||
@ -617,9 +611,9 @@ function getIdentite($identifier, $CompanyProductIdentifier)
|
||||
return $commande_id;
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------------- //
|
||||
// -------------------------------------------------------------------------- //
|
||||
// envoieCourriel
|
||||
// --------------------------------------------------------------------------- //
|
||||
// -------------------------------------------------------------------------- //
|
||||
function envoieCourriel($ref)
|
||||
{
|
||||
require_once 'sendmail/mail.php';
|
||||
@ -635,9 +629,9 @@ function envoieCourriel($ref)
|
||||
'name' => 'Support')));
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------------- //
|
||||
// -------------------------------------------------------------------------- //
|
||||
// copieDesRapports
|
||||
// --------------------------------------------------------------------------- //
|
||||
// -------------------------------------------------------------------------- //
|
||||
function copieDesRapports($commande_a_copier,
|
||||
$identifier,
|
||||
$pidentifier)
|
||||
@ -704,9 +698,9 @@ function copieDesRapports($commande_a_copier,
|
||||
return $commande->id;
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------------- //
|
||||
// -------------------------------------------------------------------------- //
|
||||
// setEnquete
|
||||
// --------------------------------------------------------------------------- //
|
||||
// -------------------------------------------------------------------------- //
|
||||
function setEnquete($pays)
|
||||
{
|
||||
global $page, $mode, $graydon, $authentication;
|
||||
@ -868,14 +862,8 @@ function setEnquete($pays)
|
||||
}
|
||||
|
||||
// setLog
|
||||
$client = new SoapClient(null, array(
|
||||
'trace' => 1,
|
||||
'soap_version' => SOAP_1_1,
|
||||
'location' => WEBSERVICE_URL,
|
||||
'uri' => WEBSERVICE_URI,
|
||||
'login' => $_SESSION['tabInfo']['login'],
|
||||
'password' => $_SESSION['tabInfo']['password']));
|
||||
$client->setLog('international_enquete', $commande_id, 0, $prix);
|
||||
$ws = WsScores();
|
||||
$ws->setLog('international_enquete', $commande_id, 0, $prix);
|
||||
|
||||
// Enregistrement de l'action dans les logs
|
||||
$transactionIdentifier =
|
||||
|
@ -1,41 +1,39 @@
|
||||
<?php
|
||||
isset($_REQUEST['q']) ? $q = $_REQUEST['q'] : $q = '';
|
||||
$q = (isset($_REQUEST['q']) == true) ? $_REQUEST['q'] : '';
|
||||
$params = explode('/', $q);
|
||||
$action = $params[0];
|
||||
|
||||
switch ( $action ) {
|
||||
case 'rs':
|
||||
try {
|
||||
$O = $client->getIdentite($_REQUEST['siren'], 0, false);
|
||||
echo $O['result']['Nom'];
|
||||
} catch (SoapFault $fault) {
|
||||
require_once 'soaperror.php';
|
||||
processSoapFault($client,$fault,$tabInfo);
|
||||
}
|
||||
break;
|
||||
case 'comment':
|
||||
//Enregistrement du commentaire
|
||||
if ( isset($_REQUEST['submit']) && $_REQUEST['submit']=='comment' ){
|
||||
require_once 'dbbootstrap.php';
|
||||
setDbConn('sdv1');
|
||||
$q = Doctrine_Query::create()
|
||||
->update('Commandes')
|
||||
->set('statutCommande', '?', $_REQUEST['statutCommande'])
|
||||
->set('commentaire', '?', $_REQUEST['commentaire'])
|
||||
->where('idCommande = ?', $_REQUEST['idCommande']);
|
||||
//echo $q->getSql();
|
||||
//print_r($q->getFlattenedParams());
|
||||
echo $rows = $q->execute();
|
||||
} else {
|
||||
?>
|
||||
<form name="formComment" id="formComment" action="/?page=greffescmd&q=comment" method="post">
|
||||
<span id="message"></span><br/>
|
||||
<input type="hidden" name="idCommande" value="<?=$_REQUEST['id']?>"/>
|
||||
<input type="hidden" name="statutCommande" value="<?=$_REQUEST['erreur']?>"/>
|
||||
Commentaire sur la commande G<?=$_REQUEST['id']?><br/>
|
||||
<textarea name="commentaire" cols="40" rows="3"></textarea>
|
||||
</form>
|
||||
<?php
|
||||
}
|
||||
break;
|
||||
}
|
||||
switch ($action) {
|
||||
case 'rs':
|
||||
require_once 'scoresws/scoresws.php';
|
||||
$etab = scoresws_identite($_REQUEST['siren'], $_REQUEST['siren'], 0);
|
||||
print $etab->Nom;
|
||||
break;
|
||||
case 'comment':
|
||||
// Enregistrement du commentaire
|
||||
if (isset($_REQUEST['submit']) == true &&
|
||||
$_REQUEST['submit'] == 'comment') {
|
||||
require_once 'dbbootstrap.php';
|
||||
setDbConn('sdv1');
|
||||
$q = Doctrine_Query::create()
|
||||
->update('Commandes')
|
||||
->set('statutCommande', '?', $_REQUEST['statutCommande'])
|
||||
->set('commentaire', '?', $_REQUEST['commentaire'])
|
||||
->where('idCommande = ?', $_REQUEST['idCommande']);
|
||||
//print $q->getSql();
|
||||
//print_r($q->getFlattenedParams());
|
||||
print $q->execute();
|
||||
} else {
|
||||
print '<form name="formComment" id="formComment"'.
|
||||
' action="/?page=greffescmd&q=comment" method="post">';
|
||||
print '<span id="message"></span><br/>';
|
||||
print '<input type="hidden" name="idCommande"'.
|
||||
' value="'.$_REQUEST['id'].'"/>';
|
||||
print '<input type="hidden" name="statutCommande"'.
|
||||
' value="'.$_REQUEST['erreur'].'"/>';
|
||||
print 'Commentaire sur la commande G'.$_REQUEST['id'].'<br/>';
|
||||
print '<textarea name="commentaire" cols="40" rows="3"></textarea>';
|
||||
print '</form>';
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -1,59 +1,70 @@
|
||||
<?php
|
||||
// -------------------------------------------------------------------------- //
|
||||
// dRow
|
||||
// -------------------------------------------------------------------------- //
|
||||
function dRow($lib, $data, $title = '')
|
||||
{
|
||||
$html = '<tr>'."\n";
|
||||
$html.= ' <td width="30"> </td>'."\n";
|
||||
$html.= ' <td width="200" class="StyleInfoLib">'.$lib.'</td>'."\n";
|
||||
$html = '<tr>'."\n";
|
||||
$html .= ' <td width="30"> </td>'."\n";
|
||||
$html .= ' <td width="200" class="StyleInfoLib">'.$lib.'</td>'."\n";
|
||||
|
||||
if($title!='') $title = ' title="'.$title.'"';
|
||||
$html.= ' <td width="350" class="StyleInfoData"'.$title.'>'.$data.'</td>'."\n";
|
||||
$html.= '</tr>'."\n";
|
||||
if ($title != '') {
|
||||
$title = ' title="'.$title.'"';
|
||||
}
|
||||
$html .= ' <td width="350" class="StyleInfoData"'.
|
||||
$title.'>'.$data.'</td>'."\n";
|
||||
$html .= '</tr>'."\n";
|
||||
return $html;
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------- //
|
||||
// pdRow
|
||||
// -------------------------------------------------------------------------- //
|
||||
function pdRow($elem)
|
||||
{
|
||||
if ($elem !== false) {
|
||||
print dRow($elem['lib'], $elem['data']);
|
||||
}
|
||||
}
|
||||
?>
|
||||
<h1 class="titre">IDENTITÉ DE L'ENTREPRISE</h1>
|
||||
<h1 class="titre">IDENTITÉ DE L'ENTREPRISE</h1>
|
||||
<table>
|
||||
<?php
|
||||
// Siret
|
||||
$element = formatElement('identite', 'siret', array($etab['Siren'], $etab['Siret']));
|
||||
echo dRow($element['lib'], $element['data']);
|
||||
pdRow(formatElement('identite', 'siret', array($etab->Siren, $etab->Siret)));
|
||||
|
||||
//Siret siege
|
||||
$element = formatElement('identite', 'siretsiege', array($etab['SiretSiege']));
|
||||
echo dRow($element['lib'], $element['data']);
|
||||
// Siret siege
|
||||
pdRow(formatElement('identite', 'siretsiege', array($etab->SiretSiege)));
|
||||
|
||||
//Numéro tva intracommunautaire
|
||||
$element = formatElement('identite', 'tvanumero', array($etab['TvaNumero'], $etab['TvaAttribue'], $etab['Dept']));
|
||||
// Numéro tva intracommunautaire
|
||||
$element =
|
||||
formatElement('identite', 'tvanumero',
|
||||
array($etab->TvaNumero, $etab->TvaAttribue, $etab->Dept));
|
||||
?>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="200" class="StyleInfoLib"><?=$element['lib']?></td>
|
||||
<td width="350" class="StyleInfoData" valign="middle"><?=$element['data']?></td>
|
||||
<td width="30"> </td>
|
||||
<td width="200" class="StyleInfoLib"><?=$element['lib']?></td>
|
||||
<td width="350" class="StyleInfoData" valign="middle">
|
||||
<?=$element['data']?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
// Isin
|
||||
if ( array_key_exists('Isin',$etab) && isset($etab['Isin']) ) {
|
||||
$element = formatElement('identite', 'isin', array($etab['Isin'],
|
||||
$etab['Siret']));
|
||||
if ($element !== false) {
|
||||
echo dRow($element['lib'], $element['data']);
|
||||
}
|
||||
if (array_key_exists('Isin',$etab) == true && isset($etab->Isin) == true) {
|
||||
pdRow(formatElement('identite', 'isin', array($etab->Isin, $etab->Siret)));
|
||||
}
|
||||
|
||||
// Capitalisation
|
||||
if (isset($etab['Isin']) == true) {
|
||||
$element = formatElement('identite', 'capitalisation', array($etab['Bourse'],
|
||||
$etab['Isin']));
|
||||
if ($element !== false) {
|
||||
echo dRow($element['lib'], $element['data']);
|
||||
}
|
||||
if (isset($etab->Isin) == true) {
|
||||
pdRow(formatElement('identite', 'capitalisation',
|
||||
array($etab->Bourse, $etab->Isin)));
|
||||
}
|
||||
|
||||
// Ne pas afficher le logo si il n'existe pas OU
|
||||
// si le siren est à 0 OU si le siren est inférieur a 100
|
||||
list($urlImg, $pathImg) = logo_exist($etab['Siren'], $etab['Isin'],
|
||||
$etab['Web']);
|
||||
require_once 'logos/logos.php';
|
||||
list($urlImg, $pathImg) = logo_exist($etab->Siren, $etab->Isin, $etab->Web);
|
||||
if ((($siren * 1 != 0) || ($siren * 1 > 100)) && file_exists($pathImg)) {
|
||||
$tabTmp = @getimagesize($pathImg);
|
||||
$w = $tabTmp[0];
|
||||
@ -74,179 +85,185 @@ if ((($siren * 1 != 0) || ($siren * 1 > 100)) && file_exists($pathImg)) {
|
||||
}
|
||||
|
||||
//Numéro RC
|
||||
$element = formatElement('identite', 'numrc', array($etab['NumRC'], $etab['TribunalLib'], $etab['NumRM']));
|
||||
if($element!==false){ echo dRow($element['lib'], $element['data']); }
|
||||
pdRow(formatElement('identite', 'numrc',
|
||||
array($etab->NumRC, $etab->TribunalLib, $etab->NumRM)));
|
||||
|
||||
//Autre identifiant : Numéro WALDEC ou ancien numéro RC si le nouveau n'est pas disponible
|
||||
$element = formatElement('identite', 'autreid', array($etab['AutreId'], $etab['TribunalLib'], $etab['NumRC']));
|
||||
if($element!==false){ echo dRow($element['lib'], $element['data']); }
|
||||
// Autre identifiant : Numéro WALDEC
|
||||
// ou ancien numéro RC si le nouveau n'est pas disponible
|
||||
pdRow(formatElement('identite', 'autreid',
|
||||
array($etab->AutreId, $etab->TribunalLib, $etab->NumRC)));
|
||||
|
||||
//Actif INSEE
|
||||
$element = formatElement('identite', 'actif',
|
||||
array($etab['Siren'], $siret, $idEntreprise,
|
||||
$etab['Siege'], $etab['Actif'],
|
||||
isset($etab['DateClotEt'])?$etab['DateClotEt']: '')
|
||||
);
|
||||
if ($element !== false) {
|
||||
echo dRow($element['lib'], $element['data']);
|
||||
}
|
||||
// Actif INSEE
|
||||
pdRow(formatElement('identite', 'actif',
|
||||
array($etab->Siren, $siret, $idEntreprise,
|
||||
$etab->Siege, $etab->Actif,
|
||||
isset($etab->DateClotEt) ? $etab->DateClotEt : '')));
|
||||
|
||||
//Situation Juridique + affichage date de radiation
|
||||
$element = formatElement('identite', 'situationjuridique', array($etab['SituationJuridique'], $etab['DateRadiation'], $etab['EntActiveRCS'], $etab['Siret'], $idEntreprise));
|
||||
if($element!==false){ echo dRow($element['lib'], $element['data']); }
|
||||
// Situation Juridique + affichage date de radiation
|
||||
pdRow(formatElement('identite', 'situationjuridique',
|
||||
array($etab->SituationJuridique, $etab->DateRadiation,
|
||||
$etab->EntActiveRCS, $etab->Siret, $idEntreprise)));
|
||||
|
||||
// Doublon
|
||||
if (isset($etab['AutreSiren'])) {
|
||||
$element = formatElement('identite', 'autresiren',
|
||||
array($etab['AutreSiren']));
|
||||
if ($element !== false) {
|
||||
echo dRow($element['lib'], $element['data']);
|
||||
}
|
||||
if (isset($etab->AutreSiren) == true) {
|
||||
pdRow(formatElement('identite', 'autresiren', array($etab->AutreSiren)));
|
||||
}
|
||||
|
||||
?>
|
||||
</table>
|
||||
|
||||
<h2>Raison sociale & Coordonnées</h2>
|
||||
<table>
|
||||
<?php
|
||||
//Nom
|
||||
$element = formatElement('identite', 'raisonsociale', array($etab['Nom'], $etab['Nom2'], $etab['NomLong']));
|
||||
if($element!==false){ echo dRow($element['lib'], $element['data'], $element['title']); }
|
||||
// Nom
|
||||
$element = formatElement('identite', 'raisonsociale',
|
||||
array($etab->Nom, $etab->Nom2, $etab->NomLong));
|
||||
if ($element !== false) {
|
||||
print dRow($element['lib'], $element['data'], $element['title']);
|
||||
}
|
||||
|
||||
//Nom Commercial
|
||||
$element = formatElement('identite', 'nomcommercial', array($etab['NomCommercial']));
|
||||
if($element!==false){ echo dRow($element['lib'], $element['data'], $element['title']); }
|
||||
// Nom Commercial
|
||||
$element =
|
||||
formatElement('identite', 'nomcommercial', array($etab->NomCommercial));
|
||||
if ($element !== false) {
|
||||
print dRow($element['lib'], $element['data'], $element['title']);
|
||||
}
|
||||
|
||||
//Enseigne / Sigle
|
||||
$element = formatElement('identite', 'enseignesigle', array($etab['Enseigne'], $etab['EnseigneLong'], $etab['Sigle'], $etab['SigleLong']));
|
||||
if($element!==false){ echo dRow($element['lib'], $element['data'], $element['title']); }
|
||||
// Enseigne / Sigle
|
||||
$element =
|
||||
formatElement('identite', 'enseignesigle',
|
||||
array($etab->Enseigne, $etab->EnseigneLong,
|
||||
$etab->Sigle, $etab->SigleLong));
|
||||
if ($element !== false) {
|
||||
print dRow($element['lib'], $element['data'], $element['title']);
|
||||
}
|
||||
|
||||
// Forme juridique
|
||||
$element = formatElement('identite', 'fj',
|
||||
array($etab['FJ' ], $etab['FJ_lib' ],
|
||||
(isset($etab['FJ2'])) ? $etab['FJ2'] : '',
|
||||
$etab['FJ2_Lib']));
|
||||
if($element!==false){ echo dRow($element['lib'], $element['data']); }
|
||||
pdRow(formatElement('identite', 'fj',
|
||||
array($etab->FJ, $etab->FJ_lib,
|
||||
(isset($etab->FJ2)) ? $etab->FJ2 : '',
|
||||
$etab->FJ2_Lib)));
|
||||
|
||||
//Date d'immatriculation
|
||||
$element = formatElement('identite', 'dateimmat', array($etab['DateImmat']));
|
||||
if($element!==false){ echo dRow($element['lib'], $element['data']); }
|
||||
// Date d'immatriculation
|
||||
pdRow(formatElement('identite', 'dateimmat', array($etab->DateImmat)));
|
||||
|
||||
//Date de création de l'entreprise
|
||||
$element = formatElement('identite', 'datecreaen', array($etab['DateCreaEn']));
|
||||
if($element!==false){ echo dRow($element['lib'], $element['data']); }
|
||||
// Date de création de l'entreprise
|
||||
pdRow(formatElement('identite', 'datecreaen', array($etab->DateCreaEn)));
|
||||
|
||||
//Date de création de l'établissement
|
||||
$element = formatElement('identite', 'datecreaet', array($etab['DateCreaEt']));
|
||||
if($element!==false){ echo dRow($element['lib'], $element['data']); }
|
||||
// Date de création de l'établissement
|
||||
pdRow(formatElement('identite', 'datecreaet', array($etab->DateCreaEt)));
|
||||
|
||||
FB::log($etab, 'etab');
|
||||
//Adresse
|
||||
$element = formatElement('identite', 'adresse',
|
||||
array(
|
||||
$etab['Adresse'],
|
||||
$etab['Adresse2'],
|
||||
$etab['AdresseNum'],
|
||||
$etab['AdresseRue'],
|
||||
$etab['CP'],
|
||||
$etab['Ville'],
|
||||
$etab['Pays'],
|
||||
$etab['AdresseDom'],
|
||||
$etab['AdresseDomEnt'],
|
||||
$etab['AdresseDomNb'])
|
||||
);
|
||||
if($element!==false){ echo dRow($element['lib'], $element['data']); }
|
||||
// Adresse
|
||||
pdRow(formatElement('identite', 'adresse',
|
||||
array($etab->Adresse, $etab->Adresse2,
|
||||
$etab->AdresseNum, $etab->AdresseRue,
|
||||
$etab->CP, $etab->Ville, $etab->Pays,
|
||||
$etab->AdresseDom, $etab->AdresseDomEnt,
|
||||
$etab->AdresseDomNb)));
|
||||
|
||||
//Zones prioritaires
|
||||
$element = formatElement('identite', 'zones', array($etab['GeoInfos']));
|
||||
if($element!==false){ echo dRow($element['lib'], $element['data']); }
|
||||
// Zones prioritaires
|
||||
pdRow(formatElement('identite', 'zones', array($etab->GeoInfos)));
|
||||
|
||||
//Téléphone
|
||||
$element = formatElement('identite', 'tel', array($etab['Tel'], $etab['Enseigne'], $etab['Nom'], $etab['Adresse'], $etab['CP'], $etab['Ville'] ));
|
||||
if($element!==false){ echo dRow($element['lib'], $element['data']); }
|
||||
// Téléphone
|
||||
pdRow(formatElement('identite', 'tel',
|
||||
array($etab->Tel, $etab->Enseigne, $etab->Nom,
|
||||
$etab->Adresse, $etab->CP, $etab->Ville)));
|
||||
|
||||
//Fax
|
||||
$element = formatElement('identite', 'fax', array($etab['Fax']));
|
||||
if($element!==false){ echo dRow($element['lib'], $element['data']); }
|
||||
// Fax
|
||||
pdRow(formatElement('identite', 'fax', array($etab->Fax)));
|
||||
|
||||
//Site web
|
||||
$element = formatElement('identite', 'web', array($etab['Web']));
|
||||
if($element!==false){ echo dRow($element['lib'], $element['data']); }
|
||||
// Site web
|
||||
pdRow(formatElement('identite', 'web', array($etab->Web)));
|
||||
|
||||
//Email
|
||||
$element = formatElement('identite', 'mail', array($etab['Mail']));
|
||||
if($element!==false){ echo dRow($element['lib'], $element['data']); }
|
||||
// Email
|
||||
pdRow(formatElement('identite', 'mail', array($etab->Mail)));
|
||||
?>
|
||||
</table>
|
||||
<h2>Activité(s) & Chiffre d'affaires</h2>
|
||||
<h2>Activité(s) & Chiffre d'affaires</h2>
|
||||
<table>
|
||||
<?php
|
||||
//Activité de l'entreprise
|
||||
$element = formatElement('identite', 'activiteen', array($etab['Activite'], $etab['NafEnt'], $etab['NafEntLib']));
|
||||
if($element!==false){ echo dRow($element['lib'], $element['data']); }
|
||||
// Activité de l'entreprise
|
||||
pdRow(formatElement('identite', 'activiteen',
|
||||
array($etab->Activite, $etab->NafEnt, $etab->NafEntLib)));
|
||||
|
||||
//Activité de l'établissement
|
||||
$element = formatElement('identite', 'activiteet', array($etab['NafEtab'], $etab['NafEtabLib']));
|
||||
if($element!==false){ echo dRow($element['lib'], $element['data']); }
|
||||
// Activité de l'établissement
|
||||
pdRow(formatElement('identite', 'activiteet',
|
||||
array($etab->NafEtab, $etab->NafEtabLib)));
|
||||
|
||||
//NAF4
|
||||
$element = formatElement('identite', 'naf4', array($etab['Naf4Ent'], $etab['Naf4EntLib'], $etab['Naf4Etab'], $etab['Naf4EtabLib']));
|
||||
if($element!==false){ echo dRow($element['lib'], $element['data']); }
|
||||
// NAF4
|
||||
pdRow(formatElement('identite', 'naf4',
|
||||
array($etab->Naf4Ent,
|
||||
$etab->Naf4EntLib,
|
||||
$etab->Naf4Etab,
|
||||
$etab->Naf4EtabLib)));
|
||||
|
||||
//NACE
|
||||
$element = formatElement('identite', 'nace', array($etab['NaceEnt'], $etab['NaceEtab']));
|
||||
if($element!==false){ echo dRow($element['lib'], $element['data']); }
|
||||
// NACE
|
||||
pdRow(formatElement('identite', 'nace',
|
||||
array($etab->NaceEnt, $etab->NaceEtab)));
|
||||
|
||||
//Nature de l'activité
|
||||
$element = formatElement('identite', 'natureactivite', array($etab['NatureActivite'], $etab['Actif']));
|
||||
if($element!==false){ echo dRow($element['lib'], $element['data']); }
|
||||
// Nature de l'activité
|
||||
pdRow(formatElement('identite', 'natureactivite',
|
||||
array($etab->NatureActivite, $etab->Actif)));
|
||||
|
||||
//Origine du fond
|
||||
$element = formatElement('identite', 'originefond', array($etab['OrigineCreation']));
|
||||
if($element!==false){ echo dRow($element['lib'], $element['data']); }
|
||||
// Origine du fond
|
||||
pdRow(formatElement('identite', 'originefond', array($etab->OrigineCreation)));
|
||||
|
||||
//Type d'exploitation
|
||||
$element = formatElement('identite', 'typeexploitation', array($etab['TypeExploitation']));
|
||||
if($element!==false){ echo dRow($element['lib'], $element['data']); }
|
||||
// Type d'exploitation
|
||||
pdRow(formatElement('identite', 'typeexploitation',
|
||||
array($etab->TypeExploitation)));
|
||||
|
||||
//Saisonnalité
|
||||
$element = formatElement('identite', 'saisonnalite', array($etab['Saisonnalite']));
|
||||
if($element!==false){ echo dRow($element['lib'], $element['data']); }
|
||||
// Saisonnalité
|
||||
pdRow(formatElement('identite', 'saisonnalite', array($etab->Saisonnalite)));
|
||||
|
||||
//Nombre d'établissements actif
|
||||
$element = formatElement('identite', 'nbetabactif', array($etab['NbEtab'], $etab['Siret'], $idEntreprise));
|
||||
if($element!==false){ echo dRow($element['lib'], $element['data']); }
|
||||
// Nombre d'établissements actif
|
||||
pdRow(formatElement('identite', 'nbetabactif',
|
||||
array($etab->NbEtab, $etab->Siret, $idEntreprise)));
|
||||
|
||||
//Capital
|
||||
$element = formatElement('identite', 'capital', array($etab['Capital'], $etab['CapitalDev'], $etab['CapitalLib'], $etab['CapitalType'], $etab['Bilan']));
|
||||
if($element!==false){ echo dRow($element['lib'], $element['data'], $element['title']); }
|
||||
|
||||
//Chiffre d'affaire
|
||||
$element = formatElement('identite', 'ca', array($etab['Bilan'], $etab['TrancheCALib'], $etab['AnneeTCA']));
|
||||
if($element!==false){ echo dRow($element['lib'], $element['data'], $element['title']); }
|
||||
|
||||
//Principaux dirigeants
|
||||
// Capital
|
||||
$element =
|
||||
formatElement('identite', 'dirigeants',
|
||||
array($etab['dir1Titre'],
|
||||
$etab['dir1NomPrenom'],
|
||||
$etab['dir1DateNaiss'],
|
||||
$etab['dir1LieuNaiss'],
|
||||
$etab['dir2Titre'],
|
||||
$etab['dir2NomPrenom'],
|
||||
(isset($etab['dir2DateNaiss'])) ?
|
||||
$etab['dir2DateNaiss'] : '',
|
||||
$etab['dir2LieuNaiss']));
|
||||
if($element!==false){ echo dRow($element['lib'], $element['data']); }
|
||||
formatElement('identite', 'capital',
|
||||
array($etab->Capital,
|
||||
$etab->CapitalDev,
|
||||
$etab->CapitalLib,
|
||||
$etab->CapitalType, $etab->Bilan));
|
||||
if ($element !== false) {
|
||||
print dRow($element['lib'], $element['data'], $element['title']);
|
||||
}
|
||||
|
||||
//Effectif
|
||||
$element = formatElement('identite', 'effectif', array($etab['Effectif'], $etab['Bilan'], $etab['AnneeEffEn']));
|
||||
if($element!==false){ echo dRow($element['lib'], $element['data'], $element['title']); }
|
||||
// Chiffre d'affaire
|
||||
$element =
|
||||
formatElement('identite', 'ca',
|
||||
array($etab->Bilan, $etab->TrancheCALib, $etab->AnneeTCA));
|
||||
if ($element !== false) {
|
||||
print dRow($element['lib'], $element['data'], $element['title']);
|
||||
}
|
||||
|
||||
//Effectif Etablissement
|
||||
$element = formatElement('identite', 'effectifetab', array($etab['EffectifEtab'], $etab['AnneeEffEt']));
|
||||
if($element!==false){ echo dRow($element['lib'], $element['data'], $element['title']); }
|
||||
// Principaux dirigeants
|
||||
pdRow(formatElement('identite', 'dirigeants',
|
||||
array($etab->dir1Titre,
|
||||
$etab->dir1NomPrenom,
|
||||
$etab->dir1DateNaiss,
|
||||
$etab->dir1LieuNaiss,
|
||||
$etab->dir2Titre,
|
||||
$etab->dir2NomPrenom,
|
||||
(isset($etab->dir2DateNaiss)) ?
|
||||
$etab->dir2DateNaiss : '',
|
||||
$etab->dir2LieuNaiss)));
|
||||
|
||||
// Effectif
|
||||
$element =
|
||||
formatElement('identite', 'effectif',
|
||||
array($etab->Effectif, $etab->Bilan, $etab->AnneeEffEn));
|
||||
if ($element !== false) {
|
||||
print dRow($element['lib'], $element['data'], $element['title']);
|
||||
}
|
||||
|
||||
// Effectif Etablissement
|
||||
$element =
|
||||
formatElement('identite', 'effectifetab',
|
||||
array($etab->EffectifEtab, $etab->AnneeEffEt));
|
||||
if ($element !== false) {
|
||||
print dRow($element['lib'], $element['data'], $element['title']);
|
||||
}
|
||||
?>
|
||||
</table>
|
||||
</table>
|
||||
|
@ -1,38 +1,40 @@
|
||||
<?php
|
||||
$texte = '';
|
||||
if (isset($etab['DateMajINSEE']) && !empty($etab['DateMajINSEE'])
|
||||
&& $etab['DateMajINSEE']!='0000-00-00'){
|
||||
$texte.= "Insee : ";
|
||||
$texte.= WDate::dateT('Y-m-d', 'd/m/Y', $etab['DateMajINSEE']);
|
||||
$texte.= '<br/>';
|
||||
$date = new WDate;
|
||||
if (empty($etab->DateMajINSEE) == false &&
|
||||
$etab->DateMajINSEE != '0000-00-00') {
|
||||
$texte .= "Insee : ";
|
||||
$texte .= $date->dateT('Y-m-d', 'd/m/Y', $etab->DateMajINSEE);
|
||||
$texte .= '<br/>';
|
||||
}
|
||||
if (isset($etab['DateMajRCS']) && !empty($etab['DateMajRCS'])
|
||||
&& $etab['DateMajRCS']!='0000-00-00'){
|
||||
$texte.= "RCS : ";
|
||||
$texte.= WDate::dateT('Y-m-d', 'd/m/Y', $etab['DateMajRCS']);
|
||||
$texte.= '<br/>';
|
||||
if (empty($etab->DateMajRCS) == false &&
|
||||
$etab->DateMajRCS != '0000-00-00') {
|
||||
$texte .= "RCS ".
|
||||
" : ";
|
||||
$texte .= $date->dateT('Y-m-d', 'd/m/Y', $etab->DateMajRCS);
|
||||
$texte .= '<br/>';
|
||||
}
|
||||
if (isset($etab['DateMajBILAN']) && !empty($etab['DateMajBILAN'])
|
||||
&& $etab['DateMajBILAN']!='0000-00-00'){
|
||||
$texte.= "Bilans : ";
|
||||
$texte.= WDate::dateT('Y-m-d', 'd/m/Y', $etab['DateMajBILAN']);
|
||||
$texte.= '<br/>';
|
||||
if (empty($etab->DateMajBILAN) == false &&
|
||||
$etab->DateMajBILAN != '0000-00-00') {
|
||||
$texte .= "Bilans : ";
|
||||
$texte .= $date->dateT('Y-m-d', 'd/m/Y', $etab->DateMajBILAN);
|
||||
$texte .= '<br/>';
|
||||
}
|
||||
if (isset($etab['DateMajANN']) && !empty($etab['DateMajANN'])
|
||||
&& $etab['DateMajANN']!='0000-00-00'){
|
||||
$texte.= "Annonces : ";
|
||||
$texte.= WDate::dateT('Y-m-d', 'd/m/Y', $etab['DateMajANN']);
|
||||
$texte.= '<br/>';
|
||||
if (empty($etab->DateMajANN) == false &&
|
||||
$etab->DateMajANN != '0000-00-00') {
|
||||
$texte .= "Annonces : ";
|
||||
$texte .= $date->dateT('Y-m-d', 'd/m/Y', $etab->DateMajANN);
|
||||
$texte .= '<br/>';
|
||||
}
|
||||
$dateDerMaj = '';
|
||||
if (isset($etab['DateMajID']) && !empty($etab['DateMajID'])
|
||||
&& $etab['DateMajID']!='0000-00-00' ){
|
||||
if (hasModeEdition()){
|
||||
$texte.= "Scores & Décisions : ";
|
||||
$texte.= WDate::dateT('Y-m-d', 'd/m/Y', $etab['DateMajID']);
|
||||
$texte.= '<br/>';
|
||||
}
|
||||
$dateDerMaj = ' le '.WDate::dateT('Y-m-d', 'd/m/Y', $etab['DateMajID']);
|
||||
if (empty($etab->DateMajID) == false &&
|
||||
$etab->DateMajID != '0000-00-00') {
|
||||
if (hasModeEdition()) {
|
||||
$texte .= "Scores & Décisions : ";
|
||||
$texte .= $date->dateT('Y-m-d', 'd/m/Y', $etab->DateMajID);
|
||||
$texte .= '<br/>';
|
||||
}
|
||||
$dateDerMaj = ' le '.$date->dateT('Y-m-d', 'd/m/Y', $etab->DateMajID);
|
||||
}
|
||||
?>
|
||||
<div>
|
||||
|
@ -1,7 +1,11 @@
|
||||
<?php
|
||||
//Traitement des paramètres
|
||||
if (!page_checkParams()) die('Paramètres incorrects !');
|
||||
if ($_SESSION['tabInfo']['idClient']==34){ $_SESSION['nowAuthorized']=TRUE; }
|
||||
// Traitement des paramètres
|
||||
if (page_checkParams() == false) {
|
||||
die('Paramètres incorrects !');
|
||||
}
|
||||
if ($_SESSION['tabInfo']['idClient'] == 34) {
|
||||
$_SESSION['nowAuthorized']=TRUE;
|
||||
}
|
||||
|
||||
require_once 'utils.php';
|
||||
require_once 'common/dates.php';
|
||||
@ -10,34 +14,34 @@ require_once 'logos/logos.php';
|
||||
require_once 'scoresws/scoresws.php';
|
||||
require_once 'scoresws/identite.php';
|
||||
|
||||
//Récupération des infos du webservice
|
||||
// Récupération des infos du webservice
|
||||
$etab = scoresws_identite($siret, $siren, $idEntreprise);
|
||||
$firephp->log($etab, 'etab');
|
||||
|
||||
//Enregistrement des elements dans la session
|
||||
// Enregistrement des elements dans la session
|
||||
$tabEntrep = array();
|
||||
$tabEntrep['raisonSociale'] = $etab['Nom'];
|
||||
$tabEntrep['id'] = $etab['id'];
|
||||
$tabEntrep['siren'] = $etab['Siren'];
|
||||
$tabEntrep['siret'] = $etab['Siret'];
|
||||
$tabEntrep['siretSiege'] = $etab['SiretSiege'];
|
||||
$tabEntrep['tva'] = $etab['TvaNumero'];
|
||||
if (isset($etab['Isin'])) {
|
||||
$tabEntrep['isin'] = $etab['Isin'];
|
||||
$tabEntrep['raisonSociale'] = $etab->Nom;
|
||||
$tabEntrep['id'] = $etab->id;
|
||||
$tabEntrep['siren'] = $etab->Siren;
|
||||
$tabEntrep['siret'] = $etab->Siret;
|
||||
$tabEntrep['siretSiege'] = $etab->SiretSiege;
|
||||
$tabEntrep['tva'] = $etab->TvaNumero;
|
||||
if (isset($etab->Isin) == true) {
|
||||
$tabEntrep['isin'] = $etab->Isin;
|
||||
}
|
||||
$tabEntrep['AutreId'] = $etab['AutreId'];
|
||||
if (isset($etab['Statut'])) {
|
||||
$tabEntrep['active'] = $etab['Statut'];
|
||||
$tabEntrep['AutreId'] = $etab->AutreId;
|
||||
if (isset($etab->Statut) == true) {
|
||||
$tabEntrep['active'] = $etab->Statut;
|
||||
}
|
||||
$tabEntrep['Source'] = $etab['Source'];
|
||||
$tabEntrep['SourceId'] = $etab['SourceId'];
|
||||
$tabEntrep['Source'] = $etab->Source;
|
||||
$tabEntrep['SourceId'] = $etab->SourceId;
|
||||
// Utilise pour les compétences territoriale
|
||||
$tabEntrep['codeCommune'] = $etab['Dept'].$etab['codeCommune'];
|
||||
$tabEntrep['nafEn'] = $etab['NafEnt'];
|
||||
$tabEntrep['nafEnLib'] = $etab['NafEntLib'];
|
||||
$tabEntrep['nafEt'] = $etab['NafEtab'];
|
||||
$tabEntrep['nafEtLib'] = $etab['NafEtabLib'];
|
||||
$tabEntrep['fj'] = $etab['FJ'];
|
||||
$tabEntrep['Dept'] = $etab['Dept'];
|
||||
$tabEntrep['codeCommune'] = $etab->Dept.$etab->codeCommune;
|
||||
$tabEntrep['nafEn'] = $etab->NafEnt;
|
||||
$tabEntrep['nafEnLib'] = $etab->NafEntLib;
|
||||
$tabEntrep['nafEt'] = $etab->NafEtab;
|
||||
$tabEntrep['nafEtLib'] = $etab->NafEtabLib;
|
||||
$tabEntrep['fj'] = $etab->FJ;
|
||||
$tabEntrep['Dept'] = $etab->Dept;
|
||||
|
||||
$_SESSION['tabInfo']['entrep'] = $tabEntrep;
|
||||
$_SESSION['tabInfo']['entrep'] = $tabEntrep;
|
||||
|
@ -4,17 +4,17 @@
|
||||
<?php
|
||||
$google_map = './?page=referer&part=gmap&siret='.$siret.
|
||||
'&url=http://maps.google.fr/maps?f=q%26hl=fr%26geocode=%26q='.
|
||||
$etab['AdresseNum'].',+'.
|
||||
urlencode(normaliseVoie($etab['AdresseVoie'])).'+'.
|
||||
urlencode(htmlspecialchars_decode($etab['AdresseRue'], ENT_QUOTES)).
|
||||
',+'.$etab['CP'].'+'.
|
||||
urlencode($etab['Ville']);
|
||||
$etab->AdresseNum.',+'.
|
||||
urlencode(normaliseVoie($etab->AdresseVoie)).'+'.
|
||||
urlencode(htmlspecialchars_decode($etab->AdresseRue, ENT_QUOTES)).
|
||||
',+'.$etab->CP.'+'.
|
||||
urlencode($etab->Ville);
|
||||
|
||||
if ($etab['GeoPrecis'] > 0) {
|
||||
if ($etab->GeoPrecis > 0) {
|
||||
print '<span id="geolocalisation">';
|
||||
print '<b>Information géographique :</b><br/>'.
|
||||
'Latitude : '. dec2dms($etab['GeoLat']).' ('.$etab['GeoLat'].')<br/>'.
|
||||
'Longitude : '.dec2dms($etab['GeoLon']).' ('.$etab['GeoLon'].')<br/>';
|
||||
'Latitude : '. dec2dms($etab->GeoLat).' ('.$etab->GeoLat.')<br/>'.
|
||||
'Longitude : '.dec2dms($etab->GeoLon).' ('.$etab->GeoLon.')<br/>';
|
||||
print '</span>';
|
||||
}
|
||||
?>
|
||||
@ -23,7 +23,7 @@ if ($etab['GeoPrecis'] > 0) {
|
||||
Afficher l'adresse sur Google Map ©</a><br/>
|
||||
<br/>
|
||||
<b>Code commune / Rivoli :</b><br/>
|
||||
<?php print $etab['Dept'].' '.$etab['codeCommune'].' / '.$etab['Rivoli']; ?>
|
||||
<?php print $etab->Dept.' '.$etab->codeCommune.' / '.$etab->Rivoli; ?>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
@ -31,16 +31,16 @@ if (hasPref('mappy')) {
|
||||
require_once 'mappy/mappy.php';
|
||||
$photo = '';
|
||||
$ville = ' '.trim(preg_replace('/([0-9]|ARRONDISSEMENT|_)/i', ' ',
|
||||
$etab['Ville'])).' ';
|
||||
$etab->Ville)).' ';
|
||||
$ville = trim(strtr($ville, array(' EME ' => '', ' ER ' => '')));
|
||||
if (in_array(strtoupper($ville), $tabVilleMappy)) {
|
||||
$rue = trim(strtr(normaliseVoie($etab['AdresseVoie']).' '.
|
||||
$etab['AdresseRue'],
|
||||
$rue = trim(strtr(normaliseVoie($etab->AdresseVoie).' '.
|
||||
$etab->AdresseRue,
|
||||
array(' ST ' => ' SAINT ', ' STE ' => ' SAINTE ')));
|
||||
$source = 'm';
|
||||
} else {
|
||||
$photo = 'http://cbk0.google.com/cbk?output=thumbnail&w=150&h=69&ll='.
|
||||
$etab['GeoLat'].','.$etab['GeoLon'];
|
||||
$etab->GeoLat.','.$etab->GeoLon;
|
||||
if (@fopen($photo, 'r') == false) {
|
||||
$photo = '';
|
||||
}
|
||||
@ -77,17 +77,20 @@ if ($source == 'm') {
|
||||
if ($token == false) {
|
||||
print "Error while getting the token";
|
||||
}
|
||||
|
||||
$src = 'http://axe.mappy.com/1v1/init/get.aspx?auth='.$token.
|
||||
'&version=2.01&solution=ajax';
|
||||
?>
|
||||
<div>
|
||||
<img id="pp-cb-thumb" width="300px" />
|
||||
</div>
|
||||
<script src="http://axe.mappy.com/1v1/init/get.aspx?auth=<?=$token?>&version=2.01&solution=ajax"></script>
|
||||
<script src=<?php print $src; ?> ></script>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
var photoService = new Mappy.api.visiocity.PhotoService();
|
||||
var geo = new Mappy.api.geolocation.Geocoder();
|
||||
|
||||
var address = "<?=$etab['AdresseNum']?> <?=$rue?> <?=$ville?>";
|
||||
var address = "<?=$etab->AdresseNum?> <?=$rue?> <?=$ville?>";
|
||||
geo.geocode(address,
|
||||
function(result) {
|
||||
photoService.search(result[0], "f", serviceHandler);
|
||||
@ -120,13 +123,19 @@ $(document).ready(function() {
|
||||
<?php
|
||||
switch ($_SERVER['SERVER_NAME']) {
|
||||
case 'extranet.devlocal.com':
|
||||
$key = 'ABQIAAAAgaXnaVXxxcgebvrN30E-VhT6B-FIN0IQI1kCChCUYV6RpBO17hTl__Sqiv_xQZFCiaRgHAoc_v9HcQ';
|
||||
$key =
|
||||
'ABQIAAAAgaXnaVXxxcgebvrN30E-VhT6B-FIN0IQI1k'.
|
||||
'CChCUYV6RpBO17hTl__Sqiv_xQZFCiaRgHAoc_v9HcQ';
|
||||
break;
|
||||
case 'extranetrec.scores-decisions.com':
|
||||
$key = 'ABQIAAAAuKBtUyFonYJBl1fqfc78tRQQcNgS-tLiAG-ic2CW9PypgC_xRhTjSL9-5iBPvj3GA1_AvZYQU_QR3Q';
|
||||
$key =
|
||||
'ABQIAAAAuKBtUyFonYJBl1fqfc78tRQQcNgS-tLiAG-'.
|
||||
'ic2CW9PypgC_xRhTjSL9-5iBPvj3GA1_AvZYQU_QR3Q';
|
||||
break;
|
||||
case 'extranet.scores-decisions.com':
|
||||
$key = 'ABQIAAAAuKBtUyFonYJBl1fqfc78tRSYaqxLwFTMDT_MtTSFor1bsUZ_ChTvuzyTINkPMlW88Ar9fofaphzN3w';
|
||||
$key =
|
||||
'ABQIAAAAuKBtUyFonYJBl1fqfc78tRSYaqxLwFTMDT_'.
|
||||
'MtTSFor1bsUZ_ChTvuzyTINkPMlW88Ar9fofaphzN3w';
|
||||
break;
|
||||
default:
|
||||
$key = '';
|
||||
@ -143,7 +152,7 @@ function showPanoData(panoData) {
|
||||
return;
|
||||
}
|
||||
$('#pp-cb-thumb').replaceWith(
|
||||
'<div id="pp-cb-thumb"><div class="left">' +
|
||||
'<div id="pp-cb-thumb"><div class="left">' +
|
||||
'<img src="http://maps.google.fr/cbk?output=tile&panoid=' +
|
||||
panoData.location.panoId +
|
||||
'&zoom=1&x=0&y=0&cb_client=maps_sv" />' +
|
||||
@ -177,10 +186,10 @@ function geoCodeCB(reponse) {
|
||||
replaceWith(
|
||||
"<a href=http://maps.google.fr/maps?q=" +
|
||||
<?php
|
||||
print '"'.urlencode($etab['AdresseNum'].' '.
|
||||
$etab['AdresseRue'].' '.
|
||||
$etab['CP'].' '.
|
||||
$etab['Ville']).'"';
|
||||
print '"'.urlencode($etab->AdresseNum.' '.
|
||||
$etab->AdresseRue.' '.
|
||||
$etab->CP.' '.
|
||||
$etab->Ville).'"';
|
||||
?> +
|
||||
" target=_blank>" +
|
||||
"Afficher l'adresse sur Google Map ©</a>"
|
||||
@ -190,15 +199,15 @@ function geoCodeCB(reponse) {
|
||||
}
|
||||
function affichePhoto() {
|
||||
<?php
|
||||
if ($etab['GeoPrecis'] < 7) {
|
||||
if ($etab->GeoPrecis < 7) {
|
||||
print 'var geoCoder = new GClientGeocoder;';
|
||||
print 'geoCoder.getLocations("'.
|
||||
$etab['AdresseNum'].' '.
|
||||
$etab['AdresseRue'].' '.
|
||||
$etab['CP'].' '.
|
||||
$etab['Ville'].'", geoCodeCB);';
|
||||
$etab->AdresseNum.' '.
|
||||
$etab->AdresseRue.' '.
|
||||
$etab->CP.' '.
|
||||
$etab->Ville.'", geoCodeCB);';
|
||||
} else {
|
||||
print 'var ll = new GLatLng('.$etab['GeoLat'].', '.$etab['GeoLon'].');';
|
||||
print 'var ll = new GLatLng('.$etab->GeoLat.', '.$etab->GeoLon.');';
|
||||
print 'doShowPanoData(ll);';
|
||||
}
|
||||
?>
|
||||
|
@ -1,45 +1,42 @@
|
||||
<div id="news" style="clear:both;margin:5px 0 5px 20px;">
|
||||
<?php
|
||||
// News
|
||||
if ( hasPref('news') ){
|
||||
/* Information presse 15 Aug 2007 09:21:49 GMT - */
|
||||
require_once ('XML/RSS.php');
|
||||
print '<div id="news" style="clear:both;margin:5px 0 5px 20px;">';
|
||||
if (hasPref('news')) {
|
||||
@require_once 'XML/RSS.php';
|
||||
$url = 'http://news.google.fr/news?hl=fr&ned=fr&q='.
|
||||
urlencode('"'.$etab['Nom'].'"').'&output=rss';
|
||||
FB::log($url, 'url');
|
||||
$rss = new XML_RSS($url);
|
||||
urlencode('"'.$etab->Nom.'"').'&output=rss';
|
||||
$rss = @new XML_RSS($url);
|
||||
$rss->parse();
|
||||
$tabMonth = array('Jan' => 1, 'Feb' => 2, 'Mar' => 3, 'Apr' => 4,
|
||||
'May' => 5, 'Jun' => 6, 'Jul' => 7, 'Aug' => 8,
|
||||
'Sep' => 9, 'Oct' => 10,'Nov' => 11,'Dec' => 12);
|
||||
$tabMonth =
|
||||
array('Jan' => 1, 'Feb' => 2, 'Mar' => 3, 'Apr' => 4,
|
||||
'May' => 5, 'Jun' => 6, 'Jul' => 7, 'Aug' => 8,
|
||||
'Sep' => 9, 'Oct' => 10,'Nov' => 11,'Dec' => 12);
|
||||
|
||||
foreach ($rss->getItems() as $i=>$item) {
|
||||
foreach ($rss->getItems() as $i => $item) {
|
||||
if ($i == 0) {
|
||||
?>
|
||||
<span class="StyleInfoLib">Information presse (Source Google News ©)</span><br/>
|
||||
<ul>
|
||||
<?php
|
||||
print '<span class="StyleInfoLib">';
|
||||
print 'Information presse (Source Google News ©)';
|
||||
print '</span>';
|
||||
print '<br/>';
|
||||
print '<ul>';
|
||||
}
|
||||
$tmp=explode(', ', $item['pubdate']);
|
||||
$tmp = explode(', ', $item['pubdate']);
|
||||
$tabDate = explode(' ', $tmp[1]);
|
||||
$tabTime = explode(':', $tabDate[3]);
|
||||
$pubDate = date('d/m/Y à H:i', gmmktime($tabTime[0]-1, $tabTime[1], $tabTime[2], $tabMonth[$tabDate[1]], $tabDate[0], $tabDate[2]));
|
||||
$pubDate = date('d/m/Y à H:i',
|
||||
gmmktime($tabTime[0] - 1,
|
||||
$tabTime[1], $tabTime[2],
|
||||
$tabMonth[$tabDate[1]],
|
||||
$tabDate[0], $tabDate[2]));
|
||||
$titre = $item['title'];
|
||||
?>
|
||||
<li>
|
||||
<a href="<?php echo $item['link'];?>" target="_blank">
|
||||
Le <?php echo $pubDate;?> - <?php echo $titre;?>
|
||||
</a>
|
||||
</li>
|
||||
<?php
|
||||
$i++; if ($i==15) break;
|
||||
}
|
||||
if ($i>0)
|
||||
{
|
||||
?>
|
||||
</ul>
|
||||
<?php
|
||||
print '<li><a href="' . $item['link'].
|
||||
'" target="_blank">Le '.$pubDate." - $titre</a></li>";
|
||||
if ($i > 15) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (isset($i) == true) {
|
||||
print '</ul>';
|
||||
}
|
||||
}
|
||||
print '</div>';
|
||||
?>
|
||||
</div>
|
||||
|
@ -1,39 +1,36 @@
|
||||
<?php
|
||||
isset($_REQUEST['q']) ? $q = $_REQUEST['q'] : $q = '';
|
||||
$q = isset($_REQUEST['q']) ? $_REQUEST['q'] : '';
|
||||
$params = explode('/', $q);
|
||||
|
||||
$login = strtolower($_SESSION['tabInfo']['login']);
|
||||
$siren = substr($_REQUEST['siret'],0,9);
|
||||
$cj = $_SESSION['tabInfo']['entrep']['fj'];
|
||||
$dep = substr(''.$_SESSION['tabInfo']['entrep']['codeCommune'],0,2);
|
||||
isset($_REQUEST['rs'])? $raisonSociale = $_REQUEST['rs'] : '';
|
||||
(isset($_REQUEST['vue']) && !empty($_REQUEST['vue'])) ? $vue=$_REQUEST['vue'] : $vue='';
|
||||
isset($_REQUEST['ref'])? $ref=$_REQUEST['ref'] : $ref = '';
|
||||
$vecteur = isset($params[0]) ? strtoupper($params[0]) : 'XL' ;
|
||||
$siren = substr($_REQUEST['siret'], 0, 9);
|
||||
$cj = $_SESSION['tabInfo']['entrep']['fj'];
|
||||
$dep = substr(''.$_SESSION['tabInfo']['entrep']['codeCommune'], 0, 2);
|
||||
if (isset($_REQUEST['rs']) == true) {
|
||||
$raisonSociale = $_REQUEST['rs'];
|
||||
}
|
||||
$vue = (empty($_REQUEST['vue']) == false) ? $_REQUEST['vue'] : '';
|
||||
$ref = (isset($_REQUEST['ref'])) ? $_REQUEST['ref'] : '';
|
||||
$vecteur = (isset($params[0])) ? strtoupper($params[0]) : 'XL' ;
|
||||
|
||||
require_once 'common/dates.php';
|
||||
require_once 'common/curl.php';
|
||||
require_once 'theme/theme.php';
|
||||
require_once 'user/user.php';
|
||||
require_once 'infogreffe/infogreffews.php';
|
||||
|
||||
$idCommande = 0;
|
||||
|
||||
switch ( $vecteur ) {
|
||||
|
||||
case 'FICHIER':
|
||||
require_once realpath(dirname(__FILE__)).'/infogreffe_fichier.php';
|
||||
break;
|
||||
|
||||
case 'COURRIER':
|
||||
require_once realpath(dirname(__FILE__)).'/infogreffe_courrier.php';
|
||||
break;
|
||||
|
||||
case 'C':
|
||||
require_once realpath(dirname(__FILE__)).'/infogreffe_c.php';
|
||||
break;
|
||||
|
||||
case 'T':
|
||||
require_once realpath(dirname(__FILE__)).'/infogreffe_t.php';
|
||||
break;
|
||||
}
|
||||
switch ($vecteur) {
|
||||
case 'FICHIER':
|
||||
require_once realpath(dirname(__FILE__)).'/infogreffe_fichier.php';
|
||||
break;
|
||||
case 'COURRIER':
|
||||
require_once realpath(dirname(__FILE__)).'/infogreffe_courrier.php';
|
||||
break;
|
||||
case 'C':
|
||||
require_once realpath(dirname(__FILE__)).'/infogreffe_c.php';
|
||||
break;
|
||||
case 'T':
|
||||
require_once realpath(dirname(__FILE__)).'/infogreffe_t.php';
|
||||
break;
|
||||
}
|
||||
|
@ -1,49 +1,39 @@
|
||||
<?php
|
||||
if(!empty($_REQUEST['email']))
|
||||
{
|
||||
$erreur = false;
|
||||
$fp=fopen(PATH_LOGS.'commande_asso.csv', 'a');
|
||||
fwrite($fp, date('Y/m/d H:i:s').";$siren;".$_REQUEST['email'].';'.$login.';'.$_SESSION['tabInfo']['email'].';'.$_SESSION['tabInfo']['ip']."\n");
|
||||
fclose($fp);
|
||||
if (empty($_REQUEST['email']) == false) {
|
||||
$erreur = false;
|
||||
$fp = fopen(PATH_LOGS.'commande_asso.csv', 'a');
|
||||
fwrite($fp, date('Y/m/d H:i:s').";$siren;".$_REQUEST['email'].';'.
|
||||
$login.';'.$_SESSION['tabInfo']['email'].';'.
|
||||
$_SESSION['tabInfo']['ip']."\n");
|
||||
fclose($fp);
|
||||
|
||||
$infoAsso = array(
|
||||
'Siren' => $siren,
|
||||
'idEntreprise' => $idEntreprise,
|
||||
'RaisonSociale' => $_SESSION['tabInfo']['entrep']['raisonSociale'],
|
||||
);
|
||||
$infoAsso = array(
|
||||
'Siren' => $siren,
|
||||
'idEntreprise' => $idEntreprise,
|
||||
'RaisonSociale' => $_SESSION['tabInfo']['entrep']['raisonSociale']
|
||||
);
|
||||
|
||||
$infoDemande = array(
|
||||
'Ref' => $_REQUEST['reference'],
|
||||
'Tel' => $_REQUEST['tel'],
|
||||
'Email' => $_REQUEST['email'],
|
||||
);
|
||||
$infoDemande = array(
|
||||
'Ref' => $_REQUEST['reference'],
|
||||
'Tel' => $_REQUEST['tel'],
|
||||
'Email' => $_REQUEST['email']
|
||||
);
|
||||
|
||||
$firephp->log($infoDemande,'infoDemande');
|
||||
$firephp->log($infoAsso,'infoAsso');
|
||||
try {
|
||||
$O = $client->commandeAsso($siren, $infoAsso, $infoDemande);
|
||||
$annee = substr($O['results']['dateCommande'],0,4);
|
||||
$mois = substr($O['results']['dateCommande'],4,2);
|
||||
$jour = substr($O['results']['dateCommande'],6,2);
|
||||
$heure = substr($O['results']['dateCommande'],8,2);
|
||||
$minutes = substr($O['results']['dateCommande'],10,2);
|
||||
$ref = $O['results']['refCmde'];
|
||||
if( isset($ref) && !empty($ref) )
|
||||
{
|
||||
$message = 'Votre demande à été prise en compte le '.$jour.'/'.$mois.'/'.$annee.' à '.$heure.' h '.$minutes.' sous la référence <b>'.$ref.'</b>.';
|
||||
}
|
||||
$firephp->log($O,'O');
|
||||
} catch (SoapFault $fault) {
|
||||
require_once 'soaperror.php';
|
||||
processSoapFault($client,$fault,$_SESSION['tabInfo']);
|
||||
$erreur = true;
|
||||
}
|
||||
|
||||
if($erreur)
|
||||
{
|
||||
$message = 'Une erreur s\'est produite lors du passage de votre commande.';
|
||||
}
|
||||
|
||||
}else{
|
||||
$message="ERREUR : Veuillez saisir une adresse email valide pour la commande de pièces.";
|
||||
}
|
||||
$ws = new WsScores();
|
||||
$reponse = $ws->setCmdAsso($infoAsso, $infosDemande);
|
||||
$commande = $reponse->commande;
|
||||
$annee = substr($commande->dateCommande, 0, 4);
|
||||
$mois = substr($commande->dateCommande, 4, 2);
|
||||
$jour = substr($commande->dateCommande, 6, 2);
|
||||
$heure = substr($commande->dateCommande, 8, 2);
|
||||
$minutes = substr($commande->dateCommande, 10, 2);
|
||||
$ref = $commande->refCmde;
|
||||
if (empty($ref) == false) {
|
||||
$message = 'Votre demande à été prise en compte le '.
|
||||
$jour.'/'.$mois.'/'.$annee.' à '.
|
||||
$heure.' h '.$minutes.' sous la référence <b>'.$ref.'</b>.';
|
||||
}
|
||||
} else {
|
||||
$message = 'ERREUR : Veuillez saisir une adresse email valide'.
|
||||
' pour la commande de pièces.';
|
||||
}
|
||||
|
@ -1,21 +1,28 @@
|
||||
<?php
|
||||
$error = '';
|
||||
switch($vue)
|
||||
{
|
||||
case 'actes':
|
||||
if(!INFOGREFFE_DEBUG) $client->setLog('greffe_'.$vue, $siren, 0, $ref);
|
||||
$info = unserialize(urldecode($_REQUEST['info']));
|
||||
$message.= '<br/><a href="./fichier/pdf/acte-'.$siren.'-'.$ref.'.pdf" target="_blank">Ouvrir le fichier '.$info['type_lib'].' </a>';
|
||||
break;
|
||||
case 'bilans':
|
||||
if(!INFOGREFFE_DEBUG) $client->setLog('greffe_'.$vue, $siren, 0, $ref);
|
||||
$info = unserialize(urldecode($_REQUEST['info']));
|
||||
if(file_exists(PATH_DATA.'/pdf/bilan-'.$siren.'-'.$ref.'.pdf')){
|
||||
$suffixe = 'bilan';
|
||||
}elseif(file_exists(PATH_DATA.'/pdf/acte-'.$siren.'-'.$ref.'.pdf')){
|
||||
$suffixe = 'acte';
|
||||
}
|
||||
$message.= '<br/><a href="./fichier/pdf/'.$suffixe.'-'.$siren.'-'.$ref.'.pdf" target="_blank">Ouvrir le bilan millésime '.$info['type'].'</a>';
|
||||
break;
|
||||
switch ($vue) {
|
||||
case 'actes':
|
||||
if (!INFOGREFFE_DEBUG) {
|
||||
$ws = new WsScores();
|
||||
$ws->setLog('greffe_'.$vue, $siren, 0, $ref);
|
||||
}
|
||||
$info = unserialize(urldecode($_REQUEST['info']));
|
||||
$message .= '<br/><a href="./fichier/pdf/acte-'.$siren.'-'.$ref.
|
||||
'.pdf" target="_blank">Ouvrir le fichier '.$info['type_lib'].' </a>';
|
||||
break;
|
||||
case 'bilans':
|
||||
if (!INFOGREFFE_DEBUG) {
|
||||
$ws = new WsScores();
|
||||
$ws->setLog('greffe_'.$vue, $siren, 0, $ref);
|
||||
}
|
||||
$info = unserialize(urldecode($_REQUEST['info']));
|
||||
if (file_exists(PATH_DATA.'/pdf/bilan-'.$siren.'-'.$ref.'.pdf')) {
|
||||
$suffixe = 'bilan';
|
||||
} else if (file_exists(PATH_DATA.'/pdf/acte-'.$siren.'-'.$ref.'.pdf')) {
|
||||
$suffixe = 'acte';
|
||||
}
|
||||
$message .= '<br/><a href="./fichier/pdf/'.$suffixe.'-'.$siren.'-'.$ref.
|
||||
'.pdf" target="_blank">Ouvrir le bilan millésime '.$info['type'].'</a>';
|
||||
break;
|
||||
}
|
||||
echo $message;
|
||||
print $message;
|
||||
|
@ -109,9 +109,11 @@ if($idCommande != 0) {
|
||||
$message = 'Une erreur s\'est produite'.
|
||||
' lors du passage de votre commande.';
|
||||
}
|
||||
if(!INFOGREFFE_DEBUG)
|
||||
$client->setLog('greffe_'.$vue, $siren, 0,
|
||||
if(!INFOGREFFE_DEBUG){
|
||||
$ws = new WsScores();
|
||||
$ws->setLog('greffe_'.$vue, $siren, 0,
|
||||
'Erreur '.$reponse['error']['errNum']);
|
||||
}
|
||||
} else {
|
||||
//Mise à jour de la commande dans la bdd
|
||||
$wdb->update('commandes', array('statutCommande'=>0),
|
||||
@ -133,8 +135,10 @@ if($idCommande != 0) {
|
||||
'pour login '.$_SESSION['tabInfo']['login'].EOL
|
||||
);
|
||||
}
|
||||
if(!INFOGREFFE_DEBUG)
|
||||
$client->setLog('greffe_'.$vue, $siren, 0, $ref);
|
||||
if(!INFOGREFFE_DEBUG){
|
||||
$ws = new WsScores();
|
||||
$ws->setLog('greffe_'.$vue, $siren, 0, $ref);
|
||||
}
|
||||
}
|
||||
}else{
|
||||
$message =
|
||||
|
@ -1,108 +1,108 @@
|
||||
<?php
|
||||
$firephp->info('DL fichier');
|
||||
//Enregistrement dans la bdd des informations concernant l'acte
|
||||
// Enregistrement dans la bdd des informations concernant l'acte
|
||||
$error = '';
|
||||
switch($vue)
|
||||
{
|
||||
case 'actes':
|
||||
$info = unserialize(urldecode($_REQUEST['info']));
|
||||
//Pour les actes multiples
|
||||
//Vérifier que le fichier n'est pas déjà présent en local
|
||||
$option = explode('-',$ref);
|
||||
$num_actes = explode('|',$option[7]);
|
||||
if(is_array($num_actes) && count($num_actes)>1) {
|
||||
$date = substr($info['date_acte'],6,4).
|
||||
substr($info['date_acte'],3,2).
|
||||
substr($info['date_acte'],0,2);
|
||||
$option_reel = $info['type'].'-'.$date.'-'.
|
||||
$option[2].'-'.$option[3].'-'.
|
||||
$option[4].'-'.$option[5].'-'.
|
||||
$option[6].'-'.$info['num_acte'];
|
||||
$file = 'acte-'.$siren.'-'.$option_reel.'.pdf';
|
||||
FB::log($option_reel, 'option_reel');
|
||||
if( file_exists(PATH_DATA.'/pdf/'.$file) ){
|
||||
if(!INFOGREFFE_DEBUG) {
|
||||
$client->setLog('greffe_'.$vue, $siren, 0, $option_reel);
|
||||
}
|
||||
$message.= '<br/><a href="./fichier/pdf/'.$file.'" target="_blank">'.
|
||||
'Ouvrir le fichier '.$info['type_lib'].
|
||||
' </a>';
|
||||
echo $message;
|
||||
exit;
|
||||
}
|
||||
}
|
||||
FB::info('Process Normal');
|
||||
//Process normal
|
||||
$reponse = getGreffeActes($siren, $vecteur, $ref);
|
||||
switch ($vue) {
|
||||
case 'actes':
|
||||
$info = unserialize(urldecode($_REQUEST['info']));
|
||||
// Pour les actes multiples
|
||||
// Vérifier que le fichier n'est pas déjà présent en local
|
||||
$option = explode('-',$ref);
|
||||
$num_actes = explode('|',$option[7]);
|
||||
if (is_array($num_actes) && count($num_actes) > 1) {
|
||||
$date = substr($info['date_acte'], 6, 4).
|
||||
substr($info['date_acte'], 3, 2).
|
||||
substr($info['date_acte'], 0, 2);
|
||||
$option_reel = $info['type'].'-'.$date.'-'.
|
||||
$option[2].'-'.$option[3].'-'.
|
||||
$option[4].'-'.$option[5].'-'.
|
||||
$option[6].'-'.$info['num_acte'];
|
||||
$file = 'acte-'.$siren.'-'.$option_reel.'.pdf';
|
||||
|
||||
if(empty($reponse['error'])){
|
||||
$items = $reponse['result']['actes'];
|
||||
}else{
|
||||
$error = $reponse['error']['errNum'].' - '.
|
||||
$reponse['error']['errMsg'];
|
||||
}
|
||||
if($error=='')
|
||||
{
|
||||
$firephp->log($items, 'items');
|
||||
foreach($items as $item)
|
||||
{
|
||||
$firephp->log($info, 'info');
|
||||
if($item['num_acte']==$info['num_acte'])
|
||||
{
|
||||
$firephp->info('ACTE DL');
|
||||
$firephp->log($item, 'item');
|
||||
if($item['url_acces']!==false)
|
||||
{
|
||||
if(!INFOGREFFE_DEBUG) $client->setLog('greffe_'.$vue, $siren, 0, $ref);
|
||||
$message.= '<br/><a href="./fichier/pdf/'.$item['url_acces'].'" target="_blank">Ouvrir le fichier '.$item['type_acte_libelle'].' </a>';
|
||||
}
|
||||
else
|
||||
{
|
||||
if(!INFOGREFFE_DEBUG) $client->setLog('greffe_'.$vue, $siren, 0, 'Erreur telechargement '.$ref);
|
||||
$message.= '<br/>Impossible de télécharger le fichier '.$item['type_acte_libelle'].' auprès de notre partenaire.';
|
||||
}
|
||||
}
|
||||
}
|
||||
echo $message;
|
||||
}
|
||||
else
|
||||
{
|
||||
echo '<br/>Erreur : '.$error;
|
||||
if(!INFOGREFFE_DEBUG) $client->setLog('greffe_'.$vue, $siren, 0, 'Erreur '.$reponse['error']['errNum']);
|
||||
}
|
||||
break;
|
||||
case 'bilans':
|
||||
$reponse = getGreffeBilans($siren, $vecteur, $ref);
|
||||
if (file_exists(PATH_DATA.'/pdf/'.$file)) {
|
||||
if (!INFOGREFFE_DEBUG) {
|
||||
$ws = new WsScores();
|
||||
$ws->setLog('greffe_'.$vue, $siren, 0, $option_reel);
|
||||
}
|
||||
$message.= '<br/><a href="./fichier/pdf/'.$file.'" target="_blank">'.
|
||||
'Ouvrir le fichier '.$info['type_lib'].
|
||||
' </a>';
|
||||
echo $message;
|
||||
exit;
|
||||
}
|
||||
}
|
||||
//Process normal
|
||||
$reponse = getGreffeActes($siren, $vecteur, $ref);
|
||||
|
||||
if(empty($reponse['error'])) $items = $reponse['result']['bilan'];
|
||||
else $error = $reponse['error']['errNum'].' - '.$reponse['error']['errMsg'];
|
||||
if($error=='')
|
||||
{
|
||||
$firephp->log($items, 'items');
|
||||
$info = unserialize(urldecode($_REQUEST['info']));
|
||||
foreach($items as $item)
|
||||
{
|
||||
$firephp->log($info, 'info');
|
||||
$firephp->info('ACTE DL');
|
||||
$firephp->log($item, 'item');
|
||||
if($item['url_acces']!==false)
|
||||
{
|
||||
if(!INFOGREFFE_DEBUG) $client->setLog('greffe_'.$vue, $siren, 0, $ref);
|
||||
$message.= '<br/><a href="./fichier/pdf/'.$item['url_acces'].'" target="_blank">Ouvrir le bilan millésime '.$item['millesime'].'</a>';
|
||||
}
|
||||
else
|
||||
{
|
||||
if(!INFOGREFFE_DEBUG) $client->setLog('greffe_'.$vue, $siren, 0, 'Erreur telechargement '.$ref);
|
||||
$message.= '<br/>Impossible de télécharger le fichier auprès de notre partenaire.';
|
||||
}
|
||||
}
|
||||
echo $message;
|
||||
}
|
||||
else
|
||||
{
|
||||
echo '<br/>Erreur : '.$error;
|
||||
if(!INFOGREFFE_DEBUG) $client->setLog('greffe_'.$vue, $siren, 0, 'Erreur '.$reponse['error']['errNum']);
|
||||
}
|
||||
if (empty($reponse['error'])) {
|
||||
$items = $reponse['result']['actes'];
|
||||
} else {
|
||||
$error = $reponse['error']['errNum'].' - '.
|
||||
$reponse['error']['errMsg'];
|
||||
}
|
||||
if ($error == '') {
|
||||
foreach ($items as $item) {
|
||||
if ($item['num_acte'] == $info['num_acte']) {
|
||||
if ($item['url_acces'] !== false) {
|
||||
if (!INFOGREFFE_DEBUG) {
|
||||
$ws = new WsScores();
|
||||
$ws->setLog('greffe_'.$vue, $siren, 0, $ref);
|
||||
}
|
||||
$message .= '<br/><a href="./fichier/pdf/'.$item['url_acces'].
|
||||
'" target="_blank">Ouvrir le fichier '.
|
||||
$item['type_acte_libelle'].' </a>';
|
||||
} else {
|
||||
if(!INFOGREFFE_DEBUG) {
|
||||
$ws = new WsScores();
|
||||
$ws->setLog('greffe_'.$vue, $siren, 0, 'Erreur telechargement '.$ref);
|
||||
}
|
||||
$message .= '<br/>Impossible de télécharger le fichier '.
|
||||
$item['type_acte_libelle'].
|
||||
' auprès de notre partenaire.';
|
||||
}
|
||||
}
|
||||
}
|
||||
print $message;
|
||||
} else {
|
||||
print '<br/>Erreur : '.$error;
|
||||
if (!INFOGREFFE_DEBUG) {
|
||||
$ws = new WsScores();
|
||||
$ws->setLog('greffe_'.$vue, $siren, 0,
|
||||
'Erreur '.$reponse['error']['errNum']);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 'bilans':
|
||||
$reponse = getGreffeBilans($siren, $vecteur, $ref);
|
||||
|
||||
break;
|
||||
}
|
||||
if (empty($reponse['error'])) {
|
||||
$items = $reponse['result']['bilan'];
|
||||
} else {
|
||||
$error = $reponse['error']['errNum'].' - '.$reponse['error']['errMsg'];
|
||||
}
|
||||
if ($error == '') {
|
||||
$info = unserialize(urldecode($_REQUEST['info']));
|
||||
foreach ($items as $item) {
|
||||
if ($item['url_acces'] !== false) {
|
||||
if (!INFOGREFFE_DEBUG) {
|
||||
$ws = new WsScores();
|
||||
$ws->setLog('greffe_'.$vue, $siren, 0, $ref);
|
||||
}
|
||||
$message .= '<br/><a href="./fichier/pdf/'.$item['url_acces'].
|
||||
'" target="_blank">Ouvrir le bilan millésime '.
|
||||
$item['millesime'].'</a>';
|
||||
} else {
|
||||
$message .= '<br/>Impossible de télécharger le fichier'.
|
||||
' auprès de notre partenaire.';
|
||||
}
|
||||
}
|
||||
print $message;
|
||||
} else {
|
||||
print '<br/>Erreur : '.$error;
|
||||
if (!INFOGREFFE_DEBUG) {
|
||||
$ws = new WsScores();
|
||||
$ws->setLog('greffe_'.$vue, $siren, 0,
|
||||
'Erreur '.$reponse['error']['errNum']);
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -1,82 +0,0 @@
|
||||
<?php
|
||||
|
||||
function infogreffeProduits($siren, $type)
|
||||
{
|
||||
|
||||
$req = '<demande>'.
|
||||
'<emetteur>'.
|
||||
'<code_abonne>'.INFOGREFFE_WS_USER.'</code_abonne>'.//85009006
|
||||
'<mot_passe>'.INFOGREFFE_WS_PASS.'</mot_passe>'.//
|
||||
'<reference_client>'.INFOGREFFE_WS_REF.'</reference_client>'.
|
||||
'<code_requete>'.
|
||||
'<type_profil>A</type_profil>'.
|
||||
'<origine_emetteur>IC</origine_emetteur>'.
|
||||
'<nature_requete>C</nature_requete>'.
|
||||
'<type_document>'.$type.'</type_document>'.// KB=Kbis, HQ=Histo, ST=Statut, AC=Acte, LE=Liste étab
|
||||
'<type_requete>S</type_requete>'.
|
||||
'<media>WS</media>'.
|
||||
'<mode_diffusion>'.
|
||||
'<mode type="T"/>'.
|
||||
'</mode_diffusion>'.
|
||||
'</code_requete>'.
|
||||
'</emetteur>'.
|
||||
'<commande>'.
|
||||
'<num_siren>'.$siren.'</num_siren>'.
|
||||
'</commande></demande>';
|
||||
$req = utf8_encode($req);
|
||||
|
||||
$client2 = new SoapClient(null, array(
|
||||
'location' => INFOGREFFE_WS_URL,
|
||||
'uri' => INFOGREFFE_WS_URI,
|
||||
'soap_version' => SOAP_1_1,
|
||||
'trace' => 1,
|
||||
'style' => SOAP_RPC,
|
||||
'use' => SOAP_ENCODED,
|
||||
));
|
||||
|
||||
try {
|
||||
$O = $client2->getProduitsWebServicesXML($req);
|
||||
$xml = implode('', (array)$O);
|
||||
}catch (SoapFault $soapFault) {
|
||||
$success = false;
|
||||
$response = $client2->__getLastResponse();
|
||||
$response = str_replace("<SOAP-ENV:Envelope xmlns:SOAP-ENV='http://schemas.xmlsoap.org/soap/envelope/' xmlns:SOAP-ENC='http://schemas.xmlsoap.org/soap/encoding/' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:xsd='http://www.w3.org/2001/XMLSchema'><SOAP-ENV:Body><ns0:getProduitsWebServicesXMLResponse xmlns:ns0='urn:local' SOAP-ENV:encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'><return xsi:type='xsd:string'>",'', $response);
|
||||
$xml = str_replace('</return></ns0:getProduitsWebServicesXMLResponse></SOAP-ENV:Body></SOAP-ENV:Envelope>','', $response);
|
||||
}
|
||||
|
||||
/*
|
||||
$post = '<?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="https://webservices.infogreffe.fr/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:getProduitsWebServicesXML><param0 xsi:type="xsd:string">'.$req.'</param0></ns1:getProduitsWebServicesXML></SOAP-ENV:Body></SOAP-ENV:Envelope>';
|
||||
$ch = curl_init();
|
||||
curl_setopt($ch, CURLOPT_URL, $url);
|
||||
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
|
||||
curl_setopt($ch, CURLOPT_COOKIEFILE,TRUE);
|
||||
curl_setopt($ch, CURLOPT_POST, TRUE);
|
||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
|
||||
curl_setopt($ch, CURLOPT_POSTFIELDS, $post);
|
||||
$output = curl_exec($ch);
|
||||
$xml = str_replace("<SOAP-ENV:Envelope xmlns:SOAP-ENV='http://schemas.xmlsoap.org/soap/envelope/' xmlns:SOAP-ENC='http://schemas.xmlsoap.org/soap/encoding/' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:xsd='http://www.w3.org/2001/XMLSchema'><SOAP-ENV:Body><ns0:getProduitsWebServicesXMLResponse xmlns:ns0='urn:local' SOAP-ENV:encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'><return xsi:type='xsd:string'>",'', $output);
|
||||
$xml = str_replace('</return></ns0:getProduitsWebServicesXMLResponse></SOAP-ENV:Body></SOAP-ENV:Envelope>','', $xml);
|
||||
*/
|
||||
return $xml;
|
||||
}
|
||||
|
||||
function getKbis($siren){
|
||||
global $client;
|
||||
//ini_set('default_socket_timeout', 120); //timeout 2 min
|
||||
$return = FALSE;
|
||||
try {
|
||||
$O = $client->getKbis($siren, 1,0);
|
||||
$kbis = $O['result'];
|
||||
$return = $kbis['Url'];
|
||||
if ( in_array(ENVIRONNEMENT, array('DEV', 'REC')) ) {
|
||||
$return = str_replace(
|
||||
'http://tville.scores-decisions.com/ws/data/kbis/',
|
||||
'http://tville.scores-decisions.com:8088/data/kbis/', $return);
|
||||
}
|
||||
} catch (SoapFault $fault) {
|
||||
require_once 'soaperror.php';
|
||||
processSoapFault($client,$fault,$_SESSION['tabInfo']);
|
||||
}
|
||||
return $return;
|
||||
}
|
||||
|
@ -1,101 +1,68 @@
|
||||
<?php
|
||||
require_once 'common/dates.php';
|
||||
require_once 'common/curl.php';
|
||||
require_once 'infogreffe/kbis.php';
|
||||
//Connection au webservice
|
||||
$client = new SoapClient(null, array(
|
||||
'trace' => 1,
|
||||
'soap_version' => SOAP_1_1,
|
||||
'location' => WEBSERVICE_URL,
|
||||
'uri' => WEBSERVICE_URI,
|
||||
'login' => $_SESSION['tabInfo']['login'],
|
||||
'password' => $_SESSION['tabInfo']['password'],
|
||||
));
|
||||
|
||||
isset($_REQUEST['siret'])? $siret=$_REQUEST['siret'] : $siret='';
|
||||
isset($_REQUEST['start']) ? $start = $_REQUEST['start'] : $start=0;
|
||||
$siret = isset($_REQUEST['siret']) ? $_REQUEST['siret'] : '';
|
||||
$start = isset($_REQUEST['start']) ? $_REQUEST['start'] : 0;
|
||||
$login = strtolower($_SESSION['tabInfo']['login']);
|
||||
$siren = substr($siret,0,9);
|
||||
$firephp->log($siren, 'siren');
|
||||
$firephp->log($start, 'start');
|
||||
|
||||
//Commande auprès du webservice
|
||||
if($start>0 && $start<3)
|
||||
{
|
||||
//$url = 'http://tville.scores-decisions.com:8088/data/kbis/kbis-699809174.pdf';
|
||||
$url = getKbis($siren);
|
||||
$firephp->info('getKbis');
|
||||
$firephp->log($url, 'url');
|
||||
if($url===FALSE)
|
||||
{
|
||||
require_once 'sendmail/mail.php';
|
||||
sendMail(
|
||||
"Commande de KBIS pour $login ($siren) : Erreur",
|
||||
'REQUEST='.EOL.print_r($_REQUEST,true).EOL.
|
||||
'SERVER='.EOL.print_r($_SERVER,true).EOL.
|
||||
'SESSION='.EOL.print_r($_SESSION,true).EOL.
|
||||
'ENV='.EOL.print_r($_ENV,true).EOL.
|
||||
'tabInfo='.print_r($tabInfo,true).EOL.
|
||||
'O='.print_r($O,true).EOL,
|
||||
//From
|
||||
array(
|
||||
'email' => 'contact@scores-decisions.com',
|
||||
'name' => 'Contact',
|
||||
),
|
||||
//TO
|
||||
array(
|
||||
0 => array(
|
||||
'email'=> 'support@scores-decisions.com',
|
||||
'name' => 'Support'
|
||||
)
|
||||
)
|
||||
);
|
||||
echo 'Une erreur est survenue. Merci de réssayez en cliquant '.
|
||||
'<a href="/?page=kbis&siret='.$siren.'">ici</a>';
|
||||
}else{
|
||||
echo $url;
|
||||
}
|
||||
// Commande auprès du webservice
|
||||
if ($start > 0 && $start < 3) {
|
||||
$url = getKbis($siren);
|
||||
if ($url === false) {
|
||||
require_once 'sendmail/mail.php';
|
||||
sendMail("Commande de KBIS pour $login ($siren) : Erreur",
|
||||
'REQUEST='.EOL.print_r($_REQUEST, true).EOL.
|
||||
'SERVER='.EOL.print_r($_SERVER, true).EOL.
|
||||
'SESSION='.EOL.print_r($_SESSION, true).EOL.
|
||||
'ENV='.EOL.print_r($_ENV, true).EOL.
|
||||
'tabInfo='.print_r($tabInfo, true).EOL.
|
||||
'O='.print_r($O, true).EOL,
|
||||
// From
|
||||
array('email' => 'contact@scores-decisions.com',
|
||||
'name' => 'Contact',
|
||||
),
|
||||
// To
|
||||
array(0 => array('email'=> 'support@scores-decisions.com',
|
||||
'name' => 'Support')));
|
||||
print 'Une erreur est survenue. Merci de réssayez en cliquant '.
|
||||
'<a href="/?page=kbis&siret='.$siren.'">ici</a>';
|
||||
} else {
|
||||
print $url;
|
||||
}
|
||||
} else if ($start >= 3) {
|
||||
// Après 2 essais, on tente de relancer la commande
|
||||
print 'Une erreur est survenue. Merci de réssayez en cliquant '.
|
||||
'<a href="/?page=kbis&siret='.$siren.'">ici</a>';
|
||||
} else if ($start == 0) {
|
||||
// Le fichier existe sur l'extranet
|
||||
if (file_exists(PATH_DATA.'/pdf/kbis-'.$siren.'.pdf') &&
|
||||
date('Ymd', filemtime(PATH_DATA.'/pdf/kbis-'.$siren.'.pdf')) ==
|
||||
date('Ymd') &&
|
||||
filesize(PATH_DATA.'/pdf/kbis-'.$siren.'.pdf') > 2000) {
|
||||
print '<u><a title="Cliquez ici pour visualiser le kbis"'.
|
||||
' target="_blank" href="/?page=actes&siret='.$siret.
|
||||
'&ref=kbis">Visualiser le Kbis'.
|
||||
' <img src="/img/icone_pdf.gif"></a></u>';
|
||||
$ws = new WsScores();
|
||||
$ws->setLog('kbis', $_REQUEST['siret'], 0, 'direct');
|
||||
} else {
|
||||
// Le fichier n'existe pas sur l'extranet
|
||||
// On check si le fichier est présent sur l'url
|
||||
$url = $_REQUEST['url'];
|
||||
$page = getUrl($url, '', '', '', false);
|
||||
if ($page['code'] == 408 ||
|
||||
$page['code'] == 400) {
|
||||
// Fichier non disponible
|
||||
print 'FALSE';
|
||||
} else {
|
||||
// Ecriture du fichier sur le serveur en local
|
||||
$body = $page['body'];
|
||||
$fp = fopen(PATH_DATA.'/pdf/kbis-'.$siren.'.pdf', 'w');
|
||||
fwrite($fp, $body);
|
||||
fclose($fp);
|
||||
print 'FALSE';
|
||||
}
|
||||
}
|
||||
}
|
||||
//Après 2 essais, on tente de relancer la commande
|
||||
elseif($start>=3)
|
||||
{
|
||||
echo 'Une erreur est survenue. Merci de réssayez en cliquant '.
|
||||
'<a href="/?page=kbis&siret='.$siren.'">ici</a>';
|
||||
}
|
||||
elseif($start==0)
|
||||
{
|
||||
$firephp->info('Test fichier');
|
||||
//Le fichier existe sur l'extranet, etc....
|
||||
if (file_exists(PATH_SITE.'/cache/kbis/kbis-'.$siren.'.pdf')
|
||||
&& date('Ymd', filemtime(PATH_SITE.'/cache/kbis/kbis-'.$siren.'.pdf'))==date('Ymd')
|
||||
&& filesize(PATH_SITE.'/cache/kbis/kbis-'.$siren.'.pdf')>2000
|
||||
)
|
||||
{
|
||||
$firephp->info('Check du fichier sur le serveur local');
|
||||
echo '<u><a title="Cliquez ici pour visualiser le kbis" target="_blank" href="./fichier/kbis/kbis-'.$siret.'.pdf">Visualiser le Kbis <img src="/img/icone_pdf.gif"></a></u>';
|
||||
$client->setLog('kbis', $_REQUEST['siret'], 0, 'direct');
|
||||
}
|
||||
//Le fichier n'existe pas sur l'extranet, etc...
|
||||
else
|
||||
{
|
||||
$firephp->info('Essai dl fichier');
|
||||
//Suppression du fichier si il existe
|
||||
if(file_exists(PATH_SITE.'/cache/kbis/kbis-'.$siren.'.pdf')) unlink( PATH_SITE.'/cache/kbis/kbis-'.$siren.'.pdf');
|
||||
//On check si le fichier est présent sur l'url
|
||||
$url = $_REQUEST['url'];
|
||||
$firephp->log($url, 'url');
|
||||
$page = getUrl($url, '', '', '', false);
|
||||
//Fichier non disponible
|
||||
if($page['code']==408 || $page['code']==400){
|
||||
echo 'FALSE';
|
||||
//Ecriture du fichier sur le serveur en local
|
||||
}else{
|
||||
$body = $page['body'];
|
||||
$fp = fopen(PATH_SITE.'/cache/kbis/kbis-'.$siren.'.pdf', 'w');
|
||||
fwrite($fp, $body);
|
||||
fclose($fp);
|
||||
echo 'FALSE';
|
||||
}
|
||||
}
|
||||
}
|
||||
exit;
|
||||
exit;
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,169 +1,127 @@
|
||||
<?php
|
||||
function bilanSimplifie2Normal($bilanRS) {
|
||||
$tabBS2BN=array('AH'=>'010',
|
||||
'AI'=>'012',
|
||||
'AJ'=>'014',
|
||||
'AK'=>'016',
|
||||
'AT'=>'028',
|
||||
'AU'=>'030',
|
||||
'BH'=>'040',
|
||||
'BI'=>'042',
|
||||
'BJ'=>'044',
|
||||
'BK'=>'048',
|
||||
'BT'=>'060',
|
||||
'BU'=>'062',
|
||||
'BV'=>'064',
|
||||
'BW'=>'066',
|
||||
'BX'=>'068',
|
||||
'BY'=>'070',
|
||||
'BZ'=>'072',
|
||||
'CA'=>'074',
|
||||
'CD'=>'080',
|
||||
'CE'=>'082',
|
||||
'CF'=>'084',
|
||||
'CG'=>'086',
|
||||
'CH'=>'092',
|
||||
'CI'=>'094',
|
||||
'CJ'=>'096',
|
||||
'CK'=>'098',
|
||||
'CO'=>'110',
|
||||
'1A'=>'112',
|
||||
'DA'=>'120',
|
||||
'DC'=>'124',
|
||||
'DD'=>'126',
|
||||
'DF'=>'130',
|
||||
'DG'=>'132',
|
||||
'DH'=>'134',
|
||||
'DI'=>'136',
|
||||
'DK'=>'140',
|
||||
'DL'=>'142',
|
||||
'DR'=>'154',
|
||||
'DP'=>'154',
|
||||
'DU'=>'156',
|
||||
'DV'=>'169',
|
||||
'DW'=>'164',
|
||||
'DX'=>'166',
|
||||
'EA'=>'172-169',
|
||||
'EB'=>'174',
|
||||
'EC'=>'176',
|
||||
'EE'=>'180',
|
||||
'EH'=>'156-195',
|
||||
'FA'=>'210-209',
|
||||
'FB'=>'209',
|
||||
'FC'=>'210',
|
||||
'FD'=>'214-215',
|
||||
'FE'=>'215',
|
||||
'FF'=>'214',
|
||||
'FH'=>'217',
|
||||
'FI'=>'218',
|
||||
'FK'=>'209+215+217',
|
||||
'FL'=>'210+214+218',
|
||||
'FM'=>'222',
|
||||
'FN'=>'224',
|
||||
'FO'=>'226',
|
||||
'FQ'=>'230',
|
||||
'FR'=>'232',
|
||||
'FS'=>'234',
|
||||
'FT'=>'236',
|
||||
'FU'=>'238',
|
||||
'FV'=>'240',
|
||||
'FW'=>'242',
|
||||
'FX'=>'244',
|
||||
'FY'=>'250',
|
||||
'FZ'=>'252',
|
||||
'GA'=>'254',
|
||||
'GE'=>'262',
|
||||
'GF'=>'264',
|
||||
'GG'=>'270',
|
||||
'GP'=>'280',
|
||||
'GU'=>'294',
|
||||
'GW'=>'270+280+294',
|
||||
'HD'=>'290',
|
||||
'HH'=>'300',
|
||||
'HI'=>'290-300',
|
||||
'HK'=>'306',
|
||||
'HL'=>'232+280+290',
|
||||
'HM'=>'264+294+300+306',
|
||||
'HN'=>'310',
|
||||
'YY'=>'374',
|
||||
'YZ'=>'378',
|
||||
'YP'=>'376',
|
||||
);
|
||||
// -------------------------------------------------------------------------- //
|
||||
// bilanSimplifie2Normal
|
||||
// -------------------------------------------------------------------------- //
|
||||
function bilanSimplifie2Normal($bilanRS)
|
||||
{
|
||||
$tabBS2BN =
|
||||
array('AH' => '010', 'AI' => '012', 'AJ' => '014', 'AK' => '016',
|
||||
'AT' => '028', 'AU' => '030', 'BH' => '040', 'BI' => '042',
|
||||
'BJ' => '044', 'BK' => '048', 'BT' => '060', 'BU' => '062',
|
||||
'BV' => '064', 'BW' => '066', 'BX' => '068', 'BY' => '070',
|
||||
'BZ' => '072', 'CA' => '074', 'CD' => '080', 'CE' => '082',
|
||||
'CF' => '084', 'CG' => '086', 'CH' => '092', 'CI' => '094',
|
||||
'CJ' => '096', 'CK' => '098', 'CO' => '110', '1A' => '112',
|
||||
'DA' => '120', 'DC' => '124', 'DD' => '126', 'DF' => '130',
|
||||
'DG' => '132', 'DH' => '134', 'DI' => '136', 'DK' => '140',
|
||||
'DL' => '142', 'DR' => '154', 'DP' => '154', 'DU' => '156',
|
||||
'DV' => '169', 'DW' => '164', 'DX' => '166', 'EA' => '172-169',
|
||||
'EB' => '174', 'EC' => '176', 'EE' => '180', 'EH' => '156-195',
|
||||
'FA' => '210-209',
|
||||
'FB' => '209', 'FC' => '210', 'FD' => '214-215',
|
||||
'FE' => '215', 'FF' => '214', 'FH' => '217', 'FI' => '218',
|
||||
'FK' => '209+215+217',
|
||||
'FL' => '210+214+218',
|
||||
'FM' => '222', 'FN' => '224', 'FO' => '226', 'FQ' => '230',
|
||||
'FR' => '232', 'FS' => '234', 'FT' => '236', 'FU' => '238',
|
||||
'FV' => '240', 'FW' => '242', 'FX' => '244', 'FY' => '250',
|
||||
'FZ' => '252', 'GA' => '254', 'GE' => '262', 'GF' => '264',
|
||||
'GG' => '270', 'GP' => '280', 'GU' => '294',
|
||||
'GW' => '270+280+294',
|
||||
'HD' => '290', 'HH' => '300', 'HI' => '290-300', 'HK' => '306',
|
||||
'HL' => '232+280+290',
|
||||
'HM' => '264+294+300+306',
|
||||
'HN' => '310', 'YY' => '374', 'YZ' => '378', 'YP' => '376');
|
||||
|
||||
$bilanRN=array();
|
||||
foreach ($tabBS2BN as $posteRN => $formule) {
|
||||
if (preg_match('/\+|\-/', $formule)) {
|
||||
$tabTmp=preg_split('/\+|\-/', $formule, -1, PREG_SPLIT_OFFSET_CAPTURE);
|
||||
//$bilanRN[$posteRN]=0;
|
||||
$scalc='';
|
||||
foreach ($tabTmp as $i=>$tab) {
|
||||
if ($i==0) {
|
||||
$bilanRN[$posteRN]=$bilanRS[$tab[0]];
|
||||
$scalc.=$bilanRS[$tab[0]];
|
||||
}
|
||||
else {
|
||||
$signe=$formule[$tab[1]-1];
|
||||
$scalc.=$signe;
|
||||
if ($signe=='+') $bilanRN[$posteRN]+=$bilanRS[$tab[0]];
|
||||
elseif ($signe=='-') $bilanRN[$posteRN]-=$bilanRS[$tab[0]];
|
||||
$scalc.=$bilanRS[$tab[0]];
|
||||
}
|
||||
}
|
||||
$bilanRN[$posteRN]=$bilanRN[$posteRN];
|
||||
}
|
||||
else $bilanRN[$posteRN]=$bilanRS[$formule];
|
||||
}
|
||||
if ($bilanRS['240']<>0) {
|
||||
$bilanRN['BL']=$bilanRS['050'];
|
||||
$bilanRN['BM']=$bilanRS['052'];
|
||||
} else {
|
||||
$bilanRN['BN']=$bilanRS['050'];
|
||||
$bilanRN['BO']=$bilanRS['052'];
|
||||
}
|
||||
$bilanRN = array();
|
||||
foreach ($tabBS2BN as $posteRN => $formule) {
|
||||
if (preg_match('/\+|\-/', $formule)) {
|
||||
$tabTmp =
|
||||
preg_split('/\+|\-/', $formule, -1, PREG_SPLIT_OFFSET_CAPTURE);
|
||||
//$bilanRN[$posteRN] = 0;
|
||||
$scalc = '';
|
||||
foreach ($tabTmp as $i => $tab) {
|
||||
if ($i ==0 ) {
|
||||
$bilanRN[$posteRN] = $bilanRS[$tab[0]];
|
||||
$scalc .= $bilanRS[$tab[0]];
|
||||
} else {
|
||||
$signe = $formule[$tab[1] - 1];
|
||||
$scalc .= $signe;
|
||||
if ($signe == '+') {
|
||||
$bilanRN[$posteRN] += $bilanRS[$tab[0]];
|
||||
} else if ($signe == '-') {
|
||||
$bilanRN[$posteRN] -= $bilanRS[$tab[0]];
|
||||
}
|
||||
$scalc .= $bilanRS[$tab[0]];
|
||||
}
|
||||
}
|
||||
$bilanRN[$posteRN] = $bilanRN[$posteRN];
|
||||
} else {
|
||||
$bilanRN[$posteRN] = $bilanRS[$formule];
|
||||
}
|
||||
}
|
||||
if ($bilanRS['240'] != 0) {
|
||||
$bilanRN['BL'] = $bilanRS['050'];
|
||||
$bilanRN['BM'] = $bilanRS['052'];
|
||||
} else {
|
||||
$bilanRN['BN'] = $bilanRS['050'];
|
||||
$bilanRN['BO'] = $bilanRS['052'];
|
||||
}
|
||||
|
||||
if ($bilanRS['070']<>0 || $bilanRS['074']<>0 || $bilanRS['052']<>0 || $bilanRS['062']<>0)
|
||||
$bilanRN['GC']=$bilanRS['256'];
|
||||
elseif ($bilanRS['070']==0 && $bilanRS['074']==0 && $bilanRS['052']==0 && $bilanRS['062']==0 && $bilanRS['254']<>0)
|
||||
$bilanRN['GD']=$bilanRS['256'];
|
||||
if ($bilanRS['070'] != 0 || $bilanRS['074'] != 0 ||
|
||||
$bilanRS['052'] != 0 || $bilanRS['062'] != 0) {
|
||||
$bilanRN['GC'] = $bilanRS['256'];
|
||||
} else if ($bilanRS['070'] == 0 && $bilanRS['074'] == 0 &&
|
||||
$bilanRS['052'] == 0 && $bilanRS['062'] == 0 &&
|
||||
$bilanRS['254'] != 0) {
|
||||
$bilanRN['GD'] = $bilanRS['256'];
|
||||
}
|
||||
|
||||
if ($bilanRS['584']<>0) {
|
||||
$bilanRN['HB']=$bilanRS['584'];
|
||||
$bilanRN['HA']=$bilanRS['290']-$bilanRS['584'];
|
||||
} else
|
||||
$bilanRN['HA']=$bilanRS['290'];
|
||||
if ($bilanRS['584'] != 0) {
|
||||
$bilanRN['HB'] = $bilanRS['584'];
|
||||
$bilanRN['HA'] = $bilanRS['290'] - $bilanRS['584'];
|
||||
} else {
|
||||
$bilanRN['HA'] = $bilanRS['290'];
|
||||
}
|
||||
|
||||
if ($bilanRS['582']<>0) {
|
||||
$bilanRN['HF']=$bilanRS['582'];
|
||||
$bilanRN['HE']=$bilanRS['582']-$bilanRS['300'];
|
||||
} else
|
||||
$bilanRN['HE']=$bilanRS['300'];
|
||||
if ($bilanRS['582'] != 0) {
|
||||
$bilanRN['HF'] = $bilanRS['582'];
|
||||
$bilanRN['HE'] = $bilanRS['582'] - $bilanRS['300'];
|
||||
} else {
|
||||
$bilanRN['HE'] = $bilanRS['300'];
|
||||
}
|
||||
|
||||
return $bilanRN;
|
||||
return $bilanRN;
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------- //
|
||||
// bilanMonnaie
|
||||
// -------------------------------------------------------------------------- //
|
||||
function bilanMonnaie($value, $unite = '')
|
||||
{
|
||||
switch($unite)
|
||||
{
|
||||
case 'K':
|
||||
$div = 1000;
|
||||
break;
|
||||
case 'M':
|
||||
$div = 1000*1000;
|
||||
break;
|
||||
default:
|
||||
case '':
|
||||
$div = 1;
|
||||
break;
|
||||
}
|
||||
if(isset($value) && !empty($value)){
|
||||
return number_format($value/$div, 0, '', ' ');
|
||||
}else{
|
||||
return '-';
|
||||
}
|
||||
switch ($unite) {
|
||||
case 'K':
|
||||
$div = 1000;
|
||||
break;
|
||||
case 'M':
|
||||
$div = 1000*1000;
|
||||
break;
|
||||
default:
|
||||
case '':
|
||||
$div = 1;
|
||||
break;
|
||||
}
|
||||
if (empty($value) == false) {
|
||||
return number_format($value / $div, 0, '', ' ');
|
||||
} else {
|
||||
return '-';
|
||||
}
|
||||
}
|
||||
|
||||
function dMontant(&$tab, $montant, $unite = '')
|
||||
// -------------------------------------------------------------------------- //
|
||||
// dMontant
|
||||
// -------------------------------------------------------------------------- //
|
||||
function dMontant($tab, $montant, $unite = '')
|
||||
{
|
||||
if ($montant == '' || isset($tab[$montant]) == false) {
|
||||
return '';
|
||||
@ -181,12 +139,28 @@ function dMontant(&$tab, $montant, $unite = '')
|
||||
return number_format($tab[$montant] / $div, 0, '', ' ');
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------------- //
|
||||
|
||||
/**
|
||||
* Retourne un tableau des postes du bilan sous forme clé valeur
|
||||
* @param array $tabPostes
|
||||
*/
|
||||
function bilanPostes($tabPostes)
|
||||
{
|
||||
$tab = array();
|
||||
foreach( $tabPostes as $poste ){
|
||||
$tab[$poste->id] = $poste->val;
|
||||
}
|
||||
return $tab;
|
||||
}
|
||||
|
||||
|
||||
// -------------------------------------------------------------------------- //
|
||||
// liasse2xml
|
||||
// --------------------------------------------------------------------------- //
|
||||
// -------------------------------------------------------------------------- //
|
||||
function liasse2xml(&$val, &$liasse, &$tableTexteBilan)
|
||||
{
|
||||
global $tabBilan;
|
||||
global $tabPostes;
|
||||
$tabBilan = &$tabPostes;
|
||||
global $unite;
|
||||
|
||||
if (is_array($val)) {
|
||||
@ -281,4 +255,3 @@ function liasse2xml(&$val, &$liasse, &$tableTexteBilan)
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,80 +1,36 @@
|
||||
<?php
|
||||
isset($_REQUEST['q']) ? $q = $_REQUEST['q'] : $q = '';
|
||||
$q = (isset($_REQUEST['q']) == true) ? $_REQUEST['q'] : '';
|
||||
$params = explode('/', $q);
|
||||
$action = $params[0];
|
||||
$element = $params[1];
|
||||
if (isset($params[1]) == true) {
|
||||
$element = $params[1];
|
||||
}
|
||||
|
||||
require_once realpath(dirname(__FILE__)).'/functions.php';
|
||||
require_once 'cache/cache.php';
|
||||
require_once 'scoresws/scoresws.php';
|
||||
|
||||
$mil = false;
|
||||
|
||||
if (($siret*1)==0 || ($siren*1)<100){ $fileName = $page.'-'.$idEntreprise;
|
||||
}else{ $fileName = $page.'-'.$siret; }
|
||||
|
||||
if(isset($_REQUEST['mil']))
|
||||
{
|
||||
$mil = explode(',',$_REQUEST['mil']);
|
||||
$annee = substr($mil[0],-10);
|
||||
$annee = str_replace('/', '', $annee);
|
||||
$indice = str_replace('/', '', substr($mil[0], 0, 11));
|
||||
$fileName.= '-'.$indice;
|
||||
if (isset($_REQUEST['mil']) == true) {
|
||||
$mil = $_REQUEST['mil'];
|
||||
} else {
|
||||
$mil = false;
|
||||
}
|
||||
|
||||
isset($_REQUEST['unit']) ? $unite = $_REQUEST['unit'] : $unite = '';
|
||||
$ret = scoresws_listeBilans($siret, $siren, $idEntreprise, $mil);
|
||||
|
||||
$typBil = array(
|
||||
'C'=>'Consolidé',
|
||||
'N'=>'',
|
||||
'S'=>'Réel Simplifié',
|
||||
'B'=> 'Banque',
|
||||
'A'=>'Assurance'
|
||||
);
|
||||
|
||||
cache_filename($fileName);
|
||||
if( cache_exist() && !hasModeEdition() )
|
||||
{
|
||||
$tabBilans = cache_get('tabBilans');
|
||||
$tabBilan = cache_get('tabBilan');
|
||||
}else{
|
||||
try {
|
||||
$O = $client->getListeBilans($siren);
|
||||
$tabBilans = $O['result'];
|
||||
//Tri du tableau
|
||||
if(count($tabBilans)>0)
|
||||
{
|
||||
foreach($tabBilans as $key => $bilan)
|
||||
{
|
||||
$cle[$key] = $key[0].substr($key, -4);
|
||||
$dateProvPartenaire[$key] = $bilan['dateProvPartenaire'];
|
||||
$dateInsert[$key] = $bilan['dateInsert'];
|
||||
$dureeExercice[$key] = $bilan['dureeExercice'];
|
||||
$dateExercicePre[$key] = $bilan['dateExercicePre'];
|
||||
$monnaie[$key] = $bilan['monnaie'];
|
||||
$source[$key] = $bilan['source'];
|
||||
}
|
||||
array_multisort($cle, SORT_DESC, $tabBilans);
|
||||
}
|
||||
cache_delete();
|
||||
cache_add('tabBilans', $tabBilans);
|
||||
if (isset($_REQUEST['mil']))
|
||||
{
|
||||
$O = $client->getBilan($siren, substr($mil[0],-10), substr($mil[0],0,1), $mil[1]);
|
||||
$tabBilan = $O['result'];
|
||||
cache_add('tabBilan',$tabBilan);
|
||||
}
|
||||
} catch (SoapFault $fault) {
|
||||
require_once 'soaperror.php';
|
||||
processSoapFault($client,$fault,$_SESSION['tabInfo']);
|
||||
die();
|
||||
}
|
||||
if ($mil !== false) {
|
||||
$tabBilans = $ret[0];
|
||||
$tabBilan = $ret[1];
|
||||
$annee = substr($mil, 1, 4);
|
||||
} else {
|
||||
$tabBilans = $ret[0];
|
||||
}
|
||||
|
||||
switch ($action)
|
||||
{
|
||||
case 'export':
|
||||
require_once realpath(dirname(__FILE__)).'/liassexls.php';
|
||||
exit; break;
|
||||
if (isset($tabBilan->POSTES) == true) {
|
||||
$tabPostes = bilanPostes($tabBilan->POSTES->item);
|
||||
FB::log($tabPostes, 'tabPostes');
|
||||
}
|
||||
|
||||
|
||||
if ($action == 'export') {
|
||||
require_once realpath(dirname(__FILE__)).'/liassexls.php';
|
||||
exit;
|
||||
}
|
||||
|
@ -1,115 +1,104 @@
|
||||
<?php
|
||||
set_time_limit(120);
|
||||
$writerMode = array('Excel5', 'Excel2007');
|
||||
if (!isset($writerType) || !in_array($writerType, $writerMode))
|
||||
{
|
||||
$writerType = 'Excel5';
|
||||
if (isset($writerType) == false || !in_array($writerType, $writerMode)) {
|
||||
$writerType = 'Excel5';
|
||||
}
|
||||
switch($writerType)
|
||||
{
|
||||
case 'Excel5':
|
||||
$extension = '.xls';
|
||||
break;
|
||||
case 'Excel2007':
|
||||
$extension = '.xlsx';
|
||||
break;
|
||||
switch ($writerType) {
|
||||
case 'Excel5':
|
||||
$extension = '.xls';
|
||||
break;
|
||||
case 'Excel2007':
|
||||
$extension = '.xlsx';
|
||||
break;
|
||||
}
|
||||
$xlsWriteFile = PATH_SITE . '/cache/liasse/' . $fileName . $extension;
|
||||
$xlsWriteFile = PATH_SITE.'/cache/liasse/'.$fileName.$extension;
|
||||
|
||||
if( !file_exists($xlsWriteFile) )
|
||||
{
|
||||
$values = $tabBilan;
|
||||
if (file_exists($xlsWriteFile) == false) {
|
||||
$values = $tabBilan;
|
||||
|
||||
if (!isset($element) || empty($element)){
|
||||
$element = 'bdf_liasse_template';
|
||||
}
|
||||
if (empty($element)) {
|
||||
$element = 'bdf_liasse_template';
|
||||
}
|
||||
|
||||
switch($element)
|
||||
{
|
||||
case 'bdf_liasse_template':
|
||||
//Ajout champs spéciaux
|
||||
$values['TEXTE_SIRET'] = 'Siret : '.$tabBilan['SIREN'];
|
||||
$values['TEXTE_RS'] = 'Société : '.$_SESSION['tabInfo']['entrep']['raisonSociale'];
|
||||
$values['TEXTE_DATEN'] = 'Date de clôture : le ' .
|
||||
substr($tabBilan['DATE_CLOTURE'],6,2) . '/' .
|
||||
substr($tabBilan['DATE_CLOTURE'],4,2) . '/' .
|
||||
substr($tabBilan['DATE_CLOTURE'],0,4) .
|
||||
' sur ' . $tabBilan['DUREE_MOIS'] . ' mois';
|
||||
break;
|
||||
//Bilan Normal Cerfa
|
||||
case 'liasse_2050':
|
||||
$values['TEXTE_SIRET'] = $tabBilan['SIREN'];
|
||||
$values['TEXTE_RS'] = $_SESSION['tabInfo']['entrep']['raisonSociale'];
|
||||
$values['TEXTE_DATEN'] =
|
||||
substr($tabBilan['DATE_CLOTURE'],6,2) . '/' .
|
||||
substr($tabBilan['DATE_CLOTURE'],4,2) . '/' .
|
||||
substr($tabBilan['DATE_CLOTURE'],0,4);
|
||||
$values['TEXTE_DUREEN'] = $tabBilan['DUREE_MOIS'];
|
||||
$values['TEXTE_DUREEN1'] = $tabBilan['DUREE_MOIS_PRE'];
|
||||
break;
|
||||
//Bilan Simplifié Cerfa
|
||||
case 'liasse_2033':
|
||||
$values['TEXTE_SIRET'] = $tabBilan['SIREN'];
|
||||
$values['TEXTE_RS'] = $_SESSION['tabInfo']['entrep']['raisonSociale'];
|
||||
$values['TEXTE_DATEN'] =
|
||||
substr($tabBilan['DATE_CLOTURE'],6,2) . '/' .
|
||||
substr($tabBilan['DATE_CLOTURE'],4,2) . '/' .
|
||||
substr($tabBilan['DATE_CLOTURE'],0,4);
|
||||
$values['TEXTE_DATEN1'] =
|
||||
substr($tabBilan['DATE_CLOTURE_PRE'],6,2) . '/' .
|
||||
substr($tabBilan['DATE_CLOTURE_PRE'],4,2) . '/' .
|
||||
substr($tabBilan['DATE_CLOTURE_PRE'],0,4);
|
||||
$values['TEXTE_DUREEN'] = $tabBilan['DUREE_MOIS'];
|
||||
$values['TEXTE_DUREEN1'] = $tabBilan['DUREE_MOIS_PRE'];
|
||||
break;
|
||||
}
|
||||
switch ($element) {
|
||||
case 'bdf_liasse_template':
|
||||
// Ajout champs spéciaux
|
||||
$values['TEXTE_SIRET'] = 'Siret : '.$tabBilan['SIREN'];
|
||||
$values['TEXTE_RS'] =
|
||||
'Société : '.$_SESSION['tabInfo']['entrep']['raisonSociale'];
|
||||
$values['TEXTE_DATEN'] = 'Date de clôture : le '.
|
||||
substr($tabBilan['DATE_CLOTURE'], 6, 2).'/'.
|
||||
substr($tabBilan['DATE_CLOTURE'], 4, 2).'/'.
|
||||
substr($tabBilan['DATE_CLOTURE'], 0, 4).
|
||||
' sur '.$tabBilan['DUREE_MOIS'].' mois';
|
||||
break;
|
||||
case 'liasse_2050':
|
||||
// Bilan Normal Cerfa
|
||||
$values['TEXTE_SIRET'] = $tabBilan['SIREN'];
|
||||
$values['TEXTE_RS'] = $_SESSION['tabInfo']['entrep']['raisonSociale'];
|
||||
$values['TEXTE_DATEN'] =
|
||||
substr($tabBilan['DATE_CLOTURE'], 6, 2).'/'.
|
||||
substr($tabBilan['DATE_CLOTURE'], 4, 2).'/'.
|
||||
substr($tabBilan['DATE_CLOTURE'], 0, 4);
|
||||
$values['TEXTE_DUREEN' ] = $tabBilan['DUREE_MOIS'];
|
||||
$values['TEXTE_DUREEN1'] = $tabBilan['DUREE_MOIS_PRE'];
|
||||
break;
|
||||
case 'liasse_2033':
|
||||
// Bilan Simplifié Cerfa
|
||||
$values['TEXTE_SIRET'] = $tabBilan['SIREN'];
|
||||
$values['TEXTE_RS'] = $_SESSION['tabInfo']['entrep']['raisonSociale'];
|
||||
$values['TEXTE_DATEN'] =
|
||||
substr($tabBilan['DATE_CLOTURE'], 6, 2).'/'.
|
||||
substr($tabBilan['DATE_CLOTURE'], 4, 2).'/'.
|
||||
substr($tabBilan['DATE_CLOTURE'], 0, 4);
|
||||
$values['TEXTE_DATEN1'] =
|
||||
substr($tabBilan['DATE_CLOTURE_PRE'], 6, 2).'/'.
|
||||
substr($tabBilan['DATE_CLOTURE_PRE'], 4, 2).'/'.
|
||||
substr($tabBilan['DATE_CLOTURE_PRE'], 0, 4);
|
||||
$values['TEXTE_DUREEN' ] = $tabBilan['DUREE_MOIS'];
|
||||
$values['TEXTE_DUREEN1'] = $tabBilan['DUREE_MOIS_PRE'];
|
||||
break;
|
||||
}
|
||||
|
||||
$iniFile = $element.'.ini';
|
||||
$xlsFile = $element.'.xls';
|
||||
//Association
|
||||
$dataAssoc = parse_ini_file(realpath(dirname(__FILE__)).'/'.$iniFile, true);
|
||||
$assoc = array();
|
||||
foreach($dataAssoc as $sheet => $dataCell)
|
||||
{
|
||||
foreach($dataCell as $key => $cell)
|
||||
{
|
||||
$assoc[$key] = array($sheet, $cell);
|
||||
}
|
||||
}
|
||||
//Ecriture dans modèles
|
||||
require_once 'lib/phpexcel/PHPExcel.php';
|
||||
$objPHPexcel = PHPExcel_IOFactory::load(realpath(dirname(__FILE__)).'/'.$xlsFile);
|
||||
foreach( $assoc as $key => $position )
|
||||
{
|
||||
$sheet = $position[0];
|
||||
$cell = $position[1];
|
||||
if (array_key_exists($key, $values))
|
||||
{
|
||||
$objWorksheet = $objPHPexcel->getSheet($sheet);
|
||||
$objWorksheet->getCell($cell)->setValue($values[$key]);
|
||||
}
|
||||
/*
|
||||
else
|
||||
{
|
||||
$objWorksheet = $objPHPexcel->getSheet($sheet);
|
||||
$objWorksheet->getCell($cell)->setValue('_');
|
||||
//echo "La clé $key n'a pas de valeur!<br/>";
|
||||
}
|
||||
*/
|
||||
}
|
||||
$objPHPexcel->setActiveSheetIndex(0);
|
||||
$objWriter = PHPExcel_IOFactory::createWriter($objPHPexcel, $writerType);
|
||||
$objWriter->save($xlsWriteFile);
|
||||
$iniFile = $element.'.ini';
|
||||
$xlsFile = $element.'.xls';
|
||||
// Association
|
||||
$dataAssoc = parse_ini_file(realpath(dirname(__FILE__)).'/'.$iniFile, true);
|
||||
$assoc = array();
|
||||
foreach ($dataAssoc as $sheet => $dataCell) {
|
||||
foreach ($dataCell as $key => $cell) {
|
||||
$assoc[$key] = array($sheet, $cell);
|
||||
}
|
||||
}
|
||||
// Ecriture dans modèles
|
||||
require_once 'lib/phpexcel/PHPExcel.php';
|
||||
$objPHPexcel =
|
||||
PHPExcel_IOFactory::load(realpath(dirname(__FILE__)).'/'.$xlsFile);
|
||||
foreach ($assoc as $key => $position) {
|
||||
$sheet = $position[0];
|
||||
$cell = $position[1];
|
||||
if (array_key_exists($key, $values)) {
|
||||
$objWorksheet = $objPHPexcel->getSheet($sheet);
|
||||
$objWorksheet->getCell($cell)->setValue($values[$key]);
|
||||
} /* else {
|
||||
$objWorksheet = $objPHPexcel->getSheet($sheet);
|
||||
$objWorksheet->getCell($cell)->setValue('_');
|
||||
//print "La clé $key n'a pas de valeur!<br/>";
|
||||
}
|
||||
*/
|
||||
}
|
||||
$objPHPexcel->setActiveSheetIndex(0);
|
||||
$objWriter = PHPExcel_IOFactory::createWriter($objPHPexcel, $writerType);
|
||||
$objWriter->save($xlsWriteFile);
|
||||
}
|
||||
|
||||
if( file_exists($xlsWriteFile) )
|
||||
{
|
||||
$client->setLog('liassexls', $siren, 0, '');
|
||||
echo '<a href="fichier/liasse/'.basename($xlsWriteFile).
|
||||
'" target="_blank">Télécharger le fichier excel.</a>';
|
||||
if (file_exists($xlsWriteFile)) {
|
||||
$ws = new WsScores();
|
||||
$ws->setLog('liassexls', $siren, 0, '');
|
||||
print '<a href="fichier/liasse/'.basename($xlsWriteFile).
|
||||
'" target="_blank">Télécharger le fichier excel.</a>';
|
||||
} else {
|
||||
print "Erreur lors de la construction du fichier.";
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "Erreur lors de la construction du fichier.";
|
||||
}
|
||||
?>
|
||||
?>
|
||||
|
@ -24,10 +24,10 @@ function activeMenu($page){
|
||||
$activeMenu[] = array('pieces', 'kbis2', 'kbis', 'greffes', 'privileges');
|
||||
//Options
|
||||
$activeMenu[] = array('moncompte', 'surveillance', 'portefeuille',
|
||||
'greffescmd', 'international_commandes',
|
||||
'greffescmd', 'international_commandes',
|
||||
'giant_commandes',
|
||||
'administration', 'stats', 'survliste');
|
||||
|
||||
|
||||
$menuIndex = 0;
|
||||
foreach ($activeMenu as $key => $pages)
|
||||
{
|
||||
@ -264,12 +264,13 @@ function defineMenu(){
|
||||
'href' => 'menu_href_internationalcmd',
|
||||
'perm' => array('list' => array( 'INTERNATIONAL' ),
|
||||
'hidden' => true));
|
||||
|
||||
$children[] = array('data' => 'Commandes Giant',
|
||||
if ($_SESSION['tabInfo']['international_giant'] == 1) {
|
||||
$children[] = array('data' => 'Commandes Giant',
|
||||
'href' => 'menu_href_giantcmd',
|
||||
'perm' => array('list' => array( 'INTERNATIONAL' ),
|
||||
'hidden' => true));
|
||||
$children[] = array('data' => 'Statistiques',
|
||||
}
|
||||
$children[] = array('data' => 'Statistiques',
|
||||
'href' => 'menu_href_stats');
|
||||
$children[] = array('data' => 'Surveillances',
|
||||
'href' => 'menu_href_survliste');
|
||||
|
@ -2,118 +2,101 @@
|
||||
require_once realpath(dirname(__FILE__)).'/menu_liens.php';
|
||||
require_once realpath(dirname(__FILE__)).'/defineMenu.php';
|
||||
|
||||
// -------------------------------------------------------------------------- //
|
||||
// menu
|
||||
// -------------------------------------------------------------------------- //
|
||||
function menu()
|
||||
{
|
||||
$menu = array();
|
||||
$menu = defineMenu();
|
||||
$html = '';
|
||||
foreach($menu as $item)
|
||||
{
|
||||
$href = false;
|
||||
//Gestion des permissions sur le menu
|
||||
$displayMenu = true;
|
||||
if( isset($item['perm']) )
|
||||
{
|
||||
$permStatut = false;
|
||||
foreach($item['perm']['list'] as $perm)
|
||||
{
|
||||
$permStatut = $permStatut || hasPerm($perm);
|
||||
}
|
||||
if(!$permStatut)
|
||||
{
|
||||
if( !isset($item['perm']['hidden']) ||
|
||||
$item['perm']['hidden']===false )
|
||||
{
|
||||
$displayMenu = true;
|
||||
}
|
||||
elseif( isset($item['perm']['hidden']) &&
|
||||
$item['perm']['hidden']===true )
|
||||
{
|
||||
$displayMenu = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
$menu = array();
|
||||
$menu = defineMenu();
|
||||
$html = '';
|
||||
foreach ($menu as $item) {
|
||||
$href = false;
|
||||
// Gestion des permissions sur le menu
|
||||
$displayMenu = true;
|
||||
if (isset($item['perm'])) {
|
||||
$permStatut = false;
|
||||
foreach ($item['perm']['list'] as $perm) {
|
||||
$permStatut = $permStatut || hasPerm($perm);
|
||||
}
|
||||
if ($permStatut == false) {
|
||||
if (isset($item['perm']['hidden']) == false ||
|
||||
$item['perm']['hidden'] === false) {
|
||||
$displayMenu = true;
|
||||
} else if (isset($item['perm']['hidden']) &&
|
||||
$item['perm']['hidden'] === true) {
|
||||
$displayMenu = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if($displayMenu)
|
||||
{
|
||||
$html.= '<h3><a href="#">'.$item['data'].'</a></h3>'."\n";
|
||||
$html.= '<div>'."\n";
|
||||
$html.= '<ul>'."\n";
|
||||
foreach($item['children'] as $children)
|
||||
{
|
||||
$html.= menu_children($children);
|
||||
}
|
||||
$html.= '</ul>'."\n";
|
||||
$html.= '</div>'."\n";
|
||||
}
|
||||
}
|
||||
return $html;
|
||||
if ($displayMenu) {
|
||||
$html .= '<h3><a href="#">'.$item['data'].'</a></h3>'."\n";
|
||||
$html .= '<div>'."\n";
|
||||
$html .= '<ul>'."\n";
|
||||
foreach ($item['children'] as $children) {
|
||||
$html .= menu_children($children);
|
||||
}
|
||||
$html .= '</ul>'."\n";
|
||||
$html .= '</div>'."\n";
|
||||
}
|
||||
}
|
||||
return $html;
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------- //
|
||||
// menu_children
|
||||
// -------------------------------------------------------------------------- //
|
||||
function menu_children($children)
|
||||
{
|
||||
global $firephp;
|
||||
//Génération du lien
|
||||
$href = false;
|
||||
if( $children['href']!='' && function_exists($children['href']) )
|
||||
{
|
||||
$href = $children['href']();
|
||||
}
|
||||
//Traitement des permissions
|
||||
if( isset($children['perm']) )
|
||||
{
|
||||
$permStatut = false;
|
||||
foreach($children['perm']['list'] as $perm)
|
||||
{
|
||||
$permStatut = $permStatut || hasPerm($perm);
|
||||
}
|
||||
if(!$permStatut)
|
||||
{
|
||||
if( !isset($children['perm']['hidden']) ||
|
||||
$children['perm']['hidden']===false )
|
||||
{
|
||||
$href = '#';
|
||||
}
|
||||
elseif( isset($children['perm']['hidden']) &&
|
||||
$children['perm']['hidden']===true )
|
||||
{
|
||||
$href = false;
|
||||
}
|
||||
}
|
||||
// Génération du lien
|
||||
$href = false;
|
||||
if ($children['href'] != '' && function_exists($children['href'])) {
|
||||
$href = $children['href']();
|
||||
}
|
||||
// Traitement des permissions
|
||||
require_once 'user/permissions.php';
|
||||
if (isset($children['perm'])) {
|
||||
$permStatut = false;
|
||||
foreach ($children['perm']['list'] as $perm) {
|
||||
$permStatut = $permStatut || hasPerm($perm);
|
||||
}
|
||||
if ($permStatut == false) {
|
||||
if (isset($children['perm']['hidden']) == false ||
|
||||
$children['perm']['hidden'] === false) {
|
||||
$href = '#';
|
||||
} else if (isset($children['perm']['hidden']) &&
|
||||
$children['perm']['hidden'] === true) {
|
||||
$href = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
// Traitement profil
|
||||
require_once 'user/profil.php';
|
||||
if (isset($children['profil'])) {
|
||||
if ((isset($children['profil']['hidden']) == false ||
|
||||
$children['profil']['hidden'] === false) &&
|
||||
hasProfil($children['profil']['name']) === false) {
|
||||
$href = '#';
|
||||
} else if (isset($children['profil']['hidden']) &&
|
||||
$children['profil']['hidden'] &&
|
||||
hasProfil($children['profil']['name']) === false) {
|
||||
$href = false;
|
||||
}
|
||||
}
|
||||
|
||||
//Traitement profil
|
||||
if(isset($children['profil']))
|
||||
{
|
||||
if( ( !isset($children['profil']['hidden']) ||
|
||||
$children['profil']['hidden']===false ) &&
|
||||
hasProfil($children['profil']['name'])===false )
|
||||
{
|
||||
$href = '#';
|
||||
}
|
||||
elseif( isset($children['profil']['hidden']) &&
|
||||
$children['profil']['hidden'] &&
|
||||
hasProfil($children['profil']['name'])===false )
|
||||
{
|
||||
$href = false;
|
||||
}
|
||||
}
|
||||
|
||||
//Output
|
||||
$html = '';
|
||||
if($href!==false)
|
||||
{
|
||||
$html.= '<li><a href="'.$href.'">';
|
||||
if($href=='#'){
|
||||
$html.= '<font color="gray">'.
|
||||
$children['data'].
|
||||
'</font>';
|
||||
}
|
||||
else{ $html.= $children['data']; }
|
||||
$html.= '</a></li>';
|
||||
$html.= "\n";
|
||||
}
|
||||
return $html;
|
||||
// Output
|
||||
$html = '';
|
||||
if ($href !== false) {
|
||||
$html .= '<li><a href="'.$href.'">';
|
||||
if ($href == '#') {
|
||||
$html .= '<font color="gray">'.$children['data'].'</font>';
|
||||
} else {
|
||||
$html .= $children['data'];
|
||||
}
|
||||
$html .= '</a></li>';
|
||||
$html .= "\n";
|
||||
}
|
||||
return $html;
|
||||
}
|
||||
|
||||
|
@ -524,9 +524,9 @@ function menu_href_logout()
|
||||
return './?page=main&action=logout';
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------------- //
|
||||
// -------------------------------------------------------------------------- //
|
||||
// BdF
|
||||
// --------------------------------------------------------------------------- //
|
||||
// -------------------------------------------------------------------------- //
|
||||
function menu_href_bdf($module)
|
||||
{
|
||||
global $siret, $idEntreprise, $req;
|
||||
|
285
includes/ratios/bilans.php
Normal file
285
includes/ratios/bilans.php
Normal file
@ -0,0 +1,285 @@
|
||||
<?php
|
||||
define('NB_BILANS', 5);
|
||||
|
||||
$actif = array(59 => 'Actif Immobilisé Net',
|
||||
51 => 'Incorporelles',
|
||||
52 => 'Corporelles',
|
||||
53 => 'Financières',
|
||||
69 => 'Actif Circulant Net',
|
||||
60 => 'Stock et encours',
|
||||
61 => 'Créances Clients',
|
||||
62 => 'Autres Créances',
|
||||
00 => '',
|
||||
63 => 'Trésorerie Active',
|
||||
22 => 'TOTAL ACTIF');
|
||||
|
||||
$passif = array(79 => 'Ressources Propres',
|
||||
70 => 'Fonds Propres',
|
||||
71 => 'Provisions Risques',
|
||||
72 => 'Comptes Courants',
|
||||
90 => 'Ressources Externes',
|
||||
83 => 'Dettes Financières',
|
||||
84 => 'Dettes Fournisseurs',
|
||||
85 => 'Dettes Fiscales',
|
||||
86 => 'Autres Dettes',
|
||||
87 => 'Trésorerie Passive',
|
||||
22 => 'TOTAL PASSIF');
|
||||
|
||||
$sig = array(101 => 'CHIFFRE D\'AFFAIRES HORS TAXE',
|
||||
102 => '-Achat de marchandises, de matières premières',
|
||||
110 => 'MARGE COMMERCIALE',
|
||||
111 => '+Production vendue',
|
||||
112 => '+Production immobilisée et stockée',
|
||||
120 => 'PRODUCTION DE L\'EXERCICE',
|
||||
121 => 'Variation de stock de marchandises et matières premières',
|
||||
122 => 'MARGE BRUTE',
|
||||
123 => '-Autres charges externes',
|
||||
130 => 'VALEUR AJOUTÉE',
|
||||
132 => '-Charges de personnel',
|
||||
133 => '-Impôts, taxes & versements assimilés',
|
||||
131 => '+Subventions d\'exploitation',
|
||||
140 => 'EXCÉDENT BRUT D\'EXPLOITATION (EBE)',
|
||||
141 => '+Autres produits d\'exploitation',
|
||||
142 => '-Autres charges d\'exploitation',
|
||||
143 => '+Reprise sur dotations & transferts de charges',
|
||||
144 => '+70% Loyer de crédit bail',
|
||||
145 => '-Dotations d\'exploitation & provisions d\'exploitation',
|
||||
150 => 'RÉSULTAT D\'EXPLOITATION',
|
||||
151 => '+Produits financiers',
|
||||
152 => '+30% Loyer de crédit bail',
|
||||
153 => '+Charges financières',
|
||||
170 => 'RÉSULTAT COURANT AVANT IMPOTS',
|
||||
171 => '+Produits exceptionnels',
|
||||
172 => '-Charges exceptionnelles',
|
||||
181 => '-Impôts sur les bénéfices',
|
||||
182 => '-Participation salariale',
|
||||
199 => 'RÉSULTAT NET');
|
||||
|
||||
// -------------------------------------------------------------------------- //
|
||||
// afficheDates
|
||||
// -------------------------------------------------------------------------- //
|
||||
function afficheDates($bilansInfos)
|
||||
{
|
||||
end($bilansInfos);
|
||||
while (($infos = current($bilansInfos))) {
|
||||
print '<th class="date">';
|
||||
if (isset($infos->dateCloture)) {
|
||||
print substr($infos->dateCloture, 6, 2).'/'.
|
||||
substr($infos->dateCloture, 4, 2).'/'.
|
||||
substr($infos->dateCloture, 0, 4);
|
||||
print '<br>';
|
||||
print $infos->duree;
|
||||
print 'mois';
|
||||
} else {
|
||||
print '-';
|
||||
}
|
||||
print '</th>';
|
||||
prev($bilansInfos);
|
||||
}
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------- //
|
||||
// afficheBilan
|
||||
// -------------------------------------------------------------------------- //
|
||||
function afficheBilan($bilansInfos, $liste, $total)
|
||||
{
|
||||
foreach ($liste as $num => $label) {
|
||||
if ($num == 00) {
|
||||
print '<tr><td> </td>';
|
||||
foreach ($bilansInfos as $b) {
|
||||
print '<td></td>';
|
||||
}
|
||||
print '<td></td></tr>';
|
||||
continue;
|
||||
}
|
||||
if ($num == 101 || $num == 110 || $num == 120 ||
|
||||
$num == 122 || $num == 130 || $num == 140 ||
|
||||
$num == 150 || $num == 170 || $num == 199) {
|
||||
print '<tr class="subhead">';
|
||||
print '<td class="center" colspan="2">';
|
||||
} else if ($num > 100) {
|
||||
print '<tr>';
|
||||
$c = substr($label, 0, 1);
|
||||
if ($c == '+' ||
|
||||
$c == '-') {
|
||||
print '<td>'.$c.'</td><td>';
|
||||
$label = substr($label, 1);
|
||||
} else {
|
||||
print '<td>±</td><td>';
|
||||
}
|
||||
} else {
|
||||
if ($num == 59 || $num == 69 || $num == 79 ||
|
||||
$num == 90 || $num == 22) {
|
||||
print '<tr class="subhead">';
|
||||
} else {
|
||||
print '<tr>';
|
||||
}
|
||||
print '<td>';
|
||||
}
|
||||
print $label.'</td>';
|
||||
end($bilansInfos);
|
||||
while (($infos = current($bilansInfos))) {
|
||||
print '<td class="right">';
|
||||
if (isset($infos)){
|
||||
$ratiosEntrep = formatRatios($infos->RatiosEntrep->item);
|
||||
print dRatio($ratiosEntrep,'r'.$num);
|
||||
}
|
||||
print '</td>';
|
||||
prev($bilansInfos);
|
||||
}
|
||||
print '<td class="right">'.
|
||||
dPercent($ratiosEntrep, 0, 'r'.$num,'r'.$total).'</td>';
|
||||
print '</tr>';
|
||||
}
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------- //
|
||||
// ajouteExport
|
||||
// -------------------------------------------------------------------------- //
|
||||
function ajouteExport(&$liste)
|
||||
{
|
||||
global $bilansInfos;
|
||||
|
||||
$export = array();
|
||||
foreach ($liste as $num => $label) {
|
||||
if ($num == 00) {
|
||||
continue;
|
||||
}
|
||||
$valeurs = array();
|
||||
for ($i = 1; $i <= NB_BILANS; ++$i) {
|
||||
if (isset($bilansInfos[NB_BILANS - $i]->dateCloture) == false) {
|
||||
continue;
|
||||
}
|
||||
$date = $bilansInfos[NB_BILANS - $i]->dateCloture;
|
||||
$duree = $bilansInfos[NB_BILANS - $i]->duree;
|
||||
$valeur = dRatio(NB_BILANS - $i,'r'.$num);
|
||||
$valeurs[] = array('date' => $date,
|
||||
'duree' => $duree,
|
||||
'valeur' => $valeur);
|
||||
}
|
||||
$c = substr($label, 0, 1);
|
||||
if ($c == '+' ||
|
||||
$c == '-') {
|
||||
$export[] = array('label' => substr($label, 1),
|
||||
'signe' => $c,
|
||||
'valeurs' => $valeurs);
|
||||
} else {
|
||||
$export[] = array('label' => $label,
|
||||
'valeurs' => $valeurs);
|
||||
}
|
||||
}
|
||||
return $export;
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------- //
|
||||
// main
|
||||
// -------------------------------------------------------------------------- //
|
||||
?>
|
||||
<div id="center">
|
||||
<h1>ÉLÉMENTS FINANCIERS - BILANS</h1>
|
||||
<table>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="200" class="StyleInfoLib">Numéro identifiant Siren</td>
|
||||
<td width="340" class="StyleInfoData">
|
||||
<?php
|
||||
print substr($siren, 0, 3).' '.
|
||||
substr($siren, 3, 3).' '.
|
||||
substr($siren, 6, 3);
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="200" class="StyleInfoLib">Raison Sociale</td>
|
||||
<td width="340" class="StyleInfoData"><?php print $raisonSociale; ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
radioTypeBilan($numBilanN, $numBilanC, $typeBilan,
|
||||
$page, $siret, $idEntreprise);
|
||||
?>
|
||||
</table>
|
||||
|
||||
<?php
|
||||
if ($numBilanN == 0 && $numBilanC == 0 &&
|
||||
$numBilanB == 0 && $numBilanA == 0) {
|
||||
?>
|
||||
<table>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td><b>Aucun bilan disponible pour cette entreprise !</b></td>
|
||||
</tr>
|
||||
</table>
|
||||
<?php
|
||||
} else if ($numBilanN == 0 && $numBilanC == 0 &&
|
||||
($numBilanB > 0 || $numBilanA > 0)) {
|
||||
?>
|
||||
<table>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td><b>Bilan de banque/assurance non gérés</b></td>
|
||||
</tr>
|
||||
</table>
|
||||
<?php
|
||||
} else {
|
||||
?>
|
||||
|
||||
<h2>Bilan actif - passif</h2>
|
||||
<div class="blockh2">
|
||||
|
||||
<table class="bilans">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>ACTIF</th>
|
||||
<?php afficheDates($bilansInfos); ?>
|
||||
<th>% T.B.</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php afficheBilan($bilansInfos, $actif, 22); ?>
|
||||
<tr><td colspan="7" class="graph">
|
||||
<?php print bilans_graph_actif($dataActif[0], $fileName.$typeBilan); ?>
|
||||
</td></tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<br/><br/>
|
||||
|
||||
<table class="bilans">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>PASSIF</th>
|
||||
<?php afficheDates($bilansInfos); ?>
|
||||
<th>% T.B.</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php afficheBilan($bilansInfos, $passif, 22); ?>
|
||||
<tr><td colspan="7" class="graph">
|
||||
<?php print bilans_graph_passif($dataPassif[0], $fileName.$typeBilan); ?>
|
||||
</td></tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<br/><br/>
|
||||
|
||||
<h2>Soldes Intermédiaire de Gestion</h2>
|
||||
|
||||
<table class="bilans">
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="2">SOLDES INTERMEDIAIRES DE GESTION</th>
|
||||
<?php afficheDates($bilansInfos); ?>
|
||||
<th>% C.A.</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php afficheBilan($bilansInfos, $sig, 101); ?>
|
||||
<tr><td colspan="8" class="graph">
|
||||
<?php print bilans_graph_sig($dataSIG[0], $fileName.$typeBilan); ?>
|
||||
</td></tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
?>
|
173
includes/ratios/content.php
Normal file
173
includes/ratios/content.php
Normal file
@ -0,0 +1,173 @@
|
||||
<?php
|
||||
// -------------------------------------------------------------------------- //
|
||||
// afficheSecteurActivite
|
||||
// -------------------------------------------------------------------------- //
|
||||
function afficheSecteurActivite()
|
||||
{
|
||||
print '<tr>';
|
||||
print '<td width="30"> </td>';
|
||||
print '<td width="200" class="StyleInfoLib">Secteur d'activité :</td>';
|
||||
print '<td width="340" class="StyleInfoData">';
|
||||
print $_SESSION['tabInfo']['entrep']['nafEn'];
|
||||
if (isset($_SESSION['tabInfo']['entrep']['nafEnLib']) == true) {
|
||||
print ' - '.$_SESSION['tabInfo']['entrep']['nafEnLib'];
|
||||
}
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------- //
|
||||
// getNumBilan
|
||||
// -------------------------------------------------------------------------- //
|
||||
function getNumBilan(&$bilansInfos, &$mil)
|
||||
{
|
||||
if ($mil == '') {
|
||||
$bilanItem = reset($bilansInfos);
|
||||
$bilan = key($bilansInfos);
|
||||
$mil = $bilanItem->typeBilan.
|
||||
substr($bilanItem->dateCloture, 6, 2).
|
||||
substr($bilanItem->dateCloture, 4, 2).
|
||||
substr($bilanItem->dateCloture, 0, 4);
|
||||
return $bilan;
|
||||
} else {
|
||||
if (count($bilansInfos) > 0) {
|
||||
foreach ($bilansInfos as $bilan => $bilanItem) {
|
||||
$millesime = $bilanItem->typeBilan.
|
||||
substr($bilanItem->dateCloture, 6, 2).
|
||||
substr($bilanItem->dateCloture, 4, 2).
|
||||
substr($bilanItem->dateCloture, 0, 4);
|
||||
if ($mil == $millesime) {
|
||||
return $bilan;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------- //
|
||||
// selectMillesime
|
||||
// -------------------------------------------------------------------------- //
|
||||
function selectMillesime($bilansInfos, $page, $siret, $idEntreprise, $mil)
|
||||
{
|
||||
print '<tr>';
|
||||
print '<td width="30"> </td>';
|
||||
print '<td width="200" class="StyleInfoLib">Millésime</td>';
|
||||
print '<td width="340" class="StyleInfoData">';
|
||||
print '<form name="selectBilan" method="post" action="index.php?'.
|
||||
$_SERVER['QUERY_STRING'].'">';
|
||||
print '<select name="mil">';
|
||||
if (count($bilansInfos) > 0) {
|
||||
$countBilans = 0;
|
||||
foreach ($bilansInfos as $bilanItem) {
|
||||
if ($countBilans >= 5) {
|
||||
break;
|
||||
}
|
||||
$millesime = '';
|
||||
if (isset($bilanItem->dateCloture) == true) {
|
||||
$annee =
|
||||
substr($bilanItem->dateCloture, 6, 2).
|
||||
substr($bilanItem->dateCloture, 4, 2).
|
||||
substr($bilanItem->dateCloture, 0, 4);
|
||||
$millesime = $bilanItem->typeBilan.$annee;
|
||||
print '<option value="index.php?page='.$page.
|
||||
'&siret='.$siret.'&idEntreprise='.$idEntreprise.
|
||||
'&mil='.$millesime.'"';
|
||||
if ($mil == $millesime) {
|
||||
print 'selected="selected"';
|
||||
}
|
||||
print '>';
|
||||
print
|
||||
substr($bilanItem->dateCloture, 6, 2).'/'.
|
||||
substr($bilanItem->dateCloture, 4, 2).'/'.
|
||||
substr($bilanItem->dateCloture, 0, 4);
|
||||
$typBil = array('C' => 'Consolidé',
|
||||
'N' => '',
|
||||
'S' => 'Réel Simplifié',
|
||||
'B' => 'Banque',
|
||||
'A' => 'Assurance');
|
||||
if (empty($typBil[$bilanItem->typeBilan]) == false) {
|
||||
print ' '.$typBil[$bilanItem->typeBilan];
|
||||
}
|
||||
print '</option>';
|
||||
$countBilans++;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
print '-';
|
||||
}
|
||||
print '</select>';
|
||||
print '</form>';
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------- //
|
||||
// afficheDureeBilan
|
||||
// -------------------------------------------------------------------------- //
|
||||
function afficheDureeBilan($bilansInfos, $bilan)
|
||||
{
|
||||
print '<tr>';
|
||||
print '<td width="30"> </td>';
|
||||
print '<td width="200" class="StyleInfoLib">Durée du bilan</td>';
|
||||
print '<td width="340" class="StyleInfoData">';
|
||||
if (isset($bilansInfos[$bilan]->dateCloture) == true) {
|
||||
print $bilansInfos[$bilan]->duree.' mois';
|
||||
} else {
|
||||
print '-';
|
||||
}
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------- //
|
||||
// afficheRetourRatios
|
||||
// -------------------------------------------------------------------------- //
|
||||
function afficheRetourRatios($ratio)
|
||||
{
|
||||
if (empty($ratio) == true) {
|
||||
return;
|
||||
}
|
||||
|
||||
print '<tr>';
|
||||
print '<td colspan="3"> </td>';
|
||||
print '</tr>';
|
||||
print '<tr>';
|
||||
print '<td width="30"> </td>';
|
||||
print '<td width="200" class="StyleInfoLib">'.
|
||||
'Retour à la page complète</td>';
|
||||
print '<td width="340" class="StyleInfoData">'.
|
||||
'<a href="/?page=ratios&siret='.$_REQUEST['siret'].
|
||||
'&idEntreprise='.$_REQUEST['idEntreprise'].
|
||||
'" title="Retour à la page complète">'.
|
||||
'<img src="./img/synthese/chart_bar.png"'.
|
||||
' alt="Visionner le graphique"></a></td>';
|
||||
print '</tr>';
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------- //
|
||||
// afficheGraphEvol
|
||||
// -------------------------------------------------------------------------- //
|
||||
function afficheGraphEvol($ratio, $bilan,
|
||||
$page, $siret, $siren, $idEntreprise)
|
||||
{
|
||||
if (empty($ratio) == true) {
|
||||
return;
|
||||
}
|
||||
|
||||
$data = dGraph($ratio);
|
||||
print '<div id="titreEvol"><b>Evolution</b></div>';
|
||||
if (count($data['data']) <= 1) {
|
||||
print 'Les informations sont insuffisantes'.
|
||||
' pour générer la courbe d\'évolution';
|
||||
} else {
|
||||
if ($siret == 0 || $siren < 100) {
|
||||
$fileName = $page.'-'.$idEntreprise;
|
||||
} else {
|
||||
$fileName = $page.'-'.$siren;
|
||||
}
|
||||
$image = ratios_graph($ratio, $data, $fileName);
|
||||
print '<img id="imgEvol" src="./imgcache/'.$image.'" />';
|
||||
}
|
||||
}
|
||||
?>
|
@ -1,51 +1,46 @@
|
||||
<?php
|
||||
/**
|
||||
* Retourne le résultat du webservice.
|
||||
* @param string $nRatio
|
||||
* Le n° de ratio.
|
||||
* @param string $type
|
||||
* Le type de ratio demandé.
|
||||
* @return array
|
||||
* Retourne le tableau structuré.
|
||||
*/
|
||||
function getRatios($siren, $type){}
|
||||
|
||||
/**
|
||||
* Retourne le tableau pour l'affichage des graphiques d'évolution.
|
||||
* @param string $nRatio
|
||||
* Le n° de ratio.
|
||||
* Le n° de ratio.
|
||||
* @return array
|
||||
* Retourne le tableau structuré.
|
||||
* Retourne le tableau structuré.
|
||||
*/
|
||||
function dGraph($nRatio){
|
||||
global $bilansInfos, $ratiosSecteur, $ratiosEntrep, $ratiosInfos;
|
||||
$evol = array();
|
||||
$nbrAnnees=count($bilansInfos)-1;
|
||||
$i=0;
|
||||
foreach($bilansInfos as $dateCloture){
|
||||
if(isset($bilansInfos[$nbrAnnees-$i]['dateCloture'])){
|
||||
$div = 1;
|
||||
$ratioE = $ratiosEntrep[$nbrAnnees-$i][$nRatio];
|
||||
$ratioS = $ratiosSecteur[$nbrAnnees-$i][$nRatio];
|
||||
if ( ($ratiosInfos[$nRatio]['unite']=='EUR') && ((abs($ratioE)/1000)>0) ){
|
||||
$unite = 'KEURO';
|
||||
$div = 1000;
|
||||
}else{
|
||||
$unite = $ratiosInfos[$nRatio]['unite'];
|
||||
}
|
||||
//Données pour les graphiques évolutions
|
||||
$data[] = array(
|
||||
'date'=>$bilansInfos[$nbrAnnees-$i]['dateCloture'],
|
||||
'entreprise'=>(($ratioE!='NS') ? $ratioE/$div : 0 ),
|
||||
'secteur'=>(($ratioS!='NS') ? $ratioS/$div : 0 ),
|
||||
);
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
$evol = array('data' => $data, 'unite' => $unite);
|
||||
return $evol;
|
||||
}
|
||||
function dGraph($nRatio)
|
||||
{
|
||||
global $bilansInfos, $ratiosSecteur, $ratiosInfos;
|
||||
|
||||
end($bilansInfos);
|
||||
while (($infos = current($bilansInfos))) {
|
||||
if (isset($infos->dateCloture)) {
|
||||
$div = 1;
|
||||
$ratiosEntrep = formatRatios($infos->RatiosEntrep->item);
|
||||
$annee = substr($infos->dateCloture, 0, 4);
|
||||
$ratiosSecteurAnnee = formatRatiosSecteur($ratiosSecteur, $annee);
|
||||
if (empty($ratiosSecteurAnnee) == true) {
|
||||
prev($bilansInfos);
|
||||
continue;
|
||||
}
|
||||
$ratioE = $ratiosEntrep[$nRatio];
|
||||
$ratioS = $ratiosSecteurAnnee[$nRatio];
|
||||
if ($ratiosInfos[$nRatio]->unite == 'EUR' &&
|
||||
abs($ratioE) / 1000 > 0) {
|
||||
$unite = 'KEURO';
|
||||
$div = 1000;
|
||||
} else {
|
||||
$unite = $ratiosInfos[$nRatio]->unite;
|
||||
}
|
||||
// Données pour les graphiques évolutions
|
||||
$data[] =
|
||||
array('date' => $infos->dateCloture,
|
||||
'entreprise' => ($ratioE != 'NS') ? $ratioE / $div : 0,
|
||||
'secteur' => ($ratioS != 'NS') ? $ratioS / $div : 0);
|
||||
}
|
||||
prev($bilansInfos);
|
||||
}
|
||||
return array('data' => $data,
|
||||
'unite' => $unite);
|
||||
}
|
||||
/**
|
||||
* Affiche la position de l'entité en comparant son ratio avec le ratio secteur.
|
||||
* @param int $nAnnee
|
||||
@ -55,11 +50,9 @@ function dGraph($nRatio){
|
||||
* @param string $compare
|
||||
* < ou > pour définir si le ratio doit être supérieur ou inférieur au ratio secteur
|
||||
*/
|
||||
function dPosition($nAnnee,$nRatio,$compare){
|
||||
global $ratiosSecteur;
|
||||
global $ratiosEntrep;
|
||||
$ratioS = $ratiosSecteur[$nAnnee][$nRatio];
|
||||
$ratioE = $ratiosEntrep[$nAnnee][$nRatio];
|
||||
function dPosition($ratiosEntrep, $ratiosSecteur, $nRatio, $compare){
|
||||
$ratioS = $ratiosSecteur[$nRatio];
|
||||
$ratioE = $ratiosEntrep[$nRatio];
|
||||
$ecart = 1/100;
|
||||
|
||||
if( $ratioS=='NS' || $ratioE=='NS' || $ratioS==NULL || $ratioE==NULL){
|
||||
@ -91,10 +84,9 @@ function dPosition($nAnnee,$nRatio,$compare){
|
||||
* @param string $nRatio
|
||||
* Le n° de ratio.
|
||||
*/
|
||||
function dSecteur($nAnnee,$nRatio){
|
||||
global $ratiosSecteur;
|
||||
function dSecteur($ratiosSecteur, $nRatio){
|
||||
global $ratiosInfos;
|
||||
$ratio = $ratiosSecteur[$nAnnee][$nRatio];
|
||||
$ratio = $ratiosSecteur[$nRatio];
|
||||
$return = '';
|
||||
$formatRatio = TRUE;
|
||||
if ($ratio=='NS') {
|
||||
@ -112,18 +104,18 @@ function dSecteur($nAnnee,$nRatio){
|
||||
}
|
||||
|
||||
if($formatRatio == TRUE) {
|
||||
if ( ($ratiosInfos[$nRatio]['unite']=='EUR') && ((abs($ratio)/1000)>0) ){
|
||||
if ( ($ratiosInfos[$nRatio]->unite=='EUR') && ((abs($ratio)/1000)>0) ){
|
||||
$return.= number_format($ratio/1000, 0, '', ' ').' K€';
|
||||
}elseif (($ratiosInfos[$nRatio]['unite']=='EUR') && ((abs($ratio)/1000)<0)) {
|
||||
}elseif (($ratiosInfos[$nRatio]->unite=='EUR') && ((abs($ratio)/1000)<0)) {
|
||||
$return.= number_format($ratio, 0, '', ' ').' €';
|
||||
}elseif (($ratiosInfos[$nRatio]['unite']=='Jours')) {
|
||||
$return.= number_format($ratio, 0, '', ' ').' '.$ratiosInfos[$nRatio]['unite'];
|
||||
}elseif (($ratiosInfos[$nRatio]['unite']=='AN')) {
|
||||
$return.= round($ratio, 2).' '.$ratiosInfos[$nRatio]['unite'];
|
||||
}elseif (($ratiosInfos[$nRatio]['unite']=='%')) {
|
||||
$return.= round($ratio).' '.$ratiosInfos[$nRatio]['unite'];
|
||||
}elseif (($ratiosInfos[$nRatio]->unite=='Jours')) {
|
||||
$return.= number_format($ratio, 0, '', ' ').' '.$ratiosInfos[$nRatio]->unite;
|
||||
}elseif (($ratiosInfos[$nRatio]->unite=='AN')) {
|
||||
$return.= round($ratio, 2).' '.$ratiosInfos[$nRatio]->unite;
|
||||
}elseif (($ratiosInfos[$nRatio]->unite=='%')) {
|
||||
$return.= round($ratio).' '.$ratiosInfos[$nRatio]->unite;
|
||||
}else{
|
||||
$return.= $ratio.' '.$ratiosInfos[$nRatio]['unite'];
|
||||
$return.= $ratio.' '.$ratiosInfos[$nRatio]->unite;
|
||||
}
|
||||
}
|
||||
return $return;
|
||||
@ -136,9 +128,9 @@ function dSecteur($nAnnee,$nRatio){
|
||||
* @param string $nRatio
|
||||
* Le n° de ratio.
|
||||
*/
|
||||
function dRatio($nAnnee,$nRatio){
|
||||
global $ratiosEntrep, $ratiosInfos, $firephp;
|
||||
$ratio = $ratiosEntrep[$nAnnee][$nRatio];
|
||||
function dRatio($ratiosEntrep, $nRatio){
|
||||
global $ratiosInfos;
|
||||
$ratio = $ratiosEntrep[$nRatio];
|
||||
$return = '';
|
||||
$formatRatio = TRUE;
|
||||
if ($ratio=='NS' || $ratio==0) {
|
||||
@ -156,18 +148,18 @@ function dRatio($nAnnee,$nRatio){
|
||||
}
|
||||
|
||||
if($formatRatio == TRUE) {
|
||||
if ( ($ratiosInfos[$nRatio]['unite']=='EUR') && ((abs($ratio)/1000)>0) ){
|
||||
if ( ($ratiosInfos[$nRatio]->unite=='EUR') && ((abs($ratio)/1000)>0) ){
|
||||
$return.= number_format($ratio/1000, 0, '', ' ').' K€';
|
||||
}elseif (($ratiosInfos[$nRatio]['unite']=='EUR') && ((abs($ratio)/1000)<0)) {
|
||||
}elseif (($ratiosInfos[$nRatio]->unite=='EUR') && ((abs($ratio)/1000)<0)) {
|
||||
$return.= number_format($ratio, 0, '', ' ').' €';
|
||||
}elseif (($ratiosInfos[$nRatio]['unite']=='Jours')) {
|
||||
$return.= number_format($ratio, 0, '', ' ').' '.$ratiosInfos[$nRatio]['unite'];
|
||||
}elseif (($ratiosInfos[$nRatio]['unite']=='AN')) {
|
||||
$return.= round($ratio, 2).' '.$ratiosInfos[$nRatio]['unite'];
|
||||
}elseif (($ratiosInfos[$nRatio]['unite']=='%')) {
|
||||
$return.= round($ratio).' '.$ratiosInfos[$nRatio]['unite'];
|
||||
}elseif (($ratiosInfos[$nRatio]->unite=='Jours')) {
|
||||
$return.= number_format($ratio, 0, '', ' ').' '.$ratiosInfos[$nRatio]->unite;
|
||||
}elseif (($ratiosInfos[$nRatio]->unite=='AN')) {
|
||||
$return.= round($ratio, 2).' '.$ratiosInfos[$nRatio]->unite;
|
||||
}elseif (($ratiosInfos[$nRatio]->unite=='%')) {
|
||||
$return.= round($ratio).' '.$ratiosInfos[$nRatio]->unite;
|
||||
}else{
|
||||
$return.= $ratio.' '.$ratiosInfos[$nRatio]['unite'];
|
||||
$return.= $ratio.' '.$ratiosInfos[$nRatio]->unite;
|
||||
}
|
||||
}
|
||||
return $return;
|
||||
@ -180,9 +172,8 @@ function dRatio($nAnnee,$nRatio){
|
||||
* @param string $nRatio
|
||||
* Le n° de ratio.
|
||||
*/
|
||||
function dEvol($nAnnee,$nRatio){
|
||||
global $ratiosEntrepEvol;
|
||||
$ratio = $ratiosEntrepEvol[$nAnnee][$nRatio];
|
||||
function dEvol($ratiosEntrepEvol, $nRatio){
|
||||
$ratio = $ratiosEntrepEvol[$nRatio];
|
||||
if ($ratio=='NS') {
|
||||
return 'NS';
|
||||
}elseif($ratio==NULL){
|
||||
@ -192,12 +183,10 @@ function dEvol($nAnnee,$nRatio){
|
||||
}
|
||||
}
|
||||
|
||||
function dTotal($nAnnee, $nRatio, $nTotal)
|
||||
function dTotal($ratiosEntrepAnnee, $nRatio, $nTotal)
|
||||
{
|
||||
global $ratiosEntrep, $firephp;
|
||||
$ratio = isset($ratiosEntrep[$nAnnee][$nRatio]) ? $ratiosEntrep[$nAnnee][$nRatio] : 0;
|
||||
$total = isset($ratiosEntrep[$nAnnee][$nTotal]) ? $ratiosEntrep[$nAnnee][$nTotal] : 0;
|
||||
$firephp->log($total, 'total');
|
||||
$ratio = isset($ratiosEntrep[$nRatio]) ? $ratiosEntrep[$nRatio] : 0;
|
||||
$total = isset($ratiosEntrep[$nTotal]) ? $ratiosEntrep[$nTotal] : 0;
|
||||
if($total!=0){
|
||||
return number_format($ratio*100/$total, 2);
|
||||
}else{
|
||||
@ -213,10 +202,10 @@ function dTotal($nAnnee, $nRatio, $nTotal)
|
||||
* Le n° du ratio total
|
||||
* @return int
|
||||
*/
|
||||
function graphPercent($nAnnee,$nRatio,$totalRatio){
|
||||
global $ratiosEntrep;
|
||||
$ratio = isset($ratiosEntrep[$nAnnee][$nRatio]) ? $ratiosEntrep[$nAnnee][$nRatio] : 0;
|
||||
$totalRatio = $ratiosEntrep[$nAnnee][$totalRatio];
|
||||
function graphPercent($ratiosEntrepAnnee, $nRatio,$totalRatio)
|
||||
{
|
||||
$ratio = isset($ratiosEntrepAnnee[$nRatio]) ? $ratiosEntrepAnnee[$nRatio] : 0;
|
||||
$totalRatio = $ratiosEntrepAnnee[$totalRatio];
|
||||
if ( ($ratio!='NS' || $ratio!=NULL) && ($totalRatio!=0 || $totalRatio!='NS')){
|
||||
return $ratio*100/$totalRatio;
|
||||
}else{
|
||||
@ -232,10 +221,9 @@ function graphPercent($nAnnee,$nRatio,$totalRatio){
|
||||
* Le n° du ratio total
|
||||
* @return int
|
||||
*/
|
||||
function dPercent($nAnnee,$nRatio,$totalRatio){
|
||||
global $ratiosEntrep;
|
||||
$ratio = $ratiosEntrep[$nAnnee][$nRatio];
|
||||
$totalRatio = $ratiosEntrep[$nAnnee][$totalRatio];
|
||||
function dPercent($ratiosEntrepAnnee, $nAnnee,$nRatio,$totalRatio){
|
||||
$ratio = $ratiosEntrepAnnee[$nRatio];
|
||||
$totalRatio = $ratiosEntrepAnnee[$totalRatio];
|
||||
if ($ratio=='NS') {
|
||||
$return = 'NS';
|
||||
}elseif($ratio==NULL){
|
||||
@ -264,7 +252,7 @@ function wrapComment($text){
|
||||
$fontSize = 2;
|
||||
$blockSize = 500;
|
||||
$newtext = wordwrap($text, $blockSize/$fontSize , "\n");
|
||||
$newtext = htmlentities($newtext);
|
||||
//$newtext = htmlentities($newtext);
|
||||
$newtext = nl2br($newtext);
|
||||
return $newtext;
|
||||
}
|
||||
@ -282,20 +270,17 @@ function countBilans($bilansInfos, $typeBilan='')
|
||||
$numBilanS = 0;
|
||||
$numBilanA = 0;
|
||||
$numBilanB = 0;
|
||||
if(count($bilansInfos)>0)
|
||||
{
|
||||
foreach($bilansInfos as $key => $item)
|
||||
{
|
||||
if($item['typeBilan']=='C') { $numBilanC++; }
|
||||
if($item['typeBilan']=='N') { $numBilanN++; }
|
||||
if($item['typeBilan']=='S') { $numBilanS++; }
|
||||
if($item['typeBilan']=='B') { $numBilanB++; }
|
||||
if($item['typeBilan']=='A') { $numBilanA++; }
|
||||
if( count($bilansInfos)>0 ){
|
||||
foreach( $bilansInfos as $item ){
|
||||
if($item->typeBilan=='C') { $numBilanC++; }
|
||||
if($item->typeBilan=='N') { $numBilanN++; }
|
||||
if($item->typeBilan=='S') { $numBilanS++; }
|
||||
if($item->typeBilan=='B') { $numBilanB++; }
|
||||
if($item->typeBilan=='A') { $numBilanA++; }
|
||||
}
|
||||
}
|
||||
$numBilanN = $numBilanN+$numBilanS;
|
||||
if($typeBilan=='')
|
||||
{
|
||||
if($typeBilan==''){
|
||||
if($numBilanN>0){ $typeBilan = 'N'; }
|
||||
if($numBilanN==0 && $numBilanC>0){ $typeBilan = 'C'; }
|
||||
}
|
||||
@ -317,59 +302,46 @@ function countBilans($bilansInfos, $typeBilan='')
|
||||
* @param string $typeBilan
|
||||
* @return void
|
||||
*/
|
||||
function filtreTypeBilans($bilansInfos, $ratiosEntrep, $ratiosEntrepEvol, $ratiosSecteur, $dataActif, $dataPassif, $dataSIG, $typeBilan)
|
||||
function filtreTypeBilans($bilansInfos, $ratiosSecteur, $dataActif, $dataPassif, $dataSIG, $typeBilan)
|
||||
{
|
||||
global $firephp;
|
||||
if(count($bilansInfos)>0)
|
||||
{
|
||||
if( count($bilansInfos)>0 ){
|
||||
//Eliminer les doublons, on garde en priorités les bilans de type S
|
||||
$tabBilanS = array();
|
||||
$tabBilanN = array();
|
||||
foreach($bilansInfos as $key => $item)
|
||||
{
|
||||
if($item['typeBilan']=='S'){ $tabBilanS[$item['dateCloture']] = 1; }
|
||||
if($item->typeBilan=='S'){ $tabBilanS[$item->dateCloture] = 1; }
|
||||
}
|
||||
//Suppression des doublons + les types S deviennent des types N
|
||||
$index = 0;
|
||||
foreach($bilansInfos as $key => $item)
|
||||
{
|
||||
$date = $item['dateCloture'];
|
||||
$type = $item['typeBilan'];
|
||||
if($type=='N' && array_key_exists($date,$tabBilanS))
|
||||
{
|
||||
$firephp->info('Suppression doublon');
|
||||
$firephp->log($index,'index');
|
||||
foreach( $bilansInfos as $key => $item ){
|
||||
$date = $item->dateCloture;
|
||||
$type = $item->typeBilan;
|
||||
if( $type=='N' && array_key_exists($date,$tabBilanS) ){
|
||||
FB::info('Suppression doublon');
|
||||
FB::log($index,'index');
|
||||
array_splice($bilansInfos, $index, 1);
|
||||
array_splice($ratiosEntrep, $index, 1);
|
||||
array_splice($ratiosEntrepEvol, $index, 1);
|
||||
array_splice($ratiosSecteur, $index, 1);
|
||||
if(count($dataActif)>0) array_splice($dataActif, $index, 1);
|
||||
if(count($dataPassif)>0) array_splice($dataPassif, $index, 1);
|
||||
if(count($dataSIG)>0) array_splice($dataSIG, $index, 1);
|
||||
$index--;
|
||||
|
||||
}
|
||||
$index++;
|
||||
}
|
||||
$index=0;
|
||||
foreach($bilansInfos as $key => $item)
|
||||
{
|
||||
if($item['typeBilan']=='S'){ $bilansInfos[$index]['typeBilan']='N'; }
|
||||
foreach( $bilansInfos as $key => $item ){
|
||||
if($item->typeBilan=='S'){ $bilansInfos[$index]->typeBilan='N'; }
|
||||
$index++;
|
||||
}
|
||||
//En fonction du type de bilan sélectionné
|
||||
//on filtre les bilans avant de les envoyer sur l'affichage
|
||||
$index = 0;
|
||||
foreach($bilansInfos as $key => $item)
|
||||
{
|
||||
if($item['typeBilan']!=$typeBilan )
|
||||
{
|
||||
$firephp->info('Suppression pour filtrage');
|
||||
$firephp->log($index,'index');
|
||||
foreach( $bilansInfos as $key => $item ){
|
||||
if( $item->typeBilan!=$typeBilan ){
|
||||
FB::info('Suppression doublon');
|
||||
FB::log($index,'index');
|
||||
array_splice($bilansInfos, $index, 1);
|
||||
array_splice($ratiosEntrep, $index, 1);
|
||||
array_splice($ratiosEntrepEvol, $index, 1);
|
||||
//array_splice($ratiosSecteur, $index, 1);
|
||||
if(count($dataActif)>0) array_splice($dataActif, $index, 1);
|
||||
if(count($dataPassif)>0) array_splice($dataPassif, $index, 1);
|
||||
if(count($dataSIG)>0) array_splice($dataSIG, $index, 1);
|
||||
@ -378,7 +350,7 @@ function filtreTypeBilans($bilansInfos, $ratiosEntrep, $ratiosEntrepEvol, $ratio
|
||||
$index++;
|
||||
}
|
||||
}
|
||||
return array($bilansInfos, $ratiosEntrep, $ratiosEntrepEvol, $ratiosSecteur, $dataActif, $dataPassif, $dataSIG);
|
||||
return array($bilansInfos, $ratiosSecteur, $dataActif, $dataPassif, $dataSIG);
|
||||
}
|
||||
|
||||
/**
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,86 +1,74 @@
|
||||
<?php
|
||||
$parametres = array( 'source', 'bodacc', 'histo', 'annee', 'dateparution', 'nparution', 'bpage', 'nannonce', 'naffaire', 'txt');
|
||||
foreach($parametres as $param)
|
||||
{
|
||||
isset($_SESSION['recherchehisto'][$param])? ${$param}=$_SESSION['recherchehisto'][$param] : ${$param}='';
|
||||
$parametres = array('source', 'bodacc', 'histo', 'annee',
|
||||
'dateparution', 'nparution', 'bpage',
|
||||
'nannonce', 'naffaire', 'txt');
|
||||
foreach ($parametres as $param) {
|
||||
${$param} = (isset($_SESSION['recherchehisto'][$param])) ?
|
||||
$_SESSION['recherchehisto'][$param] : '';
|
||||
}
|
||||
if( !isset($annee) && isset($dateparution) )
|
||||
{
|
||||
$dateparution = str_replace('/', '', $dateparution);
|
||||
$jj = substring($annee, 0, 2);
|
||||
$mm = substring($annee, 2, 2);
|
||||
$aa = substring($annee, 4, 4);
|
||||
$dateparution = $aa.$mm.$jj;
|
||||
if (isset($annee) == false && isset($dateparution)) {
|
||||
$dateparution = str_replace('/', '', $dateparution);
|
||||
$jj = substring($annee, 0, 2);
|
||||
$mm = substring($annee, 2, 2);
|
||||
$aa = substring($annee, 4, 4);
|
||||
$dateparution = $aa.$mm.$jj;
|
||||
}
|
||||
|
||||
isset($_REQUEST['p']) ? $p=$_REQUEST['p'] : $p=0 ;
|
||||
$p = (isset($_REQUEST['p'])) ? $_REQUEST['p'] : 0;
|
||||
|
||||
//TODO: Supprimer les caractères accentués
|
||||
|
||||
//Affichage
|
||||
// Affichage
|
||||
?>
|
||||
<div id="center">
|
||||
<?php
|
||||
if($histo!='on')
|
||||
{
|
||||
$ra = array();
|
||||
$ra['dateAnnee'] = $annee;
|
||||
$ra['numParution'] = $nparution;
|
||||
if($source=='bodacc')
|
||||
{
|
||||
$ra['source'] = strtoupper('bod'.$bodacc);
|
||||
$ra['numAnnonce'] = $nannonce;
|
||||
}
|
||||
elseif($source=='balo')
|
||||
{
|
||||
$ra['source'] = strtoupper($source);
|
||||
$ra['numAnnonce'] = $naffaire;
|
||||
}
|
||||
elseif($source=='asso')
|
||||
{
|
||||
$ra['source'] = strtoupper($source);
|
||||
$ra['numAnnonce'] = $nannonce;
|
||||
}
|
||||
$firephp->log($ra,'REQUETE');
|
||||
try {
|
||||
/*
|
||||
$source IN ('BODA', 'BODB', 'BODC', 'ASSO', 'BALO')
|
||||
$dateAnnee 1999 ou 1999-11-23
|
||||
$numParution entre 1 et YYYYY
|
||||
$numAnnonce entre 1 et XXXXX
|
||||
*/
|
||||
$O = $client->rechercheAnnonce($ra['source'], $ra['dateAnnee'], $ra['numParution'], $ra['numAnnonce']);
|
||||
$firephp->log($O,'result');
|
||||
} catch (SoapFault $fault) {
|
||||
require_once 'soaperror.php';
|
||||
processSoapFault($client,$fault,$tabInfo);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
require_once 'i18n/cleanchar.php';
|
||||
//Suppression des caractères accentués
|
||||
$txt = cleanstring($txt);
|
||||
//Remplacement du caractère § par ~
|
||||
$txt = str_replace('$', '~', $txt);
|
||||
if ($histo != 'on') {
|
||||
$ra = array();
|
||||
$ra['dateAnnee'] = $annee;
|
||||
$ra['numParution'] = $nparution;
|
||||
if ($source == 'bodacc') {
|
||||
$ra['source'] = strtoupper('bod'.$bodacc);
|
||||
$ra['numAnnonce'] = $nannonce;
|
||||
} else if ($source == 'balo') {
|
||||
$ra['source'] = strtoupper($source);
|
||||
$ra['numAnnonce'] = $naffaire;
|
||||
} else if ($source == 'asso') {
|
||||
$ra['source'] = strtoupper($source);
|
||||
$ra['numAnnonce'] = $nannonce;
|
||||
}
|
||||
/*
|
||||
$source IN ('BODA', 'BODB', 'BODC', 'ASSO', 'BALO')
|
||||
$dateAnnee 1999 ou 1999-11-23
|
||||
$numParution entre 1 et YYYYY
|
||||
$numAnnonce entre 1 et XXXXX
|
||||
*/
|
||||
$ws = new WsScores();
|
||||
$reponse = $ws->rechercheAnnonce(
|
||||
$ra['source'], $ra['dateAnnee'],
|
||||
$ra['numParution'],
|
||||
$ra['numAnnonce']
|
||||
);
|
||||
} else {
|
||||
|
||||
require_once 'i18n/cleanchar.php';
|
||||
// Suppression des caractères accentués
|
||||
$txt = cleanstring($txt);
|
||||
// Remplacement du caractère § par ~
|
||||
$txt = str_replace('$', '~', $txt);
|
||||
// Recherche siren tenant compte des anomalies d'OCR
|
||||
$txt = preg_replace('/([0-9]{3})([0-9]{3})([0-9]{3})/',
|
||||
'"$1$2$3"|"$1 $2$3"|"$1$2 $3"|"$1 $2 $3"', $txt);
|
||||
$firephp->log($txt, 'txt');
|
||||
try {
|
||||
$O = $client->rechercheHisto($txt, $annee, $bodacc, $p, $_SESSION['tabInfo']['nbReponses']);
|
||||
$firephp->log($O,'result');
|
||||
} catch (SoapFault $fault) {
|
||||
require_once 'soaperror.php';
|
||||
processSoapFault($client,$fault,$tabInfo);
|
||||
}
|
||||
|
||||
$ws = new WsScores();
|
||||
$reponse = $ws->rechercheHisto(
|
||||
$txt, $annee, $bodacc, $p,
|
||||
$_SESSION['tabInfo']['nbReponses']);
|
||||
}
|
||||
|
||||
if($histo!='on')
|
||||
{
|
||||
require_once realpath(dirname(__FILE__)).'/recherche_vueannonce.php';
|
||||
}else{
|
||||
require_once realpath(dirname(__FILE__)).'/recherche_vuehisto.php';
|
||||
if ($histo != 'on') {
|
||||
require_once realpath(dirname(__FILE__)).'/recherche_vueannonce.php';
|
||||
} else {
|
||||
require_once realpath(dirname(__FILE__)).'/recherche_vuehisto.php';
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
|
@ -5,11 +5,11 @@
|
||||
* le navigateur du client sur la même url
|
||||
*/
|
||||
|
||||
if (isset($_REQUEST['formR'])){
|
||||
$_SESSION['formR'] = $_REQUEST['formR'];
|
||||
unset($_REQUEST['formR']);
|
||||
header('Location: ./?page=recherche&vue=list');
|
||||
exit;
|
||||
if (isset($_REQUEST['formR'])) {
|
||||
$_SESSION['formR'] = $_REQUEST['formR'];
|
||||
unset($_REQUEST['formR']);
|
||||
header('Location: ./?page=recherche&vue=list');
|
||||
exit;
|
||||
}
|
||||
|
||||
/*
|
||||
@ -17,25 +17,25 @@ if (isset($_REQUEST['formR'])){
|
||||
* pour les champs du formulaire
|
||||
*/
|
||||
if (isset($_SESSION['formR'])) {
|
||||
$formR = $_SESSION['formR'];
|
||||
$formR = $_SESSION['formR'];
|
||||
}
|
||||
|
||||
if ( $formR['type']=='ent' || $formR['type']=='dir' ){
|
||||
$typeRech = $formR['type'];
|
||||
if ($formR['type'] == 'ent' || $formR['type'] == 'dir') {
|
||||
$typeRech = $formR['type'];
|
||||
}
|
||||
if (isset($formR['siret']) == true) {
|
||||
$siret = trim(strtr($formR['siret'],
|
||||
array(' ' => '', '.' => '', '-' => '', '/' => '')));
|
||||
array(' ' => '', '.' => '', '-' => '', '/' => '')));
|
||||
}
|
||||
$pays = strtoupper(substr($siret,0,2));
|
||||
$pays = strtoupper(substr($siret, 0, 2));
|
||||
$typeId = '';
|
||||
|
||||
require_once 'i18n/cleanchar.php';
|
||||
//Enregistrement en session des dix dernières recherches
|
||||
if ($vueRecherche != 'list_pre' ){
|
||||
require_once 'recherche/session.php';
|
||||
recherche_save($formR);
|
||||
recherche_saveinfo( array('page' => $page) );
|
||||
// Enregistrement en session des dix dernières recherches
|
||||
if ($vueRecherche != 'list_pre') {
|
||||
require_once 'recherche/session.php';
|
||||
recherche_save($formR);
|
||||
recherche_saveinfo(array('page' => $page));
|
||||
}
|
||||
?>
|
||||
<div id="center">
|
||||
@ -45,56 +45,49 @@ if ($vueRecherche != 'list_pre' ){
|
||||
<td valign="top" width="570">
|
||||
<?php
|
||||
//Traitement des éléments de recherche
|
||||
if ($siret!='')
|
||||
{
|
||||
$len = strlen($siret);
|
||||
if ($siret != '') {
|
||||
$len = strlen($siret);
|
||||
if (strtoupper(substr($siret, 0, 1)) == 'W') {
|
||||
// Numéro WALDEC
|
||||
$typeId = 'W';
|
||||
$autreId = $siret;
|
||||
$siret = '';
|
||||
} elseif ($len == 12) {
|
||||
// Code ISIN
|
||||
$typeId = 'I';
|
||||
$autreId = $siret;
|
||||
$siret = '';
|
||||
|
||||
//Numéro WALDEC
|
||||
if (strtoupper(substr($siret,0,1))=='W') {
|
||||
$typeId='W';
|
||||
$autreId=$siret;
|
||||
$siret='';
|
||||
}
|
||||
//Code ISIN
|
||||
elseif ($len==12){
|
||||
$typeId = 'I';
|
||||
$autreId = $siret;
|
||||
$siret = '';
|
||||
$firephp->info('Code ISIN');
|
||||
|
||||
}
|
||||
//TVA Intracommunautaire
|
||||
elseif ( $pays=='AT' || $pays=='BE' || $pays=='BG' || $pays=='CY' || $pays=='CZ' || $pays=='DE' || $pays=='DK' ||
|
||||
$pays=='EE' || $pays=='EL' || $pays=='ES' || $pays=='FI' || $pays=='GB' || $pays=='HU' || $pays=='IE' ||
|
||||
$pays=='IT' || $pays=='LT' || $pays=='LU' || $pays=='LV' || $pays=='MT' || $pays=='NL' || $pays=='PL' ||
|
||||
$pays=='PT' || $pays=='RO' || $pays=='SE' || $pays=='SI' || $pays=='SK')
|
||||
{
|
||||
echo "La recherche par numéro de TVA n'est pas encore possible sur ce pays !";
|
||||
$tvaIntra = true;
|
||||
}
|
||||
//Pour la france
|
||||
elseif ($pays=='FR')
|
||||
{
|
||||
if ($len==13) $siret = substr($siret,4,9);
|
||||
}
|
||||
//Numéro RC
|
||||
elseif (preg_match('/A|B|C|D/i', $siret)) {
|
||||
$typeId='R';
|
||||
$autreId=$siret;
|
||||
$siret='';
|
||||
}
|
||||
//Siren normal on enleve tout ce qui n'est pas un chiffre
|
||||
else
|
||||
{
|
||||
$siret = trim(preg_replace('/[^0-9]/', '', $siret));
|
||||
}
|
||||
} else if (in_array($pays,
|
||||
array('AT', 'BE', 'BG', 'CY', 'CZ', 'DE', 'DK', 'EE',
|
||||
'EL', 'ES', 'FI', 'GB', 'HU', 'IE', 'IT', 'LT',
|
||||
'LU', 'LV', 'MT', 'NL', 'PL', 'PT', 'RO', 'SE',
|
||||
'SI', 'SK'))) {
|
||||
// TVA Intracommunautaire
|
||||
print 'La recherche par numéro de TVA'.
|
||||
' n\'est pas encore possible sur ce pays !';
|
||||
$tvaIntra = true;
|
||||
} else if ($pays == 'FR') {
|
||||
// Pour la france
|
||||
if ($len == 13) {
|
||||
$siret = substr($siret, 4, 9);
|
||||
}
|
||||
} else if (preg_match('/A|B|C|D/i', $siret)) {
|
||||
// Numéro RC
|
||||
$typeId = 'R';
|
||||
$autreId = $siret;
|
||||
$siret = '';
|
||||
} else {
|
||||
// Siren normal on enleve tout ce qui n'est pas un chiffre
|
||||
$siret = trim(preg_replace('/[^0-9]/', '', $siret));
|
||||
}
|
||||
}
|
||||
|
||||
if ($typeRech == 'ent') {
|
||||
// Type de recherche = entreprises
|
||||
$telFax = trim(preg_replace('/[^0-9]/', '', $formR['telFax']));
|
||||
$naf = trim(preg_replace('/[^0-9A-Z]/i', '', $formR['naf']));
|
||||
//if ($telFax<>'') $typeId='T';
|
||||
//if ($telFax<>'') $typeId='T';
|
||||
|
||||
// Traitement des données formulaire
|
||||
$raisonSociale =
|
||||
@ -112,49 +105,52 @@ if ($typeRech == 'ent') {
|
||||
strtoupper(cleanstring($formR['cpVille']))));
|
||||
|
||||
if (preg_match("/^([0-9]{2,5})([\D]*)/i", $cpVille, $matches)) {
|
||||
$cp = trim($matches[1]);
|
||||
$ville = trim($matches[2]);
|
||||
$cp = trim($matches[1]);
|
||||
$ville = trim($matches[2]);
|
||||
} else {
|
||||
$cp = '';
|
||||
$ville = trim($cpVille);
|
||||
}
|
||||
} else if ($typeRech == 'dir') {
|
||||
// Type de recherche = dirigeants
|
||||
$dirNom = preg_replace('/[^0-9A-Z]/', ' ',
|
||||
strtoupper(trimAccent($formR['dirNom']))
|
||||
);
|
||||
$dirPrenom = preg_replace('/[^0-9A-Z]/', ' ',
|
||||
strtoupper(trimAccent($formR['dirPrenom']))
|
||||
);
|
||||
$dirDateNaissJJ = preg_replace('/[^0-9]/', '',
|
||||
$formR['dirDateNaissJJ'])*1;
|
||||
if ($dirDateNaissJJ<0 || $dirDateNaissJJ>31)
|
||||
die('Jour de naissance incorrect !');
|
||||
$dirDateNaissMM = preg_replace('/[^0-9]/', '',
|
||||
$formR['dirDateNaissMM'])*1;
|
||||
if ($dirDateNaissMM<0 || $dirDateNaissMM>12)
|
||||
die('Mois de naissance incorrect !');
|
||||
$dirDateNaissAAAA = preg_replace('/[^0-9]/', '',
|
||||
$formR['dirDateNaissAAAA'])*1;
|
||||
$year = date('Y')-18;
|
||||
if ($dirDateNaissAAAA<0 || $dirDateNaissAAAA>$year)
|
||||
die('Année de naissance incorrecte !');
|
||||
$dirNom =
|
||||
preg_replace('/[^0-9A-Z]/', ' ',
|
||||
strtoupper(trimAccent($formR['dirNom'])));
|
||||
$dirPrenom =
|
||||
preg_replace('/[^0-9A-Z]/', ' ',
|
||||
strtoupper(trimAccent($formR['dirPrenom'])));
|
||||
$dirDateNaissJJ =
|
||||
preg_replace('/[^0-9]/', '',
|
||||
intval($formR['dirDateNaissJJ']));
|
||||
if ($dirDateNaissJJ < 0 || $dirDateNaissJJ > 31) {
|
||||
die('Jour de naissance incorrect !');
|
||||
}
|
||||
$dirDateNaissMM =
|
||||
preg_replace('/[^0-9]/', '',
|
||||
intval($formR['dirDateNaissMM']));
|
||||
if ($dirDateNaissMM < 0 || $dirDateNaissMM > 12) {
|
||||
die('Mois de naissance incorrect !');
|
||||
}
|
||||
$dirDateNaissAAAA =
|
||||
preg_replace('/[^0-9]/', '',
|
||||
intval($formR['dirDateNaissAAAA']));
|
||||
$year = date('Y') - 18;
|
||||
if ($dirDateNaissAAAA < 0 || $dirDateNaissAAAA > $year) {
|
||||
die('Année de naissance incorrecte !');
|
||||
}
|
||||
|
||||
$dirDateNaiss = $dirDateNaissJJ.'/'.$dirDateNaissMM.'/'.$dirDateNaissAAAA;
|
||||
$dirDateNaiss = $dirDateNaissJJ.'/'.$dirDateNaissMM.'/'.$dirDateNaissAAAA;
|
||||
|
||||
$dirCpVille = preg_replace('/ +/',' ', preg_replace('/[^0-9A-Z]/', ' ',
|
||||
strtoupper($formR['dirCpVille']))
|
||||
);
|
||||
FB::log($dirCpVille, 'dirCpVille');
|
||||
if (preg_match('/^([0-9]{2,5})([\D]+)/i', $dirCpVille, $matches))
|
||||
{
|
||||
FB::log($matches, 'TEST');
|
||||
$dirCp = trim($matches[1]);
|
||||
$dirVille = trim($matches[2]);
|
||||
}
|
||||
else {
|
||||
$dirVille = trim($dirCpVille);
|
||||
}
|
||||
$dirCpVille =
|
||||
preg_replace('/ +/',' ',
|
||||
preg_replace('/[^0-9A-Z]/', ' ',
|
||||
strtoupper($formR['dirCpVille'])));
|
||||
if (preg_match('/^([0-9]{2,5})([\D]+)/i', $dirCpVille, $matches)) {
|
||||
$dirCp = trim($matches[1]);
|
||||
$dirVille = trim($matches[2]);
|
||||
} else {
|
||||
$dirVille = trim($dirCpVille);
|
||||
}
|
||||
}
|
||||
|
||||
// Index à envoyer au webservice pour obtenir les résultats suivant
|
||||
@ -164,305 +160,294 @@ if (isset($_REQUEST['p'])) {
|
||||
$position = 0;
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------------- //
|
||||
// -------------------------------------------------------------------------- //
|
||||
// Giant
|
||||
// --------------------------------------------------------------------------- //
|
||||
// -------------------------------------------------------------------------- //
|
||||
if ($typeRech == 'ent' && isset($formR['pays']) && $formR['pays'] != 'FR') {
|
||||
include_once('giant/search.php');
|
||||
exit;
|
||||
}
|
||||
|
||||
//Type de recherche = entreprise
|
||||
if ($typeRech=='ent' && $siret<>'') {
|
||||
echo "<!--_typeRech=ent, siren=$siret-->\n";
|
||||
try {
|
||||
$O = $client->searchSiren($siret, $position, $tabInfo['nbReponses'], 200, $cp);
|
||||
} catch (SoapFault $fault) {
|
||||
require_once 'soaperror.php';
|
||||
processSoapFault($client,$fault,$tabInfo);
|
||||
}
|
||||
} elseif ($typeRech=='ent' && $telFax<>'') {
|
||||
echo "<!--_typeRech=ent, telFax=$telFax-->\n";
|
||||
try {
|
||||
$O = $client->searchTelFax($telFax, $position, $tabInfo['nbReponses'], 200);
|
||||
} catch (SoapFault $fault) {
|
||||
require_once 'soaperror.php';
|
||||
processSoapFault($client,$fault,$tabInfo);
|
||||
}
|
||||
} elseif ($typeRech=='ent' && ($typeId=='R' || $typeId=='W' || $typeId=='I') ) {
|
||||
$firephp->log( 'searchAutreId('.$typeId.', '.$autreId.', '.$position.', '.$tabInfo['nbReponses'].', 200, '.$cp.')', 'Requete');
|
||||
echo "<!--_typeRech=ent, Autre Id $typeId=$autreId-->\n";
|
||||
try {
|
||||
$O = $client->searchAutreId($typeId, $autreId, $position, $tabInfo['nbReponses'], 200, $cp);
|
||||
} catch (SoapFault $fault) {
|
||||
require_once 'soaperror.php';
|
||||
processSoapFault($client,$fault,$tabInfo);
|
||||
}
|
||||
} elseif ($typeRech=='ent' && $siret=='') {
|
||||
echo "<!--_typeRech=ent, $raisonSociale, ".
|
||||
"$numVoie $libVoie, $cp, $ville-->\n";
|
||||
// Type de recherche = entreprise
|
||||
if ($typeRech == 'ent' &&
|
||||
($typeId == 'R' || $typeId == 'W' || $typeId == 'I')) {
|
||||
print "<!--_typeRech=ent, Autre Id $typeId=$autreId-->\n";
|
||||
try {
|
||||
$O = $client->searchNomAdr($raisonSociale, $numVoie.' '.$libVoie,
|
||||
$cp, $ville, false, false, $position,
|
||||
$tabInfo['nbReponses'], 200, false, false,
|
||||
$naf);
|
||||
$O = $client->searchAutreId($typeId, $autreId, $position,
|
||||
$tabInfo['nbReponses'], 200, $cp);
|
||||
} catch (SoapFault $fault) {
|
||||
require_once 'soaperror.php';
|
||||
processSoapFault($client,$fault,$tabInfo);
|
||||
processSoapFault($client, $fault, $tabInfo);
|
||||
}
|
||||
} elseif ($typeRech=='dir') {
|
||||
FB::info('Recherche dirigeants');
|
||||
FB::log($dirVille, 'dirVille');
|
||||
echo "<!--_typeRech=dir, $dirNom, $dirPrenom, -->\n";
|
||||
try {
|
||||
$O = $client->searchDir($dirNom, $dirPrenom, $dirDateNaiss, $dirVille, $position, $tabInfo['nbReponses'], 200, false);
|
||||
} catch (SoapFault $fault) {
|
||||
require_once 'soaperror.php';
|
||||
processSoapFault($client,$fault,$tabInfo);
|
||||
}
|
||||
} else if ($typeRech == 'ent') {
|
||||
$criteres['siret'] = $siret;
|
||||
$criteres['telFax'] = $telFax;
|
||||
$criteres['raisonSociale'] = $raisonSociale;
|
||||
$criteres['adresse'] = $numVoie.' '.$libVoie;
|
||||
$criteres['codePostal'] = $cp;
|
||||
$criteres['ville'] = $ville;
|
||||
$criteres['naf'] = $naf;
|
||||
$ws = new WsScores();
|
||||
$recherche = $ws->rechercheEntreprise('ent', $criteres, $position);
|
||||
} else if ($typeRech == 'dir') {
|
||||
$criteres['nom'] = $dirNom;
|
||||
$criteres['prenom'] = $dirPrenom;
|
||||
$criteres['dateNaiss'] = $dirDateNaiss;
|
||||
$criteres['lieuNaiss'] = $dirVille;
|
||||
$ws = new WsScores();
|
||||
$recherche = $ws->rechercheEntreprise('dir', $criteres, $position);
|
||||
}
|
||||
|
||||
$params = '';
|
||||
foreach($formR as $key => $value){
|
||||
$params.= '&formR['.$key.']='.urlencode($value);
|
||||
foreach ($formR as $key => $value) {
|
||||
$params.= '&formR['.$key.']='.urlencode($value);
|
||||
}
|
||||
if($typeRech == 'ent'){
|
||||
$strCriteres = '<a href="./?page=recherche&vue=ent'.$params.'">'.trim(@implode(' ', $O['results']['criteres'])).'</a>';
|
||||
} elseif($typeRech == 'dir') {
|
||||
$strCriteres = '<a href="./?page=recherche&vue=dir'.$params.'">'.trim(@implode(' ', $O['results']['criteres'])).'</a>';
|
||||
if ($typeRech == 'ent') {
|
||||
$strCriteres =
|
||||
'<a href="./?page=recherche&vue=ent'.$params.'">'.
|
||||
trim(implode(' ', $criteres)).'</a>';
|
||||
} else if ($typeRech == 'dir') {
|
||||
$strCriteres =
|
||||
'<a href="./?page=recherche&vue=dir'.$params.'">'.
|
||||
trim(implode(' ', $criteres)).'</a>';
|
||||
}
|
||||
|
||||
if ( $O['results']['nbReponses']==0)
|
||||
{
|
||||
if( !isset($tvaIntra) )
|
||||
echo '<p class="StyleInfoLib">Pas de résultat affiché avec le(s) critère(s) " '. $strCriteres .'" ('.$O['results']['nbReponsesTotal'].' sans les filtres).</p>';
|
||||
}
|
||||
else
|
||||
{
|
||||
$etabs = $O['results']['reponses'];
|
||||
FB::log($O, 'reponses');
|
||||
//Enregistrement de la première raison sociale trouvé si la recherche n'a été faite que sur un siren
|
||||
if ($typeRech=='ent' && $siret!='' && $raisonSociale==''){
|
||||
recherche_saveinfo( array('raisonSociale' => $etabs[0]['Nom']) );
|
||||
}
|
||||
?>
|
||||
<p class="StyleInfoLib">
|
||||
<?php
|
||||
if ($O['results']['nbReponses']<$O['results']['nbReponsesTotal'])
|
||||
{
|
||||
$totPage=ceil($O['results']['nbReponsesTotal']/$tabInfo['nbReponses']);
|
||||
$curPage=ceil($position/$tabInfo['nbReponses'])+1;
|
||||
echo $O['results']['nbReponsesTotal'] .
|
||||
' réponses avec les critères "' .
|
||||
$strCriteres . '". ' .
|
||||
$O['results']['nbReponses'].
|
||||
' résultats affichés. Page ' .
|
||||
$curPage.'/'.$totPage.'.';
|
||||
} else {
|
||||
$totPage=$curPage=1;
|
||||
echo $O['results']['nbReponsesTotal'] .
|
||||
' réponses avec les critères "' .
|
||||
$strCriteres .'".';
|
||||
}
|
||||
?>
|
||||
</p>
|
||||
<?php
|
||||
if ( isset($O['results']['info']) &&
|
||||
!empty($O['results']['info']) ){
|
||||
?>
|
||||
<div style="margin:5px; padding: 0pt 0.7em;" class="ui-state-highlight ui-corner-all">
|
||||
<p><span style="float: left; margin-right: 0.3em;" class="ui-icon ui-icon-info"></span>
|
||||
<?=$O['results']['info']?></p>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
if ($recherche->results->nbReponses == 0) {
|
||||
if (isset($tvaIntra) == false) {
|
||||
print '<p class="StyleInfoLib">Pas de résultat affiché'.
|
||||
' avec le(s) critère(s) " '.$strCriteres.' "';
|
||||
if (isset($O['results']['nbReponsesTotal']) == true) {
|
||||
print ' ('.$O['results']['nbReponsesTotal'].
|
||||
' sans les filtres)';
|
||||
}
|
||||
print '.</p>';
|
||||
}
|
||||
} else {
|
||||
$etabs = $recherche->results->reponses->item;
|
||||
// Enregistrement de la première raison sociale trouvé
|
||||
// si la recherche n'a été faite que sur un siren
|
||||
if ($typeRech == 'ent' && $siret != '' && $raisonSociale == '') {
|
||||
recherche_saveinfo(array('raisonSociale' => $etabs[0]->Nom));
|
||||
}
|
||||
print '<p class="StyleInfoLib">';
|
||||
if ($recherche->results->nbReponses <
|
||||
$recherche->results->nbReponsesTotal) {
|
||||
$totPage = ceil($recherche->results->nbReponsesTotal /
|
||||
$tabInfo['nbReponses']);
|
||||
$curPage = ceil($position / $tabInfo['nbReponses']) + 1;
|
||||
print $recherche->results->nbReponsesTotal.
|
||||
' réponses avec les critères "'.
|
||||
$strCriteres.'". '.
|
||||
$recherche->results->nbReponses.
|
||||
' résultats affichés. Page '.
|
||||
$curPage.'/'.$totPage.'.';
|
||||
} else {
|
||||
$totPage = 1;
|
||||
$curPage = 1;
|
||||
print $recherche->results->nbReponsesTotal.
|
||||
' réponses avec les critères "'.
|
||||
$strCriteres.'".';
|
||||
}
|
||||
print '</p>';
|
||||
if (empty($recherche->results->info) == false) {
|
||||
print '<div style="margin:5px; padding: 0pt 0.7em;"'.
|
||||
' class="ui-state-highlight ui-corner-all">';
|
||||
print '<p><span style="float: left; margin-right: 0.3em;"'.
|
||||
' class="ui-icon ui-icon-info"></span>';
|
||||
print $$recherche->results->info;
|
||||
print '</p>';
|
||||
print '</div>';
|
||||
}
|
||||
print '<ol>';
|
||||
foreach ($etabs as $i => $etab) {
|
||||
if ($etab->Siege == 1) {
|
||||
$strEtab = 'Établissement siège ';
|
||||
} else {
|
||||
$strEtab = 'Établissement secondaire ';
|
||||
}
|
||||
if ($etab->Actif == 1) {
|
||||
$strEtab .= 'actif';
|
||||
} else {
|
||||
$strEtab .= 'inactif';
|
||||
}
|
||||
|
||||
<ol>
|
||||
<?php
|
||||
foreach ($etabs as $i => $etab)
|
||||
{
|
||||
if ($etab['Siege']==1) $strEtab='Établissement siège ';
|
||||
else $strEtab='Établissement secondaire ';
|
||||
if ($etab['Actif']==1) $strEtab.='actif';
|
||||
else $strEtab.='inactif';
|
||||
if (intval($etab->Nic) == 0 ||
|
||||
intval($etab->Nic) >= 99990) {
|
||||
$strEtab .=' provisoire';
|
||||
}
|
||||
|
||||
if($etab['Nic']*1==0 || $etab['Nic']*1>=99990) $strEtab.=' provisoire';
|
||||
// Lien vers fiche identité
|
||||
if ($etab->Siege != 1 || ($etab->Siege == 1 && $etab->Actif !=1 )) {
|
||||
$lien = '<a title="Voir la fiche d\'identité du siège'.
|
||||
' de cette entreprise" href="/?page=identite&siret='.
|
||||
$etab->Siren.'">(Accès siège)</a>';
|
||||
} else {
|
||||
$lien = '';
|
||||
}
|
||||
print '<li style="list-style-type:decimal;"'.
|
||||
' class="StyleInfoData" type="1" value="'.
|
||||
((($curPage - 1) * $tabInfo['nbReponses']) + $i + 1).'">';
|
||||
$href = '/?page=identite&siret='.$etab->Siret.
|
||||
'&idEntreprise='.$etab->id;
|
||||
print '<b><a title="Voir la fiche d\'identité'.
|
||||
' de cet établissement" href="'.$href.'">'.
|
||||
$etab->Nom.'</a></b><br/>';
|
||||
if ($etab->Nom2 != '' || $etab->Enseigne != '' || $etab->Sigle != '') {
|
||||
print '<i>';
|
||||
if ($etab->Nom2 != '') {
|
||||
print $etab->Nom2.'<br/>';
|
||||
}
|
||||
if ($etab->Enseigne != '') {
|
||||
print 'Enseigne : '.$etab->Enseigne.' ';
|
||||
}
|
||||
if ($etab->Sigle != '') {
|
||||
print 'Sigle : '.$etab->Sigle;
|
||||
}
|
||||
print '</i><br/>';
|
||||
}
|
||||
print '<b>RCS '.
|
||||
substr($etab->Siren, 0, 3).' '.
|
||||
substr($etab->Siren, 3, 3).' '.
|
||||
substr($etab->Siren, 6, 3).' '.$etab->Nic.'<br/>';
|
||||
print $strEtab.'</b> '.$lien.'<br/>';
|
||||
print $etab->Adresse.'<br/>';
|
||||
if (empty($etab->Adresse2) == false) {
|
||||
print $etab->Adresse2.'<br/>';
|
||||
}
|
||||
print '<b>'.$etab->CP.' '.$etab->Ville.'</b><br/>';
|
||||
// Si présent, on affiche la forme juridique
|
||||
if (trim($etab->FJ) != '') {
|
||||
print '<i>Forme : '.strWsToHtml($etab->FJLib).
|
||||
' ('.$etab->FJ.')</i><br/>';
|
||||
}
|
||||
// Si présent, on affiche l'activité NAF
|
||||
if (trim($etab->NafEnt) != '') {
|
||||
print '<i>Activité : '.strWsToHtml($etab->NafEntLib).
|
||||
' ('.$etab->NafEnt.')</i><br/>';
|
||||
}
|
||||
|
||||
//Lien vers fiche identité
|
||||
if ($etab['Siege']!=1 || ($etab['Siege']==1 && $etab['Actif']!=1))
|
||||
$lien='<a title="Voir la fiche d\'identité du siège de cette entreprise" href="/?page=identite&siret='.$etab['Siren'].'">(Accès siège)</a>';
|
||||
else $lien='';
|
||||
?>
|
||||
<li style="list-style-type:decimal;" class="StyleInfoData" type="1" value="<?=((($curPage-1)*$tabInfo['nbReponses'])+$i+1);?>">
|
||||
<?php $href = '/?page=identite&siret='.$etab['Siret'].'&idEntreprise='.$etab['id']; ?>
|
||||
<b><a title="Voir la fiche d'identité de cet établissement" href="<?=$href?>"><?=$etab['Nom']?></a></b><br/>
|
||||
<?
|
||||
if ($etab['Nom2']<>'' || $etab['Enseigne']<>'' || $etab['Sigle']<>'') {
|
||||
echo '<i>';
|
||||
if ($etab['Nom2']<>'') echo $etab['Nom2'].'<br/>';
|
||||
if ($etab['Enseigne']<>'') echo 'Enseigne : '.$etab['Enseigne'].' ';
|
||||
if ($etab['Sigle']<>'') echo 'Sigle : '.$etab['Sigle'];
|
||||
echo '</i><br/>';
|
||||
}
|
||||
?>
|
||||
<b>RCS <?=substr($etab['Siren'],0,3).' '.substr($etab['Siren'],3,3).' '.substr($etab['Siren'],6,3).' '.$etab['Nic'];?><br/>
|
||||
<?=$strEtab;?></b> <?=$lien;?><br/>
|
||||
<?=$etab['Adresse'];?><br/>
|
||||
<?php
|
||||
if (isset($etab['Adresse2']) && $etab['Adresse2'] != '') {
|
||||
echo $etab['Adresse2'].'<br/>';
|
||||
if ($typeRech == 'dir') {
|
||||
print '<u>Dirigeant recherché :</u> ';
|
||||
if ($etab->DirRs != '') {
|
||||
print '<b>'.strWsToHtml($etab->DirRs).
|
||||
'</b>, représenté par ';
|
||||
}
|
||||
print strWsToHtml($etab->DirNom).' '.strWsToHtml($etab->DirPrenom);
|
||||
if ($etab->DirNomUsage != '' &&
|
||||
$etab->DirNomUsage != $etab->DirNom) {
|
||||
print ' ('. strWsToHtml($etab->DirNomUsage) . ')';
|
||||
}
|
||||
print '<i>, '.strWsToHtml($etab->DirFonction).'</i><br/>';
|
||||
}
|
||||
|
||||
// Affichage spécial
|
||||
if ($_SESSION['tabInfo']['idClient'] == 34) {
|
||||
print 'Liens : <i><a title="Consultez les comptes annuels"'.
|
||||
' href="./?page=greffes&vue=bilans&siret='.$etab['Siret'].
|
||||
'">Comptes annuels</a></i> - <i>'.
|
||||
'<a title="Consultez les actes et status"'.
|
||||
' href="./?page=greffes&vue=actes&siret='.$etab['Siret'].
|
||||
'">Actes et status</a></i><br/>';
|
||||
}
|
||||
$listProfile = defineProfil();
|
||||
$idClient = $_SESSION['tabInfo']['idClient'];
|
||||
if (array_key_exists($idClient, $listProfile)) {
|
||||
$liensProfile = $listProfile[$idClient];
|
||||
if (is_array($liensProfile) && count($liensProfile) > 0) {
|
||||
$i = 0;
|
||||
foreach ($liensProfile as $vue => $lien) {
|
||||
if (hasProfil($vue)) {
|
||||
if ($i == 0) {
|
||||
print 'Liens';
|
||||
}
|
||||
print '<i>';
|
||||
print '<a title="'.$lien['titre'].
|
||||
'" href="./?page='.$vue.
|
||||
'&siret='.$etab->Siret.
|
||||
'&idEntreprise='.$etab->idEntreprise.'&profil=1">';
|
||||
print $lien['titre'];
|
||||
print '</a>';
|
||||
print '</i>';
|
||||
}
|
||||
if (count($liensProfile) < $i) {
|
||||
print '-';
|
||||
}
|
||||
$i++;
|
||||
if (count($liensProfile) == $i) {
|
||||
print '<br/>';
|
||||
}
|
||||
}
|
||||
?>
|
||||
<b><?=$etab['CP'].' '.$etab['Ville']?></b><br/>
|
||||
<?php
|
||||
/** Si présent, on affiche la forme Juridique **/
|
||||
if (trim($etab['FJ'])!='')
|
||||
{
|
||||
?>
|
||||
<i>Forme : <?=strWsToHtml($etab['FJLib']). ' ('.$etab['FJ'];?>)</i><br/>
|
||||
<?
|
||||
}
|
||||
/** Si présent, on affiche l'activité NAF **/
|
||||
if (trim($etab['NafEnt'])!='')
|
||||
{
|
||||
?>
|
||||
<i>Activité : <?=strWsToHtml($etab['NafEntLib']). ' ('.$etab['NafEnt'];?>)</i><br/>
|
||||
<?
|
||||
}
|
||||
}
|
||||
}
|
||||
print '<br/>';
|
||||
print '</li>';
|
||||
} // fin parcours etabs
|
||||
|
||||
if ($typeRech=='dir')
|
||||
{
|
||||
echo '<u>Dirigeant recherché :</u> ';
|
||||
if ($etab['DirRs']<>'') {
|
||||
echo '<b>'. strWsToHtml($etab['DirRs']) . '</b>, représenté par ';
|
||||
}
|
||||
echo strWsToHtml($etab['DirNom']) .' '. strWsToHtml($etab['DirPrenom']);
|
||||
if ($etab['DirNomUsage']<>'' && $etab['DirNomUsage']<>$etab['DirNom'])
|
||||
echo ' ('. strWsToHtml($etab['DirNomUsage']) . ')';
|
||||
echo '<i>, '.strWsToHtml($etab['DirFonction']).'</i><br/>';
|
||||
}
|
||||
//Affichage spécial
|
||||
print '<table>';
|
||||
print '<tr>';
|
||||
if ($curPage > 1) {
|
||||
$prev_index = $position - $recherche->results->nbReponses;
|
||||
if ($prev_index < $recherche->results->nbReponses) {
|
||||
$prev_index = 0;
|
||||
}
|
||||
print '<td width="40%" align="right">';
|
||||
print '<a href="./?page=recherche&vue=list&p='.$prev_index.
|
||||
'" title="Page précédente...">';
|
||||
print '<img src="./img/boutton_precedent_off.gif"'.
|
||||
' onmouseover="this.src=\'./img/boutton_precedent_on.gif\'"'.
|
||||
' onmouseout="this.src=\'./img/boutton_precedent_off.gif\'"/>';
|
||||
print '</a>';
|
||||
print '</td>';
|
||||
} else {
|
||||
print '<td width="40%"> </td>';
|
||||
}
|
||||
|
||||
if( $_SESSION['tabInfo']['idClient']==34 )
|
||||
{
|
||||
?>
|
||||
Liens : <i><a title="Consultez les comptes annuels" href="./?page=greffes&vue=bilans&siret=<?=$etab['Siret']?>">Comptes annuels</a></i> -
|
||||
<i><a title="Consultez les actes et status" href="./?page=greffes&vue=actes&siret=<?=$etab['Siret']?>">Actes et status</a></i>
|
||||
<br/>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<?php
|
||||
$listProfile = defineProfil();
|
||||
$idClient = $_SESSION['tabInfo']['idClient'];
|
||||
if(array_key_exists($idClient, $listProfile))
|
||||
{
|
||||
$liensProfile = $listProfile[$idClient];
|
||||
if(is_array($liensProfile) && count($liensProfile)>0)
|
||||
{
|
||||
$i=0;
|
||||
foreach($liensProfile as $vue => $lien)
|
||||
{
|
||||
if(hasProfil($vue))
|
||||
{
|
||||
if($i==0) { echo 'Liens'; }
|
||||
?>
|
||||
<i>
|
||||
<a title="<?=$lien['titre']?>" href="./?page=<?=$vue?>&siret=<?=$etab['Siret']?>&idEntreprise=<?=$etab['idEntreprise']?>&profil=1">
|
||||
<?=$lien['titre']?>
|
||||
</a>
|
||||
</i>
|
||||
<?php
|
||||
}
|
||||
if(count($liensProfile)<$i) { echo '-'; }
|
||||
$i++;
|
||||
if(count($liensProfile)==$i) { echo '<br/>'; }
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
<br/>
|
||||
</li>
|
||||
<?
|
||||
} //fin parcours etabs
|
||||
?>
|
||||
<table>
|
||||
<tr>
|
||||
<?php
|
||||
if ($curPage>1)
|
||||
{
|
||||
$prev_index=$position-$O['results']['nbReponses'];
|
||||
if ($prev_index<$O['results']['nbReponses']) $prev_index=0;
|
||||
?>
|
||||
<td width="40%" align="right">
|
||||
<a href="./?page=recherche&vue=list&p=<?=$prev_index?>" title="Page précédente...">
|
||||
<img src="./img/boutton_precedent_off.gif" onmouseover="this.src='./img/boutton_precedent_on.gif'" onmouseout="this.src='./img/boutton_precedent_off.gif'"/>
|
||||
</a>
|
||||
</td>
|
||||
<?
|
||||
}
|
||||
else
|
||||
{
|
||||
?>
|
||||
<td width="40%"> </td>
|
||||
<?php
|
||||
}
|
||||
if ($curPage != $totPage) {
|
||||
print '<td width="20%">Page '.$curPage.'/'.$totPage.'</td>';
|
||||
}
|
||||
|
||||
if ($curPage!=$totPage)
|
||||
{
|
||||
?>
|
||||
<td width="20%">Page <?=$curPage?>/<?=$totPage?></td>
|
||||
<?php
|
||||
}
|
||||
|
||||
if ($curPage<$totPage)
|
||||
{
|
||||
?>
|
||||
<td width="40%" align="left">
|
||||
<a href="./?page=recherche&vue=list&p=<?=$position+$O['results']['nbReponses']?>" title="Page suivante...">
|
||||
<img src="./img/boutton_suivant_off.gif" onmouseover="this.src='./img/boutton_suivant_on.gif'" onmouseout="this.src='./img/boutton_suivant_off.gif'"/>
|
||||
</a>
|
||||
</td>
|
||||
<?
|
||||
}
|
||||
else
|
||||
{
|
||||
?>
|
||||
<td width="40%"> </td>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</table>
|
||||
</ol>
|
||||
<?php
|
||||
|
||||
} //Fin test nombre de résultat
|
||||
?>
|
||||
<br/>
|
||||
<?php
|
||||
if ($typeRech=='dir')
|
||||
{
|
||||
$search = '';
|
||||
if(isset($_SESSION['formR']['dirNom'])){ $search.= $_SESSION['formR']['dirNom']; }
|
||||
if(isset($_SESSION['formR']['dirPrenom']) && count($search)>0 ){ $search.= ' '.$_SESSION['formR']['dirPrenom']; }
|
||||
if(isset($_SESSION['formR']['dirPrenom']) && count($search)==0 ){ $search.= $_SESSION['formR']['dirPrenom']; }
|
||||
?>
|
||||
<p class="StyleInfoLib">Effectuer une recherche entreprise avec les paramètres "<a href="./?page=recherche&vue=list&formR[type]=ent&formR[raisonSociale]=<?=$search?>"><?=$search?></a>"</p>
|
||||
<?php
|
||||
if ($curPage < $totPage) {
|
||||
print '<td width="40%" align="left">';
|
||||
print '<a href="./?page=recherche&vue=list&p='.
|
||||
($position + $recherche->results->nbReponses).
|
||||
'" title="Page suivante...">';
|
||||
print '<img src="./img/boutton_suivant_off.gif"'.
|
||||
' onmouseover="this.src=\'./img/boutton_suivant_on.gif\'"'.
|
||||
' onmouseout="this.src=\'./img/boutton_suivant_off.gif\'"/>';
|
||||
print '</a>';
|
||||
print '</td>';
|
||||
} else {
|
||||
print '<td width="40%"> </td>';
|
||||
}
|
||||
print '</table>';
|
||||
print '</ol>';
|
||||
} // Fin test nombre de résultat
|
||||
print '<br/>';
|
||||
if ($typeRech == 'dir') {
|
||||
$search = '';
|
||||
if (isset($_SESSION['formR']['dirNom'])) {
|
||||
$search .= $_SESSION['formR']['dirNom'];
|
||||
}
|
||||
if (isset($_SESSION['formR']['dirPrenom']) && count($search) > 0) {
|
||||
$search .= ' '.$_SESSION['formR']['dirPrenom'];
|
||||
}
|
||||
if (isset($_SESSION['formR']['dirPrenom']) && count($search) == 0) {
|
||||
$search .= $_SESSION['formR']['dirPrenom'];
|
||||
}
|
||||
print '<p class="StyleInfoLib">'.
|
||||
'Effectuer une recherche entreprise avec les paramètres "'.
|
||||
'<a href="./?page=recherche&vue=list&formR[type]=ent'.
|
||||
'&formR[raisonSociale]='.$search.'">'.$search.'</a>"</p>';
|
||||
}
|
||||
|
||||
if ( hasPerm('investig') )
|
||||
{
|
||||
?>
|
||||
<p class="StyleInfoLib">
|
||||
Si aucun résultat ne correspond à votre recherche.
|
||||
<a href="./?page=recherche&action=rechercher&vue=enq">Cliquez-ici.</a><br/>
|
||||
</p>
|
||||
<?php
|
||||
if (hasPerm('investig')) {
|
||||
print '<p class="StyleInfoLib">'.
|
||||
'Si aucun résultat ne correspond à votre recherche.'.
|
||||
'<a href="./?page=recherche&action=rechercher&vue=enq">'.
|
||||
'Cliquez-ici.</a><br/></p>';
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -24,7 +24,9 @@ foreach ($parametresTxt as $key => $param)
|
||||
}
|
||||
}
|
||||
|
||||
if ( $O['nbReponses']==0)
|
||||
FB::log($reponse, 'reponse');
|
||||
|
||||
if ( $reponse->result->nbReponses==0)
|
||||
{
|
||||
?>
|
||||
<p class="StyleInfoLib">
|
||||
@ -41,19 +43,20 @@ else
|
||||
<div id="annonce">
|
||||
<?php
|
||||
//Affichage des données
|
||||
foreach( $O['reponses'] as $annonce )
|
||||
$annonces = $reponse->result->liste->item;
|
||||
foreach( $annonces as $annonce )
|
||||
{
|
||||
$texte = preg_replace_callback("/((?:[0-9]{9,9})|(?:[0-9]{3,3} [0-9]{3,3} [0-9]{3,3})|(?:[0-9]{3,3}\.[0-9]{3,3}\.[0-9]{3,3})|(?:[0-9]{3,3}-[0-9]{3,3}-[0-9]{3,3}))/", replace_siren, $annonce['Annonce']);
|
||||
$texte = preg_replace_callback("/((?:[0-9]{9,9})|(?:[0-9]{3,3} [0-9]{3,3} [0-9]{3,3})|(?:[0-9]{3,3}\.[0-9]{3,3}\.[0-9]{3,3})|(?:[0-9]{3,3}-[0-9]{3,3}-[0-9]{3,3}))/", replace_siren, $annonce->Annonce);
|
||||
|
||||
if(substr($O['criteres']['source'], 0, 3) == 'BOD' )
|
||||
if(substr($reponse->result->criteres->source, 0, 3) == 'BOD' )
|
||||
{
|
||||
?>
|
||||
Source BODACC n°<?=$annonce['Num_Parution']?> <?=substr($O['criteres']['source'], 3, 1)?> du <?=WDate::dateT('Y-m-d', 'd/m/Y', $annonce['Date_Parution'])?>.
|
||||
Source BODACC n°<?=$annonce->Num_Parution?> <?=substr($$reponse->result->criteres->source, 3, 1)?> du <?=WDate::dateT('Y-m-d', 'd/m/Y', $annonce->Date_Parution)?>.
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
Département n°<?=$annonce['Departement']?>. <?=$annonce['Tribunal_Code']?>
|
||||
Département n°<?=$annonce->Departement?>. <?=$annonce->Tribunal_Code?>
|
||||
<br/><br/>
|
||||
<code><?=$texte?></code><br/>
|
||||
<?php
|
||||
|
@ -2,16 +2,16 @@
|
||||
<style type="text/css">
|
||||
ol li { margin-bottom:10px; }
|
||||
</style>
|
||||
<?php
|
||||
<?php
|
||||
$parametresTxt = array(
|
||||
'source'=>'Source',
|
||||
'annee'=>'Année',
|
||||
'dateparution'=>'Date de parution',
|
||||
'nparution'=>'Numéro de parution',
|
||||
'bpage'=>'Page',
|
||||
'nannonce'=>'Numéro d\'annonce',
|
||||
'naffaire'=>'Numéro d\'affaire',
|
||||
'txt'=>'Recherche');
|
||||
'source' => 'Source',
|
||||
'annee' => 'Année',
|
||||
'dateparution' => 'Date de parution',
|
||||
'nparution' => 'Numéro de parution',
|
||||
'bpage' => 'Page',
|
||||
'nannonce' => 'Numéro d\'annonce',
|
||||
'naffaire' => 'Numéro d\'affaire',
|
||||
'txt' => 'Recherche');
|
||||
$strCriteres = '';
|
||||
foreach ($parametresTxt as $key => $param)
|
||||
{
|
||||
@ -21,44 +21,44 @@ foreach ($parametresTxt as $key => $param)
|
||||
}
|
||||
}
|
||||
|
||||
if ( $O['nbReponses']==0)
|
||||
if ( $reponse->nbReponses==0)
|
||||
{
|
||||
?>
|
||||
<p class="StyleInfoLib">
|
||||
Pas de résultat affiché avec le(s) critère(s) <a title="Retour au formulaire de recherche" href="./index.php?page=recherche&vue=annonce"><?=$strCriteres?></a>
|
||||
</p>
|
||||
<?php
|
||||
<?php
|
||||
}
|
||||
else
|
||||
{
|
||||
$reponses = $O['reponses'];
|
||||
$mots = $O['mots'];
|
||||
$reponses = $reponse->reponses->item;
|
||||
$mots = $reponse->mots;
|
||||
|
||||
echo '<p class="StyleInfoLib">';
|
||||
echo $O['nbReponsesTotal'].' réponses. avec les critères <a title="Retour au formulaire de recherche" href="./index.php?page=recherche&vue=annonce">'.$strCriteres.'</a>';
|
||||
$firephp->log($p+$O['nbReponses'], 'quantite');
|
||||
$firephp->log($O['nbReponsesTotal'], 'nbReponsesTotal');
|
||||
if ( $p+$O['nbReponses']<$O['nbReponsesTotal'] )
|
||||
echo $reponse->nbReponsesTotal.' réponses. avec les critères <a title="Retour au formulaire de recherche" href="./index.php?page=recherche&vue=annonce">'.$strCriteres.'</a>';
|
||||
$firephp->log($p+$reponse->nbReponses, 'quantite');
|
||||
$firephp->log($reponse->nbReponsesTotal, 'nbReponsesTotal');
|
||||
if ( $p+$reponse->nbReponses<$reponse->nbReponsesTotal )
|
||||
{
|
||||
$firephp->info('Inferieur');
|
||||
$totPage = ceil($O['nbReponsesTotal']/$_SESSION['tabInfo']['nbReponses']);
|
||||
$totPage = ceil($reponse->nbReponsesTotal/$_SESSION['tabInfo']['nbReponses']);
|
||||
$curPage = ceil($p/$_SESSION['tabInfo']['nbReponses'])+1;
|
||||
echo $_SESSION['tabInfo']['nbReponses'].' résultats affichés.';
|
||||
echo 'Page '.$curPage.'/'.$totPage.'.';
|
||||
echo 'Page '.$curPage.'/'.$totPage.'.';
|
||||
$prec = $p-$_SESSION['tabInfo']['nbReponses'];
|
||||
$suiv = $p+$_SESSION['tabInfo']['nbReponses'];
|
||||
}
|
||||
elseif( $p+$O['nbReponses']==$O['nbReponsesTotal'] )
|
||||
{
|
||||
}
|
||||
elseif( $p+$reponse->nbReponses==$reponse->nbReponsesTotal )
|
||||
{
|
||||
$firephp->info('egale');
|
||||
$totPage = ceil($O['nbReponsesTotal']/$_SESSION['tabInfo']['nbReponses']);
|
||||
$totPage = ceil($reponse->nbReponsesTotal/$_SESSION['tabInfo']['nbReponses']);
|
||||
$curPage = $totPage;
|
||||
echo $_SESSION['tabInfo']['nbReponses'].' résultats affichés.';
|
||||
echo 'Page '.$curPage.'/'.$totPage.'.';
|
||||
echo 'Page '.$curPage.'/'.$totPage.'.';
|
||||
$prec = $p-$_SESSION['tabInfo']['nbReponses'];
|
||||
$suiv = $p+$_SESSION['tabInfo']['nbReponses'];
|
||||
}
|
||||
else
|
||||
}
|
||||
else
|
||||
{
|
||||
$totPage = $curPage = 1;
|
||||
}
|
||||
@ -68,40 +68,40 @@ else
|
||||
{
|
||||
?>
|
||||
<p>Merci d'affiner votre recherche.</p>
|
||||
<?php
|
||||
<?php
|
||||
}
|
||||
else
|
||||
{
|
||||
?>
|
||||
<ol>
|
||||
<?php
|
||||
$indice;
|
||||
foreach( $reponses as $reponse )
|
||||
<?php
|
||||
$indice = 0;
|
||||
foreach( $reponses as $item )
|
||||
{
|
||||
$indice++;
|
||||
?>
|
||||
?>
|
||||
<li type="1" value="<?=$p+$indice?>">
|
||||
<?php
|
||||
$texte = $reponse['Texte'];
|
||||
<?php
|
||||
$texte = $item->Texte;
|
||||
foreach( $mots as $mot ){ $texte = preg_replace('/'.$mot.'/i', '<b>'.strtoupper($mot).'</b>', $texte);}
|
||||
|
||||
if( substr($reponse['Code'],0,3)=='BOD' )
|
||||
if( substr($item->Code,0,3)=='BOD' )
|
||||
{
|
||||
print '<u>BODACC :</u> '.substr($reponse['Code'],3,1);
|
||||
print '<u>BODACC :</u> '.substr($item->Code,3,1);
|
||||
}
|
||||
print ' ';
|
||||
print '<u>Année :</u> '.$reponse['Annee'];
|
||||
print '<u>Année :</u> '.$item->Annee;
|
||||
print '<br/>';
|
||||
print '... '.$texte.' ...';
|
||||
print '<br/>';
|
||||
print '<a href="'.$reponse['Fichier'].'" target="_blank">Télécharger la page en PDF</a>';
|
||||
print '<a href="'.$item->Fichier.'" target="_blank">Télécharger la page en PDF</a>';
|
||||
?>
|
||||
</li>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
}
|
||||
?>
|
||||
</ol>
|
||||
<?php
|
||||
<?php
|
||||
//Page précédentes
|
||||
if($curPage>1)
|
||||
{
|
||||
@ -109,7 +109,7 @@ else
|
||||
}
|
||||
?>
|
||||
<< Page : <?=$curPage.'/'.$totPage?> >>
|
||||
<?php
|
||||
<?php
|
||||
//Page suivante
|
||||
if ($curPage<$totPage)
|
||||
{
|
||||
|
@ -8,19 +8,36 @@ define('RECHERCHE_MAX', 10);
|
||||
*/
|
||||
function recherche_save($form)
|
||||
{
|
||||
$recherche_list = array();
|
||||
$recherche_info = array();
|
||||
if( isset($_SESSION['recherche']['list']) ) $recherche_list = $_SESSION['recherche']['list'];
|
||||
if( isset($_SESSION['recherche']['info']) ) $recherche_info = $_SESSION['recherche']['info'];
|
||||
//Assignation données formulaire
|
||||
$recherche_list[] = serialize($form);
|
||||
$recherche_info[] = '';
|
||||
//On supprime la première recherche soit la plus ancienne si le tableau à un taille supérieure au maximum
|
||||
if(count($recherche_list)>RECHERCHE_MAX) $item_shift = array_shift($recherche_list);
|
||||
if(count($recherche_info)>RECHERCHE_MAX) $item_shift = array_shift($recherche_info);
|
||||
//Assignation des données dans la session
|
||||
$_SESSION['recherche']['list'] = $recherche_list;
|
||||
$_SESSION['recherche']['info'] = $recherche_info;
|
||||
$serialized = serialize($form);
|
||||
if (isset($_SESSION['recherche']['list'])) {
|
||||
foreach ($_SESSION['recherche']['list'] as $item) {
|
||||
if ($item == $serialized) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
$recherche_list = $_SESSION['recherche']['list'];
|
||||
} else {
|
||||
$recherche_list = array();
|
||||
}
|
||||
|
||||
$recherche_info = array();
|
||||
if (isset($_SESSION['recherche']['info'])) {
|
||||
$recherche_info = $_SESSION['recherche']['info'];
|
||||
}
|
||||
// Assignation données formulaire
|
||||
$recherche_list[] = $serialized;
|
||||
$recherche_info[] = '';
|
||||
// On supprime la première recherche soit la plus ancienne
|
||||
// si le tableau à une taille supérieure au maximum
|
||||
if (count($recherche_list) > RECHERCHE_MAX) {
|
||||
$item_shift = array_shift($recherche_list);
|
||||
}
|
||||
if (count($recherche_info) > RECHERCHE_MAX) {
|
||||
$item_shift = array_shift($recherche_info);
|
||||
}
|
||||
// Assignation des données dans la session
|
||||
$_SESSION['recherche']['list'] = $recherche_list;
|
||||
$_SESSION['recherche']['info'] = $recherche_info;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -4,38 +4,38 @@ header('Content-Type: text/html; charset='.CHARSET);
|
||||
?>
|
||||
<fieldset>
|
||||
<legend>Liquidateur / Nouveau dirigeant 1</legend>
|
||||
<label>Fonction :</label><select name="jugement[nouvDir1Fonc]"><?=$strSelectDir?></select>
|
||||
<label>Genre :</label><select name="jugement[nouvDir1Genre]"><?=$strSelectGenre?></select>
|
||||
<label>Fonction :</label><select name="jugement[nouvDir][0][Fonc]"><?=$strSelectDir?></select>
|
||||
<label>Genre :</label><select name="jugement[nouvDir][0][Genre]"><?=$strSelectGenre?></select>
|
||||
<label>Prénom(s) / Siren </label>
|
||||
<input type="text" name="jugement[nouvDir1Pre]" size="15" maxlength="40">
|
||||
<label>NOM :</label><input type="text" name="jugement[nouvDir1Nom]" size="15" maxlength="40">
|
||||
<label>Domicilié : </label><input type="text" name="jugement[nouvDir1Dom]" size="60" maxlength="255" value="" />
|
||||
<input type="text" name="jugement[nouvDir][0][Pre]" size="15" maxlength="40">
|
||||
<label>NOM :</label><input type="text" name="jugement[nouvDir][0][Nom]" size="15" maxlength="40">
|
||||
<label>Domicilié : </label><input type="text" name="jugement[nouvDir][0][Dom]" size="60" maxlength="255" value="" />
|
||||
</fieldset>
|
||||
<p><a href="#" onclick="$('#NouveauDirigeant2').css('display','block');">Nouveau Dirigeant 2</a></p>
|
||||
<p><a href="#" onclick="$('#NouveauDirigeant3').css('display','block');">Nouveau Dirigeant 3</a></p>
|
||||
|
||||
<fieldset id="NouveauDirigeant2">
|
||||
<legend>Nouveau dirigeant 2</legend>
|
||||
<label>Fonction:</label><select name="jugement[nouvDir2Fonc]"><?=$strSelectDir?></select>
|
||||
<label>Genre :</label><select name="jugement[nouvDir2Genre]"><?=$strSelectGenre?></select>
|
||||
<label>Fonction:</label><select name="jugement[nouvDir][1][Fonc]"><?=$strSelectDir?></select>
|
||||
<label>Genre :</label><select name="jugement[nouvDir][1][Genre]"><?=$strSelectGenre?></select>
|
||||
<label>Prénom(s) / Siren </label>
|
||||
<input type="text" name="jugement[nouvDir2Pre]" size="15" maxlength="40">
|
||||
<input type="text" name="jugement[nouvDir][1][Pre]" size="15" maxlength="40">
|
||||
<label>NOM :</label>
|
||||
<input type="text" name="jugement[nouvDir2Nom]" size="15" maxlength="40">
|
||||
<input type="text" name="jugement[nouvDir][1][Nom]" size="15" maxlength="40">
|
||||
<label>Domicilié :</label>
|
||||
<input type="text" name="jugement[nouvDir2Dom]" size="60" maxlength="255" value="" />
|
||||
<input type="text" name="jugement[nouvDir][1][Dom]" size="60" maxlength="255" value="" />
|
||||
<p><a href="#" onclick="$('#NouveauDirigeant2').css('display','none');">Masquer.</a></p>
|
||||
</fieldset>
|
||||
|
||||
<fieldset id="NouveauDirigeant3">
|
||||
<legend>Nouveau dirigeant 3</legend>
|
||||
<label>Fonction :</label><select name="jugement[nouvDir3Fonc]"><?=$strSelectDir?></select>
|
||||
<label>Genre :</label><select name="jugement[nouvDir3Genre]"><?=$strSelectGenre?></select>
|
||||
<label>Fonction :</label><select name="jugement[nouvDir][2][Fonc]"><?=$strSelectDir?></select>
|
||||
<label>Genre :</label><select name="jugement[nouvDir][2][Genre]"><?=$strSelectGenre?></select>
|
||||
<label>Prénom(s) / Siren</label>
|
||||
<input type="text" name="jugement[nouvDir3Pre]" size="15" maxlength="40">
|
||||
<label>NOM :</label><input type="text" name="jugement[nouvDir3Nom]" size="15" maxlength="40"><br/>
|
||||
<input type="text" name="jugement[nouvDir][2][Pre]" size="15" maxlength="40">
|
||||
<label>NOM :</label><input type="text" name="jugement[nouvDir][2][Nom]" size="15" maxlength="40"><br/>
|
||||
<label>Domicilié :</label>
|
||||
<input type="text" name="jugement[nouvDir3Dom]" size="60" maxlength="255" value="" />
|
||||
<input type="text" name="jugement[nouvDir][2][Dom]" size="60" maxlength="255" value="" />
|
||||
<p><a href="#" onclick="$('#NouveauDirigeant3').css('display','none');">Masquer.</a></p>
|
||||
</fieldset>
|
||||
|
||||
|
@ -3,40 +3,40 @@ include_once(realpath(dirname(__FILE__).'/constantes.php'));
|
||||
header('Content-Type: text/html; charset='.CHARSET);
|
||||
?>
|
||||
<fieldset>
|
||||
<legend>Nouveau dirigeant 1</legend>
|
||||
<label>Fonction :</label><select name="jugement[nouvDir1Fonc]"><?=$strSelectDir?></select>
|
||||
<label>Genre :</label><select name="jugement[nouvDir1Genre]"><?=$strSelectGenre?></select>
|
||||
<legend>Liquidateur / Nouveau dirigeant 1</legend>
|
||||
<label>Fonction :</label><select name="jugement[nouvDir][0][Fonc]"><?=$strSelectDir?></select>
|
||||
<label>Genre :</label><select name="jugement[nouvDir][0][Genre]"><?=$strSelectGenre?></select>
|
||||
<label>Prénom(s) / Siren </label>
|
||||
<input type="text" name="jugement[nouvDir1Pre]" size="15" maxlength="40">
|
||||
<label>NOM :</label><input type="text" name="jugement[nouvDir1Nom]" size="15" maxlength="40">
|
||||
<label>Domicilié : </label><input type="text" name="jugement[nouvDir1Dom]" size="60" maxlength="255" value="" />
|
||||
<input type="text" name="jugement[nouvDir][0][Pre]" size="15" maxlength="40">
|
||||
<label>NOM :</label><input type="text" name="jugement[nouvDir][0][Nom]" size="15" maxlength="40">
|
||||
<label>Domicilié : </label><input type="text" name="jugement[nouvDir][0][Dom]" size="60" maxlength="255" value="" />
|
||||
</fieldset>
|
||||
<p><a href="#" onClick="$('#NouveauDirigeant2').css('display','block');">Nouveau Dirigeants2</a></p>
|
||||
<p><a href="#" onClick="$('#NouveauDirigeant3').css('display','block');">Nouveau Dirigeants3</a></p>
|
||||
<p><a href="#" onclick="$('#NouveauDirigeant2').css('display','block');">Nouveau Dirigeant 2</a></p>
|
||||
<p><a href="#" onclick="$('#NouveauDirigeant3').css('display','block');">Nouveau Dirigeant 3</a></p>
|
||||
|
||||
<fieldset id="NouveauDirigeant2">
|
||||
<legend>Nouveau dirigeant 2</legend>
|
||||
<label>Fonction:</label><select name="jugement[nouvDir2Fonc]"><?=$strSelectDir?></select>
|
||||
<label>Genre :</label><select name="jugement[nouvDir2Genre]"><?=$strSelectGenre?></select>
|
||||
<label>Fonction:</label><select name="jugement[nouvDir][1][Fonc]"><?=$strSelectDir?></select>
|
||||
<label>Genre :</label><select name="jugement[nouvDir][1][Genre]"><?=$strSelectGenre?></select>
|
||||
<label>Prénom(s) / Siren </label>
|
||||
<input type="text" name="jugement[nouvDir2Pre]" size="15" maxlength="40">
|
||||
<input type="text" name="jugement[nouvDir][1][Pre]" size="15" maxlength="40">
|
||||
<label>NOM :</label>
|
||||
<input type="text" name="jugement[nouvDir2Nom]" size="15" maxlength="40">
|
||||
<input type="text" name="jugement[nouvDir][1][Nom]" size="15" maxlength="40">
|
||||
<label>Domicilié :</label>
|
||||
<input type="text" name="jugement[nouvDir2Dom]" size="60" maxlength="255" value="" />
|
||||
<p><a href="#" onClick="$('#NouveauDirigeant2').css('display','none');">Masquer.</a></p>
|
||||
<input type="text" name="jugement[nouvDir][1][Dom]" size="60" maxlength="255" value="" />
|
||||
<p><a href="#" onclick="$('#NouveauDirigeant2').css('display','none');">Masquer.</a></p>
|
||||
</fieldset>
|
||||
|
||||
<fieldset id="NouveauDirigeant3">
|
||||
<legend>Nouveau dirigeant 3</legend>
|
||||
<label>Fonction :</label><select name="jugement[nouvDir3Fonc]"><?=$strSelectDir?></select>
|
||||
<label>Genre :</label><select name="jugement[nouvDir3Genre]"><?=$strSelectGenre?></select>
|
||||
<label>Fonction :</label><select name="jugement[nouvDir][2][Fonc]"><?=$strSelectDir?></select>
|
||||
<label>Genre :</label><select name="jugement[nouvDir][2][Genre]"><?=$strSelectGenre?></select>
|
||||
<label>Prénom(s) / Siren</label>
|
||||
<input type="text" name="jugement[nouvDir3Pre]" size="15" maxlength="40">
|
||||
<label>NOM :</label><input type="text" name="jugement[nouvDir3Nom]" size="15" maxlength="40"><br/>
|
||||
<input type="text" name="jugement[nouvDir][2][Pre]" size="15" maxlength="40">
|
||||
<label>NOM :</label><input type="text" name="jugement[nouvDir][2][Nom]" size="15" maxlength="40"><br/>
|
||||
<label>Domicilié :</label>
|
||||
<input type="text" name="jugement[nouvDir3Dom]" size="60" maxlength="255" value="" />
|
||||
<p><a href="#" onClick="$('#NouveauDirigeant3').css('display','none');">Masquer.</a></p>
|
||||
<input type="text" name="jugement[nouvDir][2][Dom]" size="60" maxlength="255" value="" />
|
||||
<p><a href="#" onclick="$('#NouveauDirigeant3').css('display','none');">Masquer.</a></p>
|
||||
</fieldset>
|
||||
|
||||
<label>Complément, huissier, opposition, etc...</label>
|
||||
|
@ -1,10 +1,10 @@
|
||||
<?php
|
||||
header('Content-Type: text/html; charset='.CHARSET);
|
||||
|
||||
if ( !isset($inEditDialog) || $inEditDialog === false ) {
|
||||
$tribunal = (isset($_REQUEST['tribunal']) ? $_REQUEST['tribunal'] : '');
|
||||
$siren = (isset($_REQUEST['siren']) ? $_REQUEST['siren'] : '');
|
||||
$nic = (isset($_REQUEST['nic']) ? $_REQUEST['nic'] : '');
|
||||
if (isset($inEditDialog) == false || $inEditDialog === false) {
|
||||
$tribunal = (isset($_REQUEST['tribunal']) ? $_REQUEST['tribunal'] : '');
|
||||
$siren = (isset($_REQUEST['siren'] ) ? $_REQUEST['siren'] : '');
|
||||
$nic = (isset($_REQUEST['nic'] ) ? $_REQUEST['nic'] : '');
|
||||
}
|
||||
|
||||
$tabPerimetreVente = array(
|
||||
@ -28,42 +28,48 @@ require_once realpath(dirname(__FILE__)).'/../coursappel.php';
|
||||
require_once realpath(dirname(__FILE__)).'/../field_opposition.php';
|
||||
?>
|
||||
<label>Date de jouissance / effet :</label>
|
||||
<input type="text" maxlength="10" class="date" name="jugement[dateFinPeriode]" value="<?=$saisie['dateFinPeriode']?>" />
|
||||
<input type="text" maxlength="10" class="date"
|
||||
name="jugement[dateFinPeriode]" value="<?=$saisie['dateFinPeriode']?>" />
|
||||
<span class="left">(Format JJ/MM/AAAA)</span>
|
||||
<label>Montant de la vente</label>
|
||||
<input type="text" class="widthauto" name="jugement[montant]" size="10" maxlength="15" value="<?=$saisie['montant']?>"/>
|
||||
<input type="text" class="widthauto" name="jugement[montant]"
|
||||
size="10" maxlength="15" value="<?=$saisie['montant']?>"/>
|
||||
<span class="left">en € sans les cents</span>
|
||||
|
||||
<label>Etablissement concerné</label>
|
||||
<select name="etablissement5500[]" multiple size="3">
|
||||
<option value="-">-</option>
|
||||
<?php
|
||||
try {
|
||||
FB::log($siren, 'Etab-Siren');
|
||||
$O = $client->getListeEtablissements($siren);
|
||||
$listEtablissements = $O['result'];
|
||||
foreach ( $listEtablissements as $etablissement ) {
|
||||
//Information etablissement
|
||||
$title = $siren.$etablissement['Nic'].' - '.$etablissement['Adresse'].' '.
|
||||
$etablissement['CP'].' '.$etablissement['Ville'];
|
||||
$value = $etablissement['Adresse'].' '.$etablissement['CP'].' '.
|
||||
$etablissement['Ville'].' ('.$etablissement['Nic'].')';
|
||||
$siege = '';
|
||||
if ( $etablissement['Siege']==1 && $etablissement['Actif']==1 ) {
|
||||
$siege = ' (Siège Actif)';
|
||||
$ws = new WsScores();
|
||||
$reponse = $ws->getListeEtablissements($siren);
|
||||
if ($reponse!=false){
|
||||
$listEtablissements = $reponse->result->liste->item;
|
||||
if ( count($listEtablissements)>0 ){
|
||||
foreach ($listEtablissements as $etablissement) {
|
||||
$title =
|
||||
$siren.$etablissement->Nic.' - '.
|
||||
$etablissement->Adresse.' '.
|
||||
$etablissement->CP.' '.
|
||||
$etablissement->Ville;
|
||||
$value = $etablissement->Nic;
|
||||
$siege = '';
|
||||
$select = '';
|
||||
if ($etablissement->Nic == $nic) {
|
||||
$select = ' selected';
|
||||
}
|
||||
if ($etablissement->Siege == 1 && $etablissement->Actif == 1) {
|
||||
$siege = ' (Siège Actif)';
|
||||
}
|
||||
print '<option'.$select.' title="'.$title.$siege.
|
||||
'" value="'.$value.'">'.$title.$siege.'</option>';
|
||||
}
|
||||
//Sélection etablissement
|
||||
|
||||
echo '<option title="'.$title.$siege.'" value="'.$value.'">'.$title.$siege.'</option>';
|
||||
}
|
||||
} catch (SoapFault $fault) {
|
||||
require_once 'soaperror.php';
|
||||
processSoapFault($client,$fault,$tabInfo);
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
<div class="info">
|
||||
<a href="#" title="<?=$siren.$nic?>" id="etabnic">Utiliser l'établissement : <?=$nic?></a>
|
||||
<a href="#" title="<?=$siren.$nic?>" id="etabnic">
|
||||
Utiliser l'établissement : <?=$nic?></a>
|
||||
<div id="infoetabnic"></div>
|
||||
<input type="hidden" name="etabnic" value=""/>
|
||||
</div>
|
||||
@ -73,18 +79,19 @@ try {
|
||||
<option value="-">-</option>
|
||||
<?php
|
||||
foreach ( $tabPerimetreVente as $num => $perimetre ) {
|
||||
$select = '';
|
||||
if ( isset($inEditDialog) && $inEditDialog === true ){
|
||||
if ( in_array($num, $saisie['even']) ) {
|
||||
$select = 'selected';
|
||||
}
|
||||
}
|
||||
?>
|
||||
<option value="<?=$num?>" <?=$select?>><?=$perimetre?></option>
|
||||
<?php
|
||||
$select = '';
|
||||
if ( isset($inEditDialog) && $inEditDialog === true ){
|
||||
if ( isset($saisie['even']) && in_array($num, $saisie['even']) ) {
|
||||
$select = 'selected';
|
||||
}
|
||||
}
|
||||
?>
|
||||
<option value="<?=$num?>" <?=$select?>><?=$perimetre?></option>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
|
||||
<label>Complément, huissier, etc...</label>
|
||||
<input type="text" name="jugement[comp]" size="70" maxlength="900" value="<?=$saisie['comp']?>" />
|
||||
<input type="text" name="jugement[comp]" size="70" maxlength="900"
|
||||
value="<?=$saisie['comp']?>" />
|
||||
|
@ -1,80 +1,80 @@
|
||||
<?php
|
||||
header('Content-Type: text/html; charset='.CHARSET);
|
||||
require_once realpath(dirname(__FILE__).'/../constantes.php');
|
||||
$siren = (isset($_REQUEST['siren'])? $_REQUEST['siren'] : '');
|
||||
$nic = (isset($_REQUEST['nic'])? $_REQUEST['nic'] : '');
|
||||
$siren = (isset($_REQUEST['siren']) ? $_REQUEST['siren'] : '');
|
||||
$nic = (isset($_REQUEST['nic'] ) ? $_REQUEST['nic'] : '');
|
||||
|
||||
//Afficher la liste des établissements
|
||||
// Afficher la liste des établissements
|
||||
?>
|
||||
<label>Etablissement concerné</label>
|
||||
<select name="jugement[nic]" size="5">
|
||||
<option value="-">-</option>
|
||||
<?php
|
||||
try {
|
||||
$O = $client->getListeEtablissements($siren);
|
||||
$listEtablissements = $O['result'];
|
||||
$firephp->log($listEtablissements, 'Etablissements');
|
||||
foreach($listEtablissements as $etablissement)
|
||||
{
|
||||
$title = $siren.$etablissement['Nic'].' - '.$etablissement['Adresse'].' '.$etablissement['CP'].' '.$etablissement['Ville'];
|
||||
$value = $etablissement['Nic'];
|
||||
$siege = '';
|
||||
$select = '';
|
||||
if($etablissement['Nic']==$nic)
|
||||
{
|
||||
$select = ' selected';
|
||||
$ws = new WsScores();
|
||||
$reponse = $ws->getListeEtablissements($siren);
|
||||
if ($reponse!=false){
|
||||
$listEtablissements = $reponse->result->liste->item;
|
||||
if ( count($listEtablissements)>0 ){
|
||||
foreach ($listEtablissements as $etablissement) {
|
||||
$title =
|
||||
$siren.$etablissement->Nic.' - '.
|
||||
$etablissement->Adresse.' '.
|
||||
$etablissement->CP.' '.
|
||||
$etablissement->Ville;
|
||||
$value = $etablissement->Nic;
|
||||
$siege = '';
|
||||
$select = '';
|
||||
if ($etablissement->Nic == $nic) {
|
||||
$select = ' selected';
|
||||
}
|
||||
if ($etablissement->Siege == 1 && $etablissement->Actif == 1) {
|
||||
$siege = ' (Siège Actif)';
|
||||
}
|
||||
print '<option'.$select.' title="'.$title.$siege.
|
||||
'" value="'.$value.'">'.$title.$siege.'</option>';
|
||||
}
|
||||
if($etablissement['Siege']==1 && $etablissement['Actif']==1)
|
||||
{
|
||||
$siege = ' (Siège Actif)';
|
||||
}
|
||||
echo '<option'.$select.' title="'.$title.$siege.'" value="'.$value.'">'.$title.$siege.'</option>';
|
||||
}
|
||||
} catch (SoapFault $fault) {
|
||||
require_once 'soaperror.php';
|
||||
processSoapFault($client,$fault,$tabInfo);
|
||||
$firephp->log($client->__getLastRequest(), 'Request');
|
||||
$firephp->log($client->__getLastResponse(), 'Response');
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
|
||||
<fieldset>
|
||||
<legend>Nouveau dirigeant 1</legend>
|
||||
<label>Fonction :</label><select name="jugement[nouvDir1Fonc]"><?=$strSelectDir?></select>
|
||||
<label>Genre :</label><select name="jugement[nouvDir1Genre]"><?=$strSelectGenre?></select>
|
||||
<label>Fonction :</label><select name="jugement[nouvDir][0][Fonc]"><?=$strSelectDir?></select>
|
||||
<label>Genre :</label><select name="jugement[nouvDir][0][Genre]"><?=$strSelectGenre?></select>
|
||||
<label>Prénom(s) / Siren </label>
|
||||
<input type="text" name="jugement[nouvDir1Pre]" size="15" maxlength="40">
|
||||
<label>NOM :</label><input type="text" name="jugement[nouvDir1Nom]" size="15" maxlength="40">
|
||||
<label>Domicilié : </label><input type="text" name="jugement[nouvDir1Dom]" size="60" maxlength="255" value="" />
|
||||
<input type="text" name="jugement[nouvDir][0][Pre]" size="15" maxlength="40">
|
||||
<label>NOM :</label><input type="text" name="jugement[nouvDir][0][Nom]" size="15" maxlength="40">
|
||||
<label>Domicilié : </label><input type="text" name="jugement[nouvDir][0][Dom]" size="60" maxlength="255" value="" />
|
||||
</fieldset>
|
||||
<p><a href="#" onClick="$('#NouveauDirigeant2').css('display','block');">Nouveau Dirigeants2</a></p>
|
||||
<p><a href="#" onClick="$('#NouveauDirigeant3').css('display','block');">Nouveau Dirigeants3</a></p>
|
||||
<p><a href="#" onclick="$('#NouveauDirigeant2').css('display','block');">Nouveau Dirigeant 2</a></p>
|
||||
<p><a href="#" onclick="$('#NouveauDirigeant3').css('display','block');">Nouveau Dirigeant 3</a></p>
|
||||
|
||||
<fieldset id="NouveauDirigeant2">
|
||||
<legend>Nouveau dirigeant 2</legend>
|
||||
<label>Fonction:</label><select name="jugement[nouvDir2Fonc]"><?=$strSelectDir?></select>
|
||||
<label>Genre :</label><select name="jugement[nouvDir2Genre]"><?=$strSelectGenre?></select>
|
||||
<label>Fonction:</label><select name="jugement[nouvDir][1][Fonc]"><?=$strSelectDir?></select>
|
||||
<label>Genre :</label><select name="jugement[nouvDir][1][Genre]"><?=$strSelectGenre?></select>
|
||||
<label>Prénom(s) / Siren </label>
|
||||
<input type="text" name="jugement[nouvDir2Pre]" size="15" maxlength="40">
|
||||
<input type="text" name="jugement[nouvDir][1][Pre]" size="15" maxlength="40">
|
||||
<label>NOM :</label>
|
||||
<input type="text" name="jugement[nouvDir2Nom]" size="15" maxlength="40">
|
||||
<input type="text" name="jugement[nouvDir][1][Nom]" size="15" maxlength="40">
|
||||
<label>Domicilié :</label>
|
||||
<input type="text" name="jugement[nouvDir2Dom]" size="60" maxlength="255" value="" />
|
||||
<p><a href="#" onClick="$('#NouveauDirigeant2').css('display','none');">Masquer.</a></p>
|
||||
<input type="text" name="jugement[nouvDir][1][Dom]" size="60" maxlength="255" value="" />
|
||||
<p><a href="#" onclick="$('#NouveauDirigeant2').css('display','none');">Masquer.</a></p>
|
||||
</fieldset>
|
||||
|
||||
<fieldset id="NouveauDirigeant3">
|
||||
<legend>Nouveau dirigeant 3</legend>
|
||||
<label>Fonction :</label><select name="jugement[nouvDir3Fonc]"><?=$strSelectDir?></select>
|
||||
<label>Genre :</label><select name="jugement[nouvDir3Genre]"><?=$strSelectGenre?></select>
|
||||
<label>Fonction :</label><select name="jugement[nouvDir][2][Fonc]"><?=$strSelectDir?></select>
|
||||
<label>Genre :</label><select name="jugement[nouvDir][2][Genre]"><?=$strSelectGenre?></select>
|
||||
<label>Prénom(s) / Siren</label>
|
||||
<input type="text" name="jugement[nouvDir3Pre]" size="15" maxlength="40">
|
||||
<label>NOM :</label><input type="text" name="jugement[nouvDir3Nom]" size="15" maxlength="40"><br/>
|
||||
<input type="text" name="jugement[nouvDir][2][Pre]" size="15" maxlength="40">
|
||||
<label>NOM :</label><input type="text" name="jugement[nouvDir][2][Nom]" size="15" maxlength="40"><br/>
|
||||
<label>Domicilié :</label>
|
||||
<input type="text" name="jugement[nouvDir3Dom]" size="60" maxlength="255" value="" />
|
||||
<p><a href="#" onClick="$('#NouveauDirigeant3').css('display','none');">Masquer.</a></p>
|
||||
<input type="text" name="jugement[nouvDir][2][Dom]" size="60" maxlength="255" value="" />
|
||||
<p><a href="#" onclick="$('#NouveauDirigeant3').css('display','none');">Masquer.</a></p>
|
||||
</fieldset>
|
||||
|
||||
|
||||
<label>Complément, huissier, opposition, etc...</label>
|
||||
<input type="text" name="jugement[comp]" size="70" maxlength="255" value="" />
|
||||
<input type="text" name="jugement[comp]" size="70" maxlength="255" value="" />
|
||||
|
@ -1,33 +1,34 @@
|
||||
<?php
|
||||
$format = 'odt';
|
||||
if ($format == 'odt') {
|
||||
|
||||
require_once 'infogreffe/constantes.php';
|
||||
require_once 'dbbootstrap.php';
|
||||
setDbConn('sdv1');
|
||||
function normaliseVoie($txt)
|
||||
{
|
||||
$replace_pairs =
|
||||
array('BD ' => 'BOULEVARD ',
|
||||
'BVD ' => 'BOULEVARD ',
|
||||
'AV ' => 'AVENUE ',
|
||||
'AVE ' => 'AVENUE ',
|
||||
'PL ' => 'PLACE ',
|
||||
'PLA ' => 'PLACE ',
|
||||
'PLAC ' => 'PLACE ',
|
||||
'ESP ' => 'ESP ',
|
||||
'RTE ' => 'ROUTE ',
|
||||
'ST ' => 'SAINT ',
|
||||
'STE ' => 'SAINTE ',
|
||||
'QU ' => 'QUAI ');
|
||||
return strtr($txt, $replace_pairs);
|
||||
}
|
||||
|
||||
require_once 'infogreffe/constantes.php';
|
||||
require_once 'dbbootstrap.php';
|
||||
setDbConn('sdv1');
|
||||
|
||||
if ($format == 'odt') {
|
||||
|
||||
define('PCLZIP_TEMPORARY_DIR', PATH_DATA.'/courrier/');
|
||||
require_once 'lib/odtphp/library/odf.php';
|
||||
$odf = new odf(realpath(dirname(__FILE__).'/modeleLettreGreffe.odt'));
|
||||
|
||||
function normaliseVoie($txt)
|
||||
{
|
||||
$replace_pairs =
|
||||
array('BD ' => 'BOULEVARD ',
|
||||
'BVD ' => 'BOULEVARD ',
|
||||
'AV ' => 'AVENUE ',
|
||||
'AVE ' => 'AVENUE ',
|
||||
'PL ' => 'PLACE ',
|
||||
'PLA ' => 'PLACE ',
|
||||
'PLAC ' => 'PLACE ',
|
||||
'ESP ' => 'ESP ',
|
||||
'RTE ' => 'ROUTE ',
|
||||
'ST ' => 'SAINT ',
|
||||
'STE ' => 'SAINTE ',
|
||||
'QU ' => 'QUAI ');
|
||||
return strtr($txt, $replace_pairs);
|
||||
}
|
||||
|
||||
$info = new StdClass;
|
||||
$info->ref = $id;
|
||||
$typeCommande = substr($info->ref, 0, 1);
|
||||
@ -54,23 +55,22 @@ if ($format == 'odt') {
|
||||
$typeDocument = 'kbis';
|
||||
}
|
||||
|
||||
require_once 'scoresws/scoresws.php';
|
||||
// Identite
|
||||
$siren = $commande->siren;
|
||||
$O = $client->getIdentite($siren, '', false);
|
||||
$etab = $O['result'];
|
||||
$commune = $etab['codeCommune'];
|
||||
$dept = $etab['Dept'];
|
||||
$siret = $etab['Siret'];
|
||||
$numRC = $etab['NumRC'];
|
||||
$etab = scoresws_identite($siren, $siren, 0);
|
||||
$commune = $etab->codeCommune;
|
||||
$dept = $etab->Dept;
|
||||
$siret = $etab->Siret;
|
||||
$numRC = $etab->NumRC;
|
||||
|
||||
// Adresse du tribunal de commerce
|
||||
$O = $client->getListeCompetences($siret, 'tri', $dept.$commune);
|
||||
$competence = $O['result'][0];
|
||||
$tribunalCode = $competence['Code'];
|
||||
$tribunalLib = $competence['Nom'];
|
||||
$competence = scorews_competences($siret, $siren, $idEntreprise, 'tri', $dept.$commune);
|
||||
$tribunalCode = $competence->Competence->item[0]->Code;
|
||||
$tribunalLib = $competence->Competence->item[0]->Nom;
|
||||
if (preg_match('/(A|B|C|D)/i', $numRC)) {
|
||||
$libTrib = ' RCS '.
|
||||
preg_replace('/(^TC |^TI |^TGIcc |^TMX )/i', '', $tribunalLib);
|
||||
preg_replace('/(^TC |^TI |^TGIcc |^TMX )/i', '', $tribunalLib);
|
||||
} else if (preg_match('/(P)/i', $numRC)) {
|
||||
$libTrib = ' RSAC '.
|
||||
preg_replace('/(^TC |^TI |^TGIcc |^TMX )/i', '', $tribunalLib);
|
||||
@ -79,14 +79,14 @@ if ($format == 'odt') {
|
||||
substr($siren, 0, 3).' '.
|
||||
substr($siren, 3, 3).' '.
|
||||
substr($siren, 6, 3);
|
||||
$info->nom = htmlspecialchars_decode($etab['Nom'], ENT_QUOTES);
|
||||
$info->libTrib = $libTrib;
|
||||
$info->adresse = htmlspecialchars_decode($etab['Adresse'], ENT_QUOTES).' ';
|
||||
if (empty($etab['Adresse2']) == false) {
|
||||
$info->adresse .= $etab['Adresse2'].' ';
|
||||
$info->nom = htmlspecialchars_decode($etab->Nom, ENT_QUOTES);
|
||||
$info->libTrib = $libTrib;
|
||||
$info->adresse = htmlspecialchars_decode($etab->Adresse, ENT_QUOTES).' ';
|
||||
if (empty($etab->Adresse2) == false) {
|
||||
$info->adresse .= $etab->Adresse2.' ';
|
||||
}
|
||||
$info->adresse .= "\n".$etab['CP'].' '.$etab['Ville'];
|
||||
$info->tribunal = $competence;
|
||||
$info->adresse .= "\n".$etab->CP.' '.$etab->Ville;
|
||||
$info->tribunal = $competence->Competence->item[0];
|
||||
|
||||
// Prix
|
||||
$tarifs = Doctrine_Query::create()
|
||||
@ -98,28 +98,17 @@ if ($format == 'odt') {
|
||||
|
||||
if ($tarifs->count() == 0) {
|
||||
echo 'Commande '.$commande->type.$commande->id.' - Pas de tarifs défini pour le tribunal '.
|
||||
$info->tribunal['Nom'].' ('.$tribunalCode.')';
|
||||
$info->tribunal->Nom.' ('.$tribunalCode.')';
|
||||
exit;
|
||||
}
|
||||
$info->prix = number_format($tarifs[0]->prix, 2, ',', ' ');
|
||||
$info->enveloppe = $tarifs[0]->enveloppe;
|
||||
|
||||
// Destinataire
|
||||
/*
|
||||
$destinataire =
|
||||
strtr($info->tribunal['Nom'],
|
||||
array('TGI' => 'TRIBUNAL DE GRANDE INSTANCE DE',
|
||||
'TI' => 'TRIBUNAL D\'INSTANCE DE',
|
||||
'TC' => 'TRIBUNAL DE COMMERCE DE',
|
||||
'TGIcc' =>
|
||||
'TRIBUNAL DE GRANDE INSTANCE A COMPETENCE COMMERCIALE DE')
|
||||
);
|
||||
$destinataire .= "\n";
|
||||
*/
|
||||
$destinataire = "REGISTRE DU COMMERCE - GREFFE\n".
|
||||
normaliseVoie(trim($info->tribunal['Adr']))."\n".
|
||||
normaliseVoie($info->tribunal['AdrComp'])."\n".
|
||||
$info->tribunal['CP'].' '.$info->tribunal['Ville']."\n";
|
||||
normaliseVoie(trim($info->tribunal->Adr))."\n".
|
||||
normaliseVoie($info->tribunal->AdrComp)."\n".
|
||||
$info->tribunal->CP.' '.$info->tribunal->Ville."\n";
|
||||
|
||||
// Type de document demandé (actes ou bilans pour l'instant)
|
||||
// [un Kbis / l'état d'endettement / la copie de jugement de XXX en date du XXX]
|
||||
@ -146,7 +135,7 @@ if ($format == 'odt') {
|
||||
|
||||
// Societe
|
||||
$societe = $info->nom."\n".'( '.$info->siren.$info->libTrib.' )'."\n";
|
||||
$societe .= normaliseVoie($info->adresse);
|
||||
$societe .= normaliseVoie(htmlspecialchars_decode($info->adresse, ENT_QUOTES));
|
||||
|
||||
// Piece jointe et montant
|
||||
if ($info->enveloppe) {
|
||||
@ -186,8 +175,6 @@ if ($format == 'odt') {
|
||||
// just require TCPDF instead of FPDF
|
||||
require_once 'lib/tcpdf/tcpdf.php';
|
||||
require_once 'lib/fpdi/fpdi.php';
|
||||
require_once 'dbbootstrap.php';
|
||||
require_once 'infogreffe/constantes.php';
|
||||
|
||||
class PDF extends FPDI {
|
||||
/**
|
||||
@ -209,27 +196,6 @@ if ($format == 'odt') {
|
||||
function Footer() {}
|
||||
}
|
||||
|
||||
function normaliseVoie($txt)
|
||||
{
|
||||
$replace_pairs = array(
|
||||
'BD ' => 'BOULEVARD ',
|
||||
'BVD ' => 'BOULEVARD ',
|
||||
'AV ' => 'AVENUE ',
|
||||
'AVE ' => 'AVENUE ',
|
||||
'PL ' => 'PLACE ',
|
||||
'PLA ' => 'PLACE ',
|
||||
'PLAC ' => 'PLACE ',
|
||||
'ESP ' => 'ESP ',
|
||||
'RTE ' => 'ROUTE ',
|
||||
'ST ' => 'SAINT ',
|
||||
'STE ' => 'SAINTE ',
|
||||
'QU ' => 'QUAI ',
|
||||
);
|
||||
return strtr($txt, $replace_pairs);
|
||||
}
|
||||
|
||||
setDbConn('sdv1');
|
||||
|
||||
$pdfInfo = new StdClass();
|
||||
$pdfInfo->ref = $id;
|
||||
$typeCommande = substr($pdfInfo->ref, 0, 1);
|
||||
@ -244,16 +210,13 @@ if ($format == 'odt') {
|
||||
->andWhere('typeCommande = ?', 'C');
|
||||
|
||||
$commande = $q->fetchOne();
|
||||
if( preg_match('/^([0-9]{4}_).*?$/', $commande->refDocument, $matches) )
|
||||
{
|
||||
if( preg_match('/^([0-9]{4}_).*?$/', $commande->refDocument, $matches) ){
|
||||
$typeDocument = 'bilans';
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
$typeDocument = 'actes';
|
||||
}
|
||||
|
||||
} elseif ( $typeCommande == 'K'){
|
||||
} elseif ( $typeCommande == 'K') {
|
||||
// => Info Commande
|
||||
$q = Doctrine_Query::create()
|
||||
->from('CommandesKbis')
|
||||
@ -264,43 +227,38 @@ if ($format == 'odt') {
|
||||
$typeDocument = 'kbis';
|
||||
}
|
||||
|
||||
|
||||
// => Identite
|
||||
$siren = $commande->siren;
|
||||
|
||||
$O = $client->getIdentite($siren, '', false);
|
||||
$etab = $O['result'];
|
||||
$codeCommune = $etab['codeCommune'];
|
||||
$dept = $etab['Dept'];
|
||||
$siret = $etab['Siret'];
|
||||
$numRC = $etab['NumRC'];
|
||||
require_once 'scoresws/scoresws.php';
|
||||
// Identite
|
||||
$siren = $commande->siren;
|
||||
$etab = scoresws_identite($siren, $siren, 0);
|
||||
$commune = $etab->codeCommune;
|
||||
$dept = $etab->Dept;
|
||||
$siret = $etab->Siret;
|
||||
$numRC = $etab->NumRC;
|
||||
|
||||
//Adresse du tribunal de commerce
|
||||
$O = $client->getListeCompetences($siret, 'tri', $dept.$codeCommune);
|
||||
$competences = $O['result'];
|
||||
$competence = $competences[0];
|
||||
|
||||
$tribunalCode = $competence['Code'];
|
||||
$tribunalLib = $comptence['Nom'];
|
||||
if (preg_match('/(A|B|C|D)/i', $numRC))
|
||||
{
|
||||
$competence = scorews_competences($siret, $siren, $idEntreprise, 'tri', $dept.$commune);
|
||||
$tribunalCode = $competence->Competence->item[0]->Code;
|
||||
$tribunalLib = $competence->Competence->item[0]->Nom;
|
||||
if (preg_match('/(A|B|C|D)/i', $numRC)) {
|
||||
$libTrib = ' RCS '.preg_replace('/(^TC |^TI |^TGIcc |^TMX )/i','',$tribunalLib);
|
||||
}
|
||||
elseif (preg_match('/(P)/i', $numRC))
|
||||
{
|
||||
} elseif (preg_match('/(P)/i', $numRC)) {
|
||||
$libTrib = ' RSAC '.preg_replace('/(^TC |^TI |^TGIcc |^TMX )/i','',$tribunalLib);
|
||||
}
|
||||
|
||||
$pdfInfo->siren = substr($siren, 0, 3).' '.
|
||||
substr($siren, 3, 3).' '.
|
||||
substr($siren, 6, 3);
|
||||
$pdfInfo->nom = $etab['Nom'];
|
||||
substr($siren, 3, 3).' '.
|
||||
substr($siren, 6, 3);
|
||||
$pdfInfo->nom = $etab->Nom;
|
||||
$pdfInfo->libTrib = $libTrib;
|
||||
$pdfInfo->adresse[] = $etab['Adresse'];
|
||||
$pdfInfo->adresse[] = $etab['Adresse2'];
|
||||
$pdfInfo->adresse[] = $etab['CP'].' '.$etab['Ville'];
|
||||
$pdfInfo->adresse[] = $etab->Adresse;
|
||||
$pdfInfo->adresse[] = $etab->Adresse2;
|
||||
$pdfInfo->adresse[] = $etab->CP.' '.$etab->Ville;
|
||||
|
||||
$pdfInfo->tribunal = $competence;
|
||||
$pdfInfo->tribunal = $competence->Competence->item[0];
|
||||
|
||||
//Prix
|
||||
$q = Doctrine_Query::create()
|
||||
@ -315,7 +273,7 @@ if ($format == 'odt') {
|
||||
if($tarifs->count()==0)
|
||||
{
|
||||
echo 'Pas de tarifs défini pour le tribunal '.
|
||||
$pdfInfo->tribunal['Nom'].' ('.$tribunalCode.')';
|
||||
$pdfInfo->tribunal->Nom.' ('.$tribunalCode.')';
|
||||
exit;
|
||||
}
|
||||
$firephp->log($tarifs[0]->prix,'prix');
|
||||
@ -340,22 +298,10 @@ if ($format == 'odt') {
|
||||
|
||||
//Bloc Addresse destinataire
|
||||
$txt = '';
|
||||
/*
|
||||
$txt.= strtr(
|
||||
$pdfInfo->tribunal['Nom'],
|
||||
array(
|
||||
'TGI' => 'TRIBUNAL DE GRANDE INSTANCE DE',
|
||||
'TI' => 'TRIBUNAL D\'INSTANCE DE',
|
||||
'TC' => 'TRIBUNAL DE COMMERCE DE',
|
||||
'TGIcc' => 'TRIBUNAL DE GRANDE INSTANCE A COMPETENCE COMMERCIALE DE'
|
||||
)
|
||||
);
|
||||
$txt.= "\n";
|
||||
*/
|
||||
$txt.= "REGISTRE DU COMMERCE - GREFFE" . "\n";
|
||||
$txt.= normaliseVoie($pdfInfo->tribunal['Adr']) . "\n";
|
||||
$txt.= normaliseVoie($pdfInfo->tribunal['AdrComp']) . "\n";
|
||||
$txt.= $pdfInfo->tribunal['CP'] . ' ' . $pdfInfo->tribunal['Ville'] . "\n" ;
|
||||
$txt.= normaliseVoie($pdfInfo->tribunal->Adr) . "\n";
|
||||
$txt.= normaliseVoie($pdfInfo->tribunal->AdrComp) . "\n";
|
||||
$txt.= $pdfInfo->tribunal->CP . ' ' . $pdfInfo->tribunal->Ville . "\n" ;
|
||||
|
||||
$largeur = 80;
|
||||
$positionX = 105;
|
||||
@ -381,14 +327,11 @@ if ($format == 'odt') {
|
||||
//Type de document demandé (actes ou bilans pour l'instant)
|
||||
//[un Kbis / l'état d'endettement / la copie de jugement de XXX en date du XXX ]
|
||||
$txt = '';
|
||||
if( $typeDocument == 'bilans' )
|
||||
{
|
||||
if( $typeDocument == 'bilans' ) {
|
||||
$txt.= 'une copie du bilan au ';
|
||||
preg_match('/^[0-9]{4}_.*?-([0-9]{8}).*?/', $commande->refDocument, $matches);
|
||||
$txt.= substr($matches[1],6,2).'/'.substr($matches[1],4,2).'/'.substr($matches[1],0,4);
|
||||
}
|
||||
elseif( $typeDocument == 'actes' )
|
||||
{
|
||||
} elseif( $typeDocument == 'actes' ) {
|
||||
$txt.= 'une copie de l\'acte ';
|
||||
$txt.= $typeActes['a'.substr($commande->refDocument,0,2)];
|
||||
if( !empty($commande->libDocument) ) $txt.= ' ('.$commande->libDocument.')';
|
||||
@ -396,9 +339,7 @@ if ($format == 'odt') {
|
||||
substr($commande->refDocument,9,2).'/'.
|
||||
substr($commande->refDocument,7,2).'/'.
|
||||
substr($commande->refDocument,3,4);
|
||||
}
|
||||
elseif ($typeDocument == 'kbis' )
|
||||
{
|
||||
} elseif ($typeDocument == 'kbis' ) {
|
||||
$txt.= 'un extrait RCS';
|
||||
}
|
||||
|
||||
|
@ -1,39 +1,38 @@
|
||||
<?php
|
||||
|
||||
function htmlentitydecode_deep($value)
|
||||
{
|
||||
$value = is_array($value) ?
|
||||
array_map('htmlentitydecode_deep', $value) :
|
||||
html_entity_decode($value, ENT_QUOTES);
|
||||
return $value;
|
||||
if (is_object($value) == true) {
|
||||
$obj = new StdClass;
|
||||
foreach ($value as $l => $v) {
|
||||
$obj->$l = htmlentitydecode_deep($v);
|
||||
}
|
||||
return $obj;
|
||||
} else if (is_array($value) == true) {
|
||||
return array_map('htmlentitydecode_deep', $value);
|
||||
} else {
|
||||
return html_entity_decode($value, ENT_QUOTES);
|
||||
}
|
||||
}
|
||||
|
||||
$siren = isset($_REQUEST['siren'])? trim($_REQUEST['siren']) : '';
|
||||
$siren = str_replace(' ','',$siren); //Remplacer les espaces
|
||||
$siren = isset($_REQUEST['siren']) ? trim($_REQUEST['siren']) : '';
|
||||
$siren = str_replace(' ', '', $siren);
|
||||
|
||||
if ( $siren=='' || strlen($siren)!=14 ) {
|
||||
$output = array(
|
||||
'Siret' => 'Siret incorrect',
|
||||
);
|
||||
echo json_encode($output);
|
||||
exit;
|
||||
if ($siren == '' || strlen($siren) != 14) {
|
||||
print json_encode(array('Siret' => 'Siret incorrect'));
|
||||
exit;
|
||||
}
|
||||
|
||||
$tabEntrep=array();
|
||||
try {
|
||||
$O = $client->getIdentite($siren);
|
||||
$tabEntrep=$O['result'];
|
||||
} catch (SoapFault $fault) {}
|
||||
require_once 'scoresws/scoresws.php';
|
||||
$etab = scoresws_identite($siren, $siren, 0);
|
||||
|
||||
/**
|
||||
* Utiliser la raison sociale la plus longue
|
||||
* Nom, Nom2, NomLong
|
||||
*/
|
||||
if (!empty($tabEntrep['NomLong']) &&
|
||||
strlen($tabEntrep['NomLong'])>strlen($tabEntrep['Nom'])){
|
||||
$tabEntrep['Nom'] = $tabEntrep['NomLong'];
|
||||
if (empty($etab->NomLong) == false &&
|
||||
strlen($etab->NomLong) > strlen($etab->Nom)){
|
||||
$etab->Nom = $etab->NomLong;
|
||||
}
|
||||
|
||||
//Retourner le tableau sous forme json
|
||||
$tabEntrepD = htmlentitydecode_deep($tabEntrep);
|
||||
echo json_encode($tabEntrepD);
|
||||
// Retourner le tableau sous forme json
|
||||
print json_encode(htmlentitydecode_deep($etab));
|
||||
|
@ -7,8 +7,18 @@ $action = $params[0];
|
||||
switch ( $action ) {
|
||||
//Retourne les informations adresses de l'établissement
|
||||
case 'etabnic':
|
||||
$siret = isset($params[1]) ? $params[1] : '' ;
|
||||
require_once realpath(dirname(__FILE__)).'/saisie_etabnic.php';
|
||||
if (isset($params[1]) == true) {
|
||||
$siret = $params[1];
|
||||
require_once 'scoresws/scoresws.php';
|
||||
$etab = scoresws_identite($siret, substr($siret, 0, 9), 0);
|
||||
if ($etab->Siret == $siret) {
|
||||
print
|
||||
$etab->Adresse.' '.
|
||||
$etab->CP.' '.
|
||||
$etab->Ville.' ('.
|
||||
$etab->Nic.')';
|
||||
}
|
||||
}
|
||||
break;
|
||||
//Retourne le formulaire opposition insee
|
||||
case 'oppositioninsee':
|
||||
@ -110,15 +120,12 @@ switch ( $action ) {
|
||||
//echo $q->getSql();
|
||||
//print_r($q->getFlattenedParams());
|
||||
echo $rows = $q->execute();
|
||||
} elseif ($params[1]=='rs') {
|
||||
try {
|
||||
$O = $client->getIdentite($_REQUEST['siren'], 0, false);
|
||||
echo $O['result']['Nom'];
|
||||
} catch (SoapFault $fault) {
|
||||
require_once 'soaperror.php';
|
||||
processSoapFault($client,$fault,$tabInfo);
|
||||
}
|
||||
}
|
||||
} else if ($params[1] == 'rs') {
|
||||
require_once 'scoresws/scoresws.php';
|
||||
$etab = scoresws_identite($_REQUEST['siren'],
|
||||
$_REQUEST['siren'], 0);
|
||||
print $etab->Nom;
|
||||
}
|
||||
break;
|
||||
//Gestion des logos
|
||||
case 'logo':
|
||||
|
@ -4,95 +4,119 @@ header('Content-Type: text/html; charset='.CHARSET);
|
||||
$tabMandataires = array();
|
||||
$message = '';
|
||||
|
||||
//Mode edition
|
||||
if($idMandataire != ''){
|
||||
$idMandataire = (int)substr($idMandataire,1);
|
||||
try{
|
||||
$O = $client->getMandataire($idMandataire);
|
||||
$tabMandataires = $O['result'];
|
||||
$firephp->log($tabMandataires,'Edition - tabMandataires');
|
||||
}catch(SoapFault $fault){
|
||||
$message = 'Une erreur est survenue durant la recherche de mandataire.';
|
||||
}
|
||||
//Mode ajout
|
||||
}else{
|
||||
$tabMandataires = $_REQUEST['tabMandataires'];
|
||||
// Mode edition
|
||||
if ($idMandataire != '') {
|
||||
$idMandataire = (int) substr($idMandataire, 1);
|
||||
|
||||
$ws = new WsScores();
|
||||
$reponse = $ws->getMandataire($idMandataire);
|
||||
if ($reponse === false) {
|
||||
$message = 'Une erreur est survenue durant la recherche de mandataire.';
|
||||
} else {
|
||||
//@todo : format de retour
|
||||
$tabMandataires = (array) $reponse->result;
|
||||
}
|
||||
} else {
|
||||
$tabMandataires = $_REQUEST['tabMandataires'];
|
||||
}
|
||||
|
||||
if($tribunal!=''){
|
||||
//La cour d'appel suivant le tribunal sélectionné
|
||||
$tmp = $client->getIdCoursAppel($tribunal);
|
||||
$codeCourAppel = $tmp;
|
||||
if ($tribunal != '') {
|
||||
|
||||
// La cour d'appel suivant le tribunal sélectionné
|
||||
$ws = new WsScores();
|
||||
$codeCourAppel = $ws->getIdCoursAppel($tribunal);
|
||||
|
||||
//Les cours d'appel
|
||||
require_once realpath(dirname(__FILE__).'/coursappel.php');
|
||||
// Les cours d'appel
|
||||
require_once realpath(dirname(__FILE__).'/coursappel.php');
|
||||
|
||||
//Les tribunaux
|
||||
$tmp = $client->getTribunaux(array('C','I','G')); //
|
||||
$tribunaux = $tmp['result'];
|
||||
}else{
|
||||
$message = 'Pas de tribunal sélectionné.';
|
||||
// Les tribunaux
|
||||
$ws = new WsScores();
|
||||
$reponse = $ws->getTribunaux(array('C', 'I', 'G'));
|
||||
$tribunaux = $reponse->result->item;
|
||||
|
||||
} else {
|
||||
$message = 'Pas de tribunal sélectionné.';
|
||||
}
|
||||
?>
|
||||
<div id="dMessage"><?=$message?></div>
|
||||
|
||||
<form id="frmCreateMandataires" name="mandataires" method="post" action="./?page=saisieajax&q=mandataire/save">
|
||||
<form id="frmCreateMandataires" name="mandataires" method="post"
|
||||
action="./?page=saisieajax&q=mandataire/save">
|
||||
|
||||
<input type="hidden" name="tabMandataires[id]" value="<?=$tabMandataires['id'];?>">
|
||||
<input type="hidden" name="tabMandataires[id]"
|
||||
value="<?=$tabMandataires['id'];?>">
|
||||
|
||||
<label>Siren de la société Civile <em>*</em>:</label>
|
||||
<input name="tabMandataires[sirenGrp]" type="text" value="<?=$tabMandataires['sirenGrp'];?>" maxlength="25">
|
||||
<span class="left"><a href="#" id="getInfo_sirenGrp">Obtenir les informations.</a></span>
|
||||
<input name="tabMandataires[sirenGrp]" type="text"
|
||||
value="<?=$tabMandataires['sirenGrp'];?>" maxlength="25">
|
||||
<span class="left"><a href="#" id="getInfo_sirenGrp">
|
||||
Obtenir les informations.</a></span>
|
||||
|
||||
<label>Siren de la professions libérale :</label>
|
||||
<input name="tabMandataires[sirenMand]" type="text" value="<?=$tabMandataires['sirenMand'];?>" maxlength="17">
|
||||
<span class="left"><a href="#" id="getInfo_sirenMand">Obtenir les informations.</a></span>
|
||||
<input name="tabMandataires[sirenMand]" type="text"
|
||||
value="<?=$tabMandataires['sirenMand'];?>" maxlength="17">
|
||||
<span class="left"><a href="#" id="getInfo_sirenMand">
|
||||
Obtenir les informations.</a></span>
|
||||
|
||||
<label>Nom <em>*</em>:</label>
|
||||
<input name="tabMandataires[Nom]" type="text" value="<?=$tabMandataires['Nom'];?>" maxlength="81">
|
||||
<input name="tabMandataires[Nom]" type="text"
|
||||
value="<?=$tabMandataires['Nom'];?>" maxlength="81">
|
||||
|
||||
<label>Prenom :</label>
|
||||
<input name="tabMandataires[Prenom]" type="text" value="<?=$tabMandataires['Prenom'];?>" maxlength="21">
|
||||
<input name="tabMandataires[Prenom]" type="text"
|
||||
value="<?=$tabMandataires['Prenom'];?>" maxlength="21">
|
||||
|
||||
<label>Type d'intervenant <em>*</em>:</label>
|
||||
<label>Type d'intervenant <em>*</em>:</label>
|
||||
<select name="tabMandataires[type]">
|
||||
<option value="" >-</option>
|
||||
<option value="A" <?=($tabMandataires['type']=='A' ? 'selected' : '')?>>Administrateur</option>
|
||||
<option value="AS" <?=($tabMandataires['type']=='AS' ? 'selected' : '')?>>Administrateur Stagiaire</option>
|
||||
<option value="H" <?=($tabMandataires['type']=='H' ? 'selected' : '')?>>Huissier</option>
|
||||
<option value="M" <?=($tabMandataires['type']=='M' ? 'selected' : '')?>>Mandataire</option>
|
||||
<option value="MS" <?=($tabMandataires['type']=='MS' ? 'selected' : '')?>>Mandataire Stagiaire</option>
|
||||
<option value="V" <?=($tabMandataires['type']=='V' ? 'selected' : '')?>>Avocat</option>
|
||||
<option value="N" <?=($tabMandataires['type']=='N' ? 'selected' : '')?>>Notaire</option>
|
||||
<option value="T" <?=($tabMandataires['type']=='T' ? 'selected' : '')?>>Autre</option>
|
||||
<option value="A"
|
||||
<?=($tabMandataires['type'] == 'A' ? 'selected' : '')?>
|
||||
>Administrateur</option>
|
||||
<option value="AS"
|
||||
<?=($tabMandataires['type'] == 'AS' ? 'selected' : '')?>
|
||||
>Administrateur Stagiaire</option>
|
||||
<option value="H"
|
||||
<?=($tabMandataires['type'] == 'H' ? 'selected' : '')?>
|
||||
>Huissier</option>
|
||||
<option value="M"
|
||||
<?=($tabMandataires['type'] == 'M' ? 'selected' : '')?>
|
||||
>Mandataire</option>
|
||||
<option value="MS"
|
||||
<?=($tabMandataires['type'] == 'MS' ? 'selected' : '')?>
|
||||
>Mandataire Stagiaire</option>
|
||||
<option value="V"
|
||||
<?=($tabMandataires['type'] == 'V' ? 'selected' : '')?>
|
||||
>Avocat</option>
|
||||
<option value="N"
|
||||
<?=($tabMandataires['type'] == 'N' ? 'selected' : '')?>
|
||||
>Notaire</option>
|
||||
<option value="T"
|
||||
<?=($tabMandataires['type'] == 'T' ? 'selected' : '')?>
|
||||
>Autre</option>
|
||||
</select>
|
||||
|
||||
<label>Cours d'appel par defaut n°1 <em>*</em>:</label>
|
||||
<label>Cours d'appel par defaut n°1 <em>*</em>:</label>
|
||||
<select name="tabMandataires[coursAppel]">
|
||||
<option value="">Choix de la cours d'appel</option>
|
||||
<option value="">Choix de la cours d'appel</option>
|
||||
<?php
|
||||
foreach ($coursAppel as $value)
|
||||
{
|
||||
$select = '';
|
||||
$tabMandataires['coursAppel']==$value['triId'] ?
|
||||
$select = ' selected' : '';
|
||||
echo '<option value="'.$value['triId'].'"'.$select.'>' .
|
||||
$value['triNom'].'</option>';
|
||||
foreach ($coursAppel as $value) {
|
||||
$select = ($tabMandataires['coursAppel'] == $value['triId']) ?
|
||||
' selected' : '';
|
||||
print '<option value="'.$value['triId'].'"'.$select.'>' .
|
||||
$value['triNom'].'</option>';
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
|
||||
<label>Cours d'appel par defaut n°2 :</label>
|
||||
<label>Cours d'appel par defaut n°2 :</label>
|
||||
<select name="tabMandataires[coursAppel2]">
|
||||
<option value="">Choix de la cours d'appel</option>
|
||||
<option value="">Choix de la cours d'appel</option>
|
||||
<?php
|
||||
foreach ($coursAppel as $value)
|
||||
{
|
||||
$select = '';
|
||||
$tabMandataires['coursAppel2']==$value['triId'] ?
|
||||
$select = ' selected' : '';
|
||||
echo '<option value="'.$value['triId'].'"'.$select.'>' .
|
||||
$value['triNom'].'</option>';
|
||||
foreach ($coursAppel as $value) {
|
||||
$select = ($tabMandataires['coursAppel2'] == $value['triId']) ?
|
||||
' selected' : '';
|
||||
print '<option value="'.$value['triId'].'"'.$select.'>' .
|
||||
$value['triNom'].'</option>';
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
@ -101,13 +125,18 @@ foreach ($coursAppel as $value)
|
||||
<select name="tabMandataires[tribunal]">
|
||||
<option value="">Choix du tribunal</option>
|
||||
<?php
|
||||
foreach ($tribunaux as $code => $lib)
|
||||
{
|
||||
$select = '';
|
||||
if ($tabMandataires['tribunal']==$code) $select = ' selected';
|
||||
elseif ($code==$tribunal) $select = ' selected';
|
||||
if (strlen($lib)>39) $lib=substr($lib,0,41).'...';
|
||||
echo '<option value="'.$code.'"'.$select.'>'.$lib.'</option>';
|
||||
foreach ($tribunaux as $trib) {
|
||||
if ($tabMandataires['tribunal'] == $trib->code ||
|
||||
$trib->code == $tribunal) {
|
||||
$select = ' selected';
|
||||
} else {
|
||||
$select = '';
|
||||
}
|
||||
$lib = $trib->nom;
|
||||
if (strlen($lib) > 39) {
|
||||
$lib = substr($lib, 0, 41).'...';
|
||||
}
|
||||
print '<option value="'.$trib->code.'"'.$select.'>'.$lib.'</option>';
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
@ -116,90 +145,214 @@ foreach ($tribunaux as $code => $lib)
|
||||
<label>Forme Juridique <em>*</em>:</label>
|
||||
<select name="tabMandataires[Statut]">
|
||||
<option value="" selected>-</option>
|
||||
<option value="1500" <?=($tabMandataires['Statut']=='1500' ? 'selected' : '')?>>Profession libérale</option>
|
||||
<option value="1400" <?=($tabMandataires['Statut']=='1400' ? 'selected' : '')?>>Officier public ou ministériel</option>
|
||||
<option value="1800" <?=($tabMandataires['Statut']=='1800' ? 'selected' : '')?>>Associé Gérant</option>
|
||||
<option value="1900" <?=($tabMandataires['Statut']=='1900' ? 'selected' : '')?>>Personne physique</option>
|
||||
<option value="5485" <?=($tabMandataires['Statut']=='5485' ? 'selected' : '')?>>Société d'exercice libéral à responsabilité limitée</option>
|
||||
<option value="6565" <?=($tabMandataires['Statut']=='6565' ? 'selected' : '')?>>SCP de notaires</option>
|
||||
<option value="6561" <?=($tabMandataires['Statut']=='6561' ? 'selected' : '')?>>SCP d'avocats</option>
|
||||
<option value="1099" <?=($tabMandataires['Statut']=='1099' ? 'selected' : '')?>>SCP d'huissiers</option>
|
||||
<option value="2210" <?=($tabMandataires['Statut']=='2210' ? 'selected' : '')?>>Société créée de fait entre personnes physiques</option>
|
||||
<option value="5499" <?=($tabMandataires['Statut']=='5499' ? 'selected' : '')?>>Autre société à responsabilité limitée</option>
|
||||
<option value="2900" <?=($tabMandataires['Statut']=='2900' ? 'selected' : '')?>>Autre groupement de droit privé non doté de la personnalité morale</option>
|
||||
<option value="6585" <?=($tabMandataires['Statut']=='6585' ? 'selected' : '')?>>SCP</option>
|
||||
<option value="9220" <?=($tabMandataires['Statut']=='9220' ? 'selected' : '')?>>ASSOCIATION</option>
|
||||
<option value="6562" <?=($tabMandataires['Statut']=='6562' ? 'selected' : '')?>>SCP d'avocats aux conseil</option>
|
||||
<option value="6599" <?=($tabMandataires['Statut']=='6599' ? 'selected' : '')?>>SCP</option>
|
||||
<option value="6563" <?=($tabMandataires['Statut']=='6563' ? 'selected' : '')?>>SCP d'avoués d'appel</option>
|
||||
<option value="5710" <?=($tabMandataires['Statut']=='5710' ? 'selected' : '')?>>SAS</option>
|
||||
<option value="6566" <?=($tabMandataires['Statut']=='5710' ? 'selected' : '')?>>SCP de commissaires-priseurs</option>
|
||||
<option value="5498" <?=($tabMandataires['Statut']=='5498' ? 'selected' : '')?>>SARLU</option>
|
||||
<option value="5585" <?=($tabMandataires['Statut']=='5585' ? 'selected' : '')?>>SELAFA</option>
|
||||
<option value="6568" <?=($tabMandataires['Statut']=='6568' ? 'selected' : '')?>>SCP de conseils juridiques</option>
|
||||
<option value="3220" <?=($tabMandataires['Statut']=='3220' ? 'selected' : '')?>>Société étrangère non immatriculée au RCS</option>
|
||||
<option value="1200" <?=($tabMandataires['Statut']=='1200' ? 'selected' : '')?>>Commerçant</option>
|
||||
<option value="6567" <?=($tabMandataires['Statut']=='6567' ? 'selected' : '')?>>SCP de greffiers de tribunal de commerce</option>
|
||||
<option value="5599" <?=($tabMandataires['Statut']=='5599' ? 'selected' : '')?>>SARL</option>
|
||||
<option value="6220" <?=($tabMandataires['Statut']=='6220' ? 'selected' : '')?>>GIE</option>
|
||||
<option value="2110" <?=($tabMandataires['Statut']=='2110' ? 'selected' : '')?>>Indivision entre personnes physiques</option>
|
||||
<option value="2385" <?=($tabMandataires['Statut']=='2385' ? 'selected' : '')?>>Société en participation de professions libérales</option>
|
||||
<option value="2310" <?=($tabMandataires['Statut']=='2310' ? 'selected' : '')?>>Société en participation entre personnes physiques</option>
|
||||
<option value="3120" <?=($tabMandataires['Statut']=='3120' ? 'selected' : '')?>>Société étrangère immatriculée au RCS</option>
|
||||
<option value="2220" <?=($tabMandataires['Statut']=='2220' ? 'selected' : '')?>>Société créée de fait avec personne morale</option>
|
||||
<option value="5685" <?=($tabMandataires['Statut']=='5685' ? 'selected' : '')?>>Société d'exercice libéral à forme anonyme à directoire</option>
|
||||
<option value="9900" <?=($tabMandataires['Statut']=='9900' ? 'selected' : '')?>>Autre personne morale de droit privé</option>
|
||||
<option value="1700" <?=($tabMandataires['Statut']=='1700' ? 'selected' : '')?>>Agent commercial</option>
|
||||
<option value="5202" <?=($tabMandataires['Statut']=='5202' ? 'selected' : '')?>>SNC</option>
|
||||
<option value="1100" <?=($tabMandataires['Statut']=='1100' ? 'selected' : '')?>>Artisan Commerçant</option>
|
||||
<option value="5720" <?=($tabMandataires['Statut']=='5720' ? 'selected' : '')?>>Société par actions simplifiée à associé unique ou société par actions simplifiées unipersonnelle</option>
|
||||
<option value="5785" <?=($tabMandataires['Statut']=='5785' ? 'selected' : '')?>>Socitété d'Exercice Libérale par Actions Simplifiées</option>
|
||||
<option value="5385" <?=($tabMandataires['Statut']=='5385' ? 'selected' : '')?>>Société d'exercice libéral en commandite par action</option>
|
||||
<option value="9260" <?=($tabMandataires['Statut']=='9260' ? 'selected' : '')?>>Association de droit local</option>
|
||||
<option value="9210" <?=($tabMandataires['Statut']=='9210' ? 'selected' : '')?>>Association non déclarée</option>
|
||||
<option value="8450" <?=($tabMandataires['Statut']=='8450' ? 'selected' : '')?>>Ordre professionnel ou assimilé</option>
|
||||
<option value="6210" <?=($tabMandataires['Statut']=='6210' ? 'selected' : '')?>>Groupement européen d'intérêt économique (GEIE)</option>
|
||||
<option value="5306" <?=($tabMandataires['Statut']=='5306' ? 'selected' : '')?>>Société en commandite simple</option>
|
||||
<option value="6560" <?=($tabMandataires['Statut']=='6560' ? 'selected' : '')?>>Autre société civile coopérative</option>
|
||||
<option value="2320" <?=($tabMandataires['Statut']=='2320' ? 'selected' : '')?>>Société en participation avec personne morale</option>
|
||||
<option value="9223" <?=($tabMandataires['Statut']=='9223' ? 'selected' : '')?>>Groupement d'employeurs</option>
|
||||
<option value="8490" <?=($tabMandataires['Statut']=='8490' ? 'selected' : '')?>>Autre organisme professionnel</option>
|
||||
<option value="5699" <?=($tabMandataires['Statut']=='5699' ? 'selected' : '')?>>(Autre) SA à directoire</option>
|
||||
<option value="5560" <?=($tabMandataires['Statut']=='5560' ? 'selected' : '')?>>Autre SA coopérative à conseil d'administration</option>
|
||||
<option value="6521" <?=($tabMandataires['Statut']=='1400' ? 'selected' : '')?>>Société civile de placement collectif immobilier (SCPI)</option>
|
||||
<option value="6589" <?=($tabMandataires['Statut']=='6521' ? 'selected' : '')?>>Société civile de moyens</option>
|
||||
<option value="6551" <?=($tabMandataires['Statut']=='6551' ? 'selected' : '')?>>Société civile coopérative de consommation</option>
|
||||
<option value="8410" <?=($tabMandataires['Statut']=='8410' ? 'selected' : '')?>>Syndicat de salariés</option>
|
||||
<option value="6540" <?=($tabMandataires['Statut']=='6540' ? 'selected' : '')?>>Société civile immobilière</option>
|
||||
<option value="2120" <?=($tabMandataires['Statut']=='2120' ? 'selected' : '')?>>Indivision avec personne morale</option>
|
||||
<option value="8420" <?=($tabMandataires['Statut']=='8420' ? 'selected' : '')?>>Syndicat patronal</option>
|
||||
<option value="1500"
|
||||
<?=($tabMandataires['Statut'] == '1500' ? 'selected' : '')?>
|
||||
>Profession libérale</option>
|
||||
<option value="1400"
|
||||
<?=($tabMandataires['Statut'] == '1400' ? 'selected' : '')?>
|
||||
>Officier public ou ministériel</option>
|
||||
<option value="1800"
|
||||
<?=($tabMandataires['Statut'] == '1800' ? 'selected' : '')?>
|
||||
>Associé Gérant</option>
|
||||
<option value="1900"
|
||||
<?=($tabMandataires['Statut'] == '1900' ? 'selected' : '')?>
|
||||
>Personne physique</option>
|
||||
<option value="5485"
|
||||
<?=($tabMandataires['Statut'] == '5485' ? 'selected' : '')?>
|
||||
>Société d'exercice libéral à responsabilité limitée</option>
|
||||
<option value="6565"
|
||||
<?=($tabMandataires['Statut'] == '6565' ? 'selected' : '')?>
|
||||
>SCP de notaires</option>
|
||||
<option value="6561"
|
||||
<?=($tabMandataires['Statut'] == '6561' ? 'selected' : '')?>
|
||||
>SCP d'avocats</option>
|
||||
<option value="1099"
|
||||
<?=($tabMandataires['Statut'] == '1099' ? 'selected' : '')?>
|
||||
>SCP d'huissiers</option>
|
||||
<option value="2210"
|
||||
<?=($tabMandataires['Statut'] == '2210' ? 'selected' : '')?>
|
||||
>Société créée de fait entre personnes physiques</option>
|
||||
<option value="5499"
|
||||
<?=($tabMandataires['Statut'] == '5499' ? 'selected' : '')?>
|
||||
>Autre société à responsabilité limitée</option>
|
||||
<option value="2900"
|
||||
<?=($tabMandataires['Statut'] == '2900' ? 'selected' : '')?>
|
||||
>Autre groupement de droit privé non doté de la personnalité morale</option>
|
||||
<option value="6585"
|
||||
<?=($tabMandataires['Statut'] == '6585' ? 'selected' : '')?>
|
||||
>SCP</option>
|
||||
<option value="9220"
|
||||
<?=($tabMandataires['Statut'] == '9220' ? 'selected' : '')?>
|
||||
>ASSOCIATION</option>
|
||||
<option value="6562"
|
||||
<?=($tabMandataires['Statut'] == '6562' ? 'selected' : '')?>
|
||||
>SCP d'avocats aux conseil</option>
|
||||
<option value="6599"
|
||||
<?=($tabMandataires['Statut'] == '6599' ? 'selected' : '')?>
|
||||
>SCP</option>
|
||||
<option value="6563"
|
||||
<?=($tabMandataires['Statut'] == '6563' ? 'selected' : '')?>
|
||||
>SCP d'avoués d'appel</option>
|
||||
<option value="5710"
|
||||
<?=($tabMandataires['Statut'] == '5710' ? 'selected' : '')?>
|
||||
>SAS</option>
|
||||
<option value="6566"
|
||||
<?=($tabMandataires['Statut'] == '5710' ? 'selected' : '')?>
|
||||
>SCP de commissaires-priseurs</option>
|
||||
<option value="5498"
|
||||
<?=($tabMandataires['Statut'] == '5498' ? 'selected' : '')?>
|
||||
>SARLU</option>
|
||||
<option value="5585"
|
||||
<?=($tabMandataires['Statut'] == '5585' ? 'selected' : '')?>
|
||||
>SELAFA</option>
|
||||
<option value="6568"
|
||||
<?=($tabMandataires['Statut'] == '6568' ? 'selected' : '')?>
|
||||
>SCP de conseils juridiques</option>
|
||||
<option value="3220"
|
||||
<?=($tabMandataires['Statut'] == '3220' ? 'selected' : '')?>
|
||||
>Société étrangère non immatriculée au RCS</option>
|
||||
<option value="1200"
|
||||
<?=($tabMandataires['Statut'] == '1200' ? 'selected' : '')?>
|
||||
>Commerçant</option>
|
||||
<option value="6567"
|
||||
<?=($tabMandataires['Statut'] == '6567' ? 'selected' : '')?>
|
||||
>SCP de greffiers de tribunal de commerce</option>
|
||||
<option value="5599"
|
||||
<?=($tabMandataires['Statut'] == '5599' ? 'selected' : '')?>
|
||||
>SARL</option>
|
||||
<option value="6220"
|
||||
<?=($tabMandataires['Statut'] == '6220' ? 'selected' : '')?>
|
||||
>GIE</option>
|
||||
<option value="2110"
|
||||
<?=($tabMandataires['Statut'] == '2110' ? 'selected' : '')?>
|
||||
>Indivision entre personnes physiques</option>
|
||||
<option value="2385"
|
||||
<?=($tabMandataires['Statut'] == '2385' ? 'selected' : '')?>
|
||||
>Société en participation de professions libérales</option>
|
||||
<option value="2310"
|
||||
<?=($tabMandataires['Statut'] == '2310' ? 'selected' : '')?>
|
||||
>Société en participation entre personnes physiques</option>
|
||||
<option value="3120"
|
||||
<?=($tabMandataires['Statut'] == '3120' ? 'selected' : '')?>
|
||||
>Société étrangère immatriculée au RCS</option>
|
||||
<option value="2220"
|
||||
<?=($tabMandataires['Statut'] == '2220' ? 'selected' : '')?>
|
||||
>Société créée de fait avec personne morale</option>
|
||||
<option value="5685"
|
||||
<?=($tabMandataires['Statut'] == '5685' ? 'selected' : '')?>
|
||||
>Société d'exercice libéral à forme anonyme à directoire</option>
|
||||
<option value="9900"
|
||||
<?=($tabMandataires['Statut'] == '9900' ? 'selected' : '')?>
|
||||
>Autre personne morale de droit privé</option>
|
||||
<option value="1700"
|
||||
<?=($tabMandataires['Statut'] == '1700' ? 'selected' : '')?>
|
||||
>Agent commercial</option>
|
||||
<option value="5202"
|
||||
<?=($tabMandataires['Statut'] == '5202' ? 'selected' : '')?>
|
||||
>SNC</option>
|
||||
<option value="1100"
|
||||
<?=($tabMandataires['Statut'] == '1100' ? 'selected' : '')?>
|
||||
>Artisan Commerçant</option>
|
||||
<option value="5720"
|
||||
<?=($tabMandataires['Statut'] == '5720' ? 'selected' : '')?>
|
||||
>Société par actions simplifiée à associé unique
|
||||
ou société par actions simplifiées unipersonnelle</option>
|
||||
<option value="5785"
|
||||
<?=($tabMandataires['Statut'] == '5785' ? 'selected' : '')?>
|
||||
>Socitété d'Exercice Libérale par Actions Simplifiées</option>
|
||||
<option value="5385"
|
||||
<?=($tabMandataires['Statut'] == '5385' ? 'selected' : '')?>
|
||||
>Société d'exercice libéral en commandite par action</option>
|
||||
<option value="9260"
|
||||
<?=($tabMandataires['Statut'] == '9260' ? 'selected' : '')?>
|
||||
>Association de droit local</option>
|
||||
<option value="9210"
|
||||
<?=($tabMandataires['Statut'] == '9210' ? 'selected' : '')?>
|
||||
>Association non déclarée</option>
|
||||
<option value="8450"
|
||||
<?=($tabMandataires['Statut'] == '8450' ? 'selected' : '')?>
|
||||
>Ordre professionnel ou assimilé</option>
|
||||
<option value="6210"
|
||||
<?=($tabMandataires['Statut'] == '6210' ? 'selected' : '')?>
|
||||
>Groupement européen d'intérêt économique (GEIE)</option>
|
||||
<option value="5306"
|
||||
<?=($tabMandataires['Statut'] == '5306' ? 'selected' : '')?>
|
||||
>Société en commandite simple</option>
|
||||
<option value="6560"
|
||||
<?=($tabMandataires['Statut'] == '6560' ? 'selected' : '')?>
|
||||
>Autre société civile coopérative</option>
|
||||
<option value="2320"
|
||||
<?=($tabMandataires['Statut'] == '2320' ? 'selected' : '')?>
|
||||
>Société en participation avec personne morale</option>
|
||||
<option value="9223"
|
||||
<?=($tabMandataires['Statut'] == '9223' ? 'selected' : '')?>
|
||||
>Groupement d'employeurs</option>
|
||||
<option value="8490"
|
||||
<?=($tabMandataires['Statut'] == '8490' ? 'selected' : '')?>
|
||||
>Autre organisme professionnel</option>
|
||||
<option value="5699"
|
||||
<?=($tabMandataires['Statut'] == '5699' ? 'selected' : '')?>
|
||||
>(Autre) SA à directoire</option>
|
||||
<option value="5560"
|
||||
<?=($tabMandataires['Statut'] == '5560' ? 'selected' : '')?>
|
||||
>Autre SA coopérative à conseil d'administration</option>
|
||||
<option value="6521"
|
||||
<?=($tabMandataires['Statut'] == '1400' ? 'selected' : '')?>
|
||||
>Société civile de placement collectif immobilier (SCPI)</option>
|
||||
<option value="6589"
|
||||
<?=($tabMandataires['Statut'] == '6521' ? 'selected' : '')?>
|
||||
>Société civile de moyens</option>
|
||||
<option value="6551"
|
||||
<?=($tabMandataires['Statut'] == '6551' ? 'selected' : '')?>
|
||||
>Société civile coopérative de consommation</option>
|
||||
<option value="8410"
|
||||
<?=($tabMandataires['Statut'] == '8410' ? 'selected' : '')?>
|
||||
>Syndicat de salariés</option>
|
||||
<option value="6540"
|
||||
<?=($tabMandataires['Statut'] == '6540' ? 'selected' : '')?>
|
||||
>Société civile immobilière</option>
|
||||
<option value="2120"
|
||||
<?=($tabMandataires['Statut'] == '2120' ? 'selected' : '')?>
|
||||
>Indivision avec personne morale</option>
|
||||
<option value="8420"
|
||||
<?=($tabMandataires['Statut'] == '8420' ? 'selected' : '')?>
|
||||
>Syndicat patronal</option>
|
||||
</select>
|
||||
|
||||
<label>Adresse <em>*</em>:</label>
|
||||
<textarea name="tabMandataires[adresse]"><?=$tabMandataires['adresse'];?></textarea>
|
||||
<textarea name="tabMandataires[adresse]">
|
||||
<?=$tabMandataires['adresse'];?></textarea>
|
||||
|
||||
<label>Complément adresse :</label>
|
||||
<input name="tabMandataires[adresseComp]" type="text" value="<?=$tabMandataires['adresseComp'];?>" maxlength="8">
|
||||
<input name="tabMandataires[adresseComp]" type="text"
|
||||
value="<?=$tabMandataires['adresseComp'];?>" maxlength="8">
|
||||
|
||||
<label>Code Postal <em>*</em>:</label>
|
||||
<input name="tabMandataires[cp]" type="text" value="<?=$tabMandataires['cp'];?>" maxlength="5">
|
||||
<input name="tabMandataires[cp]" type="text"
|
||||
value="<?=$tabMandataires['cp'];?>" maxlength="5">
|
||||
|
||||
<label>Ville ou commune <em>*</em>:</label>
|
||||
<input name="tabMandataires[ville]" type="text" value="<?=$tabMandataires['ville'];?>" maxlength="28">
|
||||
<input name="tabMandataires[ville]" type="text"
|
||||
value="<?=$tabMandataires['ville'];?>" maxlength="28">
|
||||
|
||||
<label>Téléphone <em>*</em>:</label>
|
||||
<input name="tabMandataires[tel]" type="text" value="<?=$tabMandataires['tel'];?>" maxlength="16">
|
||||
<input name="tabMandataires[tel]" type="text"
|
||||
value="<?=$tabMandataires['tel'];?>" maxlength="16">
|
||||
|
||||
<label>Télécopie :</label>
|
||||
<input name="tabMandataires[fax]" type="text" value="<?=$tabMandataires['fax'];?>" maxlength="16">
|
||||
<input name="tabMandataires[fax]" type="text"
|
||||
value="<?=$tabMandataires['fax'];?>" maxlength="16">
|
||||
|
||||
<label>Email :</label>
|
||||
<input name="tabMandataires[email]" type="text" value="<?=$tabMandataires['email'];?>" maxlength="51">
|
||||
<input name="tabMandataires[email]" type="text"
|
||||
value="<?=$tabMandataires['email'];?>" maxlength="51">
|
||||
|
||||
<label>Web :</label>
|
||||
<input name="tabMandataires[web]" type="text" value="<?=$tabMandataires['web'];?>" maxlength="35">
|
||||
<input name="tabMandataires[web]" type="text"
|
||||
value="<?=$tabMandataires['web'];?>" maxlength="35">
|
||||
|
||||
<label>Informations diverses :</label>
|
||||
<textarea name="tabMandataires[contact]"><?=$tabMandataires['contact'];?></textarea>
|
||||
<textarea name="tabMandataires[contact]">
|
||||
<?=$tabMandataires['contact'];?></textarea>
|
||||
|
||||
</form>
|
||||
</form>
|
||||
|
@ -1,29 +1,19 @@
|
||||
<?php
|
||||
function getAnnonceCollecte($idan, $siret = ''){
|
||||
global $client;
|
||||
$idanResult = false;
|
||||
try {
|
||||
$O = $client->getAnnonceCollecte($idan, $siret);
|
||||
$idanResult = $O['result'];
|
||||
} catch (SoapFault $fault) {
|
||||
require_once 'soaperror.php';
|
||||
processSoapFault($client, $fault, $_SESSION['tabInfo']);
|
||||
$ws = new WsScores();
|
||||
$reponse = $ws->getAnnonceCollecte($idan, $siret);
|
||||
if ($reponse !== false && $reponse->error->errnum != 0){
|
||||
return $reponse->result;
|
||||
}
|
||||
return $idanResult;
|
||||
return false;
|
||||
}
|
||||
|
||||
function supprAnnonceCollecte($idan, $siret = ''){
|
||||
global $client;
|
||||
try {
|
||||
$O = $client->supprAnnonceCollecte($idan, $siret);
|
||||
$error = $O['error'];
|
||||
} catch (SoapFault $fault) {
|
||||
require_once 'soaperror.php';
|
||||
processSoapFault($client, $fault, $_SESSION['tabInfo']);
|
||||
}
|
||||
if ( isset($error) && $error['errNum'] == 0 ){
|
||||
$ws = new WsScores();
|
||||
$reponse = $ws->supprAnnonceCollecte($idan, $siret);
|
||||
if ( reponse!==false && $reponse->error->errnum == 0 ){
|
||||
$output = 'Annonce '.$idan.' supprimé !';
|
||||
} elseif ( isset($error) && $error['errNum'] != 0 ) {
|
||||
} elseif ( $reponse!==false && $reponse->error->errnum != 0 ) {
|
||||
$output = 'Erreur lors de la suppression.';
|
||||
} else {
|
||||
$output = "Une erreur est survenue...";
|
||||
@ -32,17 +22,11 @@ function supprAnnonceCollecte($idan, $siret = ''){
|
||||
}
|
||||
|
||||
function dupliqueAnnonceCollecte($idan, $siret){
|
||||
global $client;
|
||||
try {
|
||||
$O = $client->dupliqueAnnonceCollecte($idan, $siret);
|
||||
$error = $O['error'];
|
||||
} catch (SoapFault $fault) {
|
||||
require_once 'soaperror.php';
|
||||
processSoapFault($client, $fault, $_SESSION['tabInfo']);
|
||||
}
|
||||
if ( isset($error) && $error['errNum'] == 0 ){
|
||||
$ws = new WsScores();
|
||||
$reponse = $ws->dupliqueAnnonceCollecte($idan, $siret);
|
||||
if ( $reponse!==false && $reponse->error->errnum == 0 ){
|
||||
$output = 'Annonce '.$idan.' dupliqué sur '.$siret.'!';
|
||||
} elseif ( isset($error) && $error['errNum'] != 0 ) {
|
||||
} elseif ( $reponse!==false && $reponse->error->errnum != 0 ) {
|
||||
$output = 'Erreur lors de la duplication.';
|
||||
} else {
|
||||
$output = "Une erreur est survenue...";
|
||||
@ -101,24 +85,24 @@ switch ( $subaction ) {
|
||||
//Mapper idanResult dans le tableau de saisie
|
||||
require_once 'common/dates.php';
|
||||
$saisie = array(
|
||||
'source' => isset($_SESSION['source']) ? $_SESSION['source'] : $idanResult['source'],
|
||||
'source' => isset($_SESSION['source']) ? $_SESSION['source'] : $idanResult->source,
|
||||
'dateParution' => isset($_SESSION['dateParution']) ? $_SESSION['dateParution'] :
|
||||
WDate::dateT('Y-m-d', 'd/m/Y', substr($idanResult['dateSource'],0,10)),
|
||||
WDate::dateT('Y-m-d', 'd/m/Y', substr($idanResult->dateSource,0,10)),
|
||||
'numParution' => isset($_SESSION['numParution']) ? $_SESSION['numParution'] : '',
|
||||
'dateJugement' => WDate::dateT('Y-m-d', 'd/m/Y', $idanResult['dateEffetFinP']),
|
||||
'tribunal' => $idanResult['tribunal'],
|
||||
'even' => $idanResult['even'],
|
||||
'tribunal' => $idanResult->tribunal,
|
||||
'even' => $idanResult->even,
|
||||
'eventNum' => $eventLimit,
|
||||
'comp' => $idanResult['complement'],
|
||||
'montant' => $idanResult['montant'],
|
||||
'dateFinPeriode' => WDate::dateT('Y-m-d', 'd/m/Y', $idanResult['dateJugement']),
|
||||
'comp' => $idanResult->complement,
|
||||
'montant' => $idanResult->montant,
|
||||
'dateFinPeriode' => WDate::dateT('Y-m-d', 'd/m/Y', $idanResult->dateJugement),
|
||||
);
|
||||
$intervenants = array();
|
||||
for ( $i=0 ; $i<3 ; $i++ ) {
|
||||
$intervenants[$i] = array(
|
||||
'type' => $idanResult['inter'.($i+1).'type'],
|
||||
'id' => $idanResult['inter'.($i+1).'id'],
|
||||
'nom' => $idanResult['inter'.($i+1).'nom'],
|
||||
'type' => $idanResult->${'inter'.($i+1).'type'},
|
||||
'id' => $idanResult->${'inter'.($i+1).'id'},
|
||||
'nom' => $idanResult->${'inter'.($i+1).'nom'},
|
||||
);
|
||||
}
|
||||
require_once realpath(dirname(__FILE__)).'/constantes.php';
|
||||
@ -139,10 +123,10 @@ switch ( $subaction ) {
|
||||
echo '</script>';
|
||||
break;
|
||||
} else {
|
||||
$message = "Source : ".$idanResult['source']."<br/>";
|
||||
$message = "Source : ".$idanResult->source."<br/>";
|
||||
$message.= "Evénement(s) non éditable : <br/>";
|
||||
foreach($idanResult['even'] as $code => $event){
|
||||
$message.= $code." - ".$event."<br/>";
|
||||
foreach($idanResult->even as $item){
|
||||
$message.= $item->CodeEven." - ".$item->LibEven."<br/>";
|
||||
}
|
||||
echo $message;
|
||||
}
|
||||
|
@ -1,13 +0,0 @@
|
||||
<?php
|
||||
if($siret!='')
|
||||
{
|
||||
$O = $client->getIdentite($siret, 0, false);
|
||||
$etab = $O['result'];
|
||||
FB::log($etab,'etab');
|
||||
if($etab['Siret']==$siret)
|
||||
{
|
||||
echo $etab['Adresse'].' '.
|
||||
$etab['CP'].' '.
|
||||
$etab['Ville'].' ('. $etab['Nic'].')';
|
||||
}
|
||||
}
|
@ -1,28 +1,40 @@
|
||||
<div>
|
||||
<label>Numéro identifiant Siret</label>
|
||||
<?=substr($etab['Siren'],0,3).' '.
|
||||
substr($etab['Siren'],3,3).' '.
|
||||
substr($etab['Siren'],6,3).' <i>'.
|
||||
substr($etab['Siret'],9,5).'</i>'?>
|
||||
<label>Numéro identifiant, Siret</label>
|
||||
<?php
|
||||
print substr($etab->Siren, 0, 3).' '.
|
||||
substr($etab->Siren, 3, 3).' '.
|
||||
substr($etab->Siren, 6, 3).' <i>'.
|
||||
substr($etab->Siret, 9, 5).'</i>';
|
||||
?>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label>Numéro identifiant Siret du siège</label>
|
||||
<a href="./?page=identite&siret=<?php echo $etab['SiretSiege']?>.">
|
||||
<?php
|
||||
echo substr($etab['SiretSiege'],0,3).' '.
|
||||
substr($etab['SiretSiege'],3,3).' '.
|
||||
substr($etab['SiretSiege'],6,3).
|
||||
' <i>'.substr($etab['SiretSiege'],9,5).'</i>';
|
||||
echo substr($etab->SiretSiege,0,3).' '.
|
||||
substr($etab->SiretSiege,3,3).' '.
|
||||
substr($etab->SiretSiege,6,3).
|
||||
' <i>'.substr($etab->SiretSiege,9,5).'</i>';
|
||||
?>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label>Raison Sociale</label>
|
||||
<?php
|
||||
print $etab->Nom;
|
||||
if ($etab->Nom2 != '') {
|
||||
print ' / '.$etab->Nom2;
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label>Raison Sociale</label>
|
||||
<?php
|
||||
echo $etab['Nom'];
|
||||
if ($etab['Nom2']<>'') echo ' / '.$etab['Nom2'];
|
||||
echo $etab->Nom;
|
||||
if ($etab->Nom2<>'') echo ' / '.$etab->Nom2;
|
||||
?>
|
||||
</div>
|
||||
|
||||
@ -30,10 +42,10 @@ if ($etab['Nom2']<>'') echo ' / '.$etab['Nom2'];
|
||||
<label>Adresse</label>
|
||||
<div style="float:left;">
|
||||
<?php
|
||||
echo $etab['AdresseNum'].' '.$etab['AdresseRue'].'<br/>';
|
||||
if (!empty($etab['Adresse'])) echo $etab['Adresse'].'<br/>';
|
||||
if (!empty($etab['Adresse2'])) echo $etab['Adresse2'].'<br/>';
|
||||
echo $etab['CP'].' '.$etab['Ville'];
|
||||
echo $etab->AdresseNum.' '.$etab->AdresseRue.'<br/>';
|
||||
if (!empty($etab->Adresse)) echo $etab->Adresse.'<br/>';
|
||||
if (!empty($etab->Adresse2)) echo $etab->Adresse2.'<br/>';
|
||||
echo $etab->CP.' '.$etab->Ville;
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
@ -41,23 +53,24 @@ echo $etab['CP'].' '.$etab['Ville'];
|
||||
<div>
|
||||
<label>Établissement</label>
|
||||
<?php
|
||||
if ($etab['Siege']==1) echo "Siège";
|
||||
if ($etab->Siege==1) echo "Siège";
|
||||
else echo "Secondaire";
|
||||
if ($etab['Actif']==1) echo " actif";
|
||||
if ($etab->Actif==1) echo " actif";
|
||||
else echo " inactif";
|
||||
if($etab['Nic']*1==0 || $etab['Nic']*1>=99990)
|
||||
if($etab->Nic*1==0 || $etab->Nic*1>=99990)
|
||||
echo " provisoire";
|
||||
?>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
$siteWeb = '';
|
||||
if (substr($etab['Web'],0,7)<>'http://')
|
||||
$siteWeb='http://'.$etab['Web'];
|
||||
else
|
||||
$siteWeb=$etab['Web'];
|
||||
?>
|
||||
<h2 id="dFormLogo" alt="<?=$etab['Siren']?>">Logo</h2>
|
||||
if (substr($etab->Web, 0, 7) != 'http://') {
|
||||
$siteWeb = 'http://'.$etab->Web;
|
||||
} else {
|
||||
$siteWeb = $etab->Web;
|
||||
}
|
||||
?>
|
||||
<h2 id="dFormLogo" alt="<?=$etab->Siren?>">Logo</h2>
|
||||
<div class="blockh2">
|
||||
<div id="formLogo"></div>
|
||||
</div>
|
||||
@ -67,39 +80,55 @@ else
|
||||
<form name="form_saisie" action="./?page=saisie" method="post" enctype="multipart/form-data">
|
||||
<input type="hidden" name="siret" value="<?=$siret?>"/>
|
||||
<input type="hidden" name="id" value="<?=$idEntreprise?>"/>
|
||||
<input type="hidden" name="siren" value="<?=$etab['Siren']?>"/>
|
||||
<input type="hidden" name="nic" value="<?=$etab['Nic']?>"/>
|
||||
<input type="hidden" name="siren" value="<?=$etab->Siren?>"/>
|
||||
<input type="hidden" name="nic" value="<?=$etab->Nic?>"/>
|
||||
|
||||
<label>Téléphone</label>
|
||||
<input type="text" name="frmSaisie[tel]" size="25" maxlength="100" value="<?=trim($etab['Tel'])?>" />
|
||||
<input type="text" name="frmSaisie[tel]" size="25" maxlength="100" value="<?=trim($etab->Tel)?>" />
|
||||
<label>Fax</label>
|
||||
<input type="text" name="frmSaisie[fax]" size="25" maxlength="100" value="<?=trim($etab['Fax'])?>" />
|
||||
<input type="text" name="frmSaisie[fax]" size="25" maxlength="100" value="<?=trim($etab->Fax)?>" />
|
||||
<label>Site Internet</label>
|
||||
<input type="text" name="frmSaisie[web]" size="40" maxlength="100" value="<?=$siteWeb?>" />
|
||||
<label>E-mail</label>
|
||||
<input type="text" name="frmSaisie[mail]" size="40" maxlength="100" value="<?=trim($etab['Mail'])?>" />
|
||||
<input type="text" name="frmSaisie[mail]" size="40" maxlength="100" value="<?=trim($etab->Mail)?>" />
|
||||
|
||||
<h2>Activité(s) et Chiffres d'Affaires</h2>
|
||||
<h2>Activité(s) et Chiffres d'Affaires</h2>
|
||||
|
||||
<label>Code ISIN</label>
|
||||
<input type="text" name="frmSaisie[isin]" size="15" maxlength="15" value="<?=trim($etab['Isin'])?>" />
|
||||
<label>Activité déclarée de l'entreprise</label>
|
||||
<textarea name="frmSaisie[activite]" rows="5" cols="40"><?=$etab['Activite']?></textarea>
|
||||
<input type="text" name="frmSaisie[isin]" size="15" maxlength="15" value="<?=trim($etab->Isin)?>" />
|
||||
<label>Activité déclarée de l'entreprise</label>
|
||||
<textarea name="frmSaisie[activite]" rows="5" cols="40"><?=$etab->Activite?></textarea>
|
||||
|
||||
<label>Capital Montant</label>
|
||||
<input type="text" name="frmSaisie[capital_mt]" size="10" maxlength="11" value="<?=trim($etab['Capital'])*1.0?>" disabled="disabled"/>
|
||||
<input type="text" name="frmSaisie[capital_mt]" size="10" maxlength="11"
|
||||
value="<?=trim($etab->Capital)*1.0?>" disabled="disabled"/>
|
||||
<label>Capital Devise</label>
|
||||
<select disabled="disabled" name="frmSaisie[capital_dev]">
|
||||
<option value="0000">-</option>
|
||||
<?php
|
||||
$tmp=$client->getDevises();
|
||||
$liste=$tmp['result'];
|
||||
$selOne=false;
|
||||
foreach ($liste as $iso=>$lib) {
|
||||
if (trim($etab['CapitalDev'])==$iso) { $selOne=true; $sel='selected'; } else $sel='';
|
||||
if (strlen($lib)>39) $lib=substr($lib,0,41).'...';
|
||||
echo "<option value=\"$iso\" $sel >$lib</option>";
|
||||
$ws = new WsScores();
|
||||
$reponse = $ws->getDevises();
|
||||
if ($reponse!=false){
|
||||
$liste = $reponse->result->item;
|
||||
if ( count($liste)>0 ){
|
||||
foreach ($liste as $devise) {
|
||||
if (trim($etab->CapitalDev) == $devise->devIso) {
|
||||
$sel = 'selected';
|
||||
} else {
|
||||
$sel = '';
|
||||
}
|
||||
$lib = $devise->devNom;
|
||||
if (strlen($lib) > 39) {
|
||||
$lib = substr($lib, 0, 41).'...';
|
||||
}
|
||||
?>
|
||||
<option value="<?php echo $devise->devIso?>" <?php echo $sel?>>
|
||||
<?php echo $lib?>
|
||||
</option>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!$selOne) echo '<option value="0000" selected>-</option>';
|
||||
?>
|
||||
</select>
|
||||
|
||||
@ -107,25 +136,25 @@ if (!$selOne) echo '<option value="0000" selected>-</option>';
|
||||
|
||||
<?php
|
||||
$saisie = isset($_SESSION['saisie']) ? $_SESSION['saisie'] : array();
|
||||
$saisie['tribunal'] = $etab['TribunalCode'];
|
||||
$saisie['tribunal'] = $etab->TribunalCode;
|
||||
require_once realpath(dirname(__FILE__)).'/saisie_form_event.php';
|
||||
?>
|
||||
|
||||
<h2 id="dFormActionnaire">Actionnariat</h2>
|
||||
<div id="formActionnaire">
|
||||
<label>Siren actionnaire</label>
|
||||
<input type="text" name="actionnaire[siren]" size="8" maxlength="12" value="" />
|
||||
<label>Pourcentage</label><input type="text" class="percent" name="actionnaire[pct]" size="3" maxlength="5" value="" />
|
||||
<span class="left">%</span>
|
||||
<label> Major. / </label><input type="radio" class="widthauto" name="actionnaire[majMin]" value="maj" />
|
||||
<label> Minor.</label><input type="radio" class="widthauto" name="actionnaire[majMin]" value="min" />
|
||||
<label>au DateMAJ</label><input type="text" class="date" name="actionnaire[dateMAJ]" size="10" maxlength="10" value="" />
|
||||
<span class="left">(Format JJ/MM/AAAA)</span>
|
||||
<label>Pays</label>
|
||||
<select name="actionnaire[pays]"><?=$strSelectPays?></select>
|
||||
<label>Raison sociale</label>
|
||||
<input type="text" name="actionnaire[nom]" size="35" maxlength="80" value=""/>
|
||||
<span class="left">si étranger</span>
|
||||
<label>Siren actionnaire</label>
|
||||
<input type="text" name="actionnaire[siren]" size="8" maxlength="12" value="" />
|
||||
<label>Pourcentage</label><input type="text" class="percent" name="actionnaire[pct]" size="3" maxlength="5" value="" />
|
||||
<span class="left">%</span>
|
||||
<label> Major. / </label><input type="radio" class="widthauto" name="actionnaire[majMin]" value="maj" />
|
||||
<label> Minor.</label><input type="radio" class="widthauto" name="actionnaire[majMin]" value="min" />
|
||||
<label>au DateMAJ</label><input type="text" class="date" name="actionnaire[dateMAJ]" size="10" maxlength="10" value="" />
|
||||
<span class="left">(Format JJ/MM/AAAA)</span>
|
||||
<label>Pays</label>
|
||||
<select name="actionnaire[pays]"><?=$strSelectPays?></select>
|
||||
<label>Raison sociale</label>
|
||||
<input type="text" name="actionnaire[nom]" size="35" maxlength="80" value=""/>
|
||||
<span class="left">si étranger</span>
|
||||
</div>
|
||||
|
||||
<h2 id="dFormParticipation">Participations</h2>
|
||||
@ -145,9 +174,8 @@ require_once realpath(dirname(__FILE__)).'/saisie_form_event.php';
|
||||
</div>
|
||||
|
||||
<h2>Informations diverses</h2>
|
||||
|
||||
<label>Autre siren (doublon)</label>
|
||||
<input type="text" size="11" name="frmSaisie[sirenDoublon]" value="<?=$etab['sirenDoublon']?>"/>
|
||||
<input type="text" size="11" name="frmSaisie[sirenDoublon]" value="<?=$etab->sirenDoublon?>"/>
|
||||
|
||||
<label>Entreprise de domiciliation</label>
|
||||
<select name="frmSaisie[domiciliataire]">
|
||||
@ -174,10 +202,9 @@ require_once realpath(dirname(__FILE__)).'/saisie_form_event.php';
|
||||
|
||||
|
||||
<?php
|
||||
if($etab['FJ'][0]==1)
|
||||
{
|
||||
if ($etab->FJ->item[0] == 1) {
|
||||
?>
|
||||
<label>Entreprise ayant exercée son droit d'opposition en</label>
|
||||
<label>Entreprise ayant exercée son droit d'opposition en</label>
|
||||
<input type="checkbox" name="oppositionInsee" value="1"/>
|
||||
<div id="divOppositionInsee"></div>
|
||||
<?php
|
||||
@ -185,4 +212,4 @@ if($etab['FJ'][0]==1)
|
||||
?>
|
||||
<p class="submit"><input type="submit" name="submit" value="Sauver"/></p>
|
||||
|
||||
</form>
|
||||
</form>
|
||||
|
@ -1,89 +1,87 @@
|
||||
<label>Source <font color="Red">*</font></label>
|
||||
<select name="jugement[source]">
|
||||
<?php
|
||||
$select = '';
|
||||
if ( !isset($saisie['source']) || $saisie['source']=='TS' ){
|
||||
$select = 'selected';
|
||||
}
|
||||
$select = (isset($saisie['source']) == false || $saisie['source'] == 'TS') ?
|
||||
' selected' : '';
|
||||
?>
|
||||
<option value="TS" <?=$select?>>Tribunal via CCI</option>
|
||||
<option value="TS" <?php echo $select?>>Tribunal via CCI</option>
|
||||
<?php $select = ($saisie['source'] == 'TD') ? ' selected' : ''; ?>
|
||||
<option value="TD"<?php echo $select?>>Tribunal directement</option>
|
||||
<?php $select = ($saisie['source'] == 'TA') ? ' selected' : ''; ?>
|
||||
<option value="TA"<?php echo $select?>>Tribunal via autre tiers</option>
|
||||
<?php $select = ($saisie['source'] == 'JT') ? ' selected' : ''; ?>
|
||||
<option value="JT"<?php echo $select?>>TESSI</option>
|
||||
<?php
|
||||
$select = '';
|
||||
if ( $saisie['source']=='TD' ){ $select = 'selected'; }
|
||||
$ws = new WsScores();
|
||||
$reponse = $ws->getListeJalCollecte();
|
||||
$liste = $reponse->result->item;
|
||||
if ( count($liste)>0 ){
|
||||
foreach ($liste as $item) {
|
||||
?>
|
||||
<option value="TD" <?=$select?>>Tribunal directement</option>
|
||||
<option value="JS<?php echo $item->id?>"
|
||||
<?php if ($saisie['source'] == 'JS'.$item->id) { echo ' selected'; }?>">
|
||||
<?php echo $item->nom?></option>
|
||||
<?php
|
||||
$select = '';
|
||||
if ( $saisie['source']=='TA' ){ $select = 'selected'; }
|
||||
?>
|
||||
<option value="TA" <?=$select?>>Tribunal via autre tiers</option>
|
||||
<?php
|
||||
$select = '';
|
||||
if ( $saisie['source']=='JT' ){ $select = 'selected'; }
|
||||
?>
|
||||
<option value="JT" <?=$select?>>TESSI</option>
|
||||
<?php
|
||||
$tmp = $client->getListeJalCollecte();
|
||||
$liste = $tmp['result'];
|
||||
foreach ($liste as $id=>$lib) {
|
||||
echo "<option value=\"JS$id\" ";
|
||||
if ( $saisie['source']=="JS$id" ) {
|
||||
echo 'selected';
|
||||
}
|
||||
echo ">$lib</option>";
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
|
||||
<div id="dateParution">
|
||||
<label>Date de parution <font color="Red">*</font></label>
|
||||
<input class="date" type="text" name="jugement[dateParution]" size="10" maxlength="10" value="<?=$saisie['dateParution']?>" />
|
||||
<input class="date" type="text" name="jugement[dateParution]"
|
||||
size="10" maxlength="10" value="<?=$saisie['dateParution']?>" />
|
||||
<span class="left">(Format JJ/MM/AAAA)</span>
|
||||
</div>
|
||||
|
||||
<div id="numParution">
|
||||
<label>N° de parution</label>
|
||||
<input type="text" name="jugement[numParution]" size="10" maxlength="10" value="<?=$saisie['numParution']?>" />
|
||||
<input type="text" name="jugement[numParution]"
|
||||
size="10" maxlength="10" value="<?=$saisie['numParution']?>" />
|
||||
</div>
|
||||
|
||||
<label>Date évènement / jugement<font color="Red">*</font></label>
|
||||
<input class="date" type="text" name="jugement[dateJuge]" size="10" maxlength="10" value="<?=$saisie['dateJugement']?>" />
|
||||
<input class="date" type="text" name="jugement[dateJuge]"
|
||||
size="10" maxlength="10" value="<?=$saisie['dateJugement']?>" />
|
||||
<span class="left">(Format JJ/MM/AAAA)</span>
|
||||
|
||||
<label>Tribunal <font color="Red">*</font></label>
|
||||
<select id="tribunal" name="jugement[tribunal]">
|
||||
<option value="-" selected>-</option>
|
||||
<?php
|
||||
//Affectation du code tribunal présent dans la fiche identité pour comparaison
|
||||
// Affectation du code tribunal présent dans la fiche identité pour comparaison
|
||||
$codeCmp = $saisie['tribunal'];
|
||||
//Si le code tribunal n'est pas défini dans la fiche identité
|
||||
//alors en sélectionner un par défault suivant le code INSEE
|
||||
if ($codeCmp == ''){
|
||||
try {
|
||||
$O = $client->getListeCompetences($etab['Siret'], 'tri',
|
||||
$_SESSION['tabInfo']['entrep']['codeCommune']);
|
||||
$competences = $O['result'];
|
||||
foreach($competences as $item){
|
||||
if ($item['Type'] == 'C'){
|
||||
$codeCmp = $item['Code'];
|
||||
break;
|
||||
}
|
||||
}
|
||||
} catch (SoapFault $fault) {
|
||||
include_once 'soaperror.php';
|
||||
processSoapFault($client,$fault,$tabInfo);
|
||||
die();
|
||||
}
|
||||
// Si le code tribunal n'est pas défini dans la fiche identité
|
||||
// alors en sélectionner un par défault suivant le code INSEE
|
||||
if ($codeCmp == '') {
|
||||
$ws = new WsScores();
|
||||
$reponse = $ws->getListeCompetences($siret, 'tri',
|
||||
$_SESSION['tabInfo']['entrep']['codeCommune']);
|
||||
$competences = $reponse->result->liste->item;
|
||||
if ( count($competences)>0 ){
|
||||
foreach ($competences as $item) {
|
||||
if ($item->Type == 'C'){
|
||||
$codeCmp = $item->Code;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$tmp = $client->getTribunaux( array('C','I','G','M','P') );
|
||||
$liste = $tmp['result'];
|
||||
asort($liste);
|
||||
foreach ($liste as $code=>$lib) {
|
||||
if (strlen($lib)>39) $lib=substr($lib,0,41).'...';
|
||||
echo '<option value="'.$code.'"';
|
||||
if ($code==$codeCmp) echo ' selected';
|
||||
echo ">$lib</option>";
|
||||
$types = array('C', 'I', 'G', 'M', 'P');
|
||||
$ws = new WsScores();
|
||||
$reponse = $ws->getTribunaux($types);
|
||||
$liste = $reponse->result->item;
|
||||
foreach ($liste as $tribunal) {
|
||||
$lib = $tribunal->nom;
|
||||
if (strlen($lib) > 39) {
|
||||
$lib = substr($lib, 0, 41).'...';
|
||||
}
|
||||
print '<option value="'.$tribunal->code.'"';
|
||||
if ($tribunal->code == $codeCmp) {
|
||||
print ' selected';
|
||||
}
|
||||
print ">$lib</option>";
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
@ -92,19 +90,18 @@ foreach ($liste as $code=>$lib) {
|
||||
<select id="jugement" name="jugement[even][]" size="5">
|
||||
<option value="0000">-</option>
|
||||
<?php
|
||||
$eventNum = isset($saisie['eventNum']) ? $saisie['eventNum'] : '0000' ;
|
||||
$eventNum = isset($saisie['eventNum']) ? $saisie['eventNum'] : '0000';
|
||||
asort($tabEvent);
|
||||
foreach($tabEvent as $key => $event)
|
||||
{
|
||||
$select = '';
|
||||
if ( in_array($key, $saisie['even']) ) {
|
||||
$select = 'selected';
|
||||
}
|
||||
$display = true;
|
||||
if ( isset($inEditDialog) && $inEditDialog === true && empty($select) ){
|
||||
$display = false;
|
||||
}
|
||||
if ( $display ) {
|
||||
foreach ($tabEvent as $key => $event) {
|
||||
$select = '';
|
||||
if (in_array($key, $saisie['even'])) {
|
||||
$select = 'selected';
|
||||
}
|
||||
$display = true;
|
||||
if (isset($inEditDialog) && $inEditDialog === true && empty($select)) {
|
||||
$display = false;
|
||||
}
|
||||
if ( $display ) {
|
||||
?>
|
||||
<option value="<?=$key?>" title="<?=$event?>" <?=$select?>><?=$event?></option>
|
||||
<?php
|
||||
@ -113,5 +110,7 @@ foreach($tabEvent as $key => $event)
|
||||
?>
|
||||
</select>
|
||||
<div id="subFormSaisie">
|
||||
<?php require_once realpath(dirname(__FILE__)).'/event/event_'.$eventNum.'.php';?>
|
||||
<?php
|
||||
require_once realpath(dirname(__FILE__)).'/event/event_'.$eventNum.'.php';
|
||||
?>
|
||||
</div>
|
@ -1,110 +1,180 @@
|
||||
<?php
|
||||
function saisie_save($siret, $idEntreprise, $tabInfo) {
|
||||
global $client;
|
||||
//Récupération des infos soumise par formulaires
|
||||
if ( isset($_REQUEST['frmSaisie']) )
|
||||
$tabSaisie = $_REQUEST['frmSaisie'];
|
||||
if ( isset($_REQUEST['jugement']) )
|
||||
$tabJugement = $_REQUEST['jugement'];
|
||||
if ( isset($_REQUEST['actionnaire']) )
|
||||
$tabActionna = $_REQUEST['actionnaire'];
|
||||
if ( isset($_REQUEST['particip']) )
|
||||
$tabParticip = $_REQUEST['particip'];
|
||||
if ( isset($_REQUEST['score']) )
|
||||
$tabScore = $_REQUEST['score'];
|
||||
if ( isset($_REQUEST['perimetreVente']) )
|
||||
$perimetreVente = $_REQUEST['perimetreVente'];
|
||||
if ( isset($_REQUEST['etablissement5500']) )
|
||||
$etablissement5500 = $_REQUEST['etablissement5500'];
|
||||
if ( isset($_REQUEST['etabnic']) )
|
||||
$etabnic = $_REQUEST['etabnic'];
|
||||
function saisie_save($siret, $idEntreprise, $tabInfo)
|
||||
{
|
||||
// Récupération des infos soumise par formulaires
|
||||
if (isset($_REQUEST['frmSaisie']))
|
||||
$tabSaisie = $_REQUEST['frmSaisie'];
|
||||
if (isset($_REQUEST['jugement']))
|
||||
$tabJugement = $_REQUEST['jugement'];
|
||||
if (isset($_REQUEST['actionnaire']))
|
||||
$tabActionna = $_REQUEST['actionnaire'];
|
||||
if (isset($_REQUEST['particip']))
|
||||
$tabParticip = $_REQUEST['particip'];
|
||||
if (isset($_REQUEST['score']))
|
||||
$tabScore = $_REQUEST['score'];
|
||||
if (isset($_REQUEST['perimetreVente']))
|
||||
$perimetreVente = $_REQUEST['perimetreVente'];
|
||||
if (isset($_REQUEST['etablissement5500']))
|
||||
$etablissement5500 = $_REQUEST['etablissement5500'];
|
||||
if (isset($_REQUEST['etabnic']))
|
||||
$etabnic = $_REQUEST['etabnic'];
|
||||
|
||||
//Vente et Cession evénement 5500
|
||||
foreach($perimetreVente as $k => $p){
|
||||
if ( $p=='-' ){
|
||||
array_splice($perimetreVente, $k, 1);
|
||||
// Vente et Cession evénement 5500
|
||||
if ( count($perimetreVente)>0 ){
|
||||
foreach($perimetreVente as $k => $p){
|
||||
if ( $p=='-' ){
|
||||
array_splice($perimetreVente, $k, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
if ( isset($perimetreVente) && count($perimetreVente)>0 ){
|
||||
$tabJugement['even'] = array_merge(
|
||||
$tabJugement['even'],
|
||||
$perimetreVente);
|
||||
}
|
||||
if (isset($perimetreVente) && count($perimetreVente) > 0) {
|
||||
$tabJugement['even'] = array_merge(
|
||||
$tabJugement['even'],
|
||||
$perimetreVente);
|
||||
}
|
||||
|
||||
//Liste établissements concernées
|
||||
if ( isset($etablissement5500) && count($etablissement5500)>0 ) {
|
||||
$countEtab = 0;
|
||||
$txtEtab = '';
|
||||
foreach($etablissement5500 as $etab){
|
||||
$txtEtab.= $etab;
|
||||
$countEtab++;
|
||||
if($countEtab>10) break;
|
||||
if( count($etablissement5500) > $countEtab )
|
||||
{ $txtEtab.=', '; }
|
||||
}
|
||||
// Liste établissements concernées
|
||||
if (isset($etablissement5500) && count($etablissement5500) > 0) {
|
||||
$countEtab = 0;
|
||||
$txtEtab = '';
|
||||
foreach ($etablissement5500 as $etab) {
|
||||
$txtEtab .= $etab;
|
||||
$countEtab++;
|
||||
if ($countEtab > 10) {
|
||||
break;
|
||||
}
|
||||
if (count($etablissement5500) > $countEtab ) {
|
||||
$txtEtab .= ', ';
|
||||
}
|
||||
}
|
||||
|
||||
if ( count($etablissement5500)>1 ){
|
||||
$txt = 'Etablissement(s) concerné(s) : ';
|
||||
} else {
|
||||
$txt = 'Etablissement concerné : ';
|
||||
}
|
||||
if ( count($etablissement5500) > 1) {
|
||||
$txt = 'Etablissement(s) concerné(s) : ';
|
||||
} else {
|
||||
$txt = 'Etablissement concerné : ';
|
||||
}
|
||||
|
||||
if ( $tabJugement['comp']!='' ) {
|
||||
$tabJugement['comp'].= ' '.$txt.$txtEtab;
|
||||
} else {
|
||||
$tabJugement['comp'] = ' '.$txt.$txtEtab;
|
||||
if ($tabJugement['comp'] != '' ) {
|
||||
$tabJugement['comp'] .= ' '.$txt.$txtEtab;
|
||||
} else {
|
||||
$tabJugement['comp'] = ' '.$txt.$txtEtab;
|
||||
}
|
||||
}
|
||||
|
||||
// Sélection nic pour établissement concerné
|
||||
if (isset($etabnic) && $etabnic != '') {
|
||||
if (isset($txtEtab) && $txtEtab != '' ) {
|
||||
$tabJugement['comp'] .= ', '.$etabnic;
|
||||
} else {
|
||||
$tabJugement['comp'] .= 'Etablissement concerné : '.$etabnic;
|
||||
}
|
||||
}
|
||||
|
||||
// Opposition à l'adresse
|
||||
if ($tabJugement['oppo'] == 'adresse') {
|
||||
if ($tabJugement['comp'] != '') {
|
||||
$tabJugement['comp'] .= ' Opposition : A l\'adresse du bien vendu';
|
||||
} else {
|
||||
$tabJugement['comp'] = 'Opposition : A l\'adresse du bien vendu';
|
||||
}
|
||||
}
|
||||
|
||||
$InfosEntrep = new stdClass();
|
||||
|
||||
$identite = new stdClass();
|
||||
$identite->isin = $tabSaisie['isin'];
|
||||
$identite->tel = $tabSaisie['tel'];
|
||||
$identite->fax = $tabSaisie['fax'];
|
||||
$identite->web = $tabSaisie['web'];
|
||||
$identite->mail = $tabSaisie['mail'];
|
||||
$identite->activite = $tabSaisie['activite'];
|
||||
$identite->sirenDoublon = $tabSaisie['sirenDoublon'];
|
||||
$identite->moisOppositionInsee = $tabSaisie['moisOppositionInsee'];
|
||||
$identite->domiciliataire = $tabSaisie['domiciliataire'];
|
||||
|
||||
$InfosEntrep->identite = $identite;
|
||||
|
||||
$jugement = new stdClass();
|
||||
$jugement->source = $tabJugement['source'];
|
||||
$jugement->dateJuge = $tabJugement['dateJuge'];
|
||||
$jugement->tribunal = $tabJugement['tribunal'];
|
||||
$jugement->even = $tabJugement['even'];
|
||||
$jugement->admin = $tabJugement['admin'];
|
||||
$jugement->mand = $tabJugement['mand'];
|
||||
$jugement->oppo = $tabJugement['oppo'];
|
||||
$jugement->dateParution = $tabJugement['dateParution'];
|
||||
$jugement->numParution = $tabJugement['numParution'];
|
||||
$jugement->actionsMt = $tabJugement['actionsMt'];
|
||||
$jugement->actionsNb = $tabJugement['actionsNb'];
|
||||
$jugement->nic = $tabJugement['nic'];
|
||||
$jugement->datePaie = $tabJugement['datePaie'];
|
||||
$jugement->dateFinPeriode = $tabJugement['dateFinPeriode'];
|
||||
$jugement->comp = $tabJugement['comp'];
|
||||
$jugement->nouvAdrCp = $tabJugement['nouvAdrCp'];
|
||||
$jugement->nouvAdr = $tabJugement['nouvAdr'];
|
||||
$jugement->nouvAdrVille = $tabJugement['nouvAdrVille'];
|
||||
$jugement->nouvActivite = $tabJugement['nouvActivite'];
|
||||
$jugement->nouvFJ = $tabJugement['nouvFJ'];
|
||||
|
||||
$tabDir = array();
|
||||
if ( count($tabJugement['nouvDir'])>0 ){
|
||||
foreach ( $tabJugement['nouvDir'] as $nouvDir ){
|
||||
$dir = new stdClass();
|
||||
$dir->Fonc = $nouvDir['Fonc'];
|
||||
$dir->Genre = $nouvDir['Genre'];
|
||||
$dir->Pre = $nouvDir['Pre'];
|
||||
$dir->Nom = $nouvDir['Nom'];
|
||||
$dir->Dom = $nouvDir['Dom'];
|
||||
$tabDir[] = $dir;
|
||||
}
|
||||
}
|
||||
$jugement->nouvDir = $tabDir;
|
||||
|
||||
$InfosEntrep->jugement = $jugement;
|
||||
|
||||
$actionnaire = new stdClass();
|
||||
$actionnaire->siren = $tabActionna['siren'];
|
||||
$actionnaire->pct = $tabActionna['pct'];
|
||||
$actionnaire->majMin = $tabActionna['majMin'];
|
||||
$actionnaire->dateMAJ = $tabActionna['dateMAJ'];
|
||||
$actionnaire->pays = $tabActionna['pays'];
|
||||
$actionnaire->nom = $tabActionna['nom'];
|
||||
|
||||
$InfosEntrep->actionnaire = $actionnaire;
|
||||
|
||||
$participation = new stdClass();
|
||||
$participation->siren = $tabParticip['siren'];
|
||||
$participation->pct = $tabParticip['pct'];
|
||||
$participation->majMin = $tabParticip['majMin'];
|
||||
$participation->dateMAJ = $tabParticip['dateMAJ'];
|
||||
$participation->pays = $tabParticip['pays'];
|
||||
$participation->nom = $tabParticip['nom'];
|
||||
|
||||
$InfosEntrep->participation = $participation;
|
||||
|
||||
$score = new stdClass();
|
||||
$score->encours = $tabScore['encours'];
|
||||
$score->scoreSolv = $tabScore['scoreSolv'];
|
||||
$score->scoreDir = $tabScore['scoreDir'];
|
||||
$score->scoreConf = $tabScore['scoreConf'];
|
||||
|
||||
$InfosEntrep->score = $score;
|
||||
|
||||
//Sélection nic pour établissement concerné
|
||||
if ( isset($etabnic) && $etabnic != '' ) {
|
||||
if ( isset($txtEtab) && $txtEtab!='' ) {
|
||||
$tabJugement['comp'].= ', '.$etabnic;
|
||||
} else {
|
||||
$tabJugement['comp'].= 'Etablissement concerné : '.$etabnic;
|
||||
}
|
||||
}
|
||||
$message = 'Erreur lors de l\'enregistrement !';
|
||||
|
||||
//Opposition à l'adresse
|
||||
if ( $tabJugement['oppo'] == 'adresse' ) {
|
||||
if ( $tabJugement['comp']!='' ) {
|
||||
$tabJugement['comp'].= ' Opposition : A l\'adresse du bien vendu';
|
||||
} else {
|
||||
$tabJugement['comp'] = 'Opposition : A l\'adresse du bien vendu';
|
||||
}
|
||||
}
|
||||
$ws = new WsScores();
|
||||
$reponse = $ws->setInfosEntrep($siret, $idEntreprise, $InfosEntrep);
|
||||
if ($reponse!=false || $reponse->result!=false){
|
||||
$message = 'Informations mises à jour !';
|
||||
}
|
||||
|
||||
//Traitement des chaînes de caractères
|
||||
require 'i18n/cleanchar.php';
|
||||
$tabSaisie = cleanstring_deep($tabSaisie);
|
||||
$tabJugement = cleanstring_deep($tabJugement);
|
||||
$tabActionna = cleanstring_deep($tabActionna);
|
||||
$tabParticip = cleanstring_deep($tabParticip);
|
||||
$tabSaisie = array(
|
||||
'source' => $tabJugement['source'],
|
||||
'dateParution' => $tabJugement['dateParution'],
|
||||
'numParution' => $tabJugement['numParution']
|
||||
);
|
||||
|
||||
$tabInfos = array(
|
||||
'identite' => $tabSaisie,
|
||||
'jugement' => $tabJugement,
|
||||
'actionnaire' => $tabActionna,
|
||||
'participation' => $tabParticip,
|
||||
'score' => $tabScore,
|
||||
);
|
||||
$_SESSION['saisie'] = $tabSaisie;
|
||||
|
||||
$message = 'Erreur lors de l\'enregistrement !';
|
||||
try {
|
||||
$O = $client->setInfosEntrep($siret, $idEntreprise, $tabInfos);
|
||||
if ($O['result']==1) $message = 'Informations mises à jour !';
|
||||
} catch (SoapFault $fault) {
|
||||
require_once 'soaperror.php';
|
||||
processSoapFault($client,$fault,$tabInfo);
|
||||
}
|
||||
|
||||
$tabSaisie = array(
|
||||
'source' => $tabJugement['source'],
|
||||
'dateParution' => $tabJugement['dateParution'],
|
||||
'numParution' => $tabJugement['numParution']
|
||||
);
|
||||
|
||||
$_SESSION['saisie'] = $tabSaisie;
|
||||
|
||||
return $message;
|
||||
}
|
||||
return $message;
|
||||
}
|
||||
|
@ -1,63 +1,67 @@
|
||||
<?php
|
||||
header('Content-Type: text/html; charset='.CHARSET);
|
||||
$search = !isset($_GET['search']) ? '' : strtolower($_GET['search']);
|
||||
if (!$search) return;
|
||||
$search = (isset($_GET['search'])) ? strtolower($_GET['search']) : '';
|
||||
if ($search == false) {
|
||||
return;
|
||||
}
|
||||
|
||||
list($searchStr, $filtre) = explode(',', $search);
|
||||
$searchStr = trim($searchStr);
|
||||
$filtre = str_replace(' ', '', $filtre);
|
||||
if( strlen($filtre) != 5 && strlen($filtre) != 2 ){
|
||||
$filtre = '';
|
||||
if (strlen($filtre) != 5 && strlen($filtre) != 2) {
|
||||
$filtre = '';
|
||||
}
|
||||
|
||||
try {
|
||||
$O = $client->searchMandataires(
|
||||
$searchStr,
|
||||
array('V', 'N', 'H', 'A', 'M'), //types de mandataires
|
||||
$filtre);
|
||||
$tableResults = array();
|
||||
$tableResults = $O['result'];
|
||||
}catch (SoapFault $fault){
|
||||
echo 'Erreur durant la recherche';
|
||||
exit;
|
||||
$ws = new WsScores();
|
||||
$reponse = $ws->searchMandataires(
|
||||
$searchStr,
|
||||
array('V', 'N', 'H', 'A', 'M'),
|
||||
$filtre
|
||||
);
|
||||
|
||||
if ($reponse === false) {
|
||||
print 'Erreur durant la recherche';
|
||||
exit;
|
||||
}
|
||||
|
||||
$output = array();
|
||||
$tableResults = $reponse->result->item;
|
||||
|
||||
$output[] = array(
|
||||
'label' => "A l'adresse du bien vendu",
|
||||
'id' => 'adresse'
|
||||
'id' => 'adresse'
|
||||
);
|
||||
|
||||
/*
|
||||
REGEX Code Postal : ^(F-)?((2[A|B])|[0-9]{2})[0-9]{3}$
|
||||
(?<!/BP /i) Ne pas avoir la présence de BP devant les 5 chiffres
|
||||
*/
|
||||
//Recherche des codes postaux
|
||||
if( count($tableResults)>0 ){
|
||||
$i=0;
|
||||
foreach ($tableResults as $code=>$lib){
|
||||
$tabResults[$i]['code'] = $code;
|
||||
$tabResults[$i]['lib'] = htmlspecialchars_decode(
|
||||
html_entity_decode($lib), ENT_QUOTES);
|
||||
preg_match('/(?<!bp )((2[A|B])|[0-9]{2})[0-9]{3}( )/i', $lib, $matches);
|
||||
$tabResults[$i]['cp'] = $matches[0];
|
||||
$i++;
|
||||
}
|
||||
foreach ($tabResults as $key => $row){
|
||||
$code[$key] = $row['code'];
|
||||
$lib[$key] = $row['lib'];
|
||||
$cp[$key] = $row['cp'];
|
||||
}
|
||||
//Classement du tableau
|
||||
array_multisort($cp, SORT_NUMERIC, $tabResults);
|
||||
$firephp->log($tabResults,'tabResults');
|
||||
// Recherche des codes postaux
|
||||
if (count($tableResults) > 0) {
|
||||
$i = 0;
|
||||
foreach ($tableResults as $result) {
|
||||
$tabResults[$i]['code'] = $result->id;
|
||||
$tabResults[$i]['lib'] = htmlspecialchars_decode(
|
||||
html_entity_decode($result->mand), ENT_QUOTES);
|
||||
preg_match(
|
||||
'/(?<!bp )((2[A|B])|[0-9]{2})[0-9]{3}( )/i',
|
||||
$result->mand,
|
||||
$matches
|
||||
);
|
||||
$tabResults[$i]['cp'] = $matches[0];
|
||||
$i++;
|
||||
}
|
||||
foreach ($tabResults as $key => $row) {
|
||||
$code[$key] = $row['code'];
|
||||
$lib[$key] = $row['lib'];
|
||||
$cp[$key] = $row['cp'];
|
||||
}
|
||||
// Classement du tableau
|
||||
array_multisort($cp, SORT_NUMERIC, $tabResults);
|
||||
|
||||
//Affichage des valeurs
|
||||
foreach ($tabResults as $item){
|
||||
$output[] = array(
|
||||
'label' => $item['lib'],
|
||||
'id' => $item['code']
|
||||
);
|
||||
}
|
||||
// Affichage des valeurs
|
||||
foreach ($tabResults as $item) {
|
||||
$output[] = array(
|
||||
'label' => $item['lib'],
|
||||
'id' => $item['code']);
|
||||
}
|
||||
}
|
||||
echo json_encode($output);
|
||||
print json_encode($output);
|
||||
|
@ -1,63 +1,74 @@
|
||||
<?php
|
||||
header('Content-Type: text/html; charset='.CHARSET);
|
||||
|
||||
$error=FALSE;
|
||||
$error = false;
|
||||
|
||||
$tabMandataires = array();
|
||||
$tabMandataires = $_REQUEST['tabMandataires'];
|
||||
|
||||
//Vérification des données
|
||||
// Vérification des données
|
||||
$fields = array();
|
||||
if($tabMandataires['sirenGrp']=='' && $tabMandataires['sirenMand']==''){
|
||||
$fields[] ='Siret'; $error = true;
|
||||
if ($tabMandataires['sirenGrp'] == '' &&
|
||||
$tabMandataires['sirenMand'] == ''){
|
||||
$fields[] ='Siret';
|
||||
$error = true;
|
||||
}
|
||||
if($tabMandataires['sirenGrp'] == $tabMandataires['sirenMand']){
|
||||
$fields[] ='Siret de la société civile identique au Siret du mandataire';
|
||||
$error = true;
|
||||
if ($tabMandataires['sirenGrp'] == $tabMandataires['sirenMand']) {
|
||||
$fields[] = 'Siret de la société civile identique au Siret du mandataire';
|
||||
$error = true;
|
||||
}
|
||||
if( (strlen($tabMandataires['sirenGrp'])!=14 && empty($tabMandataires['sirenMand'])) ||
|
||||
(empty($tabMandataires['sirenGrp']) && strlen($tabMandataires['sirenMand'])!=14) ){
|
||||
$fields = 'Siret avec la bonne taille';
|
||||
$error = true;
|
||||
if ((strlen($tabMandataires['sirenGrp']) != 14 &&
|
||||
empty($tabMandataires['sirenMand'])) ||
|
||||
(empty($tabMandataires['sirenGrp']) &&
|
||||
strlen($tabMandataires['sirenMand']) != 14)) {
|
||||
$fields = 'Siret avec la bonne taille';
|
||||
$error = true;
|
||||
}
|
||||
|
||||
if($tabMandataires['Nom']=='' ){$fields[] ='Nom'; $error = true;}
|
||||
if($tabMandataires['type']==''){$fields[] ='Type'; $error = true;}
|
||||
if($tabMandataires['coursAppel']==''){$fields[] ='Cours d\'appel'; $error = true;}
|
||||
if($tabMandataires['Statut']==''){$fields[] ='Statut'; $error = true;}
|
||||
if($tabMandataires['adresse']==''){$fields[] ='Adresse'; $error = true;}
|
||||
if($tabMandataires['cp']==''){$fields[] ='Code Postal'; $error = true;}
|
||||
if($tabMandataires['ville']==''){$fields[] ='Ville'; $error = true;}
|
||||
if($tabMandataires['tel']==''){$fields[] ='Téléphone'; $error = true;}
|
||||
|
||||
//Envoi de la requête au webservices
|
||||
if ($error==TRUE){
|
||||
$message = '<font color="red">';
|
||||
$message.= 'Veuillez remplir les champs suivants : ';
|
||||
$message.= join(', ', $fields);
|
||||
$message.= '</font>';
|
||||
}else{
|
||||
$message='';
|
||||
//On vérifie que le mandataire n'est pas déjà rentré en base
|
||||
$tableResults = array();
|
||||
/*
|
||||
try {
|
||||
$O = $client->searchMandataires($tabMandataires['Nom'],
|
||||
array('V', 'N', 'H', 'A', 'M'), $tabMandataires['cp']);
|
||||
$tableResults = $O['result'];
|
||||
}catch (SoapFault $fault){
|
||||
$message = 'Une erreur s\'est produite durant l\'enregistrement';
|
||||
}
|
||||
if(count($tableResults)>0){
|
||||
FB::log($tableResults, 'RESULTS');
|
||||
$message = 'Il semble que le mandataire soit déjà enregistré';
|
||||
}else{*/
|
||||
//Si le webservice renvoie une erreur, on l'affecte à message
|
||||
try {
|
||||
$client->setMandataire($tabMandataires);
|
||||
}catch(SoapFault $fault){
|
||||
$message = 'Une erreur s\'est produite durant l\'enregistrement';
|
||||
}
|
||||
//}
|
||||
if ($tabMandataires['Nom'] == '' ) { $fields[] = 'Nom'; $error = true; }
|
||||
if ($tabMandataires['type'] == '') { $fields[] = 'Type'; $error = true; }
|
||||
if ($tabMandataires['coursAppel'] == '') {
|
||||
$fields[] = 'Cours d\'appel';
|
||||
$error = true;
|
||||
}
|
||||
echo $message;
|
||||
if ($tabMandataires['Statut'] == '') { $fields[] = 'Statut'; $error = true;}
|
||||
if ($tabMandataires['adresse'] == '') { $fields[] = 'Adresse'; $error = true;}
|
||||
if ($tabMandataires['cp'] == '') {
|
||||
$fields[] = 'Code Postal';
|
||||
$error = true;
|
||||
}
|
||||
if ($tabMandataires['ville'] == '') { $fields[] = 'Ville'; $error = true; }
|
||||
if ($tabMandataires['tel'] == '') { $fields[] = 'Téléphone'; $error = true; }
|
||||
|
||||
// Envoi de la requête au webservices
|
||||
if ($error == true) {
|
||||
$message = '<font color="red">';
|
||||
$message .= 'Veuillez remplir les champs suivants : ';
|
||||
$message .= join(', ', $fields);
|
||||
$message .= '</font>';
|
||||
} else {
|
||||
$message = '';
|
||||
// On vérifie que le mandataire n'est pas déjà rentré en base
|
||||
$tableResults = array();
|
||||
/*
|
||||
try {
|
||||
$O = scoresws_searchMandataires($tabMandataires['Nom'],
|
||||
array('V', 'N', 'H', 'A', 'M'),
|
||||
$tabMandataires['cp']);
|
||||
$tableResults = $O['result'];
|
||||
} catch (SoapFault $fault) {
|
||||
$message = 'Une erreur s\'est produite durant l\'enregistrement';
|
||||
}
|
||||
if (count($tableResults) > 0) {
|
||||
$message = 'Il semble que le mandataire soit déjà enregistré';
|
||||
} else {
|
||||
*/
|
||||
// Si le webservice renvoie une erreur, on l'affecte à message
|
||||
$ws = new WsScores();
|
||||
$reponse = $ws->setMandataire($tabMandataires);
|
||||
if ($reponse === false){
|
||||
$message = 'Une erreur s\'est produite durant l\'enregistrement';
|
||||
}
|
||||
//}
|
||||
}
|
||||
print $message;
|
||||
|
1109
includes/scoresws/WsScores.php
Normal file
1109
includes/scoresws/WsScores.php
Normal file
File diff suppressed because it is too large
Load Diff
74
includes/scoresws/dirigeants.php
Normal file
74
includes/scoresws/dirigeants.php
Normal file
@ -0,0 +1,74 @@
|
||||
<?php
|
||||
// -------------------------------------------------------------------------- //
|
||||
// afficheDirigeants
|
||||
// -------------------------------------------------------------------------- //
|
||||
function afficheDirigeants(&$dirs)
|
||||
{
|
||||
print '<h2>Liste des dirigeants actifs</h2>';
|
||||
print '<table>';
|
||||
print '<tr>';
|
||||
print '<td width="30"> </td>';
|
||||
print '<td colspan="2" width="550" class="StyleInfoData">';
|
||||
print '<table>';
|
||||
if (count($dirs->item) > 0) {
|
||||
foreach ($dirs->item as $dir) {
|
||||
$societe = str_replace('&#160;',' ', $dir->Societe);
|
||||
$nom =
|
||||
str_replace('&#160;',' ',
|
||||
$dir->Societe.' '.$dir->Nom.' '.$dir->Prenom);
|
||||
if (isset($dir->Civilite) == true && $dir->Civilite != '') {
|
||||
$nom = $dir->Civilite.'. '.$nom;
|
||||
}
|
||||
print '<tr>';
|
||||
print '<td class="StyleInfoData" width="120">'.
|
||||
$dir->Titre.'</td>';
|
||||
print '<td class="StyleInfoData" width="200">';
|
||||
if ($societe != '') {
|
||||
print '<a href="/?page=recherche&vue=list&formR[type]=ent'.
|
||||
'&formR[raisonSociale]='.$societe.
|
||||
'" title="Recherche à partir de la raison sociale">'.
|
||||
$societe.'</a>';
|
||||
}
|
||||
print ' ';
|
||||
if ($nom != '') {
|
||||
print '<a href="/?page=recherche&vue=list&formR[type]=dir'.
|
||||
'&formR[dirNom]='.$dir->Nom.
|
||||
'&formR[dirPrenom]='.$dir->Prenom.
|
||||
'&formR[dirDateNaissJJ]='.substr($dir->NaissDate, 0, 2).
|
||||
'&formR[dirDateNaissMM]='.substr($dir->NaissDate, 3, 2).
|
||||
'&formR[dirDateNaissAAAA]='.
|
||||
substr($dir->NaissDate, 6, 4).
|
||||
'" title="Recherche à partir du nom du dirigeant">'.
|
||||
$nom.'</a>';
|
||||
}
|
||||
print '</td>';
|
||||
print '<td class="StyleInfoData" width="230">';
|
||||
if (trim($dir->NaissDate) != '' &&
|
||||
trim($dir->NaissVille.' '.$dir->NaissDepPays) != '') {
|
||||
print 'né(e) le '.$dir->NaissDate.
|
||||
' à '.$dir->NaissVille;
|
||||
if (trim($dir->NaissDepPays) != '') {
|
||||
print ' ('.$dir->NaissDepPays.')';
|
||||
}
|
||||
} else if (trim($dir->NaissDate) != '') {
|
||||
print 'né(e) le '.$dir->NaissDate;
|
||||
} else if (trim($dir->NaissVille.' '.
|
||||
$dir->NaissDepPays) != '') {
|
||||
print 'né(e) à '.$dir->NaissVille;
|
||||
print ' ('.$dir->NaissDepPays.')';
|
||||
}
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
}
|
||||
} else {
|
||||
print '<tr><td class="StyleInfoData" width="550">'.
|
||||
' '.
|
||||
'Aucune donnée n\'est présente dans notre base'.
|
||||
'</td></tr>';
|
||||
}
|
||||
print '</table>';
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
print '</table>';
|
||||
}
|
||||
?>
|
@ -1,36 +1,31 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
|
||||
Element => Appel function lib_element
|
||||
=> Appel function data_element
|
||||
=> Elements de styles et paramètres
|
||||
head, hidden
|
||||
style : width, height, class, colspan
|
||||
|
||||
Une fonction bloc_nom définit le format général
|
||||
On déclare la table
|
||||
On déclare l'entête de la table
|
||||
- Pour chaque element
|
||||
  | cell | cell
|
||||
|
||||
=> Appel function data_element
|
||||
=> Elements de styles et paramètres
|
||||
head, hidden
|
||||
style : width, height, class, colspan
|
||||
|
||||
Une fonction bloc_nom définit le format général
|
||||
On déclare la table
|
||||
On déclare l'entête de la table
|
||||
- Pour chaque element
|
||||
  | cell | cell
|
||||
*/
|
||||
|
||||
// Appel la fonction qui formatte les données d'un éléments
|
||||
function formatElement($module, $lib, $params){
|
||||
$result = call_user_func_array(
|
||||
strtolower($module).'_'.strtolower($lib),
|
||||
$params);
|
||||
if ( is_array($result) && count($result)>0 ){
|
||||
$lib = isset($result[0]) ? $result[0] : '';
|
||||
$data = isset($result[1]) ? $result[1] : '';
|
||||
$title = isset($result[2]) ? $result[2] : '';
|
||||
return array('lib'=>$lib, 'data'=>$data, 'title'=>$title);
|
||||
} elseif ( is_bool($result) && $result===false ){
|
||||
return false;
|
||||
}
|
||||
function formatElement($module, $lib, $params)
|
||||
{
|
||||
$result = call_user_func_array(strtolower($module).'_'.strtolower($lib),
|
||||
$params);
|
||||
if (is_array($result) && count($result) > 0) {
|
||||
$lib = isset($result[0]) ? $result[0] : '';
|
||||
$data = isset($result[1]) ? $result[1] : '';
|
||||
$title = isset($result[2]) ? $result[2] : '';
|
||||
return array('lib' => $lib,
|
||||
'data' => $data,
|
||||
'title' => $title);
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
300
includes/scoresws/indiscore.php
Normal file
300
includes/scoresws/indiscore.php
Normal file
@ -0,0 +1,300 @@
|
||||
<?php
|
||||
function formatPct($pct)
|
||||
{
|
||||
$pct = round($pct / 10, 0) * 10;
|
||||
if ($pct == 0) {
|
||||
$pct = 10;
|
||||
}
|
||||
return $pct;
|
||||
}
|
||||
|
||||
function afficheEvaluation($titre, $champ, $image)
|
||||
{
|
||||
print '<h3><u>'.$titre.' :</u></h3>';
|
||||
print '<div class="stats gradiant_pic">';
|
||||
print '<ul>';
|
||||
print '<li>';
|
||||
print '<i>'.$etab[$champ].'</i>';
|
||||
print '<div class="blocdegrade clearfix">';
|
||||
print '<span class="textdegrade">'.$titre.'</span>';
|
||||
print '<div class="imgdegrade">';
|
||||
print '<img class="borderimg" src="./img/indiscore/imgscores-'.
|
||||
formatPct($etab[$image]).'.png"/>';
|
||||
print '</div>';
|
||||
print '<div class="regle"><img src="./img/sgradiant2.png" /></div>';
|
||||
print '</div>';
|
||||
print '</li>';
|
||||
print '</ul>';
|
||||
print '</div>';
|
||||
}
|
||||
|
||||
$etab = scoresws_indiscore($siret, $siren, $idEntreprise);
|
||||
print '<pre>c';
|
||||
print_r($etab);
|
||||
print 'c</pre>';
|
||||
?>
|
||||
|
||||
<div id="center">
|
||||
<h1 class="titre">INDISCORE©</h1>
|
||||
<table>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="200" class="StyleInfoLib">Numéro identifiant Siren</td>
|
||||
<td width="350" class="StyleInfoData">
|
||||
<?php
|
||||
print substr($etab->Siren, 0, 3).' '.
|
||||
substr($etab->Siren, 3, 3).' '.
|
||||
substr($etab->Siren, 6, 3);
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="200" class="StyleInfoLib">
|
||||
Numéro identifiant Siret du siège</td>
|
||||
<td width="350" class="StyleInfoData">
|
||||
<?php
|
||||
print substr($etab->Siren, 0, 3).' '.
|
||||
substr($etab->Siren, 3, 3).' '.
|
||||
substr($etab->Siren, 6, 3).' '.
|
||||
substr($etab->Siret, -5);
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
if (isset($etab->NumRC) == true && $etab->NumRC != 0) {
|
||||
?>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="200" class="StyleInfoLib">Numéro R.C.</td>
|
||||
<td width="350" class="StyleInfoData"><?=$etab->NumRC?></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<tr><td colspan="3"> </td></tr>
|
||||
</table>
|
||||
|
||||
<h2>Raison sociale & coordonnées</h2>
|
||||
<table>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="200" class="StyleInfoLib">Raison Sociale</td>
|
||||
<td width="350" class="StyleInfoData">
|
||||
<?php
|
||||
print $etab->Nom;
|
||||
if (isset($etab->Nom2) == true && $etab->Nom2 != '') {
|
||||
print '<br/>'.$etab->Nom2;
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
if ($etab->Enseigne != '' && $etab->Sigle != '') {
|
||||
$titre = 'Enseigne / Sigle';
|
||||
$lib = $etab->Enseigne.' / '.$etab->Sigle;
|
||||
} else if ($etab->Enseigne != '' && $etab->Sigle == '') {
|
||||
$titre = 'Enseigne';
|
||||
$lib = $etab->Enseigne;
|
||||
} else if ($etab->Enseigne == '' && $etab->Sigle != '') {
|
||||
$titre = 'Sigle';
|
||||
$lib = $etab->Sigle;
|
||||
} else {
|
||||
$titre = '';
|
||||
}
|
||||
if ($titre != '') {
|
||||
?>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="200" class="StyleInfoLib"><?=$titre?></td>
|
||||
<td width="350" class="StyleInfoData"><?=$lib?></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="200" class="StyleInfoLib">Forme juridique</td>
|
||||
<td width="350" class="StyleInfoData">
|
||||
<?php
|
||||
print $etab->FJ_lib; //@todo INSEE //.' ('.$etab->FJ
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="200" class="StyleInfoLib">
|
||||
Date de création de l'entreprise</td>
|
||||
<td width="350" class="StyleInfoData">
|
||||
<?php
|
||||
$dateCreation = str_replace('-', '', $etab->DateCreaEn);
|
||||
$date = new WDate;
|
||||
print $date->dateT('Ymd', 'm/Y', $dateCreation);
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="200" class="StyleInfoLib">Adresse</td>
|
||||
<td width="350" class="StyleInfoData"><?=$etab->Adresse?><br/>
|
||||
<?php
|
||||
if ($etab->Adresse2 != '') {
|
||||
print $etab->Adresse2.'<br/>';
|
||||
}
|
||||
print $etab->CP.' '.$etab->Ville;
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="200" class="StyleInfoLib">Téléphone</td>
|
||||
<td width="350" class="StyleInfoData"><?=$etab->Tel?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td colspan="2" width="550" class="StyleInfoData">
|
||||
<?php
|
||||
require_once 'surveillance/surveillance.php';
|
||||
print getSurveillance('score', $siret);
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td colspan="3"> </td></tr>
|
||||
</table>
|
||||
|
||||
<h2>Évaluation</h2>
|
||||
<table>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="550" colspan="2" class="StyleInfoData">
|
||||
L'évaluation indiScore© est en partie basée
|
||||
sur les points notables suivants :<br/>
|
||||
<?php
|
||||
afficheEvaluation('Conformité légale',
|
||||
'AnalyseConfor', 'ScoreConfor');
|
||||
afficheEvaluation('Dirigeance',
|
||||
'AnalyseDirigeance', 'ScoreDirigeance');
|
||||
afficheEvaluation('Solvabilité',
|
||||
'AnalyseSolvabilite', 'Indiscore');
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
$millesimeMax =
|
||||
date('Ymd', mktime(0, 0, 0, date('m'), date('d'), date('Y') - 2));
|
||||
if ($etab->NbBilansScore > 0 &&
|
||||
$etab->Bilans[0]['Millesime'] >= $millesimeMax) {
|
||||
?>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="550" colspan="2" class="StyleInfoData">
|
||||
<?php
|
||||
print 'A la lecture du dernier bilan, la situation financière de'.
|
||||
'l'entreprise '.$etab->Nom.' est <b>'.
|
||||
$etab->tabInfosNotations['SituationFinanciere'].'</b>.<br/>';
|
||||
print '<!-- Cette notation financière est '.
|
||||
$etab->tabInfosNotations['Notation'].'.<br/>-->';
|
||||
if (html_entity_decode($etab->tabInfosNotations['ProbabiliteDefaut']) !=
|
||||
'En défaut') {
|
||||
print 'La probabilité de défaillance associée'.
|
||||
' à cette note avoisine les '.
|
||||
number_format($etab->tabInfosNotations['ProbabiliteDefaut'],
|
||||
3, ',', ' ').' %';
|
||||
} else {
|
||||
print 'Cette entreprise est défaillante'.
|
||||
' ou sur le point de le devenir.';
|
||||
}
|
||||
// [EquivalenceBDF]
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="550" colspan="2" class="StyleInfoData">
|
||||
<?php
|
||||
print '<i>Pour information, les méthodes standards donnent :'.
|
||||
' Conan & Holder = <b>'.$etab->scores['ConanH'].
|
||||
'</b>, Afdcc2 = <b>'.$etab->scores['Afdcc2'].
|
||||
'</b> et Score Z = <b>'.$etab->scores['Z'].'</b>.</i>';
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<?
|
||||
} else {
|
||||
?>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="550" colspan="2" class="StyleInfoData">
|
||||
<?php
|
||||
print 'La situation financière de l\'entreprise ne peut être'.
|
||||
' évaluée en détail car ';
|
||||
if ($etab->Bilans[0]['Millesime'] < $millesimeMax &&
|
||||
count($etab->Bilans) > 0) {
|
||||
print 'le dernier bilan disponible date de '.
|
||||
substr($etab->Bilans[0]['Millesime'], 0, 4).'.';
|
||||
} else {
|
||||
print 'aucun bilan n\'est disponible.';
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<tr><td colspan="3"> </td></tr>
|
||||
</table>
|
||||
|
||||
<h2>Paiements</h2>
|
||||
<table>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="550" colspan="2" class="StyleInfoData">
|
||||
<?=html_entity_decode($etab->infoPaiement)?></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h2>Conclusion</h2>
|
||||
<table>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="550" colspan="2" class="StyleInfoData">
|
||||
Compte tenu des informations disponibles auprès des sources
|
||||
officielles Scores et Décisions présente la conclusion
|
||||
suivante :<br/>
|
||||
<?php
|
||||
switch ($_SESSION['tabInfo']['typeScore']) {
|
||||
case '20':
|
||||
$maxIndiscore = $_SESSION['tabInfo']['typeScore'];
|
||||
$indiscore = $etab->Indiscore20;
|
||||
break;
|
||||
case '100':
|
||||
default:
|
||||
$maxIndiscore =
|
||||
(empty($_SESSION['tabInfo']['typeScore']) == true) ? '100' :
|
||||
$_SESSION['tabInfo']['typeScore'];
|
||||
$indiscore = $etab->Indiscore;
|
||||
break;
|
||||
}
|
||||
print '<h3>LE SCORE EST DE '.$indiscore.
|
||||
' SUR '.$maxIndiscore.' POINTS</h3>';
|
||||
if ($etab->infoEncours != '' &&
|
||||
is_numeric($etab->encours) == false &&
|
||||
$etab->encours == 'N/A') {
|
||||
print '<h3>'.$etab->infoEncours.'</h3>';
|
||||
} else {
|
||||
if ($indiscore != 0) {
|
||||
print '<i>La tendance de la note est '.
|
||||
$etab->TendanceIndiscore.'</i>';
|
||||
print '<h3>L\'ENCOURS MAXIMUM CONSEILLÉ EST DE '.
|
||||
round($etab->encours / 1000).' K€</h3>';
|
||||
}
|
||||
print '<h3>'.$etab->infoEncours.'</h3>';
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3" align="center">
|
||||
<img src="./img/logo_indiscore.png"/></td>
|
||||
</tr>
|
||||
</table>
|
114
includes/scoresws/liens.php
Normal file
114
includes/scoresws/liens.php
Normal file
@ -0,0 +1,114 @@
|
||||
<?php
|
||||
// -------------------------------------------------------------------------- //
|
||||
// afficheLiens
|
||||
// -------------------------------------------------------------------------- //
|
||||
function afficheLiens($liens, $type)
|
||||
{
|
||||
if (count($liens) > 0) {
|
||||
foreach ($liens as $lien) {
|
||||
if ($lien->Actif == 0){
|
||||
$font1 = '<font color="gray"><i>';
|
||||
$font2 = '</i></font>';
|
||||
} else {
|
||||
$font1 = '';
|
||||
$font2 = '';
|
||||
}
|
||||
print '<tr>';
|
||||
print '<td class="StyleInfoData" width="100">';
|
||||
print $font1;
|
||||
if ($lien->Pmin > 0) {
|
||||
print $lien->Pmin.' %';
|
||||
} else {
|
||||
switch ($lien->MajMin) {
|
||||
case '+': print 'major.'; break;
|
||||
case '-': print 'minor.'; break;
|
||||
case 'C': print 'major.'; break;
|
||||
case 'S': print 'minor.'; break;
|
||||
case 'F': print 'absorption'; break;
|
||||
case 'A': print 'absorbant'; break;
|
||||
default : print ' ';
|
||||
}
|
||||
}
|
||||
print $font2;
|
||||
print '</td>';
|
||||
print '<td class="StyleInfoLib" width="300">';
|
||||
print $font1;
|
||||
print $lien->RaisonSociale;
|
||||
print $font2;
|
||||
print '</td>';
|
||||
print '<td class="StyleInfoData" width="150">';
|
||||
print $font1;
|
||||
if ($lien->Siren != '' && $lien->Siren != 0) {
|
||||
print 'Siren <a href="./?page=identite&siret='.
|
||||
$lien->Siren .'">'.$lien->Siren.'</a>';
|
||||
}
|
||||
if ($lien->Pays != 'France') {
|
||||
print '<b>'.$lien->Pays.'</b>';
|
||||
}
|
||||
print $font2;
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
}
|
||||
} else {
|
||||
print '<tr>';
|
||||
print '<td width="30"> </td>';
|
||||
print '<td width="550" colspan="2" class="StyleInfoData">';
|
||||
if ($type == 'actionnaires') {
|
||||
print 'Aucun actionnaire référencé'.
|
||||
' par nos services</td>';
|
||||
} else {
|
||||
print 'Aucune participation référencée'.
|
||||
' par nos services</td>';
|
||||
}
|
||||
print '</tr>';
|
||||
}
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------- //
|
||||
// afficheActionnaires
|
||||
// -------------------------------------------------------------------------- //
|
||||
function afficheActionnaires($liens)
|
||||
{
|
||||
print '<h2>Actionnariat</h2>';
|
||||
print '<table>';
|
||||
print '<tr>';
|
||||
print '<td width="30"> </td>';
|
||||
print '<td colspan="2" width="550" class="StyleInfoData">';
|
||||
print '<table>';
|
||||
if (($_SESSION['tabInfo']['entrep']['fj'] >= 1000 &&
|
||||
$_SESSION['tabInfo']['entrep']['fj'] <= 1999) ||
|
||||
($_SESSION['tabInfo']['entrep']['fj'] >= 10 &&
|
||||
$_SESSION['tabInfo']['entrep']['fj'] <= 19)) {
|
||||
print '<tr>';
|
||||
print '<td width="30"> </td>';
|
||||
print '<td width="550" colspan="2" class="StyleInfoData">'.
|
||||
'Cette entreprise est une personne physique.';
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
} else {
|
||||
afficheLiens($liens, 'actionnaires');
|
||||
}
|
||||
print '<tr><td colspan="3"> </td></tr>';
|
||||
print '</table>';
|
||||
print '</tr>';
|
||||
print '</table>';
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------- //
|
||||
// afficheParticipations
|
||||
// -------------------------------------------------------------------------- //
|
||||
function afficheParticipations($liens)
|
||||
{
|
||||
print '<h2>Participations</h2>';
|
||||
print '<table>';
|
||||
print '<tr>';
|
||||
print '<td width="30"> </td>';
|
||||
print '<td colspan="2" width="550" class="StyleInfoData">';
|
||||
print '<table>';
|
||||
afficheLiens($liens, 'participations');
|
||||
print '<tr><td colspan="3"> </td></tr>';
|
||||
print '</table>';
|
||||
print '</tr>';
|
||||
print '</table>';
|
||||
}
|
||||
?>
|
File diff suppressed because it is too large
Load Diff
@ -1,76 +1,78 @@
|
||||
<?php
|
||||
function valideSiren($siren, $nic='', $erreur=false) {
|
||||
function valideSiren($siren, $nic = '', $erreur = false)
|
||||
{
|
||||
$lenSIREN = strlen($siren);
|
||||
if (!valideData($siren, 9, 9, 'N')) { //Siren non précisé ou incorrect.
|
||||
return $erreur;
|
||||
} else {
|
||||
if (!isset($nic) || trim($nic)=='') {
|
||||
$somme = 0;
|
||||
for ($i = 0; $i <= 8; $i += 2) { // Traitement IMPAIR
|
||||
$somme += (integer) substr($siren, $i, 1);
|
||||
}
|
||||
|
||||
$lenSIREN=strlen($siren);
|
||||
if (!valideData($siren, 9, 9,'N')) //Siren non précisé ou incorrect.
|
||||
return $erreur;
|
||||
else
|
||||
{
|
||||
if (!isset($nic) || trim($nic)=='')
|
||||
{
|
||||
$somme=0;
|
||||
for ($i=0; $i<=8; $i+=2) // Traitement IMPAIR
|
||||
$somme+=(integer)substr($siren,$i,1);
|
||||
for ($i = 1; $i <= 7; $i += 2) { // Traitement PAIR
|
||||
$var_tmp = (string) (2 * ((integer) substr($siren, $i, 1)));
|
||||
$som_tmp = 0;
|
||||
for ($j = 0; $j < strlen($var_tmp); $j++) {
|
||||
$som_tmp += (integer) substr($var_tmp, $j, 1);
|
||||
}
|
||||
$somme += $som_tmp;
|
||||
}
|
||||
|
||||
for ($i=1; $i<=7; $i+=2)
|
||||
{ // Traitement PAIR
|
||||
$var_tmp=(string)(2*((integer)substr($siren,$i,1)));
|
||||
$som_tmp=0;
|
||||
for($j=0;$j<strlen($var_tmp);$j++)
|
||||
$som_tmp+=(integer)substr($var_tmp,$j,1);
|
||||
$somme+=$som_tmp;
|
||||
}
|
||||
|
||||
if ((integer)($somme/10)!=($somme/10))
|
||||
{ // Le Siren est faux
|
||||
if (substr($siren,0,3)!='200') // Les siren débutant par 200 sont toujours valides (sirens provisoires de la BDF?!)
|
||||
return $erreur;
|
||||
}
|
||||
} else {
|
||||
if (!valideData($nic,1,5,'N')) // Nic de format incorrect.
|
||||
return $erreur;
|
||||
if ((integer) ($somme / 10) != ($somme / 10)) {
|
||||
// Le Siren est faux
|
||||
if (substr($siren, 0, 3) != '200')
|
||||
// Les siren débutant par 200 sont toujours valides
|
||||
// (sirens provisoires de la BDF?!)
|
||||
return $erreur;
|
||||
}
|
||||
} else {
|
||||
if (!valideData($nic, 1, 5, 'N')) { // Nic de format incorrect.
|
||||
return $erreur;
|
||||
}
|
||||
|
||||
$SIRET=$siren.$nic;
|
||||
$somme=0;
|
||||
for ($i=0; $i<=12; $i+=2)
|
||||
{ // Traitement PAIR
|
||||
$var_tmp=(string)(2*((integer)substr($SIRET,$i,1)));
|
||||
$som_tmp=0;
|
||||
for($j=0;$j<strlen($var_tmp);$j++)
|
||||
$som_tmp+=(integer)substr($var_tmp,$j,1);
|
||||
$somme+=$som_tmp;
|
||||
}
|
||||
for ($i=1; $i<=13; $i+=2) // Traitement IMPAIR
|
||||
$somme+=(integer)substr($SIRET,$i,1);
|
||||
$SIRET = $siren.$nic;
|
||||
$somme = 0;
|
||||
for ($i = 0; $i <= 12; $i += 2) { // Traitement PAIR
|
||||
$var_tmp = (string) (2 * ((integer) substr($SIRET, $i, 1)));
|
||||
$som_tmp = 0;
|
||||
for ($j = 0; $j < strlen($var_tmp); $j++) {
|
||||
$som_tmp += (integer) substr($var_tmp, $j, 1);
|
||||
}
|
||||
$somme += $som_tmp;
|
||||
}
|
||||
for ($i = 1; $i <= 13; $i += 2) { // Traitement IMPAIR
|
||||
$somme += (integer) substr($SIRET, $i, 1);
|
||||
}
|
||||
|
||||
if ((integer)($somme/10)!=($somme/10))// Le Siret est faux
|
||||
return $erreur;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
function replace_siren($matches) {
|
||||
$client = new SoapClient(null, array( 'trace' => 1,
|
||||
'soap_version' => SOAP_1_1,
|
||||
'location' => WEBSERVICE_URL,
|
||||
'uri' => WEBSERVICE_URI,
|
||||
'login' => $_SESSION['tabInfo']['login'],
|
||||
'password' => $_SESSION['tabInfo']['password']));
|
||||
foreach ($matches as $i=>$sirenBrut) {
|
||||
$siren=strtr($sirenBrut, array(' '=>'', '.'=>'', '-'=>''));
|
||||
if (strlen($sirenBrut)==9) $sirenBrut=implode(' ', str_split($sirenBrut, 3));
|
||||
if (valideSiren($siren)) {
|
||||
try {
|
||||
$O = $client->isSirenExistant($siren);
|
||||
} catch (SoapFault $fault) {
|
||||
return $sirenBrut;
|
||||
}
|
||||
if ($O>0) {
|
||||
return '<a href="/?page=identite&siret='.$siren.'" title="Voir la fiche d\'identité de cette entreprise">'.$sirenBrut.'</a>';
|
||||
}
|
||||
}
|
||||
return $sirenBrut;
|
||||
}
|
||||
if ((integer) ($somme / 10) != ($somme / 10)) { // Le Siret est faux
|
||||
return $erreur;
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
?>
|
||||
|
||||
function replace_siren($matches)
|
||||
{
|
||||
foreach ($matches as $sirenBrut) {
|
||||
$siren = strtr($sirenBrut, array(' ' => '', '.' => '', '-' => ''));
|
||||
if (strlen($sirenBrut) == 9) {
|
||||
$sirenBrut = implode(' ', str_split($sirenBrut, 3));
|
||||
}
|
||||
if (valideSiren($siren)) {
|
||||
require_once 'scoresws/WsScores.php';
|
||||
$ws = new WsScores;
|
||||
$reponse = $ws->isSirenExistant($siren);
|
||||
if ($reponse === false) {
|
||||
return $sirenBrut;
|
||||
}
|
||||
return '<a href="/?page=identite&siret='.$siren.
|
||||
'" title="Voir la fiche d\'identité'.
|
||||
' de cette entreprise">'.$sirenBrut.'</a>';
|
||||
}
|
||||
return $sirenBrut;
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
@ -1,176 +1,175 @@
|
||||
<?php
|
||||
|
||||
function assocSourceDroit(){
|
||||
return array(
|
||||
'annonces' => 'survannonce',
|
||||
'insee' => 'survinsee',
|
||||
'bilans' => 'survbilan',
|
||||
'score' => 'survscore',
|
||||
'actes' => 'survactes',
|
||||
'dirigeants' => 'survdirigeants',
|
||||
'privileges' => 'survpriv',
|
||||
);
|
||||
function assocSourceDroit()
|
||||
{
|
||||
return
|
||||
array('annonces' => 'survannonce',
|
||||
'insee' => 'survinsee',
|
||||
'bilans' => 'survbilan',
|
||||
'score' => 'survscore',
|
||||
'actes' => 'survactes',
|
||||
'dirigeants' => 'survdirigeants',
|
||||
'privileges' => 'survpriv');
|
||||
}
|
||||
|
||||
function assocSourceTxt(){
|
||||
return array(
|
||||
'annonces' => 'annonces',
|
||||
'insee' => 'Insee',
|
||||
'bilans' => 'bilans',
|
||||
'score' => 'IndiScore',
|
||||
'actes' => 'actes',
|
||||
'dirigeants' => 'dirigeants',
|
||||
'privileges' => 'privilèges',
|
||||
);
|
||||
function assocSourceTxt()
|
||||
{
|
||||
return
|
||||
array('annonces' => 'annonces',
|
||||
'insee' => 'Insee',
|
||||
'bilans' => 'bilans',
|
||||
'score' => 'IndiScore',
|
||||
'actes' => 'actes',
|
||||
'dirigeants' => 'dirigeants',
|
||||
'privileges' => 'privilèges');
|
||||
}
|
||||
|
||||
/**
|
||||
* Affiche le formulaire surveillance.
|
||||
*
|
||||
* @param string $page
|
||||
* La page ou l'on affiche le formulaire, détermine le type de surveillance.
|
||||
* La page ou l'on affiche le formulaire,
|
||||
* détermine le type de surveillance.
|
||||
* @param string $siret
|
||||
* L'établissement à surveiller.
|
||||
* L'établissement à surveiller.
|
||||
* @param array $notEmail
|
||||
* Un tableau de login pour exclure l'affichage de l'adresse email
|
||||
* Un tableau de login pour exclure l'affichage de l'adresse email
|
||||
* @param boolean $inDialog
|
||||
*
|
||||
* @return string
|
||||
* Retourne sous forme de chaine de caractère le fomulaire en HTML
|
||||
* Retourne sous forme de chaine de caractère le fomulaire en HTML
|
||||
*/
|
||||
function formSurveillance($source, $siret, $notEmail, $inDialog = false)
|
||||
{
|
||||
$assocSourceTxt = assocSourceTxt();
|
||||
$assocSourceDroit = assocSourceDroit();
|
||||
$assocSourceTxt = assocSourceTxt();
|
||||
$assocSourceDroit = assocSourceDroit();
|
||||
|
||||
$style = file_get_contents(realpath(dirname(__FILE__)).'/style.css');
|
||||
$style = file_get_contents(realpath(dirname(__FILE__)).'/style.css');
|
||||
|
||||
$output = '';
|
||||
$output = '';
|
||||
|
||||
if ( $inDialog ){
|
||||
$output.= '<style type="text/css">'.$style.'</style>'."\n";
|
||||
$output.= '<form id="frmSurv" name="frmSurv" '.
|
||||
'action="./?page=surveillance" method="post">'."\n";
|
||||
$output.= '<input name="q" type="hidden" value="setsurv"/>';
|
||||
$output.= '<input name="formSurv[siret]" type="hidden" value="'.
|
||||
$siret.'"/>'."\n";
|
||||
if ($inDialog) {
|
||||
$output.= '<style type="text/css">'.$style.'</style>'."\n";
|
||||
$output.= '<form id="frmSurv" name="frmSurv" '.
|
||||
'action="./?page=surveillance" method="post">'."\n";
|
||||
$output.= '<input name="q" type="hidden" value="setsurv"/>';
|
||||
$output.= '<input name="formSurv[siret]" type="hidden" value="'.
|
||||
$siret.'"/>'."\n";
|
||||
|
||||
if( empty($source) ){
|
||||
$output.= '<div class="fieldgrp">'."\n";
|
||||
$output.= '<label>Types</label>'."\n";
|
||||
$output.= '<div class="field">'."\n";
|
||||
foreach($assocSourceTxt as $Source => $Txt)
|
||||
{
|
||||
if(hasPerm($assocSourceDroit[$Source]))
|
||||
{
|
||||
$checked = 'checked';
|
||||
if ($Source=='privileges'){
|
||||
$checked = '';
|
||||
}
|
||||
$output.='<input type="checkbox" '.
|
||||
'name="formSurv[source][]" value="'.
|
||||
$Source.'" '.$checked.'/> '.$Txt."<br/>\n";
|
||||
}
|
||||
}
|
||||
$output.= '</div>'."\n";
|
||||
$output.= '</div>'."\n";
|
||||
}else{
|
||||
$output.= '<input name="formSurv[source]" '.
|
||||
'type="hidden" value="'.$source.'"/>'."\n";
|
||||
}
|
||||
//Champ référence
|
||||
$ref = '';
|
||||
if(isset($_REQUEST['ref'])){
|
||||
$ref = $_REQUEST['ref'];
|
||||
}
|
||||
$output.= '<div id="survForm">'."\n";
|
||||
$output.= '<div class="fieldgrp">'."\n";
|
||||
$output.= '<label class="StyleInfoLib">Votre référence</label>';
|
||||
$output.= '<div class="field">';
|
||||
$output.= '<input class="longfield" name="formSurv[ref]" type="text" '.
|
||||
'value="'.$ref.'" size="10"/></div>'."\n";
|
||||
$output.= '</div>'."\n";
|
||||
if (empty($source)) {
|
||||
$output.= '<div class="fieldgrp">'."\n";
|
||||
$output.= '<label>Types</label>'."\n";
|
||||
$output.= '<div class="field">'."\n";
|
||||
foreach ($assocSourceTxt as $Source => $Txt) {
|
||||
if (hasPerm($assocSourceDroit[$Source])) {
|
||||
$checked = 'checked';
|
||||
if ($Source == 'privileges') {
|
||||
$checked = '';
|
||||
}
|
||||
$output.='<input type="checkbox" '.
|
||||
'name="formSurv[source][]" value="'.
|
||||
$Source.'" '.$checked.'/> '.$Txt."<br/>\n";
|
||||
}
|
||||
}
|
||||
$output.= '</div>'."\n";
|
||||
$output.= '</div>'."\n";
|
||||
} else {
|
||||
$output.= '<input name="formSurv[source]" '.
|
||||
'type="hidden" value="'.$source.'"/>'."\n";
|
||||
}
|
||||
// Champ référence
|
||||
$ref = '';
|
||||
if (isset($_REQUEST['ref'])) {
|
||||
$ref = $_REQUEST['ref'];
|
||||
}
|
||||
$output.= '<div id="survForm">'."\n";
|
||||
$output.= '<div class="fieldgrp">'."\n";
|
||||
$output.= '<label class="StyleInfoLib">Votre référence</label>';
|
||||
$output.= '<div class="field">';
|
||||
$output.= '<input class="longfield" name="formSurv[ref]" type="text" '.
|
||||
'value="'.$ref.'" size="10"/></div>'."\n";
|
||||
$output.= '</div>'."\n";
|
||||
|
||||
//Champ spécial suivant source
|
||||
$encours = '';
|
||||
if(isset($_REQUEST['encours'])){
|
||||
$encours = $_REQUEST['encours'];
|
||||
}
|
||||
if ($source=='score'){
|
||||
$output.= '<div id="survForm">'."\n";
|
||||
$output.= '<div class="fieldgrp">'."\n";
|
||||
$output.= '<label class="StyleInfoLib">Votre encours (€)</label>';
|
||||
$output.= '<div class="field">';
|
||||
$output.= '<input class="longfield" name="formSurv[encours]" '.
|
||||
'type="text" value="'.$encours.'" size="10"/></div>'."\n";
|
||||
$output.= '</div>'."\n";
|
||||
}
|
||||
// Champ spécial suivant source
|
||||
$encours = '';
|
||||
if (isset($_REQUEST['encours'])) {
|
||||
$encours = $_REQUEST['encours'];
|
||||
}
|
||||
if ($source == 'score') {
|
||||
$output.= '<div id="survForm">'."\n";
|
||||
$output.= '<div class="fieldgrp">'."\n";
|
||||
$output.= '<label class="StyleInfoLib">Votre encours (€)'.
|
||||
'</label>';
|
||||
$output.= '<div class="field">';
|
||||
$output.= '<input class="longfield" name="formSurv[encours]" '.
|
||||
'type="text" value="'.$encours.'" size="10"/></div>'."\n";
|
||||
$output.= '</div>'."\n";
|
||||
}
|
||||
|
||||
//Champ email
|
||||
$email = '';
|
||||
if( !in_array($_SESSION['tabInfo']['login'],$notEmail) &&
|
||||
!isset($_REQUEST['email'])){
|
||||
$email = $_SESSION['tabInfo']['email'];
|
||||
}elseif(isset($_REQUEST['email'])){
|
||||
$email = $_REQUEST['email'];
|
||||
}
|
||||
$output.= '<div class="fieldgrp">'."\n";
|
||||
$output.= '<label class="StyleInfoLib">'.
|
||||
'Adresse email du destinataire</label>';
|
||||
$output.= '<div class="field">'.
|
||||
'<input class="longfield" name="formSurv[email]" '.
|
||||
'type="text" value="'.$email.'" size="20"/></div>'."\n";
|
||||
$output.= '</div>'."\n";;
|
||||
$output.= '</div>'."\n";
|
||||
$output.= '</form>'."\n";
|
||||
// Champ email
|
||||
$email = '';
|
||||
if (!in_array($_SESSION['tabInfo']['login'],$notEmail) &&
|
||||
!isset($_REQUEST['email'])) {
|
||||
$email = $_SESSION['tabInfo']['email'];
|
||||
}else if (isset($_REQUEST['email'])) {
|
||||
$email = $_REQUEST['email'];
|
||||
}
|
||||
$output.= '<div class="fieldgrp">'."\n";
|
||||
$output.= '<label class="StyleInfoLib">'.
|
||||
'Adresse email du destinataire</label>';
|
||||
$output.= '<div class="field">'.
|
||||
'<input class="longfield" name="formSurv[email]" '.
|
||||
'type="text" value="'.$email.'" size="20"/></div>'."\n";
|
||||
$output.= '</div>'."\n";;
|
||||
$output.= '</div>'."\n";
|
||||
$output.= '</form>'."\n";
|
||||
|
||||
} else {
|
||||
$texte = 'Mettre sous surveillance ';
|
||||
if( !empty($source) ) {
|
||||
$texte.= $assocSourceTxt[$source];
|
||||
}
|
||||
$output.= '<br/>';
|
||||
$output.= lienSousSurveillance($texte,
|
||||
'Ajouter la surveillance', $source, $siret);
|
||||
$output.= '<br/>'."\n";
|
||||
}
|
||||
return $output;
|
||||
} else {
|
||||
$texte = 'Mettre sous surveillance ';
|
||||
if( !empty($source) ) {
|
||||
$texte.= $assocSourceTxt[$source];
|
||||
}
|
||||
$output.= '<br/>';
|
||||
$output.= lienSousSurveillance($texte,
|
||||
'Ajouter la surveillance', $source, $siret);
|
||||
$output.= '<br/>'."\n";
|
||||
}
|
||||
return $output;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gère la détection des droits et des préférences pour l'affichage
|
||||
* de la surveillance.
|
||||
* @param string $page
|
||||
* La page ou l'on affiche le formulaire, détermine le type
|
||||
* La page ou l'on affiche le formulaire, détermine le type
|
||||
* de surveillance.
|
||||
* @param string $siret
|
||||
* L'établissement à surveiller.
|
||||
* L'établissement à surveiller.
|
||||
* @return void
|
||||
*/
|
||||
function getSurveillance($source, $siret){
|
||||
$assocSourceDroit = assocSourceDroit();
|
||||
$return = '';
|
||||
$notEmail = array('testreunica', 'reunicacsf');
|
||||
function getSurveillance($source, $siret)
|
||||
{
|
||||
$assocSourceDroit = assocSourceDroit();
|
||||
$return = '';
|
||||
$notEmail = array('testreunica', 'reunicacsf');
|
||||
|
||||
if (!empty($source) &&
|
||||
array_key_exists($source, $assocSourceDroit) &&
|
||||
hasPerm($assocSourceDroit[$source]) ){
|
||||
$listSurv = inSurveillance($source, $siret);
|
||||
if (hasPref('voirsurv') && $listSurv!==FALSE){
|
||||
$return = dInfoSurveillance($listSurv, $source, $siret);
|
||||
}else{
|
||||
$return = formSurveillance($source, $siret, $notEmail);
|
||||
}
|
||||
}else{
|
||||
|
||||
$listSurv = inSurveillance('', $siret);
|
||||
if (hasPref('voirsurv') && $listSurv!==FALSE){
|
||||
$return = dInfoSurveillance($listSurv, '', $siret);
|
||||
} else {
|
||||
$return = formSurveillance('', $siret, $notEmail);
|
||||
}
|
||||
}
|
||||
return $return;
|
||||
if (!empty($source) &&
|
||||
array_key_exists($source, $assocSourceDroit) &&
|
||||
hasPerm($assocSourceDroit[$source])) {
|
||||
$listSurv = inSurveillance($source, $siret);
|
||||
if (hasPref('voirsurv') && $listSurv!==false) {
|
||||
$return = dInfoSurveillance($listSurv, $source, $siret);
|
||||
} else {
|
||||
$return = formSurveillance($source, $siret, $notEmail);
|
||||
}
|
||||
} else {
|
||||
$listSurv = inSurveillance('', $siret);
|
||||
if (hasPref('voirsurv') && $listSurv!==false) {
|
||||
$return = dInfoSurveillance($listSurv, '', $siret);
|
||||
} else {
|
||||
$return = formSurveillance('', $siret, $notEmail);
|
||||
}
|
||||
}
|
||||
return $return;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -180,12 +179,15 @@ function getSurveillance($source, $siret){
|
||||
* @param string $source
|
||||
* @param string $siret
|
||||
*/
|
||||
function lienSousSurveillance($texte, $titre, $source, $siret){
|
||||
$output = '<a class="dialogsurv" href="./?page=surveillance&q=ajouter';
|
||||
$output.= '/'.$siret;
|
||||
if ( !empty($source) ) { $output.= '/'.$source; }
|
||||
$output.= '" title="'.$titre.' '.$source.'">'. $texte . '</a>';
|
||||
return $output;
|
||||
function lienSousSurveillance($texte, $titre, $source, $siret)
|
||||
{
|
||||
$output = '<a class="dialogsurv" href="./?page=surveillance&q=ajouter';
|
||||
$output.= '/'.$siret;
|
||||
if (!empty($source)) {
|
||||
$output.= '/'.$source;
|
||||
}
|
||||
$output.= '" title="'.$titre.' '.$source.'">'. $texte . '</a>';
|
||||
return $output;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -194,158 +196,153 @@ function lienSousSurveillance($texte, $titre, $source, $siret){
|
||||
* @param string $source
|
||||
* @param string $siret
|
||||
*/
|
||||
function dInfoSurveillance($listSurv, $source, $siret){
|
||||
$output = '';
|
||||
if (is_array($listSurv) && count($listSurv)>0){
|
||||
$output.= '<br/>L\'entité est ' .
|
||||
lienSousSurveillance('sous surveillance',
|
||||
'Ajouter la surveillance', $source, $siret);
|
||||
$sourceTxt = assocSourceTxt();
|
||||
$cSource = 0;
|
||||
foreach ($listSurv as $source => $info){
|
||||
$cSource++;
|
||||
$ref = $info['ref'];
|
||||
$output.= ' <u tooltip="';
|
||||
$output.= 'Ref : '.$ref;
|
||||
$date = WDate::dateT('Y-m-d', 'd/m/Y', $info['dateAjout']);
|
||||
$output.= '<br/>Date d\'ajout : '.$date;
|
||||
if ($info['dateDerEnvoi']!='0000-00-00 00:00:00'){
|
||||
$date = WDate::dateT('Y-m-d', 'd/m/Y',
|
||||
substr($info['dateDerEnvoi'],0,10));
|
||||
$output.= '<br/>Date de dernier envoi : '.$date;
|
||||
}
|
||||
$output.= '">'.$sourceTxt[$source].'</u>';
|
||||
if ($cSource<count($listSurv)) $output.= ',';
|
||||
}
|
||||
if (!empty($ref)) $output.= ' ('.$ref.')';
|
||||
$output.= ".\n";
|
||||
}
|
||||
return $output;
|
||||
function dInfoSurveillance($listSurv, $source, $siret)
|
||||
{
|
||||
$output = '';
|
||||
if (is_array($listSurv) && count($listSurv)>0) {
|
||||
$output.= '<br/>L\'entité est ' .
|
||||
lienSousSurveillance('sous surveillance',
|
||||
'Ajouter la surveillance', $source, $siret);
|
||||
$sourceTxt = assocSourceTxt();
|
||||
$cSource = 0;
|
||||
foreach ($listSurv as $source => $info) {
|
||||
$cSource++;
|
||||
$ref = $info['ref'];
|
||||
$output.= ' <u tooltip="';
|
||||
$output.= 'Ref : '.$ref;
|
||||
$wdate = new WDate;
|
||||
$date = $wdate->dateT('Y-m-d', 'd/m/Y', $info['dateAjout']);
|
||||
$output.= '<br/>Date d\'ajout : '.$date;
|
||||
if ($info['dateDerEnvoi']!='0000-00-00 00:00:00') {
|
||||
$date = $wdate->dateT('Y-m-d', 'd/m/Y',
|
||||
substr($info['dateDerEnvoi'],0,10));
|
||||
$output.= '<br/>Date de dernier envoi : '.$date;
|
||||
}
|
||||
$output.= '">'.$sourceTxt[$source].'</u>';
|
||||
if ($cSource < count($listSurv)) {
|
||||
$output.= ',';
|
||||
}
|
||||
}
|
||||
if (!empty($ref)) {
|
||||
$output.= ' ('.$ref.')';
|
||||
}
|
||||
$output.= ".\n";
|
||||
}
|
||||
return $output;
|
||||
}
|
||||
|
||||
/**
|
||||
* Vérifie si l'établissement est en surveillance
|
||||
*
|
||||
* @param string $source
|
||||
* Le type de surveillance.
|
||||
* Le type de surveillance.
|
||||
* @param string $siret
|
||||
* L'établissement surveillé.
|
||||
* L'établissement surveillé.
|
||||
* @return boolean
|
||||
* true or false
|
||||
* true or false
|
||||
*/
|
||||
function inSurveillance($source, $siret){
|
||||
global $client;
|
||||
try {
|
||||
$result = $client->getSurveillances($siret,$source);
|
||||
$survSource = $result['results']['reponses'];
|
||||
if (count($survSource)>0 ){
|
||||
$find = FALSE;
|
||||
if(strlen($siret)>9) $siret = substr($siret, 0, 9);
|
||||
if (!empty($source)){
|
||||
foreach($survSource as $item){
|
||||
if ($item['siren'] == $siret &&
|
||||
$item['source'] == $source)
|
||||
{
|
||||
$find[$item['source']] = array(
|
||||
'email' => $item['email'],
|
||||
'ref' => $item['ref'],
|
||||
'dateAjout' => $item['dateAjout'],
|
||||
'dateDerEnvoi' => $item['dateDerEnvoi'],
|
||||
);
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$find = array();
|
||||
FB::log($survSource, 'SURV');
|
||||
foreach($survSource as $item){
|
||||
if ($item['siren'] == $siret){
|
||||
$find[$item['source']] = array(
|
||||
'email' => $item['email'],
|
||||
'ref' => $item['ref'],
|
||||
'dateAjout' => $item['dateAjout'],
|
||||
'dateDerEnvoi' => $item['dateDerEnvoi'],
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
return $find;
|
||||
}else{ return false; }
|
||||
}catch(SoapFault $fault){
|
||||
return false;
|
||||
}
|
||||
function inSurveillance($source, $siret)
|
||||
{
|
||||
$ws = new WsScores();
|
||||
$reponse = $ws->getSurveillances($siret, $source);
|
||||
if ($reponse === false) {
|
||||
return false;
|
||||
}
|
||||
if (isset($reponse->result->liste->item) == false) {
|
||||
return false;
|
||||
}
|
||||
$survSource = $reponse->result->liste->item;
|
||||
if (count($survSource) > 0) {
|
||||
$find = false;
|
||||
if (strlen($siret) > 9) {
|
||||
$siret = substr($siret, 0, 9);
|
||||
}
|
||||
if (empty($source) == false) {
|
||||
foreach ($survSource as $item) {
|
||||
if ($item->siren == $siret &&
|
||||
$item->source == $source) {
|
||||
$find[$item->source] =
|
||||
array('email' => $item->email,
|
||||
'ref' => $item->ref,
|
||||
'dateAjout' => $item->dateAjout,
|
||||
'dateDerEnvoi' => $item->dateDerEnvoi);
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$find = array();
|
||||
foreach ($survSource as $item) {
|
||||
if ($item->siren == $siret) {
|
||||
$find[$item->source] =
|
||||
array('email' => $item->email,
|
||||
'ref' => $item->ref,
|
||||
'dateAjout' => $item->dateAjout,
|
||||
'dateDerEnvoi' => $item->dateDerEnvoi);
|
||||
}
|
||||
}
|
||||
}
|
||||
return $find;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Envoi la surveillance au webservice
|
||||
*
|
||||
* @param array $tabForm
|
||||
* Le type de surveillance.
|
||||
* Le type de surveillance.
|
||||
* @return mixed
|
||||
* Retourne la réponse du webservice ou false
|
||||
* Retourne la réponse du webservice ou false
|
||||
*/
|
||||
function setSurveillance($tabForm)
|
||||
{
|
||||
global $client;
|
||||
$siret = $tabForm['siret'];
|
||||
$email = $tabForm['email'];
|
||||
$ref = $tabForm['ref'];
|
||||
$source = $tabForm['source'];
|
||||
isset($tabForm['encours']) && !empty($tabForm['encours']) ?
|
||||
$encours = $tabForm['encours'] : $encours = 0;
|
||||
$siret = $tabForm['siret'];
|
||||
$email = $tabForm['email'];
|
||||
$ref = $tabForm['ref'];
|
||||
$source = $tabForm['source'];
|
||||
$encours = (empty($tabForm['encours']) == false) ? $tabForm['encours'] : 0;
|
||||
|
||||
//Vérification de l'encours (chiffres)
|
||||
if (!preg_match('/([0-9]+)/', $encours)){
|
||||
return 'Encours incorrect';
|
||||
exit;
|
||||
}
|
||||
// Vérification de l'encours (chiffres)
|
||||
if (preg_match('/([0-9]+)/', $encours) == false) {
|
||||
return 'Encours incorrect';
|
||||
exit;
|
||||
}
|
||||
|
||||
//Mise en surveillance pour une liste de sources
|
||||
if ( is_array($source) ){
|
||||
foreach ( $source as $s ){
|
||||
try {
|
||||
$result = $client->setSurveillance($siret, $email, $ref, $s,
|
||||
false, $encours);
|
||||
$result = '';
|
||||
}catch(SoapFault $fault){
|
||||
$result = false;
|
||||
}
|
||||
}
|
||||
//Mise en surveillance pour une source
|
||||
} else {
|
||||
try{
|
||||
$result = $client->setSurveillance($siret, $email, $ref, $source,
|
||||
false, $encours);
|
||||
$result = '';
|
||||
}catch (SoapFault $fault){
|
||||
$result = false;
|
||||
}
|
||||
}
|
||||
return $result;
|
||||
$ws = new WsScores();
|
||||
if (is_array($source)) {
|
||||
// Mise en surveillance pour une liste de sources
|
||||
foreach ($source as $s) {
|
||||
$reponse = $ws->setSurveillance($siret, $email, $ref,
|
||||
$s, false, $encours);
|
||||
$result = $reponse->result;
|
||||
}
|
||||
} else {
|
||||
// Mise en surveillance pour une source
|
||||
$reponse = $ws->setSurveillance($siret, $email, $ref,
|
||||
$source, false, $encours);
|
||||
$result = $reponse->result;
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Supprime la surveillance
|
||||
* @param string $siret
|
||||
* L'établissement surveillé.
|
||||
* L'établissement surveillé.
|
||||
* @param $email
|
||||
* L'email enregistré pour la surveillance
|
||||
* L'email enregistré pour la surveillance
|
||||
* @param $ref
|
||||
* La référence ajouté pour cette surveillance
|
||||
* La référence ajouté pour cette surveillance
|
||||
* @param $source
|
||||
* La source pour cette surveillance
|
||||
* La source pour cette surveillance
|
||||
* @return mixed
|
||||
* Retourne la réponse du webservice ou false
|
||||
* Retourne la réponse du webservice ou false
|
||||
*/
|
||||
function deleteSurveillance($siret, $email, $ref, $source){
|
||||
global $client;
|
||||
try{
|
||||
$result = $client->setSurveillance($siret, $email, $ref, $source, TRUE);
|
||||
return TRUE;
|
||||
}catch(SoapFault $fault){
|
||||
return FALSE;
|
||||
}
|
||||
function deleteSurveillance($siret, $email, $ref, $source)
|
||||
{
|
||||
$ws = new WsScores();
|
||||
$reponse = $ws->setSurveillance($siret, $email, $ref, $source, true);
|
||||
return $reponse->result;
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
?>
|
||||
|
@ -11,40 +11,40 @@ function defaultTriTab($tab){
|
||||
$i=0;
|
||||
$tabIndex = array();
|
||||
$listTrier = array();
|
||||
foreach($tab as $item){
|
||||
if(!array_key_exists($item['siren'], $tabIndex)){
|
||||
//Création du tableau trier
|
||||
$listTrier[$i]['siren'] = $item['siren'];
|
||||
$listTrier[$i]['nic'] = $item['nic'];
|
||||
$listTrier[$i]['rs'] = $item['rs'];
|
||||
$listTrier[$i]['cp'] = $item['cp'];
|
||||
$listTrier[$i]['ville'] = $item['ville'];
|
||||
$listTrier[$i]['sources'][$item['source']][0] = array(
|
||||
'email' => $item['email'],
|
||||
'ref' => $item['ref'],
|
||||
'dateAjout' => $item['dateAjout'],
|
||||
'dateDerEnvoi' => $item['dateDerEnvoi'],
|
||||
);
|
||||
//Tableau d'index
|
||||
$tabIndex[$item['siren']] = $i;
|
||||
}else{
|
||||
$key = $tabIndex[$item['siren']];
|
||||
$source = array(
|
||||
'email'=>$item['email'],
|
||||
'ref'=>$item['ref'],
|
||||
'dateAjout'=>$item['dateAjout'],
|
||||
'dateDerEnvoi'=> $item['dateDerEnvoi'],
|
||||
);
|
||||
if ( array_key_exists(
|
||||
$item['source'],
|
||||
$listTrier[$key]['sources'] ) ){
|
||||
$nbSource = count($listTrier[$key]['sources'][$item['source']]);
|
||||
}else{
|
||||
$nbSource = 0;
|
||||
if (count($tab)>0) {
|
||||
foreach($tab as $item) {
|
||||
if(!array_key_exists($item->siren, $tabIndex)) {
|
||||
//Création du tableau trier
|
||||
$listTrier[$i]['siren'] = $item->siren;
|
||||
$listTrier[$i]['nic'] = $item->nic;
|
||||
$listTrier[$i]['rs'] = $item->rs;
|
||||
$listTrier[$i]['cp'] = $item->cp;
|
||||
$listTrier[$i]['ville'] = $item->ville;
|
||||
$listTrier[$i]['sources'][$item->source][0] = array(
|
||||
'email' => $item->email,
|
||||
'ref' => $item->ref,
|
||||
'dateAjout' => $item->dateAjout,
|
||||
'dateDerEnvoi' => $item->dateDerEnvoi,
|
||||
);
|
||||
//Tableau d'index
|
||||
$tabIndex[$item->siren] = $i;
|
||||
} else {
|
||||
$key = $tabIndex[$item->siren];
|
||||
$source = array(
|
||||
'email' => $item->email,
|
||||
'ref' => $item->ref,
|
||||
'dateAjout' => $item->dateAjout,
|
||||
'dateDerEnvoi'=> $item->dateDerEnvoi,
|
||||
);
|
||||
if ( array_key_exists( $item->source, $listTrier[$key]['sources'] ) ){
|
||||
$nbSource = count($listTrier[$key]['sources'][$item->source]);
|
||||
}else{
|
||||
$nbSource = 0;
|
||||
}
|
||||
$listTrier[$key]['sources'][$item->source][$nbSource] = $source;
|
||||
}
|
||||
$listTrier[$key]['sources'][$item['source']][$nbSource] = $source;
|
||||
$i++;
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
return $listTrier;
|
||||
}
|
||||
@ -59,7 +59,7 @@ function defaultTriTab($tab){
|
||||
* @return array
|
||||
* Retourne le tableau trier
|
||||
*/
|
||||
function defaultTriSiren($tab, $sort = 'asc'){
|
||||
function defaultTriSiren($tab, $sort = 'asc') { FB::log($tab, 'tab');
|
||||
//Tier listsurveillance par Siren
|
||||
foreach ($tab as $key => $row) { $siren[$key] = $row['siren']; }
|
||||
array_multisort($siren, SORT_ASC, $tab);
|
||||
|
@ -1,7 +1,6 @@
|
||||
<?php
|
||||
|
||||
//Définition du tableau des permissions
|
||||
|
||||
$definePerms = array(
|
||||
'KBIS' => array( 'init' => '', 'txt' => 'Extrait RCS'),
|
||||
'ACTES' => array( 'init' => '', 'txt' => 'Pièces officielles'),
|
||||
@ -33,117 +32,126 @@ $definePerms = array(
|
||||
'BDF' => array( 'init' => '', 'txt' => 'Banque de France'),
|
||||
'MONPROFIL' => array( 'init' => '', 'txt' => 'Mon profil'),
|
||||
'EDITION' => array( 'init' => '', 'txt' => 'Mode Edition'),
|
||||
);
|
||||
);
|
||||
|
||||
/*
|
||||
* Attribut si l'utilisateur possède le droit d'accèder au service
|
||||
* @param string $name
|
||||
* Nom du droit
|
||||
* Nom du droit
|
||||
* @param array $userInfo
|
||||
* Tableau d'informations de l'utilisateur, facultatif, si pas défini alors on regarde dans la session
|
||||
* Tableau d'informations de l'utilisateur, facultatif,
|
||||
* si pas défini alors on regarde dans la session
|
||||
* @return boolean
|
||||
*/
|
||||
function hasPerm($perm, $userInfos = '')
|
||||
{
|
||||
$return = TRUE;
|
||||
if( $userInfos == '' && isset($_SESSION['tabInfo']['droits']) ){
|
||||
$userInfos = $_SESSION['tabInfo'];
|
||||
}elseif( $userInfos == '' && !isset($_SESSION['tabInfo']['droits']) ||
|
||||
!isset($userInfos['droits']) ){
|
||||
$userInfos = array( 'droits' => '' );
|
||||
}
|
||||
if ( !preg_match('/\b'.$perm.'\b/i', $userInfos['droits'])){
|
||||
$return = FALSE;
|
||||
}
|
||||
//Surcharger les droits
|
||||
if ( !overridePerm($perm) ){ $return = FALSE; }
|
||||
return $return;
|
||||
$return = true;
|
||||
if (is_object($userInfos)) { $userInfos = (array)$userInfos; }
|
||||
if( $userInfos == '' && isset($_SESSION['tabInfo']['droits']) ){
|
||||
$userInfos = $_SESSION['tabInfo'];
|
||||
}elseif( $userInfos == '' && !isset($_SESSION['tabInfo']['droits']) ||
|
||||
!isset($userInfos['droits']) ){
|
||||
$userInfos = array( 'droits' => '' );
|
||||
}
|
||||
if ( !preg_match('/\b'.$perm.'\b/i', $userInfos['droits'])){
|
||||
$return = false;
|
||||
}
|
||||
// Surcharger les droits
|
||||
require_once 'user/override.php';
|
||||
if (overridePerm($perm) == false) {
|
||||
$return = false;
|
||||
}
|
||||
return $return;
|
||||
}
|
||||
|
||||
/*
|
||||
* Vérifie les permissions sur chaque page
|
||||
* @param string $page
|
||||
* Nom de la page
|
||||
* Nom de la page
|
||||
* @param string $perm
|
||||
* Nom du droit
|
||||
* Nom du droit
|
||||
* @return boolean
|
||||
*/
|
||||
function checkPerm($page, $perm = '')
|
||||
{
|
||||
$return = TRUE;
|
||||
if($page != 'recherche') $return = hasPerm($perm);
|
||||
$return = $return && overridePermPage($page);
|
||||
return $return;
|
||||
$return = true;
|
||||
if($page != 'recherche') $return = hasPerm($perm);
|
||||
$return = $return && overridePermPage($page);
|
||||
return $return;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Retourne le code HTML pour le formulaire de modification du compte
|
||||
* @param string $name
|
||||
* Nom du droits
|
||||
* Nom du droits
|
||||
* @param array $perms
|
||||
* Tableau d'informations du droits
|
||||
* Tableau d'informations du droits
|
||||
* @return string
|
||||
*/
|
||||
function formElementPerm($userInfos){
|
||||
global $definePerms, $firephp;
|
||||
$return = '';
|
||||
FB::log($userInfos, 'userInfos');
|
||||
$listeDroits = array_key_exists('droitsClients',$userInfos) ?
|
||||
explode(' ', $userInfos['droitsClients']) : array();
|
||||
foreach($definePerms as $perm => $infos){
|
||||
if ( overridePerm($perm) && in_array(strtolower($perm), $listeDroits) )
|
||||
{
|
||||
hasPerm($perm, $userInfos) ?
|
||||
$checked = 'checked' : $checked = $infos['init'];
|
||||
global $definePerms, $firephp;
|
||||
$return = '';
|
||||
FB::log($userInfos, 'userInfos');
|
||||
if (is_object($userInfos)) { $userInfos = (array)$userInfos; }
|
||||
$listeDroits = array_key_exists('droitsClients',$userInfos) ?
|
||||
explode(' ', $userInfos['droitsClients']) : array();
|
||||
foreach($definePerms as $perm => $infos){
|
||||
if ( overridePerm($perm) && in_array(strtolower($perm), $listeDroits) )
|
||||
{
|
||||
hasPerm($perm, $userInfos) ?
|
||||
$checked = 'checked' : $checked = $infos['init'];
|
||||
|
||||
($_SESSION['tabInfo']['profil']=='Administrateur' ||
|
||||
$_SESSION['tabInfo']['profil']=='SuperAdministrateur') ?
|
||||
$disabled = '' : $disabled = 'disabled' ;
|
||||
($_SESSION['tabInfo']['profil']=='Administrateur' ||
|
||||
$_SESSION['tabInfo']['profil']=='SuperAdministrateur') ?
|
||||
$disabled = '' : $disabled = 'disabled' ;
|
||||
|
||||
$return.= '<input type="checkbox" name="frmOptions[droits][]" value="'.
|
||||
strtolower($perm).'" '.$checked.' '.$disabled.' class="noborder"/>'.
|
||||
$infos['txt'].'<br/>'."\n";
|
||||
}
|
||||
}
|
||||
return $return;
|
||||
$return.= '<input type="checkbox" name="frmOptions[droits][]"'.
|
||||
' value="'.strtolower($perm).'" '.$checked.' '.$disabled.
|
||||
' class="noborder"/>'.$infos['txt'].'<br/>'."\n";
|
||||
}
|
||||
}
|
||||
return $return;
|
||||
}
|
||||
|
||||
/*
|
||||
* Vérifie le login de l'utilisateur pour le mode edition
|
||||
* @param string $loginVu
|
||||
* Login
|
||||
* Login
|
||||
* @return boolean
|
||||
*/
|
||||
function checkModeEdition($loginVu)
|
||||
{
|
||||
$isAuthorized = FALSE;
|
||||
$authorizedUsers = array(
|
||||
'ylenaour',
|
||||
'jmartory',
|
||||
'mheitz',
|
||||
'mpurcarin',
|
||||
'mcochet',
|
||||
'jproust',
|
||||
'mricois',
|
||||
'fzicaro',
|
||||
'sbeaugrand',
|
||||
'tjactel',
|
||||
'bpanaccione');
|
||||
$isUserAuthorized = FALSE;
|
||||
foreach($authorizedUsers as $login){
|
||||
if($_SESSION['tabInfo']['login']==$login){
|
||||
$isUserAuthorized = TRUE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if ($loginVu==$_SESSION['tabInfo']['login'] && $isUserAuthorized ||
|
||||
($_SESSION['tabInfo']['idClient']==1 &&
|
||||
($_SESSION['tabInfo']['profil']=='Administrateur' ||
|
||||
$_SESSION['tabInfo']['profil']=='SuperAdministrateur') ) ){
|
||||
$isAuthorized = TRUE;
|
||||
}
|
||||
return $isAuthorized;
|
||||
$isAuthorized = false;
|
||||
$authorizedUsers =
|
||||
array('ylenaour',
|
||||
'jmartory',
|
||||
'mheitz',
|
||||
'mpurcarin',
|
||||
'mcochet',
|
||||
'jproust',
|
||||
'mricois',
|
||||
'fzicaro',
|
||||
'sbeaugrand',
|
||||
'tjactel',
|
||||
'bpanaccione');
|
||||
$isUserAuthorized = false;
|
||||
foreach ($authorizedUsers as $login) {
|
||||
if (isset($_SESSION['tabInfo']['login']) == true &&
|
||||
$_SESSION['tabInfo']['login'] == $login) {
|
||||
$isUserAuthorized = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (isset($_SESSION['tabInfo']) == true) {
|
||||
if ($loginVu==$_SESSION['tabInfo']['login'] && $isUserAuthorized ||
|
||||
($_SESSION['tabInfo']['idClient']==1 &&
|
||||
($_SESSION['tabInfo']['profil']=='Administrateur' ||
|
||||
$_SESSION['tabInfo']['profil']=='SuperAdministrateur') ) ){
|
||||
$isAuthorized = true;
|
||||
}
|
||||
}
|
||||
return $isAuthorized;
|
||||
}
|
||||
|
||||
function hasModeEdition()
|
||||
@ -151,14 +159,14 @@ function hasModeEdition()
|
||||
if (isset($_SESSION['tabInfo']) == false) {
|
||||
return false;
|
||||
}
|
||||
$userInfos = $_SESSION['tabInfo'];
|
||||
$perm = 'EDITION';
|
||||
if ($userInfos['mode_edition']==1 ||
|
||||
preg_match('/\b'.$perm.'\b/i', $userInfos['droits'])){
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
$userInfos = $_SESSION['tabInfo'];
|
||||
$perm = 'EDITION';
|
||||
if ($userInfos['mode_edition']==1 ||
|
||||
preg_match('/\b'.$perm.'\b/i', $userInfos['droits'])){
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
@ -166,13 +174,13 @@ function hasModeEdition()
|
||||
* @return string
|
||||
*/
|
||||
function formElementModeEdition(){
|
||||
if ($_SESSION['tabInfo']['mode_edition']==1){
|
||||
$strMode='checked';
|
||||
} else {
|
||||
$strMode='';
|
||||
}
|
||||
return '<input type="checkbox" name="frmOptions[mode_edition]" value="1" '.
|
||||
$strMode.' class="noborder"/>Edition';
|
||||
if ($_SESSION['tabInfo']['mode_edition']==1){
|
||||
$strMode='checked';
|
||||
} else {
|
||||
$strMode='';
|
||||
}
|
||||
return '<input type="checkbox" name="frmOptions[mode_edition]" value="1" '.
|
||||
$strMode.' class="noborder"/>Edition';
|
||||
}
|
||||
|
||||
|
||||
|
@ -1,16 +1,17 @@
|
||||
<?php
|
||||
|
||||
$definePref = array(
|
||||
'NAF4' => array( 'init' => '', 'txt' => 'Afficher les anciens NAF'),
|
||||
'NACE' => array( 'init' => '', 'txt' => 'Afficher les codes NACES'),
|
||||
'NEWS' => array( 'init' => '', 'txt' => 'Afficher les news Google©'),
|
||||
'MAPPY' => array( 'init' => '', 'txt' => 'Afficher les façades d\'immeubles'),
|
||||
'CARTES' => array( 'init' => '', 'txt' => 'Afficher les cartes et les plans'),
|
||||
'VOIRSURV' => array( 'init' => '', 'txt' => 'Afficher les entités sous surveillances'),
|
||||
);
|
||||
'NAF4' => array( 'init' => '', 'txt' => 'Afficher les anciens NAF'),
|
||||
'NACE' => array( 'init' => '', 'txt' => 'Afficher les codes NACES'),
|
||||
'NEWS' => array( 'init' => '', 'txt' => 'Afficher les news Google©'),
|
||||
'MAPPY' => array( 'init' => '', 'txt' => 'Afficher les façades d\'immeubles'),
|
||||
'CARTES' => array( 'init' => '', 'txt' => 'Afficher les cartes et les plans'),
|
||||
'VOIRSURV' => array( 'init' => '', 'txt' => 'Afficher les entités sous surveillances'),
|
||||
);
|
||||
|
||||
function hasPref($name, $userInfo = ''){
|
||||
$return = FALSE;
|
||||
if (is_object($userInfo)) { $userInfo = (array)$userInfo; }
|
||||
if($userInfo == '' && isset($_SESSION['tabInfo']['pref']) ){
|
||||
$userInfo = $_SESSION['tabInfo'];
|
||||
}elseif($userInfo == '' && !isset($_SESSION['tabInfo']['pref']) ||
|
||||
|
@ -16,7 +16,8 @@ if (($siret * 1) == 0 ||
|
||||
}
|
||||
|
||||
// Gestion des cas particuliers
|
||||
if ($page == 'dirigeants' && $_GET['vue'] == 'histo') {
|
||||
if ($page == 'dirigeants' &&
|
||||
isset($_GET['vue']) == true && $_GET['vue'] == 'histo') {
|
||||
$fileName .= '-histo';
|
||||
} else if ($page == 'annonces' && isset($_GET['idan']) == true) {
|
||||
$fileName .= '-'.$_GET['idan'];
|
||||
|
@ -13,7 +13,8 @@ if (($siret*1)==0 || ($siren*1)<100){
|
||||
}
|
||||
|
||||
//Gestion des cas particulier
|
||||
if ($page == 'dirigeants' && $_REQUEST['vue'] == 'histo'){
|
||||
if ($page == 'dirigeants' &&
|
||||
isset($_GET['vue']) == true && $_GET['vue'] == 'histo') {
|
||||
$fileName .= '-histo';
|
||||
} else if ($page == 'annonces') {
|
||||
if (isset($_REQUEST['vue']) && $$_REQUEST['vue'] != '') {
|
||||
|
@ -1,74 +1,94 @@
|
||||
<?php
|
||||
require_once '../../config/prepend.php';
|
||||
require_once 'fwk.php';
|
||||
require_once 'scoresws/WsScores.php';
|
||||
|
||||
$client = new SoapClient(null, array( 'trace' => 1,
|
||||
'soap_version' => SOAP_1_1,
|
||||
'location' => WEBSERVICE_URL,
|
||||
'uri' => WEBSERVICE_URI,
|
||||
'login' => 'ylenaour',
|
||||
'password' => 'bzh4231*',
|
||||
// 'encoding' => 'UTF-8'
|
||||
));
|
||||
$ws = new WsScores();
|
||||
$tabData = $ws->getStatsUtilisateurs(
|
||||
$_REQUEST['login'],
|
||||
$_REQUEST['mois'],
|
||||
$_REQUEST['vue'],
|
||||
$_REQUEST['payant']
|
||||
);
|
||||
|
||||
$O = $client->getStatsUtilisateurs($_REQUEST['login'], $_REQUEST['mois'], $_REQUEST['vue'], $_REQUEST['payant']);
|
||||
$tabData=$O['results'];
|
||||
FB::log($tabData, 'tabData');
|
||||
|
||||
if (isset($_REQUEST['w']) && $_REQUEST['w']<>'') $w=$_REQUEST['w'];
|
||||
else die();
|
||||
|
||||
if (isset($_REQUEST['h']) && $_REQUEST['h']<>'') $h=$_REQUEST['h'];
|
||||
else die();
|
||||
|
||||
/*if (isset($_REQUEST['d']) && $_REQUEST['d']<>'') $tabData=unserialize(urldecode($_REQUEST['d']));
|
||||
else die();
|
||||
if (isset($_REQUEST['w']) && $_REQUEST['w'] != '') {
|
||||
$w = $_REQUEST['w'];
|
||||
} else {
|
||||
die();
|
||||
}
|
||||
if (isset($_REQUEST['h']) && $_REQUEST['h'] != '') {
|
||||
$h = $_REQUEST['h'];
|
||||
} else {
|
||||
die();
|
||||
}
|
||||
/*
|
||||
if (isset($_REQUEST['d']) && $_REQUEST['d'] != '') {
|
||||
$tabData = unserialize(urldecode($_REQUEST['d']));
|
||||
} else {
|
||||
die();
|
||||
}
|
||||
*/
|
||||
|
||||
require_once("phpchartdir/phpchartdir.php");
|
||||
|
||||
# The data for the bar chart
|
||||
$labels=$data=array();
|
||||
//print_r($tabData);die();
|
||||
foreach ($tabData as $i=>$jour) {
|
||||
if ($_REQUEST['vue']=='heure') $labels[]=$jour['heures'];
|
||||
else $labels[]=substr($jour['jours'],-2);
|
||||
$data[]=$jour['nb'];
|
||||
// The data for the bar chart
|
||||
$labels = array();
|
||||
$data = array();
|
||||
foreach ($tabData as $jour) {
|
||||
$labels[] = ($_REQUEST['vue'] == 'heure') ?
|
||||
$jour->heures : substr($jour->jours, -2);
|
||||
$data[] = $jour->nb;
|
||||
}
|
||||
//$data = array(85, 156, 179.5, 211, 123);
|
||||
|
||||
# The labels for the bar chart
|
||||
// The labels for the bar chart
|
||||
//$labels = array("Mon", "Tue", "Wed", "Thu", "Fri");
|
||||
|
||||
# Create a XYChart object of size 400 x 240 pixels.
|
||||
// Create a XYChart object of size 400 x 240 pixels.
|
||||
$c = new XYChart($w, $h);
|
||||
|
||||
# Add a title to the chart using 14 pts Times Bold Italic font
|
||||
if ($_REQUEST['vue']=='heure') $c->addTitle('Accès par tranches horaires', "timesbi.ttf", 14);
|
||||
elseif (!$_REQUEST['payant']) $c->addTitle('Accès quotidiens sur le mois', "timesbi.ttf", 14);
|
||||
elseif ($_REQUEST['payant']) $c->addTitle('dont actes payants', "timesbi.ttf", 14);
|
||||
// Add a title to the chart using 14 pts Times Bold Italic font
|
||||
if ($_REQUEST['vue'] == 'heure') {
|
||||
$c->addTitle('Accès par tranches horaires', "timesbi.ttf", 14);
|
||||
} else if ($_REQUEST['payant'] == false) {
|
||||
$c->addTitle('Accès quotidiens sur le mois', "timesbi.ttf", 14);
|
||||
} else {
|
||||
$c->addTitle('dont actes payants', "timesbi.ttf", 14);
|
||||
}
|
||||
|
||||
# Set the plotarea at (45, 40) and of 300 x 160 pixels in size. Use alternating light
|
||||
# grey (f8f8f8) / white (ffffff) background.
|
||||
$c->setPlotArea(45, 40, $w*0.9, $h*0.7, 0xf8f8f8, 0xffffff);
|
||||
// Set the plotarea at (45, 40) and of 300 x 160 pixels in size.
|
||||
// Use alternating light grey (f8f8f8) / white (ffffff) background.
|
||||
$c->setPlotArea(45, 40, $w * 0.9, $h * 0.7, 0xf8f8f8, 0xffffff);
|
||||
|
||||
# Add a multi-color bar chart layer
|
||||
// Add a multi-color bar chart layer
|
||||
$layer = $c->addBarLayer3($data);
|
||||
|
||||
# Set layer to 3D with 10 pixels 3D depth
|
||||
// Set layer to 3D with 10 pixels 3D depth
|
||||
$layer->set3D(10);
|
||||
|
||||
# Set bar shape to circular (cylinder)
|
||||
if ($_REQUEST['vue']=='heure') $layer->setBarShape(SquareShape,0,0);
|
||||
else $layer->setBarShape(CircleShape);
|
||||
// Set bar shape to circular (cylinder)
|
||||
if ($_REQUEST['vue'] == 'heure') {
|
||||
$layer->setBarShape(SquareShape, 0, 0);
|
||||
} else {
|
||||
$layer->setBarShape(CircleShape);
|
||||
}
|
||||
|
||||
# Set the labels on the x axis.
|
||||
// Set the labels on the x axis.
|
||||
$c->xAxis->setLabels($labels);
|
||||
|
||||
# Add a title to the y axis
|
||||
// Add a title to the y axis
|
||||
$c->yAxis->setTitle('Nombre de requêtes');
|
||||
|
||||
# Add a title to the x axis
|
||||
if ($_REQUEST['vue']=='heure') $c->xAxis->setTitle('Heures');
|
||||
else $c->xAxis->setTitle('Jour du mois');
|
||||
// Add a title to the x axis
|
||||
if ($_REQUEST['vue'] == 'heure') {
|
||||
$c->xAxis->setTitle('Heures');
|
||||
} else {
|
||||
$c->xAxis->setTitle('Jour du mois');
|
||||
}
|
||||
|
||||
# output the chart
|
||||
// output the chart
|
||||
header("Content-type: image/png");
|
||||
print($c->makeChart2(PNG));
|
||||
?>
|
||||
?>
|
||||
|
219
www/html2pdf.php
219
www/html2pdf.php
@ -3,124 +3,115 @@ require_once '../config/prepend.php';
|
||||
require_once 'common/dates.php';
|
||||
require_once 'common/curl.php';
|
||||
|
||||
isset($_REQUEST['q'])? $nomFic = $_REQUEST['q'] : $nomFic = '';
|
||||
isset($_REQUEST['page'])? $page = $_REQUEST['page'] : $page = '';
|
||||
(isset($_REQUEST['filtre']) && $_REQUEST['filtre']!='') ? $filtre = $_REQUEST['filtre'] : $filtre = '';
|
||||
$nomFic = (isset($_REQUEST['q'])) ? $_REQUEST['q'] : '';
|
||||
$page = (isset($_REQUEST['page'])) ? $_REQUEST['page'] : '';
|
||||
$filtre = (isset($_REQUEST['filtre']) && $_REQUEST['filtre'] != '') ?
|
||||
$_REQUEST['filtre'] : '';
|
||||
|
||||
$nbAnnoncesMin = ($page-1)*100;
|
||||
$nbAnnoncesMax = $nbAnnoncesMin+100;
|
||||
$nbAnnoncesMin = ($page - 1) * 100;
|
||||
$nbAnnoncesMax = $nbAnnoncesMin + 100;
|
||||
|
||||
if($nomFic == ''){
|
||||
print 'Impossible de générer le document.';
|
||||
}else{
|
||||
if ($nomFic == '') {
|
||||
print 'Impossible de générer le document.';
|
||||
} else {
|
||||
require_once 'surveillance/survliste.php';
|
||||
$file = PATH_SITE.'/cache/survliste/'.$nomFic;
|
||||
$file2 = $file.'.bz2';
|
||||
if (!file_exists($file)) {
|
||||
// Génération du fichier
|
||||
$ws = new WsScores();
|
||||
$reponse = $ws->getListeFichierSurv($_SESSION['tabInfo']['login'],
|
||||
$_SESSION['tabInfo']['prenom'],
|
||||
$nomFic);
|
||||
$page = getUrl('http://78.31.45.206/csv/'.$nomFic.'.bz2',
|
||||
'', '', '', false);
|
||||
$body = $page['body'];
|
||||
$fp = fopen($file2, 'w');
|
||||
fwrite($fp, $body);
|
||||
fclose($fp);
|
||||
$bz = bzopen($file2, "r") or
|
||||
die("Impossible d'ouvrir le fichier $file");
|
||||
$fp = fopen($file, 'w');
|
||||
while (feof($bz) == false) {
|
||||
fwrite($fp, bzread($bz, 4096));
|
||||
}
|
||||
bzclose($bz);
|
||||
}
|
||||
|
||||
/** Déclation du client Soap auprès du webservice **/
|
||||
$client = new SoapClient(null, array(
|
||||
'trace' => 1,
|
||||
'soap_version' => SOAP_1_1,
|
||||
'location' => 'http://78.31.45.206/ws2/',
|
||||
'uri' => 'http://78.31.45.206/',
|
||||
'login' => $_SESSION['tabInfo']['login'],
|
||||
'password' => $_SESSION['tabInfo']['password']
|
||||
));
|
||||
$annonces = readann($file, $filtre);
|
||||
|
||||
require_once 'surveillance/survliste.php';
|
||||
$file = PATH_SITE.'/cache/survliste/'.$nomFic;
|
||||
$file2 = $file.'.bz2';
|
||||
if (!file_exists($file)) {
|
||||
//Génération du fichier
|
||||
try {
|
||||
$O = $client->getListeFichierSurv($_SESSION['tabInfo']['login'], $_SESSION['tabInfo']['prenom'], $nomFic);
|
||||
} catch (SoapFault $fault) {
|
||||
require_once 'soaperror.php';
|
||||
processSoapFault($client,$fault,$tabInfo);
|
||||
}
|
||||
$page = getUrl('http://78.31.45.206/csv/'.$nomFic.'.bz2', '', '', '', false);
|
||||
$body = $page['body'];
|
||||
$fp=@fopen($file2, 'w');
|
||||
@fwrite($fp, $body);
|
||||
@fclose($fp);
|
||||
$bz = bzopen($file2, "r") or die("Impossible d'ouvrir le fichier $file");
|
||||
$fp=@fopen($file, 'w');
|
||||
while (!feof($bz)) {
|
||||
@fwrite($fp, bzread($bz, 4096));
|
||||
}
|
||||
bzclose($bz);
|
||||
}
|
||||
$output = '';
|
||||
$count = 0;
|
||||
$nbAnnonces = count($annonces);
|
||||
|
||||
$annonces = readann($file, $filtre);
|
||||
if ($nbAnnonces > 0) {
|
||||
foreach ($annonces as $annonce) {
|
||||
if ($count > $nbAnnoncesMax) {
|
||||
break;
|
||||
}
|
||||
if ($count >= $nbAnnoncesMin) {
|
||||
$output .= '<page backtop="10mm" backbottom="10mm">';
|
||||
$output .= '<page_header>';
|
||||
$output .= '<table style="width:100%; border:solid 1px black;">';
|
||||
$output .= '<tr>';
|
||||
$output .= '<td style="text-align:left; width:67%">Surveillance : '.$count.'/'.$nbAnnonces.'</td>';
|
||||
$output .= '<td style="text-align:right; width:33%">'.date('d/m/Y').'</td>';
|
||||
$output .= '</tr>';
|
||||
$output .= '</table>';
|
||||
$output .= '</page_header>';
|
||||
$output .= '<table style="width:100%;">';
|
||||
$output .= '<tr>';
|
||||
$output .= '<td style="width:50%;">Entreprise : '.$annonce['RaisonSociale'].' ('.$annonce['Siren'].')</td>';
|
||||
$output .= '<td style="width:50%;"> </td>';
|
||||
$output .= '</tr>';
|
||||
$output .= '<tr>';
|
||||
$output .= '<td style="width:50%;">Site : '.$annonce['SiteCnasea'].'</td>';
|
||||
$output .= '<td style="width:50%;">Référence : '.$annonce['Ref'].'</td>';
|
||||
$output .= '</tr>';
|
||||
$output .= '<tr>';
|
||||
if (in_array($annonce['Bodacc'], array('A', 'B', 'C')) {
|
||||
$source = 'BODACC n°'.
|
||||
$annonce['Parution'].' '.
|
||||
$annonce['Bodacc'].' du '.
|
||||
$annonce['DatePar'].' '.
|
||||
$annonce['Tribunal'].'.';
|
||||
} else if ($annonce['Bodacc'] == 'G') {
|
||||
$source = 'GREFFE du '.
|
||||
$annonce['Tribunal'].' au '.$annonce['DatePar'].'.';
|
||||
} else if ($annonce['Bodacc'] == 'P') {
|
||||
$source = 'RNCS du '.
|
||||
$annonce['Tribunal'].' au '.$annonce['DatePar'].'.';
|
||||
} else {
|
||||
$source = 'Collecte SD du '.
|
||||
$annonce['Tribunal'].' au '.$annonce['DatePar'].'.';
|
||||
}
|
||||
$output .= '<td style="width:100%;" colspan="2">'.
|
||||
$source.'</td>';
|
||||
|
||||
$output = '';
|
||||
$count = 0;
|
||||
$nbAnnonces = count($annonces);
|
||||
|
||||
if($nbAnnonces>0){
|
||||
foreach($annonces as $annonce){
|
||||
if($count>$nbAnnoncesMax) break;
|
||||
if($count>=$nbAnnoncesMin)
|
||||
{
|
||||
$output.= '<page backtop="10mm" backbottom="10mm">';
|
||||
$output.= '<page_header>';
|
||||
$output.= '<table style="width:100%; border:solid 1px black;">';
|
||||
$output.= '<tr>';
|
||||
$output.= '<td style="text-align:left; width:67%">Surveillance : '.$count.'/'.$nbAnnonces.'</td>';
|
||||
$output.= '<td style="text-align:right; width:33%">'.date('d/m/Y').'</td>';
|
||||
$output.= '</tr>';
|
||||
$output.= '</table>';
|
||||
$output.= '</page_header>';
|
||||
$output.= '<table style="width:100%;">';
|
||||
$output.= '<tr>';
|
||||
$output.= '<td style="width:50%;">Entreprise : '.$annonce['RaisonSociale'].' ('.$annonce['Siren'].')</td>';
|
||||
$output.= '<td style="width:50%;"> </td>';
|
||||
$output.= '</tr>';
|
||||
$output.= '<tr>';
|
||||
$output.= '<td style="width:50%;">Site : '.$annonce['SiteCnasea'].'</td>';
|
||||
$output.= '<td style="width:50%;">Référence : '.$annonce['Ref'].'</td>';
|
||||
$output.= '</tr>';
|
||||
$output.= '<tr>';
|
||||
if ($annonce['Bodacc']=='A' || $annonce['Bodacc']=='B' || $annonce['Bodacc']=='C')
|
||||
{
|
||||
$source = 'BODACC n°'.$annonce['Parution'].' '.$annonce['Bodacc'].' du '.$annonce['DatePar'].' '.$annonce['Tribunal'].'.';
|
||||
}
|
||||
elseif ($annonce['Bodacc']=='G')
|
||||
{
|
||||
$source = 'GREFFE du '.$annonce['Tribunal'].' au '.$annonce['DatePar'].'.';
|
||||
}
|
||||
elseif ($annonce['Bodacc']=='P')
|
||||
{
|
||||
$source = 'RNCS du '.$annonce['Tribunal'].' au '.$annonce['DatePar'].'.';
|
||||
}
|
||||
else
|
||||
{
|
||||
$source = 'Collecte SD du '.$annonce['Tribunal'].' au '.$annonce['DatePar'].'.';
|
||||
}
|
||||
$output.= '<td style="width:100%;" colspan="2">'.$source.'</td>';
|
||||
|
||||
$output.= '</tr>';
|
||||
$output.= '<tr><td style="width:100%;" colspan="2"> </td></tr>';
|
||||
$output.= '<tr>';
|
||||
$output.= '<td style="width:100%;" colspan="2"><b>'.$annonce['Even'].'</b></td>';
|
||||
$output.= '</tr>';
|
||||
$output.= '<tr>';
|
||||
$output.= '<td style="width:100%;" colspan="2">'.$annonce['TexteAnn'].'</td>';
|
||||
$output.= '</tr>';
|
||||
$output.= '</table>';
|
||||
$output.= '</page>';
|
||||
}
|
||||
$count++;
|
||||
}
|
||||
}else{
|
||||
/*
|
||||
* Fermeture de la balise page lorsqu'il n'y a aucune annonce
|
||||
* afin de générer un fichier pdf vide et non pas une erreur
|
||||
*/
|
||||
$output = '</page>';
|
||||
}
|
||||
// conversion HTML => PDF
|
||||
require_once 'lib/html2pdf/html2pdf.class.php';
|
||||
$html2pdf = new HTML2PDF('P','A4','fr');
|
||||
$html2pdf->WriteHTML(utf8_decode($output));
|
||||
$html2pdf->Output(str_replace('.csv', '.pdf', $nomFic), 'D');
|
||||
$output .= '</tr>';
|
||||
$output .= '<tr><td style="width:100%;" colspan="2"> </td></tr>';
|
||||
$output .= '<tr>';
|
||||
$output .= '<td style="width:100%;" colspan="2"><b>'.$annonce['Even'].'</b></td>';
|
||||
$output .= '</tr>';
|
||||
$output .= '<tr>';
|
||||
$output .= '<td style="width:100%;" colspan="2">'.$annonce['TexteAnn'].'</td>';
|
||||
$output .= '</tr>';
|
||||
$output .= '</table>';
|
||||
$output .= '</page>';
|
||||
}
|
||||
$count++;
|
||||
}
|
||||
} else {
|
||||
/*
|
||||
* Fermeture de la balise page lorsqu'il n'y a aucune annonce
|
||||
* afin de générer un fichier pdf vide et non pas une erreur
|
||||
*/
|
||||
$output = '</page>';
|
||||
}
|
||||
// conversion HTML => PDF
|
||||
require_once 'lib/html2pdf/html2pdf.class.php';
|
||||
$html2pdf = new HTML2PDF('P', 'A4', 'fr');
|
||||
$html2pdf->WriteHTML(utf8_decode($output));
|
||||
$html2pdf->Output(str_replace('.csv', '.pdf', $nomFic), 'D');
|
||||
}
|
||||
|
||||
?>
|
||||
?>
|
||||
|
@ -47,67 +47,65 @@ function redimage($img_src,$dst_w,$dst_h) {
|
||||
*/
|
||||
function etabSession($siret, $idEntreprise = 0)
|
||||
{
|
||||
global $client;
|
||||
$compare = false;
|
||||
//Comparaison Siren / Siret
|
||||
if (isset($_SESSION['tabInfo']['entrep']) && !empty($siret) && $siret*1!=0)
|
||||
{
|
||||
if (strlen($siret)==9) {
|
||||
//Comparaison entre siren
|
||||
if ($siret==$_SESSION['tabInfo']['entrep']['siren'])
|
||||
$compare = true;
|
||||
} elseif (strlen($siret)==14) {
|
||||
//Comparaison entre siret
|
||||
if ($siret==$_SESSION['tabInfo']['entrep']['siret'])
|
||||
$compare = true;
|
||||
}
|
||||
}
|
||||
|
||||
//Comparaison id
|
||||
if (isset($_SESSION['tabInfo']['entrep']) && empty($siret) && intval($siret)==0)
|
||||
{
|
||||
if ($idEntreprise!=0 && $idEntreprise==$_SESSION['tabInfo']['entrep']['id'])
|
||||
$compare = true;
|
||||
}
|
||||
|
||||
if ( !$compare )
|
||||
{
|
||||
FB::info('etabSession - getIdentite');
|
||||
$O2 = $client->getIdentite($siret, $idEntreprise, false);
|
||||
$etab = $O2['result'];
|
||||
$tabEntrep = array();
|
||||
$tabEntrep['raisonSociale'] = $etab['Nom'];
|
||||
$tabEntrep['id'] = $etab['id'];
|
||||
$tabEntrep['siren'] = $etab['Siren'];
|
||||
$tabEntrep['siret'] = $etab['Siret'];
|
||||
$tabEntrep['siretSiege'] = $etab['SiretSiege'];
|
||||
$tabEntrep['tva'] = $etab['TvaNumero'];
|
||||
$tabEntrep['isin'] = $etab['Isin'];
|
||||
$tabEntrep['AutreId'] = $etab['AutreId'];
|
||||
$tabEntrep['active'] = array_key_exists('Statut',$etab)? $etab['Statut'] : '';
|
||||
$tabEntrep['Source'] = $etab['Source'];
|
||||
$tabEntrep['SourceId'] = $etab['SourceId'];
|
||||
$tabEntrep['codeCommune'] = $etab['Dept'].$etab['codeCommune'];
|
||||
$tabEntrep['nafEn'] = $etab['NafEnt'];
|
||||
$tabEntrep['nafEt'] = $etab['NafEtab'];
|
||||
$tabEntrep['fj'] = $etab['FJ'];
|
||||
$_SESSION['tabInfo']['entrep'] = $tabEntrep;
|
||||
$raisonSociale = $etab['Nom'];
|
||||
}
|
||||
else if (isset($_SESSION['tabInfo']['entrep']['raisonSociale']) == true)
|
||||
{
|
||||
$raisonSociale = $_SESSION['tabInfo']['entrep']['raisonSociale'];
|
||||
global $client;
|
||||
$compare = false;
|
||||
// Comparaison Siren / Siret
|
||||
if (isset($_SESSION['tabInfo']['entrep']) &&
|
||||
empty($siret) == false && $siret != 0) {
|
||||
if (strlen($siret) == 9) {
|
||||
// Comparaison entre siren
|
||||
if ($siret == $_SESSION['tabInfo']['entrep']['siren']) {
|
||||
$compare = true;
|
||||
}
|
||||
} else if (strlen($siret) == 14) {
|
||||
// Comparaison entre siret
|
||||
if ($siret == $_SESSION['tabInfo']['entrep']['siret']) {
|
||||
$compare = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$raisonSociale = '';
|
||||
|
||||
// Comparaison id
|
||||
if (isset($_SESSION['tabInfo']['entrep']) &&
|
||||
empty($siret) == true && $siret == 0) {
|
||||
if ($idEntreprise != 0 &&
|
||||
$idEntreprise == $_SESSION['tabInfo']['entrep']['id']) {
|
||||
$compare = true;
|
||||
}
|
||||
}
|
||||
|
||||
if ($compare == false) {
|
||||
require_once 'scoresws/scoresws.php';
|
||||
$etab = scoresws_identite($siret, substr($siret, 0, 9), $idEntreprise);
|
||||
$tabEntrep = array();
|
||||
$tabEntrep['raisonSociale'] = $etab->Nom;
|
||||
$tabEntrep['id'] = $etab->id;
|
||||
$tabEntrep['siren'] = $etab->Siren;
|
||||
$tabEntrep['siret'] = $etab->Siret;
|
||||
$tabEntrep['siretSiege'] = $etab->SiretSiege;
|
||||
$tabEntrep['tva'] = $etab->TvaNumero;
|
||||
$tabEntrep['isin'] = $etab->Isin;
|
||||
$tabEntrep['AutreId'] = $etab->AutreId;
|
||||
$tabEntrep['active'] =
|
||||
(isset($etab->Statut) == true) ? $etab->Statut : '';
|
||||
$tabEntrep['Source'] = $etab->Source;
|
||||
$tabEntrep['SourceId'] = $etab->SourceId;
|
||||
$tabEntrep['codeCommune'] = $etab->Dept.$etab->codeCommune;
|
||||
$tabEntrep['nafEn'] = $etab->NafEnt;
|
||||
$tabEntrep['nafEt'] = $etab->NafEtab;
|
||||
$tabEntrep['fj'] = $etab->FJ;
|
||||
$_SESSION['tabInfo']['entrep'] = $tabEntrep;
|
||||
return $etab->Nom;
|
||||
} else if (isset($_SESSION['tabInfo']['entrep']['raisonSociale'])) {
|
||||
return $_SESSION['tabInfo']['entrep']['raisonSociale'];
|
||||
} else {
|
||||
return '';
|
||||
}
|
||||
return $raisonSociale;
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------------- //
|
||||
// -------------------------------------------------------------------------- //
|
||||
// titreAvecSiren
|
||||
// --------------------------------------------------------------------------- //
|
||||
// -------------------------------------------------------------------------- //
|
||||
function titreAvecSiren($titre)
|
||||
{
|
||||
return $titre.' - Siren '.
|
||||
@ -116,9 +114,9 @@ function titreAvecSiren($titre)
|
||||
substr($_REQUEST['siret'], 6, 3);
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------------- //
|
||||
// -------------------------------------------------------------------------- //
|
||||
// implode_r
|
||||
// --------------------------------------------------------------------------- //
|
||||
// -------------------------------------------------------------------------- //
|
||||
function implode_r($glue, $pieces)
|
||||
{
|
||||
$ret = '';
|
||||
|
988
www/index.php
988
www/index.php
File diff suppressed because it is too large
Load Diff
@ -9,31 +9,37 @@ $cle_cookie = 'sdjglsdkhmsoL68';
|
||||
|
||||
// Connection Login/IP
|
||||
if (isset($_REQUEST['checkIp']) && $_REQUEST['checkIp'] == 'only') {
|
||||
if (trim($_REQUEST['login']) == '') {
|
||||
FB::info('checkIp');
|
||||
if (trim($_REQUEST['login']) == '') {
|
||||
$message = "Erreur 10300 : ".
|
||||
"Identifiant de connexion et/ou mot de passe incorrect !";
|
||||
include('./pages/logout.php');
|
||||
die();
|
||||
exit;
|
||||
}
|
||||
// Affectation login et hach
|
||||
$login = $_REQUEST['login'];
|
||||
$hach = 'iponly:'.$_SERVER['REMOTE_ADDR'];
|
||||
|
||||
// Vérification SESSION
|
||||
} else if (isset($_SESSION['connected']) && $_SESSION['connected'] == true &&
|
||||
(isset($_REQUEST['action']) == false ||
|
||||
($_REQUEST['action'] != 'logout' &&
|
||||
$_REQUEST['action'] != 'logon'))) {
|
||||
// Vérification SESSION
|
||||
|
||||
// On vérifie la validité de la session
|
||||
$tabInfo=$_SESSION['tabInfo'];
|
||||
$firephp->log($tabInfo,'tabInfo');
|
||||
$tabInfo = $_SESSION['tabInfo'];
|
||||
FB::info('Verif SESSION');
|
||||
FB::log($tabInfo,'tabInfo');
|
||||
|
||||
// Gestion du timeout de session
|
||||
if (isset($tabInfo['timeout']) && !empty($tabInfo['timeout'])){
|
||||
$timeout = $tabInfo['timeout'];
|
||||
if (isset($tabInfo['timeout']) && !empty($tabInfo['timeout'])) {
|
||||
$timeout = $tabInfo['timeout'];
|
||||
} else {
|
||||
$timeout = 1800;
|
||||
$timeout = 1800;
|
||||
}
|
||||
if (ENVIRONNEMENT == 'DEV') {
|
||||
$timeout = 36000;
|
||||
}
|
||||
if(ENVIRONNEMENT == 'DEV'){ $timeout = 36000; }
|
||||
|
||||
if ($tabInfo['date_last_action'] + $timeout < time()) {
|
||||
$message = "Vous avez été déconnecté de l'extranet".
|
||||
@ -50,100 +56,93 @@ if (isset($_REQUEST['checkIp']) && $_REQUEST['checkIp'] == 'only') {
|
||||
(isset($_REQUEST['hach']) && strstr($hach, 'iponly:') != false)) ?
|
||||
($hach = 'iponly:'.$_SERVER['REMOTE_ADDR']) :
|
||||
($hach = $_SESSION['tabInfo']['password']);
|
||||
|
||||
// Affectation Login/Pass
|
||||
} else if ($_REQUEST['action'] == 'logon' &&
|
||||
(trim($_REQUEST['login']) != '' && trim($_REQUEST['hach']) != '')) {
|
||||
FB::info('Demande CONNEXION');
|
||||
// Demande de connexion
|
||||
// Le mot de passe doit être vide
|
||||
if ($_REQUEST['pass'] != '') {
|
||||
afficheErreur('Erreur 10005 : Connexion impossible !');
|
||||
}
|
||||
//Erreur javascript
|
||||
if( !isset($_REQUEST['hach']) )
|
||||
{
|
||||
$message = "Le JavaScript semble être désactivé sur votre navigateur ".
|
||||
"Internet.<br/>Contacter votre administrateur.";
|
||||
include('./pages/logout.php');
|
||||
exit;
|
||||
if (isset($_REQUEST['hach']) == false) {
|
||||
$message = "Le JavaScript semble être désactivé sur votre navigateur ".
|
||||
"Internet.<br/>Contacter votre administrateur.";
|
||||
include('./pages/logout.php');
|
||||
exit;
|
||||
}
|
||||
|
||||
// Affectation login et hach
|
||||
$login = $_REQUEST['login'];
|
||||
$hach = $_REQUEST['hach'];
|
||||
|
||||
// Deconnexion
|
||||
} else if ($_REQUEST['action'] == 'logout') {
|
||||
// Force la déconnexion
|
||||
include('./pages/logout.php');
|
||||
die();
|
||||
exit;
|
||||
|
||||
|
||||
} else if ($page != 'main' && $_REQUEST['action'] != 'logon') {
|
||||
$message = "Vous avez été déconnecté de l'extranet".
|
||||
" suite à un délai d'inactivité trop long (2)";
|
||||
include('./pages/logout.php');
|
||||
include './pages/logout.php';
|
||||
}
|
||||
|
||||
$firephp->log($login, 'login');
|
||||
$firephp->log($hach, 'hach');
|
||||
|
||||
//Déclation du client Soap auprès du webservice
|
||||
$client = new SoapClient( null, array(
|
||||
'trace' => 1,
|
||||
'soap_version' => SOAP_1_1,
|
||||
'location' => WEBSERVICE_URL,
|
||||
'uri' => WEBSERVICE_URI,
|
||||
'login' => $login,
|
||||
'password' => $hach
|
||||
));
|
||||
|
||||
// Connexion au webservice
|
||||
if ((isset($_REQUEST['action']) && $_REQUEST['action'] == 'logon') ||
|
||||
$_SESSION['connected'] == false) {
|
||||
|
||||
FB::info('Connexion');
|
||||
|
||||
$secureLocal = md5(date('Ymd') .
|
||||
$_SERVER['REMOTE_ADDR'] .
|
||||
$_SERVER['HTTP_USER_AGENT']);
|
||||
$secureDist = $_REQUEST['secure'];
|
||||
$cookieSecure = $secureLocal.'/'.md5($cle_cookie);
|
||||
$tab = unserialize(@file_get_contents('/tmp/sd_'.$secureLocal.'.tmp'));
|
||||
|
||||
$tabIpInterdites = array(
|
||||
'81.252.88.*',
|
||||
'195.200.187.163',
|
||||
'213.11.81.41',
|
||||
'83.206.171.252',
|
||||
'81.255.32.139',
|
||||
'212.155.191.1*',
|
||||
'217.70.1*.17',
|
||||
'212.37.196.156',
|
||||
'80.245.60.121',
|
||||
'213.246.57.101',
|
||||
//'88.178.249.67',
|
||||
);
|
||||
$tabIpInterdites =
|
||||
array('81.252.88.*',
|
||||
'195.200.187.163',
|
||||
'213.11.81.41',
|
||||
'83.206.171.252',
|
||||
'81.255.32.139',
|
||||
'212.155.191.1*',
|
||||
'217.70.1*.17',
|
||||
'212.37.196.156',
|
||||
'80.245.60.121',
|
||||
'213.246.57.101',
|
||||
//'88.178.249.67',
|
||||
);
|
||||
foreach ($tabIpInterdites as $ip) {
|
||||
if (preg_match('/^'.
|
||||
str_replace('*', '.*', str_replace('.','\.',$ip)).
|
||||
str_replace('*', '.*', str_replace('.','\.', $ip)).
|
||||
'$/', $_SERVER['REMOTE_ADDR'])) {
|
||||
afficheErreur('Erreur 10105 : Connexion impossible !');
|
||||
}
|
||||
}
|
||||
|
||||
FB::log($login, 'login');
|
||||
FB::log($hach, 'hach');
|
||||
|
||||
// Récupération des infos si pas de session
|
||||
try {
|
||||
$adressIp = $_SERVER['REMOTE_ADDR'];
|
||||
$O = $client->getInfosLogin($login, $adressIp);
|
||||
$user = $O['result'];
|
||||
$adressIp = $_SERVER['REMOTE_ADDR'];
|
||||
$ws = new WsScores($login, $hach);
|
||||
$InfosLogin = $ws->getInfosLogin($login, $adressIp);
|
||||
if ($InfosLogin!=false)
|
||||
{
|
||||
$user = $InfosLogin->result;
|
||||
$firephp->log($user,'result');
|
||||
if ($user['connected'] == true) {
|
||||
if ($user->connected == true) {
|
||||
$tabInfo['login'] = $login;
|
||||
$tabInfo['password'] = $hach;
|
||||
$tabInfo['email'] = $user['email'];
|
||||
$tabInfo['email'] = $user->email;
|
||||
$tabInfo['ip'] = $adressIp;
|
||||
$tabInfo['host'] = gethostbyaddr($tabInfo['ip']);
|
||||
if (isset($_REQUEST['resolution'])) {
|
||||
$tabInfo['resolution'] = $_REQUEST['resolution'];
|
||||
} else {
|
||||
$tabInfo['resolution'] = '1280*800'; // Duplique' de index.php
|
||||
}
|
||||
if (isset($_REQUEST['nbcolors'])) {
|
||||
$tabInfo['nbcolors'] = $_REQUEST['nbcolors'];
|
||||
} else {
|
||||
$tabInfo['nbcolors'] = 16; // Duplique' de index.php
|
||||
}
|
||||
$tabInfo['host'] = gethostbyaddr($adressIp);
|
||||
$tabInfo['resolution'] = '1280*800';
|
||||
$tabInfo['nbcolors'] = 16;
|
||||
$tabInfo['user_agent'] = $tab['client_ua'];
|
||||
$tabInfo['referer1'] = $tab['client_referer'];
|
||||
$tabInfo['referer2'] = $_SERVER['HTTP_REFERER'];
|
||||
@ -151,19 +150,25 @@ if ((isset($_REQUEST['action']) && $_REQUEST['action'] == 'logon') ||
|
||||
$tabInfo['date_page_www'] = $tab['client_connexion'];
|
||||
$tabInfo['date_login'] = time();
|
||||
$tabInfo['date_last_action'] = time();
|
||||
$tabInfo['nbReponses'] = $user['nbReponses'];
|
||||
$tabInfo['nbReponses'] = $user->nbReponses;
|
||||
$tabInfo['cookie_client'] = md5('login'.$cookieSecure);
|
||||
require_once('../includes/user/permissions.php');
|
||||
if (checkModeEdition($login) == true) {
|
||||
$tabInfo['international_giant'] = 1;
|
||||
} else {
|
||||
$tabInfo['international_giant'] = 0;
|
||||
}
|
||||
$tabInfo['mode_edition'] = 0;
|
||||
$tabInfo['profil'] = $user['profil'];
|
||||
$tabInfo['pref'] = $user['pref'];
|
||||
$tabInfo['droits'] = $user['droits'];
|
||||
$tabInfo['nom'] = $user['nom'];
|
||||
$tabInfo['prenom'] = $user['prenom'];
|
||||
$tabInfo['id'] = $user['id'];
|
||||
$tabInfo['idClient'] = $user['idClient'];
|
||||
$tabInfo['reference'] = $user['reference'];
|
||||
$tabInfo['typeScore'] = $user['typeScore'];
|
||||
$tabInfo['timeout'] = $user['timeout'];
|
||||
$tabInfo['profil'] = $user->profil;
|
||||
$tabInfo['pref'] = $user->pref;
|
||||
$tabInfo['droits'] = $user->droits;
|
||||
$tabInfo['nom'] = $user->nom;
|
||||
$tabInfo['prenom'] = $user->prenom;
|
||||
$tabInfo['id'] = $user->id;
|
||||
$tabInfo['idClient'] = $user->idClient;
|
||||
$tabInfo['reference'] = $user->reference;
|
||||
$tabInfo['typeScore'] = $user->typeScore;
|
||||
$tabInfo['timeout'] = $user->timeout;
|
||||
|
||||
$_SESSION['connected'] = true;
|
||||
$_SESSION['tabInfo'] = $tabInfo;
|
||||
@ -178,90 +183,72 @@ if ((isset($_REQUEST['action']) && $_REQUEST['action'] == 'logon') ||
|
||||
$tabInfo['user_agent'],
|
||||
$tabInfo['referer1'],
|
||||
gmdate('Y/m/d H:i:s',
|
||||
$tabInfo['date_login']+3600),
|
||||
$tabInfo['date_login'] + 3600),
|
||||
gmdate('Y/m/d H:i:s',
|
||||
$tabInfo['date_last_action']+3600),
|
||||
implode(', ',$_REQUEST)
|
||||
);
|
||||
$tabInfo['date_last_action'] + 3600),
|
||||
implode(', ', $_REQUEST));
|
||||
} else if ($InfosLogin->error->errnum != 0) {
|
||||
// Erreur renvoyé par le webservice
|
||||
$message = 'Erreur '.
|
||||
$InfosLogin->error->errnum.' : '.
|
||||
$InfosLogin->error->errmsg;
|
||||
|
||||
if ($InfosLogin->error->errnum == '10301' && $login == 'rsipdll') {
|
||||
$message .= '<br/>Pour tout problème technique, '.
|
||||
'contactez le service support par téléphone au'.
|
||||
' 01.48.00.04.52 ou par mail à'.
|
||||
' <a href="mailto:support@scores-decisions.com">'.
|
||||
'support@scores-decisions.com</a>';
|
||||
}
|
||||
include('./pages/logout.php');
|
||||
logAction($tabInfo['login'],
|
||||
$page,
|
||||
$_REQUEST['siret'],
|
||||
$tabInfo['ip'],
|
||||
$tabInfo['host'],
|
||||
$tabInfo['resolution'],
|
||||
$tabInfo['nbcolors'],
|
||||
$tabInfo['user_agent'],
|
||||
$tabInfo['referer1'],
|
||||
gmdate('Y/m/d H:i:s', $tabInfo['date_login'] + 3600),
|
||||
gmdate('Y/m/d H:i:s',
|
||||
$tabInfo['date_last_action'] + 3600),
|
||||
implode(', ', $_REQUEST));
|
||||
die();
|
||||
} else {
|
||||
$message = "Erreur 10302 : ".
|
||||
"Identifiant de connexion et/ou mot de passe incorrect !";
|
||||
include('./pages/logout.php');
|
||||
logAction($tabInfo['login'],
|
||||
$page,
|
||||
$_REQUEST['siret'],
|
||||
$tabInfo['ip'],
|
||||
$tabInfo['host'],
|
||||
$tabInfo['resolution'],
|
||||
$tabInfo['nbcolors'],
|
||||
$tabInfo['user_agent'],
|
||||
$tabInfo['referer1'],
|
||||
gmdate('Y/m/d H:i:s', $tabInfo['date_login'] + 3600),
|
||||
gmdate('Y/m/d H:i:s',
|
||||
$tabInfo['date_last_action'] + 3600),
|
||||
implode(', ', $_REQUEST));
|
||||
exit;
|
||||
}
|
||||
//Erreur lors de l'identification
|
||||
} else {
|
||||
|
||||
$message = "Erreur 10301 : ".
|
||||
"Identifiant de connexion et/ou mot de passe incorrect !";
|
||||
|
||||
if ($login == 'rsipdll') {
|
||||
$message.= '<br/>Pour tout problème technique, '.
|
||||
'contactez le service support par téléphone au 01.48.00.04.52 '.
|
||||
'ou par mail à <a href="mailto:support@scores-decisions.com">'.
|
||||
'support@scores-decisions.com</a>';
|
||||
}
|
||||
//Erreur renvoyé par le webservice
|
||||
elseif ($O['error']['errnum']!=0)
|
||||
{
|
||||
$message = 'Erreur '.
|
||||
$O['error']['errnum'] .' : '.
|
||||
$O['error']['errmsg'];
|
||||
|
||||
if($O['error']['errnum']=='10301' && $login=='rsipdll')
|
||||
{
|
||||
$message.= '<br/>Pour tout problème technique, '.
|
||||
'contactez le service support par téléphone au 01.48.00.04.52 '.
|
||||
'ou par mail à <a href="mailto:support@scores-decisions.com">'.
|
||||
'support@scores-decisions.com</a>';
|
||||
}
|
||||
include('./pages/logout.php');
|
||||
logAction(
|
||||
$tabInfo['login'],
|
||||
$page,
|
||||
$_REQUEST['siret'],
|
||||
$tabInfo['ip'],
|
||||
$tabInfo['host'],
|
||||
$tabInfo['resolution'],
|
||||
$tabInfo['nbcolors'],
|
||||
$tabInfo['user_agent'],
|
||||
$tabInfo['referer1'],
|
||||
gmdate('Y/m/d H:i:s',$tabInfo['date_login']+3600),
|
||||
gmdate('Y/m/d H:i:s',$tabInfo['date_last_action']+3600),
|
||||
implode(', ',$_REQUEST)
|
||||
);
|
||||
die();
|
||||
}
|
||||
else
|
||||
{
|
||||
$message="Erreur 10302 : ".
|
||||
"Identifiant de connexion et/ou mot de passe incorrect !";
|
||||
include('./pages/logout.php');
|
||||
logAction(
|
||||
$tabInfo['login'],
|
||||
$page,
|
||||
$_REQUEST['siret'],
|
||||
$tabInfo['ip'],
|
||||
$tabInfo['host'],
|
||||
$tabInfo['resolution'],
|
||||
$tabInfo['nbcolors'],
|
||||
$tabInfo['user_agent'],
|
||||
$tabInfo['referer1'],
|
||||
gmdate('Y/m/d H:i:s',$tabInfo['date_login']+3600),
|
||||
gmdate('Y/m/d H:i:s',$tabInfo['date_last_action']+3600),
|
||||
implode(', ',$_REQUEST)
|
||||
);
|
||||
die();
|
||||
}
|
||||
}
|
||||
//Erreur SOAP
|
||||
catch (SoapFault $fault)
|
||||
{
|
||||
//maintenanceMode(true);
|
||||
|
||||
if($fault->faultcode!='900')
|
||||
{
|
||||
require_once 'soaperror.php';
|
||||
processSoapFault($client,$fault,$tabInfo);
|
||||
}
|
||||
|
||||
$message = "Erreur 10301 : ".
|
||||
"Identifiant de connexion et/ou mot de passe incorrect !";
|
||||
|
||||
if($login=='rsipdll')
|
||||
{
|
||||
$message.= '<br/>Pour tout problème technique, '.
|
||||
'contactez le service support par téléphone au 01.48.00.04.52 '.
|
||||
'ou par mail à <a href="mailto:support@scores-decisions.com">'.
|
||||
'support@scores-decisions.com</a>';
|
||||
}
|
||||
|
||||
include('./pages/logout.php');
|
||||
die();
|
||||
}
|
||||
include('./pages/logout.php');
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
@ -2,47 +2,28 @@
|
||||
require_once '../config/prepend.php';
|
||||
require_once 'index.fct.php';
|
||||
require_once 'fwk.php';
|
||||
require_once 'scoresws/WsScores.php';
|
||||
require_once 'index_auth.php';
|
||||
require_once 'user/user.php';
|
||||
|
||||
if (!hasPerm('portefeuille')){
|
||||
echo "Vous n'avez pas les permissions nécessaire !";
|
||||
exit;
|
||||
if (hasPerm('portefeuille') == false) {
|
||||
print "Vous n'avez pas les permissions nécessaire !";
|
||||
exit;
|
||||
}
|
||||
|
||||
$client = new SoapClient(null,
|
||||
array(
|
||||
'trace' => 1,
|
||||
'soap_version' => SOAP_1_1,
|
||||
'location' => 'http://78.31.45.206/ws2/',
|
||||
'uri' => 'http://78.31.45.206/',
|
||||
'login' => $_SESSION['tabInfo']['login'],
|
||||
'password' => $_SESSION['tabInfo']['password']
|
||||
)
|
||||
);
|
||||
|
||||
$login = $_SESSION['tabInfo']['login'];
|
||||
$login = $_SESSION['tabInfo']['login'];
|
||||
$idClient = $_SESSION['tabInfo']['idClient'];
|
||||
try {
|
||||
$res = $client->getPortefeuilleCsv($login, $idClient);
|
||||
}
|
||||
catch (SoapFault $fault)
|
||||
{
|
||||
echo "Erreur";
|
||||
exit;
|
||||
}
|
||||
$url = '';
|
||||
if (isset($res['result']['Url']) == true) {
|
||||
$url = $res['result']['Url'];
|
||||
}
|
||||
FB::log($url,'URL');
|
||||
//On arrete tout, il y a eu un problème
|
||||
if (empty($url)){
|
||||
echo 'La construction du fichier à échoué !';
|
||||
exit;
|
||||
|
||||
$ws = new WsScores();
|
||||
$reponse = $ws->getPortefeuilleCsv($login, $idClient);
|
||||
$url = $reponse->result->Url;
|
||||
if (empty($url)) {
|
||||
// On arrete tout, il y a eu un problème
|
||||
print 'La construction du fichier à échoué !';
|
||||
exit;
|
||||
}
|
||||
|
||||
//Récupération du fichier
|
||||
// Récupération du fichier
|
||||
require_once 'common/curl.php';
|
||||
$path = PATH_SITE.'/cache/portefeuille/';
|
||||
|
||||
@ -51,52 +32,50 @@ $tableau = explode('/', $url);
|
||||
$file = $tableau[sizeof($tableau) - 1];
|
||||
|
||||
// Suppression du fichier si le temps de cache est depasse
|
||||
if (file_exists($path.$file)){
|
||||
$dateFile = filemtime($path.$file);
|
||||
if (file_exists($path.$file)) {
|
||||
$dateFile = filemtime($path.$file);
|
||||
$now = mktime(date('G'), date('i'), date('s'),
|
||||
date('m') , date('d'), date('Y'));
|
||||
$maxTime = mktime(date('G',$dateFile)+1, date('i',$dateFile),
|
||||
date('s',$dateFile), date('m',$dateFile),
|
||||
date('d',$dateFile), date('Y',$dateFile));
|
||||
if (in_array(ENVIRONNEMENT, array('REC','DEV')) || $maxTime-$now<0) {
|
||||
unlink($path.$file);
|
||||
}
|
||||
date('m') , date('d'), date('Y'));
|
||||
$maxTime =
|
||||
mktime(date('G', $dateFile) + 1, date('i', $dateFile),
|
||||
date('s', $dateFile), date('m', $dateFile),
|
||||
date('d', $dateFile), date('Y', $dateFile));
|
||||
if (in_array(ENVIRONNEMENT, array('REC', 'DEV')) || $maxTime - $now < 0) {
|
||||
unlink($path.$file);
|
||||
}
|
||||
}
|
||||
|
||||
// Recuperation du fichier sur le serveur
|
||||
if (!file_exists($path.$file)) {
|
||||
// On check si le fichier est present sur l'url
|
||||
// On check si le fichier est present sur l'url
|
||||
$url_tab = getUrl($url, '', '', '', false);
|
||||
if ($url_tab['code'] == 408 ||
|
||||
$url_tab['code'] == 400 ||
|
||||
$url_tab['code'] == 400 ||
|
||||
$url_tab['code'] == 404) {
|
||||
// Fichier non disponible
|
||||
} else {
|
||||
// Ecriture du fichier sur le serveur en local
|
||||
} else {
|
||||
// Ecriture du fichier sur le serveur en local
|
||||
$body = $url_tab['body'];
|
||||
$fp = fopen($path.$file, 'w');
|
||||
fwrite($fp, $body);
|
||||
fclose($fp);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Le fichier existe sur l'extranet
|
||||
$content_type = 'application/csv-tab-delimited-table';
|
||||
if (file_exists($path.$file)) {
|
||||
if (filesize($path.$file) > 0) {
|
||||
header('Content-Transfer-Encoding: none');
|
||||
header('Content-type: ' . $content_type.'');
|
||||
header('Content-Length: ' . filesize($path.$file));
|
||||
header('Content-MD5: ' . base64_encode(md5_file($path.$file)));
|
||||
header('Content-Disposition: filename="' . basename($path.$file) . '"');
|
||||
header('Cache-Control: private, max-age=0, must-revalidate');
|
||||
header('Pragma: public');
|
||||
ini_set('zlib.output_compression', '0');
|
||||
echo file_get_contents($path.$file);
|
||||
} else {
|
||||
echo 'Fichier vide.';
|
||||
}
|
||||
if (filesize($path.$file) > 0) {
|
||||
header('Content-Transfer-Encoding: none');
|
||||
header('Content-type: '.$content_type.'');
|
||||
header('Content-Length: '.filesize($path.$file));
|
||||
header('Content-MD5: '.base64_encode(md5_file($path.$file)));
|
||||
header('Content-Disposition: filename="'.basename($path.$file).'"');
|
||||
header('Cache-Control: private, max-age=0, must-revalidate');
|
||||
header('Pragma: public');
|
||||
ini_set('zlib.output_compression', '0');
|
||||
print file_get_contents($path.$file);
|
||||
} else {
|
||||
print 'Fichier vide.';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
// --------------------------------------------------------------------------- //
|
||||
// -------------------------------------------------------------------------- //
|
||||
// telechargement.js
|
||||
// --------------------------------------------------------------------------- //
|
||||
// -------------------------------------------------------------------------- //
|
||||
$(document).ready(function(){
|
||||
// Récupération du fichier de surveillance
|
||||
var holdTheInterval;
|
||||
@ -15,9 +15,9 @@ $(document).ready(function(){
|
||||
var argv;
|
||||
|
||||
$('#telechargementjs').click(function(e) {
|
||||
e.preventDefault();
|
||||
postUrl = $(this).attr('href');
|
||||
if ($('select[name=telechargementjsMenu]').val() == 'invalide') {
|
||||
e.preventDefault();
|
||||
postUrl = $(this).attr('href');
|
||||
if ($('select[name=telechargementjsMenu]').val() == 'invalide') {
|
||||
$('#telechargementjsMsg').
|
||||
html('Vous devez sélectionner une période.');
|
||||
return;
|
||||
@ -67,7 +67,7 @@ $(document).ready(function(){
|
||||
updateInfo('Erreur');
|
||||
}
|
||||
} else {
|
||||
updateInfo(data);
|
||||
updateInfo(data);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -76,7 +76,7 @@ $(document).ready(function(){
|
||||
}
|
||||
|
||||
function updateInfo(data) {
|
||||
$('#telechargementjsMsg').html(data);
|
||||
$('#telechargementjsMsg').html(data);
|
||||
clearInterval(holdTheInterval);
|
||||
$('select[name=telechargementjsMenu]').removeAttr('disabled');
|
||||
$('input[name=telechargementjsCase]:checkbox').
|
||||
|
@ -8,8 +8,8 @@ if (isset($_REQUEST['login']) &&
|
||||
{
|
||||
$url =
|
||||
'http://'.$_SERVER['SERVER_NAME'].'/'.
|
||||
'?page=main&lang=fr&secure=8f66c76ce72b8f45dadfe49fd5db90e0'.
|
||||
'&action=logon&login='.$_REQUEST['login'].'&pass='.$_REQUEST['pass'].
|
||||
'?page=main&lang=fr'.'&action=logon'.
|
||||
'&login='.$_REQUEST['login'].'&pass='.$_REQUEST['pass'].
|
||||
'&hach='.$_REQUEST['hach'];
|
||||
header('Location: '.$url);
|
||||
exit;
|
||||
|
@ -20,15 +20,11 @@
|
||||
* French translation: Serge François, serge@selfhtml.org, http://fr.selfhtml.org
|
||||
*/
|
||||
|
||||
|
||||
|
||||
function array(n) {
|
||||
for(i=0;i<n;i++) this[i]=0;
|
||||
this.length=n;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* Quelques fonctions fondamentales doivent être transformées à cause
|
||||
* d'erreurs Javascript.
|
||||
* Essayez par exemple de calculer 0xffffffff >> 4 ...
|
||||
|
@ -1,48 +1,37 @@
|
||||
<?php
|
||||
if (isset($_REQUEST['action']) && $_REQUEST['action']=='delete') {
|
||||
$message = 'Erreur lors de la suppression du compte utilisateur !';
|
||||
try {
|
||||
$tabOptions = array('delete'=>true);
|
||||
$O = $client->setInfosLogin($_REQUEST['login'], $tabOptions);
|
||||
//action=delete&login=bpanaccione&idUti=3
|
||||
if ($O['result']==1){
|
||||
$message='Compte "'.$_REQUEST['login'].'" supprimé !';
|
||||
}
|
||||
} catch (SoapFault $fault) {
|
||||
$message = 'Erreur SOAP lors de la suppression du compte utilisateur !';
|
||||
}
|
||||
} elseif (isset($_REQUEST['action']) && $_REQUEST['action']=='activate') {
|
||||
$message = 'Erreur lors de l\'activation du compte utilisateur !';
|
||||
try {
|
||||
$tabOptions = array('actif'=>true);
|
||||
$O = $client->setInfosLogin($_REQUEST['login'], $tabOptions);
|
||||
if ($O['result']==1){
|
||||
$message = 'Compte "'.$_REQUEST['login'].'" activé !';
|
||||
}
|
||||
} catch (SoapFault $fault) {
|
||||
$message = 'Erreur SOAP lors de l\'activation du compte utilisateur !';
|
||||
}
|
||||
} elseif (isset($_REQUEST['action']) && $_REQUEST['action']=='unactivate') {
|
||||
$message = 'Erreur lors de la désactivation du compte utilisateur !';
|
||||
try {
|
||||
$tabOptions = array('actif'=>false);
|
||||
$O = $client->setInfosLogin($_REQUEST['login'], $tabOptions);
|
||||
if ($O['result']==1){
|
||||
$message = 'Compte "'.$_REQUEST['login'].'" désactivé !';
|
||||
}
|
||||
} catch (SoapFault $fault) {
|
||||
$message = 'Erreur SOAP lors de la désactivation du compte utilisateur !';
|
||||
}
|
||||
if (isset($_REQUEST['action']) == true) {
|
||||
if ($_REQUEST['action'] == 'delete') {
|
||||
$ws = new WsScores();
|
||||
$reponse = $ws->setInfosLogin($_REQUEST['login'], 'delete');
|
||||
if ($reponse->result) {
|
||||
$message = 'Compte "'.$_REQUEST['login'].'" supprimé !';
|
||||
} else {
|
||||
$message = 'Erreur lors de la suppression du compte utilisateur !';
|
||||
}
|
||||
} else if ($_REQUEST['action'] == 'activate') {
|
||||
$ws = new WsScores();
|
||||
$reponse = $ws->setInfosLogin($_REQUEST['login'], 'actif');
|
||||
if ($reponse->result) {
|
||||
$message = 'Compte "'.$_REQUEST['login'].'" activé !';
|
||||
} else {
|
||||
$message = 'Erreur lors de l\'activation du compte utilisateur !';
|
||||
}
|
||||
} else if ($_REQUEST['action'] == 'unactivate') {
|
||||
$ws = new WsScores();
|
||||
$reponse = $ws->setInfosLogin($_REQUEST['login'], 'desactif');
|
||||
if ($reponse->result) {
|
||||
$message = 'Compte "'.$_REQUEST['login'].'" désactivé !';
|
||||
} else {
|
||||
$message =
|
||||
'Erreur lors de la désactivation du compte utilisateur !';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/** Utilisation du WS **/
|
||||
try {
|
||||
$O = $client->getListeUtilisateurs($_SESSION['tabInfo']['login']);
|
||||
$utilisateurs = $O['results'];
|
||||
} catch (SoapFault $fault) {
|
||||
require_once 'soaperror.php';
|
||||
processSoapFault($client,$fault,$tabInfo);
|
||||
die();
|
||||
//Liste des utilisateurs - SuperAdministrateur
|
||||
$idClient = $_SESSION['tabInfo']['idClient'];
|
||||
if (isset($_REQUEST['idClient']) && !empty($_REQUEST['idClient']) &&
|
||||
$_SESSION['tabInfo']['profil'] == 'SuperAdministrateur'){
|
||||
$idClient = $_REQUEST['idClient'];
|
||||
}
|
||||
?>
|
||||
|
||||
@ -51,18 +40,78 @@ try {
|
||||
#utilisateur tr.titre td { background-color: #D9EEF1; font-weight:bold; }
|
||||
#utilisateur tr.border td { border:1px dashed #939393; padding:5px; margin:0;}
|
||||
</style>
|
||||
<script language="Javascript">
|
||||
<?php
|
||||
$hrefDelete = '/?page=administration&idEntreprise='.$idEntreprise.
|
||||
'&siret='.$siret.'&action=delete';
|
||||
$hrefActive = '/?page=administration&idEntreprise='.$idEntreprise.
|
||||
'&siret='.$siret.'&action=activate';
|
||||
$hrefDesactive = '/?page=administration&idEntreprise='.$idEntreprise.
|
||||
'&siret='.$siret.'&action=unactivate';
|
||||
$hrefEdit = '/?page=moncompte&idEntreprise='.$idEntreprise.
|
||||
'&siret='.$siret.'&action=edit';
|
||||
?>
|
||||
function computeLien(href, objet){
|
||||
var id = objet.attr('id');
|
||||
var login = objet.attr('login');
|
||||
var idClient = objet.attr('idClient');
|
||||
href = href+'&login='+login+'&idUti='+id;
|
||||
if (idClient!=''){
|
||||
href = href+'&idClient='+idClient;
|
||||
}
|
||||
return href;
|
||||
}
|
||||
|
||||
$(document).ready(function(){
|
||||
$('.edit').live('click', function(){
|
||||
var href = computeLien('<?php echo $hrefEdit?>', $(this));
|
||||
document.location.href=href;
|
||||
});
|
||||
$('.delete').live('click', function(){
|
||||
var href = computeLien('<?php echo $hrefDelete?>', $(this));
|
||||
var login = $(this).attr('login');
|
||||
if (confirm('Voulez-vous supprimer le compte de '+login)) {
|
||||
document.location.href=href;
|
||||
}
|
||||
});
|
||||
$('.active').live('click', function(){
|
||||
var href = computeLien('<?php echo $hrefActive?>', $(this));
|
||||
var login = $(this).attr('login');
|
||||
if (confirm('Voulez-vous activer le compte de '+login)) {
|
||||
document.location.href=href;
|
||||
}
|
||||
});
|
||||
$('.desactive').live('click', function(){
|
||||
var href = computeLien('<?php echo $hrefDesactive?>', $(this));
|
||||
var login = $(this).attr('login');
|
||||
if (confirm('Voulez-vous désactiver le compte de '+login)) {
|
||||
document.location.href=href;
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<div id="center">
|
||||
<h1>ADMINISTRATION</h1>
|
||||
<?php
|
||||
// --------------------------------------------------------------------------- //
|
||||
// Relevé de consommation complet
|
||||
// --------------------------------------------------------------------------- //
|
||||
?>
|
||||
<?php if ($_SESSION['tabInfo']['profil'] == 'SuperAdministrateur') { ?>
|
||||
<h2>Gestion des clients</h2>
|
||||
<table>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td>
|
||||
<a href="./?page=administration_client&action=listeclient">Liste des clients</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td><a href="./?page=administration_client&action=client">
|
||||
Création d'un nouveau client</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
<?php } ?>
|
||||
<h2>Relevé de consommation complet</h2>
|
||||
|
||||
<?php
|
||||
if ($_SESSION['tabInfo']['profil'] == 'SuperAdministrateur'){
|
||||
if ($_SESSION['tabInfo']['profil'] == 'SuperAdministrateur') {
|
||||
?>
|
||||
<label title="Renvoi les logs de tous les clients. Avec le détails le téléchargement peut être long.">
|
||||
Tous les clients</label>
|
||||
@ -86,83 +135,97 @@ Tous les clients</label>
|
||||
<a href="./?page=telechargement" id="telechargementjs">Ok</a>
|
||||
<div id="telechargementjsMsg" class="infoData last"></div>
|
||||
|
||||
<?php
|
||||
// --------------------------------------------------------------------------- //
|
||||
// Liste des profils utilisateurs
|
||||
// --------------------------------------------------------------------------- //
|
||||
?>
|
||||
<h2>Liste des profils utilisateurs</h2>
|
||||
<div class="blockh2">
|
||||
<table id="utilisateur" >
|
||||
<?php
|
||||
if(isset($message) && $message!='')
|
||||
{
|
||||
?>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td colspan="5" class="StyleInfoData" align="center"><h3><?=$message;?></h3></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<tr class="border titre">
|
||||
<td class="StyleInfoLib">Login</td>
|
||||
<td class="StyleInfoLib">Actions</td>
|
||||
<td class="StyleInfoLib">Actif</td>
|
||||
<td class="StyleInfoLib">Informations</td>
|
||||
<td class="StyleInfoLib">Référence</td>
|
||||
</tr>
|
||||
<?php
|
||||
foreach ($utilisateurs as $uti)
|
||||
{
|
||||
?>
|
||||
<tr class="border">
|
||||
<td class="StyleInfoData"><?=$uti['login']?></td>
|
||||
<td align="center" valign="middle">
|
||||
<a href="/?page=moncompte&idEntreprise=<?=$idEntreprise?>&siret=<?=$siret?>&login=<?=$uti['login']?>&idUti=<?=$uti['idUti']?>&referer=administration">
|
||||
<img src="/img/edit0.gif" title="Editer le profil utilisateur" width="16" height="16"/>
|
||||
</a>
|
||||
<a href="Javascript:if (confirm('Voulez-vous supprimer le compte de <?=$uti['login']?>')){document.location.href='/?page=administration&idEntreprise=<?=$idEntreprise?>&siret=<?=$siret?>&action=delete&login=<?=$uti['login']?>&idUti=<?=$uti['idUti']?>'}">
|
||||
<img src="/img/delete.gif" title="Supprimer le profil utilisateur" width="11" height="11"/></a>
|
||||
</td>
|
||||
<td class="StyleInfoData"><?
|
||||
if ($uti['actif']==1) { ?><a href="Javascript:if (confirm('Voulez-vous désactiver le compte de <?=$uti['login']?>')){document.location.href='/?page=administration&idEntreprise=<?=$idEntreprise?>&siret=<?=$siret?>&action=unactivate&login=<?=$uti['login']?>&idUti=<?=$uti['idUti']?>'}" title="Désactiver le profil utilisateur"><u><font color="green">Oui</font></u></a><? }
|
||||
else { ?><a href="Javascript:if (confirm('Voulez-vous activer le compte de <?=$uti['login']?>')) {document.location.href='/?page=administration&idEntreprise=<?=$idEntreprise?>&siret=<?=$siret?>&action=activate&login=<?=$uti['login']?>&idUti=<?=$uti['idUti']?>'}" title="Activer le profil utilisateur"><u><font color="red" >Non</font></u></a><? } ?></td>
|
||||
<td class="StyleInfoData">
|
||||
<?=$uti['nom']?> <?=$uti['prenom']?> <br/>
|
||||
<a href="mailto:<?=$uti['email']?>"><?=str_replace(';','<br/>',$uti['email'])?></a>
|
||||
</td>
|
||||
<td class="StyleInfoData"><?=$uti['reference']?></td>
|
||||
<?php
|
||||
if (isset($message) && $message != '') {
|
||||
?>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td colspan="5" class="StyleInfoData" align="center">
|
||||
<h3><?php echo $message?></h3>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<tr class="border titre">
|
||||
<td class="StyleInfoLib">Login</td>
|
||||
<td class="StyleInfoLib">Actions</td>
|
||||
<td class="StyleInfoLib">Actif</td>
|
||||
<td class="StyleInfoLib">Informations</td>
|
||||
<td class="StyleInfoLib">Référence</td>
|
||||
</tr>
|
||||
<?php
|
||||
$ws = new WsScores();
|
||||
$reponse = $ws->getListeUtilisateurs($_SESSION['tabInfo']['login'], $idClient);
|
||||
$utilisateurs = $reponse->result->item;
|
||||
$arrayOfUtilisateurs = array();
|
||||
if(!is_array($utilisateurs)) {
|
||||
$arrayOfUtilisateurs[] = $utilisateurs;
|
||||
} else {
|
||||
$arrayOfUtilisateurs = $utilisateurs;
|
||||
}
|
||||
if (count($arrayOfUtilisateurs)>0){
|
||||
foreach ($arrayOfUtilisateurs as $uti) {
|
||||
$lienParams = ' login="'.$uti->login.'" id="'.$uti->idUti.'"';
|
||||
if ($idClient!=-1) { $lienParams.= ' idClient="'.$idClient.'"'; }
|
||||
?>
|
||||
<tr class="border">
|
||||
<td class="StyleInfoData"><?php echo $uti->login;?></td>
|
||||
<td align="center" valign="middle">
|
||||
<a href="#" class="edit" <?php echo $lienParams?>>
|
||||
<img src="/img/edit0.gif" title="Editer le profil utilisateur"
|
||||
width="16" height="16"/>
|
||||
</a>
|
||||
<a href="#" class="delete" <?php echo $lienParams?>>
|
||||
<img src="/img/delete.gif" title="Supprimer le profil utilisateur"
|
||||
width="11" height="11"/>
|
||||
</a>
|
||||
</td>
|
||||
<td class="StyleInfoData">
|
||||
<?php
|
||||
if ($uti->actif == 1) {
|
||||
?>
|
||||
<a href="#" class="desactive" title="Désactiver le profil utilisateur"
|
||||
<?php echo $lienParams?>>
|
||||
<u><font color="green">Oui</font></u>
|
||||
</a>
|
||||
<?php
|
||||
} else {
|
||||
?>
|
||||
<a href="#" class="active" title="Activer le profil utilisateur"
|
||||
<?php echo $lienParams?>>
|
||||
<u><font color="red">Non</font></u>
|
||||
</a>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
<td class="StyleInfoData">
|
||||
<?php echo $uti->nom.' '.$uti->prenom?><br/>
|
||||
<a href="mailto:<?php echo $uti->email?>">
|
||||
<?php echo str_replace(', ', '<br/>', $uti->email);?>
|
||||
</a>
|
||||
</td>
|
||||
<td class="StyleInfoData"><?php echo $uti->reference?></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
<tr><td colspan="5"> </td></tr>
|
||||
<tr>
|
||||
<td colspan="5" align="center">
|
||||
<form name="form_admin" action="./?page=moncompte&action=new&referer=administration" method="post">
|
||||
<input type="submit" value="Créer un profil utilisateur" />
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td colspan="5"> </td></tr>
|
||||
<tr>
|
||||
<td colspan="5" align="center">
|
||||
<form name="form_admin"
|
||||
action="./?page=moncompte&action=new&referer=administration"
|
||||
method="post">
|
||||
<input type="submit" value="Créer un profil utilisateur"/>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<?php
|
||||
if($_SESSION['tabInfo']['profil']=='SuperAdministrateur')
|
||||
{
|
||||
?>
|
||||
<h2>Gestion des clients</h2>
|
||||
<table>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td><a href="./index.php?page=administration_client">Liste des clients</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td><a href="./index.php?page=administration_client&action=newclient">Création d'un nouveau client</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -3,12 +3,8 @@ if(isset($_REQUEST['action']))
|
||||
{
|
||||
switch($_REQUEST['action'])
|
||||
{
|
||||
case 'newclient':
|
||||
require_once 'client/nouveau.php';
|
||||
|
||||
break;
|
||||
case 'newuser':
|
||||
|
||||
case 'client':
|
||||
require_once 'client/client.php';
|
||||
break;
|
||||
case 'listeclient':
|
||||
default:
|
||||
|
@ -1,330 +1,272 @@
|
||||
<?php
|
||||
if (!page_checkParams()) die('Paramètres incorrects !');
|
||||
if (!page_checkParams()) {
|
||||
die('Paramètres incorrects !');
|
||||
}
|
||||
|
||||
require_once 'cache/cache.php';
|
||||
require_once 'partenaires/classMTva.php';
|
||||
require_once 'partenaires/classMMap.php';
|
||||
require_once 'partenaires/classMCoface.php';
|
||||
require_once 'common/dates.php';
|
||||
require_once 'scoresws/scoresws.php';
|
||||
require_once 'annonces/annonces.php';
|
||||
require_once 'common/dates.php';
|
||||
$wdate = new WDate;
|
||||
|
||||
if (isset($_REQUEST['idan'])) {
|
||||
$idan = $_REQUEST['idan'];
|
||||
} else {
|
||||
$idan = false;
|
||||
}
|
||||
$vue = (isset($_GET['vue'])) ? $_GET['vue'] : '';
|
||||
$message='';
|
||||
$idan = (isset($_REQUEST['idan']) == true) ? $_REQUEST['idan'] : false;
|
||||
$vue = (isset($_GET['vue']) == true) ? $_GET['vue'] : '';
|
||||
|
||||
//Récupération des infos du webservice
|
||||
$annonces = scoresws_annonces($siret, $siren, $idEntreprise, $vue, $idan);
|
||||
FB::log($annonces, 'annonces');
|
||||
$objAnnonces = new Annonces($annonces);
|
||||
?>
|
||||
|
||||
<div id="center">
|
||||
<h1 class="titre">ANNONCES LÉGALES</h1>
|
||||
<table>
|
||||
<?php
|
||||
if ($message<>'') {
|
||||
?>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="550" colspan="3" class="StyleInfoData">
|
||||
<h3><?=$message;?></h3>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="200" colspan="2" class="StyleInfoLib">
|
||||
Numéro identifiant Siren
|
||||
</td>
|
||||
<td width="350" class="StyleInfoData">
|
||||
<?=substr($siren,0,3).' '.substr($siren,3,3).' '.substr($siren,6,3)?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="200" colspan="2" class="StyleInfoLib">
|
||||
Raison Sociale
|
||||
</td>
|
||||
<td width="350" class="StyleInfoData">
|
||||
<?=$raisonSociale?>
|
||||
<?php
|
||||
if(hasModeEdition())
|
||||
{
|
||||
?>
|
||||
<a href="./?page=saisie&siret=<?=$siret?>&idEntreprise=<?=$idEntreprise?>">
|
||||
(Edition)
|
||||
</a>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="200" colspan="2" class="StyleInfoLib">
|
||||
Numéro identifiant Siren
|
||||
</td>
|
||||
<td width="350" class="StyleInfoData">
|
||||
<?php
|
||||
print substr($siren, 0, 3).' '.
|
||||
substr($siren, 3, 3).' '.
|
||||
substr($siren, 6, 3);
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="200" colspan="2" class="StyleInfoLib">Raison Sociale</td>
|
||||
<td width="350" class="StyleInfoData">
|
||||
<?php
|
||||
print $raisonSociale;
|
||||
if (hasModeEdition() == true) {
|
||||
print '<a href="./?page=saisie&siret='.$siret.
|
||||
'&idEntreprise='.$idEntreprise.'">(Edition)</a>';
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<?php
|
||||
if ($idan && in_array($vue, array('bodacc', 'abod', 'balo', 'asso', 'bomp')))
|
||||
{
|
||||
//Présélection des annonces
|
||||
if ($idan && in_array($vue, array('bodacc', 'abod', 'balo', 'asso', 'bomp'))) {
|
||||
// Présélection des annonces
|
||||
foreach ($annonces->liste->item as $ann) {
|
||||
if ($ann->id == $idan) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
foreach($annonces as $ann){
|
||||
if($ann['id']==$idan)
|
||||
break;
|
||||
}
|
||||
FB::log($ann, 'ann');
|
||||
// BALO
|
||||
if ($vue=='balo')
|
||||
{
|
||||
?>
|
||||
<h2>BALO</h2>
|
||||
<table>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="550" colspan="3" class="StyleInfoData">
|
||||
BALO n°<?=$ann['BodaccNum']?> du <?=WDate::dateT('Y-m-d','d/m/Y',$ann['DateParution'])?>.
|
||||
Entré n°<?=$ann['NumAnnonce']?>.
|
||||
Entrée en base S&D : <?=WDate::dateT('Y-m-d','d/m/Y',$ann['dateInsertionSD'])?>.
|
||||
<br/>
|
||||
<a href="/?page=annonces&siret=<?=$siret?>&idEntreprise=<?=$idEntreprise?>&idan=<?=$_REQUEST['idan']?>&vue=balo&mode=pdf" target="_blank">
|
||||
Cliquez ici pour voir cette annonce au format PDF (<?=adapteOCtets(@filesize(PATH_DATA.'/jo/balo/'.WDate::dateT('Y-m-d','Y',$ann['DateParution']).'/'. $ann['Lien_Annonce_Pdf']))?>)
|
||||
</a>
|
||||
.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="550" colspan="3" class="StyleInfoLib"><b><?=$ann['Categorie']?></b></td>
|
||||
</tr>
|
||||
<tr>
|
||||
</table>
|
||||
<?php
|
||||
$ann['texteAnnonce']=utf8_decode($ann['texteAnnonce']);
|
||||
}
|
||||
elseif ($vue=='bodacc' || $vue=='abod')
|
||||
{
|
||||
?>
|
||||
<h2>ÉVÉNEMENTS LÉGAUX</h2>
|
||||
<table>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="550" colspan="3" class="StyleInfoData">
|
||||
<?php
|
||||
$tabSource=explode('-', $ann['BodaccCode']);
|
||||
$source=$tabSource[0];
|
||||
$idSource=@$tabSource[1];
|
||||
if ($source[0] == 'B') {
|
||||
$logo = 'img/logo_jo.png';
|
||||
if ($ann['BodaccNum']==0){
|
||||
$libelle = 'Source BODACC '.substr($ann['BodaccCode'],-1).
|
||||
' du '.WDate::dateT('Y-m-d','d/m/Y',$ann['DateParution']);
|
||||
} else {
|
||||
$libelle = 'Source BODACC n°'.$ann['BodaccNum'].' '.
|
||||
substr($ann['BodaccCode'],-1).
|
||||
' du '.WDate::dateT('Y-m-d','d/m/Y',$ann['DateParution']).
|
||||
'. Département n°'.$ann['Departement'].
|
||||
'. <a href="/?page=competences&siret='.$siret.
|
||||
'&type=tri">'.$ann['Tribunal'].'</a>';
|
||||
}
|
||||
}elseif ($source[0] == 'G' || $source[0] == 'T'){
|
||||
$logo = './img/logo_greffe.png';
|
||||
$libelle = 'Source Greffe du Tribunal';
|
||||
|
||||
}elseif ($source[0] == 'P'){
|
||||
$logo = './img/logo_inpi.png';
|
||||
$libelle = 'Source Registre National du Commerce';
|
||||
}else{
|
||||
$logo = './img/logo_jal.png';
|
||||
$libelle = '';
|
||||
if( hasModeEdition() &&
|
||||
(substr($source,0,2)=='JT' || $source=='ANTE') ){
|
||||
$libelle = '<b>Source TESSI</b> - ';
|
||||
}
|
||||
$libelle.= 'Source Journal Annonces Légales';
|
||||
}
|
||||
if ($ann['dateInsertionSD'] <> '') {
|
||||
$libelle.= ' - Entrée en base : ';
|
||||
$date = new WDate;
|
||||
$libelle.= $date->dateT('Y-m-d', 'd/m/Y', $ann['dateInsertionSD']);
|
||||
}
|
||||
$edition = '';
|
||||
if ( hasModeEdition() ){
|
||||
$edition.= ' <a class="annonceEdit" href="/?page=saisieajax&q=annonces/editDialog/'.
|
||||
$idan.'/'.$siret.'" title="Edition annonce">'.
|
||||
'<img src="./img/interface/editer.png"/></a>';
|
||||
$edition.= ' <a class="annonceDelete" href="/?page=saisieajax&q=annonces/deleteDialog/'.
|
||||
$idan.'/'.$siret.'"'.' title="Suppression annonce">'.
|
||||
'<img src="./img/interface/supprimer.png"/></a>';
|
||||
$edition.= ' <a class="annonceCopy" href="/?page=saisieajax&q=annonces/copyDialog/'.
|
||||
$idan.'/'.$siret.'"'.' title="Dupliquer sur autre Siren ">'.
|
||||
'<img src="./img/save_copy.png"/></a>';
|
||||
$edition.= '<script type="text/javascript" src="js/jquery.form.js"></script>';
|
||||
$edition.= '<script type="text/javascript" src="js/annonces.js"></script>';
|
||||
}
|
||||
?>
|
||||
<?='<img src="'.$logo.'" />'?> <?=$libelle?> <?=$edition?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<?php
|
||||
}
|
||||
elseif ($vue=='asso')
|
||||
{
|
||||
?>
|
||||
<h2>Associations</h2>
|
||||
<table>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="550" colspan="3" class="StyleInfoData">
|
||||
J.O. ASSOCIATION n°<?=$ann['BodaccNum']?> du <?=WDate::dateT('Y-m-d','d/m/Y',$ann['DateParution'])?>.
|
||||
Annonce n°<?=$ann['NumAnnonce']?>.
|
||||
Entrée en base S&D : <?=WDate::dateT('Y-m-d','d/m/Y',$ann['dateInsertionSD'])?>.
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<?php
|
||||
}
|
||||
elseif ($vue=='bomp')
|
||||
{
|
||||
?>
|
||||
<h2>Marchés publics</h2>
|
||||
<table>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="550" colspan="3" class="StyleInfoData">
|
||||
<?php
|
||||
$libelle = 'Annonce n°'.$ann['NumAnnonce'] . '. ' .
|
||||
'Source ' . $ann['BodaccCode'] . ' ' .
|
||||
'n°' . ($ann['BodaccNum']*1) . ' ' .
|
||||
' du '.WDate::dateT('Y-m-d','d/m/Y',$ann['DateParution']).
|
||||
'. Département n°'.$ann['Departement'].'.';
|
||||
echo $libelle;
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<table>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="550" colspan="3" class="StyleInfoLib">
|
||||
<b>
|
||||
<?php
|
||||
foreach (@$ann['evenements'] as $i=>$even) { echo @$even['LibEven'].'<br/>'; }
|
||||
?>
|
||||
</b>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="4"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<?php
|
||||
/**Affichage du texte de l'annonce**/
|
||||
$texte=preg_replace_callback("/((?:[0-9]{9,9})|(?:[0-9]{3,3} [0-9]{3,3} [0-9]{3,3})|(?:[0-9]{3,3}\.[0-9]{3,3}\.[0-9]{3,3})|(?:[0-9]{3,3}-[0-9]{3,3}-[0-9]{3,3}))/", 'replace_siren', $ann['texteAnnonce']);
|
||||
?>
|
||||
<td width="550" colspan="3"><code><?=$texte?></code></td>
|
||||
</tr>
|
||||
<tr><td colspan="4"> </td></tr>
|
||||
<tr>
|
||||
<td colspan="4" align="center" class="StyleInfoData">
|
||||
<?php
|
||||
$source = $_SESSION['tabInfo']['entrep']['Source'];
|
||||
$sourceId = $_SESSION['tabInfo']['entrep']['SourceId'];
|
||||
?>
|
||||
<a href="./?page=annonces&siret=<?=$siret?>
|
||||
&idEntreprise=<?=$idEntreprise?>
|
||||
&source=<?=$source?>
|
||||
<?=($siret*1==0) ? '&idan='.$sourceId : '';?>
|
||||
">
|
||||
Revenir à la liste des annonces
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<?php
|
||||
}
|
||||
elseif (count($annonces) > 0)
|
||||
{
|
||||
$typeAnnonces = array(
|
||||
'Bodacc' => 'EVÉNEMENTS LÉGAUX',
|
||||
'Balo' => 'BALO',
|
||||
'Bomp' => 'Marchés publics',
|
||||
'Asso' => 'Associations',
|
||||
);
|
||||
|
||||
foreach ($typeAnnonces as $type => $titre)
|
||||
{
|
||||
$classType = 'annonces'.$type;
|
||||
if (count($objAnnonces->$classType)>0)
|
||||
{
|
||||
?>
|
||||
<h2><?=$titre?></h2>
|
||||
<table>
|
||||
<?php
|
||||
foreach($objAnnonces->$classType as $i => $ann)
|
||||
{
|
||||
$resume = $objAnnonces->getAnnonceResume($ann);
|
||||
?>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="140" class="StyleInfoLib">
|
||||
<span id="annoncesDate">Le <?=$resume['date']?> </span>
|
||||
<span id="annoncesImg"><?=$resume['logo']?></span>
|
||||
</td>
|
||||
<td width="450" colspan="2" class="StyleInfoData">
|
||||
<a href="/?page=annonces&siret=<?=$siret?>&idEntreprise=<?=$idEntreprise?>&<?=$resume['href']?>">
|
||||
<?=$resume['lib']?>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</table>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/** Aucune annonce bodacc pour cette entreprise **/
|
||||
// BALO
|
||||
if ($vue == 'balo') {
|
||||
?>
|
||||
<h2>Evénements légaux</h2>
|
||||
|
||||
<h2>BALO</h2>
|
||||
<table>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="550" colspan="3" class="StyleInfoData">
|
||||
<?php
|
||||
print 'BALO n°'.$ann->BodaccNum.
|
||||
' du '.$wdate->dateT('Y-m-d', 'd/m/Y', $ann->DateParution).
|
||||
'Entré n°'.$ann->NumAnnonce.
|
||||
'Entrée en base S&D : '.
|
||||
$wdate->dateT('Y-m-d', 'd/m/Y', $ann->dateInsertionSD);
|
||||
print '<br/>';
|
||||
print '<a href="/?page=annonces&siret='.$siret.
|
||||
'&idEntreprise='.$idEntreprise.'&idan='.$_REQUEST['idan'].
|
||||
'&vue=balo&mode=pdf" target="_blank">';
|
||||
print 'Cliquez ici pour voir cette annonce au format PDF ('.
|
||||
adapteOCtets(filesize(PATH_DATA.'/jo/balo/'.
|
||||
$wdate->dateT('Y-m-d', 'Y', $ann->DateParution).
|
||||
'/'. $ann->Lien_Annonce_Pdf)).')';
|
||||
print '</a>';
|
||||
?>
|
||||
.
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="550" colspan="3" class="StyleInfoLib"><b>
|
||||
<?=$ann['Categorie']?></b></td>
|
||||
</tr>
|
||||
<tr>
|
||||
</table>
|
||||
|
||||
<?php
|
||||
$ann['texteAnnonce'] = utf8_decode($ann['texteAnnonce']);
|
||||
} else if ($vue == 'bodacc' || $vue == 'abod') {
|
||||
?>
|
||||
|
||||
<h2>ÉVÉNEMENTS LÉGAUX</h2>
|
||||
<table>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="100" class="StyleInfoLib"> </td>
|
||||
<td width="450" colspan="2" class="StyleInfoData">Néant</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="4"> </td>
|
||||
<td width="30"> </td>
|
||||
<td width="550" colspan="3" class="StyleInfoData">
|
||||
<?php
|
||||
$tabSource = explode('-', $ann->BodaccCode);
|
||||
$source = $tabSource[0];
|
||||
if ($source[0] == 'B') {
|
||||
$logo = 'img/logo_jo.png';
|
||||
if ($ann->BodaccNum == 0) {
|
||||
$libelle = 'Source BODACC '.substr($ann->BodaccCode, -1).
|
||||
' du '.$wdate->dateT('Y-m-d', 'd/m/Y', $ann->DateParution);
|
||||
} else {
|
||||
$libelle = 'Source BODACC n°'.$ann->BodaccNum.' '.
|
||||
substr($ann->BodaccCode, -1).
|
||||
' du '.$wdate->dateT('Y-m-d', 'd/m/Y', $ann->DateParution).
|
||||
'. Département n°'.$ann->Departement.
|
||||
'. <a href="/?page=competences&siret='.$siret.
|
||||
'&type=tri">'.$ann->Tribunal.'</a>';
|
||||
}
|
||||
} else if ($source[0] == 'G' || $source[0] == 'T') {
|
||||
$logo = './img/logo_greffe.png';
|
||||
$libelle = 'Source Greffe du Tribunal';
|
||||
|
||||
} else if ($source[0] == 'P') {
|
||||
$logo = './img/logo_inpi.png';
|
||||
$libelle = 'Source Registre National du Commerce';
|
||||
} else {
|
||||
$logo = './img/logo_jal.png';
|
||||
$libelle = '';
|
||||
if (hasModeEdition() && substr($source, 0, 2) == 'JT') {
|
||||
$libelle = '<b>Source TESSI</b> - ';
|
||||
}
|
||||
$libelle .= 'Source Journal Annonces Légales';
|
||||
}
|
||||
if ($ann->dateInsertionSD != '') {
|
||||
$libelle .= ' - Entrée en base : ';
|
||||
$libelle .= $wdate->dateT('Y-m-d', 'd/m/Y', $ann->dateInsertionSD);
|
||||
}
|
||||
print '<img src="'.$logo.'" />'.$libelle.' ';
|
||||
if (hasModeEdition()) {
|
||||
print ' <a class="annonceEdit"'.
|
||||
' href="/?page=saisieajax&q=annonces/editDialog/'.
|
||||
$idan.'/'.$siret.'" title="Edition annonce">'.
|
||||
'<img src="./img/interface/editer.png"/></a>';
|
||||
print ' <a class="annonceDelete"'.
|
||||
' href="/?page=saisieajax&q=annonces/deleteDialog/'.
|
||||
$idan.'/'.$siret.'"'.' title="Suppression annonce">'.
|
||||
'<img src="./img/interface/supprimer.png"/></a>';
|
||||
print ' <a class="annonceCopy"'.
|
||||
' href="/?page=saisieajax&q=annonces/copyDialog/'.
|
||||
$idan.'/'.$siret.'"'.' title="Dupliquer sur autre Siren ">'.
|
||||
'<img src="./img/save_copy.png"/></a>';
|
||||
print '<script type="text/javascript"'.
|
||||
' src="js/jquery.form.js"></script>';
|
||||
print '<script type="text/javascript"'.
|
||||
' src="js/annonces.js"></script>';
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<?php
|
||||
} else if ($vue == 'asso') {
|
||||
?>
|
||||
|
||||
<h2>Associations</h2>
|
||||
<table>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="550" colspan="3" class="StyleInfoData">
|
||||
<?php
|
||||
print 'J.O. ASSOCIATION n°'.$ann->BodaccNum.' du '.
|
||||
$wdate->dateT('Y-m-d', 'd/m/Y', $ann->DateParution).'.';
|
||||
print 'Annonce n°'.$ann->NumAnnonce.'.';
|
||||
print 'Entrée en base S&D : '.
|
||||
$wdate->dateT('Y-m-d', 'd/m/Y', $ann->dateInsertionSD).'.';
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<?php
|
||||
} else if ($vue == 'bomp') {
|
||||
?>
|
||||
|
||||
<h2>Marchés publics</h2>
|
||||
<table>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="550" colspan="3" class="StyleInfoData">
|
||||
<?php
|
||||
print 'Annonce n°'.$ann->NumAnnonce.'. '.
|
||||
'Source '.$ann->BodaccCode.' '.
|
||||
'n°' . (intval($ann->BodaccNum)) . ' ' .
|
||||
' du '.$wdate->dateT('Y-m-d', 'd/m/Y', $ann->DateParution).
|
||||
'. Département n°'.$ann->Departement.'.';
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
require_once 'export/genexport.php';
|
||||
<table>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="550" colspan="3" class="StyleInfoLib">
|
||||
<b>
|
||||
<?php
|
||||
foreach ($ann->evenements->item as $even) {
|
||||
print $even->LibEven.'<br/>';
|
||||
}
|
||||
?>
|
||||
</b>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="4"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<?php
|
||||
// Affichage du texte de l'annonce
|
||||
$texte = preg_replace_callback(
|
||||
'/((?:[0-9]{9,9})|(?:[0-9]{3,3} [0-9]{3,3} [0-9]{3,3})|'.
|
||||
'(?:[0-9]{3,3}\.[0-9]{3,3}\.[0-9]{3,3})|'.
|
||||
'(?:[0-9]{3,3}-[0-9]{3,3}-[0-9]{3,3}))/',
|
||||
'replace_siren', $ann->texteAnnonce);
|
||||
?>
|
||||
<td width="550" colspan="3"><code><?=$texte?></code></td>
|
||||
</tr>
|
||||
<tr><td colspan="4"> </td></tr>
|
||||
<tr>
|
||||
<td colspan="4" align="center" class="StyleInfoData">
|
||||
<?php
|
||||
$source = $_SESSION['tabInfo']['entrep']['Source'];
|
||||
$sourceId = $_SESSION['tabInfo']['entrep']['SourceId'];
|
||||
print '<a href="./?page=annonces&siret='.$siret.
|
||||
'&idEntreprise='.$idEntreprise.
|
||||
'&source='.$source;
|
||||
if ($siret == 0) {
|
||||
print '&idan='.$sourceId;
|
||||
}
|
||||
print '">Revenir à la liste des annonces</a>';
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<?php
|
||||
} else {
|
||||
afficheListeAnnonces($annonces, $siret, $idEntreprise);
|
||||
}
|
||||
|
||||
// Surveillance
|
||||
if (!$idan)
|
||||
{
|
||||
if ($idan == false) {
|
||||
?>
|
||||
<table>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td colspan="3" width="550" class="StyleInfoData">
|
||||
<a class="dialogsurv" href=""></a>
|
||||
<?php
|
||||
require_once 'surveillance/surveillance.php';
|
||||
echo getSurveillance('annonces', $siret);
|
||||
?>
|
||||
</td>
|
||||
<td width="30"> </td>
|
||||
<td colspan="3" width="550" class="StyleInfoData">
|
||||
<a class="dialogsurv" href=""></a>
|
||||
<?php
|
||||
require_once 'surveillance/surveillance.php';
|
||||
print getSurveillance('annonces', $siret);
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<?php
|
||||
@ -332,10 +274,14 @@ if (!$idan)
|
||||
?>
|
||||
|
||||
<p class="confidentiel blockh2">
|
||||
<?php
|
||||
require_once 'cgu/cgu.php';
|
||||
echo afficheCgu();
|
||||
?>
|
||||
<?php
|
||||
require_once 'cgu/cgu.php';
|
||||
print afficheCgu();
|
||||
?>
|
||||
</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
require_once 'export/genexport.php';
|
||||
|
||||
|
@ -1,8 +1,7 @@
|
||||
<?php
|
||||
|
||||
//Attente requête auprès du site AVIS INSEE
|
||||
// Attente requête auprès du site AVIS INSEE
|
||||
define('AVIS_TIMEOUT', 10);
|
||||
//Délai après erreur
|
||||
// Délai après erreur
|
||||
define('AVIS_RETRY_DELAY', 300);
|
||||
define('AVIS_FICHIER_ERREUR', PATH_DATA.'/log/aviserreur.lock');
|
||||
|
||||
@ -11,99 +10,91 @@ $siret = $_REQUEST['siret'];
|
||||
|
||||
function avis_erreurcpt($action)
|
||||
{
|
||||
switch($action){
|
||||
case 'plus':
|
||||
if (file_exists(AVIS_FICHIER_ERREUR)){
|
||||
$handle = fopen(AVIS_FICHIER_ERREUR, 'r');
|
||||
$data = fgetcsv($handle, '1000', ';');
|
||||
$date_creation = $data[0];
|
||||
$date_modification = time();
|
||||
$nb = $data[2];
|
||||
fclose($handle);
|
||||
} else {
|
||||
$date_creation = time();
|
||||
$date_modification = time();
|
||||
$nb = 0;
|
||||
}
|
||||
$nb++;
|
||||
$handle = fopen(AVIS_FICHIER_ERREUR, 'w');
|
||||
fputcsv($handle, array($date_creation, $date_modification, $nb), ';');
|
||||
fclose($handle);
|
||||
break;
|
||||
case 'raz':
|
||||
$handle = fopen(AVIS_FICHIER_ERREUR, 'w');
|
||||
$date_creation = time();
|
||||
$date_modification = time();
|
||||
$nb = 0;
|
||||
fputcsv($handle, array($date_creation, $date_modification, $nb), ';');
|
||||
fclose($handle);
|
||||
break;
|
||||
}
|
||||
switch($action) {
|
||||
case 'plus':
|
||||
if (file_exists(AVIS_FICHIER_ERREUR)) {
|
||||
$handle = fopen(AVIS_FICHIER_ERREUR, 'r');
|
||||
$data = fgetcsv($handle, '1000', ';');
|
||||
$date_creation = $data[0];
|
||||
$date_modification = time();
|
||||
$nb = $data[2];
|
||||
fclose($handle);
|
||||
} else {
|
||||
$date_creation = time();
|
||||
$date_modification = time();
|
||||
$nb = 0;
|
||||
}
|
||||
$nb++;
|
||||
$handle = fopen(AVIS_FICHIER_ERREUR, 'w');
|
||||
fputcsv($handle, array($date_creation, $date_modification, $nb), ';');
|
||||
fclose($handle);
|
||||
break;
|
||||
case 'raz':
|
||||
$handle = fopen(AVIS_FICHIER_ERREUR, 'w');
|
||||
$date_creation = time();
|
||||
$date_modification = time();
|
||||
$nb = 0;
|
||||
fputcsv($handle, array($date_creation, $date_modification, $nb), ';');
|
||||
fclose($handle);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
function avis_nberreur()
|
||||
{
|
||||
if (file_exists(AVIS_FICHIER_ERREUR)){
|
||||
$handle = fopen(AVIS_FICHIER_ERREUR, 'r');
|
||||
$data = fgetcsv($handle, '1000', ';');
|
||||
$nb = $data[2];
|
||||
fclose($handle);
|
||||
} else {
|
||||
$nb = 1;
|
||||
}
|
||||
return $nb;
|
||||
if (file_exists(AVIS_FICHIER_ERREUR)) {
|
||||
$handle = fopen(AVIS_FICHIER_ERREUR, 'r');
|
||||
$data = fgetcsv($handle, '1000', ';');
|
||||
$nb = $data[2];
|
||||
fclose($handle);
|
||||
} else {
|
||||
$nb = 1;
|
||||
}
|
||||
return $nb;
|
||||
}
|
||||
|
||||
function avis_erreur()
|
||||
{
|
||||
if (file_exists(AVIS_FICHIER_ERREUR))
|
||||
{
|
||||
$handle = fopen(AVIS_FICHIER_ERREUR, 'r');
|
||||
$data = fgetcsv($handle, '1000', ';');
|
||||
$date_creation = $data[0];
|
||||
$date_modification = $data[1];
|
||||
$nb = $data[2];
|
||||
fclose($handle);
|
||||
} else {
|
||||
$date_creation = 0;
|
||||
$date_modification = 0;
|
||||
}
|
||||
if ($nb>0 && $date_modification<$date_creation+AVIS_RETRY_DELAY){
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
if (file_exists(AVIS_FICHIER_ERREUR)) {
|
||||
$handle = fopen(AVIS_FICHIER_ERREUR, 'r');
|
||||
$data = fgetcsv($handle, '1000', ';');
|
||||
$date_creation = $data[0];
|
||||
$date_modification = $data[1];
|
||||
$nb = $data[2];
|
||||
fclose($handle);
|
||||
} else {
|
||||
$date_creation = 0;
|
||||
$date_modification = 0;
|
||||
}
|
||||
if ($nb > 0 && $date_modification < $date_creation + AVIS_RETRY_DELAY) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
function avis_erreurmsg(){
|
||||
//Affichage message d'erreur
|
||||
echo '<h3>Le site partenaire n\'a pas répondu correctement ou est '.
|
||||
'indisponible. Merci d\'essayer à nouveau ultérieurement.</h3>';
|
||||
// Affichage message d'erreur
|
||||
print '<h3>Le site partenaire n\'a pas répondu correctement ou est '.
|
||||
'indisponible. Merci d\'essayer à nouveau ultérieurement.</h3>';
|
||||
}
|
||||
|
||||
function avis_mailerreur()
|
||||
{
|
||||
//Envoi mail erreur
|
||||
require_once 'sendmail/mail.php';
|
||||
sendMail(
|
||||
"AVIS INSEE - (Date :".date("d")."/".date("m")."/".date("Y").")",
|
||||
'Accès impossible au site de situation INSEE : '.
|
||||
$_REQUEST['siren'].EOL.
|
||||
'http://avis-situation-sirene.insee.fr'.EOL.
|
||||
'pour login '.$_SESSION['tabInfo']['login'].EOL ,
|
||||
//From
|
||||
array(
|
||||
'email' => 'contact@scores-decisions.com',
|
||||
'name' => 'Contact',
|
||||
),
|
||||
//TO
|
||||
array(
|
||||
0 => array(
|
||||
'email' => 'support@scores-decisions.com',
|
||||
'name' => 'Support',
|
||||
)
|
||||
)
|
||||
);
|
||||
// Envoi mail erreur
|
||||
require_once 'sendmail/mail.php';
|
||||
sendMail(
|
||||
'AVIS INSEE - (Date :'.date('d').'/'.date('m').'/'.date('Y').')',
|
||||
'Accès impossible au site de situation INSEE : '.
|
||||
$_REQUEST['siren'].EOL.
|
||||
'http://avis-situation-sirene.insee.fr'.EOL.
|
||||
'pour login '.$_SESSION['tabInfo']['login'].EOL ,
|
||||
// From
|
||||
array('email' => 'contact@scores-decisions.com',
|
||||
'name' => 'Contact'),
|
||||
// To
|
||||
array(array('email' => 'support@scores-decisions.com',
|
||||
'name' => 'Support')));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -114,207 +105,224 @@ function avis_mailerreur()
|
||||
* @param boolean $force True aller obligatoirement le chercher à l'insee
|
||||
* @return string Le PDF demandé
|
||||
*/
|
||||
function getAvisSituation($siret, $format='pdf', $force=0)
|
||||
function getAvisSituation($siret, $format = 'pdf', $force = 0)
|
||||
{
|
||||
$force=$force*1;
|
||||
$date=date('Ymd');
|
||||
$siren=trim(substr($siret,0,9));
|
||||
$nic=trim(substr($siret,9,5));
|
||||
$fichier = PATH_SITE.'/cache/avis/avis-'.$siren.'-'.$nic.'-'.$date.'.pdf';
|
||||
if ($format!='pdf') return 'Format pdf uniquement';
|
||||
if ($force==0 && file_exists($fichier))
|
||||
{
|
||||
// On délivre l'avis en base
|
||||
return file_get_contents($fichier);
|
||||
}
|
||||
else
|
||||
{
|
||||
/** Initialisation de la session sur le site de l'Insee **/
|
||||
$url = 'http://avis-situation-sirene.insee.fr/avisitu/jsp/avis.jsp';
|
||||
//http://avis-situation-sirene.insee.fr/avisituV2/jsp/avis.jsp';
|
||||
$referer = $cookie = '';
|
||||
$page = getUrl($url, $cookie, '', $referer, false, 'avis-situation-sirene.insee.fr', '', AVIS_TIMEOUT);
|
||||
//Code en 4xx ou 5xx signifie une erreur du serveur
|
||||
$codeN = floor($page['code']/100);
|
||||
if($codeN==4 || $codeN==5)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
$referer = $url;
|
||||
$body = $page['body'];
|
||||
$serviceDispo = true;
|
||||
$force = intval($force);
|
||||
$date = date('Ymd');
|
||||
$siren = trim(substr($siret, 0, 9));
|
||||
$nic = trim(substr($siret, 9, 5));
|
||||
$fichier = PATH_SITE.'/cache/avis/avis-'.$siren.'-'.$nic.'-'.$date.'.pdf';
|
||||
if ($format != 'pdf') {
|
||||
return 'Format pdf uniquement';
|
||||
}
|
||||
if ($force == 0 && file_exists($fichier)) {
|
||||
// On délivre l'avis en base
|
||||
return file_get_contents($fichier);
|
||||
} else {
|
||||
// Initialisation de la session sur le site de l'Insee
|
||||
$url = 'http://avis-situation-sirene.insee.fr/avisitu/jsp/avis.jsp';
|
||||
$referer = '';
|
||||
$cookie = '';
|
||||
$page = getUrl($url, $cookie, '', $referer, false,
|
||||
'avis-situation-sirene.insee.fr', '', AVIS_TIMEOUT);
|
||||
// Code en 4xx ou 5xx signifie une erreur du serveur
|
||||
$codeN = floor($page['code'] / 100);
|
||||
if ($codeN == 4 || $codeN == 5) {
|
||||
return false;
|
||||
} else {
|
||||
$referer = $url;
|
||||
$body = $page['body'];
|
||||
$serviceDispo = true;
|
||||
|
||||
//On doit retrouver sur la page
|
||||
/*
|
||||
<form name="demForm" method="post" action="/avisitu/IdentificationListeSiret.do
|
||||
*/
|
||||
if (preg_match("/<form name=\"demForm\" method=\"post\" action=\"\/avisitu\/IdentificationListeSiret.do/Uis", $body, $matches))
|
||||
{
|
||||
$fp = @fopen($fichier, "a");
|
||||
@fwrite($fp, $body);
|
||||
@fclose($fp);
|
||||
$cookie = $page['header']['Set-Cookie'];
|
||||
usleep(round(rand(500000,2000000)));
|
||||
// On doit retrouver sur la page
|
||||
if (preg_match('/<form name="demForm" method="post" action='.
|
||||
'"\/avisitu\/IdentificationListeSiret.do/Uis',
|
||||
$body, $matches)) {
|
||||
$fp = fopen($fichier, 'a');
|
||||
fwrite($fp, $body);
|
||||
fclose($fp);
|
||||
$cookie = $page['header']['Set-Cookie'];
|
||||
usleep(round(rand(500000, 2000000)));
|
||||
|
||||
$dep=$depActif='';
|
||||
if ($nic=='') $crit='S'; // l'établissement siège
|
||||
else $crit=''; // établissement particulier, saisissez le NIC
|
||||
/* $crit='T'; // tous les établissements de l'entreprise
|
||||
$crit='T'; // tous les établissements de l'entreprise du département $dep
|
||||
$crit='A'; // tous les établissements actifs de l'entreprise
|
||||
$crit='A'; // tous les établissements actifs de l'entreprise du département $depActif
|
||||
*/
|
||||
//Post du formulaire
|
||||
$url = 'http://avis-situation-sirene.insee.fr/avisitu/IdentificationListeSiret.do';
|
||||
//$url='http://avis-situation-sirene.insee.fr/avisituV2/IdentificationDetailEtab.do';
|
||||
$post = array(
|
||||
'siren' => $siren,
|
||||
'critere' => $crit, // S pour le siège ou vide avec un NIC !!!
|
||||
'nic' => $nic,
|
||||
'departement' => $dep,
|
||||
'departement_actif' => $depActif,
|
||||
'bSubmit' => 'Valider');
|
||||
$page = getUrl($url, $cookie, $post, $referer, false, 'avis-situation-sirene.insee.fr', '', AVIS_TIMEOUT);
|
||||
$dep = '';
|
||||
$depActif = '';
|
||||
if ($nic == '') {
|
||||
$crit = 'S'; // l'établissement siège
|
||||
} else {
|
||||
$crit = ''; // établissement particulier, saisissez le NIC
|
||||
}
|
||||
// Post du formulaire
|
||||
$url = 'http://avis-situation-sirene.insee.fr/'.
|
||||
'avisitu/IdentificationListeSiret.do';
|
||||
$post = array(
|
||||
'siren' => $siren,
|
||||
'critere' => $crit, // S pour le siège ou vide avec un NIC
|
||||
'nic' => $nic,
|
||||
'departement' => $dep,
|
||||
'departement_actif' => $depActif,
|
||||
'bSubmit' => 'Valider');
|
||||
$page = getUrl($url, $cookie, $post, $referer, false,
|
||||
'avis-situation-sirene.insee.fr', '',
|
||||
AVIS_TIMEOUT);
|
||||
|
||||
$body = $page['body'];
|
||||
$fp=@fopen($fichier, "a");
|
||||
@fwrite($fp, $body);
|
||||
@fclose($fp);
|
||||
$body = $page['body'];
|
||||
$fp = fopen($fichier, 'a');
|
||||
fwrite($fp, $body);
|
||||
fclose($fp);
|
||||
|
||||
if (preg_match("/<h3>Fiche établissement<\/h3>/Uis", $body, $matches))//<li class="ongletActif">établissement</li>
|
||||
$tabInfos['fiche']='etab';
|
||||
if (preg_match("/<h3>Fiche établissement<\/h3>/Uis",
|
||||
$body, $matches)) {
|
||||
$tabInfos['fiche'] = 'etab';
|
||||
}
|
||||
|
||||
if (preg_match('/<div class="TitreGauche">(.*)<br\/>/Uis', $body, $matches)) {
|
||||
$tabInfos['raiSoc']=trim($matches[1]);
|
||||
}
|
||||
if (preg_match('/<div class="TitreGauche">(.*)<br\/>/Uis',
|
||||
$body, $matches)) {
|
||||
$tabInfos['raiSoc'] = trim($matches[1]);
|
||||
}
|
||||
|
||||
if (preg_match("/Dernière mise à jour : (.*)<\/div>/Uis", $body, $matches))
|
||||
$tabInfos['dateMaj']=trim($matches[1]);
|
||||
if (preg_match('/Dernière mise à jour : '.
|
||||
'(.*)<\/div>/Uis', $body, $matches))
|
||||
$tabInfos['dateMaj'] = trim($matches[1]);
|
||||
|
||||
$s1=substr($siren,0,3);
|
||||
$s2=substr($siren,3,3);
|
||||
$s3=substr($siren,6,3);
|
||||
if (preg_match('/<div class="TitreDroite">(?:.*)('.$s1.'(?:.*)'.$s2.'(?:.*)'.$s3.')(?:.*)('.$nic.')(?:.*)<\/div>/Uis', $body, $matches)) {
|
||||
$tabInfos['siren'] = trim($matches[1]);
|
||||
$tabInfos['nic'] = trim($matches[2]);
|
||||
}
|
||||
$s1 = substr($siren, 0, 3);
|
||||
$s2 = substr($siren, 3, 3);
|
||||
$s3 = substr($siren, 6, 3);
|
||||
if (preg_match('/<div class="TitreDroite">(?:.*)('.$s1.
|
||||
'(?:.*)'.$s2.'(?:.*)'.$s3.')(?:.*)('.$nic.
|
||||
')(?:.*)<\/div>/Uis', $body, $matches)) {
|
||||
$tabInfos['siren'] = trim($matches[1]);
|
||||
$tabInfos['nic'] = trim($matches[2]);
|
||||
}
|
||||
|
||||
if (preg_match('/<label id="labelFiche">Etat : <\/label>(.*)depuis le(.*)<\/p>/Uis', $body, $matches)) {
|
||||
$tabInfos['etat'] = trim($matches[1]);
|
||||
$tabInfos['dateEtat']= trim($matches[2]);
|
||||
}
|
||||
if (preg_match('/<label id="labelFiche">Etat : <\/label>'.
|
||||
'(.*)depuis le(.*)<\/p>/Uis', $body, $matches)) {
|
||||
$tabInfos['etat'] = trim($matches[1]);
|
||||
$tabInfos['dateEtat'] = trim($matches[2]);
|
||||
}
|
||||
|
||||
if (preg_match('/<label id="labelFiche">Catégorie d\'établissement : <\/label>(.*)<\/p>/Uis', $body, $matches)) {
|
||||
$tabInfos['typeEtab']= trim($matches[1]);
|
||||
}
|
||||
if (preg_match('/<label id="labelFiche">Catégorie'.
|
||||
' d\'établissement : <\/label>'.
|
||||
'(.*)<\/p>/Uis', $body, $matches)) {
|
||||
$tabInfos['typeEtab'] = trim($matches[1]);
|
||||
}
|
||||
|
||||
$tabAdresse=array();
|
||||
if (preg_match('/<label id="labelFiche">Adresse d\'implantation : <\/label>(?:.*)<ul id="adresse">(.*)<\/ul>/Uis', $body, $matches)) {
|
||||
$strTmp=trim($matches[1]);
|
||||
$tabTmp=explode('</li>', $strTmp);
|
||||
foreach ($tabTmp as $i=>$strTmp)
|
||||
$tabAdresse[$i]=trim(str_replace('<li>','',$strTmp));
|
||||
}
|
||||
$tabAdresse = array();
|
||||
if (preg_match('/<label id="labelFiche">'.
|
||||
'Adresse d\'implantation : <\/label>'.
|
||||
'(?:.*)<ul id="adresse">(.*)<\/ul>/Uis',
|
||||
$body, $matches)) {
|
||||
$strTmp = trim($matches[1]);
|
||||
$tabTmp = explode('</li>', $strTmp);
|
||||
foreach ($tabTmp as $i => $strTmp) {
|
||||
$tabAdresse[$i] =
|
||||
trim(str_replace('<li>', '', $strTmp));
|
||||
}
|
||||
}
|
||||
|
||||
if (preg_match('/<label id="labelFiche">(?:.*)Catégorie juridique :(?:.*)<\/label>(.*) - (.*)<\/p>/Uis', $body, $matches)) {
|
||||
$tabInfos['fjCod']= trim($matches[1]);
|
||||
$tabInfos['fjLib']= trim($matches[2]);
|
||||
}
|
||||
if (preg_match('/<label id="labelFiche">(?:.*)'.
|
||||
'Catégorie juridique :(?:.*)<\/label>'.
|
||||
'(.*) - (.*)<\/p>/Uis', $body, $matches)) {
|
||||
$tabInfos['fjCod'] = trim($matches[1]);
|
||||
$tabInfos['fjLib'] = trim($matches[2]);
|
||||
}
|
||||
|
||||
if (preg_match('/<label id="labelFiche">Activité principale exercée :(?:.*)<\/label>(.*) - (.*)<\/p>/Uis', $body, $matches)) {
|
||||
$tabInfos['nafCod']=trim($matches[1]);
|
||||
$tabInfos['nafLib']=trim($matches[2]);
|
||||
}
|
||||
if (preg_match('/<label id="labelFiche">'.
|
||||
'Activité principale exercée :(?:.*)<\/label>'.
|
||||
'(.*) - (.*)<\/p>/Uis', $body, $matches)) {
|
||||
$tabInfos['nafCod'] = trim($matches[1]);
|
||||
$tabInfos['nafLib'] = trim($matches[2]);
|
||||
}
|
||||
|
||||
if (preg_match('/<label id="labelFiche">(?:.*)Tranche d'effectif(.*)<\/label>(.*)<\/p>/Uis', $body, $matches)) {
|
||||
$tabInfos['effPeriode']=trim($matches[1]);
|
||||
$tabInfos['effTranche']=trim($matches[2]);
|
||||
}
|
||||
if (preg_match('/<label id="labelFiche">(?:.*)'.
|
||||
'Tranche d'effectif(.*)<\/label>'.
|
||||
'(.*)<\/p>/Uis', $body, $matches)) {
|
||||
$tabInfos['effPeriode'] = trim($matches[1]);
|
||||
$tabInfos['effTranche'] = trim($matches[2]);
|
||||
}
|
||||
|
||||
$strCsv=$siren.';'.$nic.';'.$tabInfos['fiche'].';'.$tabInfos['dateMaj'].';'.
|
||||
$tabInfos['siren'].';'.$tabInfos['nic'].';'.$tabInfos['raiSoc'].';'.
|
||||
$tabInfos['etat'].';'.$tabInfos['dateEtat'].';'.$tabInfos['fjCod'].';'.$tabInfos['fjLib'].';'.
|
||||
$tabInfos['nafCod'].';'.$tabInfos['nafLib'].';'.$tabInfos['effPeriode'].';'.
|
||||
$tabInfos['effTranche'].';'.
|
||||
$tabInfos['typeEtab'].';'.@implode(';',@$tabAdresse).
|
||||
";\n";
|
||||
$fp=@fopen(PATH_LOGS."avis.csv", "a");
|
||||
@fwrite($fp, $strCsv);
|
||||
@fclose($fp);
|
||||
$strCsv = $siren.';'.$nic.';'.
|
||||
$tabInfos['fiche'].';'.
|
||||
$tabInfos['dateMaj'].';'.
|
||||
$tabInfos['siren'].';'.
|
||||
$tabInfos['nic'].';'.
|
||||
$tabInfos['raiSoc'].';'.
|
||||
$tabInfos['etat'].';'.
|
||||
$tabInfos['dateEtat'].';'.
|
||||
$tabInfos['fjCod'].';'.
|
||||
$tabInfos['fjLib'].';'.
|
||||
$tabInfos['nafCod'].';'.
|
||||
$tabInfos['nafLib'].';'.
|
||||
$tabInfos['effPeriode'].';'.
|
||||
$tabInfos['effTranche'].';'.
|
||||
$tabInfos['typeEtab'].';'.implode(';', @$tabAdresse).";\n";
|
||||
$fp = fopen(PATH_LOGS.'avis.csv', 'a');
|
||||
fwrite($fp, $strCsv);
|
||||
fclose($fp);
|
||||
|
||||
// $body contient l'avis de situation au format html
|
||||
$tabErreurs=array();
|
||||
if (preg_match('/name="erreurs" value="(.*)" class="erreurText" readonly/Ui', $body, $matches1) ||
|
||||
preg_match('/name="erreurs_bis" value="(.*)" class="erreurTextBis" readonly/Ui', $body, $matches2)) {
|
||||
$tabErreurs[]=@$matches1[1];
|
||||
$tabErreurs[]=@$matches2[1];
|
||||
die('<font color="red">ERREUR '.utf8_encode(implode(' ', $tabErreurs)).'</font>'); // Gérer le retour d'une erreur
|
||||
}
|
||||
usleep(round(rand(500000,1000000)));
|
||||
// $body contient l'avis de situation au format html
|
||||
$tabErreurs = array();
|
||||
if (preg_match('/name="erreurs" value="(.*)"'.
|
||||
' class="erreurText" readonly/Ui',
|
||||
$body, $matches1) ||
|
||||
preg_match('/name="erreurs_bis" value="(.*)"'.
|
||||
' class="erreurTextBis" readonly/Ui',
|
||||
$body, $matches2)) {
|
||||
$tabErreurs[] = @$matches1[1];
|
||||
$tabErreurs[] = @$matches2[1];
|
||||
die('<font color="red">ERREUR '.
|
||||
utf8_encode(implode(' ', $tabErreurs)).'</font>');
|
||||
}
|
||||
usleep(round(rand(500000, 1000000)));
|
||||
|
||||
if ($format=='pdf')
|
||||
{
|
||||
$referer = $url;
|
||||
$url = 'http://avis-situation-sirene.insee.fr/avisitu/AvisPdf.do';
|
||||
//$url='http://avis-situation-sirene.insee.fr/avisituV2/AvisPdf.do';
|
||||
$post = array(
|
||||
'siren'=>$siren,
|
||||
'nic'=>$nic,
|
||||
'bSubmit'=>'Avis+de+Situation'
|
||||
);
|
||||
$page = getUrl($url, $cookie, $post, $referer, false, 'avis-situation-sirene.insee.fr', '', AVIS_TIMEOUT);
|
||||
$body = $page['body'];
|
||||
$fp = @fopen($fichier, "w");
|
||||
@fwrite($fp, $body);
|
||||
@fclose($fp);
|
||||
} // Fin format PDF
|
||||
}
|
||||
else
|
||||
{
|
||||
$body = false;
|
||||
}
|
||||
return $body;
|
||||
} // Fin erreur initialisation
|
||||
} // Fin fichier disponible
|
||||
if ($format == 'pdf') {
|
||||
$referer = $url;
|
||||
$url = 'http://avis-situation-sirene.insee.fr/'.
|
||||
'avisitu/AvisPdf.do';
|
||||
$post = array(
|
||||
'siren' => $siren,
|
||||
'nic' => $nic,
|
||||
'bSubmit' => 'Avis+de+Situation');
|
||||
$page = getUrl($url, $cookie, $post, $referer, false,
|
||||
'avis-situation-sirene.insee.fr', '',
|
||||
AVIS_TIMEOUT);
|
||||
$body = $page['body'];
|
||||
$fp = fopen($fichier, "w");
|
||||
fwrite($fp, $body);
|
||||
fclose($fp);
|
||||
}
|
||||
} else {
|
||||
$body = false;
|
||||
}
|
||||
return $body;
|
||||
} // Fin erreur initialisation
|
||||
} // Fin fichier disponible
|
||||
}
|
||||
|
||||
// ==> Start
|
||||
if (!avis_erreur())
|
||||
{
|
||||
avis_erreurcpt('raz');
|
||||
$body = getAvisSituation($siret, 'pdf', 1);
|
||||
if($body !== false)
|
||||
{
|
||||
header("Pragma: public");
|
||||
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
|
||||
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
|
||||
header("Cache-Control: must-revalidate");
|
||||
header("Content-type: application/pdf");
|
||||
header("Content-Length: ".strlen($body));
|
||||
header('Content-disposition: inline; filename="avis-'.$siret.'.pdf"');
|
||||
header("Accept-Ranges: ".strlen($body));
|
||||
echo $body;
|
||||
// Start
|
||||
if (avis_erreur() == false) {
|
||||
avis_erreurcpt('raz');
|
||||
$body = getAvisSituation($siret, 'pdf', 1);
|
||||
if ($body !== false) {
|
||||
header('Pragma: public');
|
||||
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
|
||||
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
|
||||
header('Cache-Control: must-revalidate');
|
||||
header('Content-type: application/pdf');
|
||||
header('Content-Length: '.strlen($body));
|
||||
header('Content-disposition: inline; filename="avis-'.$siret.'.pdf"');
|
||||
header('Accept-Ranges: '.strlen($body));
|
||||
print $body;
|
||||
|
||||
$client = new SoapClient(null, array(
|
||||
'trace' => 1,
|
||||
'soap_version' => SOAP_1_1,
|
||||
'location' => WEBSERVICE_URL,
|
||||
'uri' => WEBSERVICE_URI,
|
||||
'login' => $_SESSION['tabInfo']['login'],
|
||||
'password' => $_SESSION['tabInfo']['password']));
|
||||
$O = $client->setLog('avis_situation'.$vue, $siret, 0, $option);
|
||||
} else {
|
||||
avis_erreurcpt('plus');
|
||||
avis_erreurmsg();
|
||||
}
|
||||
$ws = new WsScores();
|
||||
$ws->setLog('avis_situation'.$vue, $siret, 0, $option);
|
||||
} else {
|
||||
avis_erreurcpt('plus');
|
||||
avis_erreurmsg();
|
||||
}
|
||||
} else {
|
||||
if (avis_nberreur()==5){
|
||||
avis_mailerreur();
|
||||
}
|
||||
avis_erreurcpt('plus');
|
||||
avis_erreurmsg();
|
||||
}
|
||||
else
|
||||
{
|
||||
if (avis_nberreur()==5){
|
||||
avis_mailerreur();
|
||||
}
|
||||
avis_erreurcpt('plus');
|
||||
avis_erreurmsg();
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user