ws-2.0: un gros morceau en cours de test suite
This commit is contained in:
parent
9cbaec84b5
commit
bf9e6796df
@ -1,21 +1,12 @@
|
||||
<?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
|
||||
$listeClients = scoresws_getListeClients($idClient);
|
||||
?>
|
||||
<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;}
|
||||
@ -79,66 +70,67 @@ try {
|
||||
*/
|
||||
?>
|
||||
<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 (is_array($listeClients) && 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 : <?=$cl->filtres_ip?><br/>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="lien">
|
||||
<a title="Droits" href="">Droits</a>
|
||||
<span class="cadreinfo">
|
||||
<div class="lien">
|
||||
<a title="Droits" href="">Droits</a>
|
||||
<span class="cadreinfo">
|
||||
|
||||
</span>
|
||||
</div>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
</td>
|
||||
<td>
|
||||
<?php
|
||||
if ($client['actif']=='Oui'){
|
||||
?>
|
||||
<a href="">
|
||||
<img src="/img/pngtrans/editer.png" title="Editer" width="16" height="16"/>
|
||||
</a>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
</td>
|
||||
<td>
|
||||
<?php
|
||||
if ($cl->actif == 'Oui') {
|
||||
?>
|
||||
<a href="">
|
||||
<img src="/img/pngtrans/editer.png" title="Editer"
|
||||
width="16" height="16"/>
|
||||
</a>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -59,21 +59,21 @@ function getClient($pays, $service)
|
||||
// -------------------------------------------------------------------------- //
|
||||
// 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()).
|
||||
htmlspecialchars($gclient->__getLastRequest()).
|
||||
'\n\nReponse: '.
|
||||
htmlspecialchars($client->__getLastResponse()));
|
||||
htmlspecialchars($gclient->__getLastResponse()));
|
||||
print 'Une erreur s\'est produite';
|
||||
print 'Un courriel a été envoyé à l\'administrateur.';
|
||||
print 'Veuillez essayer ultérieurement.';
|
||||
@ -85,16 +85,16 @@ function giantErreurSoap(&$client, &$faute, $debug = false)
|
||||
// -------------------------------------------------------------------------- //
|
||||
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);
|
||||
}
|
||||
|
||||
$status = $O->Order->OrderStatus;
|
||||
@ -104,9 +104,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;
|
||||
|
@ -1,40 +1,37 @@
|
||||
<?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 'default/_includes/mysql.php';
|
||||
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,37 @@
|
||||
<?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.";
|
||||
}
|
||||
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;
|
||||
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,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,6 +1,6 @@
|
||||
<?php
|
||||
require_once 'common/curl.php';
|
||||
require_once 'infogreffe/kbis.php';
|
||||
require_once 'scoresws/scoresws-int.php';
|
||||
|
||||
$siret = isset($_REQUEST['siret']) ? $_REQUEST['siret'] : '';
|
||||
$start = isset($_REQUEST['start']) ? $_REQUEST['start'] : 0;
|
||||
@ -45,7 +45,6 @@ if ($start > 0 && $start < 3) {
|
||||
' target="_blank" href="/?page=actes&siret='.$siret.
|
||||
'&ref=kbis">Visualiser le Kbis'.
|
||||
' <img src="/img/icone_pdf.gif"></a></u>';
|
||||
require_once 'scoresws/scoresws-int.php';
|
||||
scoresws_setLog('kbis', $_REQUEST['siret'], 0, 'direct');
|
||||
} else {
|
||||
// Le fichier n'existe pas sur l'extranet
|
||||
|
@ -2,118 +2,100 @@
|
||||
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
|
||||
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;
|
||||
}
|
||||
|
||||
|
@ -1,41 +1,40 @@
|
||||
<?
|
||||
|
||||
ini_set('soap.wsdl_cache_enabled', 1);
|
||||
|
||||
class MTva {
|
||||
|
||||
public $vatNumber=''; // Numéro de TVA retourné
|
||||
public $vatDefined=false; // Le numéro de TVA est il validé ?
|
||||
public $errnum=0; // Numéro de l'erreur en cas d'erreur
|
||||
public $errmsg=''; // Message de l'erreur en cas d'erreur
|
||||
class MTva
|
||||
{
|
||||
public $vatNumber = ''; // Numéro de TVA retourné
|
||||
public $vatDefined = false; // Le numéro de TVA est il validé ?
|
||||
public $errnum = 0; // Numéro de l'erreur en cas d'erreur
|
||||
public $errmsg = ''; // Message de l'erreur en cas d'erreur
|
||||
|
||||
private $siren;
|
||||
|
||||
function __construct($siren) {
|
||||
$this->siren=$siren;
|
||||
$client = new SoapClient('http://ws.scores-decisions.com/entreprise/vat.wsdl',
|
||||
array( 'trace' => 1, 'soap_version' => SOAP_1_1,
|
||||
'login' => 'TESTTVA', 'password' => 'TVATESTPW'));
|
||||
try {
|
||||
$O = $client->getCompanyVat($this->siren);
|
||||
if ($O->error->errnum) {
|
||||
//echo 'Erreur : '. $O->error->errmsg .' ('. $O->error->errnum .")\n";
|
||||
//echo $client->__getLastResponse()."\n";
|
||||
$this->errnum=$O->error->errnum;
|
||||
$this->errmsg=$O->error->errmsg;
|
||||
return false;
|
||||
} else {
|
||||
$val=$O->result;
|
||||
$this->vatNumber=$val->vatNumber;
|
||||
$this->vatDefined=$val->vatDefined;
|
||||
}
|
||||
} catch (SoapFault $fault) {
|
||||
include_once(realpath(dirname(__FILE__).'/../').'/soaperror.php');
|
||||
processSoapFault($client,$fault,$tabInfo);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
private $siren;
|
||||
|
||||
function __construct($siren) {
|
||||
$this->siren = $siren;
|
||||
$client =
|
||||
new SoapClient('http://ws.scores-decisions.com/entreprise/vat.wsdl',
|
||||
array('trace' => 1,
|
||||
'soap_version' => SOAP_1_1,
|
||||
'login' => 'TESTTVA',
|
||||
'password' => 'TVATESTPW'));
|
||||
|
||||
try {
|
||||
$O = $client->getCompanyVat($this->siren);
|
||||
if ($O->error->errnum) {
|
||||
$this->errnum = $O->error->errnum;
|
||||
$this->errmsg = $O->error->errmsg;
|
||||
return false;
|
||||
} else {
|
||||
$val = $O->result;
|
||||
$this->vatNumber = $val->vatNumber;
|
||||
$this->vatDefined = $val->vatDefined;
|
||||
}
|
||||
} catch (SoapFault $fault) {
|
||||
include_once(realpath(dirname(__FILE__).'/../').'/soaperror.php');
|
||||
processSoapFault($client, $fault, $tabInfo);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
?>
|
||||
|
@ -1,86 +1,68 @@
|
||||
<?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
|
||||
*/
|
||||
require_once 'scoresws/scoresws.php';
|
||||
$O = scoresws_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);
|
||||
}
|
||||
require_once 'scoresws/scoresws-int.php';
|
||||
$O = scoresws_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>
|
||||
|
@ -4,95 +4,114 @@ 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);
|
||||
require_once 'scoresws/scoresws-int.php';
|
||||
$tabMandataires = scoresws_getMandataire($idMandataire);
|
||||
if ($tabMandataires === false) {
|
||||
$message = 'Une erreur est survenue durant la recherche de mandataire.';
|
||||
}
|
||||
} 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é
|
||||
require_once 'scoresws/scoresws-int.php';
|
||||
$codeCourAppel = scoresws_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
|
||||
require_once 'scoresws/scoresws.php';
|
||||
$o = new StdClass;
|
||||
$o->tabTypes = array('C', 'I', 'G');
|
||||
$tribunaux = $ws_soap_client_ent->__call('getTribunaux', array($o));
|
||||
} 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 +120,16 @@ 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 $code => $lib) {
|
||||
if ($tabMandataires['tribunal'] == $code || $code == $tribunal) {
|
||||
$select = ' selected';
|
||||
} else {
|
||||
$select = '';
|
||||
}
|
||||
if (strlen($lib) > 39) {
|
||||
$lib = substr($lib, 0, 41).'...';
|
||||
}
|
||||
print '<option value="'.$code.'"'.$select.'>'.$lib.'</option>';
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
@ -116,90 +138,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,168 +1,129 @@
|
||||
<?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']);
|
||||
}
|
||||
return $idanResult;
|
||||
require_once 'scoresws/scoresws-int.php';
|
||||
switch ($subaction) {
|
||||
case 'deleteDialog':
|
||||
$idan = $params[2];
|
||||
$siret = $params[3];
|
||||
?>
|
||||
<div id="result">
|
||||
Êtes-vous sur de vouloir supprimer l'annonce <?=$idan?> ?
|
||||
</div>
|
||||
<form name="deleteDialog">
|
||||
<input type="hidden" name="idan" value="<?=$idan?>" />
|
||||
<input type="hidden" name="siret" value="<?=$siret?>" />
|
||||
</form>
|
||||
<?php
|
||||
break;
|
||||
case 'copyDialog':
|
||||
$idan = $params[2];
|
||||
$siret = $params[3];
|
||||
?>
|
||||
<div id="result">
|
||||
Affecte l'annonce <?=$idan?> de <?=$siret?> sur un nouveau siren.
|
||||
</div>
|
||||
<br/>
|
||||
<form name="copyDialog">
|
||||
<input type="hidden" name="idan" value="<?=$idan?>" />
|
||||
Siren / Siret : <input type="text" name="siret" value="" />
|
||||
</form>
|
||||
<?php
|
||||
break;
|
||||
case 'editDialog':
|
||||
$inEditDialog = true;
|
||||
$idan = $params[2];
|
||||
$siret = $params[3];
|
||||
$siren = substr($siret, 0, 9);
|
||||
$nic = substr($siret, 10, 5);
|
||||
if (empty($idan) == false) {
|
||||
$idanResult = scoresws_getAnnonceCollecte($idan, $siret);
|
||||
// Limitation des événements
|
||||
$eventLimits = array('5500');
|
||||
foreach ($eventLimits as $eventLimit) {
|
||||
if (in_array($eventLimit, $idanResult['even']) &&
|
||||
$idanResult['source'] == 'JT') {
|
||||
print '<link rel="stylesheet" type="text/css" media="all"'.
|
||||
' href="css/saisie.css"/>';
|
||||
print '<script type="text/javascript" src="js/saisieajax.js">'.
|
||||
'</script>';
|
||||
print '<form id="saisie" name="saisie" action='.
|
||||
'"/?page=saisieajax&q=annonces/edit" method="post">';
|
||||
print '<input type="hidden" name="siret" value="'.$siret.'"/>';
|
||||
print '<input type="hidden" name="idan" value="'.$idan.'">';
|
||||
// Mapper idanResult dans le tableau de saisie
|
||||
require_once 'common/dates.php';
|
||||
$saisie =
|
||||
array('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)),
|
||||
'numParution' => isset($_SESSION['numParution']) ?
|
||||
$_SESSION['numParution'] : '',
|
||||
'dateJugement' =>
|
||||
$wdate->dateT('Y-m-d', 'd/m/Y',
|
||||
$idanResult['dateEffetFinP']),
|
||||
'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']));
|
||||
$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']);
|
||||
}
|
||||
require_once realpath(dirname(__FILE__)).'/constantes.php';
|
||||
require_once realpath(dirname(__FILE__)).
|
||||
'/saisie_form_event.php';
|
||||
print '</form>';
|
||||
print '<script>';
|
||||
print "$('form#saisie').bind('submit', function() {
|
||||
var options = {
|
||||
target: '#saisie',
|
||||
beforeSubmit: function(formData){},
|
||||
success: function(data) {
|
||||
$('#saisie').html(data);
|
||||
}
|
||||
};
|
||||
$(this).ajaxSubmit(options);
|
||||
return false;
|
||||
});";
|
||||
print '</script>';
|
||||
break;
|
||||
} else {
|
||||
$message = "Source : ".$idanResult['source']."<br/>";
|
||||
$message .= "Evénement(s) non éditable : <br/>";
|
||||
foreach ($idanResult['even'] as $code => $event) {
|
||||
$message .= $code." - ".$event."<br/>";
|
||||
}
|
||||
print $message;
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 'delete':
|
||||
$idan = $_REQUEST['idan'];
|
||||
$siret = $_REQUEST['siret'];
|
||||
print scoresws_supprAnnonceCollecte($idan, $siret);
|
||||
break;
|
||||
case 'copy':
|
||||
$idan = $_REQUEST['idan'];
|
||||
$siret = str_replace(' ', '', $_REQUEST['siret']);
|
||||
print scoresws_dupliqueAnnonceCollecte($idan, $siret);
|
||||
break;
|
||||
case 'edit':
|
||||
$idan = $_REQUEST['idan'];
|
||||
$siret = isset($_REQUEST['siret']) ? $_REQUEST['siret'] : '';
|
||||
require_once realpath(dirname(__FILE__)).'/saisie_save.php';
|
||||
print saisie_save($siret, '', $tabInfo);
|
||||
print '<br/>';
|
||||
print scoresws_supprAnnonceCollecte($idan, $siret);
|
||||
break;
|
||||
}
|
||||
|
||||
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 ){
|
||||
$output = 'Annonce '.$idan.' supprimé !';
|
||||
} elseif ( isset($error) && $error['errNum'] != 0 ) {
|
||||
$output = 'Erreur lors de la suppression.';
|
||||
} else {
|
||||
$output = "Une erreur est survenue...";
|
||||
}
|
||||
return $output;
|
||||
}
|
||||
|
||||
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 ){
|
||||
$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;
|
||||
}
|
||||
|
||||
switch ( $subaction ) {
|
||||
case 'deleteDialog':
|
||||
$idan = $params[2];
|
||||
$siret = $params[3];
|
||||
?>
|
||||
<div id="result">
|
||||
Êtes-vous sur de vouloir supprimer l'annonce <?=$idan?> ?
|
||||
</div>
|
||||
<form name="deleteDialog">
|
||||
<input type="hidden" name="idan" value="<?=$idan?>" />
|
||||
<input type="hidden" name="siret" value="<?=$siret?>" />
|
||||
</form>
|
||||
<?php
|
||||
break;
|
||||
case 'copyDialog':
|
||||
$idan = $params[2];
|
||||
$siret = $params[3];
|
||||
?>
|
||||
<div id="result">
|
||||
Affecte l'annonce <?=$idan?> de <?=$siret?> sur un nouveau siren.
|
||||
</div>
|
||||
<br/>
|
||||
<form name="copyDialog">
|
||||
<input type="hidden" name="idan" value="<?=$idan?>" />
|
||||
Siren / Siret : <input type="text" name="siret" value="" />
|
||||
</form>
|
||||
<?php
|
||||
break;
|
||||
case 'editDialog':
|
||||
$inEditDialog = true;
|
||||
$idan = $params[2];
|
||||
$siret = $params[3]; FB::log($siret, 'siret');
|
||||
$siren = substr($siret,0,9); FB::log($siren, 'siren');
|
||||
$nic = substr($siret,10,5);
|
||||
if ( !empty($idan) ) {
|
||||
$idanResult = getAnnonceCollecte($idan, $siret);
|
||||
FB::log($idanResult, 'result');
|
||||
//Limitation des événements
|
||||
$eventLimits = array('5500');
|
||||
foreach ( $eventLimits as $eventLimit ) {
|
||||
if ( in_array($eventLimit, $idanResult['even']) && $idanResult['source']=='JT' ) {
|
||||
echo '<link rel="stylesheet" type="text/css" media="all" href="css/saisie.css"/>';
|
||||
echo '<script type="text/javascript" src="js/saisieajax.js"></script>';
|
||||
echo '<form id="saisie" name="saisie" action="/?page=saisieajax&q=annonces/edit" method="post">';
|
||||
echo '<input type="hidden" name="siret" value="'.$siret.'"/>';
|
||||
echo '<input type="hidden" name="idan" value="'.$idan.'">';
|
||||
//Mapper idanResult dans le tableau de saisie
|
||||
require_once 'common/dates.php';
|
||||
$saisie = array(
|
||||
'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)),
|
||||
'numParution' => isset($_SESSION['numParution']) ? $_SESSION['numParution'] : '',
|
||||
'dateJugement' => WDate::dateT('Y-m-d', 'd/m/Y', $idanResult['dateEffetFinP']),
|
||||
'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']),
|
||||
);
|
||||
$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'],
|
||||
);
|
||||
}
|
||||
require_once realpath(dirname(__FILE__)).'/constantes.php';
|
||||
require_once realpath(dirname(__FILE__)).'/saisie_form_event.php';
|
||||
echo '</form>';
|
||||
echo '<script>';
|
||||
echo "$('form#saisie').bind('submit', function(){
|
||||
var options = {
|
||||
target: '#saisie',
|
||||
beforeSubmit: function(formData){},
|
||||
success: function(data){
|
||||
$('#saisie').html(data);
|
||||
}
|
||||
};
|
||||
$(this).ajaxSubmit(options);
|
||||
return false;
|
||||
});";
|
||||
echo '</script>';
|
||||
break;
|
||||
} else {
|
||||
$message = "Source : ".$idanResult['source']."<br/>";
|
||||
$message.= "Evénement(s) non éditable : <br/>";
|
||||
foreach($idanResult['even'] as $code => $event){
|
||||
$message.= $code." - ".$event."<br/>";
|
||||
}
|
||||
echo $message;
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 'delete':
|
||||
$idan = $_REQUEST['idan'];
|
||||
$siret = $_REQUEST['siret'];
|
||||
echo supprAnnonceCollecte($idan, $siret);
|
||||
break;
|
||||
case 'copy':
|
||||
$idan = $_REQUEST['idan'];
|
||||
$siret = str_replace(' ','',$_REQUEST['siret']);
|
||||
echo dupliqueAnnonceCollecte($idan, $siret);
|
||||
break;
|
||||
case 'edit':
|
||||
$idan = $_REQUEST['idan'];
|
||||
$siret = isset($_REQUEST['siret']) ? $_REQUEST['siret'] : '';
|
||||
require_once realpath(dirname(__FILE__)).'/saisie_save.php';
|
||||
echo saisie_save($siret, '', $tabInfo);
|
||||
echo '<br/>';
|
||||
echo supprAnnonceCollecte($idan, $siret);
|
||||
break;
|
||||
}
|
@ -1,37 +1,43 @@
|
||||
<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>Raison Sociale</label>
|
||||
<?php
|
||||
echo $etab['Nom'];
|
||||
if ($etab['Nom2']<>'') echo ' / '.$etab['Nom2'];
|
||||
?>
|
||||
<label>Raison Sociale</label>
|
||||
<?php
|
||||
print $etab['Nom'];
|
||||
if ($etab['Nom2'] != '') {
|
||||
print ' / '.$etab['Nom2'];
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
if ($etab['Enseigne']<>'' && $etab['Sigle']<>'') {
|
||||
$titre = 'Enseigne / Sigle';
|
||||
$lib = $etab['Enseigne'].' / '.$etab['Sigle'];
|
||||
} elseif ($etab['Enseigne']<>'' && $etab['Sigle']=='') {
|
||||
$titre = 'Enseigne';
|
||||
$lib = $etab['Enseigne'];
|
||||
} elseif ($etab['Enseigne']=='' && $etab['Sigle']<>''){
|
||||
$titre='Sigle'; $lib=$etab['Sigle'];
|
||||
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='';
|
||||
$titre = '';
|
||||
}
|
||||
$siteWeb = '';
|
||||
if (substr($etab['Web'],0,7)<>'http://')
|
||||
$siteWeb='http://'.$etab['Web'];
|
||||
else
|
||||
$siteWeb=$etab['Web'];
|
||||
?>
|
||||
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>
|
||||
@ -39,42 +45,61 @@ else
|
||||
|
||||
<h2>Raison sociale et coordonnées</h2>
|
||||
|
||||
<form name="form_saisie" action="./?page=saisie" method="post" enctype="multipart/form-data">
|
||||
<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']?>"/>
|
||||
|
||||
<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?>" />
|
||||
<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]">
|
||||
<?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>";
|
||||
require_once 'scoress/scoresws.php';
|
||||
$O = $ws_soap_client_ent->__call('getDevise', array());
|
||||
$liste = $O->getDevise->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).'...';
|
||||
}
|
||||
print "<option value=\"$iso\" $sel >$lib</option>";
|
||||
}
|
||||
if (!$selOne) {
|
||||
print '<option value="0000" selected>-</option>';
|
||||
}
|
||||
if (!$selOne) echo '<option value="0000" selected>-</option>';
|
||||
?>
|
||||
</select>
|
||||
|
||||
@ -88,41 +113,54 @@ 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>
|
||||
<div id="formParticipation">
|
||||
<label>Siren participation</label>
|
||||
<input type="text" name="particip[siren]" size="8" maxlength="12" value="" />
|
||||
<label>à</label>
|
||||
<label>Pourcentage</label><input class="percent" type="text" name="particip[pct]" size="3" maxlength="5" value="" /><span class="left">%</span>
|
||||
<label> Major. / </label><input type="radio" class="widthauto" name="particip[majMin]" value="maj" />
|
||||
<label> Minor.</label><input type="radio" class="widthauto" name="particip[majMin]" value="min" />
|
||||
<label>au DateMAJ</label><input type="text" class="date" name="particip[dateMAJ]" size="10" maxlength="10" value="" />
|
||||
<span class="left">(Format JJ/MM/AAAA)</span>
|
||||
<label>Pays</label><select name="particip[pays]"><?=$strSelectPays?></select>
|
||||
<label>Raison sociale</label>
|
||||
<input type="text" name="particip[nom]" size="35" maxlength="80" value=""/>
|
||||
<span class="left"> si étranger</span>
|
||||
<label>Siren participation</label>
|
||||
<input type="text" name="particip[siren]" size="8" maxlength="12"
|
||||
value="" />
|
||||
<label>à</label>
|
||||
<label>Pourcentage</label><input class="percent" type="text"
|
||||
name="particip[pct]" size="3" maxlength="5" value="" />
|
||||
<span class="left">%</span>
|
||||
<label> Major. / </label><input type="radio"
|
||||
class="widthauto" name="particip[majMin]" value="maj" />
|
||||
<label> Minor.</label><input type="radio" class="widthauto"
|
||||
name="particip[majMin]" value="min" />
|
||||
<label>au DateMAJ</label><input type="text" class="date"
|
||||
name="particip[dateMAJ]" size="10" maxlength="10" value="" />
|
||||
<span class="left">(Format JJ/MM/AAAA)</span>
|
||||
<label>Pays</label>
|
||||
<select name="particip[pays]"><?=$strSelectPays?></select>
|
||||
<label>Raison sociale</label>
|
||||
<input type="text" name="particip[nom]" size="35" maxlength="80" value=""/>
|
||||
<span class="left"> si étranger</span>
|
||||
</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]">
|
||||
@ -149,10 +187,9 @@ require_once realpath(dirname(__FILE__)).'/saisie_form_event.php';
|
||||
|
||||
|
||||
<?php
|
||||
if($etab['FJ'][0]==1)
|
||||
{
|
||||
if ($etab['FJ'][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
|
||||
@ -160,4 +197,4 @@ if($etab['FJ'][0]==1)
|
||||
?>
|
||||
<p class="submit"><input type="submit" name="submit" value="Sauver"/></p>
|
||||
|
||||
</form>
|
||||
</form>
|
||||
|
@ -1,30 +1,18 @@
|
||||
<label>Source <font color="Red">*</font></label>
|
||||
<select name="jugement[source]">
|
||||
<?php
|
||||
$select = '';
|
||||
if (isset($saisie['source']) == false || $saisie['source'] == 'TS') {
|
||||
$select = 'selected';
|
||||
}
|
||||
?>
|
||||
<option value="TS" <?=$select?>>Tribunal via CCI</option>
|
||||
<?php
|
||||
$select = '';
|
||||
if ( $saisie['source']=='TD' ){ $select = 'selected'; }
|
||||
?>
|
||||
<option value="TD" <?=$select?>>Tribunal directement</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'];
|
||||
$select = (isset($saisie['source']) == false || $saisie['source'] == 'TS') ?
|
||||
'selected' : '';
|
||||
print '<option value="TS" '.$select.'>Tribunal via CCI</option>';
|
||||
$select = ($saisie['source'] == 'TD') ? 'selected' : '';
|
||||
print '<option value="TD" '.$select.'>Tribunal directement</option>';
|
||||
$select = ($saisie['source'] == 'TA') ? 'selected' : '';
|
||||
print '<option value="TA" '.$select.'>Tribunal via autre tiers</option>';
|
||||
$select = ($saisie['source'] == 'JT') ? 'selected' : '';
|
||||
print '<option value="JT" '.$select.'>TESSI</option>';
|
||||
|
||||
require_once 'scoresws/scoresws-int.php';
|
||||
$liste = $ws_soap_client_ent->__call('getListeJalCollecte', array());
|
||||
foreach ($liste as $id => $lib) {
|
||||
print "<option value=\"JS$id\" ";
|
||||
if ($saisie['source'] == "JS$id") {
|
||||
@ -73,8 +61,10 @@ if ($codeCmp == '') {
|
||||
}
|
||||
}
|
||||
|
||||
$tmp = $client->getTribunaux(array('C', 'I', 'G', 'M', 'P'));
|
||||
$liste = $tmp['result'];
|
||||
require_once 'scoresws/scoresws.php';
|
||||
$o = new StdClass;
|
||||
$o->tabTypes = array('C', 'I', 'G', 'M', 'P');
|
||||
$liste = $ws_soap_client_ent->__call('getTribunaux', array($o));
|
||||
asort($liste);
|
||||
foreach ($liste as $code => $lib) {
|
||||
if (strlen($lib) > 39) {
|
||||
@ -95,7 +85,7 @@ foreach ($liste as $code => $lib) {
|
||||
<?php
|
||||
$eventNum = isset($saisie['eventNum']) ? $saisie['eventNum'] : '0000';
|
||||
asort($tabEvent);
|
||||
foreach($tabEvent as $key => $event) {
|
||||
foreach ($tabEvent as $key => $event) {
|
||||
$select = '';
|
||||
if (in_array($key, $saisie['even'])) {
|
||||
$select = 'selected';
|
||||
|
@ -1,105 +1,104 @@
|
||||
<?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)
|
||||
{
|
||||
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'];
|
||||
|
||||
//Vente et Cession evénement 5500
|
||||
if ( isset($perimetreVente) && count($perimetreVente)>0 ){
|
||||
$tabJugement['even'] = array_merge(
|
||||
$tabJugement['even'],
|
||||
$perimetreVente);
|
||||
}
|
||||
// Vente et Cession evénement 5500
|
||||
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;
|
||||
}
|
||||
}
|
||||
// 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';
|
||||
}
|
||||
}
|
||||
// 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';
|
||||
}
|
||||
}
|
||||
|
||||
//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);
|
||||
// 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);
|
||||
|
||||
$tabInfos = array(
|
||||
'identite' => $tabSaisie,
|
||||
'jugement' => $tabJugement,
|
||||
'actionnaire' => $tabActionna,
|
||||
'participation' => $tabParticip,
|
||||
'score' => $tabScore,
|
||||
);
|
||||
$tabInfos =
|
||||
array('identite' => $tabSaisie,
|
||||
'jugement' => $tabJugement,
|
||||
'actionnaire' => $tabActionna,
|
||||
'participation' => $tabParticip,
|
||||
'score' => $tabScore);
|
||||
|
||||
$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);
|
||||
}
|
||||
$message = 'Erreur lors de l\'enregistrement !';
|
||||
|
||||
$tabSaisie = array(
|
||||
'source' => $tabJugement['source'],
|
||||
'dateParution' => $tabJugement['dateParution'],
|
||||
'numParution' => $tabJugement['numParution']
|
||||
);
|
||||
require_once 'scoresws/scoresws-int.php';
|
||||
if (scoresws_setInfosEntrep($siret, $idEntreprise, $tabInfos)) {
|
||||
$message = 'Informations mises à jour !';
|
||||
}
|
||||
|
||||
$_SESSION['saisie'] = $tabSaisie;
|
||||
$tabSaisie =
|
||||
array('source' => $tabJugement['source'],
|
||||
'dateParution' => $tabJugement['dateParution'],
|
||||
'numParution' => $tabJugement['numParution']);
|
||||
|
||||
return $message;
|
||||
}
|
||||
$_SESSION['saisie'] = $tabSaisie;
|
||||
|
||||
return $message;
|
||||
}
|
||||
|
@ -1,63 +1,59 @@
|
||||
<?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;
|
||||
require_once 'scoresws/scoresws.php';
|
||||
$tableResults =
|
||||
scoresws_searchMandataires($searchStr,
|
||||
array('V', 'N', 'H', 'A', 'M'),
|
||||
$filtre);
|
||||
if ($tableResults === false) {
|
||||
print 'Erreur durant la recherche';
|
||||
exit;
|
||||
}
|
||||
|
||||
$output = array();
|
||||
$output[] = array(
|
||||
'label' => "A l'adresse du bien vendu",
|
||||
'id' => 'adresse'
|
||||
);
|
||||
$output[] =
|
||||
array('label' => "A l'adresse du bien vendu",
|
||||
'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 $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);
|
||||
|
||||
//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,71 @@
|
||||
<?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
|
||||
require_once 'scoresws/scoresws-int.php';
|
||||
scoresws_setMandataire($tabMandataires);
|
||||
//}
|
||||
}
|
||||
print $message;
|
||||
|
@ -58,6 +58,27 @@ function scoresws_setInfosLogin($login, $tabInfo)
|
||||
}
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------- //
|
||||
// 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
|
||||
// -------------------------------------------------------------------------- //
|
||||
@ -113,3 +134,398 @@ function scoresws_getSurveillances($siret = 0, $source = 'annonces',
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
@ -41,9 +41,9 @@ function scoresws_identite($siret, $siren, $idEntreprise)
|
||||
$return = $O->getIdentiteResult->result;
|
||||
cache_delete();
|
||||
cache_add('etab', $return);
|
||||
} catch (SoapFault $fault) {
|
||||
} catch (SoapFault $f) {
|
||||
require_once 'soaperror.php';
|
||||
processSoapFault($ws_soap_client_ent, $fault, $_SESSION['tabInfo']);
|
||||
processSoapFault($ws_soap_client_ent, $f, $_SESSION['tabInfo']);
|
||||
$return = false;
|
||||
}
|
||||
}
|
||||
@ -79,9 +79,9 @@ function scoresws_identitelight($siret, $siren, $idEntreprise)
|
||||
$return = $O->getIdentiteLightResult->result;
|
||||
cache_delete();
|
||||
cache_add('etab', $return);
|
||||
} catch (SoapFault $fault) {
|
||||
} catch (SoapFault $f) {
|
||||
require_once 'soaperror.php';
|
||||
processSoapFault($ws_soap_client_ent, $fault, $_SESSION['tabInfo']);
|
||||
processSoapFault($ws_soap_client_ent, $f, $_SESSION['tabInfo']);
|
||||
$return = false;
|
||||
}
|
||||
}
|
||||
@ -116,9 +116,9 @@ function scoresws_identite_ags($siret, $siren, $idEntreprise)
|
||||
$return = $O->getIdentiteAGSResult->result;
|
||||
cache_delete();
|
||||
cache_add('etab', $return);
|
||||
} catch (SoapFault $fault) {
|
||||
} catch (SoapFault $f) {
|
||||
require_once 'soaperror.php';
|
||||
processSoapFault($ws_soap_client_ent, $fault, $_SESSION['tabInfo']);
|
||||
processSoapFault($ws_soap_client_ent, $f, $_SESSION['tabInfo']);
|
||||
$return = false;
|
||||
}
|
||||
}
|
||||
@ -170,9 +170,9 @@ function scoresws_annonces($siret, $siren, $idEntreprise,
|
||||
$return = $O->getAnnoncesResult->result;
|
||||
cache_delete();
|
||||
cache_add('annonces', $return);
|
||||
} catch (SoapFault $fault) {
|
||||
} catch (SoapFault $f) {
|
||||
require_once 'soaperror.php';
|
||||
processSoapFault($ws_soap_client_ent, $fault, $_SESSION['tabInfo']);
|
||||
processSoapFault($ws_soap_client_ent, $f, $_SESSION['tabInfo']);
|
||||
$return = false;
|
||||
}
|
||||
}
|
||||
@ -206,9 +206,9 @@ function scoresws_infosreg($siret, $siren, $idEntreprise, $idCom)
|
||||
$return = $O->getInfosRegResult->result;
|
||||
cache_delete();
|
||||
cache_add('annonces', $return);
|
||||
} catch (SoapFault $fault) {
|
||||
} catch (SoapFault $f) {
|
||||
require_once 'soaperror.php';
|
||||
processSoapFault($ws_soap_client_ent, $fault, $_SESSION['tabInfo']);
|
||||
processSoapFault($ws_soap_client_ent, $f, $_SESSION['tabInfo']);
|
||||
$return = false;
|
||||
}
|
||||
}
|
||||
@ -298,9 +298,9 @@ function scoresws_ratios($siret, $siren, $idEntreprise, $page = 'ratios')
|
||||
'dataActif' => $dataActif,
|
||||
'dataPassif' => $dataPassif,
|
||||
'dataSIG' => $dataSIG);
|
||||
} catch (SoapFault $fault) {
|
||||
} catch (SoapFault $f) {
|
||||
require_once 'soaperror.php';
|
||||
processSoapFault($ws_soap_client_ent, $fault, $_SESSION['tabInfo']);
|
||||
processSoapFault($ws_soap_client_ent, $f, $_SESSION['tabInfo']);
|
||||
$return = false;
|
||||
}
|
||||
}
|
||||
@ -362,9 +362,9 @@ function scoresws_listeBilans($siret, $siren, $idEntreprise, $mil)
|
||||
} else {
|
||||
return array($tabBilans);
|
||||
}
|
||||
} catch (SoapFault $fault) {
|
||||
} catch (SoapFault $f) {
|
||||
require_once 'soaperror.php';
|
||||
processSoapFault($ws_soap_client_ent, $fault, $_SESSION['tabInfo']);
|
||||
processSoapFault($ws_soap_client_ent, $f, $_SESSION['tabInfo']);
|
||||
die();
|
||||
}
|
||||
}
|
||||
@ -409,9 +409,9 @@ print '</pre>';
|
||||
$return = $O->getIndiscoreResult->result;
|
||||
cache_delete();
|
||||
cache_add('etab', $return);
|
||||
} catch (SoapFault $fault) {
|
||||
} catch (SoapFault $f) {
|
||||
require_once 'soaperror.php';
|
||||
processSoapFault($ws_soap_client_ent, $fault, $_SESSION['tabInfo']);
|
||||
processSoapFault($ws_soap_client_ent, $f, $_SESSION['tabInfo']);
|
||||
$return = false;
|
||||
}
|
||||
}
|
||||
@ -450,9 +450,9 @@ print '</pre>';
|
||||
$return = $O->getListeEvenementsResult->result;
|
||||
cache_delete();
|
||||
cache_add('evens', $return);
|
||||
} catch (SoapFault $fault) {
|
||||
} catch (SoapFault $f) {
|
||||
require_once 'soaperror.php';
|
||||
processSoapFault($ws_soap_client_ent, $fault, $_SESSION['tabInfo']);
|
||||
processSoapFault($ws_soap_client_ent, $f, $_SESSION['tabInfo']);
|
||||
$return = false;
|
||||
}
|
||||
}
|
||||
@ -491,9 +491,9 @@ function scoresws_dirigeants($siret, $siren, $idEntreprise)
|
||||
$return = $O->getDirigeantsResult->result;
|
||||
cache_delete();
|
||||
cache_add('dirs', $return);
|
||||
} catch (SoapFault $fault) {
|
||||
} catch (SoapFault $f) {
|
||||
require_once 'soaperror.php';
|
||||
processSoapFault($ws_soap_client_ent, $fault, $_SESSION['tabInfo']);
|
||||
processSoapFault($ws_soap_client_ent, $f, $_SESSION['tabInfo']);
|
||||
$return = false;
|
||||
}
|
||||
}
|
||||
@ -527,9 +527,9 @@ function scoresws_liens($siret, $siren, $idEntreprise)
|
||||
$return = $O->getLiensResult->result;
|
||||
cache_delete();
|
||||
cache_add('liens', $return);
|
||||
} catch (SoapFault $fault) {
|
||||
} catch (SoapFault $f) {
|
||||
require_once 'soaperror.php';
|
||||
processSoapFault($ws_soap_client_ent, $fault, $_SESSION['tabInfo']);
|
||||
processSoapFault($ws_soap_client_ent, $f, $_SESSION['tabInfo']);
|
||||
$return = false;
|
||||
}
|
||||
}
|
||||
@ -564,9 +564,9 @@ function scoresws_banques($siret, $siren, $idEntreprise)
|
||||
$return = $O->getBanquesResult->result;
|
||||
cache_delete();
|
||||
cache_add('rbanque', $return);
|
||||
} catch (SoapFault $fault) {
|
||||
} catch (SoapFault $f) {
|
||||
require_once 'soaperror.php';
|
||||
processSoapFault($ws_soap_client_ent, $fault, $_SESSION['tabInfo']);
|
||||
processSoapFault($ws_soap_client_ent, $f, $_SESSION['tabInfo']);
|
||||
$return = false;
|
||||
}
|
||||
}
|
||||
@ -605,9 +605,9 @@ function scoresws_etablissements($siret, $siren, $idEntreprise)
|
||||
$return = $O->getListeEtablissementsResult->result;
|
||||
cache_delete();
|
||||
cache_add('etabs', $return);
|
||||
} catch (SoapFault $fault) {
|
||||
} catch (SoapFault $f) {
|
||||
require_once 'soaperror.php';
|
||||
processSoapFault($ws_soap_client_ent, $fault, $_SESSION['tabInfo']);
|
||||
processSoapFault($ws_soap_client_ent, $f, $_SESSION['tabInfo']);
|
||||
$return = false;
|
||||
}
|
||||
}
|
||||
@ -644,9 +644,9 @@ function scorews_privileges($siret, $siren, $detail, $vue)
|
||||
cache_delete();
|
||||
cache_add('privileges', $return);
|
||||
return $return;
|
||||
} catch (SoapFault $fault) {
|
||||
} catch (SoapFault $f) {
|
||||
require_once 'soaperror.php';
|
||||
processSoapFault($ws_soap_client_ent, $fault, $_SESSION['tabInfo']);
|
||||
processSoapFault($ws_soap_client_ent, $f, $_SESSION['tabInfo']);
|
||||
die();
|
||||
}
|
||||
}
|
||||
@ -680,9 +680,9 @@ function scorews_bourse($siret, $siren, $idEntreprise)
|
||||
cache_delete();
|
||||
cache_add('etab', $return);
|
||||
return $return;
|
||||
} catch (SoapFault $fault) {
|
||||
} catch (SoapFault $f) {
|
||||
require_once 'soaperror.php';
|
||||
processSoapFault($ws_soap_client_ent, $fault, $_SESSION['tabInfo']);
|
||||
processSoapFault($ws_soap_client_ent, $f, $_SESSION['tabInfo']);
|
||||
die();
|
||||
}
|
||||
}
|
||||
@ -721,9 +721,9 @@ function scorews_competences($siret, $siren, $idEntreprise, $type, $codeComm)
|
||||
cache_delete();
|
||||
cache_add('competences', $return);
|
||||
return $return;
|
||||
} catch (SoapFault $fault) {
|
||||
} catch (SoapFault $f) {
|
||||
require_once 'soaperror.php';
|
||||
processSoapFault($ws_soap_client_ent, $fault, $_SESSION['tabInfo']);
|
||||
processSoapFault($ws_soap_client_ent, $f, $_SESSION['tabInfo']);
|
||||
die();
|
||||
}
|
||||
}
|
||||
@ -757,9 +757,9 @@ function scorews_conventions($siret, $siren, $idEntreprise)
|
||||
cache_delete();
|
||||
cache_add('conventions', $return);
|
||||
return $return;
|
||||
} catch (SoapFault $fault) {
|
||||
} catch (SoapFault $f) {
|
||||
require_once 'soaperror.php';
|
||||
processSoapFault($ws_soap_client_ent, $fault, $_SESSION['tabInfo']);
|
||||
processSoapFault($ws_soap_client_ent, $f, $_SESSION['tabInfo']);
|
||||
die();
|
||||
}
|
||||
}
|
||||
@ -798,9 +798,127 @@ function scorews_marques($siret, $siren, $idEntreprise, $id)
|
||||
cache_delete();
|
||||
cache_add($label, $return);
|
||||
return $return;
|
||||
} catch (SoapFault $fault) {
|
||||
} catch (SoapFault $f) {
|
||||
require_once 'soaperror.php';
|
||||
processSoapFault($ws_soap_client_ent, $fault, $_SESSION['tabInfo']);
|
||||
processSoapFault($ws_soap_client_ent, $f, $_SESSION['tabInfo']);
|
||||
die();
|
||||
}
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------- //
|
||||
// scoresws_rechercheAnnonce
|
||||
// -------------------------------------------------------------------------- //
|
||||
function scorews_rechercheAnnonce($source, $dateAnnee,
|
||||
$numParution, $numAnnonce)
|
||||
{
|
||||
global $ws_soap_client_ent;
|
||||
|
||||
try {
|
||||
$o = new StdClass;
|
||||
$o->source = $source;
|
||||
$o->dateAnnee = $dateAnnee;
|
||||
$o->numParution = $numParution;
|
||||
$o->numAnnonce = $numAnnonce;
|
||||
|
||||
$O = $ws_soap_client_ent->__call('rechercheAnnonce', array($o));
|
||||
|
||||
return $O->rechercheAnnonceResult->result;
|
||||
} catch (SoapFault $f) {
|
||||
require_once 'soaperror.php';
|
||||
processSoapFault($ws_soap_client_ent, $f, $_SESSION['tabInfo']);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------- //
|
||||
// scoresws_setSurveillance
|
||||
// -------------------------------------------------------------------------- //
|
||||
function scorews_setSurveillance($siret, $email, $ref = '',
|
||||
$source = 'annonces',
|
||||
$delete = false, $encoursClient = 0)
|
||||
{
|
||||
global $ws_soap_client_ent;
|
||||
|
||||
try {
|
||||
$o = new StdClass;
|
||||
$o->siret = $siret;
|
||||
$o->email = $email;
|
||||
$o->ref = $ref;
|
||||
$o->source = $source;
|
||||
$o->delete = $delete;
|
||||
$o->encoursClient = $encoursClient;
|
||||
|
||||
$O = $ws_soap_client_ent->__call('setSurveillance', array($o));
|
||||
|
||||
return $O->setSurveillanceResult->result;
|
||||
} catch (SoapFault $f) {
|
||||
require_once 'soaperror.php';
|
||||
processSoapFault($ws_soap_client_ent, $f, $_SESSION['tabInfo']);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------- //
|
||||
// scoresws_setMandataire
|
||||
// -------------------------------------------------------------------------- //
|
||||
function scorews_setMandataire($tabInfos)
|
||||
{
|
||||
global $ws_soap_client_ent;
|
||||
|
||||
try {
|
||||
$o = new StdClass;
|
||||
$o->tabInfos = $tabInfos;
|
||||
|
||||
$O = $ws_soap_client_ent->__call('setMandataire', array($o));
|
||||
|
||||
return $O->setMandataireResult->result;
|
||||
} catch (SoapFault $f) {
|
||||
require_once 'soaperror.php';
|
||||
processSoapFault($ws_soap_client_ent, $f, $_SESSION['tabInfo']);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------- //
|
||||
// scoresws_getMandataire
|
||||
// -------------------------------------------------------------------------- //
|
||||
function scorews_getMandataire($idMand)
|
||||
{
|
||||
global $ws_soap_client_ent;
|
||||
|
||||
try {
|
||||
$o = new StdClass;
|
||||
$o->idMand = $idMand;
|
||||
|
||||
$O = $ws_soap_client_ent->__call('getMandataire', array($o));
|
||||
|
||||
return $O->getMandataireResult->result;
|
||||
} catch (SoapFault $f) {
|
||||
require_once 'soaperror.php';
|
||||
processSoapFault($ws_soap_client_ent, $f, $_SESSION['tabInfo']);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------- //
|
||||
// scoresws_searchMandataire
|
||||
// -------------------------------------------------------------------------- //
|
||||
function scorews_searchMandataire($nom, $type = array(), $cpDep = 0)
|
||||
{
|
||||
global $ws_soap_client_ent;
|
||||
|
||||
try {
|
||||
$o = new StdClass;
|
||||
$o->nom = $nom;
|
||||
$o->type = $type;
|
||||
$o->cpDep = $cpDep;
|
||||
|
||||
$O = $ws_soap_client_ent->__call('searchMandataire', array($o));
|
||||
|
||||
return $O->searchMandataireResult->result;
|
||||
} catch (SoapFault $f) {
|
||||
require_once 'soaperror.php';
|
||||
processSoapFault($ws_soap_client_ent, $f, $_SESSION['tabInfo']);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -1,76 +1,92 @@
|
||||
<?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)
|
||||
{
|
||||
$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 $sirenBrut) {
|
||||
$siren = strtr($sirenBrut, array(' ' => '', '.' => '', '-' => ''));
|
||||
if (strlen($sirenBrut) == 9) {
|
||||
$sirenBrut = implode(' ', str_split($sirenBrut, 3));
|
||||
}
|
||||
if (valideSiren($siren)) {
|
||||
require_once 'scoresws/scoresws.php';
|
||||
try {
|
||||
$o = new StdClass;
|
||||
$o->siren = $siren;
|
||||
$O = $ws_soap_client_int->__call('isSirenExistant', array($o));
|
||||
} catch (SoapFault $fault) {
|
||||
return $sirenBrut;
|
||||
}
|
||||
if ($O->result) {
|
||||
return '<a href="/?page=identite&siret='.$siren.
|
||||
'" title="Voir la fiche d\'identité'.
|
||||
' de cette entreprise">'.$sirenBrut.'</a>';
|
||||
}
|
||||
}
|
||||
return $sirenBrut;
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
@ -243,6 +243,7 @@ function dInfoSurveillance($listSurv, $source, $siret)
|
||||
*/
|
||||
function inSurveillance($source, $siret)
|
||||
{
|
||||
require_once 'scoresws/scoresws-int.php';
|
||||
$result = scoresws_getSurveillances($siret, $source);
|
||||
if ($result === false) {
|
||||
return false;
|
||||
@ -293,42 +294,30 @@ function inSurveillance($source, $siret)
|
||||
*/
|
||||
function setSurveillance($tabForm)
|
||||
{
|
||||
global $client;
|
||||
$siret = $tabForm['siret'];
|
||||
$email = $tabForm['email'];
|
||||
$ref = $tabForm['ref'];
|
||||
require_once 'scoresws/scoresws.php';
|
||||
|
||||
$siret = $tabForm['siret'];
|
||||
$email = $tabForm['email'];
|
||||
$ref = $tabForm['ref'];
|
||||
$source = $tabForm['source'];
|
||||
isset($tabForm['encours']) && !empty($tabForm['encours']) ?
|
||||
$encours = $tabForm['encours'] : $encours = 0;
|
||||
$encours = (empty($tabForm['encours'] == false) ? $tabForm['encours'] : 0;
|
||||
|
||||
// Vérification de l'encours (chiffres)
|
||||
if (!preg_match('/([0-9]+)/', $encours)) {
|
||||
if (preg_match('/([0-9]+)/', $encours) == false) {
|
||||
return 'Encours incorrect';
|
||||
exit;
|
||||
}
|
||||
|
||||
// Mise en surveillance pour une liste de sources
|
||||
if (is_array($source)) {
|
||||
// Mise en surveillance pour une liste de sources
|
||||
foreach ($source as $s) {
|
||||
try {
|
||||
$result =
|
||||
$client->setSurveillance($siret, $email, $ref, $s,
|
||||
false, $encours);
|
||||
$result = '';
|
||||
} catch(SoapFault $fault) {
|
||||
$result = false;
|
||||
}
|
||||
$result = scoresws_setSurveillance($siret, $email, $ref, $s,
|
||||
false, $encours);
|
||||
}
|
||||
// Mise en surveillance pour une source
|
||||
} else {
|
||||
try {
|
||||
$result =
|
||||
$client->setSurveillance($siret, $email, $ref, $source,
|
||||
false, $encours);
|
||||
$result = '';
|
||||
} catch (SoapFault $fault) {
|
||||
$result = false;
|
||||
}
|
||||
// Mise en surveillance pour une source
|
||||
$result = scoresws_setSurveillance($siret, $email, $ref, $source,
|
||||
false, $encours);
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
@ -348,12 +337,8 @@ function setSurveillance($tabForm)
|
||||
*/
|
||||
function deleteSurveillance($siret, $email, $ref, $source)
|
||||
{
|
||||
global $client;
|
||||
try {
|
||||
$result = $client->setSurveillance($siret, $email, $ref, $source, true);
|
||||
return true;
|
||||
} catch (SoapFault $fault) {
|
||||
return false;
|
||||
}
|
||||
require_once 'scoresws/scoresws.php';
|
||||
|
||||
return scoresws_setSurveillance($siret, $email, $ref, $source, true);
|
||||
}
|
||||
?>
|
||||
|
@ -55,8 +55,11 @@ function hasPerm($perm, $userInfos = '')
|
||||
if ( !preg_match('/\b'.$perm.'\b/i', $userInfos['droits'])){
|
||||
$return = false;
|
||||
}
|
||||
//Surcharger les droits
|
||||
if ( !overridePerm($perm) ){ $return = false; }
|
||||
// Surcharger les droits
|
||||
require_once 'user/override.php';
|
||||
if (overridePerm($perm) == false) {
|
||||
$return = false;
|
||||
}
|
||||
return $return;
|
||||
}
|
||||
|
||||
|
@ -1,25 +0,0 @@
|
||||
<?php
|
||||
require_once realpath(dirname(__FILE__)).'/override.php';
|
||||
require_once realpath(dirname(__FILE__)).'/permissions.php';
|
||||
require_once realpath(dirname(__FILE__)).'/preferences.php';
|
||||
require_once realpath(dirname(__FILE__)).'/profil.php';
|
||||
|
||||
function setInfosLogin($loginVu, $tabOptions){
|
||||
try {
|
||||
$O = $client->setInfosLogin($loginVu, $tabOptions);
|
||||
if ($O['result']==1) $message='Compte mis à jour !';
|
||||
} catch (SoapFault $fault) {
|
||||
require_once 'soaperror.php';
|
||||
processSoapFault($client,$fault,$tabInfo);
|
||||
$message='Erreur lors de la mise à jour du compte !';
|
||||
}
|
||||
return $message;
|
||||
}
|
||||
|
||||
|
||||
function modUser(){}
|
||||
|
||||
function newUser(){}
|
||||
|
||||
|
||||
?>
|
@ -1,74 +1,87 @@
|
||||
<?php
|
||||
require_once 'scoresws/scoresws-int.php';
|
||||
$tabData =
|
||||
scoresws_getStatsUtilisateurs($_REQUEST['login'],
|
||||
$_REQUEST['mois'],
|
||||
$_REQUEST['vue'],
|
||||
$_REQUEST['payant']);
|
||||
|
||||
$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'
|
||||
));
|
||||
|
||||
$O = $client->getStatsUtilisateurs($_REQUEST['login'], $_REQUEST['mois'], $_REQUEST['vue'], $_REQUEST['payant']);
|
||||
$tabData=$O['results'];
|
||||
|
||||
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));
|
||||
?>
|
||||
?>
|
||||
|
231
www/html2pdf.php
231
www/html2pdf.php
@ -3,124 +3,127 @@ 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) == false) {
|
||||
// Génération du fichier
|
||||
require_once 'scoresws/scoresws-int.php';
|
||||
$O = scoresws_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/ws/',
|
||||
'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 ($annonce['Bodacc'] == 'A' ||
|
||||
$annonce['Bodacc'] == 'B' ||
|
||||
$annonce['Bodacc'] == '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');
|
||||
}
|
||||
|
||||
?>
|
||||
?>
|
||||
|
@ -8,7 +8,6 @@ require_once 'index.fct.php';
|
||||
require_once 'fwk.php';
|
||||
require_once 'default/_includes/mysql.php';
|
||||
require_once 'index_auth.php';
|
||||
require_once 'user/user.php';
|
||||
|
||||
if (!isset($_REQUEST['page'])) {
|
||||
$page = 'main';
|
||||
|
@ -23,12 +23,14 @@ if (isset($_REQUEST['checkIp']) && $_REQUEST['checkIp'] == 'only') {
|
||||
$firephp->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".
|
||||
@ -53,12 +55,11 @@ if (isset($_REQUEST['checkIp']) && $_REQUEST['checkIp'] == 'only') {
|
||||
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
|
||||
@ -78,14 +79,14 @@ $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
|
||||
));
|
||||
$client =
|
||||
new SoapClient(null,
|
||||
array('trace' => 1,
|
||||
'soap_version' => SOAP_1_1,
|
||||
'location' => WEBSERVICE_URL,
|
||||
'uri' => WEBSERVICE_URI,
|
||||
'login' => $login,
|
||||
'password' => $hach));
|
||||
|
||||
if ((isset($_REQUEST['action']) && $_REQUEST['action'] == 'logon') ||
|
||||
$_SESSION['connected'] == false) {
|
||||
@ -96,48 +97,54 @@ if ((isset($_REQUEST['action']) && $_REQUEST['action'] == 'logon') ||
|
||||
$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 !');
|
||||
}
|
||||
}
|
||||
|
||||
// Récupération des infos si pas de session
|
||||
try {
|
||||
$adressIp = $_SERVER['REMOTE_ADDR'];
|
||||
$O = $client->getInfosLogin($login, $adressIp);
|
||||
$user = $O['result'];
|
||||
try {
|
||||
$adressIp = $_SERVER['REMOTE_ADDR'];
|
||||
|
||||
require_once 'scoresws/scoresws-int.php';
|
||||
$o = new StdClass;
|
||||
$o->login = $login;
|
||||
$o->ipUtilisateur = $adressIp;
|
||||
$O = $ws_soap_client_int->__call('getInfosLogin', array($o));
|
||||
|
||||
$user = $O->getInfosLoginResult->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
|
||||
$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['nbcolors'] = 16; // Duplique' de index.php
|
||||
}
|
||||
$tabInfo['user_agent'] = $tab['client_ua'];
|
||||
$tabInfo['referer1'] = $tab['client_referer'];
|
||||
@ -146,7 +153,7 @@ 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) {
|
||||
@ -155,16 +162,16 @@ if ((isset($_REQUEST['action']) && $_REQUEST['action'] == 'logon') ||
|
||||
$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;
|
||||
@ -179,88 +186,77 @@ 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 ($O->error->errnum != 0) {
|
||||
// Erreur renvoyé par le webservice
|
||||
$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) {
|
||||
if($fault->faultcode != '900') {
|
||||
require_once 'soaperror.php';
|
||||
processSoapFault($client, $fault, $tabInfo);
|
||||
}
|
||||
//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)
|
||||
{
|
||||
if($fault->faultcode!='900')
|
||||
{
|
||||
require_once 'soaperror.php';
|
||||
processSoapFault($client,$fault,$tabInfo);
|
||||
}
|
||||
$message = "Erreur 10301 : ".
|
||||
"Identifiant de connexion et/ou mot de passe incorrect !";
|
||||
|
||||
$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>';
|
||||
}
|
||||
|
||||
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');
|
||||
die();
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
?>
|
||||
|
@ -29,16 +29,6 @@ if (isset($_REQUEST['action']) == true) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 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();
|
||||
}
|
||||
?>
|
||||
|
||||
<style type="text/css">
|
||||
@ -96,48 +86,49 @@ if ($_SESSION['tabInfo']['profil'] == 'SuperAdministrateur') {
|
||||
<td class="StyleInfoLib">Référence</td>
|
||||
</tr>
|
||||
<?php
|
||||
$utilisateurs = scoresws_getListeUtilisateurs($_SESSION['tabInfo']['login']);
|
||||
foreach ($utilisateurs as $uti) {
|
||||
print '<tr class="border">';
|
||||
print '<td class="StyleInfoData">'.$uti['login'].'</td>';
|
||||
print '<td class="StyleInfoData">'.$uti->login.'</td>';
|
||||
print '<td align="center" valign="middle">';
|
||||
print '<a href="/?page=moncompte&idEntreprise='.$idEntreprise.
|
||||
'&siret='.$siret.'&login='.$uti['login'].'&idUti='.$uti['idUti'].
|
||||
'&siret='.$siret.'&login='.$uti['login'].'&idUti='.$uti->idUti.
|
||||
'&referer=administration">';
|
||||
print '<img src="/img/edit0.gif" title="Editer le profil utilisateur"'.
|
||||
' width="16" height="16"/>';
|
||||
print '</a>';
|
||||
print '<a href="Javascript:if (confirm(\'Voulez-vous supprimer le compte'.
|
||||
' de '.$uti['login'].'\')){document.location.href=\'/?page='.
|
||||
' de '.$uti->login.'\')){document.location.href=\'/?page='.
|
||||
'administration&idEntreprise='.$idEntreprise.'&siret='.$siret.
|
||||
'&action=delete&login='.$uti['login'].'&idUti='.$uti['idUti'].'\'}">';
|
||||
'&action=delete&login='.$uti->login.'&idUti='.$uti->idUti.'\'}">';
|
||||
print '<img src="/img/delete.gif" title="Supprimer le profil utilisateur"'.
|
||||
' width="11" height="11"/></a>';
|
||||
print '</td>';
|
||||
print '<td class="StyleInfoData">';
|
||||
if ($uti['actif'] == 1) {
|
||||
print '<a href="Javascript:if (confirm(\'Voulez-vous désactiver'.
|
||||
' le compte de '.$uti['login'].'\')){document.location.href='.
|
||||
' le compte de '.$uti->login.'\')){document.location.href='.
|
||||
'\'/?page=administration&idEntreprise='.$idEntreprise.
|
||||
'&siret='.$siret.'&action=unactivate&login='.$uti['login'].
|
||||
'&idUti='.$uti['idUti'].'\'}"'.
|
||||
'&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 {
|
||||
print '<a href="Javascript:if (confirm(\'Voulez-vous activer'.
|
||||
' le compte de '.$uti['login'].'\')){document.location.href='.
|
||||
' le compte de '.$uti->login.'\')){document.location.href='.
|
||||
'\'/?page=administration&idEntreprise='.$idEntreprise.
|
||||
'&siret='.$siret.'&action=activate&login='.$uti['login'].
|
||||
'&idUti='.$uti['idUti'].'\'}"'.
|
||||
'&siret='.$siret.'&action=activate&login='.$uti->login.
|
||||
'&idUti='.$uti->idUti.'\'}"'.
|
||||
' title="Activer le profil utilisateur">'.
|
||||
'<u><font color="red" >Non</font></u></a>';
|
||||
}
|
||||
print '</td>';
|
||||
print '<td class="StyleInfoData">';
|
||||
print $uti['nom'].' '.$uti['prenom'].'<br/>';
|
||||
print '<a href="mailto:'.$uti['email'].'">'.
|
||||
str_replace(';', '<br/>', $uti['email']).'</a>';
|
||||
print $uti->nom.' '.$uti->prenom.'<br/>';
|
||||
print '<a href="mailto:'.$uti->email.'">'.
|
||||
str_replace(';', '<br/>', $uti->email).'</a>';
|
||||
print '</td>';
|
||||
print '<td class="StyleInfoData">'.$uti['reference'].'</td>';
|
||||
print '<td class="StyleInfoData">'.$uti->reference.'</td>';
|
||||
print '</tr>';
|
||||
}
|
||||
?>
|
||||
|
@ -162,13 +162,9 @@ if (isset($_POST['submit']) == true && $_POST['submit']) {
|
||||
$InfoEnq = cleanstring_deep($InfoEnq);
|
||||
$InfoDemande = cleanstring_deep($InfoDemande);
|
||||
// Soumission des données au webservice
|
||||
try {
|
||||
$result = $client->commandeEnquete($siren, $InfoEnq, $InfoDemande);
|
||||
$commandeEnquete = true;
|
||||
} catch(SoapFault $fault) {
|
||||
require_once 'soaperror.php';
|
||||
processSoapFault($client, $fault, $tabInfo);
|
||||
}
|
||||
require_once 'scoresws/scoresws-int.php';
|
||||
$result = scoresws_commandeEnquete($siren, $InfoEnq, $InfoDemande);
|
||||
$commandeEnquete = true;
|
||||
}
|
||||
}
|
||||
|
||||
@ -842,14 +838,14 @@ print '<form action="./?page=enquetec&siret='.$siret.
|
||||
}
|
||||
|
||||
if ($commandeEnquete == true) {
|
||||
if($result['results']['error']['errnum'] == 0) {
|
||||
$annee = substr($result['results']['dateCommande'], 0, 4);
|
||||
$mois = substr($result['results']['dateCommande'], 4, 2);
|
||||
$jour = substr($result['results']['dateCommande'], 6, 2);
|
||||
$heure = substr($result['results']['dateCommande'], 8, 2);
|
||||
$minutes = substr($result['results']['dateCommande'], 10, 2);
|
||||
$ref = substr($result['results']['refCmde'], 1);
|
||||
$siren = $result['results']['siren'];
|
||||
if ($result->error->errnum == 0) {
|
||||
$annee = substr($result->result->dateCommande, 0, 4);
|
||||
$mois = substr($result->result->dateCommande, 4, 2);
|
||||
$jour = substr($result->result->dateCommande, 6, 2);
|
||||
$heure = substr($result->result->dateCommande, 8, 2);
|
||||
$minutes = substr($result->result->dateCommande, 10, 2);
|
||||
$ref = substr($result->result->refCmde, 1);
|
||||
$siren = $result->results->siren;
|
||||
print '<p>';
|
||||
print 'Votre demande à été prise en compte le '.
|
||||
$jour.'/'.$mois.'/'.$annee;
|
||||
@ -857,8 +853,8 @@ if ($commandeEnquete == true) {
|
||||
print 'pour le siren <b>'.$siren.'</b>.';
|
||||
print '</p>';
|
||||
} else {
|
||||
$errnum = $result['results']['error']['errnum'];
|
||||
$errmsg = $result['results']['error']['errmsg'];
|
||||
$errnum = $result->error->errnum;
|
||||
$errmsg = $result->error->errmsg;
|
||||
print '<p style="color:red;">';
|
||||
print 'Erreur n° '.$errnum.' - '.$errmsg.'.';
|
||||
print '</p>';
|
||||
|
@ -1,66 +1,47 @@
|
||||
<?php
|
||||
require_once 'common/curl.php';
|
||||
if (!$_SESSION['connected'])
|
||||
echo ('Vous devez être connecté afin de pouvoir utiliser cette fonctionnalité');
|
||||
else
|
||||
{
|
||||
if ($_SESSION['connected'] == false) {
|
||||
print 'Vous devez être connecté afin de pouvoir utiliser'.
|
||||
' cette fonctionnalité';
|
||||
} else {
|
||||
$nomFic = (isset($_REQUEST['nomFic'])) ? $_REQUEST['nomFic'] : '';
|
||||
$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'],
|
||||
$_SESSION['tabInfo']['prenom'],
|
||||
$nomFic);
|
||||
|
||||
/** 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/ws/',
|
||||
'uri' => 'http://78.31.45.206/',
|
||||
'login' => $_SESSION['tabInfo']['login'],
|
||||
'password' => $_SESSION['tabInfo']['password']
|
||||
));
|
||||
// Récupération du fichier
|
||||
$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);
|
||||
}
|
||||
|
||||
$tabInfo = $_SESSION['tabInfo'];
|
||||
$filename = basename($file);
|
||||
$body = file_get_contents($file);
|
||||
|
||||
if (isset($_REQUEST['nomFic'])) $nomFic = $_REQUEST['nomFic'];
|
||||
else $nomFic = '';
|
||||
try {
|
||||
$file = PATH_SITE.'/cache/survliste/'.$nomFic;
|
||||
$file2 = $file.'.bz2';
|
||||
if (!file_exists($file) || filesize($file)==0) {
|
||||
//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);
|
||||
}
|
||||
//Récupération du fichier
|
||||
$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);
|
||||
}
|
||||
} catch (SoapFault $fault) {
|
||||
require_once 'includes/soaperror.php';
|
||||
processSoapFault($client,$fault,$tabInfo);
|
||||
}
|
||||
|
||||
$filename=basename($file);
|
||||
$body=file_get_contents($file);
|
||||
|
||||
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/csv");
|
||||
header("Content-Length: ".strlen($body));
|
||||
header('Content-disposition: inline; filename="'.$filename.'"');// attachement or inline
|
||||
header("Accept-Ranges: ".strlen($body));
|
||||
|
||||
echo $body;
|
||||
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/csv");
|
||||
header("Content-Length: ".strlen($body));
|
||||
header('Content-disposition: inline; filename="'.$filename.'"');
|
||||
header("Accept-Ranges: ".strlen($body));
|
||||
|
||||
print $body;
|
||||
}
|
||||
?>
|
||||
?>
|
||||
|
@ -133,7 +133,7 @@ if ($con !== false) {
|
||||
|
||||
$siret = $_REQUEST['siret'];
|
||||
$siren = substr($siret, 0, 9);
|
||||
$idan = $_REQUEST['idan'];
|
||||
$idan = $_REQUEST['idan'];
|
||||
$idEntreprise = $_REQUEST['idEntreprise'];
|
||||
$source = $_REQUEST['source'];
|
||||
|
||||
@ -155,43 +155,42 @@ $message = '';
|
||||
|
||||
require_once 'common/curl.php';
|
||||
require_once 'infogreffe/infogreffe.php';
|
||||
require_once 'user/user.php';
|
||||
require_once 'scoresws/scoresws-int.php';
|
||||
require_once 'common/dates.php';
|
||||
$wdate = new WDate;
|
||||
|
||||
// Elements de session
|
||||
$tabInfo = $_SESSION['tabInfo'];
|
||||
$login = strtolower($tabInfo['login']);
|
||||
$login = strtolower($tabInfo['login']);
|
||||
if (isset($_REQUEST['rs']) == true) {
|
||||
$raisonSociale = $_REQUEST['rs'];
|
||||
} else {
|
||||
$raisonSociale = $tabInfo['entrep']['raisonSociale'];
|
||||
}
|
||||
$cj = $tabInfo['entrep']['fj'];
|
||||
$cj = $tabInfo['entrep']['fj'];
|
||||
$dep = substr(''.$tabInfo['entrep']['codeCommune'], 0, 2);
|
||||
|
||||
// Raison sociale inexacte
|
||||
if ($siren != $tabInfo['entrep']['siren']) {
|
||||
require_once 'scoresws/scoresws.php';
|
||||
$etab = scoresws_identitelight($siret, $siren, $idEntreprise);
|
||||
if (!empty($etab)) {
|
||||
if (empty($etab) == false) {
|
||||
$tabEntrep = array();
|
||||
$tabEntrep['raisonSociale'] = $etab['Nom'];
|
||||
$tabEntrep['siren'] = $etab['Siren'];
|
||||
$tabEntrep['siret'] = $etab['Siret'];
|
||||
$tabEntrep['tva'] = $etab['TvaNumero'];
|
||||
$tabEntrep['isin'] = $etab['Isin'];
|
||||
$tabEntrep['AutreId'] = $etab['AutreId'];
|
||||
$tabEntrep['active'] = $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'];
|
||||
$tabEntrep['raisonSociale'] = $etab->Nom;
|
||||
$tabEntrep['siren'] = $etab->Siren;
|
||||
$tabEntrep['siret'] = $etab->Siret;
|
||||
$tabEntrep['tva'] = $etab->TvaNumero;
|
||||
$tabEntrep['isin'] = $etab->Isin;
|
||||
$tabEntrep['AutreId'] = $etab->AutreId;
|
||||
$tabEntrep['active'] = $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'];
|
||||
$raisonSociale = $etab->Nom;
|
||||
}
|
||||
}
|
||||
print '<div id="center">';
|
||||
@ -206,11 +205,10 @@ if (($cj == 9150 || // Association syndicale libre
|
||||
$cj == 9240 || // Congrégation
|
||||
$cj == 9260 || // Association de droit local
|
||||
$cj == 9300) && // Fondation
|
||||
@$_REQUEST['force'] != true // Force le passage chez infogreffe
|
||||
$_REQUEST['force'] != true // Force le passage chez infogreffe
|
||||
) {
|
||||
if ($action == 'commande') {
|
||||
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'].';'.
|
||||
$tabInfo['login'].';'.
|
||||
@ -227,29 +225,23 @@ if (($cj == 9150 || // Association syndicale libre
|
||||
array('Ref' => $_REQUEST['reference'],
|
||||
'Tel' => $_REQUEST['tel'],
|
||||
'Email' => $_REQUEST['email']);
|
||||
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>.';
|
||||
}
|
||||
} 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.';
|
||||
$O = scoresws_commandeAsso($siren, $infoAsso, $infoDemande);
|
||||
if ($O !== false) {
|
||||
$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;
|
||||
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 = '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.';
|
||||
|
@ -2,7 +2,6 @@
|
||||
require_once 'default/_includes/mysql.php';
|
||||
require_once 'common/curl.php';
|
||||
require_once 'theme/theme.php';
|
||||
require_once 'user/user.php';
|
||||
require_once 'infogreffe/infogreffews.php';
|
||||
|
||||
// Login de l'utilisateur
|
||||
|
@ -171,12 +171,7 @@ print '<div id="message">'.$message.'</div>';
|
||||
// -------------------------------------------------------------------------- //
|
||||
// Formulaire
|
||||
// -------------------------------------------------------------------------- //
|
||||
try {
|
||||
$O = $client->getInfosLogin($tabInfo['login']);
|
||||
$user = $O['result'];
|
||||
$firephp->log($user, 'user');
|
||||
} catch (SoapFault $fault) {
|
||||
}
|
||||
$user = scoresws_getInfosLogin($tabInfo['login']);
|
||||
|
||||
print '<form action="./?page=international_enquete" method="post">'.
|
||||
'<h2>Entreprise concernée : </h2>';
|
||||
@ -207,8 +202,13 @@ if (isset($_REQUEST['pidentifier']) == true) {
|
||||
<label class="StyleInfoLib">Raison Sociale :</label>
|
||||
<div class="field">
|
||||
<input type="text" name="InfoEnq[Name]"
|
||||
value="<?php if (isset($_POST['InfoEnq']['Name'])){ print $_POST['InfoEnq']['Name'];}else{ print $name;} ?>"
|
||||
readonly="readonly"/></div>
|
||||
value="<?php
|
||||
if (isset($_POST['InfoEnq']['Name'])) {
|
||||
print $_POST['InfoEnq']['Name'];
|
||||
} else {
|
||||
print $name;
|
||||
}?>"
|
||||
readonly="readonly"/></div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
@ -224,7 +224,7 @@ if (isset($_REQUEST['pidentifier']) == true) {
|
||||
<label class="StyleInfoLib">Pays :</label>
|
||||
<div class="field">
|
||||
<input type="text" name="InfoEnq[Pays]" value="<?php print $pays;?>"
|
||||
readonly="readonly"/>
|
||||
readonly="readonly"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -233,12 +233,12 @@ if (isset($_REQUEST['pidentifier']) == true) {
|
||||
<label class="StyleInfoLib">Téléphone</label>
|
||||
<div class="field">
|
||||
<input type="text" name="InfoEnq[Telephone]"
|
||||
<?php
|
||||
if (isset($company->Telephone) == true) {
|
||||
print 'value="'.$company->Telephone.'"';
|
||||
}
|
||||
?>
|
||||
readonly="readonly"/>
|
||||
<?php
|
||||
if (isset($company->Telephone) == true) {
|
||||
print 'value="'.$company->Telephone.'"';
|
||||
}
|
||||
?>
|
||||
readonly="readonly"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -247,32 +247,40 @@ if (isset($company->Telephone) == true) {
|
||||
?>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label class="StyleInfoLib">Raison Sociale :</label>
|
||||
<div class="field"><input type="text" name="InfoEnq[Name]" value="<?php if (isset($_POST['InfoEnq']['Name'])){ print $_POST['InfoEnq']['Name'];}else{ print $name;} ?>"/></div>
|
||||
<label class="StyleInfoLib">Raison Sociale :</label>
|
||||
<div class="field">
|
||||
<input type="text" name="InfoEnq[Name]" value="<?php
|
||||
if (isset($_POST['InfoEnq']['Name'])) {
|
||||
print $_POST['InfoEnq']['Name'];
|
||||
} else {
|
||||
print $name;
|
||||
}?>"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
|
||||
$identifiers = getCompanyMatchIdentifiers($pays);
|
||||
$firephp->log($identifiers,'identifiers');
|
||||
|
||||
// Affichage des identifiants
|
||||
// Ne pas afficher l'identifiant Internal
|
||||
if(is_array($identifiers)){
|
||||
$firephp->log($identifiers,'identifiers');
|
||||
$count = 0;
|
||||
foreach($identifiers as $identifier){
|
||||
if($identifier->Type != 'Internal'){
|
||||
?>
|
||||
<div class="fieldgrp">
|
||||
<label><?php print $identifier->Description ?></label>
|
||||
<input type="text" name="InfoEnq[Identifier][<?=$identifier->Type?>]" value="<?php if (isset($_POST['InfoEnq']['Identifier'][$identifier->Type])){ print $_POST['InfoEnq']['Identifier'][$identifier->Type];} ?>" />
|
||||
</div>
|
||||
<?php
|
||||
$count++;
|
||||
}
|
||||
}
|
||||
}else{
|
||||
$identifiers = getCompanyMatchIdentifiers($pays);
|
||||
if (is_array($identifiers)) {
|
||||
$count = 0;
|
||||
foreach ($identifiers as $identifier) {
|
||||
if($identifier->Type != 'Internal') {
|
||||
print '<div class="fieldgrp">';
|
||||
print '<label>';
|
||||
print $identifier->Description;
|
||||
print '</label>';
|
||||
print '<input type="text" name="InfoEnq[Identifier]['.
|
||||
$identifier->Type.']" value="';
|
||||
if (isset($_POST['InfoEnq']['Identifier'][$identifier->Type])) {
|
||||
print $_POST['InfoEnq']['Identifier'][$identifier->Type];
|
||||
}
|
||||
print '" />';
|
||||
print '</div>';
|
||||
$count++;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
?>
|
||||
<div class="fieldgrp">
|
||||
<label> </label>
|
||||
@ -283,18 +291,35 @@ if(is_array($identifiers)){
|
||||
?>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label class="StyleInfoLib">Adresse :</label>
|
||||
<div class="field"><textarea name="InfoEnq[Adresse]"><?php if(isset($_POST['InfoEnq']['Adresse'])){print $_POST['InfoEnq']['Adresse'];}?></textarea></div>
|
||||
<label class="StyleInfoLib">Adresse :</label>
|
||||
<div class="field">
|
||||
<textarea name="InfoEnq[Adresse]">
|
||||
<?php
|
||||
if (isset($_POST['InfoEnq']['Adresse'])) {
|
||||
print $_POST['InfoEnq']['Adresse'];
|
||||
}
|
||||
?>
|
||||
</textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label class="StyleInfoLib">Pays :</label>
|
||||
<div class="field"><input type="text" name="InfoEnq[Pays]" value="<?php print $pays;?>" readonly="readonly"/></div>
|
||||
<label class="StyleInfoLib">Pays :</label>
|
||||
<div class="field">
|
||||
<input type="text" name="InfoEnq[Pays]" value="<?php print $pays;?>"
|
||||
readonly="readonly"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label class="StyleInfoLib">Téléphone</label>
|
||||
<div class="field"><input type="text" name="InfoEnq[Telephone]" value="<?php if(isset($_POST['InfoEnq']['Telephone'])){print $_POST['InfoEnq']['Telephone'];}?>"/></div>
|
||||
<label class="StyleInfoLib">Téléphone</label>
|
||||
<div class="field">
|
||||
<input type="text" name="InfoEnq[Telephone]" value="<?php
|
||||
if (isset($_POST['InfoEnq']['Telephone'])) {
|
||||
print $_POST['InfoEnq']['Telephone'];
|
||||
}
|
||||
?>"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
@ -312,22 +337,41 @@ if(is_array($identifiers)){
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label class="StyleInfoLib">Votre Identité :</label>
|
||||
<div class="field"><input type="text" name="InfoUser[Identite]" value="<?php print $user['nom'].' '.$user['prenom']; ?>"/></div>
|
||||
<div class="field"><input type="text" name="InfoUser[Identite]"
|
||||
value="<?php print $user->nom.' '.$user->prenom; ?>"/></div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label class="StyleInfoLib">Téléphone <font color="Red">*</font>:</label>
|
||||
<div class="field"><input type="text" name="InfoUser[Tel]" value="<?php if(isset($_POST['InfoUser']['Tel'])){print $_POST['InfoUser']['Tel'];}else{ print $user['tel']; }?>" /></div>
|
||||
<div class="field"><input type="text" name="InfoUser[Tel]"
|
||||
value="<?php
|
||||
if (isset($_POST['InfoUser']['Tel'])) {
|
||||
print $_POST['InfoUser']['Tel'];
|
||||
} else {
|
||||
print $user->tel;
|
||||
}?>" /></div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label class="StyleInfoLib">E-mail <font color="Red">*</font>:</label>
|
||||
<div class="field"><input type="text" name="InfoUser[Email]" value="<?php if(isset($_POST['InfoUser']['Email'])){print $_POST['InfoUser']['Email'];}else{ print $user['email']; }?>"/></div>
|
||||
<div class="field"><input type="text" name="InfoUser[Email]"
|
||||
value="<?php
|
||||
if (isset($_POST['InfoUser']['Email'])) {
|
||||
print $_POST['InfoUser']['Email'];
|
||||
} else {
|
||||
print $user->email;
|
||||
}?>"/></div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label class="StyleInfoLib">Fax :</label>
|
||||
<div class="field"><input type="text" name="InfoUser[Fax]" value="<?php if(isset($_POST['InfoUser']['Fax'])){print $_POST['InfoUser']['Fax'];}else{ print $user['fax']; }?>"/></div>
|
||||
<div class="field"><input type="text" name="InfoUser[Fax]"
|
||||
value="<?php
|
||||
if (isset($_POST['InfoUser']['Fax'])) {
|
||||
print $_POST['InfoUser']['Fax'];
|
||||
} else {
|
||||
print $user->fax;
|
||||
}?>"/></div>
|
||||
</div>
|
||||
|
||||
<h2>Enquête : </h2>
|
||||
@ -355,7 +399,7 @@ if ($countryavailability != false) {
|
||||
}
|
||||
?>
|
||||
<div class="fieldgrp">
|
||||
<label class="StyleInfoLib">Type d'enquête</label>
|
||||
<label class="StyleInfoLib">Type d'enquête</label>
|
||||
<div class="field">
|
||||
|
||||
<?php
|
||||
@ -364,7 +408,6 @@ $serviceNom = array('Normal', 'Rapide');
|
||||
foreach ($availability as $item) {
|
||||
if (in_array($item->ServiceSpeed, $serviceActif) == true) {
|
||||
$key = array_search($item->ServiceSpeed, $serviceActif);
|
||||
$firephp->log($item->ServiceSpeed, 'ServiceSpeed');
|
||||
$select = '';
|
||||
if ((isset($_POST['InfoEnq']['Servicespeed']) &&
|
||||
$_POST['InfoEnq']['Servicespeed'] == $item->ServiceSpeed) ||
|
||||
@ -372,21 +415,15 @@ foreach ($availability as $item) {
|
||||
ucfirst($_GET['speed']) == $item->ServiceSpeed)) {
|
||||
$select = 'checked';
|
||||
}
|
||||
?>
|
||||
<input type="radio" name="InfoEnq[Servicespeed]"
|
||||
value="<?=$item->ServiceSpeed?>" <?=$select?>>
|
||||
<?php
|
||||
print $serviceNom[$key];
|
||||
?>
|
||||
(Tarif : <?php print $results[0][strtolower($item->ServiceSpeed)]; ?> €,
|
||||
Délai : <?php
|
||||
if (isset($item->DaysFrom) == true) {
|
||||
print $item->DaysFrom.' à ';
|
||||
}
|
||||
print $item->DaysTo.' jours';
|
||||
?>
|
||||
) <br/>
|
||||
<?php
|
||||
print '<input type="radio" name="InfoEnq[Servicespeed]" value="'.
|
||||
$item->ServiceSpeed.'" '.$select.'>';
|
||||
print $serviceNom[$key];
|
||||
print '(Tarif : '.$results[0][strtolower($item->ServiceSpeed)].
|
||||
' €, Délai : ';
|
||||
if (isset($item->DaysFrom) == true) {
|
||||
print $item->DaysFrom.' à ';
|
||||
}
|
||||
print $item->DaysTo.' jours) <br/>';
|
||||
}
|
||||
}
|
||||
?>
|
||||
@ -395,18 +432,33 @@ foreach ($availability as $item) {
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label class="StyleInfoLib">Précisions sur la demande</label>
|
||||
<div class="field">
|
||||
<textarea name="InfoEnq[AttentionOf]"><?php if(isset($_POST['InfoEnq']['AttentionOf']) ){print $_POST['InfoEnq']['AttentionOf'];}?></textarea>
|
||||
</div>
|
||||
<label class="StyleInfoLib">Précisions sur la demande</label>
|
||||
<div class="field">
|
||||
<textarea name="InfoEnq[AttentionOf]">
|
||||
<?php
|
||||
if (isset($_POST['InfoEnq']['AttentionOf'])) {
|
||||
print $_POST['InfoEnq']['AttentionOf'];
|
||||
}
|
||||
?>
|
||||
</textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label class="StyleInfoLib">Observations ou questions spéciales</label>
|
||||
<div class="field"><textarea name="InfoEnq[SpecialRemarks]"><?php if(isset($_POST['InfoEnq']['SpecialRemarks']) ){print $_POST['InfoEnq']['SpecialRemarks'];}?></textarea></div>
|
||||
<label class="StyleInfoLib">Observations ou questions spéciales</label>
|
||||
<div class="field">
|
||||
<textarea name="InfoEnq[SpecialRemarks]">
|
||||
<?php
|
||||
if (isset($_POST['InfoEnq']['SpecialRemarks'])) {
|
||||
print $_POST['InfoEnq']['SpecialRemarks'];
|
||||
}
|
||||
?>
|
||||
</textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="submit"><p class="submit-button"><input type="submit" name="submit" value="Envoyer" /></p></div>
|
||||
<div class="submit"><p class="submit-button"><input type="submit"
|
||||
name="submit" value="Envoyer" /></p></div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
|
@ -1,28 +1,19 @@
|
||||
<?php
|
||||
if($_REQUEST['submit']){
|
||||
//Affichage de la demande
|
||||
if ($_REQUEST['submit']) {
|
||||
// Affichage de la demande
|
||||
} else {
|
||||
require_once 'dbbootstrap.php';
|
||||
require_once 'graydon/graydonws.php';
|
||||
|
||||
$tabInfo = $_SESSION['tabInfo'];
|
||||
|
||||
//@TODO : Réception du code pays
|
||||
$pays = $_SESSION['graydon']['pays'];
|
||||
|
||||
}else{
|
||||
|
||||
require_once 'dbbootstrap.php';
|
||||
require_once 'graydon/graydonws.php';
|
||||
|
||||
$tabInfo=$_SESSION['tabInfo'];
|
||||
|
||||
//@TODO : Réception du code pays
|
||||
$pays = $_SESSION['graydon']['pays'];
|
||||
|
||||
try {
|
||||
$O = $client->getInfosLogin($tabInfo['login']);
|
||||
$user = $O['result'];
|
||||
$firephp->log($user,'user');
|
||||
} catch (SoapFault $fault) {
|
||||
|
||||
}
|
||||
|
||||
require_once 'scoresws/scoresws-int.php';
|
||||
$user = scoresws_getInfosLogin($tabInfo['login']);
|
||||
?>
|
||||
|
||||
<style>
|
||||
#center { background: #ffffff; width:580px; padding:5px; }
|
||||
#center h1 { margin:5px; padding:5px; background: #606060; color:#ffffff; font: 600 1.4em arial, verdana, sans-serif; }
|
||||
@ -60,71 +51,71 @@ div.submit p.required-note span{color:#4B911C;_color:#666;font-size:170%;vertica
|
||||
#impayees {display:none;}
|
||||
#retardpaiement {display:none;}
|
||||
#litige {display:none;}
|
||||
|
||||
</style>
|
||||
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function(){
|
||||
$("#profil").change(function() {
|
||||
var val = $("#profil").val();
|
||||
if (val == 'Autre'){
|
||||
$("#autreProfil").css('display','block');
|
||||
}else{
|
||||
$("#autreProfil").css('display','none');
|
||||
}
|
||||
});
|
||||
$("#precision").change(function() {
|
||||
var val = $("#precision").val();
|
||||
if (val == '5'){
|
||||
$("#autrePrecisions").css('display','block');
|
||||
}else{
|
||||
$("#autrePrecisions").css('display','none');
|
||||
}
|
||||
if (val == '3' || val == '4'){
|
||||
$("#fournisseur").css('display','block');
|
||||
}else{
|
||||
$("#fournisseur").css('display','none');
|
||||
}
|
||||
if (val == '1'){
|
||||
$("#credit").css('display','block');
|
||||
}else{
|
||||
$("#credit").css('display','none');
|
||||
}
|
||||
});
|
||||
$("#profil").change(function() {
|
||||
var val = $("#profil").val();
|
||||
if (val == 'Autre'){
|
||||
$("#autreProfil").css('display','block');
|
||||
}else{
|
||||
$("#autreProfil").css('display','none');
|
||||
}
|
||||
});
|
||||
$("#precision").change(function() {
|
||||
var val = $("#precision").val();
|
||||
if (val == '5'){
|
||||
$("#autrePrecisions").css('display','block');
|
||||
}else{
|
||||
$("#autrePrecisions").css('display','none');
|
||||
}
|
||||
if (val == '3' || val == '4'){
|
||||
$("#fournisseur").css('display','block');
|
||||
}else{
|
||||
$("#fournisseur").css('display','none');
|
||||
}
|
||||
if (val == '1'){
|
||||
$("#credit").css('display','block');
|
||||
}else{
|
||||
$("#credit").css('display','none');
|
||||
}
|
||||
});
|
||||
|
||||
$('input[type=radio][name=InfoEnq[ImpayeesChoix]]').change(function(){
|
||||
var val = $(this).attr('value');
|
||||
if (val == 'oui'){
|
||||
$("#impayees").css('display','block');
|
||||
}else{
|
||||
$("#impayees").css('display','none');
|
||||
}
|
||||
});
|
||||
$('input[type=radio][name=InfoEnq[ImpayeesChoix]]').change(function(){
|
||||
var val = $(this).attr('value');
|
||||
if (val == 'oui'){
|
||||
$("#impayees").css('display','block');
|
||||
}else{
|
||||
$("#impayees").css('display','none');
|
||||
}
|
||||
});
|
||||
|
||||
$('input[type=radio][name=InfoEnq[RetardPaiementChoix]]').change(function(){
|
||||
var val = $(this).attr('value');
|
||||
if (val == 'oui'){
|
||||
$("#retardpaiement").css('display','block');
|
||||
}else{
|
||||
$("#retardpaiement").css('display','none');
|
||||
}
|
||||
});
|
||||
$('input[type=radio][name=InfoEnq[RetardPaiementChoix]]').change(function(){
|
||||
var val = $(this).attr('value');
|
||||
if (val == 'oui'){
|
||||
$("#retardpaiement").css('display','block');
|
||||
}else{
|
||||
$("#retardpaiement").css('display','none');
|
||||
}
|
||||
});
|
||||
|
||||
$('input[type=radio][name=InfoEnq[LitigeChoix]]').change(function(){
|
||||
var val = $(this).attr('value');
|
||||
if (val == 'oui'){
|
||||
$("#litige").css('display','block');
|
||||
}else{
|
||||
$("#litige").css('display','none');
|
||||
}
|
||||
});
|
||||
$('input[type=radio][name=InfoEnq[LitigeChoix]]').change(function(){
|
||||
var val = $(this).attr('value');
|
||||
if (val == 'oui'){
|
||||
$("#litige").css('display','block');
|
||||
}else{
|
||||
$("#litige").css('display','none');
|
||||
}
|
||||
});
|
||||
|
||||
$('input[type=text][name=InfoEnq[Encours]]').blur(function(){
|
||||
var val = $(this).val();
|
||||
if ( val > 20000){
|
||||
$('input[type=radio][name=InfoEnq[Type]]').val('gold').attr('checked', 'check');
|
||||
}else{
|
||||
$('input[type=radio][name=InfoEnq[Type]]').val('premier').attr('checked', 'check');
|
||||
}
|
||||
var val = $(this).val();
|
||||
if ( val > 20000){
|
||||
$('input[type=radio][name=InfoEnq[Type]]').val('gold').attr('checked', 'check');
|
||||
}else{
|
||||
$('input[type=radio][name=InfoEnq[Type]]').val('premier').attr('checked', 'check');
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@ -230,36 +221,50 @@ $(document).ready(function(){
|
||||
<h2>Enquête : </h2>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label class="StyleInfoLib">Type d'enquête</label>
|
||||
<label class="StyleInfoLib">Type d'enquête</label>
|
||||
<div class="field">
|
||||
<?php
|
||||
setDbConn('intersud');
|
||||
//@TODO : Réception du code pays
|
||||
$paysCode = 'DZ';
|
||||
$q = Doctrine_Query::Create()
|
||||
->select('id, intersud_country')
|
||||
->from('Country')
|
||||
->where('code = ?', $paysCode);
|
||||
->select('id, intersud_country')
|
||||
->from('Country')
|
||||
->where('code = ?', $paysCode);
|
||||
$result = $q->fetchOne();
|
||||
|
||||
$idPays = $result->id;
|
||||
|
||||
$q = Doctrine_Query::Create()
|
||||
->from('Price')
|
||||
->where('country_id = ?', $idPays);
|
||||
->from('Price')
|
||||
->where('country_id = ?', $idPays);
|
||||
$price = $q->fetchOne();
|
||||
|
||||
$q = Doctrine_Query::Create()
|
||||
->from('Delais')
|
||||
->where('country_id = ?', $idPays);
|
||||
->from('Delais')
|
||||
->where('country_id = ?', $idPays);
|
||||
$delais = $q->fetchOne();
|
||||
|
||||
if($result && $price && $delais){
|
||||
?>
|
||||
<input type="radio" name="InfoEnq[Type]" value="normal">Normal (<?php print $price->normal; ?> €, Délais : <?php if($delais->normalDe==0){ print $delais->normalA.' jours'; }else{ print $delais->normalDe.' à '.$delais->normalA.' jours'; } ?>)
|
||||
<br/>
|
||||
<input type="radio" name="InfoEnq[Type]" value="rapide">Rapide (<?php print $price->rapide; ?> €, Délais : <?php if($delais->rapideDe==0){ print $delais->rapideA.' jours'; }else{ print $delais->rapideDe.' à '.$delais->rapideA.' jours'; } ?>)
|
||||
<?php
|
||||
if ($result && $price && $delais) {
|
||||
print '<input type="radio" name="InfoEnq[Type]" value="normal">Normal (';
|
||||
print $price->normal;
|
||||
print ' €, Délais : ';
|
||||
if ($delais->normalDe == 0) {
|
||||
print $delais->normalA.' jours';
|
||||
} else {
|
||||
print $delais->normalDe.' à '.$delais->normalA.' jours';
|
||||
}
|
||||
print ')';
|
||||
print '<br/>';
|
||||
print '<input type="radio" name="InfoEnq[Type]" value="rapide">Rapide (';
|
||||
print $price->rapide;
|
||||
print ' €, Délais : ';
|
||||
if ($delais->rapideDe == 0) {
|
||||
print $delais->rapideA.' jours';
|
||||
} else {
|
||||
print $delais->rapideDe.' à '.$delais->rapideA.' jours';
|
||||
}
|
||||
print ')';
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
@ -274,7 +279,7 @@ if($result && $price && $delais){
|
||||
<option value="2">Enquête sur un prospect (ouverture de compte)</option>
|
||||
<option value="3">Enquête sur un fournisseur stratégique</option>
|
||||
<option value="4">Enquête sur un fournisseur non stratégique</option>
|
||||
<option value="5">Autre type d'enquête (Précisez...)</option>
|
||||
<option value="5">Autre type d'enquête (Précisez...)</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
@ -390,4 +395,4 @@ if($result && $price && $delais){
|
||||
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
?>
|
||||
|
@ -10,33 +10,30 @@ require_once 'graydon/graydon.php';
|
||||
require_once 'dbbootstrap.php';
|
||||
|
||||
$tabIdentifiers = getCompanyMatchIdentifiers($pays);
|
||||
$firephp->log($tabIdentifiers,'tabIdentifiers');
|
||||
|
||||
/** Recup des produits de la company **/
|
||||
// Recup des produits de la company
|
||||
$Companyproducts = getCompanyProducts($identifier);
|
||||
$company = $Companyproducts['Company'];
|
||||
$company = $Companyproducts['Company'];
|
||||
$products = $Companyproducts['Products'];
|
||||
|
||||
if(isset($company))
|
||||
{
|
||||
$firephp->log($products,'products');
|
||||
if (isset($company)) {
|
||||
|
||||
?>
|
||||
<div id="center">
|
||||
|
||||
<h1 class="titre">IDENTITÉ INTERNATIONALE DE L'ENTREPRISE</h1>
|
||||
<h1 class="titre">IDENTITÉ INTERNATIONALE DE L'ENTREPRISE</h1>
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="200" class="StyleInfoLib">Fiche identité simplifié<br/></td>
|
||||
<td>
|
||||
<?php $noReport = TRUE; ?>
|
||||
<u><b>Accès à la fiche identité approfondie :</b></u>
|
||||
<td width="30"> </td>
|
||||
<td width="200" class="StyleInfoLib">Fiche identité simplifié<br/></td>
|
||||
<td>
|
||||
<?php $noReport = true; ?>
|
||||
<u><b>Accès à la fiche identité approfondie :</b></u>
|
||||
<?php
|
||||
$tabReport = array();
|
||||
$tabProductIdentifier = array();
|
||||
$countProducts = 0;
|
||||
$tabReport = array();
|
||||
$tabProductIdentifier = array();
|
||||
$countProducts = 0;
|
||||
foreach($products as $product) {
|
||||
// Rapport en mode normal
|
||||
if ($product->ServiceSpeed == 'Normal' &&
|
||||
@ -78,66 +75,62 @@ if(isset($company))
|
||||
array(0 => array('email' => EMAIL_SUPPORTDEV,
|
||||
'name' => 'Support'), ));
|
||||
|
||||
//Don't display ImmediateWithUpdate
|
||||
/*
|
||||
$mimetype = FALSE;
|
||||
if (is_array($product->MimeTypes->MimeType)){
|
||||
if (in_array('xml', $product->MimeTypes->MimeType)){$mimetype = TRUE;}
|
||||
}else{
|
||||
if ($product->MimeTypes->MimeType == 'xml' ){$mimetype = TRUE;}
|
||||
}
|
||||
if ($mimetype == TRUE ){
|
||||
$tabReport[] = 'ImmediateWithUpdate';
|
||||
$tabProducts[$countProducts]['identifier'] = $product->CompanyProductIdentifier;
|
||||
$tabProducts[$countProducts]['DaysFrom'] = $product->DaysFrom;
|
||||
$tabProducts[$countProducts]['DaysTo'] = $product->DaysTo;
|
||||
$countProducts++;
|
||||
}
|
||||
*/
|
||||
}
|
||||
//Don't display ImmediateWithUpdate
|
||||
/*
|
||||
$mimetype = false;
|
||||
if (is_array($product->MimeTypes->MimeType)){
|
||||
if (in_array('xml', $product->MimeTypes->MimeType)) {
|
||||
$mimetype = true;}
|
||||
}else{
|
||||
if ($product->MimeTypes->MimeType == 'xml' ){$mimetype = true;}
|
||||
}
|
||||
if ($mimetype == true ){
|
||||
$tabReport[] = 'ImmediateWithUpdate';
|
||||
$tabProducts[$countProducts]['identifier'] =
|
||||
$product->CompanyProductIdentifier;
|
||||
$tabProducts[$countProducts]['DaysFrom'] = $product->DaysFrom;
|
||||
$tabProducts[$countProducts]['DaysTo'] = $product->DaysTo;
|
||||
$countProducts++;
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
//Rapport disponible en ligne
|
||||
if ($product->ServiceSpeed == 'Immediate' && $product->Type == 'Database' && $product->Level == 3 )
|
||||
{
|
||||
$mimetype = FALSE;
|
||||
// Rapport disponible en ligne
|
||||
if ($product->ServiceSpeed == 'Immediate' &&
|
||||
$product->Type == 'Database' && $product->Level == 3) {
|
||||
$mimetype = false;
|
||||
|
||||
if (!is_array($product->MimeTypes->MimeType)){ $productMimeTypes = array($product->MimeTypes->MimeType); }
|
||||
else{ $productMimeTypes = $product->MimeTypes->MimeType; }
|
||||
if (!is_array($product->MimeTypes->MimeType)) {
|
||||
$productMimeTypes = array($product->MimeTypes->MimeType);
|
||||
} else {
|
||||
$productMimeTypes = $product->MimeTypes->MimeType;
|
||||
}
|
||||
|
||||
foreach( reportFormat() as $format )
|
||||
{
|
||||
if (in_array($format, $product->MimeTypes->MimeType))
|
||||
{
|
||||
$mimetype = TRUE;
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
require_once 'mail/mail.php';
|
||||
sendMail(
|
||||
'Rapport International',
|
||||
"Rapport international disponible dans un autre format que le XML\n" .
|
||||
"Identifiant : ".$identifier,
|
||||
array(
|
||||
'email'=>'contact@scores-decisions.com',
|
||||
'name'=>'Serveur SD-13408'),
|
||||
array(
|
||||
0 => array(
|
||||
'email'=>EMAIL_SUPPORTDEV,
|
||||
'name'=>'Support'),
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
if ($mimetype == TRUE )
|
||||
{
|
||||
$tabReport[] = 'Immediate';
|
||||
$tabProducts[$countProducts]['identifier'] = $product->CompanyProductIdentifier;
|
||||
$tabProducts[$countProducts]['format'] = $format;
|
||||
$countProducts++;
|
||||
}
|
||||
}
|
||||
} // Fin boucle d'affichage des produits
|
||||
foreach (reportFormat() as $format ) {
|
||||
if (in_array($format, $product->MimeTypes->MimeType)) {
|
||||
$mimetype = true;
|
||||
break;
|
||||
} else {
|
||||
require_once 'mail/mail.php';
|
||||
sendMail('Rapport International',
|
||||
'Rapport international disponible dans un autre'.
|
||||
" format que le XML\n" .
|
||||
"Identifiant : ".$identifier,
|
||||
array('email' => 'contact@scores-decisions.com',
|
||||
'name' => 'Serveur SD-13408'),
|
||||
array(array('email' => EMAIL_SUPPORTDEV,
|
||||
'name' => 'Support')));
|
||||
}
|
||||
}
|
||||
if ($mimetype == true) {
|
||||
$tabReport[] = 'Immediate';
|
||||
$tabProducts[$countProducts]['identifier'] =
|
||||
$product->CompanyProductIdentifier;
|
||||
$tabProducts[$countProducts]['format'] = $format;
|
||||
$countProducts++;
|
||||
}
|
||||
}
|
||||
} // Fin boucle d'affichage des produits
|
||||
|
||||
// -------------------------------------------------------------------------- //
|
||||
// Affichage des differents rapports
|
||||
@ -164,7 +157,8 @@ if (count($tabReport) == 0) {
|
||||
$key = array_search(ucfirst($mode_en), $tabReport);
|
||||
$pidentifier = $tabProducts[$key]['identifier'];
|
||||
// Verification des droits
|
||||
if (preg_match('/\binternational\b/i', $_SESSION['tabInfo']['droits'])) {
|
||||
if (preg_match('/\binternational\b/i',
|
||||
$_SESSION['tabInfo']['droits'])) {
|
||||
print '<a href="./?page=international_enquete'.
|
||||
'&speed='.$mode_en.
|
||||
'&identifier='.$identifier.
|
||||
@ -185,45 +179,45 @@ if (count($tabReport) == 0) {
|
||||
}
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3"> </td>
|
||||
</tr>
|
||||
<?php
|
||||
$identifiers = $company->CompanyIdentifiers->CompanyIdentifier;
|
||||
foreach($identifiers as $identifier){
|
||||
if($identifier->Type != 'Internal'){
|
||||
?>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="200" class="StyleInfoLib">
|
||||
<?php
|
||||
$identifierDescription = FALSE;
|
||||
if(is_array($tabIdentifiers)){
|
||||
foreach($tabIdentifiers as $tabIdentifier){
|
||||
if($tabIdentifier->Type == $identifier->Type){
|
||||
print $tabIdentifier->Description;
|
||||
$identifierDescription = TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($identifierDescription==FALSE){
|
||||
print $identifier->Type;
|
||||
}
|
||||
//@TODO : Tester si la condition à bien été remplie
|
||||
?>
|
||||
</td>
|
||||
<td width="350" class="StyleInfoData">
|
||||
<?php print $identifier->Identifier; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3"> </td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3"> </td>
|
||||
</tr>
|
||||
<?php
|
||||
$identifiers = $company->CompanyIdentifiers->CompanyIdentifier;
|
||||
foreach($identifiers as $identifier){
|
||||
if($identifier->Type != 'Internal'){
|
||||
?>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="200" class="StyleInfoLib">
|
||||
<?php
|
||||
$identifierDescription = false;
|
||||
if(is_array($tabIdentifiers)){
|
||||
foreach($tabIdentifiers as $tabIdentifier){
|
||||
if($tabIdentifier->Type == $identifier->Type){
|
||||
print $tabIdentifier->Description;
|
||||
$identifierDescription = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($identifierDescription==false){
|
||||
print $identifier->Type;
|
||||
}
|
||||
//@TODO : Tester si la condition à bien été remplie
|
||||
?>
|
||||
</td>
|
||||
<td width="350" class="StyleInfoData">
|
||||
<?php print $identifier->Identifier; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3"> </td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
</table>
|
||||
|
||||
<h2>Raison sociale et coordonnées : </h2>
|
||||
@ -306,7 +300,7 @@ if (count($tabReport) == 0) {
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h2>Activité(s) de l'entreprise : </h2>
|
||||
<h2>Activité(s) de l'entreprise : </h2>
|
||||
|
||||
<table>
|
||||
<?php
|
||||
@ -315,7 +309,8 @@ if (count($tabReport) == 0) {
|
||||
?>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="200" class="StyleInfoLib">Code <?php print $activity->Type;?></td>
|
||||
<td width="200" class="StyleInfoLib">
|
||||
Code <?php print $activity->Type;?></td>
|
||||
<td width="350" class="StyleInfoData">
|
||||
<?php print $activity->Code.' - '.cleanutf8($activity->Description);?>
|
||||
</td>
|
||||
@ -323,61 +318,30 @@ if (count($tabReport) == 0) {
|
||||
<?php
|
||||
}
|
||||
} else {
|
||||
?>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td colspan="2" class="StyleInfoData">Aucune information disponible</td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<tr>
|
||||
<td colspan="3"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h2>Géolocalisation : </h2>
|
||||
<?php
|
||||
|
||||
/*
|
||||
$adresse = $company->RegisteredAddress->Building;
|
||||
$codePostal = $company->RegisteredAddress->PostCode;
|
||||
$ville = $company->RegisteredAddress->City;
|
||||
*/
|
||||
|
||||
/*
|
||||
try {
|
||||
$geoCodeResult = $client->geoCode('19 rue de saulnier', '75009', 'paris', 'france');
|
||||
$firephp->log($geoCodeResult, 'geocode');
|
||||
}catch(SoapFault $fault){
|
||||
print '<pre>';
|
||||
print $client->__getLastResponse();
|
||||
print '</pre>';
|
||||
}
|
||||
*/
|
||||
|
||||
/*
|
||||
* Récupération du geoCode
|
||||
* La page est chargé alors par javascript on load en ajax
|
||||
* Chargement de la carte (nouvelle page loadMap.php ??)
|
||||
* loadMap => On vérifie la session
|
||||
* => On envoi le geocode ?? les markers supplémentaires
|
||||
*/
|
||||
|
||||
?>
|
||||
?>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td colspan="2" class="StyleInfoData">Aucune information disponible</td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<tr>
|
||||
<td colspan="3"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<?php
|
||||
}else{
|
||||
} else {
|
||||
?>
|
||||
<div id="center">
|
||||
<table>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td colspan="2" class="StyleInfoData">Aucune information disponible</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td colspan="2" class="StyleInfoData">Aucune information disponible</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
|
@ -1,4 +1,101 @@
|
||||
<?php
|
||||
// -------------------------------------------------------------------------- //
|
||||
// infogreffeProduits
|
||||
// -------------------------------------------------------------------------- //
|
||||
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) {
|
||||
$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;
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------- //
|
||||
// sendCmdMail
|
||||
// -------------------------------------------------------------------------- //
|
||||
function sendCmdMail($sujet, $message)
|
||||
{
|
||||
require_once 'mail/mail.php';
|
||||
@ -12,6 +109,9 @@ function sendCmdMail($sujet, $message)
|
||||
'name' => 'Pieces')));
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------- //
|
||||
// main
|
||||
// -------------------------------------------------------------------------- //
|
||||
// Envoi d'un mail de demande de reception de kbis par mail
|
||||
if (isset($_REQUEST['mailkbis']) && $_REQUEST['mailkbis'] == 'Ok') {
|
||||
if (!empty($_REQUEST['mail'])) {
|
||||
|
@ -72,20 +72,21 @@ if (isset($tabOptions) &&
|
||||
}
|
||||
|
||||
// Utilisation du WS
|
||||
try {
|
||||
if (!isset($_REQUEST['action']) || $_REQUEST['action'] != 'new') {
|
||||
$O = scoresws_setInfosLogin($loginVu);
|
||||
$login = $O['result'];
|
||||
} else {
|
||||
$O = $client->getNextLogin($loginVu);
|
||||
$loginNew = $O['result']['racine'];
|
||||
$idClient = $O['result']['idClient'];
|
||||
$login = $O['result'];
|
||||
require_once 'scoresws/scoresws-int.php';
|
||||
if (isset($_REQUEST['action']) == false || $_REQUEST['action'] != 'new') {
|
||||
$login = $loginVu;
|
||||
$O = scoresws_setInfosLogin($loginVu, $tabOptions);
|
||||
if ($O === false) {
|
||||
die();
|
||||
}
|
||||
} catch (SoapFault $fault) {
|
||||
require_once 'soaperror.php';
|
||||
processSoapFault($client,$fault,$tabInfo);
|
||||
die();
|
||||
} else {
|
||||
$login = $loginVu;
|
||||
$O = scoresws_getNextLogin($loginVu);
|
||||
if ($O === false) {
|
||||
die();
|
||||
}
|
||||
$loginNew = $O->racine;
|
||||
$idClient = $O->idClient;
|
||||
}
|
||||
|
||||
$admin = false;
|
||||
@ -106,7 +107,7 @@ if ($_SESSION['tabInfo']['profil'] == 'Administrateur' ||
|
||||
<form>
|
||||
<label for="npass1">Nouveau mot de passe</label><br/>
|
||||
<input type="password" name="npass1" size="15" maxlength="32"/><br/>
|
||||
<label for="npass2">Répeter le nouveau mot de passe</label><br/>
|
||||
<label for="npass2">Répéter le nouveau mot de passe</label><br/>
|
||||
<input type="password" name="npass2" size="15" maxlength="32"/><br/>
|
||||
<span id="form-message"></span>
|
||||
</form>
|
||||
|
@ -2,135 +2,126 @@
|
||||
define('AFFICHAGE_MAX', '15');
|
||||
define('AFFICHAGE_EXACT', '0');
|
||||
|
||||
if ( isset($_REQUEST['action']) && $_REQUEST['action']=='supprimer'){
|
||||
require_once 'surveillance/surveillance.php';
|
||||
deleteSurveillance( $siret,
|
||||
$_REQUEST['email'],
|
||||
$_REQUEST['ref'],
|
||||
$_REQUEST['source'],
|
||||
true);
|
||||
header('Location: ./?page=surveillance');
|
||||
exit;
|
||||
if (isset($_REQUEST['action']) && $_REQUEST['action'] == 'supprimer') {
|
||||
require_once 'surveillance/surveillance.php';
|
||||
deleteSurveillance( $siret,
|
||||
$_REQUEST['email'],
|
||||
$_REQUEST['ref'],
|
||||
$_REQUEST['source'],
|
||||
true);
|
||||
header('Location: ./?page=surveillance');
|
||||
exit;
|
||||
}
|
||||
$vue = isset($_REQUEST['vue']) ? $_REQUEST['vue'] : 'default' ;
|
||||
$tri = isset($_REQUEST['tri']) ? $_REQUEST['tri'] : 'siren' ;
|
||||
$source = isset($_REQUEST['source']) ? $_REQUEST['source'] : '' ;
|
||||
$tri = isset($_REQUEST['tri']) ? $_REQUEST['tri'] : 'siren' ;
|
||||
$source = isset($_REQUEST['source']) ? $_REQUEST['source'] : '' ;
|
||||
$position = isset($_REQUEST['p']) ? $_REQUEST['p'] : 0 ;
|
||||
$fonctionTri = $vue.'TriTab';
|
||||
|
||||
switch($tri){
|
||||
default:
|
||||
case 'siren': $triws = 'siren'; break;
|
||||
case 'rs': $triws = 'rs'; break;
|
||||
case 'reference': $triws = 'ref'; break;
|
||||
case 'dateajout': $triws = 'dateAjout'; break;
|
||||
case 'datederenvoi': $triws = 'dateDerEnvoi'; break;
|
||||
switch ($tri) {
|
||||
default:
|
||||
case 'siren': $triws = 'siren'; break;
|
||||
case 'rs': $triws = 'rs'; break;
|
||||
case 'reference': $triws = 'ref'; break;
|
||||
case 'dateajout': $triws = 'dateAjout'; break;
|
||||
case 'datederenvoi': $triws = 'dateDerEnvoi'; break;
|
||||
}
|
||||
|
||||
// Source => Permission
|
||||
$tabSource = array(
|
||||
'annonces' => 'annonce',
|
||||
'insee'=>'insee',
|
||||
'bilans'=>'bilan',
|
||||
'score'=>'score',
|
||||
'actes'=>'actes',
|
||||
'dirigeants'=>'dirigeants',
|
||||
'privileges'=>'priv',
|
||||
);
|
||||
$tabSource =
|
||||
array('annonces' => 'annonce',
|
||||
'insee' => 'insee',
|
||||
'bilans' => 'bilan',
|
||||
'score' => 'score',
|
||||
'actes' => 'actes',
|
||||
'dirigeants' => 'dirigeants',
|
||||
'privileges' => 'priv');
|
||||
|
||||
if ($vue == 'default') {
|
||||
$nbAffichage = AFFICHAGE_MAX * 6;
|
||||
} else {
|
||||
$nbAffichage = AFFICHAGE_MAX;
|
||||
}
|
||||
$nbAffichage = ($vue == 'default') ? AFFICHAGE_MAX * 6 : AFFICHAGE_MAX;
|
||||
|
||||
//Enregistrement pour liste dernière recherche
|
||||
// Enregistrement pour liste dernière recherche
|
||||
require_once 'recherche/session.php';
|
||||
$parametres = recherche_element(0);
|
||||
if( isset($parametres) && $parametres['info']['page']=='recherche' ){
|
||||
recherche_saveinfo( array('page' => $page) );
|
||||
if (isset($parametres) && $parametres['info']['page'] == 'recherche') {
|
||||
recherche_saveinfo(array('page' => $page));
|
||||
}
|
||||
|
||||
//Liste des surveillances de l'utilisateur
|
||||
try{
|
||||
$result = $client->getSurveillances(0, $source, true, $position,
|
||||
$nbAffichage, $triws);
|
||||
$listSurveillance = $result['results']['reponses'];
|
||||
$nbReponses = $result['results']['nbReponses'];
|
||||
$nbSurveillances = $result['results']['nbReponsesTotal'];
|
||||
$totPage = ceil($nbSurveillances/$nbAffichage); FB::log($totPage, 'totPage');
|
||||
$curPage = ceil($position/$nbAffichage); FB::log($curPage, 'curPage');
|
||||
} catch (SoapFault $fault) {
|
||||
require_once 'soaperror.php';
|
||||
processSoapFault($client,$fault,$tabInfo);
|
||||
die();
|
||||
// Liste des surveillances de l'utilisateur
|
||||
require_once 'scoresws/scoresws-int.php';
|
||||
$result = scoresws_getSurveillances(0, $source, true, $position,
|
||||
$nbAffichage, $triws);
|
||||
if ($result === false) {
|
||||
die();
|
||||
}
|
||||
$listSurveillance = $result['results']['reponses'];
|
||||
$nbReponses = $result['results']['nbReponses'];
|
||||
$nbSurveillances = $result['results']['nbReponsesTotal'];
|
||||
$totPage = ceil($nbSurveillances/$nbAffichage);
|
||||
$curPage = ceil($position/$nbAffichage);
|
||||
|
||||
require_once 'surveillance/function.php';
|
||||
//Appel de la fonction de tri
|
||||
// Appel de la fonction de tri
|
||||
require_once 'surveillance/surveillance_tri.php';
|
||||
$listTrier = $fonctionTri($listSurveillance);
|
||||
if (AFFICHAGE_EXACT) {
|
||||
$listTrier = array_splice($listTrier, 0, AFFICHAGE_MAX);
|
||||
}
|
||||
FB::log($listTrier, 'listTrier');
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function()
|
||||
{
|
||||
<?php
|
||||
if($source == ''){
|
||||
if ($source == '') {
|
||||
?>
|
||||
$('#surveillance').tablesorter({
|
||||
headers: {
|
||||
2: { sorter: false },
|
||||
3: { sorter: false },
|
||||
4: { sorter: false },
|
||||
5: { sorter: false }
|
||||
}
|
||||
});
|
||||
|
||||
$('#surveillance').tablesorter({
|
||||
headers: {
|
||||
2: { sorter: false },
|
||||
3: { sorter: false },
|
||||
4: { sorter: false },
|
||||
5: { sorter: false }
|
||||
}
|
||||
});
|
||||
<?php
|
||||
}else{
|
||||
} else {
|
||||
?>
|
||||
$('#surveillance').tablesorter({
|
||||
headers: {
|
||||
3: { sorter: false }
|
||||
}
|
||||
});
|
||||
$('#surveillance').tablesorter({
|
||||
headers: {
|
||||
3: { sorter: false }
|
||||
}
|
||||
});
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
<div id="center">
|
||||
|
||||
<h1 class="titre">SURVEILLANCE</h1>
|
||||
|
||||
<?php
|
||||
//Affichage du nombre de surveillances
|
||||
// Affichage du nombre de surveillances
|
||||
$nbEtab = count($listTrier);
|
||||
if ( $vue == 'default' ){
|
||||
if ($vue == 'default') {
|
||||
?>
|
||||
<table id="info">
|
||||
<tr>
|
||||
<td width="200" class="StyleInfoLib">Nombre d'entités affichées</td>
|
||||
<td><?=$nbEtab?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="StyleInfoLib">Nombre de surveillances</td>
|
||||
<td><?=$nbSurveillances?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="200" class="StyleInfoLib">Nombre d'entités affichées</td>
|
||||
<td><?=$nbEtab?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="StyleInfoLib">Nombre de surveillances</td>
|
||||
<td><?=$nbSurveillances?></td>
|
||||
</tr>
|
||||
</table>
|
||||
<?php
|
||||
} else {
|
||||
?>
|
||||
<table id="info">
|
||||
<tr>
|
||||
<td class="StyleInfoLib">Nombre de surveillances <?=$source?></td>
|
||||
<td><?=$nbSurveillances?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="StyleInfoLib">Nombre de surveillances <?=$source?></td>
|
||||
<td><?=$nbSurveillances?></td>
|
||||
</tr>
|
||||
</table>
|
||||
<?php
|
||||
}
|
||||
@ -148,11 +139,11 @@ if ( $vue == 'default' ){
|
||||
<?php
|
||||
foreach ($tabSource as $s => $perm) {
|
||||
if (hasPerm('surv'.$perm)) {
|
||||
echo '<option value="'.$s.'"';
|
||||
print '<option value="'.$s.'"';
|
||||
if (isset($source) && $source == $s) {
|
||||
echo 'selected';
|
||||
print 'selected';
|
||||
}
|
||||
echo '>'.$s.'</option>';
|
||||
print '>'.$s.'</option>';
|
||||
}
|
||||
}
|
||||
?>
|
||||
@ -174,11 +165,11 @@ if ( $vue == 'default' ){
|
||||
<?php
|
||||
foreach($tabSource as $s => $perm) {
|
||||
if (hasPerm('surv'.$perm)) {
|
||||
echo '<option value="'.$s.'"';
|
||||
print '<option value="'.$s.'"';
|
||||
if (isset($source) && $source == $s) {
|
||||
echo 'selected';
|
||||
print 'selected';
|
||||
}
|
||||
echo '>'.$s.'</option>';
|
||||
print '>'.$s.'</option>';
|
||||
}
|
||||
}
|
||||
?>
|
||||
@ -187,14 +178,15 @@ if ( $vue == 'default' ){
|
||||
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
$("select[name=type]").change(function() {
|
||||
var value = $(this).val();
|
||||
$("select[name=type]").change(function() {
|
||||
var value = $(this).val();
|
||||
if (value == '-') {
|
||||
window.location.href = './?page=surveillance';
|
||||
} else {
|
||||
window.location.href = './?page=surveillance&vue=source&source=' + value;
|
||||
}
|
||||
});
|
||||
window.location.href = './?page=surveillance';
|
||||
} else {
|
||||
window.location.href =
|
||||
'./?page=surveillance&vue=source&source=' + value;
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
@ -211,7 +203,7 @@ Tri par Raison sociale
|
||||
</a>
|
||||
</li>
|
||||
<?php
|
||||
if($source != ''){
|
||||
if ($source != '') {
|
||||
?>
|
||||
<li>
|
||||
<a href="<?=lienTri('reference', $vue, $source, $siret, $idEntreprise)?>">
|
||||
@ -220,7 +212,7 @@ Tri par Référence
|
||||
</li>
|
||||
<li>
|
||||
<a href="<?=lienTri('dateajout', $vue, $source, $siret, $idEntreprise)?>">
|
||||
Tri par Date d'ajout
|
||||
Tri par Date d'ajout
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
@ -293,167 +285,186 @@ if ($totPage > 1) {
|
||||
<table class="tablesorter" id="surveillance" width="570">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="75">Siren</th>
|
||||
<th width="150">Raison Sociale</th>
|
||||
<th width="90">Référence</th>
|
||||
<th width="150">Surveillance</th>
|
||||
<th width="75">Ajout le</th>
|
||||
<th width="75">Envoyé le</th>
|
||||
<th width="75">Siren</th>
|
||||
<th width="150">Raison Sociale</th>
|
||||
<th width="90">Référence</th>
|
||||
<th width="150">Surveillance</th>
|
||||
<th width="75">Ajout le</th>
|
||||
<th width="75">Envoyé le</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
//Si vue=defaut alors on affiche les entités avec toutes leurs surveillances
|
||||
if($vue=='default'){
|
||||
foreach($listTrier as $item)
|
||||
{
|
||||
?>
|
||||
<tr>
|
||||
<td class="aleft">
|
||||
<a href="./?page=identite&siret=<?=$item['siren']?>">
|
||||
<?=$item['siren']?>
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
<?=$item['rs']?><br/><i><?=$item['cp'].' '.$item['ville']?></i>
|
||||
</td>
|
||||
<td>
|
||||
<?php
|
||||
foreach($tabSource as $source => $perm)
|
||||
{
|
||||
if(hasPerm('surv'.$perm))
|
||||
{
|
||||
if(isset($item['sources'][$source]))
|
||||
{
|
||||
foreach($item['sources'][$source] as $surveillance)
|
||||
{
|
||||
if($surveillance['ref']!=''){
|
||||
echo '<p>'.$surveillance['ref'].'</p>';
|
||||
}else{?> <p>-</p> <?php }
|
||||
}
|
||||
}else{?> <p>-</p> <?php }
|
||||
}
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
<td class="aleft">
|
||||
<?php
|
||||
foreach($tabSource as $source => $perm)
|
||||
{
|
||||
FB::log($source, $perm);
|
||||
if ( hasPerm('surv'.$perm) )
|
||||
{
|
||||
if ( array_key_exists($source, $item['sources']) ){
|
||||
foreach ( $item['sources'][$source] as $surveillance ){
|
||||
?>
|
||||
<div class="action">
|
||||
<p><?=ucfirst($source)?></p>
|
||||
<a class="dialogsurv" href="./?page=surveillance&q=ajouter/<?=$item['siren'].$item['nic']?>/<?=$source?>"
|
||||
title="Ajouter la surveillance <?=$source?>">
|
||||
<img src="./img/interface/ajouter.png"/>
|
||||
</a>
|
||||
<a class="dialogsurv" href="./?page=surveillance&q=ajouter/<?=$item['siren'].$item['nic']?>/<?=$source?>&ref=<?=$surveillance['ref']?>&email=<?=$surveillance['email']?>"
|
||||
title="Editer la surveillance <?=$source?>">
|
||||
<img src="./img/interface/editer.png"/>
|
||||
</a>
|
||||
<a href="./?page=surveillance&action=supprimer&siret=<?=$item['siren'].$item['nic']?>&ref=<?=$surveillance['ref']?>&source=<?=$source?>&email=<?=$surveillance['email']?>"
|
||||
title="Supprimer la surveillance <?=$source.' '.$surveillance['email']?>">
|
||||
<img src="./img/interface/supprimer.png"/>
|
||||
</a>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
} else {
|
||||
?>
|
||||
<div class="action">
|
||||
<p><?=ucfirst($source)?></p>
|
||||
<a class="dialogsurv" href="./?page=surveillance&q=ajouter/<?=$item['siren'].$item['nic']?>/<?=$source;?>" title="Ajouter la surveillance <?=$source?>">
|
||||
<img src="./img/interface/ajouter.png"/>
|
||||
</a>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<br/>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
<td>
|
||||
<?php
|
||||
foreach($tabSource as $source => $perm){
|
||||
if(hasPerm('surv'.$perm))
|
||||
{
|
||||
if(array_key_exists($source, $item['sources'])){
|
||||
foreach($item['sources'][$source] as $surveillance){
|
||||
print '<p>'.substr($surveillance['dateAjout'],8,2).'/'.substr($surveillance['dateAjout'],5,2).'/'.substr($surveillance['dateAjout'],0,4).'</p>';
|
||||
}
|
||||
}else{?> <p>-</p> <?php }
|
||||
}
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
<td>
|
||||
<?php
|
||||
foreach($tabSource as $source => $perm){
|
||||
if(hasPerm('surv'.$perm))
|
||||
{
|
||||
if(array_key_exists($source, $item['sources'])){
|
||||
foreach($item['sources'][$source] as $surveillance){
|
||||
$pDate = substr($surveillance['dateDerEnvoi'],8,2).'/'.substr($surveillance['dateDerEnvoi'],5,2).'/'.substr($surveillance['dateDerEnvoi'],0,4);
|
||||
if ($pDate!='00/00/0000'){print '<p>'.$pDate.'</p>'; }else{ print '<p>-</p>';}
|
||||
}
|
||||
}else{?> <p>-</p> <?php }
|
||||
}
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
// Si vue=defaut alors on affiche les entités avec toutes leurs surveillances
|
||||
if ($vue == 'default') {
|
||||
foreach ($listTrier as $item) {
|
||||
print '<tr>';
|
||||
print '<td class="aleft">';
|
||||
print '<a href="./?page=identite&siret='.$item['siren'].'">';
|
||||
print $item['siren'];
|
||||
print '</a>';
|
||||
print '</td>';
|
||||
print '<td>';
|
||||
print $item['rs'].'<br/><i>'.$item['cp'].' '.$item['ville'].'</i>';
|
||||
print '</td>';
|
||||
print '<td>';
|
||||
foreach ($tabSource as $source => $perm) {
|
||||
if (hasPerm('surv'.$perm)) {
|
||||
if (isset($item['sources'][$source])) {
|
||||
foreach ($item['sources'][$source] as $surveillance) {
|
||||
if ($surveillance['ref'] != '') {
|
||||
print '<p>'.$surveillance['ref'].'</p>';
|
||||
} else {
|
||||
print ' <p>-</p> ';
|
||||
}
|
||||
}
|
||||
} else {
|
||||
print ' <p>-</p> ';
|
||||
}
|
||||
}
|
||||
}
|
||||
print '</td>';
|
||||
print '<td class="aleft">';
|
||||
foreach ($tabSource as $source => $perm) {
|
||||
if (hasPerm('surv'.$perm)) {
|
||||
if (array_key_exists($source, $item['sources'])) {
|
||||
foreach ($item['sources'][$source] as $surveillance) {
|
||||
print '<div class="action">';
|
||||
print '<p>'.ucfirst($source).'</p>';
|
||||
print '<a class="dialogsurv" href="./?page='.
|
||||
'surveillance&q=ajouter/'.$item['siren'].
|
||||
$item['nic'].'/'.$source.'"'.
|
||||
' title="Ajouter la surveillance '.$source.'">';
|
||||
print '<img src="./img/interface/ajouter.png"/>';
|
||||
print '</a>';
|
||||
print '<a class="dialogsurv" href="./?page='.
|
||||
'surveillance&q=ajouter/'.$item['siren'].
|
||||
$item['nic'].'/'.$source.'&ref='.
|
||||
$surveillance['ref'].'&email='.
|
||||
$surveillance['email'].'"'.
|
||||
' title="Editer la surveillance '.$source.'">';
|
||||
print '<img src="./img/interface/editer.png"/>';
|
||||
print '</a>';
|
||||
print '<a href="./?page=surveillance&action='.
|
||||
'supprimer&siret='.$item['siren'].
|
||||
$item['nic'].'&ref='.$surveillance['ref'].
|
||||
'&source='.$source.'&email='.
|
||||
$surveillance['email'].'"'.
|
||||
' title="Supprimer la surveillance '.$source.
|
||||
' '.$surveillance['email'].'">';
|
||||
print '<img src="./img/interface/supprimer.png"/>';
|
||||
print '</a>';
|
||||
print '</div>';
|
||||
}
|
||||
} else {
|
||||
print '<div class="action">';
|
||||
print '<p>'.ucfirst($source).'</p>';
|
||||
print '<a class="dialogsurv" href="./?page=surveillance'.
|
||||
'&q=ajouter/'.$item['siren'].$item['nic'].'/'.$source.
|
||||
'" title="Ajouter la surveillance '.$source.'">';
|
||||
print '<img src="./img/interface/ajouter.png"/>';
|
||||
print '</a>';
|
||||
print '</div>';
|
||||
}
|
||||
print '<br/>';
|
||||
}
|
||||
}
|
||||
print '</td>';
|
||||
print '<td>';
|
||||
foreach ($tabSource as $source => $perm) {
|
||||
if (hasPerm('surv'.$perm)) {
|
||||
if (array_key_exists($source, $item['sources'])) {
|
||||
foreach ($item['sources'][$source] as $surveillance) {
|
||||
print '<p>'.
|
||||
substr($surveillance['dateAjout'], 8, 2).'/'.
|
||||
substr($surveillance['dateAjout'], 5, 2).'/'.
|
||||
substr($surveillance['dateAjout'], 0, 4).'</p>';
|
||||
}
|
||||
} else {
|
||||
print ' <p>-</p> ';
|
||||
}
|
||||
}
|
||||
}
|
||||
print '</td>';
|
||||
print '<td>';
|
||||
foreach ($tabSource as $source => $perm) {
|
||||
if (hasPerm('surv'.$perm)) {
|
||||
if (array_key_exists($source, $item['sources'])) {
|
||||
foreach ($item['sources'][$source] as $surveillance) {
|
||||
$pDate =
|
||||
substr($surveillance['dateDerEnvoi'], 8, 2).'/'.
|
||||
substr($surveillance['dateDerEnvoi'], 5, 2).'/'.
|
||||
substr($surveillance['dateDerEnvoi'], 0, 4);
|
||||
if ($pDate != '00/00/0000') {
|
||||
print '<p>'.$pDate.'</p>';
|
||||
} else {
|
||||
print '<p>-</p>';
|
||||
}
|
||||
}
|
||||
} else {
|
||||
print ' <p>-</p> ';
|
||||
}
|
||||
}
|
||||
}
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
}
|
||||
} else if ($vue == 'source') {
|
||||
// si vue=source alors on a forcément qu'une seule source
|
||||
// donc 1 ligne par surveillance d'entité
|
||||
foreach ($listTrier as $item) {
|
||||
print '<tr>';
|
||||
print '<td class="aleft"><a href="./?page=identite&siret='.
|
||||
$item['siren'].$item['nic'].'">'.$item['siren'].'</a></td>';
|
||||
print '<td>'.$item['rs'].'<br/><i>'.$item['cp'].' '.$item['ville'].
|
||||
'</i></td>';
|
||||
print '<td>';
|
||||
if ($item['ref'] != '') {
|
||||
print '<p>'.$item['ref'].'</p>';
|
||||
} else {
|
||||
print ' <p>-</p> ';
|
||||
}
|
||||
print '</td>';
|
||||
print '<td class="aleft">';
|
||||
print '<div class="action">';
|
||||
print '<p>'.ucfirst($item['source']).'</p>';
|
||||
print '<a class="dialogsurv" href="./?page=surveillance&q=ajouter/'.
|
||||
$item['siren'].$item['nic'].'/'.$item['source'].'&ref='.
|
||||
$item['ref'].'&email='.$item['email'].
|
||||
'" title="Editer la surveillance '.$item['source'].'">';
|
||||
print '<img src="./img/interface/editer.png"/>';
|
||||
print '</a>';
|
||||
print '<a href="./?page=surveillance&action=supprimer&siret='.
|
||||
$item['siren'].$item['nic'].'&ref='.$item['ref'].'&source='.
|
||||
$item['source'].'&email='.$item['email'].
|
||||
'" title="Supprimer la surveillance '.$item['source'].' '.
|
||||
$item['email'].'">';
|
||||
print '<img src="./img/interface/supprimer.png"/>';
|
||||
print '</a>';
|
||||
print '</div>';
|
||||
print '<br/>';
|
||||
print '</td>';
|
||||
print '<td>';
|
||||
print '<p>'.
|
||||
substr($item['dateAjout'], 8, 2).'/'.
|
||||
substr($item['dateAjout'], 5, 2).'/'.
|
||||
substr($item['dateAjout'], 0, 4).'</p>';
|
||||
print '</td>';
|
||||
print '<td>';
|
||||
$pDate =
|
||||
substr($item['dateDerEnvoi'], 8, 2).'/'.
|
||||
substr($item['dateDerEnvoi'], 5, 2).'/'.
|
||||
substr($item['dateDerEnvoi'], 0, 4);
|
||||
if ($pDate != '00/00/0000') {
|
||||
print '<p>'.$pDate.'</p>';
|
||||
} else {
|
||||
print '<p>-</p>';
|
||||
}
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
}
|
||||
}
|
||||
//si vue=source alors on a forcément qu'une seul source donc 1 ligne par surveillance d'entité
|
||||
} elseif( $vue == 'source' ) {
|
||||
foreach ( $listTrier as $item ){
|
||||
?>
|
||||
<tr>
|
||||
<td class="aleft"><a href="./?page=identite&siret=<?=$item['siren'].$item['nic']?>"><?=$item['siren']?></a></td>
|
||||
<td><?=$item['rs']?><br/><i><?=$item['cp'].' '.$item['ville']?></i></td>
|
||||
<td>
|
||||
<?php
|
||||
if($item['ref']!=''){
|
||||
print '<p>'.$item['ref'].'</p>';
|
||||
}else{?> <p>-</p> <?php }
|
||||
?>
|
||||
</td>
|
||||
<td class="aleft">
|
||||
<div class="action">
|
||||
<p><?=ucfirst($item['source'])?></p>
|
||||
<a class="dialogsurv" href="./?page=surveillance&q=ajouter/<?=$item['siren'].$item['nic']?>/<?=$item['source']?>&ref=<?=$item['ref']?>&email=<?=$item['email']?>" title="Editer la surveillance <?=$item['source']?>">
|
||||
<img src="./img/interface/editer.png"/>
|
||||
</a>
|
||||
<a href="./?page=surveillance&action=supprimer&siret=<?=$item['siren'].$item['nic']?>&ref=<?=$item['ref']?>&source=<?=$item['source']?>&email=<?=$item['email']?>" title="Supprimer la surveillance <?=$item['source'].' '.$item['email']?>">
|
||||
<img src="./img/interface/supprimer.png"/>
|
||||
</a>
|
||||
</div>
|
||||
<br/>
|
||||
</td>
|
||||
<td>
|
||||
<?php
|
||||
print '<p>'.substr($item['dateAjout'],8,2).'/'.substr($item['dateAjout'],5,2).'/'.substr($item['dateAjout'],0,4).'</p>';
|
||||
?>
|
||||
</td>
|
||||
<td>
|
||||
<?php
|
||||
$pDate = substr($item['dateDerEnvoi'],8,2).'/'.substr($item['dateDerEnvoi'],5,2).'/'.substr($item['dateDerEnvoi'],0,4);
|
||||
if ($pDate!='00/00/0000'){print '<p>'.$pDate.'</p>'; }else{ print '<p>-</p>';}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
}//Fin vue==source
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -129,44 +129,39 @@ if (isset($_REQUEST['action'])) {
|
||||
case 'privileges':
|
||||
if (empty($_REQUEST['email']) == false) {
|
||||
if (in_array('SprivSurv', $_REQUEST['privileges']['type'])) {
|
||||
try {
|
||||
$O = $client->
|
||||
setSurveillance($_REQUEST['siret'],
|
||||
$_REQUEST['email'],
|
||||
$_REQUEST['ref'], 'privileges');
|
||||
} catch (SoapFault $fault) {
|
||||
require_once 'soaperror.php';
|
||||
processSoapFault($client,$fault,$_SESSION['tabInfo']);
|
||||
}
|
||||
$privilegesLog = join('-', $_REQUEST['privileges']['type']);
|
||||
}
|
||||
$key = array_search('SprivSurv',
|
||||
$_REQUEST['privileges']['type']);
|
||||
if ($key !== false) {
|
||||
unset($_REQUEST['privileges']['type'][$key]);
|
||||
}
|
||||
if (count($_REQUEST['privileges']['type']) > 0) {
|
||||
$privileges = join(', ', $_REQUEST['privileges']['type']);
|
||||
$privilegesLog = join('-', $_REQUEST['privileges']['type']);
|
||||
sendCmdMail('[COMMANDE PIECES] - PRIVILEGES par email',
|
||||
'COMMANDE DE PRIVILEGES - par email<br/>'.EOL.
|
||||
'Demande pour recevoir ('.$privileges.
|
||||
') pour SIREN : '.
|
||||
'<a href="'.EXTRANET_URL.
|
||||
'/?page=identite&siret='.$_REQUEST['siret'].
|
||||
'">'.
|
||||
$_REQUEST['siret'].'</a><br/>'.EOL.
|
||||
'pour login '.$_SESSION['tabInfo']['login'].
|
||||
'('.$_REQUEST['email'].')<br/>'.EOL.
|
||||
'Référence : '.$_REQUEST['ref']);
|
||||
}
|
||||
$message = 'Votre commande a bien été prise en compte,'.
|
||||
' vous recevrez ces documents sur votre e-mail.';
|
||||
require_once 'scoresws/scoresws-int.php';
|
||||
scoresws_setLog('privileges', $_REQUEST['siret'], 0,
|
||||
'mail:'.$privilegesLog);
|
||||
unset($_REQUEST['privileges']['type']);
|
||||
} else {
|
||||
require_once 'scoresws/scoresws.php';
|
||||
$O = scoresws_setSurveillance($_REQUEST['siret'],
|
||||
$_REQUEST['email'],
|
||||
$_REQUEST['ref'],
|
||||
'privileges');
|
||||
$privilegesLog = join('-', $_REQUEST['privileges']['type']);
|
||||
}
|
||||
$key = array_search('SprivSurv', $_REQUEST['privileges']['type']);
|
||||
if ($key !== false) {
|
||||
unset($_REQUEST['privileges']['type'][$key]);
|
||||
}
|
||||
if (count($_REQUEST['privileges']['type']) > 0) {
|
||||
$privileges = join(', ', $_REQUEST['privileges']['type']);
|
||||
$privilegesLog = join('-', $_REQUEST['privileges']['type']);
|
||||
sendCmdMail('[COMMANDE PIECES] - PRIVILEGES par email',
|
||||
'COMMANDE DE PRIVILEGES - par email<br/>'.EOL.
|
||||
'Demande pour recevoir ('.$privileges.
|
||||
') pour SIREN : '.
|
||||
'<a href="'.EXTRANET_URL.
|
||||
'/?page=identite&siret='.$_REQUEST['siret'].
|
||||
'">'.
|
||||
$_REQUEST['siret'].'</a><br/>'.EOL.
|
||||
'pour login '.$_SESSION['tabInfo']['login'].
|
||||
'('.$_REQUEST['email'].')<br/>'.EOL.
|
||||
'Référence : '.$_REQUEST['ref']);
|
||||
}
|
||||
$message = 'Votre commande a bien été prise en compte,'.
|
||||
' vous recevrez ces documents sur votre e-mail.';
|
||||
require_once 'scoresws/scoresws-int.php';
|
||||
scoresws_setLog('privileges', $_REQUEST['siret'], 0,
|
||||
'mail:'.$privilegesLog);
|
||||
unset($_REQUEST['privileges']['type']);
|
||||
} else {
|
||||
$message = '<font color="red">'.
|
||||
'Erreur : adresse email non renseignée.</font>';
|
||||
}
|
||||
|
@ -1,97 +1,131 @@
|
||||
<?php
|
||||
if (!$_SESSION['connected'])
|
||||
echo ('Vous devez être connecté afin de pouvoir utiliser cette fonctionnalité');
|
||||
elseif ($_SESSION['tabInfo']['profil']!='Administrateur' && $_SESSION['tabInfo']['profil']!='SuperAdministrateur') {
|
||||
echo ('Vous n\'avez pas les droits nécessaires pour utiliser cette fonctionnalité ('.$_SESSION['tabInfo']['profil'].')');
|
||||
$siret=$_REQUEST['siret'];
|
||||
}
|
||||
else {
|
||||
if (!isset($_REQUEST['login']) || $_REQUEST['login']=='') $login=$_SESSION['tabInfo']['login'];
|
||||
else $login=$_REQUEST['login'];
|
||||
if ($login=='reunicastats') $login='testreunica';
|
||||
if ($_SESSION['connected'] == false) {
|
||||
print 'Vous devez être connecté afin de pouvoir'.
|
||||
' utiliser cette fonctionnalité';
|
||||
} else if ($_SESSION['tabInfo']['profil'] != 'Administrateur' &&
|
||||
$_SESSION['tabInfo']['profil'] != 'SuperAdministrateur') {
|
||||
print 'Vous n\'avez pas les droits nécessaires pour'.
|
||||
' utiliser cette fonctionnalité ('.$_SESSION['tabInfo']['profil'].')');
|
||||
$siret = $_REQUEST['siret'];
|
||||
} else {
|
||||
if (isset($_REQUEST['login']) == false || $_REQUEST['login'] == '') {
|
||||
$login = $_SESSION['tabInfo']['login'];
|
||||
} else {
|
||||
$login = $_REQUEST['login'];
|
||||
}
|
||||
if ($login == 'reunicastats') {
|
||||
$login = 'testreunica';
|
||||
}
|
||||
|
||||
if (!isset($_REQUEST['mois']) || $_REQUEST['mois']=='') $mois=date('Y-m', mktime(0, 0, 0, date("m")-1, date("d"), date("Y")));
|
||||
else $mois=$_REQUEST['mois'];
|
||||
if (isset($_REQUEST['mois']) == false || $_REQUEST['mois'] == '') {
|
||||
$mois =
|
||||
date('Y-m', mktime(0, 0, 0, date("m") - 1, date("d"), date("Y")));
|
||||
} else {
|
||||
$mois = $_REQUEST['mois'];
|
||||
}
|
||||
|
||||
// Utilisation du WS
|
||||
require_once 'scoresws/scoresws-int.php';
|
||||
$O = scoresws_getStatsUtilisateurs($login, $mois);
|
||||
if ($O === false) {
|
||||
die();
|
||||
}
|
||||
?>
|
||||
|
||||
/** Utilisation du WS **/
|
||||
try {
|
||||
$O = $client->getStatsUtilisateurs($login, $mois);
|
||||
//$stats=$O['results'];
|
||||
//print_r($O);
|
||||
} catch (SoapFault $fault) {
|
||||
require_once 'soaperror.php';
|
||||
processSoapFault($client,$fault,$tabInfo);
|
||||
die();
|
||||
}
|
||||
//print_r($O);//utilisateurs);
|
||||
?>
|
||||
<div id="center">
|
||||
<h1>Administration</h1>
|
||||
|
||||
<table border="0" align="left" bgcolor="#FFFFFF">
|
||||
<?
|
||||
if ($message<>'') {
|
||||
?>
|
||||
<?php
|
||||
if ($message != '') {
|
||||
?>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="550" class="StyleInfoData"><h3><?=$message;?></h3></td>
|
||||
<td width="30"> </td>
|
||||
<td width="550" class="StyleInfoData"><h3><?=$message;?></h3></td>
|
||||
</tr>
|
||||
<?
|
||||
}
|
||||
?>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<tr>
|
||||
<td colspan="2"> </td>
|
||||
<td colspan="2"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="550" class="StyleInfoLib" align="center"><h3>Statistiques d'utilisation</h3></td>
|
||||
<td width="30"> </td>
|
||||
<td width="550" class="StyleInfoLib" align="center">
|
||||
<h3>Statistiques d'utilisation</h3></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="550" align="center"><form name="form_stats" action="./?page=stats&siret=<?=$siret?>&idEntreprise=<?=$idEntreprise?>" method="POST" enctype="multipart/form-data">
|
||||
<select name="login" onchange="document.form_stats.submit()">
|
||||
<!--<option value="mheitz" <?if ($login=='mheitz') echo 'selected';?>>Marc Heitz</option>
|
||||
<option value="jmartory" <?if ($login=='jmartory') echo 'selected';?>>Jérôme Martory</option>
|
||||
<option value="ylenaour" <?if ($login=='ylenaour') echo 'selected';?>>Yoann Le Naour</option>-->
|
||||
<option value="testreunica" <?if ($login=='testreunica') echo 'selected';?>>REUNICA</option>
|
||||
</select>
|
||||
<select name="mois" onchange="document.form_stats.submit()"><?
|
||||
for($listeMois=200804; $listeMois++; true) {
|
||||
?><option value="<?=substr($listeMois,0,4)?>-<?=substr($listeMois,4,2)?>" <?if ($mois==substr($listeMois,0,4).'-'.substr($listeMois,4,2)) echo 'selected';?>><?=substr($listeMois,4,2).'/'.substr($listeMois,0,4)?></option><?
|
||||
if ($listeMois*1==date('Ym')*1) break;
|
||||
elseif (substr($listeMois,4,2)*1==12)
|
||||
$listeMois=(substr($listeMois,0,4)*1+1).'00';
|
||||
|
||||
|
||||
}?>
|
||||
</select>
|
||||
</form></td>
|
||||
<td width="30"> </td>
|
||||
<td width="550" align="center">
|
||||
<form name="form_stats"
|
||||
action="./?page=stats&siret=<?=$siret?>&idEntreprise=<?=$idEntreprise?>"
|
||||
method="POST" enctype="multipart/form-data">
|
||||
<select name="login" onchange="document.form_stats.submit()">
|
||||
<!--<option value="mheitz"
|
||||
<?if ($login == 'mheitz') print 'selected';?>
|
||||
>Marc Heitz</option>
|
||||
<option value="jmartory"
|
||||
<?if ($login == 'jmartory') print 'selected';?>
|
||||
>Jérôme Martory</option>
|
||||
<option value="ylenaour"
|
||||
<?if ($login=='ylenaour') print 'selected';?>
|
||||
>Yoann Le Naour</option>-->
|
||||
<option value="testreunica"
|
||||
<?if ($login == 'testreunica') print 'selected';?>
|
||||
>REUNICA</option>
|
||||
</select>
|
||||
<select name="mois" onchange="document.form_stats.submit()">
|
||||
<?php
|
||||
for ($listeMois = 200804; $listeMois++; true) {
|
||||
print '<option value="'.
|
||||
substr($listeMois, 0, 4).'-'.
|
||||
substr($listeMois, 4, 2).'" ';
|
||||
if ($mois == substr($listeMois, 0, 4).'-'.
|
||||
substr($listeMois, 4, 2)) {
|
||||
print 'selected';
|
||||
}
|
||||
print '>'.substr($listeMois, 4, 2).'/'.
|
||||
substr($listeMois, 0, 4).'</option>';
|
||||
if (intval($listeMois) == intval(date('Ym'))) {
|
||||
break;
|
||||
} else if (intval(substr($listeMois, 4, 2)) == 12) {
|
||||
$listeMois = (substr($listeMois, 0, 4) + 1).'00';
|
||||
}
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2"> </td>
|
||||
<td colspan="2"> </td>
|
||||
</tr>
|
||||
<?php
|
||||
$src = './graphs/bar1.php?w=575&h=310&login='.$login.'&mois='.$mois;
|
||||
?>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="550" align="center">
|
||||
<img src="<?=$src?>&vue=jour" width="550" height="280"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="550" align="center">
|
||||
<img src="./graphs/bar1.php?w=575&h=310&login=<?=$login?>&mois=<?=$mois?>&vue=jour" width="550" height="280"/>
|
||||
</td>
|
||||
<td width="30"> </td>
|
||||
<td width="550" align="center">
|
||||
<img src="<?=$src?>&vue=jour&payant=1" width="550" height="280"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="550" align="center">
|
||||
<img src="./graphs/bar1.php?w=575&h=310&login=<?=$login?>&mois=<?=$mois?>&vue=jour&payant=1" width="550" height="280"/>
|
||||
</td>
|
||||
<td width="30"> </td>
|
||||
<td width="550" align="center">
|
||||
<img src="<?=$src?>&vue=heure" width="550" height="280"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="550" align="center"><img src="./graphs/bar1.php?w=575&h=310&login=<?=$login?>&mois=<?=$mois?>&vue=heure" width="550" height="280"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2"> </td>
|
||||
<td colspan="2"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
?>
|
||||
|
@ -1,83 +1,78 @@
|
||||
<?
|
||||
require_once 'common/dates.php';
|
||||
// Déclation du client Soap auprès du webservice
|
||||
$nomFic = (isset($_REQUEST['nomFic'])) ? $_REQUEST['nomFic'] : '';
|
||||
|
||||
/** 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/ws/',
|
||||
'uri' => 'http://78.31.45.206/',
|
||||
'login' => $_SESSION['tabInfo']['login'],
|
||||
'password' => $_SESSION['tabInfo']['password']
|
||||
));
|
||||
// Génération liste surveillance
|
||||
if (strtolower($_SESSION['tabInfo']['login']) == 'cnasea95' ||
|
||||
strtolower($_SESSION['tabInfo']['login']) == 'cnasea96' ||
|
||||
$_SESSION['tabInfo']['idClient'] == 32 ||
|
||||
$_SESSION['tabInfo']['idClient'] == 82) {
|
||||
$ref = '*';
|
||||
} else {
|
||||
$ref = $_SESSION['tabInfo']['prenom'];
|
||||
}
|
||||
|
||||
|
||||
isset($_REQUEST['nomFic'])? $nomFic = $_REQUEST['nomFic'] : $nomFic='' ;
|
||||
|
||||
//Génération liste surveillance
|
||||
$ref = $_SESSION['tabInfo']['prenom'];
|
||||
if ( strtolower($_SESSION['tabInfo']['login'])=='cnasea95' ||
|
||||
strtolower($_SESSION['tabInfo']['login'])=='cnasea96' ||
|
||||
$_SESSION['tabInfo']['idClient']==32 ||
|
||||
$_SESSION['tabInfo']['idClient']==82
|
||||
) $ref='*';
|
||||
|
||||
try {
|
||||
$O = $client->getListeFichierSurv($_SESSION['tabInfo']['login'], $ref, $nomFic);
|
||||
$tabFichier=$O['results'];
|
||||
} catch (SoapFault $fault) {
|
||||
require_once 'soaperror.php';
|
||||
processSoapFault($client,$fault,$tabInfo);
|
||||
}
|
||||
require_once 'scoresws/scoresws-int.php';
|
||||
$tabFichier = scoresws_getListeFichierSurv($_SESSION['tabInfo']['login'],
|
||||
$ref, $nomFic);
|
||||
?>
|
||||
<div id="center">
|
||||
<h1>IDENTITÉ DE L'ENTREPRISE</h1>
|
||||
<h1>IDENTITÉ DE L'ENTREPRISE</h1>
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="200" class="StyleInfoLib">Mon identifiant</td>
|
||||
<td width="350" class="StyleInfoData"><i><?=$_SESSION['tabInfo']['login']?></i></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="200" class="StyleInfoLib">Mon identité</td>
|
||||
<td width="350" class="StyleInfoData"><i><?=$_SESSION['tabInfo']['nom']?></i></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="200" class="StyleInfoLib">Mon identifiant</td>
|
||||
<td width="350" class="StyleInfoData"><i>
|
||||
<?=$_SESSION['tabInfo']['login']?></i></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="200" class="StyleInfoLib">Mon identité</td>
|
||||
<td width="350" class="StyleInfoData"><i>
|
||||
<?=$_SESSION['tabInfo']['nom']?></i></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h2>Surveillance</h2>
|
||||
|
||||
<?php if (count($tabFichier)>0){ ?>
|
||||
<?php
|
||||
if (count($tabFichier) > 0) {
|
||||
require_once 'common/dates.php';
|
||||
$wdate = new WDate;
|
||||
?>
|
||||
<table>
|
||||
<?php foreach ($tabFichier as $nomFic) {?>
|
||||
<?php foreach ($tabFichier as $nomFic) { ?>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<?php
|
||||
$tabTmp=explode('_', $nomFic);// surveillanceBodacc_SURBODTSTFTSCNASEA_20081223.csv html
|
||||
$dateFic=Wdate::dateT('Ymd','d/m/Y', substr($tabTmp[2],0,8));
|
||||
<td width="30"> </td>
|
||||
<?php
|
||||
$tabTmp = explode('_', $nomFic);
|
||||
// surveillanceBodacc_SURBODTSTFTSCNASEA_20081223.csv html
|
||||
$dateFic = $wdate->dateT('Ymd', 'd/m/Y', substr($tabTmp[2], 0, 8));
|
||||
|
||||
$localfile = PATH_SITE.'/cache/survliste/'.$nomFic;
|
||||
if (!file_exists($localfile)) {
|
||||
$dejaLu1='<b>';
|
||||
$dejaLu2='</b>';
|
||||
} else {
|
||||
$dejaLu1='';
|
||||
$dejaLu2='';
|
||||
}
|
||||
?>
|
||||
<td class="lienNormal">
|
||||
<?=$dejaLu1?>
|
||||
Liste des annonces du <?=$dateFic?>
|
||||
au format <a href="./?page=fichier&nomFic=<?=$nomFic?>" title="<?=$nomFic?>">CSV</a>
|
||||
ou au format <a href="./?page=survlisteann&nomFic=<?=$nomFic?>">HTML</a>
|
||||
ou au format <a href="./?page=survlisteann&nomFic=<?=$nomFic?>" title="<?=$nomFic?>">PDF</a>
|
||||
<?=$dejaLu2?>
|
||||
</td>
|
||||
$localfile = PATH_SITE.'/cache/survliste/'.$nomFic;
|
||||
if (!file_exists($localfile)) {
|
||||
$dejaLu1 = '<b>';
|
||||
$dejaLu2 = '</b>';
|
||||
} else {
|
||||
$dejaLu1 = '';
|
||||
$dejaLu2 = '';
|
||||
}
|
||||
?>
|
||||
<td class="lienNormal">
|
||||
<?=$dejaLu1?>
|
||||
Liste des annonces du <?=$dateFic?>
|
||||
au format <a href="./?page=fichier&nomFic=<?=$nomFic?>"
|
||||
title="<?=$nomFic?>">CSV</a>
|
||||
ou au format <a href="./?page=survlisteann&nomFic=<?=$nomFic?>">HTML</a>
|
||||
ou au format <a href="./?page=survlisteann&nomFic=<?=$nomFic?>"
|
||||
title="<?=$nomFic?>">PDF</a>
|
||||
<?=$dejaLu2?>
|
||||
</td>
|
||||
</tr>
|
||||
<? } ?>
|
||||
</table>
|
||||
<?php } else { ?>
|
||||
<div>Aucun fichier disponible !</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1,189 +1,196 @@
|
||||
<?php
|
||||
require_once 'common/dates.php';
|
||||
require_once 'common/curl.php';
|
||||
|
||||
/** 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/ws/',
|
||||
'uri' => 'http://78.31.45.206/',
|
||||
'login' => $_SESSION['tabInfo']['login'],
|
||||
'password' => $_SESSION['tabInfo']['password']
|
||||
));
|
||||
|
||||
require_once 'surveillance/survliste.php';
|
||||
|
||||
isset($_REQUEST['vue'])? $vue = $_REQUEST['vue'] : $vue='' ;
|
||||
isset($_REQUEST['nomFic'])? $nomFic = $_REQUEST['nomFic'] : $nomFic='' ;
|
||||
$vue = isset($_REQUEST['vue']) ? $_REQUEST['vue'] : '';
|
||||
$nomFic = isset($_REQUEST['nomFic']) ? $_REQUEST['nomFic'] : '';
|
||||
|
||||
$filtre = '';
|
||||
if (isset($_REQUEST['filtre'])) {
|
||||
switch (trim(strtolower($_REQUEST['filtre']))) {
|
||||
case 'procol': $filtre = 'procol'; break;
|
||||
case 'mmd': $filtre = 'mmd'; break;
|
||||
case 'radiations': $filtre = 'radiations'; break;
|
||||
case 'ventes': $filtre = 'ventes'; break;
|
||||
case 'comptes': $filtre = 'comptes'; break;
|
||||
case 'creations': $filtre = 'creations'; break;
|
||||
case 'bodacc': $filtre = 'bodacc'; break;
|
||||
default: $filtre = ''; break;
|
||||
}
|
||||
if (isset($_REQUEST['filtre'])) {
|
||||
switch (trim(strtolower($_REQUEST['filtre']))) {
|
||||
case 'procol': $filtre = 'procol'; break;
|
||||
case 'mmd': $filtre = 'mmd'; break;
|
||||
case 'radiations': $filtre = 'radiations'; break;
|
||||
case 'ventes': $filtre = 'ventes'; break;
|
||||
case 'comptes': $filtre = 'comptes'; break;
|
||||
case 'creations': $filtre = 'creations'; break;
|
||||
case 'bodacc': $filtre = 'bodacc'; break;
|
||||
default: $filtre = ''; break;
|
||||
}
|
||||
} else {
|
||||
$filtre = '';
|
||||
}
|
||||
|
||||
//Récupération du fichier
|
||||
$file = PATH_SITE.'/cache/survliste/'.$nomFic;
|
||||
// Récupération du fichier
|
||||
$file = PATH_SITE.'/cache/survliste/'.$nomFic;
|
||||
$file2 = $file.'.bz2';
|
||||
if (!file_exists($file) || filesize($file)==0 ) {
|
||||
//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);
|
||||
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'],
|
||||
$_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);
|
||||
}
|
||||
|
||||
$annonces = readann($file, $filtre);
|
||||
$annonces = readann($file, $filtre);
|
||||
$nbAnnonces = count($annonces);
|
||||
$firephp->log($nbAnnonces, 'count');
|
||||
$firephp->log($annonces[0], 'annonces');
|
||||
?>
|
||||
<div id="center">
|
||||
<h1>IDENTITÉ DE L'ENTREPRISE</h1>
|
||||
<h1>IDENTITÉ DE L'ENTREPRISE</h1>
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="200" class="StyleInfoLib">Mon identifiant</td>
|
||||
<td width="350" class="StyleInfoData"><?=$_SESSION['tabInfo']['login']?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="200" class="StyleInfoLib">Mon identité</td>
|
||||
<td width="350" class="StyleInfoData"><?=$_SESSION['tabInfo']['nom']?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="200" class="StyleInfoLib">Afficher uniquement les annonces</td>
|
||||
<td width="350" class="StyleInfoData"><form name="form_filtre" action="./?page=survlisteann&nomFic=<?=$nomFic?>" method="GET" enctype="multipart/form-data">
|
||||
<input type="hidden" name="page" value="survlisteann" />
|
||||
<input type="hidden" name="nomFic" value="<?=$nomFic?>" />
|
||||
<select name="filtre" onchange="document.form_filtre.submit()">
|
||||
<option value="-" <?if ($filtre=='') echo 'selected';?>>-</option>
|
||||
<option value="procol" <?if ($filtre=='procol') echo 'selected';?>>Procédures collectives</option>
|
||||
<option value="radiations" <?if ($filtre=='radiations') echo 'selected';?>>Radiations</option>
|
||||
<option value="ventes" <?if ($filtre=='ventes') echo 'selected';?>>Ventes/Cessions</option>
|
||||
<option value="mmd" <?if ($filtre=='mmd') echo 'selected';?>>Modifications diverses</option>
|
||||
<?php /* <option value="bodacc" <?if ($filtre=='bodacc') echo 'selected';?>>BODACC</option> */ ?>
|
||||
</select></form></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="200" class="StyleInfoLib">Télécharger la liste en pdf</td>
|
||||
<td width="350" class="StyleInfoData">
|
||||
<?php
|
||||
//On souhaite afficher 100 annonces par PDF
|
||||
$nbPDF = ceil($nbAnnonces/100);
|
||||
for($i=0;$i<$nbPDF;$i++){ ?>
|
||||
<a href="./html2pdf.php?q=<?=$nomFic?>&page=<?=$i+1?>&filtre=<?=$filtre?>"><?=$i+1?></a>
|
||||
<?php if($i!=$nbPDF-1) print "-"; ?>
|
||||
<?php } ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="200" class="StyleInfoLib">Mon identifiant</td>
|
||||
<td width="350" class="StyleInfoData">
|
||||
<?=$_SESSION['tabInfo']['login']?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="200" class="StyleInfoLib">Mon identité</td>
|
||||
<td width="350" class="StyleInfoData"><?=$_SESSION['tabInfo']['nom']?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="200" class="StyleInfoLib">Afficher uniquement les annonces</td>
|
||||
<td width="350" class="StyleInfoData">
|
||||
<form name="form_filtre"
|
||||
action="./?page=survlisteann&nomFic=<?=$nomFic?>"
|
||||
method="GET" enctype="multipart/form-data">
|
||||
<input type="hidden" name="page" value="survlisteann" />
|
||||
<input type="hidden" name="nomFic" value="<?=$nomFic?>" />
|
||||
<select name="filtre" onchange="document.form_filtre.submit()">
|
||||
<option value="-" <?if ($filtre == '') print 'selected';?>>-</option>
|
||||
<option value="procol" <?if ($filtre == 'procol') print 'selected';?>
|
||||
>Procédures collectives</option>
|
||||
<option value="radiations"
|
||||
<?if ($filtre == 'radiations') print 'selected';?>
|
||||
>Radiations</option>
|
||||
<option value="ventes" <?if ($filtre == 'ventes') print 'selected';?>
|
||||
>Ventes/Cessions</option>
|
||||
<option value="mmd" <?if ($filtre == 'mmd') print 'selected';?>
|
||||
>Modifications diverses</option>
|
||||
<?php
|
||||
/* <option value="bodacc" <?if ($filtre=='bodacc') print 'selected';?>
|
||||
>BODACC</option> */ ?>
|
||||
</select>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="200" class="StyleInfoLib">Télécharger la liste en pdf</td>
|
||||
<td width="350" class="StyleInfoData">
|
||||
<?php
|
||||
// On souhaite afficher 100 annonces par PDF
|
||||
$nbPDF = ceil($nbAnnonces / 100);
|
||||
for ($i = 0; $i < $nbPDF; $i++) {
|
||||
print '<a href="./html2pdf.php?q='.$nomFic.'&page='.($i + 1).
|
||||
'&filtre='.$filtre.'">'.($i + 1).'</a>';
|
||||
if ($i != $nbPDF - 1) {
|
||||
print "-";
|
||||
}
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h2>Surveillance</h2>
|
||||
<table>
|
||||
<?php
|
||||
if(count($annonces)>0)
|
||||
{
|
||||
foreach($annonces as $annonce){
|
||||
if (count($annonces) > 0) {
|
||||
foreach ($annonces as $annonce) {
|
||||
?>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="550" colspan="2" class="StyleInfoLib">Entreprise : <?=$annonce['RaisonSociale'].' ('.$annonce['Siren']?>)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="200" class="StyleInfoData">Site : <?=$annonce['SiteCnasea']?></td>
|
||||
<td width="350" colspan="2" class="StyleInfoData">Référence : <?=$annonce['Ref']?></td>
|
||||
</tr>
|
||||
<?php
|
||||
if ($annonce['Bodacc']=='A' || $annonce['Bodacc']=='B' || $annonce['Bodacc']=='C')
|
||||
{
|
||||
?>
|
||||
<tr>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="550" colspan="2" class="StyleInfoData">BODACC n°<?=$annonce['Parution'].' '.$annonce['Bodacc'].' du '.$annonce['DatePar'];?>. <?=$annonce['Tribunal']?>.</td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
elseif ($annonce['Bodacc']=='G')
|
||||
{
|
||||
?>
|
||||
<tr>
|
||||
<td width="550" colspan="2" class="StyleInfoLib">Entreprise :
|
||||
<?=$annonce['RaisonSociale'].' ('.$annonce['Siren']?>)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="550" colspan="2" class="StyleInfoData">GREFFE du <?=$annonce['Tribunal'].' au '.$annonce['DatePar'];?>.</td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
elseif ($annonce['Bodacc']=='P')
|
||||
{
|
||||
?>
|
||||
<tr>
|
||||
<td width="200" class="StyleInfoData">Site :
|
||||
<?=$annonce['SiteCnasea']?></td>
|
||||
<td width="350" colspan="2" class="StyleInfoData">Référence :
|
||||
<?=$annonce['Ref']?></td>
|
||||
</tr>
|
||||
<?php
|
||||
if ($annonce['Bodacc'] == 'A' ||
|
||||
$annonce['Bodacc'] == 'B' ||
|
||||
$annonce['Bodacc'] == 'C') {
|
||||
?>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="550" colspan="2" class="StyleInfoData">RNCS du <?=$annonce['Tribunal'].' au '.$annonce['DatePar'];?>.</td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
else
|
||||
{
|
||||
?>
|
||||
<tr>
|
||||
<td width="550" colspan="2" class="StyleInfoData">
|
||||
BODACC n°<?=$annonce['Parution'].' '.$annonce['Bodacc'].
|
||||
' du '.$annonce['DatePar'];?>. <?=$annonce['Tribunal']?>.</td>
|
||||
</tr>
|
||||
<?php
|
||||
} else if ($annonce['Bodacc'] == 'G') {
|
||||
?>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="550" colspan="2" class="StyleInfoData">Collecte SD du <?=$annonce['Tribunal'].' au '.$annonce['DatePar'];?>.</td>
|
||||
</tr>
|
||||
<td width="550" colspan="2" class="StyleInfoData">
|
||||
GREFFE du <?=$annonce['Tribunal'].' au '.$annonce['DatePar'];?>.</td>
|
||||
</tr>
|
||||
<?php
|
||||
} else if ($annonce['Bodacc'] == 'P') {
|
||||
?>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="550" colspan="2" class="StyleInfoData">
|
||||
RNCS du <?=$annonce['Tribunal'].' au '.$annonce['DatePar'];?>.</td>
|
||||
</tr>
|
||||
<?php
|
||||
} else {
|
||||
?>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="550" colspan="2" class="StyleInfoData">
|
||||
Collecte SD du <?=$annonce['Tribunal'].' au '.$annonce['DatePar'];?>.</td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="550" colspan="2" class="StyleInfoLib">
|
||||
<b><?=$annonce['Even']?></b></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="4"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="30"> </td><td width="550" colspan="2">
|
||||
<code><?=$annonce['TexteAnn']?></code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3"><hr width="80%"></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
} // Fin foreach
|
||||
} else { // Si pas d'annonces
|
||||
?>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="550" colspan="2" class="StyleInfoLib"><b><?=$annonce['Even']?></b></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="4"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="30"> </td><td width="550" colspan="2"><code><?=$annonce['TexteAnn']?></code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3"><hr width="80%"></td>
|
||||
</tr>
|
||||
<?php
|
||||
} // Fin foreach
|
||||
//Si pas d'annonces
|
||||
} else {
|
||||
?>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="550" colspan="2" class="StyleInfoLib">Aucune annonce</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="550" colspan="2" class="StyleInfoLib">Aucune annonce</td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1,170 +1,165 @@
|
||||
<script type="text/javascript" src="../js/synthese_perso_img.js"></script>
|
||||
<script type="text/javascript">
|
||||
function changeCouleur(nouvelleCouleur, cnt) {
|
||||
|
||||
elem = document.getElementById("idColor"+cnt);
|
||||
elem.style.backgroundColor = nouvelleCouleur;
|
||||
function changeCouleur(nouvelleCouleur, cnt)
|
||||
{
|
||||
elem = document.getElementById("idColor" + cnt);
|
||||
elem.style.backgroundColor = nouvelleCouleur;
|
||||
}
|
||||
|
||||
function changeStyle(nouveauStyle, cnt) {
|
||||
|
||||
document.images["idStyle"+cnt].src= 'img/ratios/' + nouveauStyle + '.png';
|
||||
document.images["idStyle"+cnt].alt= nouveauStyle;
|
||||
function changeStyle(nouveauStyle, cnt)
|
||||
{
|
||||
document.images["idStyle" + cnt].src =
|
||||
'img/ratios/' + nouveauStyle + '.png';
|
||||
document.images["idStyle" + cnt].alt = nouveauStyle;
|
||||
}
|
||||
</script>
|
||||
<?php
|
||||
if (!$_SESSION['connected']) die();
|
||||
|
||||
if (!$_SESSION['connected']) {
|
||||
die();
|
||||
}
|
||||
|
||||
/*
|
||||
* Si on recharge la page
|
||||
*/
|
||||
if(isset($_SESSION['imgcache'])) { // Si la session exite
|
||||
|
||||
if ((file_exists(PATH_SITE.'/cache/imgcache/'.$_SESSION['imgcache']))) { // Si le fichier existe
|
||||
|
||||
@unlink(PATH_SITE.'/cache/imgcache/'.$_SESSION['imgcache']); // On supprime le fichier
|
||||
}
|
||||
unset($_SESSION['imgcache']); // On détruit la session
|
||||
$_SESSION['graphperso']->init(); // On vide le graphe
|
||||
if (isset($_SESSION['imgcache'])) { // Si la session exite
|
||||
if ((file_exists(PATH_SITE.'/cache/imgcache/'.$_SESSION['imgcache']))) {
|
||||
unlink(PATH_SITE.'/cache/imgcache/'.$_SESSION['imgcache']);
|
||||
}
|
||||
unset($_SESSION['imgcache']); // On détruit la session
|
||||
$_SESSION['graphperso']->init(); // On vide le graphe
|
||||
}
|
||||
|
||||
require_once 'cache/cache.php';
|
||||
require_once 'ratios/ratios.php';
|
||||
require_once 'scoresws/scoresws.php';
|
||||
|
||||
$siret=trim(preg_replace('/[^0-9]/', '', $_REQUEST['siret']));
|
||||
if (strlen($siret)<>0 && strlen($siret)<>9 && strlen($siret)<>14) die('Paramètres incorrects !');
|
||||
$siret = trim(preg_replace('/[^0-9]/', '', $_REQUEST['siret']));
|
||||
if (strlen($siret) != 0 && strlen($siret) != 9 && strlen($siret) != 14) {
|
||||
die('Paramètres incorrects !');
|
||||
}
|
||||
$siren = substr($siret, 0, 9);
|
||||
$idEntreprise =
|
||||
intval(trim(preg_replace('/[^0-9]/', '', $_REQUEST['idEntreprise'])));
|
||||
if ($siret == 0 && $idEntreprise == 0) {
|
||||
die('Paramètres incorrects !');
|
||||
}
|
||||
|
||||
$idEntreprise=trim(preg_replace('/[^0-9]/', '', $_REQUEST['idEntreprise']))*1; // Si id=0 alors non communiqué
|
||||
if (($siret*1)==0 && $idEntreprise==0) die('Paramètres incorrects !');
|
||||
$siren=substr($siret,0,9);
|
||||
$O = scoresws_ratios($siret, $siren, $idEntreprise, 'synthese');
|
||||
if ($O === false) {
|
||||
die();
|
||||
}
|
||||
$bilansInfos = $O->BilansInfos;
|
||||
$ratiosInfos = $O->RatiosInfos;
|
||||
$ratiosEntrep = $O->RatiosEntrep;
|
||||
$ratiosEntrepEvol = $O->RatiosEntrepEvol;
|
||||
|
||||
isset($_REQUEST['ratio'])? $ratio=$_REQUEST['ratio'] : $ratio='';
|
||||
// Liste des ratios à afficher
|
||||
$tabRatio =
|
||||
array('r5' => array('evol' => 'r6', 'op' => 1000,
|
||||
'titre' => 'CHIFFRE D\'AFFAIRES'),
|
||||
'r7' => array('evol' => 'r8', 'op' => 1000,
|
||||
'titre' => 'RESULTAT COURANT AVANT IMPOTS'),
|
||||
'r10' => array('evol' => 'r11', 'op' => 1000,
|
||||
'titre' => 'RESULTAT NET'),
|
||||
'r18' => array('evol' => 'r19', 'op' => 1000,
|
||||
'titre' => 'FONDS PROPRES'),
|
||||
'r22' => array('evol' => 'r23', 'op' => 1000,
|
||||
'titre' => 'TOTAL BILAN'),
|
||||
'r231' => array('evol' => 'r235', 'op' => 1000,
|
||||
'titre' => 'FONDS DE ROULEMENT'),
|
||||
'r232' => array('evol' => 'r236', 'op' => 1000,
|
||||
'titre' => 'BESOIN EN FONDS DE ROULEMENT'),
|
||||
'r62' => array('evol' => 'r64', 'op' => 1000,
|
||||
'titre' => 'TRESORERIE'),
|
||||
'r24' => array('evol' => 'r24', 'op' => 1,
|
||||
'titre' => 'EFFECTIF', 'unite' => 1));
|
||||
|
||||
if (($siret*1)==0 || ($siren*1)<100){ $fileName = $page2.'-'.$idEntreprise;
|
||||
}else{ $fileName = $page2.'-'.$siret; }
|
||||
|
||||
$ratiosEntrep = array();
|
||||
$ratiosInfos = array();
|
||||
$bilansInfos = array();
|
||||
$rationsEntrepEvol = array();
|
||||
|
||||
|
||||
try {
|
||||
$O = $client->getRatios($siren, 'synthese');
|
||||
$bilansInfos = $O['result']['BilansInfos'];
|
||||
$ratiosInfos = $O['result']['RatiosInfos'];
|
||||
$ratiosEntrep = $O['result']['RatiosEntrep'];
|
||||
$ratiosEntrepEvol = $O['result']['RatiosEntrepEvol'];
|
||||
}catch (SoapFault $fault) {
|
||||
require_once 'soaperror.php';
|
||||
processSoapFault($client,$fault,$_SESSION['tabInfo']);
|
||||
die();
|
||||
function Date_to_DateFr($Date)
|
||||
{
|
||||
if (empty($Date) == false) {
|
||||
$jour = substr($Date, 6, 2);
|
||||
$mois = substr($Date, 4, 2);
|
||||
$annee = substr($Date, 0, 4);
|
||||
$Date_to_DateFr = $jour."/".$mois."/".$annee;
|
||||
}
|
||||
return $Date_to_DateFr;
|
||||
}
|
||||
|
||||
|
||||
//Liste des ratios à afficher
|
||||
$tabRatio = array(
|
||||
'r5' => array('evol'=>'r6', 'op' => 1000, 'titre'=>'CHIFFRE D\'AFFAIRES'),
|
||||
'r7' => array('evol'=>'r8', 'op' => 1000, 'titre'=>'RESULTAT COURANT AVANT IMPOTS'),
|
||||
'r10' => array('evol'=>'r11', 'op' => 1000, 'titre'=>'RESULTAT NET'),
|
||||
'r18' => array('evol'=>'r19', 'op' => 1000, 'titre'=>'FONDS PROPRES'),
|
||||
'r22' => array('evol'=>'r23', 'op' => 1000, 'titre'=>'TOTAL BILAN'),
|
||||
'r231' => array('evol'=>'r235', 'op' => 1000, 'titre'=>'FONDS DE ROULEMENT'),
|
||||
'r232' => array('evol'=>'r236', 'op' => 1000, 'titre'=>'BESOIN EN FONDS DE ROULEMENT'),
|
||||
'r62' => array('evol'=>'r64', 'op' => 1000, 'titre'=>'TRESORERIE'),
|
||||
'r24' => array('evol'=>'r24', 'op' => 1, 'titre'=>'EFFECTIF', 'unite' => 1),
|
||||
);
|
||||
function synthese_datagraph_perso($bilansInfos, $ratiosEntrep,
|
||||
$tabRatioGraph, $tabRatioGraphEvol)
|
||||
{
|
||||
$dataGraph = array();
|
||||
$dataEvol = array();
|
||||
|
||||
/******************************************
|
||||
* Fonction *
|
||||
*****************************************/
|
||||
|
||||
function Date_to_DateFr($Date){
|
||||
if(!empty($Date))
|
||||
{
|
||||
$jour = substr($Date,6,2);
|
||||
$mois =substr($Date,4,2);
|
||||
$annee = substr($Date,0,4);
|
||||
$Date_to_DateFr = $jour."/".$mois."/".$annee;
|
||||
}
|
||||
return $Date_to_DateFr;
|
||||
$nbrAnnees = count($bilansInfos) - 1;
|
||||
$i = 0;
|
||||
foreach ($bilansInfos as $dateCloture) {
|
||||
// Données pour le graphique
|
||||
if (isset($dateCloture['dateCloture'])) {
|
||||
$dataGraph[$i]['date'] = $dateCloture['dateCloture'];
|
||||
$dataGraph[$i]['duree'] = $dateCloture['duree'];
|
||||
}
|
||||
// Données pour les graphiques évolutions
|
||||
if (isset($bilansInfos[$nbrAnnees - $i]['dateCloture'])) {
|
||||
foreach ($tabRatioGraphEvol as $ratio => $info) {
|
||||
$dataEvol[$ratio][] =
|
||||
array('date' => $bilansInfos[$nbrAnnees-$i]['dateCloture'],
|
||||
'value' => (($ratiosEntrep[$nbrAnnees - $i][$ratio] !=
|
||||
'NS') ?
|
||||
$ratiosEntrep[$nbrAnnees - $i][$ratio] /
|
||||
$info['op'] : 0));
|
||||
}
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
return array("graph" => $dataGraph, "evol" => $dataEvol);
|
||||
}
|
||||
|
||||
|
||||
function synthese_datagraph_perso($bilansInfos, $ratiosEntrep, $tabRatioGraph, $tabRatioGraphEvol){
|
||||
global $firephp;
|
||||
$dataGraph = array();
|
||||
$dataEvol = array();
|
||||
|
||||
$nbrAnnees = count($bilansInfos)-1;
|
||||
$i=0;
|
||||
foreach($bilansInfos as $dateCloture){
|
||||
//Données pour le graphique
|
||||
if(isset($dateCloture['dateCloture'])){
|
||||
$dataGraph[$i]['date'] = $dateCloture['dateCloture'];
|
||||
$dataGraph[$i]['duree'] = $dateCloture['duree'];
|
||||
}
|
||||
//Données pour les graphiques évolutions
|
||||
if(isset($bilansInfos[$nbrAnnees-$i]['dateCloture'])){
|
||||
foreach($tabRatioGraphEvol as $ratio => $info){
|
||||
$dataEvol[$ratio][] = array(
|
||||
'date'=>$bilansInfos[$nbrAnnees-$i]['dateCloture'],
|
||||
'value'=>(($ratiosEntrep[$nbrAnnees-$i][$ratio]!='NS') ? $ratiosEntrep[$nbrAnnees-$i][$ratio]/$info['op'] : 0 )
|
||||
);
|
||||
}
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
return array("graph" => $dataGraph, "evol" => $dataEvol);
|
||||
}
|
||||
|
||||
$data = synthese_datagraph_perso($bilansInfos, $ratiosEntrep, $tabRatioGraph, $tabRatio);
|
||||
|
||||
$data = synthese_datagraph_perso($bilansInfos, $ratiosEntrep,
|
||||
$tabRatioGraph, $tabRatio);
|
||||
$dataGraph = $data['graph'];
|
||||
$dataEvol = $data['evol'];
|
||||
|
||||
//$firephp->log($dataEvol, 'evol');
|
||||
|
||||
$dataEvol = $data['evol'];
|
||||
?>
|
||||
|
||||
<script type="text/javascript" src="./js/jquery.qtip.js"></script>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function()
|
||||
{
|
||||
$('#synthese a[tooltip]').each(function()
|
||||
{
|
||||
$(this).qtip({
|
||||
content: $(this).attr('tooltip'),
|
||||
style: { width: 500, name: 'dark' },
|
||||
position: { corner: { target: 'bottomMiddle', tooltip: 'topMiddle' } }
|
||||
});
|
||||
});
|
||||
$(document).ready(function()
|
||||
{
|
||||
$('#synthese a[tooltip]').each(function()
|
||||
{
|
||||
$(this).qtip({
|
||||
content: $(this).attr('tooltip'),
|
||||
style: { width: 500, name: 'dark' },
|
||||
position: { corner: { target: 'bottomMiddle',
|
||||
tooltip: 'topMiddle' } }
|
||||
});
|
||||
});
|
||||
|
||||
$('.jTip').each(function()
|
||||
{
|
||||
$(this).qtip(
|
||||
{
|
||||
content: {
|
||||
text: 'Chargement...',
|
||||
url: $(this).attr('rel'),
|
||||
title: { text: 'Evolution - ' + $(this).attr('name')}
|
||||
},
|
||||
position: {
|
||||
corner: {
|
||||
target: 'leftMiddle',
|
||||
tooltip: 'rightMiddle'
|
||||
}
|
||||
},
|
||||
show: { solo: true},
|
||||
style: {
|
||||
tip: true,
|
||||
border: { width: 1, radius: 0 },
|
||||
name: 'light',
|
||||
width: 400
|
||||
}
|
||||
})
|
||||
});
|
||||
});
|
||||
$('.jTip').each(function()
|
||||
{
|
||||
$(this).qtip(
|
||||
{
|
||||
content: {
|
||||
text: 'Chargement...',
|
||||
url: $(this).attr('rel'),
|
||||
title: { text: 'Evolution - ' + $(this).attr('name')}
|
||||
},
|
||||
position: {
|
||||
corner: {
|
||||
target: 'leftMiddle',
|
||||
tooltip: 'rightMiddle'
|
||||
}
|
||||
},
|
||||
show: { solo: true},
|
||||
style: {
|
||||
tip: true,
|
||||
border: { width: 1, radius: 0 },
|
||||
name: 'light',
|
||||
width: 400
|
||||
}
|
||||
})
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<style>
|
||||
#synthese { clear:both; font-family: "Lucida Sans Unicode", "Lucida Grande", Sans-Serif; font-size: 12px; margin: 10px 0 0 0; width:100%; text-align: left; border-collapse: collapse; }
|
||||
@ -189,133 +184,177 @@ ul li{padding-top:3px;}
|
||||
<h1>SYNTHÈSE</h1>
|
||||
|
||||
<table width="570" border="0" align="left" bgcolor="#FFFFFF">
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="200" class="StyleInfoLib">Numéro identifiant Siren</td>
|
||||
<td width="340" class="StyleInfoData"><?=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"><?=$_SESSION['tabInfo']['entrep']['raisonSociale'];?></td>
|
||||
</tr>
|
||||
<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">
|
||||
<?=$_SESSION['tabInfo']['entrep']['raisonSociale'];?></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<?php
|
||||
if (count($ratiosEntrep)==0 || !isset($ratiosEntrep))
|
||||
{
|
||||
if (isset($ratiosEntrep) == false || count($ratiosEntrep) == 0) {
|
||||
?>
|
||||
<table>
|
||||
<tr><td width="30"> </td><td><b>Aucun bilan disponible pour cette entreprise !</b></td></tr>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td><b>Aucun bilan disponible pour cette entreprise !</b></td>
|
||||
</tr>
|
||||
</table>
|
||||
<?php
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
$ratio = (isset($_REQUEST['ratio'])) ? $_REQUEST['ratio'] : '';
|
||||
|
||||
$tab_dateCloture = array(Date_to_DateFr($bilansInfos[2]['dateCloture']), Date_to_DateFr($bilansInfos[1]['dateCloture']), Date_to_DateFr($bilansInfos[0]['dateCloture']));
|
||||
$tab_dateCloture = array(Date_to_DateFr($bilansInfos[2]['dateCloture']),
|
||||
Date_to_DateFr($bilansInfos[1]['dateCloture']),
|
||||
Date_to_DateFr($bilansInfos[0]['dateCloture']));
|
||||
?>
|
||||
|
||||
<p><a href="Javascript:;" onClick="vider('vide');">Vider le graphe</a></p>
|
||||
<table id="synthese">
|
||||
<thead>
|
||||
<tr>
|
||||
<th align="center"><?php if($ratio!=''){?><a href="/?page=synthese&siret=<?=$_REQUEST['siret']?>&idEntreprise=<?=$_REQUEST['idEntreprise']?>" title="Retour à la page complète"><img src="./img/synthese/chart_bar.png" alt="Visionner le graphique"></a><?php } ?></th>
|
||||
<th class="date"><?=$tab_dateCloture[0]."<br />".$bilansInfos[2]['duree']." mois"; ?></th>
|
||||
<th class="date"><?=$tab_dateCloture[1]."<br />".$bilansInfos[1]['duree']." mois"; ?></th>
|
||||
<th class="date"><?=$tab_dateCloture[2]."<br />".$bilansInfos[0]['duree']." mois"; ?></th>
|
||||
<th class="date" align="center">Actions</th>
|
||||
<th class="date" align="center">Couleur</th>
|
||||
<th class="date" align="center">Style</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th align="center">
|
||||
<?php
|
||||
if ($ratio != '') {
|
||||
print '<a href="/?page=synthese&siret='.$_REQUEST['siret'].
|
||||
'&idEntreprise='.$_REQUEST['idEntreprise'].
|
||||
'" title="Retour à la page complète">'.
|
||||
'<img src="./img/synthese/chart_bar.png"'.
|
||||
' alt="Visionner le graphique"></a>';
|
||||
}
|
||||
?>
|
||||
</th>
|
||||
<th class="date">
|
||||
<?=$tab_dateCloture[0]."<br />".$bilansInfos[2]['duree']." mois"; ?>
|
||||
</th>
|
||||
<th class="date">
|
||||
<?=$tab_dateCloture[1]."<br />".$bilansInfos[1]['duree']." mois"; ?>
|
||||
</th>
|
||||
<th class="date">
|
||||
<?=$tab_dateCloture[2]."<br />".$bilansInfos[0]['duree']." mois"; ?>
|
||||
</th>
|
||||
<th class="date" align="center">Actions</th>
|
||||
<th class="date" align="center">Couleur</th>
|
||||
<th class="date" align="center">Style</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
<?php
|
||||
//print synthese_tablerow($ratiosInfos, $dataEvol, $tabRatio)
|
||||
$ligne_style = array('Line', 'DashLine', 'DotLine', 'DotDashLine', 'AltDashLine', 'Line', 'DashLine', 'DotLine', 'DotDashLine');
|
||||
$color = array('#ff0000', '#3333ff', '#000000', '#808080', '#333366', '#c3c3e6', '#8080ff', '#80ff80', '#ff8080');
|
||||
$ligne_style =
|
||||
array('Line', 'DashLine', 'DotLine', 'DotDashLine',
|
||||
'AltDashLine', 'Line', 'DashLine', 'DotLine', 'DotDashLine');
|
||||
$color =
|
||||
array('#ff0000', '#3333ff', '#000000', '#808080',
|
||||
'#333366', '#c3c3e6', '#8080ff', '#80ff80', '#ff8080');
|
||||
$j = 0;
|
||||
foreach($tabRatio as $ratio => $info) {
|
||||
foreach ($tabRatio as $ratio => $info) {
|
||||
$comment = empty($ratiosInfos[$ratio]['commentaires']) ? '' :
|
||||
' tooltip="'.wrapComment($ratiosInfos[$ratio]['commentaires']).'" ';
|
||||
$tab_chiffre = array(dRatio(2, $ratio),
|
||||
dRatio(1, $ratio),
|
||||
dRatio(0, $ratio));
|
||||
$chaine_date_cloture =
|
||||
$tab_dateCloture[0].'@'.
|
||||
$tab_dateCloture[1].'@'.
|
||||
$tab_dateCloture[2];
|
||||
$chaine_date_dure =
|
||||
$bilansInfos[0]['duree'].'@'.
|
||||
$bilansInfos[1]['duree'].'@'.
|
||||
$bilansInfos[2]['duree'];
|
||||
$chaine_chiffre =
|
||||
$tab_chiffre[0].'@'.
|
||||
$tab_chiffre[1].'@'.
|
||||
$tab_chiffre[2];
|
||||
|
||||
$comment = empty($ratiosInfos[$ratio]['commentaires']) ? "" : " tooltip=\"".wrapComment($ratiosInfos[$ratio]['commentaires'])."\" ";
|
||||
$tab_chiffre = array(dRatio(2,$ratio), dRatio(1,$ratio), dRatio(0,$ratio));
|
||||
//<span onClick=\"alert(document.getElementById('idColor$j').
|
||||
// style.backgroundColor);\">Test</span>
|
||||
//<span onClick=\"alert(document.images['idStyle$j'].alt);\">Test2</span>
|
||||
|
||||
$chaine_date_cloture = $tab_dateCloture[0]."@".$tab_dateCloture[1]."@".$tab_dateCloture[2];
|
||||
$chaine_date_dure = $bilansInfos[0]['duree']."@".$bilansInfos[1]['duree']."@".$bilansInfos[2]['duree'];
|
||||
$chaine_chiffre = $tab_chiffre[0]."@".$tab_chiffre[1]."@".$tab_chiffre[2];
|
||||
print "<tr>\n";
|
||||
print "<td class=\"head\"><a $comment >".$info['titre']."</a></td>\n";
|
||||
print "<td class=\"right\">".$tab_chiffre[0]."</td>\n";
|
||||
print "<td class=\"right\">".$tab_chiffre[1]."</td>\n";
|
||||
print "<td class=\"right\">".$tab_chiffre[2]."</td>\n";
|
||||
print "<td align=\"center\">
|
||||
<a href=\"Javascript:;\" onClick=\"ajouter('ajoute',
|
||||
'".$_REQUEST['siret']."',
|
||||
'".$chaine_date_cloture."',
|
||||
'".$chaine_date_dure."',
|
||||
'".$chaine_chiffre."',
|
||||
'".addslashes($info['titre'])."',
|
||||
'".$info['evol']."',
|
||||
document.getElementById('idColor$j').style.backgroundColor,
|
||||
document.images['idStyle$j'].alt);\">
|
||||
Ajouter
|
||||
</a>
|
||||
|
||||
// <span onClick=\"alert(document.getElementById('idColor$j').style.backgroundColor);\">Test</span>
|
||||
// <span onClick=\"alert(document.images['idStyle$j'].alt);\">Test2</span>
|
||||
<a href=\"Javascript:;\" onClick=\"enlever('enleve', '".
|
||||
$info['evol']."');\">Enlever</a>
|
||||
</td>\n";
|
||||
|
||||
print "<td class=\"right\" >
|
||||
<div id=\"idColor".$j."\" style=\"background-color:".
|
||||
$color[$j].";\"> </div>
|
||||
<form>
|
||||
<select name=\"color\"
|
||||
onchange=\"changeCouleur(this.options[this.selectedIndex].value, '".
|
||||
$j."');\">
|
||||
<option value=\"#000000\">Couleur</option>
|
||||
<option value=\"#ff0000\">Rouge</option>
|
||||
<option value=\"#3333ff\">Bleu</option>
|
||||
<option value=\"#000000\">Noire</option>
|
||||
<option value=\"#808080\">Gris</option>
|
||||
<option value=\"#333366\">Violet</option>
|
||||
<option value=\"#c3c3e6\">---</option>
|
||||
<option value=\"#8080ff\">Mauve</option>
|
||||
<option value=\"#80ff80\">Vert</option>
|
||||
<option value=\"#ff8080\">Orange</option>
|
||||
</select>
|
||||
</form>
|
||||
</td>\n";
|
||||
print "<td align=\"center\">
|
||||
<form>
|
||||
<div>
|
||||
<img style=\"margin-bottom:8px;\" name=\"idStyle".$j.
|
||||
"\" src=\"img/ratios/".$ligne_style[$j].".png\" alt=\"".
|
||||
$ligne_style[$j]."\" width=\"90\" height=\"1\" /></div>
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td class=\"head\"><a $comment >".$info['titre']."</a></td>\n";
|
||||
echo "<td class=\"right\">".$tab_chiffre[0]."</td>\n";
|
||||
echo "<td class=\"right\">".$tab_chiffre[1]."</td>\n";
|
||||
echo "<td class=\"right\">".$tab_chiffre[2]."</td>\n";
|
||||
echo "<td align=\"center\">
|
||||
|
||||
<a href=\"Javascript:;\" onClick=\"ajouter('ajoute'
|
||||
, '".$_REQUEST['siret']."'
|
||||
, '".$chaine_date_cloture."'
|
||||
, '".$chaine_date_dure."'
|
||||
, '".$chaine_chiffre."'
|
||||
, '".addslashes($info['titre'])."'
|
||||
, '".$info['evol']."'
|
||||
, document.getElementById('idColor$j').style.backgroundColor
|
||||
, document.images['idStyle$j'].alt
|
||||
);\">Ajouter</a>
|
||||
|
||||
<a href=\"Javascript:;\" onClick=\"enlever('enleve', '".$info['evol']."');\">Enlever</a>
|
||||
</td>\n";
|
||||
|
||||
echo "<td class=\"right\" >
|
||||
<div id=\"idColor".$j."\" style=\"background-color:".$color[$j].";\"> </div>
|
||||
<form>
|
||||
<select name=\"color\" onchange=\"changeCouleur(this.options[this.selectedIndex].value, '".$j."');\">
|
||||
<option value=\"#000000\">Couleur</option>
|
||||
<option value=\"#ff0000\">Rouge</option>
|
||||
<option value=\"#3333ff\">Bleu</option>
|
||||
<option value=\"#000000\">Noire</option>
|
||||
<option value=\"#808080\">Gris</option>
|
||||
<option value=\"#333366\">Violet</option>
|
||||
<option value=\"#c3c3e6\">---</option>
|
||||
<option value=\"#8080ff\">Mauve</option>
|
||||
<option value=\"#80ff80\">Vert</option>
|
||||
<option value=\"#ff8080\">Orange</option>
|
||||
</select>
|
||||
</form>
|
||||
</td>\n";
|
||||
echo "<td align=\"center\">
|
||||
<form>
|
||||
<div><img style=\"margin-bottom:8px;\" name=\"idStyle".$j."\" src=\"img/ratios/".$ligne_style[$j].".png\" alt=\"".$ligne_style[$j]."\" width=\"90\" height=\"1\" /></div>
|
||||
|
||||
<select name=\"style\" onchange=\"changeStyle(this.options[this.selectedIndex].value, '".$j."');\">
|
||||
<option value=\"".$ligne_style[$j]."\">Style</option>
|
||||
<option value=\"Line\">Line</option>
|
||||
<option value=\"DashLine\">DashLine</option>
|
||||
<option value=\"DotLine\">DotLine</option>
|
||||
<option value=\"DotDashLine\">DotDashLine</option>
|
||||
<option value=\"AltDashLine\">AltDashLine</option>
|
||||
</select>
|
||||
</form>
|
||||
</td>\n";
|
||||
|
||||
echo "</tr>\n";
|
||||
$j++;
|
||||
<select name=\"style\"
|
||||
onchange=\"changeStyle(this.options[this.selectedIndex].value, '".
|
||||
$j."');\">
|
||||
<option value=\"".$ligne_style[$j]."\">Style</option>
|
||||
<option value=\"Line\">Line</option>
|
||||
<option value=\"DashLine\">DashLine</option>
|
||||
<option value=\"DotLine\">DotLine</option>
|
||||
<option value=\"DotDashLine\">DotDashLine</option>
|
||||
<option value=\"AltDashLine\">AltDashLine</option>
|
||||
</select>
|
||||
</form>
|
||||
</td>\n";
|
||||
print "</tr>\n";
|
||||
$j++;
|
||||
}
|
||||
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
<br/>
|
||||
|
||||
<?php
|
||||
print "<div id=\"img\">Bla bla bla bla bla bla bla bla bla bla bla bla.</div>";
|
||||
|
||||
//echo "<pre>";
|
||||
//print_r($_SESSION['graphperso']);
|
||||
unset($_SESSION['graphperso']);
|
||||
//print_r($bilansInfos);
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -30,64 +30,38 @@ if ($start == 1) {
|
||||
// -------------------------------------------------------------------------- //
|
||||
// Recuperation de l'url du fichier
|
||||
// -------------------------------------------------------------------------- //
|
||||
$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']));
|
||||
try {
|
||||
switch ($type) {
|
||||
// ------------------------------------------------------------------- //
|
||||
// Surveillance
|
||||
// ------------------------------------------------------------------- //
|
||||
case 'surveillance':
|
||||
$res = $client->
|
||||
getListeSurveillancesCsv($_POST['menuD'],
|
||||
$_SESSION['tabInfo']['login']);
|
||||
break;
|
||||
// ------------------------------------------------------------------- //
|
||||
// Consommation
|
||||
// ------------------------------------------------------------------- //
|
||||
case 'consommation':
|
||||
$date = substr($_POST['menuD'], 3, 4).
|
||||
substr($_POST['menuD'], 0, 2);
|
||||
$detail = ($_POST['caseC'] == 'true') ? true : false;
|
||||
if (isset($_POST['caseC2']) == true) {
|
||||
$tous = ($_POST['caseC2'] == 'true') ? true : false;
|
||||
} else {
|
||||
$tous = false;
|
||||
}
|
||||
if (!isset($_POST['argv'])) {
|
||||
$login = '';
|
||||
}
|
||||
$firephp->log("date='$date'");
|
||||
$firephp->log("detail='$detail'");
|
||||
$firephp->log("idClient='$idClient'");
|
||||
$firephp->log("login='$login'");
|
||||
$firephp->log("tous='$tous'");
|
||||
$res = $client->
|
||||
getLogsClients($date, $detail, $idClient, $login, $tous);
|
||||
break;
|
||||
// ------------------------------------------------------------------- //
|
||||
// Portefeuille
|
||||
// ------------------------------------------------------------------- //
|
||||
case 'portefeuille':
|
||||
$login = $_SESSION['tabInfo']['login'];
|
||||
$idClient = $_SESSION['tabInfo']['idClient'];
|
||||
$res = $client->getPortefeuilleCsv($login, $idClient);
|
||||
break;
|
||||
}
|
||||
if (isset($res['result']['Url']) == true) {
|
||||
$return = $res['result']['Url'];
|
||||
require_once 'scoresws/scorews-int.php';
|
||||
switch ($type) {
|
||||
case 'surveillance':
|
||||
$res =
|
||||
scoresws_getListeSurveillancesCsv($_POST['menuD'],
|
||||
$_SESSION['tabInfo']['login']);
|
||||
break;
|
||||
case 'consommation':
|
||||
$date = substr($_POST['menuD'], 3, 4).
|
||||
substr($_POST['menuD'], 0, 2);
|
||||
$detail = ($_POST['caseC'] == 'true') ? true : false;
|
||||
if (isset($_POST['caseC2']) == true) {
|
||||
$tous = ($_POST['caseC2'] == 'true') ? true : false;
|
||||
} else {
|
||||
$return = 'FALSE';
|
||||
$tous = false;
|
||||
}
|
||||
} catch (SoapFault $e) {
|
||||
require_once 'soaperror.php';
|
||||
processSoapFault($client, $e, $_SESSION['tabInfo']);
|
||||
exit;
|
||||
if (!isset($_POST['argv'])) {
|
||||
$login = '';
|
||||
}
|
||||
$res = scoresws_getLogsClients($date, $detail, $idClient,
|
||||
$login, $tous);
|
||||
break;
|
||||
case 'portefeuille':
|
||||
$login = $_SESSION['tabInfo']['login'];
|
||||
$idClient = $_SESSION['tabInfo']['idClient'];
|
||||
$res = scoresws_getPortefeuilleCsv($login, $idClient);
|
||||
break;
|
||||
}
|
||||
if (isset($res->Url) == true) {
|
||||
$return = $res->Url;
|
||||
} else {
|
||||
$return = 'FALSE';
|
||||
}
|
||||
} else {
|
||||
// -------------------------------------------------------------------------- //
|
||||
@ -103,20 +77,21 @@ if ($start == 1) {
|
||||
$file = $tableau[sizeof($tableau) - 1];
|
||||
|
||||
// Suppression du fichier si le temps de cache est depasse
|
||||
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);
|
||||
}
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
// Recuperation du fichier sur le serveur
|
||||
if (!file_exists($path.$file)) {
|
||||
if (file_exists($path.$file) == false) {
|
||||
// On check si le fichier est present sur l'url
|
||||
$url_tab = getUrl($url, '', '', '', false);
|
||||
if ($url_tab['code'] == 408 ||
|
||||
@ -137,7 +112,7 @@ if ($start == 1) {
|
||||
// Le fichier existe sur l'extranet
|
||||
if (file_exists($path.$file)) {
|
||||
if (filesize($path.$file) > 0) {
|
||||
$return = '<u><a title="Télécharger le fichier"'.
|
||||
$return = '<u><a title="Télécharger le fichier"'.
|
||||
' target="_blank" href="/fichier/'.$type.'/'.$file.
|
||||
'">Cliquez-ici pour télécharger'.
|
||||
' le fichier.</a></u>';
|
||||
@ -156,4 +131,4 @@ if ($start == 1) {
|
||||
}
|
||||
}
|
||||
}
|
||||
echo $return;
|
||||
print $return;
|
||||
|
Loading…
Reference in New Issue
Block a user