ws-2.0 : Complément pour intégration nouveau webservice
This commit is contained in:
parent
f984202983
commit
38eff375d5
2
cache/identite-34176257300085.csv
vendored
2
cache/identite-34176257300085.csv
vendored
@ -1,2 +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;;"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"
|
||||
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"
|
||||
|
|
2
cache/identite-34176257300085.tpl
vendored
2
cache/identite-34176257300085.tpl
vendored
File diff suppressed because one or more lines are too long
2
cache/identite-34176257300085.xml
vendored
2
cache/identite-34176257300085.xml
vendored
@ -12,7 +12,7 @@
|
||||
<AutreId>1987B01203</AutreId>
|
||||
<Source>002</Source>
|
||||
<SourceId>17577550</SourceId>
|
||||
<Isin />
|
||||
<Isin>FR0000044943</Isin>
|
||||
<Nom>LOGIC INSTRUMENT</Nom>
|
||||
<Nom2 />
|
||||
<NomLong />
|
||||
|
@ -7,25 +7,27 @@ if (empty($_REQUEST['email']) == false) {
|
||||
$_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']
|
||||
);
|
||||
|
||||
require_once 'scoresws/scoresws-int.php';
|
||||
$O = scoreses_commandeAsso($siren, $infoAsso, $infoDemande);
|
||||
$annee = substr($O->dateCommande, 0, 4);
|
||||
$mois = substr($O->dateCommande, 4, 2);
|
||||
$jour = substr($O->dateCommande, 6, 2);
|
||||
$heure = substr($O->dateCommande, 8, 2);
|
||||
$minutes = substr($O->dateCommande, 10, 2);
|
||||
$ref = $O->refCmde;
|
||||
$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.' à '.
|
||||
|
@ -42,10 +42,11 @@ if ($histo != 'on') {
|
||||
$numParution entre 1 et YYYYY
|
||||
$numAnnonce entre 1 et XXXXX
|
||||
*/
|
||||
require_once 'scoresws/scoresws.php';
|
||||
$O = scoresws_rechercheAnnonce($ra['source'], $ra['dateAnnee'],
|
||||
$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);
|
||||
@ -54,8 +55,9 @@ if ($histo != 'on') {
|
||||
// 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);
|
||||
require_once 'scoresws/scoresws-int.php';
|
||||
$O = scoresws_rechercheHisto($txt, $annee, $bodacc, $p,
|
||||
|
||||
$ws = new WsScores();
|
||||
$reponse = $ws->rechercheHisto($txt, $annee, $bodacc, $p,
|
||||
$_SESSION['tabInfo']['nbReponses']);
|
||||
}
|
||||
|
||||
|
@ -5,15 +5,15 @@ require_once 'common/dates.php';
|
||||
require_once 'siren.php';
|
||||
|
||||
$parametresTxt = array(
|
||||
'source'=>'Source',
|
||||
'bodacc'=>'Type',
|
||||
'histo'=>'',
|
||||
'annee'=>'Année',
|
||||
'dateparution'=>'Date de parution',
|
||||
'nparution'=>'Numéro de parution',
|
||||
'bpage'=>'Page',
|
||||
'nannonce'=>'Numéro d\'annonce',
|
||||
'naffaire'=>'Numéro d\'affaire',
|
||||
'source'=>'Source',
|
||||
'bodacc'=>'Type',
|
||||
'histo'=>'',
|
||||
'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)
|
||||
@ -24,13 +24,13 @@ 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
|
||||
{
|
||||
@ -38,26 +38,26 @@ else
|
||||
?>
|
||||
<p class="StyleInfoLib">Critères de recherche <a title="Retour au formulaire de recherche" href="./index.php?page=recherche&vue=annonce"><?=$strCriteres?></a></p>
|
||||
<div id="annonce">
|
||||
<?php
|
||||
<?php
|
||||
//Affichage des données
|
||||
foreach( $O['reponses'] as $annonce )
|
||||
foreach( $reponse->reponses 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->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'])?>.
|
||||
<?php
|
||||
?>
|
||||
Source BODACC n°<?=$annonce->Num_Parution?> <?=substr($reponse->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
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<?php
|
||||
<?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)
|
||||
{
|
||||
|
@ -17,6 +17,104 @@ class WsScores
|
||||
}
|
||||
}
|
||||
|
||||
public function setCmdAsso ( $infoCommande, $infosDemandeur )
|
||||
{
|
||||
$params = new stdClass;
|
||||
$params->infoCommande = new stdClass;
|
||||
$params->infoCommande->siren = $infoCommande['Siren'];
|
||||
$params->infoCommande->waldec = ''; // @todo : WALDEC
|
||||
$params->infoCommande->idEntreprise = $infoCommande['idEntreprise'];
|
||||
$params->infoCommande->raisonSociale = $infoCommande['RaisonSociale'];
|
||||
$params->infoDemandeur = new stdClass;
|
||||
$params->infoDemandeur->reference = $infosDemandeur['Ref'];
|
||||
$params->infoDemandeur->email = $infosDemandeur['Email'];
|
||||
$params->infoDemandeur->tel = $infosDemandeur['Tel'];
|
||||
$params->infoDemandeur->fax = '';
|
||||
$params->infoDemandeur->nom = '';
|
||||
$params->infoDemandeur->service = '';
|
||||
$params->infoDemandeur->societe = '';
|
||||
$params->infoDemandeur->adresse = '';
|
||||
$params->infoDemandeur->cp = '';
|
||||
$params->infoDemandeur->ville = '';
|
||||
|
||||
$client = $this->loadClient('interne');
|
||||
try {
|
||||
$reponse = $client->setCmdAsso($params);
|
||||
return $reponse->setCmdAssoResult;
|
||||
} catch (SoapFault $fault) {
|
||||
require_once 'soaperror.php';
|
||||
processSoapFault($client, $fault, $_SESSION['tabInfo']);
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public function setCmdEnquete ( $infosCommande, $infosDemandeur )
|
||||
{
|
||||
$params = new stdClass;
|
||||
$params->infosCommande = new stdClass;
|
||||
$params->infosCommande->siren = $infosCommande['Siren'];
|
||||
$params->infosCommande->Nom = $infosCommande['Nom'];
|
||||
$params->infosCommande->Adresse = $infosCommande['Adresse'];
|
||||
$params->infosCommande->CP = $infosCommande['CP'];
|
||||
$params->infosCommande->Ville = $infosCommande['Ville'];
|
||||
$params->infosCommande->Tel = $infosCommande['Entrep']['Tel'];
|
||||
$params->infosCommande->Fax = $infosCommande['Entrep']['Fax'];
|
||||
$params->infosCommande->Mail = $infosCommande['Entrep']['Mail'];
|
||||
$params->infosCommande->AutreTel = $infosCommande['Entrep']['AutreTel'];
|
||||
$params->infosCommande->AutreMail = $infosCommande['Entrep']['AutreMail'];
|
||||
$params->infosCommande->Web = $infosCommande['Entrep']['Web'];
|
||||
$params->infosCommande->RIB = new stdClass;
|
||||
$params->infosCommande->RIB->banque = $infosCommande['Entrep']['Rib']['Banque'];
|
||||
$params->infosCommande->RIB->guichet = $infosCommande['Entrep']['Rib']['Guichet'];
|
||||
$params->infosCommande->RIB->compte = $infosCommande['Entrep']['Rib']['Compte'];
|
||||
$params->infosCommande->RIB->cle = $infosCommande['Entrep']['Rib']['Cle'];
|
||||
$params->infosCommande->Encours = $infosCommande['Encours'];
|
||||
$params->infosCommande->NbEcheances = $infosCommande['NbEcheances'];
|
||||
$params->infosCommande->AvisAssureur = $infosCommande['AvisAssureur'];
|
||||
$params->infosCommande->Type = $infosCommande['Type'];
|
||||
$params->infosCommande->Delai = $infosCommande['Delai'];
|
||||
$params->infosCommande->PrecisionsType = $infosCommande['Precisions']['Type'];
|
||||
$params->infosCommande->PrecisionsMontantCA = $infosCommande['Precisions']['MontantCA'];
|
||||
$params->infosCommande->PrecisionsMotif = $infosCommande['Precisions']['Motif'];
|
||||
$params->infosCommande->PrecisionsAutre = $infosCommande['Precisions']['Autre'];
|
||||
$params->infosCommande->Anciennete = $infosCommande['Anciennete'];
|
||||
$params->infosCommande->AncienneteDuree = $infosCommande['Anciennete']['Duree'];
|
||||
$params->infosCommande->ImpayeesChoix = $infosCommande['ImpayeesChoix'];
|
||||
$params->infosCommande->ImpayeesMontant = $infosCommande['Impayees']['Montant'];
|
||||
$params->infosCommande->ImpayeesNombre = $infosCommande['Impayees']['Nombre'];
|
||||
$params->infosCommande->ImpayeesDate = $infosCommande['Impayees']['Date'];
|
||||
$params->infosCommande->RetardPaiementChoix = $infosCommande['RetardPaiementChoix'];
|
||||
$params->infosCommande->RetardPaiementMontant = $infosCommande['RetardPaiement']['Montant'];
|
||||
$params->infosCommande->RetardPaiementNombre = $infosCommande['RetardPaiement']['Nombre'];
|
||||
$params->infosCommande->RetardPaiementDate = $infosCommande['RetardPaiement']['Date'];
|
||||
$params->infosCommande->LitigeChoix = $infosCommande['LitigeChoix'];
|
||||
$params->infosCommande->LitigePrecisions = $infosCommande['LitigePrecisions'];
|
||||
$params->infosCommande->Observation = $infosCommande['Observation'];
|
||||
|
||||
$params->infosDemandeur = new stdClass;
|
||||
$params->infosDemandeur->reference = $infosDemandeur['Ref'];
|
||||
$params->infosDemandeur->email = $infosDemandeur['Email'];
|
||||
$params->infosDemandeur->tel = $infosDemandeur['Tel'];
|
||||
$params->infosDemandeur->fax = $infosDemandeur['Fax'];
|
||||
$params->infosDemandeur->nom = $infosDemandeur['Identite'];
|
||||
$params->infosDemandeur->service = $infosDemandeur['Profil']; //@todo ProfilAutre
|
||||
$params->infosDemandeur->societe = '';
|
||||
$params->infosDemandeur->adresse = '';
|
||||
$params->infosDemandeur->cp = '';
|
||||
$params->infosDemandeur->ville = '';
|
||||
|
||||
$client = $this->loadClient('interne');
|
||||
try {
|
||||
$reponse = $client->setCmdEnquete($params);
|
||||
return $reponse->setCmdEnqueteResult;
|
||||
} catch (SoapFault $fault) {
|
||||
require_once 'soaperror.php';
|
||||
processSoapFault($client, $fault, $_SESSION['tabInfo']);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public function getAnnonceCollecte($idan, $siret){
|
||||
$params = new stdClass;
|
||||
$params->idAnn = $idan;
|
||||
@ -435,6 +533,40 @@ class WsScores
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public function getListeSurveillancesCsv ( $source = '', $login = '', $idClient = 0)
|
||||
{
|
||||
$params = new stdClass;
|
||||
$params->source = $source;
|
||||
$params->login = $login;
|
||||
$params->idClient = $idClient;
|
||||
$client = $this->loadClient('interne');
|
||||
try {
|
||||
$reponse = $client->getListeSurveillancesCsv($params);
|
||||
return $reponse->getListeSurveillancesCsvResult;
|
||||
} catch (SoapFault $fault) {
|
||||
require_once 'soaperror.php';
|
||||
processSoapFault($client, $fault, $_SESSION['tabInfo']);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public function getListeFichierSurv ( $login, $ref = '*', $nomFic = '' )
|
||||
{
|
||||
$params = new stdClass;
|
||||
$params->login = $login;
|
||||
$params->ref = $ref;
|
||||
$params->nomFic = $nomFic;
|
||||
$client = $this->loadClient('interne');
|
||||
try {
|
||||
$reponse = $client->getListeFichierSurv($params);
|
||||
return $reponse->getListeFichierSurvResult;
|
||||
} catch (SoapFault $fault) {
|
||||
require_once 'soaperror.php';
|
||||
processSoapFault($client, $fault, $_SESSION['tabInfo']);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public function rechercheEntreprise($type, $criteres, $position = 0) {
|
||||
$params = new StdClass;
|
||||
@ -496,6 +628,44 @@ class WsScores
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public function rechercheHisto ( $recherche, $annee = '', $typeBod = '', $deb = 0, $nbRep = 20, $maxRep = 200, $pertinence = false )
|
||||
{
|
||||
$params = new StdClass;
|
||||
$params->recherche = $recherche;
|
||||
$params->annee = $annee;
|
||||
$params->typeBod = $typeBod;
|
||||
$params->deb = $deb;
|
||||
$params->nbRep = $nbRep;
|
||||
$params->maxRep = $maxRep;
|
||||
$client = $this->loadClient('interne');
|
||||
try {
|
||||
$reponse = $client->rechercheHisto($params);
|
||||
return $reponse->rechercheHistoResult;
|
||||
} catch (SoapFault $fault) {
|
||||
require_once 'soaperror.php';
|
||||
processSoapFault($client, $fault, $_SESSION['tabInfo']);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public function rechercheAnnonce ( $source, $dateAnnee, $numParution, $numAnnonce )
|
||||
{
|
||||
$params = new StdClass;
|
||||
$params->source = $source;
|
||||
$params->dateAnnee = $dateAnnee;
|
||||
$params->numParution = $numParution;
|
||||
$params->numAnnonce = $numAnnonce;
|
||||
$client = $this->loadClient('entreprise');
|
||||
try {
|
||||
$reponse = $client->rechercheAnnonce($params);
|
||||
return $reponse->rechercheAnnonceResult;
|
||||
} catch (SoapFault $fault) {
|
||||
require_once 'soaperror.php';
|
||||
processSoapFault($client, $fault, $_SESSION['tabInfo']);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public function getPortefeuille($filtre,
|
||||
$position = 0, $nbAffichage = 100) {
|
||||
@ -513,6 +683,59 @@ class WsScores
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public function getPortefeuilleCsv($login = '', $idClient = 0)
|
||||
{
|
||||
$params = new StdClass;
|
||||
$params->login = $login;
|
||||
$params->idClient = $idClient;
|
||||
$client = $this->loadClient('interne');
|
||||
try {
|
||||
$reponse = $client->getPortefeuilleCsv($params);
|
||||
return $reponse->getPortefeuilleCsvResult;
|
||||
} catch (SoapFault $fault) {
|
||||
require_once 'soaperror.php';
|
||||
processSoapFault($client, $fault, $_SESSION['tabInfo']);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public function getLogsClients($mois, $detail = 0, $idClient = 0, $login = '', $all = 0 )
|
||||
{
|
||||
$params = new stdClass;
|
||||
$params->mois = $mois;
|
||||
$params->detail = $detail;
|
||||
$params->idClient = $idClient;
|
||||
$params->login = $login;
|
||||
$params->all = $all;
|
||||
$client = $this->loadClient('interne');
|
||||
try {
|
||||
$reponse = $client->getLogsClients($params);
|
||||
return $reponse->getLogsClientsResult;
|
||||
} catch (SoapFault $fault) {
|
||||
require_once 'soaperror.php';
|
||||
processSoapFault($client, $fault, $_SESSION['tabInfo']);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public function getStatsUtilisateurs ( $login, $mois, $type = 'jour', $payants = false )
|
||||
{
|
||||
$params = new stdClass;
|
||||
$params->login = $login;
|
||||
$params->mois = $mois;
|
||||
$params->type = $type;
|
||||
$params->payants = $payants;
|
||||
$client = $this->loadClient('interne');
|
||||
try {
|
||||
$reponse = $client->getStatsUtilisateurs($params);
|
||||
return $reponse->getStatsUtilisateursResult;
|
||||
} catch (SoapFault $fault) {
|
||||
require_once 'soaperror.php';
|
||||
processSoapFault($client, $fault, $_SESSION['tabInfo']);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public function getListeDroits() {
|
||||
$client = $this->loadClient('interne');
|
||||
|
@ -1,531 +0,0 @@
|
||||
<?php
|
||||
require_once 'cache/cache.php';
|
||||
require_once realpath(dirname(__FILE__)).'/functions.php';
|
||||
|
||||
global $ws_soap_client_int;
|
||||
$ws_soap_client_int =
|
||||
new SoapClient('http://webservice.sd.lan/sinterne?wsdl',
|
||||
array('login' => 'sbeaugrand',
|
||||
'password' => 'seb2010',
|
||||
'cache_wsdl' => WSDL_CACHE_NONE,
|
||||
'soap_version' => SOAP_1_2,
|
||||
'trace' => true,
|
||||
'features' => SOAP_SINGLE_ELEMENT_ARRAYS));
|
||||
|
||||
// -------------------------------------------------------------------------- //
|
||||
// scoresws_getInfosLogin
|
||||
// -------------------------------------------------------------------------- //
|
||||
function scoresws_getInfosLogin($login, $ipUtilisateur = '')
|
||||
{
|
||||
global $ws_soap_client_int;
|
||||
|
||||
try {
|
||||
$o = new StdClass;
|
||||
$o->login = $login;
|
||||
if ($ipUtilisateur != '') {
|
||||
$o->ipUtilisateur = $ipUtilisateur;
|
||||
}
|
||||
|
||||
$O = $ws_soap_client_int->__call('getInfosLogin', array($o));
|
||||
|
||||
return $O->getInfosLoginResult->result;
|
||||
} catch (SoapFault $f) {
|
||||
require_once 'soaperror.php';
|
||||
processSoapFault($ws_soap_client_int, $f, $_SESSION['tabInfo']);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------- //
|
||||
// scoresws_setInfosLogin
|
||||
// -------------------------------------------------------------------------- //
|
||||
function scoresws_setInfosLogin($login, $tabInfo)
|
||||
{
|
||||
global $ws_soap_client_int;
|
||||
|
||||
try {
|
||||
$o = new StdClass;
|
||||
$o->login = $login;
|
||||
$o->tabInfoUserWS = $tabInfo;
|
||||
|
||||
$O = $ws_soap_client_int->__call('setInfosLogin', array($o));
|
||||
|
||||
return $O->setInfosLoginResult->result;
|
||||
} catch (SoapFault $f) {
|
||||
require_once 'soaperror.php';
|
||||
processSoapFault($ws_soap_client_int, $f, $_SESSION['tabInfo']);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------- //
|
||||
// scoresws_getNextLogin
|
||||
// -------------------------------------------------------------------------- //
|
||||
function scoresws_getNextLogin($login)
|
||||
{
|
||||
global $ws_soap_client_int;
|
||||
|
||||
try {
|
||||
$o = new StdClass;
|
||||
$o->login = $login;
|
||||
|
||||
$O = $ws_soap_client_int->__call('getNextLogin', array($o));
|
||||
|
||||
return $O->getNextLoginResult->result;
|
||||
} catch (SoapFault $f) {
|
||||
require_once 'soaperror.php';
|
||||
processSoapFault($ws_soap_client_int, $f, $_SESSION['tabInfo']);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------- //
|
||||
// scoresws_setLog
|
||||
// -------------------------------------------------------------------------- //
|
||||
function scoresws_setLog($page, $siret, $id = 0, $ref = '')
|
||||
{
|
||||
global $ws_soap_client_int;
|
||||
|
||||
try {
|
||||
$o = new StdClass;
|
||||
$o->page = $page;
|
||||
$o->siret = $siret;
|
||||
if ($id != 0) {
|
||||
$o->id = $id;
|
||||
}
|
||||
if ($ref != '') {
|
||||
$o->ref = $ref;
|
||||
}
|
||||
|
||||
$O = $ws_soap_client_int->__call('setLog', array($o));
|
||||
|
||||
return $O->setLogResult->result;
|
||||
} catch (SoapFault $f) {
|
||||
require_once 'soaperror.php';
|
||||
processSoapFault($ws_soap_client_int, $f, $_SESSION['tabInfo']);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------- //
|
||||
// scoresws_getSurveillances
|
||||
// -------------------------------------------------------------------------- //
|
||||
function scoresws_getSurveillances($siret = 0, $source = 'annonces',
|
||||
$detail = false, $deb = 0, $nbRet = 100,
|
||||
$tri = 'siren')
|
||||
{
|
||||
global $ws_soap_client_int;
|
||||
|
||||
try {
|
||||
$o = new StdClass;
|
||||
$o->siret = $siret;
|
||||
$o->source = $source;
|
||||
$o->detail = $detail;
|
||||
$o->deb = $deb;
|
||||
$o->nbRet = $nbRet;
|
||||
$o->tri = $tri;
|
||||
|
||||
$O = $ws_soap_client_int->__call('getSurveillances', array($o));
|
||||
|
||||
return $O->getSurveillancesResult->result;
|
||||
} catch (SoapFault $f) {
|
||||
require_once 'soaperror.php';
|
||||
processSoapFault($ws_soap_client_int, $f, $_SESSION['tabInfo']);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------- //
|
||||
// scoresws_getKbis
|
||||
// -------------------------------------------------------------------------- //
|
||||
function scoresws_getKbis($siren)
|
||||
{
|
||||
global $ws_soap_client_int;
|
||||
|
||||
try {
|
||||
$o = new StdClass;
|
||||
$o->siren = $siren;
|
||||
|
||||
$O = $ws_soap_client_int->__call('getKbis', array($o));
|
||||
|
||||
$kbis = $O->getKbisResult->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);
|
||||
}
|
||||
return $return;
|
||||
} catch (SoapFault $f) {
|
||||
require_once 'soaperror.php';
|
||||
processSoapFault($ws_soap_client_int, $f, $_SESSION['tabInfo']);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------- //
|
||||
// scoresws_commandeAsso
|
||||
// -------------------------------------------------------------------------- //
|
||||
function scoresws_commandeAsso($siren, &$infoAsso, &$infoDemande)
|
||||
{
|
||||
global $ws_soap_client_int;
|
||||
|
||||
try {
|
||||
$o = new StdClass;
|
||||
$o->siren = $siren;
|
||||
$o->infoAsso = $infoAsso;
|
||||
$o->infoDemande = $infoDemande;
|
||||
|
||||
$O = $ws_soap_client_int->__call('commandeAsso', array($o));
|
||||
|
||||
return $O->commandeAssoResult->result;
|
||||
} catch (SoapFault $f) {
|
||||
require_once 'soaperror.php';
|
||||
processSoapFault($ws_soap_client_int, $f, $_SESSION['tabInfo']);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------- //
|
||||
// scoresws_commandeEnquete
|
||||
// -------------------------------------------------------------------------- //
|
||||
function scoresws_commandeEnquete($siren, &$infoEnq, &$infoDemande)
|
||||
{
|
||||
global $ws_soap_client_int;
|
||||
|
||||
try {
|
||||
$o = new StdClass;
|
||||
$o->siren = $siren;
|
||||
$o->infoEnq = $infoEnq;
|
||||
$o->infoDemande = $infoDemande;
|
||||
|
||||
$O = $ws_soap_client_int->__call('commandeEnquete', array($o));
|
||||
|
||||
return $O->commandeEnqueteResult;
|
||||
} catch (SoapFault $f) {
|
||||
require_once 'soaperror.php';
|
||||
processSoapFault($ws_soap_client_int, $f, $_SESSION['tabInfo']);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------- //
|
||||
// scoresws_getAnnonceCollecte
|
||||
// -------------------------------------------------------------------------- //
|
||||
function scoresws_getAnnonceCollecte($idan, $siret = '')
|
||||
{
|
||||
global $ws_soap_client_int;
|
||||
|
||||
try {
|
||||
$o = new StdClass;
|
||||
$o->idan = $idan;
|
||||
if ($siret != '') {
|
||||
$o->siret = $siret;
|
||||
}
|
||||
|
||||
$O = $ws_soap_client_int->__call('getAnnonceCollecte', array($o));
|
||||
|
||||
return $O->getAnnonceCollecteResult->result;
|
||||
} catch (SoapFault $f) {
|
||||
require_once 'soaperror.php';
|
||||
processSoapFault($client, $f, $_SESSION['tabInfo']);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------- //
|
||||
// scoresws_supprAnnonceCollecte
|
||||
// -------------------------------------------------------------------------- //
|
||||
function scoresws_supprAnnonceCollecte($idan, $siret = '')
|
||||
{
|
||||
global $ws_soap_client_int;
|
||||
|
||||
try {
|
||||
$o = new StdClass;
|
||||
$o->idan = $idan;
|
||||
if ($siret != '') {
|
||||
$o->siret = $siret;
|
||||
}
|
||||
|
||||
$O = $ws_soap_client_int->__call('supprAnnonceCollecte', array($o));
|
||||
|
||||
$error = $O->supprAnnonceCollecteResult->error;
|
||||
} catch (SoapFault $f) {
|
||||
require_once 'soaperror.php';
|
||||
processSoapFault($client, $f, $_SESSION['tabInfo']);
|
||||
}
|
||||
if (isset($error) && $error->errNum == 0) {
|
||||
$output = 'Annonce '.$idan.' supprimé !';
|
||||
} else if (isset($error) && $error->errNum != 0) {
|
||||
$output = 'Erreur lors de la suppression.';
|
||||
} else {
|
||||
$output = "Une erreur est survenue...";
|
||||
}
|
||||
return $output;
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------- //
|
||||
// scoresws_dupliqueAnnonceCollecte
|
||||
// -------------------------------------------------------------------------- //
|
||||
function scoresws_dupliqueAnnonceCollecte($idan, $siret)
|
||||
{
|
||||
global $ws_soap_client_int;
|
||||
|
||||
try {
|
||||
$o = new StdClass;
|
||||
$o->idan = $idan;
|
||||
if ($siret != '') {
|
||||
$o->siret = $siret;
|
||||
}
|
||||
|
||||
$O = $ws_soap_client_int->__call('dupliqueAnnonceCollecte', array($o));
|
||||
|
||||
$error = $O->dupliqueAnnonceCollecteResult->error;
|
||||
} catch (SoapFault $f) {
|
||||
require_once 'soaperror.php';
|
||||
processSoapFault($client, $f, $_SESSION['tabInfo']);
|
||||
}
|
||||
if (isset($error) && $error->errNum == 0) {
|
||||
$output = 'Annonce '.$idan.' dupliqué sur '.$siret.'!';
|
||||
} elseif (isset($error) && $error->errNum != 0) {
|
||||
$output = 'Erreur lors de la duplication.';
|
||||
} else {
|
||||
$output = "Une erreur est survenue...";
|
||||
}
|
||||
return $output;
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------- //
|
||||
// scoresws_setInfosEntrep
|
||||
// -------------------------------------------------------------------------- //
|
||||
function scoresws_setInfosEntrep($siret, $idEntreprise, $tabInfos)
|
||||
{
|
||||
global $ws_soap_client_int;
|
||||
|
||||
try {
|
||||
$o = new StdClass;
|
||||
$o->siret = $siret;
|
||||
$o->idEntreprise = $idEntreprise;
|
||||
$o->tabInfos = $tabInfos;
|
||||
|
||||
$O = $ws_soap_client_int->__call('setInfosEntrep', array($o));
|
||||
|
||||
return $O->setInfosEntrepResult->result;
|
||||
} catch (SoapFault $f) {
|
||||
require_once 'soaperror.php';
|
||||
processSoapFault($ws_soap_client_int, $f, $_SESSION['tabInfo']);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------- //
|
||||
// scoresws_getIdCoursAppel
|
||||
// -------------------------------------------------------------------------- //
|
||||
function scoresws_getIdCoursAppel($tribunal)
|
||||
{
|
||||
global $ws_soap_client_int;
|
||||
|
||||
try {
|
||||
$o = new StdClass;
|
||||
$o->tribunal = $tribunal;
|
||||
|
||||
$O = $ws_soap_client_int->__call('getIdCoursAppel', array($o));
|
||||
|
||||
return $O->getIdCoursAppelResult->result;
|
||||
} catch (SoapFault $f) {
|
||||
require_once 'soaperror.php';
|
||||
processSoapFault($ws_soap_client_int, $f, $_SESSION['tabInfo']);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------- //
|
||||
// scoresws_getListeClients
|
||||
// -------------------------------------------------------------------------- //
|
||||
function scoresws_getListeClients($idClient = 0)
|
||||
{
|
||||
global $ws_soap_client_int;
|
||||
|
||||
try {
|
||||
$o = new StdClass;
|
||||
$o->idClient = $idClient;
|
||||
|
||||
$O = $ws_soap_client_int->__call('getListeClients', array($o));
|
||||
|
||||
return $O->getListeClientsResult->result;
|
||||
} catch (SoapFault $f) {
|
||||
require_once 'soaperror.php';
|
||||
processSoapFault($ws_soap_client_int, $f, $_SESSION['tabInfo']);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------- //
|
||||
// scoresws_getListeFichierSurv
|
||||
// -------------------------------------------------------------------------- //
|
||||
function scoresws_getListeFichierSurv($login, $ref, $nomFic)
|
||||
{
|
||||
global $ws_soap_client_int;
|
||||
|
||||
try {
|
||||
$o = new StdClass;
|
||||
$o->login = $login;
|
||||
$o->ref = $ref;
|
||||
$o->nomFic = $nomFic;
|
||||
|
||||
$O = $ws_soap_client_int->__call('getListeFichierSurv', array($o));
|
||||
|
||||
return $O->getListeFichierSurvResult->result;
|
||||
} catch (SoapFault $f) {
|
||||
require_once 'soaperror.php';
|
||||
processSoapFault($ws_soap_client_int, $f, $_SESSION['tabInfo']);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------- //
|
||||
// scoresws_rechercheHisto
|
||||
// -------------------------------------------------------------------------- //
|
||||
function scoresws_rechercheHisto($recherche, $annee, $typeBod, $deb,
|
||||
$nbRep, $maxRep = 200, $pertinence = false)
|
||||
{
|
||||
global $ws_soap_client_int;
|
||||
|
||||
try {
|
||||
$o = new StdClass;
|
||||
$o->recherche = $recherche;
|
||||
$o->annee = $annee;
|
||||
$o->typeBod = $typeBod;
|
||||
$o->deb = $deb;
|
||||
$o->nbRep = $nbRep;
|
||||
$o->maxRep = $maxRep;
|
||||
$o->pertinence = $pertinence;
|
||||
|
||||
$O = $ws_soap_client_int->__call('rechercheHisto', array($o));
|
||||
|
||||
return $O->rechercheHistoResult->result;
|
||||
} catch (SoapFault $f) {
|
||||
require_once 'soaperror.php';
|
||||
processSoapFault($ws_soap_client_int, $f, $_SESSION['tabInfo']);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------- //
|
||||
// scoresws_getStatsUtilisateurs
|
||||
// -------------------------------------------------------------------------- //
|
||||
function scoresws_getStatsUtilisateurs($login, $mois,
|
||||
$type = 'jour', $payants = false)
|
||||
{
|
||||
global $ws_soap_client_int;
|
||||
|
||||
try {
|
||||
$o = new StdClass;
|
||||
$o->login = $login;
|
||||
$o->mois = $mois;
|
||||
$o->type = $type;
|
||||
$o->payants = $payants;
|
||||
|
||||
$O = $ws_soap_client_int->__call('getStatsUtilisateurs', array($o));
|
||||
|
||||
return $O->getStatsUtilisateursResult->result;
|
||||
} catch (SoapFault $f) {
|
||||
require_once 'soaperror.php';
|
||||
processSoapFault($ws_soap_client_int, $f, $_SESSION['tabInfo']);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------- //
|
||||
// scoresws_getListeUtilisateurs
|
||||
// -------------------------------------------------------------------------- //
|
||||
function scoresws_getListeUtilisateurs($login, $idClient = -1)
|
||||
{
|
||||
global $ws_soap_client_int;
|
||||
|
||||
try {
|
||||
$o = new StdClass;
|
||||
$o->login = $login;
|
||||
$o->idClient = $idClient;
|
||||
|
||||
$O = $ws_soap_client_int->__call('getListeUtilisateurs', array($o));
|
||||
|
||||
return $O->getListeUtilisateursResult->result;
|
||||
} catch (SoapFault $f) {
|
||||
require_once 'soaperror.php';
|
||||
processSoapFault($ws_soap_client_int, $f, $_SESSION['tabInfo']);
|
||||
die();
|
||||
}
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------- //
|
||||
// scoresws_getListeSurveillancesCsv
|
||||
// -------------------------------------------------------------------------- //
|
||||
function scoresws_getListeSurveillancesCsv($source = '',
|
||||
$login = '', $idClient = 0)
|
||||
{
|
||||
global $ws_soap_client_int;
|
||||
|
||||
try {
|
||||
$o = new StdClass;
|
||||
$o->source = $source;
|
||||
$o->login = $login;
|
||||
$o->idClient = $idClient;
|
||||
|
||||
$O = $ws_soap_client_int->__call('getListeSurveillancesCsv', array($o));
|
||||
|
||||
return $O->getListeSurveillancesCsvResult->result;
|
||||
} catch (SoapFault $f) {
|
||||
require_once 'soaperror.php';
|
||||
processSoapFault($ws_soap_client_int, $f, $_SESSION['tabInfo']);
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------- //
|
||||
// scoresws_getLogsClients
|
||||
// -------------------------------------------------------------------------- //
|
||||
function scoresws_getLogsClients($mois, $detail = 0, $idClient = 0,
|
||||
$login = '', $all = 0)
|
||||
{
|
||||
global $ws_soap_client_int;
|
||||
|
||||
try {
|
||||
$o = new StdClass;
|
||||
$o->mois = $mois;
|
||||
$o->detail = $detail;
|
||||
$o->idClient = $idClient;
|
||||
$o->login = $login;
|
||||
$o->all = $all;
|
||||
|
||||
$O = $ws_soap_client_int->__call('getLogsClients', array($o));
|
||||
|
||||
return $O->getLogsClientsResult->result;
|
||||
} catch (SoapFault $f) {
|
||||
require_once 'soaperror.php';
|
||||
processSoapFault($ws_soap_client_int, $f, $_SESSION['tabInfo']);
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------- //
|
||||
// scoresws_getPortefeuilleCsv
|
||||
// -------------------------------------------------------------------------- //
|
||||
function scoresws_getPortefeuilleCsv($login, $idClient = 0)
|
||||
{
|
||||
global $ws_soap_client_int;
|
||||
|
||||
try {
|
||||
$o = new StdClass;
|
||||
$o->login = $login;
|
||||
$o->idClient = $idClient;
|
||||
|
||||
$O = $ws_soap_client_int->__call('getPortefeuilleCsv', array($o));
|
||||
|
||||
return $O->getPortefeuilleCsvResult->result;
|
||||
} catch (SoapFault $f) {
|
||||
require_once 'soaperror.php';
|
||||
processSoapFault($ws_soap_client_int, $f, $_SESSION['tabInfo']);
|
||||
exit;
|
||||
}
|
||||
}
|
@ -1,7 +1,6 @@
|
||||
<?php
|
||||
require_once 'scoresws/scoresws-int.php';
|
||||
$tabData =
|
||||
scoresws_getStatsUtilisateurs($_REQUEST['login'],
|
||||
$ws = new WsScores();
|
||||
$tabData = $ws->getStatsUtilisateurs($_REQUEST['login'],
|
||||
$_REQUEST['mois'],
|
||||
$_REQUEST['vue'],
|
||||
$_REQUEST['payant']);
|
||||
|
@ -19,8 +19,8 @@ if ($nomFic == '') {
|
||||
$file2 = $file.'.bz2';
|
||||
if (!file_exists($file)) {
|
||||
// Génération du fichier
|
||||
require_once 'scoresws/scoresws-int.php';
|
||||
$O = scoresws_getListeFichierSurv($_SESSION['tabInfo']['login'],
|
||||
$ws = new WsScores();
|
||||
$reponse = $ws->getListeFichierSurv($_SESSION['tabInfo']['login'],
|
||||
$_SESSION['tabInfo']['prenom'],
|
||||
$nomFic);
|
||||
$page = getUrl('http://78.31.45.206/csv/'.$nomFic.'.bz2',
|
||||
|
@ -2,6 +2,7 @@
|
||||
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';
|
||||
|
||||
@ -10,26 +11,12 @@ if (hasPerm('portefeuille') == false) {
|
||||
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'];
|
||||
$idClient = $_SESSION['tabInfo']['idClient'];
|
||||
|
||||
require_once 'scoresws/scoresws-int.php';
|
||||
$res = scoresws_getPortefeuilleCsv($login, $idClient);
|
||||
$url = '';
|
||||
|
||||
if (isset($res['result']['Url']) == true) {
|
||||
$url = $res['result']['Url'];
|
||||
}
|
||||
|
||||
$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é !';
|
||||
|
@ -161,9 +161,11 @@ if (isset($_POST['submit']) == true && $_POST['submit']) {
|
||||
require 'i18n/cleanchar.php';
|
||||
$InfoEnq = cleanstring_deep($InfoEnq);
|
||||
$InfoDemande = cleanstring_deep($InfoDemande);
|
||||
|
||||
// Soumission des données au webservice
|
||||
require_once 'scoresws/scoresws-int.php';
|
||||
$result = scoresws_commandeEnquete($siren, $InfoEnq, $InfoDemande);
|
||||
$ws = new WsScores();
|
||||
$reponse = $ws->setCmdEnquete($InfoEnq, $InfoDemande);
|
||||
|
||||
$commandeEnquete = true;
|
||||
}
|
||||
}
|
||||
@ -173,9 +175,10 @@ if ($commandeEnquete == false) {
|
||||
$etab = scoresws_identite($siret, substr($siret, 0, 9), $idEntreprise);
|
||||
|
||||
$tabInfo = $_SESSION['tabInfo'];
|
||||
|
||||
require_once 'scoresws/scoresws-int.php';
|
||||
$user = scoresws_getInfosLogin($tabInfo['login']);
|
||||
|
||||
$ws = new WsScores();
|
||||
$reponse = $ws->getInfosLogin($tabInfo['login']);
|
||||
$user = $reponse->result;
|
||||
}
|
||||
?>
|
||||
<style>
|
||||
@ -515,7 +518,7 @@ print '<form action="./?page=enquetec&siret='.$siret.
|
||||
<div class="field">
|
||||
<?php
|
||||
print '<input type="text" name="InfoUser[Identite]" value="'.
|
||||
$user['nom'].' '.$user['prenom'].'"/>';
|
||||
$user->nom.' '.$user->prenom.'"/>';
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
@ -528,7 +531,7 @@ print '<form action="./?page=enquetec&siret='.$siret.
|
||||
if (isset($_POST['InfoUser']['Tel']) == true) {
|
||||
print $_POST['InfoUser']['Tel'];
|
||||
} else {
|
||||
print $user['tel'];
|
||||
print $user->tel;
|
||||
}
|
||||
print '"/>';
|
||||
?>
|
||||
@ -543,7 +546,7 @@ print '<form action="./?page=enquetec&siret='.$siret.
|
||||
if (isset($_POST['InfoUser']['Fax']) == true) {
|
||||
print $_POST['InfoUser']['Fax'];
|
||||
} else {
|
||||
print $user['fax'];
|
||||
print $user->fax;
|
||||
}
|
||||
print '"/>';
|
||||
?>
|
||||
@ -557,8 +560,8 @@ print '<form action="./?page=enquetec&siret='.$siret.
|
||||
print '<input type="text" name="InfoUser[Email]" value="';
|
||||
if (isset($_POST['InfoUser']['Email']) == true) {
|
||||
print $_POST['InfoUser']['Email'];
|
||||
} else if (isset($user['mail']) == true) {
|
||||
print $user['mail'];
|
||||
} else if (isset($user->mail) == true) {
|
||||
print $user->mail;
|
||||
}
|
||||
print '"/>';
|
||||
?>
|
||||
|
@ -9,11 +9,10 @@ if ($_SESSION['connected'] == false) {
|
||||
$file2 = $file.'.bz2';
|
||||
if (file_exists($file) == false || filesize($file) == 0) {
|
||||
// Génération du fichier
|
||||
require_once 'scoresws/scoresws-int.php';
|
||||
$O = scoresws_getListeFichierSurv($_SESSION['tabInfo']['login'],
|
||||
$ws = new WsScores();
|
||||
$reponse = $ws->getListeFichierSurv($_SESSION['tabInfo']['login'],
|
||||
$_SESSION['tabInfo']['prenom'],
|
||||
$nomFic);
|
||||
|
||||
// Récupération du fichier
|
||||
$page = getUrl('http://78.31.45.206/csv/'.$nomFic.'.bz2',
|
||||
'', '', '', false);
|
||||
|
@ -171,7 +171,9 @@ print '<div id="message">'.$message.'</div>';
|
||||
// -------------------------------------------------------------------------- //
|
||||
// Formulaire
|
||||
// -------------------------------------------------------------------------- //
|
||||
$user = scoresws_getInfosLogin($tabInfo['login']);
|
||||
$ws = new WsScores();
|
||||
$reponse = $ws->getInfosLogin($tabInfo['login']);
|
||||
$user = $reponse->result;
|
||||
|
||||
print '<form action="./?page=international_enquete" method="post">'.
|
||||
'<h2>Entreprise concernée : </h2>';
|
||||
|
@ -10,8 +10,9 @@ if ($_REQUEST['submit']) {
|
||||
//@TODO : Réception du code pays
|
||||
$pays = $_SESSION['graydon']['pays'];
|
||||
|
||||
require_once 'scoresws/scoresws-int.php';
|
||||
$user = scoresws_getInfosLogin($tabInfo['login']);
|
||||
$ws = new WsScores();
|
||||
$reponse = $ws->getInfosLogin($tabInfo['login']);
|
||||
$user = $reponse->result;
|
||||
?>
|
||||
|
||||
<style>
|
||||
|
@ -3,8 +3,6 @@ if (!page_checkParams()) {
|
||||
die('Paramètres incorrects !');
|
||||
}
|
||||
|
||||
require_once 'scoresws/scoresws-int.php';
|
||||
|
||||
define('CREDITSAFE_WS_URL',
|
||||
'https://www.creditsafe.fr/getdata/service/CSFRServices.asmx');
|
||||
define('CREDITSAFE_WS_URI' , 'https://www.creditsafe.fr/getdata/service/');
|
||||
|
@ -25,9 +25,9 @@ if ($_SESSION['connected'] == false) {
|
||||
}
|
||||
|
||||
// Utilisation du WS
|
||||
require_once 'scoresws/scoresws-int.php';
|
||||
$O = scoresws_getStatsUtilisateurs($login, $mois);
|
||||
if ($O === false) {
|
||||
$ws = new WsScores();
|
||||
$reponse = $ws->getStatsUtilisateurs($login, $mois);
|
||||
if ($reponse === false) {
|
||||
die();
|
||||
}
|
||||
?>
|
||||
|
@ -12,9 +12,10 @@ if (strtolower($_SESSION['tabInfo']['login']) == 'cnasea95' ||
|
||||
$ref = $_SESSION['tabInfo']['prenom'];
|
||||
}
|
||||
|
||||
require_once 'scoresws/scoresws-int.php';
|
||||
$tabFichier = scoresws_getListeFichierSurv($_SESSION['tabInfo']['login'],
|
||||
$ws = new WsScores();
|
||||
$reponse = $ws->getListeFichierSurv($_SESSION['tabInfo']['login'],
|
||||
$ref, $nomFic);
|
||||
$tabFichier = $reponse->result->item;
|
||||
?>
|
||||
<div id="center">
|
||||
<h1>IDENTITÉ DE L'ENTREPRISE</h1>
|
||||
|
@ -25,8 +25,8 @@ $file = PATH_SITE.'/cache/survliste/'.$nomFic;
|
||||
$file2 = $file.'.bz2';
|
||||
if (file_exists($file) == false || filesize($file) == 0) {
|
||||
// Génération du fichier
|
||||
require_once 'scoresws/scoresws-int.php';
|
||||
$O = scoresws_getListeFichierSurv($_SESSION['tabInfo']['login'],
|
||||
$ws = new WsScores();
|
||||
$reponse = $ws->getListeFichierSurv($_SESSION['tabInfo']['login'],
|
||||
$_SESSION['tabInfo']['prenom'],
|
||||
$nomFic);
|
||||
$page =
|
||||
|
@ -33,8 +33,8 @@ if ($start == 1) {
|
||||
require_once 'scoresws/scorews-int.php';
|
||||
switch ($type) {
|
||||
case 'surveillance':
|
||||
$res =
|
||||
scoresws_getListeSurveillancesCsv($_POST['menuD'],
|
||||
$ws = new WsScores();
|
||||
$reponse = $ws->getListeSurveillancesCsv($_POST['menuD'],
|
||||
$_SESSION['tabInfo']['login']);
|
||||
break;
|
||||
case 'consommation':
|
||||
@ -49,17 +49,18 @@ if ($start == 1) {
|
||||
if (!isset($_POST['argv'])) {
|
||||
$login = '';
|
||||
}
|
||||
$res = scoresws_getLogsClients($date, $detail, $idClient,
|
||||
$login, $tous);
|
||||
$ws = new WsScores();
|
||||
$reponse = $ws->getLogsClients($date, $detail, $idClient, login, $tous);
|
||||
break;
|
||||
case 'portefeuille':
|
||||
$login = $_SESSION['tabInfo']['login'];
|
||||
$idClient = $_SESSION['tabInfo']['idClient'];
|
||||
$res = scoresws_getPortefeuilleCsv($login, $idClient);
|
||||
$ws = new WsScores();
|
||||
$reponse = $ws->getPortefeuilleCsv($login, $idClient);
|
||||
break;
|
||||
}
|
||||
if (isset($res->Url) == true) {
|
||||
$return = $res->Url;
|
||||
if (!empty($reponse->result->Url)) {
|
||||
$return = $reponse->result->Url;
|
||||
} else {
|
||||
$return = 'FALSE';
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user